|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[63,3,5,6,7,8,9,10,17,184],{"+NIl":
|
|
|
/*!***************************************************!*\
|
|
|
!*** ./node_modules/codemirror/mode/stex/stex.js ***!
|
|
|
\***************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";e.defineMode("stex",(function(e,t){function n(e,t){e.cmdState.push(t)}function r(e){return e.cmdState.length>0?e.cmdState[e.cmdState.length-1]:null}function i(e,t,n){return function(){this.name=e,this.bracketNo=0,this.style=t,this.styles=n,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var a={};function o(e,t){e.f=t}function s(e,t){var i;if(e.match(/^\\[a-zA-Z@]+/)){var s=e.current().slice(1);return n(t,i=new(i=a.hasOwnProperty(s)?a[s]:a.DEFAULT)),o(t,c),i.style}if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/\\]/))return"tag";if(e.match("\\["))return o(t,(function(e,t){return l(e,t,"\\]")})),"keyword";if(e.match("\\("))return o(t,(function(e,t){return l(e,t,"\\)")})),"keyword";if(e.match("$$"))return o(t,(function(e,t){return l(e,t,"$$")})),"keyword";if(e.match("$"))return o(t,(function(e,t){return l(e,t,"$")})),"keyword";var u=e.next();return"%"==u?(e.skipToEnd(),"comment"):"}"==u||"]"==u?(i=r(t))?(i.closeBracket(u),o(t,c),"bracket"):"error":"{"==u||"["==u?(n(t,i=new(i=a.DEFAULT)),"bracket"):/\d/.test(u)?(e.eatWhile(/[\w.%]/),"atom"):(e.eatWhile(/[\w\-_]/),"begin"==(i=function(e){for(var t=e.cmdState,n=t.length-1;n>=0;n--){var r=t[n];if("DEFAULT"!=r.name)return r}return{styleIdentifier:function(){return null}}}(t)).name&&(i.argument=e.current()),i.styleIdentifier())}function l(e,t,n){if(e.eatSpace())return null;if(n&&e.match(n))return o(t,s),"keyword";if(e.match(/^\\[a-zA-Z@]+/))return"tag";if(e.match(/^[a-zA-Z]+/))return"variable-2";if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/]/))return"tag";if(e.match(/^[\^_&]/))return"tag";if(e.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(e.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var r=e.next();return"{"==r||"}"==r||"["==r||"]"==r||"("==r||")"==r?"bracket":"%"==r?(e.skipToEnd(),"comment"):"error"}function c(e,t){var n=e.peek();return"{"==n||"["==n?(r(t).openBracket(n),e.eat(n),o(t,s),"bracket"):/[ \t\r]/.test(n)?(e.eat(n),null):(o(t,s),function(e){var t=e.cmdState.pop();t&&t.closeBracket()}(t),s(e,t))}return a.importmodule=i("importmodule","tag",["string","builtin"]),a.documentclass=i("documentclass","tag",["","atom"]),a.usepackage=i("usepackage","tag",["atom"]),a.begin=i("begin","tag",["atom"]),a.end=i("end","tag",["atom"]),a.label=i("label","tag",["atom"]),a.ref=i("ref","tag",["atom"]),a.eqref=i("eqref","tag",["atom"]),a.cite=i("cite","tag",["atom"]),a.bibitem=i("bibitem","tag",["atom"]),a.Bibitem=i("Bibitem","tag",["atom"]),a.RBibitem=i("RBibitem","tag",["atom"]),a.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:t.inMathMode?function(e,t){return l(e,t)}:s}},copyState:function(e){return{cmdState:e.cmdState.slice(),f:e.f}},token:function(e,t){return t.f(e,t)},blankLine:function(e){e.f=s,e.cmdState.length=0},lineComment:"%"}})),e.defineMIME("text/x-stex","stex"),e.defineMIME("text/x-latex","stex")}(n(/*! ../../lib/codemirror */"VrN/"))},"+yhJ":
|
|
|
/*!******************************************!*\
|
|
|
!*** ./src/assets/images/paper/xixi.svg ***!
|
|
|
\******************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/xixi.d492fb65.svg"},"/GNS":
|
|
|
/*!*********************************************!*\
|
|
|
!*** ./src/assets/images/icons/search1.png ***!
|
|
|
\*********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/search1.c4136dd4.png"},"06Qe":
|
|
|
/*!**********************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/vml/core.js ***!
|
|
|
\**********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i=n(/*! ../core/env */"ItGF"),a="urn:schemas-microsoft-com:vml",o="undefined"==typeof window?null:window,s=!1,l=o&&o.document;if(l&&!i.canvasSupported)try{!l.namespaces.zrvml&&l.namespaces.add("zrvml",a),r=function(e){return l.createElement("<zrvml:"+e+' class="zrvml">')}}catch(e){r=function(e){return l.createElement("<"+e+' xmlns="'+a+'" class="zrvml">')}}t.doc=l,t.createNode=function(e){return r(e)},t.initVML=function(){if(!s&&l){s=!0;var e=l.styleSheets;e.length<31?l.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):e[0].addRule(".zrvml","behavior:url(#default#VML)")}}},"0eGx":
|
|
|
/*!*******************************************!*\
|
|
|
!*** ./src/assets/images/paper/zhong.svg ***!
|
|
|
\*******************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/zhong.c1924b73.svg"},"0r65":
|
|
|
/*!******************************************!*\
|
|
|
!*** ./node_modules/webworkify/index.js ***!
|
|
|
\******************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=arguments[3],r=arguments[4],i=arguments[5],a=JSON.stringify;e.exports=function(e,t){for(var o,s=Object.keys(i),l=0,c=s.length;l<c;l++){var u=s[l],d=i[u].exports;if(d===e||d&&d.default===e){o=u;break}}if(!o){o=Math.floor(Math.pow(16,8)*Math.random()).toString(16);var h={};for(l=0,c=s.length;l<c;l++){h[u=s[l]]=u}r[o]=["function(require,module,exports){"+e+"(self); }",h]}var f=Math.floor(Math.pow(16,8)*Math.random()).toString(16),p={};p[o]=o,r[f]=["function(require,module,exports){var f = require("+a(o)+");(f.default ? f.default : f)(self);}",p];var m={};!function e(t){for(var n in m[t]=!0,r[t][1]){var i=r[t][1][n];m[i]||e(i)}}(f);var g="("+n+")({"+Object.keys(m).map((function(e){return a(e)+":["+r[e][0]+","+a(r[e][1])+"]"})).join(",")+"},{},["+a(f)+"])",v=window.URL||window.webkitURL||window.mozURL||window.msURL,b=new Blob([g],{type:"text/javascript"});if(t&&t.bare)return b;var y=v.createObjectURL(b),E=new Worker(y);return E.objectURL=y,E}},"0s+r":
|
|
|
/*!*********************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/Handler.js ***!
|
|
|
\*********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./core/util */"bYtY"),i=n(/*! ./core/vector */"QBsz"),a=n(/*! ./mixin/Draggable */"y23F"),o=n(/*! ./mixin/Eventful */"H6uX"),s=n(/*! ./core/event */"YH21"),l=n(/*! ./core/GestureMgr */"C0SR");function c(){s.stop(this.event)}function u(){}u.prototype.dispose=function(){};var d=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],h=function(e,t,n,r){o.call(this),this.storage=e,this.painter=t,this.painterRoot=r,n=n||new u,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,a.call(this),this.setHandlerProxy(n)};function f(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var r,i=e;i;){if(i.clipPath&&!i.clipPath.contain(t,n))return!1;i.silent&&(r=!0),i=i.parent}return!r||"silent"}return!1}function p(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}h.prototype={constructor:h,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(r.each(d,(function(t){e.on&&e.on(t,this[t],this)}),this),e.handler=this),this.proxy=e},mousemove:function(e){var t=e.zrX,n=e.zrY,r=p(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(a=(i=this.findHover(i.x,i.y)).target);var o=this._hovered=r?{x:t,y:n}:this.findHover(t,n),s=o.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(i,"mouseout",e),this.dispatchToElement(o,"mousemove",e),s&&s!==a&&this.dispatchToElement(o,"mouseover",e)},mouseout:function(e){var t=e.zrEventControl,n=e.zrIsToLocalDOM;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&!n&&this.trigger("globalout",{type:"globalout",event:e})},resize:function(e){this._hovered={}},dispatch:function(e,t){var n=this[e];n&&n.call(this,t)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},dispatchToElement:function(e,t,n){var r=(e=e||{}).target;if(!r||!r.silent){for(var i="on"+t,a=function(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:c}}(t,e,n);r&&(r[i]&&(a.cancelBubble=r[i].call(r,a)),r.trigger(t,a),r=r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer((function(e){"function"==typeof e[i]&&e[i].call(e,a),e.trigger&&e.trigger(t,a)})))}},findHover:function(e,t,n){for(var r=this.storage.getDisplayList(),i={x:e,y:t},a=r.length-1;a>=0;a--){var o;if(r[a]!==n&&!r[a].ignore&&(o=f(r[a],e,t))&&(!i.topTarget&&(i.topTarget=r[a]),"silent"!==o)){i.target=r[a];break}}return i},processGesture:function(e,t){this._gestureMgr||(this._gestureMgr=new l);var n=this._gestureMgr;"start"===t&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if("end"===t&&n.clear(),r){var i=r.type;e.gestureEvent=i,this.dispatchToElement({target:r.target},i,r.event)}}},r.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(e){h.prototype[e]=function(t){var n,r,a=t.zrX,o=t.zrY,s=p(this,a,o);if("mouseup"===e&&s||(r=(n=this.findHover(a,o)).target),"mousedown"===e)this._downEl=r,this._downPoint=[t.zrX,t.zrY],this._upEl=r;else if("mouseup"===e)this._upEl=r;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||i.dist(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}})),r.mixin(h,o),r.mixin(h,a);var m=h;e.exports=m},"19Vz":
|
|
|
/*!**************************************************************!*\
|
|
|
!*** ./node_modules/codemirror/addon/display/placeholder.js ***!
|
|
|
\**************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function n(e){t(e);var n=e.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=e.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var r=e.getOption("placeholder");"string"==typeof r&&(r=document.createTextNode(r)),n.appendChild(r),e.display.lineSpace.insertBefore(n,e.display.lineSpace.firstChild)}function r(e){a(e)&&n(e)}function i(e){var r=e.getWrapperElement(),i=a(e);r.className=r.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?n(e):t(e)}function a(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(a,o,s){var l=s&&s!=e.Init;if(o&&!l)a.on("blur",r),a.on("change",i),a.on("swapDoc",i),e.on(a.getInputField(),"compositionupdate",a.state.placeholderCompose=function(){!function(e){setTimeout((function(){var r=!1,i=e.getInputField();"TEXTAREA"==i.nodeName?r=!i.value:1==e.lineCount()&&(r=!/[^\u200b]/.test(i.querySelector(".CodeMirror-line").textContent)),r?n(e):t(e)}),20)}(a)}),i(a);else if(!o&&l){a.off("blur",r),a.off("change",i),a.off("swapDoc",i),e.off(a.getInputField(),"compositionupdate",a.state.placeholderCompose),t(a);var c=a.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}o&&!a.hasFocus()&&r(a)}))}(n(/*! ../../lib/codemirror */"VrN/"))},"1Jh7":
|
|
|
/*!************************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/shape/Polyline.js ***!
|
|
|
\************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../Path */"y+Vt"),i=n(/*! ../helper/poly */"T6xi"),a=r.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(e,t){i.buildPath(e,t,!1)}});e.exports=a},"1MYJ":
|
|
|
/*!**********************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/CompoundPath.js ***!
|
|
|
\**********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./Path */"y+Vt"),i=r.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var e=this.__dirtyPath,t=this.shape.paths,n=0;n<t.length;n++)e=e||t[n].__dirtyPath;this.__dirtyPath=e,this.__dirty=this.__dirty||e},beforeBrush:function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},buildPath:function(e,t){for(var n=t.paths||[],r=0;r<n.length;r++)n[r].buildPath(e,n[r].shape,!0)},afterBrush:function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),r.prototype.getBoundingRect.call(this)}});e.exports=i},"1RvN":
|
|
|
/*!**********************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/core/LRU.js ***!
|
|
|
\**********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=function(){this.head=null,this.tail=null,this._len=0},r=n.prototype;r.insert=function(e){var t=new i(e);return this.insertEntry(t),t},r.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.len=function(){return this._len},r.clear=function(){this.head=this.tail=null,this._len=0};var i=function(e){this.value=e,this.next,this.prev},a=function(e){this._list=new n,this._map={},this._maxSize=e||10,this._lastRemovedEntry=null},o=a.prototype;o.put=function(e,t){var n=this._list,r=this._map,a=null;if(null==r[e]){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete r[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new i(t),s.key=e,n.insertEntry(s),r[e]=s}return a},o.get=function(e){var t=this._map[e],n=this._list;if(null!=t)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},o.clear=function(){this._list.clear(),this._map={}};var s=a;e.exports=s},"1bdT":
|
|
|
/*!*********************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/Element.js ***!
|
|
|
\*********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./core/guid */"3gBT"),i=n(/*! ./mixin/Eventful */"H6uX"),a=n(/*! ./mixin/Transformable */"DN4a"),o=n(/*! ./mixin/Animatable */"vWvF"),s=n(/*! ./core/util */"bYtY"),l=function(e){a.call(this,e),i.call(this,e),o.call(this,e),this.id=e.id||r()};l.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(e,t){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=e,n[5]+=t,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(e,t){},attrKV:function(e,t){if("position"===e||"scale"===e||"origin"===e){if(t){var n=this[e];n||(n=this[e]=[]),n[0]=t[0],n[1]=t[1]}}else this[e]=t},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(e,t){if("string"==typeof e)this.attrKV(e,t);else if(s.isObject(e))for(var n in e)e.hasOwnProperty(n)&&this.attrKV(n,e[n]);return this.dirty(!1),this},setClipPath:function(e){var t=this.__zr;t&&e.addSelfToZr(t),this.clipPath&&this.clipPath!==e&&this.removeClipPath(),this.clipPath=e,e.__zr=t,e.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var e=this.clipPath;e&&(e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this.clipPath&&this.clipPath.addSelfToZr(e)},removeSelfFromZr:function(e){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this.clipPath&&this.clipPath.removeSelfFromZr(e)}},s.mixin(l,o),s.mixin(l,a),s.mixin(l,i);var c=l;e.exports=c},"1eCo":
|
|
|
/*!*************************************************!*\
|
|
|
!*** ./node_modules/codemirror/mode/xml/xml.js ***!
|
|
|
\*************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(r,i){var a,o,s=r.indentUnit,l={},c=i.htmlMode?t:n;for(var u in c)l[u]=c[u];for(var u in i)l[u]=i[u];function d(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();return"<"==r?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(f("atom","]]>")):null:e.match("--")?n(f("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(function e(t){return function(n,r){for(var i;null!=(i=n.next());){if("<"==i)return r.tokenize=e(t+1),r.tokenize(n,r);if(">"==i){if(1==t){r.tokenize=d;break}return r.tokenize=e(t-1),r.tokenize(n,r)}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=f("meta","?>"),"meta"):(a=e.eat("/")?"closeTag":"openTag",t.tokenize=h,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function h(e,t){var n,r,i=e.next();if(">"==i||"/"==i&&e.eat(">"))return t.tokenize=d,a=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return a="equals",null;if("<"==i){t.tokenize=d,t.state=v,t.tagName=t.tagStart=null;var o=t.tokenize(e,t);return o?o+" tag error":"tag error"}return/[\'\"]/.test(i)?(t.tokenize=(n=i,(r=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=h;break}return"string"}).isInAttribute=!0,r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=d;break}n.next()}return e}}function p(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function m(e){e.context&&(e.context=e.context.prev)}function g(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(t))return;m(e)}}function v(e,t,n){return"openTag"==e?(n.tagStart=t.column(),b):"closeTag"==e?y:v}function b(e,t,n){return"word"==e?(n.tagName=t.current(),o="tag",_):l.allowMissingTagName&&"endTag"==e?(o="tag bracket",_(e,0,n)):(o="error",b)}function y(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&m(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(o="tag",E):(o="tag error",x)}return l.allowMissingTagName&&"endTag"==e?(o="tag bracket",E(e,0,n)):(o="error",x)}function E(e,t,n){return"endTag"!=e?(o="error",E):(m(n),v)}function x(e,t,n){return o="error",E(e,0,n)}function _(e,t,n){if("word"==e)return o="attribute",k;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(r)?g(n,r):(g(n,r),n.context=new p(n,r,i==n.indented)),v}return o="error",_}function k(e,t,n){return"equals"==e?w:(l.allowMissing||(o="error"),_(e,0,n))}function w(e,t,n){return"string"==e?C:"word"==e&&l.allowUnquoted?(o="string",_):(o="error",_(e,0,n))}function C(e,t,n){return"string"==e?C:_(e,0,n)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,state:v,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;a=null;var n=t.tokenize(e,t);return(n||a)&&"comment"!=n&&(o=null,t.state=t.state(a||n,e,t),o&&(n="error"==o?n+" error":o)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+s;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=h&&t.tokenize!=d)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==l.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var a=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(a&&a[1])for(;i;){if(i.tagName==a[2]){i=i.prev;break}if(!l.implicitlyClosed.hasOwnProperty(i.tagName))break;i=i.prev}else if(a)for(;i;){var o=l.contextGrabbers[i.tagName];if(!o||!o.hasOwnProperty(a[2]))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+s:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==w&&(e.state=_)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)n.tagName&&t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(/*! ../../lib/codemirror */"VrN/"))},"1j5w":
|
|
|
/*!*******************************************************!*\
|
|
|
!*** ./node_modules/rc-menu/es/index.js + 11 modules ***!
|
|
|
\*******************************************************/
|
|
|
/*! exports provided: SubMenu, Item, MenuItem, MenuItemGroup, ItemGroup, Divider, default */
|
|
|
/*! exports used: Divider, Item, ItemGroup, SubMenu, default */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/mini-store/esm/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/omit.js/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/button/button.js (referenced with cjs require), ./node_modules/antd/lib/input/Input.js (referenced with cjs require), ./node_modules/antd/lib/input/Password.js (referenced with cjs require), ./node_modules/antd/lib/input/TextArea.js (referenced with cjs require)) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-motion/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/button/LoadingIcon.js (referenced with cjs require)) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-trigger/es/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/createChainedFunction.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-dom/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"d",(function(){return oe})),n.d(t,"b",(function(){return Ee})),n.d(t,"c",(function(){return _e})),n.d(t,"a",(function(){return we}));var r=n("VTBJ"),i=n("1OyB"),a=n("vuIU"),o=n("JX7q"),s=n("Ji7U"),l=n("LK+K"),c=n("q1tI"),u=n("I8Z2"),d=n("BGR+"),h=n("wx14"),f=n("rePB"),p=n("4IlW"),m=n("2GS6"),g=n("Gytx"),v=n.n(g),b=n("TSYQ"),y=n.n(b),E=n("U8pU"),x=n("ODXe"),_=/iPhone/i,k=/iPod/i,w=/iPad/i,C=/\bAndroid(?:.+)Mobile\b/i,S=/Android/i,O=/\bAndroid(?:.+)SD4930UR\b/i,A=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,T=/Windows Phone/i,I=/\bWindows(?:.+)ARM\b/i,D=/BlackBerry/i,L=/BB10/i,R=/Opera Mini/i,N=/\b(CriOS|Chrome)(?:.+)Mobile/i,j=/Mobile(?:.+)Firefox\b/i;function M(e,t){return e.test(t)}function P(e){var t=e||("undefined"!=typeof navigator?navigator.userAgent:""),n=t.split("[FBAN");if(void 0!==n[1]){var r=n;t=Object(x.a)(r,1)[0]}if(void 0!==(n=t.split("Twitter"))[1]){var i=n;t=Object(x.a)(i,1)[0]}var a={apple:{phone:M(_,t)&&!M(T,t),ipod:M(k,t),tablet:!M(_,t)&&M(w,t)&&!M(T,t),device:(M(_,t)||M(k,t)||M(w,t))&&!M(T,t)},amazon:{phone:M(O,t),tablet:!M(O,t)&&M(A,t),device:M(O,t)||M(A,t)},android:{phone:!M(T,t)&&M(O,t)||!M(T,t)&&M(C,t),tablet:!M(T,t)&&!M(O,t)&&!M(C,t)&&(M(A,t)||M(S,t)),device:!M(T,t)&&(M(O,t)||M(A,t)||M(C,t)||M(S,t))||M(/\bokhttp\b/i,t)},windows:{phone:M(T,t),tablet:M(I,t),device:M(T,t)||M(I,t)},other:{blackberry:M(D,t),blackberry10:M(L,t),opera:M(R,t),firefox:M(j,t),chrome:M(N,t),device:M(D,t)||M(L,t)||M(R,t)||M(j,t)||M(N,t)},any:null,phone:null,tablet:null};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}var B=Object(r.a)(Object(r.a)({},P()),{},{isMobile:P});function F(){}function U(e,t,n){var r=t||"";return e.key||"".concat(r,"item_").concat(n)}function H(e){return"".concat(e,"-menu-")}function z(e,t){var n=-1;c.Children.forEach(e,(function(e){n+=1,e&&e.type&&e.type.isMenuItemGroup?c.Children.forEach(e.props.children,(function(e){t(e,n+=1)})):t(e,n)}))}var G=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],V=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e&&"function"==typeof e.getBoundingClientRect&&e.getBoundingClientRect().width;if(n){if(t){var r=getComputedStyle(e),i=r.marginLeft,a=r.marginRight;n+=+i.replace("px","")+ +a.replace("px","")}n=+n.toFixed(6)}return n||0},W=function(e,t,n){e&&"object"===Object(E.a)(e.style)&&(e.style[t]=n)},K=n("KQm4"),q=n("Ff2n"),Y=n("i8i4"),Q=n("bdgK"),J=n("uciX"),X=n("8XRh"),Z={adjustX:1,adjustY:1},$={topLeft:{points:["bl","tl"],overflow:Z,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Z,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Z,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Z,offset:[4,0]}},ee={topLeft:{points:["bl","tl"],overflow:Z,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Z,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Z,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Z,offset:[4,0]}},te=0,ne={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},re=function(e,t,n){var i=H(t),a=e.getState();e.setState({defaultActiveFirst:Object(r.a)(Object(r.a)({},a.defaultActiveFirst),{},Object(f.a)({},i,n))})},ie=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var a;Object(i.a)(this,n),(a=t.call(this,e)).onDestroy=function(e){a.props.onDestroy(e)},a.onKeyDown=function(e){var t=e.keyCode,n=a.menuInstance,r=a.props,i=r.isOpen,o=r.store;if(t===p.a.ENTER)return a.onTitleClick(e),re(o,a.props.eventKey,!0),!0;if(t===p.a.RIGHT)return i?n.onKeyDown(e):(a.triggerOpenChange(!0),re(o,a.props.eventKey,!0)),!0;if(t===p.a.LEFT){var s;if(!i)return;return(s=n.onKeyDown(e))||(a.triggerOpenChange(!1),s=!0),s}return!i||t!==p.a.UP&&t!==p.a.DOWN?void 0:n.onKeyDown(e)},a.onOpenChange=function(e){a.props.onOpenChange(e)},a.onPopupVisibleChange=function(e){a.triggerOpenChange(e,e?"mouseenter":"mouseleave")},a.onMouseEnter=function(e){var t=a.props,n=t.eventKey,r=t.onMouseEnter,i=t.store;re(i,a.props.eventKey,!1),r({key:n,domEvent:e})},a.onMouseLeave=function(e){var t=a.props,n=t.parentMenu,r=t.eventKey,i=t.onMouseLeave;n.subMenuInstance=Object(o.a)(a),i({key:r,domEvent:e})},a.onTitleMouseEnter=function(e){var t=a.props,n=t.eventKey,r=t.onItemHover,i=t.onTitleMouseEnter;r({key:n,hover:!0}),i({key:n,domEvent:e})},a.onTitleMouseLeave=function(e){var t=a.props,n=t.parentMenu,r=t.eventKey,i=t.onItemHover,s=t.onTitleMouseLeave;n.subMenuInstance=Object(o.a)(a),i({key:r,hover:!1}),s({key:r,domEvent:e})},a.onTitleClick=function(e){var t=Object(o.a)(a).props;t.onTitleClick({key:t.eventKey,domEvent:e}),"hover"!==t.triggerSubMenuAction&&(a.triggerOpenChange(!t.isOpen,"click"),re(t.store,a.props.eventKey,!1))},a.onSubMenuClick=function(e){"function"==typeof a.props.onClick&&a.props.onClick(a.addKeyPath(e))},a.onSelect=function(e){a.props.onSelect(e)},a.onDeselect=function(e){a.props.onDeselect(e)},a.getPrefixCls=function(){return"".concat(a.props.rootPrefixCls,"-submenu")},a.getActiveClassName=function(){return"".concat(a.getPrefixCls(),"-active")},a.getDisabledClassName=function(){return"".concat(a.getPrefixCls(),"-disabled")},a.getSelectedClassName=function(){return"".concat(a.getPrefixCls(),"-selected")},a.getOpenClassName=function(){return"".concat(a.props.rootPrefixCls,"-submenu-open")},a.saveMenuInstance=function(e){a.menuInstance=e},a.addKeyPath=function(e){return Object(r.a)(Object(r.a)({},e),{},{keyPath:(e.keyPath||[]).concat(a.props.eventKey)})},a.triggerOpenChange=function(e,t){var n=a.props.eventKey,r=function(){a.onOpenChange({key:n,item:Object(o.a)(a),trigger:t,open:e})};"mouseenter"===t?a.mouseenterTimeout=setTimeout((function(){r()}),0):r()},a.isChildrenSelected=function(){var e={find:!1};return function e(t,n,r){t&&!r.find&&c.Children.forEach(t,(function(t){if(t){var i=t.type;if(!i||!(i.isSubMenu||i.isMenuItem||i.isMenuItemGroup))return;-1!==n.indexOf(t.key)?r.find=!0:t.props.children&&e(t.props.children,n,r)}}))}(a.props.children,a.props.selectedKeys,e),e.find},a.isOpen=function(){return-1!==a.props.openKeys.indexOf(a.props.eventKey)},a.adjustWidth=function(){if(a.subMenuTitle&&a.menuInstance){var e=Y.findDOMNode(a.menuInstance);e.offsetWidth>=a.subMenuTitle.offsetWidth||(e.style.minWidth="".concat(a.subMenuTitle.offsetWidth,"px"))}},a.saveSubMenuTitle=function(e){a.subMenuTitle=e},a.getBaseProps=function(){var e=Object(o.a)(a).props;return{mode:"horizontal"===e.mode?"vertical":e.mode,visible:a.props.isOpen,level:e.level+1,inlineIndent:e.inlineIndent,focusable:!1,onClick:a.onSubMenuClick,onSelect:a.onSelect,onDeselect:a.onDeselect,onDestroy:a.onDestroy,selectedKeys:e.selectedKeys,eventKey:"".concat(e.eventKey,"-menu-"),openKeys:e.openKeys,motion:e.motion,onOpenChange:a.onOpenChange,subMenuOpenDelay:e.subMenuOpenDelay,parentMenu:Object(o.a)(a),subMenuCloseDelay:e.subMenuCloseDelay,forceSubMenuRender:e.forceSubMenuRender,triggerSubMenuAction:e.triggerSubMenuAction,builtinPlacements:e.builtinPlacements,defaultActiveFirst:e.store.getState().defaultActiveFirst[H(e.eventKey)],multiple:e.multiple,prefixCls:e.rootPrefixCls,id:a.internalMenuId,manualRef:a.saveMenuInstance,itemIcon:e.itemIcon,expandIcon:e.expandIcon,direction:e.direction}},a.getMotion=function(e,t){var n=Object(o.a)(a).haveRendered,i=a.props,s=i.motion,l=i.rootPrefixCls;return Object(r.a)(Object(r.a)({},s),{},{leavedClassName:"".concat(l,"-hidden"),removeOnLeave:!1,motionAppear:n||!t||"inline"!==e})};var s=e.store,l=e.eventKey,u=s.getState().defaultActiveFirst;a.isRootMenu=!1;var d=!1;return u&&(d=u[l]),re(s,l,d),a}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e=this,t=this.props,n=t.mode,r=t.parentMenu,i=t.manualRef;i&&i(this),"horizontal"===n&&r.isRootMenu&&this.props.isOpen&&(this.minWidthTimeout=setTimeout((function(){return e.adjustWidth()}),0))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.onDestroy,n=e.eventKey;t&&t(n),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(e){var t=this,n=this.getBaseProps(),r=this.getMotion(n.mode,n.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||n.visible||n.forceSubMenuRender,!this.haveOpened)return c.createElement("div",null);var i=n.direction;return c.createElement(X.default,Object.assign({visible:n.visible},r),(function(r){var a=r.className,o=r.style,s=y()("".concat(n.prefixCls,"-sub"),a,Object(f.a)({},"".concat(n.prefixCls,"-rtl"),"rtl"===i));return c.createElement(pe,Object.assign({},n,{id:t.internalMenuId,className:s,style:o}),e)}))}},{key:"render",value:function(){var e,t=Object(r.a)({},this.props),n=t.isOpen,i=this.getPrefixCls(),a="inline"===t.mode,o=y()(i,"".concat(i,"-").concat(t.mode),(e={},Object(f.a)(e,t.className,!!t.className),Object(f.a)(e,this.getOpenClassName(),n),Object(f.a)(e,this.getActiveClassName(),t.active||n&&!a),Object(f.a)(e,this.getDisabledClassName(),t.disabled),Object(f.a)(e,this.getSelectedClassName(),this.isChildrenSelected()),e));this.internalMenuId||(t.eventKey?this.internalMenuId="".concat(t.eventKey,"$Menu"):(te+=1,this.internalMenuId="$__$".concat(te,"$Menu")));var s={},l={},u={};t.disabled||(s={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},l={onClick:this.onTitleClick},u={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var d={},h=t.direction;a&&("rtl"===h?d.paddingRight=t.inlineIndent*t.level:d.paddingLeft=t.inlineIndent*t.level);var p={};this.props.isOpen&&(p={"aria-owns":this.internalMenuId});var m=null;"horizontal"!==t.mode&&(m=this.props.expandIcon,"function"==typeof this.props.expandIcon&&(m=c.createElement(this.props.expandIcon,Object(r.a)({},this.props))));var g=c.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:d,className:"".concat(i,"-title"),role:"button"},u,l,{"aria-expanded":n},p,{"aria-haspopup":"true",title:"string"==typeof t.title?t.title:void 0}),t.title,m||c.createElement("i",{className:"".concat(i,"-arrow")})),v=this.renderChildren(t.children),b=t.parentMenu.isRootMenu?t.parentMenu.props.getPopupContainer:function(e){return e.parentNode},E=ne[t.mode],x=t.popupOffset?{offset:t.popupOffset}:{},_="inline"===t.mode?"":t.popupClassName;_+="rtl"===h?" ".concat(i,"-rtl"):"";var k=t.disabled,w=t.triggerSubMenuAction,C=t.subMenuOpenDelay,S=t.forceSubMenuRender,O=t.subMenuCloseDelay,A=t.builtinPlacements;G.forEach((function(e){return delete t[e]})),delete t.onClick;var T="rtl"===h?Object.assign({},ee,A):Object.assign({},$,A);return delete t.direction,c.createElement("li",Object.assign({},t,s,{className:o,role:"menuitem"}),a&&g,a&&v,!a&&c.createElement(J.a,{prefixCls:i,popupClassName:y()("".concat(i,"-popup"),_),getPopupContainer:b,builtinPlacements:T,popupPlacement:E,popupVisible:n,popupAlign:x,popup:v,action:k?[]:[w],mouseEnterDelay:C,mouseLeaveDelay:O,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:S},g))}}]),n}(c.Component);ie.defaultProps={onMouseEnter:F,onMouseLeave:F,onTitleMouseEnter:F,onTitleMouseLeave:F,onTitleClick:F,manualRef:F,mode:"vertical",title:""};var ae=Object(u.b)((function(e,t){var n=e.openKeys,r=e.activeKey,i=e.selectedKeys,a=t.eventKey,o=t.subMenuKey;return{isOpen:n.indexOf(a)>-1,active:r[o]===a,selectedKeys:i}}))(ie);ae.isSubMenu=!0;var oe=ae,se=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).resizeObserver=null,e.mutationObserver=null,e.originalTotalWidth=0,e.overflowedItems=[],e.menuItemSizes=[],e.cancelFrameId=null,e.state={lastVisibleIndex:void 0},e.getMenuItemNodes=function(){var t=e.props.prefixCls,n=Y.findDOMNode(Object(o.a)(e));return n?[].slice.call(n.children).filter((function(e){return e.className.split(" ").indexOf("".concat(t,"-overflowed-submenu"))<0})):[]},e.getOverflowedSubMenuItem=function(t,n,i){var a=e.props,o=a.overflowedIndicator,s=a.level,l=a.mode,u=a.prefixCls,d=a.theme;if(1!==s||"horizontal"!==l)return null;var h=e.props.children[0].props,f=(h.children,h.title,h.style),p=Object(q.a)(h,["children","title","style"]),m=Object(r.a)({},f),g="".concat(t,"-overflowed-indicator"),v="".concat(t,"-overflowed-indicator");0===n.length&&!0!==i?m=Object(r.a)(Object(r.a)({},m),{},{display:"none"}):i&&(m=Object(r.a)(Object(r.a)({},m),{},{visibility:"hidden",position:"absolute"}),g="".concat(g,"-placeholder"),v="".concat(v,"-placeholder"));var b=d?"".concat(u,"-").concat(d):"",y={};return G.forEach((function(e){void 0!==p[e]&&(y[e]=p[e])})),c.createElement(oe,Object.assign({title:o,className:"".concat(u,"-overflowed-submenu"),popupClassName:b},y,{key:g,eventKey:v,disabled:!1,style:m}),n)},e.setChildrenWidthAndResize=function(){if("horizontal"===e.props.mode){var t=Y.findDOMNode(Object(o.a)(e));if(t){var n=t.children;if(n&&0!==n.length){var r=t.children[n.length-1];W(r,"display","inline-block");var i=e.getMenuItemNodes(),a=i.filter((function(e){return e.className.split(" ").indexOf("menuitem-overflowed")>=0}));a.forEach((function(e){W(e,"display","inline-block")})),e.menuItemSizes=i.map((function(e){return V(e,!0)})),a.forEach((function(e){W(e,"display","none")})),e.overflowedIndicatorWidth=V(t.children[t.children.length-1],!0),e.originalTotalWidth=e.menuItemSizes.reduce((function(e,t){return e+t}),0),e.handleResize(),W(r,"display","none")}}}},e.handleResize=function(){if("horizontal"===e.props.mode){var t=Y.findDOMNode(Object(o.a)(e));if(t){var n=V(t);e.overflowedItems=[];var r,i=0;e.originalTotalWidth>n+.5&&(r=-1,e.menuItemSizes.forEach((function(t){(i+=t)+e.overflowedIndicatorWidth<=n&&(r+=1)}))),e.setState({lastVisibleIndex:r})}}},e}return Object(a.a)(n,[{key:"componentDidMount",value:function(){var e=this;if(this.setChildrenWidthAndResize(),1===this.props.level&&"horizontal"===this.props.mode){var t=Y.findDOMNode(this);if(!t)return;this.resizeObserver=new Q.default((function(t){t.forEach((function(){var t=e.cancelFrameId;cancelAnimationFrame(t),e.cancelFrameId=requestAnimationFrame(e.setChildrenWidthAndResize)}))})),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver((function(){e.resizeObserver.disconnect(),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),e.setChildrenWidthAndResize()})),this.mutationObserver.observe(t,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(e){var t=this,n=this.state.lastVisibleIndex;return(e||[]).reduce((function(r,i,a){var o=i;if("horizontal"===t.props.mode){var s=t.getOverflowedSubMenuItem(i.props.eventKey,[]);void 0!==n&&-1!==t.props.className.indexOf("".concat(t.props.prefixCls,"-root"))&&(a>n&&(o=c.cloneElement(i,{style:{display:"none"},eventKey:"".concat(i.props.eventKey,"-hidden"),className:"".concat("menuitem-overflowed")})),a===n+1&&(t.overflowedItems=e.slice(n+1).map((function(e){return c.cloneElement(e,{key:e.props.eventKey,mode:"vertical-left"})})),s=t.getOverflowedSubMenuItem(i.props.eventKey,t.overflowedItems)));var l=[].concat(Object(K.a)(r),[s,o]);return a===e.length-1&&l.push(t.getOverflowedSubMenuItem(i.props.eventKey,[],!0)),l}return[].concat(Object(K.a)(r),[o])}),[])}},{key:"render",value:function(){var e=this.props,t=(e.visible,e.prefixCls,e.overflowedIndicator,e.mode,e.level,e.tag),n=e.children,r=(e.theme,Object(q.a)(e,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"])),i=t;return c.createElement(i,Object.assign({},r),this.renderChildren(n))}}]),n}(c.Component);se.defaultProps={tag:"div",className:""};var le=se;function ce(e,t,n){var i=e.getState();e.setState({activeKey:Object(r.a)(Object(r.a)({},i.activeKey),{},Object(f.a)({},t,n))})}function ue(e){return e.eventKey||"0-menu-"}function de(e,t){var n,r=t,i=e.children,a=e.eventKey;if(r&&(z(i,(function(e,t){e&&e.props&&!e.props.disabled&&r===U(e,a,t)&&(n=!0)})),n))return r;return r=null,e.defaultActiveFirst?(z(i,(function(e,t){r||!e||e.props.disabled||(r=U(e,a,t))})),r):r}function he(e){if(e){var t=this.instanceArray.indexOf(e);-1!==t?this.instanceArray[t]=e:this.instanceArray.push(e)}}var fe=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var a;return Object(i.a)(this,n),(a=t.call(this,e)).onKeyDown=function(e,t){var n,r=e.keyCode;if(a.getFlatInstanceArray().forEach((function(t){t&&t.props.active&&t.onKeyDown&&(n=t.onKeyDown(e))})),n)return 1;var i=null;return r!==p.a.UP&&r!==p.a.DOWN||(i=a.step(r===p.a.UP?-1:1)),i?(e.preventDefault(),ce(a.props.store,ue(a.props),i.props.eventKey),"function"==typeof t&&t(i),1):void 0},a.onItemHover=function(e){var t=e.key,n=e.hover;ce(a.props.store,ue(a.props),n?t:null)},a.onDeselect=function(e){a.props.onDeselect(e)},a.onSelect=function(e){a.props.onSelect(e)},a.onClick=function(e){a.props.onClick(e)},a.onOpenChange=function(e){a.props.onOpenChange(e)},a.onDestroy=function(e){a.props.onDestroy(e)},a.getFlatInstanceArray=function(){return a.instanceArray},a.step=function(e){var t=a.getFlatInstanceArray(),n=a.props.store.getState().activeKey[ue(a.props)],r=t.length;if(!r)return null;e<0&&(t=t.concat().reverse());var i=-1;if(t.every((function(e,t){return!e||e.props.eventKey!==n||(i=t,!1)})),a.props.defaultActiveFirst||-1===i||(o=t.slice(i,r-1)).length&&!o.every((function(e){return!!e.props.disabled}))){var o,s=(i+1)%r,l=s;do{var c=t[l];if(c&&!c.props.disabled)return c;l=(l+1)%r}while(l!==s);return null}},a.renderCommonMenuItem=function(e,t,n){var i=a.props.store.getState(),s=Object(o.a)(a).props,l=U(e,s.eventKey,t),u=e.props;if(!u||"string"==typeof e.type)return e;var d=l===i.activeKey,h=Object(r.a)(Object(r.a)({mode:u.mode||s.mode,level:s.level,inlineIndent:s.inlineIndent,renderMenuItem:a.renderMenuItem,rootPrefixCls:s.prefixCls,index:t,parentMenu:s.parentMenu,manualRef:u.disabled?void 0:Object(m.a)(e.ref,he.bind(Object(o.a)(a))),eventKey:l,active:!u.disabled&&d,multiple:s.multiple,onClick:function(e){(u.onClick||F)(e),a.onClick(e)},onItemHover:a.onItemHover,motion:s.motion,subMenuOpenDelay:s.subMenuOpenDelay,subMenuCloseDelay:s.subMenuCloseDelay,forceSubMenuRender:s.forceSubMenuRender,onOpenChange:a.onOpenChange,onDeselect:a.onDeselect,onSelect:a.onSelect,builtinPlacements:s.builtinPlacements,itemIcon:u.itemIcon||a.props.itemIcon,expandIcon:u.expandIcon||a.props.expandIcon},n),{},{direction:s.direction});return("inline"===s.mode||B.any)&&(h.triggerSubMenuAction="click"),c.cloneElement(e,h)},a.renderMenuItem=function(e,t,n){if(!e)return null;var r=a.props.store.getState(),i={openKeys:r.openKeys,selectedKeys:r.selectedKeys,triggerSubMenuAction:a.props.triggerSubMenuAction,subMenuKey:n};return a.renderCommonMenuItem(e,t,i)},e.store.setState({activeKey:Object(r.a)(Object(r.a)({},e.store.getState().activeKey),{},Object(f.a)({},e.eventKey,de(e,e.activeKey)))}),a.instanceArray=[],a}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(e){return this.props.visible||e.visible||this.props.className!==e.className||!v()(this.props.style,e.style)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n="activeKey"in t?t.activeKey:t.store.getState().activeKey[ue(t)],r=de(t,n);if(r!==n)ce(t.store,ue(t),r);else if("activeKey"in e){r!==de(e,e.activeKey)&&ce(t.store,ue(t),r)}}},{key:"render",value:function(){var e=this,t=Object(h.a)({},this.props);this.instanceArray=[];var n={className:y()(t.prefixCls,t.className,"".concat(t.prefixCls,"-").concat(t.mode)),role:t.role||"menu"};t.id&&(n.id=t.id),t.focusable&&(n.tabIndex=0,n.onKeyDown=this.onKeyDown);var r=t.prefixCls,i=t.eventKey,a=t.visible,o=t.level,s=t.mode,l=t.overflowedIndicator,u=t.theme;return G.forEach((function(e){return delete t[e]})),delete t.onClick,c.createElement(le,Object.assign({},t,{prefixCls:r,mode:s,tag:"ul",level:o,theme:u,visible:a,overflowedIndicator:l},n),c.Children.map(t.children,(function(t,n){return e.renderMenuItem(t,n,i||"0-menu-")})))}}]),n}(c.Component);fe.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:F};var pe=Object(u.b)()(fe),me=n("Kwbf");function ge(e,t,n){var r=e.prefixCls,i=e.motion,a=e.defaultMotions,o=void 0===a?{}:a,s=e.openAnimation,l=e.openTransitionName,c=t.switchingModeFromInline;if(i)return i;if("object"===Object(E.a)(s)&&s)Object(me.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if("string"==typeof s)return{motionName:"".concat(r,"-open-").concat(s)};if(l)return{motionName:l};var u=o[n];return u||(c?null:o.other)}var ve=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var a;Object(i.a)(this,n),(a=t.call(this,e)).inlineOpenKeys=[],a.onSelect=function(e){var t=Object(o.a)(a).props;if(t.selectable){var n=a.store.getState().selectedKeys,i=e.key;n=t.multiple?n.concat([i]):[i],"selectedKeys"in t||a.store.setState({selectedKeys:n}),t.onSelect(Object(r.a)(Object(r.a)({},e),{},{selectedKeys:n}))}},a.onClick=function(e){var t=a.getRealMenuMode(),n=Object(o.a)(a),r=n.store,i=n.props.onOpenChange;"inline"===t||"openKeys"in a.props||(r.setState({openKeys:[]}),i([])),a.props.onClick(e)},a.onKeyDown=function(e,t){a.innerMenu.getWrappedInstance().onKeyDown(e,t)},a.onOpenChange=function(e){var t=Object(o.a)(a).props,n=a.store.getState().openKeys.concat(),r=!1,i=function(e){var t=!1;if(e.open)(t=-1===n.indexOf(e.key))&&n.push(e.key);else{var i=n.indexOf(e.key);(t=-1!==i)&&n.splice(i,1)}r=r||t};Array.isArray(e)?e.forEach(i):i(e),r&&("openKeys"in a.props||a.store.setState({openKeys:n}),t.onOpenChange(n))},a.onDeselect=function(e){var t=Object(o.a)(a).props;if(t.selectable){var n=a.store.getState().selectedKeys.concat(),i=e.key,s=n.indexOf(i);-1!==s&&n.splice(s,1),"selectedKeys"in t||a.store.setState({selectedKeys:n}),t.onDeselect(Object(r.a)(Object(r.a)({},e),{},{selectedKeys:n}))}},a.onMouseEnter=function(e){a.restoreModeVerticalFromInline();var t=a.props.onMouseEnter;t&&t(e)},a.onTransitionEnd=function(e){var t="width"===e.propertyName&&e.target===e.currentTarget,n=e.target.className,r="[object SVGAnimatedString]"===Object.prototype.toString.call(n)?n.animVal:n,i="font-size"===e.propertyName&&r.indexOf("anticon")>=0;(t||i)&&a.restoreModeVerticalFromInline()},a.setInnerMenu=function(e){a.innerMenu=e},a.isRootMenu=!0;var s=e.defaultSelectedKeys,l=e.defaultOpenKeys;return"selectedKeys"in e&&(s=e.selectedKeys||[]),"openKeys"in e&&(l=e.openKeys||[]),a.store=Object(u.c)({selectedKeys:s,openKeys:l,activeKey:{"0-menu-":de(e,e.activeKey)}}),a.state={switchingModeFromInline:!1},a}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(e){this.updateOpentKeysWhenSwitchMode(e),this.updateMiniStore();var t=this.props,n=t.siderCollapsed,r=t.inlineCollapsed,i=t.onOpenChange;(!e.inlineCollapsed&&r||!e.siderCollapsed&&n)&&i([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(e){var t=this.props,n=this.store,r=this.inlineOpenKeys,i=n.getState(),a={};"inline"===e.mode&&"inline"!==t.mode&&this.setState({switchingModeFromInline:!0}),"openKeys"in t||((t.inlineCollapsed&&!e.inlineCollapsed||t.siderCollapsed&&!e.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=i.openKeys.concat(),a.openKeys=[]),(!t.inlineCollapsed&&e.inlineCollapsed||!t.siderCollapsed&&e.siderCollapsed)&&(a.openKeys=r,this.inlineOpenKeys=[])),Object.keys(a).length&&n.setState(a)}},{key:"updateMenuDisplay",value:function(){var e=this.props.collapsedWidth,t=this.store,n=this.prevOpenKeys;this.getInlineCollapsed()&&(0===e||"0"===e||"0px"===e)?(this.prevOpenKeys=t.getState().openKeys.concat(),this.store.setState({openKeys:[]})):n&&(this.store.setState({openKeys:n}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var e=this.props.mode,t=this.state.switchingModeFromInline,n=this.getInlineCollapsed();return t&&n?"inline":n?"vertical":e}},{key:"getInlineCollapsed",value:function(){var e=this.props,t=e.inlineCollapsed,n=e.siderCollapsed;return void 0!==n?n:t}},{key:"restoreModeVerticalFromInline",value:function(){this.state.switchingModeFromInline&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var e=Object(r.a)({},Object(d.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),t=this.getRealMenuMode();return e.className+=" ".concat(e.prefixCls,"-root"),"rtl"===e.direction&&(e.className+=" ".concat(e.prefixCls,"-rtl")),delete(e=Object(r.a)(Object(r.a)({},e),{},{mode:t,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:ge(this.props,this.state,t)})).openAnimation,delete e.openTransitionName,c.createElement(u.a,{store:this.store},c.createElement(pe,Object.assign({},e,{ref:this.setInnerMenu}),this.props.children))}}]),n}(c.Component);ve.defaultProps={selectable:!0,onClick:F,onSelect:F,onOpenChange:F,onDeselect:F,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:c.createElement("span",null,"···")};var be=ve,ye=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).onKeyDown=function(t){if(t.keyCode===p.a.ENTER)return e.onClick(t),!0},e.onMouseLeave=function(t){var n=e.props,r=n.eventKey,i=n.onItemHover,a=n.onMouseLeave;i({key:r,hover:!1}),a({key:r,domEvent:t})},e.onMouseEnter=function(t){var n=e.props,r=n.eventKey,i=n.onItemHover,a=n.onMouseEnter;i({key:r,hover:!0}),a({key:r,domEvent:t})},e.onClick=function(t){var n=e.props,r=n.eventKey,i=n.multiple,a=n.onClick,s=n.onSelect,l=n.onDeselect,c=n.isSelected,u={key:r,keyPath:[r],item:Object(o.a)(e),domEvent:t};a(u),i?c?l(u):s(u):c||s(u)},e.saveNode=function(t){e.node=t},e}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var e=this.props;e.onDestroy&&e.onDestroy(e.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var e,t=Object(r.a)({},this.props),n=y()(this.getPrefixCls(),t.className,(e={},Object(f.a)(e,this.getActiveClassName(),!t.disabled&&t.active),Object(f.a)(e,this.getSelectedClassName(),t.isSelected),Object(f.a)(e,this.getDisabledClassName(),t.disabled),e)),i=Object(r.a)(Object(r.a)({},t.attribute),{},{title:"string"==typeof t.title?t.title:void 0,className:n,role:t.role||"menuitem","aria-disabled":t.disabled});"option"===t.role?i=Object(r.a)(Object(r.a)({},i),{},{role:"option","aria-selected":t.isSelected}):null!==t.role&&"none"!==t.role||(i.role="none");var a={onClick:t.disabled?null:this.onClick,onMouseLeave:t.disabled?null:this.onMouseLeave,onMouseEnter:t.disabled?null:this.onMouseEnter},o=Object(r.a)({},t.style);"inline"===t.mode&&("rtl"===t.direction?o.paddingRight=t.inlineIndent*t.level:o.paddingLeft=t.inlineIndent*t.level),G.forEach((function(e){return delete t[e]})),delete t.direction;var s=this.props.itemIcon;return"function"==typeof this.props.itemIcon&&(s=c.createElement(this.props.itemIcon,this.props)),c.createElement("li",Object.assign({},Object(d.default)(t,["onClick","onMouseEnter","onMouseLeave","onSelect"]),i,a,{style:o,ref:this.saveNode}),t.children,s)}}]),n}(c.Component);ye.isMenuItem=!0,ye.defaultProps={onSelect:F,onMouseEnter:F,onMouseLeave:F,manualRef:F};var Ee=Object(u.b)((function(e,t){var n=e.activeKey,r=e.selectedKeys,i=t.eventKey;return{active:n[t.subMenuKey]===i,isSelected:-1!==r.indexOf(i)}}))(ye),xe=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).renderInnerMenuItem=function(t){var n=e.props;return(0,n.renderMenuItem)(t,n.index,e.props.subMenuKey)},e}return Object(a.a)(n,[{key:"render",value:function(){var e=Object(h.a)({},this.props),t=e.className,n=void 0===t?"":t,r=e.rootPrefixCls,i="".concat(r,"-item-group-title"),a="".concat(r,"-item-group-list"),o=e.title,s=e.children;return G.forEach((function(t){return delete e[t]})),delete e.onClick,delete e.direction,c.createElement("li",Object.assign({},e,{className:"".concat(n," ").concat(r,"-item-group")}),c.createElement("div",{className:i,title:"string"==typeof o?o:void 0},o),c.createElement("ul",{className:a},c.Children.map(s,this.renderInnerMenuItem)))}}]),n}(c.Component);xe.isMenuItemGroup=!0,xe.defaultProps={disabled:!0};var _e=xe,ke=function(e){var t=e.className,n=e.rootPrefixCls,r=e.style;return c.createElement("li",{className:"".concat(t," ").concat(n,"-item-divider"),style:r})};ke.defaultProps={disabled:!0,className:"",style:{}};var we=ke;t.e=be},"24YM":
|
|
|
/*!**************************************************!*\
|
|
|
!*** ./node_modules/size-sensor/lib/constant.js ***!
|
|
|
\**************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SensorTabIndex=t.SensorClassName=t.SizeSensorId=void 0;t.SizeSensorId="size-sensor-id";t.SensorClassName="size-sensor-object";t.SensorTabIndex="-1"},"2DNl":
|
|
|
/*!**************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/contain/path.js ***!
|
|
|
\**************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/PathProxy */"IMiH"),i=n(/*! ./line */"loD1"),a=n(/*! ./cubic */"59Ip"),o=n(/*! ./quadratic */"aKvl"),s=n(/*! ./arc */"n1HI"),l=n(/*! ./util */"hX1E").normalizeRadian,c=n(/*! ../core/curve */"Sj9i"),u=n(/*! ./windingLine */"hyiK"),d=r.CMD,h=2*Math.PI;var f=[-1,-1,-1],p=[-1,-1];function m(e,t,n,r,i,a,o,s,l,u){if(u>t&&u>r&&u>a&&u>s||u<t&&u<r&&u<a&&u<s)return 0;var d,h=c.cubicRootAt(t,r,a,s,u,f);if(0===h)return 0;for(var m,g,v=0,b=-1,y=0;y<h;y++){var E=f[y],x=0===E||1===E?.5:1;c.cubicAt(e,n,i,o,E)<l||(b<0&&(b=c.cubicExtrema(t,r,a,s,p),p[1]<p[0]&&b>1&&(d=void 0,d=p[0],p[0]=p[1],p[1]=d),m=c.cubicAt(t,r,a,s,p[0]),b>1&&(g=c.cubicAt(t,r,a,s,p[1]))),2===b?E<p[0]?v+=m<t?x:-x:E<p[1]?v+=g<m?x:-x:v+=s<g?x:-x:E<p[0]?v+=m<t?x:-x:v+=s<m?x:-x)}return v}function g(e,t,n,r,i,a,o,s){if(s>t&&s>r&&s>a||s<t&&s<r&&s<a)return 0;var l=c.quadraticRootAt(t,r,a,s,f);if(0===l)return 0;var u=c.quadraticExtremum(t,r,a);if(u>=0&&u<=1){for(var d=0,h=c.quadraticAt(t,r,a,u),p=0;p<l;p++){var m=0===f[p]||1===f[p]?.5:1;c.quadraticAt(e,n,i,f[p])<o||(f[p]<u?d+=h<t?m:-m:d+=a<h?m:-m)}return d}m=0===f[0]||1===f[0]?.5:1;return c.quadraticAt(e,n,i,f[0])<o?0:a<t?m:-m}function v(e,t,n,r,i,a,o,s){if((s-=t)>n||s<-n)return 0;var c=Math.sqrt(n*n-s*s);f[0]=-c,f[1]=c;var u=Math.abs(r-i);if(u<1e-4)return 0;if(u%h<1e-4){r=0,i=h;var d=a?1:-1;return o>=f[0]+e&&o<=f[1]+e?d:0}if(a){c=r;r=l(i),i=l(c)}else r=l(r),i=l(i);r>i&&(i+=h);for(var p=0,m=0;m<2;m++){var g=f[m];if(g+e>o){var v=Math.atan2(s,g);d=a?1:-1;v<0&&(v=h+v),(v>=r&&v<=i||v+h>=r&&v+h<=i)&&(v>Math.PI/2&&v<1.5*Math.PI&&(d=-d),p+=d)}}return p}function b(e,t,n,r,l){for(var c,h,f=0,p=0,b=0,y=0,E=0,x=0;x<e.length;){var _=e[x++];switch(_===d.M&&x>1&&(n||(f+=u(p,b,y,E,r,l))),1===x&&(y=p=e[x],E=b=e[x+1]),_){case d.M:p=y=e[x++],b=E=e[x++];break;case d.L:if(n){if(i.containStroke(p,b,e[x],e[x+1],t,r,l))return!0}else f+=u(p,b,e[x],e[x+1],r,l)||0;p=e[x++],b=e[x++];break;case d.C:if(n){if(a.containStroke(p,b,e[x++],e[x++],e[x++],e[x++],e[x],e[x+1],t,r,l))return!0}else f+=m(p,b,e[x++],e[x++],e[x++],e[x++],e[x],e[x+1],r,l)||0;p=e[x++],b=e[x++];break;case d.Q:if(n){if(o.containStroke(p,b,e[x++],e[x++],e[x],e[x+1],t,r,l))return!0}else f+=g(p,b,e[x++],e[x++],e[x],e[x+1],r,l)||0;p=e[x++],b=e[x++];break;case d.A:var k=e[x++],w=e[x++],C=e[x++],S=e[x++],O=e[x++],A=e[x++];x+=1;var T=1-e[x++],I=Math.cos(O)*C+k,D=Math.sin(O)*S+w;x>1?f+=u(p,b,I,D,r,l):(y=I,E=D);var L=(r-k)*S/C+k;if(n){if(s.containStroke(k,w,S,O,O+A,T,t,L,l))return!0}else f+=v(k,w,S,O,O+A,T,L,l);p=Math.cos(O+A)*C+k,b=Math.sin(O+A)*S+w;break;case d.R:y=p=e[x++],E=b=e[x++];I=y+e[x++],D=E+e[x++];if(n){if(i.containStroke(y,E,I,E,t,r,l)||i.containStroke(I,E,I,D,t,r,l)||i.containStroke(I,D,y,D,t,r,l)||i.containStroke(y,D,y,E,t,r,l))return!0}else f+=u(I,E,I,D,r,l),f+=u(y,D,y,E,r,l);break;case d.Z:if(n){if(i.containStroke(p,b,y,E,t,r,l))return!0}else f+=u(p,b,y,E,r,l);p=y,b=E}}return n||(c=b,h=E,Math.abs(c-h)<1e-4)||(f+=u(p,b,y,E,r,l)||0),0!==f}t.contain=function(e,t,n){return b(e,0,!1,t,n)},t.containStroke=function(e,t,n,r){return b(e,t,!0,n,r)}},"2JKx":
|
|
|
/*!**********************************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Detail/components/ConfigWorks/index.less?modules ***!
|
|
|
\**********************************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___21flX",flex_space_between:"flex_space_between___hkcwT",flex_box_vertical_center:"flex_box_vertical_center___1JAyR",flex_box_center_end:"flex_box_center_end___2trjo",flex_box_column:"flex_box_column___2q5e9",form:"form___1j7IG",efficiency:"efficiency___KDh-I",ipItem:"ipItem___2NlCp",ipWrp:"ipWrp___2kiZa"}},"2fw6":
|
|
|
/*!**********************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/shape/Circle.js ***!
|
|
|
\**********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../Path */"y+Vt").extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(e,t,n){n&&e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,2*Math.PI,!0)}});e.exports=r},"3C/r":
|
|
|
/*!*****************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/Pattern.js ***!
|
|
|
\*****************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=function(e,t){this.image=e,this.repeat=t,this.type="pattern"};n.prototype.getCanvasPattern=function(e){return e.createPattern(this.image,this.repeat||"repeat")};var r=n;e.exports=r},"3CBa":
|
|
|
/*!*************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/svg/Painter.js ***!
|
|
|
\*************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./core */"hydK").createElement,i=n(/*! ../core/util */"bYtY"),a=n(/*! ../core/log */"SUKs"),o=n(/*! ../graphic/Path */"y+Vt"),s=n(/*! ../graphic/Image */"Dagg"),l=n(/*! ../graphic/Text */"dqUG"),c=n(/*! ../core/arrayDiff2 */"DBLp"),u=n(/*! ./helper/GradientManager */"sW+o"),d=n(/*! ./helper/ClippathManager */"n6Mw"),h=n(/*! ./helper/ShadowManager */"vKoX"),f=n(/*! ./graphic */"P47w"),p=f.path,m=f.image,g=f.text;function v(e){return parseInt(e,10)}function b(e,t){return t&&e&&t.parentNode!==e}function y(e,t,n){if(b(e,t)&&n){var r=n.nextSibling;r?e.insertBefore(t,r):e.appendChild(t)}}function E(e,t){if(b(e,t)){var n=e.firstChild;n?e.insertBefore(t,n):e.appendChild(t)}}function x(e,t){t&&e&&t.parentNode===e&&e.removeChild(t)}function _(e){return e.__textSvgEl}function k(e){return e.__svgEl}var w=function(e,t,n,a){this.root=e,this.storage=t,this._opts=n=i.extend({},n||{});var o=r("svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("version","1.1"),o.setAttribute("baseProfile","full"),o.style.cssText="user-select:none;position:absolute;left:0;top:0;";var s=r("g");o.appendChild(s);var l=r("g");o.appendChild(l),this.gradientManager=new u(a,l),this.clipPathManager=new d(a,l),this.shadowManager=new h(a,l);var c=document.createElement("div");c.style.cssText="overflow:hidden;position:relative",this._svgDom=o,this._svgRoot=l,this._backgroundRoot=s,this._viewport=c,e.appendChild(c),c.appendChild(o),this.resize(n.width,n.height),this._visibleList=[]};w.prototype={constructor:w,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(){var e=this.storage.getDisplayList(!0);this._paintList(e)},setBackgroundColor:function(e){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var t=r("rect");t.setAttribute("width",this.getWidth()),t.setAttribute("height",this.getHeight()),t.setAttribute("x",0),t.setAttribute("y",0),t.setAttribute("id",0),t.style.fill=e,this._backgroundRoot.appendChild(t),this._backgroundNode=t},_paintList:function(e){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var t,n,r=this._svgRoot,i=this._visibleList,a=e.length,u=[];for(t=0;t<a;t++){var d=e[t],h=(n=d)instanceof o?p:n instanceof s?m:n instanceof l?g:p,f=k(d)||_(d);d.invisible||(d.__dirty&&(h&&h.brush(d),this.clipPathManager.update(d),d.style&&(this.gradientManager.update(d.style.fill),this.gradientManager.update(d.style.stroke),this.shadowManager.update(f,d)),d.__dirty=!1),u.push(d))}var v,b=c(i,u);for(t=0;t<b.length;t++){if((S=b[t]).removed)for(var w=0;w<S.count;w++){f=k(d=i[S.indices[w]]);var C=_(d);x(r,f),x(r,C)}}for(t=0;t<b.length;t++){var S;if((S=b[t]).added)for(w=0;w<S.count;w++){f=k(d=u[S.indices[w]]),C=_(d);v?y(r,f,v):E(r,f),f?y(r,C,f):v?y(r,C,v):E(r,C),y(r,C,f),v=C||f||v,this.gradientManager.addWithoutUpdate(f||C,d),this.shadowManager.addWithoutUpdate(f||C,d),this.clipPathManager.markUsed(d)}else if(!S.removed)for(w=0;w<S.count;w++){f=k(d=u[S.indices[w]]),C=_(d),f=k(d),C=_(d);this.gradientManager.markUsed(d),this.gradientManager.addWithoutUpdate(f||C,d),this.shadowManager.markUsed(d),this.shadowManager.addWithoutUpdate(f||C,d),this.clipPathManager.markUsed(d),C&&y(r,C,f),v=f||C||v}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=u},_getDefs:function(e){var t,n=this._svgDom;return 0===(t=n.getElementsByTagName("defs")).length?e?((t=n.insertBefore(r("defs"),n.firstChild)).contains||(t.contains=function(e){var n=t.children;if(!n)return!1;for(var r=n.length-1;r>=0;--r)if(n[r]===e)return!0;return!1}),t):null:t[0]},resize:function(e,t){var n=this._viewport;n.style.display="none";var r=this._opts;if(null!=e&&(r.width=e),null!=t&&(r.height=t),e=this._getSize(0),t=this._getSize(1),n.style.display="",this._width!==e||this._height!==t){this._width=e,this._height=t;var i=n.style;i.width=e+"px",i.height=t+"px";var a=this._svgDom;a.setAttribute("width",e),a.setAttribute("height",t)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",e),this._backgroundNode.setAttribute("height",t))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(e){var t=this._opts,n=["width","height"][e],r=["clientWidth","clientHeight"][e],i=["paddingLeft","paddingTop"][e],a=["paddingRight","paddingBottom"][e];if(null!=t[n]&&"auto"!==t[n])return parseFloat(t[n]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[r]||v(s[n])||v(o.style[n]))-(v(s[i])||0)-(v(s[a])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},toDataURL:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(this._svgDom.outerHTML.replace(/></g,">\n\r<"))}},i.each(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],(function(e){var t;w.prototype[e]=(t=e,function(){a('In SVG mode painter not support method "'+t+'"')})}));var C=w;e.exports=C},"3e3G":
|
|
|
/*!************************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/RadialGradient.js ***!
|
|
|
\************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/util */"bYtY"),i=n(/*! ./Gradient */"QuXc"),a=function(e,t,n,r,a){this.x=null==e?.5:e,this.y=null==t?.5:t,this.r=null==n?.5:n,this.type="radial",this.global=a||!1,i.call(this,r)};a.prototype={constructor:a},r.inherits(a,i);var o=a;e.exports=o},"3gBT":
|
|
|
/*!***********************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/core/guid.js ***!
|
|
|
\***********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=2311;e.exports=function(){return n++}},"4fz+":
|
|
|
/*!*****************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/container/Group.js ***!
|
|
|
\*****************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/util */"bYtY"),i=n(/*! ../Element */"1bdT"),a=n(/*! ../core/BoundingRect */"mFDi"),o=function(e){for(var t in e=e||{},i.call(this,e),e)e.hasOwnProperty(t)&&(this[t]=e[t]);this._children=[],this.__storage=null,this.__dirty=!0};o.prototype={constructor:o,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(e){return this._children[e]},childOfName:function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},childCount:function(){return this._children.length},add:function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},addBefore:function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,r=n.indexOf(t);r>=0&&(n.splice(r,0,e),this._doAdd(e))}return this},_doAdd:function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__storage,n=this.__zr;t&&t!==e.__storage&&(t.addToStorage(e),e instanceof o&&e.addChildrenToStorage(t)),n&&n.refresh()},remove:function(e){var t=this.__zr,n=this.__storage,i=this._children,a=r.indexOf(i,e);return a<0||(i.splice(a,1),e.parent=null,n&&(n.delFromStorage(e),e instanceof o&&e.delChildrenFromStorage(n)),t&&t.refresh()),this},removeAll:function(){var e,t,n=this._children,r=this.__storage;for(t=0;t<n.length;t++)e=n[t],r&&(r.delFromStorage(e),e instanceof o&&e.delChildrenFromStorage(r)),e.parent=null;return n.length=0,this},eachChild:function(e,t){for(var n=this._children,r=0;r<n.length;r++){var i=n[r];e.call(t,i,r)}return this},traverse:function(e,t){for(var n=0;n<this._children.length;n++){var r=this._children[n];e.call(t,r),"group"===r.type&&r.traverse(e,t)}return this},addChildrenToStorage:function(e){for(var t=0;t<this._children.length;t++){var n=this._children[t];e.addToStorage(n),n instanceof o&&n.addChildrenToStorage(e)}},delChildrenFromStorage:function(e){for(var t=0;t<this._children.length;t++){var n=this._children[t];e.delFromStorage(n),n instanceof o&&n.delChildrenFromStorage(e)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(e){for(var t=null,n=new a(0,0,0,0),r=e||this._children,i=[],o=0;o<r.length;o++){var s=r[o];if(!s.ignore&&!s.invisible){var l=s.getBoundingRect(),c=s.getLocalTransform(i);c?(n.copy(l),n.applyTransform(c),(t=t||n.clone()).union(n)):(t=t||l.clone()).union(l)}}return t||n}},r.inherits(o,i);var s=o;e.exports=s},"4mN7":
|
|
|
/*!***********************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/core/bbox.js ***!
|
|
|
\***********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./vector */"QBsz"),i=n(/*! ./curve */"Sj9i"),a=Math.min,o=Math.max,s=Math.sin,l=Math.cos,c=2*Math.PI,u=r.create(),d=r.create(),h=r.create();var f=[],p=[];t.fromPoints=function(e,t,n){if(0!==e.length){var r,i=e[0],s=i[0],l=i[0],c=i[1],u=i[1];for(r=1;r<e.length;r++)i=e[r],s=a(s,i[0]),l=o(l,i[0]),c=a(c,i[1]),u=o(u,i[1]);t[0]=s,t[1]=c,n[0]=l,n[1]=u}},t.fromLine=function(e,t,n,r,i,s){i[0]=a(e,n),i[1]=a(t,r),s[0]=o(e,n),s[1]=o(t,r)},t.fromCubic=function(e,t,n,r,s,l,c,u,d,h){var m,g=i.cubicExtrema,v=i.cubicAt,b=g(e,n,s,c,f);for(d[0]=1/0,d[1]=1/0,h[0]=-1/0,h[1]=-1/0,m=0;m<b;m++){var y=v(e,n,s,c,f[m]);d[0]=a(y,d[0]),h[0]=o(y,h[0])}for(b=g(t,r,l,u,p),m=0;m<b;m++){var E=v(t,r,l,u,p[m]);d[1]=a(E,d[1]),h[1]=o(E,h[1])}d[0]=a(e,d[0]),h[0]=o(e,h[0]),d[0]=a(c,d[0]),h[0]=o(c,h[0]),d[1]=a(t,d[1]),h[1]=o(t,h[1]),d[1]=a(u,d[1]),h[1]=o(u,h[1])},t.fromQuadratic=function(e,t,n,r,s,l,c,u){var d=i.quadraticExtremum,h=i.quadraticAt,f=o(a(d(e,n,s),1),0),p=o(a(d(t,r,l),1),0),m=h(e,n,s,f),g=h(t,r,l,p);c[0]=a(e,s,m),c[1]=a(t,l,g),u[0]=o(e,s,m),u[1]=o(t,l,g)},t.fromArc=function(e,t,n,i,a,o,f,p,m){var g=r.min,v=r.max,b=Math.abs(a-o);if(b%c<1e-4&&b>1e-4)return p[0]=e-n,p[1]=t-i,m[0]=e+n,void(m[1]=t+i);if(u[0]=l(a)*n+e,u[1]=s(a)*i+t,d[0]=l(o)*n+e,d[1]=s(o)*i+t,g(p,u,d),v(m,u,d),(a%=c)<0&&(a+=c),(o%=c)<0&&(o+=c),a>o&&!f?o+=c:a<o&&f&&(a+=c),f){var y=o;o=a,a=y}for(var E=0;E<o;E+=Math.PI/2)E>a&&(h[0]=l(E)*n+e,h[1]=s(E)*i+t,g(p,h,p),v(m,h,m))}},"4qgm":
|
|
|
/*!*********************************************!*\
|
|
|
!*** ./src/assets/images/icons/tx-live.png ***!
|
|
|
\*********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAwCAYAAABE1blzAAAIeUlEQVRoQ72aa2wU1xXHf2dm1jYEBClJGgofIFJLU0W04AdQWgJSW0UprZRIpB/aJBTxStIShWchJvbytA2lBCKKeajhQ5s2tGpFK1G1UowqKNjYBkraJCqqiCDEDZSncezdmTnVnd2FxaztmfWaa632w9459/7v75xzz71j4R61ssM6TkrYqMon3qesPjFNLt6LoWWgB5n1ttr/GcMCLKrE5qFgPJf3gRXN5XJgoMcfUIFlR/QxiqgVhyfVA/MxTWKgPuZvL51UtUyTjwdK6IAI/NLbWlQylhctWC0xPuN35Zi+gFUMfpIzoqxsLpffDoTIggssb9KvqLBJYnxD3dvUepq8OIAPquxzfCobJ8v5QgotmMAxDVoyYjAvi81KcRiWk1qPKm/RPIvHqy2T5FeFElkQgeVNWq42m8TmcU0G8ZVXC2ia5vOW47Lq2BQ5m5ehrIf6JbC0WQdbsMSH5ZbNED/R3+mYDHSL5kcqVLZOZB8imq/lvAWWHdWpOGySIqYEwvKk1mtsmtl5/M72WNk4Wf6dj8jIAqce1qGJEparsgSHQVoIar3M3GRadWnDp+rb5eyJi0RaykgCy47q9DS1srDUvLRzme+YFXhg5CY2YD4uf/RdVrROkffCGgk13vQTOrzdZZUKi8SmOCy1pMLUYfCDkfD7T+Cvl1PTckKNereENM1L6rFmaAc/PzRD3L6E9jlUabN+Swj2tfFB6o8Q7h0e/GQMPDcy9djBS7DjPJzthOJ+0lSPvzguyxonyz96E9mjwIpGHeGZ+lFYiEXMpP+ozQhcPgZmj7z95MUE1H8Ef7gIhnCszyXOPWqa5lWUDVcvsu3Mk5KrXsodEhUtOtNT6qwYj0allj2dXAIzvx+5CtvOwT9vQpEFVtTVMzuK8QJT1yY55HssbZ0sLd3N3LF+k47pZ70YcZS5WNj5UAsr0PS74cG+C/DLNrjppYTm0wKaSW7gUxvz2HL0q/Jpxs4tgeVN+rRvUWPF+Hx/qEURmOl7uh1ePweN11Iua+XjtsYLUjSP+BZLW0vlmLEvk07paK+LNWoxWwQxBXKhWm8u2n2MpA+/+S/suQDXvfxc1ti0ioIC/ybK5o5BbJbSJj1pD+HLXnu0DBlmEaIIzNjbfi6VhErydNeAmgX2MPCu8ZxMaNJptlBjSi6zv+VbKOcSHFVgwxXY/CFc6AI7Hzc14kzBni7xPJtFgZnxp/S+WJLFAsvEYWiko04vKMMKbOtK7Y9/+h/4mmchkFWkWz6VxyvkzYBm9vzKjmsFFnX9PfZkbPYl0BSVBy7CzvNwvqsfm3/WMct1WXUy65h1lyNMb9CS9iEsUouVls3w/tDsTeCZDjDxduhqKqHk5ZJpaprgQ/VZleug3KOnl/1dJ6QvjL4Z5uohbAx2+fBWG/ziY7icTFHLp4W96ug1lM3l0eCxvIhQicWIqBu/IbhyLDz7cErCiRup6qX5ej/2u4iXVaFyVdlxfUyFN0UojbJPGlozH4B5o+DAJfh1GxjR+VYs2deNFrx2vELa+qIfSqAxUtqkW61iXvY7+zJ55+/mFGHcsN0FJ8+a89Y1RoL3xWVF85TwF8ahBZY16RtSzEtRBRq5RmTogbqtn6GGh+vDThHiLWVyadYstffvl/Q1cu8LHnrc/giMxjzdOxNrCU6rsry1Qv5sflkQ1x8qjN5VJWvD2C2cQGMpwmG4t8lJUUAtobDds1l3coJcnVulox2LdU4xzyc62berWmbfG4GSKo80SVKK0gfjfIWaGDXFcoJW32dZ6yR5x4hYuEafUaixbcYaX3cT7NlVLfMGXGAmq4nPHlz2YvMjbJ41k4iSbYOSylBz6VThZ+2dbPzga3Jj4Todhcd6FZ4XAd8DJwZucqAF3q4gPgCWZ78GK2/S76nFBonxSKhzZfoc5ydpxGNpy2Q5HFCr0mew2WjZPOJmXZcMuMDgFZiPi1Dv3SRuXmTOqdWhRV28ZHkc3hGXw+VN+rAK67GYjWD1VCAYd/Q9borHZrWpaymTjoWv6igtZh0E59OAWnYbMIGljbrDGc4L3g3eRQNqB83A89bo4zb81HYodV06VKkb+S4b4/slMbFRn7JsaiTGF7JpZu5S/ARH8FjSMkUaja35cZ1lCTUBNXPwzhHLRmAywd7dcZlb2Bhs1C3EGNTlsOr0eLkyZ7kOdYawyoJXRCj2PDArbjvguRxVl1d2rZXGCa36oO2zBmWexLCD+ExwHai91M6WszOkc06Vfi5msc4QNzmrO7VsIbEiSCTYubtaXiiowNJmfcBssumVniGw2XaY6Jl3gN1W2oj0fTrUY9PIf7HB0Cxv0ifUZhF+SlxzuZy4i1ofV5NOyu5ltXiqvlL+VlCBGWNzV+vX7RgHnRj3JXPeRKZ6ZtP0fBbviacugTItoOakY60PasalLTuIx3dIsrh+rZwKIy6YR9iOmX7z6zUmbTwhQq1l82gugtk20zRvqrKJDrZeKaX9/vd42oIay7kzQ+aaS/C8x3WEtZc9tu2PS6TXPZEFZibx4w36YMKl2lRPIti9xY2haQh4LmcQbqBMSBPpcX2zPKDB91m8Oy4no8LIi2D3QRZW6Uxs6sLQtMzhNkfq724zTf2aKutH+rwej0gt217eBLONLKzWh8z/wWgImr1RCKgZ0h4N4rJk59pUIupPK4jAzAQWxPU7QJ3t8MW+YjMXNfW55ivriy+xbfv23C9ToootqEAzeEDTplqV+X3FZibbWqlE0iCwZOdr/adWcBfNtarzqvS7tkWt1QtNE2uGGrAhNpzXty8qDLV7IjBDUy3ioszHwspk2lux5tOgHkt3xaU1quuF7V9wF+2Rpk0dwjhTXypcQ9lYdD9bB4LaPSPYPdOqsAcYh8336yulOSyF/vT7P83Gv9qVBJysAAAAAElFTkSuQmCC"},"4u4S":
|
|
|
/*!*********************************************!*\
|
|
|
!*** ./src/assets/images/icons/groups2.png ***!
|
|
|
\*********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAASm0lEQVR4Xu2dd5QUVRbGfz3kJDkKCJJBAVFWRUUkGFBQEFRWFhUWmBlAoqCoMGKAVcC8CLKLBEEkKCZMgKjkqIIIKCKiMCAsUfLUntuvi+7pqeqq7q7pcbrrncMfTL10v/f1q/vuu/eWR0vmBaA/bnERiGMEPFoaSaTzLhrt4lhOV7QER8Aj8mtDKMJxlqJxeYLj4Yofpwh4ie4l+wAqcopVaFSJU1ldsRIYgfNE95K9L5dyjq/RuCCBMXFFj0MEMhHdS/ZUbkTjQzTyxqG8rkgJikAWonvJnkIvNCYmKCau2HGIgCHRfWQfg8awOJTZFSkBETAnuoaHFN4GOiUgLq7IcYaAKdG9u3oaBUlnCRpXxZncrjgJhkBIonvJ3o+ynGUlGhcnGDauuHGEgCXRfWbHupxjORol40h2V5QEQsAW0X1kb8FZPgHyJxA+rqhxgoBtovts7N3IYGqcyO6KkUAIhEV0H9nTyGBkAmHkihoHCIRNdJ+NfToaXeNAfleEBEEgMqKnkZ+9fAY0TxCcXDFzOQIREd27qw+kFCdZgUbtXI6BO/0EQCBiovts7DU4w0qgTAJg5YqYixGIiui+w2kzMlgEFMzFODg/9dLVISkPHN0PJw+b91+gGGSchTMnnJ9DcI9FSsNFTeHgL5C+DbRzmWt48mT9m5OzkvFLXAgHdsLJI072bNlX1ET3kf1uMpgFONKf5axzQ4Uxe6B4BXi7Pyx5yXzGveZBo9th21J4sVX0kpW6CA79DhlnsvZ1xT3QYxZoGgwsDqeO+utUuhRSFsCcgfDtgujnYdRDp/HQaqCa3/Cq2fujChrfMWJqyTwMjM4ehCx6HbgESla1P/TLN8P+7ap+gaLw6Df22r4zFDbMs1fXDtGrXw1Dl6v+5g2Bz8fZ69usVlI+GPsH5C8Mb3SDtbL3BJQOz8KND8HerfBE3czP+nwIl7RVP4J3H4FP/xXdXIJb5ysEo3+DIiXh49GwYLiz/Vv05hjRvTt7CpPR6BFTCWSwUT9B2TBccUZdAns2q2kWvACeD6FaBAoz9QFY+YY98ayIXrgUPLwaytZQ/f260Vp9WfwirJttPn6t62HQF+r5o9Xh4M7MdfsvgrotYfVMmHJv5mf5CkP3N6HxHervy6fAjH+ClmFPXqtaV90P901RtUbU9m80Vu0ceu4s0dPISzoL0Wjt0PzsdaMT/dNnYcN84zYeDwxdoZ6ZEX3BY/D7pqztH5gBBYuCEdFLVgHRbYNJFYroeQtCv4VQu4U9+fRaolYsluwkJuWOMXDTMNizBUbVz1pp7EG1o84dDIvGZ33uSQJRL1r6sp+smArTuztD9mGroNrfYPtXMD72VmlHiS7IacMozhGWodEgvFWMorZO9Jkp8NVrJkRPgn/7Dl9mRB/fArYvNSDIAShSKivRWw+BDv+CrYvhpTaZ25kR/YIKkPwuVL9S1V/4NOz+1lx4qdd6kHo+/gbY7tuxjVo8uhEqN4LPxsH8IZlryOH4qR2+fkzk1FvcOhJuS1P/+3oyvNlLVtZ4jqI21rjWevHy+CIzRTXKCDoEW7f21xhWEY7/EU4Lb13Hie4lex8uIsPr2lsh7BlF0iCniC67+Yjv1W7/SlvYvNA/eyOiN7gF7p0EJStDRgbMTIZlr5tLfEFFeGQtlKgEa96C/3Yxr1u8Eoz5TT1/oZX68QWWy+6EXnOVDj6ohLXVo/OL0PJB9XZ4rhmcOGQ89qAvodZ1kaxaZG2GlP3rEN1L9r5cwVlkeywcmURhtMopossUWw2CTuPg983wVCO/JSGQ6GtnQ9fJ0PA2JdSp4zC9B2z7Apo9oHbgYCtJ3gIgu+XFV8PJozCyDhzZYw5Ks+7wj/+ouoNLZ+2v/dNwy3BlVkyrYwNcD7R/Epa8DEfTzetXuQwKlTB/ftV9cPV96vmMXrD/Rxtjh6jy49fGFiWLXrNlR9fH1PpwOxnMRyMpOuksWutEF/1PP2QGNxEd/bre6q9OqS7Sl+jnw9dD5YZqIfUdOpDoSyfAgM+hVnPYtBBmpSj7+uPfqUO0EH5SJzh+QM2vfF11MKzaRL3mp3WHVdNCg9BzDjTpBAd/hdVvZq0rh8wKdWH/T7BuTmTL8et6WB9G28qN1bkoX0H48jUldw6VbCW6yKSlMACN57NVPqesLuHq6LpQjTpA8nw4vBdG1oJTxyBYdSlaFmrfAOslDNdXqjRR+nqpKrB/B0xoD2I5uXMs5C8EJ4/Bf+6BTR+Ghi8pLzy3HwqH2FmdWICV02Cqb3e26k+sWaJ2laulZHuqIZw+7m8lF2W9fabaN+4L/bayGsvG82wnuo/sr6DRx8Z8IquiE/3b92HnauM+ZEdvN8r5Hd3bo0ftzpUawIej4IORWYluJlmxctBzrtJzZfeW21Qp/9sNr94Gv9mw8ctBU9QnsyLPqzRW+vk370aGsbSSN0+oy6/Anv85Gy6/S51Fnm8BP36VeVwxr47zvcEerwF/+A7Kkc8uZMvYEP1t8rCEBWjcmi1y5KSOrgvU9O9K3fh5FTx3DYzebX0zWqE+NO2i/un29DOn4OtJyhoTSjcOB0iddDtWqINldpfmqdDlVTWKkQVI/h6PRPfu6qkUReNLNC5zHOe/AtFFVxdT4A7fTaeR1aVIGWU7r3MD1GmpdGa9CMGXTVa3hod91hMngCpcUr1d8hWAOYNgcfZqkV5fmsFfqfHEYvNMEzh7Mqsk8Up0L9n7UomzrAIqO7GG5/v4KxA9WCAjot/9MrTom7nmrvUgKpeQ/NBu/zOx5jRPgd0b4fXOkcMlfXT5t1JbxL8kcIzIezVuKT/e3u9AIV/qziPpcHSfcV05V1Ssp56JJejsqdCzmXA7HPg54hnHRHUJnJ3Wj0acQRS2YhHPOrihTvR3HoaVJiGtcuun25mdtLqYCWG4o5dWurxO7u8+MN+9dXOgqELPRpFWR7+RPH0CNn0UHuTiYSg3o3aKqG7dpkDe/OpHJWciJ8sT9WHvloh7dHg29uahpdKODN6zV9tGrZy2uhhN0exmVH5wdvxHnCB6xQYwwsClwQak3irH/oCHylrXbjMUOoxR5D5xGOYOUjZ9KVPvhxMGLrkFi8H9vk1pVqqyWAUXsTzJuUdKWj1I/8F6LiY1coboyYijxcCIZ222o9vtMLt3dCHzs+lQtIzfTff6vnBRGN9ZENOj2OaFbLLz60V2eDM3h2D5u89UB129rJ8LPy2zRkns8TWuUW+e0SHmLHLe9aJfHRNLkdwQy6XV0z41w+wm046OLp6lL/hciXMb0bUUuqIx3RrtMGroO/rbA2C5bycJ1fz0n/5dNdB7MVI7euBYYh8Wgum3oLo/eu/50LhDGEKZVJVbVrGtW5ULG4L4vsguK/7f4kYgRHzyUvPrfOmz+IWQ9oNya5jUGTbMNR9J9y+XGr99p0guZ4BS1RKb6FoKl6PxtePRSHYOo2bL5STRZYFT34cLL/GPphP9mp7Klm23VLtSvQGO7MtMtl3rYPl/rXtJeQ8atoPDe+CZy5Xfe+lqxi66gb31eAuuuFu5NMiPwsyZS9qIeVRcjeUtM7GjP5IqkYmuJVMOD2uz5dMxVkQXX4zrU+GTMVn1Y6eILh58smsXKwt/HgLxVREd0yzCyCpsLRodPTCgQwIwVk2Huq2hvyRuQLkUrPD5hgeS/NLb1A9VyuR7Qvu+6+1kLPnxnTvt7ylRia5NJB8bWYRG9ri5hSK66JEjNiubtRx6vpyQeTeMluhCWHGWajsCxBX1wC/wyi0wYLHxhVH+IuqGtt6NMO46czUiUqKL2e6hZcr3+6flMFZcaH0utve+DtdKMIWmfNIDbeoN2qorefFL2fwxvHqrvUOz0bslYYmewgQ0kq3ftxHWsNrRW/SDu19SO6147gXadqMhetmacP90uNhn/pPDmxDkyF5zFwAh+tCVSr3ZugReusnYGy9Sord7Eto+pq7exzQFccTSi4TadZ+hrualLHoB5g2Ghu1Bbk/FNLhjpXLzPfNnhItBYuroWio9yWBS5KjZaGlFdNl1H14DVS+DYMckK6JLiNm4g+qmT5yPAr0Iu0yA5r7fr4SnSYCC7rgUKsKoTA01H4n2kZA1I1t1JESveR0M/AKSkuCricrfPbjIG+7vE9XOLkU8PsUVWN5GopePaw5/HrQBeogqibaja6lIKowl2Z6B14rosiZNOkNPn+egLKbuZGREdLlN1O3d9W+GRu3VqqbVhfSt/hUuWwuGr4M5Yu0JOiBaxYzWvwn6fKRIKbbm4IuucIku55DHvoFSVeH4/5QXpe72a8TJwB+pPJc2cvh0wv3AKaIHBpP8Vc2L3uv+c6yLSZSRGdELFlc+2ld2Ve6v+m2dV3e9Ri2/EdEf/AzqBYW9eq0QAdYUnTzifWh0zW1FdGnfcSy0GawCMcQnZN82PyXDIbocfMXKUv9GpX9P6QprZhpvuXnyw/V9oO3j6o0SWHaugfdHwPcf58yOLq7Mkvfl7Gl1kJd5SmCKXEI9VC7zgTfMGWbLhZHWjwKc4Uvgb2HOJ7LqT+6AMtVBYkY3zlc6Z6M7lKVBVA697PkeRK8WXfSVW2HzR8ZEl2idayVO0hcN9N37IPbrUBE+wTO3Q3Qh6CPr4OAumPZAZm9Fu0QX4kpuGN1u/1Y/WPqKMY6NO6oY13I11XPxdxdLVKVLlEnx/EawTBE+OBzP7upEuqOL6jVYaBNUJEh72v12Rzeslz1ET0ZsV9HNzK5YNZurFA+ySGIzLlZeqQN6kZvFNbOUbr5rLeivbO+t3xUgV9F6uguzCyO7cwmsZ4foUt/sjdDxOWgzRNmozXxdxMIi6ph+ESX5WIS4gUXyqUjiInEmk4glvcgPVywvuqoidnvxaZcbUb3s2qAipuT8ESrbWDA+kRJdDstP71R5aaRIRjGJhhJT6OHfI1mF820cJ7qWzIPAi1HNKpzGElcZnDbi2AHY8qnahcWRKTAes0RlGPWjOnDJRYocHnOS6CKrvLJFffGmpdOU1eLBT6B8bZW+Y9KdxoiISbPdE+qZ+K+/95i/XpmLlfejvJ0kg4Fe5K02u5/5bi1B1Lc/o8bWiziESQideFgGB1AYzUwIq/vX79tunJHLjgtAODywqOso0bW+tOAcn8X0q9PNeqjI+l/WKPuv6JcSZRTKcUoCduUHcGy/seriBMB2d3QZS4I0RDcV/frMSaWf6iXUNXz5OvD4Jlj6qjoQ60VUoqd+huIV/X+ToOLPx6t0c5ZOZR5ocLPSkSVzgf6GFBVLgrSN/MvDxSy3Et2b4uIca2OeWVdezfKqC2VhCLUIVubFcBdQrx8O0SWUrknQrr3vRxX29t7joYklFz3eNBtBeVfE5UD80MWRS5IVyUYQSQl8M8gt7+oZkfSStU1uJLqWRmHSvUmLwnDmcAav6Hvx+Hc+0ecDr7Kj6bxcbRAdWi6PrOzS8mMTTz29SOxotGF0Yh4V85xTgRayocjbJpTvSzh4yd2G7vsj2dGsAi/C6dugriOqi5bCLDRsuNRFOVu3uYtAhAhETXQtlaFk4HDq1QilcZu5CJggEBXRtWRuwsNH2Z6gyF0+F4EoEYiY6FoqNdFY7X5NOsoVcJvHBIGIiO5LXSFJRGOXMTcmcLiDxCsCYRNd0/CQ6s2n6MsYH6/QuHLFEwLhEz3Z+9VoX/LseILClSWeEQiL6N7suOd4J7vyqscz0K5sOYuAbaJrqdQjw5tly7nEQzkruzt6AiFgi+jaAEpwEklTWyuBsHFFjSMELImupZFEOh+gcUscye2KkmAIWBM9ldFkeL8h6hYXgVyLQEiia324i3OE+LBlrpXbnXiCIWBKdF/WW0n2nf0f20ow0F1xY4+AIdG1PpT2+ZZXi/2U3BFdBJxHIAvRNfX150/QaOn8cG6PLgI5g0BWoicj3+D2fSM7Zybljuoi4DQCmYiupdKNDEw+GeH00G5/LgKxQ+A80bVUmpLhzcVSMHbDuyO5CMQGAS/Rtf6U55Q3sNnZj2jFRgZ3FBcBSwQ83pTOG7z5EQMy11i2cyu4COQqBDxaMq8BvXPVrN3JugiEiYClC0CY/bnVXQRii0DHWkEJbYKG95ABnmSX6LFdFnc0pxEISXTPWTxaN+Ztn+US3Wng3f5ii4A50U/hydOZeT94P8rkEj22y+KO5jQCRkT3eI6T5GnPHH/ea5foTgPv9hdbBLIS/RD58t7C7C0rAyfiEj22y+KO5jQCmYm+j3yeG5m97ZvgYVyiOw28219sEfATfTd5klozZ2vAR6b8U3GJHttlcUdzGgFF9J8gbyvmb/nFrHuX6E4D7/YXWwTurLWJQnnbMGPLnlADu0SP7bK4ozmNQLe6pZn2wwGrbv8PSygpSs9Cw9cAAAAASUVORK5CYII="},"51gm":
|
|
|
/*!***************************************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Detail/components/StatisticsResult/index.less?modules ***!
|
|
|
\***************************************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={title:"title___1NT0J",wrap:"wrap___2hvUc"}},"55Ip":
|
|
|
/*!***************************************************************!*\
|
|
|
!*** ./node_modules/react-router-dom/esm/react-router-dom.js ***!
|
|
|
\***************************************************************/
|
|
|
/*! exports provided: MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter, BrowserRouter, HashRouter, Link, NavLink */
|
|
|
/*! exports used: Link, NavLink */function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return y}));var r=n(/*! react-router */"Ty5D"),i=n(/*! @babel/runtime/helpers/esm/inheritsLoose */"dI71"),a=n(/*! react */"q1tI"),o=n.n(a),s=n(/*! history */"YS25"),l=(n(/*! prop-types */"17x9"),n(/*! @babel/runtime/helpers/esm/extends */"wx14")),c=n(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */"zLVn"),u=n(/*! tiny-invariant */"9R94");o.a.Component;o.a.Component;var d=function(e,t){return"function"==typeof e?e(t):e},h=function(e,t){return"string"==typeof e?Object(s.c)(e,null,null,t):e},f=function(e){return e},p=o.a.forwardRef;void 0===p&&(p=f);var m=p((function(e,t){var n=e.innerRef,r=e.navigate,i=e.onClick,a=Object(c.a)(e,["innerRef","navigate","onClick"]),s=a.target,u=Object(l.a)({},a,{onClick:function(e){try{i&&i(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||s&&"_self"!==s||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return u.ref=f!==p&&t||n,o.a.createElement("a",u)}));var g=p((function(e,t){var n=e.component,i=void 0===n?m:n,a=e.replace,s=e.to,g=e.innerRef,v=Object(c.a)(e,["component","replace","to","innerRef"]);return o.a.createElement(r.e.Consumer,null,(function(e){e||Object(u.a)(!1);var n=e.history,r=h(d(s,e.location),e.location),c=r?n.createHref(r):"",m=Object(l.a)({},v,{href:c,navigate:function(){var t=d(s,e.location);(a?n.replace:n.push)(t)}});return f!==p?m.ref=t||g:m.innerRef=g,o.a.createElement(i,m)}))})),v=function(e){return e},b=o.a.forwardRef;void 0===b&&(b=v);var y=b((function(e,t){var n=e["aria-current"],i=void 0===n?"page":n,a=e.activeClassName,s=void 0===a?"active":a,f=e.activeStyle,p=e.className,m=e.exact,y=e.isActive,E=e.location,x=e.sensitive,_=e.strict,k=e.style,w=e.to,C=e.innerRef,S=Object(c.a)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return o.a.createElement(r.e.Consumer,null,(function(e){e||Object(u.a)(!1);var n=E||e.location,a=h(d(w,n),n),c=a.pathname,O=c&&c.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),A=O?Object(r.f)(n.pathname,{path:O,exact:m,sensitive:x,strict:_}):null,T=!!(y?y(A,n):A),I=T?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(p,s):p,D=T?Object(l.a)({},k,{},f):k,L=Object(l.a)({"aria-current":T&&i||null,className:I,style:D,to:a},S);return v!==b?L.ref=t||C:L.innerRef=C,o.a.createElement(g,L)}))}))},"59Ip":
|
|
|
/*!***************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/contain/cubic.js ***!
|
|
|
\***************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/curve */"Sj9i");t.containStroke=function(e,t,n,i,a,o,s,l,c,u,d){if(0===c)return!1;var h=c;return!(d>t+h&&d>i+h&&d>o+h&&d>l+h||d<t-h&&d<i-h&&d<o-h&&d<l-h||u>e+h&&u>n+h&&u>a+h&&u>s+h||u<e-h&&u<n-h&&u<a-h&&u<s-h)&&r.cubicProjectPoint(e,t,n,i,a,o,s,l,u,d,null)<=h/2}},"5D2P":
|
|
|
/*!*******************************************!*\
|
|
|
!*** ./src/assets/images/icons/done3.png ***!
|
|
|
\*******************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAFTklEQVRoQ91aS4xURRQ993UzUUZcqFEc4meh0cQFSlwgrvAHSgQWhOhCk4GZqmdw+ERUWDkrBMUBnIzzqqYjcTaaGBLFxA8MjIk/3PhZCCa6UAyKC11ARnDo6Wvu+HrS0/R7r96nWVBJpxfv3nPPrbp169aHUEAzxsxl5gcB3AdgAREtkH8AXSH87wBOMfMp+QfwFREd0Vr/k9c8ZQUwxixi5mWe5y1l5qUAyimxqkQ0XqvVxonoE631Nyn1p8VTO7B///75Fy5c2MzMWwB0ZDHaQmeSiPbMmTNnb3d39+k0mKkcMMZsBiC/W9IYSSH7K4C9Wuu9rjpODoyMjNxQq9VGADzuCpxT7gPP83p7e3v/TMJJdCAIgoVEdBDAzUlgBX8/ycwrfd//Pg431gFr7RPM/HbBxFLBEdGTSql3opQiHQiCoI+IXk9lrU3CzLzR9/3BVvAtHbDWPsrMH7aJTyZYInpMKfVRs/JFDlQqlduq1eoxIro2k6U2KTHzX+VyeXFPT8/PjSYucsBae4iZH24Tj1ywRHRYKfVIpANhnt+Ty0r7lbc0rhMzI2CMuRHAlwBubT+HXBZ+AbBEa/3HrFLCWruTmV/MBZ1N+TiAdyNUX2qZeYh2KaW2zThQqVTumZqaOlZgbePqynEiWquU+qFZwRjzBoBnIoAmS6WSTOhvp0PIGPMcgN2uVguSiyQfBIFPRMMJdrZqrV+bdsBa+x4zryqImAtMJHlr7RJmPgxgbhwQEb2vlFpNAwMDV3Z2dp7JUM+7EG0lE0l+dHS089y5c4dkkjqAVycmJq4ma+0yZv7YQaEIkUjyAh4EwTAR+a6GiGg5BUGwg4i2uyrlkEsi7xL3s8wz88syAm8x89M5iLmoxpIP4348bRYkolEyxowBkA25S1sLQJbyHhfhUCaWvMT9+fPnx5h5cQrMuugRceAEgDsdlKfTVph2rwMgC4mk37gWSz5L3DcZ+1EckAw0L44FM4/4vq+aZfr7+zu6urq2MbPMoSuavieSt9b6zJyU7+OonXVygIjWKKUOxCGFhaA4cj0AF/KS7z8D4DmMfpTIGdcQOgtgldZaJlpss9auA/B1q/Kgrhjm+08B3JuEF/ediE44T2IikiOP1Uqp7/IYDePeElFvXhwAY2nTqJCXkTiZ1XgBcT9jmplHxYEd4SR04kRER0ul0ur169dLWKVqYb7/IpVSjHB9IctSShzQWq9JQySMeyG/MI1ewhxYnqeYq2itnePYGPMmgO6iyAP4v5gTwBzl9Cta68RdnDHmWQAtz3WyOjRTTodZYSsRvZoRbLvWemeU7vDw8P2e532eETtSjZmf931/d31HtkguHdIWUw3oWmttm60NDQ1dVS6XZat6V8EOTMplitwpNJ5K7ALwQg5Da7XWszbnxphRAE/lwIxSnQnd5mMVGYWsZ///MvMK3/ePiFVjjFyADLSBvCyo0vuzj1VCo3J5kflgi5lPE9EKIprHzFIqtKO1PtiqWzLGyIb6oRyW5ZynBOCOHBhRqmNa61nHnhedjQZBcDsRycS7pg0E8kD+LZse3/d/agS5/I7XG0JpI4B9ebqsQN1NWuuWly2X7xVTvfestXfXarWDRHRTgT2aCMXMv3metzJp/5F4SymWhoaG5pfLZVlpL9k1a7VaVRs2bEi89HZyIOwu2b1tukQX3TL3OHGYsjw1GBwc7Oro6Kg7UthTA7mhn5yc3NfX1ycPQ5xbmhGYBSqPPYhINkMPAJDHHrJ4pWlTAOShx1FmvnSPPVoxbHxu43neAmauP7eRf2nTz2yI6FStViv0uc1/ndZCH8rgOooAAAAASUVORK5CYII="},"5e8a":
|
|
|
/*!************************************************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Detail/components/StatisticsResult/analysis/index.less?modules ***!
|
|
|
\************************************************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={bg:"bg___o_zr4",header:"header___2c1Cv",main:"main___3AGUO",title:"title___ZucOa",footerWrap:"footerWrap___2WiI-",footerItemName:"footerItemName___Qn48u",footerItemTotal:"footerItemTotal___2cvFT",footerItem:"footerItem___2t2MR",tabdiv:"tabdiv___ip8CE",titleItem:"titleItem___1Xehz",countcenter:"countcenter___1vwbq",radiusdiv:"radiusdiv___29Noq",titlesize:"titlesize___2flan",indextitle:"indextitle___3utGm"}},"6+eU":
|
|
|
/*!************************************************************!*\
|
|
|
!*** ./node_modules/rc-pagination/es/index.js + 4 modules ***!
|
|
|
\************************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-pagination/es/locale/zh_CN.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return w}));var r=n("wx14"),i=n("rePB"),a=n("VTBJ"),o=n("1OyB"),s=n("vuIU"),l=n("Ji7U"),c=n("LK+K"),u=n("q1tI"),d=n.n(u),h=n("TSYQ"),f=n.n(h),p=function(e){var t,n="".concat(e.rootPrefixCls,"-item"),r=f()(n,"".concat(n,"-").concat(e.page),(t={},Object(i.a)(t,"".concat(n,"-active"),e.active),Object(i.a)(t,e.className,!!e.className),Object(i.a)(t,"".concat(n,"-disabled"),!e.page),t));return d.a.createElement("li",{title:e.showTitle?e.page:null,className:r,onClick:function(){e.onClick(e.page)},onKeyPress:function(t){e.onKeyPress(t,e.onClick,e.page)},tabIndex:"0"},e.itemRender(e.page,"page",d.a.createElement("a",{rel:"nofollow"},e.page)))},m=13,g=38,v=40,b=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(){var e;Object(o.a)(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))).state={goInputText:""},e.buildOptionText=function(t){return"".concat(t," ").concat(e.props.locale.items_per_page)},e.changeSize=function(t){e.props.changeSize(Number(t))},e.handleChange=function(t){e.setState({goInputText:t.target.value})},e.handleBlur=function(t){var n=e.props,r=n.goButton,i=n.quickGo,a=n.rootPrefixCls,o=e.state.goInputText;r||""===o||t.relatedTarget&&(t.relatedTarget.className.indexOf("".concat(a,"-prev"))>=0||t.relatedTarget.className.indexOf("".concat(a,"-next"))>=0)||(e.setState({goInputText:""}),i(e.getValidValue()))},e.go=function(t){""!==e.state.goInputText&&(t.keyCode!==m&&"click"!==t.type||(e.setState({goInputText:""}),e.props.quickGo(e.getValidValue())))},e}return Object(s.a)(n,[{key:"getValidValue",value:function(){var e=this.state,t=e.goInputText,n=e.current;return!t||isNaN(t)?n:Number(t)}},{key:"getPageSizeOptions",value:function(){var e=this.props,t=e.pageSize,n=e.pageSizeOptions;return n.some((function(e){return e.toString()===t.toString()}))?n:n.concat([t.toString()]).sort((function(e,t){return(isNaN(Number(e))?0:Number(e))-(isNaN(Number(t))?0:Number(t))}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.pageSize,r=t.locale,i=t.rootPrefixCls,a=t.changeSize,o=t.quickGo,s=t.goButton,l=t.selectComponentClass,c=t.buildOptionText,u=t.selectPrefixCls,h=t.disabled,f=this.state.goInputText,p="".concat(i,"-options"),m=l,g=null,v=null,b=null;if(!a&&!o)return null;var y=this.getPageSizeOptions();if(a&&m){var E=y.map((function(t,n){return d.a.createElement(m.Option,{key:n,value:t.toString()},(c||e.buildOptionText)(t))}));g=d.a.createElement(m,{disabled:h,prefixCls:u,showSearch:!1,className:"".concat(p,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(n||y[0]).toString(),onChange:this.changeSize,getPopupContainer:function(e){return e.parentNode}},E)}return o&&(s&&(b="boolean"==typeof s?d.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:h,className:"".concat(p,"-quick-jumper-button")},r.jump_to_confirm):d.a.createElement("span",{onClick:this.go,onKeyUp:this.go},s)),v=d.a.createElement("div",{className:"".concat(p,"-quick-jumper")},r.jump_to,d.a.createElement("input",{disabled:h,type:"text",value:f,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),r.page,b)),d.a.createElement("li",{className:"".concat(p)},g,v)}}]),n}(d.a.Component);b.defaultProps={pageSizeOptions:["10","20","50","100"]};var y=b,E=n("N2Kk");function x(){}function _(e,t,n){var r=void 0===e?t.pageSize:e;return Math.floor((n.total-1)/r)+1}var k=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(o.a)(this,n),(r=t.call(this,e)).getJumpPrevPage=function(){return Math.max(1,r.state.current-(r.props.showLessItems?3:5))},r.getJumpNextPage=function(){return Math.min(_(void 0,r.state,r.props),r.state.current+(r.props.showLessItems?3:5))},r.getItemIcon=function(e,t){var n=r.props.prefixCls,i=e||d.a.createElement("button",{type:"button","aria-label":t,className:"".concat(n,"-item-link")});return"function"==typeof e&&(i=d.a.createElement(e,Object(a.a)({},r.props))),i},r.savePaginationNode=function(e){r.paginationNode=e},r.isValid=function(e){return"number"==typeof(t=e)&&isFinite(t)&&Math.floor(t)===t&&e!==r.state.current;var t},r.shouldDisplayQuickJumper=function(){var e=r.props,t=e.showQuickJumper,n=e.pageSize;return!(e.total<=n)&&t},r.handleKeyDown=function(e){e.keyCode!==g&&e.keyCode!==v||e.preventDefault()},r.handleKeyUp=function(e){var t=r.getValidValue(e);t!==r.state.currentInputValue&&r.setState({currentInputValue:t}),e.keyCode===m?r.handleChange(t):e.keyCode===g?r.handleChange(t-1):e.keyCode===v&&r.handleChange(t+1)},r.changePageSize=function(e){var t=r.state.current,n=_(e,r.state,r.props);t=t>n?n:t,0===n&&(t=r.state.current),"number"==typeof e&&("pageSize"in r.props||r.setState({pageSize:e}),"current"in r.props||r.setState({current:t,currentInputValue:t})),r.props.onShowSizeChange(t,e),"onChange"in r.props&&r.props.onChange&&r.props.onChange(t,e)},r.handleChange=function(e){var t=r.props.disabled,n=e;if(r.isValid(n)&&!t){var i=_(void 0,r.state,r.props);n>i?n=i:n<1&&(n=1),"current"in r.props||r.setState({current:n,currentInputValue:n});var a=r.state.pageSize;return r.props.onChange(n,a),n}return r.state.current},r.prev=function(){r.hasPrev()&&r.handleChange(r.state.current-1)},r.next=function(){r.hasNext()&&r.handleChange(r.state.current+1)},r.jumpPrev=function(){r.handleChange(r.getJumpPrevPage())},r.jumpNext=function(){r.handleChange(r.getJumpNextPage())},r.hasPrev=function(){return r.state.current>1},r.hasNext=function(){return r.state.current<_(void 0,r.state,r.props)},r.runIfEnter=function(e,t){if("Enter"===e.key||13===e.charCode){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];t.apply(void 0,r)}},r.runIfEnterPrev=function(e){r.runIfEnter(e,r.prev)},r.runIfEnterNext=function(e){r.runIfEnter(e,r.next)},r.runIfEnterJumpPrev=function(e){r.runIfEnter(e,r.jumpPrev)},r.runIfEnterJumpNext=function(e){r.runIfEnter(e,r.jumpNext)},r.handleGoTO=function(e){e.keyCode!==m&&"click"!==e.type||r.handleChange(r.state.currentInputValue)};var i=e.onChange!==x;"current"in e&&!i&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var s=e.defaultCurrent;"current"in e&&(s=e.current);var l=e.defaultPageSize;return"pageSize"in e&&(l=e.pageSize),s=Math.min(s,_(l,void 0,e)),r.state={current:s,currentInputValue:s,pageSize:l},r}return Object(s.a)(n,[{key:"componentDidUpdate",value:function(e,t){var n=this.props.prefixCls;if(t.current!==this.state.current&&this.paginationNode){var r=this.paginationNode.querySelector(".".concat(n,"-item-").concat(t.current));r&&document.activeElement===r&&r.blur()}}},{key:"getValidValue",value:function(e){var t=e.target.value,n=_(void 0,this.state,this.props),r=this.state.currentInputValue;return""===t?t:isNaN(Number(t))?r:t>=n?n:Number(t)}},{key:"getShowSizeChanger",value:function(){var e=this.props,t=e.showSizeChanger,n=e.total,r=e.totalBoundaryShowSizeChanger;return void 0!==t?t:n>r}},{key:"renderPrev",value:function(e){var t=this.props,n=t.prevIcon,r=(0,t.itemRender)(e,"prev",this.getItemIcon(n,"prev page")),i=!this.hasPrev();return Object(u.isValidElement)(r)?Object(u.cloneElement)(r,{disabled:i}):r}},{key:"renderNext",value:function(e){var t=this.props,n=t.nextIcon,r=(0,t.itemRender)(e,"next",this.getItemIcon(n,"next page")),i=!this.hasNext();return Object(u.isValidElement)(r)?Object(u.cloneElement)(r,{disabled:i}):r}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,a=t.className,o=t.style,s=t.disabled,l=t.hideOnSinglePage,c=t.total,h=t.locale,m=t.showQuickJumper,g=t.showLessItems,v=t.showTitle,b=t.showTotal,E=t.simple,x=t.itemRender,k=t.showPrevNextJumpers,w=t.jumpPrevIcon,C=t.jumpNextIcon,S=t.selectComponentClass,O=t.selectPrefixCls,A=t.pageSizeOptions,T=this.state,I=T.current,D=T.pageSize,L=T.currentInputValue;if(!0===l&&c<=D)return null;var R=_(void 0,this.state,this.props),N=[],j=null,M=null,P=null,B=null,F=null,U=m&&m.goButton,H=g?1:2,z=I-1>0?I-1:0,G=I+1<R?I+1:R,V=Object.keys(this.props).reduce((function(t,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)&&"role"!==n||(t[n]=e.props[n]),t}),{});if(E)return U&&(F="boolean"==typeof U?d.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},h.jump_to_confirm):d.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},U),F=d.a.createElement("li",{title:v?"".concat(h.jump_to).concat(I,"/").concat(R):null,className:"".concat(n,"-simple-pager")},F)),d.a.createElement("ul",Object(r.a)({className:f()(n,"".concat(n,"-simple"),Object(i.a)({},"".concat(n,"-disabled"),s),a),style:o,ref:this.savePaginationNode},V),d.a.createElement("li",{title:v?h.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:f()("".concat(n,"-prev"),Object(i.a)({},"".concat(n,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(z)),d.a.createElement("li",{title:v?"".concat(I,"/").concat(R):null,className:"".concat(n,"-simple-pager")},d.a.createElement("input",{type:"text",value:L,disabled:s,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),d.a.createElement("span",{className:"".concat(n,"-slash")},"/"),R),d.a.createElement("li",{title:v?h.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:f()("".concat(n,"-next"),Object(i.a)({},"".concat(n,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(G)),F);if(R<=3+2*H){var W={locale:h,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:v,itemRender:x};R||N.push(d.a.createElement(p,Object(r.a)({},W,{key:"noPager",page:R,className:"".concat(n,"-disabled")})));for(var K=1;K<=R;K+=1){var q=I===K;N.push(d.a.createElement(p,Object(r.a)({},W,{key:K,page:K,active:q})))}}else{var Y=g?h.prev_3:h.prev_5,Q=g?h.next_3:h.next_5;k&&(j=d.a.createElement("li",{title:v?Y:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:f()("".concat(n,"-jump-prev"),Object(i.a)({},"".concat(n,"-jump-prev-custom-icon"),!!w))},x(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(w,"prev page"))),M=d.a.createElement("li",{title:v?Q:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:f()("".concat(n,"-jump-next"),Object(i.a)({},"".concat(n,"-jump-next-custom-icon"),!!C))},x(this.getJumpNextPage(),"jump-next",this.getItemIcon(C,"next page")))),B=d.a.createElement(p,{locale:h,last:!0,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:R,page:R,active:!1,showTitle:v,itemRender:x}),P=d.a.createElement(p,{locale:h,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:v,itemRender:x});var J=Math.max(1,I-H),X=Math.min(I+H,R);I-1<=H&&(X=1+2*H),R-I<=H&&(J=R-2*H);for(var Z=J;Z<=X;Z+=1){var $=I===Z;N.push(d.a.createElement(p,{locale:h,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Z,page:Z,active:$,showTitle:v,itemRender:x}))}I-1>=2*H&&3!==I&&(N[0]=Object(u.cloneElement)(N[0],{className:"".concat(n,"-item-after-jump-prev")}),N.unshift(j)),R-I>=2*H&&I!==R-2&&(N[N.length-1]=Object(u.cloneElement)(N[N.length-1],{className:"".concat(n,"-item-before-jump-next")}),N.push(M)),1!==J&&N.unshift(P),X!==R&&N.push(B)}var ee=null;b&&(ee=d.a.createElement("li",{className:"".concat(n,"-total-text")},b(c,[0===c?0:(I-1)*D+1,I*D>c?c:I*D])));var te=!this.hasPrev()||!R,ne=!this.hasNext()||!R;return d.a.createElement("ul",Object(r.a)({className:f()(n,a,Object(i.a)({},"".concat(n,"-disabled"),s)),style:o,unselectable:"unselectable",ref:this.savePaginationNode},V),ee,d.a.createElement("li",{title:v?h.prev_page:null,onClick:this.prev,tabIndex:te?null:0,onKeyPress:this.runIfEnterPrev,className:f()("".concat(n,"-prev"),Object(i.a)({},"".concat(n,"-disabled"),te)),"aria-disabled":te},this.renderPrev(z)),N,d.a.createElement("li",{title:v?h.next_page:null,onClick:this.next,tabIndex:ne?null:0,onKeyPress:this.runIfEnterNext,className:f()("".concat(n,"-next"),Object(i.a)({},"".concat(n,"-disabled"),ne)),"aria-disabled":ne},this.renderNext(G)),d.a.createElement(y,{disabled:s,locale:h,rootPrefixCls:n,selectComponentClass:S,selectPrefixCls:O,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:I,pageSize:D,pageSizeOptions:A,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:U}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n={};if("current"in e&&(n.current=e.current,e.current!==t.current&&(n.currentInputValue=n.current)),"pageSize"in e&&e.pageSize!==t.pageSize){var r=t.current,i=_(e.pageSize,t,e);r=r>i?i:r,"current"in e||(n.current=r,n.currentInputValue=r),n.pageSize=e.pageSize}return n}}]),n}(d.a.Component);k.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:x,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:x,locale:E.a,style:{},itemRender:function(e,t,n){return n},totalBoundaryShowSizeChanger:50};var w=k},"6GrX":
|
|
|
/*!**************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/contain/text.js ***!
|
|
|
\**************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/BoundingRect */"mFDi"),i=n(/*! ../graphic/helper/image */"Xnb7"),a=n(/*! ../core/util */"bYtY"),o=a.getContext,s=a.extend,l=a.retrieve2,c=a.retrieve3,u=a.trim,d={},h=0,f=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,p={};function m(e,t){var n=e+":"+(t=t||"12px sans-serif");if(d[n])return d[n];for(var r=(e+"").split("\n"),i=0,a=0,o=r.length;a<o;a++)i=Math.max(w(r[a],t).width,i);return h>5e3&&(h=0,d={}),h++,d[n]=i,i}function g(e,t,n){return"right"===n?e-=t:"center"===n&&(e-=t/2),e}function v(e,t,n){return"middle"===n?e-=t/2:"bottom"===n&&(e-=t),e}function b(e,t,n){var r=t.textPosition,i=t.textDistance,a=n.x,o=n.y;i=i||0;var s=n.height,l=n.width,c=s/2,u="left",d="top";switch(r){case"left":a-=i,o+=c,u="right",d="middle";break;case"right":a+=i+l,o+=c,d="middle";break;case"top":a+=l/2,o-=i,u="center",d="bottom";break;case"bottom":a+=l/2,o+=s+i,u="center";break;case"inside":a+=l/2,o+=c,u="center",d="middle";break;case"insideLeft":a+=i,o+=c,d="middle";break;case"insideRight":a+=l-i,o+=c,u="right",d="middle";break;case"insideTop":a+=l/2,o+=i,u="center";break;case"insideBottom":a+=l/2,o+=s-i,u="center",d="bottom";break;case"insideTopLeft":a+=i,o+=i;break;case"insideTopRight":a+=l-i,o+=i,u="right";break;case"insideBottomLeft":a+=i,o+=s-i,d="bottom";break;case"insideBottomRight":a+=l-i,o+=s-i,u="right",d="bottom"}return(e=e||{}).x=a,e.y=o,e.textAlign=u,e.textVerticalAlign=d,e}function y(e,t,n,r,i){if(!t)return"";var a=(e+"").split("\n");i=E(t,n,r,i);for(var o=0,s=a.length;o<s;o++)a[o]=x(a[o],i);return a.join("\n")}function E(e,t,n,r){(r=s({},r)).font=t;n=l(n,"...");r.maxIterations=l(r.maxIterations,2);var i=r.minChar=l(r.minChar,0);r.cnCharWidth=m("国",t);var a=r.ascCharWidth=m("a",t);r.placeholder=l(r.placeholder,"");for(var o=e=Math.max(0,e-1),c=0;c<i&&o>=a;c++)o-=a;var u=m(n,t);return u>o&&(n="",u=0),o=e-u,r.ellipsis=n,r.ellipsisWidth=u,r.contentWidth=o,r.containerWidth=e,r}function x(e,t){var n=t.containerWidth,r=t.font,i=t.contentWidth;if(!n)return"";var a=m(e,r);if(a<=n)return e;for(var o=0;;o++){if(a<=i||o>=t.maxIterations){e+=t.ellipsis;break}var s=0===o?_(e,i,t.ascCharWidth,t.cnCharWidth):a>0?Math.floor(e.length*i/a):0;a=m(e=e.substr(0,s),r)}return""===e&&(e=t.placeholder),e}function _(e,t,n,r){for(var i=0,a=0,o=e.length;a<o&&i<t;a++){var s=e.charCodeAt(a);i+=0<=s&&s<=127?n:r}return a}function k(e){return m("国",e)}function w(e,t){return p.measureText(e,t)}function C(e,t,n,r,i){null!=e&&(e+="");var a=l(r,k(t)),o=e?e.split("\n"):[],s=o.length*a,c=s,u=!0;if(n&&(c+=n[0]+n[2]),e&&i){u=!1;var d=i.outerHeight,h=i.outerWidth;if(null!=d&&c>d)e="",o=[];else if(null!=h)for(var f=E(h-(n?n[1]+n[3]:0),t,i.ellipsis,{minChar:i.minChar,placeholder:i.placeholder}),p=0,m=o.length;p<m;p++)o[p]=x(o[p],f)}return{lines:o,height:s,outerHeight:c,lineHeight:a,canCacheByTextString:u}}function S(e,t){var n={lines:[],width:0,height:0};if(null!=e&&(e+=""),!e)return n;for(var r,a=f.lastIndex=0;null!=(r=f.exec(e));){var o=r.index;o>a&&O(n,e.substring(a,o)),O(n,r[2],r[1]),a=f.lastIndex}a<e.length&&O(n,e.substring(a,e.length));var s=n.lines,u=0,d=0,h=[],p=t.textPadding,g=t.truncate,v=g&&g.outerWidth,b=g&&g.outerHeight;p&&(null!=v&&(v-=p[1]+p[3]),null!=b&&(b-=p[0]+p[2]));for(var E=0;E<s.length;E++){for(var x=s[E],_=0,w=0,C=0;C<x.tokens.length;C++){var S=(P=x.tokens[C]).styleName&&t.rich[P.styleName]||{},A=P.textPadding=S.textPadding,T=P.font=S.font||t.font,I=P.textHeight=l(S.textHeight,k(T));if(A&&(I+=A[0]+A[2]),P.height=I,P.lineHeight=c(S.textLineHeight,t.textLineHeight,I),P.textAlign=S&&S.textAlign||t.textAlign,P.textVerticalAlign=S&&S.textVerticalAlign||"middle",null!=b&&u+P.lineHeight>b)return{lines:[],width:0,height:0};P.textWidth=m(P.text,T);var D=S.textWidth,L=null==D||"auto"===D;if("string"==typeof D&&"%"===D.charAt(D.length-1))P.percentWidth=D,h.push(P),D=0;else{if(L){D=P.textWidth;var R=S.textBackgroundColor,N=R&&R.image;N&&(N=i.findExistImage(N),i.isImageReady(N)&&(D=Math.max(D,N.width*I/N.height)))}var j=A?A[1]+A[3]:0;D+=j;var M=null!=v?v-w:null;null!=M&&M<D&&(!L||M<j?(P.text="",P.textWidth=D=0):(P.text=y(P.text,M-j,T,g.ellipsis,{minChar:g.minChar}),P.textWidth=m(P.text,T),D=P.textWidth+j))}w+=P.width=D,S&&(_=Math.max(_,P.lineHeight))}x.width=w,x.lineHeight=_,u+=_,d=Math.max(d,w)}n.outerWidth=n.width=l(t.textWidth,d),n.outerHeight=n.height=l(t.textHeight,u),p&&(n.outerWidth+=p[1]+p[3],n.outerHeight+=p[0]+p[2]);for(E=0;E<h.length;E++){var P,B=(P=h[E]).percentWidth;P.width=parseInt(B,10)/100*d}return n}function O(e,t,n){for(var r=""===t,i=t.split("\n"),a=e.lines,o=0;o<i.length;o++){var s=i[o],l={styleName:n,text:s,isLineHolder:!s&&!r};if(o)a.push({tokens:[l]});else{var c=(a[a.length-1]||(a[0]={tokens:[]})).tokens,u=c.length;1===u&&c[0].isLineHolder?c[0]=l:(s||!u||r)&&c.push(l)}}}p.measureText=function(e,t){var n=o();return n.font=t||"12px sans-serif",n.measureText(e)},t.DEFAULT_FONT="12px sans-serif",t.$override=function(e,t){p[e]=t},t.getWidth=m,t.getBoundingRect=function(e,t,n,i,a,o,s,l){return s?function(e,t,n,i,a,o,s,l){var c=S(e,{rich:s,truncate:l,font:t,textAlign:n,textPadding:a,textLineHeight:o}),u=c.outerWidth,d=c.outerHeight,h=g(0,u,n),f=v(0,d,i);return new r(h,f,u,d)}(e,t,n,i,a,o,s,l):function(e,t,n,i,a,o,s){var l=C(e,t,a,o,s),c=m(e,t);a&&(c+=a[1]+a[3]);var u=l.outerHeight,d=g(0,c,n),h=v(0,u,i),f=new r(d,h,c,u);return f.lineHeight=l.lineHeight,f}(e,t,n,i,a,o,l)},t.adjustTextX=g,t.adjustTextY=v,t.calculateTextPosition=b,t.adjustTextPositionOnRect=function(e,t,n){return b({},{textPosition:e,textDistance:n},t)},t.truncateText=y,t.getLineHeight=k,t.measureText=w,t.parsePlainText=C,t.parseRichText=S,t.makeFont=function(e){var t=(e.fontSize||e.fontFamily)&&[e.fontStyle,e.fontWeight,(e.fontSize||12)+"px",e.fontFamily||"sans-serif"].join(" ");return t&&u(t)||e.textFont||e.font}},"6K3P":
|
|
|
/*!********************************************!*\
|
|
|
!*** ./src/assets/images/paper/jinshi.svg ***!
|
|
|
\********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/jinshi.9b74f304.svg"},"6RRn":
|
|
|
/*!*******************************************!*\
|
|
|
!*** ./node_modules/rc-table/es/index.js ***!
|
|
|
\*******************************************/
|
|
|
/*! exports provided: Summary, Column, ColumnGroup, INTERNAL_COL_DEFINE, default */
|
|
|
/*! exports used: INTERNAL_COL_DEFINE, Summary, default */function(e,t,n){"use strict";var r=n(/*! ./Table */"wCXF"),i=n(/*! ./Footer */"n6Qo");n.d(t,"b",(function(){return i.a}));n(/*! ./sugar/Column */"IBYe"),n(/*! ./sugar/ColumnGroup */"6eGT");var a=n(/*! ./utils/legacyUtil */"hW8S");n.d(t,"a",(function(){return a.a})),t.c=r.b},"6eGT":
|
|
|
/*!*******************************************************!*\
|
|
|
!*** ./node_modules/rc-table/es/sugar/ColumnGroup.js ***!
|
|
|
\*******************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";t.a=function(e){return null}},"6fms":
|
|
|
/*!*************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/vml/Painter.js ***!
|
|
|
\*************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/log */"SUKs"),i=n(/*! ./core */"06Qe"),a=n(/*! ../core/util */"bYtY").each;function o(e){return parseInt(e,10)}function s(e,t){i.initVML(),this.root=e,this.storage=t;var n=document.createElement("div"),r=document.createElement("div");n.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",r.style.cssText="position:absolute;left:0;top:0;",e.appendChild(n),this._vmlRoot=r,this._vmlViewport=n,this.resize();var a=t.delFromStorage,o=t.addToStorage;t.delFromStorage=function(e){a.call(t,e),e&&e.onRemove&&e.onRemove(r)},t.addToStorage=function(e){e.onAdd&&e.onAdd(r),o.call(t,e)},this._firstPaint=!0}s.prototype={constructor:s,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(){var e=this.storage.getDisplayList(!0,!0);this._paintList(e)},_paintList:function(e){for(var t=this._vmlRoot,n=0;n<e.length;n++){var r=e[n];r.invisible||r.ignore?(r.__alreadyNotVisible||r.onRemove(t),r.__alreadyNotVisible=!0):(r.__alreadyNotVisible&&r.onAdd(t),r.__alreadyNotVisible=!1,r.__dirty&&(r.beforeBrush&&r.beforeBrush(),(r.brushVML||r.brush).call(r,t),r.afterBrush&&r.afterBrush())),r.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(t),this._firstPaint=!1)},resize:function(e,t){e=null==e?this._getWidth():e,t=null==t?this._getHeight():t;if(this._width!==e||this._height!==t){this._width=e,this._height=t;var n=this._vmlViewport.style;n.width=e+"px",n.height=t+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var e=this.root,t=e.currentStyle;return(e.clientWidth||o(t.width))-o(t.paddingLeft)-o(t.paddingRight)|0},_getHeight:function(){var e=this.root,t=e.currentStyle;return(e.clientHeight||o(t.height))-o(t.paddingTop)-o(t.paddingBottom)|0}},a(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],(function(e){var t;s.prototype[e]=(t=e,function(){r('In IE8.0 VML mode painter not support method "'+t+'"')})}));var l=s;e.exports=l},"7Cbv":
|
|
|
/*!**************************************************************!*\
|
|
|
!*** ./node_modules/uuid/dist/esm-browser/v4.js + 4 modules ***!
|
|
|
\**************************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),i=new Uint8Array(16);function a(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}var o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var s=function(e){return"string"==typeof e&&o.test(e)},l=[],c=0;c<256;++c)l.push((c+256).toString(16).substr(1));var u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n};t.a=function(e,t,n){var r=(e=e||{}).random||(e.rng||a)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return u(r)}},"7SHv":
|
|
|
/*!*********************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/Painter.js ***!
|
|
|
\*********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./config */"LPTA").devicePixelRatio,i=n(/*! ./core/util */"bYtY"),a=n(/*! ./core/log */"SUKs"),o=n(/*! ./core/BoundingRect */"mFDi"),s=n(/*! ./core/timsort */"BPZU"),l=n(/*! ./Layer */"Xmg4"),c=n(/*! ./animation/requestAnimationFrame */"mLcG"),u=n(/*! ./graphic/Image */"Dagg"),d=n(/*! ./core/env */"ItGF");function h(e){return parseInt(e,10)}var f=new o(0,0,0,0),p=new o(0,0,0,0);var m=function(e,t,n){this.type="canvas";var a=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=n=i.extend({},n||{}),this.dpr=n.devicePixelRatio||r,this._singleCanvas=a,this.root=e;var o=e.style;o&&(o["-webkit-tap-highlight-color"]="transparent",o["-webkit-user-select"]=o["user-select"]=o["-webkit-touch-callout"]="none",e.innerHTML=""),this.storage=t;var s=this._zlevelList=[],c=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,a){var u=e.width,d=e.height;null!=n.width&&(u=n.width),null!=n.height&&(d=n.height),this.dpr=n.devicePixelRatio||1,e.width=u*this.dpr,e.height=d*this.dpr,this._width=u,this._height=d;var h=new l(e,this,this.dpr);h.__builtin__=!0,h.initContext(),c[314159]=h,h.zlevel=314159,s.push(314159),this._domRoot=e}else{this._width=this._getSize(0),this._height=this._getSize(1);var f=this._domRoot=function(e,t){var n=document.createElement("div");return n.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}(this._width,this._height);e.appendChild(f)}this._hoverlayer=null,this._hoverElements=[]};m.prototype={constructor:m,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(e){var t=this.storage.getDisplayList(!0),n=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,e,this._redrawId);for(var r=0;r<n.length;r++){var i=n[r],a=this._layers[i];if(!a.__builtin__&&a.refresh){var o=0===r?this._backgroundColor:null;a.refresh(o)}}return this.refreshHover(),this},addHover:function(e,t){if(!e.__hoverMir){var n=new e.constructor({style:e.style,shape:e.shape,z:e.z,z2:e.z2,silent:e.silent});return n.__from=e,e.__hoverMir=n,t&&n.setStyle(t),this._hoverElements.push(n),n}},removeHover:function(e){var t=e.__hoverMir,n=this._hoverElements,r=i.indexOf(n,t);r>=0&&n.splice(r,1),e.__hoverMir=null},clearHover:function(e){for(var t=this._hoverElements,n=0;n<t.length;n++){var r=t[n].__from;r&&(r.__hoverMir=null)}t.length=0},refreshHover:function(){var e=this._hoverElements,t=e.length,n=this._hoverlayer;if(n&&n.clear(),t){s(e,this.storage.displayableSortFunc),n||(n=this._hoverlayer=this.getLayer(1e5));var r={};n.ctx.save();for(var i=0;i<t;){var a=e[i],o=a.__from;o&&o.__zr?(i++,o.invisible||(a.transform=o.transform,a.invTransform=o.invTransform,a.__clipPaths=o.__clipPaths,this._doPaintEl(a,n,!0,r))):(e.splice(i,1),o.__hoverMir=null,t--)}n.ctx.restore()}},getHoverLayer:function(){return this.getLayer(1e5)},_paintList:function(e,t,n){if(this._redrawId===n){t=t||!1,this._updateLayerStatus(e);var r=this._doPaintList(e,t);if(this._needsManuallyCompositing&&this._compositeManually(),!r){var i=this;c((function(){i._paintList(e,t,n)}))}}},_compositeManually:function(){var e=this.getLayer(314159).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer((function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)}))},_doPaintList:function(e,t){for(var n=[],r=0;r<this._zlevelList.length;r++){var a=this._zlevelList[r];(l=this._layers[a]).__builtin__&&l!==this._hoverlayer&&(l.__dirty||t)&&n.push(l)}for(var o=!0,s=0;s<n.length;s++){var l,c=(l=n[s]).ctx,u={};c.save();var h=t?l.__startIndex:l.__drawIndex,f=!t&&l.incremental&&Date.now,p=f&&Date.now(),m=l.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(l.__startIndex===l.__endIndex)l.clear(!1,m);else if(h===l.__startIndex){var g=e[h];g.incremental&&g.notClear&&!t||l.clear(!1,m)}-1===h&&(console.error("For some unknown reason. drawIndex is -1"),h=l.__startIndex);for(var v=h;v<l.__endIndex;v++){var b=e[v];if(this._doPaintEl(b,l,t,u),b.__dirty=b.__dirtyText=!1,f)if(Date.now()-p>15)break}l.__drawIndex=v,l.__drawIndex<l.__endIndex&&(o=!1),u.prevElClipPaths&&c.restore(),c.restore()}return d.wxa&&i.each(this._layers,(function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()})),o},_doPaintEl:function(e,t,n,r){var i=t.ctx,a=e.transform;if((t.__dirty||n)&&!e.invisible&&0!==e.style.opacity&&(!a||a[0]||a[3])&&(!e.culling||!function(e,t,n){return f.copy(e.getBoundingRect()),e.transform&&f.applyTransform(e.transform),p.width=t,p.height=n,!f.intersect(p)}(e,this._width,this._height))){var o=e.__clipPaths,s=r.prevElClipPaths;s&&!function(e,t){if(e===t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}(o,s)||(s&&(i.restore(),r.prevElClipPaths=null,r.prevEl=null),o&&(i.save(),function(e,t){for(var n=0;n<e.length;n++){var r=e[n];r.setTransform(t),t.beginPath(),r.buildPath(t,r.shape),t.clip(),r.restoreTransform(t)}}(o,i),r.prevElClipPaths=o)),e.beforeBrush&&e.beforeBrush(i),e.brush(i,r.prevEl||null),r.prevEl=e,e.afterBrush&&e.afterBrush(i)}},getLayer:function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=314159);var n=this._layers[e];return n||((n=new l("zr_"+e,this,this.dpr)).zlevel=e,n.__builtin__=!0,this._layerConfig[e]?i.merge(n,this._layerConfig[e],!0):this._layerConfig[e-.01]&&i.merge(n,this._layerConfig[e-.01],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},insertLayer:function(e,t){var n=this._layers,r=this._zlevelList,i=r.length,o=null,s=-1,l=this._domRoot;if(n[e])a("ZLevel "+e+" has been used already");else if(function(e){return!!e&&(!!e.__builtin__||"function"==typeof e.resize&&"function"==typeof e.refresh)}(t)){if(i>0&&e>r[0]){for(s=0;s<i-1&&!(r[s]<e&&r[s+1]>e);s++);o=n[r[s]]}if(r.splice(s+1,0,e),n[e]=t,!t.virtual)if(o){var c=o.dom;c.nextSibling?l.insertBefore(t.dom,c.nextSibling):l.appendChild(t.dom)}else l.firstChild?l.insertBefore(t.dom,l.firstChild):l.appendChild(t.dom)}else a("Layer of zlevel "+e+" is not valid")},eachLayer:function(e,t){var n,r,i=this._zlevelList;for(r=0;r<i.length;r++)n=i[r],e.call(t,this._layers[n],n)},eachBuiltinLayer:function(e,t){var n,r,i,a=this._zlevelList;for(i=0;i<a.length;i++)r=a[i],(n=this._layers[r]).__builtin__&&e.call(t,n,r)},eachOtherLayer:function(e,t){var n,r,i,a=this._zlevelList;for(i=0;i<a.length;i++)r=a[i],(n=this._layers[r]).__builtin__||e.call(t,n,r)},getLayers:function(){return this._layers},_updateLayerStatus:function(e){function t(e){i&&(i.__endIndex!==e&&(i.__dirty=!0),i.__endIndex=e)}if(this.eachBuiltinLayer((function(e,t){e.__dirty=e.__used=!1})),this._singleCanvas)for(var n=1;n<e.length;n++){if((s=e[n]).zlevel!==e[n-1].zlevel||s.incremental){this._needsManuallyCompositing=!0;break}}var r,i=null,o=0;for(n=0;n<e.length;n++){var s,l,c=(s=e[n]).zlevel;r!==c&&(r=c,o=0),s.incremental?((l=this.getLayer(c+.001,this._needsManuallyCompositing)).incremental=!0,o=1):l=this.getLayer(c+(o>0?.01:0),this._needsManuallyCompositing),l.__builtin__||a("ZLevel "+c+" has been used by unkown layer "+l.id),l!==i&&(l.__used=!0,l.__startIndex!==n&&(l.__dirty=!0),l.__startIndex=n,l.incremental?l.__drawIndex=-1:l.__drawIndex=n,t(n),i=l),s.__dirty&&(l.__dirty=!0,l.incremental&&l.__drawIndex<0&&(l.__drawIndex=n))}t(n),this.eachBuiltinLayer((function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)}))},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(e){e.clear()},setBackgroundColor:function(e){this._backgroundColor=e},configLayer:function(e,t){if(t){var n=this._layerConfig;n[e]?i.merge(n[e],t,!0):n[e]=t;for(var r=0;r<this._zlevelList.length;r++){var a=this._zlevelList[r];if(a===e||a===e+.01){var o=this._layers[a];i.merge(o,n[e],!0)}}}},delLayer:function(e){var t=this._layers,n=this._zlevelList,r=t[e];r&&(r.dom.parentNode.removeChild(r.dom),delete t[e],n.splice(i.indexOf(n,e),1))},resize:function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var r=this._opts;if(null!=e&&(r.width=e),null!=t&&(r.height=t),e=this._getSize(0),t=this._getSize(1),n.style.display="",this._width!==e||t!==this._height){for(var a in n.style.width=e+"px",n.style.height=t+"px",this._layers)this._layers.hasOwnProperty(a)&&this._layers[a].resize(e,t);i.each(this._progressiveLayers,(function(n){n.resize(e,t)})),this.refresh(!0)}this._width=e,this._height=t}else{if(null==e||null==t)return;this._width=e,this._height=t,this.getLayer(314159).resize(e,t)}return this},clearLayer:function(e){var t=this._layers[e];t&&t.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var t=new l("image",this,e.pixelRatio||this.dpr);if(t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor),e.pixelRatio<=this.dpr){this.refresh();var n=t.dom.width,r=t.dom.height,i=t.ctx;this.eachLayer((function(e){e.__builtin__?i.drawImage(e.dom,0,0,n,r):e.renderToCanvas&&(t.ctx.save(),e.renderToCanvas(t.ctx),t.ctx.restore())}))}else for(var a={},o=this.storage.getDisplayList(!0),s=0;s<o.length;s++){var c=o[s];this._doPaintEl(c,t,!0,a)}return t.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(e){var t=this._opts,n=["width","height"][e],r=["clientWidth","clientHeight"][e],i=["paddingLeft","paddingTop"][e],a=["paddingRight","paddingBottom"][e];if(null!=t[n]&&"auto"!==t[n])return parseFloat(t[n]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[r]||h(s[n])||h(o.style[n]))-(h(s[i])||0)-(h(s[a])||0)|0},pathToImage:function(e,t){t=t||this.dpr;var n=document.createElement("canvas"),r=n.getContext("2d"),i=e.getBoundingRect(),a=e.style,o=a.shadowBlur*t,s=a.shadowOffsetX*t,l=a.shadowOffsetY*t,c=a.hasStroke()?a.lineWidth:0,d=Math.max(c/2,-s+o),h=Math.max(c/2,s+o),f=Math.max(c/2,-l+o),p=Math.max(c/2,l+o),m=i.width+d+h,g=i.height+f+p;n.width=m*t,n.height=g*t,r.scale(t,t),r.clearRect(0,0,m,g),r.dpr=t;var v={position:e.position,rotation:e.rotation,scale:e.scale};e.position=[d-i.x,f-i.y],e.rotation=0,e.scale=[1,1],e.updateTransform(),e&&e.brush(r);var b=new u({style:{x:0,y:0,image:n}});return null!=v.position&&(b.position=e.position=v.position),null!=v.rotation&&(b.rotation=e.rotation=v.rotation),null!=v.scale&&(b.scale=e.scale=v.scale),b}};var g=m;e.exports=g},"7ZXX":
|
|
|
/*!**********************************************!*\
|
|
|
!*** ./src/assets/images/classrooms/err.png ***!
|
|
|
\**********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/err.6e7c5817.png"},"7ahc":
|
|
|
/*!*************************************************************!*\
|
|
|
!*** ./src/components/markdown-editor/code-block/index.tsx ***!
|
|
|
\*************************************************************/
|
|
|
/*! exports provided: default, MyCodeMirror */
|
|
|
/*! exports used: MyCodeMirror, default */function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */"0Owb"),a=(n(/*! antd/es/button/style */"+L6B"),n(/*! antd/es/button */"2/Rp")),o=(n(/*! antd/es/form/style */"y8nQ"),n(/*! antd/es/form */"Vl3Y")),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=(n(/*! antd/es/select/style */"OaEy"),n(/*! antd/es/select */"2fM7")),c=n(/*! react */"q1tI"),u=n.n(c),d=n(/*! codemirror */"VrN/"),h=n.n(d),f=(n(/*! codemirror/lib/codemirror.css */"p77/"),n(/*! codemirror/theme/blackboard.css */"c5Ni"),l.a.Option),p={labelCol:{span:4},wrapperCol:{span:20}},m={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};function g(e){var t=e.value,n=e.onChange,i=e.mode,a=e.options,o=void 0===a?{}:a,l=Object(c.useRef)(),d=Object(c.useState)(),f=Object(s.a)(d,2),p=f[0],m=f[1];return Object(c.useEffect)((function(){if(p){function e(e){var t=e.getValue();n&&n(t)}return p.on("change",e),function(){p.off("change",e)}}}),[p,n]),Object(c.useEffect)((function(){p&&p.setOption("mode",i)}),[p,i]),Object(c.useEffect)((function(){p&&(t===p.getValue()&&""!==t||setTimeout((function(){p.setValue(t||" ")}),300))}),[p,t]),Object(c.useEffect)((function(){if(l.current&&!p){var e=h.a.fromTextArea(l.current,Object(r.a)({mode:i,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},o));m(e)}}),[l.current,p]),u.a.createElement("div",{className:"my-codemirror-container"},u.a.createElement("textarea",{ref:l}))}t.b=function(e){var t=e.callback,n=e.onCancel,r=Object(c.useState)("python"),d=Object(s.a)(r,2),h=d[0],v=d[1];return u.a.createElement(o.a,Object(i.a)({},p,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(e){t(e)}}),u.a.createElement(o.a.Item,{label:"代码语言",name:"language"},u.a.createElement(l.a,{onChange:function(e){v(m[e][1])}},Object.keys(m).map((function(e){return u.a.createElement(f,{key:e,value:e},m[e][0])})))),u.a.createElement(o.a.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}]},u.a.createElement(g,{mode:h})),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(a.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),u.a.createElement(a.a,{type:"ghost",onClick:n},"取消")))}},"7ixt":
|
|
|
/*!**************************************************!*\
|
|
|
!*** ./node_modules/rc-tooltip/es/placements.js ***!
|
|
|
\**************************************************/
|
|
|
/*! exports provided: placements, default */
|
|
|
/*! exports used: placements */function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r={adjustX:1,adjustY:1},i=[0,0],a={left:{points:["cr","cl"],overflow:r,offset:[-4,0],targetOffset:i},right:{points:["cl","cr"],overflow:r,offset:[4,0],targetOffset:i},top:{points:["bc","tc"],overflow:r,offset:[0,-4],targetOffset:i},bottom:{points:["tc","bc"],overflow:r,offset:[0,4],targetOffset:i},topLeft:{points:["bl","tl"],overflow:r,offset:[0,-4],targetOffset:i},leftTop:{points:["tr","tl"],overflow:r,offset:[-4,0],targetOffset:i},topRight:{points:["br","tr"],overflow:r,offset:[0,-4],targetOffset:i},rightTop:{points:["tl","tr"],overflow:r,offset:[4,0],targetOffset:i},bottomRight:{points:["tr","br"],overflow:r,offset:[0,4],targetOffset:i},rightBottom:{points:["bl","br"],overflow:r,offset:[4,0],targetOffset:i},bottomLeft:{points:["tl","bl"],overflow:r,offset:[0,4],targetOffset:i},leftBottom:{points:["br","bl"],overflow:r,offset:[-4,0],targetOffset:i}}},"7oTu":
|
|
|
/*!********************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/tool/transformPath.js ***!
|
|
|
\********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/PathProxy */"IMiH"),i=n(/*! ../core/vector */"QBsz").applyTransform,a=r.CMD,o=[[],[],[]],s=Math.sqrt,l=Math.atan2;e.exports=function(e,t){var n,r,c,u,d,h=e.data,f=a.M,p=a.C,m=a.L,g=a.R,v=a.A,b=a.Q;for(c=0,u=0;c<h.length;){switch(n=h[c++],u=c,r=0,n){case f:case m:r=1;break;case p:r=3;break;case b:r=2;break;case v:var y=t[4],E=t[5],x=s(t[0]*t[0]+t[1]*t[1]),_=s(t[2]*t[2]+t[3]*t[3]),k=l(-t[1]/_,t[0]/x);h[c]*=x,h[c++]+=y,h[c]*=_,h[c++]+=E,h[c++]*=x,h[c++]*=_,h[c++]+=k,h[c++]+=k,u=c+=2;break;case g:w[0]=h[c++],w[1]=h[c++],i(w,w,t),h[u++]=w[0],h[u++]=w[1],w[0]+=h[c++],w[1]+=h[c++],i(w,w,t),h[u++]=w[0],h[u++]=w[1]}for(d=0;d<r;d++){var w;(w=o[d])[0]=h[c++],w[1]=h[c++],i(w,w,t),h[u++]=w[0],h[u++]=w[1]}}}},"7qnI":
|
|
|
/*!********************************************************!*\
|
|
|
!*** ./src/components/Editor/NullChildEditor/index.js ***!
|
|
|
\********************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/tooltip/style */"5Dmo");var r=n(/*! antd/es/tooltip */"3S7+"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass */"mtLc"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),l=(n(/*! antd/es/input/style */"5NDa"),n(/*! antd/es/input */"5rEg")),c=n(/*! react */"q1tI"),u=n.n(c),d=n(/*! ./index.less?modules */"O2Wb"),h=n.n(d),f=l.a.TextArea,p=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.index,i=t.onAnswerChange,a=t.addChildAnswer,o=t.exerciseIsPublish,s=t.answers,l=t.activeOptionErrorIndex,c=t.flex,d=void 0===c?"0 0 1000px":c;return u.a.createElement("div",{className:h.a.flex},u.a.createElement("div",{className:"".concat(h.a.color666," mb5 mt6"),style:{flex:"0 0 90px"}},"答案(填空",n+1,"):"),u.a.createElement("div",{className:"".concat(h.a.flex," ").concat(h.a.flex1),style:{flexDirection:"column"}},s.map((function(t,c){var p="".concat(n,"-").concat(c);return u.a.createElement("div",{className:"".concat(h.a.flex," ").concat(h.a.flex1),key:c},u.a.createElement("div",{className:h.a.flex1,style:{flex:d}},u.a.createElement("div",null,u.a.createElement(f,{className:p===l?h.a.error:"",spellCheck:!1,rows:4,value:t||"",defaultValue:"请输入参考答案".concat(0==c?"":"(可选)"),onChange:function(e){return i(n,c,e.target.value)},style:{minHeight:95}}))),!o&&u.a.createElement(u.a.Fragment,null,0!=c&&u.a.createElement(r.a,{title:"删除"},u.a.createElement("i",{className:"".concat(h.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return e.props.deleteChildAnswer(n,c)},style:{float:"right"}})),0===c&&u.a.createElement(r.a,{title:"删除"},u.a.createElement("i",{className:"".concat(h.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return e.props.deleteChildAnswermain(n,c)},style:{float:"right"}})),u.a.createElement(r.a,{title:"新增参考答案"},u.a.createElement("i",{className:"".concat(h.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return a(n)},style:{float:"right",visibility:c==s.length-1?"":"hidden"}}))))}))))}}]),n}(c.Component);t.a=p},"7v3h":
|
|
|
/*!**************************************!*\
|
|
|
!*** ./src/assets/images/empty2.png ***!
|
|
|
\**************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/empty2.dd73f390.png"},"8/bI":
|
|
|
/*!*************************************!*\
|
|
|
!*** ./src/assets/images/empty.png ***!
|
|
|
\*************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/empty.8918e228.png"},"815F":
|
|
|
/*!***************************************************!*\
|
|
|
!*** ./node_modules/rc-tree/es/utils/treeUtil.js ***!
|
|
|
\***************************************************/
|
|
|
/*! exports provided: getKey, warningWithoutKey, convertTreeToData, flattenTreeData, traverseDataNodes, convertDataToEntities, getTreeNodeProps, convertNodePropsToEventData */
|
|
|
/*! exports used: convertDataToEntities, convertNodePropsToEventData, convertTreeToData, flattenTreeData, getKey, getTreeNodeProps */function(e,t,n){"use strict";n.d(t,"e",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return d})),n.d(t,"a",(function(){return f})),n.d(t,"f",(function(){return p})),n.d(t,"b",(function(){return m}));var r=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),i=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),a=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),o=n(/*! rc-util/es/Children/toArray */"Zm9Q"),s=n(/*! rc-util/es/warning */"Kwbf"),l=n(/*! ../util */"OZM5");function c(e,t){return null!=e?e:t}function u(e){return function e(t){return Object(o.a)(t).map((function(t){if(!Object(l.i)(t))return Object(s.a)(!t,"Tree/TreeNode can only accept TreeNode as children."),null;var n=t.key,r=t.props,o=r.children,c=Object(a.a)(r,["children"]),u=Object(i.a)({key:n},c),d=e(o);return d.length&&(u.children=d),u})).filter((function(e){return e}))}(e)}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=new Set(!0===t?[]:t),a=[];function o(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.map((function(u,d){var h=Object(l.h)(s?s.pos:"0",d),f=c(u.key,h),p=Object(i.a)(Object(i.a)({},u),{},{parent:s,pos:h,children:null,data:u,isStart:[].concat(Object(r.a)(s?s.isStart:[]),[0===d]),isEnd:[].concat(Object(r.a)(s?s.isEnd:[]),[d===e.length-1])});return a.push(p),!0===t||n.has(f)?p.children=o(u.children||[],p):p.children=[],p}))}return o(e),a}function h(e,t,n){var r;n?"string"==typeof n?r=function(e){return e[n]}:"function"==typeof n&&(r=function(e){return n(e)}):r=function(e,t){return c(e.key,t)},function n(i,a,o){var s=i?i.children:e,c=i?Object(l.h)(o.pos,a):"0";if(i){var u=r(i,c),d={node:i,index:a,pos:c,key:u,parentPos:o.node?o.pos:null,level:o.level+1};t(d)}s&&s.forEach((function(e,t){n(e,t,{node:i,pos:c,level:o?o.level+1:-1})}))}(null)}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.initWrapper,r=t.processEntity,i=t.onProcessFinished,a=arguments.length>2?arguments[2]:void 0,o={},s={},l={posEntities:o,keyEntities:s};return n&&(l=n(l)||l),h(e,(function(e){var t=e.node,n=e.index,i=e.pos,a=e.key,u=e.parentPos,d={node:t,index:n,key:a,pos:i,level:e.level},h=c(a,i);o[i]=d,s[h]=d,d.parent=o[u],d.parent&&(d.parent.children=d.parent.children||[],d.parent.children.push(d)),r&&r(d,l)}),a),i&&i(l),l}function p(e,t){var n=t.expandedKeys,r=t.selectedKeys,i=t.loadedKeys,a=t.loadingKeys,o=t.checkedKeys,s=t.halfCheckedKeys,l=t.dragOverNodeKey,c=t.dropPosition,u=t.keyEntities[e];return{eventKey:e,expanded:-1!==n.indexOf(e),selected:-1!==r.indexOf(e),loaded:-1!==i.indexOf(e),loading:-1!==a.indexOf(e),checked:-1!==o.indexOf(e),halfChecked:-1!==s.indexOf(e),pos:String(u?u.pos:""),dragOver:l===e&&0===c,dragOverGapTop:l===e&&-1===c,dragOverGapBottom:l===e&&1===c}}function m(e){var t=e.data,n=e.expanded,r=e.selected,a=e.checked,o=e.loaded,l=e.loading,c=e.halfChecked,u=e.dragOver,d=e.dragOverGapTop,h=e.dragOverGapBottom,f=e.pos,p=e.active,m=Object(i.a)(Object(i.a)({},t),{},{expanded:n,selected:r,checked:a,loaded:o,loading:l,halfChecked:c,dragOver:u,dragOverGapTop:d,dragOverGapBottom:h,pos:f,active:p});return"props"in m||Object.defineProperty(m,"props",{get:function(){return Object(s.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),m}},"8EBN":
|
|
|
/*!**********************************************!*\
|
|
|
!*** ./node_modules/codemirror/mode/meta.js ***!
|
|
|
\**********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var t=0;t<e.modeInfo.length;t++){var n=e.modeInfo[t];n.mimes&&(n.mime=n.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.mime==t)return r;if(r.mimes)for(var i=0;i<r.mimes.length;i++)if(r.mimes[i]==t)return r}return/\+xml$/.test(t)?e.findModeByMIME("application/xml"):/\+json$/.test(t)?e.findModeByMIME("application/json"):void 0},e.findModeByExtension=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.ext)for(var i=0;i<r.ext.length;i++)if(r.ext[i]==t)return r}},e.findModeByFileName=function(t){for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.file&&r.file.test(t))return r}var i=t.lastIndexOf("."),a=i>-1&&t.substring(i+1,t.length);if(a)return e.findModeByExtension(a)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.name.toLowerCase()==t)return r;if(r.alias)for(var i=0;i<r.alias.length;i++)if(r.alias[i].toLowerCase()==t)return r}}}(n(/*! ../lib/codemirror */"VrN/"))},"8XDt":
|
|
|
/*!*********************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/vml/vml.js ***!
|
|
|
\*********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ./graphic */"qH13"),(0,n(/*! ../zrender */"aX58").registerPainter)("vml",n(/*! ./Painter */"6fms"))},"8hTe":
|
|
|
/*!******************************************************!*\
|
|
|
!*** ./src/components/RenderHtml/index.less?modules ***!
|
|
|
\******************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={button:"button___1wy9m"}},"9Bee":
|
|
|
/*!*********************************************************!*\
|
|
|
!*** ./src/components/RenderHtml/index.tsx + 3 modules ***!
|
|
|
\*********************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/PreviewAll/index.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/space/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/space/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/hls.js/dist/hls.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/katex/dist/katex.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/marked/lib/marked.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/marked/src/helpers.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n("DYRE");var r=n("zeV3"),i=(n("+L6B"),n("2/Rp")),a=n("k1fw"),o=n("9og8"),s=n("tJVT"),l=n("WmNS"),c=n.n(l),u=n("q1tI"),d=n.n(u),h=(n("vg9a"),n("DlQD")),f=n.n(h),p=n("rUJ1");var m=[],g=["<ul>"],v=new f.a.Renderer,b=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function y(){m.length=0,g=["<ul>"]}var E={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function x(){return function e(t,n,r,i){if(n>=t.length||t[n].level<=r)return n;var a=t[n];i.push("<li><a href='#"+a.anchor+"'>"+a.text+"</a>");var o=[];return n=e(t,++n,a.level,o),o.length>0&&(i.push("<ul>"),o.forEach((function(e){i.push(e)})),i.push("</ul>")),i.push("</li>"),n=e(t,n,r,i)}(m,0,0,g),g.push("</ul>"),g.join("")}var _={heading:function(e){var t=b.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},fences:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:Object(s.a)(t,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||""),i=t[2]?t[2].trim():t[2];if(["latex","katex","math"].indexOf(i)>=0){var a=C(),o=r;r=a,S[a]={type:"block",expression:o}}return{type:"code",raw:n,lang:i,text:r}}}},k=/(?:\${2})([^\n`]+?)(?:\${2})/gi,w=0,C=function(){return"__special_katext_id_".concat(w++,"__")},S={};function O(){w=0,S={}}function A(e){return e=e.replace(k,(function(e,t){var n=C();return S[n]={type:"inline",expression:t},n}))}var T=v.listitem;v.listitem=function(e){return T(A(e))};var I=v.paragraph;v.paragraph=function(e){return I(A(e))};var D=v.tablecell;v.tablecell=function(e,t){return D(A(e),t)},v.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];return r?["latex","katex","math"].indexOf(r)>=0?"<p class='editormd-tex'>".concat(e,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(t,'">').concat(n?e:Object(p.escape)(e,!0),"</code></pre>\n"):'<pre class="prettyprint linenums"><code>'+(n?e:Object(p.escape)(e,!0))+"</code></pre>"},v.heading=function(e,t,n){var r=this.options.headerPrefix+n.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return m.push({anchor:r,level:t,text:e}),"<h"+t+' id="'+r+'">'+e+"</h"+t+">"},f.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),f.a.use({tokenizer:_,renderer:v});var L=f.a,R=(n("SJMd"),n("ulZh")),N=n.n(R),j=n("m3rI"),M=n("Oy/b"),P=n("p5ED"),B=n("ErOA"),F=function(e,t){return(F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function U(e,t){function n(){this.constructor=e}F(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function H(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))}function z(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function G(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}var V=function(){function e(){}return e.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},e.setAttributes=function(e,t){for(var n=0,r=t;n<r.length;n++){var i=r[n],a=i[0],o=i[1];e.setAttribute(a,o)}},e.createRect=function(t,n,r){var i=document.createElementNS("http://www.w3.org/2000/svg","rect");return i.setAttribute("width",t.toString()),i.setAttribute("height",n.toString()),r&&e.setAttributes(i,r),i},e.createLine=function(t,n,r,i,a){var o=document.createElementNS("http://www.w3.org/2000/svg","line");return o.setAttribute("x1",t.toString()),o.setAttribute("y1",n.toString()),o.setAttribute("x2",r.toString()),o.setAttribute("y2",i.toString()),a&&e.setAttributes(o,a),o},e.createPolygon=function(t,n){var r=document.createElementNS("http://www.w3.org/2000/svg","polygon");return r.setAttribute("points",t),n&&e.setAttributes(r,n),r},e.createCircle=function(t,n){var r=document.createElementNS("http://www.w3.org/2000/svg","circle");return r.setAttribute("cx",(t/2).toString()),r.setAttribute("cy",(t/2).toString()),r.setAttribute("r",t.toString()),n&&e.setAttributes(r,n),r},e.createEllipse=function(t,n,r){var i=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return i.setAttribute("cx",(t/2).toString()),i.setAttribute("cy",(n/2).toString()),i.setAttribute("rx",(t/2).toString()),i.setAttribute("ry",(n/2).toString()),r&&e.setAttributes(i,r),i},e.createGroup=function(t){var n=document.createElementNS("http://www.w3.org/2000/svg","g");return t&&e.setAttributes(n,t),n},e.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},e.createMarker=function(t,n,r,i,a,o,s){var l=document.createElementNS("http://www.w3.org/2000/svg","marker");return e.setAttributes(l,[["id",t],["orient",n],["markerWidth",r.toString()],["markerHeight",i.toString()],["refX",a.toString()],["refY",o.toString()]]),l.appendChild(s),l},e.createText=function(t){var n=document.createElementNS("http://www.w3.org/2000/svg","text");return n.setAttribute("x","0"),n.setAttribute("y","0"),t&&e.setAttributes(n,t),n},e.createTSpan=function(t,n){var r=document.createElementNS("http://www.w3.org/2000/svg","tspan");return r.textContent=t,n&&e.setAttributes(r,n),r},e.createImage=function(t){var n=document.createElementNS("http://www.w3.org/2000/svg","image");return t&&e.setAttributes(n,t),n},e.createPoint=function(e,t){var n=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return n.x=e,n.y=t,n},e.createPath=function(t,n){var r=document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttribute("d",t),n&&e.setAttributes(r,n),r},e}(),W=function(){function e(){}return e.addKey=function(t){e.key=t},Object.defineProperty(e,"isLicensed",{get:function(){return!!e.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(e.key)},enumerable:!1,configurable:!0}),e}(),K=function(){function e(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return e.prototype.rasterize=function(e,t,n){var r=this;return new Promise((function(i){var a=void 0!==n?n:document.createElement("canvas");null===e&&(r.markersOnly=!0,r.naturalSize=!1);var o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("width",t.width.baseVal.valueAsString),o.setAttribute("height",t.height.baseVal.valueAsString),o.setAttribute("viewBox","0 0 "+t.viewBox.baseVal.width.toString()+" "+t.viewBox.baseVal.height.toString()),o.innerHTML=t.innerHTML,!0===r.naturalSize?(o.width.baseVal.value=e.naturalWidth,o.height.baseVal.value=e.naturalHeight):void 0!==r.width&&void 0!==r.height&&(o.width.baseVal.value=r.width,o.height.baseVal.value=r.height),a.width=o.width.baseVal.value,a.height=o.height.baseVal.value;var s=o.outerHTML,l=a.getContext("2d");!0!==r.markersOnly&&l.drawImage(e,0,0,a.width,a.height);var c=window.URL,u=new Image(a.width,a.height);u.setAttribute("crossOrigin","anonymous");var d=new Blob([s],{type:"image/svg+xml"}),h=c.createObjectURL(d);u.onload=function(){l.drawImage(u,0,0),c.revokeObjectURL(h);var e=a.toDataURL(r.imageType,r.imageQuality);i(e)},u.src=h}))},e}(),q=function(){},Y=function(){function e(e){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+e+"_"}return Object.defineProperty(e.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),e.prototype.addClass=function(e){return void 0===this.styleSheet&&this.addStyleSheet(),e.name=""+this.classNamePrefix+e.localName,this.classes.push(e),this.styleSheet.sheet.insertRule("."+e.name+" {"+e.style+"}",this.styleSheet.sheet.cssRules.length),e},e.prototype.addRule=function(e){void 0===this.styleSheet&&this.addStyleSheet(),this.rules.push(e),this.styleSheet.sheet.insertRule(e.selector+" {"+e.style+"}",this.styleSheet.sheet.cssRules.length)},e.prototype.addStyleSheet=function(){var e;this.styleSheet=document.createElement("style"),(null!==(e=this.styleSheetRoot)&&void 0!==e?e:document.head).appendChild(this.styleSheet),this.addRule(new Q("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Q("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames","\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n ")),this.addRule(new Q("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames","\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n ")),this.addClass(new J("fade_in","\n animation-duration: 0.3s;\n animation-name: "+this.classNamePrefix+"_fade_in_animation_frames;\n ")),this.addClass(new J("fade_out","\n animation-duration: 0.3s;\n animation-name: "+this.classNamePrefix+"_fade_out_animation_frames;\n "))},e.prototype.removeStyleSheet=function(){var e;this.styleSheet&&((null!==(e=this.styleSheetRoot)&&void 0!==e?e:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},e}(),Q=function(e,t){this.selector=e,this.style=t},J=function(e,t){this.localName=e,this.style=t},X=function(){function e(e,t,n,r,i){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=e,this.displayMode=t,this.markerItems=n,this.uiStyleSettings=r,this.styles=i,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return e.prototype.show=function(e){var t=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=e,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var n=document.createElement("div");n.className=this.toolbarBlockStyleClass.name,n.style.whiteSpace="nowrap",this.uiContainer.appendChild(n),this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach((function(e){var n=document.createElement("div");n.className=""+t.toolbarButtonStyleClass.name,n.setAttribute("data-type-name",e.typeName),n.innerHTML=e.icon,n.addEventListener("click",(function(){t.markerToolbarButtonClicked(n,e)})),t.buttons.push(n),t.markerButtons.push(n)})),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var r=document.createElement("div");r.className=this.toolbarBlockStyleClass.name,r.style.whiteSpace="nowrap",r.style.display=!1!==this.uiStyleSettings.resultButtonBlockVisible?"":"none",this.uiContainer.appendChild(r),this.addActionButton(r,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(r,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},e.prototype.addButtonClickListener=function(e){this.buttonClickListeners.push(e)},e.prototype.removeButtonClickListener=function(e){this.buttonClickListeners.indexOf(e)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(e),1)},e.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},e.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var e=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var t=0;t<this.markerButtons.length;t++)t<e||t===e&&this.markerButtons.length-1===e?this.markerButtonBlock.appendChild(this.markerButtons[t]):(t===e&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[t]))}},e.prototype.overflowButtonClicked=function(){"none"!==this.markerButtonOverflowBlock.style.display?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},e.prototype.resetButtonStyles=function(){var e=this;this.buttons.forEach((function(t){t.className=t.className.replace(e.uiStyleSettings.toolbarButtonStyleColorsClassName?e.uiStyleSettings.toolbarButtonStyleColorsClassName:e.toolbarButtonStyleColorsClass.name,"").trim(),t.className=t.className.replace(e.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?e.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:e.toolbarActiveButtonStyleColorsClass.name,"").trim(),t.className+=" "+(e.uiStyleSettings.toolbarButtonStyleColorsClassName?e.uiStyleSettings.toolbarButtonStyleColorsClassName:e.toolbarButtonStyleColorsClass.name)}))},e.prototype.addActionButton=function(e,t,n){var r=this,i=document.createElement("div");switch(i.className=""+this.toolbarButtonStyleClass.name,i.innerHTML=t,i.setAttribute("data-action",n),i.addEventListener("click",(function(){r.actionToolbarButtonClicked(i,n)})),n){case"select":i.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":i.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":i.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":i.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":i.style.fill=this.uiStyleSettings.closeButtonColor}e.appendChild(i),this.buttons.push(i)},e.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new J("toolbar","\n width: 100%;\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n justify-content: space-between; \n height: "+this.uiStyleSettings.toolbarHeight+"px;\n box-sizing: content-box;\n "+("inline"===this.displayMode?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n "+("inline"===this.displayMode?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n overflow: hidden;\n ")),this.toolbarStyleColorsClass=this.styles.addClass(new J("toolbar_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n box-shadow: 0px 3px rgba(33, 33, 33, 0.1);\n ")),this.toolbarBlockStyleClass=this.styles.addClass(new J("toolbar-block","\n display: inline-block;\n box-sizing: content-box;\n ")),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new J("toolbar-overflow-block","\n position: absolute;\n top: "+this.uiStyleSettings.toolbarHeight+"px;\n max-width: "+2*this.uiStyleSettings.toolbarHeight+"px;\n z-index: 10;\n box-sizing: content-box;\n ")),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new J("toolbar-overflow-block_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n "));var e=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new J("toolbar_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n box-sizing: content-box;\n ")),this.toolbarButtonStyleColorsClass=this.styles.addClass(new J("toolbar_button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new J("toolbar_active_button","\n fill: "+this.uiStyleSettings.toolbarColor+";\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new Q("."+this.toolbarButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n ")),this.styles.addRule(new Q("."+this.toolbarButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n "))},e.prototype.markerToolbarButtonClicked=function(e,t){this.setActiveButton(e),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(e){return e("marker",t)})),this.markerButtonOverflowBlock.style.display="none"},e.prototype.actionToolbarButtonClicked=function(e,t){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(e){return e("action",t)})),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},e.prototype.setActiveButton=function(e){this.resetButtonStyles(),e.className=e.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),e.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},e.prototype.setActiveMarkerButton=function(e){var t=this.markerButtons.find((function(t){return t.getAttribute("data-type-name")===e}));t&&this.setActiveButton(t)},e.prototype.setCurrentMarker=function(e){var t=this;this.currentMarker=e,this.buttons.filter((function(e){return/delete|notes/.test(e.getAttribute("data-action"))})).forEach((function(e){void 0===t.currentMarker?(e.style.fillOpacity="0.4",e.style.pointerEvents="none"):(e.style.fillOpacity="1",e.style.pointerEvents="all")}))},e}(),Z=function(){function e(e,t,n,r){this.panels=[],this.panelButtons=[],this.markerjsContainer=e,this.displayMode=t,this.uiStyleSettings=n,this.styles=r,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return e.prototype.addStyles=function(){var e;this.toolboxStyleClass=this.styles.addClass(new J("toolbox","\n width: 100%;\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n font-family: sans-serif;\n "+("popup"===this.displayMode?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+"\n box-sizing: content-box;\n "+("popup"===this.displayMode?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+"\n "+("inline"===this.displayMode?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n "+("inline"===this.displayMode?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n overflow: hidden;\n ")),this.toolboxStyleColorsClass=this.styles.addClass(new J("toolbox_colors","\n color: "+this.uiStyleSettings.toolboxColor+";\n "));var t=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new J("toolbox-button-row","\n display: flex;\n cursor: default;\n box-sizing: content-box;\n ")),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new J("toolbox-button-row_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n ")),this.toolboxPanelRowStyleClass=this.styles.addClass(new J("toolbox-panel-row","\n display: flex;\n "+("inline"===this.displayMode?"position: absolute;":"")+"\n "+("inline"===this.displayMode?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+"\n cursor: default;\n height: "+1.5*this.uiStyleSettings.toolbarHeight+"px;\n "+("inline"===this.displayMode?"width: 100%;":"")+"\n box-sizing: content-box;\n ")),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new J("toolbox-panel-row_colors","\n background-color: "+(null!==(e=this.uiStyleSettings.toolboxBackgroundColor)&&void 0!==e?e:this.uiStyleSettings.toolbarBackgroundHoverColor)+";\n ")),this.toolboxButtonStyleClass=this.styles.addClass(new J("toolbox_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n padding: "+t+"px;\n box-sizing: content-box;\n ")),this.toolboxButtonStyleColorsClass=this.styles.addClass(new J("toolbox-button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new J("toolbox-active-button_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+";\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.styles.addRule(new Q("."+this.toolboxButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new Q("."+this.toolboxButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n "))},e.prototype.show=function(e){var t;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=e,this.uiContainer.className=this.toolboxStyleClass.name+" "+(null!==(t=this.uiStyleSettings.toolboxStyleColorsClassName)&&void 0!==t?t:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},e.prototype.setPanelButtons=function(e){var t,n,r=this;this.panels=e,void 0!==this.uiContainer&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(null!==(t=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)&&void 0!==t?t:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(null!==(n=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)&&void 0!==n?n:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach((function(e){var t;e.uiStyleSettings=r.uiStyleSettings;var n=document.createElement("div");n.className=r.toolboxButtonStyleClass.name+" "+(null!==(t=r.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==t?t:r.toolboxButtonStyleColorsClass.name),n.innerHTML=e.icon,n.title=e.title,n.addEventListener("click",(function(){r.panelButtonClick(e)})),r.panelButtons.push(n),r.buttonRow.appendChild(n)})),"inline"===this.displayMode?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},e.prototype.panelButtonClick=function(e){var t=this,n=-1;if(e!==this.activePanel){n=this.panels.indexOf(e),this.panelRow.innerHTML="";var r=e.getUi();r.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(r),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=e}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout((function(){"inline"===t.displayMode?t.panelRow.style.display="none":t.panelRow.style.visibility="hidden"}),200);this.panelButtons.forEach((function(e,r){var i,a;e.className=t.toolboxButtonStyleClass.name+" "+(r===n?""+(null!==(i=t.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)&&void 0!==i?i:t.toolboxActiveButtonStyleColorsClass.name):""+(null!==(a=t.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==a?a:t.toolboxButtonStyleColorsClass.name))}))},e}(),$=function(e,t){this.title=e,this.icon=t},ee=function(e){function t(t,n,r,i){var a=e.call(this,t,i||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return a.colors=[],a.addTransparent=!1,a.colorBoxes=[],a.colors=n,a.currentColor=r,a.setCurrentColor=a.setCurrentColor.bind(a),a.getColorBox=a.getColorBox.bind(a),a}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.overflow="hidden",t.style.whiteSpace="nowrap",this.colors.forEach((function(n){var r=e.getColorBox(n);t.appendChild(r),e.colorBoxes.push(r)})),t},t.prototype.getColorBox=function(e){var t=this,n=this.uiStyleSettings.toolbarHeight/4,r=this.uiStyleSettings.toolbarHeight-n,i=document.createElement("div");i.style.display="inline-block",i.style.boxSizing="content-box",i.style.width=r-2+"px",i.style.height=r-2+"px",i.style.padding="1px",i.style.marginRight="2px",i.style.marginBottom="2px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderRadius=(r+2)/2+"px",i.style.borderColor=e===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentColor(e,i)}));var a=document.createElement("div");return a.style.display="inline-block",a.style.width=r-2+"px",a.style.height=r-2+"px",a.style.backgroundColor=e,a.style.borderRadius=r/2+"px","transparent"===e&&(a.style.fill=this.uiStyleSettings.toolboxAccentColor,a.innerHTML='<svg viewBox="0 0 24 24">\n <path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />\n </svg>'),i.appendChild(a),i},t.prototype.setCurrentColor=function(e,t){var n=this;this.currentColor=e,this.colorBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onColorChanged&&this.onColorChanged(e)},t}($),te=function(){function e(e,t,n){this._state="new",this._isSelected=!1,this._container=e,this._overlayContainer=t,this.globalSettings=n,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(e.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(e){return!1},Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),e.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},e.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},e.prototype.pointerDown=function(e,t){},e.prototype.dblClick=function(e,t){},e.prototype.manipulate=function(e){},e.prototype.pointerUp=function(e){this.stateChanged()},e.prototype.dispose=function(){},e.prototype.addMarkerVisualToContainer=function(e){this.container.childNodes.length>0?this.container.insertBefore(e,this.container.childNodes[0]):this.container.appendChild(e)},e.prototype.getState=function(){return{typeName:e.typeName,state:this.state,notes:this.notes}},e.prototype.restoreState=function(e){this._state=e.state,this.notes=e.notes},e.prototype.scale=function(e,t){},e.prototype.colorChanged=function(e){this.onColorChanged&&this.onColorChanged(e),this.stateChanged()},e.prototype.fillColorChanged=function(e){this.onFillColorChanged&&this.onFillColorChanged(e),this.stateChanged()},e.prototype.stateChanged=function(){if(this.onStateChanged&&"creating"!==this.state&&"new"!==this.state){var e=this.getState();void 0!==this.manipulationStartState&&(this.manipulationStartState.state="select"),e.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(e)&&this.onStateChanged(this)}},e.typeName="MarkerBase",e}(),ne=function(){function e(){this.findGripByVisual=this.findGripByVisual.bind(this)}return e.prototype.findGripByVisual=function(e){return this.topLeft.ownsTarget(e)?this.topLeft:this.topCenter.ownsTarget(e)?this.topCenter:this.topRight.ownsTarget(e)?this.topRight:this.centerLeft.ownsTarget(e)?this.centerLeft:this.centerRight.ownsTarget(e)?this.centerRight:this.bottomLeft.ownsTarget(e)?this.bottomLeft:this.bottomCenter.ownsTarget(e)?this.bottomCenter:this.bottomRight.ownsTarget(e)?this.bottomRight:void 0},e}(),re=function(){function e(){this.GRIP_SIZE=10,this.visual=V.createGroup(),this.visual.appendChild(V.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(V.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return e.prototype.ownsTarget=function(e){return e===this.visual||e===this.visual.childNodes[0]||e===this.visual.childNodes[1]},e}(),ie=function(){function e(){}return e.toITransformMatrix=function(e){return{a:e.a,b:e.b,c:e.c,d:e.d,e:e.e,f:e.f}},e.toSVGMatrix=function(e,t){return e.a=t.a,e.b=t.b,e.c=t.c,e.d=t.d,e.e=t.e,e.f=t.f,e},e}(),ae=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.left=0,i.top=0,i.width=0,i.height=0,i.defaultSize={x:50,y:20},i.offsetX=0,i.offsetY=0,i.rotationAngle=0,i.CB_DISTANCE=10,i._suppressMarkerCreateEvent=!1,i.container.transform.baseVal.appendItem(V.createTransform()),i.setupControlBox(),i}return U(t,e),Object.defineProperty(t.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visual",{get:function(){return this._visual},set:function(e){this._visual=e;var t=V.createTransform();this._visual.transform.baseVal.appendItem(t)},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!!e.prototype.ownsTarget.call(this,t)||!!(void 0!==this.controlGrips.findGripByVisual(t)||void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(t))},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.left=t.x,this.top=t.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var r=this.unrotatePoint(t);if(this.manipulationStartX=r.x,this.manipulationStartY=r.y,this.offsetX=r.x-this.left,this.offsetY=r.y-this.top,"new"!==this.state)if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(n),void 0!==this.activeGrip)this._state="resize";else if(void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(n)){this.activeGrip=this.rotatorGrip;var i=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=i.x-this.width/2,this.top=i.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var a=this.container.transform.baseVal.getItem(0);a.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(a,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},t.prototype.pointerUp=function(t){var n=this.state;e.prototype.pointerUp.call(this,t),"creating"===this.state&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(t),this._state="select","creating"===n&&this.onMarkerCreated&&!1===this._suppressMarkerCreateEvent&&this.onMarkerCreated(this)},t.prototype.moveVisual=function(e){this.visual.style.transform="translate("+e.x+"px, "+e.y+"px)"},t.prototype.manipulate=function(e){var t=this.unrotatePoint(e);"creating"===this.state?this.resize(e):"move"===this.state?(this.left=this.manipulationStartLeft+(t.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(t.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):"resize"===this.state?this.resize(t):"rotate"===this.state&&this.rotate(e)},t.prototype.resize=function(e){var t=this.manipulationStartLeft,n=this.manipulationStartWidth,r=this.manipulationStartTop,i=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:t=this.manipulationStartLeft+e.x-this.manipulationStartX,n=this.manipulationStartWidth+this.manipulationStartLeft-t;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:n=this.manipulationStartWidth+e.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:r=this.manipulationStartTop+e.y-this.manipulationStartY,i=this.manipulationStartHeight+this.manipulationStartTop-r;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:i=this.manipulationStartHeight+e.y-this.manipulationStartY}n>=0?(this.left=t,this.width=n):(this.left=t+n,this.width=-n),i>=0?(this.top=r,this.height=i):(this.top=r+i,this.height=-i),this.setSize()},t.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},t.prototype.rotate=function(e){if(Math.abs(e.x-this.centerX)>.1){var t=Math.sign(e.x-this.centerX);this.rotationAngle=180*Math.atan((e.y-this.centerY)/(e.x-this.centerX))/Math.PI+90*t,this.applyRotation()}},t.prototype.applyRotation=function(){var e=this.container.transform.baseVal.getItem(0);e.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(e,0)},t.prototype.rotatePoint=function(e){if(0===this.rotationAngle)return e;var t=this.container.getCTM(),n=V.createPoint(e.x,e.y);return{x:(n=n.matrixTransform(t)).x,y:n.y}},t.prototype.unrotatePoint=function(e){if(0===this.rotationAngle)return e;var t=this.container.getCTM();t=t.inverse();var n=V.createPoint(e.x,e.y);return{x:(n=n.matrixTransform(t)).x,y:n.y}},t.prototype.select=function(){e.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},t.prototype.deselect=function(){e.prototype.deselect.call(this),this.controlBox.style.display="none"},t.prototype.setupControlBox=function(){this.controlBox=V.createGroup();var e=V.createTransform();e.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(e),this.container.appendChild(this.controlBox),this.controlRect=V.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),!0!==this.globalSettings.disableRotation&&(this.rotatorGripLine=V.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new ne,this.addControlGrips(),this.controlBox.style.display="none"},t.prototype.adjustControlBox=function(){var e=this.controlBox.transform.baseVal.getItem(0);e.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(e,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),void 0!==this.rotatorGripLine&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},t.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),!0!==this.globalSettings.disableRotation&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},t.prototype.createGrip=function(){var e=new re;return e.visual.transform.baseVal.appendItem(V.createTransform()),this.controlBox.appendChild(e.visual),e},t.prototype.positionGrips=function(){var e=this.controlGrips.topLeft.GRIP_SIZE,t=-e/2,n=t,r=(this.width+this.CB_DISTANCE)/2-e/2,i=(this.height+this.CB_DISTANCE)/2-e/2,a=this.height+this.CB_DISTANCE-e/2,o=this.width+this.CB_DISTANCE-e/2;this.positionGrip(this.controlGrips.topLeft.visual,t,n),this.positionGrip(this.controlGrips.topCenter.visual,r,n),this.positionGrip(this.controlGrips.topRight.visual,o,n),this.positionGrip(this.controlGrips.centerLeft.visual,t,i),this.positionGrip(this.controlGrips.centerRight.visual,o,i),this.positionGrip(this.controlGrips.bottomLeft.visual,t,a),this.positionGrip(this.controlGrips.bottomCenter.visual,r,a),this.positionGrip(this.controlGrips.bottomRight.visual,o,a),void 0!==this.rotatorGrip&&this.positionGrip(this.rotatorGrip.visual,r,n-3*this.CB_DISTANCE)},t.prototype.positionGrip=function(e,t,n){var r=e.transform.baseVal.getItem(0);r.setTranslate(t,n),e.transform.baseVal.replaceItem(r,0)},t.prototype.hideControlBox=function(){this.controlBox.style.display="none"},t.prototype.showControlBox=function(){this.controlBox.style.display=""},t.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ie.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ie.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.left=n.left,this.top=n.top,this.width=n.width,this.height=n.height,this.rotationAngle=n.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ie.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,n.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ie.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,n.containerTransformMatrix))},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n);var r=this.rotatePoint({x:this.left,y:this.top}),i=this.unrotatePoint({x:r.x*t,y:r.y*n});this.left=i.x,this.top=i.y,this.width=this.width*t,this.height=this.height*n,this.adjustControlBox()},t}(te),oe=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.opacity=1,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.createVisual=i.createVisual.bind(i),i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual)},t.prototype.createVisual=function(){this.visual=V.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.setSize()},t.prototype.setSize=function(){e.prototype.setSize.call(this),V.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},t.prototype.pointerUp=function(t){e.prototype.pointerUp.call(this,t),this.setSize()},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.visual&&V.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(e),this.stateChanged()},t.prototype.setFillColor=function(e){this.fillColor=e,this.visual&&V.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.visual&&V.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.visual&&V.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},t.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){var n=t;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.opacity=n.opacity,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize()},t.title="Rectangle marker",t}(ae),se=function(e){function t(t,n,r,i){var a=e.call(this,t,i||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return a.widths=[],a.widthBoxes=[],a.widths=n,a.currentWidth=r,a.setCurrentWidth=a.setCurrentWidth.bind(a),a}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",this.widths.forEach((function(n){var r=document.createElement("div");r.style.display="flex",r.style.flexGrow="2",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderColor=n===e.currentWidth?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentWidth(n,r)})),t.appendChild(r);var i=document.createElement("div");i.innerText=n.toString(),i.style.marginRight="5px",r.appendChild(i);var a=document.createElement("div");a.style.minHeight="20px",a.style.flexGrow="2",a.style.display="flex",a.style.alignItems="center";var o=document.createElement("hr");o.style.minWidth="20px",o.style.border="0px",o.style.borderTop=n+"px solid "+e.uiStyleSettings.toolboxColor,o.style.flexGrow="2",a.appendChild(o),r.appendChild(a),e.widthBoxes.push(r)})),t},t.prototype.setCurrentWidth=function(e,t){var n=this;this.currentWidth=e,this.widthBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},t}($),le=function(e){function t(t,n,r,i){var a=e.call(this,t,i||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return a.styles=[],a.styleBoxes=[],a.styles=n,a.currentStyle=r,a.setCurrentStyle=a.setCurrentStyle.bind(a),a}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",this.styles.forEach((function(n){var r=document.createElement("div");r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.overflow="hidden",r.style.maxWidth=100/e.styles.length-5+"%",r.style.borderColor=n===e.currentStyle?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentStyle(n,r)})),t.appendChild(r);var i=document.createElement("div");i.style.minHeight="20px",i.style.flexGrow="2",i.style.overflow="hidden";var a='<svg width="100" height="20">\n <line x1="0" y1="10" x2="100" y2="10" stroke="'+e.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(""!==n?'stroke-dasharray="'+n+'"':"")+" />\n </svg>";i.innerHTML=a,r.appendChild(i),e.styleBoxes.push(r)})),t},t.prototype.setCurrentStyle=function(e,t){var n=this;this.currentStyle=e,this.styleBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},t}($),ce=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new ee("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new le("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return U(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="FrameMarker",t.title="Frame marker",t.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',t}(oe),ue=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},de=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.x1=0,i.y1=0,i.x2=0,i.y2=0,i.defaultLength=50,i.manipulationStartX=0,i.manipulationStartY=0,i.manipulationStartX1=0,i.manipulationStartY1=0,i.manipulationStartX2=0,i.manipulationStartY2=0,i.setupControlBox(),i}return U(t,e),t.prototype.ownsTarget=function(t){return!!e.prototype.ownsTarget.call(this,t)||!(!this.grip1.ownsTarget(t)&&!this.grip2.ownsTarget(t))},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.manipulationStartX=t.x,this.manipulationStartY=t.y,"new"===this.state&&(this.x1=t.x,this.y1=t.y,this.x2=t.x,this.y2=t.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,"new"!==this.state&&(this.select(),this.grip1.ownsTarget(n)?this.activeGrip=this.grip1:this.grip2.ownsTarget(n)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},t.prototype.pointerUp=function(t){var n=this.state;e.prototype.pointerUp.call(this,t),"creating"===this.state&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(t),this._state="select","creating"===n&&this.onMarkerCreated&&this.onMarkerCreated(this)},t.prototype.adjustVisual=function(){},t.prototype.manipulate=function(e){"creating"===this.state?this.resize(e):"move"===this.state?(this.x1=this.manipulationStartX1+e.x-this.manipulationStartX,this.y1=this.manipulationStartY1+e.y-this.manipulationStartY,this.x2=this.manipulationStartX2+e.x-this.manipulationStartX,this.y2=this.manipulationStartY2+e.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):"resize"===this.state&&this.resize(e)},t.prototype.resize=function(e){switch(this.activeGrip){case this.grip1:this.x1=e.x,this.y1=e.y;break;case this.grip2:case void 0:this.x2=e.x,this.y2=e.y}this.adjustVisual(),this.adjustControlBox()},t.prototype.select=function(){e.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},t.prototype.deselect=function(){e.prototype.deselect.call(this),this.controlBox.style.display="none"},t.prototype.setupControlBox=function(){this.controlBox=V.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},t.prototype.adjustControlBox=function(){this.positionGrips()},t.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},t.prototype.createGrip=function(){var e=new re;return e.visual.transform.baseVal.appendItem(V.createTransform()),this.controlBox.appendChild(e.visual),e},t.prototype.positionGrips=function(){var e=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-e/2,this.y1-e/2),this.positionGrip(this.grip2.visual,this.x2-e/2,this.y2-e/2)},t.prototype.positionGrip=function(e,t,n){var r=e.transform.baseVal.getItem(0);r.setTranslate(t,n),e.transform.baseVal.replaceItem(r,0)},t.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.x1=n.x1,this.y1=n.y1,this.x2=n.x2,this.y2=n.y2},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.x1=this.x1*t,this.y1=this.y1*n,this.x2=this.x2*t,this.y2=this.y2*n,this.adjustVisual(),this.adjustControlBox()},t}(te),he=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new ee("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new le("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorLine&&t!==this.visibleLine)},t.prototype.createVisual=function(){this.visual=V.createGroup(),this.selectorLine=V.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=V.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.adjustVisual(),this._state="creating")},t.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),V.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),V.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),V.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.adjustVisual(),this.colorChanged(e)},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.adjustVisual()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.adjustVisual(),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.createVisual(),this.adjustVisual()},t.typeName="LineMarker",t.title="Line marker",t.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',t}(de),fe=function(e){function t(t,n,r,i){var a=e.call(this,t,i||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return a.fonts=[],a.fontBoxes=[],a.fonts=n,a.currentFont=r,a.setCurrentFont=a.setCurrentFont.bind(a),a}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.overflow="hidden",t.style.flexGrow="2",this.fonts.forEach((function(n){var r=document.createElement("div");r.style.display="inline-block",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.overflow="hidden",r.style.maxWidth=100/e.fonts.length-5+"%",r.style.borderColor=n===e.currentFont?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentFont(n,r)})),t.appendChild(r);var i=document.createElement("div");i.style.display="flex",i.style.minHeight="20px",i.style.flexGrow="2",i.style.fontFamily=n,i.style.overflow="hidden";var a=document.createElement("div");a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",a.innerHTML="The quick brown fox jumps over the lazy dog",i.appendChild(a),r.appendChild(i),e.fontBoxes.push(r)})),t},t.prototype.setCurrentFont=function(e,t){var n=this;this.currentFont=e,this.fontBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onFontChanged&&this.onFontChanged(this.currentFont)},t}($),pe=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.color="transparent",i.padding=5,i.DEFAULT_TEXT="your text here",i.text=i.DEFAULT_TEXT,i.isMoved=!1,i.color=r.defaultColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setColor=i.setColor.bind(i),i.setFont=i.setFont.bind(i),i.renderText=i.renderText.bind(i),i.sizeText=i.sizeText.bind(i),i.textEditDivClicked=i.textEditDivClicked.bind(i),i.showTextEditor=i.showTextEditor.bind(i),i.setSize=i.setSize.bind(i),i.positionTextEditor=i.positionTextEditor.bind(i),i.colorPanel=new ee("Color",r.defaultColorSet,r.defaultColor),i.colorPanel.onColorChanged=i.setColor,i.fontFamilyPanel=new fe("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i}return U(t,e),t.prototype.ownsTarget=function(t){if(e.prototype.ownsTarget.call(this,t)||t===this.visual||t===this.textElement||t===this.bgRectangle)return!0;var n=!1;return this.textElement.childNodes.forEach((function(e){e===t&&(n=!0)})),n},t.prototype.createVisual=function(){this.visual=V.createGroup(),this.bgRectangle=V.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=V.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(V.createTransform()),this.textElement.transform.baseVal.appendItem(V.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.isMoved=!1,this.pointerDownPoint=t,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.renderText=function(){var e=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach((function(t){e.textElement.appendChild(V.createTSpan(""===t.trim()?" ":t.trim(),[["x","0"],["dy","1.2em"]]))})),setTimeout(this.sizeText,10)}},t.prototype.getTextScale=function(){var e=this.textElement.getBBox(),t=1;if(e.width>0&&e.height>0){var n=(1*this.width-this.width*this.padding*2/100)/e.width,r=(1*this.height-this.height*this.padding*2/100)/e.height;t=Math.min(n,r)}return t},t.prototype.getTextPosition=function(e){var t=this.textElement.getBBox(),n=0,r=0;return t.width>0&&t.height>0&&(n=(this.width-t.width*e)/2,r=this.height/2-t.height*e/2),{x:n,y:r}},t.prototype.sizeText=function(){var e=this.textElement.getBBox(),t=this.getTextScale(),n=this.getTextPosition(t);n.y-=e.y*t,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+n.x+"px, "+n.y+"px) scale("+t+", "+t+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(n.x,n.y),this.textElement.transform.baseVal.getItem(1).setScale(t,t))},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(t.x-this.pointerDownPoint.x)>5||Math.abs(t.y-this.pointerDownPoint.y)>5)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.isMoved=!0,this.setSize(),this.sizeText()},t.prototype.setSize=function(){e.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(V.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),V.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},t.prototype.pointerUp=function(t){var n=this.state;"creating"===n&&(this._suppressMarkerCreateEvent=!0),e.prototype.pointerUp.call(this,t),this.setSize(),("creating"===n||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},t.prototype.showTextEditor=function(){var e=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",(function(e){e.stopPropagation()})),this.textEditor.addEventListener("input",(function(){for(var t=Number.parseFloat(e.textEditor.style.fontSize);e.textEditor.clientWidth>=Number.parseInt(e.textEditor.style.maxWidth)&&t>.9;)t-=.1,e.textEditor.style.fontSize=Math.max(t,.9)+"em"})),this.textEditor.addEventListener("keyup",(function(e){e.cancelBubble=!0})),this.textEditor.addEventListener("paste",(function(e){if(e.clipboardData){var t=e.clipboardData.getData("text"),n=window.getSelection();if(!n.rangeCount)return!1;n.deleteFromDocument(),n.getRangeAt(0).insertNode(document.createTextNode(t)),e.preventDefault()}})),this.textEditDiv.addEventListener("pointerup",(function(){e.textEditDivClicked(e.textEditor.innerText)})),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},t.prototype.positionTextEditor=function(){if("edit"===this.state)if(void 0===this.textEditor)this.showTextEditor();else{this.textElement.style.display="";var e=this.getTextScale(),t=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),n=this.textElement.getBBox(),r={x:n.width*e,y:n.height*e};t.x-=r.x/2,t.y-=r.y/2,this.textEditor.style.top=t.y+"px",this.textEditor.style.left=t.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-t.x+"px",this.textEditor.style.fontSize=Math.max(16*e,12)+"px",this.textElement.style.display="none"}},t.prototype.textEditDivClicked=function(e){this.text=e.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},t.prototype.select=function(){e.prototype.select.call(this),"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText)},t.prototype.deselect=function(){"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText),e.prototype.deselect.call(this)},t.prototype.dblClick=function(t,n){e.prototype.dblClick.call(this,t,n),this.showTextEditor()},t.prototype.setColor=function(e){this.textElement&&V.setAttributes(this.textElement,[["fill",e]]),this.color=e,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(e)},t.prototype.setFont=function(e){this.textElement&&V.setAttributes(this.textElement,[["font-family",e]]),this.fontFamily=e,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},t.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},t.prototype.showVisual=function(){"edit"===this.state&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){var n=t;this.color=n.color,this.fontFamily=n.fontFamily,this.padding=n.padding,this.text=n.text,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize(),this.sizeText(),this.positionTextEditor()},t.typeName="TextMarker",t.title="Text marker",t.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',t}(ae),me=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.color="transparent",i.lineWidth=3,i.drawing=!1,i.pixelRatio=1,i.color=r.defaultColor,i.lineWidth=r.defaultStrokeWidth,i.pixelRatio=r.freehandPixelRatio,i.setColor=i.setColor.bind(i),i.addCanvas=i.addCanvas.bind(i),i.finishCreation=i.finishCreation.bind(i),i.setLineWidth=i.setLineWidth.bind(i),i.colorPanel=new ee("Color",r.defaultColorSet,r.defaultColor),i.colorPanel.onColorChanged=i.setColor,i.lineWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.lineWidthPanel.onWidthChanged=i.setLineWidth,i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.drawingImage)},t.prototype.createVisual=function(){this.visual=V.createGroup(),this.drawingImage=V.createImage(),this.visual.appendChild(this.drawingImage);var e=V.createTransform();this.visual.transform.baseVal.appendItem(e),this.addMarkerVisualToContainer(this.visual)},t.prototype.pointerDown=function(t,n){"new"===this.state&&(this.addCanvas(),this.createVisual(),this._state="creating"),"creating"===this.state?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(t.x,t.y),this.drawing=!0):e.prototype.pointerDown.call(this,t,n)},t.prototype.manipulate=function(t){"creating"===this.state?this.drawing&&(this.canvasContext.lineTo(t.x,t.y),this.canvasContext.stroke()):e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),V.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),V.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},t.prototype.pointerUp=function(t){"creating"===this._state?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):e.prototype.pointerUp.call(this,t)},t.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},t.prototype.select=function(){"creating"===this.state&&this.finishCreation(),e.prototype.select.call(this)},t.prototype.deselect=function(){"creating"===this.state&&this.finishCreation(),e.prototype.deselect.call(this)},t.prototype.finishCreation=function(){for(var e=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),t=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],n=t[0],r=t[1],i=t[2],a=t[3],o=!1,s=0;s<this.canvasElement.height;s++)for(var l=0;l<this.canvasElement.width;l++)e.data[s*this.canvasElement.width*4+4*l+3]>0&&(o=!0,s<r&&(r=s),l<n&&(n=l),s>a&&(a=s),l>i&&(i=l));if(o){this.left=n/this.pixelRatio,this.top=r/this.pixelRatio,this.width=(i-n)/this.pixelRatio,this.height=(a-r)/this.pixelRatio;var c=document.createElement("canvas");c.width=i-n,c.height=a-r,c.getContext("2d").putImageData(this.canvasContext.getImageData(n,r,i-n,a-r),0,0),this.drawingImgUrl=c.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},t.prototype.setDrawingImage=function(){V.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),V.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},t.prototype.setColor=function(e){this.color=e,this.colorChanged(e)},t.prototype.setLineWidth=function(e){this.lineWidth=e},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return"new"===this.state||"creating"===this.state?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({drawingImgUrl:this.drawingImgUrl},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){this.createVisual(),e.prototype.restoreState.call(this,t),this.drawingImgUrl=t.drawingImgUrl,this.setDrawingImage()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setDrawingImage()},t.typeName="FreehandMarker",t.title="Freehand marker",t.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',t}(ae),ge=function(e){function t(t,n,r){var i=e.call(this,t,r||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return i.typeBoxes=[],i.currentType=n,i.setCurrentType=i.setCurrentType.bind(i),i}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2";for(var n=function(n){var i="both";switch(n){case 0:i="both";break;case 1:i="start";break;case 2:i="end";break;case 3:i="none"}var a=document.createElement("div");if(a.style.display="flex",a.style.flexGrow="2",a.style.alignItems="center",a.style.justifyContent="space-between",a.style.padding="5px",a.style.borderWidth="2px",a.style.borderStyle="solid",a.style.borderColor=i===r.currentType?r.uiStyleSettings.toolboxAccentColor:"transparent",a.addEventListener("click",(function(){e.setCurrentType(i,a)})),t.appendChild(a),"both"===i||"start"===i){var o=document.createElement("div");o.style.display="flex",o.style.alignItems="center",o.style.minHeight="20px",o.innerHTML='<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">\n <polygon points="0,5 10,0 10,10" fill="'+(void 0!==r.uiStyleSettings?r.uiStyleSettings.toolboxColor:"#eeeeee")+'" />\n </svg>',o.style.marginLeft="5px",a.appendChild(o)}var s=document.createElement("div");s.style.display="flex",s.style.alignItems="center",s.style.minHeight="20px",s.style.flexGrow="2";var l=document.createElement("hr");if(l.style.minWidth="20px",l.style.border="0px",l.style.borderTop="3px solid "+(void 0!==r.uiStyleSettings?r.uiStyleSettings.toolboxColor:"#eeeeee"),l.style.flexGrow="2",s.appendChild(l),a.appendChild(s),"both"===i||"end"===i){var c=document.createElement("div");c.style.display="flex",c.style.alignItems="center",c.style.minHeight="20px",c.innerHTML='<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">\n <polygon points="0,0 10,5 0,10" fill="'+(void 0!==r.uiStyleSettings?r.uiStyleSettings.toolboxColor:"#eeeeee")+'" />\n </svg>',c.style.marginRight="5px",a.appendChild(c)}r.typeBoxes.push(a)},r=this,i=0;i<4;i++)n(i);return t},t.prototype.setCurrentType=function(e,t){var n=this;this.currentType=e,this.typeBoxes.forEach((function(e){e.style.borderColor=e===t?void 0!==n.uiStyleSettings?n.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"})),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},t}($),ve=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.arrowType="end",i.arrowBaseHeight=10,i.arrowBaseWidth=10,i.getArrowPoints=i.getArrowPoints.bind(i),i.setArrowType=i.setArrowType.bind(i),i.arrowTypePanel=new ge("Arrow type","end"),i.arrowTypePanel.onArrowTypeChanged=i.setArrowType,i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.arrow1&&t!==this.arrow2)},t.prototype.getArrowPoints=function(e,t){var n=this.arrowBaseWidth+2*this.strokeWidth,r=this.arrowBaseHeight+2*this.strokeWidth;return e-n/2+","+(t+r/2)+" "+e+","+(t-r/2)+" "+(e+n/2)+","+(t+r/2)},t.prototype.createTips=function(){this.arrow1=V.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(V.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=V.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(V.createTransform()),this.visual.appendChild(this.arrow2)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"creating"===this.state&&this.createTips()},t.prototype.adjustVisual=function(){if(e.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display="both"===this.arrowType||"start"===this.arrowType?"":"none",this.arrow2.style.display="both"===this.arrowType||"end"===this.arrowType?"":"none",V.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),V.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),n=this.arrow1.transform.baseVal.getItem(0);n.setRotate(t,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(n,0);var r=this.arrow2.transform.baseVal.getItem(0);r.setRotate(t+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(r,0)}},t.prototype.setArrowType=function(e){this.arrowType=e,this.adjustVisual(),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({arrowType:this.arrowType},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.arrowType=n.arrowType,this.createTips(),this.adjustVisual()},t.typeName="ArrowMarker",t.title="Arrow marker",t.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',t}(he),be=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.fillColor=r.defaultFillColor,i.strokeWidth=0,i.fillPanel=new ee("Color",r.defaultColorSet,r.defaultFillColor),i.fillPanel.onColorChanged=i.setFillColor,i}return U(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="CoverMarker",t.title="Cover marker",t.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',t}(oe),ye=function(e){function t(t,n,r,i){var a=e.call(this,t,i||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return a.opacities=[],a.opacityBoxes=[],a.opacities=n,a.currentOpacity=r,a.setCurrentOpacity=a.setCurrentOpacity.bind(a),a}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",t.style.justifyContent="space-between",this.opacities.forEach((function(n){var r=document.createElement("div");r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="center",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderColor=n===e.currentOpacity?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentOpacity(n,r)})),t.appendChild(r);var i=document.createElement("div");i.innerText=100*n+"%",r.appendChild(i),e.opacityBoxes.push(r)})),t},t.prototype.setCurrentOpacity=function(e,t){var n=this;this.currentOpacity=e,this.opacityBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},t}($),Ee=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.setOpacity=i.setOpacity.bind(i),i.fillColor=r.defaultHighlightColor,i.strokeWidth=0,i.opacity=r.defaultHighlightOpacity,i.fillPanel=new ee("Color",r.defaultColorSet,i.fillColor),i.fillPanel.onColorChanged=i.setFillColor,i.opacityPanel=new ye("Opacity",r.defaultOpacitySteps,i.opacity),i.opacityPanel.onOpacityChanged=i.setOpacity,i}return U(t,e),t.prototype.setOpacity=function(e){this.opacity=e,this.visual&&V.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="HighlightMarker",t.title="Highlight marker",t.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',t}(be),xe='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',_e=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.bgColor="transparent",i.tipPosition={x:0,y:0},i.tipBase1Position={x:0,y:0},i.tipBase2Position={x:0,y:0},i.tipMoving=!1,i.color=r.defaultStrokeColor,i.bgColor=r.defaultFillColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setBgColor=i.setBgColor.bind(i),i.getTipPoints=i.getTipPoints.bind(i),i.positionTip=i.positionTip.bind(i),i.setTipPoints=i.setTipPoints.bind(i),i.colorPanel=new ee("Text color",r.defaultColorSet,i.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),i.colorPanel.onColorChanged=i.setColor,i.bgColorPanel=new ee("Fill color",r.defaultColorSet,i.bgColor,xe),i.bgColorPanel.onColorChanged=i.setBgColor,i.fontFamilyPanel=new fe("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i.tipGrip=new re,i.tipGrip.visual.transform.baseVal.appendItem(V.createTransform()),i.controlBox.appendChild(i.tipGrip.visual),i}return U(t,e),t.prototype.ownsTarget=function(t){return e.prototype.ownsTarget.call(this,t)||this.tipGrip.ownsTarget(t)||this.tip===t},t.prototype.createTip=function(){V.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=V.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},t.prototype.pointerDown=function(t,n){"new"===this.state&&e.prototype.pointerDown.call(this,t,n),"creating"===this.state?this.createTip():this.tipGrip.ownsTarget(n)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):e.prototype.pointerDown.call(this,t,n)},t.prototype.pointerUp=function(t){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,e.prototype.pointerUp.call(this,t);else{var n="creating"===this.state;e.prototype.pointerUp.call(this,t),this.setTipPoints(n),this.positionTip()}},t.prototype.manipulate=function(t){if(this.tipMoving){var n=this.unrotatePoint(t);this.tipPosition={x:n.x-this.manipulationStartLeft,y:n.y-this.manipulationStartTop},this.positionTip()}else e.prototype.manipulate.call(this,t)},t.prototype.setBgColor=function(e){this.bgRectangle&&this.tip&&(V.setAttributes(this.bgRectangle,[["fill",e]]),V.setAttributes(this.tip,[["fill",e]])),this.bgColor=e,this.fillColorChanged(e)},t.prototype.getTipPoints=function(){return this.setTipPoints("creating"===this.state),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},t.prototype.setTipPoints=function(e){void 0===e&&(e=!1);var t=Math.min(this.height/2,15),n=this.height/5;e&&(this.tipPosition={x:t+n/2,y:this.height+20});var r=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?r<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(n=this.width/5,t=Math.min(this.width/2,15),this.tipBase1Position={x:t,y:0},this.tipBase2Position={x:t+n,y:0}):(this.tipBase1Position={x:0,y:t},this.tipBase2Position={x:0,y:t+n}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?r<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(n=this.width/5,t=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-t-n,y:0},this.tipBase2Position={x:this.width-t,y:0}):(this.tipBase1Position={x:this.width,y:t},this.tipBase2Position={x:this.width,y:t+n}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?r<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(n=this.width/5,t=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-t-n,y:this.height},this.tipBase2Position={x:this.width-t,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-t-n},this.tipBase2Position={x:this.width,y:this.height-t}):r<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(n=this.width/5,t=Math.min(this.width/2,15),this.tipBase1Position={x:t,y:this.height},this.tipBase2Position={x:t+n,y:this.height}):(this.tipBase1Position={x:0,y:this.height-t},this.tipBase2Position={x:0,y:this.height-t-n})},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.positionTip()},t.prototype.positionTip=function(){V.setAttributes(this.tip,[["points",this.getTipPoints()]]);var e=this.tipGrip.visual.transform.baseVal.getItem(0);e.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(e,0)},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),t.prototype.select=function(){this.positionTip(),e.prototype.select.call(this)},t.prototype.getState=function(){var n=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){var n=t;this.bgColor=n.bgColor,this.tipPosition=n.tipPosition,e.prototype.restoreState.call(this,t),this.createTip(),this.setTipPoints()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.tipPosition={x:this.tipPosition.x*t,y:this.tipPosition.y*n},this.positionTip()},t.typeName="CalloutMarker",t.title="Callout marker",t.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',t}(pe),ke=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.opacity=1,i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.fillColor=r.defaultFillColor,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.setOpacity=i.setOpacity.bind(i),i.createVisual=i.createVisual.bind(i),i.strokePanel=new ee("Line color",G(r.defaultColorSet,["transparent"]),r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.fillPanel=new ee("Fill color",G(r.defaultColorSet,["transparent"]),i.fillColor,xe),i.fillPanel.onColorChanged=i.setFillColor,i.strokeWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new le("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i.opacityPanel=new ye("Opacity",r.defaultOpacitySteps,i.opacity),i.opacityPanel.onOpacityChanged=i.setOpacity,i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual)},t.prototype.createVisual=function(){this.visual=V.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.setSize()},t.prototype.setSize=function(){e.prototype.setSize.call(this),V.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},t.prototype.pointerUp=function(t){e.prototype.pointerUp.call(this,t),this.setSize()},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.visual&&V.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(e),this.stateChanged()},t.prototype.setFillColor=function(e){this.fillColor=e,this.visual&&V.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(e),this.stateChanged()},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.visual&&V.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.visual&&V.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},t.prototype.setOpacity=function(e){this.opacity=e,this.visual&&V.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){var n=t;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.opacity=n.opacity,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize()},t.typeName="EllipseMarker",t.title="Ellipse marker",t.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',t}(ae),we=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return U(t,e),Object.defineProperty(t.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.tip1&&t!==this.tip2)},t.prototype.createTips=function(){this.tip1=V.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(V.createTransform()),this.visual.appendChild(this.tip1),this.tip2=V.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(V.createTransform()),this.visual.appendChild(this.tip2)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"creating"===this.state&&this.createTips()},t.prototype.adjustVisual=function(){if(e.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(V.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),V.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),n=this.tip1.transform.baseVal.getItem(0);n.setRotate(t,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(n,0);var r=this.tip2.transform.baseVal.getItem(0);r.setRotate(t+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(r,0)}},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t),this.createTips(),this.adjustVisual()},t.typeName="MeasurementMarker",t.title="Measurement marker",t.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',t}(he),Ce=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokePanel.colors=r.defaultColorSet,i.fillColor="transparent",i}return U(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="EllipseFrameMarker",t.title="Ellipse frame marker",t.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',t}(ke),Se=function(){function e(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(e.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),e.prototype.addUndoStep=function(e){0!==this.undoStack.length&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(e)||(this.undoStack.push(e),JSON.stringify(this.lastRedoStep)!==JSON.stringify(e)&&this.redoStack.splice(0,this.redoStack.length))},e.prototype.replaceLastUndoStep=function(e){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=e)},e.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},e.prototype.undo=function(){if(this.undoStack.length>1){var e=this.undoStack.pop();return void 0!==e&&this.redoStack.push(e),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},e.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},e}(),Oe=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.curveX=0,i.curveY=0,i.manipulationStartCurveX=0,i.manipulationStartCurveY=0,i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.positionGrips=i.positionGrips.bind(i),i.addControlGrips=i.addControlGrips.bind(i),i.adjustVisual=i.adjustVisual.bind(i),i.setupControlBox=i.setupControlBox.bind(i),i.resize=i.resize.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new ee("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new le("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorCurve&&t!==this.visibleCurve&&!this.curveGrip.ownsTarget(t))},t.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},t.prototype.createVisual=function(){this.visual=V.createGroup(),this.selectorCurve=V.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=V.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,"new"===this.state&&(this.curveX=t.x,this.curveY=t.y),"new"===this.state?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(n)&&(this.activeGrip=this.curveGrip,this._state="resize")},t.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),V.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),V.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),V.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},t.prototype.setupControlBox=function(){e.prototype.setupControlBox.call(this),this.curveControlLine1=V.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=V.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},t.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,e.prototype.addControlGrips.call(this)},t.prototype.positionGrips=function(){e.prototype.positionGrips.call(this);var t=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-t/2,this.curveY-t/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},t.prototype.manipulate=function(t){"move"===this.state&&(this.curveX=this.manipulationStartCurveX+t.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+t.y-this.manipulationStartY),e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){this.activeGrip===this.curveGrip&&(this.curveX=t.x,this.curveY=t.y),e.prototype.resize.call(this,t),"creating"===this.state&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.adjustVisual(),this.colorChanged(e)},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.adjustVisual()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.adjustVisual()},t.prototype.scale=function(t,n){this.curveX=this.curveX*t,this.curveY=this.curveY*n,e.prototype.scale.call(this,t,n)},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.curveX=n.curveX,this.curveY=n.curveY,this.createVisual(),this.adjustVisual()},t.typeName="CurveMarker",t.title="Curve marker",t.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',t}(de),Ae=function(){function e(e,t){void 0===t&&(t=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=e,this.cancelable=t}return Object.defineProperty(e.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){this._defaultPrevented=!0},e}(),Te=function(e){function t(t,n,r){var i=e.call(this,t,!1)||this;return i.dataUrl=n,i.state=r,i}return U(t,e),t}(Ae),Ie=function(e){function t(t,n,r){void 0===r&&(r=!1);var i=e.call(this,t,r)||this;return i.marker=n,i}return U(t,e),t}(Ae),De=function(){function e(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return e.prototype.addEventListener=function(e,t){this[e].push(t)},e.prototype.removeEventListener=function(e,t){var n=this[e].indexOf(t);n>-1&&this[e].splice(n,1)},e}(),Le=function(){function e(t){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new ue,this._isOpen=!1,this.undoRedoManager=new Se,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new De,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=e.instanceCounter++,this.styles=new Y(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=t,this.targetRoot=document.body,this.width=t.clientWidth,this.height=t.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(e.prototype,"ALL_MARKER_TYPES",{get:function(){return[ce,me,ve,pe,Ce,ke,Ee,_e,we,be,he,Oe]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ce,me,ve,pe,ke,Ee,_e]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ce,me,ve,pe,Ee]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(e){var t=this;this._availableMarkerTypes.splice(0),e.forEach((function(e){if("string"==typeof e){var n=t.ALL_MARKER_TYPES.find((function(t){return t.typeName===e}));void 0!==n&&t._availableMarkerTypes.push(n)}else t._availableMarkerTypes.push(e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(e){this._zoomLevel=e,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),e.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),"popup"===this.settings.displayMode&&this.onPopupTargetResize(),W.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},e.prototype.show=function(){var e=this;void 0===this.styles.styleSheetRoot&&void 0!==q.styleSheetRoot&&(this.styles.styleSheetRoot=q.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach((function(t){return t(new Ae(e))}))},e.prototype.render=function(){return H(this,void 0,void 0,(function(){var e;return z(this,(function(t){switch(t.label){case 0:return this.setCurrentMarker(),(e=new K).naturalSize=this.renderAtNaturalSize,e.imageType=this.renderImageType,e.imageQuality=this.renderImageQuality,e.markersOnly=this.renderMarkersOnly,e.width=this.renderWidth,e.height=this.renderHeight,[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return t.sent(),[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,t.sent()]}}))}))},e.prototype.close=function(e){var t=this;if(void 0===e&&(e=!1),this.isOpen){var n=!1;e||this.eventListeners.beforeclose.forEach((function(e){var r=new Ae(t,!0);e(r),r.defaultPrevented&&(n=!0)})),n||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),"popup"===this.settings.displayMode&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach((function(e){return e(new Ae(t))})),this.detachEvents(),this._isOpen=!1)}},e.prototype.addMarkersToToolbar=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];(e=this._availableMarkerTypes).push.apply(e,t)},e.prototype.addRenderEventListener=function(e){this.addEventListener("render",(function(t){e(t.dataUrl,t.state)}))},e.prototype.removeRenderEventListener=function(e){},e.prototype.addCloseEventListener=function(e){this.addEventListener("close",(function(){e()}))},e.prototype.removeCloseEventListener=function(e){},e.prototype.setupResizeObserver=function(){var e=this;"inline"===this.settings.displayMode?window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){e.resize(e.target.clientWidth,e.target.clientHeight)})),this.targetObserver.observe(this.target)):"popup"===this.settings.displayMode&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){return e.onPopupTargetResize()})),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},e.prototype.onPopupTargetResize=function(){var e=1*this.target.clientWidth/this.target.clientHeight,t=this.editorCanvas.clientWidth/e>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*e:this.editorCanvas.clientWidth,n=t<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/e;this.resize(t,n)},e.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},e.prototype.resize=function(e,t){this._isResizing=!0;var n=e/this.imageWidth,r=t/this.imageHeight;this.imageWidth=Math.round(e),this.imageHeight=Math.round(t),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px","popup"!==this.settings.displayMode?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),void 0!==this.toolbar&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(n,r),this._isResizing=!1},e.prototype.scaleMarkers=function(e,t){var n,r=this;this._currentMarker&&this._currentMarker instanceof pe?this._currentMarker.scale(e,t):(n=this._currentMarker,this.setCurrentMarker()),this.markers.forEach((function(n){n!==r._currentMarker&&n.scale(e,t)})),void 0!==n&&this.setCurrentMarker(n)},e.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},e.prototype.setTopLeft=function(){var e=this.editingTarget.getBoundingClientRect(),t=this.editorCanvas.getBoundingClientRect();this.left=e.left-t.left,this.top=e.top-t.top},e.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},e.prototype.addDefs=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.defs=V.createDefs(),this.addDefsToImage(),(e=this.defs).append.apply(e,t)},e.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},e.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},e.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},e.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},e.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},e.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},e.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},e.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var e=document.createElement("a");e.href="https://markerjs.com/",e.target="_blank",e.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',e.title="Powered by marker.js",e.style.display="grid",e.style.alignItems="center",e.style.justifyItems="center",e.style.padding="3px",e.style.width="20px",e.style.height="20px",this.logoUI.appendChild(e),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},e.prototype.positionLogo=function(){this.logoUI&&("right"!==this.uiStyleSettings.logoPosition?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},e.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},e.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},e.prototype.showUI=function(){switch("popup"===this.settings.displayMode&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var e=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=e+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=void 0!==this.uiStyleSettings.zIndex?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=void 0!==this.uiStyleSettings.zIndex?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin="popup"===this.settings.displayMode?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new X(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1","popup"===this.settings.displayMode&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex","popup"===this.settings.displayMode&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new Z(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},e.prototype.closeUI=function(){"popup"===this.settings.displayMode&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},e.prototype.removeMarker=function(e){this.markerImage.removeChild(e.container),this.markers.indexOf(e)>-1&&this.markers.splice(this.markers.indexOf(e),1),e.dispose()},e.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),void 0!==this._currentMarker&&("new"!==this._currentMarker.state?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},e.prototype.toolbarButtonClicked=function(e,t){if("marker"===e&&void 0!==t)this.createNewMarker(t);else if("action"===e)switch(t){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":void 0===this.notesArea?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},e.prototype.deleteSelectedMarker=function(){var e=this;if(void 0!==this._currentMarker){var t=!1;if(this.eventListeners.markerbeforedelete.forEach((function(n){var r=new Ie(e,e._currentMarker,!0);n(r),r.defaultPrevented&&(t=!0)})),!t){var n=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach((function(t){return t(new Ie(e,n))}))}}},e.prototype.clear=function(){var e=this,t=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(n){var r=new Ie(e,void 0,!0);n(r),r.defaultPrevented&&(t=!0)})),!t)){this.setCurrentMarker();for(var n=function(t){var n=r.markers[t];r.setCurrentMarker(r.markers[t]),r._currentMarker.dispose(),r.markerImage.removeChild(r._currentMarker.container),r.markers.splice(r.markers.indexOf(r._currentMarker),1),r.eventListeners.markerdelete.forEach((function(t){return t(new Ie(e,n))}))},r=this,i=this.markers.length-1;i>=0;i--)n(i);this.addUndoStep()}},Object.defineProperty(e.prototype,"isNotesAreaOpen",{get:function(){return void 0!==this.notesArea},enumerable:!1,configurable:!0}),e.prototype.showNotesEditor=function(){var e;void 0!==this._currentMarker&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=null!==(e=this._currentMarker.notes)&&void 0!==e?e:"",this.overlayContainer.appendChild(this.notesArea))},e.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(void 0!==this._currentMarker&&(this._currentMarker.notes=""!==this.notesArea.value.trim()?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},e.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},e.prototype.addUndoStep=function(){var e=this;if(void 0===this._currentMarker||"edit"!==this._currentMarker.state){var t=this.getState(),n=this.undoRedoManager.getLastUndoStep();if(!n||n.width===t.width&&n.height===t.height){var r=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(t),r<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach((function(t){return t(new Ae(e))}))}else this.undoRedoManager.replaceLastUndoStep(t),this.eventListeners.statechange.forEach((function(t){return t(new Ae(e))}))}},e.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},e.prototype.undoStep=function(){var e=this,t=this.undoRedoManager.undo();void 0!==t&&(this.restoreState(t),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach((function(t){return t(new Ae(e))})))},e.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},e.prototype.redoStep=function(){var e=this,t=this.undoRedoManager.redo();void 0!==t&&(this.restoreState(t),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach((function(t){return t(new Ae(e))})))},e.prototype.stepZoom=function(){var e=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=e<this.zoomSteps.length-1?this.zoomSteps[e+1]:this.zoomSteps[0]},e.prototype.panTo=function(e){this.contentDiv.scrollBy({left:this.prevPanPoint.x-e.x,top:this.prevPanPoint.y-e.y}),this.prevPanPoint=e},e.prototype.startRenderAndClose=function(){return H(this,void 0,void 0,(function(){var e,t,n=this;return z(this,(function(r){switch(r.label){case 0:return[4,this.render()];case 1:return e=r.sent(),t=this.getState(),this.eventListeners.render.forEach((function(r){return r(new Te(n,e,t))})),this.close(!0),[2]}}))}))},e.prototype.getState=function(e){!0===e&&this.setCurrentMarker();var t={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach((function(e){return t.markers.push(e.getState())})),t},e.prototype.restoreState=function(e){var t=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);e.markers.forEach((function(e){var n=t._availableMarkerTypes.find((function(t){return t.typeName===e.typeName}));if(void 0!==n){var r=t.addNewMarker(n);r.restoreState(e),t.markers.push(r)}})),e.width&&e.height&&(e.width!==this.imageWidth||e.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/e.width,this.imageHeight/e.height),this.eventListeners.restorestate.forEach((function(e){return e(new Ae(t))}))},e.prototype.addNewMarker=function(e){var t=V.createGroup();return this.markerImage.appendChild(t),new e(t,this.overlayContainer,this.settings)},e.prototype.createNewMarker=function(e){var t,n=this;(t="string"==typeof e?this._availableMarkerTypes.find((function(t){return t.typeName===e})):e)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(t),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(t.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach((function(e){return e(new Ie(n,n._currentMarker))})))},e.prototype.markerCreated=function(e){var t=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(e),this.setCurrentMarker(e),e instanceof me&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(me):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach((function(e){return e(new Ie(t,t._currentMarker))}))},e.prototype.colorChanged=function(e){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=e,this.settings.defaultStrokeColor=e)},e.prototype.fillColorChanged=function(e){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=e)},e.prototype.markerStateChanged=function(e){var t=this;this.eventListeners.markerchange.forEach((function(n){return n(new Ie(t,e))}))},e.prototype.setCurrentMarker=function(e){var t=this;this._currentMarker!==e&&void 0!==this._currentMarker&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach((function(e){return e(new Ie(t,t._currentMarker))}))),this._currentMarker=e,void 0===this._currentMarker||this._currentMarker.isSelected||("new"!==this._currentMarker.state&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach((function(e){return e(new Ie(t,t._currentMarker))})))},e.prototype.onPointerDown=function(e){if(this._isFocused||this.focus(),this.touchPoints++,1===this.touchPoints||"touch"!==e.pointerType)if(void 0===this._currentMarker||"new"!==this._currentMarker.state&&"creating"!==this._currentMarker.state){if("select"===this.mode){var t=this.markers.find((function(t){return t.ownsTarget(e.target)}));void 0!==t?(this.setCurrentMarker(t),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(e.clientX,e.clientY),e.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:e.clientX,y:e.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(e.clientX,e.clientY))},e.prototype.onDblClick=function(e){if(this._isFocused||this.focus(),"select"===this.mode){var t=this.markers.find((function(t){return t.ownsTarget(e.target)}));void 0!==t&&t!==this._currentMarker&&this.setCurrentMarker(t),void 0!==this._currentMarker?this._currentMarker.dblClick(this.clientToLocalCoordinates(e.clientX,e.clientY),e.target):this.setCurrentMarker()}},e.prototype.onPointerMove=function(e){1!==this.touchPoints&&"touch"===e.pointerType||(void 0!==this._currentMarker||this.isDragging)&&(void 0!==this._currentMarker&&"edit"===this._currentMarker.state||e.preventDefault(),void 0!==this._currentMarker?this._currentMarker.manipulate(this.clientToLocalCoordinates(e.clientX,e.clientY)):this.zoomLevel>1&&this.panTo({x:e.clientX,y:e.clientY}))},e.prototype.onPointerUp=function(e){this.touchPoints>0&&this.touchPoints--,0===this.touchPoints&&this.isDragging&&void 0!==this._currentMarker&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(e.clientX,e.clientY)),this.isDragging=!1,this.addUndoStep()},e.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},e.prototype.onKeyUp=function(e){void 0===this._currentMarker||void 0!==this.notesArea||"Delete"!==e.key&&"Backspace"!==e.key||this.deleteSelectedMarker()},e.prototype.clientToLocalCoordinates=function(e,t){var n=this.markerImage.getBoundingClientRect();return{x:(e-n.left)/this.zoomLevel,y:(t-n.top)/this.zoomLevel}},e.prototype.onWindowResize=function(){this.positionUI()},e.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var e=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=e+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},e.prototype.addLicenseKey=function(e){W.addKey(e)},e.prototype.addEventListener=function(e,t){this.eventListeners.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventListeners.removeEventListener(e,t)},e.prototype.renderState=function(e){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(e),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(e.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),e.prototype.focus=function(){var e=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,void 0!==this._previousCurrentMarker&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach((function(t){return t(new Ae(e))})))},e.prototype.blur=function(){var e=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach((function(t){return t(new Ae(e))})))},e.instanceCounter=0,e}(),Re=function(e,t){return(Re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};
|
|
|
/* **********************************
|
|
|
cropro version 1.2.0
|
|
|
@license SEE LICENSE IN LICENSE
|
|
|
|
|
|
copyright Alan Mendelevich
|
|
|
see README and LICENSE for details
|
|
|
********************************** */
|
|
|
/*! *****************************************************************************
|
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
|
purpose with or without fee is hereby granted.
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
|
***************************************************************************** */function Ne(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Re(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function je(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))}function Me(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}var Pe=function(){function e(){}return e.addKey=function(t){e.key=t},Object.defineProperty(e,"isLicensed",{get:function(){return!!e.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(e.key)},enumerable:!1,configurable:!0}),e}(),Be=function(){function e(){}return e.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},e.setAttributes=function(e,t){for(var n=0,r=t;n<r.length;n++){var i=r[n],a=i[0],o=i[1];e.setAttribute(a,o)}},e.createRect=function(t,n,r){var i=document.createElementNS("http://www.w3.org/2000/svg","rect");return i.setAttribute("width",t.toString()),i.setAttribute("height",n.toString()),r&&e.setAttributes(i,r),i},e.createLine=function(t,n,r,i,a){var o=document.createElementNS("http://www.w3.org/2000/svg","line");return o.setAttribute("x1",t.toString()),o.setAttribute("y1",n.toString()),o.setAttribute("x2",r.toString()),o.setAttribute("y2",i.toString()),a&&e.setAttributes(o,a),o},e.createPolygon=function(t,n){var r=document.createElementNS("http://www.w3.org/2000/svg","polygon");return r.setAttribute("points",t),n&&e.setAttributes(r,n),r},e.createCircle=function(t,n){var r=document.createElementNS("http://www.w3.org/2000/svg","circle");return r.setAttribute("cx",(t/2).toString()),r.setAttribute("cy",(t/2).toString()),r.setAttribute("r",t.toString()),n&&e.setAttributes(r,n),r},e.createEllipse=function(t,n,r){var i=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return i.setAttribute("cx",(t/2).toString()),i.setAttribute("cy",(n/2).toString()),i.setAttribute("rx",(t/2).toString()),i.setAttribute("ry",(n/2).toString()),r&&e.setAttributes(i,r),i},e.createGroup=function(t){var n=document.createElementNS("http://www.w3.org/2000/svg","g");return t&&e.setAttributes(n,t),n},e.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},e.createMarker=function(t,n,r,i,a,o,s){var l=document.createElementNS("http://www.w3.org/2000/svg","marker");return e.setAttributes(l,[["id",t],["orient",n],["markerWidth",r.toString()],["markerHeight",i.toString()],["refX",a.toString()],["refY",o.toString()]]),l.appendChild(s),l},e.createText=function(t){var n=document.createElementNS("http://www.w3.org/2000/svg","text");return n.setAttribute("x","0"),n.setAttribute("y","0"),t&&e.setAttributes(n,t),n},e.createTSpan=function(t,n){var r=document.createElementNS("http://www.w3.org/2000/svg","tspan");return r.textContent=t,n&&e.setAttributes(r,n),r},e.createImage=function(t){var n=document.createElementNS("http://www.w3.org/2000/svg","image");return t&&e.setAttributes(n,t),n},e.createPoint=function(e,t){var n=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return n.x=e,n.y=t,n},e.createPath=function(t,n){var r=document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttribute("d",t),n&&e.setAttributes(r,n),r},e.createElement=function(t,n){var r=document.createElementNS("http://www.w3.org/2000/svg",t);return n&&e.setAttributes(r,n),r},e.getHollowRectanglePath=function(e,t,n,r,i,a,o,s){return"M"+e+","+t+"V"+(t+r)+"H"+(e+n)+"V"+t+"H"+i+"V"+a+"H"+(i+o)+"V"+(a+s)+"H"+i+"V"+t+"Z"},e}(),Fe=function(){function e(e){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+e+"_"}return Object.defineProperty(e.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#333333",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarBackgroundActiveColor:"#282828",toolbarColor:"#eeeeee",cropShadeColor:"#ffffff",cropFrameColor:"#ffffff",gripColor:"#333333",gripFillColor:"#cccccc",toolbarHeight:40}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),e.prototype.addClass=function(e){return void 0===this.styleSheet&&this.addStyleSheet(),e.name=""+this.classNamePrefix+e.localName,this.classes.push(e),this.styleSheet.sheet.insertRule("."+e.name+" {"+e.style+"}",this.styleSheet.sheet.cssRules.length),e},e.prototype.addRule=function(e){void 0===this.styleSheet&&this.addStyleSheet(),this.rules.push(e),this.styleSheet.sheet.insertRule(e.selector+" {"+e.style+"}",this.styleSheet.sheet.cssRules.length)},e.prototype.addStyleSheet=function(){var e;this.styleSheet=document.createElement("style"),(null!==(e=this.styleSheetRoot)&&void 0!==e?e:document.head).appendChild(this.styleSheet),this.addRule(new Ue("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ue("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames","\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n ")),this.addRule(new Ue("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames","\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n ")),this.addClass(new He("_fade_in","\n animation-duration: 0.3s;\n animation-name: "+this.classNamePrefix+"_fade_in_animation_frames;\n ")),this.addClass(new He("_fade_out","\n animation-duration: 0.3s;\n animation-name: "+this.classNamePrefix+"_fade_out_animation_frames;\n "))},e.prototype.removeStyleSheet=function(){var e;this.styleSheet&&((null!==(e=this.styleSheetRoot)&&void 0!==e?e:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},e}(),Ue=function(e,t){this.selector=e,this.style=t},He=function(e,t){this.localName=e,this.style=t},ze=function(){function e(){this.blocks=[],this.display=""}return e.prototype.addButtonBlock=function(e){e.className=this.blockClassName,e.buttonClassName=this.buttonClassName,e.buttonColorsClassName=this.buttonColorsClassName,e.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(e)},e.prototype.addElementBlock=function(e){void 0===e.className&&(e.className=this.blockClassName),this.blocks.push(e)},e.prototype.getUI=function(){var e=document.createElement("div");return e.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,e.style.display=this.display,this.blocks.forEach((function(t){return e.appendChild(t.getUI())})),e},e}(),Ge=function(){function e(){}return e.prototype.getUI=function(){var e=document.createElement("div");if(e.className=this.className,void 0!==this.minWidth&&(e.style.minWidth=this.minWidth),void 0!==this.contentAlign)switch(this.contentAlign){case"start":e.style.justifyContent="flex-start";break;case"center":e.style.justifyContent="center";break;case"end":e.style.justifyContent="flex-end"}return e.style.whiteSpace="nowrap",e},e}(),Ve=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buttons=[],t}return Ne(t,e),t.prototype.addButton=function(e){e.className=this.buttonClassName,e.colorsClassName=this.buttonColorsClassName,e.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(e)},t.prototype.getUI=function(){var t=e.prototype.getUI.call(this);return this.buttons.forEach((function(e){return t.appendChild(e.getUI())})),t},t}(Ge),We=function(){function e(e,t){this._isActive=!1,this._isHidden=!1,this._icon=e,this.title=t,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(e.prototype,"icon",{get:function(){return this._icon},set:function(e){this._icon=e,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isActive",{get:function(){return this._isActive},set:function(e){this._isActive=e,this.adjustClassName()},enumerable:!1,configurable:!0}),e.prototype.getUI=function(){var e=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",(function(){return e.onClick()})),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},e.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},e.prototype.hide=function(){this._isHidden=!0},e}(),Ke=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.elements=[],t}return Ne(t,e),t.prototype.addElement=function(e){this.elements.push(e)},t.prototype.getUI=function(){var t=e.prototype.getUI.call(this);return this.elements.forEach((function(e){return t.appendChild(e)})),t},t}(Ge),qe=function(){function e(e,t){this.horizontal=e,this.vertical=t}return Object.defineProperty(e.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),e.prototype.getVerticalLength=function(e){return e/this.ratio},e.prototype.getHorizontalLength=function(e){return e*this.ratio},e}(),Ye=function(){function e(){}return e.getIcon=function(e,t){if(e>0&&t>0){var n=new qe(e,t),r=n.ratio>=1?20:n.getHorizontalLength(20),i=n.ratio<1?20:n.getVerticalLength(20),a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(a);var o=Be.createDefs();a.appendChild(o);var s=Be.createElement("clipPath",[["id","text-bg-clip"]]);o.appendChild(s);var l=Be.createPath(Be.getHollowRectanglePath((24-r)/2,(24-i)/2,r,i,(24-r)/2+2,(24-i)/2+2,r-4,i-4));a.appendChild(l);var c=Be.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);c.appendChild(Be.createTSpan(e+":"+t)),a.appendChild(c);var u=c.getBBox();Be.setAttributes(c,[["x",((24-u.width)/2).toString()],["y",((24-u.height)/2-u.y).toString()]]);var d=Be.createPath(Be.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(u.width))/2,(24-Math.ceil(u.height))/2,Math.ceil(u.width),Math.ceil(u.height)));return s.appendChild(d),Be.setAttributes(l,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(a),a.outerHTML}return'<svg viewBox="0 0 24 24"><path d="M19 12h-2v3h-3v2h5v-5M7 9h3V7H5v5h2V9m14-6H3a2 2 0 00-2 2v14a2 2 0 002 2h18a2 2 0 002-2V5a2 2 0 00-2-2m0 16H3V5h18v14z"/></svg>'},e}(),Qe=function(e){function t(t,n,r){var i=e.call(this,t,n)||this;return i.isDropdownOpen=!1,i.onClick=i.dropdownButtonClicked,i.dropdownButtons=r,i}return Ne(t,e),t.prototype.setupDropdown=function(){var e=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach((function(t){t.className=e.className,t.colorsClassName=e.colorsClassName,e.dropdownBlock.appendChild(t.getUI())})),this.uiContainer.appendChild(this.dropdownBlock)},t.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},t.prototype.dropdownButtonClicked=function(){void 0===this.dropdownBlock&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},t.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},t.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},t.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},t}(We),Je=function(){function e(e,t){this.GRIP_SIZE=10,this.color=e,this.fillColor=t,this.visual=Be.createGroup(),this.visual.appendChild(Be.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Be.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return e.prototype.ownsTarget=function(e){return e===this.visual||e===this.visual.childNodes[0]||e===this.visual.childNodes[1]},e.prototype.setCenter=function(e,t){this.visual.childNodes.forEach((function(n){return Be.setAttributes(n,[["cx",e.toString()],["cy",t.toString()]])}))},e}(),Xe=function(){function e(e,t,n,r){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=e,this.canvasHeight=t,this.margin=n,this.container=r,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(e.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(e){this._aspectRatio=e,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(e){this._isGridVisible=e,this.gridContainer&&Be.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(e){this._zoomFactor=e,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),e.prototype.open=function(){var e=this;this.cropShadeElement=Be.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Be.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var t=0;t<this.numberOfGridLines;t++)this.horizontalGridLines.push(Be.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(Be.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach((function(t){return e.gridContainer.appendChild(t)})),this.verticalGridLines.forEach((function(t){return e.gridContainer.appendChild(t)})),this.cropRectElement=Be.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Je(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Je(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Je(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Je(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},e.prototype.setCropRectangle=function(e){this.cropRect=e;var t=Object.assign({},this.cropRect);1!==this.zoomFactor&&(t.width=this.cropRect.width*this.zoomFactor,t.height=this.cropRect.height*this.zoomFactor,t.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-t.width/2,t.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-t.height/2),Be.setAttributes(this.cropRectElement,[["x",t.x.toString()],["y",t.y.toString()],["width",t.width.toString()],["height",t.height.toString()]]);var n=t.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach((function(e,r){var i=t.y+n*(r+1);Be.setAttributes(e,[["x1",""+t.x],["y1",""+i],["x2",""+(t.x+t.width)],["y2",""+i]])}));var r=t.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach((function(e,n){var i=t.x+r*(n+1);Be.setAttributes(e,[["x1",""+i],["y1",""+t.y],["x2",""+i],["y2",""+(t.y+t.height)]])})),Be.setAttributes(this.cropShadeElement,[["d",Be.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,t.x,t.y,t.width,t.height)]]),this.topLeftGrip.setCenter(t.x,t.y),this.topRightGrip.setCenter(t.x+t.width,t.y),this.bottomLeftGrip.setCenter(t.x,t.y+t.height),this.bottomRightGrip.setCenter(t.x+t.width,t.y+t.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},e.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},e.prototype.clientToLocalCoordinates=function(e,t){var n=this.container.getBoundingClientRect();return{x:e-n.left+this.margin,y:t-n.top+this.margin}},e.prototype.onPointerDown=function(e){this.container.setPointerCapture(e.pointerId),this.previousPoint=this.clientToLocalCoordinates(e.clientX,e.clientY),this.cropRectElement===e.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(e.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(e.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(e.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(e.target)&&(this.activeGrip=this.bottomRightGrip)},e.prototype.onPointerMove=function(e){if(this.isMoving)this.move(this.clientToLocalCoordinates(e.clientX,e.clientY));else if(this.activeGrip){var t=this.clientToLocalCoordinates(e.clientX,e.clientY);this.resize(t)}e.preventDefault()},e.prototype.onPointerUp=function(e){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(e.pointerId)},e.prototype.move=function(e){var t=e.x-this.previousPoint.x,n=e.y-this.previousPoint.y;1!==this.zoomFactor&&(t=-t/this.zoomFactor,n=-n/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+t),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+n),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=e},e.prototype.resize=function(e){var t=Object.assign({},this.cropRect),n=e.x-this.previousPoint.x,r=e.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:t.x+n<this.margin&&(n=this.margin-t.x),t.x+=n,t.width=this.cropRect.x+this.cropRect.width-t.x;break;case this.bottomRightGrip:case this.topRightGrip:t.width+n>this.canvasWidth*this.zoomFactor&&(n=this.canvasWidth*this.zoomFactor-t.width),t.width+=n}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(t.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(n),t.height=this.aspectRatio.getVerticalLength(t.width)):(t.y+=r,t.height=this.cropRect.y+this.cropRect.height-t.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?t.height=this.aspectRatio.getVerticalLength(t.width):t.height+=r}t.width<10&&(t.x=this.cropRect.x,t.width=10),t.height<10&&(t.y=this.cropRect.y,t.height=10),this.previousPoint=e,t.x>=this.margin&&t.y>=this.margin&&t.x-this.margin+t.width<=this.canvasWidth&&t.y-this.margin+t.height<=this.canvasHeight&&(this.cropRect=t,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},e.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var e=this.cropRect.x+this.cropRect.width/2,t=this.cropRect.y+this.cropRect.height/2,n=this.aspectRatio.getHorizontalLength(this.cropRect.height),r=this.aspectRatio.getVerticalLength(this.cropRect.width);n/this.canvasWidth<r/this.canvasHeight?this.cropRect.width=n:this.cropRect.height=r,this.cropRect.width>this.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=e-this.cropRect.width/2,this.cropRect.y=t-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},e.prototype.getRescaledRect=function(e,t,n,r,i,a){var o=n/e,s=r/t;return{x:(i.x-a)*o+a,y:(i.y-a)*s+a,width:i.width*o,height:i.height*s}},e.prototype.scaleCanvas=function(e,t){var n=this.getRescaledRect(this.canvasWidth,this.canvasHeight,e,t,this.cropRect,this.margin);this.canvasWidth=e,this.canvasHeight=t,this.onCropChange&&this.onCropChange(n),this.setCropRectangle(n)},e}(),Ze=function(){function e(e){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=e,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(e.prototype,"angle",{get:function(){return this._angle},set:function(e){this._angle=e,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),e.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},e.prototype.onPointerDown=function(e){this.controlContainer.setPointerCapture(e.pointerId),this.isDragging=!0,this.previousPoint={x:e.clientX,y:e.clientY}},e.prototype.onPointerMove=function(e){this.isDragging&&(this.onAngleChange&&this.onAngleChange((e.clientX-this.previousPoint.x)/5),this.previousPoint.x=e.clientX)},e.prototype.onPointerUp=function(e){this.isDragging&&this.onAngleChange&&this.onAngleChange((e.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(e.pointerId)},e.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var e=this.angleLabelText.getBBox();Be.setAttributes(this.angleLabelElement,[["x",((this.width-e.width)/2).toString()],["y",(this.height/2).toString()]])}},e.prototype.positionScaleShape=function(){if(this.scaleShape){var e=this.scaleShape.transform.baseVal.getItem(0);e.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(e,0)}},e.prototype.getVisual=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e.setAttribute("width",this.width+"px"),e.setAttribute("height",this.height+"px"),e.setAttribute("viewBox","0 0 "+this.width+" "+this.height),e.style.flexShrink="0",document.body.appendChild(e);for(var t="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,n=1;n<=this.width/5+10;n++){var r=n%5==0?this.height/3:this.height/6;t+="h4v"+-r+"h1v"+r}t+="v1H0Z",this.scaleShape=Be.createPath(t);var i=Be.createTransform();this.scaleShape.transform.baseVal.appendItem(i),e.appendChild(this.scaleShape),this.angleLabelElement=Be.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Be.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var a=Be.createTSpan("");return a.innerHTML="°",this.angleLabelElement.appendChild(a),e.appendChild(this.angleLabelElement),document.body.removeChild(e),e},e}(),$e=function(){function e(){this.naturalSize=!1,this.imageType="image/png"}return e.prototype.rasterize=function(e,t,n,r,i,a,o){var s=this;return new Promise((function(l){var c=document.createElement("canvas");c.width=e.width.baseVal.value-2*r,c.height=e.height.baseVal.value-2*r;var u=1,d=1;!0===s.naturalSize?(u=t.naturalWidth/(e.width.baseVal.value-2*r)/a,d=t.naturalHeight/(e.height.baseVal.value-2*r)/o,c.width=t.naturalWidth/a,c.height=t.naturalHeight/o):void 0!==s.width&&void 0!==s.height&&(u=s.width/n.width,d=s.height/n.height,c.width*=u,c.height*=d);var h=c.getContext("2d");h.translate(c.width/2,c.height/2),h.rotate(i*Math.PI/180),h.scale(a,o),h.translate(-c.width/2,-c.height/2),h.drawImage(t,0,0,c.width,c.height);var f=document.createElement("canvas");f.width=n.width*u,f.height=n.height*d,f.getContext("2d").putImageData(h.getImageData((n.x-r)*u,(n.y-r)*d,n.width*u,n.height*d),0,0),l(f.toDataURL(s.imageType,s.imageQuality))}))},e}(),et=function(){function e(t){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=e.instanceCounter++,this.styles=new Fe(this.instanceNo),this.target=t,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(e.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(e){this._zoomToCropEnabled=e,e?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(e){this._isGridVisible=e,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gridLines",{get:function(){return this._gridLines},set:function(e){this._gridLines=e,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(e){this._rotationAngle=e,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"aspectRatio",{get:function(){var e;return null!==(e=this._aspectRatio)&&void 0!==e?e:this.aspectRatios[0]},set:function(e){this._aspectRatio=e},enumerable:!1,configurable:!0}),e.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),"popup"===this.displayMode&&this.onPopupResize(),this._isOpen=!0},e.prototype.show=function(){this.showUI(),this.open()},e.prototype.close=function(e){void 0===e&&(e=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),"popup"===this.displayMode&&window.removeEventListener("resize",this.setWindowHeight),e||this.closeEventListeners.forEach((function(e){return e()})),this._isOpen=!1)},e.prototype.addRenderEventListener=function(e){this.renderEventListeners.push(e)},e.prototype.removeRenderEventListener=function(e){this.renderEventListeners.indexOf(e)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(e),1)},e.prototype.addCloseEventListener=function(e){this.closeEventListeners.push(e)},e.prototype.removeCloseEventListener=function(e){this.closeEventListeners.indexOf(e)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(e),1)},e.prototype.setupResizeObserver=function(){var e=this;"inline"===this.displayMode?window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){e.resize(e.target.clientWidth,e.target.clientHeight)})),this.targetObserver.observe(this.target)):"popup"===this.displayMode&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},e.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var e=1*this.target.clientWidth/this.target.clientHeight,t=this.contentDiv.clientWidth/e>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*e:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,n=t+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/e;this.resize(t,n)}},e.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},e.prototype.setEditingTargetSize=function(){this.editorCanvas.style.width=this.imageWidth+2*this.CANVAS_MARGIN+"px",this.editorCanvas.style.height=this.imageHeight+2*this.CANVAS_MARGIN+"px",Be.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},e.prototype.resize=function(e,t){this.imageWidth=Math.round(e),this.imageHeight=Math.round(t),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px","popup"!==this.displayMode?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},e.prototype.setEditingTarget=function(){var e=document.createElement("canvas");e.width=this.target.naturalWidth,e.height=this.target.naturalHeight,e.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var t=e.toDataURL();Be.setAttributes(this.editingTarget,[["href",t]]),this.setEditingTargetSize()},e.prototype.setTopLeft=function(){var e=this.target.getBoundingClientRect(),t=this.editorCanvas.getBoundingClientRect();this.left=e.left-t.left-this.CANVAS_MARGIN,this.top=e.top-t.top-this.CANVAS_MARGIN},e.prototype.initCropCanvas=function(){this.cropImageHolder=document.createElement("div"),this.cropImageHolder.style.setProperty("touch-action","none"),this.cropImageHolder.style.setProperty("-ms-touch-action","none"),this.cropImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.cropImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImage.style.pointerEvents="auto",this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.cropImageHolder.style.transformOrigin="top left",this.positionCropImage(),this.defs=Be.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=Be.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=Be.createGroup(),this.editingTargetRotationScaleContainer=Be.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var e=Be.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(e);var t=Be.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(t),this.editingTargetContainer=Be.createGroup(),this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px)",this.editingTargetContainer.appendChild(this.editingTargetRotationContainer),this.cropImage.appendChild(this.editingTargetContainer),this.cropImageHolder.appendChild(this.cropImage),this.editorCanvas.appendChild(this.cropImageHolder)},e.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},e.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=Be.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Xe(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},e.prototype.zoomToCrop=function(){if(this.cropRect){var e=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,t=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=e+"px "+t+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-e+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-t+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},e.prototype.unzoomFromCrop=function(){this.zoomFactor=1,this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin="center",this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px) scale(1)",this.cropLayer.zoomFactor=this.zoomFactor)},e.prototype.cropRectChanged=function(e){this.cropRect=e,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},e.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},e.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},e.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},e.prototype.showUI=function(){switch(this.addStyles(),"popup"===this.displayMode&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var e=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,t=this.target.offsetTop>e+this.CANVAS_MARGIN?this.target.offsetTop-(e+this.CANVAS_MARGIN):0;this.coverDiv.style.top=t+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=void 0!==this.styles.settings.zIndex?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=void 0!==this.styles.settings.zIndex?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin="popup"===this.displayMode?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,"popup"===this.displayMode&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex","popup"===this.displayMode&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},e.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},e.prototype.addTopToolbar=function(){var e=this;this.topToolbar=new ze,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var t=new Ve;t.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(t);var n=[];this.aspectRatios.forEach((function(t){var r=new We(Ye.getIcon(t.horizontal,t.vertical),0===t.horizontal&&0===t.vertical?"FREE":t.horizontal+":"+t.vertical);r.onClick=function(){return e.ratioButtonClicked(t)},n.push(r)})),this.aspectRatioButton=new Qe(Ye.getIcon(0,0),"Aspect ratio",n),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,t.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var r=new We('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");r.isActive=this.isGridVisible,r.onClick=function(){e.isGridVisible=!e.isGridVisible,r.isActive=e.isGridVisible},t.addButton(r);var i=new We('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(i.isActive=this.zoomToCropEnabled,i.onClick=function(){e.zoomToCropEnabled=!e.zoomToCropEnabled,i.isActive=e.zoomToCropEnabled},t.addButton(i),!Pe.isLicensed){var a=new Ke;this.topToolbar.addElementBlock(a);var o=document.createElement("div");o.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var s=document.createElement("a");s.style.color="currentColor",s.href="https://markerjs.com/products/cropro",s.target="_blank",s.innerHTML='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',o.appendChild(s),a.addElement(o)}var l=new Ve;l.minWidth=3*this.toolbarHeight+"px",l.contentAlign="end",this.topToolbar.addButtonBlock(l);var c=new We('<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"OK");c.onClick=this.startRenderAndClose,l.addButton(c),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(c.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var u=new We('<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"Close");u.onClick=this.close,l.addButton(u),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(u.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},e.prototype.addBottomToolbar=function(){var e=this;this.bottomToolbar=new ze,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var t=new Ve;t.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(t);var n=new We('<svg viewBox="0 0 24 24"><path d="M13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93M7.1 18.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.02-4.47L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47z"/></svg>',"Rotate left");n.onClick=this.rotateLeftButtonClicked,t.addButton(n);var r=new We('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");r.onClick=this.rotateRightButtonClicked,t.addButton(r);var i=new Ke;i.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(i),this.straightener=new Ze("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(t){e.rotateBy(t),e.straightener.angle=e.rotationAngle},i.addElement(this.straightener.getUI());var a=new Ve;a.minWidth=2*this.toolbarHeight+"px",a.contentAlign="end",this.bottomToolbar.addButtonBlock(a);var o=new We('<svg viewBox="0 0 24 24"><path d="M15 21h2v-2h-2m4-10h2V7h-2M3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2m16-2v2h2c0-1.1-.9-2-2-2m-8 20h2V1h-2m8 16h2v-2h-2M15 5h2V3h-2m4 10h2v-2h-2m0 10c1.1 0 2-.9 2-2h-2z"/></svg>',"Flip horizontal");o.onClick=this.flipHorizontallyButtonClicked,a.addButton(o);var s=new We('<svg viewBox="0 0 24 24"><path d="M3 15v2h2v-2m10 4v2h2v-2m2-16H5c-1.1 0-2 .9-2 2v4h2V5h14v4h2V5c0-1.1-.9-2-2-2m2 16h-2v2c1.1 0 2-.9 2-2M1 11v2h22v-2M7 19v2h2v-2m10-4v2h2v-2m-10 4v2h2v-2M3 19c0 1.1.9 2 2 2v-2z"/></svg>',"Flip vertical");s.onClick=this.flipVerticallyButtonClicked,a.addButton(s)},e.prototype.ratioButtonClicked=function(e){this.aspectRatio=e,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},e.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Ye.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},e.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&0!==this.aspectRatio.horizontal&&0!==this.aspectRatio.vertical?this.cropLayer.aspectRatio=new qe(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},e.prototype.closeUI=function(){"popup"===this.displayMode&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},e.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},e.prototype.restoreState=function(e){if(e){var t=this.cropLayer.getRescaledRect(e.width,e.height,this.imageWidth,this.imageHeight,e.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(t),this.cropRectChanged(t),this.flippedHorizontally=e.flippedHorizontally,this.flippedVertically=e.flippedVertically,this.applyFlip(),this.rotationAngle=e.rotationAngle,this.applyRotation()}},e.prototype.clientToLocalCoordinates=function(e,t){var n=this.cropImage.getBoundingClientRect();return{x:e-n.left,y:t-n.top}},e.prototype.onWindowResize=function(){this.positionUI()},e.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var e=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=e+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},e.prototype.rotateLeftButtonClicked=function(){var e=this.rotationAngle-90;this.rotationAngle%90!=0&&(e+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(e)},e.prototype.rotateRightButtonClicked=function(){var e=this.rotationAngle+90;this.rotationAngle%90!=0&&(e-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(e)},e.prototype.rotateTo=function(e){e=(e=e>180?e-360:e)<=-180?e+360:e,this.rotationAngle=e,this.applyRotation()},e.prototype.rotateBy=function(e){this.rotateTo((this.rotationAngle+e)%360)},e.prototype.applyRotation=function(){var e=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var t=this.editingTargetRotationContainer.transform.baseVal.getItem(0);t.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(t,0);var n=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/n.width,this.imageHeight/n.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=e},e.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},e.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},e.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},e.prototype.startRenderAndClose=function(){return je(this,void 0,void 0,(function(){var e,t;return Me(this,(function(n){switch(n.label){case 0:return[4,this.render()];case 1:return e=n.sent(),t=this.getState(),this.renderEventListeners.forEach((function(n){return n(e,t)})),this.close(!0),[2]}}))}))},e.prototype.render=function(){return je(this,void 0,void 0,(function(){var e;return Me(this,(function(t){switch(t.label){case 0:return(e=new $e).naturalSize=this.renderAtNaturalSize,e.imageType=this.renderImageType,e.imageQuality=this.renderImageQuality,e.width=this.renderWidth,e.height=this.renderHeight,this.unzoomFromCrop(),Be.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,e.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return t.sent(),[4,e.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,t.sent()]}}))}))},e.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new He("toolbar","\n width: "+("inline"===this.displayMode?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+";\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n justify-content: space-between; \n height: "+this.toolbarHeight+"px;\n box-sizing: content-box;\n overflow: hidden;\n line-height: 0px;\n ")),this.toolbarStyleColorsClass=this.styles.addClass(new He("toolbar_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarBlockStyleClass=this.styles.addClass(new He("toolbar-block","\n display: flex;\n align-items: center;\n box-sizing: content-box;\n "));var e=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new He("toolbar_button","\n display: inline-block;\n width: "+(this.toolbarHeight-2*e)+"px;\n height: "+(this.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarButtonStyleColorsClass=this.styles.addClass(new He("toolbar_button_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n ")),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new He("toolbar_active_button","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n background-color: "+this.styles.settings.toolbarBackgroundActiveColor+"\n ")),this.styles.addRule(new Ue("."+this.toolbarButtonStyleClass.name+" svg","\n height: "+this.toolbarHeight/2+"px;\n ")),this.styles.addRule(new Ue("."+this.toolbarButtonStyleColorsClass.name+":hover","\n background-color: "+this.styles.settings.toolbarBackgroundHoverColor+"\n ")),this.toolbarDropdownStyleClass=this.styles.addClass(new He("toolbar_dropdown","\n position: absolute;\n max-width: "+4*this.toolbarHeight+"px;\n z-index: 20;\n white-space: normal;\n box-sizing: content-box;\n box-shadow: 3px 3px rgba(33, 33, 33, 0.1);\n margin: "+("inline"===this.displayMode?"0":this.popupMargin)+"px;\n line-height: 0px;\n ")),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new He("toolbar_dropdown_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new He("toolbar_straightener_block","\n display: flex;\n overflow: hidden;\n justify-content: center;\n -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);\n ")),this.toolbarStraightenerStyleClass=this.styles.addClass(new He("toolbar_straightener","\n display: flex;\n overflow: hidden;\n justify-content: center;\n height: "+(this.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new He("toolbar_straightener_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n "))},e.instanceCounter=0,e}(),tt=n("8hTe"),nt=n.n(tt),rt=/<pre[^>]*>/g;t.a=function(e){var t=e.value,n=void 0===t?"":t,l=e.edit,h=void 0!==l&&l,f=e.className,p=e.showTextOnly,m=e.showLines,g=e.replaces,v=e.zoomImg,b=e.hasMask,_=e.style,k=void 0===_?{}:_,w=e.stylesPrev,C=void 0===w?{}:w,A=String(n),T=Object(u.useRef)(),I=Object(u.useRef)(),D=Object(u.useState)(""),R=Object(s.a)(D,2),F=R[0],U=R[1],H=Object(u.useState)("office"),z=Object(s.a)(H,2),G=z[0],V=z[1],W=Object(u.useMemo)((function(){try{A=(A=A.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+j.a.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+j.a.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+j.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,"\n")).replace(new RegExp("(?<!\\n)\\n(?!\\n)","g")," \n")}catch(e){}var e=L(A),t=S;if(A.match(/\[TOC\]/)&&(e=e.replace("<p>[TOC]</p>",x()),y()),e=(e=e.replace(/(__special_katext_id_\d+__)/g,(function(e,n){var r=t[n],i=r.type,a=r.expression;return Object(M.renderToString)(function(e){var t=document.createElement("div");return t.innerHTML=e,0===t.childNodes.length?"":t.childNodes[0].nodeValue}(a)||"",{displayMode:"block"===i,throwOnError:!1,output:"html"})}))).replace(/▁/g,"▁▁▁"),O(),p){var n=document.createElement("div");return n.innerHTML=e,n.innerText}return setTimeout((function(){return Y()}),500),e}),[A]),K=Object(u.useRef)();function q(e){var t=e.target;if("IMG"===t.tagName.toUpperCase()){if(v){var n=t.getAttribute("src");U(n),V("image")}}else if("A"===t.tagName.toUpperCase()){var r=t.getAttribute("href");if(r.indexOf("office")>-1)e.preventDefault(),U(r),V("office");else if(r.indexOf("application/pdf")>-1)e.preventDefault(),U(r),V("pdf");else if(r.indexOf("type=text")>-1)e.preventDefault(),U(r),V("html");else if(r.startsWith("#")){e.preventDefault();var i=document.getElementById(r.replace("#",""));i&&i.scrollIntoView(!0)}}}E.WebkitLineClamp=m,m&&(k=Object(a.a)(Object(a.a)({},k),E));var Y=function(){var e,t=null===(e=K.current)||void 0===e?void 0:e.querySelectorAll("video");null==t||t.forEach((function(e){if(e.oncontextmenu=function(){return!1},e.src.indexOf(".m3u8")>-1)if(e.canPlayType("application/vnd.apple.mpegurl"));else if(N.a.isSupported()){var t=new N.a;t.loadSource(e.src),t.attachMedia(e)}}))};Object(u.useEffect)((function(){if(K.current&&W&&W.match(rt)&&window.PR.prettyPrint(),K.current)return K.current.addEventListener("click",q),function(){K.current.removeEventListener("click",q),O(),y()}}),[W,K.current,q]);return d.a.createElement("div",{style:{position:"relative"}},d.a.createElement("div",{ref:K,style:Object(a.a)({},k),className:"".concat(f||""," markdown-body ").concat(nt.a.mdBody),onMouseOver:function(e){h&&("IMG"===e.target.nodeName?(T.current.style.display="flex",T.current.style.width=e.target.clientWidth+"px",T.current.style.height=e.target.clientHeight+"px",T.current.style.top=e.target.offsetTop+"px",T.current.style.left=e.target.offsetLeft+"px",I.current.src=e.target.getAttribute("src")):T.current.style.display="none")},dangerouslySetInnerHTML:{__html:W}}),d.a.createElement("div",{ref:T,className:nt.a.button},d.a.createElement(r.a,null,d.a.createElement(i.a,{onClick:function(){return(e=new et(I.current)).displayMode="popup",e.addRenderEventListener(function(){var e=Object(o.a)(c.a.mark((function e(t){var n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return T.current.style.display="none",e.next=3,Object(B.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:t}});case 3:null!=(n=e.sent)&&n.id&&g(I.current.getAttribute("src").replace(j.a.API_SERVER,""),"/api/attachments/".concat(null==n?void 0:n.id,"?type=").concat(n.content_type));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),void e.show();var e}},"裁剪"),d.a.createElement(i.a,{onClick:function(){return(e=new Le(I.current)).settings.displayMode="popup",e.addEventListener("render",function(){var e=Object(o.a)(c.a.mark((function e(t){var n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(T.current.style.display="none",!I.current){e.next=6;break}return e.next=4,Object(B.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:t.dataUrl}});case 4:null!=(n=e.sent)&&n.id&&g(I.current.getAttribute("src").replace(j.a.API_SERVER,""),"/api/attachments/".concat(null==n?void 0:n.id,"?type=").concat(n.content_type));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.show(),void(window.markerArea=e);var e}},"编辑"))),d.a.createElement("img",{ref:I,src:"https://ali-cdn.educoder.net/images/avatars/PortalImage/170?t=1659681136",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),d.a.createElement(P.a,{close:!0,data:F,hasMask:b,type:null!=F&&F.length?G:"",style:Object(a.a)({},C),onClose:function(){return U("")}}))}},"9VGf":
|
|
|
/*!****************************************!*\
|
|
|
!*** ./src/components/useInterval.tsx ***!
|
|
|
\****************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(/*! react */"q1tI");function i(e,t){var n=Object(r.useRef)();Object(r.useEffect)((function(){n.current=e})),Object(r.useEffect)((function(){if(null!==t){var e=setInterval((function(){n.current()}),t);return function(){return clearInterval(e)}}}),[t])}},"A/g1":
|
|
|
/*!*******************************************!*\
|
|
|
!*** ./src/assets/images/icons/done1.png ***!
|
|
|
\*******************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF92lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDMgNzkuMTY0NTI3LCAyMDIwLzEwLzE1LTE3OjQ4OjMyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIgeG1wOkNyZWF0ZURhdGU9IjIwMjEtMDctMDJUMTk6Mzg6MjMrMDg6MDAiIHhtcDpNb2RpZnlEYXRlPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiBkYzpmb3JtYXQ9ImltYWdlL3BuZyIgcGhvdG9zaG9wOkNvbG9yTW9kZT0iMyIgcGhvdG9zaG9wOklDQ1Byb2ZpbGU9InNSR0IgSUVDNjE5NjYtMi4xIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOmVkYzRhODM0LTVjNWQtNDQ1My04MDYzLWNkNzcwODQyODg5ZSIgeG1wTU06RG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjQ4MTE0OTVlLTVkMDctZTk0YS1iNWEwLWYxOWJmZmM0NGUyNyIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOmMwNjQyYzA1LTg5MzQtNDdlYy04MTFiLTlkYjdhZGNkYjFiMCI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6YzA2NDJjMDUtODkzNC00N2VjLTgxMWItOWRiN2FkY2RiMWIwIiBzdEV2dDp3aGVuPSIyMDIxLTA3LTAyVDE5OjM4OjIzKzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0ic2F2ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6ZWRjNGE4MzQtNWM1ZC00NDUzLTgwNjMtY2Q3NzA4NDI4ODllIiBzdEV2dDp3aGVuPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5fJkpyAAAGoElEQVRogc2abWxbVxnH/8+59/rdTpx2GW3UNWJJV7Ylaxp3LUFsWgJDiI5R8bK2GppAmsgQLKQthS8IEJ9okibrREf3gX2Y1K2bxAoDtog60RBSVxKnWUO7kpSppXJZK2ja2HFi33vPw4cmpbN9r++1k8Lv2znnf577f+zje95Mhw4dQqUkwljpF7kuv0EdHkm1HklRr6TQq2tn5xcklwhIMnMSQJIJxykTiSce+1am0mer5XacqM7uDJjiqbAuWlvSygrBnmKyxcoIA+tBBAAgAAikjNZ47zCIh8E8mOjYO1aOD3L7DYzXZJurs8qhuzLqFsH22hcbUs6CMudAol8Ic2Dkkb0fuvEj3IinwvobjTOeRP1safOuIPIA/AMpxbsb4z3fc9PVUQLvRY37L/vMDxtT2peCBpU97BywlkD9sXjvbzcfG7jTSYeSCZyK6l9tTCkn75xXHAVcChh4zCDzLy1DfQ+U0tomcDaSO9A8rb0WWN5P3QK+SzCPx471bLdTWSYwFdZfXz/j+e7SG3MHE73SGu+19FE0gTNV+o8aU9pXls+Waw7E4r2fL9ZQkMB4jd5xd1r96fJ7cgeDX944vL8hv74ggdUZccRrLsw4/1fQCpLyYH7tRxKYCutv1M4rK26fKdd8Nn+euJnAySp9w+o5dettt+QSItHV+nb/qsXyzddj1KAXlnmSsuIMgV8v1sCgHxdWcj002QXgh8BCAqdq9B33T2tbltOlBWcEia+NtO86nd/QOtR3EGyxXmHZHXun78jow7tPCgAI6NixpGsbZ1ibj/d2gvkZy55EHpbcDiz8BkK62LRsNotjaX5TvK8NzH0lI5j0aQAQ4z69pjarfGwZTFphab55sCdogntAFCgZhfgLn3xtv19oPnTexuFjaR4ANJV6CWhzGEvNrpQPiYBOt+vVaWu+Nd7bCaDTTUCS9LDwSNQuiT17bM3fGPd4zn1YWSc8kqJO5e9H9P6LAeNvLp9ia755sCcoiftAKLqptoOI6oRXUsiJ+FxIf/MTM9quNRl1/XhN7p7zQWPUQTdb88CNcQ9GWXMQA3XCb5JWSngxYJxtSGtfXCxvuOqZrJ9VN53wpcMfhIxhs8jSb0aT2VLmyxn3edQ52hOnNf5dsfrN86H0x9Nqu8KgqbBxdF5hCdwwfyFkPmFnflO8rw3AL8qy/V9YzCmsl1I1pNTdp6N6t52mMaVu85mkTEb0ly6EzCeaprXfWGmbB3uCTHgOLk9FCqGkmhWcBlBjJ9MkUX1K3TcRzV5qmvYesdOum9G+Weqxmop+Zo65dFsAEydFTvC0E3HQIHVNWnvpvRVGRYu+G+Oenq4kxiIk+ZLIKbjitEO1Lvyr0/SHieD8qtLqQhbG/Qvl9C2OSIqMWvwHasUdWSW6Umojbh/VPNgTlOCCLWElsOB3hO7BL6XLHfCqOaXuYsA466aPR6XnAZQ8qHKB4fWJP4kNV7SrV3ymqwNVAFiTUe85HzLedaKNxfd/h4FvuPdoA9Hvj7ftmhMAkFbZyaxaQH1a3XwurL9tp4kN7fsUQz5fTnxbGH8GFt7DcwpecTuMFmlIaZ+bjOgvF2u7d/gnIWZR+Q1KPowcIIaAhQSarqmH/xE0TpQbb92M9uT7kdz+/HqfDB0EcF/ZRi1ggYFER/cYcMtMOO3jzlmVjXKDrkt5uv9are9ZLJ8L6UcJ+HplVotygVRlYLFwM4GWf2njl/ymq1fqrSgM3J1Sfz5Rnd15ulp/tiGtPV6h0aIwaCDxUPc/F8sfOQdqTKnbrvjMf9fOK7ZLCyv8Jom1s9qvsHANttQw4dhY++6BW+sKFlNJr7E9K6wOZEoT0YU3ogvXm5OSMK5KQ347v7oggZbr3j/+PWwUnoj9jyHCk+OP7p3Kry+6nL33uvazqbD+6+W35RDmrtGOPW8Va7JcjzemtC+frTKWfgJyCQmxI/GZ7x+warfdUKy/rj47UZXdnlHZXHprJWBcFKZsGX1k16t2spI7oqbr3iOTkdzGyz7z8tK5s4eAN4UiHxx5dO94Ka2jLd2Gq95TI/e9tXoqbBytZLJzwAUGdY+273nc6Y294z3p1sRW2ZhSt02Gsg+eDxknyl07FYWRY8I+aZptYx27B0Bw/Bp3faHRcs13EsCWiWpjZ8DEU+Ecxe7IKjVl5GMy8zAJMQSIwbH27rL+7FH2jUzTNfUwgMMAkFiFlf5MrstviA4PU61HIuo1KQRCdkGeJCDJoCQkkkzyOFVF4mOxyv9u8x8opnU6UeBF0wAAAABJRU5ErkJggg=="},BPZU:
|
|
|
/*!**************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/core/timsort.js ***!
|
|
|
\**************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){function n(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;!function(e,t,n){n--;for(;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function r(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var a,o=e[r],s=t,l=r;s<l;)i(o,e[a=s+l>>>1])<0?l=a:s=a+1;var c=r-s;switch(c){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;c>0;)e[s+c]=e[s+c-1],c--}e[s]=o}}function i(e,t,n,r,i,a){var o=0,s=0,l=1;if(a(e,t[n+i])>0){for(s=r-i;l<s&&a(e,t[n+i+l])>0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;l<s&&a(e,t[n+i-l])<=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var c=o;o=i-l,l=i-c}for(o++;o<l;){var u=o+(l-o>>>1);a(e,t[n+u])>0?o=u+1:l=u}return l}function a(e,t,n,r,i,a){var o=0,s=0,l=1;if(a(e,t[n+i])<0){for(s=i+1;l<s&&a(e,t[n+i-l])<0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var c=o;o=i-l,l=i-c}else{for(s=r-i;l<s&&a(e,t[n+i+l])>=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o<l;){var u=o+(l-o>>>1);a(e,t[n+u])<0?l=u:o=u+1}return l}function o(e,t){var n,r,o,s=7,l=0;n=e.length;var c=[];function u(n){var u=r[n],d=o[n],h=r[n+1],f=o[n+1];o[n]=d+f,n===l-3&&(r[n+1]=r[n+2],o[n+1]=o[n+2]),l--;var p=a(e[h],e,u,d,0,t);u+=p,0!==(d-=p)&&0!==(f=i(e[u+d-1],e,h,f,f-1,t))&&(d<=f?function(n,r,o,l){var u=0;for(u=0;u<r;u++)c[u]=e[n+u];var d=0,h=o,f=n;if(e[f++]=e[h++],0==--l){for(u=0;u<r;u++)e[f+u]=c[d+u];return}if(1===r){for(u=0;u<l;u++)e[f+u]=e[h+u];return void(e[f+l]=c[d])}var p,m,g,v=s;for(;;){p=0,m=0,g=!1;do{if(t(e[h],c[d])<0){if(e[f++]=e[h++],m++,p=0,0==--l){g=!0;break}}else if(e[f++]=c[d++],p++,m=0,1==--r){g=!0;break}}while((p|m)<v);if(g)break;do{if(0!==(p=a(e[h],c,d,r,0,t))){for(u=0;u<p;u++)e[f+u]=c[d+u];if(f+=p,d+=p,(r-=p)<=1){g=!0;break}}if(e[f++]=e[h++],0==--l){g=!0;break}if(0!==(m=i(c[d],e,h,l,0,t))){for(u=0;u<m;u++)e[f+u]=e[h+u];if(f+=m,h+=m,0===(l-=m)){g=!0;break}}if(e[f++]=c[d++],1==--r){g=!0;break}v--}while(p>=7||m>=7);if(g)break;v<0&&(v=0),v+=2}if((s=v)<1&&(s=1),1===r){for(u=0;u<l;u++)e[f+u]=e[h+u];e[f+l]=c[d]}else{if(0===r)throw new Error;for(u=0;u<r;u++)e[f+u]=c[d+u]}}(u,d,h,f):function(n,r,o,l){var u=0;for(u=0;u<l;u++)c[u]=e[o+u];var d=n+r-1,h=l-1,f=o+l-1,p=0,m=0;if(e[f--]=e[d--],0==--r){for(p=f-(l-1),u=0;u<l;u++)e[p+u]=c[u];return}if(1===l){for(m=(f-=r)+1,p=(d-=r)+1,u=r-1;u>=0;u--)e[m+u]=e[p+u];return void(e[f]=c[h])}var g=s;for(;;){var v=0,b=0,y=!1;do{if(t(c[h],e[d])<0){if(e[f--]=e[d--],v++,b=0,0==--r){y=!0;break}}else if(e[f--]=c[h--],b++,v=0,1==--l){y=!0;break}}while((v|b)<g);if(y)break;do{if(0!==(v=r-a(c[h],e,n,r,r-1,t))){for(r-=v,m=(f-=v)+1,p=(d-=v)+1,u=v-1;u>=0;u--)e[m+u]=e[p+u];if(0===r){y=!0;break}}if(e[f--]=c[h--],1==--l){y=!0;break}if(0!==(b=l-i(e[d],c,0,l,l-1,t))){for(l-=b,m=(f-=b)+1,p=(h-=b)+1,u=0;u<b;u++)e[m+u]=c[p+u];if(l<=1){y=!0;break}}if(e[f--]=e[d--],0==--r){y=!0;break}g--}while(v>=7||b>=7);if(y)break;g<0&&(g=0),g+=2}(s=g)<1&&(s=1);if(1===l){for(m=(f-=r)+1,p=(d-=r)+1,u=r-1;u>=0;u--)e[m+u]=e[p+u];e[f]=c[h]}else{if(0===l)throw new Error;for(p=f-(l-1),u=0;u<l;u++)e[p+u]=c[u]}}(u,d,h,f))}r=[],o=[],this.mergeRuns=function(){for(;l>1;){var e=l-2;if(e>=1&&o[e-1]<=o[e]+o[e+1]||e>=2&&o[e-2]<=o[e]+o[e-1])o[e-1]<o[e+1]&&e--;else if(o[e]>o[e+1])break;u(e)}},this.forceMergeRuns=function(){for(;l>1;){var e=l-2;e>0&&o[e-1]<o[e+1]&&e--,u(e)}},this.pushRun=function(e,t){r[l]=e,o[l]=t,l+=1}}e.exports=function(e,t,i,a){i||(i=0),a||(a=e.length);var s=a-i;if(!(s<2)){var l=0;if(s<32)r(e,i,a,i+(l=n(e,i,a,t)),t);else{var c=new o(e,t),u=function(e){for(var t=0;e>=32;)t|=1&e,e>>=1;return e+t}(s);do{if((l=n(e,i,a,t))<u){var d=s;d>u&&(d=u),r(e,i,i+d,i+l,t),l=d}c.pushRun(i,l),c.mergeRuns(),s-=l,i+=l}while(0!==s);c.forceMergeRuns()}}}},BU3w:
|
|
|
/*!***************************************************!*\
|
|
|
!*** ./node_modules/rc-util/es/Dom/dynamicCSS.js ***!
|
|
|
\***************************************************/
|
|
|
/*! exports provided: injectCSS, updateCSS */
|
|
|
/*! exports used: updateCSS */function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(/*! ./canUseDom */"MNnm");function i(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function a(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Object(r.a)())return null;var a,o=document.createElement("style");(null===(t=n.csp)||void 0===t?void 0:t.nonce)&&(o.nonce=null===(a=n.csp)||void 0===a?void 0:a.nonce);o.innerHTML=e;var s=i(n),l=s.firstChild;return n.prepend&&s.prepend?s.prepend(o):n.prepend&&l?s.insertBefore(o,l):s.appendChild(o),o}var o=new Map;function s(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=i(n);if(!o.has(r)){var s=a("",n),l=s.parentNode;o.set(r,l),l.removeChild(s)}var c=Array.from(o.get(r).children).find((function(e){return"STYLE"===e.tagName&&e["rc-util-key"]===t}));if(c){var u,d,h;if((null===(u=n.csp)||void 0===u?void 0:u.nonce)&&c.nonce!==(null===(d=n.csp)||void 0===d?void 0:d.nonce))c.nonce=null===(h=n.csp)||void 0===h?void 0:h.nonce;return c.innerHTML!==e&&(c.innerHTML=e),c}var f=a(e,n);return f["rc-util-key"]=t,f}},Bd2K:
|
|
|
/*!********************************************************!*\
|
|
|
!*** ./node_modules/codemirror/addon/edit/closetag.js ***!
|
|
|
\********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){e.defineOption("autoCloseTags",!1,(function(o,s,l){if(l!=e.Init&&l&&o.removeKeyMap("autoCloseTags"),s){var c={name:"autoCloseTags"};"object"==typeof s&&!1===s.whenClosing||(c["'/'"]=function(t){return function(t){return t.getOption("disableInput")?e.Pass:r(t,!0)}(t)}),"object"==typeof s&&!1===s.whenOpening||(c["'>'"]=function(r){return function(r){if(r.getOption("disableInput"))return e.Pass;for(var o=r.listSelections(),s=[],l=r.getOption("autoCloseTags"),c=0;c<o.length;c++){if(!o[c].empty())return e.Pass;var u=o[c].head,d=r.getTokenAt(u),h=e.innerMode(r.getMode(),d.state),f=h.state,p=h.mode.xmlCurrentTag&&h.mode.xmlCurrentTag(f),m=p&&p.name;if(!m)return e.Pass;var g="html"==h.mode.configuration,v="object"==typeof l&&l.dontCloseTags||g&&t,b="object"==typeof l&&l.indentTags||g&&n;d.end>u.ch&&(m=m.slice(0,m.length-d.end+u.ch));var y=m.toLowerCase();if(!m||"string"==d.type&&(d.end!=u.ch||!/[\"\']/.test(d.string.charAt(d.string.length-1))||1==d.string.length)||"tag"==d.type&&p.close||d.string.indexOf("/")==u.ch-d.start-1||v&&i(v,y)>-1||a(r,h.mode.xmlCurrentContext&&h.mode.xmlCurrentContext(f)||[],m,u,!0))return e.Pass;var E="object"==typeof l&&l.emptyTags;if(E&&i(E,m)>-1)s[c]={text:"/>",newPos:e.Pos(u.line,u.ch+2)};else{var x=b&&i(b,y)>-1;s[c]={indent:x,text:">"+(x?"\n\n":"")+"</"+m+">",newPos:x?e.Pos(u.line+1,0):e.Pos(u.line,u.ch+1)}}}var _="object"==typeof l&&l.dontIndentOnAutoClose;for(c=o.length-1;c>=0;c--){var k=s[c];r.replaceRange(k.text,o[c].head,o[c].anchor,"+insert");var w=r.listSelections().slice(0);w[c]={head:k.newPos,anchor:k.newPos},r.setSelections(w),!_&&k.indent&&(r.indentLine(k.newPos.line,null,!0),r.indentLine(k.newPos.line+1,null,!0))}}(r)}),o.addKeyMap(c)}}));var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function r(t,n){for(var r=t.listSelections(),i=[],o=n?"/":"</",s=t.getOption("autoCloseTags"),l="object"==typeof s&&s.dontIndentOnSlash,c=0;c<r.length;c++){if(!r[c].empty())return e.Pass;var u=r[c].head,d=t.getTokenAt(u),h=e.innerMode(t.getMode(),d.state),f=h.state;if(n&&("string"==d.type||"<"!=d.string.charAt(0)||d.start!=u.ch-1))return e.Pass;var p,m="xml"!=h.mode.name&&"htmlmixed"==t.getMode().name;if(m&&"javascript"==h.mode.name)p=o+"script";else if(m&&"css"==h.mode.name)p=o+"style";else{var g=h.mode.xmlCurrentContext&&h.mode.xmlCurrentContext(f);if(!g||g.length&&a(t,g,g[g.length-1],u))return e.Pass;p=o+g[g.length-1]}">"!=t.getLine(u.line).charAt(d.end)&&(p+=">"),i[c]=p}if(t.replaceSelections(i),r=t.listSelections(),!l)for(c=0;c<r.length;c++)(c==r.length-1||r[c].head.line<r[c+1].head.line)&&t.indentLine(r[c].head.line)}function i(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;++n)if(e[n]==t)return n;return-1}function a(t,n,r,i,a){if(!e.scanForClosingTag)return!1;var o=Math.min(t.lastLine()+1,i.line+500),s=e.scanForClosingTag(t,i,null,o);if(!s||s.tag!=r)return!1;for(var l=a?1:0,c=n.length-1;c>=0&&n[c]==r;c--)++l;for(i=s.to,c=1;c<l;c++){var u=e.scanForClosingTag(t,i,null,o);if(!u||u.tag!=r)return!1;i=u.to}return!0}e.commands.closeTag=function(e){return r(e)}}(n(/*! ../../lib/codemirror */"VrN/"),n(/*! ../fold/xml-fold */"osHv"))},BdwD:
|
|
|
/*!*****************************************!*\
|
|
|
!*** ./src/components/NoData/index.tsx ***!
|
|
|
\*****************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/button/style */"+L6B");var r=n(/*! antd/es/button */"2/Rp"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */"0Owb"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),o=n(/*! react */"q1tI"),s=n.n(o),l=n(/*! @/assets/images/icons/nodata.png */"FOrL"),c=n.n(l);t.a=function(e){var t=e.buttonProps,n=void 0===t?{}:t,o=e.styles,l=void 0===o?{}:o,u=e.customText,d=e.ButtonText,h=e.ButtonClick,f=e.Buttonclass,p=e.ButtonTwo;return s.a.createElement("section",{className:"tc animated fadeIn",style:Object(a.a)(Object(a.a)({},{color:"#999",margin:"200px auto"}),l)},s.a.createElement("img",{src:c.a}),s.a.createElement("p",{className:"mt20 font14"},u||"暂时还没有相关数据哦!"),d&&s.a.createElement(r.a,Object(i.a)({className:f,onClick:h},n),d),p&&p)}},BjJ7:
|
|
|
/*!*********************************!*\
|
|
|
!*** ./src/pages/tasks/util.js ***!
|
|
|
\*********************************/
|
|
|
/*! exports provided: isCompileOk, getTreeData, processTreeData, debounce, isProd, apiPref */
|
|
|
/*! exports used: apiPref, debounce, getTreeData, isCompileOk, processTreeData */function(e,t,n){"use strict";function r(e){var t=!0;if(e.length>0){for(var n=0;n<e.length;n++)if(0==e[n].compile_success||!e[n].compile_success){t=!1;break}}else t=!1;return t}function i(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=[],r=0;r<e.length;r++){var i=e[r],a=t?"".concat(t,"/").concat(i.name):"".concat(i.name);n.push({title:i.name,isLeaf:"tree"!==i.type,key:a})}return n}function a(e,t,n){for(var r=0;r<e.length;r++){var i=e[r];if(i.key===t){i.children=n;break}i.children&&a(i.children,t,n)}return e}function o(e,t,n){var r;return function(){var i=this,a=arguments,o=function(){r=null,n||e.apply(i,a)},s=n&&!r;clearTimeout(r),r=setTimeout(o,t),s&&e.apply(i,a)}}n.d(t,"d",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"e",(function(){return a})),n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return s}));var s=n(/*! @/utils/env */"m3rI").a.API_SERVER},BlVb:
|
|
|
/*!*****************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/contain/polygon.js ***!
|
|
|
\*****************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./windingLine */"hyiK");function i(e,t){return Math.abs(e-t)<1e-8}t.contain=function(e,t,n){var a=0,o=e[0];if(!o)return!1;for(var s=1;s<e.length;s++){var l=e[s];a+=r(o[0],o[1],l[0],l[1],t,n),o=l}var c=e[0];return i(o[0],c[0])&&i(o[1],c[1])||(a+=r(o[0],o[1],c[0],c[1],t,n)),0!==a}},Bq2U:
|
|
|
/*!********************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/animation/Animator.js ***!
|
|
|
\********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./Clip */"RDYZ"),i=n(/*! ../tool/color */"Qe9p"),a=n(/*! ../core/util */"bYtY").isArrayLike,o=Array.prototype.slice;function s(e,t){return e[t]}function l(e,t,n){e[t]=n}function c(e,t,n){return(t-e)*n+e}function u(e,t,n){return n>.5?t:e}function d(e,t,n,r,i){var a=e.length;if(1===i)for(var o=0;o<a;o++)r[o]=c(e[o],t[o],n);else{var s=a&&e[0].length;for(o=0;o<a;o++)for(var l=0;l<s;l++)r[o][l]=c(e[o][l],t[o][l],n)}}function h(e,t,n){var r=e.length,i=t.length;if(r!==i)if(r>i)e.length=i;else for(var a=r;a<i;a++)e.push(1===n?t[a]:o.call(t[a]));var s=e[0]&&e[0].length;for(a=0;a<e.length;a++)if(1===n)isNaN(e[a])&&(e[a]=t[a]);else for(var l=0;l<s;l++)isNaN(e[a][l])&&(e[a][l]=t[a][l])}function f(e,t,n){if(e===t)return!0;var r=e.length;if(r!==t.length)return!1;if(1===n){for(var i=0;i<r;i++)if(e[i]!==t[i])return!1}else{var a=e[0].length;for(i=0;i<r;i++)for(var o=0;o<a;o++)if(e[i][o]!==t[i][o])return!1}return!0}function p(e,t,n,r,i,a,o,s,l){var c=e.length;if(1===l)for(var u=0;u<c;u++)s[u]=m(e[u],t[u],n[u],r[u],i,a,o);else{var d=e[0].length;for(u=0;u<c;u++)for(var h=0;h<d;h++)s[u][h]=m(e[u][h],t[u][h],n[u][h],r[u][h],i,a,o)}}function m(e,t,n,r,i,a,o){var s=.5*(n-e),l=.5*(r-t);return(2*(t-n)+s+l)*o+(-3*(t-n)-2*s-l)*a+s*i+t}function g(e){if(a(e)){var t=e.length;if(a(e[0])){for(var n=[],r=0;r<t;r++)n.push(o.call(e[r]));return n}return o.call(e)}return e}function v(e){return e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.floor(e[2]),"rgba("+e.join(",")+")"}function b(e,t,n,o,s,l){var g=e._getter,b=e._setter,y="spline"===t,E=o.length;if(E){var x,_=o[0].value,k=a(_),w=!1,C=!1,S=k?function(e){var t=e[e.length-1].value;return a(t&&t[0])?2:1}(o):0;o.sort((function(e,t){return e.time-t.time})),x=o[E-1].time;for(var O=[],A=[],T=o[0].value,I=!0,D=0;D<E;D++){O.push(o[D].time/x);var L=o[D].value;if(k&&f(L,T,S)||!k&&L===T||(I=!1),T=L,"string"==typeof L){var R=i.parse(L);R?(L=R,w=!0):C=!0}A.push(L)}if(l||!I){var N=A[E-1];for(D=0;D<E-1;D++)k?h(A[D],N,S):!isNaN(A[D])||isNaN(N)||C||w||(A[D]=N);k&&h(g(e._target,s),N,S);var j,M,P,B,F,U=0,H=0;if(w)var z=[0,0,0,0];var G=new r({target:e._target,life:x,loop:e._loop,delay:e._delay,onframe:function(e,t){var n;if(t<0)n=0;else if(t<H){for(n=Math.min(U+1,E-1);n>=0&&!(O[n]<=t);n--);n=Math.min(n,E-2)}else{for(n=U;n<E&&!(O[n]>t);n++);n=Math.min(n-1,E-2)}U=n,H=t;var r=O[n+1]-O[n];if(0!==r)if(j=(t-O[n])/r,y)if(P=A[n],M=A[0===n?n:n-1],B=A[n>E-2?E-1:n+1],F=A[n>E-3?E-1:n+2],k)p(M,P,B,F,j,j*j,j*j*j,g(e,s),S);else{if(w)i=p(M,P,B,F,j,j*j,j*j*j,z,1),i=v(z);else{if(C)return u(P,B,j);i=m(M,P,B,F,j,j*j,j*j*j)}b(e,s,i)}else if(k)d(A[n],A[n+1],j,g(e,s),S);else{var i;if(w)d(A[n],A[n+1],j,z,1),i=v(z);else{if(C)return u(A[n],A[n+1],j);i=c(A[n],A[n+1],j)}b(e,s,i)}},ondestroy:n});return t&&"spline"!==t&&(G.easing=t),G}}}var y=function(e,t,n,r){this._tracks={},this._target=e,this._loop=t||!1,this._getter=n||s,this._setter=r||l,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};y.prototype={when:function(e,t){var n=this._tracks;for(var r in t)if(t.hasOwnProperty(r)){if(!n[r]){n[r]=[];var i=this._getter(this._target,r);if(null==i)continue;0!==e&&n[r].push({time:0,value:g(i)})}n[r].push({time:e,value:t[r]})}return this},during:function(e){return this._onframeList.push(e),this},pause:function(){for(var e=0;e<this._clipList.length;e++)this._clipList[e].pause();this._paused=!0},resume:function(){for(var e=0;e<this._clipList.length;e++)this._clipList[e].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var e=this._doneList,t=e.length,n=0;n<t;n++)e[n].call(this)},start:function(e,t){var n,r=this,i=0,a=function(){--i||r._doneCallback()};for(var o in this._tracks)if(this._tracks.hasOwnProperty(o)){var s=b(this,e,a,this._tracks[o],o,t);s&&(this._clipList.push(s),i++,this.animation&&this.animation.addClip(s),n=s)}if(n){var l=n.onframe;n.onframe=function(e,t){l(e,t);for(var n=0;n<r._onframeList.length;n++)r._onframeList[n](e,t)}}return i||this._doneCallback(),this},stop:function(e){for(var t=this._clipList,n=this.animation,r=0;r<t.length;r++){var i=t[r];e&&i.onframe(this._target,1),n&&n.removeClip(i)}t.length=0},delay:function(e){return this._delay=e,this},done:function(e){return e&&this._doneList.push(e),this},getClips:function(){return this._clipList}};var E=y;e.exports=E},"C+DQ":
|
|
|
/*!*********************************************************!*\
|
|
|
!*** ./src/components/markdown-editor/css/iconfont.css ***!
|
|
|
\*********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},C0SR:
|
|
|
/*!*****************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/core/GestureMgr.js ***!
|
|
|
\*****************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./event */"YH21"),i=function(){this._track=[]};function a(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}i.prototype={constructor:i,recognize:function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},clear:function(){return this._track.length=0,this},_doTrack:function(e,t,n){var i=e.touches;if(i){for(var a={points:[],touches:[],target:t,event:e},o=0,s=i.length;o<s;o++){var l=i[o],c=r.clientToLocal(n,l,{});a.points.push([c.zrX,c.zrY]),a.touches.push(l)}this._track.push(a)}},_recognize:function(e){for(var t in o)if(o.hasOwnProperty(t)){var n=o[t](this._track,e);if(n)return n}}};var o={pinch:function(e,t){var n=e.length;if(n){var r,i=(e[n-1]||{}).points,o=(e[n-2]||{}).points||i;if(o&&o.length>1&&i&&i.length>1){var s=a(i)/a(o);!isFinite(s)&&(s=1),t.pinchScale=s;var l=[((r=i)[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return t.pinchX=l[0],t.pinchY=l[1],{type:"pinch",target:e[0].target,event:t}}}}},s=i;e.exports=s},CCdo:
|
|
|
/*!***************************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Detail/components/Redo/index.less?modules ***!
|
|
|
\***************************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___3ACWg",flex_space_between:"flex_space_between___2YdIf",flex_box_vertical_center:"flex_box_vertical_center___lNx6c",flex_box_center_end:"flex_box_center_end___1EQGR",flex_box_column:"flex_box_column___3gBVY",title:"title___1Uu39",search:"search___17Xmk",head:"head___3jpio",row:"row___2jdpt",btns:"btns___3Qg_w",sort:"sort___uQoc6"}},CIbS:
|
|
|
/*!********************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/components/Publish.tsx ***!
|
|
|
\********************************************************************/
|
|
|
/*! exports provided: disabledTime, default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/modal/style */"2qtc");var r=n(/*! antd/es/modal */"kLXV"),i=(n(/*! antd/es/spin/style */"T2oS"),n(/*! antd/es/spin */"W9HT")),a=(n(/*! antd/es/checkbox/style */"sRBo"),n(/*! antd/es/checkbox */"kaz8")),o=(n(/*! antd/es/radio/style */"7Kak"),n(/*! antd/es/radio */"9yH6")),s=(n(/*! antd/es/row/style */"14J3"),n(/*! antd/es/row */"BMrR")),l=(n(/*! antd/es/date-picker/style */"iQDF"),n(/*! antd/es/date-picker */"+eQT")),c=(n(/*! antd/es/message/style */"miYZ"),n(/*! antd/es/message */"tsqr")),u=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty */"jrin"),d=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),h=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),f=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),p=(n(/*! antd/es/form/style */"y8nQ"),n(/*! antd/es/form */"Vl3Y")),m=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),g=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),v=n.n(g),b=n(/*! react */"q1tI"),y=n.n(b),E=n(/*! moment */"wd/R"),x=n.n(E),_=n(/*! @/utils/fetch */"ErOA"),k=n(/*! @/utils/util */"1vsH"),w=n(/*! umi */"Ty5D"),C=n(/*! umi */"9kvl"),S=n(/*! @/service/exercise */"V0Rq"),O=n(/*! @/assets/images/paper/jinshi.svg */"6K3P"),A=n.n(O),T=n(/*! ./TrfList */"jr/l");function I(e,t){for(var n=[],r=e;r<t;r++)n.push(r);return n}var D=function(e){var t=new Date,n=x()(e).format("HH");if(x()(e).isSame(x()(t),"day")){var r=x()(t).format("HH"),i=x()(t).format("mm");return{disabledHours:function(){return I(0,24).splice(1,1*r-1)},disabledMinutes:function(){return console.log("禁止时间:",n,r),x()(e).isSame(x()(t),"hour")&&n<=r?I(0,60).splice(0,i):I(60,60)}}}if(x()(e).isSame(x()(),"day")){var a=x()().format("HH"),o=x()().format("mm");return{disabledHours:function(){return I(0,24).splice(0,a)},disabledMinutes:function(){return n<=a?I(0,o):I(60,60)}}}return!1};t.a=Object(C.a)((function(e){return{exercise:e.exercise}}))((function(e){var t,n,g=e.exercise,E=e.dispatch,C=Object(w.i)(),O=p.a.useForm(),I=Object(m.a)(O,1)[0],L=Object(b.useState)(1),R=Object(m.a)(L,2),N=R[0],j=R[1],M=Object(b.useState)([]),P=Object(m.a)(M,2),B=P[0],F=P[1],U=Object(b.useState)(!0),H=Object(m.a)(U,2),z=H[0],G=H[1],V=Object(b.useState)([]),W=Object(m.a)(V,2),K=W[0],q=W[1],Y=Object(b.useState)(!0),Q=Object(m.a)(Y,2),J=Q[0],X=Q[1],Z=Object(b.useState)(!1),$=Object(m.a)(Z,2),ee=$[0],te=$[1];Object(b.useEffect)((function(){"批量发布"===g.actionTabs.key&&ne()}),[g.actionTabs]);var ne=function(){var e=Object(f.a)(v.a.mark((function e(t){var n,r,i,a;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return G(!0),e.next=3,Object(S.t)({coursesId:C.coursesId,check_ids:g.actionTabs.selectArrs,page:N,limit:2e4});case 3:r=e.sent,console.log(r,"res"),i=(null==r||null===(n=r.course_info)||void 0===n?void 0:n.map((function(e,t){return Object(h.a)(Object(h.a)({},e),{},{key:e.course_group_id,title:e.course_group_name,name:e.course_group_name,disabled:!!e.is_published})})))||[],-1!==(null==r?void 0:r.status)&&(F(Object(d.a)(i)),I.setFieldsValue((a={},Object(u.a)(a,"publish_time",x()(x()(new Date).add(0,"days").format("YYYY-MM-DD HH:mm"))),Object(u.a)(a,"end_time",x()(x()(new Date(Object(k.b)("/"))).add(1,"days").format("YYYY-MM-DD HH:mm"))),a))),G(!1);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),re=function(){var e=Object(f.a)(v.a.mark((function e(){var t,n,r,i,a,o;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Object(h.a)({},I.getFieldsValue()),n=x()(x()(t.publish_time).format("YYYY-MM-DD HH:mm")).valueOf(),r=x()(x()(t.end_time).format("YYYY-MM-DD HH:mm")).valueOf(),console.log(n,n,33),!(r<=n)){e.next=7;break}return c.b.info("结束时间不允许小于等于开始时间"),e.abrupt("return");case 7:if(!((null==K?void 0:K.length)<=0&&!J&&B.length>0)){e.next=10;break}return c.b.info("班级不能为空"),e.abrupt("return");case 10:return te(!0),B.map((function(e){return e.key})),i={check_ids:Object(d.a)(g.actionTabs.selectArrs),end_time:x()(t.end_time).format("YYYY-MM-DD HH:mm"),publish_time:x()(t.publish_time).format("YYYY-MM-DD HH:mm")},J?i.unified_setting=!0:i.group_ids=K.map((function(e){return e.course_group_id})),e.next=16,Object(_.a)("/api/courses/".concat(C.coursesId,"/exercises/publish.json"),{method:"post",body:i});case 16:0===e.sent.status&&(Object(k.ab)(["教学课堂","试卷","立即发布"]),ie(),c.b.success("发布成功"),E({type:"exercise/setActionTabs",payload:{}}),null!=g&&null!==(a=g.actionTabs)&&void 0!==a&&a.cb?null==g||null===(o=g.actionTabs)||void 0===o||o.cb():E({type:"classroomList/getClassroomExercisesList",payload:Object(h.a)({},g.actionTabs.params)})),te(!1);case 19:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ie=function(){j(1),F([]),q([])};return y.a.createElement(r.a,{centered:!0,title:"发布作业与测验",visible:"批量发布"===g.actionTabs.key,okText:"确认",cancelText:"取消",onOk:re,confirmLoading:ee||z,onCancel:function(){ie(),E({type:"exercise/setActionTabs",payload:{}})}},y.a.createElement(i.a,{spinning:z},B&&y.a.createElement(p.a,{form:I},!(null==g||null===(t=g.actionTabs)||void 0===t||!t.disabled)&&y.a.createElement("div",{style:{color:"#333333",display:"flex"},className:"font14 mb10"},y.a.createElement("img",{style:{marginRight:5},src:A.a}),"已经发布过作业与测验的作业与测验不可以统一发布。"),y.a.createElement(s.a,null,y.a.createElement("span",{className:"mr10 mt5"},y.a.createElement("span",{style:{color:"red",marginRight:3}},"*"),"作业与测验时间"),y.a.createElement(p.a.Item,{name:"publish_time"},y.a.createElement(l.a,{style:{width:155},getPopupContainer:function(e){return e.parentNode},disabledDate:function(e){return e&&e<=x()().subtract(0,"days")},disabledTime:D,placeholder:"请选择发布时间",showTime:{format:"HH:mm",defaultValue:x()(Object(k.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",allowClear:!1})),y.a.createElement("span",{className:"mt5 ml5 mr5"},"到"),y.a.createElement(p.a.Item,{name:"end_time"},y.a.createElement(l.a,{style:{width:170},getPopupContainer:function(e){return e.parentNode},placeholder:"请选择结束时间",showTime:{format:"HH:mm",defaultValue:x()(Object(k.d)(),"HH:mm")},disabledDate:function(e){return e&&e<x()().subtract(0,"days")},disabledTime:D,format:"YYYY-MM-DD HH:mm",allowClear:!1}))),2===g.actionTabs.type&&y.a.createElement(s.a,{style:{marginBottom:"10px"}},y.a.createElement("span",{className:"mr10"},y.a.createElement("span",{style:{color:"red",marginRight:3}},"*"),"选择班级"),y.a.createElement(o.a.Group,{value:J,onChange:function(e){X(e.target.value),q([])}},y.a.createElement(o.a,{disabled:!(null==g||null===(n=g.actionTabs)||void 0===n||!n.disabled)||B.some((function(e){return null==e?void 0:e.is_published})),value:!0},"统一发布"),y.a.createElement(o.a,{disabled:B.length<=0,value:!1},"分班发布"))),B.length<=0&&2===g.actionTabs.type&&y.a.createElement("span",{style:{marginLeft:"65px",color:"rgba(0, 0, 0, 0.25)"}},'课堂无分班,仅支持选择“统一发布"'),(1===g.actionTabs.type||!J)&&B.length>0&&y.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"10px"}},y.a.createElement("span",{style:{flex:1}},y.a.createElement(a.a,{checked:K.length===B.length,onChange:function(e){K.length===B.length?q([]):q(B)}},"全选")," "),y.a.createElement("span",{style:{width:16}}),y.a.createElement("span",{style:{flex:1}},"已选择",K.length||0,"个分班")),(1===g.actionTabs.type||!J)&&B.length>0&&y.a.createElement(T.a,{data:B,selectedRowKeys:K,setSelectedRowKeys:q}))))}))},"CY+3":
|
|
|
/*!******************************************************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Detail/components/StatisticsResult/PaperStatistic/index.less?modules ***!
|
|
|
\******************************************************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={chartWrapper:"chartWrapper___2ZM-e",title:"title___1xNrx"}},D1Df:
|
|
|
/*!************************************************!*\
|
|
|
!*** ./node_modules/qrcode.react/lib/index.js ***!
|
|
|
\************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(n,!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}function d(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?f(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=n(/*! react */"q1tI"),b=(n(/*! prop-types */"17x9"),n(/*! qr.js/lib/QRCode */"H38U")),y=n(/*! qr.js/lib/ErrorCorrectLevel */"aRTE");function E(e){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r<2048?(t+=String.fromCharCode(192|r>>6),t+=String.fromCharCode(128|63&r)):r<55296||r>=57344?(t+=String.fromCharCode(224|r>>12),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r)):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t+=String.fromCharCode(240|r>>18),t+=String.fromCharCode(128|r>>12&63),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r))}return t}var x={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1};function _(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[];return e.forEach((function(e,r){var i=null;e.forEach((function(a,o){if(!a&&null!==i)return n.push("M".concat(i+t," ").concat(r+t,"h").concat(o-i,"v1H").concat(i+t,"z")),void(i=null);if(o!==e.length-1)a&&null===i&&(i=o);else{if(!a)return;null===i?n.push("M".concat(o+t,",").concat(r+t," h1v1H").concat(o+t,"z")):n.push("M".concat(i+t,",").concat(r+t," h").concat(o+1-i,"v1H").concat(i+t,"z"))}}))})),n.join("")}function k(e,t){return e.slice().map((function(e,n){return n<t.y||n>=t.y+t.h?e:e.map((function(e,n){return(n<t.x||n>=t.x+t.w)&&e}))}))}function w(e,t){var n=e.imageSettings,r=e.size,i=e.includeMargin;if(null==n)return null;var a=i?4:0,o=t.length+2*a,s=Math.floor(.1*r),l=o/r,c=(n.width||s)*l,u=(n.height||s)*l,d=null==n.x?t.length/2-c/2:n.x*l,h=null==n.y?t.length/2-u/2:n.y*l,f=null;if(n.excavate){var p=Math.floor(d),m=Math.floor(h);f={x:p,y:m,w:Math.ceil(c+d-p),h:Math.ceil(u+h-m)}}return{x:d,y:h,h:u,w:c,excavation:f}}var C=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}(),S=function(e){function t(){var e,n;l(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return g(f(n=d(this,(e=h(t)).call.apply(e,[this].concat(i)))),"_canvas",void 0),g(f(n),"_image",void 0),g(f(n),"state",{imgLoaded:!1}),g(f(n),"handleImageLoad",(function(){n.setState({imgLoaded:!0})})),n}return p(t,e),u(t,[{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var e=this.props,t=e.value,n=e.size,r=e.level,i=e.bgColor,a=e.fgColor,o=e.includeMargin,s=e.imageSettings,l=new b(-1,y[r]);if(l.addData(E(t)),l.make(),null!=this._canvas){var c=this._canvas,u=c.getContext("2d");if(!u)return;var d=l.modules;if(null===d)return;var h=o?4:0,f=d.length+2*h,p=w(this.props,d);null!=s&&null!=p&&null!=p.excavation&&(d=k(d,p.excavation));var m=window.devicePixelRatio||1;c.height=c.width=n*m;var g=n/f*m;u.scale(g,g),u.fillStyle=i,u.fillRect(0,0,f,f),u.fillStyle=a,C?u.fill(new Path2D(_(d,h))):d.forEach((function(e,t){e.forEach((function(e,n){e&&u.fillRect(n+h,t+h,1,1)}))})),this.state.imgLoaded&&this._image&&null!=p&&u.drawImage(this._image,p.x+h,p.y+h,p.w,p.h)}}},{key:"render",value:function(){var e=this,t=this.props,n=(t.value,t.size),r=(t.level,t.bgColor,t.fgColor,t.style),a=(t.includeMargin,t.imageSettings),l=s(t,["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"]),c=o({height:n,width:n},r),u=null,d=a&&a.src;return null!=a&&null!=d&&(u=v.createElement("img",{src:d,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(t){return e._image=t}})),v.createElement(v.Fragment,null,v.createElement("canvas",i({style:c,height:n,width:n,ref:function(t){return e._canvas=t}},l)),u)}}]),t}(v.PureComponent);g(S,"defaultProps",x);var O=function(e){function t(){return l(this,t),d(this,h(t).apply(this,arguments))}return p(t,e),u(t,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.size,r=e.level,a=e.bgColor,o=e.fgColor,l=e.includeMargin,c=e.imageSettings,u=s(e,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),d=new b(-1,y[r]);d.addData(E(t)),d.make();var h=d.modules;if(null===h)return null;var f=l?4:0,p=h.length+2*f,m=w(this.props,h),g=null;null!=c&&null!=m&&(null!=m.excavation&&(h=k(h,m.excavation)),g=v.createElement("image",{xlinkHref:c.src,height:m.h,width:m.w,x:m.x+f,y:m.y+f,preserveAspectRatio:"none"}));var x=_(h,f);return v.createElement("svg",i({shapeRendering:"crispEdges",height:n,width:n,viewBox:"0 0 ".concat(p," ").concat(p)},u),v.createElement("path",{fill:a,d:"M0,0 h".concat(p,"v").concat(p,"H0z")}),v.createElement("path",{fill:o,d:x}),g)}}]),t}(v.PureComponent);g(O,"defaultProps",x);var A=function(e){var t=e.renderAs,n=s(e,["renderAs"]),r="svg"===t?O:S;return v.createElement(r,n)};A.defaultProps=o({renderAs:"canvas"},x),e.exports=A},DBLp:
|
|
|
/*!*****************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/core/arrayDiff2.js ***!
|
|
|
\*****************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){function n(){}function r(e,t,n,r){for(var i=0,a=t.length,o=0,s=0;i<a;i++){var l=t[i];if(l.removed){for(c=[],u=s;u<s+l.count;u++)c.push(u);l.indices=c,s+=l.count}else{for(var c=[],u=o;u<o+l.count;u++)c.push(u);l.indices=c,o+=l.count,l.added||(s+=l.count)}}return t}n.prototype={diff:function(e,t,n){n||(n=function(e,t){return e===t}),this.equals=n;var i=this;e=e.slice();var a=(t=t.slice()).length,o=e.length,s=1,l=a+o,c=[{newPos:-1,components:[]}],u=this.extractCommon(c[0],t,e,0);if(c[0].newPos+1>=a&&u+1>=o){for(var d=[],h=0;h<t.length;h++)d.push(h);return[{indices:d,count:t.length}]}function f(){for(var n=-1*s;n<=s;n+=2){var l,u=c[n-1],d=c[n+1],h=(d?d.newPos:0)-n;u&&(c[n-1]=void 0);var f=u&&u.newPos+1<a,p=d&&0<=h&&h<o;if(f||p){if(!f||p&&u.newPos<d.newPos?(l={newPos:(m=d).newPos,components:m.components.slice(0)},i.pushComponent(l.components,void 0,!0)):((l=u).newPos++,i.pushComponent(l.components,!0,void 0)),h=i.extractCommon(l,t,e,n),l.newPos+1>=a&&h+1>=o)return r(i,l.components,t,e);c[n]=l}else c[n]=void 0}var m;s++}for(;s<=l;){var p=f();if(p)return p}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var i=t.length,a=n.length,o=e.newPos,s=o-r,l=0;o+1<i&&s+1<a&&this.equals(t[o+1],n[s+1]);)o++,s++,l++;return l&&e.components.push({count:l}),e.newPos=o,s},tokenize:function(e){return e.slice()},join:function(e){return e.slice()}};var i=new n;e.exports=function(e,t,n){return i.diff(e,t,n)}},DN4a:
|
|
|
/*!*********************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/mixin/Transformable.js ***!
|
|
|
\*********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/matrix */"Fofx"),i=n(/*! ../core/vector */"QBsz"),a=r.identity;function o(e){return e>5e-5||e<-5e-5}var s=function(e){(e=e||{}).position||(this.position=[0,0]),null==e.rotation&&(this.rotation=0),e.scale||(this.scale=[1,1]),this.origin=this.origin||null},l=s.prototype;l.transform=null,l.needLocalTransform=function(){return o(this.rotation)||o(this.position[0])||o(this.position[1])||o(this.scale[0]-1)||o(this.scale[1]-1)};var c=[];l.updateTransform=function(){var e=this.parent,t=e&&e.transform,n=this.needLocalTransform(),i=this.transform;if(n||t){i=i||r.create(),n?this.getLocalTransform(i):a(i),t&&(n?r.mul(i,e.transform,i):r.copy(i,e.transform)),this.transform=i;var o=this.globalScaleRatio;if(null!=o&&1!==o){this.getGlobalScale(c);var s=c[0]<0?-1:1,l=c[1]<0?-1:1,u=((c[0]-s)*o+s)/c[0]||0,d=((c[1]-l)*o+l)/c[1]||0;i[0]*=u,i[1]*=u,i[2]*=d,i[3]*=d}this.invTransform=this.invTransform||r.create(),r.invert(this.invTransform,i)}else i&&a(i)},l.getLocalTransform=function(e){return s.getLocalTransform(this,e)},l.setTransform=function(e){var t=this.transform,n=e.dpr||1;t?e.setTransform(n*t[0],n*t[1],n*t[2],n*t[3],n*t[4],n*t[5]):e.setTransform(n,0,0,n,0,0)},l.restoreTransform=function(e){var t=e.dpr||1;e.setTransform(t,0,0,t,0,0)};var u=[],d=r.create();l.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=this.position,i=this.scale;o(t-1)&&(t=Math.sqrt(t)),o(n-1)&&(n=Math.sqrt(n)),e[0]<0&&(t=-t),e[3]<0&&(n=-n),r[0]=e[4],r[1]=e[5],i[0]=t,i[1]=n,this.rotation=Math.atan2(-e[1]/n,e[0]/t)}},l.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(r.mul(u,e.invTransform,t),t=u);var n=this.origin;n&&(n[0]||n[1])&&(d[4]=n[0],d[5]=n[1],r.mul(u,t,d),u[4]-=n[0],u[5]-=n[1],t=u),this.setLocalTransform(t)}},l.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},l.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&i.applyTransform(n,n,r),n},l.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&i.applyTransform(n,n,r),n},s.getLocalTransform=function(e,t){a(t=t||[]);var n=e.origin,i=e.scale||[1,1],o=e.rotation||0,s=e.position||[0,0];return n&&(t[4]-=n[0],t[5]-=n[1]),r.scale(t,t,i),o&&r.rotate(t,t,o),n&&(t[4]+=n[0],t[5]+=n[1]),t[4]+=s[0],t[5]+=s[1],t};var h=s;e.exports=h},Dagg:
|
|
|
/*!***************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/Image.js ***!
|
|
|
\***************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./Displayable */"Gev7"),i=n(/*! ../core/BoundingRect */"mFDi"),a=n(/*! ../core/util */"bYtY"),o=n(/*! ./helper/image */"Xnb7");function s(e){r.call(this,e)}s.prototype={constructor:s,type:"image",brush:function(e,t){var n=this.style,r=n.image;n.bind(e,this,t);var i=this._image=o.createOrUpdateImage(r,this._image,this,this.onload);if(i&&o.isImageReady(i)){var a=n.x||0,s=n.y||0,l=n.width,c=n.height,u=i.width/i.height;if(null==l&&null!=c?l=c*u:null==c&&null!=l?c=l/u:null==l&&null==c&&(l=i.width,c=i.height),this.setTransform(e),n.sWidth&&n.sHeight){var d=n.sx||0,h=n.sy||0;e.drawImage(i,d,h,n.sWidth,n.sHeight,a,s,l,c)}else if(n.sx&&n.sy){var f=l-(d=n.sx),p=c-(h=n.sy);e.drawImage(i,d,h,f,p,a,s,l,c)}else e.drawImage(i,a,s,l,c);null!=n.text&&(this.restoreTransform(e),this.drawRectText(e,this.getBoundingRect()))}},getBoundingRect:function(){var e=this.style;return this._rect||(this._rect=new i(e.x||0,e.y||0,e.width||0,e.height||0)),this._rect}},a.inherits(s,r);var l=s;e.exports=l},DlQD:
|
|
|
/*!*******************************************!*\
|
|
|
!*** ./node_modules/marked/lib/marked.js ***!
|
|
|
\*******************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=function(){"use strict";function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function n(e,n){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){r&&(e=r);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}var r=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){function t(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1},getDefaults:t,changeDefaults:function(t){e.exports.defaults=t}}})),i=(r.defaults,r.getDefaults,r.changeDefaults,/[&<>"']/),a=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(e){return l[e]},u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function d(e){return e.replace(u,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var h=/(^|[^\[])\^/g,f=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,m={},g=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,b=/^([^:]+:\/*[^/]*)[\s\S]*$/;function y(e,t){m[" "+e]||(g.test(e)?m[" "+e]=e+"/":m[" "+e]=E(e,"/",!0));var n=-1===(e=m[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(v,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(b,"$1")+t:e+t}function E(e,t,n){var r=e.length;if(0===r)return"";for(var i=0;i<r;){var a=e.charAt(r-i-1);if(a!==t||n){if(a===t||!n)break;i++}else i++}return e.substr(0,r-i)}var x=function(e,t){if(t){if(i.test(e))return e.replace(a,c)}else if(o.test(e))return e.replace(s,c);return e},_=d,k=function(e,t){e=e.source||e,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(h,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n},w=function(e,t,n){if(e){var r;try{r=decodeURIComponent(d(n)).replace(f,"").toLowerCase()}catch(e){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!p.test(n)&&(n=y(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n},C={exec:function(){}},S=function(e){for(var t,n,r=1;r<arguments.length;r++)for(n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},O=function(e,t){var n=e.replace(/\|/g,(function(e,t,n){for(var r=!1,i=t;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n},A=E,T=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,r=0,i=0;i<n;i++)if("\\"===e[i])i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&--r<0)return i;return-1},I=function(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")},D=r.defaults,L=A,R=O,N=x,j=T;function M(e,t,n){var r=t.href,i=t.title?N(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:n,href:r,title:i,text:a}:{type:"image",raw:n,href:r,title:i,text:N(a)}}var P=function(){function e(e){this.options=e||D}var t=e.prototype;return t.space=function(e){var t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e,t){var n=this.rules.block.code.exec(e);if(n){var r=t[t.length-1];if(r&&"paragraph"===r.type)return{raw:n[0],text:n[0].trimRight()};var i=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:L(i,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:r}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var n={type:"table",header:R(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(n.header.length===n.align.length){var r,i=n.align.length;for(r=0;r<i;r++)/^ *-+: *$/.test(n.align[r])?n.align[r]="right":/^ *:-+: *$/.test(n.align[r])?n.align[r]="center":/^ *:-+ *$/.test(n.align[r])?n.align[r]="left":n.align[r]=null;for(i=n.cells.length,r=0;r<i;r++)n.cells[r]=R(n.cells[r],n.header.length);return n}}},t.hr=function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}},t.blockquote=function(e){var t=this.rules.block.blockquote.exec(e);if(t){var n=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],text:n}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){for(var n,r,i,a,o,s,l,c=t[0],u=t[2],d=u.length>1,h=")"===u[u.length-1],f={type:"list",raw:c,ordered:d,start:d?+u.slice(0,-1):"",loose:!1,items:[]},p=t[0].match(this.rules.block.item),m=!1,g=p.length,v=0;v<g;v++)c=n=p[v],r=n.length,~(n=n.replace(/^ *([*+-]|\d+[.)]) */,"")).indexOf("\n ")&&(r-=n.length,n=this.options.pedantic?n.replace(/^ {1,4}/gm,""):n.replace(new RegExp("^ {1,"+r+"}","gm"),"")),v!==g-1&&(i=this.rules.block.bullet.exec(p[v+1])[0],(d?1===i.length||!h&&")"===i[i.length-1]:i.length>1||this.options.smartLists&&i!==u)&&(a=p.slice(v+1).join("\n"),f.raw=f.raw.substring(0,f.raw.length-a.length),v=g-1)),o=m||/\n\n(?!\s*$)/.test(n),v!==g-1&&(m="\n"===n.charAt(n.length-1),o||(o=m)),o&&(f.loose=!0),l=void 0,(s=/^\[[ xX]\] /.test(n))&&(l=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,"")),f.items.push({type:"list_item",raw:c,task:s,checked:l,loose:o,text:n});return f}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):N(t[0]):t[0]}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:R(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i=n.align.length;for(r=0;r<i;r++)/^ *-+: *$/.test(n.align[r])?n.align[r]="right":/^ *:-+: *$/.test(n.align[r])?n.align[r]="center":/^ *:-+ *$/.test(n.align[r])?n.align[r]="left":n.align[r]=null;for(i=n.cells.length,r=0;r<i;r++)n.cells[r]=R(n.cells[r].replace(/^ *\| *| *\| *$/g,""),n.header.length);return n}}},t.lheading=function(e){var t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1]}},t.paragraph=function(e){var t=this.rules.block.paragraph.exec(e);if(t)return{type:"paragraph",raw:t[0],text:"\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1]}},t.text=function(e,t){var n=this.rules.block.text.exec(e);if(n){var r=t[t.length-1];return r&&"text"===r.type?{raw:n[0],text:n[0]}:{type:"text",raw:n[0],text:n[0]}}},t.escape=function(e){var t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:N(t[1])}},t.tag=function(e,t,n){var r=this.rules.inline.tag.exec(e);if(r)return!t&&/^<a /i.test(r[0])?t=!0:t&&/^<\/a>/i.test(r[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):N(r[0]):r[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=j(t[2],"()");if(n>-1){var r=(0===t[0].indexOf("!")?5:4)+t[1].length+n;t[2]=t[2].substring(0,n),t[0]=t[0].substring(0,r).trim(),t[3]=""}var i=t[2],a="";if(this.options.pedantic){var o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);o?(i=o[1],a=o[3]):a=""}else a=t[3]?t[3].slice(1,-1):"";return M(t,{href:(i=i.trim().replace(/^<([\s\S]*)>$/,"$1"))?i.replace(this.rules.inline._escapes,"$1"):i,title:a?a.replace(this.rules.inline._escapes,"$1"):a},t[0])}},t.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return M(n,r,n[0])}},t.strong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.strong.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,a="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(a.lastIndex=0;null!=(r=a.exec(t));)if(i=this.rules.inline.strong.middle.exec(t.slice(0,r.index+3)))return{type:"strong",raw:e.slice(0,i[0].length),text:e.slice(2,i[0].length-2)}}},t.em=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.em.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,a="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(a.lastIndex=0;null!=(r=a.exec(t));)if(i=this.rules.inline.em.middle.exec(t.slice(0,r.index+2)))return{type:"em",raw:e.slice(0,i[0].length),text:e.slice(1,i[0].length-1)}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=n.startsWith(" ")&&n.endsWith(" ");return r&&i&&(n=n.substring(1,n.length-1)),n=N(n,!0),{type:"codespan",raw:t[0],text:n}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[1]}},t.autolink=function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=N(this.options.mangle?t(i[1]):i[1])):n=N(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}},t.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=N(this.options.mangle?t(n[0]):n[0]));else{var a;do{a=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(a!==n[0]);r=N(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},t.inlineText=function(e,t,n){var r,i=this.rules.inline.text.exec(e);if(i)return r=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):N(i[0]):i[0]:N(this.options.smartypants?n(i[0]):i[0]),{type:"text",raw:i[0],text:r}},e}(),B=C,F=k,U=S,H={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:B,table:B,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};H.def=F(H.def).replace("label",H._label).replace("title",H._title).getRegex(),H.bullet=/(?:[*+-]|\d{1,9}[.)])/,H.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,H.item=F(H.item,"gm").replace(/bull/g,H.bullet).getRegex(),H.list=F(H.list).replace(/bull/g,H.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+H.def.source+")").getRegex(),H._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",H._comment=/<!--(?!-?>)[\s\S]*?-->/,H.html=F(H.html,"i").replace("comment",H._comment).replace("tag",H._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H.paragraph=F(H._paragraph).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.blockquote=F(H.blockquote).replace("paragraph",H.paragraph).getRegex(),H.normal=U({},H),H.gfm=U({},H.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),H.gfm.nptable=F(H.gfm.nptable).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.gfm.table=F(H.gfm.table).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.pedantic=U({},H.normal,{html:F("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",H._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:B,paragraph:F(H.normal._paragraph).replace("hr",H.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",H.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var z={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:B,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:B,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/,_punctuation:"!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~"};z.punctuation=F(z.punctuation).replace(/punctuation/g,z._punctuation).getRegex(),z._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",z._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",z.em.start=F(z.em.start).replace(/punctuation/g,z._punctuation).getRegex(),z.em.middle=F(z.em.middle).replace(/punctuation/g,z._punctuation).replace(/overlapSkip/g,z._overlapSkip).getRegex(),z.em.endAst=F(z.em.endAst,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.em.endUnd=F(z.em.endUnd,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.strong.start=F(z.strong.start).replace(/punctuation/g,z._punctuation).getRegex(),z.strong.middle=F(z.strong.middle).replace(/punctuation/g,z._punctuation).replace(/blockSkip/g,z._blockSkip).getRegex(),z.strong.endAst=F(z.strong.endAst,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.strong.endUnd=F(z.strong.endUnd,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.blockSkip=F(z._blockSkip,"g").getRegex(),z.overlapSkip=F(z._overlapSkip,"g").getRegex(),z._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,z._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,z._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,z.autolink=F(z.autolink).replace("scheme",z._scheme).replace("email",z._email).getRegex(),z._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,z.tag=F(z.tag).replace("comment",H._comment).replace("attribute",z._attribute).getRegex(),z._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,z._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,z._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,z.link=F(z.link).replace("label",z._label).replace("href",z._href).replace("title",z._title).getRegex(),z.reflink=F(z.reflink).replace("label",z._label).getRegex(),z.reflinkSearch=F(z.reflinkSearch,"g").replace("reflink",z.reflink).replace("nolink",z.nolink).getRegex(),z.normal=U({},z),z.pedantic=U({},z.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:F(/^!?\[(label)\]\((.*?)\)/).replace("label",z._label).getRegex(),reflink:F(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",z._label).getRegex()}),z.gfm=U({},z.normal,{escape:F(z.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),z.gfm.url=F(z.gfm.url,"i").replace("email",z.gfm._extended_email).getRegex(),z.breaks=U({},z.gfm,{br:F(z.br).replace("{2,}","*").getRegex(),text:F(z.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var G={block:H,inline:z},V=r.defaults,W=G.block,K=G.inline;function q(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function Y(e){var t,n,r="",i=e.length;for(t=0;t<i;t++)n=e.charCodeAt(t),Math.random()>.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}var Q=function(){function t(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||V,this.options.tokenizer=this.options.tokenizer||new P,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:W.normal,inline:K.normal};this.options.pedantic?(t.block=W.pedantic,t.inline=K.pedantic):this.options.gfm&&(t.block=W.gfm,this.options.breaks?t.inline=K.breaks:t.inline=K.gfm),this.tokenizer.rules=t}t.lex=function(e,n){return new t(n).lex(e)};var n,r,i,a=t.prototype;return a.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},a.blockTokens=function(e,t,n){var r,i,a,o;for(void 0===t&&(t=[]),void 0===n&&(n=!0),e=e.replace(/^ +$/gm,"");e;)if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),r.type&&t.push(r);else if(r=this.tokenizer.code(e,t))e=e.substring(r.raw.length),r.type?t.push(r):((o=t[t.length-1]).raw+="\n"+r.raw,o.text+="\n"+r.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.nptable(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],n),t.push(r);else if(r=this.tokenizer.list(e)){for(e=e.substring(r.raw.length),a=r.items.length,i=0;i<a;i++)r.items[i].tokens=this.blockTokens(r.items[i].text,[],!1);t.push(r)}else if(r=this.tokenizer.html(e))e=e.substring(r.raw.length),t.push(r);else if(n&&(r=this.tokenizer.def(e)))e=e.substring(r.raw.length),this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});else if(r=this.tokenizer.table(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.lheading(e))e=e.substring(r.raw.length),t.push(r);else if(n&&(r=this.tokenizer.paragraph(e)))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.text(e,t))e=e.substring(r.raw.length),r.type?t.push(r):((o=t[t.length-1]).raw+="\n"+r.raw,o.text+="\n"+r.text);else if(e){var s="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(s);break}throw new Error(s)}return t},a.inline=function(e){var t,n,r,i,a,o,s=e.length;for(t=0;t<s;t++)switch((o=e[t]).type){case"paragraph":case"text":case"heading":o.tokens=[],this.inlineTokens(o.text,o.tokens);break;case"table":for(o.tokens={header:[],cells:[]},i=o.header.length,n=0;n<i;n++)o.tokens.header[n]=[],this.inlineTokens(o.header[n],o.tokens.header[n]);for(i=o.cells.length,n=0;n<i;n++)for(a=o.cells[n],o.tokens.cells[n]=[],r=0;r<a.length;r++)o.tokens.cells[n][r]=[],this.inlineTokens(a[r],o.tokens.cells[n][r]);break;case"blockquote":this.inline(o.tokens);break;case"list":for(i=o.items.length,n=0;n<i;n++)this.inline(o.items[n].tokens)}return e},a.inlineTokens=function(e,t,n,r,i){var a;void 0===t&&(t=[]),void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===i&&(i="");var o,s=e;if(this.tokens.links){var l=Object.keys(this.tokens.links);if(l.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(s));)l.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;e;)if(a=this.tokenizer.escape(e))e=e.substring(a.raw.length),t.push(a);else if(a=this.tokenizer.tag(e,n,r))e=e.substring(a.raw.length),n=a.inLink,r=a.inRawBlock,t.push(a);else if(a=this.tokenizer.link(e))e=e.substring(a.raw.length),"link"===a.type&&(a.tokens=this.inlineTokens(a.text,[],!0,r)),t.push(a);else if(a=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(a.raw.length),"link"===a.type&&(a.tokens=this.inlineTokens(a.text,[],!0,r)),t.push(a);else if(a=this.tokenizer.strong(e,s,i))e=e.substring(a.raw.length),a.tokens=this.inlineTokens(a.text,[],n,r),t.push(a);else if(a=this.tokenizer.em(e,s,i))e=e.substring(a.raw.length),a.tokens=this.inlineTokens(a.text,[],n,r),t.push(a);else if(a=this.tokenizer.codespan(e))e=e.substring(a.raw.length),t.push(a);else if(a=this.tokenizer.br(e))e=e.substring(a.raw.length),t.push(a);else if(a=this.tokenizer.del(e))e=e.substring(a.raw.length),a.tokens=this.inlineTokens(a.text,[],n,r),t.push(a);else if(a=this.tokenizer.autolink(e,Y))e=e.substring(a.raw.length),t.push(a);else if(n||!(a=this.tokenizer.url(e,Y))){if(a=this.tokenizer.inlineText(e,r,q))e=e.substring(a.raw.length),i=a.raw.slice(-1),t.push(a);else if(e){var c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else e=e.substring(a.raw.length),t.push(a);return t},n=t,i=[{key:"rules",get:function(){return{block:W,inline:K}}}],(r=null)&&e(n.prototype,r),i&&e(n,i),t}(),J=r.defaults,X=w,Z=x,$=function(){function e(e){this.options=e||J}var t=e.prototype;return t.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return r?'<pre><code class="'+this.options.langPrefix+Z(r,!0)+'">'+(n?e:Z(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:Z(e,!0))+"</code></pre>\n"},t.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},t.html=function(e){return e},t.heading=function(e,t,n,r){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+r.slug(n)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},t.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},t.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"},t.listitem=function(e){return"<li>"+e+"</li>\n"},t.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},t.paragraph=function(e){return"<p>"+e+"</p>\n"},t.table=function(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"},t.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"},t.strong=function(e){return"<strong>"+e+"</strong>"},t.em=function(e){return"<em>"+e+"</em>"},t.codespan=function(e){return"<code>"+e+"</code>"},t.br=function(){return this.options.xhtml?"<br/>":"<br>"},t.del=function(e){return"<del>"+e+"</del>"},t.link=function(e,t,n){if(null===(e=X(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<a href="'+Z(e)+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>"},t.image=function(e,t,n){if(null===(e=X(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">"},t.text=function(e){return e},e}(),ee=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),te=function(){function e(){this.seen={}}return e.prototype.slug=function(e){var t=e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){var n=t;do{this.seen[n]++,t=n+"-"+this.seen[n]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t},e}(),ne=r.defaults,re=_,ie=function(){function e(e){this.options=e||ne,this.options.renderer=this.options.renderer||new $,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ee,this.slugger=new te}e.parse=function(t,n){return new e(n).parse(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var n,r,i,a,o,s,l,c,u,d,h,f,p,m,g,v,b,y,E="",x=e.length;for(n=0;n<x;n++)switch((d=e[n]).type){case"space":continue;case"hr":E+=this.renderer.hr();continue;case"heading":E+=this.renderer.heading(this.parseInline(d.tokens),d.depth,re(this.parseInline(d.tokens,this.textRenderer)),this.slugger);continue;case"code":E+=this.renderer.code(d.text,d.lang,d.escaped);continue;case"table":for(c="",l="",a=d.header.length,r=0;r<a;r++)l+=this.renderer.tablecell(this.parseInline(d.tokens.header[r]),{header:!0,align:d.align[r]});for(c+=this.renderer.tablerow(l),u="",a=d.cells.length,r=0;r<a;r++){for(l="",o=(s=d.tokens.cells[r]).length,i=0;i<o;i++)l+=this.renderer.tablecell(this.parseInline(s[i]),{header:!1,align:d.align[i]});u+=this.renderer.tablerow(l)}E+=this.renderer.table(c,u);continue;case"blockquote":u=this.parse(d.tokens),E+=this.renderer.blockquote(u);continue;case"list":for(h=d.ordered,f=d.start,p=d.loose,a=d.items.length,u="",r=0;r<a;r++)v=(g=d.items[r]).checked,b=g.task,m="",g.task&&(y=this.renderer.checkbox(v),p?g.tokens.length>0&&"text"===g.tokens[0].type?(g.tokens[0].text=y+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=y+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:y}):m+=y),m+=this.parse(g.tokens,p),u+=this.renderer.listitem(m,b,v);E+=this.renderer.list(u,h,f);continue;case"html":E+=this.renderer.html(d.text);continue;case"paragraph":E+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":for(u=d.tokens?this.parseInline(d.tokens):d.text;n+1<x&&"text"===e[n+1].type;)u+="\n"+((d=e[++n]).tokens?this.parseInline(d.tokens):d.text);E+=t?this.renderer.paragraph(u):u;continue;default:var _='Token with "'+d.type+'" type was not found.';if(this.options.silent)return void console.error(_);throw new Error(_)}return E},t.parseInline=function(e,t){t=t||this.renderer;var n,r,i="",a=e.length;for(n=0;n<a;n++)switch((r=e[n]).type){case"escape":i+=t.text(r.text);break;case"html":i+=t.html(r.text);break;case"link":i+=t.link(r.href,r.title,this.parseInline(r.tokens,t));break;case"image":i+=t.image(r.href,r.title,r.text);break;case"strong":i+=t.strong(this.parseInline(r.tokens,t));break;case"em":i+=t.em(this.parseInline(r.tokens,t));break;case"codespan":i+=t.codespan(r.text);break;case"br":i+=t.br();break;case"del":i+=t.del(this.parseInline(r.tokens,t));break;case"text":i+=t.text(r.text);break;default:var o='Token with "'+r.type+'" type was not found.';if(this.options.silent)return void console.error(o);throw new Error(o)}return i},e}(),ae=S,oe=I,se=x,le=r.getDefaults,ce=r.changeDefaults,ue=r.defaults;function de(e,t,n){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof t&&(n=t,t=null),t=ae({},de.defaults,t||{}),oe(t),n){var r,i=t.highlight;try{r=Q.lex(e,t)}catch(e){return n(e)}var a=function(e){var a;if(!e)try{a=ie.parse(r,t)}catch(t){e=t}return t.highlight=i,e?n(e):n(null,a)};if(!i||i.length<3)return a();if(delete t.highlight,!r.length)return a();var o=0;return de.walkTokens(r,(function(e){"code"===e.type&&(o++,setTimeout((function(){i(e.text,e.lang,(function(t,n){if(t)return a(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),0==--o&&a()}))}),0))})),void(0===o&&a())}try{var s=Q.lex(e,t);return t.walkTokens&&de.walkTokens(s,t.walkTokens),ie.parse(s,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+se(e.message+"",!0)+"</pre>";throw e}}return de.options=de.setOptions=function(e){return ae(de.defaults,e),ce(de.defaults),de},de.getDefaults=le,de.defaults=ue,de.use=function(e){var t=ae({},e);if(e.renderer&&function(){var n=de.defaults.renderer||new $,r=function(t){var r=n[t];n[t]=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=e.renderer[t].apply(n,a);return!1===s&&(s=r.apply(n,a)),s}};for(var i in e.renderer)r(i);t.renderer=n}(),e.tokenizer&&function(){var n=de.defaults.tokenizer||new P,r=function(t){var r=n[t];n[t]=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=e.tokenizer[t].apply(n,a);return!1===s&&(s=r.apply(n,a)),s}};for(var i in e.tokenizer)r(i);t.tokenizer=n}(),e.walkTokens){var n=de.defaults.walkTokens;t.walkTokens=function(t){e.walkTokens(t),n&&n(t)}}de.setOptions(t)},de.walkTokens=function(e,t){for(var r,i=n(e);!(r=i()).done;){var a=r.value;switch(t(a),a.type){case"table":for(var o,s=n(a.tokens.header);!(o=s()).done;){var l=o.value;de.walkTokens(l,t)}for(var c,u=n(a.tokens.cells);!(c=u()).done;)for(var d,h=n(c.value);!(d=h()).done;){var f=d.value;de.walkTokens(f,t)}break;case"list":de.walkTokens(a.items,t);break;default:a.tokens&&de.walkTokens(a.tokens,t)}}},de.Parser=ie,de.parser=ie.parse,de.Renderer=$,de.TextRenderer=ee,de.Lexer=Q,de.lexer=Q.lex,de.Tokenizer=P,de.Slugger=te,de.parse=de,de}()},E2g8:
|
|
|
/*!******************************************************!*\
|
|
|
!*** ./node_modules/es6-promise/dist/es6-promise.js ***!
|
|
|
\******************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){(function(t,n){
|
|
|
/*!
|
|
|
* @overview es6-promise - a tiny implementation of Promises/A+.
|
|
|
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
|
|
|
* @license Licensed under MIT license
|
|
|
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
|
|
|
* @version v4.2.8+1e68dce6
|
|
|
*/var r;r=function(){"use strict";function e(e){return"function"==typeof e}var r=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=0,a=void 0,o=void 0,s=function(e,t){p[i]=e,p[i+1]=t,2===(i+=2)&&(o?o(m):E())},l="undefined"!=typeof window?window:void 0,c=l||{},u=c.MutationObserver||c.WebKitMutationObserver,d="undefined"==typeof self&&void 0!==t&&"[object process]"==={}.toString.call(t),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function f(){var e=setTimeout;return function(){return e(m,1)}}var p=new Array(1e3);function m(){for(var e=0;e<i;e+=2)(0,p[e])(p[e+1]),p[e]=void 0,p[e+1]=void 0;i=0}var g,v,b,y,E=void 0;function x(e,t){var n=this,r=new this.constructor(w);void 0===r[k]&&N(r);var i=n._state;if(i){var a=arguments[i-1];s((function(){return L(i,r,a,n._result)}))}else I(n,r,e,t);return r}function _(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(w);return S(t,e),t}d?E=function(){return t.nextTick(m)}:u?(v=0,b=new u(m),y=document.createTextNode(""),b.observe(y,{characterData:!0}),E=function(){y.data=v=++v%2}):h?((g=new MessageChannel).port1.onmessage=m,E=function(){return g.port2.postMessage(0)}):E=void 0===l?function(){try{var e=Function("return this")().require("vertx");return void 0!==(a=e.runOnLoop||e.runOnContext)?function(){a(m)}:f()}catch(e){return f()}}():f();var k=Math.random().toString(36).substring(2);function w(){}function C(t,n,r){n.constructor===t.constructor&&r===x&&n.constructor.resolve===_?function(e,t){1===t._state?A(e,t._result):2===t._state?T(e,t._result):I(t,void 0,(function(t){return S(e,t)}),(function(t){return T(e,t)}))}(t,n):void 0===r?A(t,n):e(r)?function(e,t,n){s((function(e){var r=!1,i=function(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}(n,t,(function(n){r||(r=!0,t!==n?S(e,n):A(e,n))}),(function(t){r||(r=!0,T(e,t))}),e._label);!r&&i&&(r=!0,T(e,i))}),e)}(t,n,r):A(t,n)}function S(e,t){if(e===t)T(e,new TypeError("You cannot resolve a promise with itself"));else if(i=typeof(r=t),null===r||"object"!==i&&"function"!==i)A(e,t);else{var n=void 0;try{n=t.then}catch(t){return void T(e,t)}C(e,t,n)}var r,i}function O(e){e._onerror&&e._onerror(e._result),D(e)}function A(e,t){void 0===e._state&&(e._result=t,e._state=1,0!==e._subscribers.length&&s(D,e))}function T(e,t){void 0===e._state&&(e._state=2,e._result=t,s(O,e))}function I(e,t,n,r){var i=e._subscribers,a=i.length;e._onerror=null,i[a]=t,i[a+1]=n,i[a+2]=r,0===a&&e._state&&s(D,e)}function D(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,i=void 0,a=e._result,o=0;o<t.length;o+=3)r=t[o],i=t[o+n],r?L(n,r,i,a):i(a);e._subscribers.length=0}}function L(t,n,r,i){var a=e(r),o=void 0,s=void 0,l=!0;if(a){try{o=r(i)}catch(e){l=!1,s=e}if(n===o)return void T(n,new TypeError("A promises callback cannot return that same promise."))}else o=i;void 0!==n._state||(a&&l?S(n,o):!1===l?T(n,s):1===t?A(n,o):2===t&&T(n,o))}var R=0;function N(e){e[k]=R++,e._state=void 0,e._result=void 0,e._subscribers=[]}var j=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(w),this.promise[k]||N(this.promise),r(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?A(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&A(this.promise,this._result))):T(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;void 0===this._state&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===_){var i=void 0,a=void 0,o=!1;try{i=e.then}catch(e){o=!0,a=e}if(i===x&&void 0!==e._state)this._settledAt(e._state,t,e._result);else if("function"!=typeof i)this._remaining--,this._result[t]=e;else if(n===M){var s=new n(w);o?T(s,a):C(s,e,i),this._willSettleAt(s,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},e.prototype._settledAt=function(e,t,n){var r=this.promise;void 0===r._state&&(this._remaining--,2===e?T(r,n):this._result[t]=n),0===this._remaining&&A(r,this._result)},e.prototype._willSettleAt=function(e,t){var n=this;I(e,void 0,(function(e){return n._settledAt(1,t,e)}),(function(e){return n._settledAt(2,t,e)}))},e}(),M=function(){function t(e){this[k]=R++,this._result=this._state=void 0,this._subscribers=[],w!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(e,t){try{t((function(t){S(e,t)}),(function(t){T(e,t)}))}catch(t){T(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(t){var n=this.constructor;return e(t)?this.then((function(e){return n.resolve(t()).then((function(){return e}))}),(function(e){return n.resolve(t()).then((function(){throw e}))})):this.then(t,t)},t}();return M.prototype.then=x,M.all=function(e){return new j(this,e).promise},M.race=function(e){var t=this;return r(e)?new t((function(n,r){for(var i=e.length,a=0;a<i;a++)t.resolve(e[a]).then(n,r)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))},M.resolve=_,M.reject=function(e){var t=new this(w);return T(t,e),t},M._setScheduler=function(e){o=e},M._setAsap=function(e){s=e},M._asap=s,M.polyfill=function(){var e=void 0;if(void 0!==n)e=n;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var r=null;try{r=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===r&&!t.cast)return}e.Promise=M},M.Promise=M,M},e.exports=r()}).call(this,n(/*! ./../../node-libs-browser/mock/process.js */"Q2Ig"),n(/*! ./../../@umijs/deps/compiled/webpack/4/global.js */"IyRk"))},E7E6:
|
|
|
/*!********************************************!*\
|
|
|
!*** ./src/assets/images/icons/search.png ***!
|
|
|
\********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADUCAYAAADZTGx+AAAgAElEQVR4Xu2dC3BU13nHv7MrIQkQQoCEtAIEAmxig4GACxhogpM6NY7jOKZO4nimwcFot23SNNNO02napJN0JjN9TNMm5eG3x4+YSeI3ftUGjCDGQMBgG4wxb+0u4mEeQhJI2tP539WR7i77uPfuvXfvar8zs7Mr7bnn8Z3vt9/5zlMQB5aAQQmsW7fO397eHujp6Rkfi8XGExFeDX2vABHVSSlrhBDDiKhdSnlOCBGWUu4mol1lZWWv3nfffccNZueJaMITpeBCeEICjz/++LCOjo5GIpogpWwUQjT2vU/A/wCClNJvtbBCCCml3CaEeGzChAmPLF269LLVtNx6jgFxS9IeyOehhx6q7OnpmSilnEhE2gsA4L0PhjHZillRUUHl5WUUf6+giopyKi+Pv8rKyrSX3++nnp4e7XXpUgedP3+ezp37lE6ebKPe3l4tCyFEhIj+UwjxaHNz8+ls+ebrewYkX5J3IN9169YNv3DhwsRYLIbXJAWBDoZRmbKFYkPRhw4dqgEwdCgAwOfyPiDKyefzWS454Dh58iQdPPiJBk0fKN1E9KyU8gehUKjVcuIOPciAOCRYJ5J95JFHyq9cuaJZACHEJCklIOgHQUqZ0QIAACg/FB+//niPwxD/H3793QqwJkePHqW2tjaSUsKinCOibwWDwfVulcFIPgyIESm5FGfDhg0lBw8ehOM7qbe3dxIggCXAe58VgBOcts0AgP6XfwCACho2bBgNGTLEpZoYz6arq4vee2+PBooQosvv999y//33bzaegrMxGRBn5ZuQOpR77dq1dVB4BQCsQB8AgGB8JicY3RsAgNewYQO//EOHDnPdAtgttr1736cjR44g2VPl5eXXLF++HBYl74EBsbkJHnnkkZFQ/p6eHk3xdd2gpj6nuDxTlvAB8GufDAH+h+8Ga0A365133qHTp8/AkvwiGAx+3wt1ZUBMtsL69evLTpw4gZEfKH+THoC+z9WZkkQ3RwEQ7wLFf/2VY5yLE2yyKp6LfuHCBdq06W0A0j1kyJCG++6771S+C8mAJLUAukEPP/xw/ZUrVyb5/f4m+AAAgYia+iwCJsTSDuUMOMJD+7tB8e5Q3A/A9xzSS2DHjh0UiUQxWvY3zc3N/5VvWRUlIE888cSI9vZ2TfH7+v8AAD5A1m6QEKLPEcbIT/yl/AG8e9ERzreSmck/Go3S9u078MjOUCg018yzTsQdlIBgNOjw4cMTYAWSfv2VFcg4HBrvBsWdYLzHQYh3hWAJAAkHZyQQi8Xo1Vdfw4RirLKysvree++94ExOxlIt2JZes2bNmL5hUK37owehb6lE2r6M6gYpRxjKz90gYwpjNhac766uy9TRcYk6O7u09+7uborFpDYBWVVVRaNHj06YgNyyZSudPXsWP0S3BIPBN8zmaWd8zwICZzgSiUzs7e3VlL8PANUNwt+VRkaDBrpAcR8Af7s5IWZnY3k1LcxldHZ2UkdHh/bCZywxUf8DJNkGLhobJ9DUqVM1H+2DDz6kQ4cO4ZEfhUKhf81nvT0DyNq1a2+MxWJfIaIFRDSNiAKZJsVKS0v7h0KVBdDPChfzaJDdCnX5MixAJ3V2dmiK39UVB0DBgG5RuqB8tsrKSs1a4F11UzFq1draSqdPx5di4f9z5syhixcvaJOHRPRgKBS63+76mEkv74A8+OCDs7u7u39JRDfpC64mxdTSiEQIKtgZNtPKWeJeuXKlX/HjVgDW4FIfFJ39CwzTJQPFhuKPGDFCe1efhw8frv0v248VZtFbWlq02XRYkGuvvYY+/HAfulhvBIPBW2ysqumk8grImjVrvheLxf6DiEpgEcaPH081NWMIgmVn2HRbpn0AAMS7O3ErgPdLl+ATxLtFaoVtugQwQakUX1kCtJH6nA0AIzVBN2zTpk20f/9+gi7ATxFC7A8Gg58x8rxTcfIGyOrVq38gpQQcNG7cOLrhhhk8R2CxlaFMeuUf8AXiXaJsAMAnS7YA+r9LSkoslsz8Y6+++qpacoKHw6FQCBuy8hbyAsgDDzywuLe3dwPWHV133XU0eTIGojikkwD2Vaj+frIVwP/xfaaAYet0FgBdIPxieyXA4X/yySeVBTkfDAZH5rNsrgMCx3vNmjXvSSlnTJzYSDNmzMhn/T2RN37hVd9fdYGUD4D/w0IYAUD1+fUwAIBCm7zcunUr7dmjOek9oVAor/S6DsiaNWtui8ViL6HRliz5fME1nhWiAIDq7ytfYGA49BLBR8gU8Auv+vypukKDbREjRrZefPFF+CAyGAxa36FlpbGSnnEdkFWrVj1ARCumTZtGU6dOsaEK+U8Cw5z6ro8aDlXWAMOkmQL6+AoA/UiQsgQYsCimgB+Mhx9+uDgBWb169T4p5bTPfe6PtSHAQggAAL/8A5Nh8dEf9Tf6zZkChi4zWQAMZXNIlMDq1auLE5BVq1ZhM/KIW2/9U3JzdCSTAmKIMXkYVO8DGAEAs/T6OQC9H4DvOJiTAABBCIVCrvdy9CV1PfNVq1Zp6w5uv/3L5iSWQ+z4eiCsAxr41U+cGe7S9kWnCxjnzwQArAMHeyXAgNgMCIY6sXRBr/jKB4B1yAQAlkPoAUh2hAEAr+C1F4BsqTEgNgCC0aFjx47RsWPHNTjSBSg3+vnpukAAwI7Z4GyNzt8blwADkiMgODZm7969mu+AAEcYy6bVKFDyaBADYFw5vRCTAckBkMOHD9P773+gtWNtbS199rOfpQkTJrAV8IJm21QGBsQiIJhE+sMfdmnNcP3119PChQsZDJuU0kvJMCAWAMFI1IYNG7W1RwsWLKCZM2d6qU25LDZKgAGxAMiePXu14yrHjh1Ld955p43NwUl5TQIMiElA1GZ+vC9btkxzyDkMXgkwICYBuXjxIm3cuImtx+BlIqFmDIhJQM6cOUNbt/5e8zvgf3AY3BJgQEwCgnsl3n13Ozvng5uL/toxICYBiUZP0vbt22nRokU0ffr0IlGT4q0mA8KAFK/2G6g5A8KAGFCT4o3CgDAgxav9BmrOgDAgBtSkeKMwIAxI8Wq/gZozIAyIATUp3igMCANSvNpvoOYMCANiQE2KNwoDwoAUr/YbqDkDwoAYUJPijcKAMCDFq/0Gas6AMCAG1KR4ozAgDEjxar+BmjMgDIgBNSneKAwIA1K82m+g5gwIA2JATYo3CgPCgBSv9huoOQPCgBhQk+KNwoAwIMWr/QZqzoAwIAbUpHijMCAMSPFqv4GaMyAMiAE1Kd4oDAgDUrzab6DmDAgDYkBNijcKA8KAFK/2G6g5A8KAGFCT4o3CgDAgxav9BmrOgDAgBtTEu1FwrXZ3d7f2unLlivaO/6nbhHMtOQPCgOSqQ44/j8uKlPInw4Br8NKF6upqqqmpyal8DAgDkpMC2fUwFF0pv94a4DPuobcScC99U1OTdjW31cCAMCBWdcf0c+kAwP9hJZwIjY2NVFZWZjlpBoQBsaw8yQ+m8geUNYCFwPduBlgOWBBYEquBAWFATOmOVX/AVCY2RPb5fFRfX0/Dhg3LKTUGhAG5SoGc8Ady0tIMD8M6lJSUUGlpKQ0ZMqT/HaNYuVgOlSUDUqSA5MMfsAoJrAEgUAAABj0QVtM18hwDMkgB8Zo/kE0Z4S8oxU8GAHDkKzAgBQxIofgDSrlVV0j/669gyGUo1kl4GBCPA1Lo/oDeGtjhEzgJQ6q0GRCPAdLR0UHnz5/vnzl2an7AqqLl0x+wWuZcnmNAPATIxYsXKRqNuj5fkKxAgCCdQ5xPfyAXRbf6LAPiIUCOHDmiWQ43QiH6A27IJTkPBsRDgHzyySeW1x0lN2yq+YFC9wcYEBclsGrVKm3dw+0eAiQSiRC6WUYDIEg1IqS6R0bT4XjpJcAWxEOAYNVqa2srdXV19bcY+wP5xZcB8RAgShXgh2CiD36CV+cH8qu27uXOgHgQEPean3PKJgEGhAHJpiNF/T0DwoAUNQDZKs+AMCDZdKSov2dAGJCiBiBb5RkQBiSbjhT19wwIA1LUAGSrPAPCgGTTkaL+ngFhQIoagGyVZ0AYkGw6UlDfY/8MViHYtQKBAWFACgoAVVh13haW5ehf6hRGHBaHY3+wcDOXwIAwILnoj6PPqj336lxePQhGDqHDSudJkyblVEYGhAHJSYHseBj77pMtAf7OdDC10Xz56FGjkkqK58X9IBarUhCP4Rc/FQROnssLwcCCwJJYDWxB2IJY1Z2UzyVbA/1J7bZmZCCx4cOHUyAQMBAzfRQGhAExrUDKGqRylPN9Cgt2WcIxBxyjRo3K+fhRBoQBSQsIRoTS+QZGnGTT5Jl4AMO4ACH5lUt3KlX2DAgDchUEyjJYvbjGhJ5njKrfc68HARDYNc+RrawMSJEAAmVP1SVSd/plUxQnv9dbA3UIhQLCyXyNpM2ADDJAsk2gGVEKJ+KoY4hSdYvcsgZW6sWAFCAg+gk0vY/gBWugTmFJ5Rvw2bxWEI0/Y/2OLIt5FsI8iH6IVA+CHRNoFsUWb6y+S2sUBPpu0WA7mpQtiMcsCA6uVodX53vIFNYg2SdQUBSiNbDyo8CAeAiQc+fOUVtbm5V2zOkZdXtTcrdosFkDK0JiQDwEyOHDh7WRJieCmkBL1S2CpeCQWgIMiIcAsePwarcm0IoFKAbEQ4Cge4VuVraQbgIN1oGtQTbpmfueAfEQIFi+gQt02tvb+3fFubGcwpzKFFdsBsRDgCjVAyh4sTXIP4wMiAcByb9acAmUBBgQBoRpyCABBoQBYUAYkKslUAhLTVhz8y8BtiBsQfKvhR4uAQPCgHhYPZ0tGhaAYlj91KlT2vo3vDo6OrTVDGpFg9o0JoTYRkQHhRAfE9GOIUOGbFm+fHn2SSubqsCreW0SJCeTWQKAACsWDh06RGfOnNGG0y2GGBG9J4T4HRE9EwwGAY5jgQFxTLScMCSA24N37NhBuGrbiSCEaCGinwSDwTcdSd+JRDOlyU662xLPT37hcJi2b9/uGBgparXZ5/P9uLm5eYOdNWYLYqc0OS2t+7R161bNcmQKlZWVNGHCBKqpqaERI0YQ/sa5vmqpPzanXb58mS5evEgXLlzQtiMcP35c+ztTEEJsLCkp+cGKFSt22dEcDIgdUuQ0NAns27ePWlpaKN2pLA0NDRoUeFVXV1uS2qeffkrHjh3TXhkgvOzz+b7X3Ny81lImuocYkFwlWIDPY8ckfp3xwoiSesdqZfyajxkzxlSt8Gu/efNm+uijj1I+h2NI586dS6NHjzaVbrbIsFbwb7CfJ1UQQjwuhAg1Nzd3ZEsr3fcMiFXJFcBz6iTGZBiy7a3HyYhGIcHo1GuvvUZnz569SiITJ06kG2+80XYwkjMCKPB3jhw5kqpV3vf7/XetXLnygJUmY0CsSM2Dz2D+IBkEq6etwA9oamrKWkv4A88++6w2h6EP2CqwZMmSnK9AyFqApAiwJBs2bNCsYlKIEtGCUCiUkqBM+TAgZlshz/HVIdXJ3SM7D5owAgjyf+655wg+gT7A8txyyy1aVy0fAQ7966+/TqdPn07IXgixv6SkZOGKFSuuNnUZCsqA5KMVDeSp/AS9jwCldONY0mxdLJThpZdeumoId9q0abR48WLXjidNJ0aUDz7R/v37kyHZUlZW9sXly5d3GWgCLQoDYlRSDsXT39+h7yI5dYhEpmpgX31VVVVW/wO/0JgR14drrrmGbr75ZoekZC3Zt956iw4cSHQ9MAPf3Nz8Z0IIzMhnDQxIVhHZF0H5CcoqAAirfkIupVJ76zHvgBd8BrwbOaF97969tGXLloTsx48fT7feeqvndmLCCr/yyiva/Ik+CCG+HwwGf2FEhgyIESmZjAMTr/cR1Gc7/QSjRVIH0OlBABBWDqCDU75u3bqEI5Iw0XfHHXf0T/AZLZdb8eCzPf/889rCSBWEEJf8fv+M+++/P/X4sK5wDEgOLaXO6k2GwQ0/IbnY6tihZKtg5/56DOfq5xwA3ze+8Q0aNmxYDlJ0/tFLly7Rr3/96wSwhRDPB4PBr2bLnQHJJqG+7/XdIvU5H36C/pBqPQxOn8aIpR6/+x0W0A6E+fPn06xZswxKML/Rdu/eTe+8805CIfx+/x+tXLlye6aSMSBJ0lEHV+sdZgCRw/JsS5qh9xOUj2DUT7CUYZaH0Jc/evRofyw481//+tc953ekqwas/TPPPKPtPdF1tdYHg8HbGBADGoNxcwgvH90j/Pond42s+gkGqmo6CnyPp556KuFHYunSpdqaqkIKWL+1fv16fZExkjU50wQiWxAibVIp1VIJuxtf7yforYKdfoLdZUZ6WMaxc+fO/qQxGbhs2TInsnI8zd/85jfJk4g/DYVC/5wuYwaESBvTz7Y+yUzLqesLkq2C036CmTKaiYuuiX7GfN68eTR79mwzSXgm7q5du2jbNuzijQfMsAeDwc8wIBmayCog+rN69TDAOgyWgONYn3jiiYTq3HPPPXlbSpKrXLEUBd1FffD5fI3Nzc3HUqXNFoRI2+SDV6ag7vJItgpW5hNybWQ3n8cSdiwAVAHzHnfddZebRbA9r9/+9rcJ8yJ+v/87K1eufJgBySBqAAInHaNV6uBqPQxevvDSdg3SJYjdgXv27On/D5avz5kzx8ksHU8b/hT8Kl036xfBYPD7DIjjoh98Gbz88ssJSzW+9KUvub6M3W6pYrITk546QN4IBoO3MCB2S7oI0nv66acT5g4wcz5y5MiCrjnugsHMug6QT4LB4BQGpKCbNT+Ff+yxx6izs7M/829/+9tUXl6en8LYlGtXVxc9+uijekBOB4PBGgbEJgEXUzIPPPBAwuTpypUrC2b2PF07YVZ97dqB8xyEEFeCwWAZA1JMmm1TXRkQmwRpNBk+OM6opLwRj7tYLrcDA+KywHPMjp30HAVo5HEpZXk0Gv5mLEbffeGFF7Q1Crfz6e5GRJf3ODzM62ATnDlzZtzly50hIrFSSqmdRvbCCy9qOTIgDgrexqR5otBGYaqkotHopFis5ydE4h4pZYk+CwbEAYE7mCQvNbFRuKdOnQp0d3f/iCi2QkoqTZU0A2KjwF1Iihcr2iDkcDg8Rkr590TyL4moIlOSDIgNAnc5CV7ublHgUkpfJBL5KyL5MyllpZFkGBAjUvJWHN4wZaE9otHo9Fis50EpaZ6ZxxkQM9LyRlzecmuiHaSUQ8Lh8D8KIf8hnZ/BXSwTAi2QqHxog4GGiluN3nVSyrRbFLMlwxYkm4S8+f1gPPaHiOaFQqF3M0nc8I7CcDj8NSL5mJRyeC5NyIDkIr38PssHx6WQv5RSRCKRfyGSP8LnXJuIAclVgvl7frAcPVpSUiLnz5//y+nTp/+1ECLjfdQZFb6trW14d3f3k0TyK3Y1CwNilyTzk85gOLx6+vTr+y4IEi+UlpZ+q7a2tj2dNNMCgvVTkUjrK1LS5+1sCgbETmnmJ61Cvv6gvr6ebrxxbr/ghKCN9fUNtwohUt4ZkhIQLA8Jh8PPEskv290EDIjdEnU/vUK9QAcXAy1YMD/FBT/ipUAgcKcQoidZmlcBEp/8Cz8hpfymE6JnQJyQqvtp4uxi3E+I/d364NUr2IYPH0aLFi3STqxJFYQQT9fXB+5NvljnKkBaW1v/jUj+rVMiZ0Cckqz76RbKJZ44vmnx4kU0dOjQLEIS/97Q0PB3+kgJgLS2ti4SgjbBijglbgbEKcnmJ12vXwNdWVmpXUUNC5ItwHpISZ9raGhoUXH7AZFSVoTD4d1E8ppsCeXyPQOSi/S8+SzONX777bevug9QlXbSpEk0d+5c2+9Lx2F/O3bsSLjURy8hXA13ww0zTF4qKg4EAoFZQgjtKJd+QJzuWqmCMyDeVHI7SrVv3z5qaWlJe4VEQ0ODdmUCXtXV1ZayxCHauMYAr9bW1pRp4PDwGTOmU2Njo6U8iAa6WhogbW1tU3p6uvdLKf0WUzT8GANiWFQFGRG/6rjkMxwOZyw//AFYFpz1izvV0RWCr6BOwIdVwkAA/BwcOI07BgEF/s4URo8eTdOnT6eqKuv3tAshektKSqfV1tYe1AAJh8OrpIwF3WgRBsQNKec/DwCCZfKRSMSVwmAId9q0a7NeYW20MEL4VgcCgZCA7xGJhE9JKbN7MUZTzxCPAbFBiAWUBLpB8BOcAgVgXHvttVRTox15YFvATbj19YEaEQ6H75Qylng7o23ZXJ0QA+KgcD2aNEa6sCvRrmuw0X2qrw9QIFBPw4fntHY2o8SE8H1NtLa2/rJvq6wr4mVAXBGzpzJJXpqCa6MnT55M0WhUu5dFfy+kuo4O103AH8E5wIiP18iRVQSLgeun3QniVwBkK5Fc4E6GfOyPW3L2Qj6wGAcOHKCNGzdmLA4gaGpqokmTJpocknW6luL3IhxujUgp65zOSqXPFsQtSbubD0adcBkqLAJGnNTFqKm6Vcoa4CppLE3x6nUKQoioaG09gQkR186zZ0DcVVwncsO98QBA/8L8hJG75OfPn0+1tSlvGnCiqLmm2cWA5CrCQf487tJQICjLAKc7OcB3qKwcTrAKVVUjtbkN3Cjb0dHRHzV5qXkBiK6Lu1gF0EpuFRHKnAxDqok5ONAAAKNJAAJdJEz06e97P3jwE/rwww/7i47vliz5vOZsF0ro62Kxk14oDWZnOXFiorIIgAKf9b/2Ki+MJMVhiIMAKABDptt9r1zppjfffJO6u7v7iwwnHDv5CiuIrTzMW1gtZqm06BLpLQNgwDKO5IDh0zgI6CbFu0pGVsEmp7N37/sJCwiR7he+cHPavRiWKuXKQ+JXPFHoiqDdyQROMjYwKYugoIBTnRyw7ikOwQAQ2fdLZK8HLNPGjZsSJgWvv/56mjy5KfvDHoshhO9OXmrisUYxWhwMn2LkSHWT8I4hVgy3JoeKioo+fwFdJEAxgvA/J8L27YnLSgDdzTcvKbh7DfuXmkBIbi5WfPnl9drM6dKlt5qaFIpGT2qL37BtEqs1iylAXlB+vWU4e/ZsymXlUEjlK8Tfq1zr2qBMLS1bEppmzpw51NAQKLjm6l+siJK7udz9zTffokuXLmm/KmZGNIoFEDi2+sk2WAZ0m1JNuGEdkt55xmf3lmFcrfObN7doVk0F7PnAVtdCC1ctd0cF3Now9e677xKUfebMG7SNM0bDYAQEjnKqOYbkCTeMGGHkaMB5jvsOGG71SsCq3Z07/5BQHFj7UaOsbYzKb72SNkyhMG5tuT127Djt3r1b2355003Gl4DhbNht294lzMTOmjUrv/KzkHtnZ2dCFwmWIdUcA+YL1LAqfAV0k/C3fo7BQvaOPgLr9tZbGxKGiQOBAM2dO8fRfJ1JPM2W2z4r4vihDehCoJuFkRUc4FVXZ2wZGLodW7f+nmbMmEELFy50RjY2pYoupN55hpXA/5IDLEB8sm3AeQYMmeYYbCqirckMhklBCCTjoQ1KYm50tQ4fPkI4whJnFC1ceJOhNf1QMPxKYXHbsmXLbG3gXBLDdtDkYVVYi+Sg5hj0s89O7mXIpU5mnh08k4IaIpmP/enrajl6cJwSvhoOxHj87NmztL3JmQL65a+99ro2O3v33Xdr+wLcDnCWk4dVU024AfyBOYb47LOZAQm365VLfoNlUtDwwXF9kDh29KhqDAxdAhL4FghTpkymadOmZexefPDBh3To0CHCcS633XZbLu2a8Vk1x6B3oNHF0y+dUAlgL4PyFdTsc0WFa4ujHZOBkYQHz6SgiaNHlWCcOrw6WfAHDx6kffv2a0ulq6tH0nXXXZfWOij/Be84DAxj7LkG/RyDAiJ5l5vKA3MMybPPsIDFGgbDpKClw6tVgztx/UEqZTp79lPauXMnqb47xs+bmiYRlkcnO6zo4mA0C0DNnDmT5s2bZ3iER23q0VsGjNtn3tQz4ECnO9e1GAEZHJOCOVx/oLMktl6gk06ZYBUOHTqsLXJTa4fQfRk7dqw2lg6fQ60VOnGild577z1NsfGLPnv2bJo4caK2f1kF/aYe5TfAh0g1xzBkSCmNHFmtnYyhhlXV+UzFqPxG6vz225sTDq4upEnB+KU54mf19fU/zukCHb2g7LqCLZvw0eXBpBOGDtHH1Yd4f79KO2AM8WAJlJMMSwOA8B0sUaqRJKSFoVXEw2gYTsUAEF6acMsmHy98X8iTgkKIdiLx54FAwNBJPqauVLPjEk8zDYzuD7pf8Alg0lOtSs2UHqABVJhbqKsbq3XZuJtkpgWujgurjXks/Q9QoUwKCiH2+Xz+u+vq6t43KgVTgCBRXAMdiUR+RBT7oZVroI0WLFW89vZL1N5+kTD2DljQLevuxnuPZgUw2xyfbxhB1dWjqFhGk3KRqdlnjx8/Trt27e5/rBB2CgpB3US+n9fX1/9MCHH12v8MQjANiEorbk16HpSS5pkVMscvXAmoSV5VA6/vFBSCtvl8JSvMWA1961gGpM+a+CKRyHeJ5E+llJWF2+xccqMSgNXetm2b1vXFwMn8+fP6D5w2moYb8YQQF4nEP9XX1/9P8q1RZvLPCRCVUTgcHiOl/CGR/AsicmYnjplacVzHJYAhc4+O9HUSif8VQvw8EAiczlUQtgCiCnHq1KlAd3f3PxHFvuO2f5KrIPj5wpZAn5/xUGlp6U9ramoy371goqq2AqLyPXnyZFNvb/ePicQ9uDHXRHk4KkvAlATiN9PKp3y+kp/U1dUdNvWwgciOAKLyPXPmzLjLlztDRGKllNLe8+kNVI6jDF4JCCFOE8m1ZWUVq0aPHn3CqZo6CogqNNZ1RaPhb8Zi9D0iWXi7nZySPqdrQQJit89H/11XF3haCNFlIQFTj7gCiL5E4XB4MZEMEdEdUsps9/KaqgxHHpwSEELg/NLnicSqQCCw2c1aug6IqhwWQvb09HyVSH6LiL7Ivoqbze79vOK+Bf0fkXiypKTkudra2sR1Ry5VIW+A6OsXjUZre3t778DBmPAAAAI6SURBVO6DZb5LdedsvCmBdwCF3+9fV1dXF98slMfgCUCSumCNQsgvSymXSklLeF4lj9rhTtadQtAGIcR6KbWNS0fdydZYLp4DRF9snLQSjUZvjsViS4Wg26SUVi++NiYNjuWKBIQQR6Wkl30+3/q6urq3hBBXb+J3pSTZM/E0IMnFj0Qi10kp/4QotphILJJSjs1eRY6RbwkIIU4SyRYi32YhxBv19fUD9yLku3BZ8i8oQJLrcurUiWt6e8Wi3l7CyBiO8JvicXkXS/EOEokWv582+/2ypaZm3IFCrXhBA5Is9La2trqenp6biGi2lJhv0eZcxhVq4xRIuU8Qid1CCKyB31VSUrK1trY2WiBlz1rMQQVIqtpeuHBidEcHzZIy/iLSXtfyWrGsupEQIb7WiT4iot1CxF9Dh9LuESPGnTGXUmHFHvSApGoOzLm0tbU19vb2TpVSThGCphLJKVLSVCFoYrHCAwikpCNC0MdE4qCU9LEQ4qDf7/+4trb2aN/cRGFpeI6lLUpAMslMSulva2ub2NPT0+TzyUAsJup9PgpIKQNSinohtM/1RFRo5/1cFkJEpKSwEDIihAjHYhT2+WQkFhPhkpKSQ7W1tUdwsnmOOjWoHmdALDbn+fPnR3V2dgKW0ULEqmIxUSWlHCmErJJSVAlBVVIS3kcS4X9ULoQolVKWZnpHcaSU3UKI7szv1EUkzuNSKSEI7+eFkOelFOeFEOd8Pnz24fOZioqKcFVV1VmLVS3qx/4fQLyzKIIkCJoAAAAASUVORK5CYII="},ELLl:
|
|
|
/*!*************************************************************!*\
|
|
|
!*** ./node_modules/codemirror/addon/edit/closebrackets.js ***!
|
|
|
\*************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,o){o&&o!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(a(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))}));var i={Backspace:function(t){var i=s(t);if(!i||t.getOption("disableInput"))return e.Pass;for(var a=r(i,"pairs"),o=t.listSelections(),c=0;c<o.length;c++){if(!o[c].empty())return e.Pass;var u=l(t,o[c].head);if(!u||a.indexOf(u)%2!=0)return e.Pass}for(c=o.length-1;c>=0;c--){var d=o[c].head;t.replaceRange("",n(d.line,d.ch-1),n(d.line,d.ch+1),"+delete")}},Enter:function(t){var n=s(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var a=t.listSelections(),o=0;o<a.length;o++){if(!a[o].empty())return e.Pass;var c=l(t,a[o].head);if(!c||i.indexOf(c)%2!=0)return e.Pass}t.operation((function(){var e=t.lineSeparator()||"\n";t.replaceSelection(e+e,null),t.execCommand("goCharLeft"),a=t.listSelections();for(var n=0;n<a.length;n++){var r=a[n].head.line;t.indentLine(r,null,!0),t.indentLine(r+1,null,!0)}}))}};function a(e){for(var t=0;t<e.length;t++){var n=e.charAt(t),r="'"+n+"'";i[r]||(i[r]=o(n))}}function o(t){return function(i){return function(t,i){var a=s(t);if(!a||t.getOption("disableInput"))return e.Pass;var o=r(a,"pairs"),l=o.indexOf(i);if(-1==l)return e.Pass;for(var u,d=r(a,"closeBefore"),h=r(a,"triples"),f=o.charAt(l+1)==i,p=t.listSelections(),m=l%2==0,g=0;g<p.length;g++){var v,b=p[g],y=b.head,E=t.getRange(y,n(y.line,y.ch+1));if(m&&!b.empty())v="surround";else if(!f&&m||E!=i)if(f&&y.ch>1&&h.indexOf(i)>=0&&t.getRange(n(y.line,y.ch-2),y)==i+i){if(y.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(y.line,y.ch-2))))return e.Pass;v="addFour"}else if(f){var x=0==y.ch?" ":t.getRange(n(y.line,y.ch-1),y);if(e.isWordChar(E)||x==i||e.isWordChar(x))return e.Pass;v="both"}else{if(!m||!(0===E.length||/\s/.test(E)||d.indexOf(E)>-1))return e.Pass;v="both"}else v=f&&c(t,y)?"both":h.indexOf(i)>=0&&t.getRange(y,n(y.line,y.ch+3))==i+i+i?"skipThree":"skip";if(u){if(u!=v)return e.Pass}else u=v}var _=l%2?o.charAt(l-1):i,k=l%2?i:o.charAt(l+1);t.operation((function(){if("skip"==u)t.execCommand("goCharRight");else if("skipThree"==u)for(var r=0;r<3;r++)t.execCommand("goCharRight");else if("surround"==u){var i=t.getSelections();for(r=0;r<i.length;r++)i[r]=_+i[r]+k;for(t.replaceSelections(i,"around"),i=t.listSelections().slice(),r=0;r<i.length;r++)i[r]=(a=i[r],o=void 0,o=e.cmpPos(a.anchor,a.head)>0,{anchor:new n(a.anchor.line,a.anchor.ch+(o?-1:1)),head:new n(a.head.line,a.head.ch+(o?1:-1))});t.setSelections(i)}else"both"==u?(t.replaceSelection(_+k,null),t.triggerElectric(_+k),t.execCommand("goCharLeft")):"addFour"==u&&(t.replaceSelection(_+_+_+_,"before"),t.execCommand("goCharRight"));var a,o}))}(i,t)}}function s(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function l(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function c(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}a(t.pairs+"`")}(n(/*! ../../lib/codemirror */"VrN/"))},FIWC:
|
|
|
/*!**********************************************************************!*\
|
|
|
!*** ./src/pages/Paperlibrary/Random/PreviewEdit/index.less?modules ***!
|
|
|
\**********************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___gdHkq",flex_space_between:"flex_space_between___lk_Gv",flex_box_vertical_center:"flex_box_vertical_center___2WNVo",flex_box_center_end:"flex_box_center_end___13O11",flex_box_column:"flex_box_column___kMb8L",wrap:"wrap___1y6rg",crumbs:"crumbs___1vKDo"}},FOrL:
|
|
|
/*!********************************************!*\
|
|
|
!*** ./src/assets/images/icons/nodata.png ***!
|
|
|
\********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/nodata.a6b3f948.png"},FPkq:
|
|
|
/*!**************************************!*\
|
|
|
!*** ./src/assets/images/qrCode.png ***!
|
|
|
\**************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/qrCode.dd0fe9b2.png"},Fofx:
|
|
|
/*!*************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/core/matrix.js ***!
|
|
|
\*************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n="undefined"==typeof Float32Array?Array:Float32Array;function r(){var e=new n(6);return i(e),e}function i(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}t.create=r,t.identity=i,t.copy=a,t.mul=function(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],l=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e},t.translate=function(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e},t.rotate=function(e,t,n){var r=t[0],i=t[2],a=t[4],o=t[1],s=t[3],l=t[5],c=Math.sin(n),u=Math.cos(n);return e[0]=r*u+o*c,e[1]=-r*c+o*u,e[2]=i*u+s*c,e[3]=-i*c+u*s,e[4]=u*a+c*l,e[5]=u*l-c*a,e},t.scale=function(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e},t.invert=function(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],l=n*o-a*r;return l?(l=1/l,e[0]=o*l,e[1]=-a*l,e[2]=-r*l,e[3]=n*l,e[4]=(r*s-o*i)*l,e[5]=(a*i-n*s)*l,e):null},t.clone=function(e){var t=r();return a(t,e),t}},FxDU:
|
|
|
/*!*******************************************************!*\
|
|
|
!*** ./node_modules/size-sensor/lib/sensors/index.js ***!
|
|
|
\*******************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSensor=void 0;var r=n(/*! ./object */"QO+J"),i=n(/*! ./resizeObserver */"j5sG"),a="undefined"!=typeof ResizeObserver?i.createSensor:r.createSensor;t.createSensor=a},Fzz4:
|
|
|
/*!**********************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/components/CutOffNow.tsx ***!
|
|
|
\**********************************************************************/
|
|
|
/*! exports provided: disabledTime, default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/modal/style */"2qtc");var r=n(/*! antd/es/modal */"kLXV"),i=(n(/*! antd/es/spin/style */"T2oS"),n(/*! antd/es/spin */"W9HT")),a=(n(/*! antd/es/checkbox/style */"sRBo"),n(/*! antd/es/checkbox */"kaz8")),o=(n(/*! antd/es/row/style */"14J3"),n(/*! antd/es/row */"BMrR")),s=(n(/*! antd/es/date-picker/style */"iQDF"),n(/*! antd/es/date-picker */"+eQT")),l=(n(/*! antd/es/radio/style */"7Kak"),n(/*! antd/es/radio */"9yH6")),c=(n(/*! antd/es/message/style */"miYZ"),n(/*! antd/es/message */"tsqr")),u=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty */"jrin"),d=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),h=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),f=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),p=(n(/*! antd/es/form/style */"y8nQ"),n(/*! antd/es/form */"Vl3Y")),m=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),g=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),v=n.n(g),b=n(/*! react */"q1tI"),y=n.n(b),E=n(/*! moment */"wd/R"),x=n.n(E),_=n(/*! @/utils/fetch */"ErOA"),k=n(/*! @/utils/util */"1vsH"),w=n(/*! umi */"Ty5D"),C=n(/*! umi */"9kvl"),S=n(/*! @/assets/images/paper/jinshi.svg */"6K3P"),O=n.n(S),A=n(/*! ./TrfList */"jr/l");function T(e,t){for(var n=[],r=e;r<t;r++)n.push(r);return n}var I=function(e){var t=new Date,n=x()(e).format("HH");if(x()(e).isSame(x()(t),"day")){var r=x()(t).format("HH"),i=x()(t).format("mm");return{disabledHours:function(){return T(0,24).splice(1,1*r-1)},disabledMinutes:function(){return x()(e).isSame(x()(t),"hour")&&n<=r?T(0,60).splice(0,i):T(60,60)}}}if(x()(e).isSame(x()(),"day")){var a=x()().format("HH"),o=x()().format("mm");return{disabledHours:function(){return T(0,24).splice(0,a)},disabledMinutes:function(){return n<=a?T(0,o):T(60,60)}}}return!1};t.a=Object(C.a)((function(e){return{exercise:e.exercise}}))((function(e){var t=e.exercise,n=e.dispatch,g=Object(w.i)(),E=p.a.useForm(),C=Object(m.a)(E,1)[0],S=Object(b.useState)(1),T=Object(m.a)(S,2),D=(T[0],T[1]),L=Object(b.useState)([]),R=Object(m.a)(L,2),N=R[0],j=R[1],M=Object(b.useState)(!0),P=Object(m.a)(M,2),B=P[0],F=P[1],U=Object(b.useState)([]),H=Object(m.a)(U,2),z=H[0],G=H[1],V=Object(b.useState)(!0),W=Object(m.a)(V,2),K=W[0],q=W[1],Y=Object(b.useState)(!1),Q=Object(m.a)(Y,2),J=Q[0],X=Q[1];Object(b.useEffect)((function(){"批量结束"===t.actionTabs.key&&Z()}),[t.actionTabs]);var Z=function(){var e=Object(f.a)(v.a.mark((function e(r){var i,a,o;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return F(!0),e.next=3,n({type:"exercise/getEndGroups",payload:Object(h.a)(Object(h.a)({},g),{},{check_ids:[t.actionTabs.selectArrs]})});case 3:a=e.sent,o=null==a||null===(i=a.course_info)||void 0===i?void 0:i.map((function(e,t){return Object(h.a)(Object(h.a)({},e),{},{key:e.course_group_id,title:e.course_group_name,name:e.course_group_name,disabled:!!e.is_published})})),a&&null!=a&&a.course_info&&(j(Object(d.a)(o)),C.setFieldsValue(Object(u.a)({},"end_time",x()(x()(new Date(Object(k.b)("/"))).add(7,"days").format("YYYY-MM-DD HH:mm"))))),F(!1);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),$=function(){var e=Object(f.a)(v.a.mark((function e(){var r,i,a,o;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Object(h.a)({},C.getFieldsValue()),!((null==z?void 0:z.length)<=0&&N.length>0)){e.next=4;break}return c.b.info("班级不能为空"),e.abrupt("return");case 4:return X(!0),i={check_ids:t.actionTabs.selectArrs,group_ids:z},K||(i.end_time=x()(r.end_time).format("YYYY-MM-DD HH:mm")),i.group_ids=z.map((function(e){return e.course_group_id})),e.next=10,Object(_.a)("/api/courses/".concat(g.coursesId,"/exercises/end_exercise.json"),{method:"post",body:i});case 10:0===e.sent.status&&(c.b.success("操作成功"),Object(k.ab)(["教学课堂","试卷","批量结束"]),n({type:"exercise/setActionTabs",payload:{}}),null!=t&&null!==(a=t.actionTabs)&&void 0!==a&&a.cb?null==t||null===(o=t.actionTabs)||void 0===o||o.cb():n({type:"classroomList/getClassroomExercisesList",payload:Object(h.a)({},t.actionTabs.params)})),X(!1);case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return y.a.createElement(r.a,{centered:!0,title:"结束作业与测验",visible:"批量结束"===t.actionTabs.key,okText:"确认",cancelText:"取消",onOk:$,width:680,confirmLoading:J||B,onCancel:function(){D(1),j([]),G([]),q(!0),n({type:"exercise/setActionTabs",payload:{}})}},y.a.createElement(i.a,{spinning:B},N&&y.a.createElement(p.a,{form:C},y.a.createElement("div",{style:{color:"#333333",display:"flex"},className:"font14 mb10"},y.a.createElement("img",{style:{marginRight:5},src:O.a}),"作业与测验时间结束后,学生将不能再答题。"),y.a.createElement(o.a,{className:"mt20 mb10"},y.a.createElement("span",{className:"mr10"},y.a.createElement("span",{style:{color:"red",marginRight:3}},"*"),"结束时间"),y.a.createElement(l.a.Group,{value:K,onChange:function(e){q(e.target.value),G([])}},y.a.createElement(l.a,{value:!0},"立即结束"),y.a.createElement(l.a,{value:!1},"定时结束")),y.a.createElement(p.a.Item,{name:"end_time",style:{marginTop:-3,visibility:K?"hidden":"visible"}},y.a.createElement(s.a,{style:{width:170},getPopupContainer:function(e){return e.parentNode},placeholder:"请选择结束时间",showTime:{format:"HH:mm",defaultValue:x()(Object(k.d)(),"HH:mm")},disabledDate:function(e){return e&&e<x()().subtract(0,"days")},disabledTime:I,format:"YYYY-MM-DD HH:mm",allowClear:!1}))),N.length>0&&y.a.createElement(o.a,{style:{marginBottom:"10px"}},y.a.createElement("span",{className:"mr10"},y.a.createElement("span",{style:{color:"red",marginRight:3}},"*"),"选择班级:"),y.a.createElement("div",null,N.length>0&&y.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"10px"}},y.a.createElement("span",{style:{flex:1}},y.a.createElement(a.a,{checked:z.length===N.length,onChange:function(e){z.length===N.length?G([]):G(N)}},"全选")," "),y.a.createElement("span",{style:{width:16}}),y.a.createElement("span",{style:{flex:1}},"已选择",z.length||0,"个分班")),y.a.createElement(A.a,{data:N,selectedRowKeys:z,setSelectedRowKeys:G}))))))}))},GABl:
|
|
|
/*!********************************************!*\
|
|
|
!*** ./src/assets/images/icons/chrome.png ***!
|
|
|
\********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAKi0lEQVRoQ71ae3BU1Rn//e7dzYuioNRsHlSqRiUB2eUx0hbaKAHEAMWxiQ6PTUAUGCuIQNVOZ0xnrHUE5GHHIqOwCag8BlQiQnnUokgt5AEIK5GnBpIFXwjkAdl7vs7dkJCETXLvEj3/5d7v9/u+337nfN8554bowBHo16+3YRh3K7IPBHcRSIDI9QJ0AWkA8h0E3xM8DWAvde5x6Pqe+D17jnVUGLxWogqPp78SGSeC3wP4ZUR8pJ+Ct50O7e344uKjEXFcBkUkSERY6e43RkE9JcCgawngaiw3O6A/l7CvaHckvLYFhTKi5B8C3B2JQ6sYEhvpcMxKKioqs4ox7SwLkvT0mFNnz82HqKkCaHacRGxL1gDybHJp6WKSYoXHkqBytzuF4FoR6WOFtKNtCP4b0c7s5N27v22Pu11B5e7+6ZTgBgE6t0f2Y74n8IUjOuo+1+7dx9vy06agcrf7fgjXARLzYwZrnZsB6BzevaRkf2uYVgWdcruHKnAjRJzWHf4ElmSl5nTcnbRnT3k4b2EFVfTt29NQ8l+zKf4EIUbi4kAnhz7ohuLiH1qCwwo62cf9ccf3l0jibh1DckPy3lKzmTcbYQWV9+k7HlArOjaEjmejRm9yaWmzOMMKMncCp9x9dwlkYEeEQUCBrO0IrqYcApx1xsV6XLt2nWl43kyQqyB38dQJPZ7MY56qdLsHGIL/iY3m24R0p2jc6BDZrkVHf3XTiBFfMy9PdbSgNotCYv6kDAPGVhCTT3vz3zCNT7o9PhHJsRoIwUJN518TS0qKrWI62q4xQ/H5uTsB+Q3I0521zrcfGf/KuTMDBrguXar7or2mSuCCRm1q4t6SN5sGOGZBTQ9DsRdgJEFpQeo8pRvRJe/MYeMUMe2lYlQczl4cBki7jT78DyCVTN32qfkuRJC8Mrd3nSGNzYoa5wYm+P5kvivv43kakBdbbWTk1zqRnlBa6jdt8j4UR1Fx9WQAUyG4aqtEUIHYBWJh4ay4dQ28ciBjJiAvR5Qx8jtEOROZsuliSFBCQc4LSvBs4xogLjmjolPLH156VLKyok4ePuKHyK1XOSN/0Bz6PUlFRaXmuzELLrmNYHCVQO6wEhjBT5zReHj99LiToUwdGPIYgNesYMPE8hDTtq0JCYovyD0KkVuaGZHvnfb6xpjPTnk8o5WS91qSNC2bo+fWZiqq1RDpZDOggMPhHPHuzKi99aIy8gHx2uQwJ9t69tr2IBPfyr3TqJPPwxE4dGScGp+//XKB2CIiQ6/YcXP3faUjGjITNII7IxBTT0eeitJjB6yfyUr5MrMrLtT6IXDZFHUWaTd0Y8LKieOVEb6JkjgwOCbTvTY726j0eFINwT4RcYRi0LVfJZeUfGqumeKimgNWp1kbQX7w/pxOmaEsHRw6BaKW2BRkBjWQCQUTFylR01td9ODjgRzfq6Gp18ezSEGmEyxJ3lfaz3w2en7VNKUQen+tQ9O0ezfMiv1QjmZcj1oJQGBvl09tKl0Fuf8Rkd+1Koj4NkqPS/lq3D+/PztoUNcLF6oOQ7AweV/p8yZm5LyqveGqWSTiSK4pnB33UH2WMtZAJMsWD7HIFHRQRFLbBnLR6Rzfk6G15PFM05R2NHFf8RazzwSDqs0Dl52ACJ6PuTm229psXhJ/xjQosZl5vs/4/NxKQNpegERQd7B3xVjfIcnK0iuPHYtOLC6uHjW/dqQoo9BO0O3ZRkfpt6+bEXNY/BmZUPJ+e/bN3pM76crPrRVIdHtAkpsDXl+oqjWMUfOrpoiC/cXbhjPqWnrhU7E75NB9dyFYt6+9uFq838/4gpwfILjOCpBkZsDr+6DBduTcmomAWmYFa9VGc3DQhplxn4h/aAqU+sIqLmRHfkZXQU6ZCG63AiRZlpQa1bu4/9K6UEGYXzMESm2zgrVqQ2i3FM6JPS7+jIEwT832xi668nN2CPBbqziN2lOV3uULTPusl6uTahTKIZFuKpt7JXGm36y4hDxSiX/YI1DG61bjupyhzaag1QJkWwfyrO6MSqkYu/QbEzNqXvV2EbnXOr51S2p4o3BWJ3Nja5btAohMsMfLV80qtxCQGXaAJJcEvL5pJmb0vJpxStRKO/hwtuYunE7ds+HJ6P1yfEwXVJ+vgCDWFi8xg64Vk7JFGattAg2nw9n35NjX92etEb32qxpzn3dNWSKxvHB2p0n12RkyHYJFtmIyjXUtnT3eye1Sc16+gUC3Q0CyJCk1aqBZIB6YKzfVsdrcMSTY4WiwJbC/C+J+vWIOq0TyHPDvNI8rKba4iBpERXUNHR9cBTkfi9j/LEJqLwW8y582OR6Ye7FXHYx3gTDnpjYiM8U4o5nZeCbyD50BpRbaEmMaE1uZtn3Y5fPQxGch6gXbJKDSdW1ExfhlW0zsmAXSxQjW+ARy1X1ZS+76k6vkd5G4J8zMhKZa2ahuqKs+DPOLn91BPsK0bctCghJXTLrDUMoPiO3PJAQvApwSyFme3xDD6PmXPCJ1MwA+KCI/axqbWZpBFFJ3LDYLQNN3cnDIEgim2NWC+unmYsqmc42XEq6C3FUiEtrpRjIIzBscm/mMeXZqih+9UOIhNbeFMhBkRb/ZMV+afaalDykb3gdBowRi/0cFtcVM2xqq1FcErZyYKoZ8FkmWGoMjjwGy6MaYTsv82a9eaOuHue2DJ6KP3P/KxQYbOThkB8R6g2/i8xwcsbfyjsJQX2x50XhNWboigGcBrKam7RKRMqce+vodYwiSIOihREYAPN5wJJGDGdkQsdc6Gpxp/AtTt/2t4c9mghIKJvcU1O0VQVQk084yhjgHxKac9i45I+VZsTj3/SGI/MIyvjF6VqBrbAoTC6vDCjIfulZM/KMo9YptchsAEk8HvPkvhdbVwYznIJJnA97EVBvLXlvfblZ0whG58nPWCvCHyJy0gyKPde7WOdVcP3JkWHfUqkOAxNn2Rcxn2vbZLXFhr15vW/nEdeeNcyUArr5ctO25OUAjH6z0+tZfzs4qRFJZiU1IHTySvPoDQKt3yeb1cFDJNhHcdI0amhQk7gh4fen1YoYPhgQ/ss/NzxHtHGj2nHDYNi/Hk9/MTQka2CoiN9t3fNVkUDr0/hU5b5SK5Gnw7yyCiMcWL+GH5sxkz80nWsO1e9uftHJysqHqtoigpy3nLYxJLgt4fY+EsnMg41FAltriIzciyjm2tcy0WuXCOUnKf/xGg1VvishwW0Fc8XIhNoYpJ7J9gfpLRByGyM8tc5FzkTromXBrxlJRaM2ReW0sSi0QQTfLwZiG1P582rv876Hs+DNehpKZFvEnoWE2U7dbbrrtTrmWjhPfeqybEby0ECLjrARF8ETML9DzxD2+WikbdifqDHND2vb/PpDm5/oXcV3XRey+tsaKH1tTLhyh661H0xCsmyaQCW1dg1HTHwpMWLbmcpneBJH7Wg+QVdCwFKI/z7R/fWdHyDULaiCIL5jdScM3Y6X+m04/aXIPQGJnwJs/OCTm8yEjYSDMLSurQPkI5CrcoK2ja0vobBTpsD3l2nKU/mGe43DFiV5Ksb8SNUCj9lrlhOUl5r8JwG9evjMBhDmdjkJYBp2luLPHHrL+nq8jxv8BV2A7FHmr6w0AAAAASUVORK5CYII="},GUcZ:
|
|
|
/*!*****************************************************!*\
|
|
|
!*** ./node_modules/flv.js/src/flv.js + 40 modules ***!
|
|
|
\*****************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/events/events.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("fWQN"),i=n("mtLc"),a=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"install",value:function(){Object.setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Object.assign=Object.assign||function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t},"function"!=typeof self.Promise&&n(/*! es6-promise */"E2g8").polyfill()}}]),e}();a.install();var o=a,s=n("+qE3"),l=n.n(s),c=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"e",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="[".concat(t,"] > ").concat(n);e.ENABLE_CALLBACK&&e.emitter.emit("log","error",r),e.ENABLE_ERROR&&(console.error?console.error(r):console.warn?console.warn(r):console.log(r))}},{key:"i",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="[".concat(t,"] > ").concat(n);e.ENABLE_CALLBACK&&e.emitter.emit("log","info",r),e.ENABLE_INFO&&(console.info?console.info(r):console.log(r))}},{key:"w",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="[".concat(t,"] > ").concat(n);e.ENABLE_CALLBACK&&e.emitter.emit("log","warn",r),e.ENABLE_WARN&&(console.warn?console.warn(r):console.log(r))}},{key:"d",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="[".concat(t,"] > ").concat(n);e.ENABLE_CALLBACK&&e.emitter.emit("log","debug",r),e.ENABLE_DEBUG&&(console.debug?console.debug(r):console.log(r))}},{key:"v",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="[".concat(t,"] > ").concat(n);e.ENABLE_CALLBACK&&e.emitter.emit("log","verbose",r),e.ENABLE_VERBOSE&&console.log(r)}}]),e}();c.GLOBAL_TAG="flv.js",c.FORCE_GLOBAL_TAG=!1,c.ENABLE_ERROR=!0,c.ENABLE_INFO=!0,c.ENABLE_WARN=!0,c.ENABLE_DEBUG=!0,c.ENABLE_VERBOSE=!0,c.ENABLE_CALLBACK=!1,c.emitter=new l.a;var u=c,d=function(){function e(){Object(r.a)(this,e),this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return Object(i.a)(e,[{key:"reset",value:function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}},{key:"addBytes",value:function(e){0===this._firstCheckpoint?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=e,this._totalBytes+=e):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=e,this._totalBytes+=e):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=e,this._totalBytes+=e,this._lastCheckpoint=this._now())}},{key:"currentKBps",get:function(){this.addBytes(0);var e=(this._now()-this._lastCheckpoint)/1e3;return 0==e&&(e=1),this._intervalBytes/e/1024}},{key:"lastSecondKBps",get:function(){return this.addBytes(0),0!==this._lastSecondBytes?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}},{key:"averageKBps",get:function(){var e=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/e/1024}}]),e}(),h=n("yKVA"),f=n("879j"),p=function(){function e(t){Object(r.a)(this,e),this._message=t}return Object(i.a)(e,[{key:"name",get:function(){return"RuntimeException"}},{key:"message",get:function(){return this._message}},{key:"toString",value:function(){return this.name+": "+this.message}}]),e}(),m=function(e){Object(h.a)(n,e);var t=Object(f.a)(n);function n(e){return Object(r.a)(this,n),t.call(this,e)}return Object(i.a)(n,[{key:"name",get:function(){return"IllegalStateException"}}]),n}(p),g=function(e){Object(h.a)(n,e);var t=Object(f.a)(n);function n(e){return Object(r.a)(this,n),t.call(this,e)}return Object(i.a)(n,[{key:"name",get:function(){return"InvalidArgumentException"}}]),n}(p),v=function(e){Object(h.a)(n,e);var t=Object(f.a)(n);function n(e){return Object(r.a)(this,n),t.call(this,e)}return Object(i.a)(n,[{key:"name",get:function(){return"NotImplementedException"}}]),n}(p),b={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},y={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},E=function(){function e(t){Object(r.a)(this,e),this._type=t||"undefined",this._status=b.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return Object(i.a)(e,[{key:"destroy",value:function(){this._status=b.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}},{key:"isWorking",value:function(){return this._status===b.kConnecting||this._status===b.kBuffering}},{key:"type",get:function(){return this._type}},{key:"status",get:function(){return this._status}},{key:"needStashBuffer",get:function(){return this._needStash}},{key:"onContentLengthKnown",get:function(){return this._onContentLengthKnown},set:function(e){this._onContentLengthKnown=e}},{key:"onURLRedirect",get:function(){return this._onURLRedirect},set:function(e){this._onURLRedirect=e}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onComplete",get:function(){return this._onComplete},set:function(e){this._onComplete=e}},{key:"open",value:function(e,t){throw new v("Unimplemented abstract function!")}},{key:"abort",value:function(){throw new v("Unimplemented abstract function!")}}]),e}(),x=n("oZsa");function _(e,t,n){return(_="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(x.a)(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}var k={};!function(){var e=self.navigator.userAgent.toLowerCase(),t=/(edge)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(iemobile)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(e)||[],n=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(android)/.exec(e)||/(windows)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||[],r={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",majorVersion:t[4]||t[2]||"0",platform:n[0]||""},i={};if(r.browser){i[r.browser]=!0;var a=r.majorVersion.split(".");i.version={major:parseInt(r.majorVersion,10),string:r.version},a.length>1&&(i.version.minor=parseInt(a[1],10)),a.length>2&&(i.version.build=parseInt(a[2],10))}if(r.platform&&(i[r.platform]=!0),(i.chrome||i.opr||i.safari)&&(i.webkit=!0),i.rv||i.iemobile){i.rv&&delete i.rv;r.browser="msie",i.msie=!0}if(i.edge){delete i.edge;r.browser="msedge",i.msedge=!0}if(i.opr){r.browser="opera",i.opera=!0}if(i.safari&&i.android){r.browser="android",i.android=!0}for(var o in i.name=r.browser,i.platform=r.platform,k)k.hasOwnProperty(o)&&delete k[o];Object.assign(k,i)}();var w=k,C=function(e){Object(h.a)(n,e);var t=Object(f.a)(n);function n(e,i){var a;return Object(r.a)(this,n),(a=t.call(this,"fetch-stream-loader")).TAG="FetchStreamLoader",a._seekHandler=e,a._config=i,a._needStash=!0,a._requestAbort=!1,a._contentLength=null,a._receivedLength=0,a}return Object(i.a)(n,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),_(Object(x.a)(n.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){var n=this;this._dataSource=e,this._range=t;var r=e.url;this._config.reuseRedirectedURL&&null!=e.redirectedURL&&(r=e.redirectedURL);var i=this._seekHandler.getConfig(r,t),a=new self.Headers;if("object"==typeof i.headers){var o=i.headers;for(var s in o)o.hasOwnProperty(s)&&a.append(s,o[s])}var l={method:"GET",headers:a,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if("object"==typeof this._config.headers)for(var c in this._config.headers)a.append(c,this._config.headers[c]);!1===e.cors&&(l.mode="same-origin"),e.withCredentials&&(l.credentials="include"),e.referrerPolicy&&(l.referrerPolicy=e.referrerPolicy),this._status=b.kConnecting,self.fetch(i.url,l).then((function(e){if(n._requestAbort)return n._requestAbort=!1,void(n._status=b.kIdle);if(e.ok&&e.status>=200&&e.status<=299){if(e.url!==i.url&&n._onURLRedirect){var t=n._seekHandler.removeURLParameters(e.url);n._onURLRedirect(t)}var r=e.headers.get("Content-Length");return null!=r&&(n._contentLength=parseInt(r),0!==n._contentLength&&n._onContentLengthKnown&&n._onContentLengthKnown(n._contentLength)),n._pump.call(n,e.body.getReader())}if(n._status=b.kError,!n._onError)throw new p("FetchStreamLoader: Http code invalid, "+e.status+" "+e.statusText);n._onError(y.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})})).catch((function(e){if(n._status=b.kError,!n._onError)throw e;n._onError(y.EXCEPTION,{code:-1,msg:e.message})}))}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function(e){var t=this;return e.read().then((function(n){if(n.done)if(null!==t._contentLength&&t._receivedLength<t._contentLength){t._status=b.kError;var r=y.EARLY_EOF,i={code:-1,msg:"Fetch stream meet Early-EOF"};if(!t._onError)throw new p(i.msg);t._onError(r,i)}else t._status=b.kComplete,t._onComplete&&t._onComplete(t._range.from,t._range.from+t._receivedLength-1);else{if(!0===t._requestAbort)return t._requestAbort=!1,t._status=b.kComplete,e.cancel();t._status=b.kBuffering;var a=n.value.buffer,o=t._range.from+t._receivedLength;t._receivedLength+=a.byteLength,t._onDataArrival&&t._onDataArrival(a,o,t._receivedLength),t._pump(e)}})).catch((function(e){if(11!==e.code||!w.msedge){t._status=b.kError;var n=0,r=null;if(19!==e.code&&"network error"!==e.message||!(null===t._contentLength||null!==t._contentLength&&t._receivedLength<t._contentLength)?(n=y.EXCEPTION,r={code:e.code,msg:e.message}):(n=y.EARLY_EOF,r={code:e.code,msg:"Fetch stream meet Early-EOF"}),!t._onError)throw new p(r.msg);t._onError(n,r)}}))}}],[{key:"isSupported",value:function(){try{var e=w.msedge&&w.version.minor>=15048,t=!w.msedge||e;return self.fetch&&self.ReadableStream&&t}catch(e){return!1}}}]),n}(E),S=function(e){Object(h.a)(n,e);var t=Object(f.a)(n);function n(e,i){var a;return Object(r.a)(this,n),(a=t.call(this,"xhr-moz-chunked-loader")).TAG="MozChunkedLoader",a._seekHandler=e,a._config=i,a._needStash=!0,a._xhr=null,a._requestAbort=!1,a._contentLength=null,a._receivedLength=0,a}return Object(i.a)(n,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),_(Object(x.a)(n.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){this._dataSource=e,this._range=t;var n=e.url;this._config.reuseRedirectedURL&&null!=e.redirectedURL&&(n=e.redirectedURL);var r=this._seekHandler.getConfig(n,t);this._requestURL=r.url;var i=this._xhr=new XMLHttpRequest;if(i.open("GET",r.url,!0),i.responseType="moz-chunked-arraybuffer",i.onreadystatechange=this._onReadyStateChange.bind(this),i.onprogress=this._onProgress.bind(this),i.onloadend=this._onLoadEnd.bind(this),i.onerror=this._onXhrError.bind(this),e.withCredentials&&(i.withCredentials=!0),"object"==typeof r.headers){var a=r.headers;for(var o in a)a.hasOwnProperty(o)&&i.setRequestHeader(o,a[o])}if("object"==typeof this._config.headers){var s=this._config.headers;for(var l in s)s.hasOwnProperty(l)&&i.setRequestHeader(l,s[l])}this._status=b.kConnecting,i.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=b.kComplete}},{key:"_onReadyStateChange",value:function(e){var t=e.target;if(2===t.readyState){if(null!=t.responseURL&&t.responseURL!==this._requestURL&&this._onURLRedirect){var n=this._seekHandler.removeURLParameters(t.responseURL);this._onURLRedirect(n)}if(0!==t.status&&(t.status<200||t.status>299)){if(this._status=b.kError,!this._onError)throw new p("MozChunkedLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(y.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else this._status=b.kBuffering}}},{key:"_onProgress",value:function(e){if(this._status!==b.kError){null===this._contentLength&&null!==e.total&&0!==e.total&&(this._contentLength=e.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var t=e.target.response,n=this._range.from+this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,n,this._receivedLength)}}},{key:"_onLoadEnd",value:function(e){!0!==this._requestAbort?this._status!==b.kError&&(this._status=b.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)):this._requestAbort=!1}},{key:"_onXhrError",value:function(e){this._status=b.kError;var t=0,n=null;if(this._contentLength&&e.loaded<this._contentLength?(t=y.EARLY_EOF,n={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(t=y.EXCEPTION,n={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new p(n.msg);this._onError(t,n)}}],[{key:"isSupported",value:function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="moz-chunked-arraybuffer","moz-chunked-arraybuffer"===e.responseType}catch(e){return u.w("MozChunkedLoader",e.message),!1}}}]),n}(E),O=function(e){Object(h.a)(n,e);var t=Object(f.a)(n);function n(e,i){var a;return Object(r.a)(this,n),(a=t.call(this,"xhr-range-loader")).TAG="RangeLoader",a._seekHandler=e,a._config=i,a._needStash=!1,a._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],a._currentChunkSizeKB=384,a._currentSpeedNormalized=0,a._zeroSpeedChunkCount=0,a._xhr=null,a._speedSampler=new d,a._requestAbort=!1,a._waitForTotalLength=!1,a._totalLengthReceived=!1,a._currentRequestURL=null,a._currentRedirectedURL=null,a._currentRequestRange=null,a._totalLength=null,a._contentLength=null,a._receivedLength=0,a._lastTimeLoaded=0,a}return Object(i.a)(n,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),_(Object(x.a)(n.prototype),"destroy",this).call(this)}},{key:"currentSpeed",get:function(){return this._speedSampler.lastSecondKBps}},{key:"open",value:function(e,t){this._dataSource=e,this._range=t,this._status=b.kConnecting;var n=!1;null!=this._dataSource.filesize&&0!==this._dataSource.filesize&&(n=!0,this._totalLength=this._dataSource.filesize),this._totalLengthReceived||n?this._openSubRange():(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1}))}},{key:"_openSubRange",value:function(){var e=1024*this._currentChunkSizeKB,t=this._range.from+this._receivedLength,n=t+e;null!=this._contentLength&&n-this._range.from>=this._contentLength&&(n=this._range.from+this._contentLength-1),this._currentRequestRange={from:t,to:n},this._internalOpen(this._dataSource,this._currentRequestRange)}},{key:"_internalOpen",value:function(e,t){this._lastTimeLoaded=0;var n=e.url;this._config.reuseRedirectedURL&&(null!=this._currentRedirectedURL?n=this._currentRedirectedURL:null!=e.redirectedURL&&(n=e.redirectedURL));var r=this._seekHandler.getConfig(n,t);this._currentRequestURL=r.url;var i=this._xhr=new XMLHttpRequest;if(i.open("GET",r.url,!0),i.responseType="arraybuffer",i.onreadystatechange=this._onReadyStateChange.bind(this),i.onprogress=this._onProgress.bind(this),i.onload=this._onLoad.bind(this),i.onerror=this._onXhrError.bind(this),e.withCredentials&&(i.withCredentials=!0),"object"==typeof r.headers){var a=r.headers;for(var o in a)a.hasOwnProperty(o)&&i.setRequestHeader(o,a[o])}if("object"==typeof this._config.headers){var s=this._config.headers;for(var l in s)s.hasOwnProperty(l)&&i.setRequestHeader(l,s[l])}i.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._internalAbort(),this._status=b.kComplete}},{key:"_internalAbort",value:function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}},{key:"_onReadyStateChange",value:function(e){var t=e.target;if(2===t.readyState){if(null!=t.responseURL){var n=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&n!==this._currentRedirectedURL&&(this._currentRedirectedURL=n,this._onURLRedirect&&this._onURLRedirect(n))}if(t.status>=200&&t.status<=299){if(this._waitForTotalLength)return;this._status=b.kBuffering}else{if(this._status=b.kError,!this._onError)throw new p("RangeLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(y.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}}}},{key:"_onProgress",value:function(e){if(this._status!==b.kError){if(null===this._contentLength){var t=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,t=!0;var n=e.total;this._internalAbort(),null!=n&0!==n&&(this._totalLength=n)}if(-1===this._range.to?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,t)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var r=e.loaded-this._lastTimeLoaded;this._lastTimeLoaded=e.loaded,this._speedSampler.addBytes(r)}}},{key:"_normalizeSpeed",value:function(e){var t=this._chunkSizeKBList,n=t.length-1,r=0,i=0,a=n;if(e<t[0])return t[0];for(;i<=a;){if((r=i+Math.floor((a-i)/2))===n||e>=t[r]&&e<t[r+1])return t[r];t[r]<e?i=r+1:a=r-1}}},{key:"_onLoad",value:function(e){if(this._status!==b.kError)if(this._waitForTotalLength)this._waitForTotalLength=!1;else{this._lastTimeLoaded=0;var t=this._speedSampler.lastSecondKBps;if(0===t&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(t=this._speedSampler.currentKBps)),0!==t){var n=this._normalizeSpeed(t);this._currentSpeedNormalized!==n&&(this._currentSpeedNormalized=n,this._currentChunkSizeKB=n)}var r=e.target.response,i=this._range.from+this._receivedLength;this._receivedLength+=r.byteLength;var a=!1;null!=this._contentLength&&this._receivedLength<this._contentLength?this._openSubRange():a=!0,this._onDataArrival&&this._onDataArrival(r,i,this._receivedLength),a&&(this._status=b.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}}},{key:"_onXhrError",value:function(e){this._status=b.kError;var t=0,n=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(t=y.EARLY_EOF,n={code:-1,msg:"RangeLoader meet Early-Eof"}):(t=y.EXCEPTION,n={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new p(n.msg);this._onError(t,n)}}],[{key:"isSupported",value:function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="arraybuffer","arraybuffer"===e.responseType}catch(e){return u.w("RangeLoader",e.message),!1}}}]),n}(E),A=function(e){Object(h.a)(n,e);var t=Object(f.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.call(this,"websocket-loader")).TAG="WebSocketLoader",e._needStash=!0,e._ws=null,e._requestAbort=!1,e._receivedLength=0,e}return Object(i.a)(n,[{key:"destroy",value:function(){this._ws&&this.abort(),_(Object(x.a)(n.prototype),"destroy",this).call(this)}},{key:"open",value:function(e){try{var t=this._ws=new self.WebSocket(e.url);t.binaryType="arraybuffer",t.onopen=this._onWebSocketOpen.bind(this),t.onclose=this._onWebSocketClose.bind(this),t.onmessage=this._onWebSocketMessage.bind(this),t.onerror=this._onWebSocketError.bind(this),this._status=b.kConnecting}catch(e){this._status=b.kError;var n={code:e.code,msg:e.message};if(!this._onError)throw new p(n.msg);this._onError(y.EXCEPTION,n)}}},{key:"abort",value:function(){var e=this._ws;!e||0!==e.readyState&&1!==e.readyState||(this._requestAbort=!0,e.close()),this._ws=null,this._status=b.kComplete}},{key:"_onWebSocketOpen",value:function(e){this._status=b.kBuffering}},{key:"_onWebSocketClose",value:function(e){!0!==this._requestAbort?(this._status=b.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)):this._requestAbort=!1}},{key:"_onWebSocketMessage",value:function(e){var t=this;if(e.data instanceof ArrayBuffer)this._dispatchArrayBuffer(e.data);else if(e.data instanceof Blob){var n=new FileReader;n.onload=function(){t._dispatchArrayBuffer(n.result)},n.readAsArrayBuffer(e.data)}else{this._status=b.kError;var r={code:-1,msg:"Unsupported WebSocket message type: "+e.data.constructor.name};if(!this._onError)throw new p(r.msg);this._onError(y.EXCEPTION,r)}}},{key:"_dispatchArrayBuffer",value:function(e){var t=e,n=this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,n,this._receivedLength)}},{key:"_onWebSocketError",value:function(e){this._status=b.kError;var t={code:e.code,msg:e.message};if(!this._onError)throw new p(t.msg);this._onError(y.EXCEPTION,t)}}],[{key:"isSupported",value:function(){try{return void 0!==self.WebSocket}catch(e){return!1}}}]),n}(E),T=function(){function e(t){Object(r.a)(this,e),this._zeroStart=t||!1}return Object(i.a)(e,[{key:"getConfig",value:function(e,t){var n,r={};0!==t.from||-1!==t.to?(n=-1!==t.to?"bytes=".concat(t.from.toString(),"-").concat(t.to.toString()):"bytes=".concat(t.from.toString(),"-"),r.Range=n):this._zeroStart&&(r.Range="bytes=0-");return{url:e,headers:r}}},{key:"removeURLParameters",value:function(e){return e}}]),e}(),I=function(){function e(t,n){Object(r.a)(this,e),this._startName=t,this._endName=n}return Object(i.a)(e,[{key:"getConfig",value:function(e,t){var n=e;if(0!==t.from||-1!==t.to){var r=!0;-1===n.indexOf("?")&&(n+="?",r=!1),r&&(n+="&"),n+="".concat(this._startName,"=").concat(t.from.toString()),-1!==t.to&&(n+="&".concat(this._endName,"=").concat(t.to.toString()))}return{url:n,headers:{}}}},{key:"removeURLParameters",value:function(e){var t=e.split("?")[0],n=void 0,r=e.indexOf("?");-1!==r&&(n=e.substring(r+1));var i="";if(null!=n&&n.length>0)for(var a=n.split("&"),o=0;o<a.length;o++){var s=a[o].split("="),l=o>0;s[0]!==this._startName&&s[0]!==this._endName&&(l&&(i+="&"),i+=a[o])}return 0===i.length?t:t+"?"+i}}]),e}(),D=function(){function e(t,n,i){Object(r.a)(this,e),this.TAG="IOController",this._config=n,this._extraData=i,this._stashInitialSize=393216,null!=n.stashInitialSize&&n.stashInitialSize>0&&(this._stashInitialSize=n.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=3145728,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,!1===n.enableStashBuffer&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=t,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(t.url),this._refTotalLength=t.filesize?t.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new d,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return Object(i.a)(e,[{key:"destroy",value:function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}},{key:"isWorking",value:function(){return this._loader&&this._loader.isWorking()&&!this._paused}},{key:"isPaused",value:function(){return this._paused}},{key:"status",get:function(){return this._loader.status}},{key:"extraData",get:function(){return this._extraData},set:function(e){this._extraData=e}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e}},{key:"onSeeked",get:function(){return this._onSeeked},set:function(e){this._onSeeked=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onComplete",get:function(){return this._onComplete},set:function(e){this._onComplete=e}},{key:"onRedirect",get:function(){return this._onRedirect},set:function(e){this._onRedirect=e}},{key:"onRecoveredEarlyEof",get:function(){return this._onRecoveredEarlyEof},set:function(e){this._onRecoveredEarlyEof=e}},{key:"currentURL",get:function(){return this._dataSource.url}},{key:"hasRedirect",get:function(){return null!=this._redirectedURL||null!=this._dataSource.redirectedURL}},{key:"currentRedirectedURL",get:function(){return this._redirectedURL||this._dataSource.redirectedURL}},{key:"currentSpeed",get:function(){return this._loaderClass===O?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}},{key:"loaderType",get:function(){return this._loader.type}},{key:"_selectSeekHandler",value:function(){var e=this._config;if("range"===e.seekType)this._seekHandler=new T(this._config.rangeLoadZeroStart);else if("param"===e.seekType){var t=e.seekParamStart||"bstart",n=e.seekParamEnd||"bend";this._seekHandler=new I(t,n)}else{if("custom"!==e.seekType)throw new g("Invalid seekType in config: ".concat(e.seekType));if("function"!=typeof e.customSeekHandler)throw new g("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new e.customSeekHandler}}},{key:"_selectLoader",value:function(){if(null!=this._config.customLoader)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=A;else if(C.isSupported())this._loaderClass=C;else if(S.isSupported())this._loaderClass=S;else{if(!O.isSupported())throw new p("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=O}}},{key:"_createLoader",value:function(){this._loader=new this._loaderClass(this._seekHandler,this._config),!1===this._loader.needStashBuffer&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}},{key:"open",value:function(e){this._currentRange={from:0,to:-1},e&&(this._currentRange.from=e),this._speedSampler.reset(),e||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}},{key:"abort",value:function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}},{key:"pause",value:function(){this.isWorking()&&(this._loader.abort(),0!==this._stashUsed?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}},{key:"resume",value:function(){if(this._paused){this._paused=!1;var e=this._resumeFrom;this._resumeFrom=0,this._internalSeek(e,!0)}}},{key:"seek",value:function(e){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(e,!0)}},{key:"_internalSeek",value:function(e,t){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(t),this._loader.destroy(),this._loader=null;var n={from:e,to:-1};this._currentRange={from:n.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,n),this._onSeeked&&this._onSeeked()}},{key:"updateUrl",value:function(e){if(!e||"string"!=typeof e||0===e.length)throw new g("Url must be a non-empty string!");this._dataSource.url=e}},{key:"_expandBuffer",value:function(e){for(var t=this._stashSize;t+1048576<e;)t*=2;if((t+=1048576)!==this._bufferSize){var n=new ArrayBuffer(t);if(this._stashUsed>0){var r=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(n,0,t).set(r,0)}this._stashBuffer=n,this._bufferSize=t}}},{key:"_normalizeSpeed",value:function(e){var t=this._speedNormalizeList,n=t.length-1,r=0,i=0,a=n;if(e<t[0])return t[0];for(;i<=a;){if((r=i+Math.floor((a-i)/2))===n||e>=t[r]&&e<t[r+1])return t[r];t[r]<e?i=r+1:a=r-1}}},{key:"_adjustStashSize",value:function(e){var t=0;(t=this._config.isLive||e<512?e:e>=512&&e<=1024?Math.floor(1.5*e):2*e)>8192&&(t=8192);var n=1024*t+1048576;this._bufferSize<n&&this._expandBuffer(n),this._stashSize=1024*t}},{key:"_dispatchChunks",value:function(e,t){return this._currentRange.to=t+e.byteLength-1,this._onDataArrival(e,t)}},{key:"_onURLRedirect",value:function(e){this._redirectedURL=e,this._onRedirect&&this._onRedirect(e)}},{key:"_onContentLengthKnown",value:function(e){e&&this._fullRequestFlag&&(this._totalLength=e,this._fullRequestFlag=!1)}},{key:"_onLoaderChunkArrival",value:function(e,t,n){if(!this._onDataArrival)throw new m("IOController: No existing consumer (onDataArrival) callback!");if(!this._paused){this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(e.byteLength);var r=this._speedSampler.lastSecondKBps;if(0!==r){var i=this._normalizeSpeed(r);this._speedNormalized!==i&&(this._speedNormalized=i,this._adjustStashSize(i))}if(this._enableStash)if(0===this._stashUsed&&0===this._stashByteStart&&(this._stashByteStart=t),this._stashUsed+e.byteLength<=this._stashSize){new Uint8Array(this._stashBuffer,0,this._stashSize).set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else{var a=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){var o=this._stashBuffer.slice(0,this._stashUsed),s=this._dispatchChunks(o,this._stashByteStart);if(s<o.byteLength){if(s>0){var l=new Uint8Array(o,s);a.set(l,0),this._stashUsed=l.byteLength,this._stashByteStart+=s}}else this._stashUsed=0,this._stashByteStart+=s;this._stashUsed+e.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+e.byteLength),a=new Uint8Array(this._stashBuffer,0,this._bufferSize)),a.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else{var c=this._dispatchChunks(e,t);if(c<e.byteLength){var u=e.byteLength-c;u>this._bufferSize&&(this._expandBuffer(u),a=new Uint8Array(this._stashBuffer,0,this._bufferSize)),a.set(new Uint8Array(e,c),0),this._stashUsed+=u,this._stashByteStart=t+c}}}else if(0===this._stashUsed){var d=this._dispatchChunks(e,t);if(d<e.byteLength){var h=e.byteLength-d;h>this._bufferSize&&this._expandBuffer(h),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(e,d),0),this._stashUsed+=h,this._stashByteStart=t+d}}else{this._stashUsed+e.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+e.byteLength);var f=new Uint8Array(this._stashBuffer,0,this._bufferSize);f.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength;var p=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(p<this._stashUsed&&p>0){var g=new Uint8Array(this._stashBuffer,p);f.set(g,0)}this._stashUsed-=p,this._stashByteStart+=p}}}},{key:"_flushStashBuffer",value:function(e){if(this._stashUsed>0){var t=this._stashBuffer.slice(0,this._stashUsed),n=this._dispatchChunks(t,this._stashByteStart),r=t.byteLength-n;if(n<t.byteLength){if(!e){if(n>0){var i=new Uint8Array(this._stashBuffer,0,this._bufferSize),a=new Uint8Array(t,n);i.set(a,0),this._stashUsed=a.byteLength,this._stashByteStart+=n}return 0}u.w(this.TAG,"".concat(r," bytes unconsumed data remain when flush buffer, dropped"))}return this._stashUsed=0,this._stashByteStart=0,r}return 0}},{key:"_onLoaderComplete",value:function(e,t){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}},{key:"_onLoaderError",value:function(e,t){switch(u.e(this.TAG,"Loader error, code = ".concat(t.code,", msg = ").concat(t.msg)),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,e=y.UNRECOVERABLE_EARLY_EOF),e){case y.EARLY_EOF:if(!this._config.isLive&&this._totalLength){var n=this._currentRange.to+1;return void(n<this._totalLength&&(u.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(n,!1)))}e=y.UNRECOVERABLE_EARLY_EOF}if(!this._onError)throw new p("IOException: "+t.msg);this._onError(e,t)}}]),e}(),L={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:180,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:180,autoCleanupMinBackwardDuration:120,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0};function R(){return Object.assign({},L)}var N=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"supportMSEH264Playback",value:function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}},{key:"supportNetworkStreamIO",value:function(){var e=new D({},R()),t=e.loaderType;return e.destroy(),"fetch-stream-loader"==t||"xhr-moz-chunked-loader"==t}},{key:"getNetworkLoaderTypeName",value:function(){var e=new D({},R()),t=e.loaderType;return e.destroy(),t}},{key:"supportNativeMediaPlayback",value:function(t){null==e.videoElement&&(e.videoElement=window.document.createElement("video"));var n=e.videoElement.canPlayType(t);return"probably"===n||"maybe"==n}},{key:"getFeatureList",value:function(){var t={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return t.mseFlvPlayback=e.supportMSEH264Playback(),t.networkStreamIO=e.supportNetworkStreamIO(),t.networkLoaderName=e.getNetworkLoaderTypeName(),t.mseLiveFlvPlayback=t.mseFlvPlayback&&t.networkStreamIO,t.nativeMP4H264Playback=e.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),t.nativeWebmVP8Playback=e.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),t.nativeWebmVP9Playback=e.supportNativeMediaPlayback('video/webm; codecs="vp9"'),t}}]),e}(),j={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info"},M=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"forceGlobalTag",get:function(){return u.FORCE_GLOBAL_TAG},set:function(t){u.FORCE_GLOBAL_TAG=t,e._notifyChange()}},{key:"globalTag",get:function(){return u.GLOBAL_TAG},set:function(t){u.GLOBAL_TAG=t,e._notifyChange()}},{key:"enableAll",get:function(){return u.ENABLE_VERBOSE&&u.ENABLE_DEBUG&&u.ENABLE_INFO&&u.ENABLE_WARN&&u.ENABLE_ERROR},set:function(t){u.ENABLE_VERBOSE=t,u.ENABLE_DEBUG=t,u.ENABLE_INFO=t,u.ENABLE_WARN=t,u.ENABLE_ERROR=t,e._notifyChange()}},{key:"enableDebug",get:function(){return u.ENABLE_DEBUG},set:function(t){u.ENABLE_DEBUG=t,e._notifyChange()}},{key:"enableVerbose",get:function(){return u.ENABLE_VERBOSE},set:function(t){u.ENABLE_VERBOSE=t,e._notifyChange()}},{key:"enableInfo",get:function(){return u.ENABLE_INFO},set:function(t){u.ENABLE_INFO=t,e._notifyChange()}},{key:"enableWarn",get:function(){return u.ENABLE_WARN},set:function(t){u.ENABLE_WARN=t,e._notifyChange()}},{key:"enableError",get:function(){return u.ENABLE_ERROR},set:function(t){u.ENABLE_ERROR=t,e._notifyChange()}},{key:"getConfig",value:function(){return{globalTag:u.GLOBAL_TAG,forceGlobalTag:u.FORCE_GLOBAL_TAG,enableVerbose:u.ENABLE_VERBOSE,enableDebug:u.ENABLE_DEBUG,enableInfo:u.ENABLE_INFO,enableWarn:u.ENABLE_WARN,enableError:u.ENABLE_ERROR,enableCallback:u.ENABLE_CALLBACK}}},{key:"applyConfig",value:function(e){u.GLOBAL_TAG=e.globalTag,u.FORCE_GLOBAL_TAG=e.forceGlobalTag,u.ENABLE_VERBOSE=e.enableVerbose,u.ENABLE_DEBUG=e.enableDebug,u.ENABLE_INFO=e.enableInfo,u.ENABLE_WARN=e.enableWarn,u.ENABLE_ERROR=e.enableError,u.ENABLE_CALLBACK=e.enableCallback}},{key:"_notifyChange",value:function(){var t=e.emitter;if(t.listenerCount("change")>0){var n=e.getConfig();t.emit("change",n)}}},{key:"registerListener",value:function(t){e.emitter.addListener("change",t)}},{key:"removeListener",value:function(t){e.emitter.removeListener("change",t)}},{key:"addLogListener",value:function(t){u.emitter.addListener("log",t),u.emitter.listenerCount("log")>0&&(u.ENABLE_CALLBACK=!0,e._notifyChange())}},{key:"removeLogListener",value:function(t){u.emitter.removeListener("log",t),0===u.emitter.listenerCount("log")&&(u.ENABLE_CALLBACK=!1,e._notifyChange())}}]),e}();M.emitter=new l.a;var P=M,B=function(){function e(){Object(r.a)(this,e),this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return Object(i.a)(e,[{key:"isComplete",value:function(){var e=!1===this.hasAudio||!0===this.hasAudio&&null!=this.audioCodec&&null!=this.audioSampleRate&&null!=this.audioChannelCount,t=!1===this.hasVideo||!0===this.hasVideo&&null!=this.videoCodec&&null!=this.width&&null!=this.height&&null!=this.fps&&null!=this.profile&&null!=this.level&&null!=this.refFrames&&null!=this.chromaFormat&&null!=this.sarNum&&null!=this.sarDen;return null!=this.mimeType&&null!=this.duration&&null!=this.metadata&&null!=this.hasKeyframesIndex&&e&&t}},{key:"isSeekable",value:function(){return!0===this.hasKeyframesIndex}},{key:"getNearestKeyframe",value:function(e){if(null==this.keyframesIndex)return null;var t=this.keyframesIndex,n=this._search(t.times,e);return{index:n,milliseconds:t.times[n],fileposition:t.filepositions[n]}}},{key:"_search",value:function(e,t){var n=0,r=e.length-1,i=0,a=0,o=r;for(t<e[0]&&(n=0,a=o+1);a<=o;){if((i=a+Math.floor((o-a)/2))===r||t>=e[i]&&t<e[i+1]){n=i;break}e[i]<t?a=i+1:o=i-1}return n}}]),e}();function F(e,t,n){var r=e;if(t+n<r.length){for(;n--;)if(128!=(192&r[++t]))return!1;return!0}return!1}var U,H=function(e){for(var t=[],n=e,r=0,i=e.length;r<i;)if(n[r]<128)t.push(String.fromCharCode(n[r])),++r;else{if(n[r]<192);else if(n[r]<224){if(F(n,r,1)){var a=(31&n[r])<<6|63&n[r+1];if(a>=128){t.push(String.fromCharCode(65535&a)),r+=2;continue}}}else if(n[r]<240){if(F(n,r,2)){var o=(15&n[r])<<12|(63&n[r+1])<<6|63&n[r+2];if(o>=2048&&55296!=(63488&o)){t.push(String.fromCharCode(65535&o)),r+=3;continue}}}else if(n[r]<248&&F(n,r,3)){var s=(7&n[r])<<18|(63&n[r+1])<<12|(63&n[r+2])<<6|63&n[r+3];if(s>65536&&s<1114112){s-=65536,t.push(String.fromCharCode(s>>>10|55296)),t.push(String.fromCharCode(1023&s|56320)),r+=4;continue}}t.push(String.fromCharCode(65533)),++r}return t.join("")},z=(U=new ArrayBuffer(2),new DataView(U).setInt16(0,256,!0),256===new Int16Array(U)[0]),G=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"parseScriptData",value:function(t,n,r){var i={};try{var a=e.parseValue(t,n,r),o=e.parseValue(t,n+a.size,r-a.size);i[a.data]=o.data}catch(e){u.e("AMF",e.toString())}return i}},{key:"parseObject",value:function(t,n,r){if(r<3)throw new m("Data not enough when parse ScriptDataObject");var i=e.parseString(t,n,r),a=e.parseValue(t,n+i.size,r-i.size),o=a.objectEnd;return{data:{name:i.data,value:a.data},size:i.size+a.size,objectEnd:o}}},{key:"parseVariable",value:function(t,n,r){return e.parseObject(t,n,r)}},{key:"parseString",value:function(e,t,n){if(n<2)throw new m("Data not enough when parse String");var r=new DataView(e,t,n).getUint16(0,!z);return{data:r>0?H(new Uint8Array(e,t+2,r)):"",size:2+r}}},{key:"parseLongString",value:function(e,t,n){if(n<4)throw new m("Data not enough when parse LongString");var r=new DataView(e,t,n).getUint32(0,!z);return{data:r>0?H(new Uint8Array(e,t+4,r)):"",size:4+r}}},{key:"parseDate",value:function(e,t,n){if(n<10)throw new m("Data size invalid when parse Date");var r=new DataView(e,t,n),i=r.getFloat64(0,!z),a=r.getInt16(8,!z);return{data:new Date(i+=60*a*1e3),size:10}}},{key:"parseValue",value:function(t,n,r){if(r<1)throw new m("Data not enough when parse Value");var i,a=new DataView(t,n,r),o=1,s=a.getUint8(0),l=!1;try{switch(s){case 0:i=a.getFloat64(1,!z),o+=8;break;case 1:i=!!a.getUint8(1),o+=1;break;case 2:var c=e.parseString(t,n+1,r-1);i=c.data,o+=c.size;break;case 3:i={};var d=0;for(9==(16777215&a.getUint32(r-4,!z))&&(d=3);o<r-4;){var h=e.parseObject(t,n+o,r-o-d);if(h.objectEnd)break;i[h.data.name]=h.data.value,o+=h.size}if(o<=r-3)9===(16777215&a.getUint32(o-1,!z))&&(o+=3);break;case 8:i={},o+=4;var f=0;for(9==(16777215&a.getUint32(r-4,!z))&&(f=3);o<r-8;){var p=e.parseVariable(t,n+o,r-o-f);if(p.objectEnd)break;i[p.data.name]=p.data.value,o+=p.size}if(o<=r-3)9===(16777215&a.getUint32(o-1,!z))&&(o+=3);break;case 9:i=void 0,o=1,l=!0;break;case 10:i=[];var g=a.getUint32(1,!z);o+=4;for(var v=0;v<g;v++){var b=e.parseValue(t,n+o,r-o);i.push(b.data),o+=b.size}break;case 11:var y=e.parseDate(t,n+1,r-1);i=y.data,o+=y.size;break;case 12:var E=e.parseString(t,n+1,r-1);i=E.data,o+=E.size;break;default:o=r,u.w("AMF","Unsupported AMF value type "+s)}}catch(e){u.e("AMF",e.toString())}return{data:i,size:o,objectEnd:l}}}]),e}(),V=function(){function e(t){Object(r.a)(this,e),this.TAG="ExpGolomb",this._buffer=t,this._buffer_index=0,this._total_bytes=t.byteLength,this._total_bits=8*t.byteLength,this._current_word=0,this._current_word_bits_left=0}return Object(i.a)(e,[{key:"destroy",value:function(){this._buffer=null}},{key:"_fillCurrentWord",value:function(){var e=this._total_bytes-this._buffer_index;if(e<=0)throw new m("ExpGolomb: _fillCurrentWord() but no bytes available");var t=Math.min(4,e),n=new Uint8Array(4);n.set(this._buffer.subarray(this._buffer_index,this._buffer_index+t)),this._current_word=new DataView(n.buffer).getUint32(0,!1),this._buffer_index+=t,this._current_word_bits_left=8*t}},{key:"readBits",value:function(e){if(e>32)throw new g("ExpGolomb: readBits() bits exceeded max 32bits!");if(e<=this._current_word_bits_left){var t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}var n=this._current_word_bits_left?this._current_word:0;n>>>=32-this._current_word_bits_left;var r=e-this._current_word_bits_left;this._fillCurrentWord();var i=Math.min(r,this._current_word_bits_left),a=this._current_word>>>32-i;return this._current_word<<=i,this._current_word_bits_left-=i,n=n<<i|a}},{key:"readBool",value:function(){return 1===this.readBits(1)}},{key:"readByte",value:function(){return this.readBits(8)}},{key:"_skipLeadingZero",value:function(){var e;for(e=0;e<this._current_word_bits_left;e++)if(0!=(this._current_word&2147483648>>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}},{key:"readUEG",value:function(){var e=this._skipLeadingZero();return this.readBits(e+1)-1}},{key:"readSEG",value:function(){var e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}]),e}(),W=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"_ebsp2rbsp",value:function(e){for(var t=e,n=t.byteLength,r=new Uint8Array(n),i=0,a=0;a<n;a++)a>=2&&3===t[a]&&0===t[a-1]&&0===t[a-2]||(r[i]=t[a],i++);return new Uint8Array(r.buffer,0,i)}},{key:"parseSPS",value:function(t){var n=e._ebsp2rbsp(t),r=new V(n);r.readByte();var i=r.readByte();r.readByte();var a=r.readByte();r.readUEG();var o=e.getProfileString(i),s=e.getLevelString(a),l=1,c=420,u=8;if((100===i||110===i||122===i||244===i||44===i||83===i||86===i||118===i||128===i||138===i||144===i)&&(3===(l=r.readUEG())&&r.readBits(1),l<=3&&(c=[0,420,422,444][l]),u=r.readUEG()+8,r.readUEG(),r.readBits(1),r.readBool()))for(var d=3!==l?8:12,h=0;h<d;h++)r.readBool()&&(h<6?e._skipScalingList(r,16):e._skipScalingList(r,64));r.readUEG();var f=r.readUEG();if(0===f)r.readUEG();else if(1===f){r.readBits(1),r.readSEG(),r.readSEG();for(var p=r.readUEG(),m=0;m<p;m++)r.readSEG()}var g=r.readUEG();r.readBits(1);var v=r.readUEG(),b=r.readUEG(),y=r.readBits(1);0===y&&r.readBits(1),r.readBits(1);var E=0,x=0,_=0,k=0;r.readBool()&&(E=r.readUEG(),x=r.readUEG(),_=r.readUEG(),k=r.readUEG());var w=1,C=1,S=0,O=!0,A=0,T=0;if(r.readBool()){if(r.readBool()){var I=r.readByte();I>0&&I<16?(w=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][I-1],C=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][I-1]):255===I&&(w=r.readByte()<<8|r.readByte(),C=r.readByte()<<8|r.readByte())}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(4),r.readBool()&&r.readBits(24)),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool()){var D=r.readBits(32),L=r.readBits(32);O=r.readBool(),S=(A=L)/(T=2*D)}}var R=1;1===w&&1===C||(R=w/C);var N=0,j=0;0===l?(N=1,j=2-y):(N=3===l?1:2,j=(1===l?2:1)*(2-y));var M=16*(v+1),P=16*(b+1)*(2-y);M-=(E+x)*N,P-=(_+k)*j;var B=Math.ceil(M*R);return r.destroy(),r=null,{profile_string:o,level_string:s,bit_depth:u,ref_frames:g,chroma_format:c,chroma_format_string:e.getChromaFormatString(c),frame_rate:{fixed:O,fps:S,fps_den:T,fps_num:A},sar_ratio:{width:w,height:C},codec_size:{width:M,height:P},present_size:{width:B,height:P}}}},{key:"_skipScalingList",value:function(e,t){for(var n=8,r=8,i=0;i<t;i++)0!==r&&(r=(n+e.readSEG()+256)%256),n=0===r?n:r}},{key:"getProfileString",value:function(e){switch(e){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}},{key:"getLevelString",value:function(e){return(e/10).toFixed(1)}},{key:"getChromaFormatString",value:function(e){switch(e){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}]),e}(),K={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};var q=function(){function e(t,n){Object(r.a)(this,e),this.TAG="FLVDemuxer",this._config=n,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=t.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=t.hasAudioTrack,this._hasVideo=t.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new B,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){var e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}()}return Object(i.a)(e,[{key:"destroy",value:function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null}},{key:"bindDataSource",value:function(e){return e.onDataArrival=this.parseChunks.bind(this),this}},{key:"onTrackMetadata",get:function(){return this._onTrackMetadata},set:function(e){this._onTrackMetadata=e}},{key:"onMediaInfo",get:function(){return this._onMediaInfo},set:function(e){this._onMediaInfo=e}},{key:"onMetaDataArrived",get:function(){return this._onMetaDataArrived},set:function(e){this._onMetaDataArrived=e}},{key:"onScriptDataArrived",get:function(){return this._onScriptDataArrived},set:function(e){this._onScriptDataArrived=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onDataAvailable",get:function(){return this._onDataAvailable},set:function(e){this._onDataAvailable=e}},{key:"timestampBase",get:function(){return this._timestampBase},set:function(e){this._timestampBase=e}},{key:"overridedDuration",get:function(){return this._duration},set:function(e){this._durationOverrided=!0,this._duration=e,this._mediaInfo.duration=e}},{key:"overridedHasAudio",set:function(e){this._hasAudioFlagOverrided=!0,this._hasAudio=e,this._mediaInfo.hasAudio=e}},{key:"overridedHasVideo",set:function(e){this._hasVideoFlagOverrided=!0,this._hasVideo=e,this._mediaInfo.hasVideo=e}},{key:"resetMediaInfo",value:function(){this._mediaInfo=new B}},{key:"_isInitialMetadataDispatched",value:function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!(this._hasAudio||!this._hasVideo)&&this._videoInitialMetadataDispatched}},{key:"parseChunks",value:function(t,n){if(!(this._onError&&this._onMediaInfo&&this._onTrackMetadata&&this._onDataAvailable))throw new m("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var r=0,i=this._littleEndian;if(0===n){if(!(t.byteLength>13))return 0;r=e.probe(t).dataOffset}this._firstParse&&(this._firstParse=!1,n+r!==this._dataOffset&&u.w(this.TAG,"First time parsing but chunk byteStart invalid!"),0!==new DataView(t,r).getUint32(0,!i)&&u.w(this.TAG,"PrevTagSize0 !== 0 !!!"),r+=4);for(;r<t.byteLength;){this._dispatch=!0;var a=new DataView(t,r);if(r+11+4>t.byteLength)break;var o=a.getUint8(0),s=16777215&a.getUint32(0,!i);if(r+11+s+4>t.byteLength)break;if(8===o||9===o||18===o){var l=a.getUint8(4),c=a.getUint8(5),d=a.getUint8(6)|c<<8|l<<16|a.getUint8(7)<<24;0!==(16777215&a.getUint32(7,!i))&&u.w(this.TAG,"Meet tag which has StreamID != 0!");var h=r+11;switch(o){case 8:this._parseAudioData(t,h,s,d);break;case 9:this._parseVideoData(t,h,s,d,n+r);break;case 18:this._parseScriptData(t,h,s)}var f=a.getUint32(11+s,!i);f!==11+s&&u.w(this.TAG,"Invalid PrevTagSize ".concat(f)),r+=11+s+4}else u.w(this.TAG,"Unsupported tag type ".concat(o,", skipped")),r+=11+s+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),r}},{key:"_parseScriptData",value:function(e,t,n){var r=G.parseScriptData(e,t,n);if(r.hasOwnProperty("onMetaData")){if(null==r.onMetaData||"object"!=typeof r.onMetaData)return void u.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&u.w(this.TAG,"Found another onMetaData tag!"),this._metadata=r;var i=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},i)),"boolean"==typeof i.hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=i.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),"boolean"==typeof i.hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=i.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),"number"==typeof i.audiodatarate&&(this._mediaInfo.audioDataRate=i.audiodatarate),"number"==typeof i.videodatarate&&(this._mediaInfo.videoDataRate=i.videodatarate),"number"==typeof i.width&&(this._mediaInfo.width=i.width),"number"==typeof i.height&&(this._mediaInfo.height=i.height),"number"==typeof i.duration){if(!this._durationOverrided){var a=Math.floor(i.duration*this._timescale);this._duration=a,this._mediaInfo.duration=a}}else this._mediaInfo.duration=0;if("number"==typeof i.framerate){var o=Math.floor(1e3*i.framerate);if(o>0){var s=o/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=s,this._referenceFrameRate.fps_num=o,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=s}}if("object"==typeof i.keyframes){this._mediaInfo.hasKeyframesIndex=!0;var l=i.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(l),i.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=i,u.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(r).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},r))}},{key:"_parseKeyframesIndex",value:function(e){for(var t=[],n=[],r=1;r<e.times.length;r++){var i=this._timestampBase+Math.floor(1e3*e.times[r]);t.push(i),n.push(e.filepositions[r])}return{times:t,filepositions:n}}},{key:"_parseAudioData",value:function(e,t,n,r){if(n<=1)u.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");else if(!0!==this._hasAudioFlagOverrided||!1!==this._hasAudio){this._littleEndian;var i=new DataView(e,t,n).getUint8(0),a=i>>>4;if(2===a||10===a){var o=0,s=(12&i)>>>2;if(s>=0&&s<=4){o=this._flvSoundRateTable[s];var l=1&i,c=this._audioMetadata,d=this._audioTrack;if(c||(!1===this._hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),(c=this._audioMetadata={}).type="audio",c.id=d.id,c.timescale=this._timescale,c.duration=this._duration,c.audioSampleRate=o,c.channelCount=0===l?1:2),10===a){var h=this._parseAACAudioData(e,t+1,n-1);if(null==h)return;if(0===h.packetType){c.config&&u.w(this.TAG,"Found another AudioSpecificConfig!");var f=h.data;c.audioSampleRate=f.samplingRate,c.channelCount=f.channelCount,c.codec=f.codec,c.originalCodec=f.originalCodec,c.config=f.config,c.refSampleDuration=1024/c.audioSampleRate*c.timescale,u.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",c);var p=this._mediaInfo;p.audioCodec=c.originalCodec,p.audioSampleRate=c.audioSampleRate,p.audioChannelCount=c.channelCount,p.hasVideo?null!=p.videoCodec&&(p.mimeType='video/x-flv; codecs="'+p.videoCodec+","+p.audioCodec+'"'):p.mimeType='video/x-flv; codecs="'+p.audioCodec+'"',p.isComplete()&&this._onMediaInfo(p)}else if(1===h.packetType){var m=this._timestampBase+r,g={unit:h.data,length:h.data.byteLength,dts:m,pts:m};d.samples.push(g),d.length+=h.data.length}else u.e(this.TAG,"Flv: Unsupported AAC data type ".concat(h.packetType))}else if(2===a){if(!c.codec){var v=this._parseMP3AudioData(e,t+1,n-1,!0);if(null==v)return;c.audioSampleRate=v.samplingRate,c.channelCount=v.channelCount,c.codec=v.codec,c.originalCodec=v.originalCodec,c.refSampleDuration=1152/c.audioSampleRate*c.timescale,u.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",c);var b=this._mediaInfo;b.audioCodec=c.codec,b.audioSampleRate=c.audioSampleRate,b.audioChannelCount=c.channelCount,b.audioDataRate=v.bitRate,b.hasVideo?null!=b.videoCodec&&(b.mimeType='video/x-flv; codecs="'+b.videoCodec+","+b.audioCodec+'"'):b.mimeType='video/x-flv; codecs="'+b.audioCodec+'"',b.isComplete()&&this._onMediaInfo(b)}var y=this._parseMP3AudioData(e,t+1,n-1,!1);if(null==y)return;var E=this._timestampBase+r,x={unit:y,length:y.byteLength,dts:E,pts:E};d.samples.push(x),d.length+=y.length}}else this._onError(K.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+s)}else this._onError(K.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+a)}}},{key:"_parseAACAudioData",value:function(e,t,n){if(!(n<=1)){var r={},i=new Uint8Array(e,t,n);return r.packetType=i[0],0===i[0]?r.data=this._parseAACAudioSpecificConfig(e,t+1,n-1):r.data=i.subarray(1),r}u.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!")}},{key:"_parseAACAudioSpecificConfig",value:function(e,t,n){var r,i,a=new Uint8Array(e,t,n),o=null,s=0,l=null;if(s=r=a[0]>>>3,(i=(7&a[0])<<1|a[1]>>>7)<0||i>=this._mpegSamplingRates.length)this._onError(K.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");else{var c=this._mpegSamplingRates[i],u=(120&a[1])>>>3;if(!(u<0||u>=8)){5===s&&(l=(7&a[1])<<1|a[2]>>>7,(124&a[2])>>>2);var d=self.navigator.userAgent.toLowerCase();return-1!==d.indexOf("firefox")?i>=6?(s=5,o=new Array(4),l=i-3):(s=2,o=new Array(2),l=i):-1!==d.indexOf("android")?(s=2,o=new Array(2),l=i):(s=5,l=i,o=new Array(4),i>=6?l=i-3:1===u&&(s=2,o=new Array(2),l=i)),o[0]=s<<3,o[0]|=(15&i)>>>1,o[1]=(15&i)<<7,o[1]|=(15&u)<<3,5===s&&(o[1]|=(15&l)>>>1,o[2]=(1&l)<<7,o[2]|=8,o[3]=0),{config:o,samplingRate:c,channelCount:u,codec:"mp4a.40."+s,originalCodec:"mp4a.40."+r}}this._onError(K.FORMAT_ERROR,"Flv: AAC invalid channel configuration")}}},{key:"_parseMP3AudioData",value:function(e,t,n,r){if(!(n<4)){this._littleEndian;var i=new Uint8Array(e,t,n),a=null;if(r){if(255!==i[0])return;var o=i[1]>>>3&3,s=(6&i[1])>>1,l=(240&i[2])>>>4,c=(12&i[2])>>>2,d=3!==(i[3]>>>6&3)?2:1,h=0,f=0;switch(o){case 0:h=this._mpegAudioV25SampleRateTable[c];break;case 2:h=this._mpegAudioV20SampleRateTable[c];break;case 3:h=this._mpegAudioV10SampleRateTable[c]}switch(s){case 1:34,l<this._mpegAudioL3BitRateTable.length&&(f=this._mpegAudioL3BitRateTable[l]);break;case 2:33,l<this._mpegAudioL2BitRateTable.length&&(f=this._mpegAudioL2BitRateTable[l]);break;case 3:32,l<this._mpegAudioL1BitRateTable.length&&(f=this._mpegAudioL1BitRateTable[l])}a={bitRate:f,samplingRate:h,channelCount:d,codec:"mp3",originalCodec:"mp3"}}else a=i;return a}u.w(this.TAG,"Flv: Invalid MP3 packet, header missing!")}},{key:"_parseVideoData",value:function(e,t,n,r,i){if(n<=1)u.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");else if(!0!==this._hasVideoFlagOverrided||!1!==this._hasVideo){var a=new Uint8Array(e,t,n)[0],o=(240&a)>>>4,s=15&a;7===s?this._parseAVCVideoPacket(e,t+1,n-1,r,i,o):this._onError(K.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(s))}}},{key:"_parseAVCVideoPacket",value:function(e,t,n,r,i,a){if(n<4)u.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");else{var o=this._littleEndian,s=new DataView(e,t,n),l=s.getUint8(0),c=(16777215&s.getUint32(0,!o))<<8>>8;if(0===l)this._parseAVCDecoderConfigurationRecord(e,t+4,n-4);else if(1===l)this._parseAVCVideoData(e,t+4,n-4,r,i,a,c);else if(2!==l)return void this._onError(K.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(l))}}},{key:"_parseAVCDecoderConfigurationRecord",value:function(e,t,n){if(n<7)u.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");else{var r=this._videoMetadata,i=this._videoTrack,a=this._littleEndian,o=new DataView(e,t,n);r?void 0!==r.avcc&&u.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),(r=this._videoMetadata={}).type="video",r.id=i.id,r.timescale=this._timescale,r.duration=this._duration);var s=o.getUint8(0),l=o.getUint8(1);o.getUint8(2),o.getUint8(3);if(1===s&&0!==l)if(this._naluLengthSize=1+(3&o.getUint8(4)),3===this._naluLengthSize||4===this._naluLengthSize){var c=31&o.getUint8(5);if(0!==c){c>1&&u.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ".concat(c));for(var d=6,h=0;h<c;h++){var f=o.getUint16(d,!a);if(d+=2,0!==f){var p=new Uint8Array(e,t+d,f);d+=f;var m=W.parseSPS(p);if(0===h){r.codecWidth=m.codec_size.width,r.codecHeight=m.codec_size.height,r.presentWidth=m.present_size.width,r.presentHeight=m.present_size.height,r.profile=m.profile_string,r.level=m.level_string,r.bitDepth=m.bit_depth,r.chromaFormat=m.chroma_format,r.sarRatio=m.sar_ratio,r.frameRate=m.frame_rate,!1!==m.frame_rate.fixed&&0!==m.frame_rate.fps_num&&0!==m.frame_rate.fps_den||(r.frameRate=this._referenceFrameRate);var g=r.frameRate.fps_den,v=r.frameRate.fps_num;r.refSampleDuration=r.timescale*(g/v);for(var b=p.subarray(1,4),y="avc1.",E=0;E<3;E++){var x=b[E].toString(16);x.length<2&&(x="0"+x),y+=x}r.codec=y;var _=this._mediaInfo;_.width=r.codecWidth,_.height=r.codecHeight,_.fps=r.frameRate.fps,_.profile=r.profile,_.level=r.level,_.refFrames=m.ref_frames,_.chromaFormat=m.chroma_format_string,_.sarNum=r.sarRatio.width,_.sarDen=r.sarRatio.height,_.videoCodec=y,_.hasAudio?null!=_.audioCodec&&(_.mimeType='video/x-flv; codecs="'+_.videoCodec+","+_.audioCodec+'"'):_.mimeType='video/x-flv; codecs="'+_.videoCodec+'"',_.isComplete()&&this._onMediaInfo(_)}}}var k=o.getUint8(d);if(0!==k){k>1&&u.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ".concat(k)),d++;for(var w=0;w<k;w++){var C=o.getUint16(d,!a);d+=2,0!==C&&(d+=C)}r.avcc=new Uint8Array(n),r.avcc.set(new Uint8Array(e,t,n),0),u.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",r)}else this._onError(K.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS")}else this._onError(K.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS")}else this._onError(K.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: ".concat(this._naluLengthSize-1));else this._onError(K.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord")}}},{key:"_parseAVCVideoData",value:function(e,t,n,r,i,a,o){for(var s=this._littleEndian,l=new DataView(e,t,n),c=[],d=0,h=0,f=this._naluLengthSize,p=this._timestampBase+r,m=1===a;h<n;){if(h+4>=n){u.w(this.TAG,"Malformed Nalu near timestamp ".concat(p,", offset = ").concat(h,", dataSize = ").concat(n));break}var g=l.getUint32(h,!s);if(3===f&&(g>>>=8),g>n-f)return void u.w(this.TAG,"Malformed Nalus near timestamp ".concat(p,", NaluSize > DataSize!"));var v=31&l.getUint8(h+f);5===v&&(m=!0);var b=new Uint8Array(e,t+h,f+g),y={type:v,data:b};c.push(y),d+=b.byteLength,h+=f+g}if(c.length){var E=this._videoTrack,x={units:c,length:d,isKeyframe:m,dts:p,cts:o,pts:p+o};m&&(x.fileposition=i),E.samples.push(x),E.length+=d}}}],[{key:"probe",value:function(e){var t=new Uint8Array(e),n={match:!1};if(70!==t[0]||76!==t[1]||86!==t[2]||1!==t[3])return n;var r,i,a=(4&t[4])>>>2!=0,o=0!=(1&t[4]),s=(r=t)[i=5]<<24|r[i+1]<<16|r[i+2]<<8|r[i+3];return s<9?n:{match:!0,consumed:s,dataOffset:s,hasAudioTrack:a,hasVideoTrack:o}}}]),e}(),Y=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"init",value:function(){for(var t in e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=e.constants={};n.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),n.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),n.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),n.STSC=n.STCO=n.STTS,n.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),n.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),n.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),n.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),n.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),n.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}},{key:"box",value:function(e){for(var t=8,n=null,r=Array.prototype.slice.call(arguments,1),i=r.length,a=0;a<i;a++)t+=r[a].byteLength;(n=new Uint8Array(t))[0]=t>>>24&255,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n.set(e,4);for(var o=8,s=0;s<i;s++)n.set(r[s],o),o+=r[s].byteLength;return n}},{key:"generateInitSegment",value:function(t){var n=e.box(e.types.ftyp,e.constants.FTYP),r=e.moov(t),i=new Uint8Array(n.byteLength+r.byteLength);return i.set(n,0),i.set(r,n.byteLength),i}},{key:"moov",value:function(t){var n=e.mvhd(t.timescale,t.duration),r=e.trak(t),i=e.mvex(t);return e.box(e.types.moov,n,r,i)}},{key:"mvhd",value:function(t,n){return e.box(e.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}},{key:"trak",value:function(t){return e.box(e.types.trak,e.tkhd(t),e.mdia(t))}},{key:"tkhd",value:function(t){var n=t.id,r=t.duration,i=t.presentWidth,a=t.presentHeight;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>>8&255,255&i,0,0,a>>>8&255,255&a,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t),e.hdlr(t),e.minf(t))}},{key:"mdhd",value:function(t){var n=t.timescale,r=t.duration;return e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,r>>>24&255,r>>>16&255,r>>>8&255,255&r,85,196,0,0]))}},{key:"hdlr",value:function(t){var n=null;return n="audio"===t.type?e.constants.HDLR_AUDIO:e.constants.HDLR_VIDEO,e.box(e.types.hdlr,n)}},{key:"minf",value:function(t){var n=null;return n="audio"===t.type?e.box(e.types.smhd,e.constants.SMHD):e.box(e.types.vmhd,e.constants.VMHD),e.box(e.types.minf,n,e.dinf(),e.stbl(t))}},{key:"dinf",value:function(){return e.box(e.types.dinf,e.box(e.types.dref,e.constants.DREF))}},{key:"stbl",value:function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.constants.STTS),e.box(e.types.stsc,e.constants.STSC),e.box(e.types.stsz,e.constants.STSZ),e.box(e.types.stco,e.constants.STCO))}},{key:"stsd",value:function(t){return"audio"===t.type?"mp3"===t.codec?e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp3(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp4a(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.avc1(t))}},{key:"mp3",value:function(t){var n=t.channelCount,r=t.audioSampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,r>>>8&255,255&r,0,0]);return e.box(e.types[".mp3"],i)}},{key:"mp4a",value:function(t){var n=t.channelCount,r=t.audioSampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,r>>>8&255,255&r,0,0]);return e.box(e.types.mp4a,i,e.esds(t))}},{key:"esds",value:function(t){var n=t.config||[],r=n.length,i=new Uint8Array([0,0,0,0,3,23+r,0,1,0,4,15+r,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([r]).concat(n).concat([6,1,2]));return e.box(e.types.esds,i)}},{key:"avc1",value:function(t){var n=t.avcc,r=t.codecWidth,i=t.codecHeight,a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,r>>>8&255,255&r,i>>>8&255,255&i,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return e.box(e.types.avc1,a,e.box(e.types.avcC,n))}},{key:"mvex",value:function(t){return e.box(e.types.mvex,e.trex(t))}},{key:"trex",value:function(t){var n=t.id,r=new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return e.box(e.types.trex,r)}},{key:"moof",value:function(t,n){return e.box(e.types.moof,e.mfhd(t.sequenceNumber),e.traf(t,n))}},{key:"mfhd",value:function(t){var n=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]);return e.box(e.types.mfhd,n)}},{key:"traf",value:function(t,n){var r=t.id,i=e.box(e.types.tfhd,new Uint8Array([0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r])),a=e.box(e.types.tfdt,new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n])),o=e.sdtp(t),s=e.trun(t,o.byteLength+16+16+8+16+8+8);return e.box(e.types.traf,i,a,s,o)}},{key:"sdtp",value:function(t){for(var n=t.samples||[],r=n.length,i=new Uint8Array(4+r),a=0;a<r;a++){var o=n[a].flags;i[a+4]=o.isLeading<<6|o.dependsOn<<4|o.isDependedOn<<2|o.hasRedundancy}return e.box(e.types.sdtp,i)}},{key:"trun",value:function(t,n){var r=t.samples||[],i=r.length,a=12+16*i,o=new Uint8Array(a);n+=8+a,o.set([0,0,15,1,i>>>24&255,i>>>16&255,i>>>8&255,255&i,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0);for(var s=0;s<i;s++){var l=r[s].duration,c=r[s].size,u=r[s].flags,d=r[s].cts;o.set([l>>>24&255,l>>>16&255,l>>>8&255,255&l,c>>>24&255,c>>>16&255,c>>>8&255,255&c,u.isLeading<<2|u.dependsOn,u.isDependedOn<<6|u.hasRedundancy<<4|u.isNonSync,0,0,d>>>24&255,d>>>16&255,d>>>8&255,255&d],12+16*s)}return e.box(e.types.trun,o)}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}}]),e}();Y.init();var Q=Y,J=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"getSilentFrame",value:function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}}]),e}(),X=function e(t,n,i,a,o){Object(r.a)(this,e),this.dts=t,this.pts=n,this.duration=i,this.originalDts=a,this.isSyncPoint=o,this.fileposition=null},Z=function(){function e(){Object(r.a)(this,e),this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return Object(i.a)(e,[{key:"appendSyncPoint",value:function(e){e.isSyncPoint=!0,this.syncPoints.push(e)}}]),e}(),$=function(){function e(){Object(r.a)(this,e),this._list=[]}return Object(i.a)(e,[{key:"clear",value:function(){this._list=[]}},{key:"appendArray",value:function(e){var t=this._list;0!==e.length&&(t.length>0&&e[0].originalDts<t[t.length-1].originalDts&&this.clear(),Array.prototype.push.apply(t,e))}},{key:"getLastSyncPointBeforeDts",value:function(e){if(0==this._list.length)return null;var t=this._list,n=0,r=t.length-1,i=0,a=0,o=r;for(e<t[0].dts&&(n=0,a=o+1);a<=o;){if((i=a+Math.floor((o-a)/2))===r||e>=t[i].dts&&e<t[i+1].dts){n=i;break}t[i].dts<e?a=i+1:o=i-1}return this._list[n]}}]),e}(),ee=function(){function e(t){Object(r.a)(this,e),this._type=t,this._list=[],this._lastAppendLocation=-1}return Object(i.a)(e,[{key:"type",get:function(){return this._type}},{key:"length",get:function(){return this._list.length}},{key:"isEmpty",value:function(){return 0===this._list.length}},{key:"clear",value:function(){this._list=[],this._lastAppendLocation=-1}},{key:"_searchNearestSegmentBefore",value:function(e){var t=this._list;if(0===t.length)return-2;var n=t.length-1,r=0,i=0,a=n,o=0;if(e<t[0].originalBeginDts)return o=-1;for(;i<=a;){if((r=i+Math.floor((a-i)/2))===n||e>t[r].lastSample.originalDts&&e<t[r+1].originalBeginDts){o=r;break}t[r].originalBeginDts<e?i=r+1:a=r-1}return o}},{key:"_searchNearestSegmentAfter",value:function(e){return this._searchNearestSegmentBefore(e)+1}},{key:"append",value:function(e){var t=this._list,n=e,r=this._lastAppendLocation,i=0;-1!==r&&r<t.length&&n.originalBeginDts>=t[r].lastSample.originalDts&&(r===t.length-1||r<t.length-1&&n.originalBeginDts<t[r+1].originalBeginDts)?i=r+1:t.length>0&&(i=this._searchNearestSegmentBefore(n.originalBeginDts)+1),this._lastAppendLocation=i,this._list.splice(i,0,n)}},{key:"getLastSegmentBefore",value:function(e){var t=this._searchNearestSegmentBefore(e);return t>=0?this._list[t]:null}},{key:"getLastSampleBefore",value:function(e){var t=this.getLastSegmentBefore(e);return null!=t?t.lastSample:null}},{key:"getLastSyncPointBefore",value:function(e){for(var t=this._searchNearestSegmentBefore(e),n=this._list[t].syncPoints;0===n.length&&t>0;)t--,n=this._list[t].syncPoints;return n.length>0?n[n.length-1]:null}}]),e}(),te=function(){function e(t){Object(r.a)(this,e),this.TAG="MP4Remuxer",this._config=t,this._isLive=!0===t.isLive,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new ee("audio"),this._videoSegmentInfoList=new ee("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!w.chrome||!(w.version.major<50||50===w.version.major&&w.version.build<2661)),this._fillSilentAfterSeek=w.msedge||w.msie,this._mp3UseMpegAudio=!w.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return Object(i.a)(e,[{key:"destroy",value:function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}},{key:"bindDataSource",value:function(e){return e.onDataAvailable=this.remux.bind(this),e.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}},{key:"onInitSegment",get:function(){return this._onInitSegment},set:function(e){this._onInitSegment=e}},{key:"onMediaSegment",get:function(){return this._onMediaSegment},set:function(e){this._onMediaSegment=e}},{key:"insertDiscontinuity",value:function(){this._audioNextDts=this._videoNextDts=void 0}},{key:"seek",value:function(e){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}},{key:"remux",value:function(e,t){if(!this._onMediaSegment)throw new m("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(e,t),this._remuxVideo(t),this._remuxAudio(e)}},{key:"_onTrackMetadataReceived",value:function(e,t){var n=null,r="mp4",i=t.codec;if("audio"===e)this._audioMeta=t,"mp3"===t.codec&&this._mp3UseMpegAudio?(r="mpeg",i="",n=new Uint8Array):n=Q.generateInitSegment(t);else{if("video"!==e)return;this._videoMeta=t,n=Q.generateInitSegment(t)}if(!this._onInitSegment)throw new m("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(e,{type:e,data:n.buffer,codec:i,container:"".concat(e,"/").concat(r),mediaDuration:t.duration})}},{key:"_calculateDtsBase",value:function(e,t){this._dtsBaseInited||(e.samples&&e.samples.length&&(this._audioDtsBase=e.samples[0].dts),t.samples&&t.samples.length&&(this._videoDtsBase=t.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}},{key:"flushStashedSamples",value:function(){var e=this._videoStashedLastSample,t=this._audioStashedLastSample,n={type:"video",id:1,sequenceNumber:0,samples:[],length:0};null!=e&&(n.samples.push(e),n.length=e.length);var r={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};null!=t&&(r.samples.push(t),r.length=t.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(n,!0),this._remuxAudio(r,!0)}},{key:"_remuxAudio",value:function(e,t){if(null!=this._audioMeta){var n,r=e,i=r.samples,a=void 0,o=-1,s=this._audioMeta.refSampleDuration,l="mp3"===this._audioMeta.codec&&this._mp3UseMpegAudio,c=this._dtsBaseInited&&void 0===this._audioNextDts,d=!1;if(i&&0!==i.length&&(1!==i.length||t)){var h=0,f=null,p=0;l?(h=0,p=r.length):(h=8,p=8+r.length);var m=null;if(i.length>1&&(p-=(m=i.pop()).length),null!=this._audioStashedLastSample){var g=this._audioStashedLastSample;this._audioStashedLastSample=null,i.unshift(g),p+=g.length}null!=m&&(this._audioStashedLastSample=m);var v=i[0].dts-this._dtsBase;if(this._audioNextDts)a=v-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())a=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(d=!0);else{var b=this._audioSegmentInfoList.getLastSampleBefore(v);if(null!=b){var y=v-(b.originalDts+b.duration);y<=3&&(y=0),a=v-(b.dts+b.duration+y)}else a=0}if(d){var E=v-a,x=this._videoSegmentInfoList.getLastSegmentBefore(v);if(null!=x&&x.beginDts<E){var _=J.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(_){var k=x.beginDts,C=E-x.beginDts;u.v(this.TAG,"InsertPrefixSilentAudio: dts: ".concat(k,", duration: ").concat(C)),i.unshift({unit:_,dts:k,pts:k}),p+=_.byteLength}}else d=!1}for(var S=[],O=0;O<i.length;O++){var A=i[O],T=A.unit,I=A.dts-this._dtsBase,D=I-a;-1===o&&(o=D);var L=0;if(O!==i.length-1)L=i[O+1].dts-this._dtsBase-a-D;else if(null!=m)L=m.dts-this._dtsBase-a-D;else L=S.length>=1?S[S.length-1].duration:Math.floor(s);var R=!1,N=null;if(L>1.5*s&&"mp3"!==this._audioMeta.codec&&this._fillAudioTimestampGap&&!w.safari){R=!0;var j=Math.abs(L-s),M=Math.ceil(j/s),P=D+s;u.w(this.TAG,"Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\n"+"dts: ".concat(D+L," ms, expected: ").concat(D+Math.round(s)," ms, ")+"delta: ".concat(Math.round(j)," ms, generate: ").concat(M," frames"));var B=J.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);null==B&&(u.w(this.TAG,"Unable to generate silent frame for "+"".concat(this._audioMeta.originalCodec," with ").concat(this._audioMeta.channelCount," channels, repeat last frame")),B=T),N=[];for(var F=0;F<M;F++){var U=Math.round(P);if(N.length>0){var H=N[N.length-1];H.duration=U-H.dts}var z={dts:U,pts:U,cts:0,unit:B,size:B.byteLength,duration:0,originalDts:I,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};N.push(z),p+=z.size,P+=s}var G=N[N.length-1];G.duration=D+L-G.dts,L=Math.round(s)}S.push({dts:D,pts:D,cts:0,unit:A.unit,size:A.unit.byteLength,duration:L,originalDts:I,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),R&&S.push.apply(S,N)}l?f=new Uint8Array(p):((f=new Uint8Array(p))[0]=p>>>24&255,f[1]=p>>>16&255,f[2]=p>>>8&255,f[3]=255&p,f.set(Q.types.mdat,4));for(var V=0;V<S.length;V++){var W=S[V].unit;f.set(W,h),h+=W.byteLength}var K=S[S.length-1];n=K.dts+K.duration,this._audioNextDts=n;var q=new Z;q.beginDts=o,q.endDts=n,q.beginPts=o,q.endPts=n,q.originalBeginDts=S[0].originalDts,q.originalEndDts=K.originalDts+K.duration,q.firstSample=new X(S[0].dts,S[0].pts,S[0].duration,S[0].originalDts,!1),q.lastSample=new X(K.dts,K.pts,K.duration,K.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(q),r.samples=S,r.sequenceNumber++;var Y=null;Y=l?new Uint8Array:Q.moof(r,o),r.samples=[],r.length=0;var $={type:"audio",data:this._mergeBoxes(Y,f).buffer,sampleCount:S.length,info:q};l&&c&&($.timestampOffset=o),this._onMediaSegment("audio",$)}}}},{key:"_remuxVideo",value:function(e,t){if(null!=this._videoMeta){var n,r,i=e,a=i.samples,o=void 0,s=-1,l=-1;if(a&&0!==a.length&&(1!==a.length||t)){var c=8,u=null,d=8+e.length,h=null;if(a.length>1&&(d-=(h=a.pop()).length),null!=this._videoStashedLastSample){var f=this._videoStashedLastSample;this._videoStashedLastSample=null,a.unshift(f),d+=f.length}null!=h&&(this._videoStashedLastSample=h);var p=a[0].dts-this._dtsBase;if(this._videoNextDts)o=p-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())o=0;else{var m=this._videoSegmentInfoList.getLastSampleBefore(p);if(null!=m){var g=p-(m.originalDts+m.duration);g<=3&&(g=0),o=p-(m.dts+m.duration+g)}else o=0}for(var v=new Z,b=[],y=0;y<a.length;y++){var E=a[y],x=E.dts-this._dtsBase,_=E.isKeyframe,k=x-o,w=E.cts,C=k+w;-1===s&&(s=k,l=C);var S=0;if(y!==a.length-1)S=a[y+1].dts-this._dtsBase-o-k;else if(null!=h)S=h.dts-this._dtsBase-o-k;else S=b.length>=1?b[b.length-1].duration:Math.floor(this._videoMeta.refSampleDuration);if(_){var O=new X(k,C,S,E.dts,!0);O.fileposition=E.fileposition,v.appendSyncPoint(O)}b.push({dts:k,pts:C,cts:w,units:E.units,size:E.length,isKeyframe:_,duration:S,originalDts:x,flags:{isLeading:0,dependsOn:_?2:1,isDependedOn:_?1:0,hasRedundancy:0,isNonSync:_?0:1}})}(u=new Uint8Array(d))[0]=d>>>24&255,u[1]=d>>>16&255,u[2]=d>>>8&255,u[3]=255&d,u.set(Q.types.mdat,4);for(var A=0;A<b.length;A++)for(var T=b[A].units;T.length;){var I=T.shift().data;u.set(I,c),c+=I.byteLength}var D=b[b.length-1];if(n=D.dts+D.duration,r=D.pts+D.duration,this._videoNextDts=n,v.beginDts=s,v.endDts=n,v.beginPts=l,v.endPts=r,v.originalBeginDts=b[0].originalDts,v.originalEndDts=D.originalDts+D.duration,v.firstSample=new X(b[0].dts,b[0].pts,b[0].duration,b[0].originalDts,b[0].isKeyframe),v.lastSample=new X(D.dts,D.pts,D.duration,D.originalDts,D.isKeyframe),this._isLive||this._videoSegmentInfoList.append(v),i.samples=b,i.sequenceNumber++,this._forceFirstIDR){var L=b[0].flags;L.dependsOn=2,L.isNonSync=0}var R=Q.moof(i,s);i.samples=[],i.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(R,u).buffer,sampleCount:b.length,info:v})}}}},{key:"_mergeBoxes",value:function(e,t){var n=new Uint8Array(e.byteLength+t.byteLength);return n.set(e,0),n.set(t,e.byteLength),n}}]),e}(),ne={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"},re=function(){function e(t,n){Object(r.a)(this,e),this.TAG="TransmuxingController",this._emitter=new l.a,this._config=n,t.segments||(t.segments=[{duration:t.duration,filesize:t.filesize,url:t.url}]),"boolean"!=typeof t.cors&&(t.cors=!0),"boolean"!=typeof t.withCredentials&&(t.withCredentials=!1),this._mediaDataSource=t,this._currentSegmentIndex=0;var i=0;this._mediaDataSource.segments.forEach((function(e){e.timestampBase=i,i+=e.duration,e.cors=t.cors,e.withCredentials=t.withCredentials,n.referrerPolicy&&(e.referrerPolicy=n.referrerPolicy)})),isNaN(i)||this._mediaDataSource.duration===i||(this._mediaDataSource.duration=i),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}return Object(i.a)(e,[{key:"destroy",value:function(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"start",value:function(){this._loadSegment(0),this._enableStatisticsReporter()}},{key:"_loadSegment",value:function(e,t){this._currentSegmentIndex=e;var n=this._mediaDataSource.segments[e],r=this._ioctl=new D(n,this._config,e);r.onError=this._onIOException.bind(this),r.onSeeked=this._onIOSeeked.bind(this),r.onComplete=this._onIOComplete.bind(this),r.onRedirect=this._onIORedirect.bind(this),r.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),t?this._demuxer.bindDataSource(this._ioctl):r.onDataArrival=this._onInitChunkArrival.bind(this),r.open(t)}},{key:"stop",value:function(){this._internalAbort(),this._disableStatisticsReporter()}},{key:"_internalAbort",value:function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)}},{key:"pause",value:function(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())}},{key:"resume",value:function(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())}},{key:"seek",value:function(e){if(null!=this._mediaInfo&&this._mediaInfo.isSeekable()){var t=this._searchSegmentIndexContains(e);if(t===this._currentSegmentIndex){var n=this._mediaInfo.segments[t];if(null==n)this._pendingSeekTime=e;else{var r=n.getNearestKeyframe(e);this._remuxer.seek(r.milliseconds),this._ioctl.seek(r.fileposition),this._pendingResolveSeekPoint=r.milliseconds}}else{var i=this._mediaInfo.segments[t];if(null==i)this._pendingSeekTime=e,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(t);else{var a=i.getNearestKeyframe(e);this._internalAbort(),this._remuxer.seek(e),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[t].timestampBase,this._loadSegment(t,a.fileposition),this._pendingResolveSeekPoint=a.milliseconds,this._reportSegmentMediaInfo(t)}}this._enableStatisticsReporter()}}},{key:"_searchSegmentIndexContains",value:function(e){for(var t=this._mediaDataSource.segments,n=t.length-1,r=0;r<t.length;r++)if(e<t[r].timestampBase){n=r-1;break}return n}},{key:"_onInitChunkArrival",value:function(e,t){var n=this,r=null,i=0;if(t>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,i=this._demuxer.parseChunks(e,t);else if((r=q.probe(e)).match){this._demuxer=new q(r,this._config),this._remuxer||(this._remuxer=new te(this._config));var a=this._mediaDataSource;null==a.duration||isNaN(a.duration)||(this._demuxer.overridedDuration=a.duration),"boolean"==typeof a.hasAudio&&(this._demuxer.overridedHasAudio=a.hasAudio),"boolean"==typeof a.hasVideo&&(this._demuxer.overridedHasVideo=a.hasVideo),this._demuxer.timestampBase=a.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),i=this._demuxer.parseChunks(e,t)}else r=null,u.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then((function(){n._internalAbort()})),this._emitter.emit(ne.DEMUX_ERROR,K.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),i=0;return i}},{key:"_onMediaInfo",value:function(e){var t=this;null==this._mediaInfo&&(this._mediaInfo=Object.assign({},e),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,B.prototype));var n=Object.assign({},e);Object.setPrototypeOf(n,B.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=n,this._reportSegmentMediaInfo(this._currentSegmentIndex),null!=this._pendingSeekTime&&Promise.resolve().then((function(){var e=t._pendingSeekTime;t._pendingSeekTime=null,t.seek(e)}))}},{key:"_onMetaDataArrived",value:function(e){this._emitter.emit(ne.METADATA_ARRIVED,e)}},{key:"_onScriptDataArrived",value:function(e){this._emitter.emit(ne.SCRIPTDATA_ARRIVED,e)}},{key:"_onIOSeeked",value:function(){this._remuxer.insertDiscontinuity()}},{key:"_onIOComplete",value:function(e){var t=e+1;t<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(t)):(this._remuxer.flushStashedSamples(),this._emitter.emit(ne.LOADING_COMPLETE),this._disableStatisticsReporter())}},{key:"_onIORedirect",value:function(e){var t=this._ioctl.extraData;this._mediaDataSource.segments[t].redirectedURL=e}},{key:"_onIORecoveredEarlyEof",value:function(){this._emitter.emit(ne.RECOVERED_EARLY_EOF)}},{key:"_onIOException",value:function(e,t){u.e(this.TAG,"IOException: type = ".concat(e,", code = ").concat(t.code,", msg = ").concat(t.msg)),this._emitter.emit(ne.IO_ERROR,e,t),this._disableStatisticsReporter()}},{key:"_onDemuxException",value:function(e,t){u.e(this.TAG,"DemuxException: type = ".concat(e,", info = ").concat(t)),this._emitter.emit(ne.DEMUX_ERROR,e,t)}},{key:"_onRemuxerInitSegmentArrival",value:function(e,t){this._emitter.emit(ne.INIT_SEGMENT,e,t)}},{key:"_onRemuxerMediaSegmentArrival",value:function(e,t){if(null==this._pendingSeekTime&&(this._emitter.emit(ne.MEDIA_SEGMENT,e,t),null!=this._pendingResolveSeekPoint&&"video"===e)){var n=t.info.syncPoints,r=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,w.safari&&n.length>0&&n[0].originalDts===r&&(r=n[0].pts),this._emitter.emit(ne.RECOMMEND_SEEKPOINT,r)}}},{key:"_enableStatisticsReporter",value:function(){null==this._statisticsReporter&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}},{key:"_disableStatisticsReporter",value:function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"_reportSegmentMediaInfo",value:function(e){var t=this._mediaInfo.segments[e],n=Object.assign({},t);n.duration=this._mediaInfo.duration,n.segmentCount=this._mediaInfo.segmentCount,delete n.segments,delete n.keyframesIndex,this._emitter.emit(ne.MEDIA_INFO,n)}},{key:"_reportStatisticsInfo",value:function(){var e={};e.url=this._ioctl.currentURL,e.hasRedirect=this._ioctl.hasRedirect,e.hasRedirect&&(e.redirectedURL=this._ioctl.currentRedirectedURL),e.speed=this._ioctl.currentSpeed,e.loaderType=this._ioctl.loaderType,e.currentSegmentIndex=this._currentSegmentIndex,e.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(ne.STATISTICS_INFO,e)}}]),e}(),ie=function(e){var t=null,n=function(t,n){e.postMessage({msg:"logcat_callback",data:{type:t,logcat:n}})}.bind(this);function r(t,n){var r={msg:ne.INIT_SEGMENT,data:{type:t,data:n}};e.postMessage(r,[n.data])}function i(t,n){var r={msg:ne.MEDIA_SEGMENT,data:{type:t,data:n}};e.postMessage(r,[n.data])}function a(){var t={msg:ne.LOADING_COMPLETE};e.postMessage(t)}function s(){var t={msg:ne.RECOVERED_EARLY_EOF};e.postMessage(t)}function l(t){var n={msg:ne.MEDIA_INFO,data:t};e.postMessage(n)}function c(t){var n={msg:ne.METADATA_ARRIVED,data:t};e.postMessage(n)}function u(t){var n={msg:ne.SCRIPTDATA_ARRIVED,data:t};e.postMessage(n)}function d(t){var n={msg:ne.STATISTICS_INFO,data:t};e.postMessage(n)}function h(t,n){e.postMessage({msg:ne.IO_ERROR,data:{type:t,info:n}})}function f(t,n){e.postMessage({msg:ne.DEMUX_ERROR,data:{type:t,info:n}})}function p(t){e.postMessage({msg:ne.RECOMMEND_SEEKPOINT,data:t})}o.install(),e.addEventListener("message",(function(o){switch(o.data.cmd){case"init":(t=new re(o.data.param[0],o.data.param[1])).on(ne.IO_ERROR,h.bind(this)),t.on(ne.DEMUX_ERROR,f.bind(this)),t.on(ne.INIT_SEGMENT,r.bind(this)),t.on(ne.MEDIA_SEGMENT,i.bind(this)),t.on(ne.LOADING_COMPLETE,a.bind(this)),t.on(ne.RECOVERED_EARLY_EOF,s.bind(this)),t.on(ne.MEDIA_INFO,l.bind(this)),t.on(ne.METADATA_ARRIVED,c.bind(this)),t.on(ne.SCRIPTDATA_ARRIVED,u.bind(this)),t.on(ne.STATISTICS_INFO,d.bind(this)),t.on(ne.RECOMMEND_SEEKPOINT,p.bind(this));break;case"destroy":t&&(t.destroy(),t=null),e.postMessage({msg:"destroyed"});break;case"start":t.start();break;case"stop":t.stop();break;case"seek":t.seek(o.data.param);break;case"pause":t.pause();break;case"resume":t.resume();break;case"logging_config":var m=o.data.param;P.applyConfig(m),!0===m.enableCallback?P.addLogListener(n):P.removeLogListener(n)}}))},ae=function(){function e(t,i){if(Object(r.a)(this,e),this.TAG="Transmuxer",this._emitter=new l.a,i.enableWorker&&"undefined"!=typeof Worker)try{var a=n(/*! webworkify */"0r65");this._worker=a(ie),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[t,i]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},P.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:P.getConfig()})}catch(e){u.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new re(t,i)}else this._controller=new re(t,i);if(this._controller){var o=this._controller;o.on(ne.IO_ERROR,this._onIOError.bind(this)),o.on(ne.DEMUX_ERROR,this._onDemuxError.bind(this)),o.on(ne.INIT_SEGMENT,this._onInitSegment.bind(this)),o.on(ne.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),o.on(ne.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),o.on(ne.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),o.on(ne.MEDIA_INFO,this._onMediaInfo.bind(this)),o.on(ne.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),o.on(ne.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),o.on(ne.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),o.on(ne.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return Object(i.a)(e,[{key:"destroy",value:function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),P.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"hasWorker",value:function(){return null!=this._worker}},{key:"open",value:function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}},{key:"close",value:function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}},{key:"seek",value:function(e){this._worker?this._worker.postMessage({cmd:"seek",param:e}):this._controller.seek(e)}},{key:"pause",value:function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}},{key:"resume",value:function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}},{key:"_onInitSegment",value:function(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(ne.INIT_SEGMENT,e,t)}))}},{key:"_onMediaSegment",value:function(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(ne.MEDIA_SEGMENT,e,t)}))}},{key:"_onLoadingComplete",value:function(){var e=this;Promise.resolve().then((function(){e._emitter.emit(ne.LOADING_COMPLETE)}))}},{key:"_onRecoveredEarlyEof",value:function(){var e=this;Promise.resolve().then((function(){e._emitter.emit(ne.RECOVERED_EARLY_EOF)}))}},{key:"_onMediaInfo",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(ne.MEDIA_INFO,e)}))}},{key:"_onMetaDataArrived",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(ne.METADATA_ARRIVED,e)}))}},{key:"_onScriptDataArrived",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(ne.SCRIPTDATA_ARRIVED,e)}))}},{key:"_onStatisticsInfo",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(ne.STATISTICS_INFO,e)}))}},{key:"_onIOError",value:function(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(ne.IO_ERROR,e,t)}))}},{key:"_onDemuxError",value:function(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(ne.DEMUX_ERROR,e,t)}))}},{key:"_onRecommendSeekpoint",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(ne.RECOMMEND_SEEKPOINT,e)}))}},{key:"_onLoggingConfigChanged",value:function(e){this._worker&&this._worker.postMessage({cmd:"logging_config",param:e})}},{key:"_onWorkerMessage",value:function(e){var t=e.data,n=t.data;if("destroyed"===t.msg||this._workerDestroying)return this._workerDestroying=!1,this._worker.terminate(),void(this._worker=null);switch(t.msg){case ne.INIT_SEGMENT:case ne.MEDIA_SEGMENT:this._emitter.emit(t.msg,n.type,n.data);break;case ne.LOADING_COMPLETE:case ne.RECOVERED_EARLY_EOF:this._emitter.emit(t.msg);break;case ne.MEDIA_INFO:Object.setPrototypeOf(n,B.prototype),this._emitter.emit(t.msg,n);break;case ne.METADATA_ARRIVED:case ne.SCRIPTDATA_ARRIVED:case ne.STATISTICS_INFO:this._emitter.emit(t.msg,n);break;case ne.IO_ERROR:case ne.DEMUX_ERROR:this._emitter.emit(t.msg,n.type,n.info);break;case ne.RECOMMEND_SEEKPOINT:this._emitter.emit(t.msg,n);break;case"logcat_callback":u.emitter.emit("log",n.type,n.logcat)}}}]),e}(),oe={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"},se=function(){function e(t){Object(r.a)(this,e),this.TAG="MSEController",this._config=t,this._emitter=new l.a,this._config.isLive&&null==this._config.autoCleanupSourceBuffer&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new $}return Object(i.a)(e,[{key:"destroy",value:function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e){if(this._mediaSource)throw new m("MediaSource has been attached to an HTMLMediaElement!");var t=this._mediaSource=new window.MediaSource;t.addEventListener("sourceopen",this.e.onSourceOpen),t.addEventListener("sourceended",this.e.onSourceEnded),t.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=e,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),e.src=this._mediaSourceObjectURL}},{key:"detachMediaElement",value:function(){if(this._mediaSource){var e=this._mediaSource;for(var t in this._sourceBuffers){var n=this._pendingSegments[t];n.splice(0,n.length),this._pendingSegments[t]=null,this._pendingRemoveRanges[t]=null,this._lastInitSegments[t]=null;var r=this._sourceBuffers[t];if(r){if("closed"!==e.readyState){try{e.removeSourceBuffer(r)}catch(e){u.e(this.TAG,e.message)}r.removeEventListener("error",this.e.onSourceBufferError),r.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[t]=null,this._sourceBuffers[t]=null}}if("open"===e.readyState)try{e.endOfStream()}catch(e){u.e(this.TAG,e.message)}e.removeEventListener("sourceopen",this.e.onSourceOpen),e.removeEventListener("sourceended",this.e.onSourceEnded),e.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}},{key:"appendInitSegment",value:function(e,t){if(!this._mediaSource||"open"!==this._mediaSource.readyState)return this._pendingSourceBufferInit.push(e),void this._pendingSegments[e.type].push(e);var n=e,r="".concat(n.container);n.codec&&n.codec.length>0&&(r+=";codecs=".concat(n.codec));var i=!1;if(u.v(this.TAG,"Received Initialization Segment, mimeType: "+r),this._lastInitSegments[n.type]=n,r!==this._mimeTypes[n.type]){if(this._mimeTypes[n.type])u.v(this.TAG,"Notice: ".concat(n.type," mimeType changed, origin: ").concat(this._mimeTypes[n.type],", target: ").concat(r));else{i=!0;try{var a=this._sourceBuffers[n.type]=this._mediaSource.addSourceBuffer(r);a.addEventListener("error",this.e.onSourceBufferError),a.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(e){return u.e(this.TAG,e.message),void this._emitter.emit(oe.ERROR,{code:e.code,msg:e.message})}}this._mimeTypes[n.type]=r}t||this._pendingSegments[n.type].push(n),i||this._sourceBuffers[n.type]&&!this._sourceBuffers[n.type].updating&&this._doAppendSegments(),w.safari&&"audio/mpeg"===n.container&&n.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=n.mediaDuration/1e3,this._updateMediaSourceDuration())}},{key:"appendMediaSegment",value:function(e){var t=e;this._pendingSegments[t.type].push(t),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var n=this._sourceBuffers[t.type];!n||n.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()}},{key:"seek",value:function(e){for(var t in this._sourceBuffers)if(this._sourceBuffers[t]){var n=this._sourceBuffers[t];if("open"===this._mediaSource.readyState)try{n.abort()}catch(e){u.e(this.TAG,e.message)}this._idrList.clear();var r=this._pendingSegments[t];if(r.splice(0,r.length),"closed"!==this._mediaSource.readyState){for(var i=0;i<n.buffered.length;i++){var a=n.buffered.start(i),o=n.buffered.end(i);this._pendingRemoveRanges[t].push({start:a,end:o})}if(n.updating||this._doRemoveRanges(),w.safari){var s=this._lastInitSegments[t];s&&(this._pendingSegments[t].push(s),n.updating||this._doAppendSegments())}}}}},{key:"endOfStream",value:function(){var e=this._mediaSource,t=this._sourceBuffers;e&&"open"===e.readyState?t.video&&t.video.updating||t.audio&&t.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,e.endOfStream()):e&&"closed"===e.readyState&&this._hasPendingSegments()&&(this._hasPendingEos=!0)}},{key:"getNearestKeyframe",value:function(e){return this._idrList.getLastSyncPointBeforeDts(e)}},{key:"_needCleanupSourceBuffer",value:function(){if(!this._config.autoCleanupSourceBuffer)return!1;var e=this._mediaElement.currentTime;for(var t in this._sourceBuffers){var n=this._sourceBuffers[t];if(n){var r=n.buffered;if(r.length>=1&&e-r.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}},{key:"_doCleanupSourceBuffer",value:function(){var e=this._mediaElement.currentTime;for(var t in this._sourceBuffers){var n=this._sourceBuffers[t];if(n){for(var r=n.buffered,i=!1,a=0;a<r.length;a++){var o=r.start(a),s=r.end(a);if(o<=e&&e<s+3){if(e-o>=this._config.autoCleanupMaxBackwardDuration){i=!0;var l=e-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[t].push({start:o,end:l})}}else s<e&&(i=!0,this._pendingRemoveRanges[t].push({start:o,end:s}))}i&&!n.updating&&this._doRemoveRanges()}}}},{key:"_updateMediaSourceDuration",value:function(){var e=this._sourceBuffers;if(0!==this._mediaElement.readyState&&"open"===this._mediaSource.readyState&&!(e.video&&e.video.updating||e.audio&&e.audio.updating)){var t=this._mediaSource.duration,n=this._pendingMediaDuration;n>0&&(isNaN(t)||n>t)&&(u.v(this.TAG,"Update MediaSource duration from ".concat(t," to ").concat(n)),this._mediaSource.duration=n),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}}},{key:"_doRemoveRanges",value:function(){for(var e in this._pendingRemoveRanges)if(this._sourceBuffers[e]&&!this._sourceBuffers[e].updating)for(var t=this._sourceBuffers[e],n=this._pendingRemoveRanges[e];n.length&&!t.updating;){var r=n.shift();t.remove(r.start,r.end)}}},{key:"_doAppendSegments",value:function(){var e=this._pendingSegments;for(var t in e)if(this._sourceBuffers[t]&&!this._sourceBuffers[t].updating&&e[t].length>0){var n=e[t].shift();if(n.timestampOffset){var r=this._sourceBuffers[t].timestampOffset,i=n.timestampOffset/1e3;Math.abs(r-i)>.1&&(u.v(this.TAG,"Update MPEG audio timestampOffset from ".concat(r," to ").concat(i)),this._sourceBuffers[t].timestampOffset=i),delete n.timestampOffset}if(!n.data||0===n.data.byteLength)continue;try{this._sourceBuffers[t].appendBuffer(n.data),this._isBufferFull=!1,"video"===t&&n.hasOwnProperty("info")&&this._idrList.appendArray(n.info.syncPoints)}catch(e){this._pendingSegments[t].unshift(n),22===e.code?(this._isBufferFull||this._emitter.emit(oe.BUFFER_FULL),this._isBufferFull=!0):(u.e(this.TAG,e.message),this._emitter.emit(oe.ERROR,{code:e.code,msg:e.message}))}}}},{key:"_onSourceOpen",value:function(){if(u.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var e=this._pendingSourceBufferInit;e.length;){var t=e.shift();this.appendInitSegment(t,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(oe.SOURCE_OPEN)}},{key:"_onSourceEnded",value:function(){u.v(this.TAG,"MediaSource onSourceEnded")}},{key:"_onSourceClose",value:function(){u.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&null!=this.e&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}},{key:"_hasPendingSegments",value:function(){var e=this._pendingSegments;return e.video.length>0||e.audio.length>0}},{key:"_hasPendingRemoveRanges",value:function(){var e=this._pendingRemoveRanges;return e.video.length>0||e.audio.length>0}},{key:"_onSourceBufferUpdateEnd",value:function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(oe.UPDATE_END)}},{key:"_onSourceBufferError",value:function(e){u.e(this.TAG,"SourceBuffer Error: ".concat(e))}}]),e}(),le={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},ce={NETWORK_EXCEPTION:y.EXCEPTION,NETWORK_STATUS_CODE_INVALID:y.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:y.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:y.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:K.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:K.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:K.CODEC_UNSUPPORTED},ue=function(){function e(t,n){if(Object(r.a)(this,e),this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new l.a,this._config=R(),"object"==typeof n&&Object.assign(this._config,n),"flv"!==t.type.toLowerCase())throw new g("FlvPlayer requires an flv MediaDataSource input!");!0===t.isLive&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=t,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var i=w.chrome&&(w.version.major<50||50===w.version.major&&w.version.build<2661);this._alwaysSeekKeyframe=!!(i||w.msedge||w.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return Object(i.a)(e,[{key:"destroy",value:function(){null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){var n=this;e===j.MEDIA_INFO?null!=this._mediaInfo&&Promise.resolve().then((function(){n._emitter.emit(j.MEDIA_INFO,n.mediaInfo)})):e===j.STATISTICS_INFO&&null!=this._statisticsInfo&&Promise.resolve().then((function(){n._emitter.emit(j.STATISTICS_INFO,n.statisticsInfo)})),this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e){var t=this;if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),e.addEventListener("seeking",this.e.onvSeeking),e.addEventListener("canplay",this.e.onvCanPlay),e.addEventListener("stalled",this.e.onvStalled),e.addEventListener("progress",this.e.onvProgress),this._msectl=new se(this._config),this._msectl.on(oe.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(oe.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(oe.SOURCE_OPEN,(function(){t._mseSourceOpened=!0,t._hasPendingLoad&&(t._hasPendingLoad=!1,t.load())})),this._msectl.on(oe.ERROR,(function(e){t._emitter.emit(j.ERROR,le.MEDIA_ERROR,ce.MEDIA_MSE_ERROR,e)})),this._msectl.attachMediaElement(e),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}},{key:"load",value:function(){var e=this;if(!this._mediaElement)throw new m("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new m("FlvPlayer.load() has been called, please call unload() first!");this._hasPendingLoad||(this._config.deferLoadAfterSourceOpen&&!1===this._mseSourceOpened?this._hasPendingLoad=!0:(this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new ae(this._mediaDataSource,this._config),this._transmuxer.on(ne.INIT_SEGMENT,(function(t,n){e._msectl.appendInitSegment(n)})),this._transmuxer.on(ne.MEDIA_SEGMENT,(function(t,n){if(e._msectl.appendMediaSegment(n),e._config.lazyLoad&&!e._config.isLive){var r=e._mediaElement.currentTime;n.info.endDts>=1e3*(r+e._config.lazyLoadMaxDuration)&&null==e._progressChecker&&(u.v(e.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),e._suspendTransmuxer())}})),this._transmuxer.on(ne.LOADING_COMPLETE,(function(){e._msectl.endOfStream(),e._emitter.emit(j.LOADING_COMPLETE)})),this._transmuxer.on(ne.RECOVERED_EARLY_EOF,(function(){e._emitter.emit(j.RECOVERED_EARLY_EOF)})),this._transmuxer.on(ne.IO_ERROR,(function(t,n){e._emitter.emit(j.ERROR,le.NETWORK_ERROR,t,n)})),this._transmuxer.on(ne.DEMUX_ERROR,(function(t,n){e._emitter.emit(j.ERROR,le.MEDIA_ERROR,t,{code:-1,msg:n})})),this._transmuxer.on(ne.MEDIA_INFO,(function(t){e._mediaInfo=t,e._emitter.emit(j.MEDIA_INFO,Object.assign({},t))})),this._transmuxer.on(ne.METADATA_ARRIVED,(function(t){e._emitter.emit(j.METADATA_ARRIVED,t)})),this._transmuxer.on(ne.SCRIPTDATA_ARRIVED,(function(t){e._emitter.emit(j.SCRIPTDATA_ARRIVED,t)})),this._transmuxer.on(ne.STATISTICS_INFO,(function(t){e._statisticsInfo=e._fillStatisticsInfo(t),e._emitter.emit(j.STATISTICS_INFO,Object.assign({},e._statisticsInfo))})),this._transmuxer.on(ne.RECOMMEND_SEEKPOINT,(function(t){e._mediaElement&&!e._config.accurateSeek&&(e._requestSetTime=!0,e._mediaElement.currentTime=t/1e3)})),this._transmuxer.open()))}},{key:"unload",value:function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._internalSeek(e):this._pendingSeekTime=e}},{key:"mediaInfo",get:function(){return Object.assign({},this._mediaInfo)}},{key:"statisticsInfo",get:function(){return null==this._statisticsInfo&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}},{key:"_fillStatisticsInfo",value:function(e){if(e.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,n=0,r=0;if(this._mediaElement.getVideoPlaybackQuality){var i=this._mediaElement.getVideoPlaybackQuality();n=i.totalVideoFrames,r=i.droppedVideoFrames}else null!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,r=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=n,e.droppedFrames=r),e}},{key:"_onmseUpdateEnd",value:function(){if(this._config.lazyLoad&&!this._config.isLive){for(var e=this._mediaElement.buffered,t=this._mediaElement.currentTime,n=0,r=0;r<e.length;r++){var i=e.start(r),a=e.end(r);if(i<=t&&t<a){i,n=a;break}}n>=t+this._config.lazyLoadMaxDuration&&null==this._progressChecker&&(u.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}},{key:"_onmseBufferFull",value:function(){u.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),null==this._progressChecker&&this._suspendTransmuxer()}},{key:"_suspendTransmuxer",value:function(){this._transmuxer&&(this._transmuxer.pause(),null==this._progressChecker&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}},{key:"_checkProgressAndResume",value:function(){for(var e=this._mediaElement.currentTime,t=this._mediaElement.buffered,n=!1,r=0;r<t.length;r++){var i=t.start(r),a=t.end(r);if(e>=i&&e<a){e>=a-this._config.lazyLoadRecoverDuration&&(n=!0);break}}n&&(window.clearInterval(this._progressChecker),this._progressChecker=null,n&&(u.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},{key:"_isTimepointBuffered",value:function(e){for(var t=this._mediaElement.buffered,n=0;n<t.length;n++){var r=t.start(n),i=t.end(n);if(e>=r&&e<i)return!0}return!1}},{key:"_internalSeek",value:function(e){var t=this._isTimepointBuffered(e),n=!1,r=0;if(e<1&&this._mediaElement.buffered.length>0){var i=this._mediaElement.buffered.start(0);(i<1&&e<i||w.safari)&&(n=!0,r=w.safari?.1:i)}if(n)this._requestSetTime=!0,this._mediaElement.currentTime=r;else if(t){if(this._alwaysSeekKeyframe){var a=this._msectl.getNearestKeyframe(Math.floor(1e3*e));this._requestSetTime=!0,this._mediaElement.currentTime=null!=a?a.dts/1e3:e}else this._requestSetTime=!0,this._mediaElement.currentTime=e;null!=this._progressChecker&&this._checkProgressAndResume()}else null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e)}},{key:"_checkAndApplyUnbufferedSeekpoint",value:function(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){var e=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(e)||(null!=this._progressChecker&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},{key:"_checkAndResumeStuckPlayback",value:function(e){var t=this._mediaElement;if(e||!this._receivedCanPlay||t.readyState<2){var n=t.buffered;n.length>0&&t.currentTime<n.start(0)&&(u.w(this.TAG,"Playback seems stuck at ".concat(t.currentTime,", seek to ").concat(n.start(0))),this._requestSetTime=!0,this._mediaElement.currentTime=n.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}},{key:"_onvLoadedMetadata",value:function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}},{key:"_onvSeeking",value:function(e){var t=this._mediaElement.currentTime,n=this._mediaElement.buffered;if(this._requestSetTime)this._requestSetTime=!1;else{if(t<1&&n.length>0){var r=n.start(0);if(r<1&&t<r||w.safari)return this._requestSetTime=!0,void(this._mediaElement.currentTime=w.safari?.1:r)}if(this._isTimepointBuffered(t)){if(this._alwaysSeekKeyframe){var i=this._msectl.getNearestKeyframe(Math.floor(1e3*t));null!=i&&(this._requestSetTime=!0,this._mediaElement.currentTime=i.dts/1e3)}null!=this._progressChecker&&this._checkProgressAndResume()}else this._seekpointRecord={seekPoint:t,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}}},{key:"_onvCanPlay",value:function(e){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}},{key:"_onvStalled",value:function(e){this._checkAndResumeStuckPlayback(!0)}},{key:"_onvProgress",value:function(e){this._checkAndResumeStuckPlayback()}}]),e}(),de=function(){function e(t,n){if(Object(r.a)(this,e),this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new l.a,this._config=R(),"object"==typeof n&&Object.assign(this._config,n),"flv"===t.type.toLowerCase())throw new g("NativePlayer does't support flv MediaDataSource input!");if(t.hasOwnProperty("segments"))throw new g("NativePlayer(".concat(t.type,") doesn't support multipart playback!"));this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=t,this._mediaElement=null}return Object(i.a)(e,[{key:"destroy",value:function(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){var n=this;e===j.MEDIA_INFO?null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then((function(){n._emitter.emit(j.MEDIA_INFO,n.mediaInfo)})):e===j.STATISTICS_INFO&&null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then((function(){n._emitter.emit(j.STATISTICS_INFO,n.statisticsInfo)})),this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e){if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"load",value:function(){if(!this._mediaElement)throw new m("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}},{key:"unload",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._mediaElement.currentTime=e:this._pendingSeekTime=e}},{key:"mediaInfo",get:function(){var e={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(e.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(e.width=this._mediaElement.videoWidth,e.height=this._mediaElement.videoHeight)),e}},{key:"statisticsInfo",get:function(){var e={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,n=0,r=0;if(this._mediaElement.getVideoPlaybackQuality){var i=this._mediaElement.getVideoPlaybackQuality();n=i.totalVideoFrames,r=i.droppedVideoFrames}else null!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,r=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=n,e.droppedFrames=r),e}},{key:"_onvLoadedMetadata",value:function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(j.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(j.STATISTICS_INFO,this.statisticsInfo)}}]),e}();o.install();var he={createPlayer:function(e,t){var n=e;if(null==n||"object"!=typeof n)throw new g("MediaDataSource must be an javascript object!");if(!n.hasOwnProperty("type"))throw new g("MediaDataSource must has type field to indicate video file type!");switch(n.type){case"flv":return new ue(n,t);default:return new de(n,t)}},isSupported:function(){return N.supportMSEH264Playback()},getFeatureList:function(){return N.getFeatureList()}};he.BaseLoader=E,he.LoaderStatus=b,he.LoaderErrors=y,he.Events=j,he.ErrorTypes=le,he.ErrorDetails=ce,he.FlvPlayer=ue,he.NativePlayer=de,he.LoggingControl=P,Object.defineProperty(he,"version",{enumerable:!0,get:function(){return"__VERSION__"}});t.a=he},Gev7:
|
|
|
/*!*********************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/Displayable.js ***!
|
|
|
\*********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/util */"bYtY"),i=n(/*! ./Style */"K2GJ"),a=n(/*! ../Element */"1bdT"),o=n(/*! ./mixin/RectText */"ni6a");function s(e){for(var t in e=e||{},a.call(this,e),e)e.hasOwnProperty(t)&&"style"!==t&&(this[t]=e[t]);this.style=new i(e.style,this),this._rect=null,this.__clipPaths=null}s.prototype={constructor:s,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(e){},afterBrush:function(e){},brush:function(e,t){},getBoundingRect:function(){},contain:function(e,t){return this.rectContain(e,t)},traverse:function(e,t){e.call(t,this)},rectContain:function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(e){return this.animate("style",e)},attrKV:function(e,t){"style"!==e?a.prototype.attrKV.call(this,e,t):this.style.set(t)},setStyle:function(e,t){return this.style.set(e,t),this.dirty(!1),this},useStyle:function(e){return this.style=new i(e,this),this.dirty(!1),this},calculateTextPosition:null},r.inherits(s,a),r.mixin(s,o);var l=s;e.exports=l},GfqC:
|
|
|
/*!********************************************************!*\
|
|
|
!*** ./node_modules/rc-upload/es/index.js + 6 modules ***!
|
|
|
\********************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("q1tI"),i=n.n(r),a=n("TSYQ"),o=n.n(a);function s(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(e){return t}}function l(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});var n=new FormData;e.data&&Object.keys(e.data).forEach((function(t){var r=e.data[t];Array.isArray(r)?r.forEach((function(e){n.append(t+"[]",e)})):n.append(t,e.data[t])})),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status<200||t.status>=300?e.onError(function(e,t){var n="cannot "+e.method+" "+e.action+" "+t.status+"'",r=new Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}(e,t),s(t)):e.onSuccess(s(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var r=e.headers||{};return null!==r["X-Requested-With"]&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach((function(e){null!==r[e]&&t.setRequestHeader(e,r[e])})),t.send(n),{abort:function(){t.abort()}}}var c=+new Date,u=0;function d(){return"rc-upload-"+c+"-"+ ++u}var h=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",i=e.type||"",a=i.replace(/\/.*$/,"");return n.some((function(e){var t,n,o=e.trim();return"."===o.charAt(0)?(t=r.toLowerCase(),n=o.toLowerCase(),-1!==t.indexOf(n,t.length-n.length)):/\/\*$/.test(o)?a===o.replace(/\/.*$/,""):i===o}))}return!0};var f=function(e,t,n){var r=function e(r,i){i=i||"",r.isFile?r.file((function(e){n(e)&&(r.fullPath&&!e.webkitRelativePath&&(Object.defineProperties(e,{webkitRelativePath:{writable:!0}}),e.webkitRelativePath=r.fullPath.replace(/^\//,""),Object.defineProperties(e,{webkitRelativePath:{writable:!1}})),t([e]))})):r.isDirectory&&function(e,t){var n=e.createReader(),r=[];!function e(){n.readEntries((function(n){var i=Array.prototype.slice.apply(n);r=r.concat(i),!i.length?t(r):e()}))}()}(r,(function(t){t.forEach((function(t){e(t,""+i+r.name+"/")}))}))};e.forEach((function(e){r(e.webkitGetAsEntry())}))},p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},g=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var E=function(e){function t(){var e,n,r;b(this,t);for(var i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=r=y(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.state={uid:d()},r.reqs={},r.onChange=function(e){var t=e.target.files;r.uploadFiles(t),r.reset()},r.onClick=function(e){var t=r.fileInput;if(t){var n=r.props,i=n.children,a=n.onClick;i&&"button"===i.type&&(t.parentNode.focus(),t.parentNode.querySelector("button").blur()),t.click(),a&&a(e)}},r.onKeyDown=function(e){"Enter"===e.key&&r.onClick()},r.onFileDrop=function(e){var t=r.props.multiple;if(e.preventDefault(),"dragover"!==e.type)if(r.props.directory)f(Array.prototype.slice.call(e.dataTransfer.items),r.uploadFiles,(function(e){return h(e,r.props.accept)}));else{var n=Array.prototype.slice.call(e.dataTransfer.files).filter((function(e){return h(e,r.props.accept)}));!1===t&&(n=n.slice(0,1)),r.uploadFiles(n)}},r.uploadFiles=function(e){var t=Array.prototype.slice.call(e);t.map((function(e){return e.uid=d(),e})).forEach((function(e){r.upload(e,t)}))},r.saveFileInput=function(e){r.fileInput=e},y(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),g(t,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(e,t){var n=this,r=this.props;if(!r.beforeUpload)return setTimeout((function(){return n.post(e)}),0);var i=r.beforeUpload(e,t);i&&i.then?i.then((function(t){var r=Object.prototype.toString.call(t);return"[object File]"===r||"[object Blob]"===r?n.post(t):n.post(e)})).catch((function(e){console.log(e)})):!1!==i&&setTimeout((function(){return n.post(e)}),0)}},{key:"post",value:function(e){var t=this;if(this._isMounted){var n=this.props,r=n.onStart,i=n.onProgress,a=n.transformFile,o=void 0===a?function(e){return e}:a;new Promise((function(t){var r=n.action;return"function"==typeof r&&(r=r(e)),t(r)})).then((function(a){var s=e.uid,c=n.customRequest||l;Promise.resolve(o(e)).then((function(e){var t=n.data;return"function"==typeof t&&(t=t(e)),Promise.all([e,t])})).catch((function(e){console.error(e)})).then((function(o){var l=m(o,2),u=l[0],d=l[1],h={action:a,filename:n.name,data:d,file:u,headers:n.headers,withCredentials:n.withCredentials,method:n.method||"post",onProgress:i?function(t){i(t,e)}:null,onSuccess:function(r,i){delete t.reqs[s],n.onSuccess(r,e,i)},onError:function(r,i){delete t.reqs[s],n.onError(r,i,e)}};r(e),t.reqs[s]=c(h)}))}))}}},{key:"reset",value:function(){this.setState({uid:d()})}},{key:"abort",value:function(e){var t=this.reqs;if(e){var n=e;e&&e.uid&&(n=e.uid),t[n]&&t[n].abort&&t[n].abort(),delete t[n]}else Object.keys(t).forEach((function(e){t[e]&&t[e].abort&&t[e].abort(),delete t[e]}))}},{key:"render",value:function(){var e,t,n=this.props,r=n.component,a=n.prefixCls,s=n.className,l=n.disabled,c=n.id,u=n.style,d=n.multiple,h=n.accept,f=n.children,m=n.directory,g=n.openFileDialogOnClick,b=n.onMouseEnter,y=n.onMouseLeave,E=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(n,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),x=o()((v(e={},a,!0),v(e,a+"-disabled",l),v(e,s,s),e)),_=l?{}:{onClick:g?this.onClick:function(){},onKeyDown:g?this.onKeyDown:function(){},onMouseEnter:b,onMouseLeave:y,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return i.a.createElement(r,p({},_,{className:x,role:"button",style:u}),i.a.createElement("input",p({},(t=E,Object.keys(t).reduce((function(e,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)&&"role"!==n||(e[n]=t[n]),e}),{})),{id:c,type:"file",ref:this.saveFileInput,onClick:function(e){return e.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:h,directory:m?"directory":null,webkitdirectory:m?"webkitdirectory":null,multiple:d,onChange:this.onChange})),f)}}]),t}(r.Component),x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function k(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function C(){}var S=function(e){function t(){var e,n,r;k(this,t);for(var i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=r=w(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.saveUploader=function(e){r.uploader=e},w(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),_(t,[{key:"abort",value:function(e){this.uploader.abort(e)}},{key:"render",value:function(){return i.a.createElement(E,x({},this.props,{ref:this.saveUploader}))}}]),t}(r.Component);S.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:C,onError:C,onSuccess:C,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var O=S;t.a=O},Gytx:
|
|
|
/*!********************************************!*\
|
|
|
!*** ./node_modules/shallowequal/index.js ***!
|
|
|
\********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<a.length;l++){var c=a[l];if(!s(c))return!1;var u=e[c],d=t[c];if(!1===(i=n?n.call(r,u,d,c):void 0)||void 0===i&&u!==d)return!1}return!0}},H38U:
|
|
|
/*!******************************************!*\
|
|
|
!*** ./node_modules/qr.js/lib/QRCode.js ***!
|
|
|
\******************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./8BitByte */"f4xo"),i=n(/*! ./RSBlock */"rcnY"),a=n(/*! ./BitBuffer */"wU8J"),o=n(/*! ./util */"Iq15"),s=n(/*! ./Polynomial */"dWSS");function l(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var c=l.prototype;c.addData=function(e){var t=new r(e);this.dataList.push(t),this.dataCache=null},c.isDark=function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},c.getModuleCount=function(){return this.moduleCount},c.make=function(){if(this.typeNumber<1){var e=1;for(e=1;e<40;e++){for(var t=i.getRSBlocks(e,this.errorCorrectLevel),n=new a,r=0,s=0;s<t.length;s++)r+=t[s].dataCount;for(s=0;s<this.dataList.length;s++){var l=this.dataList[s];n.put(l.mode,4),n.put(l.getLength(),o.getLengthInBits(l.mode,e)),l.write(n)}if(n.getLengthInBits()<=8*r)break}this.typeNumber=e}this.makeImpl(!1,this.getBestMaskPattern())},c.makeImpl=function(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++)this.modules[n][r]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=l.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},c.setupPositionProbePattern=function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(var r=-1;r<=7;r++)t+r<=-1||this.moduleCount<=t+r||(this.modules[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},c.getBestMaskPattern=function(){for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=o.getLostPoint(this);(0==n||e>r)&&(e=r,t=n)}return t},c.createMovieClip=function(e,t,n){var r=e.createEmptyMovieClip(t,n);this.make();for(var i=0;i<this.modules.length;i++)for(var a=1*i,o=0;o<this.modules[i].length;o++){var s=1*o;this.modules[i][o]&&(r.beginFill(0,100),r.moveTo(s,a),r.lineTo(s+1,a),r.lineTo(s+1,a+1),r.lineTo(s,a+1),r.endFill())}return r},c.setupTimingPattern=function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)},c.setupPositionAdjustPattern=function(){for(var e=o.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var n=0;n<e.length;n++){var r=e[t],i=e[n];if(null==this.modules[r][i])for(var a=-2;a<=2;a++)for(var s=-2;s<=2;s++)this.modules[r+a][i+s]=-2==a||2==a||-2==s||2==s||0==a&&0==s}},c.setupTypeNumber=function(e){for(var t=o.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var r=!e&&1==(t>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(n=0;n<18;n++){r=!e&&1==(t>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}},c.setupTypeInfo=function(e,t){for(var n=this.errorCorrectLevel<<3|t,r=o.getBCHTypeInfo(n),i=0;i<15;i++){var a=!e&&1==(r>>i&1);i<6?this.modules[i][8]=a:i<8?this.modules[i+1][8]=a:this.modules[this.moduleCount-15+i][8]=a}for(i=0;i<15;i++){a=!e&&1==(r>>i&1);i<8?this.modules[8][this.moduleCount-i-1]=a:i<9?this.modules[8][15-i-1+1]=a:this.modules[8][15-i-1]=a}this.modules[this.moduleCount-8][8]=!e},c.mapData=function(e,t){for(var n=-1,r=this.moduleCount-1,i=7,a=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var l=0;l<2;l++)if(null==this.modules[r][s-l]){var c=!1;a<e.length&&(c=1==(e[a]>>>i&1)),o.getMask(t,r,s-l)&&(c=!c),this.modules[r][s-l]=c,-1==--i&&(a++,i=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}},l.PAD0=236,l.PAD1=17,l.createData=function(e,t,n){for(var r=i.getRSBlocks(e,t),s=new a,c=0;c<n.length;c++){var u=n[c];s.put(u.mode,4),s.put(u.getLength(),o.getLengthInBits(u.mode,e)),u.write(s)}var d=0;for(c=0;c<r.length;c++)d+=r[c].dataCount;if(s.getLengthInBits()>8*d)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*d+")");for(s.getLengthInBits()+4<=8*d&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*d||(s.put(l.PAD0,8),s.getLengthInBits()>=8*d));)s.put(l.PAD1,8);return l.createBytes(s,r)},l.createBytes=function(e,t){for(var n=0,r=0,i=0,a=new Array(t.length),l=new Array(t.length),c=0;c<t.length;c++){var u=t[c].dataCount,d=t[c].totalCount-u;r=Math.max(r,u),i=Math.max(i,d),a[c]=new Array(u);for(var h=0;h<a[c].length;h++)a[c][h]=255&e.buffer[h+n];n+=u;var f=o.getErrorCorrectPolynomial(d),p=new s(a[c],f.getLength()-1).mod(f);l[c]=new Array(f.getLength()-1);for(h=0;h<l[c].length;h++){var m=h+p.getLength()-l[c].length;l[c][h]=m>=0?p.get(m):0}}var g=0;for(h=0;h<t.length;h++)g+=t[h].totalCount;var v=new Array(g),b=0;for(h=0;h<r;h++)for(c=0;c<t.length;c++)h<a[c].length&&(v[b++]=a[c][h]);for(h=0;h<i;h++)for(c=0;c<t.length;c++)h<l[c].length&&(v[b++]=l[c][h]);return v},e.exports=l},H6uX:
|
|
|
/*!****************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/mixin/Eventful.js ***!
|
|
|
\****************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=Array.prototype.slice,r=function(e){this._$handlers={},this._$eventProcessor=e};function i(e,t,n,r,i,a){var o=e._$handlers;if("function"==typeof n&&(i=r,r=n,n=null),!r||!t)return e;n=function(e,t){var n=e._$eventProcessor;return null!=t&&n&&n.normalizeQuery&&(t=n.normalizeQuery(t)),t}(e,n),o[t]||(o[t]=[]);for(var s=0;s<o[t].length;s++)if(o[t][s].h===r)return e;var l={h:r,one:a,query:n,ctx:i||e,callAtLast:r.zrEventfulCallAtLast},c=o[t].length-1,u=o[t][c];return u&&u.callAtLast?o[t].splice(c,0,l):o[t].push(l),e}r.prototype={constructor:r,one:function(e,t,n,r){return i(this,e,t,n,r,!0)},on:function(e,t,n,r){return i(this,e,t,n,r,!1)},isSilent:function(e){var t=this._$handlers;return!t[e]||!t[e].length},off:function(e,t){var n=this._$handlers;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var r=[],i=0,a=n[e].length;i<a;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}n[e]&&0===n[e].length&&delete n[e]}else delete n[e];return this},trigger:function(e){var t=this._$handlers[e],r=this._$eventProcessor;if(t){var i=arguments,a=i.length;a>3&&(i=n.call(i,1));for(var o=t.length,s=0;s<o;){var l=t[s];if(r&&r.filter&&null!=l.query&&!r.filter(e,l.query))s++;else{switch(a){case 1:l.h.call(l.ctx);break;case 2:l.h.call(l.ctx,i[1]);break;case 3:l.h.call(l.ctx,i[1],i[2]);break;default:l.h.apply(l.ctx,i)}l.one?(t.splice(s,1),o--):s++}}}return r&&r.afterTrigger&&r.afterTrigger(e),this},triggerWithContext:function(e){var t=this._$handlers[e],r=this._$eventProcessor;if(t){var i=arguments,a=i.length;a>4&&(i=n.call(i,1,i.length-1));for(var o=i[i.length-1],s=t.length,l=0;l<s;){var c=t[l];if(r&&r.filter&&null!=c.query&&!r.filter(e,c.query))l++;else{switch(a){case 1:c.h.call(o);break;case 2:c.h.call(o,i[1]);break;case 3:c.h.call(o,i[1],i[2]);break;default:c.h.apply(o,i)}c.one?(t.splice(l,1),s--):l++}}}return r&&r.afterTrigger&&r.afterTrigger(e),this}};var a=r;e.exports=a},HmJG:
|
|
|
/*!****************************************************************!*\
|
|
|
!*** ./src/components/markdown-editor/upload-image/index.less ***!
|
|
|
\****************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},HpTS:
|
|
|
/*!********************************************************!*\
|
|
|
!*** ./src/assets/images/classrooms/small_program.png ***!
|
|
|
\********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/small_program.f74069ec.png"},I8Z2:
|
|
|
/*!**********************************************************!*\
|
|
|
!*** ./node_modules/mini-store/esm/index.js + 3 modules ***!
|
|
|
\**********************************************************/
|
|
|
/*! exports provided: Provider, connect, create */
|
|
|
/*! exports used: Provider, connect, create */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return v}));var r,i=n("q1tI"),a=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=i.createContext(null),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){return i.createElement(o.Provider,{value:this.props.store},this.props.children)},t}(i.Component),l=n("Gytx"),c=n.n(l),u=n("2mql"),d=n.n(u),h=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),f=function(){return(f=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};var p=function(){return{}};function m(e,t){void 0===t&&(t={});var n=!!e,r=e||p;return function(a){var s=function(t){function s(e,n){var i=t.call(this,e,n)||this;return i.unsubscribe=null,i.handleChange=function(){if(i.unsubscribe){var e=r(i.store.getState(),i.props);i.setState({subscribed:e})}},i.store=i.context,i.state={subscribed:r(i.store.getState(),e),store:i.store,props:e},i}return h(s,t),s.getDerivedStateFromProps=function(t,n){return e&&2===e.length&&t!==n.props?{subscribed:r(n.store.getState(),t),props:t}:{props:t}},s.prototype.componentDidMount=function(){this.trySubscribe()},s.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},s.prototype.shouldComponentUpdate=function(e,t){return!c()(this.props,e)||!c()(this.state.subscribed,t.subscribed)},s.prototype.trySubscribe=function(){n&&(this.unsubscribe=this.store.subscribe(this.handleChange),this.handleChange())},s.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},s.prototype.render=function(){var e=f(f(f({},this.props),this.state.subscribed),{store:this.store});return i.createElement(a,f({},e,{ref:this.props.miniStoreForwardedRef}))},s.displayName="Connect("+function(e){return e.displayName||e.name||"Component"}(a)+")",s.contextType=o,s}(i.Component);if(t.forwardRef){var l=i.forwardRef((function(e,t){return i.createElement(s,f({},e,{miniStoreForwardedRef:t}))}));return d()(l,a)}return d()(s,a)}}var g=function(){return(g=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function v(e){var t=e,n=[];return{setState:function(e){t=g(g({},t),e);for(var r=0;r<n.length;r++)n[r]()},getState:function(){return t},subscribe:function(e){return n.push(e),function(){var t=n.indexOf(e);n.splice(t,1)}}}}},IBYe:
|
|
|
/*!**************************************************!*\
|
|
|
!*** ./node_modules/rc-table/es/sugar/Column.js ***!
|
|
|
\**************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";t.a=function(e){return null}},IMiH:
|
|
|
/*!****************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/core/PathProxy.js ***!
|
|
|
\****************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./curve */"Sj9i"),i=n(/*! ./vector */"QBsz"),a=n(/*! ./bbox */"4mN7"),o=n(/*! ./BoundingRect */"mFDi"),s=n(/*! ../config */"LPTA").devicePixelRatio,l={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},c=[],u=[],d=[],h=[],f=Math.min,p=Math.max,m=Math.cos,g=Math.sin,v=Math.sqrt,b=Math.abs,y="undefined"!=typeof Float32Array,E=function(e){this._saveData=!e,this._saveData&&(this.data=[]),this._ctx=null};E.prototype={constructor:E,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(e,t,n){n=n||0,this._ux=b(n/s/e)||0,this._uy=b(n/s/t)||0},getContext:function(){return this._ctx},beginPath:function(e){return this._ctx=e,e&&e.beginPath(),e&&(this.dpr=e.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(e,t){return this.addData(l.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},lineTo:function(e,t){var n=b(e-this._xi)>this._ux||b(t-this._yi)>this._uy||this._len<5;return this.addData(l.L,e,t),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(e,t):this._ctx.lineTo(e,t)),n&&(this._xi=e,this._yi=t),this},bezierCurveTo:function(e,t,n,r,i,a){return this.addData(l.C,e,t,n,r,i,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(e,t,n,r,i,a):this._ctx.bezierCurveTo(e,t,n,r,i,a)),this._xi=i,this._yi=a,this},quadraticCurveTo:function(e,t,n,r){return this.addData(l.Q,e,t,n,r),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(e,t,n,r):this._ctx.quadraticCurveTo(e,t,n,r)),this._xi=n,this._yi=r,this},arc:function(e,t,n,r,i,a){return this.addData(l.A,e,t,n,n,r,i-r,0,a?0:1),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=m(i)*n+e,this._yi=g(i)*n+t,this},arcTo:function(e,t,n,r,i){return this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},rect:function(e,t,n,r){return this._ctx&&this._ctx.rect(e,t,n,r),this.addData(l.R,e,t,n,r),this},closePath:function(){this.addData(l.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&(this._needsDash()&&this._dashedLineTo(t,n),e.closePath()),this._xi=t,this._yi=n,this},fill:function(e){e&&e.fill(),this.toStatic()},stroke:function(e){e&&e.stroke(),this.toStatic()},setLineDash:function(e){if(e instanceof Array){this._lineDash=e,this._dashIdx=0;for(var t=0,n=0;n<e.length;n++)t+=e[n];this._dashSum=t}return this},setLineDashOffset:function(e){return this._dashOffset=e,this},len:function(){return this._len},setData:function(e){var t=e.length;this.data&&this.data.length===t||!y||(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t},appendPath:function(e){e instanceof Array||(e=[e]);for(var t=e.length,n=0,r=this._len,i=0;i<t;i++)n+=e[i].len();y&&this.data instanceof Float32Array&&(this.data=new Float32Array(r+n));for(i=0;i<t;i++)for(var a=e[i].data,o=0;o<a.length;o++)this.data[r++]=a[o];this._len=r},addData:function(e){if(this._saveData){var t=this.data;this._len+arguments.length>t.length&&(this._expandData(),t=this.data);for(var n=0;n<arguments.length;n++)t[this._len++]=arguments[n];this._prevCmd=e}},_expandData:function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(e,t){var n,r,i=this._dashSum,a=this._dashOffset,o=this._lineDash,s=this._ctx,l=this._xi,c=this._yi,u=e-l,d=t-c,h=v(u*u+d*d),m=l,g=c,b=o.length;for(a<0&&(a=i+a),m-=(a%=i)*(u/=h),g-=a*(d/=h);u>0&&m<=e||u<0&&m>=e||0===u&&(d>0&&g<=t||d<0&&g>=t);)m+=u*(n=o[r=this._dashIdx]),g+=d*n,this._dashIdx=(r+1)%b,u>0&&m<l||u<0&&m>l||d>0&&g<c||d<0&&g>c||s[r%2?"moveTo":"lineTo"](u>=0?f(m,e):p(m,e),d>=0?f(g,t):p(g,t));u=m-e,d=g-t,this._dashOffset=-v(u*u+d*d)},_dashedBezierTo:function(e,t,n,i,a,o){var s,l,c,u,d,h=this._dashSum,f=this._dashOffset,p=this._lineDash,m=this._ctx,g=this._xi,b=this._yi,y=r.cubicAt,E=0,x=this._dashIdx,_=p.length,k=0;for(f<0&&(f=h+f),f%=h,s=0;s<1;s+=.1)l=y(g,e,n,a,s+.1)-y(g,e,n,a,s),c=y(b,t,i,o,s+.1)-y(b,t,i,o,s),E+=v(l*l+c*c);for(;x<_&&!((k+=p[x])>f);x++);for(s=(k-f)/E;s<=1;)u=y(g,e,n,a,s),d=y(b,t,i,o,s),x%2?m.moveTo(u,d):m.lineTo(u,d),s+=p[x]/E,x=(x+1)%_;x%2!=0&&m.lineTo(a,o),l=a-u,c=o-d,this._dashOffset=-v(l*l+c*c)},_dashedQuadraticTo:function(e,t,n,r){var i=n,a=r;n=(n+2*e)/3,r=(r+2*t)/3,e=(this._xi+2*e)/3,t=(this._yi+2*t)/3,this._dashedBezierTo(e,t,n,r,i,a)},toStatic:function(){var e=this.data;e instanceof Array&&(e.length=this._len,y&&(this.data=new Float32Array(e)))},getBoundingRect:function(){c[0]=c[1]=d[0]=d[1]=Number.MAX_VALUE,u[0]=u[1]=h[0]=h[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,n=0,r=0,s=0,f=0;f<e.length;){var p=e[f++];switch(1===f&&(r=t=e[f],s=n=e[f+1]),p){case l.M:t=r=e[f++],n=s=e[f++],d[0]=r,d[1]=s,h[0]=r,h[1]=s;break;case l.L:a.fromLine(t,n,e[f],e[f+1],d,h),t=e[f++],n=e[f++];break;case l.C:a.fromCubic(t,n,e[f++],e[f++],e[f++],e[f++],e[f],e[f+1],d,h),t=e[f++],n=e[f++];break;case l.Q:a.fromQuadratic(t,n,e[f++],e[f++],e[f],e[f+1],d,h),t=e[f++],n=e[f++];break;case l.A:var v=e[f++],b=e[f++],y=e[f++],E=e[f++],x=e[f++],_=e[f++]+x;f+=1;var k=1-e[f++];1===f&&(r=m(x)*y+v,s=g(x)*E+b),a.fromArc(v,b,y,E,x,_,k,d,h),t=m(_)*y+v,n=g(_)*E+b;break;case l.R:r=t=e[f++],s=n=e[f++];var w=e[f++],C=e[f++];a.fromLine(r,s,r+w,s+C,d,h);break;case l.Z:t=r,n=s}i.min(c,c,d),i.max(u,u,h)}return 0===f&&(c[0]=c[1]=u[0]=u[1]=0),new o(c[0],c[1],u[0]-c[0],u[1]-c[1])},rebuildPath:function(e){for(var t,n,r,i,a,o,s=this.data,c=this._ux,u=this._uy,d=this._len,h=0;h<d;){var f=s[h++];switch(1===h&&(t=r=s[h],n=i=s[h+1]),f){case l.M:t=r=s[h++],n=i=s[h++],e.moveTo(r,i);break;case l.L:a=s[h++],o=s[h++],(b(a-r)>c||b(o-i)>u||h===d-1)&&(e.lineTo(a,o),r=a,i=o);break;case l.C:e.bezierCurveTo(s[h++],s[h++],s[h++],s[h++],s[h++],s[h++]),r=s[h-2],i=s[h-1];break;case l.Q:e.quadraticCurveTo(s[h++],s[h++],s[h++],s[h++]),r=s[h-2],i=s[h-1];break;case l.A:var p=s[h++],v=s[h++],y=s[h++],E=s[h++],x=s[h++],_=s[h++],k=s[h++],w=s[h++],C=y>E?y:E,S=y>E?1:y/E,O=y>E?E/y:1,A=x+_;Math.abs(y-E)>.001?(e.translate(p,v),e.rotate(k),e.scale(S,O),e.arc(0,0,C,x,A,1-w),e.scale(1/S,1/O),e.rotate(-k),e.translate(-p,-v)):e.arc(p,v,C,x,A,1-w),1===h&&(t=m(x)*y+p,n=g(x)*E+v),r=m(A)*y+p,i=g(A)*E+v;break;case l.R:t=r=s[h],n=i=s[h+1],e.rect(s[h++],s[h++],s[h++],s[h++]);break;case l.Z:e.closePath(),r=t,i=n}}}},E.CMD=l;var x=E;e.exports=x},Iq15:
|
|
|
/*!****************************************!*\
|
|
|
!*** ./node_modules/qr.js/lib/util.js ***!
|
|
|
\****************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./mode */"nVVt"),i=n(/*! ./Polynomial */"dWSS"),a=n(/*! ./math */"dQei"),o=0,s=1,l=2,c=3,u=4,d=5,h=6,f=7,p={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;p.getBCHDigit(t)-p.getBCHDigit(p.G15)>=0;)t^=p.G15<<p.getBCHDigit(t)-p.getBCHDigit(p.G15);return(e<<10|t)^p.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;p.getBCHDigit(t)-p.getBCHDigit(p.G18)>=0;)t^=p.G18<<p.getBCHDigit(t)-p.getBCHDigit(p.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t},getPatternPosition:function(e){return p.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case o:return(t+n)%2==0;case s:return t%2==0;case l:return n%3==0;case c:return(t+n)%3==0;case u:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case d:return t*n%2+t*n%3==0;case h:return(t*n%2+t*n%3)%2==0;case f:return(t*n%3+(t+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new i([1],0),n=0;n<e;n++)t=t.multiply(new i([1,a.gexp(n)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case r.MODE_NUMBER:return 10;case r.MODE_ALPHA_NUM:return 9;case r.MODE_8BIT_BYTE:case r.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case r.MODE_NUMBER:return 12;case r.MODE_ALPHA_NUM:return 11;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case r.MODE_NUMBER:return 14;case r.MODE_ALPHA_NUM:return 13;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}}},getLostPoint:function(e){for(var t=e.getModuleCount(),n=0,r=0;r<t;r++)for(var i=0;i<t;i++){for(var a=0,o=e.isDark(r,i),s=-1;s<=1;s++)if(!(r+s<0||t<=r+s))for(var l=-1;l<=1;l++)i+l<0||t<=i+l||0==s&&0==l||o==e.isDark(r+s,i+l)&&a++;a>5&&(n+=3+a-5)}for(r=0;r<t-1;r++)for(i=0;i<t-1;i++){var c=0;e.isDark(r,i)&&c++,e.isDark(r+1,i)&&c++,e.isDark(r,i+1)&&c++,e.isDark(r+1,i+1)&&c++,0!=c&&4!=c||(n+=3)}for(r=0;r<t;r++)for(i=0;i<t-6;i++)e.isDark(r,i)&&!e.isDark(r,i+1)&&e.isDark(r,i+2)&&e.isDark(r,i+3)&&e.isDark(r,i+4)&&!e.isDark(r,i+5)&&e.isDark(r,i+6)&&(n+=40);for(i=0;i<t;i++)for(r=0;r<t-6;r++)e.isDark(r,i)&&!e.isDark(r+1,i)&&e.isDark(r+2,i)&&e.isDark(r+3,i)&&e.isDark(r+4,i)&&!e.isDark(r+5,i)&&e.isDark(r+6,i)&&(n+=40);var u=0;for(i=0;i<t;i++)for(r=0;r<t;r++)e.isDark(r,i)&&u++;return n+=10*(Math.abs(100*u/t/t-50)/5)}};e.exports=p},ItGF:
|
|
|
/*!**********************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/core/env.js ***!
|
|
|
\**********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(e){var t={},n=e.match(/Firefox\/([\d.]+)/),r=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),i=e.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(e);n&&(t.firefox=!0,t.version=n[1]);r&&(t.ie=!0,t.version=r[1]);i&&(t.edge=!0,t.version=i[1]);a&&(t.weChat=!0);return{browser:t,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!t.ie&&!t.edge,pointerEventsSupported:"onpointerdown"in window&&(t.edge||t.ie&&t.version>=11),domSupported:"undefined"!=typeof document}}(navigator.userAgent);e.exports=n},JNOM:
|
|
|
/*!***************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Detail/index.tsx + 25 modules ***!
|
|
|
\***************************************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/ArrowLeftOutlined.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/CaretDownOutlined.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/CaretUpOutlined.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/CloseCircleFilled.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/DeleteOutlined.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/DeliveredProcedureOutlined.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/DownOutlined.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/FilterOutlined.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/PlusCircleOutlined.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/PlusOutlined.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/UpOutlined.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/Detail/components/CameraMonitoring/index.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/Detail/components/Checking/index.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/Detail/components/ConfigWorks/index.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/Detail/components/DuplicateChecking/components/SubjectTable/index.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/Detail/components/DuplicateChecking/index.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/Detail/components/FaceReview/index.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/Detail/components/Redo/index.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/Detail/components/StatisticsResult/PaperStatistic/index.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/Detail/components/StatisticsResult/analysis/index.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/Detail/components/StatisticsResult/index.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/Detail/components/WorkList/index.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/Detail/index.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/umiExports.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/DragSubject/index.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/ImagesIcon/index.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/NoData/index.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/image-preview/index.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/index.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/mediator.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/Export/components/Head/index.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/components/CutOffNow.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/components/Publish.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Paperlibrary/Random/PreviewEdit/index.tsx (<- Module is referenced from these modules with unsupported syntax: ./src/.umi-production/core/routes.ts (referenced with import())) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/service/exercise.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/authority.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/export.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/validate.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/flv.js/src/flv.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/paper/jinshi.svg (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/breadcrumb/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/breadcrumb/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/checkbox/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/checkbox/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/date-picker/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/date-picker/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/divider/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/divider/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/dropdown/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/dropdown/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/empty/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/empty/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/menu/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/menu/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/pagination/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/pagination/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/popover/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/popover/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/progress/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/progress/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/skeleton/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/skeleton/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/spin/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/spin/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/switch/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/switch/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/table/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/table/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tabs/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tabs/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tag/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tag/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/upload/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/upload/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/echarts-for-react/lib/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/lodash.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/moment/moment.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-infinite-scroller/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router-dom/esm/react-router-dom.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router/esm/react-router.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.r(t);n("Znn+");var r=n("ZTPi"),i=(n("qVdP"),n("jsC+")),a=(n("+L6B"),n("2/Rp")),o=(n("sPJy"),n("bE4q")),s=(n("miYZ"),n("tsqr")),l=(n("lUTK"),n("BvKs")),c=n("9og8"),u=(n("2qtc"),n("kLXV")),d=n("oBTY"),h=n("k1fw"),f=n("tJVT"),p=n("PpiC"),m=n("WmNS"),g=n.n(m),v=n("q1tI"),b=n.n(v),y=n("ErOA"),E=n("Ty5D"),x=n("55Ip"),_=n("9kvl"),k=n("jhfD"),w=n("Llu2"),C=n("0NbB"),S=n("V0Rq"),O=n("1vsH"),A=n("mgmH"),T=(n("7Kak"),n("9yH6")),I=(n("DjyN"),n("NUBc")),D=(n("giR+"),n("fyUT")),L=(n("5NDa"),n("5rEg")),R=(n("sRBo"),n("kaz8")),N=(n("g9YV"),n("wCAj")),j=(n("BoS7"),n("Sdc0")),M=(n("14J3"),n("BMrR")),P=(n("jCWc"),n("kPKH")),B=(n("5Dmo"),n("3S7+")),F=n("jrin"),U=(n("y8nQ"),n("Vl3Y")),H=n("wd/R"),z=n.n(H),G=Object(_.a)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var t=e.shixunHomeworks,n=e.dispatch,r=Object(E.i)();return b.a.createElement(u.a,{centered:!0,title:"提示",visible:"打回重做"===t.actionTabs.key,okText:"确定",cancelText:"取消",onOk:Object(c.a)(g.a.mark((function e(){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(y.a)("/api/myshixuns/".concat(t.actionTabs.selectArrs.myshixun_identifier,"/reset_my_game.json"),{method:"post",body:{course_id:r.coursesId}});case 2:0===e.sent.status&&(s.b.success("删除成功"),n({type:"shixunHomeworks/setActionTabs",payload:{}}),n({type:"shixunHomeworks/getWorkList",payload:Object(h.a)({},t.actionTabs.params)}));case 4:case"end":return e.stop()}}),e)}))),onCancel:function(){n({type:"shixunHomeworks/setActionTabs",payload:{}})}},b.a.createElement("p",null,"该作业将被打回重做,学生实训记录将被清空!"),b.a.createElement("p",null,"确定打回?"))})),V=Object(_.a)((function(e){return{exercise:e.exercise}}))((function(e){var t,n,r,i,a,o,l,d,p=e.exercise,m=e.dispatch,y=Object(E.i)(),x=Object(v.useState)(!0),_=Object(f.a)(x,2),k=(_[0],_[1],U.a.useForm()),w=Object(f.a)(k,1)[0],C=p.actionTabs;return Object(v.useEffect)((function(){var e,t,n,r;"更改评阅"===p.actionTabs.key&&(w.resetFields(),w.setFieldsValue({subjective_score:null==C||null===(e=C.selectArrs)||void 0===e||null===(t=e.record)||void 0===t?void 0:t.subjective_score,objective_score:null==C||null===(n=C.selectArrs)||void 0===n||null===(r=n.record)||void 0===r?void 0:r.objective_score}))}),[p.actionTabs.key]),b.a.createElement(b.a.Fragment,null,b.a.createElement(u.a,{centered:!0,title:"评阅",visible:"更改评阅"===p.actionTabs.key,okText:"确定",cancelText:"取消",onOk:Object(c.a)(g.a.mark((function e(){var t,n,r;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w.validateFields();case 2:return r=w.getFieldValue(),e.next=5,Object(S.O)(Object(h.a)(Object(h.a)({},r),{},{id:y.categoryId,user_id:null==C||null===(t=C.selectArrs)||void 0===t||null===(n=t.record)||void 0===n?void 0:n.user_id}));case 5:0===e.sent.status&&(s.b.success("评阅成功"),w.resetFields(),m({type:"exercise/setActionTabs",payload:{}}),m({type:"exercise/getExerciseList",payload:Object(h.a)({},p.actionTabs.params)}));case 7:case"end":return e.stop()}}),e)}))),onCancel:function(){m({type:"exercise/setActionTabs",payload:{}})}},b.a.createElement("div",{className:"pl30"},b.a.createElement(U.a,{form:w},b.a.createElement(M.a,null,b.a.createElement(P.a,null,b.a.createElement(U.a.Item,{name:"subjective_score",label:"问答题成绩",rules:[{required:!0,message:"请输入!"}]},b.a.createElement(D.a,{min:0,max:1*(null==C||null===(t=C.selectArrs)||void 0===t||null===(n=t.exercise_types)||void 0===n?void 0:n.subjective_score),style:{width:150},placeholder:"请填写问答题成绩"}))),b.a.createElement(P.a,{flex:1},b.a.createElement("div",null,b.a.createElement("span",{className:"ml10"},"分,总共:",null==C||null===(r=C.selectArrs)||void 0===r||null===(i=r.exercise_types)||void 0===i?void 0:i.subjective_score,"分")))),b.a.createElement(M.a,null,b.a.createElement(P.a,null,b.a.createElement(U.a.Item,{name:"objective_score",label:"客观题成绩",rules:[{required:!0,message:"请输入!"}]},b.a.createElement(D.a,{min:0,max:1*(null==C||null===(a=C.selectArrs)||void 0===a||null===(o=a.exercise_types)||void 0===o?void 0:o.objective_score),style:{width:150},width:150,placeholder:"请填写客观题成绩"}))),b.a.createElement(P.a,{flex:1},b.a.createElement("div",null,b.a.createElement("span",{className:"ml10"},"分,总共:",null==C||null===(l=C.selectArrs)||void 0===l||null===(d=l.exercise_types)||void 0===d?void 0:d.objective_score,"分"))))))))})),W=[{name:"未评阅",id:0,type:"unreview_counts"},{name:"评阅中",id:2,type:"reviewing_counts"},{name:"已评阅",id:1,type:"review_counts"}],K=[{name:"未开始",id:0,type:"unanswer_users"},{name:"进行中",id:1,type:"answering_users"},{name:"已完成",id:2,type:"answer_users"},{name:"已提交/未答",id:3,type:"commit_with_no_answers_users"}],q=[{name:"无需补考",id:0,type:"unmake_up_users_count"},{name:"参加补考",id:1,type:"make_up_users_count"}],Y=n("BdwD"),Q=(n("iQDF"),n("+eQT")),J=Object(_.a)((function(e){return{exercise:e.exercise}}))((function(e){var t,n,r=e.exercise,i=e.dispatch,a=Object(E.i)(),o=Object(v.useState)(!0),l=Object(f.a)(o,2),d=(l[0],l[1],U.a.useForm()),p=Object(f.a)(d,1)[0],m=Object(v.useState)(!1),y=Object(f.a)(m,2),x=y[0],_=y[1],k=Object(v.useState)({}),w=Object(f.a)(k,2),C=w[0],O=w[1],A=r.actionTabs;Object(v.useEffect)((function(){var e,t,n,i;"延时"===r.actionTabs.key&&(_(!1),p.resetFields(),p.setFieldsValue({subjective_score:null==A||null===(e=A.selectArrs)||void 0===e||null===(t=e.record)||void 0===t?void 0:t.subjective_score,objective_score:null==A||null===(n=A.selectArrs)||void 0===n||null===(i=n.record)||void 0===i?void 0:i.objective_score}))}),[r.actionTabs.key]);function T(e,t){for(var n=[],r=e;r<t;r++)n.push(r);return n}return b.a.createElement(b.a.Fragment,null,b.a.createElement(u.a,{width:600,centered:!0,title:"延时设置",visible:"延时"===r.actionTabs.key,okText:"确认调整",cancelText:"取消",confirmLoading:x,onOk:Object(c.a)(g.a.mark((function e(){var t;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p.validateFields();case 2:i({type:"exercise/setActionTabs",payload:{}}),_(!0),u.a.confirm({title:"试卷提交时间确认提示",okText:"确认",cancelText:"取消",content:"您正在为【".concat(null==A||null===(t=A.selectArrs)||void 0===t?void 0:t.user_name,"】同学单独调整作业与测验时间至【").concat(z()(null==C?void 0:C.time).format("YYYY-MM-DD HH:mm"),"】截止,是否确认本操作?"),onOk:function(){var e=Object(c.a)(g.a.mark((function e(){var t,n;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(S.h)(Object(h.a)(Object(h.a)({},C),{},{id:a.categoryId,exercise_user_id:null==A||null===(t=A.selectArrs)||void 0===t?void 0:t.exercise_user_id}));case 2:n=e.sent,_(!1),0===n.status&&(s.b.success("延时成功"),p.resetFields(),i({type:"exercise/getExerciseList",payload:Object(h.a)({},r.actionTabs.params)}));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 5:case"end":return e.stop()}}),e)}))),onCancel:function(){i({type:"exercise/setActionTabs",payload:{}})}},b.a.createElement("div",{className:""},b.a.createElement(U.a,{form:p,onValuesChange:function(){O(p.getFieldValue())}},b.a.createElement(M.a,{align:"middle"},b.a.createElement(P.a,{className:"ml10 mb10"},"请设置 ",null==A||null===(t=A.selectArrs)||void 0===t?void 0:t.user_name," 的交卷截止时间",b.a.createElement("span",{className:"c-grey-999"},"(不能超过当前试卷截止时间",z()(null==A||null===(n=A.selectArrs)||void 0===n?void 0:n.exercise_end_at).format("YYYY-MM-DD HH:mm"),")")),b.a.createElement(P.a,{flex:1},b.a.createElement(U.a.Item,{label:"截止时间",name:"time",className:"ml10",style:{marginBottom:0},rules:[{required:!0,message:"请输入!"}]},b.a.createElement(Q.a,{style:{width:270},placeholder:"请选择交卷截止时间",showTime:{format:"HH:mm",defaultValue:z()("00:00","HH:mm")},format:"YYYY-MM-DD HH:mm",disabledDate:function(e){var t,n;return console.log("current:",e,z()(null==A||null===(t=A.selectArrs)||void 0===t?void 0:t.exercise_end_at).startOf("minute")),e&&(e>z()(null==A||null===(n=A.selectArrs)||void 0===n?void 0:n.exercise_end_at).endOf("minute")||e<=z()().startOf("day"))},disabledTime:function(e){var t,n=null==A||null===(t=A.selectArrs)||void 0===t?void 0:t.exercise_end_at,r=z()(e).format("HH");if(z()(e).isSame(z()(n),"day")){var i=z()(n).format("HH"),a=z()(n).format("mm");return{disabledHours:function(){return T(0,24).splice(1*i+1,24-i)},disabledMinutes:function(){return z()(e).isSame(z()(n),"hour")&&r<=i?T(a,60):T(60,60)}}}if(z()(e).isSame(z()(),"day")){var o=z()().format("HH"),s=z()().format("mm");return{disabledHours:function(){return T(0,24).splice(0,o)},disabledMinutes:function(){return r<=o?T(0,s):T(60,60)}}}return!1},getPopupContainer:function(e){return e.parentNode},allowClear:!1,onChange:function(e,t){var n,r;z()(t)>z()(null==A||null===(n=A.selectArrs)||void 0===n?void 0:n.exercise_end_at)&&p.setFieldsValue({time:z()(null==A||null===(r=A.selectArrs)||void 0===r?void 0:r.exercise_end_at).format("YYYY-MM-DD HH:mm")})}})))),b.a.createElement(M.a,{style:{marginLeft:78,marginTop:4}},b.a.createElement(U.a.Item,{name:"is_clear",className:"ml10",initialValue:!1,valuePropName:"checked"},b.a.createElement(R.a,null,"确认清除该学生的已切屏次数")))))))})),X=n("kaH+"),Z=n("dhSg"),$=n("xKgJ"),ee=n("hjlX"),te=n.n(ee),ne=function(e){var t=e.item,n=e.renderText,r=Object(E.i)(),i=Object(v.useState)(),a=Object(f.a)(i,2),o=a[0],s=a[1],l=function(){var e=Object(c.a)(g.a.mark((function e(){var n;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,Object(S.B)({id:r.categoryId,user_id:null==t?void 0:t.user_id});case 4:(n=e.sent)&&s(n);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return b.a.createElement(B.a,{onVisibleChange:l,title:b.a.createElement("div",null,"单选题 ",null==o?void 0:o.single_question_score,"分 ",b.a.createElement("br",null),"多选题 ",null==o?void 0:o.multiple_question_score,"分 ",b.a.createElement("br",null),"判断题 ",null==o?void 0:o.judgement_question_score,"分 ",b.a.createElement("br",null),"填空题 ",null==o?void 0:o.completion_question_score,"分 ",b.a.createElement("br",null),"实训题 ",null==o?void 0:o.shixun_question_score,"分")},n)},re=Object(_.a)((function(e){var t=e.exercise,n=e.loading,r=e.globalSetting;return{exercise:t,loading:n.effects,globalSetting:r}}))((function(e){var t,n,r,i,o,l,m,k,w,C,A,H,Q,ee,re,ie,ae,oe,se,le,ce,ue,de,he,fe,pe,me,ge,ve,be,ye,Ee,xe,_e,ke,we,Ce,Se=e.exercise,Oe=e.loading,Ae=e.dispatch,Te=e.globalSetting,Ie=e.checkDomainAuthority,De=e.getparams,Le=(Object(p.a)(e,["exercise","loading","dispatch","globalSetting","checkDomainAuthority","getparams"]),Object(E.h)()),Re=Object(E.i)(),Ne=Object(v.useState)(Object(h.a)({},Re)),je=Object(f.a)(Ne,2),Me=je[0],Pe=je[1],Be=Se.exerciseList,Fe=Se.commonHeader,Ue=Object(v.useState)({}),He=Object(f.a)(Ue,2),ze=He[0],Ge=(He[1],Object(v.useState)("")),Ve=Object(f.a)(Ge,2),We=(Ve[0],Ve[1],Object(v.useState)(0)),Ke=Object(f.a)(We,2),qe=Ke[0],Ye=Ke[1],Qe=Object(v.useState)({}),Je=Object(f.a)(Qe,2),Xe=(Je[0],Je[1],Object(v.useState)(!1)),Ze=Object(f.a)(Xe,2),$e=Ze[0],et=Ze[1],tt=Object(v.useState)("alert"),nt=Object(f.a)(tt,2),rt=nt[0],it=nt[1],at=Object(v.useState)(0),ot=Object(f.a)(at,2),st=ot[0],lt=ot[1],ct=Object(v.useState)(!1),ut=Object(f.a)(ct,2),dt=(ut[0],ut[1]),ht=Object(v.useState)(!1),ft=Object(f.a)(ht,2),pt=ft[0],mt=ft[1],gt=U.a.useForm(),vt=Object(f.a)(gt,1)[0],bt=Object(v.useState)([]),yt=Object(f.a)(bt,2),Et=yt[0],xt=yt[1],_t=Object(v.useState)(!0),kt=Object(f.a)(_t,2),wt=(kt[0],kt[1],Object(v.useRef)(),Object(v.useState)(1)),Ct=Object(f.a)(wt,2),St=Ct[0],Ot=Ct[1],At=Object(v.useState)(""),Tt=Object(f.a)(At,2),It=Tt[0],Dt=Tt[1],Lt=Object(v.useState)(),Rt=Object(f.a)(Lt,2),Nt=Rt[0],jt=Rt[1],Mt=Object(v.useState)(!1),Pt=Object(f.a)(Mt,2),Bt=Pt[0],Ft=Pt[1];function Ut(){return(Ut=Object(c.a)(g.a.mark((function e(t){var n,r,i,a,o;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return jt(null==t?void 0:t.exercise_user_id),Ft(2===t.commit_status||3===t.commit_status),dt(!0),e.next=5,Object(y.a)("/api/exercises/".concat(Me.categoryId,"/student_info.json"),{method:"get",params:{exercise_user_id:null==t?void 0:t.exercise_user_id}});case 5:(null==(o=e.sent)||null===(n=o.data)||void 0===n||null===(r=n.exercise_user_photos)||void 0===r?void 0:r.length)>0?et(!0):s.b.info("当前暂无照片"),xt(null==o||null===(i=o.data)||void 0===i?void 0:i.exercise_user_photos),lt(null==o||null===(a=o.data)||void 0===a?void 0:a.alert_count),dt(!1);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}Object(v.useEffect)((function(){var e,t;if(Object($.c)())Ye(null===(t=Be.exercise_types)||void 0===t?void 0:t.total_users);else if(null!=Be&&null!==(e=Be.exercise_types)&&void 0!==e&&e.score_open){var n;Ye(null===(n=Be.exercise_types)||void 0===n?void 0:n.unanswer_users)}}),[Be]),Object(v.useEffect)((function(){var e,t={};if(null!=Le&&null!==(e=Le.query)&&void 0!==e&&e.exercise_group_id){var n,r;if(t={review:[0,2],commit_status:[2,3]},"0"!==(null==Le||null===(n=Le.query)||void 0===n?void 0:n.exercise_group_id))t.exercise_group_id=[Number(null==Le||null===(r=Le.query)||void 0===r?void 0:r.exercise_group_id)];vt.setFieldsValue(Object(h.a)({},t))}Me=Object(h.a)(Object(h.a)({},Me),t),Pe(Object(h.a)({},Me)),Ae({type:"exercise/getExerciseList",payload:Me}),Ae({type:"exercise/clearData",payload:{key:"reviewExercise"}})}),[]);var Ht=[{title:"序号",dataIndex:"name",fixed:"left",width:80,align:"center",render:function(e,t,n){return b.a.createElement(B.a,{title:20*((Me.page||1)-1)+n+1},b.a.createElement("span",null,20*((Me.page||1)-1)+n+1))}},{title:"姓名",dataIndex:"user_name",fixed:"left",width:120,ellipsis:!0,align:"left",render:function(e,t){return b.a.createElement("div",null,e||"--",!(null==t||!t.delayed_at)&&b.a.createElement(B.a,{title:b.a.createElement("div",null,"交卷截止时间调整至",b.a.createElement("span",{className:"ml5"},z()(t.delayed_at).format("YYYY-MM-DD HH:mm")))},b.a.createElement("span",{className:"iconfont icon-shizhong c-blue"})))}},!(null!=Be&&null!==(t=Be.exercise_types)&&void 0!==t&&t.is_excellent)&&{title:"学号",ellipsis:!0,dataIndex:"student_id",width:140,align:"left",sorter:!0,render:function(e){return e||"--"}},!(null!=Be&&null!==(n=Be.exercise_types)&&void 0!==n&&n.is_excellent)&&0!==(null==Be||null===(r=Be.exercise_types)||void 0===r?void 0:r.groups_count)&&{title:"分班",width:220,ellipsis:!0,dataIndex:"user_group_name",align:"left",render:function(e){return e||"--"}},{title:"异常行为",dataIndex:"exception_count",width:145,ellipsis:!0,align:"left",render:function(e,t){return 0===e?"0次":b.a.createElement("a",{target:"_blank",href:"/classrooms/".concat(Me.coursesId,"/exercise/").concat(Me.categoryId,"/abnormal?userid=").concat(null==t?void 0:t.exercise_user_id)},e+"次"||!1)}},{title:"最终成绩",width:100,dataIndex:"score",align:"center",sorter:!0,render:function(e,t){return!t.open_total_score&&Object($.s)()?"老师审核中":100===(e="number"==typeof e?Number(e):e)?b.a.createElement("span",{className:"c-green"},e||"--"):e>60?b.a.createElement("span",{className:"c-orange"},e||"--"):b.a.createElement("span",null,e||"--")}},!(1!==(null==Be||null===(i=Be.exercise_types)||void 0===i?void 0:i.objective)||1===(null==Be||null===(o=Be.exercise_types)||void 0===o?void 0:o.objective)&&1!==(null==Be||null===(l=Be.exercise_types)||void 0===l?void 0:l.subjective))&&{title:"客观题得分",dataIndex:"objective_score",align:"center",width:100,render:function(e,t){return!t.open_total_score&&Object($.s)()?"老师审核中":(n=(e="number"==typeof e?Number(e):e)>=0&&e<=60?b.a.createElement("span",null,e):100===e?b.a.createElement("span",{className:"c-green"},e):e>60?b.a.createElement("span",{className:"c-orange"},e):"--",b.a.createElement(ne,{renderText:n,item:t}));var n}},!(1!==(null==Be||null===(m=Be.exercise_types)||void 0===m?void 0:m.subjective)||1===(null==Be||null===(k=Be.exercise_types)||void 0===k?void 0:k.subjective)&&1!==(null==Be||null===(w=Be.exercise_types)||void 0===w?void 0:w.objective))&&{title:"问答题得分",width:100,dataIndex:"subjective_score",align:"center",render:function(e,t){return!t.open_total_score&&Object($.s)()?"老师审核中":0===(e="number"==typeof e?Number(e):e)?b.a.createElement("span",null,e," ",b.a.createElement("span",{className:"c-red"}," (待评审)")):e>0&&e<=60?b.a.createElement("span",null,e):100===e?b.a.createElement("span",{className:"c-green"},e):e>60?b.a.createElement("span",{className:"c-orange"},e):"--"}},{title:"提交状态",dataIndex:"commit_status",width:130,align:"left",render:function(e,t){return 0===e?b.a.createElement("span",{style:{color:"#666666"}},"未开始"):1===e?b.a.createElement("span",{style:{color:"#DF3042"}},!t.is_make_up&&"进行中",t.is_make_up&&"进行中 (补考)"):2===e?b.a.createElement("span",{style:{color:"#5AB891"}},!t.is_make_up&&"已完成",t.is_make_up&&"已完成 (补考)"):b.a.createElement("span",{style:{color:"#5AB891"}},!t.is_make_up&&"已提交(未答)",t.is_make_up&&"已提交/未答(补考)")}},{title:"开始答题时间",dataIndex:"start_at",width:145,ellipsis:!0,align:"left",sorter:!0,render:function(e){return e?z()(e).format("YYYY-MM-DD HH:mm"):"--"}},{title:"提交时间",dataIndex:"end_at",width:145,ellipsis:!0,align:"left",sorter:!0,render:function(e){return e?z()(e).format("YYYY-MM-DD HH:mm"):"--"}},(null==Fe?void 0:Fe.screen_open)&&{title:b.a.createElement("span",null,"切屏次数 ",b.a.createElement(B.a,{title:"红色代表学生切屏超过规定次数被强制交卷"},b.a.createElement("span",{className:"icon-xiaowenhao"}))),dataIndex:"screen_used_num",width:145,ellipsis:!0,align:"center",render:function(e,t){return b.a.createElement("span",{className:e>(null==t?void 0:t.screen_total_num)&&"c-red"},e,"/",null==t?void 0:t.screen_total_num)}},(null==Fe?void 0:Fe.exercise_status)>1&&(null==Fe?void 0:Fe.open_camera)&&Object($.c)()&&!(null!==(C=Te.setting)&&void 0!==C&&C.is_local)&&{title:"作业与测验照片",dataIndex:"photo_count",align:"center",width:100,render:function(e,t){return t.commit_status>0?b.a.createElement("a",{onClick:function(){!function(e){Ut.apply(this,arguments)}(t)}},"".concat(e||0,"/").concat(null==Fe?void 0:Fe.photo_count)):"--"}},(null==Fe?void 0:Fe.ip_bind)&&Object($.e)()&&{title:"作业与测验IP",dataIndex:"last_ip",align:"center",width:100,render:function(e,t){return b.a.createElement(b.a.Fragment,null,e||"--",1===t.commit_status&&Fe.ip_bind&&t.last_ip&&b.a.createElement(a.a,{type:"link",onClick:Object(c.a)(g.a.mark((function e(){var n;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=u.a.confirm({title:b.a.createElement(M.a,null,b.a.createElement(P.a,{flex:"1"},"解除绑定"),b.a.createElement(P.a,null,b.a.createElement("span",{className:"iconfont icon-yiguanbi1 current c-grey-c",onClick:function(){return n.destroy()}}))),width:500,icon:null,okText:"确定",cancelText:"取消",className:"custom-modal-divider",content:b.a.createElement("div",null,"为学生解除作业与测验IP绑定后,学生可以使用新的IP地址进入作业与测验。",b.a.createElement("span",{className:"c-red"},"如果该学生正在进行中,将无法作答,需要重新进入作业与测验。"),"您确定要解除该学生的作业与测验IP绑定?"),onOk:function(){var e=Object(c.a)(g.a.mark((function e(){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(S.ab)({id:Me.categoryId,exercise_user_id:t.exercise_user_id});case 2:0===e.sent.status&&(s.b.success("解绑成功"),Ae({type:"exercise/getExerciseList",payload:Me}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 1:case"end":return e.stop()}}),e)})))},"解绑"))}},(null==Fe?void 0:Fe.open_camera)&&Object($.e)()&&Fe.exercise_status<3&&!(null!==(A=Te.setting)&&void 0!==A&&A.is_local)&&{title:"允许不拍摄",dataIndex:"close_camera",align:"center",width:100,render:function(e,t){return b.a.createElement(j.a,{checked:e,onClick:Object(c.a)(g.a.mark((function n(){return g.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:e?u.a.info({title:"提示",content:b.a.createElement("div",null,"不允许修改"),okText:"确认"}):u.a.confirm({title:"允许不摄像警告",content:b.a.createElement("div",null,"为保证作业与测验公平,本次作业与测验已开启防作弊设置,这需要调用学生的摄像头。如学生硬件设施确有问题,为保证学生作业与测验权利,教师可临时取消限制,允许学生参考。 本操作不可撤回,不可修改。 您确认同意该学生不开启摄像头参加作业与测验吗?"),onOk:function(){var e=Object(c.a)(g.a.mark((function e(){var n;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(S.c)(Object(h.a)(Object(h.a)({},Me),{},{exercise_user_id:t.exercise_user_id}));case 2:0===(null==(n=e.sent)?void 0:n.status)&&(s.b.success("操作成功"),Ae({type:"exercise/getExerciseList",payload:Object(h.a)({},Me)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 1:case"end":return n.stop()}}),n)})))})}},Object($.c)()&&{title:"评阅状态",width:130,dataIndex:"has_comment",align:"center",render:function(e,t){return!e&&t.review_status?"评阅中":e?"已评阅":"未评阅"}},((null==Fe?void 0:Fe.assistant_auth)||Object($.c)()||Object($.s)())&&Ie&&{title:"操作",fixed:"right",dataInex:"action",align:"center",width:236,render:function(e,t){return b.a.createElement("div",null,Object($.c)()&&b.a.createElement(a.a,{ghost:!0,type:"primary",size:"small",disabled:t.commit_status<2},b.a.createElement("a",{className:t.commit_status>1?"c-blue":"c-black",href:t.commit_status>1&&"/classrooms/".concat(Me.coursesId,"/exercise/").concat(Me.categoryId,"/review/").concat(t.login),onClick:function(e){t.commit_status<2&&e.preventDefault(),3===t.commit_status&&(e.preventDefault(),Ae({type:"exercise/setActionTabs",payload:{key:"更改评阅",selectArrs:{record:Object(h.a)({},t),exercise_types:Object(h.a)({},null==Be?void 0:Be.exercise_types)},params:Object(h.a)({},Me)}}))}},t.has_comment&&"更改评阅",!t.has_comment&&"评阅")),!Object($.s)()&&["考试中"].includes(O.c[Fe.exercise_status])&&b.a.createElement(a.a,{ghost:!0,type:"primary",disabled:(null==t?void 0:t.commit_status)>1,className:"ml10",size:"small",onClick:function(){u.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",icon:null,className:"custom-modal-divider",content:"确认将该学生的作业与测验状态调整为已交卷吗?",onOk:function(){var e;u.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",icon:null,className:"custom-modal-divider",content:"确认将".concat(null==t?void 0:t.user_name,"的作业与测验状态调整为已交卷吗?"),onOk:(e=Object(c.a)(g.a.mark((function e(){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(y.a)("/api/exercises/".concat(Me.categoryId,"/commit_exercise_force.json"),{method:"post",body:{user_id:null==t?void 0:t.user_id}});case 2:0===e.sent.status&&Ae({type:"exercise/getExerciseList",payload:Me});case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})}})}},"强制提交"),Object($.s)()&&t.commit_status>1&&b.a.createElement("span",{style:{color:"#0152d9",marginRight:"5px",cursor:"pointer"},onClick:function(){var e;null!=Be&&null!==(e=Be.exercise_types)&&void 0!==e&&e.answered_open?_.d.push("/classrooms/".concat(Me.coursesId,"/exercise/").concat(Me.categoryId,"/users/").concat(null==t?void 0:t.login,"?check=true")):s.b.info("老师已设置本作业与测验在交卷后不可查看")}},"查看"),(null==Fe?void 0:Fe.exercise_time)>0&&Object($.e)()&&b.a.createElement(B.a,{title:Object($.k)()?"您的权限不足,请联系本课堂管理员":3===Fe.exercise_status&&"本作业与测验已截止,请先修改截止时间使本作业与测验处于“进行中”"},b.a.createElement(a.a,{danger:!0,className:"c-red ml10",size:"small",disabled:!!Object($.k)()||3===Fe.exercise_status,onClick:function(){Object($.i)()&&Ae({type:"exercise/setActionTabs",payload:{key:"延时",selectArrs:t,exercise_time:Fe.exercise_time,params:Object(h.a)({},Me)}})}},"延时")))}}].filter((function(e){return!!e})),zt=Object(d.a)(Ht);return zt[0]=Object(h.a)({},zt[0]),zt[(null==zt?void 0:zt.length)-1]=Object(h.a)({},zt[(null==zt?void 0:zt.length)-1]),zt[0].render=function(){return"我"},zt[(null==zt?void 0:zt.length)-1].render=function(){var e;return null!=Be&&null!==(e=Be.current_answer_user)&&void 0!==e&&e.login?b.a.createElement("span",{style:{color:"#0152d9",marginRight:"5px",cursor:"pointer"},onClick:function(){var e,t;null!=Be&&null!==(e=Be.exercise_types)&&void 0!==e&&e.answered_open?_.d.push("/classrooms/".concat(Me.coursesId,"/exercise/").concat(Me.categoryId,"/users/").concat(null==Be||null===(t=Be.current_answer_user)||void 0===t?void 0:t.login)):s.b.info("老师已设置本作业与测验在交卷后不可查看")}},"查看"):"--"},b.a.createElement("section",{className:"minH500 bg-white mb50 inline-block w100"},(null==Be||null===(H=Be.exercise_types)||void 0===H?void 0:H.score_open)&&Object($.s)()&&b.a.createElement(N.a,{hideOnSinglePage:!0,pagination:!1,showHeader:!1,dataSource:[Object(h.a)({},null==Be?void 0:Be.current_answer_user)],columns:zt,scroll:{x:120*(null==Ht?void 0:Ht.length)}}),!Object($.c)()&&b.a.createElement("div",{className:"bg-white pt10 pl25 mt15"},!(null==Be||null===(Q=Be.exercise_types)||void 0===Q||!Q.answer_users)&&b.a.createElement("span",{className:"mr10"},b.a.createElement("span",{style:{color:"#FF954C"}},null==Be||null===(ee=Be.exercise_types)||void 0===ee?void 0:ee.answer_users," "),"已交"),!(null==Be||null===(re=Be.exercise_types)||void 0===re||!re.unanswer_users)&&b.a.createElement("span",{className:"mr10"},null==Be||null===(ie=Be.exercise_types)||void 0===ie?void 0:ie.unanswer_users,"未交"),"--"!==(null==Be||null===(ae=Be.exercise_types)||void 0===ae?void 0:ae.exercise_end_time)&&b.a.createElement("span",null,"剩余提交时间:",b.a.createElement("span",{style:{color:"#FF954C"}},null==Be||null===(oe=Be.exercise_types)||void 0===oe?void 0:oe.exercise_end_time))),!(null!==(se=Be.exercise_types)&&void 0!==se&&se.exercise_all_users)&&!Object($.s)()&&b.a.createElement(Y.a,null),(!(null===(le=Be.exercise_types)||void 0===le||!le.exercise_all_users)||Object($.s)())&&b.a.createElement("aside",null,Object($.c)()&&b.a.createElement("aside",{className:"pt20"},b.a.createElement(U.a,{form:vt,onValuesChange:function(e){Me.page=1;var t=Object.assign({},vt.getFieldValue());if(Object.keys(t).map((function(e){"objective_score_gte"!==e&&"objective_score_lte"!==e&&(t[e].includes("all")?(delete Me[e],vt.setFieldsValue(Object(F.a)({},e,"all"))):(Me[e]=t[e],""!=t[e]&&t[e]?vt.setFieldsValue(Object(F.a)({},e,Me[e])):vt.setFieldsValue(Object(F.a)({},e,"all"))))})),e.objective_score_gte||e.objective_score_lte){if(t.objective_score_gte>t.objective_score_lte)return vt.setFieldsValue({objective_score_lte:t.objective_score_gte}),!1;if(""==t.objective_score_gte||""==t.objective_score_lte||!t.objective_score_gte||!t.objective_score_lte)return delete Me.objective_score_lte,delete Me.objective_score_gte,!1;Me.objective_score_lte=t.objective_score_lte,Me.objective_score_gte=t.objective_score_gte}Pe(Object(h.a)({},Me)),De(Object(h.a)({},Me)),Ae({type:"exercise/getExerciseList",payload:Me})},initialValues:(ce={},Object(F.a)(ce,"commit_status","all"),Object(F.a)(ce,"exercise_group_id","all"),Object(F.a)(ce,"review","all"),Object(F.a)(ce,"is_make_up","all"),ce)},b.a.createElement(U.a.Item,{name:"exercise_group_id"},b.a.createElement(R.a.Group,{style:{width:"100%"}},b.a.createElement(M.a,null,b.a.createElement(P.a,{flex:"80px"},"选择班级:"),b.a.createElement(P.a,{flex:"80px"},b.a.createElement(R.a,{value:"all",checked:!(null!==(ue=ze.course_group)&&void 0!==ue&&ue.length)},"全部")),b.a.createElement(P.a,{flex:"1"},Be.course_groups&&Be.course_groups.map((function(e,t){return b.a.createElement(R.a,{value:e.exercise_group_id,className:"ml0 mr8"},e.exercise_group_name,"(",e.exercise_group_students,")")})))))),b.a.createElement(U.a.Item,{name:"commit_status"},b.a.createElement(R.a.Group,{value:[],style:{width:"100%"}},b.a.createElement(M.a,null,b.a.createElement(P.a,{flex:"80px"},"提交状态:"),b.a.createElement(P.a,{flex:"80px"},b.a.createElement(R.a,{value:"all",checked:!(null!==(de=ze.commit_status)&&void 0!==de&&de.length)},"全部")),b.a.createElement(P.a,{flex:"1"},K.map((function(e,t){var n;return b.a.createElement(R.a,{name:"commit_status",value:e.id},e.name,"(",null==Be||null===(n=Be.exercise_types)||void 0===n?void 0:n[e.type],")")})))))),b.a.createElement(U.a.Item,{name:"review"},b.a.createElement(R.a.Group,{style:{width:"100%"}},b.a.createElement(M.a,null,b.a.createElement(P.a,{flex:"80px"},"评阅状态:"),b.a.createElement(P.a,{flex:"80px"},b.a.createElement(R.a,{value:"all",checked:!(null!==(he=ze.review)&&void 0!==he&&he.length)},"全部")),b.a.createElement(P.a,{flex:"1"},null==W?void 0:W.map((function(e,t){var n;return b.a.createElement(R.a,{value:e.id,key:t},e.name,"(",null==Be||null===(n=Be.exercise_types)||void 0===n?void 0:n[e.type],")")})))))),(null==Be||null===(fe=Be.exercise_types)||void 0===fe?void 0:fe.open_make_up)&&b.a.createElement(U.a.Item,{name:"is_make_up"},b.a.createElement(R.a.Group,{value:[],style:{width:"100%"}},b.a.createElement(M.a,null,b.a.createElement(P.a,{flex:"80px"},"补考状态:"),b.a.createElement(P.a,{flex:"80px"},b.a.createElement(R.a,{value:"all",checked:!(null!==(pe=ze.is_make_up)&&void 0!==pe&&pe.length)},"全部")),b.a.createElement(P.a,{flex:"1"},q.map((function(e,t){var n;return b.a.createElement(R.a,{name:"is_make_up",value:e.id},e.name,"(",null==Be||null===(n=Be.exercise_types)||void 0===n?void 0:n[e.type],")")})))))),b.a.createElement(M.a,{align:"middle"},b.a.createElement(P.a,{flex:"1"},b.a.createElement(M.a,{align:"middle"},b.a.createElement(P.a,null,b.a.createElement(L.a.Search,{allowClear:!0,placeholder:"请输入姓名或者学号搜索",onSearch:function(e){Me.search=e,Ae({type:"exercise/getExerciseList",payload:Object(h.a)(Object(h.a)({},Me),{},{page:1})})},style:{width:240}})))),!(null!=Fe&&Fe.is_random)&&b.a.createElement(P.a,{className:["tr",te.a.rightFilter].join(" ")},1===(null===(me=Be.exercise_types)||void 0===me?void 0:me.objective)&&1===(null===(ge=Be.exercise_types)||void 0===ge?void 0:ge.subjective)&&b.a.createElement(b.a.Fragment,null,"按客观题得分分组",b.a.createElement("span",null,b.a.createElement(U.a.Item,{name:"objective_score_gte"},b.a.createElement(D.a,{min:0,max:null==Be||null===(ve=Be.exercise_types)||void 0===ve?void 0:ve.objective_score,placeholder:"最低"}))),b.a.createElement("span",null,b.a.createElement(U.a.Item,{name:"objective_score_lte"},b.a.createElement(D.a,{min:(null===(be=Me)||void 0===be?void 0:be.objective_score_gte)||0,max:null==Be||null===(ye=Be.exercise_types)||void 0===ye?void 0:ye.objective_score,placeholder:"最高"})))),1===(null===(Ee=Be.exercise_types)||void 0===Ee?void 0:Ee.subjective)&&Ie&&b.a.createElement(b.a.Fragment,null,b.a.createElement(a.a,{type:"default",disabled:(null==Be||null===(xe=Be.total_exercise_users)||void 0===xe?void 0:xe.length)<1},b.a.createElement(x.a,{target:"_blank",to:"/classrooms/".concat(Me.coursesId,"/exercise/").concat(Me.categoryId,"/abnormal")},b.a.createElement("span",{className:"iconfont icon-filesync3x"}),b.a.createElement("span",null,"学生异常行为"))),b.a.createElement(a.a,{type:"default",disabled:(null==Be||null===(_e=Be.total_exercise_users)||void 0===_e?void 0:_e.length)<1},b.a.createElement(x.a,{to:"/classrooms/".concat(Me.coursesId,"/exercise/").concat(Me.categoryId,"/reviews/group")},b.a.createElement("span",{className:"iconfont icon-tijiaozongjie"}),b.a.createElement("span",null,"集中批量批阅"))),b.a.createElement(a.a,{type:"default",disabled:(null==Be||null===(ke=Be.total_exercise_users)||void 0===ke?void 0:ke.length)<1},b.a.createElement(x.a,{to:"/classrooms/".concat(Me.coursesId,"/exercise/").concat(Me.categoryId,"/review/").concat(null==Be||null===(we=Be.total_exercise_users)||void 0===we||null===(Ce=we[0])||void 0===Ce?void 0:Ce.user_login)},b.a.createElement("span",{className:"iconfont icon-filesync3x"}),b.a.createElement("span",null,"组内顺序批阅")))))))),b.a.createElement(N.a,{className:"mt30",loading:Oe["exercise/getExerciseList"],hideOnSinglePage:!0,pagination:!1,dataSource:(null==Be?void 0:Be.exercise_users)||[],columns:Ht,scroll:{x:120*(null==Ht?void 0:Ht.length)},size:"large",onChange:function(e,t,n){Me.page=1,console.log(n,444),void 0===n.order?(Me.order_type=null,Me.order=null):(Me.order_type="descend"===n.order?"desc":"asc",Me.order=n.field),Ae({type:"exercise/getExerciseList",payload:Object(h.a)({},Me)})}}),qe>20&&b.a.createElement("aside",{className:"tc mb50 pb30 mt30"},b.a.createElement(I.a,{onChange:function(e,t){Me.page=e,Me.limit=20,Ae({type:"exercise/getExerciseList",payload:Object(h.a)({},Me)})},current:Me.page||1,defaultPageSize:20,total:qe,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,showTotal:function(e){return b.a.createElement("span",{className:"mr10"},"共",b.a.createElement("span",{className:"c-orange"},e),"条数据")}}))),b.a.createElement(V,null),b.a.createElement(G,null),b.a.createElement(J,null),$e&&b.a.createElement(u.a,{title:"防作弊头像",visible:$e,centered:!0,onCancel:function(){Ot(1),et(!1),xt([]),it("alert"),Dt("")},footer:b.a.createElement("div",{style:{display:"flex"}},b.a.createElement("div",{style:{flex:1,textAlign:"left"}}," ",b.a.createElement(a.a,{onClick:Object(c.a)(g.a.mark((function e(){var t;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(It){e.next=3;break}return s.b.info("输入框内容不能为空"),e.abrupt("return");case 3:return mt(!0),e.next=6,Object(y.a)("/api/exercises/".concat(Me.categoryId,"/send_alert.json"),{method:"post",body:{content:It,clazz:rt,exercise_user_id:Nt}});case 6:0===(null==(t=e.sent)?void 0:t.status)&&(s.b.info("发送成功"),Ot(1),et(!1),xt([]),it("alert"),Dt("")),mt(!1);case 9:case"end":return e.stop()}}),e)}))),disabled:Bt,loading:pt},"发送")),b.a.createElement(a.a,{disabled:0===(null==Et?void 0:Et.length),style:{marginRight:"10px"},onClick:Object(c.a)(g.a.mark((function e(){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ot(St-1==0?null==Et?void 0:Et.length:St-1);case 2:case"end":return e.stop()}}),e)})))},"上一张"),b.a.createElement(a.a,{disabled:0===(null==Et?void 0:Et.length),type:"primary",onClick:Object(c.a)(g.a.mark((function e(){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ot(St===(null==Et?void 0:Et.length)?1:St+1);case 2:case"end":return e.stop()}}),e)})))},"下一张"))},b.a.createElement("img",{style:{width:"234px !important",height:"132px",borderRadius:"5px"},src:Et[St-1]}),b.a.createElement("span",{onClick:function(){Z.a.publish("preview-image",Et[St-1]),console.log("src:",Et[St-1],Et,St-1)},style:{background:"#0152d9",color:"#fff",display:"inline-flex",width:"54px",height:"20px",borderRadius:"10px",justifyContent:"center",lineHeight:"20px",alignItems:"center",position:"absolute",top:"70px",left:"190px",zIndex:5,cursor:"pointer"}},"预览"),b.a.createElement("span",{style:{color:"#0152d9",marginTop:"16px",width:"234px",justifyContent:"center",display:"flex"}},St+"/"+(null==Et?void 0:Et.length)),b.a.createElement(T.a,{className:"mt20",checked:"alert"===rt,onChange:function(){return it("alert")}},"发送警告",b.a.createElement("span",{className:"font14 c-grey-999"},"(如发现学生在进行中的照片存在异常时,可发送消息给学生)")),b.a.createElement(T.a,{className:"mt10",checked:"notice"===rt,onChange:function(){return it("notice")}},"发送通知",b.a.createElement("span",{className:"font14 c-grey-999"},"(进行中如有消息通知,可发送消息给学生)")),b.a.createElement(L.a.TextArea,{className:"mt20",value:It,onChange:function(e){return Dt(e.target.value)},placeholder:"请输入".concat("alert"===rt?"警告":"通知","内容").concat("alert"===rt?",如:扭头低头大幅度动作检测":"")}),b.a.createElement("div",{style:{color:"#E30000",fontSize:12,margin:"10px 0"}},"已发送",st,"次警告")),b.a.createElement(X.a,null))})),ie=(n("OaEy"),n("2fM7")),ae=n("8Skl"),oe=n("y3Kf"),se=n("mxOx"),le=n.n(se),ce=n("LvDl"),ue=n.n(ce),de=n("GUcZ"),he=(n("ulZh"),/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i),fe=Object(v.forwardRef)((function(e,t){var n,r,i,a=e.src,o=(e.videoId,e.logWatchHistory,e.courseId,e.startTime,e.handlePause,e.handlePlay,e.handlePlayEnded,e.videoSpeed,"flv"===(null===(r=a=null===(n=a)||void 0===n?void 0:n.replace("http://","https://"))||void 0===r||null===(i=r.split("."))||void 0===i?void 0:i.pop())),s=Object(v.useRef)(),l=Object(v.useRef)(),c=Object(v.useRef)(0),u=Object(v.useRef)(0),d=Object(v.useState)(0),h=Object(f.a)(d,2),p=h[0],m=h[1],g=navigator.userAgent.toLowerCase().match(he);g&&g[0];Object(v.useImperativeHandle)(t,(function(){return{getLastUpdatedTime:function(){return s.current.currentTime},getDuration:function(){return s.current.duration}}})),Object(v.useEffect)((function(){u.current=void 0;try{var e;de.a.isSupported&&o&&a&&(null===(e=a)||void 0===e?void 0:e.indexOf(".m3u8"))<0?(u.current=de.a.createPlayer({type:"flv",volume:.8,cors:!0,url:a+"?t="+Date.now(),muted:!1,isLive:!0}),u.current.on("play",(function(){console.log(21111)})),s.current&&(u.current.detachMediaElement(s.current),u.current.attachMediaElement(s.current),u.current.load(),u.current.play())):s.current.setAttribute("src",a+"?t="+Date.now())}catch(e){setTimeout((function(){m(p+1)}),1e3)}return console.log("src:",a),function(){var e,t,n,r,i,a,o,l;u.current&&(null===(e=u.current)||void 0===e||null===(t=e.unload)||void 0===t||t.call(e),null===(n=u.current)||void 0===n||null===(r=n.pause)||void 0===r||r.call(n),null===(i=u.current)||void 0===i||null===(a=i.destroy)||void 0===a||a.call(i),null===(o=u.current)||void 0===o||null===(l=o.detachMediaElement)||void 0===l||l.call(o,s.current),u.current=void 0,s.current.src="")}}),[s,o,a,p]),Object(v.useEffect)((function(){return l.current=setInterval((function(){c.current>0&&c.current===s.current.currentTime&&(console.log("播放一次"),m(p+1)),c.current=s.current.currentTime}),3e3),function(){clearInterval(l.current)}}),[]);return b.a.createElement("video",{ref:s,onerr:!0,onErrorCapture:function(){m(p+1)},autoPlay:!0,muted:!0})})),pe=Object(_.a)((function(e){return{exercise:e.exercise,user:e.user}}))((function(e){var t,n=e.exercise,r=e.dispatch,i=(e.user,Object(E.i)()),a=Object(v.useState)({page:1,limit:20,sort_by:null,sort_direction:null,state:null,audit:null,name:"",save_name:"",exercise_id:null==i?void 0:i.categoryId}),o=Object(f.a)(a,2),l=o[0],d=o[1],p=U.a.useForm(),m=Object(f.a)(p,1)[0],x=Object(v.useState)(),_=Object(f.a)(x,2),k=_[0],w=_[1],C=Object(v.useState)(!1),S=Object(f.a)(C,2),A=S[0],T=S[1],I=n.exerciseList,D=n.commonHeader,j=Object(v.useState)([]),H=Object(f.a)(j,2),z=H[0],G=H[1],V=Object(v.useState)([]),W=Object(f.a)(V,2),K=W[0],q=W[1],Y=Object(v.useState)(0),Q=Object(f.a)(Y,2),J=Q[0],$=Q[1],ee=Object(v.useState)(!0),te=Object(f.a)(ee,2),ne=te[0],re=te[1],se=Object(v.useState)(!1),ce=Object(f.a)(se,2),de=ce[0],he=ce[1],pe=Object(v.useRef)(null);Object(v.useEffect)((function(){ge(),ve(l)}),[]),Object(v.useEffect)((function(){return clearInterval(pe.current),2===(null==D?void 0:D.exercise_status)&&(pe.current=setInterval((function(){ve(l)}),3e4)),function(){clearInterval(pe.current)}}),[null==D?void 0:D.exercise_status,l]);var ge=function(){r({type:"exercise/getExerciseList",payload:i})},ve=function(){var e=Object(c.a)(g.a.mark((function e(t){var n,r;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=ue.a.cloneDeep(t),console.log(n,"sendData"),re(!0),G([]),e.next=6,Object(y.a)("/api/exercises/".concat(null==t?void 0:t.exercise_id,"/exercise_identity_photos.json"),{method:"get",params:n});case 6:r=e.sent,q([]),re(!1),$(null==r?void 0:r.count),G((null==r?void 0:r.exercise_users)||[]);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),be=function(e,t){l.page=1,l[t]=e,d(Object(h.a)({},l)),ve(l)};Object(v.useEffect)((function(){document.getElementById("divhe")&&(document.getElementById("divhe").scrollHeight>47&&(w(47),T(!0)))}),[document.getElementById("divhe"),I]);var ye=[{title:"序号",dataIndex:"number",width:80,render:function(e,t,n){return l.limit*(l.page-1)+n+1}},{title:"姓名",dataIndex:"user_name",width:110,ellipsis:{showTitle:!1},render:function(e){return b.a.createElement(B.a,{placement:"bottomLeft",title:e},b.a.createElement("span",null,e))}},{title:"学号",dataIndex:"student_id",sorter:!0,width:140,showSorterTooltip:!1,ellipsis:{showTitle:!1},render:function(e){return b.a.createElement(B.a,{placement:"bottomLeft",title:e||"--"},b.a.createElement("span",null,e||"--"))}},{title:"分班",dataIndex:"user_group_name",ellipsis:{showTitle:!1},render:function(e,t){return e?b.a.createElement(B.a,{placement:"bottom",title:e},b.a.createElement("span",{className:le.a.es},e)):"--"}},{title:"人脸照片",dataIndex:"photo_url",width:90,ellipsis:{showTitle:!1},render:function(e,t){return b.a.createElement("img",{width:40,style:{maxHeight:30},src:e,className:"current",onClick:function(){_e(t)}})}},{title:"审核状态",width:100,dataIndex:"exercise_identity_photo_state",ellipsis:{showTitle:!1},render:function(e,t){return b.a.createElement(b.a.Fragment,null,"passed"===e&&b.a.createElement("span",{style:{color:"#44D7B6"}},"审核通过"),"rejected"===e&&b.a.createElement("span",{style:{color:"#E53333"}},"审核不通过"),"submitted"===e&&b.a.createElement("span",{style:{color:"#666666"}},"待审核"))}},{title:"审核时间",dataIndex:"audit_time",width:180,ellipsis:{showTitle:!1},render:function(e){return b.a.createElement("span",null,e||"--")}},{title:"审核类型",dataIndex:"audit_clazz",width:90,ellipsis:{showTitle:!1},render:function(e){return b.a.createElement("span",null,e||"--")}},{title:"操作",dataIndex:"action",width:180,ellipsis:{showTitle:!1},render:function(e,t){var n;return b.a.createElement(b.a.Fragment,null,"submitted"===(null==t?void 0:t.exercise_identity_photo_state)?b.a.createElement("span",{className:"c-light-primary current",onClick:function(){return he(t)}},"审核"):b.a.createElement("span",{className:"c-grey-999 cursorNotAllowed"},"审核"),"submitted"!==(null==t?void 0:t.exercise_identity_photo_state)?b.a.createElement("span",{className:"c-light-primary current ml10 mr10",onClick:function(){return Ee(t)}},"审核记录"):b.a.createElement("span",{className:"c-grey-999 ml10 mr10 cursorNotAllowed"},"审核记录"),"passed"===(null==t?void 0:t.exercise_identity_photo_state)&&null!=t&&null!==(n=t.play_url)&&void 0!==n&&n.length?b.a.createElement("span",{className:"c-light-primary current",onClick:function(){return xe(t)}},"摄像监控"):b.a.createElement("span",{className:"c-grey-999 cursorNotAllowed"},"摄像监控"))}}],Ee=function(e){var t=[{title:"审核时间",dataIndex:"audit_time",width:170,render:function(e,t){return b.a.createElement("span",null,e||"--")}},{title:"审核状态",dataIndex:"exercise_identity_photo_state",width:110,render:function(e,t){return b.a.createElement(b.a.Fragment,null,"passed"===e&&b.a.createElement("span",{style:{color:"#44D7B6"}},"审核通过"),"rejected"===e&&b.a.createElement("span",{style:{color:"#E53333"}},"审核不通过"),"submitted"===e&&b.a.createElement("span",{style:{color:"#666666"}},"待审核"))}},{title:"审核意见",dataIndex:"comment",render:function(e,t){return e?b.a.createElement(B.a,{placement:"bottom",title:e},b.a.createElement("span",null,e)):"--"}},{title:"采集照片",dataIndex:"photo_url",width:90,render:function(e,t){return b.a.createElement("span",{className:"current c-light-primary",onClick:function(){Z.a.publish("preview-image",e)}},"查看")}}],n=u.a.confirm({icon:null,width:700,className:"".concat(le.a.cusModal," custom-modal-divider"),centered:!0,title:b.a.createElement(M.a,null,b.a.createElement(P.a,{flex:"1"},"审核记录"),b.a.createElement(P.a,null,b.a.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:function(){return n.destroy()}}))),content:b.a.createElement("div",null,b.a.createElement(N.a,{className:le.a.customTable,dataSource:[Object(h.a)({},e)],bordered:!1,columns:t,rowKey:"exercise_identity_photo_id",rowClassName:le.a.row,pagination:!1}))})},xe=function(e){var t,n,r=u.a.confirm({icon:null,className:"".concat(le.a.cusModal," custom-modal-divider"),centered:!0,width:(null==e||null===(t=e.play_url)||void 0===t?void 0:t.length)<6?724:744,title:b.a.createElement(M.a,null,b.a.createElement(P.a,{flex:"1"},"视频"),b.a.createElement(P.a,null,b.a.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:function(){return r.destroy()}}))),content:b.a.createElement("ul",{className:le.a.sys},null==e||null===(n=e.play_url)||void 0===n?void 0:n.map((function(e,t){return b.a.createElement("li",{className:le.a.li,key:t},b.a.createElement("div",{className:le.a.d1},b.a.createElement("div",{className:le.a.img},b.a.createElement(fe,{src:null==e?void 0:e.replace(".m3u8",".flv"),autoPlay:!0})),b.a.createElement("div",{className:le.a.btn},b.a.createElement("div",{className:le.a.b1},"回放视频",t+1))))})))})},_e=function(e){var t=u.a.confirm({icon:null,className:"".concat(le.a.cusModal," custom-modal-divider"),centered:!0,width:710,title:b.a.createElement(M.a,null,b.a.createElement(P.a,{flex:"1"},"人脸照片"),b.a.createElement(P.a,null,b.a.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:function(){return t.destroy()}}))),content:b.a.createElement(M.a,null,b.a.createElement("aside",{className:le.a.imgWrap,style:{marginBottom:40}},b.a.createElement("div",{className:le.a.img},b.a.createElement("img",{width:326,src:Object(O.g)(null==e?void 0:e.photo_url)}),b.a.createElement("div",{className:le.a.textP},"采集照片")),b.a.createElement("div",{className:le.a.img,style:{marginLeft:20}},null!=e&&e.identity_url?b.a.createElement("img",{width:326,src:Object(O.g)(null==e?void 0:e.identity_url)}):b.a.createElement("div",{className:le.a.no,style:{width:326}},b.a.createElement("span",null,"暂无证件照片")),b.a.createElement("div",{className:le.a.textP},"证件照片"))))})},ke={selectedRowKeys:K,columnWidth:40,onChange:function(e){q(e)},getCheckboxProps:function(e){return{disabled:!("passed"!==(null==e?void 0:e.exercise_identity_photo_state))}}};return b.a.createElement("section",{className:le.a.wrap},b.a.createElement(U.a,{form:m,onChange:function(){l.page=1;var e=Object.assign({},m.getFieldsValue());Object.keys(e).map((function(t){switch(t){case"exercise_group_id":e[t].includes("all")||!e[t].length?(delete l.course_group,m.setFieldsValue(Object(F.a)({},"exercise_group_id","all"))):(l.course_group=e[t],m.setFieldsValue(Object(F.a)({},"exercise_group_id",l.course_group)))}})),d(Object(h.a)({},l)),ve(l)},initialValues:Object(F.a)({},"exercise_group_id","all")},b.a.createElement(U.a.Item,{name:"exercise_group_id"},b.a.createElement(R.a.Group,{style:{width:"100%"}},b.a.createElement(M.a,null,b.a.createElement(P.a,{className:"font14",flex:"80px"},"选择分班:"),b.a.createElement(P.a,{flex:"80px"},b.a.createElement(R.a,{value:"all"},"全部")),b.a.createElement(P.a,{flex:"1",id:"divhe",style:{height:k+"px",overflow:"hidden"}},null===(t=I.course_groups)||void 0===t?void 0:t.map((function(e,t){return b.a.createElement(R.a,{key:t,value:e.exercise_group_id,className:"ml0 mr8"},e.exercise_group_name,"(",e.exercise_group_students,")")}))),A&&b.a.createElement("span",{onClick:function(){var e=document.getElementById("divhe").scrollHeight;w(k>47?47:e)},style:{color:"rgb(76, 172, 255)",cursor:"pointer",alignItems:"flex-end",display:"flex"}},47===k?"展开":"收起",47===k?b.a.createElement(ae.a,{style:{marginBottom:"3px",marginLeft:"2px"}}):b.a.createElement(oe.a,{style:{marginBottom:"3px",marginLeft:"2px"}})))))),b.a.createElement("div",{className:le.a.control},b.a.createElement(L.a.Search,{placeholder:"请输入姓名或者学号搜索",value:null==l?void 0:l.save_name,onChange:function(e){return t=e.target.value,l.page=1,l.save_name=t,void d(Object(h.a)({},l));var t},onSearch:function(){l.page=1,l.name=l.save_name,d(Object(h.a)({},l)),ve(l)}}),b.a.createElement(ie.a,{placeholder:"请选择审核状态",value:null==l?void 0:l.state,onChange:function(e){return be(e,"state")}},b.a.createElement(ie.a.Option,{value:null},"全部"),b.a.createElement(ie.a.Option,{value:"submitted"},"待审核"),b.a.createElement(ie.a.Option,{value:"passed"},"审核通过"),b.a.createElement(ie.a.Option,{value:"rejected"},"审核不通过")),b.a.createElement(ie.a,{placeholder:"请选择审核类型",value:null==l?void 0:l.audit,onChange:function(e){return be(e,"audit")}},b.a.createElement(ie.a.Option,{value:null},"全部"),b.a.createElement(ie.a.Option,{value:1},"自动审核"),b.a.createElement(ie.a.Option,{value:2},"人工审核")),b.a.createElement("span",{className:le.a.btn,style:{cursor:"pointer"},onClick:function(){K.length?he(!0):s.b.warn("请选择学生")}},b.a.createElement("i",{className:"iconfont icon-piliangcaozuo font14 mr5"}),"批量审核")),b.a.createElement("div",{className:le.a.bgH}),b.a.createElement(N.a,{rowSelection:ke,className:le.a.customTable,dataSource:z,bordered:!1,columns:ye,rowKey:"exercise_identity_photo_id",rowClassName:le.a.row,loading:ne,onChange:function(e,t,n){l.page=null==e?void 0:e.current,l.limit=null==e?void 0:e.pageSize,null!=n&&n.order?(l.sort_by=null==n?void 0:n.field,l.sort_direction="ascend"===(null==n?void 0:n.order)?"asc":"desc"):(l.sort_by=null,l.sort_direction=null),d(Object(h.a)({},l)),ve(l)},pagination:{pageSize:l.limit,total:J,current:l.page,showQuickJumper:!0,hideOnSinglePage:!0,showSizeChanger:!1,position:["bottomCenter"],showTotal:function(e){return b.a.createElement("span",{className:"mr10"},"共",b.a.createElement("span",{className:"c-orange"},e),"条数据")}}}),b.a.createElement(me,{selectIds:K,visible:de,onCancel:function(){return he(!1)},onOk:function(){he(!1),ve(l)},params:l}),b.a.createElement(X.a,null))})),me=function(e){var t=e.visible,n=e.onOk,r=e.onCancel,i=e.selectIds,a=e.params,o=Object(v.useState)(!1),s=Object(f.a)(o,2),l=s[0],d=s[1],p=Object(v.useState)({}),m=Object(f.a)(p,2),E=m[0],x=m[1],_=U.a.useForm(),k=Object(f.a)(_,1)[0],w=function(){var e=Object(c.a)(g.a.mark((function e(r){var o,s;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d(!0),!0!==t){e.next=7;break}return e.next=4,Object(y.a)("/api/exercises/".concat(null==a?void 0:a.exercise_id,"/batch_audit_identity_photo.json"),{method:"post",body:Object(h.a)({identity_photo_ids:i},r)});case 4:s=e.sent,e.next=10;break;case 7:return e.next=9,Object(y.a)("/api/exercises/".concat(null==a?void 0:a.exercise_id,"/audit_identity_photo.json"),{method:"post",body:Object(h.a)({identity_photo_id:null==t?void 0:t.exercise_identity_photo_id},r)});case 9:s=e.sent;case 10:0===(null===(o=s)||void 0===o?void 0:o.status)&&n(),d(!1);case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return b.a.createElement(u.a,{title:!0!==t?"人脸身份审核":"批量审核",visible:!!t,centered:!0,width:650,destroyOnClose:!0,onCancel:function(){r()},afterClose:function(){k.resetFields(),x({})},confirmLoading:l,onOk:function(){return k.submit()}},b.a.createElement(U.a,{className:le.a.formWrap,form:k,labelCol:{span:4},wrapperCol:{span:18},onFinish:w,onValuesChange:function(){x(Object(h.a)({},k.getFieldsValue()))}},!0!==t&&b.a.createElement(M.a,{style:{marginLeft:28,marginBottom:38}},b.a.createElement(P.a,null,"采集照片:"),b.a.createElement(P.a,null,b.a.createElement("aside",{className:le.a.imgWrap},b.a.createElement("div",{className:le.a.img},b.a.createElement("img",{width:234,src:Object(O.g)(null==t?void 0:t.photo_url)}),b.a.createElement("div",{onClick:function(){Z.a.publish("preview-image",null==t?void 0:t.photo_url)},className:le.a.iBtn},"预览"),b.a.createElement("div",{className:le.a.text},"采集照片")),b.a.createElement("div",{className:le.a.img,style:{marginLeft:20}},null!=t&&t.identity_url?b.a.createElement("img",{width:234,src:Object(O.g)(null==t?void 0:t.identity_url)}):b.a.createElement("div",{className:le.a.no,style:{width:326}},b.a.createElement("span",null,"暂无证件照片")),!(null==t||!t.identity_url)&&b.a.createElement("div",{onClick:function(){Z.a.publish("preview-image",Object(O.g)(null==t?void 0:t.identity_url))},className:le.a.iBtn},"预览"),b.a.createElement("div",{className:le.a.text},"证件照片"))))),b.a.createElement(U.a.Item,{label:"审核状态",name:"state",rules:[{required:!0,message:"请输入审核状态"}]},b.a.createElement(T.a.Group,null,b.a.createElement(T.a,{value:"passed"},"审核通过"),b.a.createElement(T.a,{value:"rejected"},"审核不通过"))),"rejected"===(null==E?void 0:E.state)&&b.a.createElement(U.a.Item,{label:"审核意见",name:"comment",rules:[{required:!0,message:"请输入审核意见"}]},b.a.createElement(L.a,{placeholder:"如:你的个人信息与照片不一致。",maxLength:30})),b.a.createElement("div",{style:{color:"#FA6400",paddingLeft:32}},"注意:审核通过后,该学生在本场作业与测验的认证状态将更新为“审核通过”,且能够进入作业与测验。")))},ge=(n("cWXX"),n("/ezw")),ve=(n("R9oj"),n("ECub")),be=n("hZbv"),ye=n.n(be),Ee=Object(_.a)((function(e){return{exercise:e.exercise,user:e.user}}))((function(e){var t,n,i,o,l,d,p,m,x,_=e.exercise,k=e.dispatch,w=(e.user,Object(E.i)()),C=Object(v.useState)({page:1,limit:10,name:"",save_name:"",exercise_id:null==w?void 0:w.categoryId}),S=Object(f.a)(C,2),A=S[0],D=S[1],j=U.a.useForm(),H=Object(f.a)(j,1)[0],G=Object(v.useState)(),V=Object(f.a)(G,2),W=V[0],K=V[1],q=Object(v.useState)(!1),Y=Object(f.a)(q,2),Q=Y[0],J=Y[1],$=_.exerciseList,ee=Object(v.useState)([]),te=Object(f.a)(ee,2),ne=te[0],re=te[1],se=Object(v.useState)(0),le=Object(f.a)(se,2),ce=le[0],de=le[1],he=Object(v.useState)(!0),fe=Object(f.a)(he,2),pe=fe[0],me=fe[1],be=Object(v.useState)(!1),Ee=Object(f.a)(be,2),xe=Ee[0],_e=Ee[1],ke=Object(v.useState)("1"),we=Object(f.a)(ke,2),Ce=we[0],Se=we[1],Oe=Object(v.useState)(1),Ae=Object(f.a)(Oe,2),Te=Ae[0],Ie=Ae[1],De=Object(v.useState)("alert"),Le=Object(f.a)(De,2),Re=Le[0],Ne=Le[1],je=Object(v.useState)(1),Me=Object(f.a)(je,2),Pe=Me[0],Be=Me[1],Fe=Object(v.useState)(""),Ue=Object(f.a)(Fe,2),He=Ue[0],ze=Ue[1],Ge=Object(v.useState)(!1),Ve=Object(f.a)(Ge,2),We=Ve[0],Ke=Ve[1],qe=Object(v.useState)(!1),Ye=Object(f.a)(qe,2),Qe=Ye[0],Je=Ye[1],Xe=Object(v.useState)([]),Ze=Object(f.a)(Xe,2),$e=Ze[0],et=Ze[1];Object(v.useEffect)((function(){tt(),nt(A)}),[]);var tt=function(){k({type:"exercise/getExerciseList",payload:w})},nt=function(){var e=Object(c.a)(g.a.mark((function e(t){var n,r;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=ue.a.cloneDeep(t),me(!0),re([]),e.next=5,Object(y.a)("/api/exercises/".concat(null==t?void 0:t.exercise_id,"/exercise_videos.json"),{method:"get",params:n});case 5:r=e.sent,me(!1),de(null==r?void 0:r.count),re((null==r?void 0:r.exercise_users)||[]);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();Object(v.useEffect)((function(){document.getElementById("divhe")&&(document.getElementById("divhe").scrollHeight>47&&(K(47),J(!0)))}),[document.getElementById("divhe"),$]);var rt=function(){var e=Object(c.a)(g.a.mark((function e(t){var n,r;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Ke(!0),_e({}),e.next=4,Object(y.a)("/api/exercises/".concat(null==A?void 0:A.exercise_id,"/student_info.json"),{method:"get",params:{exercise_user_id:null==t?void 0:t.exercise_user_id}});case 4:return n=e.sent,e.next=7,Object(y.a)("/api/exercises/".concat(null==A?void 0:A.exercise_id,"/video_push_logs.json"),{method:"get",params:{exercise_user_id:null==t?void 0:t.exercise_user_id}});case 7:null!=(r=e.sent)&&r.data&&et((null==r?void 0:r.data)||[]),null!=n&&n.data&&_e(Object(h.a)(Object(h.a)({},null==n?void 0:n.data),{},{exercise_user_id:null==t?void 0:t.exercise_user_id,datas:t})),Ke(!1);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),it=function(e){var t,n;"prev"===e?Ie(Te-1==0?null==xe||null===(t=xe.exercise_user_photos)||void 0===t?void 0:t.length:Te-1):Ie(Te===(null==xe||null===(n=xe.exercise_user_photos)||void 0===n?void 0:n.length)?1:Te+1)},at=function(e){Ne(e),Be(1),ze("")},ot=[{key:1,value:"手机录像异常,请重新扫描左侧二维码开启手机摄像录制。"},{key:2,value:"请勿离开监控范围!"},{key:3,value:"请不要与其他人交谈!"},{key:4,value:"请不要做与作业与测验无关的行为!"},{key:5,value:"请勿切屏,超过3次将被强制交卷!"},{key:6,value:"请勿遮挡或关闭电脑摄像监控!"},{key:0,value:"其他"}],st=[{key:1,value:"请将手机放置于侧后方45°,离桌面1米左右,保证能拍摄到上半身、电脑屏幕和桌面。"},{key:2,value:"手机录像异常,请重新扫描左侧二维码开启手机摄像录制。"},{key:0,value:"其他"}],lt="alert"===Re?ot:st;return b.a.createElement("section",{className:ye.a.wrap},b.a.createElement(U.a,{form:H,onChange:function(){A.page=1;var e=Object.assign({},H.getFieldsValue());Object.keys(e).map((function(t){switch(t){case"exercise_group_id":e[t].includes("all")||!e[t].length?(delete A.course_group,H.setFieldsValue(Object(F.a)({},"exercise_group_id","all"))):(A.course_group=e[t],H.setFieldsValue(Object(F.a)({},"exercise_group_id",A.course_group)))}})),nt(A)},initialValues:Object(F.a)({},"exercise_group_id","all")},b.a.createElement(U.a.Item,{name:"exercise_group_id"},b.a.createElement(R.a.Group,{style:{width:"100%"}},b.a.createElement(M.a,null,b.a.createElement(P.a,{className:"font14",flex:"80px"},"选择分班:"),b.a.createElement(P.a,{flex:"80px"},b.a.createElement(R.a,{value:"all"},"全部")),b.a.createElement(P.a,{flex:"1",id:"divhe",style:{height:W+"px",overflow:"hidden"}},null===(t=$.course_groups)||void 0===t?void 0:t.map((function(e,t){return b.a.createElement(R.a,{key:t,value:e.exercise_group_id,className:"ml0 mr8"},e.exercise_group_name,"(",e.exercise_group_students,")")}))),Q&&b.a.createElement("span",{onClick:function(){var e=document.getElementById("divhe").scrollHeight;K(W>47?47:e)},style:{color:"rgb(76, 172, 255)",cursor:"pointer",alignItems:"flex-end",display:"flex"}},47===W?"展开":"收起",47===W?b.a.createElement(ae.a,{style:{marginBottom:"3px",marginLeft:"2px"}}):b.a.createElement(oe.a,{style:{marginBottom:"3px",marginLeft:"2px"}})))))),b.a.createElement("div",{className:ye.a.control},b.a.createElement(L.a.Search,{placeholder:"请输入姓名或者学号搜索",value:null==A?void 0:A.save_name,onChange:function(e){return t=e.target.value,A.page=1,A.save_name=t,void D(Object(h.a)({},A));var t},onSearch:function(){A.page=1,A.name=A.save_name,D(Object(h.a)({},A)),nt(A)}})),b.a.createElement("div",{className:ye.a.bgH}),b.a.createElement("div",{className:ye.a.warpList},b.a.createElement(ge.a,{loading:pe,active:!0,paragraph:{rows:5}},b.a.createElement("div",{className:"c-grey-666 mb20 mt20"},"共",b.a.createElement("span",{className:"c-orange"},ce),"名学生已开启手机摄影"),ne.length?b.a.createElement("ul",{className:ye.a.sys},ne.map((function(e,t){var n=e.user_name,r=e.user_group_name,i=e.video_url,a=e.login,o=e.student_id;return b.a.createElement("li",{className:ye.a.li,key:t},b.a.createElement("div",{className:ye.a.d1},b.a.createElement("div",{className:ye.a.img},b.a.createElement("iframe",{style:{height:340,width:"100%",border:"none"},src:"/live-play.html?key=".concat(t,"&video_url=").concat(null==i?void 0:i.replace(".m3u8",".flv"))})),b.a.createElement(B.a,{title:"姓名+学号"},b.a.createElement("div",{className:ye.a.btn,onClick:function(){return Object(O.s)("".concat(A.exercise_id,"-").concat(a),!0)}},b.a.createElement("div",{title:n,className:ye.a.b1},n),b.a.createElement("div",{title:r,className:ye.a.b2},"(",o,")"))),b.a.createElement("div",{onClick:function(){return rt(e)},className:ye.a.big},"查看")))}))):b.a.createElement(ve.a,null)),b.a.createElement(I.a,{showTotal:function(e){return b.a.createElement("span",{className:"mr10"},"共",b.a.createElement("span",{className:"c-orange"},e),"条数据")},className:"tc",showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,onChange:function(e,t){A.page=e,A.limit=t,D(Object(h.a)({},A)),nt(A)},pageSize:null==A?void 0:A.limit,current:A.page,total:ce})),b.a.createElement(u.a,{title:"查看详细信息",visible:xe,centered:!0,width:850,destroyOnClose:!0,onCancel:function(){_e(!1)},afterClose:function(){Ie(1),Ne("alert"),ze(""),Se("1"),Be(1)},footer:null},b.a.createElement(ge.a,{loading:We,active:!0,paragraph:{rows:5}},b.a.createElement("div",null,b.a.createElement("span",null,"姓名:",null==xe||null===(n=xe.datas)||void 0===n?void 0:n.user_name),b.a.createElement("span",{className:"ml20"},"学号:",null==xe||null===(i=xe.datas)||void 0===i?void 0:i.student_id),b.a.createElement("span",{className:"ml20"},"班级:",null==xe||null===(o=xe.datas)||void 0===o?void 0:o.user_group_name)),b.a.createElement(r.a,{className:"mt10",defaultActiveKey:Ce,onChange:function(e){Se(e)}},b.a.createElement(r.a.TabPane,{tab:"防作弊头像",key:"1"},b.a.createElement("aside",{className:ye.a.imgWrap},b.a.createElement("div",{className:ye.a.img,style:{width:234,marginLeft:30,textAlign:"center"}},null!=xe&&null!==(l=xe.exercise_user_photos)&&void 0!==l&&l.length?b.a.createElement(v.Fragment,null,b.a.createElement("img",{height:131,src:null==xe||null===(d=xe.exercise_user_photos)||void 0===d?void 0:d[Te-1]}),b.a.createElement("div",{onClick:function(){var e;Z.a.publish("preview-image",null==xe||null===(e=xe.exercise_user_photos)||void 0===e?void 0:e[Te-1])},className:ye.a.iBtn},"预览"),b.a.createElement("div",{className:ye.a.text},"进行中照片",b.a.createElement("span",{className:"c-light-primary"},Te,"/",null==xe||null===(p=xe.exercise_user_photos)||void 0===p?void 0:p.length)),1===Te?b.a.createElement("div",{style:{color:"#ccc",cursor:"not-allowed"},className:ye.a.l}," ",b.a.createElement("i",{className:"iconfont icon-fanhui2"})):b.a.createElement("div",{onClick:function(){return it("prev")},className:ye.a.l}," ",b.a.createElement("i",{className:"iconfont icon-fanhui2"})),b.a.createElement("div",{onClick:function(){return it("next")},className:ye.a.r},b.a.createElement("i",{className:"iconfont icon-lujing"}))):b.a.createElement("div",{className:ye.a.no},b.a.createElement("span",null,"暂无进行中照片"))),b.a.createElement("div",{className:ye.a.img,style:{marginLeft:60,width:234,textAlign:"center"}},null!=xe&&xe.identity_url?b.a.createElement("img",{height:131,src:Object(O.g)(null==xe?void 0:xe.identity_url)}):b.a.createElement("div",{className:ye.a.no},b.a.createElement("span",null,"暂无证件照片")),!(null==xe||!xe.identity_url)&&b.a.createElement("div",{onClick:function(){Z.a.publish("preview-image",Object(O.g)(null==xe?void 0:xe.identity_url))},className:ye.a.iBtn},"预览"),b.a.createElement("div",{className:ye.a.text},"证件照片")))),b.a.createElement(r.a.TabPane,{tab:"人脸照片",key:"2"},b.a.createElement("aside",{className:ye.a.imgWrap,style:{marginLeft:70}},b.a.createElement("div",{className:ye.a.img},b.a.createElement("img",{width:234,src:null==xe?void 0:xe.exercise_identity_photo}),b.a.createElement("div",{onClick:function(){Z.a.publish("preview-image",null==xe?void 0:xe.exercise_identity_photo)},className:ye.a.iBtn},"预览"),b.a.createElement("div",{className:ye.a.text},"采集照片")),b.a.createElement("div",{className:ye.a.img,style:{marginLeft:20,width:234,textAlign:"center"}},null!=xe&&xe.identity_url?b.a.createElement("img",{height:131,src:Object(O.g)(null==xe?void 0:xe.identity_url)}):b.a.createElement("div",{className:ye.a.no},b.a.createElement("span",null,"暂无证件照片")),!(null==xe||!xe.identity_url)&&b.a.createElement("div",{onClick:function(){Z.a.publish("preview-image",Object(O.g)(null==xe?void 0:xe.identity_url))},className:ye.a.iBtn},"预览"),b.a.createElement("div",{className:ye.a.text},"证件照片")))),b.a.createElement(r.a.TabPane,{tab:"警告和通知",key:"3"},b.a.createElement("div",{className:ye.a.fo},b.a.createElement(T.a,{className:"mt20",checked:"alert"===Re,onChange:function(){return at("alert")}},"发送警告",b.a.createElement("span",{className:"font14 c-grey-999"},"(如发现学生在进行中的照片存在异常时,可发送消息给学生)")),b.a.createElement(T.a,{className:"mt10",checked:"notice"===Re,onChange:function(){return at("notice")}},"发送通知",b.a.createElement("span",{className:"font14 c-grey-999"},"(进行中如有消息通知,可发送消息给学生)")),b.a.createElement("div",{className:"mt20"},b.a.createElement("span",{className:"mr10"},"原因:"),b.a.createElement(ie.a,{getPopupContainer:function(e){return e.parentNode.parentNode},style:{width:570},value:Pe,onChange:function(e){Be(e)}},null==lt?void 0:lt.map((function(e){return b.a.createElement(ie.a.Option,{key:e.key,value:e.key},e.value)})))),0===Pe&&b.a.createElement(L.a.TextArea,{className:"mt20",value:He,onChange:function(e){return ze(e.target.value)},placeholder:"请填写其他原因"}),b.a.createElement(M.a,{className:"mt10",align:"middle"},b.a.createElement("div",{className:"mr10"},"发送记录"),b.a.createElement("div",{style:{color:"#E30000",fontSize:12,margin:"10px 0"}},"已发送",null==xe?void 0:xe.alert_count,"次警告和",(null==xe||null===(m=xe.alerts)||void 0===m?void 0:m.length)-(null==xe?void 0:xe.alert_count),"次通知")),b.a.createElement(N.a,{dataSource:(null==xe?void 0:xe.alerts)||[],bordered:!1,scroll:(null==xe||null===(x=xe.alerts)||void 0===x?void 0:x.length)>4?{y:200}:{},columns:[{title:"开始时间",dataIndex:"created_at",width:164},{title:"发送人",dataIndex:"sender",width:100,ellipsis:{showTitle:!1},render:function(e){return e?b.a.createElement("span",{title:e},e):"--"}},{title:"发送类型",dataIndex:"clazz",width:80,render:function(e){return"alert"===e?"警告":"通知"}},{title:"发送内容",dataIndex:"content",ellipsis:!0}],pagination:!1}),b.a.createElement(a.a,{className:ye.a.b,onClick:Object(c.a)(g.a.mark((function e(){var t,n;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(He||0!==Pe){e.next=3;break}return s.b.info("请输入其他原因"),e.abrupt("return");case 3:return t=He,Pe&&(t=("alert"===Re?ot:st).find((function(e){return e.key===Pe})).value),Je(!0),e.next=8,Object(y.a)("/api/exercises/".concat(A.exercise_id,"/send_alert.json"),{method:"post",body:{content:t,clazz:Re,exercise_user_id:null==xe?void 0:xe.exercise_user_id}});case 8:0===(null==(n=e.sent)?void 0:n.status)&&(s.b.info("发送成功"),_e(!1)),Je(!1);case 11:case"end":return e.stop()}}),e)}))),loading:Qe,type:"primary"},b.a.createElement("i",{className:"iconfont icon-fasongtongzhi mr5"}),"发送"))),b.a.createElement(r.a.TabPane,{tab:"断流记录",key:"4"},b.a.createElement(N.a,{dataSource:$e,bordered:!1,scroll:$e.length>7?{y:300}:{},columns:[{title:"开始时间",dataIndex:"start_time",width:164},{title:"结束时间",dataIndex:"end_time",width:164,render:function(e){return z()(e).format("YYYY-MM-DD HH:mm:ss")||"--"}},{title:"推流时长",dataIndex:"push_duration",ellipsis:!0,width:120,render:function(e){return e&&Object(O.Z)(Number(e)/1e3)||0}},{title:"断流原因",dataIndex:"msg",ellipsis:!0}]}))))),b.a.createElement(X.a,null))})),xe=n("wNxg"),_e=n.n(xe),ke=n("b6Jr"),we=n.n(ke),Ce=function(e){var t=e.index,n=e.bottomLine,r=e.gather,i=e.search,a=Object(v.useState)([]),o=Object(f.a)(a,2),s=o[0],l=o[1],u=Object(v.useState)(!1),d=Object(f.a)(u,2),p=d[0],m=d[1],_=Object(v.useState)(!1),k=Object(f.a)(_,2),w=k[0],C=k[1],S=Object(E.i)(),O=Object(E.h)(),A=Object(v.useState)({page:1,limit:6,total:0}),T=Object(f.a)(A,2),I=T[0],D=T[1];Object(v.useEffect)((function(){console.log(r,"gather"),0===t&&C(!0)}),[]),Object(v.useEffect)((function(){w&&R()}),[w]);var L=[{title:"序号",dataIndex:"index",key:"index",align:"left",ellipsis:!0,render:function(e,t,n){return I.limit*(I.page-1)+n+1}},{title:"姓名",dataIndex:"username",key:"username",align:"left",ellipsis:!0},{title:"班级",dataIndex:"user_group_name",key:"user_group_name",align:"left",render:function(e){return e||"--"}},{title:"学号",dataIndex:"student_id",key:"student_id",align:"left"},{title:"相似度",dataIndex:"code_rate",key:"code_rate",align:"left",render:function(e){return e+"%"}},{title:"操作",dataIndex:"id",key:"id",align:"left",render:function(e){var t,n,r="/classrooms/".concat(null==S?void 0:S.coursesId,"/exercise/").concat(null==S?void 0:S.categoryId,"/detail/").concat(e,"/review_detail");null!=O&&null!==(t=O.query)&&void 0!==t&&t.random&&(r+="?random=".concat(null==O||null===(n=O.query)||void 0===n?void 0:n.random));return b.a.createElement(x.a,{to:r,target:"_blank"},"查看")}}],R=function(){var e=Object(c.a)(g.a.mark((function e(t){var n,a,o;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(!0),n=t||{page:1,limit:10,total:0},a=Object(h.a)({id:null==S?void 0:S.categoryId,question_id:null==r?void 0:r.question_id,search:i},n),e.next=5,Object(y.a)("/api/courses/".concat(null==S?void 0:S.coursesId,"/exercises/code_review_users.json"),{method:"get",params:a});case 5:(o=e.sent)&&(l(null==o?void 0:o.users),m(!1),D(Object(h.a)(Object(h.a)({},n),{},{total:(null==o?void 0:o.count)||0})));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return b.a.createElement("div",{className:we.a.subjectTable},b.a.createElement("aside",{className:we.a.title},b.a.createElement("span",{className:"c-light-primary"},t+1,"、",5===(null==r?void 0:r.question_type)?"实训题":"编程题"),b.a.createElement("span",{className:"c-grey-333"},"(",null==r?void 0:r.score,"分):",null==r?void 0:r.question_title),b.a.createElement("span",{className:"ml40 c-grey-999"},b.a.createElement("b",{className:"c-red-ee4"},null==r?void 0:r.checked_count)," 个疑似抄袭作品(共",null==r?void 0:r.total_count,"个作品)"),b.a.createElement("span",{onClick:function(){C(!w)},style:{marginLeft:"auto",cursor:"pointer",color:"#0152d9"}},w?"收起":"展开",w?b.a.createElement(oe.a,null):b.a.createElement(ae.a,null)),5===(null==r?void 0:r.question_type)&&b.a.createElement("a",{style:{marginLeft:20},target:"_blank",href:"/shixuns/".concat(null==r?void 0:r.shixun_identifier,"/challenges")},"实训详情")),b.a.createElement(N.a,{className:we.a.customTable,style:{display:w?"block":"none"},dataSource:s,bordered:!1,rowKey:function(e){return e.id},rowClassName:we.a.row,columns:L,loading:p,pagination:{pageSize:I.limit,total:I.total,current:I.page,onChange:function(e){var t=Object(h.a)(Object(h.a)({},I),{},{page:e});D(t),R(t)},showQuickJumper:!0,showSizeChanger:!1,hideOnSinglePage:!0,position:["bottomCenter"]}}),b.a.createElement("div",{className:we.a.line,style:{visibility:n?"hidden":"visible"}}))},Se=n("lzim"),Oe=Object(_.a)((function(e){return{exercise:e.exercise,globalSetting:e.globalSetting}}))((function(e){e.exercise,e.globalSetting,e.dispatch;var t=Object(v.useState)(""),n=Object(f.a)(t,2),r=n[0],i=n[1],a=Object(v.useState)([]),o=Object(f.a)(a,2),s=o[0],l=o[1],u=Object(v.useState)(""),d=Object(f.a)(u,2),h=d[0],p=d[1],m=Object(v.useState)(!1),x=Object(f.a)(m,2),_=x[0],k=x[1],w=Object(E.i)();Object(v.useEffect)((function(){C()}),[]);var C=function(){var e=Object(c.a)(g.a.mark((function e(t){var n;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k(!0),e.next=3,Object(y.a)("/api/courses/".concat(null==w?void 0:w.coursesId,"/exercises/code_review_results.json"),{method:"get",params:{id:null==w?void 0:w.categoryId,search:r}});case 3:if(-2!==(null==(n=e.sent)?void 0:n.status)){e.next=7;break}return C(),e.abrupt("return");case 7:n&&(k(!1),l((null==n?void 0:n.exercise_questions)||[]),p(null==n?void 0:n.last_review_time));case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),S=function(){C()};return b.a.createElement("section",{className:_e.a.warp},b.a.createElement("aside",{className:_e.a.header},b.a.createElement("div",null,"查重时间:",h||"--"),!!h&&b.a.createElement(L.a,{value:r,onChange:function(e){return i(e.target.value)},suffix:b.a.createElement("i",{onClick:S,className:"iconfont icon-sousuo2 c-grey-c"}),bordered:!1,placeholder:"请输入姓名或学号搜索",onPressEnter:S})),b.a.createElement(ge.a,{loading:_,active:!0,paragraph:{rows:5}},s.length>0?b.a.createElement("aside",{className:_e.a.subject},s.map((function(e,t){return b.a.createElement(Ce,{key:t,index:t,bottomLine:t===s.length-1,gather:e,search:r})}))):b.a.createElement("div",{className:_e.a.empty},b.a.createElement("img",{src:Se.l,width:"258"}),b.a.createElement("span",{className:"c-grey-c"},"暂无数据"))))})),Ae=(n("/zsF"),n("PArb")),Te=n("LYsE"),Ie=n("k5F3"),De=Object(_.a)((function(e){return{exercise:e.exercise,loading:e.loading.effects}}))((function(e){var t=e.exercise,n=(e.loading,e.dispatch),r=e.activeTabs,i=Object(E.i)(),a=Object(v.useState)(Object(h.a)(Object(h.a)({},i),{page:1,per_page:10})),o=Object(f.a)(a,1)[0],s=t.editData;Object(v.useEffect)((function(){"2"===r&&l()}),[i.categoryId,r]);var l=function(){n({type:"exercise/editExercise",payload:Object(h.a)({},o)})};return Object(v.useEffect)((function(){return n({type:"globalSetting/onlyShowBackTopToggle",payload:!1}),n({type:"globalSetting/onlyShowBackTopIconToggle",payload:!1}),function(){n({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),n({type:"globalSetting/onlyShowBackTopIconToggle",payload:!0})}}),[]),b.a.createElement("section",{className:"minH1050 mb20 pt30 pb30 pl60 bg-white relative"},b.a.createElement(Ie.a,{isPreview:!0,activeTabs:r}),b.a.createElement(Ae.a,null),b.a.createElement(Te.a,{data:null==s?void 0:s.exercise_question_types,isDragDisabled:!0}))})),Le=(n("T2oS"),n("W9HT")),Re=(n("Q9mQ"),n("diRs")),Ne=n("CCdo"),je=n.n(Ne),Me=n("RotF"),Pe=n.n(Me),Be=n("6K3P"),Fe=n.n(Be),Ue=n("0owl"),He=n("ek7X"),ze=Object(_.a)((function(e){return{exercise:e.exercise,loading:e.loading}}))((function(e){var t,n,r,i=e.exercise,a=(e.loading,e.dispatch),o=e.cb,l=Object(h.a)(Object(h.a)({},Object(E.i)()),{},{page:0,limit:50,one:null,two:null,save_one:null,save_two:null,sort:null,course_group:"",student_id:"",realname:"",save_course_group:"",save_student_id:"",save_realname:""}),p=Object(v.useState)(Object(h.a)({},l)),m=Object(f.a)(p,2),y=m[0],x=m[1],_=Object(v.useState)([]),k=Object(f.a)(_,2),w=k[0],O=k[1],A=Object(v.useState)(!0),T=Object(f.a)(A,2),I=T[0],N=T[1],j=Object(v.useState)(!0),M=Object(f.a)(j,2),P=M[0],B=M[1],F=Object(v.useState)(0),U=Object(f.a)(F,2),H=U[0],z=U[1],G=Object(v.useState)(!1),V=Object(f.a)(G,2),W=V[0],K=(V[1],Object(v.useState)([])),q=Object(f.a)(K,2),Y=q[0],Q=q[1];Object(v.useEffect)((function(){"打回重做"===i.actionTabs.key&&(w=[],J(1))}),[i.actionTabs.key]);var J=function(){var e=Object(c.a)(g.a.mark((function e(t){var n,r;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return 1==t&&(w=[]),N(!0),y.page=t,B(!0),e.next=6,a({type:"exercise/getRedoModal",payload:Object(h.a)(Object(h.a)({},y),{},{score:((null==y?void 0:y.one)||0)+"".concat(null!=y&&y.two?","+(null==y?void 0:y.two):"")})});case 6:(null==(r=e.sent)||null===(n=r.exercise_users)||void 0===n?void 0:n.length)<y.limit&&N(!1),null!=r&&r.exercise_users&&(x(Object(h.a)({},y)),O([].concat(Object(d.a)(w),Object(d.a)(null==r?void 0:r.exercise_users))),B(!1));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),X=function(e){y.course_group=y.save_course_group,y.student_id=y.save_student_id,y.realname=y.save_realname,x(Object(h.a)({},y)),O([]),J(1)},Z=function(e){var t=parseInt(e);return isNaN(t)?"":t};return b.a.createElement(u.a,{centered:!0,title:"打回重做",visible:"打回重做"===i.actionTabs.key,width:1e3,bodyStyle:{minHeight:200},confirmLoading:W,afterClose:function(){x(Object(h.a)({},l)),Q([]),O([])},onOk:function(){var e=function(){var e=Object(c.a)(g.a.mark((function e(){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(S.R)(Object(h.a)(Object(h.a)({},y),{},{user_ids:Y}));case 2:0===e.sent.status&&(s.b.success("操作成功"),o&&o(),a({type:"exercise/setActionTabs",payload:{}}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();u.a.confirm({centered:!0,icon:null,okText:"确定",cancelText:"取消",title:"提示",content:b.a.createElement("div",{style:{margin:"13px 0 0px 0"},className:je.a.title},b.a.createElement("img",{src:Fe.a}),"当前操作将清空学生成绩和答题记录,是否继续?"),onOk:e})},onCancel:function(){a({type:"exercise/setActionTabs",payload:{}})}},b.a.createElement("div",{className:je.a.search},b.a.createElement(L.a.Search,{value:y.save_realname,style:{width:270},placeholder:"请输入学生姓名进行搜索",onChange:function(e){y.save_realname=e.target.value,x(Object(h.a)({},y))},onSearch:X}),b.a.createElement(L.a.Search,{value:y.save_student_id,style:{width:270},placeholder:"请输入学生学号进行搜索",onChange:function(e){y.save_student_id=e.target.value,x(Object(h.a)({},y))},onSearch:X}),b.a.createElement(L.a.Search,{value:y.save_course_group,style:{width:270},placeholder:"请输入分班搜索",onChange:function(e){y.save_course_group=e.target.value,x(Object(h.a)({},y))},onSearch:X}),b.a.createElement(Re.a,{key:H,getPopupContainer:function(e){return e.parentNode},trigger:"click",placement:"bottom",content:b.a.createElement("div",null,b.a.createElement("div",{className:"mt10",style:{width:282}},b.a.createElement("span",{className:"mr10"},"分数区间:"),b.a.createElement(D.a,{parser:Z,onChange:function(e){y.save_one=e,x(Object(h.a)({},y))},value:y.save_one,min:0}),b.a.createElement("span",{className:"mr10 ml10"},"-"),b.a.createElement(D.a,{parser:Z,onChange:function(e){y.save_two=e,x(Object(h.a)({},y))},value:y.save_two,min:0})),b.a.createElement("div",{className:je.a.btns},b.a.createElement("div",{onClick:function(){y.one="",y.two="",y.save_one="",y.save_two="",x(Object(h.a)({},y))}},"清空"),b.a.createElement("div",{onClick:function(){y.one=y.save_one,y.two=y.save_two,z(H+1),x(Object(h.a)({},y)),O([]),J(1)}},"确认")))},b.a.createElement("span",{className:"current c-light-primary"},b.a.createElement(Ue.a,{className:"ml10 mr5"}),b.a.createElement("span",null,"分数筛选")))),b.a.createElement("div",{className:je.a.head},b.a.createElement("div",null,b.a.createElement(R.a,{className:"font14",checked:!(null===(t=w)||void 0===t||!t.length)&&(null==Y?void 0:Y.length)===(null===(n=w)||void 0===n?void 0:n.length),onChange:function(e){if(e.target.checked){var t,n=null===(t=w)||void 0===t?void 0:t.map((function(e){return e.user_id}));Q(n)}else Q([])}},"姓名")),b.a.createElement("div",null,b.a.createElement("span",null,"学号")),b.a.createElement("div",null,b.a.createElement("span",null,"分班")),b.a.createElement("div",{className:je.a.sort,onClick:function(){null===(null==y?void 0:y.sort)?y.sort="asc":"asc"===(null==y?void 0:y.sort)?y.sort="desc":"desc"===(null==y?void 0:y.sort)&&(y.sort=null),x(Object(h.a)({},y)),O([]),J(1)}},b.a.createElement("span",null,"成绩分数"),b.a.createElement("aside",null,b.a.createElement(He.a,{style:{color:"asc"===(null==y?void 0:y.sort)?"#0152d9":"#bfbfbf"}}),b.a.createElement(C.a,{style:{color:"desc"===(null==y?void 0:y.sort)?"#0152d9":"#bfbfbf"}})))),b.a.createElement("div",{style:{height:260,overflow:"auto"}},b.a.createElement(Pe.a,{initialLoad:!1,pageStart:1,threshold:20,loadMore:function(){!P&&I&&J((null==y?void 0:y.page)+1)},hasMore:!P&&I,useWindow:!1},b.a.createElement(R.a.Group,{style:{width:"100%"},value:Y,onChange:function(e){console.log(e,444),Q(e)}},null===(r=w)||void 0===r?void 0:r.map((function(e,t){return b.a.createElement("div",{key:e.user_id,className:je.a.row},b.a.createElement("div",null,b.a.createElement(R.a,{className:"font14",value:e.user_id},e.user_name)),b.a.createElement("div",null,e.student_id),b.a.createElement("div",null,e.course_group_name),b.a.createElement("div",{className:"pl10"},b.a.createElement("span",null,e.user_score)))}))),b.a.createElement(Le.a,{className:"edu-ant-spin",spinning:P}))),b.a.createElement("div",{className:je.a.title},b.a.createElement("img",{src:Fe.a}),"学生将得到一次重新答题的机会,已提交作业与测验的答题记录将清空。"))})),Ge=n("CIbS"),Ve=n("sDPU"),We=n("ueOF"),Ke=n.n(We),qe=Object(_.a)((function(e){return{exercise:e.exercise}}))((function(e){var t=e.exercise,n=e.dispatch,r=e.onOk,i=Object(E.i)(),o=Object(v.useState)([]),s=Object(f.a)(o,2),l=s[0],d=s[1],h=Object(v.useState)([]),p=Object(f.a)(h,2),m=p[0],x=p[1],_=Object(v.useState)(!0),k=Object(f.a)(_,2),w=(k[0],k[1]),C=Object(v.useState)(!1),S=Object(f.a)(C,2),O=S[0],A=S[1];Object(v.useEffect)((function(){"代码查重"===t.actionTabs.key&&T()}),[t.actionTabs.key]);var T=function(){var e=Object(c.a)(g.a.mark((function e(){var t;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return w(!0),e.next=3,Object(y.a)("/api/courses/".concat(null==i?void 0:i.coursesId,"/exercises/exercise_course_groups.json"),{method:"get",params:{id:null==i?void 0:i.categoryId}});case 3:(t=e.sent)&&d((null==t?void 0:t.course_groups)||[]),w(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),I=function(){n({type:"exercise/setActionTabs",payload:{}})};return b.a.createElement(u.a,{centered:!0,afterClose:function(){x([]),A(!1)},title:"代码查重",visible:"代码查重"===t.actionTabs.key,footer:null,width:718,wrapClassName:Ke.a.customModal,onCancel:I},b.a.createElement("aside",{className:Ke.a.checking},b.a.createElement("div",{className:Ke.a.content},b.a.createElement("div",{className:Ke.a.group},l.length>0?b.a.createElement("p",null,"选择班级:"):b.a.createElement("p",null,"暂无分班"),b.a.createElement(R.a.Group,{value:m,onChange:function(e){x(e),A(e.length===l.length)}},l.map((function(e){return b.a.createElement(R.a,{key:e.id,value:e.id},e.name)})))),b.a.createElement("p",{style:{marginBottom:40},className:"c-grey-999 mt40"},"说明:平台目前仅支持java、python、c、c++语言的实训题和编程题的代码查重。")),b.a.createElement("div",{className:Ke.a.footer},b.a.createElement(R.a,{checked:O,onChange:function(e){var t=e.target.checked?l.map((function(e){return e.id})):[];x(t),A(e.target.checked)}},"全选"),b.a.createElement(a.a,{onClick:I},"取消"),b.a.createElement(a.a,{onClick:function(){r(m)},type:"primary"},"确认"))))})),Ye=n("Fzz4"),Qe=(n("DZo9"),n("8z0m")),Je=n("/MfK"),Xe=n("w5pM"),Ze=n("jN4g"),$e=n("xvlK"),et=n("dfu6"),tt=r.a.TabPane,nt=Object(_.a)((function(e){return{exercise:e.exercise,loading:e.loading}}))((function(e){var t,n=e.exercise,i=(e.loading,e.dispatch),a=(Object(E.i)(),Object(E.h)(),U.a.useForm()),o=Object(f.a)(a,1)[0],l=Object(v.useState)({}),p=Object(f.a)(l,2),m=p[0],y=p[1],x=Object(v.useState)("1"),_=Object(f.a)(x,2),k=_[0],w=_[1];return Object(v.useEffect)((function(){"addIp"===n.actionTabs.key&&(o.resetFields(),w("1"))}),[n.actionTabs]),b.a.createElement(u.a,{centered:!0,title:"添加IP范围",visible:"addIp"===n.actionTabs.key,okText:"确认",cancelText:"取消",width:600,bodyStyle:{minHeight:200},onOk:Object(c.a)(g.a.mark((function e(){var t;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.validateFields();case 2:if(m.zz){e.next=8;break}if(m.ip){e.next=8;break}if(t=m.startIP.split(".")[3],!(parseInt(t)>parseInt(m.endIP))){e.next=8;break}return s.b.warn("IP区间段不合法"),e.abrupt("return");case 8:i({type:"exercise/setActionTabs",payload:{key:"insterIp",data:Object(h.a)({},o.getFieldValue()),type:n.actionTabs.type}});case 9:case"end":return e.stop()}}),e)}))),onCancel:function(){i({type:"exercise/setActionTabs",payload:{}})}},b.a.createElement("section",{className:"pl10 pr10"},b.a.createElement(r.a,{activeKey:k,onChange:function(e){w(e),o.resetFields()}},b.a.createElement(tt,{tab:"新增IP地址",key:"1"}),b.a.createElement(tt,{tab:"新增IP范围",key:"2"}),b.a.createElement(tt,{tab:"新增IP规则",key:"3"})),b.a.createElement(U.a,{form:o,className:"pt30",name:"form",layout:"vertical",onValuesChange:function(e,t){y(Object(h.a)({},t))}},"1"===k&&b.a.createElement(U.a.Item,{name:"ip",rules:[{required:!0,message:"请输入IP地址"}],label:"IP地址"},b.a.createElement(ie.a,{open:!1,tokenSeparators:[";",",",";"],size:"large",mode:"tags",style:{width:"100%"},placeholder:"请输入IP地址,可同时添加多个IP地址,中间用英文的分号间隔。",onChange:function(e){o.setFieldsValue({ip:Object(d.a)(e.filter((function(e){return!!Object(et.a)(e)||(s.b.warn("IP不合法,请重新输入"),!1)})))})}})),"2"===k&&b.a.createElement(M.a,{gutter:[20,20]},b.a.createElement(P.a,{flex:"1"},b.a.createElement(U.a.Item,{name:"startIP",rules:[{required:!0,message:"请输入起始IP地址"}],label:"起始IP地址"},b.a.createElement(L.a,{maxLength:15,placeholder:"请输入起始IP地址",onBlur:function(e){var t="";Object(et.a)(e.target.value)?t=e.target.value:(t="",s.b.warn("IP不合法,请重新输入")),o.setFieldsValue({startIP:t})}}))),b.a.createElement(P.a,{flex:"1"},b.a.createElement(U.a.Item,{name:"endIP",rules:[{required:!0,message:"请输入结束IP地址"},{pattern:/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/,message:"请输入0-255的网段"}],label:"结束IP地址"},b.a.createElement(L.a,{onBlur:function(e){},prefix:b.a.createElement("span",{className:"font14"},null===(t=m.startIP)||void 0===t?void 0:t.substring(0,m.startIP.lastIndexOf("."))),maxLength:3,placeholder:"请输入结束IP地址的后三位"})))),"3"===k&&b.a.createElement(M.a,{gutter:[20,20]},b.a.createElement(P.a,{flex:"1"},b.a.createElement(U.a.Item,{name:"zz",rules:[{required:!0,message:"请输入IP规则正则表达式"}],label:"IP规则正则表达式"},b.a.createElement(L.a,{placeholder:"请输入IP规则正则表达式",onBlur:function(e){try{new RegExp(e.target.value,"g")}catch(e){console.log("-----",11111),s.b.info("请输入正确的正则表达式")}}})))))))})),rt=n("2JKx"),it=n.n(rt),at=n("Ot1p"),ot=(n("+BJd"),n("mr32")),st=(r.a.TabPane,ie.a.Option),lt=Object(_.a)((function(e){return{exercise:e.exercise,loading:e.loading}}))((function(e){var t,n,r,i=e.exercise,a=(e.loading,e.data),o=e.disabled,l=e.updata,p=(e.dispatch,Object(E.i)()),m=(Object(E.h)(),U.a.useForm()),y=(Object(f.a)(m,1)[0],Object(v.useState)({})),x=Object(f.a)(y,2),_=(x[0],x[1],Object(v.useState)("1")),k=Object(f.a)(_,2),w=(k[0],k[1],i.workSetting),C=i.commonHeader,O=Object(v.useState)(!1),A=Object(f.a)(O,2),I=A[0],L=A[1],j=Object(v.useState)([]),B=Object(f.a)(j,2),F=B[0],H=B[1],z=Object(v.useState)([]),G=Object(f.a)(z,2),V=G[0],W=G[1],K=Object(v.useState)(!1),q=Object(f.a)(K,2),Y=q[0],Q=q[1],J=Object(v.useState)([]),X=Object(f.a)(J,2),Z=X[0],$=X[1],ee=Object(v.useState)([]),te=Object(f.a)(ee,2),ne=te[0],re=te[1],ae=Object(v.useState)({id:p.categoryId,exercise_group_id:[]}),oe=Object(f.a)(ae,2),se=oe[0],le=(oe[1],Object(v.useState)(0)),ce=Object(f.a)(le,2),ue=ce[0],de=ce[1];Object(v.useMemo)((function(){var e,t,n,r;if(null!=w&&null!==(e=w.published_course_groups)&&void 0!==e&&e.length){var i,a=Object(d.a)(null==w||null===(i=w.published_course_groups)||void 0===i?void 0:i.map((function(e){return Object(d.a)(e.course_group_id)})).flat());H(Object(d.a)(a))}else if(null!=w&&w.published_course_groups){var o;H(Object(d.a)(null==w||null===(o=w.course_groups)||void 0===o?void 0:o.map((function(e){return e.course_group_id}))))}if((null!=w&&null!==(t=w.exercise)&&void 0!==t&&t.group_make_ups||null!=w&&null!==(n=w.exercise)&&void 0!==n&&n.unified_make_up)&&(Q(!0),null!=w&&null!==(r=w.exercise)&&void 0!==r&&r.group_make_ups)){var s,l,c=V;null==w||null===(s=w.exercise)||void 0===s||null===(l=s.group_make_ups)||void 0===l||l.map((function(e,t){c[t]=e.course_group_id||[]})),W(Object(d.a)(c))}}),[w]),Object(v.useEffect)((function(){console.log("groupIds:",F)}),[F]),Object(v.useEffect)((function(){console.log("selectGroupIds:",V)}),[V]);var he=function(){var e=Object(c.a)(g.a.mark((function e(t){var n;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(S.K)(Object(h.a)({},se));case 2:n=e.sent,re(Object(d.a)(n.users.map((function(e){return e.key=String(e.id),e})).filter((function(e){var t;return console.log("openKeys",a.group_make_ups[ue].students,ue),null===(t=a.group_make_ups[ue].students)||void 0===t||!t.some((function(t){return t.id===e.id}))}))));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),fe={onChange:function(e,t){$(Object(d.a)(t)),console.log("selectedRowKeys: ".concat(e),"selectedRows: ",t)},getCheckboxProps:function(e){return{disabled:"Disabled User"===e.name,name:e.name}}},pe=function(e){var t,n,r;return!!o||!!(2!==C.exercise_status||null!=w&&null!==(t=w.exercise)&&void 0!==t&&null!==(n=t.group_make_ups)&&void 0!==n&&null!==(r=n[e])&&void 0!==r&&r.course_groups)&&3!==C.exercise_status},me=function(e){return!!o||(2===C.exercise_status?null==w||null===(t=w.exercise)||void 0===t||null===(n=t.group_make_ups)||void 0===n||null===(r=n[e])||void 0===r?void 0:r.is_all:3!==C.exercise_status);var t,n,r};return b.a.createElement(b.a.Fragment,null,b.a.createElement(M.a,null,b.a.createElement(P.a,{span:24},b.a.createElement(M.a,{align:"middle"},b.a.createElement(P.a,{flex:"1"},b.a.createElement("h1",{className:"mt15"},"补考设置 ",b.a.createElement("span",{className:"c-red font14"},"(正式开始补考前,切记修改作业与测验截止时间大于当前时间)"))))),b.a.createElement(P.a,{span:24,className:"mt10"},b.a.createElement(R.a,{checked:a.unified_make_up||(null===(t=a.group_make_ups)||void 0===t?void 0:t.length),disabled:o,onChange:function(e){e.target.checked?a.unified_make_up=!0:(a.unified_make_up=!1,delete a.group_make_ups),Q(e.target.checked)}},b.a.createElement("strong",null,"开启补考")),b.a.createElement("span",{className:"c-grey-c font12"},"(开启后可针对未答卷的学生设置补考,补考与延长截止时间不可共存)"))),Y&&b.a.createElement("section",{className:"ml40"},b.a.createElement(M.a,{align:"middle",className:"mt10"},b.a.createElement(P.a,null,b.a.createElement(T.a,{checked:a.unified_make_up,disabled:o,onClick:function(){a.unified_make_up=!0,delete a.group_make_ups,l(Object(h.a)({},a))}},"所有分班统一补考")),b.a.createElement(P.a,null,b.a.createElement(M.a,{align:"middle"},b.a.createElement(P.a,{className:"ml50"},"补考扣分"),b.a.createElement(P.a,{className:"ml10 mr10"},b.a.createElement(D.a,{min:0,max:100,placeholder:"为空代表不扣分",disabled:o||3!==C.exercise_status,onChange:function(e){a.make_up_score=e,l(Object(h.a)({},a))},value:a.make_up_score,style:{width:150}})),b.a.createElement(P.a,null,"(分)")))),(null===(n=w.course_groups)||void 0===n?void 0:n.length)>0&&b.a.createElement(M.a,{align:"middle",className:"mt10"},b.a.createElement(P.a,null,b.a.createElement(T.a,{disabled:o||3!==C.exercise_status,checked:a.group_make_ups,onClick:function(){var e;delete a.unified_make_up,a.group_make_ups=(null==w||null===(e=w.exercise)||void 0===e?void 0:e.group_make_ups)||[{students:[],course_group_id:[],score:0}],l(Object(h.a)({},a))}},"各班分别补考"))),null===(r=a.group_make_ups)||void 0===r?void 0:r.map((function(e,t){var n,r;return b.a.createElement("div",{key:t},b.a.createElement(M.a,{align:"middle",className:"mt10"},b.a.createElement(P.a,{flex:"100px"},"补考规则",t+1),b.a.createElement(P.a,{className:"ml10"},b.a.createElement(ie.a,{style:{width:307},value:e.course_group_id,mode:"multiple",placeholder:"请选择分班",disabled:pe(t),onChange:function(e,n,r){V[t]=e,a.group_make_ups[t].course_group_id=e,l(Object(h.a)({},a)),W(Object(d.a)(V))}},null==w||null===(n=w.course_groups)||void 0===n?void 0:n.map((function(e,n){var r=[];if(F.includes(e.course_group_id)&&(V.length&&(r=V.filter((function(n,r){return t!==r&&!!n.includes(e.course_group_id)}))),!r.length))return b.a.createElement(st,{value:e.course_group_id,key:n},e.course_group_name)})))),b.a.createElement(P.a,null,b.a.createElement(M.a,{align:"middle"},b.a.createElement(P.a,{className:"ml50"},"补考扣分"),b.a.createElement(P.a,{className:"ml10 mr10"},b.a.createElement(D.a,{value:e.score,min:0,max:100,style:{width:150},placeholder:"为空代表不扣分",disabled:pe(t),onChange:function(e){a.group_make_ups[t].score=e,l(Object(h.a)({},a))}})),b.a.createElement(P.a,null,"(分)")))),b.a.createElement(M.a,{className:"mt20"},b.a.createElement(P.a,{flex:"220px"},b.a.createElement(T.a.Group,{name:"student",value:e.is_all,disabled:me(t),onChange:function(e){var n,r,i;e.target.value?delete a.group_make_ups[t].students:a.group_make_ups[t].students=(null==w||null===(n=w.exercise)||void 0===n||null===(r=n.group_make_ups)||void 0===r||null===(i=r[t])||void 0===i?void 0:i.students)||[];a.group_make_ups[t].is_all=e.target.value,l(Object(h.a)({},a))}},b.a.createElement(T.a,{value:!0},"全部未答学生"),b.a.createElement(T.a,{value:!1},"指定学生"))),b.a.createElement(P.a,{flex:"1"},!a.group_make_ups[t].is_all&&b.a.createElement("div",{onClick:function(){var e;null!==(e=V[t])&&void 0!==e&&e.length?o||(se.exercise_group_id=V[t],L(!0),$([]),de(t),re([]),he({page:1})):s.b.warn("请先选择补考班级")},className:"".concat(o&&"disabledStyle"),style:{minHeight:28,border:"1px solid #ccc",padding:4}},null===(r=e.students)||void 0===r?void 0:r.map((function(t,n){return b.a.createElement(ot.a,{key:n,closable:t.add||C.exercise_status>2,onClose:function(){e.students.splice(n,1),l(Object(h.a)({},a))}},t.name)})))),b.a.createElement(P.a,{flex:"100px",className:"tr"},t>0&&3===C.exercise_status&&b.a.createElement(Je.a,{onClick:function(){a.group_make_ups.splice(t,1),l(Object(h.a)({},a))}}),b.a.createElement(Xe.a,{className:"c-green ml20",onClick:function(){a.group_make_ups.push({students:[],course_group_id:[],score:0,is_all:!0}),l(Object(h.a)({},a))}}))))})),b.a.createElement(u.a,{title:"指定补考学生",visible:I,onCancel:function(){return L(!1)},destroyOnClose:!0,onOk:function(){a.group_make_ups[ue].students=a.group_make_ups[ue].students.concat(Z.map((function(e){return e.add=!0,e}))),L(!1),console.log("data:",a),l(Object(h.a)({},a))}},b.a.createElement(N.a,{columns:[].concat([,{title:"学生姓名",dataIndex:"name"},{title:"分班",dataIndex:"course_group_name"}]),dataSource:Object(d.a)(ne),rowSelection:Object(h.a)({type:"checkbox"},fe),pagination:{pageSize:10,defaultCurrent:1}}))))})),ct=n("m3rI"),ut=L.a.TextArea,dt=Q.a.RangePicker,ht=ie.a.Option,ft=Object(_.a)((function(e){var t=e.exercise,n=e.loading,r=e.globalSetting;return{exercise:t,loading:n.effects,globalSetting:r}}))((function(e){var t,n,r,i,o,l,p,m,x,_,k,w=e.exercise,C=(e.globalSetting,e.loading,e.dispatch),A=Object(E.i)(),I=(Object(E.h)(),w.workSetting),N=w.commonHeader,j=Object(v.useState)(!0),H=Object(f.a)(j,2),G=H[0],V=H[1],W=Object(v.useState)([]),K=Object(f.a)(W,2),q=(K[0],K[1]),Y=Object(v.useState)({}),J=Object(f.a)(Y,2),ee=(J[0],J[1],Object(v.useState)([])),te=Object(f.a)(ee,2),ne=(te[0],te[1],Object(v.useState)()),re=Object(f.a)(ne,2),ae=re[0],oe=re[1],se=U.a.useForm(),le=(Object(f.a)(se,1)[0],Object(v.useState)([])),ce=Object(f.a)(le,2),ue=ce[0],de=ce[1],he=Object(v.useState)({ip_bind:!1,export_page_num:40,ip_limit:null,public_ip:[],inner_ip:[],screen_open:!1,screen_num:3,screen_sec:5,open_camera:!1,identity_verify:!1,open_phone_video_recording:!1,photo_count:5,open_make_up:!1,unified_setting:!1,publish_time:"",end_time:"",group_make_ups:[],unified_make_up:!1,make_up_score:0,send_role:"random",open_time:"",time:"",choice_random:!1,question_random:!1,show_statistic:!1,assistant_auth:!1,answer_open:!1,score_open:!1,answered_open:!0,open_score:!0,open_total_score:!0,file_list:[],show_title:!1,show_body:!1,show_info:!1,show_table:!0,show_user:!1,show_no:!1,show_group:!0,show_desc:!1,description:"",attachment_id:"",disbale_usb:!1,disable_bluebooth:!1,enable_disconnection:!1,allow_access_address:""}),fe=Object(f.a)(he,2),pe=fe[0],me=fe[1];function ge(){return(ge=Object(c.a)(g.a.mark((function e(){var t;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(y.a)("/api/courses/".concat(null==A?void 0:A.coursesId,"/exercises/overload_alert.json"),{method:"get",params:{course_id:null==A?void 0:A.coursesId}});case 2:t=e.sent,oe(null==t?void 0:t.alert);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}A.category=A.categoryId,Object(v.useEffect)((function(){be()}),[I]),Object(v.useEffect)((function(){C({type:"exercise/getWorkSetting",payload:Object(h.a)({},A)}),Object($.s)()||function(){ge.apply(this,arguments)}()}),[]),Object(v.useEffect)((function(){"insterIp"===w.actionTabs.key&&(w.actionTabs.data.ip?pe[w.actionTabs.type]=[].concat(Object(d.a)(pe[w.actionTabs.type]||[]),Object(d.a)(w.actionTabs.data.ip)):w.actionTabs.data.zz?pe[w.actionTabs.type]=[].concat(Object(d.a)(pe[w.actionTabs.type]||[]),[w.actionTabs.data.zz]):pe[w.actionTabs.type]=[].concat(Object(d.a)(pe[w.actionTabs.type]||[]),["".concat(w.actionTabs.data.startIP,",").concat(w.actionTabs.data.startIP.substring(0,w.actionTabs.data.startIP.lastIndexOf("."))+"."+w.actionTabs.data.endIP)]),me(Object(h.a)({},pe)))}),[w.actionTabs]);var ve,be=function(){var e,t,n,r,i,a,o,s=JSON.parse(JSON.stringify(I));Object.keys(pe).map((function(e){var t,n,r,i,a;(pe[e]=(null==s||null===(t=s.exercise)||void 0===t?void 0:t[e])||(null==s||null===(n=s.exercise_header)||void 0===n?void 0:n[e]),null!=s&&null!==(r=s.exercise_header)&&void 0!==r&&r[e])?pe[e]=null==s||null===(i=s.exercise_header)||void 0===i?void 0:i[e]:pe[e]=null==s||null===(a=s.exercise)||void 0===a?void 0:a[e]})),pe.file_list=null!=s&&null!==(e=s.exercise_header)&&void 0!==e&&e.attachment_id?[{uid:null==s||null===(t=s.exercise_header)||void 0===t?void 0:t.attachment_id,id:null==s||null===(n=s.exercise_header)||void 0===n?void 0:n.attachment_id,url:null==s||null===(r=s.exercise_header)||void 0===r?void 0:r.photo_url}]:[],ue=(null==s||null===(i=s.published_course_groups)||void 0===i?void 0:i.map((function(e){return{course_group_id:e.course_group_id,end_time:e.course_end_time,publish_time:e.course_publish_time}})))||[{}],null==I||null===(a=I.course_groups)||void 0===a||a.map((function(e,t){e.cilckkey="",e.isselect=!1})),null==I||null===(o=I.course_groups)||void 0===o||o.map((function(e,t){var n;null==I||null===(n=I.published_course_groups)||void 0===n||n.map((function(t,n){var r;null!=t&&null!==(r=t.course_group_id)&&void 0!==r&&r.includes(null==e?void 0:e.course_group_id)&&(e.cilckkey=n,e.isselect=!0)}))})),console.log("data:",pe,I),me(pe),de(ue)},ye=function(e){Object(S.cb)(Object(h.a)({},e)).then((function(e){0===e.status&&(s.b.success("更新成功"),C({type:"exercise/getCommonHeader",payload:Object(h.a)({},A)}),C({type:"exercise/getWorkSetting",payload:Object(h.a)({},A)}),V(!0))}))},Ee=function(e){return e&&e<z()().startOf("minute")},xe=function(e){var t,n;return(null==I||null===(t=I.exercise)||void 0===t?void 0:t.exercise_status)>1&&(null==e||!e.new)||!(null==I||null===(n=I.published_course_groups)||void 0===n||!n.some((function(t){return t.course_group_id===e.course_group_id})))&&G},_e={disabled:G,multiple:!1,listType:"picture-card",onPreview:function(e){Z.a.publish("preview-image",e.thumbUrl)},withCredentials:!0,fileList:pe.file_list,beforeUpload:function(e){return!(e.size/1024>200)||(s.b.error("该文件无法上传。超过文件大小限制(200KB),建议上传到百度云等其它共享工具里,然后再txt文档里给出链接以及共享密码并上传"),!1)},action:"".concat(ct.a.API_SERVER,"/api/attachments.json"),onChange:function(e){var t=e.fileList.filter((function(e){return!!e.status}));pe.file_list=t,me(Object.assign({},pe))},onRemove:(ve=Object(c.a)(g.a.mark((function e(t){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return pe.file_list=[],me(Object.assign({},pe)),e.abrupt("return",!0);case 3:case"end":return e.stop()}}),e)}))),function(e){return ve.apply(this,arguments)})};return b.a.createElement("section",{className:[it.a.form,"mb50 bg-white"].join(" ")},b.a.createElement(M.a,null,b.a.createElement(P.a,{span:24},b.a.createElement(M.a,{align:"middle"},b.a.createElement(P.a,{flex:"1"},b.a.createElement("h1",{className:"mt15"},"发布设置")),b.a.createElement(P.a,null,Object($.c)()&&G&&b.a.createElement(a.a,{type:"primary",size:"middle",ghost:!0,onClick:function(){return V(!1)}},"编辑设置")))),(null===(t=I.course_groups)||void 0===t?void 0:t.length)>0&&b.a.createElement(P.a,{span:24,className:"mt10"},b.a.createElement(R.a,{checked:pe.unified_setting,disabled:G||(null==I||null===(n=I.exercise)||void 0===n?void 0:n.exercise_status)>1,onChange:function(){var e;(null==I||null===(e=I.exercise)||void 0===e?void 0:e.exercise_status)>1?s.b.error("已发布,不能再修改分班统一发布"):(pe.unified_setting=!pe.unified_setting,!1===pe.unified_setting&&""==ue&&de(ue.concat({})),me(Object.assign({},pe)))}},b.a.createElement("strong",null,"分班统一发布")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中则所有分班使用相同的发布设置,仅课堂管理员可修改;否则各个分班允许单独设置)")),b.a.createElement("span",{style:{color:"red"}},(null==I||null===(r=I.exercise)||void 0===r?void 0:r.exercise_status)>1&&ae&&"当前课堂中学生人数较多,为提供更好的服务,我们将进行服务器扩容,建议您在30分钟后发起作业与测验。您也可以立即发布。")),pe.unified_setting&&b.a.createElement("div",null,b.a.createElement(M.a,{align:"middle",className:"mt25 pl30"},b.a.createElement(P.a,null,"发布时间:"),b.a.createElement(P.a,{className:"ml5"},b.a.createElement(B.a,{placement:"bottom",title:(null==I||null===(i=I.exercise)||void 0===i?void 0:i.exercise_status)>1&&"发布时间已过,不能修改"},b.a.createElement(Q.a,{style:{width:170},placeholder:"请选择发布时间",showTime:{format:"HH:mm",defaultValue:z()(Object(O.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabledDate:Ee,disabled:G||(null==I||null===(o=I.exercise)||void 0===o?void 0:o.exercise_status)>1,value:pe.publish_time?z()(pe.publish_time):"",allowClear:!1,onChange:function(e,t){pe.publish_time=t,pe.end_time||(pe.end_time=z()(e).add(1,"month").format("YYYY-MM-DD HH:mm:ss")),me(Object.assign({},pe))}}))),b.a.createElement(P.a,null,b.a.createElement("span",{className:"c-grey-c ml10"},"(学生开始答题时间)"))),b.a.createElement(M.a,{align:"middle",className:"mt25 pl30"},b.a.createElement(P.a,null,"截止时间:"),b.a.createElement(P.a,{className:"ml5"},b.a.createElement(Q.a,{style:{width:170},placeholder:"请选择截止时间",showTime:{format:"HH:mm",defaultValue:z()(Object(O.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:G,allowClear:!1,value:pe.end_time?z()(pe.end_time):"",disabledDate:function(e){return pe.end_time?e&&(e<z()(pe.publish_time).startOf("minute")||e<z()().startOf("minute")):e&&e<z()().startOf("minute")},onChange:function(e,t){pe.end_time=t,me(Object.assign({},pe))}})),b.a.createElement(P.a,null,b.a.createElement("span",{className:"c-grey-c ml10"},"(学生结束答题时间)")))),!pe.unified_setting&&b.a.createElement(M.a,{style:{marginTop:30,paddingTop:40,marginLeft:40,borderTop:"1px solid #eee"}},b.a.createElement(P.a,{span:24},b.a.createElement(M.a,null,b.a.createElement(P.a,{span:10}),b.a.createElement(P.a,{span:9},b.a.createElement(M.a,{className:"c-grey-c"},b.a.createElement(P.a,{flex:"1"},"(学生开始答题时间)"),b.a.createElement(P.a,{flex:"1"},"(学生结束答题时间)"))),b.a.createElement(P.a,{span:4}))),ue&&ue.map((function(e,t){return b.a.createElement(P.a,{span:24,key:t},b.a.createElement(M.a,{gutter:[8,16]},b.a.createElement(P.a,{span:9},b.a.createElement(M.a,null,b.a.createElement(P.a,null,"发布规则 ",t+1),b.a.createElement(P.a,{style:{flexBasis:332}},b.a.createElement(ie.a,{allowClear:!0,disabled:xe(e),className:"ml20",mode:"multiple",size:"large",style:{width:"100%"},value:e.course_group_id,placeholder:"请选择分班名称",optionFilterProp:"label",onChange:function(e){ue[t].course_group_id=e,q(ue.map((function(e){return e.course_group_id})).toString().split(",")),de(ue.slice()),I.course_groups.map((function(n,r){e.map((function(e,r){n.course_group_id===e&&(n.cilckkey=t,n.isselect=!0)}))})),console.log(I,"workSetting")},onDeselect:function(e){I.course_groups.map((function(n,r){n.course_group_id===e&&n.cilckkey===t&&(n.cilckkey=t,n.isselect=!1)}))}},I.course_groups&&I.course_groups.map((function(e,n){return b.a.createElement(ht,Object(F.a)({key:n,disabled:(null==e?void 0:e.isselect)&&e.cilckkey!=t,label:e.course_group_name,value:e.course_group_id},"key",e.course_group_id),e.course_group_name)})))))),b.a.createElement(P.a,{span:1}),b.a.createElement(P.a,{span:9},b.a.createElement(dt,{disabled:(n=e,G?[!0,!0]:(null==I||null===(r=I.exercise)||void 0===r?void 0:r.exercise_status)>1?null!=n&&n.new?[!1,!1]:[!0,!1]:null!=I&&null!==(i=I.published_course_groups)&&void 0!==i&&i.some((function(e){return e.course_group_id===n.course_group_id}))&&(G||(null==I||null===(a=I.exercise)||void 0===a?void 0:a.exercise_status)>1)?[!0,!1]:[!1,!1]),disabledDate:Ee,style:{width:400},placeholder:["请选择发布时间","请选择截止时间"],showTime:{format:"HH:mm",defaultValue:[z()(Object(O.d)(),"HH:mm"),z()(Object(O.d)(),"HH:mm")]},format:"YYYY-MM-DD HH:mm",size:"large",value:e.publish_time&&[z()(e.publish_time),e.end_time&&z()(e.end_time)],onChange:function(n,r){xe(e)||(ue[t].publish_time=r[0]),ue[t].end_time=r[1],de(Object(d.a)(ue))}})),!G&&b.a.createElement(P.a,{span:4},t>0&&(null==e?void 0:e.new)&&b.a.createElement(Je.a,{onClick:function(){ue=ue.filter((function(e,n){return t!==n})),de(Object(d.a)(ue))}}),b.a.createElement(Xe.a,{className:"c-green ml20",onClick:function(){de(ue.concat({new:!0}))}}))));var n,r,i,a}))),b.a.createElement(Ae.a,null),(3===(null==N?void 0:N.exercise_status)||pe.open_make_up)&&b.a.createElement(b.a.Fragment,null,b.a.createElement(lt,{data:pe,disabled:G,updata:me}),b.a.createElement(Ae.a,null)),b.a.createElement(M.a,null,b.a.createElement(P.a,null,b.a.createElement("strong",null,"答题设置")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement("span",null,"答题时长:"),b.a.createElement(D.a,{size:"large",disabled:G,min:1,value:-1===pe.time?null:pe.time,onChange:function(e){pe.time=e,me(Object(h.a)({},pe))}}),b.a.createElement("span",{className:"ml10"},"分钟"),b.a.createElement("span",{className:"c-grey-c font12 ml10"},"(空值,代表不限时长;非空值,代表限制时长,从学生首次答题开始持续计时)")),(null==N?void 0:N.is_random)&&b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement("span",null,"分发规则:"),b.a.createElement(T.a.Group,{disabled:G,value:pe.send_role,onChange:function(e){pe.send_role=e.target.value,me(Object(h.a)({},pe))}},b.a.createElement(T.a,{value:"random"},"默认随机分发"),b.a.createElement(T.a,{value:"ip"},"根据IP地址分发"),b.a.createElement(T.a,{value:"student_id"},"根据学号分发"))),!(null!=N&&N.is_random)&&b.a.createElement(b.a.Fragment,null,b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:pe.question_random,disabled:G,onChange:function(e){pe.question_random=e.target.checked,me(Object.assign({},pe))}},b.a.createElement("strong",null,"题目顺序随机打乱")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中,则学生答题时,题目顺序按照题型随机显示)")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:pe.choice_random,disabled:G,onChange:function(e){pe.choice_random=e.target.checked,me(Object.assign({},pe))}},b.a.createElement("strong",null,"选项顺序随机打乱")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中,则学生答题时,选项顺序随机显示)")))),b.a.createElement(Ae.a,null),b.a.createElement(b.a.Fragment,null,b.a.createElement(M.a,null,b.a.createElement(P.a,null,b.a.createElement("strong",null,"防作弊设置")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:pe.identity_verify,disabled:!Object($.o)()||G,onChange:function(e){pe.identity_verify=e.target.checked,me(Object.assign({},pe))}},b.a.createElement("strong",null,"作业与测验前人脸身份核验")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中,则学生参加作业与测验前将会要求调用摄像头并完成拍照采集,教师/助教审核通过后学生并开启手机录制视频则可以开始作业与测验)"),b.a.createElement("br",null),b.a.createElement("span",{className:"c-grey-c font12"},"如开启,教师/助教可以在该进行中的详情页中对学生人脸身份进行审核。")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:pe.open_camera,disabled:G,onChange:function(e){pe.time?(pe.open_camera=e.target.checked,pe.photo_count=pe.photo_count||5,me(Object.assign({},pe))):s.b.error("不限时长的作业与测验不可开启摄像头,请填写作业与测验时长")}},b.a.createElement("strong",null,"进行中启用拍照监考")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中,则学生参加作业与测验时将会要求调用摄像头)")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement("span",null,"本场作业与测验最多拍摄:"),b.a.createElement(D.a,{size:"large",disabled:G||!pe.open_camera,min:1,defaultValue:5,max:Object($.v)()?1e3:10,value:pe.photo_count,onChange:function(e){pe.photo_count=e,me(Object(h.a)({},pe))}}),b.a.createElement("span",{className:"ml10"},"(次)"),b.a.createElement("span",{className:"c-grey-c font12 ml10"},"(请填写不大于10的正整数)")),b.a.createElement(P.a,{className:"c-grey-c font12 pl30 mt10"},"如开启防作弊设置,学生必须同意才可以参加作业与测验。"),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:pe.screen_open,disabled:G,onChange:function(e){pe.screen_open=e.target.checked,me(Object.assign({},pe))}},b.a.createElement("strong",null,"切屏后强制交卷"))),pe.screen_open&&b.a.createElement(P.a,{span:24,className:"mt15 pl30 font14"},b.a.createElement("span",{className:"c-grey-333 mr10"},"作业与测验过程中切换页面超过"),b.a.createElement(D.a,{size:"large",disabled:G,min:0,defaultValue:3,max:10,value:pe.screen_num,onChange:function(e){pe.screen_num=e,me(Object(h.a)({},pe))}}),b.a.createElement("span",{className:"c-grey-333 mr10"},"(次)后将被强制交卷,切换到其他页面"),b.a.createElement(D.a,{size:"large",disabled:G,min:0,defaultValue:5,max:60,value:pe.screen_sec,onChange:function(e){pe.screen_sec=e,me(Object(h.a)({},pe))}}),b.a.createElement("span",{className:"c-grey-333"},"(秒)后即判定为切屏。")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:"no"!==pe.ip_limit,disabled:G,onChange:function(e){"no"===pe.ip_limit?pe.ip_limit="pub":pe.ip_limit="no",me(Object.assign({},pe))}},b.a.createElement("strong",null,"限制作业与测验访问IP"),b.a.createElement("span",{className:"font12 c-grey-c"},"(不在IP范围中的将无法参加此作业与测验)"))),"no"!==pe.ip_limit&&b.a.createElement(P.a,{className:"mt15 ml50"},b.a.createElement("span",{className:"c-red"},"(只允许在Chrome谷歌浏览器作答,并且要求学生安装WebRTC Leak Prevent插件)"),b.a.createElement("a",{className:"c-blue",target:"_blank",href:"https://www.educoder.net/forums/4478"},"如何安装WebRTC Leak Prevent插件?"))),"no"!==pe.ip_limit&&b.a.createElement(b.a.Fragment,null,b.a.createElement(M.a,{className:"mt15 ml50 ".concat(it.a.ipWrp)},b.a.createElement(P.a,null,b.a.createElement("span",null,"公网IP地址范围:")),b.a.createElement(P.a,null,!(null!==(l=pe.public_ip)&&void 0!==l&&l.length)&&b.a.createElement("span",null,"当前还未设置IP范围"),null===(p=pe.public_ip)||void 0===p?void 0:p.map((function(e,t){return b.a.createElement("span",{className:it.a.ipItem},b.a.createElement("i",null,e," "),!G&&b.a.createElement(Ze.a,{onClick:function(){u.a.confirm({okText:"确定",cancelText:"取消",title:"确定删除该IP吗?",onOk:function(){pe.public_ip.splice(t,1),me(Object(h.a)({},pe))}})},className:" c-grey-c",size:20}))})),Object($.c)()&&!G&&b.a.createElement("span",{onClick:function(){C({type:"exercise/setActionTabs",payload:{key:"addIp",type:"public_ip"}})},className:"font14 c-blue ml10"}," ",b.a.createElement("i",{className:"iconfont icon-xuanyong font14"})," 添加"))),b.a.createElement(M.a,{className:"mt15 ml50 ".concat(it.a.ipWrp)},b.a.createElement(P.a,null,b.a.createElement("span",null,"内网IP地址范围:")),b.a.createElement(P.a,null,!(null!==(m=pe.inner_ip)&&void 0!==m&&m.length)&&b.a.createElement("span",null,"当前还未设置IP范围"),null===(x=pe.inner_ip)||void 0===x?void 0:x.map((function(e,t){return b.a.createElement("span",{className:it.a.ipItem},b.a.createElement("i",null,e," "),!G&&b.a.createElement(Ze.a,{onClick:function(){G||u.a.confirm({title:"确定删除该IP吗?",onOk:function(){pe.inner_ip.splice(t,1),me(Object(h.a)({},pe))}})},className:" c-grey-c",size:20}))})),Object($.c)()&&!G&&b.a.createElement("span",{className:"font14 c-blue ml10",onClick:function(){C({type:"exercise/setActionTabs",payload:{key:"addIp",type:"inner_ip"}})}}," ",b.a.createElement("i",{className:"iconfont icon-xuanyong font14"})," 添加")))),b.a.createElement(M.a,null,b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:pe.ip_bind,disabled:G,onChange:function(e){pe.ip_bind=e.target.checked,me(Object.assign({},pe))}},b.a.createElement("strong",null,"IP绑定"),b.a.createElement("span",{className:"font12 c-grey-c"},"(作业与测验开始后,学生的账号将自动与机器IP绑定。如遇特殊情况,教师/助教可以解除学生的IP绑定)")))),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:pe.enable_disconnection,disabled:G,onChange:function(e){pe.enable_disconnection=e.target.checked,me(Object.assign({},pe))}},b.a.createElement("strong",null,"启用断网"),b.a.createElement("span",{className:"font12 c-grey-c"},"(启用断网后,考试期间只允许访问以下特定的地址。如果需要访问多个域名或者IP,用英文的分号间隔)"))),pe.enable_disconnection&&b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(L.a,{value:null===(_=pe.allow_access_address)||void 0===_?void 0:_.toString().replaceAll(",",";"),disabled:G,onChange:function(e){pe.allow_access_address=e.target.value,me(Object.assign({},pe))}})),b.a.createElement(Ae.a,null)),b.a.createElement(b.a.Fragment,null,b.a.createElement(M.a,null,b.a.createElement(P.a,null,b.a.createElement("strong",null,"客户端设置")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement("div",null,b.a.createElement("span",{className:"c-red"},"(开启客户端设置的考试,必须要求学生在Windows系统下考试,并且需要安装考试系统客户端)"),b.a.createElement("a",{target:"_blank",href:"/examinationSystem.exe"},"点击下载【考试系统客户端】"))),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:pe.disbale_usb,disabled:G,onChange:function(e){pe.disbale_usb=e.target.checked,me(Object.assign({},pe))}},b.a.createElement("strong",null,"禁用usb接口")),b.a.createElement("span",{className:"c-grey-c font12"},"(禁止考生插入U盘、移动硬盘等)")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:pe.disable_bluebooth,disabled:G,onChange:function(e){pe.disable_bluebooth=e.target.checked,me(Object.assign({},pe))}},b.a.createElement("strong",null,"禁用蓝牙")),b.a.createElement("span",{className:"c-grey-c font12"},"(禁止考生使用电脑的蓝牙功能)"))),b.a.createElement(Ae.a,null)),b.a.createElement(M.a,null,b.a.createElement(P.a,null,b.a.createElement("strong",null,"属性设置")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:pe.score_open,disabled:G,onChange:function(e){pe.score_open=e.target.checked,me(Object.assign({},pe))}},b.a.createElement("strong",null,"公开成绩")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中,则在作业与测验截止时间之后,已提交答题的学生可以查看其它学生的成绩,否则只能查看自己的成绩;但未选中“查看总成绩”时自己和其他同学成绩均不可见)")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:pe.answer_open,disabled:G,onChange:function(e){pe.answer_open=e.target.checked,me(Object.assign({},pe))}},b.a.createElement("strong",null,"公开答案")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中,则在作业与测验截止时间之后,已提交答题的学生可以查看作业与测验题目的答案,否则不能查看)")),b.a.createElement(P.a,{span:24,className:"mt15 pl30 "},b.a.createElement(R.a,{checked:pe.show_statistic,disabled:G,onChange:function(e){pe.show_statistic=e.target.checked,me(Object.assign({},pe))}},b.a.createElement("strong",null,"公开统计")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中,则在作业与测验截止时间之后,已提交答题的学生可以查看答题统计,否则不能查看)")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:pe.open_total_score,disabled:G,onChange:function(e){pe.open_total_score=e.target.checked,!1===e.target.checked&&(pe.open_score=e.target.checked),me(Object.assign({},pe))}},b.a.createElement("strong",null,"查看总成绩")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中,则学生交卷后能看到自己的总成绩及每个小题的得分,否则总成绩和小题得分均不能查看)")),pe.open_total_score&&b.a.createElement(P.a,{style:{marginLeft:20},span:24,className:"mt15 pl30"},b.a.createElement("strong",null,"公开时间"),b.a.createElement(Q.a,{format:"YYYY-MM-DD HH:mm:ss",style:{margin:"0px 15px"},disabled:G,onChange:function(e,t){pe.open_time=t,me(Object.assign({},pe))},value:pe.open_time?z()(pe.open_time):"",disabledDate:Ee,showTime:{defaultValue:z()("00:00:00","HH:mm:ss")}}),b.a.createElement("span",{className:"c-grey-c font12"},"(可设置成绩公布的时间;未设置时,学生交卷后可立即查看个人成绩)")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:pe.open_score,disabled:!pe.open_total_score||G,onChange:function(e){pe.open_score=e.target.checked,me(Object.assign({},pe))}},b.a.createElement("strong",null,"查看小题得分")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中,则学生交卷后能看到自己每个小题的得分详情,否则不能查看。选中本项前必须先选中“查看总成绩”)")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:pe.answered_open,disabled:G,onChange:function(e){pe.answered_open=e.target.checked,me(Object.assign({},pe))}},b.a.createElement("strong",null,"查看已答作业与测验")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中,则学生交卷后能查看作业与测验和成绩;否则只能查看成绩,不能查看作业与测验)")),b.a.createElement(P.a,{span:24,className:"mt15 pl30 pb40"},b.a.createElement(R.a,{checked:pe.assistant_auth,disabled:G,onChange:function(e){pe.assistant_auth=e.target.checked,me(Object.assign({},pe))}},b.a.createElement("strong",null,"助教查看答案")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中,则允许助教查看答案)"))),b.a.createElement(Ae.a,null),Object($.c)()&&b.a.createElement(M.a,null,b.a.createElement(P.a,{flex:"600px"},b.a.createElement(M.a,null,b.a.createElement(P.a,null,b.a.createElement("strong",null,"作业与测验导出格式设置")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement("strong",null,"卷头左角标"),b.a.createElement("span",{className:"c-grey-c font12"},"(位于首页左上角,请以图片上传;大小请勿超过200k,尺寸为700x500)")),b.a.createElement("div",{className:"mt15 pl30"},b.a.createElement(Qe.a,_e,!(null!==(k=pe.file_list)&&void 0!==k&&k.length)&&b.a.createElement("div",null,b.a.createElement($e.a,null),b.a.createElement("div",{style:{marginTop:8}},"上传")))),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:pe.show_title,disabled:G,onChange:function(e){pe.show_title=e.target.checked,me(Object.assign({},pe))}},b.a.createElement("strong",null,"展示作业与测验标题")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中则在卷头展示作业与测验标题)")),b.a.createElement(P.a,{span:24,className:"mt15 pl30 "},b.a.createElement(R.a,{checked:pe.show_body,disabled:G,onChange:function(e){pe.show_body=e.target.checked,me(Object.assign({},pe))}},b.a.createElement("strong",null,"展示作业与测验内容")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中则在卷头展示作业与测验内容,即本作业与测验所属课程名称)")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:pe.show_info,disabled:G,onChange:function(e){pe.show_info=e.target.checked,me(Object.assign({},pe))}},b.a.createElement("strong",null,"展示题量、分值、作业与测验时长")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中则在卷头展示题量、分值、作业与测验时长信息)")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:pe.show_table,disabled:G,onChange:function(e){pe.show_table=e.target.checked,me(Object.assign({},pe))}},b.a.createElement("strong",null,"展示得分、评分表格")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中则给出学生的得分、评分表格)")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement("strong",null,"密封线区域设置"),b.a.createElement(R.a,{className:"pl8",checked:pe.show_user,disabled:G,onChange:function(e){pe.show_user=e.target.checked,me(Object.assign({},pe))}},b.a.createElement("strong",null,"姓名")),b.a.createElement(R.a,{checked:pe.show_no,disabled:G,onChange:function(e){pe.show_no=e.target.checked,me(Object.assign({},pe))}},b.a.createElement("strong",null,"学号")),b.a.createElement(R.a,{checked:pe.show_group,disabled:G,onChange:function(e){pe.show_group=e.target.checked,me(Object.assign({},pe))}},b.a.createElement("strong",null,"专业班级"))),Object($.o)()&&b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement("span",null,"每页导出最大试题数:"),b.a.createElement(D.a,{size:"large",min:1,value:pe.export_page_num?pe.export_page_num:40,onChange:function(e){pe.export_page_num=e,me(Object(h.a)({},pe))}}),b.a.createElement("span",{className:"ml10"},"题")),b.a.createElement("span",{className:"c-grey-c font12 pl30 pt10"},"(勾选项将会出现在首页左侧密封线内,不选则代表不设置密封区)"),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:pe.show_desc,disabled:G,onChange:function(e){pe.show_desc=e.target.checked,me(Object.assign({},pe))}},b.a.createElement("strong",null,"作业与测验说明")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中开启文本编辑器,可输入500字以内的作业与测验说明)")),pe.show_desc&&b.a.createElement("div",{className:"mt15 pl30 pb40"},G?b.a.createElement(ut,{style:{height:150,width:550},disabled:!0,value:pe.description}):b.a.createElement(at.a,{width:550,height:150,defaultValue:pe.description,id:"exercise-detail-config-exam-description-id",onChange:function(e){pe.description=e,me(Object.assign({},pe))}})))),b.a.createElement(P.a,{flex:1,className:"pt40 mb20"},b.a.createElement("div",{className:"pb10"},"示例图片预览:"),b.a.createElement("img",{src:Se.o}))),!G&&b.a.createElement(P.a,{className:"mb50 pb10 btn-w120"},b.a.createElement(a.a,{type:"primary",size:"large",onClick:function(){return function(){var e,t,n,r,i,a=JSON.parse(JSON.stringify(pe));if(a.categoryId=A.categoryId,a.publish_time_groups=ue,a.attachment_id=(null===(e=a.file_list)||void 0===e||null===(t=e[0])||void 0===t||null===(n=t.response)||void 0===n?void 0:n.id)||null,delete a.file_list,pe.unified_setting){if(!pe.publish_time||!pe.end_time)throw s.b.error("发布截止时间不能为空"),new String("发布截止时间不能为空")}else{if(!ue.length)return void s.b.warn("提交失败:分班发布设置不能为空");delete a.publish_time,delete a.end_time,ue.map((function(e){var t;if(!e.course_group_id||null===(t=e.course_group_id)||void 0===t||!t.length)throw s.b.error("分班不能为空"),new String("分班不能为空");if(!e.publish_time||!e.end_time)throw s.b.error("发布截止时间不能为空"),new String("发布截止时间不能为空")}))}if(pe.open_camera&&pe.photo_count<1)throw s.b.error("请填写本场作业与测验最大拍摄次数"),new String("请填写本场作业与测验最大拍摄次数");if(!("no"===pe.ip_limit||null!==(r=pe.public_ip)&&void 0!==r&&r.length||null!==(i=pe.inner_ip)&&void 0!==i&&i.length))throw s.b.error("请填写公网IP或内网IP地址"),new String("请填写内网IP地址");if(pe.open_camera||pe.screen_open)var o=u.a.confirm({title:"作业与测验说明",className:"custom-modal-divider",icon:null,width:750,content:b.a.createElement("div",{className:"font16 p20"},pe.open_camera&&b.a.createElement(M.a,{align:"",justify:"start",className:"mt20"},b.a.createElement(P.a,{flex:"24px"},b.a.createElement("span",{className:"iconfont icon-kaiqishexiangtou c-blue mr20 font24"})),b.a.createElement(P.a,{flex:"1"},"您已开启进行中摄像防作弊功能,",b.a.createElement("span",{className:"c-red"},"这需要调用学生用户的摄像设备"),"。Educoder平台将会严格保护所有学生的照片和视频,并承诺不在本平台以外使用。",b.a.createElement("br",null),"请确认:为严格监督作业与测验以获得公平,您同意并和要求Educoder平台在本次进行中调用学生用户的摄像设备并获取学生的影像信息。")),pe.screen_open&&b.a.createElement(M.a,{justify:"start",className:"mt20"},b.a.createElement(P.a,{flex:"24px",className:"mr20"},b.a.createElement("span",{className:"iconfont icon-kaiqifangqieping c-blue font24"})),b.a.createElement(P.a,{flex:"1"},"您已开启进行中防切屏功能,这项功能暂时仅支持谷歌、火狐浏览器。 请确保:在正式开始作业与测验前通知全体学生,使用 ",b.a.createElement("img",{width:"26",src:Se.g})," ",b.a.createElement("span",{className:"c-red"},"谷歌浏览器"),"或",b.a.createElement("img",{width:"26",src:Se.p})," ",b.a.createElement("span",{className:"c-red"},"火狐浏览器"),"进行作业与测验。")),b.a.createElement("p",{className:"ml40 mt40"},b.a.createElement(R.a,{onChange:function(e){return o.update({okButtonProps:{disabled:!e.target.checked}})}},"我已阅读"))),onOk:function(){ye(a)},okButtonProps:{disabled:!0}});else ye(a)}()}},"提交"),b.a.createElement(a.a,{onClick:function(){V(!0),be()},type:"primary",size:"large",ghost:!0,className:"ml20"},"取消")),b.a.createElement(X.a,null),b.a.createElement(nt,null))})),pt=(n("MXD1"),n("CFYs")),mt=n("9Bee"),gt=n("51gm"),vt=n.n(gt),bt={0:"单选题",1:"多选题",2:"判断题",3:"填空题",4:"问答题",5:"实训题",6:"编程题",7:"接龙题"},yt={1:"满分作答",2:"部分得分作答",3:"零分作答",4:"未批"},Et=Object(_.a)((function(e){return{exercise:e.exercise,loading:e.loading.effects}}))((function(e){var t,n,r=e.exercise,i=e.loading,a=e.dispatch,o=Object(E.i)(),s=Object(v.useState)(Object(h.a)(Object(h.a)({},o),{sort:"asc",page:1,limit:10})),l=Object(f.a)(s,2),u=l[0],d=l[1],p=(Object(E.h)(),r.statisticsList),m=Object(v.useState)({}),y=Object(f.a)(m,2),x=y[0],_=(y[1],Object(v.useState)([])),k=Object(f.a)(_,2),w=k[0],C=k[1],S=Object(v.useState)(""),A=Object(f.a)(S,2),T=(A[0],A[1],Object(v.useState)("")),D=Object(f.a)(T,2),L=(D[0],D[1],U.a.useForm()),j=Object(f.a)(L,1)[0],B=[{title:"提交率",dataIndex:"commit_percent",align:"center",render:function(e){return b.a.createElement("span",null,0===e?0:(100*e).toFixed(2),"%")}},{title:"最低分",dataIndex:"min_score",align:"center",render:function(e){return b.a.createElement("span",null,e,"分")}},{title:"最高分",dataIndex:"max_score",align:"center",render:function(e){return b.a.createElement("span",{className:"c-orange"},e,"分")}},{title:"平均分",dataIndex:"average_score",align:"center",render:function(e){return b.a.createElement("span",null,e,"分")}},{title:"不及格(得分 低于60%)",dataIndex:"fail_counts",align:"center",render:function(e){return b.a.createElement("span",null,e,"人")}},{title:"及格(得分60%~70%)",dataIndex:"pass_counts",align:"center",render:function(e){return b.a.createElement("span",null,e,"人")}},{title:"良好(得分70%~90%)",dataIndex:"good_counts",align:"center",render:function(e){return b.a.createElement("span",null,e,"人")}},{title:"优秀(得分90%~100%)",dataIndex:"best_counts",align:"center",render:function(e){return b.a.createElement("span",{className:"c-orange"},e,"人")}}],H=function(){var e=Object(c.a)(g.a.mark((function e(){var t;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a({type:"exercise/getExerciseStatistics",payload:Object(h.a)({},u)});case 2:null!=(t=e.sent)&&t.exercise_counts&&C([t.exercise_counts]);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(v.useEffect)((function(){H()}),[u.coursesId]),b.a.createElement(b.a.Fragment,null,b.a.createElement("section",{className:"minH500 bg-white"},b.a.createElement("aside",{className:"pt20"},b.a.createElement(U.a,{form:j,onChange:function(){var e=Object.assign({},j.getFieldValue());Object.keys(e).map((function(t){e[t].includes("all")?(delete u[t],j.setFieldsValue(Object(F.a)({},t,"all"))):(u[t]=e[t],j.setFieldsValue(Object(F.a)({},t,u[t])))})),u.page=1,u.limit=10,H()},initialValues:(t={},Object(F.a)(t,"commit_status","all"),Object(F.a)(t,"exercise_group_id","all"),Object(F.a)(t,"review","all"),t)},b.a.createElement(U.a.Item,{name:"exercise_group_id"},b.a.createElement(R.a.Group,{style:{width:"100%"}},b.a.createElement(M.a,null,b.a.createElement(P.a,{flex:"80px",className:"font14"},"分班情况:"),b.a.createElement(P.a,{flex:"80px"},b.a.createElement(R.a,{value:"all",checked:!x.course_group},"全部")),b.a.createElement(P.a,{flex:"1",className:vt.a.wrap},p.course_groups&&p.course_groups.map((function(e,t){return b.a.createElement(R.a,{value:e.exercise_group_id,key:t},e.exercise_group_name,"(",e.exercise_group_students,")")})))))))),b.a.createElement(N.a,{className:"mt30",loading:i["exercise/getExerciseStatistics"],pagination:!1,dataSource:w,columns:B}),b.a.createElement("div",{className:vt.a.title},b.a.createElement(M.a,{align:"middle",style:{height:"100%"},className:"ml5 mr5"},b.a.createElement(P.a,{flex:1,className:"font16"},"统计详情"),b.a.createElement(P.a,{className:"font16"},b.a.createElement("span",{className:"current",onClick:function(){u.sort="desc"===u.sort?"asc":"desc",u.sort_by="cost_time",console.log("xx params.sort: ",u.sort),d(Object(h.a)({},u)),H()}},b.a.createElement("span",null,"平均完成时间"),b.a.createElement("p",{className:"edu-sorter current ".concat("cost_time"===u.sort_by?u.sort:"")},b.a.createElement("span",{className:"iconfont icon-sanjiaoxing-up"}),b.a.createElement("span",{className:"iconfont icon-sanjiaoxing-down"})))),b.a.createElement(P.a,{className:"font16 ml20 mr20"},b.a.createElement("span",{className:"current",onClick:function(){u.sort="desc"===u.sort?"asc":"desc",u.sort_by="right_code_count",console.log("xx params.sort: ",u.sort),d(Object(h.a)({},u)),H()}},b.a.createElement("span",null,"平均正确代码行数"),b.a.createElement("p",{className:"edu-sorter current ".concat("right_code_count"===u.sort_by?u.sort:"")},b.a.createElement("span",{className:"iconfont icon-sanjiaoxing-up"}),b.a.createElement("span",{className:"iconfont icon-sanjiaoxing-down"})))),b.a.createElement(P.a,{className:"font16"},b.a.createElement("span",{className:"current",onClick:function(){u.sort="desc"===u.sort?"asc":"desc",u.sort_by="",console.log("xx params.sort: ",u.sort),d(Object(h.a)({},u)),H()}},b.a.createElement("span",null,"正确率"),b.a.createElement("p",{className:"edu-sorter current ".concat(""===u.sort_by?u.sort:"")},b.a.createElement("span",{className:"iconfont icon-sanjiaoxing-up"}),b.a.createElement("span",{className:"iconfont icon-sanjiaoxing-down"})))))),b.a.createElement(Le.a,{spinning:i["exercise/getExerciseStatistics"]},b.a.createElement("div",{className:"minH200"},null==p||null===(n=p.commit_results)||void 0===n?void 0:n.map((function(e,t){var n;return b.a.createElement("aside",{key:t,className:"font14 c-black mt30"},b.a.createElement(M.a,null,b.a.createElement(P.a,{flex:1},e.ques_position,".",bt[e.ques_type]),6===e.ques_type&&b.a.createElement(b.a.Fragment,null,b.a.createElement(P.a,null,"平均正确代码行数:",b.a.createElement("span",{className:"c-orange"},e.right_code_count)),b.a.createElement(P.a,{className:"ml20 mr20"},"平均完成时间:",b.a.createElement("span",{className:"c-orange"},e.cost_time))),b.a.createElement(P.a,null,"正确率 ",b.a.createElement("span",{className:"c-orange"},e.right_percent,"%"))),b.a.createElement("div",null,b.a.createElement(mt.a,{value:e.ques_title})),b.a.createElement("div",{className:"mt20",style:{display:5===e.ques_type?"none":""}},b.a.createElement(M.a,{className:"c-light-black ",gutter:[24,20]},b.a.createElement(P.a,{flex:1},"选项"),b.a.createElement(P.a,{flex:"60px",className:"tc"},"小计"),b.a.createElement(P.a,{flex:"200px"},"百分比"))),b.a.createElement(Ae.a,{style:{margin:0,marginBottom:20,display:5===e.ques_type?"none":""}}),7===(null==e?void 0:e.ques_type)&&(null==e?void 0:e.sub_exercise_questions.map((function(t,n){var r;return b.a.createElement("div",null,b.a.createElement("div",{style:{marginBottom:10,display:"flex",justifyContent:"space-between"}},b.a.createElement(P.a,null,b.a.createElement("span",null,t.ques_title)),b.a.createElement(P.a,null,"正确率 ",b.a.createElement("span",{className:"c-orange"},t.right_percent,"%"))),null==t||null===(r=t.ques_details)||void 0===r?void 0:r.map((function(t,n){return b.a.createElement(M.a,{key:n,gutter:[24,24],className:"font14 c-black"},b.a.createElement(P.a,{flex:1},b.a.createElement(M.a,{style:{alignItems:"center"}},2===e.ques_type||3===e.ques_type||4===e.ques_type?"":b.a.createElement(P.a,null,O.m[n],". "),4===e.ques_type?b.a.createElement(P.a,{flex:1,className:"ml10"},b.a.createElement(mt.a,{value:yt[t.choice_text]})):b.a.createElement(P.a,{flex:1,className:"ml10"},b.a.createElement(mt.a,{value:"wrong"===t.choice_text?"填写了错误答案":t.choice_text})))),b.a.createElement(P.a,{flex:"60px",className:"tc"},b.a.createElement("span",{className:t.choice_right_boolean&&"c-green"},t.choice_users_count||0)),b.a.createElement(P.a,{flex:"200px"},b.a.createElement(pt.a,{status:"active",strokeColor:"#2abd8b",percent:(100*t.choice_percent).toFixed(),width:200})))})),b.a.createElement(Ae.a,{style:{margin:0,marginBottom:20}}))}))),(null==e?void 0:e.ques_type)<7&&(null==e||null===(n=e.ques_details)||void 0===n?void 0:n.map((function(t,n){return 5===e.ques_type?b.a.createElement("div",{className:"mt20"},b.a.createElement(M.a,{key:n,gutter:[24,24],className:"font14 c-black"},b.a.createElement(P.a,{flex:1},t.challenge_position,".",t.challenge_name),b.a.createElement(P.a,null,"正确率 ",b.a.createElement("span",{className:"c-orange"},t.challenge_percent,"%"))),b.a.createElement("div",null,b.a.createElement(M.a,{className:"c-light-black ",gutter:[24,20]},b.a.createElement(P.a,{flex:1},"选项"),b.a.createElement(P.a,{flex:"60px",className:"tc"},"小计"),b.a.createElement(P.a,{flex:"200px"},"百分比"))),b.a.createElement(Ae.a,{style:{margin:0,marginBottom:20}}),null==t?void 0:t.challenge_details.map((function(e){return b.a.createElement(M.a,{key:n,gutter:[24,24],className:"font14 c-black"},b.a.createElement(P.a,{flex:1},b.a.createElement(M.a,null,b.a.createElement(P.a,{flex:1,className:"ml10"},b.a.createElement(mt.a,{value:yt[e.choice_text]})))),b.a.createElement(P.a,{flex:"60px",className:"tc"},b.a.createElement("span",{className:e.choice_right_boolean&&"c-green"},e.choice_users_count||0)),b.a.createElement(P.a,{flex:"200px"},b.a.createElement(pt.a,{status:"active",strokeColor:"#2abd8b",percent:(100*e.choice_percent).toFixed(),width:200})))})),b.a.createElement(M.a,{className:"",gutter:[24,20]},b.a.createElement(P.a,{className:"ml10",flex:1},"有效填写量"),b.a.createElement(P.a,{flex:"60px",className:"tc"},e.effictive_counts),b.a.createElement(P.a,{flex:"200px"})),b.a.createElement(Ae.a,{style:{margin:0,marginBottom:20}})):b.a.createElement(M.a,{key:n,gutter:[24,24],className:"font14 c-black"},b.a.createElement(P.a,{flex:1},b.a.createElement(M.a,null,2===e.ques_type||3===e.ques_type||4===e.ques_type?"":b.a.createElement(P.a,null,O.m[n],". "),4===e.ques_type?b.a.createElement(P.a,{flex:1,className:"ml10"},b.a.createElement(mt.a,{value:yt[t.choice_text]})):b.a.createElement(P.a,{flex:1,className:"ml10"},b.a.createElement(mt.a,{value:"wrong"===t.choice_text?"填写了错误答案":t.choice_text})))),b.a.createElement(P.a,{flex:"60px",className:"tc"},b.a.createElement("span",{className:t.choice_right_boolean&&"c-green"},t.choice_users_count||0)),b.a.createElement(P.a,{flex:"200px"},b.a.createElement(pt.a,{status:"active",strokeColor:"#2abd8b",percent:(100*t.choice_percent).toFixed(),width:200})))}))),b.a.createElement(M.a,{style:{display:5===e.ques_type?"none":""},className:"",gutter:[24,20]},b.a.createElement(P.a,{className:2===e.ques_type||3===e.ques_type||4===e.ques_type?"ml10":"",flex:1},"有效填写量"),b.a.createElement(P.a,{flex:"60px",className:"tc"},e.effictive_counts),b.a.createElement(P.a,{flex:"200px"})))}))))),b.a.createElement("div",{className:"tc mt30 mb50"},b.a.createElement(I.a,{hideOnSinglePage:!1,total:null==p?void 0:p.questions_count,current:u.page||1,pageSize:u.limit,onChange:function(e,t){u.page=e,u.limit=t,H()}})))})),xt=n("cVA7"),_t=n.n(xt),kt=n("5e8a"),wt=n.n(kt),Ct=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{title:{left:"center"},tooltip:{trigger:"item",formatter:"{a} <br/>{b} ({d}%)"},color:["#0152d9","#13C2C2","#2FC25B","#FACC14"],series:[{name:"",type:"pie",radius:"55%",center:["40%","50%"],data:e,emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]}},St=function(e){var t=e.names,n=void 0===t?[]:t,r=e.values,i=void 0===r?[]:r,a=e.values1,o=void 0===a?[]:a;return{tooltip:{trigger:"axis",axisPointer:{type:"cross",crossStyle:{color:"#999"}}},legend:{data:["Evaporation","Precipitation","Temperature"]},color:["#0152d9","#13C2C2","#2FC25B","#FACC14"],xAxis:[{type:"category",data:n,axisPointer:{type:"shadow"}}],yAxis:[{type:"value",name:"学员人数",min:0,max:e.num,interval:50,axisLabel:{formatter:"{value}"}},{type:"value",name:"人数占比",min:0,max:100,interval:10,axisLabel:{formatter:"{value}%"}}],series:[{name:"学员人数",type:"bar",tooltip:{valueFormatter:function(e){return e+" 人"}},data:i},{name:"人数占比",type:"line",yAxisIndex:1,tooltip:{valueFormatter:function(e){return e+"%"}},data:o}]}},Ot=function(e){var t=e.names,n=void 0===t?[]:t,r=e.values;return{xAxis:{type:"category",data:n},color:["#0152d9","#13C2C2","#2FC25B","#FACC14"],yAxis:{type:"value"},series:[{data:void 0===r?[]:r,type:"bar"}]}},At=["#0152d9","#13C2C2","#2FC25B","#FACC14"],Tt=["不及格","及格","良好","优秀"],It=Object(_.a)((function(e){var t=e.classroomList,n=e.loading,r=e.user,i=e.problemset,a=e.exercise;return{classroomList:t,globalSetting:e.globalSetting,problemset:i,exercise:a,user:r,loading:n.effects}}))((function(e){e.classroomList,e.globalSetting,e.problemset,e.loading;var t=e.exercise,n=e.user,r=e.dispatch,i=(Object(p.a)(e,["classroomList","globalSetting","problemset","loading","exercise","user","dispatch"]),Object(E.h)(),n.userInfo,t.exerciseList,t.commonHeader,t.checkDomain,Object(v.useState)([])),a=Object(f.a)(i,2),o=a[0],s=a[1],l=Object(v.useState)({}),u=Object(f.a)(l,2),d=u[0],m=u[1],x=Object(v.useState)({}),_=Object(f.a)(x,2),k=_[0],w=_[1],C=Object(v.useState)(Object(h.a)(Object(h.a)({},Object(E.i)()),{},{page:1,per_page:20})),S=Object(f.a)(C,2),O=S[0];S[1];function A(){return(A=Object(c.a)(g.a.mark((function e(){var t,n,r,i,a,o,l,c,u,d,f,p,v,b,E,x,_,k,C,S,A,T,I,D,L,R;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(y.a)("/api/exercises/".concat(null==O?void 0:O.categoryId,"/exercise_analysis_charts.json"),{method:"get"});case 2:null!=(i=e.sent)&&i.grade_chart&&(u=[{name:"不及格",value:null==i||null===(a=i.grade_chart)||void 0===a?void 0:a.fail_percent},{name:"及格",value:null==i||null===(o=i.grade_chart)||void 0===o?void 0:o.pass_percent},{name:"良好",value:null==i||null===(l=i.grade_chart)||void 0===l?void 0:l.good_percent},{name:"优秀",value:null==i||null===(c=i.grade_chart)||void 0===c?void 0:c.best_percent}],s([].concat(u))),(null==i||null===(t=i.score_area_chart)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.length)>0&&(_=null==i||null===(d=i.score_area_chart)||void 0===d||null===(f=d.data)||void 0===f?void 0:f.map((function(e){return e.area})),k=null==i||null===(p=i.score_area_chart)||void 0===p||null===(v=p.data)||void 0===v?void 0:v.map((function(e){return e.stu_num})),C=null==i||null===(b=i.score_area_chart)||void 0===b||null===(E=b.data)||void 0===E?void 0:E.map((function(e){return e.percent})),S=(null==i||null===(x=i.score_area_chart)||void 0===x?void 0:x.max_stu_num)||0,A={names:_,values:k,values1:C,num:S},m(Object(h.a)({},A))),(null==i||null===(r=i.exercise_time_chart)||void 0===r?void 0:r.length)>0&&(D=null==i||null===(T=i.exercise_time_chart)||void 0===T?void 0:T.map((function(e){return e.area})),L=null==i||null===(I=i.exercise_time_chart)||void 0===I?void 0:I.map((function(e){return e.student_num})),R={names:D,values:L},w(Object(h.a)({},R)));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return Object(v.useEffect)((function(){r({type:"exercise/getCommonHeader",payload:Object(h.a)({},O)})}),[O.coursesId]),Object(v.useEffect)((function(){!function(){A.apply(this,arguments)}()}),[]),b.a.createElement("section",{className:"edu-container"},b.a.createElement("div",{style:{display:"flex",marginTop:10}},b.a.createElement("div",{style:{flex:5,background:"#fff",marginRight:10}},b.a.createElement("p",{style:{fontSize:16,fontWeight:400,height:40,alignItems:"center",display:"flex",paddingLeft:20,borderBottom:"1px solid #fff9f9"}},"成绩等级占比"),b.a.createElement("div",{className:wt.a.countcenter},b.a.createElement(_t.a,{option:Ct(o),style:{height:400,width:430},opts:{renderer:"svg"}}),b.a.createElement("div",null,b.a.createElement("p",null,"单位:人"),null==At?void 0:At.map((function(e,t){return b.a.createElement("p",{key:t,style:{display:"flex",alignItems:"center"}},b.a.createElement("div",{key:t,className:wt.a.radiusdiv,style:{background:e}})," ",Tt[t])}))))),console.log("---",d),b.a.createElement("div",{style:{flex:5,background:"#fff",marginLeft:10}},b.a.createElement("p",{style:{fontSize:16,fontWeight:400,height:40,display:"flex",paddingLeft:20,borderBottom:"1px solid #fff9f9"}},"分数段分析"),b.a.createElement("div",{className:wt.a.countcenter},b.a.createElement(_t.a,{option:St(Object(h.a)({},d)),style:{height:400,width:550},opts:{renderer:"svg"}})))),b.a.createElement("div",null,b.a.createElement("p",{style:{fontSize:16,fontWeight:400,height:40,alignItems:"center",display:"flex",paddingLeft:20,borderBottom:"1px solid #fff9f9"}},"作业与测验用时分析"),b.a.createElement("div",{className:wt.a.countcenter},b.a.createElement(_t.a,{option:Ot(Object(h.a)({},k)),style:{height:400,width:1100},opts:{renderer:"svg"}}))))})),Dt=function(){var e=Object(c.a)(g.a.mark((function e(t,n){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(y.a)("/api/exercises/".concat(t,"/exercise_analysis.json"),{method:"GET",params:n}));case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Lt=n("CY+3"),Rt=n.n(Lt),Nt=(n("h6EL"),Object(v.memo)((function(e){var t=e.data,n=["#307DFE","#13C2C2","#8543E0"],r=Object(v.useMemo)((function(){return{legend:{show:!0,orient:"vertical",top:"middle",right:80,itemWidth:8,itemHeight:8,itemGap:20,icon:"circle",selectedMode:!1},series:[{type:"pie",clockwise:!0,right:134,data:null==t?void 0:t.map((function(e){return{name:e.type,value:parseFloat(e.num)}})),label:{show:!0,position:"inside",formatter:"{d}%",fontSize:14,fontWeight:400},itemStyle:{color:function(e){var t=(e||{}).dataIndex;return n[t]}}}]}}),[t]);return b.a.createElement(_t.a,{option:r})}))),jt=Object(v.memo)((function(e){var t=e.data,n=["#307DFE","#13C2C2","#2FC25B","#FACC14","#F04864","#8543E0","#3436C7","#223273"],r=Object(v.useMemo)((function(){return{legend:{show:!0,orient:"vertical",top:"middle",right:80,itemWidth:8,itemHeight:8,itemGap:20,icon:"circle",selectedMode:!1},series:[{type:"pie",right:134,clockwise:!0,data:null==t?void 0:t.map((function(e){return{name:e.type,value:parseFloat(e.num)}})),label:{show:!0,position:"inside",formatter:"{d}%",fontSize:14,fontWeight:400},itemStyle:{color:function(e){var t=e.dataIndex;return n[t]}}}]}}),[t]);return b.a.createElement(_t.a,{option:r})})),Mt=Object(v.memo)((function(e){var t=e.data,n=Object(v.useMemo)((function(){var e=Object.keys(t),n=e.map((function(e){return t[e]}));return{xAxis:{type:"category",data:e},yAxis:{type:"value",name:"题数",nameLocation:"middle",nameGap:20,minInterval:1},tooltip:{show:!0,position:"top",formatter:"{b}<br/>题数:{c}"},series:[{data:n,type:"bar",itemStyle:{color:"#a3c5fe",borderColor:"#196EFD"}}]}}),[t]);return b.a.createElement(_t.a,{option:n})})),Pt=Object(v.memo)((function(e){var t=e.data,n=new Image;n.src=Se.q;var r=Object(v.useMemo)((function(){return{backgroundColor:"#fff",series:[{type:"wordCloud",sizeRange:[10,30],rotationRange:[-90,90],rotationStep:45,maskImage:n,gridSize:2,shape:"pentagon",textStyle:{normal:{color:function(){return"rgb("+Math.round(255*Math.random())+", "+Math.round(255*Math.random())+", "+Math.round(255*Math.random())+")"}}},left:"center",top:"center",right:null,bottom:null,width:"100%",height:"100%",data:t.map((function(e,t){return{name:e,value:t}}))}]}}),[]);return b.a.createElement(_t.a,{option:r})})),Bt=function(){var e=Object(E.i)(),t=e.coursesId,n=e.categoryId,r=Object(v.useState)(),i=Object(f.a)(r,2),a=i[0],o=i[1];return Object(v.useEffect)((function(){Dt(n,{categoryId:n,coursesId:t}).then((function(e){"status"in e||o(e)}))}),[]),a?b.a.createElement("div",null,b.a.createElement(M.a,{gutter:20,style:{marginBottom:20,marginTop:30}},b.a.createElement(P.a,{span:12},b.a.createElement("div",{className:Rt.a.chartWrapper},b.a.createElement("div",{className:Rt.a.title},"难度分布"),b.a.createElement(Nt,{data:null==a?void 0:a.difficulty_list}))),b.a.createElement(P.a,{span:12},b.a.createElement("div",{className:Rt.a.chartWrapper},b.a.createElement("div",{className:Rt.a.title},"题型分布"),b.a.createElement(jt,{data:null==a?void 0:a.ques_type_list})))),b.a.createElement(M.a,{gutter:20,style:{marginBottom:30}},b.a.createElement(P.a,{span:12},b.a.createElement("div",{className:Rt.a.chartWrapper},b.a.createElement("div",{className:Rt.a.title},"分值分布"),b.a.createElement(Mt,{data:null==a?void 0:a.score_list}))),b.a.createElement(P.a,{span:12},b.a.createElement("div",{className:Rt.a.chartWrapper},b.a.createElement("div",{className:Rt.a.title},"知识点"),b.a.createElement(Pt,{data:null==a?void 0:a.tag_discipline_list}))))):b.a.createElement(Y.a,null)},Ft=Object(_.a)((function(e){var t=e.classroomList,n=e.loading,r=e.user,i=e.problemset,a=e.exercise;return{classroomList:t,globalSetting:e.globalSetting,problemset:i,exercise:a,user:r,loading:n.effects}}))((function(e){e.classroomList,e.globalSetting,e.problemset,e.loading;var t=e.exercise,n=e.user,i=e.dispatch,a=(Object(p.a)(e,["classroomList","globalSetting","problemset","loading","exercise","user","dispatch"]),Object(E.h)(),n.userInfo,t.exerciseList,t.commonHeader,t.checkDomain,Object(v.useState)(Object(h.a)(Object(h.a)({},Object(E.i)()),{},{page:1,per_page:20}))),o=Object(f.a)(a,2),s=o[0];o[1];return Object(v.useEffect)((function(){i({type:"exercise/getCommonHeader",payload:Object(h.a)({},s)})}),[s.coursesId]),b.a.createElement(r.a,{defaultActiveKey:"1"},b.a.createElement(r.a.TabPane,{key:1,tab:"答题统计"},b.a.createElement(Et,null)),b.a.createElement(r.a.TabPane,{key:2,tab:"作业与测验分析"},b.a.createElement(Bt,null),b.a.createElement(It,null)))})),Ut={0:"单选题",1:"多选题",2:"判断题",3:"填空题",4:"简答题",5:"实训题",6:"编程题",7:"接龙题"},Ht=Object(_.a)((function(e){return{exercise:e.exercise,loading:e.loading.effects}}))((function(e){var t,n=e.exercise,r=e.loading,i=e.dispatch,a=Object(E.i)(),o=(Object(E.h)(),n.statisticsList),s=Object(v.useState)({}),l=Object(f.a)(s,2),u=(l[0],l[1],Object(v.useState)([])),d=Object(f.a)(u,2),p=d[0],m=d[1],y=Object(v.useState)(""),x=Object(f.a)(y,2),_=(x[0],x[1],Object(v.useState)("")),k=Object(f.a)(_,2),w=(k[0],k[1],Object(v.useState)({})),C=Object(f.a)(w,2),S=(C[0],C[1],U.a.useForm());Object(f.a)(S,1)[0];a.sort="asc";var O=function(e){return{title:{text:"『 学生正确率分布图 』",left:"center"},tooltip:{trigger:"item",formatter:"{b} : {c} 人"},legend:{bottom:0,icon:"circle",left:"center",itemWidth:6,itemHeight:6,data:["100%","90%-100%","70%-90%","60%-70%","60%以下"].reverse()},series:[{type:"pie",radius:"55%",minAngle:15,center:["50%","50%"],selectedMode:"single",label:{show:!0,position:"outer",normal:{formatter:"{b} \n {c}人",color:"#5c5c5c",lineHeight:20}},labelLine:{normal:{length:20,length2:20,lineStyle:{color:"rgba(0,0,0,.45)"}}},data:[{value:e.details[0].full_count,name:"100%"},{value:e.details[0].best_count,name:"90%-100%"},{value:e.details[0].good_count,name:"70%-90%"},{value:e.details[0].pass_count,name:"60%-70%"},{value:e.details[0].fails_count,name:"60%以下"}],itemStyle:{emphasis:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"},normal:{color:function(e){return["#99B8FB","#80E0B9","#8190AA","#F7C739","#EB7E65"][e.dataIndex]}}},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]}},A=[{title:"提交率",dataIndex:"commit_percent",render:function(e){return b.a.createElement("span",null,100*e,"%")}},{title:"最低分",dataIndex:"min_score",render:function(e){return b.a.createElement("span",null,e,"分")}},{title:"最高分",dataIndex:"max_score",render:function(e){return b.a.createElement("span",{className:"c-orange"},e,"分")}},{title:"平均分",dataIndex:"average_score",render:function(e){return b.a.createElement("span",null,e,"分")}},{title:"不及格(得分 低于60%)",dataIndex:"fail_counts",render:function(e){return b.a.createElement("span",null,e,"人")}},{title:"及格(得分60%~70%)",dataIndex:"pass_counts",render:function(e){return b.a.createElement("span",null,e,"人")}},{title:"良好(得分70%~90%)",dataIndex:"good_counts",render:function(e){return b.a.createElement("span",null,e,"人")}},{title:"优秀(得分90%~100%)",dataIndex:"best_counts",render:function(e){return b.a.createElement("span",{className:"c-orange"},e,"人")}}],T=function(){var e=Object(c.a)(g.a.mark((function e(){var t;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"exercise/getExerciseStatistics",payload:Object(h.a)({},a)});case 2:null!=(t=e.sent)&&t.exercise_counts&&m([t.exercise_counts]);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(v.useEffect)((function(){T()}),[a.coursesId]),b.a.createElement("section",{className:"minH500 ",style:{padding:0}},b.a.createElement("aside",{className:"bg-white inline-block w100 th-bg-white"},b.a.createElement(N.a,{className:"mt10 bg-white",loading:r["exercise/getExerciseStatistics"],pagination:!1,dataSource:p,columns:A})),b.a.createElement("aside",{className:"mt20"},b.a.createElement("span",{className:"bold c-black font16 ml20"},"已交卷学生答题详情")),b.a.createElement("aside",null,null==o||null===(t=o.commit_results)||void 0===t?void 0:t.map((function(e,t){return b.a.createElement("div",{key:t,className:"bg-white pl20 pt20 pr20 pb20 mt20"},b.a.createElement("div",{style:{fontSize:14,color:"#0152d9",fontWeight:500}},t+1,"、",Ut[e.question_type],b.a.createElement("span",{style:{color:"#999",paddingLeft:10}},"(共",e.question_count,"小题,",e.question_score,"分)"),b.a.createElement("span",{style:{color:"#000",float:"right"}},"全班正确率:",100*e.right_percent,"%")),b.a.createElement(_t.a,{option:O(e),style:{height:370},opts:{renderer:"svg"}}))}))))})),zt=(L.a.TextArea,Q.a.RangePicker,ie.a.Option,Object(_.a)((function(e){var t=e.exercise,n=e.loading,r=e.globalSetting;return{exercise:t,loading:n.effects,globalSetting:r}}))((function(e){e.exercise,e.globalSetting,e.loading,e.dispatch;var t,n,r=Object(E.i)(),i=Object(v.useState)([]),o=Object(f.a)(i,2),s=o[0],l=o[1];function u(){return d.apply(this,arguments)}function d(){return(d=Object(c.a)(g.a.mark((function e(){var t;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(y.a)("/api/exercises/".concat(null==r?void 0:r.categoryId,"/get_monitor_info.json"),{method:"get",params:{course_id:null==r?void 0:r.coursesId}});case 2:t=e.sent,l(null==t?void 0:t.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return Object(v.useEffect)((function(){u()}),[]),b.a.createElement("section",null,b.a.createElement("div",{style:{textAlign:"end",paddingTop:10}},b.a.createElement(a.a,{style:{width:120,height:40,textAlign:"center"},onClick:function(){u()}},"刷新")),b.a.createElement("div",{style:{maxHeight:700,overflow:"auto",border:"1px solid",marginTop:20}},b.a.createElement("p",{style:{fontSize:16,fontWeight:500,marginLeft:10,marginTop:10}},"客户端监控"),(null==s||null===(t=s.ex_client_logs)||void 0===t?void 0:t.length)<=0&&b.a.createElement(Y.a,{customText:"暂无监控信息"}),null==s||null===(n=s.ex_client_logs)||void 0===n?void 0:n.map((function(e){return b.a.createElement("p",{style:{marginLeft:10}},e.created_at," ",null==e?void 0:e.user_name," (",e.student_id,")",e.describe)}))),b.a.createElement("div",{style:{maxHeight:700,marginTop:20,overflow:"auto",border:"1px solid"}},b.a.createElement("p",{style:{fontSize:16,fontWeight:500,marginLeft:10,marginTop:10}},"未禁网账号"),b.a.createElement(Y.a,{customText:"暂无未禁网账号"})))}))),Gt=n("tf39"),Vt=n.n(Gt);t.default=Object(_.a)((function(e){var t=e.exercise,n=e.loading,r=e.user;return{exercise:t,globalSetting:e.globalSetting,user:r,loading:n.effects}}))((function(e){var t,n,m,T,I,D,L,R,N,j,M,P,B=e.exercise,F=(e.globalSetting,e.loading,e.dispatch),U=e.user,H=(e.match,Object(p.a)(e,["exercise","globalSetting","loading","dispatch","user","match"])),G=Object(E.i)(),V=Object(E.h)(),W=Object(v.useState)([]),K=Object(f.a)(W,2),q=(K[0],K[1],B.exerciseList),Y=B.commonHeader,Q=B.checkDomain,J=Object(v.useState)(V.query.tabs||0),X=Object(f.a)(J,2),Z=X[0],ee=X[1],te=Object(v.useState)(z()(new Date).valueOf()),ne=Object(f.a)(te,2),ie=ne[0],ae=ne[1],oe=Object(v.useState)(),se=Object(f.a)(oe,2),le=se[0],ce=se[1],ue=U.userInfo;Object(E.g)();G.category=V.query.category_id;var de=!Q||Q&&(null==ue||null===(t=ue.course)||void 0===t?void 0:t.course_identity)<3;Object(v.useEffect)((function(){F({type:"exercise/getCommonHeader",payload:Object(h.a)({},G)})}),[G.coursesId]);var he=function(){var e;Object(O.Y)({inner_ip:Y.inner_ip,public_ip:Y.public_ip,ip_limit:Y.ip_limit,ip_bind:Y.ip_bind,open_camera:Y.open_camera,exercise_tips:[Y.open_camera?"已开启防作弊":""],exerciseId:Y.id,screen_open:Y.screen_open,screen_num:Y.screen_num,coursesId:G.coursesId,login:ue.login,history:H.history,identity_verify:Y.identity_verify,current_status:null==Y||null===(e=Y.user_permission)||void 0===e?void 0:e.current_status,open_phone_video_recording:null==Y?void 0:Y.open_phone_video_recording,disable_bluebooth:Y.disable_bluebooth,disbale_usb:Y.disbale_usb,enable_disconnection:Y.enable_disconnection})},fe=function(){F({type:"exercise/getCommonHeader",payload:Object(h.a)({},G)});var e={0:function(){F({type:"exercise/getExerciseList",payload:Object(h.a)({},G)})},3:function(){F({type:"exercise/getWorkSetting",payload:Object(h.a)({},G)})}};e[Z]&&e[Z]()};var me=[{name:"答题列表",id:0,compontent:b.a.createElement(re,{getparams:function(e){ce(Object(h.a)({},e))},checkDomainAuthority:de})},{name:"预览",id:2,compontent:b.a.createElement(De,{activeTabs:Z})},{name:"统计结果",id:1,compontent:b.a.createElement(Ft,null)},{name:"代码查重",id:4,compontent:b.a.createElement(Oe,{key:ie})},{name:"规则设置",id:3,compontent:b.a.createElement(ft,null)},{name:"监控信息",id:7,compontent:b.a.createElement(zt,null)},{name:"人脸审核",id:5,compontent:b.a.createElement(pe,null)},{name:"摄像监控",id:6,compontent:b.a.createElement(Ee,null)}].filter((function(e){return null!=Y&&Y.is_random&&("统计结果"===e.name&&(e.compontent=b.a.createElement(Ht,null)),"预览"===e.name&&(e.compontent=b.a.createElement(Ve.default,null))),!0})).filter((function(e){return!!(Object($.k)()&&null!=Y&&Y.assistant_auth||Object($.c)())||(null!=Y&&Y.show_statistic&&3===(null==Y?void 0:Y.exercise_status)?"预览"!==e.name:"答题列表"===e.name||"规则设置"===e.name)})).filter((function(e){return!(Object($.s)()||1===Y.exercise_status||!Y.exist_program)||"代码查重"!==e.name})).filter((function(e){return!!Y.identity_verify||"人脸审核"!==e.name})).filter((function(e){return!!Y.open_phone_video_recording||"摄像监控"!==e.name})).filter((function(e){return!(Object(O.K)()&&!Object($.o)())||"预览"!==e.name&&"统计结果"!==e.name})).filter((function(e){return!!de||"统计结果"!==e.name&&"预览"!==e.name&&"规则设置"!==e.name})).filter((function(e){return!!e}));console.log(me,"tabsArr"),(null==Y?void 0:Y.exercise_status)&&1===(null==Y?void 0:Y.exercise_status)&&me.splice.apply(me,[0,1].concat(Object(d.a)(me.splice(1,1,me[0])))),Object(v.useEffect)((function(){(null==Y?void 0:Y.exercise_status)&&1===(null==Y?void 0:Y.exercise_status)&&ee("2")}),[null==Y?void 0:Y.exercise_status]);var ge="YYYY-MM-DD",ve=z()("2020-11-15",ge),be=function(){return u.a.info({title:"题库改版告知",content:b.a.createElement(b.a.Fragment,null,"EduCoder已升级题库功能,所有试题均需匹配知识点。 当前作业与测验所涉及试题均未匹配知识点,无法随机抽取,已不能有效使用。请在作业与测验库重新组卷后使用。 由此带来的不便,敬请谅解!")})},ye=function(){var e=Object(c.a)(g.a.mark((function e(t){var n;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(y.a)("/api/courses/".concat(null==G?void 0:G.coursesId,"/exercises/exercise_code_repeat.json"),{method:"post",body:{group_ids:t,id:null==G?void 0:G.categoryId}});case 2:if(0!==(n=e.sent).status){e.next=8;break}return ee(4),ae(z()(new Date).valueOf()),F({type:"exercise/setActionTabs",payload:{}}),e.abrupt("return");case 8:n.status<-2&&s.b.error(null==n?void 0:n.message);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return Object($.h)()?b.a.createElement("section",{className:Vt.a.bg},b.a.createElement("div",{className:"edu-container"},ue.username&&b.a.createElement("section",{className:"animated fadeIn"},b.a.createElement("aside",{className:"mt10"},b.a.createElement(o.a,{separator:">"},b.a.createElement(o.a.Item,null,b.a.createElement(x.a,{to:"/classrooms/".concat(G.coursesId,"/exercise")},null==U||null===(n=U.userInfo)||void 0===n||null===(m=n.course)||void 0===m?void 0:m.course_name)),b.a.createElement(o.a.Item,null,b.a.createElement(x.a,{to:"/classrooms/".concat(G.coursesId,"/exercise")},"作业与测验")),b.a.createElement(o.a.Item,null,"详情"))),b.a.createElement("aside",{className:[Vt.a.title,"mt20"].join(" ")},b.a.createElement(x.a,{to:"/classrooms/".concat(G.coursesId,"/exercise")},b.a.createElement(k.a,{className:"font16 c-black"})),Object(O.z)(null==Y?void 0:Y.exercise_status),b.a.createElement("strong",{className:"font20 ml5"},null==Y?void 0:Y.exercise_name))),b.a.createElement("aside",{className:"mt30 relative"},b.a.createElement("div",{className:Vt.a.export},!Object($.s)()&&de&&Y.exercise_status>1&&Y.exist_program&&b.a.createElement(a.a,{onClick:function(e){e.preventDefault(),F({type:"exercise/setActionTabs",payload:{key:"代码查重",params:G}})}},b.a.createElement("span",{className:"iconfont icon-daimachazhong font14 mr5"}),"代码查重"),Object($.c)()&&de&&(null==Y||null===(T=Y.user_permission)||void 0===T?void 0:T.user_commit_counts)>0&&2===(null==Y?void 0:Y.exercise_status)&&b.a.createElement(a.a,{onClick:function(e){e.preventDefault(),F({type:"exercise/setActionTabs",payload:{key:"打回重做",params:G}})}},b.a.createElement("span",{className:"iconfont icon-dahuizhongzuo3x font14 mr5"}),"打回重做"),Object($.c)()&&de&&(null==Y||null===(I=Y.user_permission)||void 0===I?void 0:I.exercise_unpublish_count)>0&&b.a.createElement(a.a,{onClick:function(e){e.preventDefault();var t=z()(null==Y?void 0:Y.created_at,ge);z()(ve).diff(z()(t),"days")>0&&null!=Y&&Y.is_random?be():F({type:"exercise/setActionTabs",payload:{key:"批量发布",selectArrs:[G.categoryId],params:G,disabled:1!==(null==Y?void 0:Y.exercise_status),type:2,cb:fe}})}},b.a.createElement("span",{className:"iconfont icon-fabuzhiwei font14 mr5"}),"发布作业与测验"),Object($.c)()&&de&&(null==Y||null===(D=Y.user_permission)||void 0===D?void 0:D.exercise_publish_count)>0&&b.a.createElement(a.a,{onClick:function(e){e.preventDefault(),F({type:"exercise/setActionTabs",payload:{key:"批量结束",selectArrs:[G.categoryId],params:G,cb:fe}})}},b.a.createElement("span",{className:"iconfont icon-lijijiezhi mr5 font14"}),"结束"),Object($.s)()&&2===(null==Y||null===(L=Y.user_permission)||void 0===L?void 0:L.current_status)&&Y.exercise_status>1&&b.a.createElement(a.a,{style:{color:(null==q||null===(R=q.exercise_types)||void 0===R?void 0:R.is_redo)&&"red"},onClick:he},b.a.createElement("span",{className:"iconfont icon-bianjizuoye mr5 font14"}),null!=q&&null!==(N=q.exercise_types)&&void 0!==N&&N.is_redo?"重新作业与测验":"开始作业与测验"),Object($.s)()&&0===(null==Y||null===(j=Y.user_permission)||void 0===j?void 0:j.current_status)&&Y.exercise_status>1&&b.a.createElement(a.a,{onClick:he},b.a.createElement("span",{className:"iconfont icon-bianjizuoye mr5 font14"}),"继续作业与测验"),Object($.c)()&&de&&(Object($.k)()&&(null==Y?void 0:Y.assistant_auth)||!Object($.k)())&&b.a.createElement(a.a,{onClick:function(){var e=z()(null==Y?void 0:Y.created_at,ge);z()(ve).diff(z()(e),"days")>0&&null!=Y&&Y.is_random?be():_.d.push(null!=Y&&Y.is_random?"/classrooms/".concat(G.coursesId,"/exercise/").concat(G.categoryId,"/random/edit?random=true"):"/classrooms/".concat(G.coursesId,"/exercise/").concat(G.categoryId,"/edit?random=false"))}},b.a.createElement("span",{className:"iconfont icon-bianjizuoye mr5 font14"}),"编辑"),Object($.c)()&&de&&b.a.createElement(i.a,{overlay:function(){return b.a.createElement(l.a,{onClick:function(){var e=Object(c.a)(g.a.mark((function e(t){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.key,e.next="1"===e.t0?3:8;break;case 3:return e.next=5,Object(S.n)(Object(h.a)(Object(h.a)({},G),le));case 5:return 0===e.sent.status&&Object(A.i)(Object(h.a)(Object(h.a)({},G),le)),e.abrupt("break",8);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},b.a.createElement(l.a.Item,{key:"1"},"学生成绩"),b.a.createElement(l.a.Item,{key:"2"},b.a.createElement("a",{target:"_blank",href:"/classrooms/".concat(G.coursesId,"/exercise/").concat(G.categoryId,"/export_blank")},"导出作业与测验")),b.a.createElement(l.a.Item,{key:"3"},b.a.createElement(x.a,{to:"/classrooms/".concat(G.coursesId,"/exportlist/exercise_score")},"历史导出")))}},b.a.createElement(a.a,null,b.a.createElement(w.a,null),"导出",b.a.createElement(C.a,null)))),b.a.createElement(r.a,{activeKey:String(Z),className:Vt.a.tabs,onChange:function(e){var t=z()(null==Y?void 0:Y.created_at,ge);z()(ve).diff(z()(t),"days")>0&&3===parseInt(e)&&null!=Y&&Y.is_random?be():ee(e)}},me.map((function(e,t){return b.a.createElement(r.a.TabPane,{tab:e.name,key:e.id})}))),b.a.createElement("section",{className:null!=Y&&Y.is_random&&"2"===Z?"":"pl25 pr25 bg-white"},null===(M=me.filter((function(e){return e.id==Z})))||void 0===M||null===(P=M[0])||void 0===P?void 0:P.compontent))),b.a.createElement(Ge.a,null),b.a.createElement(qe,{onOk:ye}),b.a.createElement(Ye.a,null),b.a.createElement(ze,{cb:function(){F({type:"exercise/getExerciseList",payload:Object(h.a)({},G)})}})):""}))},JWDV:
|
|
|
/*!****************************************************!*\
|
|
|
!*** ./src/assets/images/icons/charpter-white.svg ***!
|
|
|
\****************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/charpter-white.5fa14f93.svg"},JeFH:
|
|
|
/*!********************************************!*\
|
|
|
!*** ./src/assets/images/icons/blibli.png ***!
|
|
|
\********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAAAwCAYAAAD9wT87AAAe2UlEQVR4XtVcB5QUVbr+blV1T+ieGWaYBAwgOSgooJLjENeA6a2KCVfZNbum3VXXsG9VdFfc1TXtGlfXLCKgEiRnUAHJWRzAyTl3V9V957vV1dPTM+M4Hn2Pd8/xIHRV9f3vn77/+/9qgVaWlHIggHMB+AA8K4TIbe2ek/FzKWUmgLGw7THQtLlCiBUn4z6j9ySa26SUMg3A+ZDyaljBMTC87mXrAUwSQtT+fxBOSqmbpjnaMIyrYJnToRvtQ/sOAJgihFh1ssvRSEFSysEAroJlXQZdp8VhXUEAS07UYGavBPSIQz10vacQ4vjJLJiUMgPAhZByJoQYyr0erZFYmFOFZK+GK7szGOB3Qoi/nsxycG9KQVLKKyDltbDMbBge5NYD87+twvxjNdhbZiIoJZZMysRpPqsShreXECL/ZBRMSjkAwM2wzIugG2k2gOW59fjgaDU2FNbjRI2Fm/r48eigdtz+TUKIF05GOSL3JKSUDwN4SALYXBRQwqzIrUNBvQ1DAIYm4BHAJxMz0TPOLoJu9BFClJxsglVVVWXGx8d/IYTIOl4rsSCnGvNzarCvIghLAl5NoN6WuKVPAu4dkMjtXyuEeP1kk6NJDpJSHgTQ8+Ht5Xj5UBWoqBhNQAsFP/6dwi2alIlTYq1caEY/IUT5zyGYlLIvgD4AugLIgm0zF3qgaccDgcCbMTExu1v6Xinl6YDc/lWxiWvWF6E04BiYxxUEQK0lcUe/BNx9qlLQFUKIt38mOVIAnA6gG4AugM104Qe0ajo1gA+FEHTwVhc96CoAbzy9txJP7KpAPKWKWFRQrCawZEoHZHnN4yEFVbX65DZeIKW8DVI+DiHimrtVSnlCCDFUCHGihc+TYJl7jwf1DlOW5KHWltCiLqSCfndqIm7vlwDLsi41DOP9Nm6z1cullL0BLATAP1tavxZCvNTqw5iDpJSnwrZ2rC60tKvXFTayOCc/AXGGwNIpHdDRCOZA9/QXQtASfrIlpdQg5TYpxMDXDlVhf7mJ/DoLZQEbNabEnf0TMbVTLL+PCHJZy15kL5EQk6ctK8De8mATWaige09LxC19lYIuMQxj7k8mROhBUsrbAfydOW/pd3XIr7VQXG+jImjjtHYePHlmMmDb7wpdv/yHfDcV5Idt7c0NalmTl+Sh2pTh8OYqiF5FBXXwWEeh6acKIWp+yMPbco2U9icS4pyJSwuwsywQDrM1lsQDA5JwW78EPu4iIcS8lhUkHwfw+1s3l2LesRrE6o2jARV032mJuLlv689qy94bRRwpL2YIe3F/Fe7bVqYiEqMs82CvBAOrpmQA0vpUaAZry1ZXCMXZS22ISVM/L8CBSlPFbnfRg/53FCQfAXD/7VtKMTen4XB5qDf38eO+AUm0+usMw3j1exR0GYB3nttXicd2VSDu/0ZB/WCZuzaU2NqMNYUKZHFRQR3jdKyclgGvZa0XhjGqVe2EYbZlzYGm3fmbjSX47EQtYiIEaxTiPNa3IQ/6SUOc46nyUgDvRh8uFXRlNx+eGKKg8d1CiDktCRYIBM7wGPrW5flBce36IgVuIldkiANwsRDiox9ySG25RkqZEIpInRiRGKKFAGwJtPNqWD4tE8nC3AXNOEMIYbX2bLcOugbA63N2V+CpvZWNLK8RSPCYx6ErFPdzgIRBsK2tn+ebuG5Dw+HWWRLnZsXhxWEERnhMCHH/93hQMqzggaP1RuovPs9TsDpSRZEgAcAvhRAftHZAP+ZzadurLCHGTl5agMNVTkRyz3HxlA7o7LVyoOk/KJe7ChoKyE0Lj9fhpk0ljT0oBLs/m9QBp8SYuSEF/eQwW0oZDyuYc7BWb3/usjyY0qmiA7bEqLQYvD0mlWf1ohDixu9RkICUGwJCDJu4OB/HaixERrn/RZj9NIDbZq4vxvLcOnWeVBBR5fzsTPT3WaXQPb2FEEWtGYBSUHV1dYd4r+fA7hrNf8HyfBCgu5bHB//UhaqUkoVIOoBhAPrRBmzbLtSAWyul1mnSkjzk19nqcIO2xMBkLxZOSCP6eU/oOvNMRI6UQgjBbaolpXwZwHUz1hRhXWF9ozBHBf2UhaqUMgYA+T3Wb8Nh2+2haWUASDBf/PDX5XjpYFU4ItHo3hmThuFJMgiPt4sQIu/7ZOFnrgcZsO3tFdBOzV6Up2BhZKFKzX+cnYFTfXZFdV2gt9/v/1FUjySdBDkLltUVUqbD8BjRFsRYfeGqQmwvCSiYTKG6+XR8PjkDBuQ2CLEItt0NQrSDgAe2TIG0bWh6IYTYzLINwB/u31qG149UNwrXVND1Pf340xlJ/NofTfXU19f39Xq9s2Gb/WHLTjA8ityLXm8crsa928rCe6i3JF4a3h5TM3UJ3fMEbDsTQhB3xwOaH9KKhRAVEPpRAK8KIdaEQ7S07XkQ4oJzlxcqmBtZgfPQPhiXjiGJdn2IizvWmmtGfy6lZFW9RwKxJC4Lak10idPw6M5yFNbb+GXXeFzcNV7ddsvmEnx8rFbBZKKf9FgNi7LTkRLTUHrSy/k3opWgDSRqzt8BnABkp1cPVeOB7eVNFBQBOO4RQjzZVjlCXsrcdUlREDhaaSIzVmDZd3X49EQtuvkN/On0JFU7rs6rw9Xri8NnSQN5cnA7XO6QtY0WQ0CpBcTrjoUBKCAb0aAgKWfT8m7cVIKFx53DcRfDzH9Gp2F0CiQML0HC/rYKpmgcK7hnY4kUV68rUjH53yPb456vSrG33MRV3X145uxk9di/7KrA0/scsELj8BsCn2WnI8unozJo48ZNpThYaeLBgYnYWFiPuTm1qgh8a0wqvJBFsILJK4ulPnNdUSNDI+C4oHMcnh2qAMd/CyEeaqscIQV9CuAXF64sxLqCekUd8bQe31WBjDgNyyZloFO8joMVJs5fUYiAdMAKEd0fByTiJqcOwz8PVOH1w1U4MyUGl54Shxs3l6qQPOesZIzLYItHnBGpoGvpVpGH426ervmv4e0xrRNDrhgshNjWVsEU/LTMfTlBvePUJXmqsv7nsBS8eaQaq/LrMSkzFm+Odto17x2twV1fliojoSKJguaPT0PfJI8SctLnBYoE/duZyYoxeOVQNXonGlg5NQMeKbfBtjKP1GkdiOSCIbDB51KOiR1i8dpI9T1/F0Lc0VY5Qgr6C4B7fr2xRBXE/9UlHqPSY3DP1jL4DIF549JwajuPYkKmLisI51N6ENn0+weoEKsMcfaucozJiFVsyTXrihXyZBg8t5MHEPrASAWNAbD6g6M1uCN0OO7m+WAexi9PUSFoLGPjjxLMNldYQh9PtmBPWQCzB7XDzrIg3jlag8EpHiwYn6YKu/UF9bhibTGMUMyiF707JhVnp3ph2sD0lYX4orgejw9uh5wqCy8erELfRAMrpmRAk3I5YPtroA9lPs0LgQ3ul4hwWGoM3h+bSsDxutB1GmWbl5TySgBv/m1PpTrg4WkxuKG3Hzdsckj+N0elYkxGjArPF6wsxI5SJ2XwHGd08+GvTk2Hlw86bMPZqTGKgmI4DNAZRrTHtEwD0IwBkQrqBjO4f0s5PJeuLmwCTx8+PQmzevn53POFECQD27yklH8D8NvrNhRj/rFaxSxz46y9uvsNLMpOQ5JXw+FKE+etKAzXMTzYV4a3x6SOTnS+bE0RluXW4bFB7VBYZ+Mf+yrRN8nAyikZENL6BEJUAtrl01cUYnvocHgfQzUtm+ESkB8LoV3YZiEcpDgYtvXVkrwgfrWhGF19BmYPSsJvNpWi0rTxzFnJ4XxKL1sUKv7pwdM6xeFfw1WIxYff1uCWLaUYlOzBg6cn4ep1xUqJLzUo6LRIBfnJBp8IGllTluaiNlQB80G86bd9E3DPaYqmv0YI8caPFGwmgNfo2k/srsDlp8Qr6/n91jKkxmjq4Dr79CahgbnjqQYPBhmPD3Nq8OczklAdlHhyTwX6JXlCCpLzIcQOAA+wplsQkU9p0V18uvI0XVqrhWaM+5FyJMMyD3xTr6VOXZoHQwhVSN/5ZamqvR6MyDN/+roc/wpB7UYeDCgjo1JoNGwiXrWuSHGhLSlIwLLWB3R9+ITF+ar76OIEKmhmD5/bibxTCEFPaPOSUp4FaW9ZeCKAK9cWIjszFtf38mPWphIFBOaOS1PJngfJ5LorhCb5/Q8NTMKveysPxj1fluLFA1UqxFF5j+wsR/8kD9ZOy2SIWwCHwnl99s4KPLu/gRlhqGwf49AticLeAaExn7ZKt0QLKqXkWa0L6vqIMZ/l43BVEO+NTsXsXRXYURpU3OEDpzt55pWDVXjwawdN0oO5zwUT0lTk2FJUjwtWFqFPoqFY7l+uLkKVaePVkak4p0NUiOPDpGW9BU2bcdGqQnxV3AC1eQjnd47D8w76mS2EuK/N2nFCQxos8+CROi3pmT3lGJcRi3GZMThQEYTf0NAtwQjDYoaOz79zqnAq6Na+CfiD48F4dl8l3v6mBvcPSFR55aUDVciM1/HyiPZU0GIIQVZ7Fa8hSnRJUwIO/j97W508P5xuaU5WaVkvQdOuZzTgc6/p4VP1I/dDUjQjTle3LT5Ri1kbHXaGhpcVr6tQ7vdoCuUxb9Eo7+yfgPu3laOo3sJ9A5MwJt3DQqIBxSkFSevPgPbHyDqE/67olvQYvD1a0S0vCyFm/UgFMe0vAHBOa/f/cVsZXjvsFJqKMO3uwxODneRKS9SEaJQnSeqSlARAmuVvsM0ja4tsjZ7q1nSN6Ra7HLpBuoX1RpuXlJKMxluhcqzF+1lwX7LaKSu4Rw6tUEHpcboqIUwpm5C6vFYA3wEYFD3Vo6B2dGhwkqsXn2Wn8VsWCE2b3maJQjdIy3oWmnbzoUoTu0sD4J8Mp2VBG+MzY1U9xPX8/ipVxFJBTK6/6BSHf4aSKwWl0tgrMm2pckCiV7iCPsueECwz51Cd3v6cz3PDvB6fy+v/MyYNo5Jhw/D2FUKw5d/mFQgEzvZ4PBtKA7bOsMYocLTKVF6UYGi4f2CiYq+P11j4xfICVAUdVpvjBJ9MSEP3BIdEoWyUg+iNy+fRVLiHo6Ah0QrKZu76z5Fqlbjd0MB7WXitmJoBr5QbhaaNaLNEroKkZKv3+ivWOkhMF05Di0ZwVmqMgtr8+8c5DsJhLUQPJpR9zyFMwVKAwIAWqLwJAt0SdLwxJg0+2NugaUMh7a8qpDYgmrpiuH5uaAqmdyYiFMOEQw+1eUkpR3IqjWiUYcqlxnig3Ne8cakYmhajCutpywuVEfIafv7h2FSckeLF8WoLszYWozhgKzaEi2TJY4OSMaFDDEzTHButIDabdq8sssQ16xoof35hokdg2bQOSBXBQ8Lw9mqzRA0Kuo1h6IHtZSAdE2kEGaR0JqarMECGYMba4jBhyuRKwpR10ltHqnHXV2WID6EY7o/UysppHZCpBQ/C8PRh11IKfdoUNiErzHBNRc8jFUNwYprmVI/Hs+THyCKl7MjWxs4qzXfhinwVwtzD5HfMGZKMy7rFK2WRcXDhPg3qjVGpGJsRg9waC5OXFaAiKMPhmt7E8uFXPX1sUJ4TraBUwsd9NVry+cvyQHjDC9xqfmF2Jnr7ZAU0/WYyF5ZlBXVdZ+uBtHkhgJLWUJGUcjyAFe+G2ILIBO4RAgsmpKJ3ogeHKkyct7IAAduxSCZXwvAEj8CSUOL1hhTkTh4tntwBXY3AMeGN6SKlfB7AjVeuLcaagrpwnHc6tAm4zxm9eoZgIiQiaT1WmoW5ublFHTt2/N62vpTSoJdWSW1g9uI8VY+5XsTvuK1vAn4fAjXXbyjGkhDgoQeTaiLlRDZl2rJCfFcbgZhNiQcGJuGGPgqxXhKtIC9sc0exbfSZuCgX5cGG+QTGblbgrFuaLCtILZZBEzmAthuatgXAJgC7opt7UsosWOb+rytF/EUr8xs11BTnNyoVozNiUFRnYeryQpTUO77PeM7kSnS0pSigilXG9EgD+nRSB/SMDeZB92ax+0p67O4vy/Du0eowt8jDu7RrPJ46y+H9Gi9m7WA9OH+uaQcgxVZo2kYAXzU3TSSl/A/Ht/5rdRE2FzW0NqiECzvH4x9Dne+4f1sZXncBjynxyKAkXNvTr8IzywnSVW5rnB70+9DkkRoNa7LFEB2TvSQfR6ut8HwCFXR1D78q9MgxsQ3AhMeDIyLJ8nnQJUFHsoMunWWrIRNO4XDQYzWngVQNIe2vK0P5gUx2ZL311JBkXNotXiXPc1YUKhDBz0kiMrn2SDAUPD1vRUGYZ6MH8WvnT8xEvzirCIansxr9Bd5+anclntxbEQ6HlKN/Oy+u6BavWHQeJnOyz9CQGqujY7yBLgkecIgozJ1bZiU0fSOEmA/gUyHEtxRPSnkngDkPbCvHq4cb+j7MmUNDlBIP+B97SQk5I200kDv7JeAuZzYPl68pwvqIvlXU5zObKsiy3oCmXXXxKvJdgUYQkBqnYoii3EUrpiAMN0keTYUi4nomyKEZcch05+5tcz804zXCdABPsKl2yaoibClusDxu7u7+ibijv8P2snDbVFQfhslMroNSvMirtVTiLQ84YcWN//MmZGCAzy6F4ekCgHPmq9/5pgZ3R9RCym4kFI0ULQc/Y5jlQTIf9kr04Mz2XgzPiMOApJDlUVm6MS8YDD7r8XiINFa/d7RGuOQun+H2sBiSmRvfP1qjWAYCnqiiHzdvLlG0l9s9iKr5rm+qIOlM1xCZfBLVdmgmJoT/ycX5lnSUyAezah+c4sW5WfGY2iUOPgVx7G+gaXyFZURkrcMHcXNXdPPhLyEy8abNJVgQ2jyN4/WR7RUUJ2SdtrxAQVh6l2svH43PwOl+uxyGh72nNNjmvpWFtrhmXWGTWqM1WYhc6W18NsEIPZdM+PSufvTya4AVtKF7lsK2sr8utz00aNdQ3AERNySvyqvDNaG+ED32vKw4vODMWOCh0ESvm4sV493bj/sHKibixuYUdAOAF6Lbtc0JFIlcmvvchcG8jo2sy06Jx8zeCfCFYke0dTOsTciMxb9HOW0HjiO/dMgJHRTs6RAJGc0Su8Yxd3w6BiXKSuieHirxm8HDe2q0xOlRbfwmYT0CgbUkJ5VFKEwyl3u8oU8CBrRzapnSehtTlxegIMScu6Dq4/FpiiPcWRoE2RlmUxrayLQYvBMqGUj0so8UqaAbeoWpojuaU9D5DOccvPtzqFBsbtOM26xhyoO2StbMEU0eFnEjvYqxmXCZMHdkeoxqa7PKdhc3f1o7L+YTTgsWq5V4dKez+Wg+jiTjyvw6lQe5qDR2fc9MlNUwPD0BFMO29hVYeveJi3OV10VNYYW/l8+vNKkAp6qPGqdrJD4Pn8aSYAjF7nOgkgn+stVF2BgBFKhQth0IeFjvqGLVlGCEcUqGdAX93/3GKRkiFeS25W3bvrc5BZ0NyM3zcupw65aSJtOZ7mEwRr8wNEX1c5Z8V4ttJQGF+qIH1qOVSyUxIb86IgUDkr3IXpoftjx3uI+MBS2VdPxvv2iI3bf2ScAfHHiMO74oxQffNgw48t73xqbj7CS7FoaX7zB9J01zY0DXh41flN8IykbuiV5Lqp9Tn5wJZIf0WLXDn5IiakmpjA40mut6+vDIoHaNvJ33Rno8cyVzZm6t81wW/Qx/CR5NFevkHd0ZPj7zVz39iqlnBGxOQd3ZF9pQCmPGmoIw/IsUyn0Dgl/S1e+4OamOJSfqlJD7Kkz1by1ZIjcxOdTZvDTC8sLt7YnpCmxExu7oZtdjO8rx3IHGEzPvjk3DsCRZF1LQCWnbH0GIC5ubs3DlIay9JwKYENZTSQuP1SqPYK0SPQDp3suQReiwYnK6Ipdd5oOfc78kc2/qk6A8k/0twmlGHRofzy4zTse24gAuWeNEESqD913bw1E6gEeaU1AKK+QDofk0WmZzoYskH2sWkqiRix7yRVFAdQpzqhvPpbnXEUGNSY/BW6NTG1meS2Z+NC4NA5I9qhN58aoiFbvJVU3uGItXRjj5iQz2wzsahkIYUt4Zm47h7WR4sEVKSV7uZhUO8xxmPHrR0i/uEo+nQ/MQkZ/nVJsKIr//bU2TQXxe5+6XHs9zohLckTUe9KyefjzseEIYTtMrvRoUpUWU+E2liXNXFKIuNGTJ+8iMk00g2m1OQSxWdxbZRm8Wq6QhmnNzh85oh8u6NZ5QIXTlLNjf91Y2mex0hWdTikPst/ZLULxaZIs9Eq19W+Vsntczdg9J8aqeEXNeJFfH51JBb49Jx4hkOwAjhm8B5kgp2RZ59M4vStUhRw/T8z4a1NntY/DBuNQmhsgcee/WMhURmosGBA0MjQuz05SXTF3mhDFeq1o0WXF4PoTWIuE0IwV5xbNSvYpc5dyCO+qmFNTdh8cc5v6pZvO6NM11AV0fOWFRPk5E0BCR1sUH3d43Ab8L0Rn8jNwS0R/Hj2itzT2c3tPDb+DDcWmqixqJcHh9ZPeU4YZwmuiI1trDr+PT7HR10Gvz63HVuoa5BSrorTHpGJksAzC8bCN868zhNWXnI+Wg5XcO0Uh+TmiGPOONQ9X4y+4K1cJuLsRxP/Tqv4eQJf9OApjhkddHd08f3F6OV0KIVPWwhrXHlE6xSt5zlheGR4R5rld392G2o6B/NK8g254LIS4i8thd1vQ9G94ZNcKkRlypnCNVZpO3CsKhzZJIi9Xx0vAUDGmvKlirPGjrfJ8nt9ZhFLhB9x0efgeti/PNZKzTYjUsmZiu6ivuiwMZbkihBb/ltBGCIQUdlVKy7/QJhzMeCnU1o0McrZmTOJ9mp6GLz1Dv8/x5RznmH69VRWtz0YP38JDZRAzxbWpMj/ex00tERtRK7yL7QWNlRGEbh0Uw5XpySDtc0d2nDI811JchUoDyX9XNh8edWvCF5hUk5XOcvKRFrA1ZRLRgbmh4dWQKnttXpV6fpBVHDjy691Agbur0ZA/+OiQZpyWzWwjONbAiunJGhOU5yMiP/z4jSVX6v95UonIRn8HD+mBMKrr4DQe6rnD6LG67Qs3uJUsTHhXiqKCz+eotK3WGmOZCHDfCZ88dm6qg9h+3l6mhlehXVyKNjAq9q38iZjkt+BO2bc/RNDw1L6c+jHzpmWkxDjtPg/oop0bVOxSYaeOWvn4FILhmbSjG4ojuccRw5cstKehBAH+6dUsp5kW8qxOpJB4eebgOcbqi0psLaS6lQgqI3NftpybB7zAmfHn3N7ZtX6tp2ov0vGdCg4pU5PSsOLzqzK6pxR81CNJrTaB9aFiY0JXexbEqV0Fvjk7D2BSYMLx80fmIlLIXrODedSVSvzLiXZ1oY6MVD2znwd4KE7Wm3fQtw1CByetGcMhlQJIaEwPkIUCws3oIZvDYvlo9gQM3zE0uA7F0UrpiIbiIbflfre30fZw5WuAPX5XhzW8cQleh1VPinTfxgH+3pKDf8E2C1tgEKoDJO9JruDGGG1oQc8yUjnG4rlcC+iTqpHlKoWlU/nMceJdSjgawhvnk42M1yIo3kBqroXeiF0NTlZftA+R+SMpix4PDj0KvghBZpo0uVNCByqCK+QpcjErD+BRuKIY56JDk/LcZPLCnRk+avjyv0UsB0Uri/Sw4Iw+EMjBSsBgelOLBzB5+nNfZfYXWfh/Q7uJvRvAHMyDlF3UQgx7dXoZYQ1NcXlqsgeyOsTTKenBWAjYhbxxs6YemG3B+EGQY5xo4ekbPZF7j/OEcR0FzW1IQmeCPommI5iyPnkQlURgqhxU26Y3JHeNwXhcfsuL4/p9pQTdIzfP9ngPuc6SU3AU7mo0bgCYrXg/Hi2dETrHyXVa+HS2l5Ft21+6usMBuhMtidE/UECdlDYSggk6oV1psa893Qb3rlCW54ZepouXg37l3d0aAfzL/cNSYZcT0LvEYnuqyvnIrIChHo/dbZYjDbPxslSFLAfGUEIIcZ3gppTpvd6zLqweOVZuI0TUVDRgSOzjVy5yWFKSmTNn6vv2LxlMx7jdEMtiZcbR6h/kdmh7nkIlctlUCiLnQNL7Xs7W5g6mrq+sTExNDg6gM9eE5xFEM4HhLL4pJKYdwvg5msCsgg4AwFceueyptKZ/XNO3pkIdqkPaXVdAGjfwkt1FTzeXveCAN7QYNp/gMDEzxYFhaLAaneaH8xTY5hrvasu1/5ebmzuvcuXOTn8KRUpLZ5sQpWVD+EgvfAKEcBWQ1mjUK554XYFvnw7YEhAhCSr6pYULTv2R6aklBAwC5Y3uJief2VyqtEoHGG5rT/4nVVN+EPaCsBB0pkT0gyyyDpq+HEB8DWNTSa/PNbbgt/yal5NkxyzI90VRVdI3+HSFpmyuk0MeTeGXnkspgrE/0aGgfyxxqoJPPQGe/BxxcDYtiBiQ042to2mfsZwkheGA/ywr9NhJlIBekZBFqOrZ5kgCFhYUJqampbAWzp9LCsgDLrgB/t0foByDkdkB1UrdFv5j0s0j1Ax8qpfxdqP/U8h1mIABN5EEYhyHELgBUBv87IAS98/9utUhA19TUZMXFxc0AcCZbIqG5A+YFvhvEMEQXVm4s6Jon6VKzA053dTI46OH8hMARhbwa5OCbboU/9e8//BRH8j9mLdQoDqqNCwAAAABJRU5ErkJggg=="},Jq4h:
|
|
|
/*!*******************************************!*\
|
|
|
!*** ./src/assets/images/user/qrcode.png ***!
|
|
|
\*******************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/qrcode.54870d9b.png"},K2GJ:
|
|
|
/*!***************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/Style.js ***!
|
|
|
\***************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./helper/fixShadow */"fW2E"),i=n(/*! ./constant */"gut8").ContextCachedBy,a=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],o=function(e){this.extendFrom(e,!1)};function s(e,t,n){var r=null==t.x?0:t.x,i=null==t.x2?1:t.x2,a=null==t.y?0:t.y,o=null==t.y2?0:t.y2;return t.global||(r=r*n.width+n.x,i=i*n.width+n.x,a=a*n.height+n.y,o=o*n.height+n.y),r=isNaN(r)?0:r,i=isNaN(i)?1:i,a=isNaN(a)?0:a,o=isNaN(o)?0:o,e.createLinearGradient(r,a,i,o)}function l(e,t,n){var r=n.width,i=n.height,a=Math.min(r,i),o=null==t.x?.5:t.x,s=null==t.y?.5:t.y,l=null==t.r?.5:t.r;return t.global||(o=o*r+n.x,s=s*i+n.y,l*=a),e.createRadialGradient(o,s,0,o,s,l)}for(var c=o.prototype={constructor:o,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(e,t,n){var o=n&&n.style,s=!o||e.__attrCachedBy!==i.STYLE_BIND;e.__attrCachedBy=i.STYLE_BIND;for(var l=0;l<a.length;l++){var c=a[l],u=c[0];(s||this[u]!==o[u])&&(e[u]=r(e,u,this[u]||c[1]))}if((s||this.fill!==o.fill)&&(e.fillStyle=this.fill),(s||this.stroke!==o.stroke)&&(e.strokeStyle=this.stroke),(s||this.opacity!==o.opacity)&&(e.globalAlpha=null==this.opacity?1:this.opacity),(s||this.blend!==o.blend)&&(e.globalCompositeOperation=this.blend||"source-over"),this.hasStroke()){var d=this.lineWidth;e.lineWidth=d/(this.strokeNoScale&&t&&t.getLineScale?t.getLineScale():1)}},hasFill:function(){var e=this.fill;return null!=e&&"none"!==e},hasStroke:function(){var e=this.stroke;return null!=e&&"none"!==e&&this.lineWidth>0},extendFrom:function(e,t){if(e)for(var n in e)!e.hasOwnProperty(n)||!0!==t&&(!1===t?this.hasOwnProperty(n):null==e[n])||(this[n]=e[n])},set:function(e,t){"string"==typeof e?this[e]=t:this.extendFrom(e,!0)},clone:function(){var e=new this.constructor;return e.extendFrom(this,!0),e},getGradient:function(e,t,n){for(var r=("radial"===t.type?l:s)(e,t,n),i=t.colorStops,a=0;a<i.length;a++)r.addColorStop(i[a].offset,i[a].color);return r}},u=0;u<a.length;u++){var d=a[u];d[0]in c||(c[d[0]]=d[1])}o.getGradient=c.getGradient;var h=o;e.exports=h},LIjs:
|
|
|
/*!***********************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/components/TrfList/index.less?modules ***!
|
|
|
\***********************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={leftdiv:"leftdiv___M7Twn",listClass:"listClass___OwEW4",spantitle:"spantitle___1ZApq",rightdiv:"rightdiv___2V9v-"}},LPTA:
|
|
|
/*!********************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/config.js ***!
|
|
|
\********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=1;"undefined"!=typeof window&&(n=Math.max(window.devicePixelRatio||1,1));var r=n;t.debugMode=0,t.devicePixelRatio=r},LSTS:
|
|
|
/*!*********************************************************************!*\
|
|
|
!*** ./node_modules/react-infinite-scroller/dist/InfiniteScroll.js ***!
|
|
|
\*********************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(/*! react */"q1tI"),a=s(i),o=s(n(/*! prop-types */"17x9"));function s(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.scrollListener=n.scrollListener.bind(n),n.eventListenerOptions=n.eventListenerOptions.bind(n),n.mousewheelListener=n.mousewheelListener.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var e=this.getParentElement(this.scrollComponent);e.scrollTop=e.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var e=!1,t={get passive(){e=!0}};try{document.addEventListener("test",null,t),document.removeEventListener("test",null,t)}catch(e){}return e}},{key:"eventListenerOptions",value:function(){var e=this.props.useCapture;return this.isPassiveSupported()&&(e={useCapture:this.props.useCapture,passive:!0}),e}},{key:"setDefaultLoader",value:function(e){this.defaultLoader=e}},{key:"detachMousewheelListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.scrollComponent.parentNode),e.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.getParentElement(this.scrollComponent)),e.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),e.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(e){var t=this.props.getScrollParent&&this.props.getScrollParent();return null!=t?t:e&&e.parentNode}},{key:"filterProps",value:function(e){return e}},{key:"attachScrollListener",value:function(){var e=this.getParentElement(this.scrollComponent);if(this.props.hasMore&&e){var t=window;!1===this.props.useWindow&&(t=e),t.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),t.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(e){1!==e.deltaY||this.isPassiveSupported()||e.preventDefault()}},{key:"scrollListener",value:function(){var e=this.scrollComponent,t=window,n=this.getParentElement(e),r=void 0;if(this.props.useWindow){var i=document.documentElement||document.body.parentNode||document.body,a=void 0!==t.pageYOffset?t.pageYOffset:i.scrollTop;r=this.props.isReverse?a:this.calculateOffset(e,a)}else r=this.props.isReverse?n.scrollTop:e.scrollHeight-n.scrollTop-n.clientHeight;r<Number(this.props.threshold)&&e&&null!==e.offsetParent&&(this.detachScrollListener(),this.beforeScrollHeight=n.scrollHeight,this.beforeScrollTop=n.scrollTop,"function"==typeof this.props.loadMore&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(e,t){return e?this.calculateTopPosition(e)+(e.offsetHeight-t-window.innerHeight):0}},{key:"calculateTopPosition",value:function(e){return e?e.offsetTop+this.calculateTopPosition(e.offsetParent):0}},{key:"render",value:function(){var e=this,t=this.filterProps(this.props),n=t.children,r=t.element,i=t.hasMore,o=(t.initialLoad,t.isReverse),s=t.loader,l=(t.loadMore,t.pageStart,t.ref),c=(t.threshold,t.useCapture,t.useWindow,t.getScrollParent,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]));c.ref=function(t){e.scrollComponent=t,l&&l(t)};var u=[n];return i&&(s?o?u.unshift(s):u.push(s):this.defaultLoader&&(o?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),a.default.createElement(r,c,u)}}]),t}(i.Component);l.propTypes={children:o.default.node.isRequired,element:o.default.node,hasMore:o.default.bool,initialLoad:o.default.bool,isReverse:o.default.bool,loader:o.default.node,loadMore:o.default.func.isRequired,pageStart:o.default.number,ref:o.default.func,getScrollParent:o.default.func,threshold:o.default.number,useCapture:o.default.bool,useWindow:o.default.bool},l.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=l,e.exports=t.default},LYsE:
|
|
|
/*!**********************************************************!*\
|
|
|
!*** ./src/components/DragSubject/index.tsx + 8 modules ***!
|
|
|
\**********************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/DragSubject/index.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/Edit/components/editor.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/umiExports.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/Editor/NullChildEditor/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/Editor/NullMDEditor.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/Knowledge/index.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/index.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/service/exercise.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/checkbox/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/checkbox/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/divider/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/divider/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/switch/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/switch/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/lodash.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-beautiful-dnd/dist/react-beautiful-dnd.esm.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router-dom/esm/react-router-dom.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router/esm/react-router.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("k1fw"),i=(n("/zsF"),n("PArb")),a=n("0Owb"),o=n("tJVT"),s=n("q1tI"),l=n.n(s),c=(n("5Dmo"),n("3S7+")),u=(n("14J3"),n("BMrR")),d=(n("5NDa"),n("5rEg")),h=(n("jCWc"),n("kPKH")),f=(n("+L6B"),n("2/Rp")),p=(n("BoS7"),n("Sdc0")),m=(n("7Kak"),n("9yH6")),g=(n("giR+"),n("fyUT")),v=(n("sRBo"),n("kaz8")),b=(n("2qtc"),n("kLXV")),y=(n("miYZ"),n("tsqr")),E=n("9og8"),x=n("oBTY"),_=n("PpiC"),k=n("WmNS"),w=n.n(k),C=n("Ty5D"),S=n("9kvl"),O=n("V0Rq"),A=n("kqOp"),T=n("7qnI"),I=n("1vsH"),D=n("YJx+"),L=n.n(D),R=n("9Bee"),N=n("u2Z1"),j=function(e,t){e.problemset,e.globalSetting;var n=e.exercise,i=(e.loading,e.dispatch),a=e.editData,k=e.editKey,S=e.setEditKey,D=void 0===S?function(){}:S,j=e.cancelAdd,M=void 0===j?function(){}:j,P=e.addCallback,B=void 0===P?function(){}:P,F=(e.setIsClaer,Object(_.a)(e,["problemset","globalSetting","exercise","loading","dispatch","editData","editKey","setEditKey","cancelAdd","addCallback","setIsClaer"]),Object(s.useState)("")),U=Object(o.a)(F,2),H=U[0],z=U[1],G=Object(s.useState)(""),V=Object(o.a)(G,2),W=V[0],K=(V[1],Object(s.useState)([])),q=Object(o.a)(K,2),Y=q[0],Q=q[1],J=Object(s.useState)(""),X=Object(o.a)(J,2),Z=X[0],$=X[1],ee=Object(s.useState)(),te=Object(o.a)(ee,2),ne=te[0],re=te[1],ie=Object(s.useState)(!1),ae=Object(o.a)(ie,2),oe=ae[0],se=ae[1],le=Object(s.useState)(),ce=Object(o.a)(le,2),ue=ce[0],de=ce[1],he=Object(s.useState)(0),fe=Object(o.a)(he,2),pe=fe[0],me=fe[1],ge=Object(s.useState)(!1),ve=Object(o.a)(ge,2),be=ve[0],ye=ve[1],Ee=Object(s.useState)(!1),xe=Object(o.a)(Ee,2),_e=xe[0],ke=xe[1],we=Object(s.useState)([]),Ce=Object(o.a)(we,2),Se=Ce[0],Oe=Ce[1],Ae=Object(s.useState)(1),Te=Object(o.a)(Ae,2),Ie=Te[0],De=Te[1],Le=Object(s.useState)(!1),Re=Object(o.a)(Le,2),Ne=Re[0],je=Re[1],Me=Object(C.i)(),Pe=Object(s.useState)([]),Be=Object(o.a)(Pe,2),Fe=Be[0],Ue=Be[1],He=function(e){Ue([].concat(Object(x.a)(Fe),[Object(r.a)({},e)]))};Object(s.useEffect)((function(){if(null==a||!a.question_title)return ye(!0),z(""),re(!1),de(2),Q([]),$(""),void se(!1);z(null==a?void 0:a.question_title),re(null==a?void 0:a.is_ordered),De(null==a?void 0:a.difficulty),je(!(null!=a&&a.repeat_answer)),de(ue||(null==a?void 0:a.question_score));var e=null==a?void 0:a.standard_answer.map((function(e){return e.answer_text}));Q(Object(x.a)(e)),Oe(a.tag_discipline_ids)}),[a,be]),Object(s.useEffect)((function(){function e(){return(e=Object(E.a)(w.a.mark((function e(){var t,r,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(O.H)({sub_discipline_id:null===(t=n.editData)||void 0===t||null===(r=t.exercise)||void 0===r?void 0:r.sub_discipline_id});case 2:i=e.sent,Ue(i.tag_disciplines);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}se(!1),be&&function(){e.apply(this,arguments)}()}),[be]),Object(s.useImperativeHandle)(t,(function(){return{onSave:Qe,isEdit:be}})),Object(s.useEffect)((function(){var e,t=null!=n&&null!==(e=n.tagDisciplineData)&&void 0!==e&&e.tag_disciplines&&Array.isArray(n.tagDisciplineData.tag_disciplines)?n.tagDisciplineData.tag_disciplines:[];Ue(t)}),[n.tagDisciplineData]);var ze,Ge,Ve,We,Ke,qe,Ye,Qe=function(){var e=Object(E.a)(w.a.mark((function e(){var t,o,s,l,c,u;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=[],o=!1,ke(!0),Y.forEach((function(e,n){t.push({choice_id:n+1,answer_text:[]}),e.forEach((function(e,r){t[n].answer_text.push(e),e&&Object(I.bb)(e,1e4)||($("".concat(n,"-").concat(r)),y.b.info(e?"答案不能超过10000字符":"答案:不能为空"),o=!0)}))})),!o){e.next=7;break}return ke(!1),e.abrupt("return",!1);case 7:if(!a.question_id){e.next=18;break}if(1!==(null==a?void 0:a.is_my)){e.next=12;break}b.a.confirm({title:"提示",content:"此题目已存在于试题库,是否将修改后的题目覆盖试题库的原题?",okText:"覆盖原题",cancelText:"不覆盖",onOk:function(){var e=Object(E.a)(w.a.mark((function e(){var o,s;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:H,question_type:3,question_score:ue,is_ordered:ne,standard_answers:t,tag_discipline_ids:Se,sub_discipline_id:null===(o=n.editData)||void 0===o||null===(s=o.exercise)||void 0===s?void 0:s.sub_discipline_id,difficulty:Ie,is_cover:1,repeat_answer:!Ne}});case 2:0===e.sent.status&&(D(-1),y.b.success("保存成功"),ye(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},Me)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),onCancel:function(){var e=Object(E.a)(w.a.mark((function e(){var o,s;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:H,question_type:3,question_score:ue,is_ordered:ne,standard_answers:t,tag_discipline_ids:Se,sub_discipline_id:null===(o=n.editData)||void 0===o||null===(s=o.exercise)||void 0===s?void 0:s.sub_discipline_id,difficulty:Ie,repeat_answer:!Ne}});case 2:0===e.sent.status&&(D(-1),y.b.success("保存成功"),ye(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},Me)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),e.next=16;break;case 12:return e.next=14,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:H,question_type:3,question_score:ue,is_ordered:ne,standard_answers:t,tag_discipline_ids:Se,sub_discipline_id:null===(s=n.editData)||void 0===s||null===(l=s.exercise)||void 0===l?void 0:l.sub_discipline_id,difficulty:Ie,repeat_answer:!Ne}});case 14:0===e.sent.status&&(D(-1),y.b.success("保存成功"),ye(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},Me)}));case 16:e.next=22;break;case 18:return e.next=20,i({type:"exercise/addExerciseQuestion",payload:{insert_id:null==a?void 0:a.insert_id,categoryId:Me.categoryId,question_title:H,question_type:3,question_score:ue,is_ordered:ne,standard_answers:t,tag_discipline_ids:Se,sub_discipline_id:null===(c=n.editData)||void 0===c||null===(u=c.exercise)||void 0===u?void 0:u.sub_discipline_id,difficulty:Ie,repeat_answer:!Ne}});case 20:0===e.sent.status&&(D(-1),y.b.success("保存成功"),ye(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},Me)}));case 22:return ke(!1),e.abrupt("return",{name:H,analysis:W,standard_answers:t,is_ordered:ne});case 24:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Je=function(e,t,n){var r=Y.slice();if(t&&r.splice(e,t),n&&oe||!a.question_id)for(var i=0;i<n;i++)r.splice(e+i,0,[""]);me(null==r?void 0:r.length),se(!0),console.log(r,"newStandardAnswers"),Q(r)},Xe=function(e,t,n){$("");var r=Y.slice();r[e][t]=n,Q(r)},Ze=function(e){var t=Y.slice();t[e]=[].concat(Object(x.a)(t[e]),[""]),Q(t)},$e=function(e,t){var n=Y.slice();if(!n[e][t])return n[e]=n[e].filter((function(e,n){return n!==t})),void Q(n);b.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:L.a.modal,onOk:function(){n[e]=n[e].filter((function(e,n){return n!==t})),Q(n)}})},et=function(e){b.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:L.a.modal,onOk:function(){var t=0;z(H.replace(/\▁/g,(function(n){return++t-1===e?"":n}))),setTimeout((function(){var t=Y.slice();t=Y.filter((function(t,n){return e!==n})),Q(t)}),500)}})},tt=[{name:"删除",icon:"iconfont c-light-black ml30 icon-shanchu current",id:"del"},{name:"(向下插入单选题)",icon:"iconfont c-light-primary ml30 icon-tianjia current",id:"add"},{name:"编辑",icon:"iconfont c-light-primary ml30 icon-bianjishijuan3x current",id:"edit"}].filter((function(e){var t,r;return 1===(null==n||null===(t=n.editData)||void 0===t||null===(r=t.exercise)||void 0===r?void 0:r.exercise_status)?e:"del"!==e.id&&"add"!==e.id})),nt=function(){var e=Object(E.a)(w.a.mark((function e(t){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(-1===k){e.next=3;break}return y.b.error("请先保存或取消当前正在编辑的问题。"),e.abrupt("return");case 3:e.t0=t.id,e.next="del"===e.t0?6:"up"===e.t0||"down"===e.t0?8:"edit"===e.t0?12:"add"===e.t0?15:17;break;case 6:return b.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"确认要删除这个试题吗?",onOk:function(){return Object(E.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(O.m)({id:a.question_id});case 2:i({type:"exercise/editExercise",payload:Object(r.a)({},Me)});case 3:case"end":return e.stop()}}),e)})))()}}),e.abrupt("break",17);case 8:return e.next=10,i({type:"exercise/exeriseMoveUpDown",payload:{id:a.question_id,opr:t.id}});case 10:return i({type:"exercise/editExercise",payload:Object(r.a)({},Me)}),e.abrupt("break",17);case 12:return D(a.dragKey),ye(!0),e.abrupt("break",17);case 15:return B({key:a.key,insert_id:null==a?void 0:a.question_id,question_type:3}),e.abrupt("break",17);case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return l.a.createElement("section",{className:L.a.wrap},!be&&l.a.createElement("aside",null,l.a.createElement("div",{className:L.a.questionType},!(null!=a&&a.isPreview)&&l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},a.key,"、填空题"),"(",a.question_score,"分)")),null!=a&&a.isPreview?l.a.createElement("div",{style:{display:"flex"}},l.a.createElement("span",{style:{flexShrink:0},className:"font18"},a.key,"."),l.a.createElement(R.a,{value:a.question_title}),l.a.createElement("span",{style:{flexShrink:0},className:"font16"},"(",a.question_score,"分)")):l.a.createElement("div",{className:"mt5"},l.a.createElement(R.a,{value:a.question_title})),l.a.createElement("div",{className:L.a.questionChoices},null==a||null===(Ye=a.standard_answer)||void 0===Ye?void 0:Ye.map((function(e,t){return l.a.createElement(u.a,{key:t,align:"middle"},l.a.createElement(h.a,null,"答案(填空",e.choice_id,"):"),l.a.createElement(h.a,{flex:"1"},l.a.createElement(u.a,{align:"middle",gutter:[1,1]},e.answer_text.map((function(e,n){return l.a.createElement(h.a,{span:24,key:n},l.a.createElement(d.a,{key:t,checked:a.standard_answer.includes(t),disabled:!0,value:e}))})))))}))),l.a.createElement("div",{className:L.a.action},!a.hideAction&&tt.map((function(e,t){return"up"===e.id&&1===a.key||"down"===e.id&&a.key===a.len?null:l.a.createElement(c.a,{key:t,placement:"bottom",title:e.name},l.a.createElement("span",{onClick:function(){return nt(e)},className:e.icon}))})))),be&&(console.log(Y,"answers"),l.a.createElement("aside",null,l.a.createElement("div",{className:L.a.questionType},l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},"填空题"),"(客观题,由系统自动评分,允许手动调分,请设置标准答案 ;支持最多5个空,每空得分按照本题的总分平均计算)")),l.a.createElement("div",null,l.a.createElement(A.a,{id:"completion-question-tittle",placeholder:"请您输入题目",height:155,defaultValue:H,onChange:function(e){return z(e)},showNullButton:1===(null===(ze=n.editData)||void 0===ze||null===(Ge=ze.exercise)||void 0===Ge?void 0:Ge.exercise_status),deleteEmptyDisabled:1!==(null===(Ve=n.editData)||void 0===Ve||null===(We=Ve.exercise)||void 0===We?void 0:We.exercise_status)||_e,onPlaceholderChange:Je})),l.a.createElement("div",{className:"mt20"},Y.map((function(e,t){var r,i;return l.a.createElement(T.a,{key:t,answers:e,index:t,is_md:!0,exerciseIsPublish:1!==(null===(r=n.editData)||void 0===r||null===(i=r.exercise)||void 0===i?void 0:i.exercise_status),activeOptionErrorIndex:Z,onAnswerChange:Xe,addChildAnswer:Ze,deleteChildAnswer:$e,deleteChildAnswermain:et})}))),l.a.createElement("div",{className:"mt20"},Y.length>1&&l.a.createElement("span",null,l.a.createElement(v.a,{checked:ne,onChange:function(e){return re(e.target.checked)},className:"".concat(L.a.color333," font14")},"多个填空的答案有顺序要求"),l.a.createElement("span",{className:"".concat(L.a.color999," font12")},"(选中,每个填空的答案顺序必须与参考答案一致)"))),l.a.createElement("p",{className:""},l.a.createElement("span",{style:{color:"red"}},"*"),"分值:",l.a.createElement(g.a,{value:ue,max:1e4,min:0,onChange:function(e){de(e)}})," 分 ",!!ue&&!!pe&&l.a.createElement("span",{style:{color:"red"}},"(根据均分规则,本题每空",(ue/pe).toFixed(1),"分)"),l.a.createElement("span",{style:{marginLeft:"30px"},className:L.a.difficult},l.a.createElement("label",{style:{color:"red"}},"*")," 难度:",l.a.createElement(m.a.Group,{value:Ie,onChange:function(e){De(e.target.value)}},l.a.createElement(m.a.Button,{value:1},"简单"),l.a.createElement(m.a.Button,{value:2},"适中"),l.a.createElement(m.a.Button,{value:3},"困难")))),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:"".concat(L.a.title)},"知识点:",l.a.createElement("span",{className:L.a.colorGray},"(所有自建知识点仅本人可见,被EduCoder平台审核通过为官方知识点后所有用户可见)")),l.a.createElement("div",{className:"mt5"},l.a.createElement(N.a,{value:Se,selectvalues:null==a?void 0:a.tag_discipline_ids,onChange:Oe,subId:null===(Ke=n.editData)||void 0===Ke||null===(qe=Ke.exercise)||void 0===qe?void 0:qe.sub_discipline_id,knowledgeOptions:Fe,onAddKnowledgeFinish:He})),l.a.createElement("div",{style:{marginTop:10}},l.a.createElement("span",{style:{marginRight:10}},"不允许学生重复答题"),l.a.createElement(p.a,{checked:Ne,onChange:function(e){je(e)}}))),l.a.createElement("aside",{className:"tr"},(-1!==k||a.question_id)&&l.a.createElement(f.a,{type:"default",onClick:function(){M(),ye(!1)}},"取消"),l.a.createElement(f.a,{className:"ml20",type:"primary",onClick:function(){Qe()}},"保存")))))},M=Object(S.a)((function(e){var t=e.problemset,n=e.loading,r=e.exercise;return{problemset:t,globalSetting:e.globalSetting,exercise:r,loading:n.effects}}),null,null,{forwardRef:!0})(Object(s.forwardRef)(j)),P=n("Ot1p"),B=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],F=function(e,t){e.problemset,e.globalSetting;var n=e.exercise,i=(e.loading,e.dispatch),a=(e.onRef,e.editData),u=e.editKey,d=e.setEditKey,h=void 0===d?function(){}:d,v=e.cancelAdd,k=void 0===v?function(){}:v,S=e.addCallback,A=void 0===S?function(){}:S,T=(e.setIsClaer,Object(_.a)(e,["problemset","globalSetting","exercise","loading","dispatch","onRef","editData","editKey","setEditKey","cancelAdd","addCallback","setIsClaer"]),Object(s.useState)()),I=Object(o.a)(T,2),D=I[0],j=I[1],M=Object(s.useState)(""),F=Object(o.a)(M,2),U=F[0],H=F[1],z=Object(s.useState)(!1),G=Object(o.a)(z,2),V=G[0],W=G[1],K=Object(s.useState)(),q=Object(o.a)(K,2),Y=q[0],Q=q[1],J=Object(s.useState)([]),X=Object(o.a)(J,2),Z=X[0],$=X[1],ee=Object(s.useState)([]),te=Object(o.a)(ee,2),ne=te[0],re=te[1],ie=Object(s.useState)(1),ae=Object(o.a)(ie,2),oe=ae[0],se=ae[1],le=Object(s.useState)(!1),ce=Object(o.a)(le,2),ue=ce[0],de=ce[1],he=function(e){re([].concat(Object(x.a)(ne),[Object(r.a)({},e)]))},fe=Object(C.i)();Object(s.useEffect)((function(){if(null==a||!a.question_choices)return W(!0),H(""),Q(2),void j("");de(!(null!=a&&a.repeat_answer)),H(null==a?void 0:a.question_title),Q(Y||(null==a?void 0:a.question_score)),se(null==a?void 0:a.difficulty),j(a.standard_answer[0]+""),$(a.tag_discipline_ids)}),[a,V]),Object(s.useEffect)((function(){function e(){return(e=Object(E.a)(w.a.mark((function e(){var t,r,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(O.H)({sub_discipline_id:null===(t=n.editData)||void 0===t||null===(r=t.exercise)||void 0===r?void 0:r.sub_discipline_id});case 2:i=e.sent,re(i.tag_disciplines);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}V&&function(){e.apply(this,arguments)}()}),[V]),Object(s.useImperativeHandle)(t,(function(){return{onSave:ve,isEdit:V}})),Object(s.useEffect)((function(){var e,t=null!=n&&null!==(e=n.tagDisciplineData)&&void 0!==e&&e.tag_disciplines&&Array.isArray(n.tagDisciplineData.tag_disciplines)?n.tagDisciplineData.tag_disciplines:[];re(t)}),[n.tagDisciplineData]);var pe,me,ge,ve=function(){var e=Object(E.a)(w.a.mark((function e(){var t,o,s,l,c;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(U){e.next=3;break}return y.b.info("请您输入题干"),e.abrupt("return",!1);case 3:if(D){e.next=6;break}return y.b.info("请先点击选择本选择题的正确选项"),e.abrupt("return",!1);case 6:if(t=[{choice_text:"正确",is_answer:"1"===D?1:0},{choice_text:"错误",is_answer:"2"===D?2:0}],!a.question_id){e.next=18;break}if(1!==(null==a?void 0:a.is_my)){e.next=12;break}b.a.confirm({title:"提示",content:"此题目已存在于试题库,是否将修改后的题目覆盖试题库的原题?",okText:"覆盖原题",cancelText:"不覆盖",onOk:function(){var e=Object(E.a)(w.a.mark((function e(){var o,s;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:U,question_type:2,question_score:Y,question_choices:t.map((function(e){return e.choice_text})),standard_answers:t.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer})),tag_discipline_ids:Z,sub_discipline_id:null===(o=n.editData)||void 0===o||null===(s=o.exercise)||void 0===s?void 0:s.sub_discipline_id,difficulty:oe,is_cover:1,repeat_answer:!ue}});case 2:0===e.sent.status&&(h(-1),y.b.success("保存成功"),W(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},fe)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),onCancel:function(){var e=Object(E.a)(w.a.mark((function e(){var o,s;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:U,question_type:2,question_score:Y,question_choices:t.map((function(e){return e.choice_text})),standard_answers:t.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer})),tag_discipline_ids:Z,sub_discipline_id:null===(o=n.editData)||void 0===o||null===(s=o.exercise)||void 0===s?void 0:s.sub_discipline_id,difficulty:oe,repeat_answer:!ue}});case 2:0===e.sent.status&&(h(-1),y.b.success("保存成功"),W(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},fe)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),e.next=16;break;case 12:return e.next=14,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:U,question_type:2,question_score:Y,question_choices:t.map((function(e){return e.choice_text})),standard_answers:t.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer})),tag_discipline_ids:Z,sub_discipline_id:null===(o=n.editData)||void 0===o||null===(s=o.exercise)||void 0===s?void 0:s.sub_discipline_id,difficulty:oe,repeat_answer:!ue}});case 14:0===e.sent.status&&(h(-1),y.b.success("保存成功"),W(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},fe)}));case 16:e.next=22;break;case 18:return e.next=20,i({type:"exercise/addExerciseQuestion",payload:{insert_id:null==a?void 0:a.insert_id,categoryId:fe.categoryId,question_title:U,question_type:2,question_score:Y,question_choices:t.map((function(e){return e.choice_text})),standard_answers:t.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer})),tag_discipline_ids:Z,sub_discipline_id:null===(l=n.editData)||void 0===l||null===(c=l.exercise)||void 0===c?void 0:c.sub_discipline_id,difficulty:oe,repeat_answer:!ue}});case 20:0===e.sent.status&&(h(-1),y.b.success("保存成功"),W(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},fe)}));case 22:return e.abrupt("return",{name:U,choices:t});case 23:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),be=[{name:"删除",icon:"iconfont c-light-black ml30 icon-shanchu current",id:"del"},{name:"(向下插入单选题)",icon:"iconfont c-light-primary ml30 icon-tianjia current",id:"add"},{name:"编辑",icon:"iconfont c-light-primary ml30 icon-bianjishijuan3x current",id:"edit"}].filter((function(e){var t,r;return 1===(null==n||null===(t=n.editData)||void 0===t||null===(r=t.exercise)||void 0===r?void 0:r.exercise_status)?e:"del"!==e.id&&"add"!==e.id})),ye=function(){var e=Object(E.a)(w.a.mark((function e(t){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(-1===u){e.next=3;break}return y.b.error("请先保存或取消当前正在编辑的问题。"),e.abrupt("return");case 3:e.t0=t.id,e.next="del"===e.t0?6:"up"===e.t0||"down"===e.t0?8:"edit"===e.t0?12:"add"===e.t0?15:17;break;case 6:return b.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"确认要删除这个试题吗?",onOk:function(){return Object(E.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(O.m)({id:a.question_id});case 2:i({type:"exercise/editExercise",payload:Object(r.a)({},fe)});case 3:case"end":return e.stop()}}),e)})))()}}),e.abrupt("break",17);case 8:return e.next=10,i({type:"exercise/exeriseMoveUpDown",payload:{id:a.question_id,opr:t.id}});case 10:return i({type:"exercise/editExercise",payload:Object(r.a)({},fe)}),e.abrupt("break",17);case 12:return h(a.dragKey),W(!0),e.abrupt("break",17);case 15:return A({key:a.key,insert_id:null==a?void 0:a.question_id,question_type:2}),e.abrupt("break",17);case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return l.a.createElement("section",{className:L.a.wrap},!V&&l.a.createElement("aside",null,l.a.createElement("div",{className:L.a.questionType},!(null!=a&&a.isPreview)&&l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},a.key,"、判断题"),"(",a.question_score,"分)")),null!=a&&a.isPreview?l.a.createElement("div",{style:{display:"flex"}},l.a.createElement("span",{style:{flexShrink:0},className:"font18"},a.key,"."),l.a.createElement(R.a,{value:a.question_title}),l.a.createElement("span",{style:{flexShrink:0},className:"font16"},"(",a.question_score,"分)")):l.a.createElement("div",{className:"mt5"},l.a.createElement(R.a,{value:a.question_title})),l.a.createElement("div",{className:L.a.questionChoices},null==a||null===(ge=a.question_choices)||void 0===ge?void 0:ge.map((function(e,t){return l.a.createElement(m.a,{key:t,checked:a.standard_answer.includes(t+1),disabled:!0},B[t],". ",l.a.createElement("span",{className:"c-black font14"},e.choice_text))}))),l.a.createElement("div",{className:L.a.action},!a.hideAction&&be.map((function(e,t){return"up"===e.id&&1===a.key||"down"===e.id&&a.key===a.len?null:l.a.createElement(c.a,{key:t,placement:"bottom",title:e.name},l.a.createElement("span",{onClick:function(){return ye(e)},className:e.icon}))})))),V&&l.a.createElement("aside",null,l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},"判断题"),"(客观题,由系统自动评分,请设置标准答案)"),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:L.a.required},"*"),l.a.createElement("span",{className:L.a.title},"题干:")),l.a.createElement(P.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:U,onChange:function(e){return H(e)}}),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:L.a.required},"*"),l.a.createElement("span",{className:L.a.title},"答案选项:",l.a.createElement("span",{className:L.a.colorGray},"点击选项可设置正确答案"))),l.a.createElement(m.a.Group,{buttonStyle:"solid",value:D,onChange:function(e){return j(e.target.value)}},l.a.createElement(m.a.Button,{value:"1",className:"".concat(L.a.radio," mr40")},"正确"),l.a.createElement(m.a.Button,{value:"2",className:L.a.radio},"错误")),l.a.createElement("p",{className:"c-orange"},"温馨提示:点击选项,可以直接设置标准答案"),l.a.createElement("p",{className:""},"分值:",l.a.createElement(g.a,{value:Y,max:1e4,min:0,onChange:function(e){Q(e)}})," 分",l.a.createElement("span",{style:{marginLeft:"30px"},className:L.a.difficult},l.a.createElement("label",{style:{color:"red"}},"*")," 难度:",l.a.createElement(m.a.Group,{value:oe,onChange:function(e){se(e.target.value)}},l.a.createElement(m.a.Button,{value:1},"简单"),l.a.createElement(m.a.Button,{value:2},"适中"),l.a.createElement(m.a.Button,{value:3},"困难")))),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:"".concat(L.a.title)},"知识点:",l.a.createElement("span",{className:L.a.colorGray},"(所有自建知识点仅本人可见,被EduCoder平台审核通过为官方知识点后所有用户可见)")),l.a.createElement("div",{className:"mt5"},l.a.createElement(N.a,{value:Z,selectvalues:null==a?void 0:a.tag_discipline_ids,onChange:$,subId:null===(pe=n.editData)||void 0===pe||null===(me=pe.exercise)||void 0===me?void 0:me.sub_discipline_id,knowledgeOptions:ne,onAddKnowledgeFinish:he})),l.a.createElement("div",{style:{marginTop:10}},l.a.createElement("span",{style:{marginRight:10}},"不允许学生重复答题"),l.a.createElement(p.a,{checked:ue,onChange:function(e){de(e)}}))),l.a.createElement("aside",{className:"tr"},(-1!==u||a.question_id)&&l.a.createElement(f.a,{type:"default",onClick:function(){k(),W(!1)}},"取消"),l.a.createElement(f.a,{className:"ml20",type:"primary",onClick:function(){ve()}},"保存"))))},U=Object(S.a)((function(e){var t=e.problemset,n=e.loading,r=e.exercise;return{problemset:t,globalSetting:e.globalSetting,exercise:r,loading:n.effects}}),null,null,{forwardRef:!0})(Object(s.forwardRef)(F)),H=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],z=function(e,t){e.problemset,e.globalSetting;var n=e.exercise,i=(e.loading,e.dispatch),a=(e.onRef,e.editData),d=e.cancelAdd,k=void 0===d?function(){}:d,S=e.editKey,A=e.setEditKey,T=void 0===A?function(){}:A,I=(e.setIsClaer,e.addCallback),D=void 0===I?function(e){}:I,j=(Object(_.a)(e,["problemset","globalSetting","exercise","loading","dispatch","onRef","editData","cancelAdd","editKey","setEditKey","setIsClaer","addCallback"]),Object(s.useState)([])),M=Object(o.a)(j,2),B=M[0],F=M[1],U=Object(s.useState)(),z=Object(o.a)(U,2),G=z[0],V=z[1],W=Object(s.useState)([]),K=Object(o.a)(W,2),q=K[0],Y=K[1],Q=Object(s.useState)(""),J=Object(o.a)(Q,2),X=J[0],Z=J[1],$=Object(s.useState)(),ee=Object(o.a)($,2),te=ee[0],ne=ee[1],re=Object(s.useState)(!1),ie=Object(o.a)(re,2),ae=ie[0],oe=ie[1],se=Object(s.useState)([]),le=Object(o.a)(se,2),ce=le[0],ue=le[1],de=Object(s.useState)(1),he=Object(o.a)(de,2),fe=he[0],pe=he[1],me=Object(s.useState)(!1),ge=Object(o.a)(me,2),ve=ge[0],be=ge[1],ye=Object(s.useState)([]),Ee=Object(o.a)(ye,2),xe=Ee[0],_e=Ee[1],ke=function(e){_e([].concat(Object(x.a)(xe),[Object(r.a)({},e)]))},we=Object(C.i)();Object(s.useEffect)((function(){F(["","","",""])}),[]),Object(s.useEffect)((function(){if(null==a||!a.question_choices)return oe(!0),Z(""),ne(5),F(["","","",""]),void Y([]);Z(null==a?void 0:a.question_title),ne(te||(null==a?void 0:a.question_score)),be(!(null!=a&&a.repeat_answer)),pe(null==a?void 0:a.difficulty),F(null==a?void 0:a.question_choices.map((function(e){return e.choice_text})));var e=[];null==a||a.standard_answer.map((function(t,n){e.push(t-1)})),Y(e),ue(a.tag_discipline_ids)}),[a,ae]),Object(s.useEffect)((function(){function e(){return(e=Object(E.a)(w.a.mark((function e(){var t,r,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(O.H)({sub_discipline_id:null===(t=n.editData)||void 0===t||null===(r=t.exercise)||void 0===r?void 0:r.sub_discipline_id});case 2:i=e.sent,_e(i.tag_disciplines);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}ae&&function(){e.apply(this,arguments)}()}),[ae]),Object(s.useImperativeHandle)(t,(function(){return{onSave:Ae,isEdit:ae}})),Object(s.useEffect)((function(){var e,t=null!=n&&null!==(e=n.tagDisciplineData)&&void 0!==e&&e.tag_disciplines&&Array.isArray(n.tagDisciplineData.tag_disciplines)?n.tagDisciplineData.tag_disciplines:[];_e(t)}),[n.tagDisciplineData]);var Ce,Se,Oe,Ae=function(){var e=Object(E.a)(w.a.mark((function e(){var t,o,s,l,c,u;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(X){e.next=3;break}return y.b.info("请您输入题目"),e.abrupt("return",!1);case 3:if(!((t=B.findIndex((function(e){return!e})))>-1)){e.next=7;break}return y.b.info("请先输入 ".concat(H[t]," 选项的内容")),e.abrupt("return",!1);case 7:if(q.length){e.next=10;break}return y.b.info("请设置本题的正确答案,点击选项A/B...即可完成设置"),e.abrupt("return",!1);case 10:if(!(q.length<1)){e.next=13;break}return y.b.info("请选择答案"),e.abrupt("return",!1);case 13:if(o=B.map((function(e,t){return{choice_text:e,is_answer:q.includes(t)?t+1:0}})),!a.question_id){e.next=25;break}if(1!==(null==a?void 0:a.is_my)){e.next=19;break}b.a.confirm({title:"提示",content:"此题目已存在于试题库,是否将修改后的题目覆盖试题库的原题?",okText:"覆盖原题",cancelText:"不覆盖",onOk:function(){var e=Object(E.a)(w.a.mark((function e(){var t,s;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:X,question_type:1,question_score:te,question_choices:o.map((function(e){return e.choice_text})),standard_answers:o.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer})),tag_discipline_ids:ce,sub_discipline_id:null===(t=n.editData)||void 0===t||null===(s=t.exercise)||void 0===s?void 0:s.sub_discipline_id,difficulty:fe,is_cover:1,repeat_answer:!ve}});case 2:0===e.sent.status&&(T(-1),y.b.success("保存成功"),oe(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},we)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),onCancel:function(){var e=Object(E.a)(w.a.mark((function e(){var t,s;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:X,question_type:1,question_score:te,question_choices:o.map((function(e){return e.choice_text})),standard_answers:o.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer})),tag_discipline_ids:ce,sub_discipline_id:null===(t=n.editData)||void 0===t||null===(s=t.exercise)||void 0===s?void 0:s.sub_discipline_id,difficulty:fe,repeat_answer:!ve}});case 2:0===e.sent.status&&(T(-1),y.b.success("保存成功"),oe(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},we)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),e.next=23;break;case 19:return e.next=21,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:X,question_type:1,question_score:te,question_choices:o.map((function(e){return e.choice_text})),standard_answers:o.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer})),tag_discipline_ids:ce,sub_discipline_id:null===(s=n.editData)||void 0===s||null===(l=s.exercise)||void 0===l?void 0:l.sub_discipline_id,difficulty:fe,repeat_answer:!ve}});case 21:0===e.sent.status&&(T(-1),y.b.success("保存成功"),oe(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},we)}));case 23:e.next=29;break;case 25:return e.next=27,i({type:"exercise/addExerciseQuestion",payload:{insert_id:null==a?void 0:a.insert_id,categoryId:we.categoryId,question_title:X,question_type:1,question_score:te,question_choices:o.map((function(e){return e.choice_text})),standard_answers:o.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer})),tag_discipline_ids:ce,sub_discipline_id:null===(c=n.editData)||void 0===c||null===(u=c.exercise)||void 0===u?void 0:u.sub_discipline_id,difficulty:fe,repeat_answer:!ve}});case 27:0===e.sent.status&&(T(-1),y.b.success("保存成功"),oe(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},we)}));case 29:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Te=[{name:"删除",icon:"iconfont c-light-black ml30 icon-shanchu current",id:"del"},{name:"(向下插入单选题)",icon:"iconfont c-light-primary ml30 icon-tianjia current",id:"add"},{name:"编辑",icon:"iconfont c-light-primary ml30 icon-bianjishijuan3x current",id:"edit"}].filter((function(e){var t,r;return 1===(null==n||null===(t=n.editData)||void 0===t||null===(r=t.exercise)||void 0===r?void 0:r.exercise_status)?e:"del"!==e.id&&"add"!==e.id})),Ie=function(){var e=Object(E.a)(w.a.mark((function e(t){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(-1===S){e.next=3;break}return y.b.error("请先保存或取消当前正在编辑的问题。"),e.abrupt("return");case 3:e.t0=t.id,e.next="del"===e.t0?6:"up"===e.t0||"down"===e.t0?8:"edit"===e.t0?12:"add"===e.t0?15:17;break;case 6:return b.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"确认要删除这个试题吗?",onOk:function(){return Object(E.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(O.m)({id:a.question_id});case 2:i({type:"exercise/editExercise",payload:Object(r.a)({},we)});case 3:case"end":return e.stop()}}),e)})))()}}),e.abrupt("break",17);case 8:return e.next=10,i({type:"exercise/exeriseMoveUpDown",payload:{id:a.question_id,opr:t.id}});case 10:return i({type:"exercise/editExercise",payload:Object(r.a)({},we)}),e.abrupt("break",17);case 12:return T(a.dragKey),oe(!0),e.abrupt("break",17);case 15:return D({key:a.key,insert_id:null==a?void 0:a.question_id,question_type:1}),e.abrupt("break",17);case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return l.a.createElement("section",{className:L.a.wrap},!ae&&l.a.createElement("aside",null,l.a.createElement("div",{className:L.a.questionType},!(null!=a&&a.isPreview)&&l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},a.key,"、多选题"),"(",a.question_score,"分)")),null!=a&&a.isPreview?l.a.createElement("div",{style:{display:"flex"}},l.a.createElement("span",{style:{flexShrink:0},className:"font18"},a.key,"."),l.a.createElement(R.a,{value:a.question_title}),l.a.createElement("span",{style:{flexShrink:0},className:"font16"},"(",a.question_score,"分)")):l.a.createElement("div",{className:"mt5"},l.a.createElement(R.a,{value:a.question_title})),l.a.createElement("div",{className:L.a.questionChoices},null==a||null===(Oe=a.question_choices)||void 0===Oe?void 0:Oe.map((function(e,t){return l.a.createElement(u.a,null,l.a.createElement(h.a,null,l.a.createElement(v.a,{key:t,checked:a.standard_answer.includes(t+1),disabled:!0},H[t],".")),l.a.createElement(h.a,{flex:"1"},l.a.createElement("span",{className:"c-black font14"},l.a.createElement(R.a,{value:e.choice_text}))))}))),l.a.createElement("div",{className:L.a.action},!a.hideAction&&Te.map((function(e,t){return"up"===e.id&&1===a.key||"down"===e.id&&a.key===a.len?null:l.a.createElement(c.a,{key:t,placement:"bottom",title:e.name},l.a.createElement("span",{onClick:function(){return Ie(e)},className:e.icon}))})))),ae&&l.a.createElement("aside",null,l.a.createElement("div",{className:L.a.questionType},l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},"选择题"),"(客观题,由系统自动评分,请设置标准答案)")),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:L.a.required},"*"),l.a.createElement("span",{className:L.a.title},"题干:")),l.a.createElement(P.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:X,onChange:function(e){return Z(e)}}),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:L.a.required},"*"),l.a.createElement("span",{className:L.a.title},"答案选项:",l.a.createElement("span",{className:L.a.colorGray},"点击选项可设置正确答案"))),B.map((function(e,t){var r,i;return l.a.createElement("div",{className:L.a.choiceWrap,key:t},l.a.createElement(c.a,{title:"点击设置为标准答案",placement:"left"},l.a.createElement("div",{className:"".concat(L.a.answer," ").concat(q.includes(t)?L.a.activeAnswer:""),onClick:function(){q.includes(t)?Y(q.filter((function(e){return e!==t}))):Y([].concat(Object(x.a)(q),[t]))}},H[t])),l.a.createElement("div",{className:L.a.editorWrap},G===t?l.a.createElement(P.a,{id:"single-question-option-".concat(t),watch:!0,isFocus:!0,height:155,placeholder:"请您输入选项",defaultValue:e,onChange:function(e){B[t]=e,F(B)}}):l.a.createElement("div",{className:L.a.htmlWrap,onClick:function(){return V(t)}},l.a.createElement(R.a,{value:e}))),1===(null===(r=n.editData)||void 0===r||null===(i=r.exercise)||void 0===i?void 0:i.exercise_status)&&l.a.createElement(l.a.Fragment,null,t>1&&l.a.createElement(c.a,{title:"删除"},l.a.createElement("i",{className:"".concat(L.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return F(B.filter((function(e,n){return n!==t})))}})),t<7&&t===B.length-1&&l.a.createElement(c.a,{title:"新增参考答案"},l.a.createElement("i",{className:"".concat(L.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return F([].concat(Object(x.a)(B),[""]))}}))))})),l.a.createElement("p",{className:"c-orange"},"温馨提示:点击选项输入框可设置答案;选中的选项即为正确答案,选择多个答案即为多选题"),l.a.createElement("p",{className:""},"分值:",l.a.createElement(g.a,{value:te,max:1e4,min:0,onChange:function(e){ne(e)}})," 分",l.a.createElement("span",{style:{marginLeft:"30px"},className:L.a.difficult},l.a.createElement("label",{style:{color:"red"}},"*")," 难度:",l.a.createElement(m.a.Group,{value:fe,onChange:function(e){pe(e.target.value)}},l.a.createElement(m.a.Button,{value:1},"简单"),l.a.createElement(m.a.Button,{value:2},"适中"),l.a.createElement(m.a.Button,{value:3},"困难")))),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:"".concat(L.a.title)},"知识点:",l.a.createElement("span",{className:L.a.colorGray},"(所有自建知识点仅本人可见,被EduCoder平台审核通过为官方知识点后所有用户可见)")),l.a.createElement("div",{className:"mt5"},l.a.createElement(N.a,{value:ce,selectvalues:null==a?void 0:a.tag_discipline_ids,onChange:ue,subId:null===(Ce=n.editData)||void 0===Ce||null===(Se=Ce.exercise)||void 0===Se?void 0:Se.sub_discipline_id,knowledgeOptions:xe,onAddKnowledgeFinish:ke})),l.a.createElement("div",{style:{marginTop:10}},l.a.createElement("span",{style:{marginRight:10}},"不允许学生重复答题"),l.a.createElement(p.a,{checked:ve,onChange:function(e){be(e)}}))),l.a.createElement("aside",{className:"tr"},(-1!==S||a.question_id)&&l.a.createElement(f.a,{type:"default",onClick:function(){k(),oe(!1)}},"取消"),l.a.createElement(f.a,{className:"ml20",type:"primary",onClick:function(){Ae()}},"保存"))))},G=Object(S.a)((function(e){var t=e.problemset,n=e.loading,r=e.exercise;return{problemset:t,globalSetting:e.globalSetting,exercise:r,loading:n.effects}}),null,null,{forwardRef:!0})(Object(s.forwardRef)(z)),V=n("55Ip"),W=function(e,t){e.problemset,e.globalSetting;var n=e.exercise,i=(e.loading,e.dispatch),a=e.editData,p=e.cancelAdd,m=void 0===p?function(){}:p,x=e.editKey,k=e.setEditKey,S=void 0===k?function(){}:k,A=(e.addCallback,e.setIsClaer,Object(_.a)(e,["problemset","globalSetting","exercise","loading","dispatch","editData","cancelAdd","editKey","setEditKey","addCallback","setIsClaer"]),Object(s.useState)("")),T=Object(o.a)(A,2),I=T[0],D=T[1],N=Object(s.useState)(""),j=Object(o.a)(N,2),M=j[0],B=j[1],F=Object(s.useState)(""),U=Object(o.a)(F,2),H=U[0],z=(U[1],Object(s.useState)([])),G=Object(o.a)(z,2),W=G[0],K=(G[1],Object(s.useState)("")),q=Object(o.a)(K,2),Y=(q[0],q[1],Object(s.useState)()),Q=Object(o.a)(Y,2),J=Q[0],X=Q[1],Z=Object(s.useState)(!1),$=Object(o.a)(Z,2),ee=($[0],$[1]),te=Object(s.useState)([]),ne=Object(o.a)(te,2),re=ne[0],ie=ne[1],ae=Object(s.useState)(!1),oe=Object(o.a)(ae,2),se=oe[0],le=oe[1],ce=Object(C.i)();Object(s.useEffect)((function(){var e;a.edit&&(le(!0),B(""),D(""),ie([])),D(a.shixun_name),B(a.question_title);var t=[];null===(e=a.shixun)||void 0===e||e.map((function(e){t.push(e.challenge_score)})),ie(t)}),[a]),Object(s.useEffect)((function(){ee(!1)}),[se]),Object(s.useImperativeHandle)(t,(function(){return{onSave:fe,isEdit:se}}));var ue,de,he,fe=function(){var e=Object(E.a)(w.a.mark((function e(){var t,n;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=[],!1,e.next=4;break;case 4:if(!a.question_id){e.next=10;break}return e.next=7,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:M,shixun_name:I,shixun_id:a.shixun_id,question_type:5,question_scores:re}});case 7:n=e.sent,e.next=13;break;case 10:return e.next=12,i({type:"exercise/addExerciseQuestion",payload:{insert_id:null==a?void 0:a.insert_id,categoryId:ce.categoryId,question_title:M,shixun_name:I,shixun_id:a.shixun_id,question_type:5,question_scores:re}});case 12:n=e.sent;case 13:return 0===n.status&&(S(-1),y.b.success("保存成功"),le(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},ce)})),e.abrupt("return",{name:M,analysis:H,standard_answers:t,is_ordered:J});case 15:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),pe=[{name:"删除",icon:"iconfont c-light-black ml30 icon-shanchu current",id:"del"},{name:"(向下插入实训题)",icon:"iconfont c-light-primary ml30 icon-tianjia current",id:"add"},{name:"编辑",icon:"iconfont c-light-primary ml30 icon-bianjishijuan3x current",id:"edit"}].filter((function(e){var t,r;return 1===(null==n||null===(t=n.editData)||void 0===t||null===(r=t.exercise)||void 0===r?void 0:r.exercise_status)?e:"del"!==e.id&&"add"!==e.id})),me=function(){var e=Object(E.a)(w.a.mark((function e(t){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(-1===x){e.next=3;break}return y.b.error("请先保存或取消当前正在编辑的问题。"),e.abrupt("return");case 3:e.t0=t.id,e.next="del"===e.t0?6:"up"===e.t0||"down"===e.t0?8:"edit"===e.t0?12:"add"===e.t0?15:17;break;case 6:return b.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"确认要删除这个试题吗?",onOk:function(){return Object(E.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(O.m)({id:a.question_id});case 2:i({type:"exercise/editExercise",payload:Object(r.a)({},ce)});case 3:case"end":return e.stop()}}),e)})))()}}),e.abrupt("break",17);case 8:return e.next=10,i({type:"exercise/exeriseMoveUpDown",payload:{id:a.question_id,opr:t.id}});case 10:return i({type:"exercise/editExercise",payload:Object(r.a)({},ce)}),e.abrupt("break",17);case 12:return S(a.dragKey),le(!0),e.abrupt("break",17);case 15:return i({type:"classroomList/setActionTabs",payload:{key:"选用实践项目",editData:{key:a.key,insert_id:null==a?void 0:a.question_id,question_type:5}}}),e.abrupt("break",17);case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return l.a.createElement("section",{className:L.a.wrap},!se&&l.a.createElement("aside",null,l.a.createElement("div",{className:L.a.questionType},!(null!=a&&a.isPreview)&&l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},a.key,"、实训题"),"(",a.question_score,"分)")),null!=a&&a.isPreview?l.a.createElement("div",{style:{display:"flex"}},l.a.createElement("span",{style:{flexShrink:0},className:"font18"},a.key,"."),l.a.createElement(R.a,{value:a.shixun_name}),l.a.createElement("span",{style:{flexShrink:0},className:"font16"},"(",a.question_score,"分)"),!(null===(de=a.schools)||void 0===de||!de.length)&&l.a.createElement(c.a,{title:"该实训题面向指定单位开放"},l.a.createElement("i",{className:"iconfont icon-zhidinggongkai1 font18 line24 c-orange"}))):l.a.createElement("div",{className:"mt5"},l.a.createElement(R.a,{value:a.shixun_name})),l.a.createElement("div",{className:"mt30"}),null===(he=a.shixun)||void 0===he?void 0:he.map((function(e,t){return l.a.createElement("div",{key:t},"第",t+1,"关 ",l.a.createElement("span",{className:"ml10"},e.challenge_name)," ",l.a.createElement("span",{className:"ml10"},e.challenge_score," 分"))})),l.a.createElement("div",{className:L.a.action},l.a.createElement(V.a,{target:"_blank",to:"/shixuns/".concat(a.shixun_identifier,"/challenges?exercise=true")},"实训详情"),!a.hideAction&&pe.map((function(e,t){return"up"===e.id&&1===a.key||"down"===e.id&&a.key===a.len?null:l.a.createElement(c.a,{key:t,placement:"bottom",title:e.name},l.a.createElement("span",{onClick:function(){return me(e)},className:e.icon}))})))),se&&l.a.createElement("aside",null,l.a.createElement("div",{className:L.a.questionType},l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},"实训题"),"(客观题,由系统自动评分,允许手动调分)")),l.a.createElement("div",{className:"mt10"},l.a.createElement(d.a,{defaultValue:I,onChange:function(e){D(e.target.value)}})),l.a.createElement("div",{className:"mt10"},l.a.createElement(P.a,{id:"single-question-option-0",height:155,placeholder:"请输入实训题完成要求",defaultValue:M,onChange:function(e){B(e)}})),l.a.createElement("div",{className:"mt20"},null===(ue=a.shixun)||void 0===ue?void 0:ue.map((function(e,t){return l.a.createElement(u.a,{gutter:[20,20]},l.a.createElement(h.a,{flex:"1"},t+1,".",e.challenge_name),l.a.createElement(h.a,null,l.a.createElement(g.a,{defaultValue:re[t],onChange:function(e){re[t]=e,ie(re),console.log("srore:L",re[t])}})," 分"))}))),l.a.createElement("div",{className:"mt20"},W.length>1&&l.a.createElement("span",null,l.a.createElement(v.a,{checked:J,onChange:function(e){return X(e.target.checked)},className:"".concat(L.a.color333," font14")},"多个填空的答案有顺序要求"),l.a.createElement("span",{className:"".concat(L.a.color999," font12")},"(选中,每个填空的答案顺序必须与参考答案一致)"))),l.a.createElement("aside",{className:"tr"},(-1!==x||!(null!=a&&a.edit))&&l.a.createElement(f.a,{type:"default",onClick:function(){m(),le(!1)}},"取消"),l.a.createElement(f.a,{className:"ml20",type:"primary",onClick:function(){fe()}},"保存"))))},K=Object(S.a)((function(e){var t=e.problemset,n=e.loading;return{problemset:t,globalSetting:e.globalSetting,exercise:e.exercise,loading:n.effects}}),null,null,{forwardRef:!0})(Object(s.forwardRef)(W)),q=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Y=function(e,t){e.problemset;var n=e.exercise,i=(e.globalSetting,e.loading,e.dispatch),a=(e.onRef,e.editData),d=e.cancelAdd,v=void 0===d?function(){}:d,k=e.editKey,S=e.setEditKey,A=void 0===S?function(){}:S,T=(e.setIsClaer,e.addCallback),I=void 0===T?function(e){}:T,D=(Object(_.a)(e,["problemset","exercise","globalSetting","loading","dispatch","onRef","editData","cancelAdd","editKey","setEditKey","setIsClaer","addCallback"]),Object(s.useState)([])),j=Object(o.a)(D,2),M=j[0],B=j[1],F=Object(s.useState)(),U=Object(o.a)(F,2),H=U[0],z=U[1],G=Object(s.useState)([]),V=Object(o.a)(G,2),W=V[0],K=V[1],Y=Object(s.useState)(""),Q=Object(o.a)(Y,2),J=Q[0],X=Q[1],Z=Object(s.useState)(),$=Object(o.a)(Z,2),ee=$[0],te=$[1],ne=Object(s.useState)([]),re=Object(o.a)(ne,2),ie=re[0],ae=re[1],oe=Object(s.useState)(!1),se=Object(o.a)(oe,2),le=se[0],ce=se[1],ue=Object(s.useState)(1),de=Object(o.a)(ue,2),he=de[0],fe=de[1],pe=Object(s.useState)(!1),me=Object(o.a)(pe,2),ge=me[0],ve=me[1],be=Object(C.i)(),ye=Object(s.useRef)(null),Ee=Object(s.useState)([]),xe=Object(o.a)(Ee,2),_e=xe[0],ke=xe[1],we=function(e){ke([].concat(Object(x.a)(_e),[Object(r.a)({},e)]))};Object(s.useEffect)((function(){B(["","","",""])}),[]),Object(s.useEffect)((function(){if(null==a||!a.question_choices)return ce(!0),X(""),te(5),B(["","","",""]),void K([]);X(null==a?void 0:a.question_title),te(ee||(null==a?void 0:a.question_score)),ve(!(null!=a&&a.repeat_answer)),fe(null==a?void 0:a.difficulty),B(null==a?void 0:a.question_choices.map((function(e){return e.choice_text})));var e=[];null==a||a.standard_answer.map((function(t,n){e.push(t-1)})),ae(a.tag_discipline_ids),K(e)}),[a,le]),Object(s.useEffect)((function(){function e(){return(e=Object(E.a)(w.a.mark((function e(){var t,r,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(O.H)({sub_discipline_id:null===(t=n.editData)||void 0===t||null===(r=t.exercise)||void 0===r?void 0:r.sub_discipline_id});case 2:i=e.sent,ke(i.tag_disciplines);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}le&&function(){e.apply(this,arguments)}()}),[le]),Object(s.useEffect)((function(){var e,t=null!=n&&null!==(e=n.tagDisciplineData)&&void 0!==e&&e.tag_disciplines&&Array.isArray(n.tagDisciplineData.tag_disciplines)?n.tagDisciplineData.tag_disciplines:[];ke(t)}),[n.tagDisciplineData]),Object(s.useImperativeHandle)(t,(function(){return{onSave:Ae,isEdit:le}}));var Ce,Se,Oe,Ae=function(){var e=Object(E.a)(w.a.mark((function e(){var t,o,s,l,c,u,d,h,f;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(J){e.next=3;break}return y.b.info("请您输入题目"),e.abrupt("return",!1);case 3:if(!((t=M.findIndex((function(e){return!e})))>-1)){e.next=7;break}return y.b.info("请先输入 ".concat(q[t]," 选项的内容")),e.abrupt("return",!1);case 7:if(W.length){e.next=10;break}return y.b.info("请设置本题的正确答案,点击选项A/B...即可完成设置"),e.abrupt("return",!1);case 10:if(!(W.length<1)){e.next=13;break}return y.b.info("请选择答案"),e.abrupt("return",!1);case 13:if(o=M.map((function(e,t){return{choice_text:e,is_answer:W.includes(t)?t+1:0}})),!a.question_id){e.next=25;break}if(1!==(null==a?void 0:a.is_my)){e.next=19;break}b.a.confirm({title:"提示",content:"此题目已存在于试题库,是否将修改后的题目覆盖试题库的原题?",okText:"覆盖原题",cancelText:"不覆盖",onOk:function(){var e=Object(E.a)(w.a.mark((function e(){var t,l,c;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:J,question_type:1,question_score:ee,question_choices:o.map((function(e){return e.choice_text})),standard_answers:o.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer})),tag_discipline_ids:ie,sub_discipline_id:null===(t=n.editData)||void 0===t||null===(l=t.exercise)||void 0===l?void 0:l.sub_discipline_id,difficulty:he,is_cover:1,repeat_answer:!ge}});case 2:s=e.sent,0===(null===(c=s)||void 0===c?void 0:c.status)&&(A(-1),y.b.success("保存成功"),ce(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},be)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),onCancel:function(){var e=Object(E.a)(w.a.mark((function e(){var t,l,c;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:J,question_type:1,question_score:ee,question_choices:o.map((function(e){return e.choice_text})),standard_answers:o.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer})),tag_discipline_ids:ie,sub_discipline_id:null===(t=n.editData)||void 0===t||null===(l=t.exercise)||void 0===l?void 0:l.sub_discipline_id,difficulty:he,repeat_answer:!ge}});case 2:s=e.sent,0===(null===(c=s)||void 0===c?void 0:c.status)&&(A(-1),y.b.success("保存成功"),ce(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},be)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),e.next=23;break;case 19:return e.next=21,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:J,question_type:1,question_score:ee,question_choices:o.map((function(e){return e.choice_text})),standard_answers:o.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer})),tag_discipline_ids:ie,sub_discipline_id:null===(l=n.editData)||void 0===l||null===(c=l.exercise)||void 0===c?void 0:c.sub_discipline_id,difficulty:he,repeat_answer:!ge}});case 21:s=e.sent,0===(null===(u=s)||void 0===u?void 0:u.status)&&(A(-1),y.b.success("保存成功"),ce(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},be)}));case 23:e.next=29;break;case 25:return e.next=27,i({type:"exercise/addExerciseQuestion",payload:{insert_id:null==a?void 0:a.insert_id,categoryId:be.categoryId,question_title:J,question_type:1,question_score:ee,question_choices:o.map((function(e){return e.choice_text})),standard_answers:o.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer})),tag_discipline_ids:ie,sub_discipline_id:null===(d=n.editData)||void 0===d||null===(h=d.exercise)||void 0===h?void 0:h.sub_discipline_id,difficulty:he,repeat_answer:!ge}});case 27:s=e.sent,0===(null===(f=s)||void 0===f?void 0:f.status)&&(A(-1),y.b.success("保存成功"),ce(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},be)}));case 29:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Te=[{name:"删除",icon:"iconfont c-light-black ml30 icon-shanchu current",id:"del"},{name:"(向下插入单选题)",icon:"iconfont c-light-primary ml30 icon-tianjia current",id:"add"},{name:"编辑",icon:"iconfont c-light-primary ml30 icon-bianjishijuan3x current",id:"edit"}].filter((function(e){var t,r;return 1===(null==n||null===(t=n.editData)||void 0===t||null===(r=t.exercise)||void 0===r?void 0:r.exercise_status)?e:"del"!==e.id&&"add"!==e.id})),Ie=function(){var e=Object(E.a)(w.a.mark((function e(t){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(-1===k){e.next=3;break}return y.b.error("请先保存或取消当前正在编辑的问题。"),e.abrupt("return");case 3:e.t0=t.id,e.next="del"===e.t0?6:"up"===e.t0||"down"===e.t0?8:"edit"===e.t0?12:"add"===e.t0?15:17;break;case 6:return b.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"确认要删除这个试题吗?",onOk:function(){return Object(E.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(O.m)({id:a.question_id});case 2:i({type:"exercise/editExercise",payload:Object(r.a)({},be)});case 3:case"end":return e.stop()}}),e)})))()}}),e.abrupt("break",17);case 8:return e.next=10,i({type:"exercise/exeriseMoveUpDown",payload:{id:a.question_id,opr:t.id}});case 10:return i({type:"exercise/editExercise",payload:Object(r.a)({},be)}),e.abrupt("break",17);case 12:return A(a.dragKey),ce(!0),e.abrupt("break",17);case 15:return I({key:a.key,insert_id:null==a?void 0:a.question_id,question_type:0}),e.abrupt("break",17);case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return l.a.createElement("section",{className:L.a.wrap},!le&&l.a.createElement("aside",{ref:ye},l.a.createElement("div",{className:L.a.questionType},!(null!=a&&a.isPreview)&&l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},a.key,"、单选题"),"(",a.question_score,"分)")),null!=a&&a.isPreview?l.a.createElement("div",{style:{display:"flex",alignItems:"flex-start"}},l.a.createElement("span",{style:{flexShrink:0},className:"font18"},a.key,"."),l.a.createElement(R.a,{value:a.question_title}),l.a.createElement("span",{style:{flexShrink:0},className:"font16"},"(",a.question_score,"分)")):l.a.createElement("div",{className:"mt5"},l.a.createElement(R.a,{value:a.question_title})),l.a.createElement("div",{className:L.a.questionChoices},null==a||null===(Oe=a.question_choices)||void 0===Oe?void 0:Oe.map((function(e,t){return l.a.createElement(u.a,{key:t},l.a.createElement(h.a,null,l.a.createElement(m.a,{key:t,checked:a.standard_answer.includes(t+1),disabled:!0},q[t],".")),l.a.createElement(h.a,{flex:"1"},l.a.createElement("span",{className:"c-black font14"},l.a.createElement(R.a,{value:e.choice_text}))))}))),l.a.createElement("div",{className:L.a.action},!a.hideAction&&Te.map((function(e,t){return"up"===e.id&&1===a.key||"down"===e.id&&a.key===a.len?null:l.a.createElement(c.a,{key:t,placement:"bottom",title:e.name},l.a.createElement("span",{onClick:function(){return Ie(e)},className:e.icon}))})))),le&&l.a.createElement("aside",null,l.a.createElement("div",{className:L.a.questionType},l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},"选择题"),"(客观题,由系统自动评分,请设置标准答案)")),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:L.a.required},"*"),l.a.createElement("span",{className:L.a.title},"题干:")),l.a.createElement(P.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:J,onChange:function(e){return X(e)}}),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:L.a.required},"*"),l.a.createElement("span",{className:L.a.title},"答案选项:",l.a.createElement("span",{className:L.a.colorGray},"点击选项可设置正确答案"))),M.map((function(e,t){var r,i;return l.a.createElement("div",{className:L.a.choiceWrap,key:t},l.a.createElement(c.a,{title:"点击设置为标准答案",placement:"left"},l.a.createElement("div",{className:"".concat(L.a.answer," ").concat(W.includes(t)?L.a.activeAnswer:""),onClick:function(){W.includes(t)?K(W.filter((function(e){return e!==t}))):K([].concat(Object(x.a)(W),[t]))}},q[t])),l.a.createElement("div",{className:L.a.editorWrap},H===t?l.a.createElement(P.a,{id:"single-question-option-".concat(t),watch:!0,isFocus:!0,height:155,placeholder:"请您输入选项",defaultValue:e,onChange:function(e){M[t]=e,B(M)}}):l.a.createElement("div",{className:L.a.htmlWrap,onClick:function(){return z(t)}},l.a.createElement(R.a,{value:e}))),1===(null===(r=n.editData)||void 0===r||null===(i=r.exercise)||void 0===i?void 0:i.exercise_status)&&l.a.createElement(l.a.Fragment,null,t>1&&l.a.createElement(c.a,{title:"删除"},l.a.createElement("i",{className:"".concat(L.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return B(M.filter((function(e,n){return n!==t})))}})),t<7&&t===M.length-1&&l.a.createElement(c.a,{title:"新增参考答案"},l.a.createElement("i",{className:"".concat(L.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return B([].concat(Object(x.a)(M),[""]))}}))))})),l.a.createElement("p",{className:"c-orange"},"温馨提示:点击选项输入框可设置答案;选中的选项即为正确答案,选择多个答案即为多选题"),l.a.createElement("p",{className:""},"分值:",l.a.createElement(g.a,{value:ee,max:1e4,min:0,onChange:function(e){te(e)}})," 分",l.a.createElement("span",{style:{marginLeft:"30px"},className:L.a.difficult},l.a.createElement("label",{style:{color:"red"}},"*")," 难度:",l.a.createElement(m.a.Group,{value:he,onChange:function(e){fe(e.target.value)}},l.a.createElement(m.a.Button,{value:1},"简单"),l.a.createElement(m.a.Button,{value:2},"适中"),l.a.createElement(m.a.Button,{value:3},"困难")))),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:"".concat(L.a.title)},"知识点:",l.a.createElement("span",{className:L.a.colorGray},"(所有自建知识点仅本人可见,被EduCoder平台审核通过为官方知识点后所有用户可见)")),l.a.createElement("div",{className:"mt5"},l.a.createElement(N.a,{selectvalues:null==a?void 0:a.tag_discipline_ids,value:ie,onChange:ae,subId:null===(Ce=n.editData)||void 0===Ce||null===(Se=Ce.exercise)||void 0===Se?void 0:Se.sub_discipline_id,knowledgeOptions:_e,onAddKnowledgeFinish:we})),l.a.createElement("div",{style:{marginTop:10}},l.a.createElement("span",{style:{marginRight:10}},"不允许学生重复答题"),l.a.createElement(p.a,{checked:ge,onChange:function(e){ve(e)}}))),l.a.createElement("aside",{className:"tr"},(-1!==k||a.question_id)&&l.a.createElement(f.a,{type:"default",onClick:function(){v(),ce(!1)}},"取消"),l.a.createElement(f.a,{className:"ml20",type:"primary",onClick:function(){Ae()}},"保存"))))},Q=Object(S.a)((function(e){var t=e.problemset,n=e.loading;return{problemset:t,globalSetting:e.globalSetting,exercise:e.exercise,loading:n.effects}}),null,null,{forwardRef:!0})(Object(s.forwardRef)(Y)),J=function(e,t){var n=e.problemset,i=e.exercise,a=(e.globalSetting,e.loading,e.dispatch),u=(e.onRef,e.editData),d=e.cancelAdd,h=void 0===d?function(){}:d,v=e.editKey,k=e.setEditKey,S=void 0===k?function(){}:k,A=e.addCallback,T=void 0===A?function(){}:A,I=(e.setIsClaer,Object(_.a)(e,["problemset","exercise","globalSetting","loading","dispatch","onRef","editData","cancelAdd","editKey","setEditKey","addCallback","setIsClaer"]),Object(s.useState)("")),D=Object(o.a)(I,2),j=D[0],M=D[1],B=Object(s.useState)(""),F=Object(o.a)(B,2),U=F[0],H=(F[1],Object(s.useState)("")),z=Object(o.a)(H,2),G=z[0],V=z[1],W=Object(s.useState)(),K=Object(o.a)(W,2),q=K[0],Y=K[1],Q=Object(s.useState)(!1),J=Object(o.a)(Q,2),X=J[0],Z=J[1],$=Object(s.useState)([]),ee=Object(o.a)($,2),te=ee[0],ne=ee[1],re=Object(s.useState)(1),ie=Object(o.a)(re,2),ae=ie[0],oe=ie[1],se=Object(s.useState)(!1),le=Object(o.a)(se,2),ce=le[0],ue=le[1],de=Object(C.i)(),he=Object(s.useState)([]),fe=Object(o.a)(he,2),pe=fe[0],me=fe[1],ge=function(e){me([].concat(Object(x.a)(pe),[Object(r.a)({},e)]))};Object(s.useEffect)((function(){var e;if(null==u||!u.question_title)return Z(!0),M(""),V(""),void Y(10);ue(!(null!=u&&u.repeat_answer)),M(null==u?void 0:u.question_title),V(null==u||null===(e=u.standard_answer)||void 0===e?void 0:e[0]),Y(q||(null==u?void 0:u.question_score)),ne(u.tag_discipline_ids),oe(null==u?void 0:u.difficulty)}),[n.editData,X]),Object(s.useEffect)((function(){var e,t=null!=i&&null!==(e=i.tagDisciplineData)&&void 0!==e&&e.tag_disciplines&&Array.isArray(i.tagDisciplineData.tag_disciplines)?i.tagDisciplineData.tag_disciplines:[];me(t)}),[i.tagDisciplineData]),Object(s.useEffect)((function(){function e(){return(e=Object(E.a)(w.a.mark((function e(){var t,n,r;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(O.H)({sub_discipline_id:null===(t=i.editData)||void 0===t||null===(n=t.exercise)||void 0===n?void 0:n.sub_discipline_id});case 2:r=e.sent,me(r.tag_disciplines);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}X&&function(){e.apply(this,arguments)}()}),[X]),Object(s.useImperativeHandle)(t,(function(){return{onSave:ye,isEdit:X}}));var ve,be,ye=function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,o,s;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(j){e.next=3;break}return y.b.info("请您输入题干"),e.abrupt("return",!1);case 3:if(!u.question_id){e.next=14;break}if(1!==(null==u?void 0:u.is_my)){e.next=8;break}b.a.confirm({title:"提示",content:"此题目已存在于试题库,是否将修改后的题目覆盖试题库的原题?",okText:"覆盖原题",cancelText:"不覆盖",onOk:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a({type:"exercise/editExerciseQuestion",payload:{id:u.question_id,question_title:j,question_type:4,question_score:q,standard_answers:[G],tag_discipline_ids:te,sub_discipline_id:null===(t=i.editData)||void 0===t||null===(n=t.exercise)||void 0===n?void 0:n.sub_discipline_id,difficulty:ae,is_cover:1,repeat_answer:!ce}});case 2:0===e.sent.status&&(S(-1),y.b.success("保存成功"),Z(!1),a({type:"exercise/editExercise",payload:Object(r.a)({},de)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),onCancel:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a({type:"exercise/editExerciseQuestion",payload:{id:u.question_id,question_title:j,question_type:4,question_score:q,standard_answers:[G],tag_discipline_ids:te,sub_discipline_id:null===(t=i.editData)||void 0===t||null===(n=t.exercise)||void 0===n?void 0:n.sub_discipline_id,difficulty:ae,repeat_answer:!ce}});case 2:0===e.sent.status&&(S(-1),y.b.success("保存成功"),Z(!1),a({type:"exercise/editExercise",payload:Object(r.a)({},de)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),e.next=12;break;case 8:return e.next=10,a({type:"exercise/editExerciseQuestion",payload:{id:u.question_id,question_title:j,question_type:4,question_score:q,standard_answers:[G],tag_discipline_ids:te,sub_discipline_id:null===(t=i.editData)||void 0===t||null===(n=t.exercise)||void 0===n?void 0:n.sub_discipline_id,difficulty:ae,repeat_answer:!ce}});case 10:0===e.sent.status&&(S(-1),y.b.success("保存成功"),Z(!1),a({type:"exercise/editExercise",payload:Object(r.a)({},de)}));case 12:e.next=18;break;case 14:return e.next=16,a({type:"exercise/addExerciseQuestion",payload:{insert_id:null==u?void 0:u.insert_id,categoryId:de.categoryId,exercise_bank_id:de.categoryId,question_title:j,question_type:4,question_score:q,standard_answers:[G],tag_discipline_ids:te,sub_discipline_id:null===(o=i.editData)||void 0===o||null===(s=o.exercise)||void 0===s?void 0:s.sub_discipline_id,difficulty:ae,repeat_answer:!ce}});case 16:0===e.sent.status&&(S(-1),y.b.success("保存成功"),Z(!1),a({type:"exercise/editExercise",payload:Object(r.a)({},de)}));case 18:return e.abrupt("return",{name:j,answer_texts:[G],analysis:U});case 19:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ee=[{name:"删除",icon:"iconfont c-light-black ml30 icon-shanchu current",id:"del"},{name:"(向下插入单选题)",icon:"iconfont c-light-primary ml30 icon-tianjia current",id:"add"},{name:"编辑",icon:"iconfont c-light-primary ml30 icon-bianjishijuan3x current",id:"edit"}].filter((function(e){var t,n;return 1===(null==i||null===(t=i.editData)||void 0===t||null===(n=t.exercise)||void 0===n?void 0:n.exercise_status)?e:"del"!==e.id&&"add"!==e.id})),xe=function(){var e=Object(E.a)(w.a.mark((function e(t){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(-1===v){e.next=3;break}return y.b.error("请先保存或取消当前正在编辑的问题。"),e.abrupt("return");case 3:e.t0=t.id,e.next="del"===e.t0?6:"up"===e.t0||"down"===e.t0?8:"edit"===e.t0?12:"add"===e.t0?15:17;break;case 6:return b.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"确认要删除这个试题吗?",onOk:function(){return Object(E.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(O.m)({id:u.question_id});case 2:a({type:"exercise/editExercise",payload:Object(r.a)({},de)});case 3:case"end":return e.stop()}}),e)})))()}}),e.abrupt("break",17);case 8:return e.next=10,a({type:"exercise/exeriseMoveUpDown",payload:{id:u.question_id,opr:t.id}});case 10:return a({type:"exercise/editExercise",payload:Object(r.a)({},de)}),e.abrupt("break",17);case 12:return S(u.dragKey),Z(!0),e.abrupt("break",17);case 15:return T({key:u.key,insert_id:null==u?void 0:u.question_id,question_type:4}),e.abrupt("break",17);case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return l.a.createElement("section",{className:L.a.wrap},!X&&l.a.createElement("aside",null,l.a.createElement("div",{className:L.a.questionType},!(null!=u&&u.isPreview)&&l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},u.key,"、简答题"),"(",u.question_score,"分)")),null!=u&&u.isPreview?l.a.createElement("div",{style:{display:"flex"}},l.a.createElement("span",{style:{flexShrink:0},className:"font18"},u.key,"."),l.a.createElement(R.a,{value:u.question_title}),l.a.createElement("span",{style:{flexShrink:0},className:"font16"},"(",u.question_score,"分)")):l.a.createElement("div",{className:"mt5"},l.a.createElement(R.a,{value:u.question_title})),l.a.createElement("div",{className:L.a.questionChoices},l.a.createElement("p",null,l.a.createElement("strong",null,"参考答案:")),l.a.createElement(R.a,{value:G||""})),l.a.createElement("div",{className:L.a.action},!u.hideAction&&Ee.map((function(e,t){return"up"===e.id&&1===u.key||"down"===e.id&&u.key===u.len?null:l.a.createElement(c.a,{key:t,placement:"bottom",title:e.name},l.a.createElement("span",{onClick:function(){return xe(e)},className:e.icon}))})))),X&&l.a.createElement("aside",null,l.a.createElement("div",{className:L.a.questionType},l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},"问答题"),"(问答题,未作答的情况下自动评为零分)")),l.a.createElement(P.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:j,onChange:function(e){return M(e)}}),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:L.a.title},"参考答案:")),l.a.createElement(P.a,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"请您输入参考答案",defaultValue:G,onChange:function(e){return V(e)}}),l.a.createElement("p",{className:""},"分值:",l.a.createElement(g.a,{value:q,max:1e4,min:0,onChange:function(e){Y(e)}})," 分",l.a.createElement("span",{style:{marginLeft:"30px"},className:L.a.difficult},l.a.createElement("label",{style:{color:"red"}},"*")," 难度:",l.a.createElement(m.a.Group,{value:ae,onChange:function(e){oe(e.target.value)}},l.a.createElement(m.a.Button,{value:1},"简单"),l.a.createElement(m.a.Button,{value:2},"适中"),l.a.createElement(m.a.Button,{value:3},"困难")))),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:"".concat(L.a.title)},"知识点:",l.a.createElement("span",{className:L.a.colorGray},"(所有自建知识点仅本人可见,被EduCoder平台审核通过为官方知识点后所有用户可见)")),l.a.createElement("div",{className:"mt5"},l.a.createElement(N.a,{value:te,selectvalues:null==u?void 0:u.tag_discipline_ids,onChange:ne,subId:null===(ve=i.editData)||void 0===ve||null===(be=ve.exercise)||void 0===be?void 0:be.sub_discipline_id,knowledgeOptions:pe,onAddKnowledgeFinish:ge})),l.a.createElement("div",{style:{marginTop:10}},l.a.createElement("span",{style:{marginRight:10}},"不允许学生重复答题"),l.a.createElement(p.a,{checked:ce,onChange:function(e){ue(e)}}))),l.a.createElement("aside",{className:"tr"},(-1!==v||u.question_id)&&l.a.createElement(f.a,{type:"default",onClick:function(){h(),Z(!1)}},"取消"),l.a.createElement(f.a,{className:"ml20",type:"primary",onClick:function(){ye()}},"保存"))))},X=Object(S.a)((function(e){var t=e.problemset,n=e.loading,r=e.exercise;return{problemset:t,globalSetting:e.globalSetting,exercise:r,loading:n.effects}}),null,null,{forwardRef:!0})(Object(s.forwardRef)(J)),Z=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],$=function(e,t){e.problemset;var n=e.exercise,i=(e.globalSetting,e.loading,e.dispatch),a=(e.onRef,e.editData),u=(e.cancelAdd,e.editKey),d=(e.setEditKey,e.addCallback),h=void 0===d?function(){}:d,f=(e.setIsClaer,Object(_.a)(e,["problemset","exercise","globalSetting","loading","dispatch","onRef","editData","cancelAdd","editKey","setEditKey","addCallback","setIsClaer"]),Object(s.useState)([])),p=Object(o.a)(f,2),m=p[0],g=p[1],v=Object(s.useState)(),x=Object(o.a)(v,2),k=(x[0],x[1],Object(s.useState)([])),S=Object(o.a)(k,2),A=S[0],T=S[1],I=Object(s.useState)(""),D=Object(o.a)(I,2),N=D[0],j=D[1],M=Object(s.useState)(5),P=Object(o.a)(M,2),B=P[0],F=P[1],U=Object(s.useState)(!1),H=Object(o.a)(U,2),z=H[0],G=H[1],V=Object(C.g)(),W=Object(C.i)();Object(s.useEffect)((function(){g(["","","",""])}),[]),Object(s.useEffect)((function(){if(null==a||!a.question_choices)return G(!0),j(""),F(5),g(["","","",""]),void T([]);j(null==a?void 0:a.question_title),F(null==a?void 0:a.question_score),g(null==a?void 0:a.question_choices.map((function(e){return e.choice_text})));var e=[];null==a||a.standard_answer.map((function(t,n){e.push(t-1)})),T(e)}),[a]),Object(s.useImperativeHandle)(t,(function(){return{onSave:K,isEdit:z}}));var K=function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,o;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(N){e.next=3;break}return y.b.info("请您输入题目"),e.abrupt("return",!1);case 3:if(!((t=m.findIndex((function(e){return!e})))>-1)){e.next=7;break}return y.b.info("请先输入 ".concat(Z[t]," 选项的内容")),e.abrupt("return",!1);case 7:if(A.length){e.next=10;break}return y.b.info("请设置本题的正确答案,点击选项A/B...即可完成设置"),e.abrupt("return",!1);case 10:if(!(A.length<1)){e.next=13;break}return y.b.info("请选择答案"),e.abrupt("return",!1);case 13:if(n=m.map((function(e,t){return{choice_text:e,is_answer:A.includes(t)?t+1:0}})),!a.question_id){e.next=20;break}return e.next=17,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:N,question_type:1,question_score:B,question_choices:n.map((function(e){return e.choice_text})),standard_answers:n.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer}))}});case 17:o=e.sent,e.next=23;break;case 20:return e.next=22,i({type:"exercise/addExerciseQuestion",payload:{insert_id:null==a?void 0:a.insert_id,categoryId:W.categoryId,question_title:N,question_type:1,question_score:"5.0",question_choices:n.map((function(e){return e.choice_text})),standard_answers:n.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer}))}});case 22:o=e.sent;case 23:0===o.status&&(y.b.success("保存成功"),G(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},W)}));case 24:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),q=[{name:"删除",icon:"iconfont c-light-black ml30 icon-shanchu current",id:"del"},{name:"(向下插入单选题)",icon:"iconfont c-light-primary ml30 icon-tianjia current",id:"add"},{name:"编辑",icon:"iconfont c-light-primary ml30 icon-bianjishijuan3x current",id:"edit"}].filter((function(e){var t,r;return 1===(null==n||null===(t=n.editData)||void 0===t||null===(r=t.exercise)||void 0===r?void 0:r.exercise_status)?e:"del"!==e.id&&"add"!==e.id})),Y=function(){var e=Object(E.a)(w.a.mark((function e(t){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(-1===u){e.next=3;break}return y.b.error("请先保存或取消当前正在编辑的问题。"),e.abrupt("return");case 3:e.t0=t.id,e.next="del"===e.t0?6:"up"===e.t0||"down"===e.t0?8:"edit"===e.t0?12:"add"===e.t0?14:16;break;case 6:return b.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"确认要删除这个试题吗?",onOk:function(){return Object(E.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(O.m)({id:a.question_id});case 2:i({type:"exercise/editExercise",payload:Object(r.a)({},W)});case 3:case"end":return e.stop()}}),e)})))()}}),e.abrupt("break",16);case 8:return e.next=10,i({type:"exercise/exeriseMoveUpDown",payload:{id:a.question_id,opr:t.id}});case 10:return i({type:"exercise/editExercise",payload:Object(r.a)({},W)}),e.abrupt("break",16);case 12:return V.push("/problems/".concat(null==a?void 0:a.hack_identifier,"/edit?type=exercises&express_id=").concat(W.categoryId,"&question_id=").concat(null==a?void 0:a.question_id,"&score=").concat(null==a?void 0:a.question_score,"&exercise=true&callback_url=").concat(location.pathname)),e.abrupt("break",16);case 14:return h({key:a.key,insert_id:null==a?void 0:a.question_id,question_type:6}),e.abrupt("break",16);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return l.a.createElement("section",{className:L.a.wrap},l.a.createElement("aside",null,l.a.createElement("div",{className:L.a.questionType},!(null!=a&&a.isPreview)&&l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},a.key,"、编程题"),"(",a.question_score,"分)")),null!=a&&a.isPreview?l.a.createElement("div",{style:{display:"flex"}},l.a.createElement("span",{style:{flexShrink:0},className:"font18"},a.key,"."),l.a.createElement(R.a,{value:a.question_title}),l.a.createElement("span",{style:{flexShrink:0},className:"font16"},"(",a.question_score,"分)")):l.a.createElement("div",{className:"mt5"},l.a.createElement(R.a,{value:a.question_title})),l.a.createElement("div",{className:L.a.questionChoices},l.a.createElement(R.a,{value:a.description||""})),l.a.createElement("div",{className:L.a.action},!a.hideAction&&q.map((function(e,t){return"up"===e.id&&1===a.key||"down"===e.id&&a.key===a.len?null:l.a.createElement(c.a,{key:t,placement:"bottom",title:e.name},l.a.createElement("span",{onClick:function(){return Y(e)},className:e.icon}))})))))},ee=Object(S.a)((function(e){var t=e.problemset,n=e.loading;return{problemset:t,globalSetting:e.globalSetting,exercise:e.exercise,loading:n.effects}}),null,null,{forwardRef:!0})(Object(s.forwardRef)($)),te=n("LvDl"),ne=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],re=function(e,t){e.problemset;var n=e.exercise,i=(e.globalSetting,e.loading,e.dispatch),a=(e.onRef,e.editData),d=e.cancelAdd,p=void 0===d?function(){}:d,v=e.editKey,k=e.setEditKey,S=void 0===k?function(){}:k,A=(e.setIsClaer,e.addCallback),T=void 0===A?function(e){}:A,I=(Object(_.a)(e,["problemset","exercise","globalSetting","loading","dispatch","onRef","editData","cancelAdd","editKey","setEditKey","setIsClaer","addCallback"]),Object(s.useState)([])),D=Object(o.a)(I,2),j=D[0],M=D[1],B=Object(s.useState)(!1),F=Object(o.a)(B,2),U=F[0],H=F[1],z=Object(s.useState)(!0),G=Object(o.a)(z,2),V=G[0],W=G[1],K=Object(s.useState)(1),q=Object(o.a)(K,2),Y=q[0],Q=q[1],J=Object(s.useState)(!1),X=Object(o.a)(J,2),Z=X[0],$=X[1],ee=Object(s.useState)([]),re=Object(o.a)(ee,2),ie=re[0],ae=re[1],oe=Object(C.i)(),se=Object(s.useRef)(null),le=Object(s.useState)(""),ce=Object(o.a)(le,2),ue=ce[0],de=ce[1],he=Object(s.useState)([]),fe=Object(o.a)(he,2),pe=fe[0],me=fe[1],ge=function(e){ae([].concat(Object(x.a)(ie),[Object(r.a)({},e)]))};Object(s.useEffect)((function(){var e;if(null==a||!a.question_title)return H(!0),void de("");de(null==a?void 0:a.question_title),$(!(null!=a&&a.repeat_answer)),Q(null==a?void 0:a.difficulty),M(a.tag_discipline_ids);var t=null==a||null===(e=a.sub_exercise_questions)||void 0===e?void 0:e.map((function(e){var t,n,i;return Object(r.a)(Object(r.a)({},e),{},{id:e.question_id,name:e.question_title,open:!1,score:e.question_score,qusList:null==e||null===(t=e.question_choices)||void 0===t?void 0:t.map((function(e){return e.choice_text})),activeQusEditor:null,qusAnswer:null===(n=[null==e||null===(i=e.question_choices)||void 0===i?void 0:i.findIndex((function(e){return e.standard_boolean}))])||void 0===n?void 0:n.filter((function(e){return-1!==e}))})}));me(t)}),[a,U]),Object(s.useEffect)((function(){function e(){return(e=Object(E.a)(w.a.mark((function e(){var t,r,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(O.H)({sub_discipline_id:null===(t=n.editData)||void 0===t||null===(r=t.exercise)||void 0===r?void 0:r.sub_discipline_id});case 2:i=e.sent,ae(i.tag_disciplines);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}U&&function(){e.apply(this,arguments)}()}),[U]),Object(s.useEffect)((function(){var e,t=null!=n&&null!==(e=n.tagDisciplineData)&&void 0!==e&&e.tag_disciplines&&Array.isArray(n.tagDisciplineData.tag_disciplines)?n.tagDisciplineData.tag_disciplines:[];ae(t)}),[n.tagDisciplineData]),Object(s.useImperativeHandle)(t,(function(){return{onSave:Ee,isEdit:U}}));var ve,be,ye,Ee=function(){var e=Object(E.a)(w.a.mark((function e(){var t,o,s,l,c,u,d,h,f;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ue){e.next=3;break}return y.b.info("请您输入题干"),e.abrupt("return",!1);case 3:if(0!==pe.length){e.next=6;break}return y.b.info("请您添加小题"),e.abrupt("return",!1);case 6:t=0;case 7:if(!(t<pe.length)){e.next=25;break}if(null!=(s=pe[t])&&s.name){e.next=12;break}return y.b.info("请您输入第".concat(t+1,"小题题干")),e.abrupt("return",!1);case 12:if(null!=s&&s.score){e.next=15;break}return y.b.info("第".concat(t+1,"小题分数不能为0或空")),e.abrupt("return",!1);case 15:if(!((l=null==s||null===(o=s.qusList)||void 0===o?void 0:o.findIndex((function(e){return!e})))>-1)){e.next=19;break}return y.b.info("请先输入第".concat(t+1,"小题").concat(ne[l],"选项的内容")),e.abrupt("return",!1);case 19:if(null!=s&&s.qusAnswer.length){e.next=22;break}return y.b.info("请设置第".concat(t+1,"小题的正确答案,点击选项A/B...即可完成设置")),e.abrupt("return",!1);case 22:t++,e.next=7;break;case 25:if(c=pe.map((function(e){var t;return{id:e.id>1?e.id:null,question_title:e.name,question_type:1,question_choices:e.qusList,question_score:e.score,standard_answers:[(null===(t=e.qusAnswer)||void 0===t?void 0:t[0])+1]}})),!a.question_id){e.next=35;break}if(1!==(null==a?void 0:a.is_my)){e.next=31;break}b.a.confirm({title:"提示",content:"此题目已存在于试题库,是否将修改后的题目覆盖试题库的原题?",okText:"覆盖原题",cancelText:"不覆盖",onOk:function(){var e=Object(E.a)(w.a.mark((function e(){var t,o,s;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:ue,question_type:7,sub_questions:c,tag_discipline_ids:j,sub_discipline_id:null===(t=n.editData)||void 0===t||null===(o=t.exercise)||void 0===o?void 0:o.sub_discipline_id,difficulty:Y,is_cover:1,repeat_answer:!Z}});case 2:u=e.sent,0===(null===(s=u)||void 0===s?void 0:s.status)&&(S(-1),y.b.success("保存成功"),H(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},oe)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),onCancel:function(){var e=Object(E.a)(w.a.mark((function e(){var t,o,s;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:ue,question_type:7,sub_questions:c,tag_discipline_ids:j,sub_discipline_id:null===(t=n.editData)||void 0===t||null===(o=t.exercise)||void 0===o?void 0:o.sub_discipline_id,difficulty:Y,repeat_answer:!Z}});case 2:u=e.sent,0===(null===(s=u)||void 0===s?void 0:s.status)&&(S(-1),y.b.success("保存成功"),H(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},oe)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),e.next=35;break;case 31:return e.next=33,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:ue,question_type:7,sub_questions:c,tag_discipline_ids:j,sub_discipline_id:null===(d=n.editData)||void 0===d||null===(h=d.exercise)||void 0===h?void 0:h.sub_discipline_id,difficulty:Y,repeat_answer:!Z}});case 33:u=e.sent,0===(null===(f=u)||void 0===f?void 0:f.status)&&(S(-1),y.b.success("保存成功"),H(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},oe)}));case 35:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),xe=[{name:"删除",icon:"iconfont c-light-black ml30 icon-shanchu current",id:"del"},{name:"编辑",icon:"iconfont c-light-primary ml30 icon-bianjishijuan3x current",id:"edit"}].filter((function(e){var t,r;return 1===(null==n||null===(t=n.editData)||void 0===t||null===(r=t.exercise)||void 0===r?void 0:r.exercise_status)?e:"del"!==e.id&&"add"!==e.id})),_e=function(){var e=Object(E.a)(w.a.mark((function e(t){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(-1===v){e.next=3;break}return y.b.error("请先保存或取消当前正在编辑的问题。"),e.abrupt("return");case 3:e.t0=t.id,e.next="del"===e.t0?6:"up"===e.t0||"down"===e.t0?8:"edit"===e.t0?12:"add"===e.t0?15:17;break;case 6:return b.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"确认要删除这个试题吗?",onOk:function(){return Object(E.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(O.m)({id:a.question_id});case 2:i({type:"exercise/editExercise",payload:Object(r.a)({},oe)});case 3:case"end":return e.stop()}}),e)})))()}}),e.abrupt("break",17);case 8:return e.next=10,i({type:"exercise/exeriseMoveUpDown",payload:{id:a.question_id,opr:t.id}});case 10:return i({type:"exercise/editExercise",payload:Object(r.a)({},oe)}),e.abrupt("break",17);case 12:return S(a.dragKey),H(!0),e.abrupt("break",17);case 15:return T({key:a.key,insert_id:null==a?void 0:a.question_id,question_type:0}),e.abrupt("break",17);case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ke=function(){var e={id:Math.random(),item_type:"SINGLE",open:!1,name:"",qusList:["","","",""],activeQusEditor:null,qusAnswer:[],analysis:""};me(pe.concat(e))},we=function(e,t,n){var r,i=Object(te.cloneDeep)(pe);("open"===e&&(i[t].open=!i[t].open),"delete"===e&&i.splice(t,1),"value"===e&&(i[t].name=n),"answer"===e&&(i[t].qusAnswer=[n]),"edit"===e&&(i[t].activeQusEditor=n),"details"===e&&(i[t].qusList[i[t].activeQusEditor]=n),"addQus"===e&&(i[t].qusList=i[t].qusList.concat("")),"deleteQus"===e)&&(i[t].qusList=i[t].qusList.filter((function(e,t){return t!==n})),i[t].qusAnswer=null===(r=i[t].qusAnswer)||void 0===r?void 0:r.filter((function(e){return e!==n})));"analysis"===e&&(i[t].analysis=n),"score"===e&&(i[t].score=n),me(i)};return l.a.createElement("section",{className:L.a.wrap},!U&&l.a.createElement("aside",{ref:se},l.a.createElement("div",{className:L.a.questionType},!(null!=a&&a.isPreview)&&l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},a.key,"、接龙题"),"(",a.question_score,"分)")),null!=a&&a.isPreview?l.a.createElement("div",{style:{display:"flex",alignItems:"flex-start"}},l.a.createElement("span",{style:{flexShrink:0},className:"font18"},a.key,"."),l.a.createElement(R.a,{value:a.question_title}),l.a.createElement("span",{style:{flexShrink:0},className:"font16"},"(共",null==a?void 0:a.sub_q_count,"小题,",a.question_score,"分)")):l.a.createElement("div",{className:"mt5"},l.a.createElement(R.a,{value:a.question_title})),l.a.createElement("div",{style:{display:V?"block":"none"},className:L.a.questionChoices},null==a||null===(ye=a.sub_exercise_questions)||void 0===ye?void 0:ye.map((function(e,t){var n;return l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{style:{display:"flex",alignItems:"flex-start"}},l.a.createElement("span",{style:{flexShrink:0},className:"font18"},a.key,".",t+1,"(单选题)"),l.a.createElement(R.a,{value:e.question_title}),l.a.createElement("span",{style:{flexShrink:0},className:"font16"},"(",e.question_score,"分)")),null==e||null===(n=e.question_choices)||void 0===n?void 0:n.map((function(t,n){return l.a.createElement(u.a,{key:n},l.a.createElement(h.a,null,l.a.createElement(m.a,{key:n,checked:e.standard_answer.includes(n+1),disabled:!0},ne[n],".")),l.a.createElement(h.a,{flex:"1"},l.a.createElement("span",{className:"c-black font14"},l.a.createElement(R.a,{value:t.choice_text}))))})))}))),l.a.createElement("div",{className:L.a.action},l.a.createElement("span",{className:"c-light-primary current",onClick:function(){return W(!V)},style:{}},V?"收起":"展开"),!a.hideAction&&xe.map((function(e,t){return"up"===e.id&&1===a.key||"down"===e.id&&a.key===a.len?null:l.a.createElement(c.a,{key:t,placement:"bottom",title:e.name},l.a.createElement("span",{onClick:function(){return _e(e)},className:e.icon}))})))),U&&l.a.createElement("aside",null,l.a.createElement("div",{className:L.a.questionType},l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},"选择题"),"(客观题,由系统自动评分,请设置标准答案)")),l.a.createElement("section",{className:L.a.wrap,style:{padding:0}},l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:L.a.required},"*"),l.a.createElement("span",{className:L.a.title},"题干:")),l.a.createElement(P.a,{id:"combination-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:ue,onChange:function(e){return de(e)}}),l.a.createElement("p",null,"小题数:",null==pe?void 0:pe.length),null==pe?void 0:pe.map((function(e,t){var n;return l.a.createElement("div",{className:L.a.fold,key:e.id},l.a.createElement("div",{onClick:function(){return we("open",t)},className:L.a.head},l.a.createElement("i",{className:"iconfont icon-sanjiaoxing",style:{transform:e.open?"initial":"rotate(270deg) translate(2px, 4px)"}}),l.a.createElement("span",null,"第",t+1,"小题(单选题)"),l.a.createElement("b",{onClick:function(e){e.stopPropagation(),we("delete",t)},className:"iconfont icon-shanchu8"})),l.a.createElement("div",{className:"mb10",style:{display:e.open?"block":"none"}},l.a.createElement(P.a,{watch:!0,height:155,placeholder:"请您输入题干",defaultValue:null==e?void 0:e.name,onChange:function(e){return we("value",t,e)}}),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:L.a.required},"*"),l.a.createElement("span",{className:L.a.title},"答案选项:",l.a.createElement("span",{className:L.a.colorGray},"点击选项可设置正确答案"))),null==e||null===(n=e.qusList)||void 0===n?void 0:n.map((function(n,r){var i,a;return l.a.createElement("div",{className:L.a.choiceWrap,key:r},l.a.createElement(c.a,{title:"点击设置为标准答案",placement:"left"},l.a.createElement("div",{className:"".concat(L.a.answer," ").concat(null!=e&&null!==(i=e.qusAnswer)&&void 0!==i&&i.includes(r)?L.a.activeAnswer:""),onClick:function(){return we("answer",t,r)}},ne[r])),l.a.createElement("div",{className:L.a.editorWrap},(null==e?void 0:e.activeQusEditor)===r?l.a.createElement(P.a,{id:"single-question-option-".concat(r),watch:!0,height:155,isFocus:!0,placeholder:"请您输入选项",defaultValue:n,onChange:function(e){return we("details",t,e)}}):l.a.createElement("div",{className:L.a.htmlWrap,onClick:function(){return we("edit",t,r)}},l.a.createElement(R.a,{value:n}))),r>1&&l.a.createElement(c.a,{title:"删除"},l.a.createElement("i",{className:"".concat(L.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return we("deleteQus",t,r)}})),r<7&&r===(null==e||null===(a=e.qusList)||void 0===a?void 0:a.length)-1&&l.a.createElement(c.a,{title:"新增参考答案"},l.a.createElement("i",{className:"".concat(L.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return we("addQus",t)}})))})),l.a.createElement("p",{className:"mt10"},"分值:",l.a.createElement(g.a,{value:e.score,max:1e4,min:0,onChange:function(e){return we("score",t,e)}})," ","分")))})),pe.length<20&&l.a.createElement(f.a,{type:"primary",onClick:ke},l.a.createElement("i",{className:"iconfont icon-tianjiatimu mr5 font14"}),"添加小题")),l.a.createElement("p",{className:"mt10"},l.a.createElement("span",{className:L.a.difficult},l.a.createElement("label",{style:{color:"red"}},"*")," 难度:",l.a.createElement(m.a.Group,{value:Y,onChange:function(e){Q(e.target.value)}},l.a.createElement(m.a.Button,{value:1},"简单"),l.a.createElement(m.a.Button,{value:2},"适中"),l.a.createElement(m.a.Button,{value:3},"困难")))),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:"".concat(L.a.title)},"知识点:",l.a.createElement("span",{className:L.a.colorGray},"(所有自建知识点仅本人可见,被EduCoder平台审核通过为官方知识点后所有用户可见)")),l.a.createElement("div",{className:"mt5"},l.a.createElement(N.a,{selectvalues:null==a?void 0:a.tag_discipline_ids,value:j,onChange:M,subId:null===(ve=n.editData)||void 0===ve||null===(be=ve.exercise)||void 0===be?void 0:be.sub_discipline_id,knowledgeOptions:ie,onAddKnowledgeFinish:ge}))),l.a.createElement("aside",{className:"tr"},(-1!==v||a.question_id)&&l.a.createElement(f.a,{type:"default",onClick:function(){p(),H(!1)}},"取消"),l.a.createElement(f.a,{className:"ml20",type:"primary",onClick:function(){Ee()}},"保存"))))},ie=Object(S.a)((function(e){var t=e.problemset,n=e.loading;return{problemset:t,globalSetting:e.globalSetting,exercise:e.exercise,loading:n.effects}}),null,null,{forwardRef:!0})(Object(s.forwardRef)(re)),ae=n("ngQI"),oe=n("loLm"),se=n.n(oe);t.a=function(e){var t,n,s,c,u,d,h,f,p,m,g,v,b,y,E,x,_,k,w=e.data,C=e.isDragDisabled,S=void 0!==C&&C,O=e.editorProps,A=void 0===O?{}:O,T=e.onDragEnd,I=void 0===T?function(){}:T,D=function(e,t,n){if(e.destination){var r=function(e,t,n){var r=Array.from(e),i=r.splice(t,1),a=Object(o.a)(i,1)[0];return r.splice(n,0,a),r}(t,e.source.index,e.destination.index);I(r,n)}},L=function(e,t,n){return l.a.createElement(ae.a,{onDragEnd:function(n){return D(n,e,t)}},l.a.createElement(ae.c,{droppableId:"droppable"},(function(n,o){return l.a.createElement("div",Object(a.a)({ref:n.innerRef},n.droppableProps,{style:{width:"100%"}}),null==e?void 0:e.map((function(e,n){var o,s=Object(r.a)(Object(r.a)({},e),{},{key:n+1,hideAction:!0,isPreview:!0,dragKey:t+"-"+n},A);return l.a.createElement(ae.b,{key:null==s?void 0:s.question_id,draggableId:null==s||null===(o=s.question_id)||void 0===o?void 0:o.toString(),index:n,isDragDisabled:S},(function(e,n){return l.a.createElement("aside",Object(a.a)({ref:e.innerRef},e.draggableProps,e.dragHandleProps),l.a.createElement("div",{className:se.a.posWarp,id:s.dragKey},function(e,t){return 0===t?l.a.createElement(l.a.Fragment,null,l.a.createElement(Q,Object(a.a)({editData:e},e)),l.a.createElement(i.a,null)):1===t?l.a.createElement(l.a.Fragment,null,l.a.createElement(G,Object(a.a)({editData:e},e)),l.a.createElement(i.a,null)):2===t?l.a.createElement(l.a.Fragment,null,l.a.createElement(U,Object(a.a)({editData:e},e)),l.a.createElement(i.a,null)):3===t?l.a.createElement(l.a.Fragment,null,l.a.createElement(M,Object(a.a)({editData:e},e)),l.a.createElement(i.a,null)):4===t?l.a.createElement(l.a.Fragment,null,l.a.createElement(X,Object(a.a)({editData:e},e)),l.a.createElement(i.a,null)):5===t?l.a.createElement(l.a.Fragment,null,l.a.createElement(K,Object(a.a)({editData:e},e)),l.a.createElement(i.a,null)):6===t?l.a.createElement(l.a.Fragment,null,l.a.createElement(ee,Object(a.a)({editData:e},e)),l.a.createElement(i.a,null)):7===t?l.a.createElement(l.a.Fragment,null,l.a.createElement(ie,Object(a.a)({editData:e},e)),l.a.createElement(i.a,null)):8===t||9===t?l.a.createElement(l.a.Fragment,null,l.a.createElement(X,Object(a.a)({editData:e},e)),l.a.createElement(i.a,null)):void 0}(s,t),!S&&l.a.createElement("div",{className:se.a.pos},l.a.createElement("div",{className:se.a.tips},"拖动可以改变试题显示顺序"))))}))})))})))};return l.a.createElement("div",null," ",(k=[{name:"单选题",type:0,count:null==w||null===(n=w.exercise_types)||void 0===n?void 0:n.q_singles,score:null==w||null===(s=w.exercise_types)||void 0===s?void 0:s.q_singles_scores,items:[]},{name:"多选题",type:1,count:null==w||null===(c=w.exercise_types)||void 0===c?void 0:c.q_doubles,score:null==w||null===(u=w.exercise_types)||void 0===u?void 0:u.q_doubles_scores,items:[]},{name:"判断题",type:2,count:null==w||null===(d=w.exercise_types)||void 0===d?void 0:d.q_judges,score:null==w||null===(h=w.exercise_types)||void 0===h?void 0:h.q_judges_scores,items:[]},{name:"填空题",type:3,count:null==w||null===(f=w.exercise_types)||void 0===f?void 0:f.q_nulls,score:null==w||null===(p=w.exercise_types)||void 0===p?void 0:p.q_nulls_scores,items:[]},{name:"简答题",type:4,count:null==w||null===(m=w.exercise_types)||void 0===m?void 0:m.q_mains,score:null==w||null===(g=w.exercise_types)||void 0===g?void 0:g.q_mains_scores,items:[]},{name:"实训题",type:5,count:null==w||null===(v=w.exercise_types)||void 0===v?void 0:v.q_shixuns,score:null==w||null===(b=w.exercise_types)||void 0===b?void 0:b.q_shixuns_scores,items:[]},{name:"编程题",type:6,count:null==w||null===(y=w.exercise_types)||void 0===y?void 0:y.q_pros,score:null==w||null===(E=w.exercise_types)||void 0===E?void 0:E.q_pros_scores,items:[]},{name:"接龙题",type:7,count:null==w||null===(x=w.exercise_types)||void 0===x?void 0:x.q_combinations,score:null==w||null===(_=w.exercise_types)||void 0===_?void 0:_.q_combination_scores,items:[]}],null==w||null===(t=w.exercise_questions)||void 0===t||t.forEach((function(e,t){var n,r,i,a,o,s,l,c,u,d,h,f,p,m,g,v;0===e.question_type&&(null===(n=k[e.question_type])||void 0===n||null===(r=n.items)||void 0===r||r.push(e)),1===e.question_type&&(null===(i=k[e.question_type])||void 0===i||null===(a=i.items)||void 0===a||a.push(e)),2===e.question_type&&(null===(o=k[e.question_type])||void 0===o||null===(s=o.items)||void 0===s||s.push(e)),3===e.question_type&&(null===(l=k[e.question_type])||void 0===l||null===(c=l.items)||void 0===c||c.push(e)),4===e.question_type&&(null===(u=k[e.question_type])||void 0===u||null===(d=u.items)||void 0===d||d.push(e)),5===e.question_type&&(null===(h=k[e.question_type])||void 0===h||null===(f=h.items)||void 0===f||f.push(e)),6===e.question_type&&(null===(p=k[e.question_type])||void 0===p||null===(m=p.items)||void 0===m||m.push(e)),7===e.question_type&&(null===(g=k[e.question_type])||void 0===g||null===(v=g.items)||void 0===v||v.push(e))})),null==w?void 0:w.map((function(e,t){return l.a.createElement(l.a.Fragment,{key:t},l.a.createElement("div",{className:"pl20"},l.a.createElement("span",{className:"font16 c-light-primary"},function(e){var t=["零","一","二","三","四","五","六","七","八","九"],n=["","十","百","千","万"];e=parseInt(e);var r=function(e){for(var r=e.toString().split("").reverse(),i="",a=0;a<r.length;a++)i=(0==a&&0==r[a]||a>0&&0==r[a]&&0==r[a-1]?"":t[r[a]]+(0==r[a]?n[0]:n[a]))+i;return i},i=Math.floor(e/1e4),a=e%1e4;return a.toString().length<4&&(a="0"+a),i?r(i)+"万"+r(a):r(e)}(t+1),"、",e.name),l.a.createElement("span",{className:"c-grey-999"},"(共",e.count,"题",7===(null==e?void 0:e.question_type)?",包含".concat(e.sub_count,"小题"):"",";共",e.score,"分)")),L(e.items,null==e?void 0:e.question_type,null==e||e.name))})))," ")}},LdHM:
|
|
|
/*!********************************************************!*\
|
|
|
!*** ./node_modules/rc-select/es/index.js + 6 modules ***!
|
|
|
\********************************************************/
|
|
|
/*! exports provided: Option, OptGroup, default */
|
|
|
/*! exports used: OptGroup, Option, default */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/TransBtn.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/generate.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/commonUtil.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/valueUtil.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMemo.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/pickAttrs.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-virtual-list/es/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"b",(function(){return x})),n.d(t,"a",(function(){return k}));var r=n("1OyB"),i=n("vuIU"),a=n("Ji7U"),o=n("LK+K"),s=n("q1tI"),l=n("rePB"),c=n("Ff2n"),u=n("ODXe"),d=n("4IlW"),h=n("bX4T"),f=n("YrtM"),p=n("TSYQ"),m=n.n(p),g=n("+nKL"),v=n("8OUc"),b=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.id,i=e.flattenOptions,a=e.childrenAsData,o=e.values,p=e.searchValue,b=e.multiple,y=e.defaultActiveFirstOption,E=e.height,x=e.itemHeight,_=e.notFoundContent,k=e.open,w=e.menuItemSelectedIcon,C=e.virtual,S=e.onSelect,O=e.onToggleOpen,A=e.onActiveValue,T=e.onScroll,I=e.onMouseEnter,D="".concat(n,"-item"),L=Object(f.a)((function(){return i}),[k,i],(function(e,t){return t[0]&&e[1]!==t[1]})),R=s.useRef(null),N=function(e){e.preventDefault()},j=function(e){R.current&&R.current.scrollTo({index:e})},M=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=L.length,r=0;r<n;r+=1){var i=(e+r*t+n)%n,a=L[i],o=a.group,s=a.data;if(!o&&!s.disabled)return i}return-1},P=s.useState((function(){return M(0)})),B=Object(u.a)(P,2),F=B[0],U=B[1],H=function(e){U(e);var t=L[e];t?A(t.data.value,e):A(null,-1)};s.useEffect((function(){H(!1!==y?M(0):-1)}),[L.length,p]),s.useEffect((function(){var e=setTimeout((function(){if(!b&&k&&1===o.size){var e=Array.from(o)[0],t=L.findIndex((function(t){return t.data.value===e}));H(t),j(t)}}));return function(){return clearTimeout(e)}}),[k]);var z=function(e){void 0!==e&&S(e,{selected:!o.has(e)}),b||O(!1)};if(s.useImperativeHandle(t,(function(){return{onKeyDown:function(e){var t=e.which;switch(t){case d.a.UP:case d.a.DOWN:var n=0;if(t===d.a.UP?n=-1:t===d.a.DOWN&&(n=1),0!==n){var r=M(F+n,n);j(r),H(r)}break;case d.a.ENTER:var i=L[F];i&&!i.data.disabled?z(i.data.value):z(void 0),k&&e.preventDefault();break;case d.a.ESC:O(!1)}},onKeyUp:function(){},scrollTo:function(e){j(e)}}})),0===L.length)return s.createElement("div",{role:"listbox",id:"".concat(r,"_list"),className:"".concat(D,"-empty"),onMouseDown:N},_);function G(e){var t=L[e];if(!t)return null;var n=t.data||{},i=n.value,l=n.label,c=n.children,u=Object(h.a)(n,!0),d=a?c:l;return t?s.createElement("div",Object.assign({"aria-label":"string"==typeof d?d:null},u,{key:e,role:"option",id:"".concat(r,"_list_").concat(e),"aria-selected":o.has(i)}),i):null}return s.createElement(s.Fragment,null,s.createElement("div",{role:"listbox",id:"".concat(r,"_list"),style:{height:0,width:0,overflow:"hidden"}},G(F-1),G(F),G(F+1)),s.createElement(g.a,{itemKey:"key",ref:R,data:L,height:E,itemHeight:x,fullHeight:!1,onMouseDown:N,onScroll:T,virtual:C,onMouseEnter:I},(function(e,t){var n,r=e.group,i=e.groupOption,u=e.data,d=u.label,h=u.key;if(r)return s.createElement("div",{className:m()(D,"".concat(D,"-group"))},void 0!==d?d:h);var f=u.disabled,p=u.value,g=u.title,b=u.children,y=u.style,E=u.className,x=Object(c.a)(u,["disabled","value","title","children","style","className"]),_=o.has(p),k="".concat(D,"-option"),C=m()(D,k,E,(n={},Object(l.a)(n,"".concat(k,"-grouped"),i),Object(l.a)(n,"".concat(k,"-active"),F===t&&!f),Object(l.a)(n,"".concat(k,"-disabled"),f),Object(l.a)(n,"".concat(k,"-selected"),_),n)),S=a?b:d,O=!w||"function"==typeof w||_;return s.createElement("div",Object.assign({},x,{"aria-selected":_,className:C,title:g,onMouseMove:function(){F===t||f||H(t)},onClick:function(){f||z(p)},style:y}),s.createElement("div",{className:"".concat(k,"-content")},S||p),s.isValidElement(w)||_,O&&s.createElement(v.a,{className:"".concat(D,"-option-state"),customizeIcon:w,customizeIconProps:{isSelected:_}},_?"✓":null))})))}));b.displayName="OptionList";var y=b,E=function(){return null};E.isSelectOption=!0;var x=E,_=function(){return null};_.isSelectOptGroup=!0;var k=_,w=n("VTBJ"),C=n("Zm9Q");function S(e){var t=e.key,n=e.props,r=n.children,i=n.value,a=Object(c.a)(n,["children","value"]);return Object(w.a)({key:t,value:void 0!==i?i:t,children:r},a)}function O(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Object(C.a)(e).map((function(e,n){if(!s.isValidElement(e)||!e.type)return null;var r=e.type.isSelectOptGroup,i=e.key,a=e.props,o=a.children,l=Object(c.a)(a,["children"]);return t||!r?S(e):Object(w.a)(Object(w.a)({key:"__RC_SELECT_GRP__".concat(null===i?n:i,"__"),label:i},l),{},{options:O(o)})})).filter((function(e){return e}))}var A=n("2Qr1"),T=n("qNPg"),I=n("U8pU"),D=n("Kwbf"),L=n("WKfj");var R=function(e){var t=e.mode,n=e.options,r=e.children,i=e.backfill,a=e.allowClear,o=e.placeholder,l=e.getInputElement,c=e.showSearch,u=e.onSearch,d=e.defaultOpen,h=e.autoFocus,f=e.labelInValue,p=e.value,m=e.inputValue,g=e.optionLabelProp,v="multiple"===t||"tags"===t,b=void 0!==c?c:v||"combobox"===t,y=n||O(r);if(Object(D.a)("tags"!==t||y.every((function(e){return!e.disabled})),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),"tags"===t||"combobox"===t){var E=y.some((function(e){return e.options?e.options.some((function(e){return"number"==typeof("value"in e?e.value:e.key)})):"number"==typeof("value"in e?e.value:e.key)}));Object(D.a)(!E,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(D.a)("combobox"!==t||!g,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(D.a)("combobox"===t||!i,"`backfill` only works with `combobox` mode."),Object(D.a)("combobox"===t||!l,"`getInputElement` only work with `combobox` mode."),Object(D.b)("combobox"!==t||!l||!a||!o,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),u&&!b&&"combobox"!==t&&"tags"!==t&&Object(D.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(D.b)(!d||h,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),null!=p){var x=Object(L.d)(p);Object(D.a)(!f||x.every((function(e){return"object"===Object(I.a)(e)&&("key"in e||"value"in e)})),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(D.a)(!v||Array.isArray(p),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var _=null;Object(C.a)(r).some((function(e){if(!s.isValidElement(e)||!e.type)return!1;var t=e.type;return!t.isSelectOption&&(t.isSelectOptGroup?!Object(C.a)(e.props.children).every((function(t){return!(s.isValidElement(t)&&e.type&&!t.type.isSelectOption)||(_=t.type,!1)})):(_=t,!0))})),_&&Object(D.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(_.displayName||_.name||_,"`.")),Object(D.a)(void 0===m,"`inputValue` is deprecated, please use `searchValue` instead.")}},N=Object(T.a)({prefixCls:"rc-select",components:{optionList:y},convertChildrenToData:O,flattenOptions:A.d,getLabeledValue:A.e,filterOptions:A.b,isValueDisabled:A.g,findValueOption:A.c,warningProps:R,fillOptionsWithMissingValue:A.a}),j=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).selectRef=s.createRef(),e.focus=function(){e.selectRef.current.focus()},e.blur=function(){e.selectRef.current.blur()},e}return Object(i.a)(n,[{key:"render",value:function(){return s.createElement(N,Object.assign({ref:this.selectRef},this.props))}}]),n}(s.Component);j.Option=x,j.OptGroup=k;var M=j;t.c=M},M8RZ:
|
|
|
/*!**********************************!*\
|
|
|
!*** ./src/components/modal.tsx ***!
|
|
|
\**********************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass */"mtLc"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),s=n(/*! react */"q1tI"),l=n.n(s),c=n(/*! react-dom */"i8i4"),u=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i;Object(r.a)(this,n),i=t.call(this,e);var a=window.document;return i.node=a.createElement("div"),a.body.appendChild(i.node),i}return Object(i.a)(n,[{key:"render",value:function(){var e=this.props.children;return Object(c.createPortal)(e,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),n}(l.a.Component)},MEGo:
|
|
|
/*!***************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/tool/parseSVG.js ***!
|
|
|
\***************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../container/Group */"4fz+"),i=n(/*! ../graphic/Image */"Dagg"),a=n(/*! ../graphic/Text */"dqUG"),o=n(/*! ../graphic/shape/Circle */"2fw6"),s=n(/*! ../graphic/shape/Rect */"x6Kt"),l=n(/*! ../graphic/shape/Ellipse */"rmlV"),c=n(/*! ../graphic/shape/Line */"yxFR"),u=n(/*! ../graphic/Path */"y+Vt"),d=n(/*! ../graphic/shape/Polygon */"h7HQ"),h=n(/*! ../graphic/shape/Polyline */"1Jh7"),f=n(/*! ../graphic/LinearGradient */"SKnc"),p=n(/*! ../graphic/Style */"K2GJ"),m=n(/*! ../core/matrix */"Fofx"),g=n(/*! ./path */"NC18").createFromString,v=n(/*! ../core/util */"bYtY"),b=v.isString,y=v.extend,E=v.defaults,x=v.trim,_=v.each,k=/[\s,]+/;function w(e){b(e)&&(e=(new DOMParser).parseFromString(e,"text/xml"));for(9===e.nodeType&&(e=e.firstChild);"svg"!==e.nodeName.toLowerCase()||1!==e.nodeType;)e=e.nextSibling;return e}function C(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}C.prototype.parse=function(e,t){t=t||{};var n=w(e);if(!n)throw new Error("Illegal svg");var i=new r;this._root=i;var a=n.getAttribute("viewBox")||"",o=parseFloat(n.getAttribute("width")||t.width),l=parseFloat(n.getAttribute("height")||t.height);isNaN(o)&&(o=null),isNaN(l)&&(l=null),D(n,i,null,!0);for(var c,u,d=n.firstChild;d;)this._parseNode(d,i),d=d.nextSibling;if(a){var h=x(a).split(k);h.length>=4&&(c={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(c&&null!=o&&null!=l&&(u=M(c,o,l),!t.ignoreViewBox)){var f=i;(i=new r).add(f),f.scale=u.scale.slice(),f.position=u.position.slice()}return t.ignoreRootClip||null==o||null==l||i.setClipPath(new s({shape:{x:0,y:0,width:o,height:l}})),{root:i,width:o,height:l,viewBoxRect:c,viewBoxTransform:u}},C.prototype._parseNode=function(e,t){var n,r,i=e.nodeName.toLowerCase();if("defs"===i?this._isDefine=!0:"text"===i&&(this._isText=!0),this._isDefine){if(r=O[i]){var a=r.call(this,e),o=e.getAttribute("id");o&&(this._defs[o]=a)}}else(r=S[i])&&(n=r.call(this,e,t),t.add(n));for(var s=e.firstChild;s;)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===i?this._isDefine=!1:"text"===i&&(this._isText=!1)},C.prototype._parseText=function(e,t){if(1===e.nodeType){var n=e.getAttribute("dx")||0,r=e.getAttribute("dy")||0;this._textX+=parseFloat(n),this._textY+=parseFloat(r)}var i=new a({style:{text:e.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});A(t,i),D(e,i,this._defs);var o=i.style.fontSize;o&&o<9&&(i.style.fontSize=9,i.scale=i.scale||[1,1],i.scale[0]*=o/9,i.scale[1]*=o/9);var s=i.getBoundingRect();return this._textX+=s.width,t.add(i),i};var S={g:function(e,t){var n=new r;return A(t,n),D(e,n,this._defs),n},rect:function(e,t){var n=new s;return A(t,n),D(e,n,this._defs),n.setShape({x:parseFloat(e.getAttribute("x")||0),y:parseFloat(e.getAttribute("y")||0),width:parseFloat(e.getAttribute("width")||0),height:parseFloat(e.getAttribute("height")||0)}),n},circle:function(e,t){var n=new o;return A(t,n),D(e,n,this._defs),n.setShape({cx:parseFloat(e.getAttribute("cx")||0),cy:parseFloat(e.getAttribute("cy")||0),r:parseFloat(e.getAttribute("r")||0)}),n},line:function(e,t){var n=new c;return A(t,n),D(e,n,this._defs),n.setShape({x1:parseFloat(e.getAttribute("x1")||0),y1:parseFloat(e.getAttribute("y1")||0),x2:parseFloat(e.getAttribute("x2")||0),y2:parseFloat(e.getAttribute("y2")||0)}),n},ellipse:function(e,t){var n=new l;return A(t,n),D(e,n,this._defs),n.setShape({cx:parseFloat(e.getAttribute("cx")||0),cy:parseFloat(e.getAttribute("cy")||0),rx:parseFloat(e.getAttribute("rx")||0),ry:parseFloat(e.getAttribute("ry")||0)}),n},polygon:function(e,t){var n=e.getAttribute("points");n&&(n=T(n));var r=new d({shape:{points:n||[]}});return A(t,r),D(e,r,this._defs),r},polyline:function(e,t){var n=new u;A(t,n),D(e,n,this._defs);var r=e.getAttribute("points");return r&&(r=T(r)),new h({shape:{points:r||[]}})},image:function(e,t){var n=new i;return A(t,n),D(e,n,this._defs),n.setStyle({image:e.getAttribute("xlink:href"),x:e.getAttribute("x"),y:e.getAttribute("y"),width:e.getAttribute("width"),height:e.getAttribute("height")}),n},text:function(e,t){var n=e.getAttribute("x")||0,i=e.getAttribute("y")||0,a=e.getAttribute("dx")||0,o=e.getAttribute("dy")||0;this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(o);var s=new r;return A(t,s),D(e,s,this._defs),s},tspan:function(e,t){var n=e.getAttribute("x"),i=e.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var a=e.getAttribute("dx")||0,o=e.getAttribute("dy")||0,s=new r;return A(t,s),D(e,s,this._defs),this._textX+=a,this._textY+=o,s},path:function(e,t){var n=e.getAttribute("d")||"",r=g(n);return A(t,r),D(e,r,this._defs),r}},O={lineargradient:function(e){var t=parseInt(e.getAttribute("x1")||0,10),n=parseInt(e.getAttribute("y1")||0,10),r=parseInt(e.getAttribute("x2")||10,10),i=parseInt(e.getAttribute("y2")||0,10),a=new f(t,n,r,i);return function(e,t){var n=e.firstChild;for(;n;){if(1===n.nodeType){var r=n.getAttribute("offset");r=r.indexOf("%")>0?parseInt(r,10)/100:r?parseFloat(r):0;var i=n.getAttribute("stop-color")||"#000000";t.addColorStop(r,i)}n=n.nextSibling}}(e,a),a},radialgradient:function(e){}};function A(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),E(t.__inheritedStyle,e.__inheritedStyle))}function T(e){for(var t=x(e).split(k),n=[],r=0;r<t.length;r+=2){var i=parseFloat(t[r]),a=parseFloat(t[r+1]);n.push([i,a])}return n}var I={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"};function D(e,t,n,r){var i=t.__inheritedStyle||{},a="text"===t.type;if(1===e.nodeType&&(function(e,t){var n=e.getAttribute("transform");if(n){n=n.replace(/,/g," ");var r=null,i=[];n.replace(N,(function(e,t,n){i.push(t,n)}));for(var a=i.length-1;a>0;a-=2){var o=i[a],s=i[a-1];switch(r=r||m.create(),s){case"translate":o=x(o).split(k),m.translate(r,r,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=x(o).split(k),m.scale(r,r,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=x(o).split(k),m.rotate(r,r,parseFloat(o[0]));break;case"skew":o=x(o).split(k),console.warn("Skew transform is not supported yet");break;case"matrix":o=x(o).split(k);r[0]=parseFloat(o[0]),r[1]=parseFloat(o[1]),r[2]=parseFloat(o[2]),r[3]=parseFloat(o[3]),r[4]=parseFloat(o[4]),r[5]=parseFloat(o[5])}}t.setLocalTransform(r)}}(e,t),y(i,function(e){var t=e.getAttribute("style"),n={};if(!t)return n;var r,i={};j.lastIndex=0;for(;null!=(r=j.exec(t));)i[r[1]]=r[2];for(var a in I)I.hasOwnProperty(a)&&null!=i[a]&&(n[I[a]]=i[a]);return n}(e)),!r))for(var o in I)if(I.hasOwnProperty(o)){var s=e.getAttribute(o);null!=s&&(i[I[o]]=s)}var l=a?"textFill":"fill",c=a?"textStroke":"stroke";t.style=t.style||new p;var u=t.style;null!=i.fill&&u.set(l,R(i.fill,n)),null!=i.stroke&&u.set(c,R(i.stroke,n)),_(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],(function(e){var t="lineWidth"===e&&a?"textStrokeWidth":e;null!=i[e]&&u.set(t,parseFloat(i[e]))})),i.textBaseline&&"auto"!==i.textBaseline||(i.textBaseline="alphabetic"),"alphabetic"===i.textBaseline&&(i.textBaseline="bottom"),"start"===i.textAlign&&(i.textAlign="left"),"end"===i.textAlign&&(i.textAlign="right"),_(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],(function(e){null!=i[e]&&u.set(e,i[e])})),i.lineDash&&(t.style.lineDash=x(i.lineDash).split(k)),u[c]&&"none"!==u[c]&&(t[c]=!0),t.__inheritedStyle=i}var L=/url\(\s*#(.*?)\)/;function R(e,t){var n=t&&e&&e.match(L);return n?t[x(n[1])]:e}var N=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var j=/([^\s:;]+)\s*:\s*([^:;]+)/g;function M(e,t,n){var r=t/e.width,i=n/e.height,a=Math.min(r,i);return{scale:[a,a],position:[-(e.x+e.width/2)*a+t/2,-(e.y+e.height/2)*a+n/2]}}t.parseXML=w,t.makeViewBoxTransform=M,t.parseSVG=function(e,t){return(new C).parse(e,t)}},MKOG:
|
|
|
/*!*********************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/animation/Animation.js ***!
|
|
|
\*********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/util */"bYtY"),i=n(/*! ../core/event */"YH21").Dispatcher,a=n(/*! ./requestAnimationFrame */"mLcG"),o=n(/*! ./Animator */"Bq2U"),s=function(e){e=e||{},this.stage=e.stage||{},this.onframe=e.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,i.call(this)};s.prototype={constructor:s,addClip:function(e){this._clips.push(e)},addAnimator:function(e){e.animation=this;for(var t=e.getClips(),n=0;n<t.length;n++)this.addClip(t[n])},removeClip:function(e){var t=r.indexOf(this._clips,e);t>=0&&this._clips.splice(t,1)},removeAnimator:function(e){for(var t=e.getClips(),n=0;n<t.length;n++)this.removeClip(t[n]);e.animation=null},_update:function(){for(var e=(new Date).getTime()-this._pausedTime,t=e-this._time,n=this._clips,r=n.length,i=[],a=[],o=0;o<r;o++){var s=n[o],l=s.step(e,t);l&&(i.push(l),a.push(s))}for(o=0;o<r;)n[o]._needsRemove?(n[o]=n[r-1],n.pop(),r--):o++;r=i.length;for(o=0;o<r;o++)a[o].fire(i[o]);this._time=e,this.onframe(t),this.trigger("frame",t),this.stage.update&&this.stage.update()},_startLoop:function(){var e=this;this._running=!0,a((function t(){e._running&&(a(t),!e._paused&&e._update())}))},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(e,t){var n=new o(e,(t=t||{}).loop,t.getter,t.setter);return this.addAnimator(n),n}},r.mixin(s,i);var l=s;e.exports=l},NC18:
|
|
|
/*!***********************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/tool/path.js ***!
|
|
|
\***********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../graphic/Path */"y+Vt"),i=n(/*! ../core/PathProxy */"IMiH"),a=n(/*! ./transformPath */"7oTu"),o=Math.sqrt,s=Math.sin,l=Math.cos,c=Math.PI,u=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},d=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(u(e)*u(t))},h=function(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(d(e,t))};function f(e,t,n,r,i,a,u,f,p,m,g){var v=p*(c/180),b=l(v)*(e-n)/2+s(v)*(t-r)/2,y=-1*s(v)*(e-n)/2+l(v)*(t-r)/2,E=b*b/(u*u)+y*y/(f*f);E>1&&(u*=o(E),f*=o(E));var x=(i===a?-1:1)*o((u*u*(f*f)-u*u*(y*y)-f*f*(b*b))/(u*u*(y*y)+f*f*(b*b)))||0,_=x*u*y/f,k=x*-f*b/u,w=(e+n)/2+l(v)*_-s(v)*k,C=(t+r)/2+s(v)*_+l(v)*k,S=h([1,0],[(b-_)/u,(y-k)/f]),O=[(b-_)/u,(y-k)/f],A=[(-1*b-_)/u,(-1*y-k)/f],T=h(O,A);d(O,A)<=-1&&(T=c),d(O,A)>=1&&(T=0),0===a&&T>0&&(T-=2*c),1===a&&T<0&&(T+=2*c),g.addData(m,w,C,u,f,S,T,v,a)}var p=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,m=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function g(e,t){var n=function(e){if(!e)return new i;for(var t,n=0,r=0,a=n,o=r,s=new i,l=i.CMD,c=e.match(p),u=0;u<c.length;u++){for(var d,h=c[u],g=h.charAt(0),v=h.match(m)||[],b=v.length,y=0;y<b;y++)v[y]=parseFloat(v[y]);for(var E=0;E<b;){var x,_,k,w,C,S,O,A=n,T=r;switch(g){case"l":n+=v[E++],r+=v[E++],d=l.L,s.addData(d,n,r);break;case"L":n=v[E++],r=v[E++],d=l.L,s.addData(d,n,r);break;case"m":n+=v[E++],r+=v[E++],d=l.M,s.addData(d,n,r),a=n,o=r,g="l";break;case"M":n=v[E++],r=v[E++],d=l.M,s.addData(d,n,r),a=n,o=r,g="L";break;case"h":n+=v[E++],d=l.L,s.addData(d,n,r);break;case"H":n=v[E++],d=l.L,s.addData(d,n,r);break;case"v":r+=v[E++],d=l.L,s.addData(d,n,r);break;case"V":r=v[E++],d=l.L,s.addData(d,n,r);break;case"C":d=l.C,s.addData(d,v[E++],v[E++],v[E++],v[E++],v[E++],v[E++]),n=v[E-2],r=v[E-1];break;case"c":d=l.C,s.addData(d,v[E++]+n,v[E++]+r,v[E++]+n,v[E++]+r,v[E++]+n,v[E++]+r),n+=v[E-2],r+=v[E-1];break;case"S":x=n,_=r;var I=s.len(),D=s.data;t===l.C&&(x+=n-D[I-4],_+=r-D[I-3]),d=l.C,A=v[E++],T=v[E++],n=v[E++],r=v[E++],s.addData(d,x,_,A,T,n,r);break;case"s":x=n,_=r;I=s.len(),D=s.data;t===l.C&&(x+=n-D[I-4],_+=r-D[I-3]),d=l.C,A=n+v[E++],T=r+v[E++],n+=v[E++],r+=v[E++],s.addData(d,x,_,A,T,n,r);break;case"Q":A=v[E++],T=v[E++],n=v[E++],r=v[E++],d=l.Q,s.addData(d,A,T,n,r);break;case"q":A=v[E++]+n,T=v[E++]+r,n+=v[E++],r+=v[E++],d=l.Q,s.addData(d,A,T,n,r);break;case"T":x=n,_=r;I=s.len(),D=s.data;t===l.Q&&(x+=n-D[I-4],_+=r-D[I-3]),n=v[E++],r=v[E++],d=l.Q,s.addData(d,x,_,n,r);break;case"t":x=n,_=r;I=s.len(),D=s.data;t===l.Q&&(x+=n-D[I-4],_+=r-D[I-3]),n+=v[E++],r+=v[E++],d=l.Q,s.addData(d,x,_,n,r);break;case"A":k=v[E++],w=v[E++],C=v[E++],S=v[E++],O=v[E++],f(A=n,T=r,n=v[E++],r=v[E++],S,O,k,w,C,d=l.A,s);break;case"a":k=v[E++],w=v[E++],C=v[E++],S=v[E++],O=v[E++],f(A=n,T=r,n+=v[E++],r+=v[E++],S,O,k,w,C,d=l.A,s)}}"z"!==g&&"Z"!==g||(d=l.Z,s.addData(d),n=a,r=o),t=d}return s.toStatic(),s}(e);return(t=t||{}).buildPath=function(e){if(e.setData){e.setData(n.data),(t=e.getContext())&&e.rebuildPath(t)}else{var t=e;n.rebuildPath(t)}},t.applyTransform=function(e){a(n,e),this.dirty(!0)},t}t.createFromString=function(e,t){return new r(g(e,t))},t.extendFromString=function(e,t){return r.extend(g(e,t))},t.mergePath=function(e,t){for(var n=[],i=e.length,a=0;a<i;a++){var o=e[a];o.path||o.createPathProxy(),o.__dirtyPath&&o.buildPath(o.path,o.shape,!0),n.push(o.path)}var s=new r(t);return s.createPathProxy(),s.buildPath=function(e){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t)},s}},NZPE:
|
|
|
/*!***************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/components/TrfList/delete.png ***!
|
|
|
\***************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAbVJREFUOE+Nk79rFUEUhb+zE4OFwUD+CyGKKQQbSaMikQQ7C1tBBIsUQaJvl2Fn/cWDpAiIYJsi7YOIaCUWFoKKRhG0sbEzEImFGnev7G6yyXsxeU5159yZb87l3hG9q2WLiBO79FIwXpLp0s6cwITnQCMWrGDM43jdBckZQ0wTMdrong2R2Bxm0/98sZ8ozdcOEm5hjOC41u9Olc9ZQKySclOVkNhljCmCzjeAJM/4FbW5p+8k5tlggTtarfKxLSM6pHq4BTiL0SboaAOIi284jeP1nti+ApMEvdoEvEPMkOpJDZi1IwzwgqDh/wSsYZwk08ca4O0Qua3zW8OV5crmHg6u22EGbQ2nIbx+1IC6rrK+cYJW9gXEVrbxGUEj5bltQGJvgBapHu0LSGwCyEh1vBsQWwd4TNCDPg6uAOcImuoFlL1dJ9WNPg5uYwwRVM3MzhJmKIpjZK6e9bj4jNNpvL4QFx9wuoDXJ1r5IlH0llTtXgcXwa4SolObnYnwKnbFcfEcdJ+gpW6AtzFynuIop/Fn053u4CA5yzjO4FV9tu0Syl2S38WiSWBgD8AfoEPQ7Fb+LwIiyhxWwe2KAAAAAElFTkSuQmCC"},Nmxd:
|
|
|
/*!*******************************************!*\
|
|
|
!*** ./src/assets/images/icons/done2.png ***!
|
|
|
\*******************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAF4ElEQVRoQ91aW2wUVRj+/rPbSivURIgKjZcHjUYTgZ0lthgv3V0LSqB9IAQeNNEIaKKwZbcFnuQJoZ1piyYawJjIiwZDwiVBaHd28QItaWeLD4KJPgimiA+YCAZj6Z7fzPZiu7e57WriJE0f5v++//tm/j3nn3MOoQyXcmJ/LdfeCBOjEUA9EdUzUA9g0ST9VQJGmXkU5n/CAN2q043Vm295TU9uCRS9MwCiFWBqAmD++R1yjQNIgTgF5tNGuCPtEJ8Nd2xgWarzPil9UbBsA1G1m6R5GOYxkOgRItM71NRxzQmnIwMBvStKoCiAB50kcRB7mcG96XB7r12MLQNPJXrvzdD4QQZW2yX2EkfACR/7N56PRH+14rE0sDSpLRaM4wA/YEVW3vt0RRLWjIRi35biLWkgmOhaz0SflleYMzZi3jAcaf+sGKqoAUVX3wbwnrN0FYveYoTj7xdiL2ggqKsvMnCyYnJcEBPw0nA4/kUuNM9AINX9MMnMIEDzXeSpIISvs/A1pJu2/TgzSZ4BRVf7ALxQQSVeqPuNcLy5qIHJcb7HS4ZKYxncNnOemH4DyqmehaiW58D8UKVFeOIn+gljYrmxsu2XWa2Eomt7AN7uidwd+CKBPy8EZdA7hSlprxGO7Zg2EPxSW8q35WDZehv7Ri4KEuuGQtu+y4UoSe0DML9ZkIp5jKpEw/BzsZFsCSkpNQYJ1X7eskQWF6+rbwD4sGQWgbjRFNcmDCS0oyBuKYsseyRFxS/TteWSZT+IaktSMR0zIrFWajzcXTM2X95w0c/bk5ofVVT8k6e77vT7qY+A5TbIx6uvizoKJNUVxDhlA1COkKLis5Wgq2bZmOVj62LCSlIS2m4Q77SF8BZkJd667nPzM71LSqLrExC94k2bJbqk+Im65xQIzr7wmA9RUFcTDIQtJWQDaB3A5lT+ur34bFRJ8WbdV1VRAowGB5wTagCdFF29BOAxSzAjbkTiWrZWU+oCSJgTScwCV1K8m7rPyfe9acAcgeaVFsIHjXD7ptyYxw/vqq5ZMHcHGOZvaE7OfTvindf97CQ3bRkgorXDodiRUiYDuhYlZAeDe6zKxuTJ1j34awDC8u0XD7hht4RuwkctxvOxlFWyYFJ7jUDnC7UHU1iz7qurxBlmDlrxlb5Pl5z8iC8LIVuHmjoueEtqjvddBwDa6JWHCQlnwyjjAu7wtxjPRK+4Ta7Y6XPskpvDqJLUdoMdTWTJOX9kWs+2bL9pN89U3GTdn3WKKxpvTmRuWglmPpKOtK91IiQ73vvJFL/YCa5UbLaVaDzXXTP2p4tmjvGREYnbruOgrn7MwKvlEg9gvLpG1E2000ntKNh5O82EznQobvkVF9S732LIgus6rg0RHTNCsdYJA7oWB7jLJdlOIxzfUwwbTHY+zSy+ccldAkbtRjimThroCYAzA46bqUl6JmxOh+IH8mbq1K65NXLuIIAnymqAMQbyNRrhtvT0qkQgqe4lRof7RHKdEe6Y9XEe0NVDBLzsnrMwcmbp/rOs8lXPQtzODHhY+/9LEq0aCcV0M22wX21jge5yiwdwGVW+RuPZnGUVM9FkP+NlYesaIFcJ8s+TLM9UQDwY1JYOx6Y3QPLXRpNqPzEiHpJfBOAD8KgHjoJQs3VIh+Kzlj3zDCzp63zEJ8QgCHeXW4AnPsZvGSkbLjR3/DCT5/+3vD7lTkl0bQHRPk9PrVxg5q1GpL3gZkvpLaZU93qW8r/dYhJiw3DTNudbTFMPb1lf5xIpxHEQ7i/XA7XFw/hZSLlmqLn094flLqWZzNzcZikO/JvbrCTkJjub3rYMZJ8YgwJJbSuBK7zRTb3pUGwfCGznTdk3MMm2tG/vIvL7tpJE1G3vlCeMMcYCvTye2TfSvP2qHeFTMY4NTI9Sek8AJFewlCGi7IEPc/JycmWYOUVCJMHitNmYOQF7NjAzmTK8v5Z/N4/biEYI1BN46riNeeTGvEazx21Ao5DmcRs5QHfV6UbQ+3GbvwHH7EQQahyMxwAAAABJRU5ErkJggg=="},NohK:
|
|
|
/*!**************************************************!*\
|
|
|
!*** ./node_modules/size-sensor/lib/debounce.js ***!
|
|
|
\**************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:60,n=null;return function(){for(var r=this,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];clearTimeout(n),n=setTimeout((function(){e.apply(r,a)}),t)}}},NvD2:
|
|
|
/*!******************************************************!*\
|
|
|
!*** ./node_modules/rc-tree/es/utils/conductUtil.js ***!
|
|
|
\******************************************************/
|
|
|
/*! exports provided: isCheckDisabled, conductCheck */
|
|
|
/*! exports used: conductCheck */function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(/*! rc-util/es/warning */"Kwbf");function i(e,t){var n=new Set;return e.forEach((function(e){t.has(e)||n.add(e)})),n}function a(e){var t=e||{},n=t.disabled,r=t.disableCheckbox,i=t.checkable;return!(!n&&!r)||!1===i}function o(e,t,n,o){var s,l=[];s=o||a;var c=new Set(e.filter((function(e){var t=!!n[e];return t||l.push(e),t}))),u=new Map,d=0;return Object.keys(n).forEach((function(e){var t=n[e],r=t.level,i=u.get(r);i||(i=new Set,u.set(r,i)),i.add(t),d=Math.max(d,r)})),Object(r.a)(!l.length,"Tree missing follow keys: ".concat(l.slice(0,100).map((function(e){return"'".concat(e,"'")})).join(", "))),!0===t?function(e,t,n,r){for(var a=new Set(e),o=new Set,s=0;s<=n;s+=1){(t.get(s)||new Set).forEach((function(e){var t=e.key,n=e.node,i=e.children,o=void 0===i?[]:i;a.has(t)&&!r(n)&&o.filter((function(e){return!r(e.node)})).forEach((function(e){a.add(e.key)}))}))}for(var l=new Set,c=n;c>=0;c-=1){(t.get(c)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!r(n)&&e.parent&&!l.has(e.parent.key))if(r(e.parent.node))l.add(t.key);else{var i=!0,s=!1;(t.children||[]).filter((function(e){return!r(e.node)})).forEach((function(e){var t=e.key,n=a.has(t);i&&!n&&(i=!1),s||!n&&!o.has(t)||(s=!0)})),i&&a.add(t.key),s&&o.add(t.key),l.add(t.key)}}))}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(i(o,a))}}(c,u,d,s):function(e,t,n,r,a){for(var o=new Set(e),s=new Set(t),l=0;l<=r;l+=1){(n.get(l)||new Set).forEach((function(e){var t=e.key,n=e.node,r=e.children,i=void 0===r?[]:r;o.has(t)||s.has(t)||a(n)||i.filter((function(e){return!a(e.node)})).forEach((function(e){o.delete(e.key)}))}))}s=new Set;for(var c=new Set,u=r;u>=0;u-=1){(n.get(u)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!a(n)&&e.parent&&!c.has(e.parent.key))if(a(e.parent.node))c.add(t.key);else{var r=!0,i=!1;(t.children||[]).filter((function(e){return!a(e.node)})).forEach((function(e){var t=e.key,n=o.has(t);r&&!n&&(r=!1),i||!n&&!s.has(t)||(i=!0)})),r||o.delete(t.key),i&&s.add(t.key),c.add(t.key)}}))}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(i(s,o))}}(c,t.halfCheckedKeys,u,d,s)}},O2Wb:
|
|
|
/*!******************************************************************!*\
|
|
|
!*** ./src/components/Editor/NullChildEditor/index.less?modules ***!
|
|
|
\******************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex:"flex___2gmSR",flex1:"flex1___3Tu1g",color666:"color666___2uyGL",error:"error___yJ86W",deleteIcon:"deleteIcon___1D2tg",addIcon:"addIcon___2VIYB"}},OLES:
|
|
|
/*!*********************************************************!*\
|
|
|
!*** ./node_modules/rc-tooltip/es/index.js + 2 modules ***!
|
|
|
\*********************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tooltip/es/placements.js because of ./node_modules/antd/es/tooltip/placements.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-trigger/es/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("U8pU"),i=n("VTBJ"),a=n("Ff2n"),o=n("q1tI"),s=n("uciX"),l=n("7ixt"),c=function(e){var t=e.overlay,n=e.prefixCls,r=e.id,i=e.overlayInnerStyle;return o.createElement("div",{className:"".concat(n,"-inner"),id:r,role:"tooltip",style:i},"function"==typeof t?t():t)},u=Object(o.forwardRef)((function(e,t){var n=e.overlayClassName,u=e.trigger,d=void 0===u?["hover"]:u,h=e.mouseEnterDelay,f=void 0===h?0:h,p=e.mouseLeaveDelay,m=void 0===p?.1:p,g=e.overlayStyle,v=e.prefixCls,b=void 0===v?"rc-tooltip":v,y=e.children,E=e.onVisibleChange,x=e.afterVisibleChange,_=e.transitionName,k=e.animation,w=e.placement,C=void 0===w?"right":w,S=e.align,O=void 0===S?{}:S,A=e.destroyTooltipOnHide,T=void 0!==A&&A,I=e.defaultVisible,D=e.getTooltipContainer,L=e.overlayInnerStyle,R=Object(a.a)(e,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),N=Object(o.useRef)(null);Object(o.useImperativeHandle)(t,(function(){return N.current}));var j=Object(i.a)({},R);"visible"in e&&(j.popupVisible=e.visible);var M=!1,P=!1;if("boolean"==typeof T)M=T;else if(T&&"object"===Object(r.a)(T)){var B=T.keepParent;M=!0===B,P=!1===B}return o.createElement(s.a,Object.assign({popupClassName:n,prefixCls:b,popup:function(){var t=e.arrowContent,n=void 0===t?null:t,r=e.overlay,i=e.id;return[o.createElement("div",{className:"".concat(b,"-arrow"),key:"arrow"},n),o.createElement(c,{key:"content",prefixCls:b,id:i,overlay:r,overlayInnerStyle:L})]},action:d,builtinPlacements:l.a,popupPlacement:C,ref:N,popupAlign:O,getPopupContainer:D,onPopupVisibleChange:E,afterPopupVisibleChange:x,popupTransitionName:_,popupAnimation:k,defaultPopupVisible:I,destroyPopupOnHide:M,autoDestroy:P,mouseLeaveDelay:m,popupStyle:g,mouseEnterDelay:f},j),y)}));t.a=u},OS9S:
|
|
|
/*!********************************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/IncrementalDisplayable.js ***!
|
|
|
\********************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/util */"bYtY").inherits,i=n(/*! ./Displayable */"Gev7"),a=n(/*! ../core/BoundingRect */"mFDi");function o(e){i.call(this,e),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}o.prototype.incremental=!0,o.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},o.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.dirty()},o.prototype.addDisplayables=function(e,t){t=t||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},o.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},o.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){(t=this._displayables[e]).parent=this,t.update(),t.parent=null}for(e=0;e<this._temporaryDisplayables.length;e++){var t;(t=this._temporaryDisplayables[e]).parent=this,t.update(),t.parent=null}},o.prototype.brush=function(e,t){for(var n=this._cursor;n<this._displayables.length;n++){(r=this._displayables[n]).beforeBrush&&r.beforeBrush(e),r.brush(e,n===this._cursor?null:this._displayables[n-1]),r.afterBrush&&r.afterBrush(e)}this._cursor=n;for(n=0;n<this._temporaryDisplayables.length;n++){var r;(r=this._temporaryDisplayables[n]).beforeBrush&&r.beforeBrush(e),r.brush(e,0===n?null:this._temporaryDisplayables[n-1]),r.afterBrush&&r.afterBrush(e)}this._temporaryDisplayables=[],this.notClear=!0};var s=[];o.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new a(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],r=n.getBoundingRect().clone();n.needLocalTransform()&&r.applyTransform(n.getLocalTransform(s)),e.union(r)}this._rect=e}return this._rect},o.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1]))for(var r=0;r<this._displayables.length;r++){if(this._displayables[r].contain(e,t))return!0}return!1},r(o,i);var l=o;e.exports=l},OZM5:
|
|
|
/*!*****************************************!*\
|
|
|
!*** ./node_modules/rc-tree/es/util.js ***!
|
|
|
\*****************************************/
|
|
|
/*! exports provided: arrDel, arrAdd, posToArr, getPosition, isTreeNode, getDragNodesKeys, calcDropPosition, calcSelectedKeys, convertDataToTree, parseCheckedKeys, conductExpandParent, getDataAndAria */
|
|
|
/*! exports used: arrAdd, arrDel, calcDropPosition, calcSelectedKeys, conductExpandParent, getDataAndAria, getDragNodesKeys, getPosition, isTreeNode, parseCheckedKeys, posToArr */function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return s})),n.d(t,"k",(function(){return l})),n.d(t,"h",(function(){return c})),n.d(t,"i",(function(){return u})),n.d(t,"g",(function(){return d})),n.d(t,"c",(function(){return h})),n.d(t,"d",(function(){return f})),n.d(t,"j",(function(){return p})),n.d(t,"e",(function(){return m})),n.d(t,"f",(function(){return g}));var r=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),i=n(/*! @babel/runtime/helpers/esm/typeof */"U8pU"),a=(n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),n(/*! react */"q1tI"),n(/*! rc-util/es/warning */"Kwbf"));n(/*! ./TreeNode */"WaYH");function o(e,t){var n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function s(e,t){var n=e.slice();return-1===n.indexOf(t)&&n.push(t),n}function l(e){return e.split("-")}function c(e,t){return"".concat(e,"-").concat(t)}function u(e){return e&&e.type&&e.type.isTreeNode}function d(e,t){var n=[e];return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.forEach((function(t){var r=t.key,i=t.children;n.push(r),e(i)}))}(t[e].children),n}function h(e,t){var n=e.clientY,r=t.selectHandle.getBoundingClientRect(),i=r.top,a=r.bottom,o=r.height,s=Math.max(.25*o,2);return n<=i+s?-1:n>=a-s?1:0}function f(e,t){if(e)return t.multiple?e.slice():e.length?[e[0]]:e}function p(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else{if("object"!==Object(i.a)(e))return Object(a.a)(!1,"`checkedKeys` is not an array or an object"),null;t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0}}return t}function m(e,t){var n=new Set;return(e||[]).forEach((function(e){!function e(r){if(!n.has(r)){var i=t[r];if(i){n.add(r);var a=i.parent;i.node.disabled||a&&e(a.key)}}}(e)})),Object(r.a)(n)}function g(e){var t={};return Object.keys(e).forEach((function(n){(n.startsWith("data-")||n.startsWith("aria-"))&&(t[n]=e[n])})),t}},Ohmc:
|
|
|
/*!*******************************************!*\
|
|
|
!*** ./src/assets/images/certificate.jpg ***!
|
|
|
\*******************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/certificate.fc32dc1b.jpg"},Ot1p:
|
|
|
/*!**************************************************************!*\
|
|
|
!*** ./src/components/markdown-editor/index.tsx + 6 modules ***!
|
|
|
\**************************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/code-block/index.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/modal.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/useInterval.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/tasks/util.js because of ./src/pages/tasks/index.jsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/popover/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/popover/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/codemirror/lib/codemirror.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/qrcode.react/lib/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/uuid/dist/esm-browser/v4.js */function(e,t,n){"use strict";n("2qtc");var r=n("kLXV"),i=n("rAM+"),a=(n("miYZ"),n("tsqr")),o=n("9og8"),s=n("tJVT"),l=n("jrin"),c=n("WmNS"),u=n.n(c),d=n("q1tI"),h=n.n(d),f=n("VrN/"),p=n.n(f),m=n("bdgK"),g=(n("p77/"),n("Bd2K"),n("ELLl"),n("19Vz"),n("lZu9"),n("+NIl"),n("kSUc"),n("9Bee")),v=function(e){var t=e.value,n=void 0===t?"":t,r=(e.className,e.showTextOnly,e.showLines,e.style,Object(d.useMemo)((function(){return""}),[n]));return h.a.createElement(h.a.Fragment,null,h.a.createElement("div",{dangerouslySetInnerHTML:{__html:r}}))},b=(n("Q9mQ"),n("diRs")),y=n("0Owb"),E=(n("dejd"),n("C+DQ"),n("D1Df")),x=n.n(E),_=n("1vsH"),k=n("m3rI"),w=[{title:"粗体",icon:"icon-bold",actionName:"bold"},{title:"斜体",icon:"icon-italic",actionName:"italic"},"|",{title:"无序列表",icon:"icon-unorder-list",actionName:"list-ul"},{title:"有序列表",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"行内代码",icon:"icon-code",actionName:"code"},{title:"代码块(多语言风格)",icon:"icon-file-code",actionName:"code-block"},{title:"链接",icon:"icon-link",actionName:"link"},"|",{title:"行内公式",icon:"icon-sum",actionName:"inline-latex"},{title:"多行公式",icon:"icon-formula",actionName:"latex"},"|",{title:"添加图片",icon:"icon-picture",actionName:"upload-image"},{title:"表格",icon:"icon-table",actionName:"add-table"},"|",{title:"换行",icon:"icon-minus",actionName:"line-break"},{title:"清空",icon:"icon-eraser",actionName:"eraser"}];function C(e){var t=e.onActionCallback,n=e.title,r=e.icon,i=e.actionName,a=e.className,o=void 0===a?"":a,s=e.children;return h.a.createElement("a",{title:n,className:o,onClick:function(){t(i)}},h.a.createElement("i",{className:"md-iconfont ".concat(r)}),s)}var S=function(e){var t=e.watch,n=e.showNullButton,r=e.onActionCallback,i=e.fullScreen,a=e.insertTemp,o=e.hidetoolBar,s=e.uuid,l=e.setOpenPhones,c=Object(_.E)("_educoder_session_login"),u=Object(_.E)("_educoder_session"),d=[].concat(w,[{title:"".concat(t?"关闭实时预览":"开启实时预览"),icon:"".concat(t?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return h.a.createElement("ul",{className:"markdown-toolbar-container"},!o&&d.map((function(e,t){return h.a.createElement("li",{key:t},e.actionName?h.a.createElement(C,Object(y.a)({},e,{onActionCallback:r})):h.a.createElement("span",{className:"v-line"}))})),n?h.a.createElement("li",null,h.a.createElement(C,{icon:"icon-edit",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:r},h.a.createElement("span",{className:"fill-tip"},"点击插入\b填空项"))):null,a&&h.a.createElement("li",null,h.a.createElement(C,{icon:"icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(a),onActionCallback:r},h.a.createElement("span",{className:"fill-tip"},"插入模板"))),h.a.createElement("li",null,h.a.createElement(b.a,{title:"打开手机扫一扫",content:h.a.createElement("div",null,h.a.createElement("span",{style:{display:"none"}},"test----",location.origin+"/upload.html?_educoder_session_login="+c+"&_educoder_session="+u+"&key="+s+"&api="+encodeURIComponent(k.a.API_SERVER)),h.a.createElement(x.a,{size:150,fgColor:"#000",value:location.origin+"/upload.html?_educoder_session_login="+c+"&_educoder_session="+u+"&key="+s+"&api="+encodeURIComponent(k.a.API_SERVER)}))},h.a.createElement("span",{className:"fill-tip",onMouseOver:function(){return l(!0)}},"手机上传文件"))),h.a.createElement("li",{className:"btn-full-screen"},h.a.createElement(C,{icon:"".concat(i?"icon-shrink":"icon-enlarge"),title:i?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:r})))},O=n("M8RZ"),A=(n("+L6B"),n("2/Rp")),T=(n("y8nQ"),n("Vl3Y")),I=(n("5NDa"),n("5rEg")),D={labelCol:{span:4},wrapperCol:{span:20}},L=function(e){var t=e.callback,n=e.onCancel;return h.a.createElement(T.a,Object(y.a)({},D,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){t(e)}}),h.a.createElement(T.a.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}]},h.a.createElement(I.a,null)),h.a.createElement(T.a.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}]},h.a.createElement(I.a,null)),h.a.createElement("div",{className:"flex-container flex-end"},h.a.createElement(A.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),h.a.createElement(A.a,{type:"ghost",onClick:n},"取消")))},R=n("7ahc"),N=n("k1fw"),j=(n("HmJG"),n("BjJ7")),M=T.a.useForm,P={width:280,marginRight:10},B={labelCol:{span:5},wrapperCol:{span:19}},F=function(e){var t=e.callback,n=e.onCancel,r=M(),i=Object(s.a)(r,1)[0],a=Object(d.useRef)();function o(e,t){i.setFieldsValue({src:"/api/attachments/".concat(e.id,"?type=").concat(e.content_type),type:t.type})}return h.a.createElement(T.a,Object(y.a)({form:i},B,{className:"upload-image-panel",onFinish:function(e){t(Object(N.a)(Object(N.a)({},e),{},{name:a.current}))}}),h.a.createElement(T.a.Item,{label:"文件地址",required:!0},h.a.createElement("div",{className:"flex-container"},h.a.createElement(T.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入文件地址"}]},h.a.createElement(I.a,{style:P})),h.a.createElement(U,{onFileChange:function(e){var t=e.target.files[0];a.current=t.name,H(t,o)}}))),h.a.createElement(T.a.Item,{label:"文件描述",name:"alt"},h.a.createElement(I.a,{style:{width:264}})),h.a.createElement(T.a.Item,{style:{textAlign:"right"}},h.a.createElement(A.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),h.a.createElement(A.a,{type:"ghost",onClick:n},"取消")))};function U(e){var t=e.onFileChange;return h.a.createElement("a",{className:"upload-button"},"本地上传",h.a.createElement("input",{type:"file",onChange:t}))}function H(e,t){if(!e)throw new String("没有文件");var n=new FormData;n.append("editormd-image-file",e),n.append("file_param_name","editormd-image-file"),n.append("byxhr","true");var r=new window.XMLHttpRequest;r.withCredentials=!0,r.addEventListener("load",(function(n){t(JSON.parse(n.target.responseText),e)}),!1),r.addEventListener("error",(function(e){console.error(e)}),!1),r.open("POST","".concat(j.a,"/api/attachments.json")),r.send(n)}n("giR+");var z,G,V=n("fyUT"),W=(n("7Kak"),n("9yH6")),K=W.a.Group,q={margin:"0 8px"},Y=function(e){var t=e.callback,n=e.onCancel;return h.a.createElement(T.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){t(e)}},h.a.createElement("div",{className:"flex-container"},h.a.createElement("span",{style:q},"单元格数:"),h.a.createElement("span",{style:q},"行数"),h.a.createElement(T.a.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}]},h.a.createElement(V.a,null)),h.a.createElement("span",{style:q},"列数"),h.a.createElement(T.a.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}]},h.a.createElement(V.a,null))),h.a.createElement("div",{className:"flex-container",style:{marginTop:12}},h.a.createElement("span",{style:q},"对齐方式:"),h.a.createElement(T.a.Item,{name:"align"},h.a.createElement(K,null,h.a.createElement(W.a,{value:"default"},h.a.createElement("i",{className:"fa fa-align-justify"})),h.a.createElement(W.a,{value:"left"},h.a.createElement("i",{className:"fa fa-align-left"})),h.a.createElement(W.a,{value:"center"},h.a.createElement("i",{className:"fa fa-align-center"})),h.a.createElement(W.a,{value:"right"},h.a.createElement("i",{className:"fa fa-align-right"}))))),h.a.createElement("div",{className:"flex-container flex-end"},h.a.createElement(A.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),h.a.createElement(A.a,{type:"ghost",onClick:n},"取消")))},Q=n("ErOA"),J=n("7Cbv"),X="------------",Z={default:X,left:":".concat(X),center:":".concat(X,":"),right:"".concat(X,":")},$=n("9VGf");function ee(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var te=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",ne=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],re=(z={},Object(l.a)(z,te+"-B","bold"),Object(l.a)(z,te+"-I","italic"),z),ie=(G={},Object(l.a)(G,"link","添加链接"),Object(l.a)(G,"code-block","添加代码块"),Object(l.a)(G,"upload-image","添加文件"),Object(l.a)(G,"add-table","添加表格"),G);t.a=function(e){var t=e.defaultValue,n=void 0===t?"":t,c=e.onChange,f=e.width,b=void 0===f?"100%":f,y=e.height,E=void 0===y?400:y,x=e.miniToolbar,_=void 0!==x&&x,w=e.isFocus,C=void 0!==w&&w,A=e.watch,T=e.insertTemp,I=e.mode,D=void 0===I?"markdown":I,N=e.id,j=void 0===N?"markdown-editor-id":N,M=e.showResizeBar,P=void 0!==M&&M,B=e.noStorage,U=void 0!==B&&B,z=e.showNullButton,G=void 0!==z&&z,V=e.hidetoolBar,W=void 0!==V&&V,K=e.fullScreen,q=void 0!==K&&K,X=e.onBlur,te=e.onCMBeforeChange,ae=e.onFullScreen,oe=e.className,se=void 0===oe?"":oe,le=e.disablePaste,ce=void 0!==le&&le,ue=e.placeholder,de=void 0===ue?"":ue,he=e.values,fe=void 0===he?"":he,pe=Object(d.useState)(null),me=Object(s.a)(pe,2),ge=me[0],ve=me[1],be=Object(d.useState)(n),ye=Object(s.a)(be,2),Ee=ye[0],xe=ye[1],_e=Object(d.useState)(A),ke=Object(s.a)(_e,2),we=ke[0],Ce=ke[1],Se=Object(d.useState)(q),Oe=Object(s.a)(Se,2),Ae=Oe[0],Te=Oe[1],Ie=Object(d.useState)(""),De=Object(s.a)(Ie,2),Le=De[0],Re=De[1],Ne=Object(d.useState)(0),je=Object(s.a)(Ne,2),Me=je[0],Pe=je[1],Be=Object(d.useState)(E),Fe=Object(s.a)(Be,2),Ue=Fe[0],He=Fe[1],ze=Object(d.useState)(!1),Ge=Object(s.a)(ze,2),Ve=(Ge[0],Ge[1]),We=Object(d.useRef)(Object(J.a)()),Ke=Object(d.useRef)(!1),qe=Object(d.useRef)(),Ye=Object(d.useRef)(),Qe=Object(d.useRef)(),Je=Object(d.useRef)(),Xe=Object(d.useRef)(),Ze=function(){var e=Object(o.a)(u.a.mark((function e(){var t,n;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Q.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:We.current}});case 2:null!=(n=e.sent)&&null!==(t=n.attachments)&&void 0!==t&&t.length&&(console.log("cm:",ge,Ye),n.attachments.map((function(e){e.content_type.indexOf("image")>-1?ge.replaceSelection(".concat(e.content_type,")")):e.content_type.indexOf("video")>-1?ge.replaceSelection('<video width="100%" controls src="'.concat(k.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):e.content_type.indexOf("pdf")>-1?ge.replaceSelection('<a href="'.concat(k.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,'&disposition=inline" target="_blank">').concat(e.name,"</a>")):ge.replaceSelection("[".concat(e.name,"](").concat(k.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")"))})));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Object(d.useEffect)((function(){xe(fe),null==ge||ge.setValue(fe)}),[fe]),Object(d.useEffect)((function(){null==ae||ae(Ae)}),[Ae]),Object(d.useEffect)((function(){if(Ye.current){var e=p.a.fromTextArea(Ye.current,{mode:D,lineNumbers:!_,lineWrapping:!0,value:n,autoCloseTags:!0,autoCloseBrackets:!0});function t(t,n){if(!ce){var r=n.clipboardData;if(r){var i=r.types.toString(),o=r.items;if("Files"===i||r.types.indexOf("Files")>-1){if(n.preventDefault(),"stex"==D)return;try{var s,l=o[1];"file"===(null===(s=o[0])||void 0===s?void 0:s.kind)&&(l=o[0]);var c=l.getAsFile(),u=c.name.split(".").pop();H(c,(function(t){var n,r,i;t.id?(null==c||null===(n=c.type)||void 0===n?void 0:n.indexOf("image"))>-1?e.replaceSelection(".concat(t.content_type,")")):(null==c||null===(r=c.type)||void 0===r?void 0:r.indexOf("video"))>-1?e.replaceSelection('<video width="100%" controls src="'.concat(k.a.API_SERVER,"/api/attachments/").concat(t.id,'"></video>')):(null==c||null===(i=c.type)||void 0===i?void 0:i.indexOf("pdf"))>-1?e.replaceSelection('<a href="'.concat(k.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(c.type,'&disposition=inline" target="_blank">').concat(c.name,"</a>")):ne.includes(u)?e.replaceSelection('<a href="'.concat(k.a.API_SERVER,"/api/attachments/").concat(t.id,'?type=office&disposition=inline" target="_blank">').concat(c.name,"</a>")):e.replaceSelection("[".concat(c.name,"](").concat(k.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(t.content_type,")")):401===(null==t?void 0:t.status)&&(document.location.href="/user/login")}))}catch(n){a.b.warn("请使用chrome浏览器粘贴")}return!0}return!0}return!0}n.preventDefault()}return C&&e.focus(),e.on("paste",t),e.on("dragleave",(function(e,t){Qe.current.classList.remove("mouse-hover-md")})),e.on("dragover",(function(e,t){Qe.current.classList.add("mouse-hover-md")})),e.on("drop",(function(t,n){var r;if(Qe.current.classList.add("mouse-hover-md"),(r=n.dataTransfer.files).length>0){n.preventDefault(),n.stopPropagation();for(var i=function(t){var n=r[t],i=n.name.split(".").pop();H(n,(function(t){var r,a,o;t.id?(null==n||null===(r=n.type)||void 0===r?void 0:r.indexOf("image"))>-1?e.replaceSelection(".concat(t.content_type,")")):(null==n||null===(a=n.type)||void 0===a?void 0:a.indexOf("video"))>-1?e.replaceSelection('<video width="100%" controls src="'.concat(k.a.API_SERVER,"/api/attachments/").concat(t.id,'"></video>')):(null==n||null===(o=n.type)||void 0===o?void 0:o.indexOf("pdf"))>-1?e.replaceSelection('<a href="'.concat(k.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(n.type,'&disposition=inline" target="_blank">').concat(n.name,"</a>")):ne.includes(i)?e.replaceSelection('<a href="'.concat(k.a.API_SERVER,"/api/attachments/").concat(t.id,'?type=office&disposition=inline" target="_blank">').concat(n.name,"</a>")):e.replaceSelection("[".concat(n.name,"](").concat(k.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(t.content_type,")")):401===(null==t?void 0:t.status)&&(document.location.href="/user/login")}))},a=0;a<r.length;a++)i(a)}})),ve(e),function(){e.off("paste",t)}}}),[]);var $e=Object(d.useCallback)((function(){Qe.current}),[Ue,Qe,Ae]);Object(d.useEffect)((function(){if(ge){var e=function(){var e=new m.default((function(e){var t,n=Object(i.a)(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;(r.target.offsetHeight>0||r.target.offsetWidth>0)&&($e(),ge.setSize("100%","100%"),ge.refresh())}}catch(e){n.e(e)}finally{n.f()}}));return e.observe(Ye.current.parentElement),e}();return function(){e.unobserve(Ye.current.parentElement)}}}),[ge,$e]),Object(d.useEffect)((function(){if(ge){for(var e=[],t=function(){var t=r[n],i=(a=Object(s.a)(t,2))[0],o=a[1],c=Object(l.a)({},i,(function(){et(o)}));e.push(c),ge.addKeyMap(c)},n=0,r=Object.entries(re);n<r.length;n++){var a;t()}return qe.current=setInterval((function(){Ke.current&&Ze()}),4e3),function(){clearInterval(qe.current);var t,n=Object(i.a)(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;ge.removeKeyMap(r)}}catch(e){n.e(e)}finally{n.f()}}}}),[ge]),Object(d.useEffect)((function(){q!==Ae&&Te(q)}),[q]),Object($.a)((function(){if(!U&&Me>0){var e=(new Date).getTime(),t=window.sessionStorage.getItem(j);e>=Me+1e4&&(!t||t!==Ee)&&(window.sessionStorage.setItem(j,Ee),Ve(!0))}}),1e4),Object(d.useEffect)((function(){Ce(A)}),[ge,A]),Object(d.useEffect)((function(){ge&&C&&ge.focus()}),[ge,C]),Object(d.useEffect)((function(){if(we&&ge){var e=ge.getScrollerElement();function t(e){var t=e.target;if(Xe.current){var n=t.scrollTop/t.scrollHeight;Xe.current.scrollTop=Xe.current.scrollHeight*n}}return e.addEventListener("scroll",t),function(){e.removeEventListener("scroll",t)}}}),[ge,we]),Object(d.useEffect)((function(){if(ge&&te){function e(e,t){te(e,t)}return ge.on("beforeChange",e),function(){ge.off("beforeChange",e)}}}),[ge,te]),Object(d.useEffect)((function(){if(ge&&X){function e(){X(ge.getValue())}return ge.on("blur",e),function(){ge.off("blur",e)}}}),[ge,X]),Object(d.useEffect)((function(){if(ge){function e(e){var t=e.getValue();xe(t),Pe((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),c&&c(t)}return ge.on("change",e),function(){ge.off("change",e)}}}),[ge,c]),Object(d.useEffect)((function(){ge&&(null==n?(ge.setValue(""),xe("")):n!==ge.getValue()&&(ge.setValue(n),xe(n),ge.setCursor(ge.lineCount(),0)))}),[ge,n]);var et=Object(d.useCallback)((function(e){var t=ge.getCursor(),n=ge.getSelection(),r=n.split("\n");switch(e){case"bold":return ge.replaceSelection("**"+n+"**"),""===n&&ge.setCursor(t.line,t.ch+2),ge.focus();case"italic":return ge.replaceSelection("*"+n+"*"),""===n&&ge.setCursor(t.line,t.ch+1),ge.focus();case"code":return ge.replaceSelection("`"+n+"`"),""===n&&ge.setCursor(t.line,t.ch+1),ge.focus();case"inline-latex":return ge.replaceSelection("`$$"+n+"$$`"),""===n&&ge.setCursor(t.line,t.ch+3),ge.focus();case"latex":return ge.replaceSelection("```latex\n"+n+"\n```"),ge.setCursor(t.line+1,n.length+1),ge.focus();case"line-break":return ge.replaceSelection("<br/>\n"),ge.focus();case"list-ul":return""===n?ge.replaceSelection("- "+n):ge.replaceSelection(r.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),ge.focus();case"list-ol":return""===n?ge.replaceSelection("1. "+n):ge.replaceSelection(r.map((function(e,t){return""===e?"":"".concat(t+1,". ").concat(e)})).join("\n")),ge.focus();case"add-null-ch":return""===n&&ge.setCursor(t.line,t.ch+1),ge.replaceSelection("▁"),ge.focus();case"inster-template-1":return""===n&&ge.setCursor(t.line,t.ch),ge.replaceSelection("\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作"),ge.focus();case"eraser":return ge.setValue(""),ge.focus();case"trigger-watch":return Ce(!we),ge.focus();case"trigger-full-screen":return Te(!Ae),ge.focus();case"link":return void Re("link");case"code-block":return void Re("code-block");case"upload-image":return void Re("upload-image");case"add-table":return void Re("add-table");default:throw new Error}}),[ge,we,Ae]),tt=Object(d.useCallback)((function(e){switch(Re(""),Le){case"link":var t=e.title,n=e.link;return ge.replaceSelection("[".concat(t,"](").concat(n,")")),ge.focus();case"code-block":var r=e.language,i=e.content;return ge.replaceSelection(["```"+r,i,"```"].join("\n")),ge.focus();case"upload-image":var a=e.src,o=e.alt,s=e.name;return a.indexOf("type=image")>-1?ge.replaceSelection(".concat(a,' "').concat(o||"",'" )')):a.indexOf("type=application/pdf")>-1?ge.replaceSelection('<a href="'.concat(a,'&disposition=inline" target="_blank">').concat(s,"</a>")):ge.replaceSelection('<a href="'.concat(a,'" target="_blank">').concat(s,"</a>")),ge.focus();case"add-table":for(var l=e.row,c=e.col,u=e.align,d="\n",h=0;h<l;h++){for(var f=[],p=[],m=0;m<c;m++)1===h&&p.push(Z[u]),f.push(" ");1===h&&(d+="| ".concat(p.join(" | ")," |\n")),d+="| ".concat(f.join(1===c?"":" | ")," |\n")}return ge.replaceSelection(d+"\n"),ge.focus();default:throw new Error}}),[ge,Le]),nt=Object(d.useMemo)((function(){switch(Le){case"link":return h.a.createElement(L,{callback:tt,onCancel:rt});case"code-block":return h.a.createElement(R.b,{callback:tt,onCancel:rt});case"upload-image":return h.a.createElement(F,{callback:tt,onCancel:rt});case"add-table":return h.a.createElement(Y,{callback:tt,onCancel:rt});default:return null}}),[Le]);function rt(){Re("")}Object(d.useEffect)((function(){if(Je.current){var e=Je.current,t=!1,n=0;function r(e){t=!0,n=e.pageY}function i(){t=!1}function a(e){if(t){var r=e.pageY-n;r<0&&(r=0),r>300&&(r=300),He(E+r+"px")}}return e.addEventListener("mousedown",r),document.addEventListener("mousemove",a),document.addEventListener("mouseup",i),function(){e.removeEventListener("mousedown",r),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",i)}}}),[ge,Je]),Object(d.useEffect)((function(){He(E)}),[E]);var it={width:ee(b),height:ee(Ue)};Object(d.useMemo)((function(){if(Me){var e=new Date(Me),t=e.getHours(),n=e.getMinutes(),r=e.getSeconds();return n=n<10?"0"+n:n,r=r<10?"0"+r:r,"".concat(t=t<10?"0"+t:t,":").concat(n,":").concat(r)}return 0}),[Me]);return h.a.createElement(d.Fragment,null,h.a.createElement("div",{className:"markdown-editor-wrapper",ref:Qe},h.a.createElement("div",{className:"markdown-editor-container ".concat(se," ").concat(we?"on-preview":""," ").concat(_?"mini":""," ").concat(Ae?"full-screen":""),style:it},h.a.createElement(S,{insertTemp:T,watch:we,fullScreen:Ae,showNullButton:G,onActionCallback:et,hidetoolBar:W,uuid:We.current,setOpenPhones:function(){Ke.current=!0}}),h.a.createElement("div",{className:"markdown-editor-body"},h.a.createElement("div",{className:"codemirror-container"},h.a.createElement("textarea",{ref:Ye,placeholder:de})),we?h.a.createElement("div",{ref:Xe,className:"preview-container"},"stex"===D&&h.a.createElement(v,{value:Ee}),"stex"!==D&&h.a.createElement(g.a,{edit:!0,value:Ee,replaces:function(e,t){var n=ge.getValue();n=n.replace(e,t),xe(n),null==ge||ge.setValue(n)}})):null))),P?h.a.createElement("a",{ref:Je,className:"editor-resize"}):null,h.a.createElement(O.a,null,ie[Le]?h.a.createElement(r.a,{centered:!0,title:ie[Le],visible:!0,onCancel:rt,footer:null},nt):null))}},P47w:
|
|
|
/*!*************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/svg/graphic.js ***!
|
|
|
\*************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./core */"hydK").createElement,i=n(/*! ../core/PathProxy */"IMiH"),a=n(/*! ../core/BoundingRect */"mFDi"),o=n(/*! ../core/matrix */"Fofx"),s=n(/*! ../contain/text */"6GrX"),l=n(/*! ../graphic/helper/text */"pzxd"),c=n(/*! ../graphic/Text */"dqUG"),u=i.CMD,d=Array.prototype.join,h=Math.round,f=Math.sin,p=Math.cos,m=Math.PI,g=2*Math.PI,v=180/m;function b(e){return h(1e4*e)/1e4}function y(e){return e<1e-4&&e>-1e-4}function E(e,t){t&&x(e,"transform","matrix("+d.call(t,",")+")")}function x(e,t,n){(!n||"linear"!==n.type&&"radial"!==n.type)&&e.setAttribute(t,n)}function _(e,t,n,r){if(function(e,t){var n=t?e.textFill:e.fill;return null!=n&&"none"!==n}(t,n)){var i=n?t.textFill:t.fill;x(e,"fill",i="transparent"===i?"none":i),x(e,"fill-opacity",null!=t.fillOpacity?t.fillOpacity*t.opacity:t.opacity)}else x(e,"fill","none");if(function(e,t){var n=t?e.textStroke:e.stroke;return null!=n&&"none"!==n}(t,n)){var a=n?t.textStroke:t.stroke;x(e,"stroke",a="transparent"===a?"none":a),x(e,"stroke-width",(n?t.textStrokeWidth:t.lineWidth)/(!n&&t.strokeNoScale?r.getLineScale():1)),x(e,"paint-order",n?"stroke":"fill"),x(e,"stroke-opacity",null!=t.strokeOpacity?t.strokeOpacity:t.opacity),t.lineDash?(x(e,"stroke-dasharray",t.lineDash.join(",")),x(e,"stroke-dashoffset",h(t.lineDashOffset||0))):x(e,"stroke-dasharray",""),t.lineCap&&x(e,"stroke-linecap",t.lineCap),t.lineJoin&&x(e,"stroke-linejoin",t.lineJoin),t.miterLimit&&x(e,"stroke-miterlimit",t.miterLimit)}else x(e,"stroke","none")}var k={};k.brush=function(e){var t=e.style,n=e.__svgEl;n||(n=r("path"),e.__svgEl=n),e.path||e.createPathProxy();var i=e.path;if(e.__dirtyPath){i.beginPath(),i.subPixelOptimize=!1,e.buildPath(i,e.shape),e.__dirtyPath=!1;var a=function(e){for(var t=[],n=e.data,r=e.len(),i=0;i<r;){var a="",o=0;switch(n[i++]){case u.M:a="M",o=2;break;case u.L:a="L",o=2;break;case u.Q:a="Q",o=4;break;case u.C:a="C",o=6;break;case u.A:var s=n[i++],l=n[i++],c=n[i++],d=n[i++],E=n[i++],x=n[i++],_=n[i++],k=n[i++],w=Math.abs(x),C=y(w-g)||(k?x>=g:-x>=g),S=x>0?x%g:x%g+g,O=!1;O=!!C||!y(w)&&S>=m==!!k;var A=b(s+c*p(E)),T=b(l+d*f(E));C&&(x=k?g-1e-4:1e-4-g,O=!0,9===i&&t.push("M",A,T));var I=b(s+c*p(E+x)),D=b(l+d*f(E+x));t.push("A",b(c),b(d),h(_*v),+O,+k,I,D);break;case u.Z:a="Z";break;case u.R:I=b(n[i++]),D=b(n[i++]);var L=b(n[i++]),R=b(n[i++]);t.push("M",I,D,"L",I+L,D,"L",I+L,D+R,"L",I,D+R,"L",I,D)}a&&t.push(a);for(var N=0;N<o;N++)t.push(b(n[i++]))}return t.join(" ")}(i);a.indexOf("NaN")<0&&x(n,"d",a)}_(n,t,!1,e),E(n,e.transform),null!=t.text?I(e,e.getBoundingRect()):L(e)};var w={brush:function(e){var t=e.style,n=t.image;n instanceof HTMLImageElement&&(n=n.src);if(n){var i=t.x||0,a=t.y||0,o=t.width,s=t.height,l=e.__svgEl;l||(l=r("image"),e.__svgEl=l),n!==e.__imageSrc&&(!function(e,t,n){e.setAttributeNS("http://www.w3.org/1999/xlink",t,n)}(l,"href",n),e.__imageSrc=n),x(l,"width",o),x(l,"height",s),x(l,"x",i),x(l,"y",a),E(l,e.transform),null!=t.text?I(e,e.getBoundingRect()):L(e)}}},C={},S=new a,O={},A=[],T={left:"start",right:"end",center:"middle",middle:"middle"},I=function(e,t){var n=e.style,i=e.transform,a=e instanceof c||n.transformText;e.__dirty&&l.normalizeTextStyle(n,!0);var u=n.text;if(null!=u&&(u+=""),l.needDrawText(u,n)){null==u&&(u=""),!a&&i&&(S.copy(t),S.applyTransform(i),t=S);var d=e.__textSvgEl;d||(d=r("text"),e.__textSvgEl=d);var h=d.style,f=n.font||s.DEFAULT_FONT,p=d.__computedFont;f!==d.__styleFont&&(h.font=d.__styleFont=f,p=d.__computedFont=h.font);var m=n.textPadding,g=n.textLineHeight,v=e.__textCotentBlock;v&&!e.__dirtyText||(v=e.__textCotentBlock=s.parsePlainText(u,p,m,g,n.truncate));var b=v.outerHeight,y=v.lineHeight;l.getBoxPosition(O,e,n,t);var x=O.baseX,k=O.baseY,w=O.textAlign||"left",C=O.textVerticalAlign;!function(e,t,n,r,i,a,s){o.identity(A),t&&n&&o.copy(A,n);var l=r.textRotation;if(i&&l){var c=r.textOrigin;"center"===c?(a=i.width/2+i.x,s=i.height/2+i.y):c&&(a=c[0]+i.x,s=c[1]+i.y),A[4]-=a,A[5]-=s,o.rotate(A,A,l),A[4]+=a,A[5]+=s}E(e,A)}(d,a,i,n,t,x,k);var T=x,I=s.adjustTextY(k,b,C);m&&(T=function(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}(x,w,m),I+=m[0]),I+=y/2,_(d,n,!0,e);var L=v.canCacheByTextString,R=e.__tspanList||(e.__tspanList=[]),N=R.length;if(L&&e.__canCacheByTextString&&e.__text===u){if(e.__dirtyText&&N)for(var j=0;j<N;++j)D(R[j],w,T,I+j*y)}else{e.__text=u,e.__canCacheByTextString=L;var M=v.lines,P=M.length;for(j=0;j<P;j++){var B=R[j],F=M[j];B?B.__zrText!==F&&(B.innerHTML="",B.appendChild(document.createTextNode(F))):(B=R[j]=r("tspan"),d.appendChild(B),B.appendChild(document.createTextNode(F))),D(B,w,T,I+j*y)}if(N>P){for(;j<N;j++)d.removeChild(R[j]);R.length=P}}}};function D(e,t,n,r){x(e,"dominant-baseline","middle"),x(e,"text-anchor",T[t]),x(e,"x",n),x(e,"y",r)}function L(e){e&&e.__textSvgEl&&(e.__textSvgEl.parentNode&&e.__textSvgEl.parentNode.removeChild(e.__textSvgEl),e.__textSvgEl=null,e.__tspanList=[],e.__text=null)}C.drawRectText=I,C.brush=function(e){null!=e.style.text?I(e,!1):L(e)},t.path=k,t.image=w,t.text=C},P4Qj:
|
|
|
/*!****************************************************!*\
|
|
|
!*** ./node_modules/size-sensor/lib/sensorPool.js ***!
|
|
|
\****************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeSensor=t.getSensor=void 0;var r,i=(r=n(/*! ./id */"chpo"))&&r.__esModule?r:{default:r},a=n(/*! ./sensors */"FxDU"),o=n(/*! ./constant */"24YM");var s={};t.getSensor=function(e){var t=e.getAttribute(o.SizeSensorId);if(t&&s[t])return s[t];var n=(0,i.default)();e.setAttribute(o.SizeSensorId,n);var r=(0,a.createSensor)(e);return s[n]=r,r};t.removeSensor=function(e){var t=e.element.getAttribute(o.SizeSensorId);e.element.removeAttribute(o.SizeSensorId),e.destroy(),t&&s[t]&&delete s[t]}},PGNT:
|
|
|
/*!********************************************************************************************************!*\
|
|
|
!*** ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepPreview/components/editor.less?modules ***!
|
|
|
\********************************************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={wrap:"wrap___orWmH",modal:"modal___142IN",titleWrap:"titleWrap___2UWGN",required:"required___lXOtq",title:"title___2wqMf",colorGray:"colorGray___3FkLm",choiceWrap:"choiceWrap___3pbic",answer:"answer___30LSv",activeAnswer:"activeAnswer___3ayAN",deleteIcon:"deleteIcon___2HHly",addIcon:"addIcon___29vcx",editorWrap:"editorWrap___ANVP6",htmlWrap:"htmlWrap___38sLf",radio:"radio___15wok",color333:"color333___sNPjh",color999:"color999___1ofkl",fold:"fold___6rnoE",head:"head___2muph"}},PsQE:
|
|
|
/*!********************************************************************************************!*\
|
|
|
!*** ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepPreview/index.less?modules ***!
|
|
|
\********************************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___2PkN_",flex_space_between:"flex_space_between___36cDA",flex_box_vertical_center:"flex_box_vertical_center___2c88u",flex_box_center_end:"flex_box_center_end___14cXO",flex_box_column:"flex_box_column___3nalt",wrap:"wrap___3xZrs",left:"left___19hOK",title:"title___3Ti2k",total:"total___3MRC5",list:"list___3pdfL",name:"name___2IcTs",b:"b___2W0Sn",r:"r___2Tpj8",l:"l___1rMKQ",tag:"tag___jj2X5",right:"right___16831",examName:"examName___2TmgX",t:"t___1CJZd",num:"num___1qX6C",topWarp:"topWarp___3WuSr",head:"head___3z9Hq",so:"so___m2B6Z",btn:"btn___20VL7",content:"content___2tTuo",titleWrap:"titleWrap___1cYdQ",single:"single___1BKtz",analysis:"analysis___1qm4Y",text:"text___1JQUf",btnsElse:"btnsElse___2IzAs",btnsWrap:"btnsWrap___3ib37",btns:"btns___2DbBT",modalColumn:"modalColumn___1zs36",modalRow:"modalRow___14b2N",sup:"sup___1CIjI",popover:"popover___Mmcvb"}},QBsz:
|
|
|
/*!*************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/core/vector.js ***!
|
|
|
\*************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n="undefined"==typeof Float32Array?Array:Float32Array;function r(e){return Math.sqrt(a(e))}var i=r;function a(e){return e[0]*e[0]+e[1]*e[1]}var o=a;function s(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var l=s;function c(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var u=c;t.create=function(e,t){var r=new n(2);return null==e&&(e=0),null==t&&(t=0),r[0]=e,r[1]=t,r},t.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e},t.clone=function(e){var t=new n(2);return t[0]=e[0],t[1]=e[1],t},t.set=function(e,t,n){return e[0]=t,e[1]=n,e},t.add=function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e},t.scaleAndAdd=function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e},t.sub=function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e},t.len=r,t.length=i,t.lenSquare=a,t.lengthSquare=o,t.mul=function(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e},t.div=function(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e},t.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]},t.scale=function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e},t.normalize=function(e,t){var n=r(t);return 0===n?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e},t.distance=s,t.dist=l,t.distanceSquare=c,t.distSquare=u,t.negate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e},t.lerp=function(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e},t.applyTransform=function(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e},t.min=function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e},t.max=function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}},"QO+J":
|
|
|
/*!********************************************************!*\
|
|
|
!*** ./node_modules/size-sensor/lib/sensors/object.js ***!
|
|
|
\********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSensor=void 0;var r,i=(r=n(/*! ../debounce */"NohK"))&&r.__esModule?r:{default:r},a=n(/*! ../constant */"24YM");t.createSensor=function(e){var t=void 0,n=[],r=(0,i.default)((function(){n.forEach((function(t){t(e)}))})),o=function(){t&&t.parentNode&&(t.contentDocument&&t.contentDocument.defaultView.removeEventListener("resize",r),t.parentNode.removeChild(t),t=void 0,n=[])};return{element:e,bind:function(i){t||(t=function(){"static"===getComputedStyle(e).position&&(e.style.position="relative");var t=document.createElement("object");return t.onload=function(){t.contentDocument.defaultView.addEventListener("resize",r),r()},t.style.display="block",t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.height="100%",t.style.width="100%",t.style.overflow="hidden",t.style.pointerEvents="none",t.style.zIndex="-1",t.style.opacity="0",t.setAttribute("class",a.SensorClassName),t.setAttribute("tabindex",a.SensorTabIndex),t.type="text/html",e.appendChild(t),t.data="about:blank",t}()),-1===n.indexOf(i)&&n.push(i)},destroy:o,unbind:function(e){var r=n.indexOf(e);-1!==r&&n.splice(r,1),0===n.length&&t&&o()}}}},Qe9p:
|
|
|
/*!************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/tool/color.js ***!
|
|
|
\************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/LRU */"1RvN"),i={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function a(e){return(e=Math.round(e))<0?0:e>255?255:e}function o(e){return e<0?0:e>1?1:e}function s(e){return e.length&&"%"===e.charAt(e.length-1)?a(parseFloat(e)/100*255):a(parseInt(e,10))}function l(e){return e.length&&"%"===e.charAt(e.length-1)?o(parseFloat(e)/100):o(parseFloat(e))}function c(e,t,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function u(e,t,n){return e+(t-e)*n}function d(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function h(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var f=new r(20),p=null;function m(e,t){p&&h(p,t),p=f.put(e,p||t.slice())}function g(e,t){if(e){t=t||[];var n=f.get(e);if(n)return h(t,n);var r,a=(e+="").replace(/ /g,"").toLowerCase();if(a in i)return h(t,i[a]),m(e,t),t;if("#"===a.charAt(0))return 4===a.length?(r=parseInt(a.substr(1),16))>=0&&r<=4095?(d(t,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,1),m(e,t),t):void d(t,0,0,0,1):7===a.length?(r=parseInt(a.substr(1),16))>=0&&r<=16777215?(d(t,(16711680&r)>>16,(65280&r)>>8,255&r,1),m(e,t),t):void d(t,0,0,0,1):void 0;var o=a.indexOf("("),c=a.indexOf(")");if(-1!==o&&c+1===a.length){var u=a.substr(0,o),p=a.substr(o+1,c-(o+1)).split(","),g=1;switch(u){case"rgba":if(4!==p.length)return void d(t,0,0,0,1);g=l(p.pop());case"rgb":return 3!==p.length?void d(t,0,0,0,1):(d(t,s(p[0]),s(p[1]),s(p[2]),g),m(e,t),t);case"hsla":return 4!==p.length?void d(t,0,0,0,1):(p[3]=l(p[3]),v(p,t),m(e,t),t);case"hsl":return 3!==p.length?void d(t,0,0,0,1):(v(p,t),m(e,t),t);default:return}}d(t,0,0,0,1)}}function v(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=l(e[1]),i=l(e[2]),o=i<=.5?i*(r+1):i+r-i*r,s=2*i-o;return d(t=t||[],a(255*c(s,o,n+1/3)),a(255*c(s,o,n)),a(255*c(s,o,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function b(e,t,n){if(t&&t.length&&e>=0&&e<=1){n=n||[];var r=e*(t.length-1),i=Math.floor(r),s=Math.ceil(r),l=t[i],c=t[s],d=r-i;return n[0]=a(u(l[0],c[0],d)),n[1]=a(u(l[1],c[1],d)),n[2]=a(u(l[2],c[2],d)),n[3]=o(u(l[3],c[3],d)),n}}var y=b;function E(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),i=Math.floor(r),s=Math.ceil(r),l=g(t[i]),c=g(t[s]),d=r-i,h=_([a(u(l[0],c[0],d)),a(u(l[1],c[1],d)),a(u(l[2],c[2],d)),o(u(l[3],c[3],d))],"rgba");return n?{color:h,leftIndex:i,rightIndex:s,value:r}:h}}var x=E;function _(e,t){if(e&&e.length){var n=e[0]+","+e[1]+","+e[2];return"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(n+=","+e[3]),t+"("+n+")"}}t.parse=g,t.lift=function(e,t){var n=g(e);if(n){for(var r=0;r<3;r++)n[r]=t<0?n[r]*(1-t)|0:(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:e[r]<0&&(n[r]=0);return _(n,4===n.length?"rgba":"rgb")}},t.toHex=function(e){var t=g(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)},t.fastLerp=b,t.fastMapToColor=y,t.lerp=E,t.mapToColor=x,t.modifyHSL=function(e,t,n,r){if(e=g(e))return e=function(e){if(e){var t,n,r=e[0]/255,i=e[1]/255,a=e[2]/255,o=Math.min(r,i,a),s=Math.max(r,i,a),l=s-o,c=(s+o)/2;if(0===l)t=0,n=0;else{n=c<.5?l/(s+o):l/(2-s-o);var u=((s-r)/6+l/2)/l,d=((s-i)/6+l/2)/l,h=((s-a)/6+l/2)/l;r===s?t=h-d:i===s?t=1/3+u-h:a===s&&(t=2/3+d-u),t<0&&(t+=1),t>1&&(t-=1)}var f=[360*t,n,c];return null!=e[3]&&f.push(e[3]),f}}(e),null!=t&&(e[0]=(i=t,(i=Math.round(i))<0?0:i>360?360:i)),null!=n&&(e[1]=l(n)),null!=r&&(e[2]=l(r)),_(v(e),"rgba");var i},t.modifyAlpha=function(e,t){if((e=g(e))&&null!=t)return e[3]=o(t),_(e,"rgba")},t.stringify=_},QuXc:
|
|
|
/*!******************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/Gradient.js ***!
|
|
|
\******************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=function(e){this.colorStops=e||[]};n.prototype={constructor:n,addColorStop:function(e,t){this.colorStops.push({offset:e,color:t})}};var r=n;e.exports=r},RDYZ:
|
|
|
/*!****************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/animation/Clip.js ***!
|
|
|
\****************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./easing */"dMvE");function i(e){this._target=e.target,this._life=e.life||1e3,this._delay=e.delay||0,this._initialized=!1,this.loop=null!=e.loop&&e.loop,this.gap=e.gap||0,this.easing=e.easing||"Linear",this.onframe=e.onframe,this.ondestroy=e.ondestroy,this.onrestart=e.onrestart,this._pausedTime=0,this._paused=!1}i.prototype={constructor:i,step:function(e,t){if(this._initialized||(this._startTime=e+this._delay,this._initialized=!0),this._paused)this._pausedTime+=t;else{var n=(e-this._startTime-this._pausedTime)/this._life;if(!(n<0)){n=Math.min(n,1);var i=this.easing,a="string"==typeof i?r[i]:i,o="function"==typeof a?a(n):n;return this.fire("frame",o),1===n?this.loop?(this.restart(e),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(e){var t=(e-this._startTime-this._pausedTime)%this._life;this._startTime=e-t+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(e,t){this[e="on"+e]&&this[e](this._target,t)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var a=i;e.exports=a},RMFE:
|
|
|
/*!**********************************!*\
|
|
|
!*** ./src/assets/images/hb.png ***!
|
|
|
\**********************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAAFyCAYAAADYqEAoAAAAAXNSR0IArs4c6QAADetJREFUeAHt1jFqXUEQRUHLaP9b/jZObmYU9MAJSlGDxNBUPw76+vz9+eWHAAECBHICv3MbWYgAAQIE/gkItA+BAAECUQGBjh7GWgQIEBBo3wABAgSiAgIdPYy1CBAgINC+AQIECEQFBDp6GGsRIEBAoH0DBAgQiAoIdPQw1iJAgIBA+wYIECAQFRDo6GGsRYAAAYH2DRAgQCAqINDRw1iLAAECAu0bIECAQFRAoKOHsRYBAgQE2jdAgACBqIBARw9jLQIECAi0b4AAAQJRAYGOHsZaBAgQEGjfAAECBKICAh09jLUIECAg0L4BAgQIRAUEOnoYaxEgQECgfQMECBCICgh09DDWIkCAgED7BggQIBAVEOjoYaxFgAABgfYNECBAICog0NHDWIsAAQIC7RsgQIBAVECgo4exFgECBATaN0CAAIGogEBHD2MtAgQICLRvgAABAlEBgY4exloECBAQaN8AAQIEogICHT2MtQgQICDQvgECBAhEBQQ6ehhrESBAQKB9AwQIEIgKCHT0MNYiQICAQPsGCBAgEBUQ6OhhrEWAAAGB9g0QIEAgKiDQ0cNYiwABAgLtGyBAgEBUQKCjh7EWAQIEBNo3QIAAgaiAQEcPYy0CBAh8/5Tg6+vrp3/q7wgQIEDgPwKfz+c/v92v/Ac9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICXz/dJvP5/PTP/V3BAgQIHAg4D/oA0RPECBA4IWAQL9Q9SYBAgQOBAT6ANETBAgQeCEg0C9UvUmAAIEDAYE+QPQEAQIEXggI9AtVbxIgQOBAQKAPED1BgACBFwIC/ULVmwQIEDgQEOgDRE8QIEDghYBAv1D1JgECBA4EBPoA0RMECBB4ISDQL1S9SYAAgQMBgT5A9AQBAgReCAj0C1VvEiBA4EBAoA8QPUGAAIEXAgL9QtWbBAgQOBAQ6ANETxAgQOCFgEC/UPUmAQIEDgQE+gDREwQIEHghINAvVL1JgACBAwGBPkD0BAECBF4ICPQLVW8SIEDgQECgDxA9QYAAgRcCAv1C1ZsECBA4EBDoA0RPECBA4IWAQL9Q9SYBAgQOBAT6ANETBAgQeCEg0C9UvUmAAIEDAYE+QPQEAQIEXggI9AtVbxIgQOBAQKAPED1BgACBFwIC/ULVmwQIEDgQEOgDRE8QIEDghYBAv1D1JgECBA4EBPoA0RMECBB4ISDQL1S9SYAAgQMBgT5A9AQBAgReCAj0C1VvEiBA4EBAoA8QPUGAAIEXAgL9QtWbBAgQOBAQ6ANETxAgQOCFgEC/UPUmAQIEDgQE+gDREwQIEHghINAvVL1JgACBAwGBPkD0BAECBF4ICPQLVW8SIEDgQECgDxA9QYAAgRcCAv1C1ZsECBA4EBDoA0RPECBA4IXAH7PYDOHnuk1pAAAAAElFTkSuQmCC"},RXMa:
|
|
|
/*!********************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/shape/Ring.js ***!
|
|
|
\********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../Path */"y+Vt").extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=2*Math.PI;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)}});e.exports=r},"RZ/O":
|
|
|
/*!****************************************!*\
|
|
|
!*** ./src/assets/images/paper/bi.svg ***!
|
|
|
\****************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/bi.9c9b0364.svg"},RotF:
|
|
|
/*!*******************************************************!*\
|
|
|
!*** ./node_modules/react-infinite-scroller/index.js ***!
|
|
|
\*******************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n(/*! ./dist/InfiniteScroll */"LSTS")},"SA+Z":
|
|
|
/*!********************************************************!*\
|
|
|
!*** ./node_modules/@babel/runtime/helpers/toArray.js ***!
|
|
|
\********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./arrayWithHoles.js */"wTVA"),i=n(/*! ./iterableToArray.js */"EbDI"),a=n(/*! ./unsupportedIterableToArray.js */"ZhPi"),o=n(/*! ./nonIterableRest.js */"wkBT");e.exports=function(e){return r(e)||i(e)||a(e)||o()},e.exports.__esModule=!0,e.exports.default=e.exports},SJMd:
|
|
|
/*!****************************************************!*\
|
|
|
!*** ./node_modules/code-prettify/src/prettify.js ***!
|
|
|
\****************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){window.PR_SHOULD_USE_CONTINUATION=!0,function(){var e=window,t=["break,continue,do,else,for,if,return,while"],n=[[t,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],r=[n,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],i=[n,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],a=[n,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],o=[n,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",l=[t,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],c=[t,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],u=[t,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],d=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/;function h(e,t,n,r,i){if(n){var a={sourceNode:e,pre:1,langExtension:null,numberLines:null,sourceCode:n,spans:null,basePos:t,decorations:null};r(a),i.push.apply(i,a.decorations)}}var f=/\S/;function p(e){for(var t=void 0,n=e.firstChild;n;n=n.nextSibling){var r=n.nodeType;t=1===r?t?e:n:3===r&&f.test(n.nodeValue)?e:t}return t===e?void 0:t}function m(e,t){var n,r={};!function(){for(var i=e.concat(t),a=[],o={},s=0,l=i.length;s<l;++s){var c=i[s],u=c[3];if(u)for(var d=u.length;--d>=0;)r[u.charAt(d)]=c;var h=c[1],f=""+h;o.hasOwnProperty(f)||(a.push(h),o[f]=null)}a.push(/[\0-\uffff]/),n=function(e){for(var t=0,n=!1,r=!1,i=0,a=e.length;i<a;++i){if((h=e[i]).ignoreCase)r=!0;else if(/[a-z]/i.test(h.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){n=!0,r=!1;break}}var o={b:8,t:9,n:10,v:11,f:12,r:13};function s(e){var t=e.charCodeAt(0);if(92!==t)return t;var n=e.charAt(1);return(t=o[n])||("0"<=n&&n<="7"?parseInt(e.substring(1),8):"u"===n||"x"===n?parseInt(e.substring(2),16):e.charCodeAt(1))}function l(e){if(e<32)return(e<16?"\\x0":"\\x")+e.toString(16);var t=String.fromCharCode(e);return"\\"===t||"-"===t||"]"===t||"^"===t?"\\"+t:t}function c(e){var t=e.substring(1,e.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),n=[],r="^"===t[0],i=["["];r&&i.push("^");for(var a=r?1:0,o=t.length;a<o;++a){var c=t[a];if(/\\[bdsw]/i.test(c))i.push(c);else{var u,d=s(c);a+2<o&&"-"===t[a+1]?(u=s(t[a+2]),a+=2):u=d,n.push([d,u]),u<65||d>122||(u<65||d>90||n.push([32|Math.max(65,d),32|Math.min(u,90)]),u<97||d>122||n.push([-33&Math.max(97,d),-33&Math.min(u,122)]))}}n.sort((function(e,t){return e[0]-t[0]||t[1]-e[1]}));var h=[],f=[];for(a=0;a<n.length;++a){(p=n[a])[0]<=f[1]+1?f[1]=Math.max(f[1],p[1]):h.push(f=p)}for(a=0;a<h.length;++a){var p=h[a];i.push(l(p[0])),p[1]>p[0]&&(p[1]+1>p[0]&&i.push("-"),i.push(l(p[1])))}return i.push("]"),i.join("")}function u(e){for(var r=e.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),i=r.length,a=[],o=0,s=0;o<i;++o){if("("===(d=r[o]))++s;else if("\\"===d.charAt(0)){(u=+d.substring(1))&&(u<=s?a[u]=-1:r[o]=l(u))}}for(o=1;o<a.length;++o)-1===a[o]&&(a[o]=++t);for(o=0,s=0;o<i;++o){if("("===(d=r[o]))a[++s]||(r[o]="(?:");else if("\\"===d.charAt(0)){var u;(u=+d.substring(1))&&u<=s&&(r[o]="\\"+a[u])}}for(o=0;o<i;++o)"^"===r[o]&&"^"!==r[o+1]&&(r[o]="");if(e.ignoreCase&&n)for(o=0;o<i;++o){var d,h=(d=r[o]).charAt(0);d.length>=2&&"["===h?r[o]=c(d):"\\"!==h&&(r[o]=d.replace(/[a-zA-Z]/g,(function(e){var t=e.charCodeAt(0);return"["+String.fromCharCode(-33&t,32|t)+"]"})))}return r.join("")}var d=[];for(i=0,a=e.length;i<a;++i){var h;if((h=e[i]).global||h.multiline)throw new Error(""+h);d.push("(?:"+u(h)+")")}return new RegExp(d.join("|"),r?"gi":"g")}(a)}();var i=t.length,a=function(e){for(var o=e.sourceCode,s=e.basePos,l=e.sourceNode,c=[s,"pln"],u=0,d=o.match(n)||[],f={},p=0,m=d.length;p<m;++p){var g,v=d[p],b=f[v],y=void 0;if("string"==typeof b)g=!1;else{var E=r[v.charAt(0)];if(E)y=v.match(E[1]),b=E[0];else{for(var _=0;_<i;++_)if(E=t[_],y=v.match(E[1])){b=E[0];break}y||(b="pln")}!(g=b.length>=5&&"lang-"===b.substring(0,5))||y&&"string"==typeof y[1]||(g=!1,b="src"),g||(f[v]=b)}var k=u;if(u+=v.length,g){var w=y[1],C=v.indexOf(w),S=C+w.length;y[2]&&(C=(S=v.length-y[2].length)-w.length);var O=b.substring(5);h(l,s+k,v.substring(0,C),a,c),h(l,s+k+C,w,x(O,w),c),h(l,s+k+S,v.substring(S),a,c)}else c.push(s+k,b)}e.decorations=c};return a}function g(e){var t=[],n=[];e.tripleQuotedStrings?t.push(["str",/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]):e.multiLineStrings?t.push(["str",/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):t.push(["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),e.verbatimStrings&&n.push(["str",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var r=e.hashComments;r&&(e.cStyleComments?(r>1?t.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):t.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),n.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):t.push(["com",/^#[^\r\n]*/,null,"#"])),e.cStyleComments&&(n.push(["com",/^\/\/[^\r\n]*/,null]),n.push(["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var i=e.regexLiterals;if(i){var a=i>1?"":"\n\r",o=a?".":"[\\S\\s]",s="/(?=[^/*"+a+"])(?:[^/\\x5B\\x5C"+a+"]|\\x5C"+o+"|\\x5B(?:[^\\x5C\\x5D"+a+"]|\\x5C"+o+")*(?:\\x5D|$))+/";n.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+s+")")])}var l=e.types;l&&n.push(["typ",l]);var c=(""+e.keywords).replace(/^ | $/g,"");c.length&&n.push(["kwd",new RegExp("^(?:"+c.replace(/[\s,]+/g,"|")+")\\b"),null]),t.push(["pln",/^\s+/,null," \r\n\t "]);var u="^.[^\\s\\w.$@'\"`/\\\\]*";return e.regexLiterals&&(u+="(?!s*/)"),n.push(["lit",/^@[a-z_$][a-z_$@0-9]*/i,null],["typ",/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],["pln",/^[a-z_$][a-z_$@0-9]*/i,null],["lit",new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],["pln",/^\\[\s\S]?/,null],["pun",new RegExp(u),null]),m(t,n)}var v=g({keywords:[r,a,i,o,s,l,c,u],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function b(e,t,n){for(var r=/(?:^|\s)nocode(?:\s|$)/,i=/\r\n?|\n/,a=e.ownerDocument,o=a.createElement("li");e.firstChild;)o.appendChild(e.firstChild);var s=[o];function l(e){var t=e.nodeType;if(1!=t||r.test(e.className)){if((3==t||4==t)&&n){var o=e.nodeValue,s=o.match(i);if(s){var u=o.substring(0,s.index);e.nodeValue=u;var d=o.substring(s.index+s[0].length);if(d)e.parentNode.insertBefore(a.createTextNode(d),e.nextSibling);c(e),u||e.parentNode.removeChild(e)}}}else if("br"===e.nodeName)c(e),e.parentNode&&e.parentNode.removeChild(e);else for(var h=e.firstChild;h;h=h.nextSibling)l(h)}function c(e){for(;!e.nextSibling;)if(!(e=e.parentNode))return;for(var t,n=function e(t,n){var r=n?t.cloneNode(!1):t,i=t.parentNode;if(i){var a=e(i,1),o=t.nextSibling;a.appendChild(r);for(var s=o;s;s=o)o=s.nextSibling,a.appendChild(s)}return r}(e.nextSibling,0);(t=n.parentNode)&&1===t.nodeType;)n=t;s.push(n)}for(var u=0;u<s.length;++u)l(s[u]);t===(0|t)&&s[0].setAttribute("value",t);var d=a.createElement("ol");d.className="linenums";for(var h=Math.max(0,t-1|0)||0,f=(u=0,s.length);u<f;++u)(o=s[u]).className="L"+(u+h)%10,o.firstChild||o.appendChild(a.createTextNode(" ")),d.appendChild(o);e.appendChild(d)}var y={};function E(t,n){for(var r=n.length;--r>=0;){var i=n[r];y.hasOwnProperty(i)?e.console&&console.warn("cannot override language handler %s",i):y[i]=t}}function x(e,t){return e&&y.hasOwnProperty(e)||(e=/^\s*</.test(t)?"default-markup":"default-code"),y[e]}function _(t){var n,r,i,a,o,s,l,c=t.langExtension;try{var u=(n=t.sourceNode,r=t.pre,i=/(?:^|\s)nocode(?:\s|$)/,a=[],o=0,s=[],l=0,function e(t){var n=t.nodeType;if(1==n){if(i.test(t.className))return;for(var c=t.firstChild;c;c=c.nextSibling)e(c);var u=t.nodeName.toLowerCase();"br"!==u&&"li"!==u||(a[l]="\n",s[l<<1]=o++,s[l++<<1|1]=t)}else if(3==n||4==n){var d=t.nodeValue;d.length&&(d=r?d.replace(/\r\n?/g,"\n"):d.replace(/[ \t\r\n]+/g," "),a[l]=d,s[l<<1]=o,o+=d.length,s[l++<<1|1]=t)}}(n),{sourceCode:a.join("").replace(/\n$/,""),spans:s}),d=u.sourceCode;t.sourceCode=d,t.spans=u.spans,t.basePos=0,x(c,d)(t),function(e){var t=/\bMSIE\s(\d+)/.exec(navigator.userAgent);t=t&&+t[1]<=8;var n,r,i=/\n/g,a=e.sourceCode,o=a.length,s=0,l=e.spans,c=l.length,u=0,d=e.decorations,h=d.length,f=0;for(d[h]=o,r=n=0;r<h;)d[r]!==d[r+2]?(d[n++]=d[r++],d[n++]=d[r++]):r+=2;for(h=n,r=n=0;r<h;){for(var p=d[r],m=d[r+1],g=r+2;g+2<=h&&d[g+1]===m;)g+=2;d[n++]=p,d[n++]=m,r=g}h=d.length=n;var v=e.sourceNode,b="";v&&(b=v.style.display,v.style.display="none");try{for(;u<c;){l[u];var y,E=l[u+2]||o,x=d[f+2]||o,_=(g=Math.min(E,x),l[u+1]);if(1!==_.nodeType&&(y=a.substring(s,g))){t&&(y=y.replace(i,"\r")),_.nodeValue=y;var k=_.ownerDocument,w=k.createElement("span");w.className=d[f+1];var C=_.parentNode;C.replaceChild(w,_),w.appendChild(_),s<E&&(l[u+1]=_=k.createTextNode(a.substring(g,E)),C.insertBefore(_,w.nextSibling))}(s=g)>=E&&(u+=2),s>=x&&(f+=2)}}finally{v&&(v.style.display=b)}}(t)}catch(t){e.console&&console.log(t&&t.stack||t)}}function k(e,t,n){var r=n||!1,i=t||null,a=document.createElement("div");return a.innerHTML="<pre>"+e+"</pre>",a=a.firstChild,r&&b(a,r,!0),_({langExtension:i,numberLines:r,sourceNode:a,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null}),a.innerHTML}function w(t,n){var r=n||document.body,i=r.ownerDocument||document;function a(e){return r.getElementsByTagName(e)}for(var o=[a("pre"),a("code"),a("xmp")],s=[],l=0;l<o.length;++l)for(var c=0,u=o[l].length;c<u;++c)s.push(o[l][c]);o=null;var d=Date;d.now||(d={now:function(){return+new Date}});var h=0,f=/\blang(?:uage)?-([\w.]+)(?!\S)/,m=/\bprettyprint\b/,g=/\bprettyprinted\b/,v=/pre|xmp/i,y=/^code$/i,E=/^(?:pre|code|xmp)$/i,x={};!function n(){for(var r=e.PR_SHOULD_USE_CONTINUATION?d.now()+250:1/0;h<s.length&&d.now()<r;h++){for(var a=s[h],o=x,l=a;l=l.previousSibling;){var c=l.nodeType,u=(7===c||8===c)&&l.nodeValue;if(u?!/^\??prettify\b/.test(u):3!==c||/\S/.test(l.nodeValue))break;if(u){o={},u.replace(/\b(\w+)=([\w:.%+-]+)/g,(function(e,t,n){o[t]=n}));break}}var k=a.className;if((o!==x||m.test(k))&&!g.test(k)){for(var w=!1,C=a.parentNode;C;C=C.parentNode){var S=C.tagName;if(E.test(S)&&C.className&&m.test(C.className)){w=!0;break}}if(!w){a.className+=" prettyprinted";var O,A,T=o.lang;if(!T)!(T=k.match(f))&&(O=p(a))&&y.test(O.tagName)&&(T=O.className.match(f)),T&&(T=T[1]);if(v.test(a.tagName))A=1;else{var I=a.currentStyle,D=i.defaultView,L=I?I.whiteSpace:D&&D.getComputedStyle?D.getComputedStyle(a,null).getPropertyValue("white-space"):0;A=L&&"pre"===L.substring(0,3)}var R=o.linenums;(R="true"===R||+R)||(R=!!(R=k.match(/\blinenums\b(?::(\d+))?/))&&(!R[1]||!R[1].length||+R[1])),R&&b(a,R,A),_({langExtension:T,sourceNode:a,numberLines:R,pre:A,sourceCode:null,basePos:null,spans:null,decorations:null})}}}h<s.length?e.setTimeout(n,250):"function"==typeof t&&t()}()}E(v,["default-code"]),E(m([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),E(m([["pln",/^[\s]+/,null," \t\r\n"],["atv",/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],["pun",/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),E(m([],[["atv",/^[\s\S]+/]]),["uq.val"]),E(g({keywords:r,hashComments:!0,cStyleComments:!0,types:d}),["c","cc","cpp","cxx","cyc","m"]),E(g({keywords:"null,true,false"}),["json"]),E(g({keywords:a,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:d}),["cs"]),E(g({keywords:i,cStyleComments:!0}),["java"]),E(g({keywords:u,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),E(g({keywords:l,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),E(g({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),E(g({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),E(g({keywords:o,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),E(g({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),E(m([],[["str",/^[\s\S]+/]]),["regex"]);var C=e.PR={createSimpleLexer:m,registerLangHandler:E,sourceDecorator:g,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:k,prettyPrint:w},S=e.define;"function"==typeof S&&S.amd&&S("google-code-prettify",[],(function(){return C}))}()},SKnc:
|
|
|
/*!************************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/LinearGradient.js ***!
|
|
|
\************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/util */"bYtY"),i=n(/*! ./Gradient */"QuXc"),a=function(e,t,n,r,a,o){this.x=null==e?0:e,this.y=null==t?0:t,this.x2=null==n?1:n,this.y2=null==r?0:r,this.type="linear",this.global=o||!1,i.call(this,a)};a.prototype={constructor:a},r.inherits(a,i);var o=a;e.exports=o},SMhR:
|
|
|
/*!*****************************************!*\
|
|
|
!*** ./src/assets/images/teacherQQ.png ***!
|
|
|
\*****************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAcYAAAHGCAYAAADuYispAAAAAklEQVR4AewaftIAABHTSURBVO3BQY4cy5IEQdNA3//KNo2/8NU8XzCQyCpSReivSJKk/zmRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNH7yMiB/s7a5AWTTNhsgN9pmA2TTNp8MyI22uQHkv7TNDSCbttkAudE2bwJyo22eBGTTNhsgf7O2ecuJJEkaJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpPGTD9c2nwzIk9pmA2TTNjeAPAnIpm1uANm0zQbIDSBPAXIDyKZtPhmQG22zAfLN2uaTAflUJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZLGT74ckCe1zZOAbNpm0zYbIDfaZgPkRts8qW1utM0GyKZtntI2GyBPArJpmw2QTds8CcimbW4A+WRAntQ23+pEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0viJXtU2T2qbDZA3Adm0zZOAbNpm0zYbIJu2+VZtswGyaZsbbbMBsmmbDZBN29xoG32mE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjJ3oVkCe1zZPaZgNk0zYbIJu2eRKQJwF5S9vcAPIkIJu2uQFk0zY32kbf6USSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnS+MmXa5t/WdtsgGza5psB+WRt8xQgN4DcaJtv1jYbIDfa5pO1jf5/J5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZLGTz4ckH9Z22yAbNpmA2TTNhsgm7bZANm0zQbIpm02QDZtswFyA8h/aZsbbbMBsmmbDZBN22yAbNpmA2TTNhsgm7bZALkBZNM2N4Doz5xIkqRxIkmSxokkSRonkiRpnEiSpHEiSZLGiSRJGvRX9LGAvKltNkA2bXMDyJvaZgNk0zZPAfLN2mYD5EbbPAnIk9pG7ziRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNH7y4YBs2uYGkE3bbIBs2mYD5Ebb/Mva5klAbgB5S9tsgGza5gaQDZBN2zwJyJPaZgNkA2TTNhsgN9pmA2TTNt/qRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdKgv/IPA3KjbW4AeVLb3ADyzdrmBpAntc2nAnKjbTZANm1zA8gna5sNkH9Z27zlRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdL4yZcDcqNtbgDZtM2mbTZANm1zA8imbTZANm1zA8iTgGza5gaQpwDZtM2NttkAudE2b2qbDZAbbbMB8qa20f/vRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdL4ycuA3GibDZANkBttswHyJCA32uZJQDZt8yQgTwKyaZsNkD/VNk8CsmmbDZA3tc0GyI222QDZtM0NIJu2eRKQTdt8qxNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ4yf/uLbZANkA2bTNDSBPAnKjbd7UNhsgN4Bs2uZG27wFyKZtbrTNBsimbW4AudE2N9pmA+RG29wAsmmbJwHZtM1bTiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNn3w5IJu2udE2N4DcaJsbQDZtswGyAfIvA7Jpmz8F5EbbPAnIpm1uANm0zZuAbNpm0zYbIBsgm7a5AeRJbfOpTiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNn3y4ttkAuQFk0zYbIDfa5gaQN7XNk4A8qW02QG4A+VNtswHyzdpmA+RJbfMkIJu2eVPbbIBs2uZvdSJJksaJJEkaJ5IkaZxIkqRxIkmSxokkSRonkiRp/ERX2kb/DcimbW4AuQFk0zYbIDfa5i1t8yYgm7a50TYbIN+sbW4A2bTNk4Bs2uYtJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZLGT/5yQDZtswHypLbZAHlT29xomw2QTdvcAHIDyKdqmze1zZuAvKltNkCeBOSTAflWJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZIG/ZUPBuRG22yAbNrmBpAbbbMBcqNtNkA2bbMBsmmbDZBN2zwJyFvaZgNk0zYbIDfaZgNk0zYbIG9qm08GZNM2GyCbttkA2bTNtzqRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNH7yMiBPAvIkIN8MyA0gm7bZALkB5Elt8yQgf6pt9N/aZgPkTUA2bbNpmycB+VedSJKkcSJJksaJJEkaJ5IkaZxIkqRxIkmSxokkSRr0V/5iQDZt882AbNrmBpBN22yAbNpmA+RG2zwJyKZt/hSQTds8CcimbW4A2bTNk4B8s7bZALnRNhsgm7bZANm0zVtOJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI2ffDggm7bZtM0GyJvaZgPkBpBN2zypbTZAbrTNBsimbZ4E5ClAbrTNNwOyaZsbbXMDyI222QDZtM0GyAbIDSCbtvlUJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZIG/ZV/GJAbbbMB8qa22QDZtM0GyKZtbgDZtM0NIJu22QC50Tb/BciNttkAeVLbbIDcaJsNkE3bbIA8qW02QN7UNv+qE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjJy8DcqNt3gTkkwH5ZECeBOSTAXkKkE3bbIA8qW2e1DY32mYDZNM2GyD6TCeSJGmcSJKkcSJJksaJJEkaJ5IkaZxIkqRxIkmSxk++HJBN29xomycB2bTNm4Bs2mYD5JsBudE2TwGyaZsNkCcBudE2N4C8CciNtnkSkBtAbrTNpzqRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNH7ysrb5ZkA2bXMDyI22eRKQTds8CcimbTZANm2zAXIDyH9pmye1zQbIpm02QG4A+WRtswHyJCCbtnlT23yrE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0vjJy4A8qW2e1DZvapsbQDZtswFyA8imbTZtc6Nt3tQ2TwGyaZtN22yA3GibDZBN22yAPAnIm9rmSUA2bbMBcqNt3nIiSZLGiSRJGieSJGmcSJKkcSJJksaJJEkaJ5IkadBf+WBANm2zAfLN2mYD5Ebb3AByo202QPSOttkA2bTNm4Bs2uYGEP25tvlUJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZIG/ZUXAbnRNjeA3GibG0ButM03A/LJ2mYDZNM2fwrIJ2ubG0A2bXMDyI22uQFk0zY3gNxomxtANm3zrU4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkDforLwKyaZsNkE3bPAnIpm02QJ7UNk8CcqNtNkButM0GyJPaZgPkT7XNBsiNttkA+Ze1zQ0gN9pmA+RNbbMBsmmbt5xIkqRxIkmSxokkSRonkiRpnEiSpHEiSZLGiSRJGvRX/mJANm3zzYDcaJsbQG60zQ0gm7a5AeRJbfMWIE9qmw2QG22zAXKjbTZANm2zAfKktrkB5E1t85YTSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeMnLwOyaZsbbbMB8qa2udE2GyBvapsNkE3bbNrmTW2zAbIB8l/a5kltswHypLZ5U9s8CciNtnkSkE3b/KtOJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI2fvKxtbgDZtM2NtvlmbbMB8iQgTwKyaZsNkG8F5Elt8yYgm7Z5EpBN2zwJyCcDcqNtPtWJJEkaJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpPGTDwdk0zY32uYGkE3b3ACyaZtP1jZvArJpmw2QDZBN22yA/Bcgm7bZALkB5Ebb6L8B2bTNDSCbttkAudE2GyCbtnnLiSRJGieSJGmcSJKkcSJJksaJJEkaJ5IkaZxIkqRBf+UvBmTTNhsgm7a5AeSTtc2TgNxomw2QG22zAbJpmz8F5EbbbIC8qW2+GZBN2zwJyKZtNkButM0GyI22ecuJJEkaJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpEF/5UVAbrTNk4DcaJsNkG/WNk8C8qS22QDZtM0GyKZtPhWQN7XNk4Bs2mYD5Elt8yQgN9rmb3UiSZLGiSRJGieSJGmcSJKkcSJJksaJJEkaJ5IkadBfeRGQN7XNk4Bs2uabAdm0zQbIm9rmUwHZtM0GyI222QB5U9tsgDypbZ4EZNM2bwKyaZtvdSJJksaJJEkaJ5IkaZxIkqRxIkmSxokkSRonkiRp/OTDtc0GyJOA3GibDZAbbXMDyKZtntQ23wzIjbb5L21zo21uALnRNhsgn6xtNkA2bfMmIG8CsmmbT3UiSZLGiSRJGieSJGmcSJKkcSJJksaJJEkaJ5IkadBf+WBANm2zAbJpmw2QTdv8y4DcaJsbQDZtswFyo202QDZt8xQgm7a5AeRG23wzIDfa5k1ANm1zA8iNtnnLiSRJGieSJGmcSJKkcSJJksaJJEkaJ5IkaZxIkqTxk79c2zwJyI222QDZtM2TgGzaZgNkA+RNbbMBcqNtNkD+VNvcALJpmzcB2bTNBsimbT4ZkE3bvAnIpm2+1YkkSRonkiRpnEiSpHEiSZLGiSRJGieSJGmcSJKkQX/lgwF5Uts8CciNtrkB5EltcwPIjbbZANm0zQbIp2qbJwHZtM0NIG9qmzcB2bTNBsiNttkAeVLbfKoTSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSYP+youAPKltngRk0zY3gGza5klAntQ2N4A8qW02QL5V22yAfLK22QC50TYbIJu22QD5Zm2zAXKjbd5yIkmSxokkSRonkiRpnEiSpHEiSZLGiSRJGieSJGnQX9FrgGzaZgNk0zYbIDfaZgNk0zYbIJu22QDZtM0NIJu2eQqQG21zA8imbTZANm3zJiBvapsnAbnRNn+rE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjJy8D8jdrm03b3GibDZA3tc2NtnkSkDcB+S9tc6NtntQ2N9rmBpAbbXOjbW4AuQFk0zZPAnKjbT7ViSRJGieSJGmcSJKkcSJJksaJJEkaJ5IkaZxIkqTxkw/XNp8MyJOAbNrmRts8CcimbT5Z22yA3GibpwDZtM0NIJ+sbTZAbgB5U9s8qW02QDZt861OJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI2ffDkgT2qbJwF5UttsgLwJyJPa5gaQG0De0jY3gGza5gaQG22zAXKjbZ4EZAPkTUBuANm0zac6kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjR+ole1zZvaZgPkRtvcAPIkIJu22QDZtM3fCsiNttkAudE2TwKyaZtN22yAbNrmBpAbbbMBsgGyaZu3nEiSpHEiSZLGiSRJGieSJGmcSJKkcSJJksaJJEkaP9FHA3KjbTZAngRk0zafDMiTgPyptrkB5Eltc6Nt3gTkTW1zA8imbZ7UNt/qRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdL4yZdrm28G5JO1zQ0gN9pmA2QDZNM2GyCbtrnRNk8BcqNtNkA2QN7UNhsgTwKyaZsNkE3bvAnIjbb5VCeSJGmcSJKkcSJJksaJJEkaJ5IkaZxIkqRxIkmSBv2VFwH5m7XNk4Bs2uZJQJ7UNjeA3GibTwXkRttsgNxomw2QG22zAXKjbW4AeVLbbIDcaJsNkCe1zVtOJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJA36K5Ik6X9OJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ4/8ATrCgy9kbxW8AAAAASUVORK5CYII="},SUKs:
|
|
|
/*!**********************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/core/log.js ***!
|
|
|
\**********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=function(){};1===n(/*! ../config */"LPTA").debugMode&&(r=console.error);var i=r;e.exports=i},Sj9i:
|
|
|
/*!************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/core/curve.js ***!
|
|
|
\************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./vector */"QBsz"),i=r.create,a=r.distSquare,o=Math.pow,s=Math.sqrt,l=s(3),c=i(),u=i(),d=i();function h(e){return e>-1e-8&&e<1e-8}function f(e){return e>1e-8||e<-1e-8}function p(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function m(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}t.cubicAt=p,t.cubicDerivativeAt=function(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)},t.cubicRootAt=function(e,t,n,r,i,a){var c=r+3*(t-n)-e,u=3*(n-2*t+e),d=3*(t-e),f=e-i,p=u*u-3*c*d,m=u*d-9*c*f,g=d*d-3*u*f,v=0;if(h(p)&&h(m)){if(h(u))a[0]=0;else(A=-d/u)>=0&&A<=1&&(a[v++]=A)}else{var b=m*m-4*p*g;if(h(b)){var y=m/p,E=-y/2;(A=-u/c+y)>=0&&A<=1&&(a[v++]=A),E>=0&&E<=1&&(a[v++]=E)}else if(b>0){var x=s(b),_=p*u+1.5*c*(-m+x),k=p*u+1.5*c*(-m-x);(A=(-u-((_=_<0?-o(-_,1/3):o(_,1/3))+(k=k<0?-o(-k,1/3):o(k,1/3))))/(3*c))>=0&&A<=1&&(a[v++]=A)}else{var w=(2*p*u-3*c*m)/(2*s(p*p*p)),C=Math.acos(w)/3,S=s(p),O=Math.cos(C),A=(-u-2*S*O)/(3*c),T=(E=(-u+S*(O+l*Math.sin(C)))/(3*c),(-u+S*(O-l*Math.sin(C)))/(3*c));A>=0&&A<=1&&(a[v++]=A),E>=0&&E<=1&&(a[v++]=E),T>=0&&T<=1&&(a[v++]=T)}}return v},t.cubicExtrema=function(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,l=3*t-3*e,c=0;if(h(o)){if(f(a))(d=-l/a)>=0&&d<=1&&(i[c++]=d)}else{var u=a*a-4*o*l;if(h(u))i[0]=-a/(2*o);else if(u>0){var d,p=s(u),m=(-a-p)/(2*o);(d=(-a+p)/(2*o))>=0&&d<=1&&(i[c++]=d),m>=0&&m<=1&&(i[c++]=m)}}return c},t.cubicSubdivide=function(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,l=(r-n)*i+n,c=(s-o)*i+o,u=(l-s)*i+s,d=(u-c)*i+c;a[0]=e,a[1]=o,a[2]=c,a[3]=d,a[4]=d,a[5]=u,a[6]=l,a[7]=r},t.cubicProjectPoint=function(e,t,n,r,i,o,l,h,f,m,g){var v,b,y,E,x,_=.005,k=1/0;c[0]=f,c[1]=m;for(var w=0;w<1;w+=.05)u[0]=p(e,n,i,l,w),u[1]=p(t,r,o,h,w),(E=a(c,u))<k&&(v=w,k=E);k=1/0;for(var C=0;C<32&&!(_<1e-4);C++)b=v-_,y=v+_,u[0]=p(e,n,i,l,b),u[1]=p(t,r,o,h,b),E=a(u,c),b>=0&&E<k?(v=b,k=E):(d[0]=p(e,n,i,l,y),d[1]=p(t,r,o,h,y),x=a(d,c),y<=1&&x<k?(v=y,k=x):_*=.5);return g&&(g[0]=p(e,n,i,l,v),g[1]=p(t,r,o,h,v)),s(k)},t.quadraticAt=m,t.quadraticDerivativeAt=function(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))},t.quadraticRootAt=function(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),l=e-r,c=0;if(h(a)){if(f(o))(d=-l/o)>=0&&d<=1&&(i[c++]=d)}else{var u=o*o-4*a*l;if(h(u))(d=-o/(2*a))>=0&&d<=1&&(i[c++]=d);else if(u>0){var d,p=s(u),m=(-o-p)/(2*a);(d=(-o+p)/(2*a))>=0&&d<=1&&(i[c++]=d),m>=0&&m<=1&&(i[c++]=m)}}return c},t.quadraticExtremum=function(e,t,n){var r=e+n-2*t;return 0===r?.5:(e-t)/r},t.quadraticSubdivide=function(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n},t.quadraticProjectPoint=function(e,t,n,r,i,o,l,h,f){var p,g=.005,v=1/0;c[0]=l,c[1]=h;for(var b=0;b<1;b+=.05){u[0]=m(e,n,i,b),u[1]=m(t,r,o,b),(_=a(c,u))<v&&(p=b,v=_)}v=1/0;for(var y=0;y<32&&!(g<1e-4);y++){var E=p-g,x=p+g;u[0]=m(e,n,i,E),u[1]=m(t,r,o,E);var _=a(u,c);if(E>=0&&_<v)p=E,v=_;else{d[0]=m(e,n,i,x),d[1]=m(t,r,o,x);var k=a(d,c);x<=1&&k<v?(p=x,v=k):g*=.5}}return f&&(f[0]=m(e,n,i,p),f[1]=m(t,r,o,p)),s(v)}},SqI9:
|
|
|
/*!**********************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/shape/Sector.js ***!
|
|
|
\**********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../Path */"y+Vt"),i=n(/*! ../helper/fixClipWithShadow */"iXp4"),a=r.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:i(r.prototype.brush),buildPath:function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=t.startAngle,s=t.endAngle,l=t.clockwise,c=Math.cos(o),u=Math.sin(o);e.moveTo(c*i+n,u*i+r),e.lineTo(c*a+n,u*a+r),e.arc(n,r,a,o,s,!l),e.lineTo(Math.cos(s)*i+n,Math.sin(s)*i+r),0!==i&&e.arc(n,r,i,s,o,l),e.closePath()}});e.exports=a},SrGk:
|
|
|
/*!**********************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/svg/helper/Definable.js ***!
|
|
|
\**********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core */"hydK").createElement,i=n(/*! ../../core/util */"bYtY"),a=n(/*! ../../graphic/Path */"y+Vt"),o=n(/*! ../../graphic/Image */"Dagg"),s=n(/*! ../../graphic/Text */"dqUG"),l=n(/*! ../graphic */"P47w"),c=l.path,u=l.image,d=l.text;function h(e,t,n,r,i){this._zrId=e,this._svgRoot=t,this._tagNames="string"==typeof n?[n]:n,this._markLabel=r,this._domName=i||"_dom",this.nextId=0}h.prototype.createElement=r,h.prototype.getDefs=function(e){var t=this._svgRoot,n=this._svgRoot.getElementsByTagName("defs");return 0===n.length?e?((n=t.insertBefore(this.createElement("defs"),t.firstChild)).contains||(n.contains=function(e){var t=n.children;if(!t)return!1;for(var r=t.length-1;r>=0;--r)if(t[r]===e)return!0;return!1}),n):null:n[0]},h.prototype.update=function(e,t){if(e){var n=this.getDefs(!1);if(e[this._domName]&&n.contains(e[this._domName]))"function"==typeof t&&t(e);else{var r=this.add(e);r&&(e[this._domName]=r)}}},h.prototype.addDom=function(e){this.getDefs(!0).appendChild(e)},h.prototype.removeDom=function(e){var t=this.getDefs(!1);t&&e[this._domName]&&(t.removeChild(e[this._domName]),e[this._domName]=null)},h.prototype.getDoms=function(){var e=this.getDefs(!1);if(!e)return[];var t=[];return i.each(this._tagNames,(function(n){var r=e.getElementsByTagName(n);t=t.concat([].slice.call(r))})),t},h.prototype.markAllUnused=function(){var e=this.getDoms(),t=this;i.each(e,(function(e){e[t._markLabel]="0"}))},h.prototype.markUsed=function(e){e&&(e[this._markLabel]="1")},h.prototype.removeUnused=function(){var e=this.getDefs(!1);if(e){var t=this.getDoms(),n=this;i.each(t,(function(t){"1"!==t[n._markLabel]&&e.removeChild(t)}))}},h.prototype.getSvgProxy=function(e){return e instanceof a?c:e instanceof o?u:e instanceof s?d:c},h.prototype.getTextSvgElement=function(e){return e.__textSvgEl},h.prototype.getSvgElement=function(e){return e.__svgEl};var f=h;e.exports=f},T1X5:
|
|
|
/*!*******************************************!*\
|
|
|
!*** ./src/components/Knowledge/icon.png ***!
|
|
|
\*******************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGwAAABsCAYAAACPZlfNAAALdklEQVR4Xu2dC2wc1RVAzx1nDXFiO4SEhqxtxS0JHzX94TS0FEKLALX8WkKbqrRVKQrh15Zfq0IqIaSGSOXb8ktANFJbKqUFWigEAUohfFRQDC1KxS8UR/7wDbZ3TRxix3urN951No7Xnt15M7Mbz0hRImXevffds/PmzXv33StU0KWqTlcfh6mwkCHmq8M8B5oUZosyS6EeOCD7x/Rsl/kjkFJhu8AHGWiXDNuoYqsoW5K1vCkimUpxg5SzoW+r1gylOUGErygci9IC1Fi2uR+hVeA5VZ6tquOpuSL9lnVYE1d2wNo+0jnVylLNcKYKx6EcaK23XgQJH4vyjDg8OCDc3zxd3vXSLKx7ygJYW5seOGUmZ6GcJ8IShaqwHDCeHoEhVTYh3LO7mweam+XjqO2KFNjWPp09VblUlQuAmVE7YwL93SKs2SncMr9WPojK1kiAdWzXpCa40oHlCtOi6nwpegV2ZOBuGeSGxlnSVYoMP21CBfZmnx5SneFagXPzZnJ+7I+y7S6FdQMO1xxWK++HZUgowNzpeIoVKqwCDgqrcyHp6RFlZbKetWF8HgQOrD2liwTuAHdKvj9frVVTuHDuNGkNspOBAWtt1cShC1ilcLlqecz6gnSkkS3CkMBN77zBypYWGQxCXyDAuvq1KTPIeuCYIIyuAJnPOwmWJWuk3bat1oF1pfWMjLKuAqbptn05Wl63I5ybrJOHbCqyCqw9ratEucqMDjaNrGBZqsLqpjpZaasPVhyrqlVdKe5Wcafr8TXKA6KsS9azXESG/DrHN7CODp0qdaxXON2vMftze4F/aJpljY2y008/fQFr69EZCYeH3ZX0+JrQA2ZHYDDDac0HSe+ENxe4oWRg2SfriRhWca53t3HSnFTqk1YSMPedleZv8TBYHKzc3WZ4TNbxrVLeaSUB6+zV38cTjNJgjUBT1jXMkB8XK6VoYNmp+9XFKorv39cDKlxX7JS/KGDZj+K/x99Z1n5+6gjfLObj2jOw7HLTv+MVDGuwcoK6nQSf97qM5QmYWcj9xHyensRrg9YpjRL4/HtbOd7LgrEnYF1p/U1G+XnQVk9m+Y5wfbJOfjGRDyYEZvazHOFfk2WLZCKHBfX/Zmsmo3ypqV42j6djXGBmp7gzzQuTYPMxKA7Fym1tqGPxeDvX4wLr7NULVdzd4vgKyQOiXNQwQ+4spK4gMBMwc0CG1/bDGIyQXF+ymp5dDkcUCuwpCKwzpXcqbrxgfIXsAYU1TfVy4VhqxwRm4gZJ8L/9IBQtZFdbU7eLQT41VtzjmMDaU3qzwKXW1MeCivaAwi1N9XLZ6Ib7AHPDpzO0hRmR+/L78Ict8J93IT1QdN+sN6irhs/NgR8uhM8eYl28J4EmwninQ/PosPB9gHWmdZUqoS3u/uUVuPEFKMcDWg5wxWL4zlGefGz9JhGuaxgVD7IXsOwpEhMvHsrBBPNknf9IecLKed9Au+vUyJ607t3dJPNPzewFrCOl3wPutf5TKSDwio3wdF7k3imfhMNnugGZkV2q8Ho3PPbWHhOOb4IbT4zMpHMa6+XPOe17A+vVjQhfC8u0E+/d884ysH69JCzNE+v51aY90Mw7beM5E7cJ5A7ln40zZOTnMgLMnHxMDNEZ5mG6RSbcNHv9tAV+sDCQLpck9I9b4Hd5UfKbIwrgM4cKB6toyJ0EHQHWkdJLgFtL6l2JjfKB/WwRfP/TJQoKoNmf/gu/zVuGjQqY6ZrjcEmyVm43/x4B1pnSxxVOCqDvBUXGwLx5W+CJhno5eQSYe1q/jw/DPgAeA/MGDOHjqloONtkN3CesI6XfAB7x2NzabV6B3fca3LoZ+ndbU+0KmpaAn7TA0iP2lVtOQ2LWulMb62WDC6wzrdfp8CGGUC+vwL56L3wU0ArI9Gp4cowZYLkBE2F1Q51cPfyEpXUTyvGh0gK8ArvgUXgxoGwZX5gDa79eAU+Y8HRjnSyR7K5yXwAZZibk7xXYjkHY2Abmb5uXGRJPnAfTqisAGPQ31FErnWldoMrrNh3hVZZXYF7l2byv3IZEd4YoHC4dfbqUDPfZ7KxXWTEwr57K3udwtnT06i8RVhfZ1MrtMbAi3ahcJe1pXSPKiiKbWrk9BlacG1VYa95hG1QZY55UnLBS7vYK7JXtwxuc/ZYnHTWJ4U3Ko2ZVxKTDvMMelY60bs7mISzF577aeAV25l/h7Y98qSrYeO50ePDblQHMzevYmVITDjAvGHeMLzUGVpzXBbZJR0p7gBnFNbVzt1dgr+aGRMtLUzVThofEI8cYEh9/C1ZuGu7n7BrYsMxOn31K6TXAdkTx0WwM9wrMZydLaj6UgTtegje64UefgaPnlCTGdqN+A8z8biPJAFrOwGx72pK8oRiYJU+GJMYFFg+JIXnbghp3SOyO6sCD1yFxxwBs3BbA4m91dvE3YcGV4YjoqYhp/YpH4aWAtlfMZGJNJMsGxRMentZXwIdzFBuYxbszhBbuh3MFLE25IQKtwSxNmRCBs8cIEQjB/UWrcJem4sXfvf32Qhdc8jjcdjIsThbt00AbuIu/8fZK5QDDbK/EG5gVBMxsYMYhApUDzA0RqIQgnEBfDKOEl/E7bDgIx9hb7mFuMTA3qH44zM04o9wDSWNgbsRUXiBpmYdq2wZmhr1C16sfwu0vwsVHw5EHF74vgin/nlDtcjgMEeb5sPw1zFJ/DKEePxp9GMIdFiM4bhTVCUyvT9gR4zxhx4T4Ub3PcSMDrKtPL85kuK3UX1wp7fyccTaHGE5uBhP5ZPMqx1nimAf6ojgy+/J7cP6G0rMILJ4Lt51iExeUG7CCR2bd6X3Ih9KNTj95OmZOhce+u38Do9ChdBdYyGkfcq4uJRPO9ARc9kU4Y8F+DgwKp30IO7GKXVfbkVZmQ+L4iVWyH9Ghpi6y42Z7UsoJ2ISpi0y3o0gOZs/d/iWVCzDPycFMl+P0e/7B+5XgOf2eO/mIE1z69bff9sUluMw+ZXdKnELWr+NLal90ClmjJU7SXJKvbTQqLUmzO2OM06DbAFCUjJLToBstcaGBonxt42Z/hQay77K4lIcNFBPIsFLKI6cjLpYTBjGub7RRLMeYGpejChyY3XJUxty44Ftg0OwXfMsbGs/IKHFJRXvsgiupmLMxLlpqkVbQRUtzpsZlgf1Dk7DKAme/z+LC2z6YhV54210g7tCpUkdc2r5IcJGUts/Z2NajMxIODyscW6Tdk/J2A2sww2nNB0lvqQ7wXTQj+6StVzi9VCMmQzszDGqaZY2NstNPf30DM8qfVJ0yP8VdKkRUP8GPC4JvayYYyXqWi8iQX21WgI2a8pvs3Fbl+u1khO1VhdVNo0pK+bHHumO70mo+rk1VlVBKWvnpfMBtux3h3GSdPGRTj3VgectY64FjbBpbQbKedxIsS9ZIXrEtO9YHAsyYZhaMD13AKoXLJ0uVdbNFInDTO2+wsqVFLOdPHQYeGLCR91pKFwlu8e4WO7+xspXSqnDRRKXp/VofODBjoNm57kqxQoVVUeW18uuocdr3iLIyWc/a8UrS29IfCrCcsSawpzrDtYI7/T/AVicikrNLYd2AwzWFqpoHYVeowHIdMHGPmuBKB5aHWX7YhgNNRG4G7pZBbhirMLYNHePJiARYziA3LFy5VJULKuAzoFuENTuFW0bXVg4aUr78SIHlDMmemjkL5TwRloRZh3OCX/OQKpsQ7tndzQP55XnDhFR2wPINMidBq5WlmuFMFY4Lu2qgqYYnyjPi8OCAcH+uWGhUgEbrLYsnrJAz3OwGaU5AOQ6HL2cLItRYdl6/m8AfnlPl2ao6njKlCy3rsCaurIGN7qX7edDHYSosZIj56jDPgSaF2aLM0uH8+6YaWG4GugsYEOhVYbvABxlolwzbqGKrKFuStbwZxnTcFrH/A8wNv8JI/KKJAAAAAElFTkSuQmCC"},T6xi:
|
|
|
/*!*********************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/helper/poly.js ***!
|
|
|
\*********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./smoothSpline */"YgsL"),i=n(/*! ./smoothBezier */"nCxF");t.buildPath=function(e,t,n){var a=t.points,o=t.smooth;if(a&&a.length>=2){if(o&&"spline"!==o){var s=i(a,o,n,t.smoothConstraint);e.moveTo(a[0][0],a[0][1]);for(var l=a.length,c=0;c<(n?l:l-1);c++){var u=s[2*c],d=s[2*c+1],h=a[(c+1)%l];e.bezierCurveTo(u[0],u[1],d[0],d[1],h[0],h[1])}}else{"spline"===o&&(a=r(a,n)),e.moveTo(a[0][0],a[0][1]);c=1;for(var f=a.length;c<f;c++)e.lineTo(a[c][0],a[c][1])}n&&e.closePath()}}},TGq3:
|
|
|
/*!***********************************************!*\
|
|
|
!*** ./src/assets/images/icons/lockclose.svg ***!
|
|
|
\***********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/lockclose.365036e8.svg"},UZu5:
|
|
|
/*!*************************************************!*\
|
|
|
!*** ./src/components/image-preview/index.less ***!
|
|
|
\*************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},VpOo:
|
|
|
/*!**************************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/helper/roundRect.js ***!
|
|
|
\**************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){t.buildPath=function(e,t){var n,r,i,a,o,s=t.x,l=t.y,c=t.width,u=t.height,d=t.r;c<0&&(s+=c,c=-c),u<0&&(l+=u,u=-u),"number"==typeof d?n=r=i=a=d:d instanceof Array?1===d.length?n=r=i=a=d[0]:2===d.length?(n=i=d[0],r=a=d[1]):3===d.length?(n=d[0],r=a=d[1],i=d[2]):(n=d[0],r=d[1],i=d[2],a=d[3]):n=r=i=a=0,n+r>c&&(n*=c/(o=n+r),r*=c/o),i+a>c&&(i*=c/(o=i+a),a*=c/o),r+i>u&&(r*=u/(o=r+i),i*=u/o),n+a>u&&(n*=u/(o=n+a),a*=u/o),e.moveTo(s+n,l),e.lineTo(s+c-r,l),0!==r&&e.arc(s+c-r,l+r,r,-Math.PI/2,0),e.lineTo(s+c,l+u-i),0!==i&&e.arc(s+c-i,l+u-i,i,0,Math.PI/2),e.lineTo(s+a,l+u),0!==a&&e.arc(s+a,l+u-a,a,Math.PI/2,Math.PI),e.lineTo(s,l+n),0!==n&&e.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}},"VrN/":
|
|
|
/*!***************************************************!*\
|
|
|
!*** ./node_modules/codemirror/lib/codemirror.js ***!
|
|
|
\***************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),a=/Edge\/(\d+)/.exec(e),o=r||i||a,s=o&&(r?document.documentMode||6:+(a||i)[1]),l=!a&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),u=!a&&/Chrome\//.test(e),d=/Opera\//.test(e),h=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),m=!a&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),g=/Android/.test(e),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=m||/Mac/.test(t),y=/\bCrOS\b/.test(e),E=/win/i.test(t),x=d&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(d=!1,l=!0);var _=b&&(c||d&&(null==x||x<12.11)),k=n||o&&s>=9;function w(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var C,S=function(e,t){var n=e.className,r=w(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function O(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function A(e,t){return O(e).appendChild(t)}function T(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a<t.length;++a)i.appendChild(t[a]);return i}function I(e,t,n,r){var i=T(e,t,n,r);return i.setAttribute("role","presentation"),i}function D(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function L(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function R(e,t){var n=e.className;w(t).test(n)||(e.className+=(n?" ":"")+t)}function N(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!w(n[r]).test(t)&&(t+=" "+n[r]);return t}C=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var j=function(e){e.select()};function M(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function P(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function B(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var a=r||0,o=i||0;;){var s=e.indexOf("\t",a);if(s<0||s>=t)return o+(t-a);o+=s-a,o+=n-o%n,a=s+1}}m?j=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:o&&(j=function(e){try{e.select()}catch(e){}});var F=function(){this.id=null,this.f=null,this.time=0,this.handler=M(this.onTimeout,this)};function U(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}F.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},F.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var H={toString:function(){return"CodeMirror.Pass"}},z={scroll:!1},G={origin:"*mouse"},V={origin:"+move"};function W(e,t,n){for(var r=0,i=0;;){var a=e.indexOf("\t",r);-1==a&&(a=e.length);var o=a-r;if(a==e.length||i+o>=t)return r+Math.min(o,t-i);if(i+=a-r,r=a+1,(i+=n-i%n)>=t)return r}}var K=[""];function q(e){for(;K.length<=e;)K.push(Y(K)+" ");return K[e]}function Y(e){return e[e.length-1]}function Q(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function J(){}function X(e,t){var n;return Object.create?n=Object.create(e):(J.prototype=e,n=new J),t&&P(t,n),n}var Z=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function $(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||Z.test(e))}function ee(e,t){return t?!!(t.source.indexOf("\\w")>-1&&$(e))||t.test(e):$(e)}function te(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function re(e){return e.charCodeAt(0)>=768&&ne.test(e)}function ie(e,t,n){for(;(n<0?t>0:t<e.length)&&re(e.charAt(t));)t+=n;return t}function ae(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,a=r<0?Math.ceil(i):Math.floor(i);if(a==t)return e(a)?t:n;e(a)?n=a:t=a+r}}var oe=null;function se(e,t,n){var r;oe=null;for(var i=0;i<e.length;++i){var a=e[i];if(a.from<t&&a.to>t)return i;a.to==t&&(a.from!=a.to&&"before"==n?r=i:oe=i),a.from==t&&(a.from!=a.to&&"before"!=n?r=i:oe=i)}return null!=r?r:oe}var le=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function a(e,t,n){this.level=e,this.from=t,this.to=n}return function(o,s){var l="ltr"==s?"L":"R";if(0==o.length||"ltr"==s&&!e.test(o))return!1;for(var c,u=o.length,d=[],h=0;h<u;++h)d.push((c=o.charCodeAt(h))<=247?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(c):1424<=c&&c<=1524?"R":1536<=c&&c<=1785?"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(c-1536):1774<=c&&c<=2220?"r":8192<=c&&c<=8203?"w":8204==c?"b":"L");for(var f=0,p=l;f<u;++f){var m=d[f];"m"==m?d[f]=p:p=m}for(var g=0,v=l;g<u;++g){var b=d[g];"1"==b&&"r"==v?d[g]="n":n.test(b)&&(v=b,"r"==b&&(d[g]="R"))}for(var y=1,E=d[0];y<u-1;++y){var x=d[y];"+"==x&&"1"==E&&"1"==d[y+1]?d[y]="1":","!=x||E!=d[y+1]||"1"!=E&&"n"!=E||(d[y]=E),E=x}for(var _=0;_<u;++_){var k=d[_];if(","==k)d[_]="N";else if("%"==k){var w=void 0;for(w=_+1;w<u&&"%"==d[w];++w);for(var C=_&&"!"==d[_-1]||w<u&&"1"==d[w]?"1":"N",S=_;S<w;++S)d[S]=C;_=w-1}}for(var O=0,A=l;O<u;++O){var T=d[O];"L"==A&&"1"==T?d[O]="L":n.test(T)&&(A=T)}for(var I=0;I<u;++I)if(t.test(d[I])){var D=void 0;for(D=I+1;D<u&&t.test(d[D]);++D);for(var L="L"==(I?d[I-1]:l),R=L==("L"==(D<u?d[D]:l))?L?"L":"R":l,N=I;N<D;++N)d[N]=R;I=D-1}for(var j,M=[],P=0;P<u;)if(r.test(d[P])){var B=P;for(++P;P<u&&r.test(d[P]);++P);M.push(new a(0,B,P))}else{var F=P,U=M.length,H="rtl"==s?1:0;for(++P;P<u&&"L"!=d[P];++P);for(var z=F;z<P;)if(i.test(d[z])){F<z&&(M.splice(U,0,new a(1,F,z)),U+=H);var G=z;for(++z;z<P&&i.test(d[z]);++z);M.splice(U,0,new a(2,G,z)),U+=H,F=z}else++z;F<P&&M.splice(U,0,new a(1,F,P))}return"ltr"==s&&(1==M[0].level&&(j=o.match(/^\s+/))&&(M[0].from=j[0].length,M.unshift(new a(0,0,j[0].length))),1==Y(M).level&&(j=o.match(/\s+$/))&&(Y(M).to-=j[0].length,M.push(new a(0,u-j[0].length,u)))),"rtl"==s?M.reverse():M}}();function ce(e,t){var n=e.order;return null==n&&(n=e.order=le(e.text,t)),n}var ue=[],de=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||ue).concat(n)}};function he(e,t){return e._handlers&&e._handlers[t]||ue}function fe(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var a=U(i,n);a>-1&&(r[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function pe(e,t){var n=he(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function me(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),pe(e,n||t.type,e,t),xe(t)||t.codemirrorIgnore}function ge(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==U(n,t[r])&&n.push(t[r])}function ve(e,t){return he(e,t).length>0}function be(e){e.prototype.on=function(e,t){de(this,e,t)},e.prototype.off=function(e,t){fe(this,e,t)}}function ye(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ee(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function xe(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function _e(e){ye(e),Ee(e)}function ke(e){return e.target||e.srcElement}function we(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var Ce,Se,Oe=function(){if(o&&s<9)return!1;var e=T("div");return"draggable"in e||"dragDrop"in e}();function Ae(e){if(null==Ce){var t=T("span","");A(e,T("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Ce=t.offsetWidth<=1&&t.offsetHeight>2&&!(o&&s<8))}var n=Ce?T("span",""):T("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Te(e){if(null!=Se)return Se;var t=A(e,document.createTextNode("AخA")),n=C(t,0,1).getBoundingClientRect(),r=C(t,1,2).getBoundingClientRect();return O(e),!(!n||n.left==n.right)&&(Se=r.right-n.right<3)}var Ie,De=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var a=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),o=a.indexOf("\r");-1!=o?(n.push(a.slice(0,o)),t+=o+1):(n.push(a),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Le=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Re="oncopy"in(Ie=T("div"))||(Ie.setAttribute("oncopy","return;"),"function"==typeof Ie.oncopy),Ne=null,je={},Me={};function Pe(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),je[e]=t}function Be(e){if("string"==typeof e&&Me.hasOwnProperty(e))e=Me[e];else if(e&&"string"==typeof e.name&&Me.hasOwnProperty(e.name)){var t=Me[e.name];"string"==typeof t&&(t={name:t}),(e=X(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Be("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Be("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Fe(e,t){t=Be(t);var n=je[t.name];if(!n)return Fe(e,"text/plain");var r=n(e,t);if(Ue.hasOwnProperty(t.name)){var i=Ue[t.name];for(var a in i)i.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=i[a])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)r[o]=t.modeProps[o];return r}var Ue={};function He(e,t){P(t,Ue.hasOwnProperty(e)?Ue[e]:Ue[e]={})}function ze(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ge(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ve(e,t,n){return!e.startState||e.startState(t,n)}var We=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Ke(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],a=i.chunkSize();if(t<a){n=i;break}t-=a}return n.lines[t]}function qe(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,(function(e){var a=e.text;i==n.line&&(a=a.slice(0,n.ch)),i==t.line&&(a=a.slice(t.ch)),r.push(a),++i})),r}function Ye(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function Qe(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function Je(e){if(null==e.parent)return null;for(var t=e.parent,n=U(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function Xe(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],a=i.height;if(t<a){e=i;continue e}t-=a,n+=i.chunkSize()}return n}while(!e.lines);for(var o=0;o<e.lines.length;++o){var s=e.lines[o].height;if(t<s)break;t-=s}return n+o}function Ze(e,t){return t>=e.first&&t<e.first+e.size}function $e(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function et(e,t,n){if(void 0===n&&(n=null),!(this instanceof et))return new et(e,t,n);this.line=e,this.ch=t,this.sticky=n}function tt(e,t){return e.line-t.line||e.ch-t.ch}function nt(e,t){return e.sticky==t.sticky&&0==tt(e,t)}function rt(e){return et(e.line,e.ch)}function it(e,t){return tt(e,t)<0?t:e}function at(e,t){return tt(e,t)<0?e:t}function ot(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function st(e,t){if(t.line<e.first)return et(e.first,0);var n=e.first+e.size-1;return t.line>n?et(n,Ke(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?et(e.line,t):n<0?et(e.line,0):e}(t,Ke(e,t.line).text.length)}function lt(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=st(e,t[r]);return n}We.prototype.eol=function(){return this.pos>=this.string.length},We.prototype.sol=function(){return this.pos==this.lineStart},We.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},We.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},We.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},We.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},We.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},We.prototype.skipToEnd=function(){this.pos=this.string.length},We.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},We.prototype.backUp=function(e){this.pos-=e},We.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=B(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?B(this.string,this.lineStart,this.tabSize):0)},We.prototype.indentation=function(){return B(this.string,null,this.tabSize)-(this.lineStart?B(this.string,this.lineStart,this.tabSize):0)},We.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},We.prototype.current=function(){return this.string.slice(this.start,this.pos)},We.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},We.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},We.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ct=function(e,t){this.state=e,this.lookAhead=t},ut=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function dt(e,t,n,r){var i=[e.state.modeGen],a={};Et(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),a,r);for(var o=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],l=1,c=0;n.state=!0,Et(e,t.text,s.mode,n,(function(e,t){for(var n=l;c<e;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,c=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;n<l;n+=2){var a=i[n+1];i[n+1]=(a?a+" ":"")+"overlay "+t}}),a),n.state=o,n.baseTokens=null,n.baseTokenPos=1},l=0;l<e.state.overlays.length;++l)s(l);return{styles:i,classes:a.bgClass||a.textClass?a:null}}function ht(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=ft(e,Je(t)),i=t.text.length>e.options.maxHighlightLength&&ze(e.doc.mode,r.state),a=dt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ft(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new ut(r,!0,t);var a=function(e,t,n){for(var r,i,a=e.doc,o=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>o;--s){if(s<=a.first)return a.first;var l=Ke(a,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ct?c.lookAhead:0)<=a.modeFrontier))return s;var u=B(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}(e,t,n),o=a>r.first&&Ke(r,a-1).stateAfter,s=o?ut.fromSaved(r,o,a):new ut(r,Ve(r.mode),a);return r.iter(a,t,(function(n){pt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?s.save():null,s.nextLine()})),n&&(r.modeFrontier=s.line),s}function pt(e,t,n,r){var i=e.doc.mode,a=new We(t,e.options.tabSize,n);for(a.start=a.pos=r||0,""==t&&mt(i,n.state);!a.eol();)gt(i,a,n.state),a.start=a.pos}function mt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Ge(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function gt(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=Ge(e,n).mode);var a=e.token(t,n);if(t.pos>t.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}ut.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ut.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ut.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ut.fromSaved=function(e,t,n){return t instanceof ct?new ut(e,ze(e.mode,t.state),n,t.lookAhead):new ut(e,ze(e.mode,t),n)},ut.prototype.save=function(e){var t=!1!==e?ze(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ct(t,this.maxLookAhead):t};var vt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function bt(e,t,n,r){var i,a,o=e.doc,s=o.mode,l=Ke(o,(t=st(o,t)).line),c=ft(e,t.line,n),u=new We(l.text,e.options.tabSize,c);for(r&&(a=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=gt(s,u,c.state),r&&a.push(new vt(u,i,ze(o.mode,c.state)));return r?a:new vt(u,i,c.state)}function yt(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function Et(e,t,n,r,i,a,o){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,c=0,u=null,d=new We(t,e.options.tabSize,r),h=e.options.addModeClass&&[null];for(""==t&&yt(mt(n,r.state),a);!d.eol();){if(d.pos>e.options.maxHighlightLength?(s=!1,o&&pt(e,t,r,d.pos),d.pos=t.length,l=null):l=yt(gt(n,d,r.state,h),a),h){var f=h[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||u!=l){for(;c<d.start;)i(c=Math.min(d.start,c+5e3),u);u=l}d.start=d.pos}for(;c<d.pos;){var p=Math.min(d.pos,c+5e3);i(p,u),c=p}}var xt=!1,_t=!1;function kt(e,t,n){this.marker=e,this.from=t,this.to=n}function wt(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Ct(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function St(e,t){if(t.full)return null;var n=Ze(e,t.from.line)&&Ke(e,t.from.line).markedSpans,r=Ze(e,t.to.line)&&Ke(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,a=t.to.ch,o=0==tt(t.from,t.to),s=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker;if(null==a.from||(o.inclusiveLeft?a.from<=t:a.from<t)||a.from==t&&"bookmark"==o.type&&(!n||!a.marker.insertLeft)){var s=null==a.to||(o.inclusiveRight?a.to>=t:a.to>t);(r||(r=[])).push(new kt(o,a.from,s?null:a.to))}}return r}(n,i,o),l=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker;if(null==a.to||(o.inclusiveRight?a.to>=t:a.to>t)||a.from==t&&"bookmark"==o.type&&(!n||a.marker.insertLeft)){var s=null==a.from||(o.inclusiveLeft?a.from<=t:a.from<t);(r||(r=[])).push(new kt(o,s?null:a.from-t,null==a.to?null:a.to-t))}}return r}(r,a,o),c=1==t.text.length,u=Y(t.text).length+(c?i:0);if(s)for(var d=0;d<s.length;++d){var h=s[d];if(null==h.to){var f=wt(l,h.marker);f?c&&(h.to=null==f.to?null:f.to+u):h.to=i}}if(l)for(var p=0;p<l.length;++p){var m=l[p];null!=m.to&&(m.to+=u),null==m.from?wt(s,m.marker)||(m.from=u,c&&(s||(s=[])).push(m)):(m.from+=u,c&&(s||(s=[])).push(m))}s&&(s=Ot(s)),l&&l!=s&&(l=Ot(l));var g=[s];if(!c){var v,b=t.text.length-2;if(b>0&&s)for(var y=0;y<s.length;++y)null==s[y].to&&(v||(v=[])).push(new kt(s[y].marker,null,null));for(var E=0;E<b;++E)g.push(v);g.push(l)}return g}function Ot(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function At(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Tt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function It(e){return e.inclusiveLeft?-1:0}function Dt(e){return e.inclusiveRight?1:0}function Lt(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),a=tt(r.from,i.from)||It(e)-It(t);if(a)return-a;var o=tt(r.to,i.to)||Dt(e)-Dt(t);return o||t.id-e.id}function Rt(e,t){var n,r=_t&&e.markedSpans;if(r)for(var i=void 0,a=0;a<r.length;++a)(i=r[a]).marker.collapsed&&null==(t?i.from:i.to)&&(!n||Lt(n,i.marker)<0)&&(n=i.marker);return n}function Nt(e){return Rt(e,!0)}function jt(e){return Rt(e,!1)}function Mt(e,t){var n,r=_t&&e.markedSpans;if(r)for(var i=0;i<r.length;++i){var a=r[i];a.marker.collapsed&&(null==a.from||a.from<t)&&(null==a.to||a.to>t)&&(!n||Lt(n,a.marker)<0)&&(n=a.marker)}return n}function Pt(e,t,n,r,i){var a=Ke(e,t),o=_t&&a.markedSpans;if(o)for(var s=0;s<o.length;++s){var l=o[s];if(l.marker.collapsed){var c=l.marker.find(0),u=tt(c.from,n)||It(l.marker)-It(i),d=tt(c.to,r)||Dt(l.marker)-Dt(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(c.to,n)>=0:tt(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(c.from,r)<=0:tt(c.from,r)<0)))return!0}}}function Bt(e){for(var t;t=Nt(e);)e=t.find(-1,!0).line;return e}function Ft(e,t){var n=Ke(e,t),r=Bt(n);return n==r?t:Je(r)}function Ut(e,t){if(t>e.lastLine())return t;var n,r=Ke(e,t);if(!Ht(e,r))return t;for(;n=jt(r);)r=n.find(1,!0).line;return Je(r)+1}function Ht(e,t){var n=_t&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&zt(e,t,r))return!0}}function zt(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return zt(e,r.line,wt(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,a=0;a<t.markedSpans.length;++a)if((i=t.markedSpans[a]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&zt(e,t,i))return!0}function Gt(e){for(var t=0,n=(e=Bt(e)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var a=n.parent;a;a=(n=a).parent)for(var o=0;o<a.children.length;++o){var s=a.children[o];if(s==n)break;t+=s.height}return t}function Vt(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Nt(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=jt(r);){var a=t.find(0,!0);n-=r.text.length-a.from.ch,n+=(r=a.to.line).text.length-a.to.ch}return n}function Wt(e){var t=e.display,n=e.doc;t.maxLine=Ke(n,n.first),t.maxLineLength=Vt(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=Vt(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Kt=function(e,t,n){this.text=e,Tt(this,t),this.height=n?n(this):1};function qt(e){e.parent=null,At(e)}Kt.prototype.lineNo=function(){return Je(this)},be(Kt);var Yt={},Qt={};function Jt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Qt:Yt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Xt(e,t){var n=I("span",null,null,l?"padding-right: .1px":null),r={pre:I("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,o=void 0;r.pos=0,r.addToken=$t,Te(e.display.measure)&&(o=ce(a,e.doc.direction))&&(r.addToken=en(r.addToken,o)),r.map=[],nn(a,r,ht(e,a,t!=e.display.externalMeasured&&Je(a))),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=N(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=N(a.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ae(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return pe(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=N(r.pre.className,r.textClass||"")),r}function Zt(e){var t=T("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function $t(e,t,n,r,i,a,l){if(t){var c,u=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var a=e.charAt(i);" "!=a||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(a=" "),r+=a,n=" "==a}return r}(t,e.trailingSpace):t,d=e.cm.state.specialChars,h=!1;if(d.test(t)){c=document.createDocumentFragment();for(var f=0;;){d.lastIndex=f;var p=d.exec(t),m=p?p.index-f:t.length-f;if(m){var g=document.createTextNode(u.slice(f,f+m));o&&s<9?c.appendChild(T("span",[g])):c.appendChild(g),e.map.push(e.pos,e.pos+m,g),e.col+=m,e.pos+=m}if(!p)break;f+=m+1;var v=void 0;if("\t"==p[0]){var b=e.cm.options.tabSize,y=b-e.col%b;(v=c.appendChild(T("span",q(y),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=y}else"\r"==p[0]||"\n"==p[0]?((v=c.appendChild(T("span","\r"==p[0]?"␍":"","cm-invalidchar"))).setAttribute("cm-text",p[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),o&&s<9?c.appendChild(T("span",[v])):c.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),o&&s<9&&(h=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||r||i||h||a||l){var E=n||"";r&&(E+=r),i&&(E+=i);var x=T("span",[c],E,a);if(l)for(var _ in l)l.hasOwnProperty(_)&&"style"!=_&&"class"!=_&&x.setAttribute(_,l[_]);return e.content.appendChild(x)}e.content.appendChild(c)}}function en(e,t){return function(n,r,i,a,o,s,l){i=i?i+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+r.length;;){for(var d=void 0,h=0;h<t.length&&!((d=t[h]).to>c&&d.from<=c);h++);if(d.to>=u)return e(n,r,i,a,o,s,l);e(n,r.slice(0,d.to-c),i,a,null,s,l),a=null,r=r.slice(d.to-c),c=d.to}}}function tn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function nn(e,t,n){var r=e.markedSpans,i=e.text,a=0;if(r)for(var o,s,l,c,u,d,h,f=i.length,p=0,m=1,g="",v=0;;){if(v==p){l=c=u=s="",h=null,d=null,v=1/0;for(var b=[],y=void 0,E=0;E<r.length;++E){var x=r[E],_=x.marker;if("bookmark"==_.type&&x.from==p&&_.widgetNode)b.push(_);else if(x.from<=p&&(null==x.to||x.to>p||_.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&v>x.to&&(v=x.to,c=""),_.className&&(l+=" "+_.className),_.css&&(s=(s?s+";":"")+_.css),_.startStyle&&x.from==p&&(u+=" "+_.startStyle),_.endStyle&&x.to==v&&(y||(y=[])).push(_.endStyle,x.to),_.title&&((h||(h={})).title=_.title),_.attributes)for(var k in _.attributes)(h||(h={}))[k]=_.attributes[k];_.collapsed&&(!d||Lt(d.marker,_)<0)&&(d=x)}else x.from>p&&v>x.from&&(v=x.from)}if(y)for(var w=0;w<y.length;w+=2)y[w+1]==v&&(c+=" "+y[w]);if(!d||d.from==p)for(var C=0;C<b.length;++C)tn(t,0,b[C]);if(d&&(d.from||0)==p){if(tn(t,(null==d.to?f+1:d.to)-p,d.marker,null==d.from),null==d.to)return;d.to==p&&(d=!1)}}if(p>=f)break;for(var S=Math.min(f,v);;){if(g){var O=p+g.length;if(!d){var A=O>S?g.slice(0,S-p):g;t.addToken(t,A,o?o+l:l,u,p+A.length==v?c:"",s,h)}if(O>=S){g=g.slice(S-p),p=S;break}p=O,u=""}g=i.slice(a,a=n[m++]),o=Jt(n[m++],t.cm.options)}}else for(var T=1;T<n.length;T+=2)t.addToken(t,i.slice(a,a=n[T]),Jt(n[T+1],t.cm.options))}function rn(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=jt(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}(t),this.size=this.rest?Je(Y(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Ht(e,t)}function an(e,t,n){for(var r,i=[],a=t;a<n;a=r){var o=new rn(e.doc,Ke(e.doc,a),a);r=a+o.size,i.push(o)}return i}var on=null,sn=null;function ln(e,t){var n=he(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);on?r=on.delayedCallbacks:sn?r=sn:(r=sn=[],setTimeout(cn,0));for(var a=function(e){r.push((function(){return n[e].apply(null,i)}))},o=0;o<n.length;++o)a(o)}}function cn(){var e=sn;sn=null;for(var t=0;t<e.length;++t)e[t]()}function un(e,t,n,r){for(var i=0;i<t.changes.length;i++){var a=t.changes[i];"text"==a?fn(e,t):"gutter"==a?mn(e,t,n,r):"class"==a?pn(e,t):"widget"==a&&gn(e,t,r)}t.changes=null}function dn(e){return e.node==e.text&&(e.node=T("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),o&&s<8&&(e.node.style.zIndex=2)),e.node}function hn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Xt(e,t)}function fn(e,t){var n=t.text.className,r=hn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,pn(e,t)):n&&(t.text.className=n)}function pn(e,t){!function(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=dn(t);t.background=r.insertBefore(T("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?dn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function mn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=dn(t);t.gutterBackground=T("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var o=dn(t),s=t.gutter=T("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),o.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||a&&a["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(T("div",$e(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var l=0;l<e.display.gutterSpecs.length;++l){var c=e.display.gutterSpecs[l].className,u=a.hasOwnProperty(c)&&a[c];u&&s.appendChild(T("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function gn(e,t,n){t.alignable&&(t.alignable=null);for(var r=w("CodeMirror-linewidget"),i=t.node.firstChild,a=void 0;i;i=a)a=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);bn(e,t,n)}function vn(e,t,n,r){var i=hn(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),pn(e,t),mn(e,t,n,r),bn(e,t,r),t.node}function bn(e,t,n){if(yn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)yn(e,t.rest[r],t,n,!1)}function yn(e,t,n,r,i){if(t.widgets)for(var a=dn(n),o=0,s=t.widgets;o<s.length;++o){var l=s[o],c=T("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),En(l,c,n,r),e.display.input.setUneditable(c),i&&l.above?a.insertBefore(c,n.gutter||n.text):a.appendChild(c),ln(l,"redraw")}}function En(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function xn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!D(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),A(t.display.measure,T("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function _n(e,t){for(var n=ke(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function kn(e){return e.lineSpace.offsetTop}function wn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Cn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=A(e.measure,T("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function Sn(e){return 50-e.display.nativeBarWidth}function On(e){return e.display.scroller.clientWidth-Sn(e)-e.display.barWidth}function An(e){return e.display.scroller.clientHeight-Sn(e)-e.display.barHeight}function Tn(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(Je(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function In(e,t,n,r){return Rn(e,Ln(e,t),n,r)}function Dn(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ur(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function Ln(e,t){var n=Je(t),r=Dn(e,n);r&&!r.text?r=null:r&&r.changes&&(un(e,r,n,ar(e)),e.curOp.forceUpdate=!0),r||(r=function(e,t){var n=Je(t=Bt(t)),r=e.display.externalMeasured=new rn(e.doc,t,n);r.lineN=n;var i=r.built=Xt(e,r);return r.text=i.pre,A(e.display.lineMeasure,i.pre),r}(e,t));var i=Tn(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Rn(e,t,n,r,i){t.before&&(n=-1);var a,l=n+(r||"");return t.cache.hasOwnProperty(l)?a=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,n){var r=e.options.lineWrapping,i=r&&On(e);if(!t.measure.heights||r&&t.measure.width!=i){var a=t.measure.heights=[];if(r){t.measure.width=i;for(var o=t.text.firstChild.getClientRects(),s=0;s<o.length-1;s++){var l=o[s],c=o[s+1];Math.abs(l.bottom-c.bottom)>2&&a.push((l.bottom+c.top)/2-n.top)}}a.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(a=function(e,t,n,r){var i,a=Mn(t.map,n,r),l=a.node,c=a.start,u=a.end,d=a.collapse;if(3==l.nodeType){for(var h=0;h<4;h++){for(;c&&re(t.line.text.charAt(a.coverStart+c));)--c;for(;a.coverStart+u<a.coverEnd&&re(t.line.text.charAt(a.coverStart+u));)++u;if((i=o&&s<9&&0==c&&u==a.coverEnd-a.coverStart?l.parentNode.getBoundingClientRect():Pn(C(l,c,u).getClientRects(),r)).left||i.right||0==c)break;u=c,c-=1,d="right"}o&&s<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Ne)return Ne;var t=A(e,T("span","x")),n=t.getBoundingClientRect(),r=C(t,0,1).getBoundingClientRect();return Ne=Math.abs(n.left-r.left)>1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var f;c>0&&(d=r="right"),i=e.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==r?f.length-1:0]:l.getBoundingClientRect()}if(o&&s<9&&!c&&(!i||!i.left&&!i.right)){var p=l.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+ir(e.display),top:p.top,bottom:p.bottom}:jn}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,v=(m+g)/2,b=t.view.measure.heights,y=0;y<b.length-1&&!(v<b[y]);y++);var E=y?b[y-1]:0,x=b[y],_={left:("right"==d?i.right:i.left)-t.rect.left,right:("left"==d?i.left:i.right)-t.rect.left,top:E,bottom:x};return i.left||i.right||(_.bogus=!0),e.options.singleCursorHeightPerLine||(_.rtop=m,_.rbottom=g),_}(e,t,n,r)).bogus||(t.cache[l]=a)),{left:a.left,right:a.right,top:i?a.rtop:a.top,bottom:i?a.rbottom:a.bottom}}var Nn,jn={left:0,right:0,top:0,bottom:0};function Mn(e,t,n){for(var r,i,a,o,s,l,c=0;c<e.length;c+=3)if(s=e[c],l=e[c+1],t<s?(i=0,a=1,o="left"):t<l?a=1+(i=t-s):(c==e.length-3||t==l&&e[c+3]>t)&&(i=(a=l-s)-1,t>=l&&(o="right")),null!=i){if(r=e[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(o=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],o="left";if("right"==n&&i==l-s)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)r=e[(c+=3)+2],o="right";break}return{node:r,start:i,end:a,collapse:o,coverStart:s,coverEnd:l}}function Pn(e,t){var n=jn;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function Bn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function Fn(e){e.display.externalMeasure=null,O(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Bn(e.display.view[t])}function Un(e){Fn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Hn(){return u&&g?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function zn(){return u&&g?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Gn(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=xn(e.widgets[n]));return t}function Vn(e,t,n,r,i){if(!i){var a=Gn(t);n.top+=a,n.bottom+=a}if("line"==r)return n;r||(r="local");var o=Gt(t);if("local"==r?o+=kn(e.display):o-=e.display.viewOffset,"page"==r||"window"==r){var s=e.display.lineSpace.getBoundingClientRect();o+=s.top+("window"==r?0:zn());var l=s.left+("window"==r?0:Hn());n.left+=l,n.right+=l}return n.top+=o,n.bottom+=o,n}function Wn(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=Hn(),i-=zn();else if("local"==n||!n){var a=e.display.sizer.getBoundingClientRect();r+=a.left,i+=a.top}var o=e.display.lineSpace.getBoundingClientRect();return{left:r-o.left,top:i-o.top}}function Kn(e,t,n,r,i){return r||(r=Ke(e.doc,t.line)),Vn(e,r,In(e,r,t.ch,i),n)}function qn(e,t,n,r,i,a){function o(t,o){var s=Rn(e,i,t,o?"right":"left",a);return o?s.left=s.right:s.right=s.left,Vn(e,r,s,n)}r=r||Ke(e.doc,t.line),i||(i=Ln(e,r));var s=ce(r,e.doc.direction),l=t.ch,c=t.sticky;if(l>=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return o("before"==c?l-1:l,"before"==c);function u(e,t,n){return o(n?e-1:e,1==s[t].level!=n)}var d=se(s,l,c),h=oe,f=u(l,d,"before"==c);return null!=h&&(f.other=u(l,h,"before"!=c)),f}function Yn(e,t){var n=0;t=st(e.doc,t),e.options.lineWrapping||(n=ir(e.display)*t.ch);var r=Ke(e.doc,t.line),i=Gt(r)+kn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Qn(e,t,n,r,i){var a=et(e,t,n);return a.xRel=i,r&&(a.outside=r),a}function Jn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Qn(r.first,0,null,-1,-1);var i=Xe(r,n),a=r.first+r.size-1;if(i>a)return Qn(r.first+r.size-1,Ke(r,a).text.length,null,1,1);t<0&&(t=0);for(var o=Ke(r,i);;){var s=er(e,o,i,t,n),l=Mt(o,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;o=Ke(r,i=c.line)}}function Xn(e,t,n,r){r-=Gn(t);var i=t.text.length,a=ae((function(t){return Rn(e,n,t-1).bottom<=r}),i,0);return{begin:a,end:i=ae((function(t){return Rn(e,n,t).top>r}),a,i)}}function Zn(e,t,n,r){return n||(n=Ln(e,t)),Xn(e,t,n,Vn(e,t,Rn(e,n,r),"line").top)}function $n(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function er(e,t,n,r,i){i-=Gt(t);var a=Ln(e,t),o=Gn(t),s=0,l=t.text.length,c=!0,u=ce(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?nr:tr)(e,t,n,a,u,r,i);s=(c=1!=d.level)?d.from:d.to-1,l=c?d.to:d.from-1}var h,f,p=null,m=null,g=ae((function(t){var n=Rn(e,a,t);return n.top+=o,n.bottom+=o,!!$n(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=t,m=n),!0)}),s,l),v=!1;if(m){var b=r-m.left<m.right-r,y=b==c;g=p+(y?0:1),f=y?"after":"before",h=b?m.left:m.right}else{c||g!=l&&g!=s||g++,f=0==g?"after":g==t.text.length?"before":Rn(e,a,g-(c?1:0)).bottom+o<=i==c?"after":"before";var E=qn(e,et(n,g,f),"line",t,a);h=E.left,v=i<E.top?-1:i>=E.bottom?1:0}return Qn(n,g=ie(t.text,g,1),f,v,r-h)}function tr(e,t,n,r,i,a,o){var s=ae((function(s){var l=i[s],c=1!=l.level;return $n(qn(e,et(n,c?l.to:l.from,c?"before":"after"),"line",t,r),a,o,!0)}),0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=qn(e,et(n,c?l.from:l.to,c?"after":"before"),"line",t,r);$n(u,a,o,!0)&&u.top>o&&(l=i[s-1])}return l}function nr(e,t,n,r,i,a,o){var s=Xn(e,t,r,o),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,h=0;h<i.length;h++){var f=i[h];if(!(f.from>=c||f.to<=l)){var p=Rn(e,r,1!=f.level?Math.min(c,f.to)-1:Math.max(l,f.from)).right,m=p<a?a-p+1e9:p-a;(!u||d>m)&&(u=f,d=m)}}return u||(u=i[i.length-1]),u.from<l&&(u={from:l,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function rr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Nn){Nn=T("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Nn.appendChild(document.createTextNode("x")),Nn.appendChild(T("br"));Nn.appendChild(document.createTextNode("x"))}A(e.measure,Nn);var n=Nn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),O(e.measure),n||1}function ir(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=T("span","xxxxxxxxxx"),n=T("pre",[t],"CodeMirror-line-like");A(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function ar(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,a=t.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var s=e.display.gutterSpecs[o].className;n[s]=a.offsetLeft+a.clientLeft+i,r[s]=a.clientWidth}return{fixedPos:or(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function or(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function sr(e){var t=rr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/ir(e.display)-3);return function(i){if(Ht(e.doc,i))return 0;var a=0;if(i.widgets)for(var o=0;o<i.widgets.length;o++)i.widgets[o].height&&(a+=i.widgets[o].height);return n?a+(Math.ceil(i.text.length/r)||1)*t:a+t}}function lr(e){var t=e.doc,n=sr(e);t.iter((function(e){var t=n(e);t!=e.height&&Qe(e,t)}))}function cr(e,t,n,r){var i=e.display;if(!n&&"true"==ke(t).getAttribute("cm-not-content"))return null;var a,o,s=i.lineSpace.getBoundingClientRect();try{a=t.clientX-s.left,o=t.clientY-s.top}catch(e){return null}var l,c=Jn(e,a,o);if(r&&c.xRel>0&&(l=Ke(e.doc,c.line).text).length==c.ch){var u=B(l,l.length,e.options.tabSize)-l.length;c=et(c.line,Math.max(0,Math.round((a-Cn(e.display).left)/ir(e.display))-u))}return c}function ur(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function dr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)_t&&Ft(e.doc,t)<i.viewTo&&fr(e);else if(n<=i.viewFrom)_t&&Ut(e.doc,n+r)>i.viewFrom?fr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)fr(e);else if(t<=i.viewFrom){var a=pr(e,n,n+r,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=r):fr(e)}else if(n>=i.viewTo){var o=pr(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):fr(e)}else{var s=pr(e,t,t,-1),l=pr(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(an(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):fr(e)}var c=i.externalMeasured;c&&(n<c.lineN?c.lineN+=r:t<c.lineN+c.size&&(i.externalMeasured=null))}function hr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var a=r.view[ur(e,t)];if(null!=a.node){var o=a.changes||(a.changes=[]);-1==U(o,n)&&o.push(n)}}}function fr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function pr(e,t,n,r){var i,a=ur(e,t),o=e.display.view;if(!_t||n==e.doc.first+e.doc.size)return{index:a,lineN:n};for(var s=e.display.viewFrom,l=0;l<a;l++)s+=o[l].size;if(s!=t){if(r>0){if(a==o.length-1)return null;i=s+o[a].size-t,a++}else i=s-t;t+=i,n+=i}for(;Ft(e.doc,n)!=n;){if(a==(r<0?0:o.length-1))return null;n+=r*o[a-(r<0?1:0)].size,a+=r}return{index:a,lineN:n}}function mr(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function gr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function vr(e,t){void 0===t&&(t=!0);for(var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),a=r.selection=document.createDocumentFragment(),o=0;o<n.sel.ranges.length;o++)if(t||o!=n.sel.primIndex){var s=n.sel.ranges[o];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var l=s.empty();(l||e.options.showCursorWhenSelecting)&&br(e,s.head,i),l||Er(e,s,a)}}return r}function br(e,t,n){var r=qn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(T("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var a=n.appendChild(T("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=r.other.left+"px",a.style.top=r.other.top+"px",a.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function yr(e,t){return e.top-t.top||e.left-t.left}function Er(e,t,n){var r=e.display,i=e.doc,a=document.createDocumentFragment(),o=Cn(e.display),s=o.left,l=Math.max(r.sizerWidth,On(e)-r.sizer.offsetLeft)-o.right,c="ltr"==i.direction;function u(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),a.appendChild(T("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?l-e:n)+"px;\n height: "+(r-t)+"px"))}function d(t,n,r){var a,o,d=Ke(i,t),h=d.text.length;function f(n,r){return Kn(e,et(t,n),"div",d,r)}function p(t,n,r){var i=Zn(e,d,null,t),a="ltr"==n==("after"==r)?"left":"right";return f("after"==r?i.begin:i.end-(/\s/.test(d.text.charAt(i.end-1))?2:1),a)[a]}var m=ce(d,i.direction);return function(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,a=0;a<e.length;++a){var o=e[a];(o.from<n&&o.to>t||t==n&&o.to==t)&&(r(Math.max(o.from,t),Math.min(o.to,n),1==o.level?"rtl":"ltr",a),i=!0)}i||r(t,n,"ltr")}(m,n||0,null==r?h:r,(function(e,t,i,d){var g="ltr"==i,v=f(e,g?"left":"right"),b=f(t-1,g?"right":"left"),y=null==n&&0==e,E=null==r&&t==h,x=0==d,_=!m||d==m.length-1;if(b.top-v.top<=3){var k=(c?E:y)&&_,w=(c?y:E)&&x?s:(g?v:b).left,C=k?l:(g?b:v).right;u(w,v.top,C-w,v.bottom)}else{var S,O,A,T;g?(S=c&&y&&x?s:v.left,O=c?l:p(e,i,"before"),A=c?s:p(t,i,"after"),T=c&&E&&_?l:b.right):(S=c?p(e,i,"before"):s,O=!c&&y&&x?l:v.right,A=!c&&E&&_?s:b.left,T=c?p(t,i,"after"):l),u(S,v.top,O-S,v.bottom),v.bottom<b.top&&u(s,v.bottom,null,b.top),u(A,b.top,T-A,b.bottom)}(!a||yr(v,a)<0)&&(a=v),yr(b,a)<0&&(a=b),(!o||yr(v,o)<0)&&(o=v),yr(b,o)<0&&(o=b)})),{start:a,end:o}}var h=t.from(),f=t.to();if(h.line==f.line)d(h.line,h.ch,f.ch);else{var p=Ke(i,h.line),m=Ke(i,f.line),g=Bt(p)==Bt(m),v=d(h.line,h.ch,g?p.text.length+1:null).end,b=d(f.line,g?0:null,f.ch).start;g&&(v.top<b.top-2?(u(v.right,v.top,null,v.bottom),u(s,b.top,b.left,b.bottom)):u(v.right,v.top,b.left-v.right,v.bottom)),v.bottom<b.top&&u(s,v.bottom,null,b.top)}n.appendChild(a)}function xr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||Cr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function _r(e){e.state.focused||(e.display.input.focus(),wr(e))}function kr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Cr(e))}),100)}function wr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(pe(e,"focus",e,t),e.state.focused=!0,R(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),xr(e))}function Cr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(pe(e,"blur",e,t),e.state.focused=!1,S(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Sr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var i=t.view[r],a=e.options.lineWrapping,l=void 0,c=0;if(!i.hidden){if(o&&s<8){var u=i.node.offsetTop+i.node.offsetHeight;l=u-n,n=u}else{var d=i.node.getBoundingClientRect();l=d.bottom-d.top,!a&&i.text.firstChild&&(c=i.text.firstChild.getBoundingClientRect().right-d.left-1)}var h=i.line.height-l;if((h>.005||h<-.005)&&(Qe(i.line,l),Or(i.line),i.rest))for(var f=0;f<i.rest.length;f++)Or(i.rest[f]);if(c>e.display.sizerWidth){var p=Math.ceil(c/ir(e.display));p>e.display.maxLineLength&&(e.display.maxLineLength=p,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Or(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function Ar(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-kn(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,a=Xe(t,r),o=Xe(t,i);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;s<a?(a=s,o=Xe(t,Gt(Ke(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=o&&(a=Xe(t,Gt(Ke(t,l))-e.wrapper.clientHeight),o=l)}return{from:a,to:Math.max(o,a+1)}}function Tr(e,t){var n=e.display,r=rr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,a=An(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var s=e.doc.height+wn(n),l=t.top<r,c=t.bottom>s-r;if(t.top<i)o.scrollTop=l?0:t.top;else if(t.bottom>i+a){var u=Math.min(t.top,(c?s:t.bottom)-a);u!=i&&(o.scrollTop=u)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-d,f=On(e)-n.gutters.offsetWidth,p=t.right-t.left>f;return p&&(t.right=t.left+f),t.left<10?o.scrollLeft=0:t.left<h?o.scrollLeft=Math.max(0,t.left+d-(p?0:10)):t.right>f+h-3&&(o.scrollLeft=t.right+(p?0:10)-f),o}function Ir(e,t){null!=t&&(Rr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Dr(e){Rr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Lr(e,t,n){null==t&&null==n||Rr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Rr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Nr(e,Yn(e,t.from),Yn(e,t.to),t.margin))}function Nr(e,t,n,r){var i=Tr(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Lr(e,i.scrollLeft,i.scrollTop)}function jr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||li(e,{top:t}),Mr(e,t,!0),n&&li(e),ri(e,100))}function Mr(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Pr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,di(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Br(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+wn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Sn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Fr=function(e,t,n){this.cm=n;var r=this.vert=T("div",[T("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=T("div",[T("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),de(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),de(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,o&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Fr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Fr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Fr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Fr.prototype.zeroWidthHack=function(){var e=b&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new F,this.disableVert=new F},Fr.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,(function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}))},Fr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ur=function(){};function Hr(e,t){t||(t=Br(e));var n=e.display.barWidth,r=e.display.barHeight;zr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Sr(e),zr(e,Br(e)),n=e.display.barWidth,r=e.display.barHeight}function zr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Ur.prototype.update=function(){return{bottom:0,right:0}},Ur.prototype.setScrollLeft=function(){},Ur.prototype.setScrollTop=function(){},Ur.prototype.clear=function(){};var Gr={native:Fr,null:Ur};function Vr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&S(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Gr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),de(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?Pr(e,t):jr(e,t)}),e),e.display.scrollbars.addClass&&R(e.display.wrapper,e.display.scrollbars.addClass)}var Wr=0;function Kr(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Wr},t=e.curOp,on?on.ops.push(t):t.ownsGroup=on={ops:[t],delayedCallbacks:[]}}function qr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}(n)}finally{on=null,t(n)}}(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,n=0;n<t.length;n++)Yr(t[n]);for(var r=0;r<t.length;r++)Qr(t[r]);for(var i=0;i<t.length;i++)Jr(t[i]);for(var a=0;a<t.length;a++)Xr(t[a]);for(var o=0;o<t.length;o++)Zr(t[o])}(e)}))}function Yr(e){var t=e.cm,n=t.display;!function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Sn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Sn(e)+"px",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&Wt(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ai(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qr(e){e.updatedDisplay=e.mustUpdate&&oi(e.cm,e.update)}function Jr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Sr(t),e.barMeasure=Br(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=In(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Sn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-On(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Xr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Pr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==L();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Hr(t,e.barMeasure),e.updatedDisplay&&ui(t,e.barMeasure),e.selectionChanged&&xr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&_r(e.cm)}function Zr(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&si(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&Mr(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Pr(t,e.scrollLeft,!0,!0),e.scrollToPos&&function(e,t){if(!me(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var a=T("div","",null,"position: absolute;\n top: "+(t.top-n.viewOffset-kn(e.display))+"px;\n height: "+(t.bottom-t.top+Sn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}}(t,function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?et(t.line,t.ch+1,"before"):t);for(var a=0;a<5;a++){var o=!1,s=qn(e,t),l=n&&n!=t?qn(e,n):s,c=Tr(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(jr(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),null!=c.scrollLeft&&(Pr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(o=!0)),!o)break}return i}(t,st(r,e.scrollToPos.from),st(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(i)for(var o=0;o<i.length;++o)i[o].lines.length||pe(i[o],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&pe(a[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&pe(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function $r(e,t){if(e.curOp)return t();Kr(e);try{return t()}finally{qr(e)}}function ei(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Kr(e);try{return t.apply(e,arguments)}finally{qr(e)}}}function ti(e){return function(){if(this.curOp)return e.apply(this,arguments);Kr(this);try{return e.apply(this,arguments)}finally{qr(this)}}}function ni(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Kr(t);try{return e.apply(this,arguments)}finally{qr(t)}}}function ri(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,M(ii,e))}function ii(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=ft(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(a){if(r.line>=e.display.viewFrom){var o=a.styles,s=a.text.length>e.options.maxHighlightLength?ze(t.mode,r.state):null,l=dt(e,a,r,!0);s&&(r.state=s),a.styles=l.styles;var c=a.styleClasses,u=l.classes;u?a.styleClasses=u:c&&(a.styleClasses=null);for(var d=!o||o.length!=a.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),h=0;!d&&h<o.length;++h)d=o[h]!=a.styles[h];d&&i.push(r.line),a.stateAfter=r.save(),r.nextLine()}else a.text.length<=e.options.maxHighlightLength&&pt(e,a.text,r),a.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return ri(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&$r(e,(function(){for(var t=0;t<i.length;t++)hr(e,i[t],"text")}))}}var ai=function(e,t,n){var r=e.display;this.viewport=t,this.visible=Ar(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=On(e),this.force=n,this.dims=ar(e),this.events=[]};function oi(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return fr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==mr(e))return!1;hi(e)&&(fr(e),t.dims=ar(e));var i=r.first+r.size,a=Math.max(t.visible.from-e.options.viewportMargin,r.first),o=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<a&&a-n.viewFrom<20&&(a=Math.max(r.first,n.viewFrom)),n.viewTo>o&&n.viewTo-o<20&&(o=Math.min(i,n.viewTo)),_t&&(a=Ft(e.doc,a),o=Ut(e.doc,o));var s=a!=n.viewFrom||o!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=an(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=an(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(ur(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(an(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,ur(e,n)))),r.viewTo=n}(e,a,o),n.viewOffset=Gt(Ke(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=mr(e);if(!s&&0==c&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=L();if(!t||!D(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&D(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return c>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,a=r.lineDiv,o=a.firstChild;function s(t){var n=t.nextSibling;return l&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,d=0;d<c.length;d++){var h=c[d];if(h.hidden);else if(h.node&&h.node.parentNode==a){for(;o!=h.node;)o=s(o);var f=i&&null!=t&&t<=u&&h.lineNumber;h.changes&&(U(h.changes,"gutter")>-1&&(f=!1),un(e,h,u,n)),f&&(O(h.lineNumber),h.lineNumber.appendChild(document.createTextNode($e(e.options,u)))),o=h.node.nextSibling}else{var p=vn(e,h,u,n);a.insertBefore(p,o)}u+=h.size}for(;o;)o=s(o)}(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=L()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&D(document.body,e.anchorNode)&&D(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(u),O(n.cursorDiv),O(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ri(e,400)),n.updateLineNumbers=null,!0}function si(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=On(e))r&&(t.visible=Ar(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+wn(e.display)-An(e),n.top)}),t.visible=Ar(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!oi(e,t))break;Sr(e);var i=Br(e);gr(e),Hr(e,i),ui(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function li(e,t){var n=new ai(e,t);if(oi(e,n)){Sr(e),si(e,n);var r=Br(e);gr(e),Hr(e,r),ui(e,r),n.finish()}}function ci(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function ui(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Sn(e)+"px"}function di(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=or(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=r+"px",o=0;o<n.length;o++)if(!n[o].hidden){e.options.fixedGutter&&(n[o].gutter&&(n[o].gutter.style.left=a),n[o].gutterBackground&&(n[o].gutterBackground.style.left=a));var s=n[o].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=a}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function hi(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=$e(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(T("div",[T("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=i.firstChild.offsetWidth,o=i.offsetWidth-a;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(a,r.lineGutter.offsetWidth-o)+1,r.lineNumWidth=r.lineNumInnerWidth+o,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",ci(e.display),!0}return!1}function fi(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var a=e[i],o=null;if("string"!=typeof a&&(o=a.style,a=a.className),"CodeMirror-linenumbers"==a){if(!t)continue;r=!0}n.push({className:a,style:o})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function pi(e){var t=e.gutters,n=e.gutterSpecs;O(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],a=i.className,o=i.style,s=t.appendChild(T("div",null,"CodeMirror-gutter "+a));o&&(s.style.cssText=o),"CodeMirror-linenumbers"==a&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",ci(e)}function mi(e){pi(e.display),dr(e),di(e)}function gi(e,t,r,i){var a=this;this.input=r,a.scrollbarFiller=T("div",null,"CodeMirror-scrollbar-filler"),a.scrollbarFiller.setAttribute("cm-not-content","true"),a.gutterFiller=T("div",null,"CodeMirror-gutter-filler"),a.gutterFiller.setAttribute("cm-not-content","true"),a.lineDiv=I("div",null,"CodeMirror-code"),a.selectionDiv=T("div",null,null,"position: relative; z-index: 1"),a.cursorDiv=T("div",null,"CodeMirror-cursors"),a.measure=T("div",null,"CodeMirror-measure"),a.lineMeasure=T("div",null,"CodeMirror-measure"),a.lineSpace=I("div",[a.measure,a.lineMeasure,a.selectionDiv,a.cursorDiv,a.lineDiv],null,"position: relative; outline: none");var c=I("div",[a.lineSpace],"CodeMirror-lines");a.mover=T("div",[c],null,"position: relative"),a.sizer=T("div",[a.mover],"CodeMirror-sizer"),a.sizerWidth=null,a.heightForcer=T("div",null,null,"position: absolute; height: 50px; width: 1px;"),a.gutters=T("div",null,"CodeMirror-gutters"),a.lineGutter=null,a.scroller=T("div",[a.sizer,a.heightForcer,a.gutters],"CodeMirror-scroll"),a.scroller.setAttribute("tabIndex","-1"),a.wrapper=T("div",[a.scrollbarFiller,a.gutterFiller,a.scroller],"CodeMirror"),o&&s<8&&(a.gutters.style.zIndex=-1,a.scroller.style.paddingRight=0),l||n&&v||(a.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(a.wrapper):e(a.wrapper)),a.viewFrom=a.viewTo=t.first,a.reportedViewFrom=a.reportedViewTo=t.first,a.view=[],a.renderedView=null,a.externalMeasured=null,a.viewOffset=0,a.lastWrapHeight=a.lastWrapWidth=0,a.updateLineNumbers=null,a.nativeBarWidth=a.barHeight=a.barWidth=0,a.scrollbarsClipped=!1,a.lineNumWidth=a.lineNumInnerWidth=a.lineNumChars=null,a.alignWidgets=!1,a.cachedCharWidth=a.cachedTextHeight=a.cachedPaddingH=null,a.maxLine=null,a.maxLineLength=0,a.maxLineChanged=!1,a.wheelDX=a.wheelDY=a.wheelStartX=a.wheelStartY=null,a.shift=!1,a.selForContextMenu=null,a.activeTouch=null,a.gutterSpecs=fi(i.gutters,i.lineNumbers),pi(a),r.init(a)}ai.prototype.signal=function(e,t){ve(e,t)&&this.events.push(arguments)},ai.prototype.finish=function(){for(var e=0;e<this.events.length;e++)pe.apply(null,this.events[e])};var vi=0,bi=null;function yi(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function Ei(e){var t=yi(e);return t.x*=bi,t.y*=bi,t}function xi(e,t){var r=yi(t),i=r.x,a=r.y,o=e.display,s=o.scroller,c=s.scrollWidth>s.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||a&&u){if(a&&b&&l)e:for(var h=t.target,f=o.view;h!=s;h=h.parentNode)for(var p=0;p<f.length;p++)if(f[p].node==h){e.display.currentWheelTarget=h;break e}if(i&&!n&&!d&&null!=bi)return a&&u&&jr(e,Math.max(0,s.scrollTop+a*bi)),Pr(e,Math.max(0,s.scrollLeft+i*bi)),(!a||a&&u)&&ye(t),void(o.wheelStartX=null);if(a&&null!=bi){var m=a*bi,g=e.doc.scrollTop,v=g+o.wrapper.clientHeight;m<0?g=Math.max(0,g+m-50):v=Math.min(e.doc.height,v+m+50),li(e,{top:g,bottom:v})}vi<20&&(null==o.wheelStartX?(o.wheelStartX=s.scrollLeft,o.wheelStartY=s.scrollTop,o.wheelDX=i,o.wheelDY=a,setTimeout((function(){if(null!=o.wheelStartX){var e=s.scrollLeft-o.wheelStartX,t=s.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(bi=(bi*vi+n)/(vi+1),++vi)}}),200)):(o.wheelDX+=i,o.wheelDY+=a))}}o?bi=-.53:n?bi=15:u?bi=-.7:h&&(bi=-1/3);var _i=function(e,t){this.ranges=e,this.primIndex=t};_i.prototype.primary=function(){return this.ranges[this.primIndex]},_i.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!nt(n.anchor,r.anchor)||!nt(n.head,r.head))return!1}return!0},_i.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new ki(rt(this.ranges[t].anchor),rt(this.ranges[t].head));return new _i(e,this.primIndex)},_i.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},_i.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(tt(t,r.from())>=0&&tt(e,r.to())<=0)return n}return-1};var ki=function(e,t){this.anchor=e,this.head=t};function wi(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return tt(e.from(),t.from())})),n=U(t,i);for(var a=1;a<t.length;a++){var o=t[a],s=t[a-1],l=tt(s.to(),o.from());if(r&&!o.empty()?l>0:l>=0){var c=at(s.from(),o.from()),u=it(s.to(),o.to()),d=s.empty()?o.from()==o.head:s.from()==s.head;a<=n&&--n,t.splice(--a,2,new ki(d?u:c,d?c:u))}}return new _i(t,n)}function Ci(e,t){return new _i([new ki(e,t||e)],0)}function Si(e){return e.text?et(e.from.line+e.text.length-1,Y(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Oi(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return Si(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Si(t).ch-t.to.ch),et(n,r)}function Ai(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new ki(Oi(i.anchor,t),Oi(i.head,t)))}return wi(e.cm,n,e.sel.primIndex)}function Ti(e,t,n){return e.line==t.line?et(n.line,e.ch-t.ch+n.ch):et(n.line+(e.line-t.line),e.ch)}function Ii(e){e.doc.mode=Fe(e.options,e.doc.modeOption),Di(e)}function Di(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ri(e,100),e.state.modeGen++,e.curOp&&dr(e)}function Li(e,t){return 0==t.from.ch&&0==t.to.ch&&""==Y(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ri(e,t,n,r){function i(e){return n?n[e]:null}function a(e,n,i){!function(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),At(e),Tt(e,n);var i=r?r(e):1;i!=e.height&&Qe(e,i)}(e,n,i,r),ln(e,"change",e,t)}function o(e,t){for(var n=[],a=e;a<t;++a)n.push(new Kt(c[a],i(a),r));return n}var s=t.from,l=t.to,c=t.text,u=Ke(e,s.line),d=Ke(e,l.line),h=Y(c),f=i(c.length-1),p=l.line-s.line;if(t.full)e.insert(0,o(0,c.length)),e.remove(c.length,e.size-c.length);else if(Li(e,t)){var m=o(0,c.length-1);a(d,d.text,f),p&&e.remove(s.line,p),m.length&&e.insert(s.line,m)}else if(u==d)if(1==c.length)a(u,u.text.slice(0,s.ch)+h+u.text.slice(l.ch),f);else{var g=o(1,c.length-1);g.push(new Kt(h+u.text.slice(l.ch),f,r)),a(u,u.text.slice(0,s.ch)+c[0],i(0)),e.insert(s.line+1,g)}else if(1==c.length)a(u,u.text.slice(0,s.ch)+c[0]+d.text.slice(l.ch),i(0)),e.remove(s.line+1,p);else{a(u,u.text.slice(0,s.ch)+c[0],i(0)),a(d,h+d.text.slice(l.ch),f);var v=o(1,c.length-1);p>1&&e.remove(s.line+1,p-1),e.insert(s.line+1,v)}ln(e,"change",e,t)}function Ni(e,t,n){!function e(r,i,a){if(r.linked)for(var o=0;o<r.linked.length;++o){var s=r.linked[o];if(s.doc!=i){var l=a&&s.sharedHist;n&&!l||(t(s.doc,l),e(s.doc,r,l))}}}(e,null,!0)}function ji(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,lr(e),Ii(e),Mi(e),e.options.lineWrapping||Wt(e),e.options.mode=t.modeOption,dr(e)}function Mi(e){("rtl"==e.doc.direction?R:S)(e.display.lineDiv,"CodeMirror-rtl")}function Pi(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Bi(e,t){var n={from:rt(t.from),to:Si(t),text:qe(e,t.from,t.to)};return Gi(e,n,t.from.line,t.to.line+1),Ni(e,(function(e){return Gi(e,n,t.from.line,t.to.line+1)}),!0),n}function Fi(e){for(;e.length&&Y(e).ranges;)e.pop()}function Ui(e,t,n,r){var i=e.history;i.undone.length=0;var a,o,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(a=function(e,t){return t?(Fi(e.done),Y(e.done)):e.done.length&&!Y(e.done).ranges?Y(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Y(e.done)):void 0}(i,i.lastOp==r)))o=Y(a.changes),0==tt(t.from,t.to)&&0==tt(t.from,o.to)?o.to=Si(t):a.changes.push(Bi(e,t));else{var l=Y(i.done);for(l&&l.ranges||zi(e.sel,i.done),a={changes:[Bi(e,t)],generation:i.generation},i.done.push(a);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,o||pe(e,"historyAdded")}function Hi(e,t,n,r){var i=e.history,a=r&&r.origin;n==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,a,Y(i.done),t))?i.done[i.done.length-1]=t:zi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=n,r&&!1!==r.clearRedo&&Fi(i.undone)}function zi(e,t){var n=Y(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Gi(e,t,n,r){var i=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[a]=n.markedSpans),++a}))}function Vi(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Wi(e,t){var n=function(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(Vi(n[i]));return r}(e,t),r=St(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var a=n[i],o=r[i];if(a&&o)e:for(var s=0;s<o.length;++s){for(var l=o[s],c=0;c<a.length;++c)if(a[c].marker==l.marker)continue e;a.push(l)}else o&&(n[i]=o)}return n}function Ki(e,t,n){for(var r=[],i=0;i<e.length;++i){var a=e[i];if(a.ranges)r.push(n?_i.prototype.deepCopy.call(a):a);else{var o=a.changes,s=[];r.push({changes:s});for(var l=0;l<o.length;++l){var c=o[l],u=void 0;if(s.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&U(t,Number(u[1]))>-1&&(Y(s)[d]=c[d],delete c[d])}}}return r}function qi(e,t,n,r){if(r){var i=e.anchor;if(n){var a=tt(t,i)<0;a!=tt(n,i)<0?(i=t,t=n):a!=tt(t,n)<0&&(t=n)}return new ki(i,t)}return new ki(n||t,t)}function Yi(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),$i(e,new _i([qi(e.sel.primary(),t,n,i)],0),r)}function Qi(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),a=0;a<e.sel.ranges.length;a++)r[a]=qi(e.sel.ranges[a],t[a],null,i);$i(e,wi(e.cm,r,e.sel.primIndex),n)}function Ji(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,$i(e,wi(e.cm,i,e.sel.primIndex),r)}function Xi(e,t,n,r){$i(e,Ci(t,n),r)}function Zi(e,t,n){var r=e.history.done,i=Y(r);i&&i.ranges?(r[r.length-1]=t,ea(e,t,n)):$i(e,t,n)}function $i(e,t,n){ea(e,t,n),Hi(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function ea(e,t,n){(ve(e,"beforeSelectionChange")||e.cm&&ve(e.cm,"beforeSelectionChange"))&&(t=function(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new ki(st(e,t[n].anchor),st(e,t[n].head))},origin:n&&n.origin};return pe(e,"beforeSelectionChange",e,r),e.cm&&pe(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?wi(e.cm,r.ranges,r.ranges.length-1):t}(e,t,n));var r=n&&n.bias||(tt(t.primary().head,e.sel.primary().head)<0?-1:1);ta(e,ra(e,t,r,!0)),n&&!1===n.scroll||!e.cm||Dr(e.cm)}function ta(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,ge(e.cm)),ln(e,"cursorActivity",e))}function na(e){ta(e,ra(e,e.sel,null,!1))}function ra(e,t,n,r){for(var i,a=0;a<t.ranges.length;a++){var o=t.ranges[a],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],l=aa(e,o.anchor,s&&s.anchor,n,r),c=aa(e,o.head,s&&s.head,n,r);(i||l!=o.anchor||c!=o.head)&&(i||(i=t.ranges.slice(0,a)),i[a]=new ki(l,c))}return i?wi(e.cm,i,t.primIndex):t}function ia(e,t,n,r,i){var a=Ke(e,t.line);if(a.markedSpans)for(var o=0;o<a.markedSpans.length;++o){var s=a.markedSpans[o],l=s.marker,c="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,u="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==s.from||(c?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(u?s.to>=t.ch:s.to>t.ch))){if(i&&(pe(l,"beforeCursorEnter"),l.explicitlyCleared)){if(a.markedSpans){--o;continue}break}if(!l.atomic)continue;if(n){var d=l.find(r<0?1:-1),h=void 0;if((r<0?u:c)&&(d=oa(e,d,-r,d&&d.line==t.line?a:null)),d&&d.line==t.line&&(h=tt(d,n))&&(r<0?h<0:h>0))return ia(e,d,t,r,i)}var f=l.find(r<0?-1:1);return(r<0?c:u)&&(f=oa(e,f,r,f.line==t.line?a:null)),f?ia(e,f,t,r,i):null}}return t}function aa(e,t,n,r,i){var a=r||1,o=ia(e,t,n,a,i)||!i&&ia(e,t,n,a,!0)||ia(e,t,n,-a,i)||!i&&ia(e,t,n,-a,!0);return o||(e.cantEdit=!0,et(e.first,0))}function oa(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?st(e,et(t.line-1)):null:n>0&&t.ch==(r||Ke(e,t.line)).text.length?t.line<e.first+e.size-1?et(t.line+1,0):null:new et(t.line,t.ch+n)}function sa(e){e.setSelection(et(e.firstLine(),0),et(e.lastLine()),z)}function la(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,i,a){t&&(r.from=st(e,t)),n&&(r.to=st(e,n)),i&&(r.text=i),void 0!==a&&(r.origin=a)}),pe(e,"beforeChange",e,r),e.cm&&pe(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function ca(e,t,n){if(e.cm){if(!e.cm.curOp)return ei(e.cm,ca)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"))||(t=la(e,t,!0))){var r=xt&&!n&&function(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=U(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var i=[{from:t,to:n}],a=0;a<r.length;++a)for(var o=r[a],s=o.find(0),l=0;l<i.length;++l){var c=i[l];if(!(tt(c.to,s.from)<0||tt(c.from,s.to)>0)){var u=[l,1],d=tt(c.from,s.from),h=tt(c.to,s.to);(d<0||!o.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(h>0||!o.inclusiveRight&&!h)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)ua(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else ua(e,t)}}function ua(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var n=Ai(e,t);Ui(e,t,n,e.cm?e.cm.curOp.id:NaN),fa(e,t,n,St(e,t));var r=[];Ni(e,(function(e,n){n||-1!=U(r,e.history)||(va(e.history,t),r.push(e.history)),fa(e,t,null,St(e,t))}))}}function da(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,a=e.history,o=e.sel,s="undo"==t?a.done:a.undone,l="undo"==t?a.undone:a.done,c=0;c<s.length&&(i=s[c],n?!i.ranges||i.equals(e.sel):i.ranges);c++);if(c!=s.length){for(a.lastOrigin=a.lastSelOrigin=null;;){if(!(i=s.pop()).ranges){if(r)return void s.push(i);break}if(zi(i,l),n&&!i.equals(e.sel))return void $i(e,i,{clearRedo:!1});o=i}var u=[];zi(o,l),l.push({changes:u,generation:a.generation}),a.generation=i.generation||++a.maxGeneration;for(var d=ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"),h=function(n){var r=i.changes[n];if(r.origin=t,d&&!la(e,r,!1))return s.length=0,{};u.push(Bi(e,r));var a=n?Ai(e,r):Y(s);fa(e,r,a,Wi(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:Si(r)});var o=[];Ni(e,(function(e,t){t||-1!=U(o,e.history)||(va(e.history,r),o.push(e.history)),fa(e,r,null,Wi(e,r))}))},f=i.changes.length-1;f>=0;--f){var p=h(f);if(p)return p.v}}}}function ha(e,t){if(0!=t&&(e.first+=t,e.sel=new _i(Q(e.sel.ranges,(function(e){return new ki(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){dr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)hr(e.cm,r,"gutter")}}function fa(e,t,n,r){if(e.cm&&!e.cm.curOp)return ei(e.cm,fa)(e,t,n,r);if(t.to.line<e.first)ha(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);ha(e,i),t={from:et(e.first,0),to:et(t.to.line+i,t.to.ch),text:[Y(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:et(a,Ke(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=qe(e,t.from,t.to),n||(n=Ai(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,a=t.from,o=t.to,s=!1,l=a.line;e.options.lineWrapping||(l=Je(Bt(Ke(r,a.line))),r.iter(l,o.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&ge(e),Ri(r,t,n,sr(e)),e.options.lineWrapping||(r.iter(l,a.line+t.text.length,(function(e){var t=Vt(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=Ke(e,r).stateAfter;if(i&&(!(i instanceof ct)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}(r,a.line),ri(e,400);var c=t.text.length-(o.line-a.line)-1;t.full?dr(e):a.line!=o.line||1!=t.text.length||Li(e.doc,t)?dr(e,a.line,o.line+1,c):hr(e,a.line,"text");var u=ve(e,"changes"),d=ve(e,"change");if(d||u){var h={from:a,to:o,text:t.text,removed:t.removed,origin:t.origin};d&&ln(e,"change",e,h),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}(e.cm,t,r):Ri(e,t,r),ea(e,n,z),e.cantEdit&&aa(e,et(e.firstLine(),0))&&(e.cantEdit=!1)}}function pa(e,t,n,r,i){var a;r||(r=n),tt(r,n)<0&&(n=(a=[r,n])[0],r=a[1]),"string"==typeof t&&(t=e.splitLines(t)),ca(e,{from:n,to:r,text:t,origin:i})}function ma(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function ga(e,t,n,r){for(var i=0;i<e.length;++i){var a=e[i],o=!0;if(a.ranges){a.copied||((a=e[i]=a.deepCopy()).copied=!0);for(var s=0;s<a.ranges.length;s++)ma(a.ranges[s].anchor,t,n,r),ma(a.ranges[s].head,t,n,r)}else{for(var l=0;l<a.changes.length;++l){var c=a.changes[l];if(n<c.from.line)c.from=et(c.from.line+r,c.from.ch),c.to=et(c.to.line+r,c.to.ch);else if(t<=c.to.line){o=!1;break}}o||(e.splice(0,i+1),i=0)}}}function va(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;ga(e.done,n,r,i),ga(e.undone,n,r,i)}function ba(e,t,n,r){var i=t,a=t;return"number"==typeof t?a=Ke(e,ot(e,t)):i=Je(t),null==i?null:(r(a,i)&&e.cm&&hr(e.cm,i,n),a)}function ya(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function Ea(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}ki.prototype.from=function(){return at(this.anchor,this.head)},ki.prototype.to=function(){return it(this.anchor,this.head)},ki.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},ya.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,qt(i),ln(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},Ea.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var a=Math.min(t,i-e),o=r.height;if(r.removeInner(e,a),this.height-=o-r.height,i==a&&(this.children.splice(n--,1),r.parent=null),0==(t-=a))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ya))){var s=[];this.collapse(s),this.children=[new ya(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],a=i.chunkSize();if(e<=a){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var o=i.lines.length%25+25,s=o;s<i.lines.length;){var l=new ya(i.lines.slice(s,s+=25));i.height-=l.height,this.children.splice(++r,0,l),l.parent=this}i.lines=i.lines.slice(0,o),this.maybeSpill()}break}e-=a}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new Ea(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=U(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new Ea(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],a=i.chunkSize();if(e<a){var o=Math.min(t,a-e);if(i.iterN(e,o,n))return!0;if(0==(t-=o))break;e=0}else e-=a}}};var xa=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};function _a(e,t,n){Gt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Ir(e,n)}xa.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=Je(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var a=xn(this);Qe(n,Math.max(0,n.height-a)),e&&($r(e,(function(){_a(e,n,-a),hr(e,r,"widget")})),ln(e,"lineWidgetCleared",e,this,r))}},xa.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=xn(this)-t;i&&(Ht(this.doc,r)||Qe(r,r.height+i),n&&$r(n,(function(){n.curOp.forceUpdate=!0,_a(n,r,i),ln(n,"lineWidgetChanged",n,e,Je(r))})))},be(xa);var ka=0,wa=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ka};function Ca(e,t,n,r,i){if(r&&r.shared)return function(e,t,n,r,i){(r=P(r)).shared=!1;var a=[Ca(e,t,n,r,i)],o=a[0],s=r.widgetNode;return Ni(e,(function(e){s&&(r.widgetNode=s.cloneNode(!0)),a.push(Ca(e,st(e,t),st(e,n),r,i));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;o=Y(a)})),new Sa(a,o)}(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return ei(e.cm,Ca)(e,t,n,r,i);var a=new wa(e,i),o=tt(t,n);if(r&&P(r,a,!1),o>0||0==o&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=I("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Pt(e,t.line,t,n,a)||t.line!=n.line&&Pt(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");_t=!0}a.addToHistory&&Ui(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,n.line+1,(function(e){c&&a.collapsed&&!c.options.lineWrapping&&Bt(e)==c.display.maxLine&&(s=!0),a.collapsed&&l!=t.line&&Qe(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new kt(a,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l})),a.collapsed&&e.iter(t.line,n.line+1,(function(t){Ht(e,t)&&Qe(t,0)})),a.clearOnEnter&&de(a,"beforeCursorEnter",(function(){return a.clear()})),a.readOnly&&(xt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++ka,a.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),a.collapsed)dr(c,t.line,n.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var u=t.line;u<=n.line;u++)hr(c,u,"text");a.atomic&&na(c.doc),ln(c,"markerAdded",c,a)}return a}wa.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Kr(e),ve(this,"clear")){var n=this.find();n&&ln(this,"clear",n.from,n.to)}for(var r=null,i=null,a=0;a<this.lines.length;++a){var o=this.lines[a],s=wt(o.markedSpans,this);e&&!this.collapsed?hr(e,Je(o),"text"):e&&(null!=s.to&&(i=Je(o)),null!=s.from&&(r=Je(o))),o.markedSpans=Ct(o.markedSpans,s),null==s.from&&this.collapsed&&!Ht(this.doc,o)&&e&&Qe(o,rr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=Bt(this.lines[l]),u=Vt(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&dr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&na(e.doc)),e&&ln(e,"markerCleared",e,this,r,i),t&&qr(e),this.parent&&this.parent.clear()}},wa.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var a=this.lines[i],o=wt(a.markedSpans,this);if(null!=o.from&&(n=et(t?a:Je(a),o.from),-1==e))return n;if(null!=o.to&&(r=et(t?a:Je(a),o.to),1==e))return r}return n&&{from:n,to:r}},wa.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&$r(r,(function(){var i=t.line,a=Je(t.line),o=Dn(r,a);if(o&&(Bn(o),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!Ht(n.doc,i)&&null!=n.height){var s=n.height;n.height=null;var l=xn(n)-s;l&&Qe(i,i.height+l)}ln(r,"markerChanged",r,e)}))},wa.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=U(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},wa.prototype.detachLine=function(e){if(this.lines.splice(U(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},be(wa);var Sa=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function Oa(e){return e.findMarks(et(e.first,0),e.clipPos(et(e.lastLine())),(function(e){return e.parent}))}function Aa(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];Ni(n.primary.doc,(function(e){return r.push(e)}));for(var i=0;i<n.markers.length;i++){var a=n.markers[i];-1==U(r,a.doc)&&(a.parent=null,n.markers.splice(i--,1))}},n=0;n<e.length;n++)t(n)}Sa.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();ln(this,"clear")}},Sa.prototype.find=function(e,t){return this.primary.find(e,t)},be(Sa);var Ta=0,Ia=function(e,t,n,r,i){if(!(this instanceof Ia))return new Ia(e,t,n,r,i);null==n&&(n=0),Ea.call(this,[new ya([new Kt("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var a=et(n,0);this.sel=Ci(a),this.history=new Pi(null),this.id=++Ta,this.modeOption=t,this.lineSep=r,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Ri(this,{from:a,to:a,text:e}),$i(this,Ci(a),z)};Ia.prototype=X(Ea.prototype,{constructor:Ia,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Ye(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:ni((function(e){var t=et(this.first,0),n=this.first+this.size-1;ca(this,{from:t,to:et(n,Ke(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Lr(this.cm,0,0),$i(this,Ci(t),z)})),replaceRange:function(e,t,n,r){pa(this,e,t=st(this,t),n=n?st(this,n):t,r)},getRange:function(e,t,n){var r=qe(this,st(this,e),st(this,t));return!1===n?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Ze(this,e))return Ke(this,e)},getLineNumber:function(e){return Je(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Ke(this,e)),Bt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return st(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:ni((function(e,t,n){Xi(this,st(this,"number"==typeof e?et(e,t||0):e),null,n)})),setSelection:ni((function(e,t,n){Xi(this,st(this,e),st(this,t||e),n)})),extendSelection:ni((function(e,t,n){Yi(this,st(this,e),t&&st(this,t),n)})),extendSelections:ni((function(e,t){Qi(this,lt(this,e),t)})),extendSelectionsBy:ni((function(e,t){Qi(this,lt(this,Q(this.sel.ranges,e)),t)})),setSelections:ni((function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new ki(st(this,e[i].anchor),st(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),$i(this,wi(this.cm,r,t),n)}})),addSelection:ni((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new ki(st(this,e),st(this,t||e))),$i(this,wi(this.cm,r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=qe(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=qe(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:ni((function(e,t,n){for(var r=[],i=this.sel,a=0;a<i.ranges.length;a++){var o=i.ranges[a];r[a]={from:o.from(),to:o.to(),text:this.splitLines(e[a]),origin:n}}for(var s=t&&"end"!=t&&function(e,t,n){for(var r=[],i=et(e.first,0),a=i,o=0;o<t.length;o++){var s=t[o],l=Ti(s.from,i,a),c=Ti(Si(s),i,a);if(i=s.to,a=c,"around"==n){var u=e.sel.ranges[o],d=tt(u.head,u.anchor)<0;r[o]=new ki(d?c:l,d?l:c)}else r[o]=new ki(l,l)}return new _i(r,e.sel.primIndex)}(this,r,t),l=r.length-1;l>=0;l--)ca(this,r[l]);s?Zi(this,s):this.cm&&Dr(this.cm)})),undo:ni((function(){da(this,"undo")})),redo:ni((function(){da(this,"redo")})),undoSelection:ni((function(){da(this,"undo",!0)})),redoSelection:ni((function(){da(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new Pi(this.history.maxGeneration),Ni(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Ki(this.history.done),undone:Ki(this.history.undone)}},setHistory:function(e){var t=this.history=new Pi(this.history.maxGeneration);t.done=Ki(e.done.slice(0),null,!0),t.undone=Ki(e.undone.slice(0),null,!0)},setGutterMarker:ni((function(e,t,n){return ba(this,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&te(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:ni((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&ba(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,te(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!Ze(this,e))return null;if(t=e,!(e=Ke(this,e)))return null}else if(null==(t=Je(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:ni((function(e,t,n){return ba(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(w(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:ni((function(e,t,n){return ba(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var a=i.match(w(n));if(!a)return!1;var o=a.index+a[0].length;e[r]=i.slice(0,a.index)+(a.index&&o!=i.length?" ":"")+i.slice(o)||null}return!0}))})),addLineWidget:ni((function(e,t,n){return function(e,t,n,r){var i=new xa(e,n,r),a=e.cm;return a&&i.noHScroll&&(a.display.alignWidgets=!0),ba(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,a&&!Ht(e,t)){var r=Gt(t)<e.scrollTop;Qe(t,t.height+xn(i)),r&&Ir(a,i.height),a.curOp.forceUpdate=!0}return!0})),a&&ln(a,"lineWidgetAdded",a,i,"number"==typeof t?t:Je(t)),i}(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Ca(this,st(this,e),st(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return Ca(this,e=st(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=Ke(this,(e=st(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=st(this,e),t=st(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(a){var o=a.markedSpans;if(o)for(var s=0;s<o.length;s++){var l=o[s];null!=l.to&&i==e.line&&e.ch>=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter((function(i){var a=i.text.length+r;if(a>e)return t=e,!0;e-=a,++n})),st(this,et(n,t))},indexFromPos:function(e){var t=(e=st(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new Ia(Ye(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new Ia(Ye(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),a=e.clipPos(i.from),o=e.clipPos(i.to);if(tt(a,o)){var s=Ca(e,a,o,r.primary,r.primary.type);r.markers.push(s),s.parent=r}}}(r,Oa(this)),r},unlinkDoc:function(e){if(e instanceof Oo&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Aa(Oa(this));break}if(e.history==this.history){var n=[e.id];Ni(e,(function(e){return n.push(e.id)}),!0),e.history=new Pi(null),e.history.done=Ki(this.history.done,n),e.history.undone=Ki(this.history.undone,n)}},iterLinkedDocs:function(e){Ni(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):De(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:ni((function(e){var t;"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&$r(t=this.cm,(function(){Mi(t),dr(t)})))}))}),Ia.prototype.eachLine=Ia.prototype.iter;var Da=0;function La(e){var t=this;if(Ra(t),!me(t,e)&&!_n(t.display,e)){ye(e),o&&(Da=+new Date);var n=cr(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,a=Array(i),s=0,l=function(){++s==i&&ei(t,(function(){var e={from:n=st(t.doc,n),to:n,text:t.doc.splitLines(a.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};ca(t.doc,e),Zi(t.doc,Ci(st(t.doc,n),st(t.doc,Si(e))))}))()},c=function(e,n){if(t.options.allowDropFileTypes&&-1==U(t.options.allowDropFileTypes,e.type))l();else{var r=new FileReader;r.onerror=function(){return l()},r.onload=function(){var e=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(a[n]=e),l()},r.readAsText(e)}},u=0;u<r.length;u++)c(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var h;if(t.state.draggingText&&!t.state.draggingText.copy&&(h=t.listSelections()),ea(t.doc,Ci(n,n)),h)for(var f=0;f<h.length;++f)pa(t.doc,"",h[f].anchor,h[f].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Ra(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Na(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var ja=!1;function Ma(){var e;ja||(de(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Na(Pa)}),100))})),de(window,"blur",(function(){return Na(Cr)})),ja=!0)}function Pa(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Ba={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"},Fa=0;Fa<10;Fa++)Ba[Fa+48]=Ba[Fa+96]=String(Fa);for(var Ua=65;Ua<=90;Ua++)Ba[Ua]=String.fromCharCode(Ua);for(var Ha=1;Ha<=12;Ha++)Ba[Ha+111]=Ba[Ha+63235]="F"+Ha;var za={};function Ga(e){var t,n,r,i,a=e.split(/-(?!$)/);e=a[a.length-1];for(var o=0;o<a.length-1;o++){var s=a[o];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function Va(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=Q(n.split(" "),Ga),a=0;a<i.length;a++){var o=void 0,s=void 0;a==i.length-1?(s=i.join(" "),o=r):(s=i.slice(0,a+1).join(" "),o="...");var l=t[s];if(l){if(l!=o)throw new Error("Inconsistent bindings for "+s)}else t[s]=o}delete e[n]}for(var c in t)e[c]=t[c];return e}function Wa(e,t,n,r){var i=(t=Qa(t)).call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Wa(e,t.fallthrough,n,r);for(var a=0;a<t.fallthrough.length;a++){var o=Wa(e,t.fallthrough[a],n,r);if(o)return o}}}function Ka(e){var t="string"==typeof e?e:Ba[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function qa(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(_?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(_?t.ctrlKey:t.metaKey)&&"Mod"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function Ya(e,t){if(d&&34==e.keyCode&&e.char)return!1;var n=Ba[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),qa(n,e,t))}function Qa(e){return"string"==typeof e?za[e]:e}function Ja(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var a=t(n[i]);r.length&&tt(a.from,Y(r).to)<=0;){var o=r.pop();if(tt(o.from,a.from)<0){a.from=o.from;break}}r.push(a)}$r(e,(function(){for(var t=r.length-1;t>=0;t--)pa(e.doc,"",r[t].from,r[t].to,"+delete");Dr(e)}))}function Xa(e,t,n){var r=ie(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Za(e,t,n){var r=Xa(e,t.ch,n);return null==r?null:new et(t.line,r,n<0?"after":"before")}function $a(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var a=ce(n,t.doc.direction);if(a){var o,s=i<0?Y(a):a[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=Ln(t,n);o=i<0?n.text.length-1:0;var u=Rn(t,c,o).top;o=ae((function(e){return Rn(t,c,e).top==u}),i<0==(1==s.level)?s.from:s.to-1,o),"before"==l&&(o=Xa(n,o,1))}else o=i<0?s.to:s.from;return new et(r,o,l)}}return new et(r,i<0?n.text.length:0,i<0?"before":"after")}za.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"},za.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},za.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},za.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},za.default=b?za.macDefault:za.pcDefault;var eo={selectAll:sa,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),z)},killLine:function(e){return Ja(e,(function(t){if(t.empty()){var n=Ke(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:et(t.head.line+1,0)}:{from:t.head,to:et(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return Ja(e,(function(t){return{from:et(t.from().line,0),to:st(e.doc,et(t.to().line+1,0))}}))},delLineLeft:function(e){return Ja(e,(function(e){return{from:et(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return Ja(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return Ja(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(et(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(et(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return to(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return no(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return function(e,t){var n=Ke(e.doc,t),r=function(e){for(var t;t=jt(e);)e=t.find(1,!0).line;return e}(n);return r!=n&&(t=Je(r)),$a(!0,e,n,t,-1)}(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),V)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),V)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?no(e,t.head):r}),V)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var a=n[i].from(),o=B(e.getLine(a.line),a.ch,r);t.push(q(r-o%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return $r(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,a=Ke(e.doc,i.line).text;if(a)if(i.ch==a.length&&(i=new et(i.line,i.ch-1)),i.ch>0)i=new et(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),et(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var o=Ke(e.doc,i.line-1).text;o&&(i=new et(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),et(i.line-1,o.length-1),i,"+transpose"))}n.push(new ki(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return $r(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);Dr(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function to(e,t){var n=Ke(e.doc,t),r=Bt(n);return r!=n&&(t=Je(r)),$a(!0,e,r,t,1)}function no(e,t){var n=to(e,t.line),r=Ke(e.doc,n.line),i=ce(r,e.doc.direction);if(!i||0==i[0].level){var a=Math.max(n.ch,r.text.search(/\S/)),o=t.line==n.line&&t.ch<=a&&t.ch;return et(n.line,o?0:a,n.sticky)}return n}function ro(e,t,n){if("string"==typeof t&&!(t=eo[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=H}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}var io=new F;function ao(e,t,n,r){var i=e.state.keySeq;if(i){if(Ka(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:io.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())})),oo(e,i+" "+t,n,r))return!0}return oo(e,t,n,r)}function oo(e,t,n,r){var i=function(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=Wa(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&Wa(t,e.options.extraKeys,n,e)||Wa(t,e.options.keyMap,n,e)}(e,t,r);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&ln(e,"keyHandled",e,t,n),"handled"!=i&&"multi"!=i||(ye(n),xr(e)),!!i}function so(e,t){var n=Ya(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?ao(e,"Shift-"+n,t,(function(t){return ro(e,t,!0)}))||ao(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return ro(e,t)})):ao(e,n,t,(function(t){return ro(e,t)})))}var lo=null;function co(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=L(),me(t,e)))){o&&s<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var i=so(t,e);d&&(lo=i?r:null,i||88!=r||Re||!(b?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!b&&!i&&46==r&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(S(t,"CodeMirror-crosshair"),fe(document,"keyup",n),fe(document,"mouseover",n))}R(t,"CodeMirror-crosshair"),de(document,"keyup",n),de(document,"mouseover",n)}(t)}}function uo(e){16==e.keyCode&&(this.doc.sel.shift=!1),me(this,e)}function ho(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||_n(t.display,e)||me(t,e)||e.ctrlKey&&!e.altKey||b&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(d&&n==lo)return lo=null,void ye(e);if(!d||e.which&&!(e.which<10)||!so(t,e)){var i=String.fromCharCode(null==r?n:r);"\b"!=i&&(function(e,t,n){return ao(e,"'"+n+"'",t,(function(t){return ro(e,t,!0)}))}(t,e,i)||t.display.input.onKeyPress(e))}}}var fo,po,mo=function(e,t,n){this.time=e,this.pos=t,this.button=n};function go(e){var t=this,n=t.display;if(!(me(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,_n(n,e))l||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!yo(t,e)){var r=cr(t,e),i=we(e),a=r?function(e,t){var n=+new Date;return po&&po.compare(n,e,t)?(fo=po=null,"triple"):fo&&fo.compare(n,e,t)?(po=new mo(n,e,t),fo=null,"double"):(fo=new mo(n,e,t),po=null,"single")}(r,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),r&&function(e,t,n,r,i){var a="Click";return"double"==r?a="Double"+a:"triple"==r&&(a="Triple"+a),ao(e,qa(a=(1==t?"Left":2==t?"Middle":"Right")+a,i),i,(function(t){if("string"==typeof t&&(t=eo[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=H}finally{e.state.suppressEdits=!1}return r}))}(t,i,r,a,e)||(1==i?r?function(e,t,n,r){o?setTimeout(M(_r,e),0):e.curOp.focus=L();var i,a=function(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(null==i.unit){var a=y?n.shiftKey&&n.metaKey:n.altKey;i.unit=a?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),null==i.addNew&&(i.addNew=b?n.metaKey:n.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(b?n.altKey:n.ctrlKey)),i}(e,n,r),c=e.doc.sel;e.options.dragDrop&&Oe&&!e.isReadOnly()&&"single"==n&&(i=c.contains(t))>-1&&(tt((i=c.ranges[i]).from(),t)<0||t.xRel>0)&&(tt(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,a=!1,c=ei(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,fe(i.wrapper.ownerDocument,"mouseup",c),fe(i.wrapper.ownerDocument,"mousemove",u),fe(i.scroller,"dragstart",d),fe(i.scroller,"drop",c),a||(ye(t),r.addNew||Yi(e.doc,n,null,null,r.extend),l&&!h||o&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(e){a=a||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return a=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),de(i.wrapper.ownerDocument,"mouseup",c),de(i.wrapper.ownerDocument,"mousemove",u),de(i.scroller,"dragstart",d),de(i.scroller,"drop",c),kr(e),setTimeout((function(){return i.input.focus()}),20)}(e,r,t,a):function(e,t,n,r){var i=e.display,a=e.doc;ye(t);var o,s,l=a.sel,c=l.ranges;if(r.addNew&&!r.extend?(s=a.sel.contains(n),o=s>-1?c[s]:new ki(n,n)):(o=a.sel.primary(),s=a.sel.primIndex),"rectangle"==r.unit)r.addNew||(o=new ki(n,n)),n=cr(e,t,!0,!0),s=-1;else{var u=vo(e,n,r.unit);o=r.extend?qi(o,u.anchor,u.head,r.extend):u}r.addNew?-1==s?(s=c.length,$i(a,wi(e,c.concat([o]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==r.unit&&!r.extend?($i(a,wi(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=a.sel):Ji(a,s,o,G):(s=0,$i(a,new _i([o],0),G),l=a.sel);var d=n;function h(t){if(0!=tt(d,t))if(d=t,"rectangle"==r.unit){for(var i=[],c=e.options.tabSize,u=B(Ke(a,n.line).text,n.ch,c),h=B(Ke(a,t.line).text,t.ch,c),f=Math.min(u,h),p=Math.max(u,h),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=Ke(a,m).text,b=W(v,f,c);f==p?i.push(new ki(et(m,b),et(m,b))):v.length>b&&i.push(new ki(et(m,b),et(m,W(v,p,c))))}i.length||i.push(new ki(n,n)),$i(a,wi(e,l.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var y,E=o,x=vo(e,t,r.unit),_=E.anchor;tt(x.anchor,_)>0?(y=x.head,_=at(E.from(),x.anchor)):(y=x.anchor,_=it(E.to(),x.head));var k=l.ranges.slice(0);k[s]=function(e,t){var n=t.anchor,r=t.head,i=Ke(e.doc,n.line);if(0==tt(n,r)&&n.sticky==r.sticky)return t;var a=ce(i);if(!a)return t;var o=se(a,n.ch,n.sticky),s=a[o];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,c=o+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==a.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=se(a,r.ch,r.sticky),d=u-o||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?d<0:d>0}var h=a[c+(l?-1:0)],f=l==(1==h.level),p=f?h.from:h.to,m=f?"after":"before";return n.ch==p&&n.sticky==m?t:new ki(new et(n.line,p,m),r)}(e,new ki(st(a,_),y)),$i(a,wi(e,k,s),G)}}var f=i.wrapper.getBoundingClientRect(),p=0;function m(t){e.state.selectingText=!1,p=1/0,t&&(ye(t),i.input.focus()),fe(i.wrapper.ownerDocument,"mousemove",g),fe(i.wrapper.ownerDocument,"mouseup",v),a.history.lastSelOrigin=null}var g=ei(e,(function(t){0!==t.buttons&&we(t)?function t(n){var o=++p,s=cr(e,n,!0,"rectangle"==r.unit);if(s)if(0!=tt(s,d)){e.curOp.focus=L(),h(s);var l=Ar(i,a);(s.line>=l.to||s.line<l.from)&&setTimeout(ei(e,(function(){p==o&&t(n)})),150)}else{var c=n.clientY<f.top?-20:n.clientY>f.bottom?20:0;c&&setTimeout(ei(e,(function(){p==o&&(i.scroller.scrollTop+=c,t(n))})),50)}}(t):m(t)})),v=ei(e,m);e.state.selectingText=v,de(i.wrapper.ownerDocument,"mousemove",g),de(i.wrapper.ownerDocument,"mouseup",v)}(e,r,t,a)}(t,r,a,e):ke(e)==n.scroller&&ye(e):2==i?(r&&Yi(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(k?t.display.input.onContextMenu(e):kr(t)))}}function vo(e,t,n){if("char"==n)return new ki(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new ki(et(t.line,0),st(e.doc,et(t.line+1,0)));var r=n(e,t);return new ki(r.from,r.to)}function bo(e,t,n,r){var i,a;if(t.touches)i=t.touches[0].clientX,a=t.touches[0].clientY;else try{i=t.clientX,a=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ye(t);var o=e.display,s=o.lineDiv.getBoundingClientRect();if(a>s.bottom||!ve(e,n))return xe(t);a-=s.top-o.viewOffset;for(var l=0;l<e.display.gutterSpecs.length;++l){var c=o.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=i)return pe(e,n,e,Xe(e.doc,a),e.display.gutterSpecs[l].className,t),xe(t)}}function yo(e,t){return bo(e,t,"gutterClick",!0)}function Eo(e,t){_n(e.display,t)||function(e,t){return!!ve(e,"gutterContextMenu")&&bo(e,t,"gutterContextMenu",!1)}(e,t)||me(e,t,"contextmenu")||k||e.display.input.onContextMenu(t)}function xo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Un(e)}mo.prototype.compare=function(e,t,n){return this.time+400>e&&0==tt(t,this.pos)&&n==this.button};var _o={toString:function(){return"CodeMirror.Init"}},ko={},wo={};function Co(e,t,n){if(!t!=!(n&&n!=_o)){var r=e.display.dragFunctions,i=t?de:fe;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function So(e){e.options.lineWrapping?(R(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(S(e.display.wrapper,"CodeMirror-wrap"),Wt(e)),lr(e),dr(e),Un(e),setTimeout((function(){return Hr(e)}),100)}function Oo(e,t){var n=this;if(!(this instanceof Oo))return new Oo(e,t);this.options=t=t?P(t):{},P(ko,t,!1);var r=t.value;"string"==typeof r?r=new Ia(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Oo.inputStyles[t.inputStyle](this),a=this.display=new gi(e,r,i,t);for(var c in a.wrapper.CodeMirror=this,xo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Vr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new F,keySeq:null,specialChars:null},t.autofocus&&!v&&a.input.focus(),o&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;de(t.scroller,"mousedown",ei(e,go)),de(t.scroller,"dblclick",o&&s<11?ei(e,(function(t){if(!me(e,t)){var n=cr(e,t);if(n&&!yo(e,t)&&!_n(e.display,t)){ye(t);var r=e.findWordAt(n);Yi(e.doc,r.anchor,r.head)}}})):function(t){return me(e,t)||ye(t)}),de(t.scroller,"contextmenu",(function(t){return Eo(e,t)})),de(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||Eo(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function a(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}de(t.scroller,"touchstart",(function(i){if(!me(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!yo(e,i)){t.input.ensurePolled(),clearTimeout(n);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),de(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),de(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!_n(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,s=e.coordsChar(t.activeTouch,"page");o=!r.prev||a(r,r.prev)?new ki(s,s):!r.prev.prev||a(r,r.prev.prev)?e.findWordAt(s):new ki(et(s.line,0),st(e.doc,et(s.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),ye(n)}i()})),de(t.scroller,"touchcancel",i),de(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(jr(e,t.scroller.scrollTop),Pr(e,t.scroller.scrollLeft,!0),pe(e,"scroll",e))})),de(t.scroller,"mousewheel",(function(t){return xi(e,t)})),de(t.scroller,"DOMMouseScroll",(function(t){return xi(e,t)})),de(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){me(e,t)||_e(t)},over:function(t){me(e,t)||(function(e,t){var n=cr(e,t);if(n){var r=document.createDocumentFragment();br(e,n,r),e.display.dragCursor||(e.display.dragCursor=T("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),A(e.display.dragCursor,r)}}(e,t),_e(t))},start:function(t){return function(e,t){if(o&&(!e.state.draggingText||+new Date-Da<100))_e(t);else if(!me(e,t)&&!_n(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!h)){var n=T("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}(e,t)},drop:ei(e,La),leave:function(t){me(e,t)||Ra(e)}};var l=t.input.getField();de(l,"keyup",(function(t){return uo.call(e,t)})),de(l,"keydown",ei(e,co)),de(l,"keypress",ei(e,ho)),de(l,"focus",(function(t){return wr(e,t)})),de(l,"blur",(function(t){return Cr(e,t)}))}(this),Ma(),Kr(this),this.curOp.forceUpdate=!0,ji(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&wr(n)}),20):Cr(this),wo)wo.hasOwnProperty(c)&&wo[c](this,t[c],_o);hi(this),t.finishInit&&t.finishInit(this);for(var u=0;u<Ao.length;++u)Ao[u](this);qr(this),l&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(a.lineDiv).textRendering&&(a.lineDiv.style.textRendering="auto")}Oo.defaults=ko,Oo.optionHandlers=wo;var Ao=[];function To(e,t,n,r){var i,a=e.doc;null==n&&(n="add"),"smart"==n&&(a.mode.indent?i=ft(e,t).state:n="prev");var o=e.options.tabSize,s=Ke(a,t),l=B(s.text,null,o);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((c=a.mode.indent(i,s.text.slice(u.length),s.text))==H||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>a.first?B(Ke(a,t-1).text,null,o):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var d="",h=0;if(e.options.indentWithTabs)for(var f=Math.floor(c/o);f;--f)h+=o,d+="\t";if(h<c&&(d+=q(c-h)),d!=u)return pa(a,d,et(t,0),et(t,u.length),"+input"),s.stateAfter=null,!0;for(var p=0;p<a.sel.ranges.length;p++){var m=a.sel.ranges[p];if(m.head.line==t&&m.head.ch<u.length){var g=et(t,u.length);Ji(a,p,new ki(g,g));break}}}Oo.defineInitHook=function(e){return Ao.push(e)};var Io=null;function Do(e){Io=e}function Lo(e,t,n,r,i){var a=e.doc;e.display.shift=!1,r||(r=a.sel);var o=+new Date-200,s="paste"==i||e.state.pasteIncoming>o,l=De(t),c=null;if(s&&r.ranges.length>1)if(Io&&Io.text.join("\n")==t){if(r.ranges.length%Io.text.length==0){c=[];for(var u=0;u<Io.text.length;u++)c.push(a.splitLines(Io.text[u]))}}else l.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(c=Q(l,(function(e){return[e]})));for(var d=e.curOp.updateInput,h=r.ranges.length-1;h>=0;h--){var f=r.ranges[h],p=f.from(),m=f.to();f.empty()&&(n&&n>0?p=et(p.line,p.ch-n):e.state.overwrite&&!s?m=et(m.line,Math.min(Ke(a,m.line).text.length,m.ch+Y(l).length)):s&&Io&&Io.lineWise&&Io.text.join("\n")==l.join("\n")&&(p=m=et(p.line,0)));var g={from:p,to:m,text:c?c[h%c.length]:l,origin:i||(s?"paste":e.state.cutIncoming>o?"cut":"+input")};ca(e.doc,g),ln(e,"inputRead",e,g)}t&&!s&&No(e,t),Dr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ro(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||$r(t,(function(){return Lo(t,n,0,null,"paste")})),!0}function No(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var a=e.getModeAt(i.head),o=!1;if(a.electricChars){for(var s=0;s<a.electricChars.length;s++)if(t.indexOf(a.electricChars.charAt(s))>-1){o=To(e,i.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(Ke(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=To(e,i.head.line,"smart"));o&&ln(e,"electricInput",e,i.head.line)}}}function jo(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,a={anchor:et(i,0),head:et(i+1,0)};n.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:n}}function Mo(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function Po(){var e=T("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=T("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?e.style.width="1000px":e.setAttribute("wrap","off"),m&&(e.style.border="1px solid black"),Mo(e),t}function Bo(e,t,n,r,i){var a=t,o=n,s=Ke(e,t.line),l=i&&"rtl"==e.direction?-n:n;function c(a){var o,c;if("codepoint"==r){var u=s.text.charCodeAt(t.ch+(r>0?0:-1));o=isNaN(u)?null:new et(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(u>=55296&&u<56320?2:1))),-n)}else o=i?function(e,t,n,r){var i=ce(t,e.doc.direction);if(!i)return Za(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var a=se(i,n.ch,n.sticky),o=i[a];if("ltr"==e.doc.direction&&o.level%2==0&&(r>0?o.to>n.ch:o.from<n.ch))return Za(t,n,r);var s,l=function(e,n){return Xa(t,e instanceof et?e.ch:e,n)},c=function(n){return e.options.lineWrapping?(s=s||Ln(e,t),Zn(e,t,s,n)):{begin:0,end:t.text.length}},u=c("before"==n.sticky?l(n,-1):n.ch);if("rtl"==e.doc.direction||1==o.level){var d=1==o.level==r<0,h=l(n,d?1:-1);if(null!=h&&(d?h<=o.to&&h<=u.end:h>=o.from&&h>=u.begin)){var f=d?"before":"after";return new et(n.line,h,f)}}var p=function(e,t,r){for(var a=function(e,t){return t?new et(n.line,l(e,1),"before"):new et(n.line,e,"after")};e>=0&&e<i.length;e+=t){var o=i[e],s=t>0==(1!=o.level),c=s?r.begin:l(r.end,-1);if(o.from<=c&&c<o.to)return a(c,s);if(c=s?o.from:l(o.to,-1),r.begin<=c&&c<r.end)return a(c,s)}},m=p(a+r,r,u);if(m)return m;var g=r>0?u.end:l(u.begin,-1);return null==g||r>0&&g==t.text.length||!(m=p(r>0?0:i.length-1,r,c(g)))?null:m}(e.cm,s,t,n):Za(s,t,n);if(null==o){if(a||(c=t.line+l)<e.first||c>=e.first+e.size||(t=new et(c,t.ch,t.sticky),!(s=Ke(e,c))))return!1;t=$a(i,e.cm,s,t.line,l)}else t=o;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var u=null,d="group"==r,h=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(n<0)||c(!f);f=!1){var p=s.text.charAt(t.ch)||"\n",m=ee(p,h)?"w":d&&"\n"==p?"n":!d||/\s/.test(p)?null:"p";if(!d||f||m||(m="s"),u&&u!=m){n<0&&(n=1,c(),t.sticky="after");break}if(m&&(u=m),n>0&&!c(!f))break}var g=aa(e,t,a,o,!0);return nt(a,g)&&(g.hitSide=!0),g}function Fo(e,t,n,r){var i,a,o=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*rr(e.display),3);i=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(a=Jn(e,s,i)).outside;){if(n<0?i<=0:i>=o.height){a.hitSide=!0;break}i+=5*n}return a}var Uo=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new F,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ho(e,t){var n=Dn(e,t.line);if(!n||n.hidden)return null;var r=Ke(e.doc,t.line),i=Tn(n,r,t.line),a=ce(r,e.doc.direction),o="left";a&&(o=se(a,t.ch)%2?"right":"left");var s=Mn(i.map,t.ch,o);return s.offset="right"==s.collapse?s.end:s.start,s}function zo(e,t){return t&&(e.bad=!0),e}function Go(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return zo(e.clipPos(et(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var a=e.display.view[i];if(a.node==r)return Vo(a,t,n)}}function Vo(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!D(r,t))return zo(et(Je(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var a=e.rest?Y(e.rest):e.line;return zo(et(Je(a),a.text.length),i)}var o=3==t.nodeType?t:null,s=t;for(o||1!=t.childNodes.length||3!=t.firstChild.nodeType||(o=t.firstChild,n&&(n=o.nodeValue.length));s.parentNode!=r;)s=s.parentNode;var l=e.measure,c=l.maps;function u(t,n,r){for(var i=-1;i<(c?c.length:0);i++)for(var a=i<0?l.map:c[i],o=0;o<a.length;o+=3){var s=a[o+2];if(s==t||s==n){var u=Je(i<0?e.line:e.rest[i]),d=a[o]+r;return(r<0||s!=t)&&(d=a[o+(r?1:0)]),et(u,d)}}}var d=u(o,s,n);if(d)return zo(d,i);for(var h=s.nextSibling,f=o?o.nodeValue.length-n:0;h;h=h.nextSibling){if(d=u(h,h.firstChild,0))return zo(et(d.line,d.ch-f),i);f+=h.textContent.length}for(var p=s.previousSibling,m=n;p;p=p.previousSibling){if(d=u(p,p.firstChild,-1))return zo(et(d.line,d.ch+m),i);m+=p.textContent.length}}Uo.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;function a(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function o(e){if(a(e)&&!me(r,e)){if(r.somethingSelected())Do({lineWise:!1,text:r.getSelections()}),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=jo(r);Do({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation((function(){r.setSelections(t.ranges,0,z),r.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var o=Io.text.join("\n");if(e.clipboardData.setData("Text",o),e.clipboardData.getData("Text")==o)return void e.preventDefault()}var s=Po(),l=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),l.value=Io.text.join("\n");var c=document.activeElement;j(l),setTimeout((function(){r.display.lineSpace.removeChild(s),c.focus(),c==i&&n.showPrimarySelection()}),50)}}Mo(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),de(i,"paste",(function(e){!a(e)||me(r,e)||Ro(e,r)||s<=11&&setTimeout(ei(r,(function(){return t.updateFromDOM()})),20)})),de(i,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),de(i,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),de(i,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),de(i,"touchstart",(function(){return n.forceCompositionEnd()})),de(i,"input",(function(){t.composing||t.readFromDOMSoon()})),de(i,"copy",o),de(i,"cut",o)},Uo.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Uo.prototype.prepareSelection=function(){var e=vr(this.cm,!1);return e.focus=document.activeElement==this.div,e},Uo.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Uo.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Uo.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),i=r.from(),a=r.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||a.line<t.display.viewFrom)e.removeAllRanges();else{var o=Go(t,e.anchorNode,e.anchorOffset),s=Go(t,e.focusNode,e.focusOffset);if(!o||o.bad||!s||s.bad||0!=tt(at(o,s),i)||0!=tt(it(o,s),a)){var l=t.display.view,c=i.line>=t.display.viewFrom&&Ho(t,i)||{node:l[0].measure.map[2],offset:0},u=a.line<t.display.viewTo&&Ho(t,a);if(!u){var d=l[l.length-1].measure,h=d.maps?d.maps[d.maps.length-1]:d.map;u={node:h[h.length-1],offset:h[h.length-2]-h[h.length-3]}}if(c&&u){var f,p=e.rangeCount&&e.getRangeAt(0);try{f=C(c.node,c.offset,u.offset,u.node)}catch(e){}f&&(!n&&t.state.focused?(e.collapse(c.node,c.offset),f.collapsed||(e.removeAllRanges(),e.addRange(f))):(e.removeAllRanges(),e.addRange(f)),p&&null==e.anchorNode?e.addRange(p):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Uo.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)},Uo.prototype.showMultipleSelections=function(e){A(this.cm.display.cursorDiv,e.cursors),A(this.cm.display.selectionDiv,e.selection)},Uo.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Uo.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return D(this.div,t)},Uo.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&document.activeElement==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Uo.prototype.blur=function(){this.div.blur()},Uo.prototype.getField=function(){return this.div},Uo.prototype.supportsTouch=function(){return!0},Uo.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():$r(this.cm,(function(){return e.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,(function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}))},Uo.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Uo.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(g&&u&&this.cm.display.gutterSpecs.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=Go(t,e.anchorNode,e.anchorOffset),r=Go(t,e.focusNode,e.focusOffset);n&&r&&$r(t,(function(){$i(t.doc,Ci(n,r),z),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)}))}}},Uo.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,i=r.display,a=r.doc.sel.primary(),o=a.from(),s=a.to();if(0==o.ch&&o.line>r.firstLine()&&(o=et(o.line-1,Ke(r.doc,o.line-1).length)),s.ch==Ke(r.doc,s.line).text.length&&s.line<r.lastLine()&&(s=et(s.line+1,0)),o.line<i.viewFrom||s.line>i.viewTo-1)return!1;o.line==i.viewFrom||0==(e=ur(r,o.line))?(t=Je(i.view[0].line),n=i.view[0].node):(t=Je(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,c,u=ur(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=Je(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(function(e,t,n,r,i){var a="",o=!1,s=e.doc.lineSeparator(),l=!1;function c(){o&&(a+=s,l&&(a+=s),o=l=!1)}function u(e){e&&(c(),a+=e)}function d(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void u(n);var a,h=t.getAttribute("cm-marker");if(h){var f=e.findMarks(et(r,0),et(i+1,0),(g=+h,function(e){return e.id==g}));return void(f.length&&(a=f[0].find(0))&&u(qe(e.doc,a.from,a.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;p&&c();for(var m=0;m<t.childNodes.length;m++)d(t.childNodes[m]);/^(pre|p)$/i.test(t.nodeName)&&(l=!0),p&&(o=!0)}else 3==t.nodeType&&u(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "));var g}for(;d(t),t!=n;)t=t.nextSibling,l=!1;return a}(r,n,c,t,l)),h=qe(r.doc,et(t,0),et(l,Ke(r.doc,l).text.length));d.length>1&&h.length>1;)if(Y(d)==Y(h))d.pop(),h.pop(),l--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),t++}for(var f=0,p=0,m=d[0],g=h[0],v=Math.min(m.length,g.length);f<v&&m.charCodeAt(f)==g.charCodeAt(f);)++f;for(var b=Y(d),y=Y(h),E=Math.min(b.length-(1==d.length?f:0),y.length-(1==h.length?f:0));p<E&&b.charCodeAt(b.length-p-1)==y.charCodeAt(y.length-p-1);)++p;if(1==d.length&&1==h.length&&t==o.line)for(;f&&f>o.ch&&b.charCodeAt(b.length-p-1)==y.charCodeAt(y.length-p-1);)f--,p++;d[d.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(f).replace(/\u200b+$/,"");var x=et(t,f),_=et(l,h.length?Y(h).length-p:0);return d.length>1||d[0]||tt(x,_)?(pa(r.doc,d,x,_,"+input"),!0):void 0},Uo.prototype.ensurePolled=function(){this.forceCompositionEnd()},Uo.prototype.reset=function(){this.forceCompositionEnd()},Uo.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Uo.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Uo.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||$r(this.cm,(function(){return dr(e.cm)}))},Uo.prototype.setUneditable=function(e){e.contentEditable="false"},Uo.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ei(this.cm,Lo)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Uo.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Uo.prototype.onContextMenu=function(){},Uo.prototype.resetPosition=function(){},Uo.prototype.needsContentAttribute=!0;var Wo=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new F,this.hasSelection=!1,this.composing=null};Wo.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function a(e){if(!me(r,e)){if(r.somethingSelected())Do({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=jo(r);Do({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,z):(n.prevInput="",i.value=t.text.join("\n"),j(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),de(i,"input",(function(){o&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),de(i,"paste",(function(e){me(r,e)||Ro(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),de(i,"cut",a),de(i,"copy",a),de(e.scroller,"paste",(function(t){if(!_n(e,t)&&!me(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var a=new Event("paste");a.clipboardData=t.clipboardData,i.dispatchEvent(a)}})),de(e.lineSpace,"selectstart",(function(t){_n(e,t)||ye(t)})),de(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),de(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Wo.prototype.createField=function(e){this.wrapper=Po(),this.textarea=this.wrapper.firstChild},Wo.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Wo.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=vr(e);if(e.options.moveInputWithCursor){var i=qn(e,n.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+o.top-a.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+o.left-a.left))}return r},Wo.prototype.showSelection=function(e){var t=this.cm.display;A(t.cursorDiv,e.cursors),A(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Wo.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&j(this.textarea),o&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",o&&s>=9&&(this.hasSelection=null))}},Wo.prototype.getField=function(){return this.textarea},Wo.prototype.supportsTouch=function(){return!1},Wo.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||L()!=this.textarea))try{this.textarea.focus()}catch(e){}},Wo.prototype.blur=function(){this.textarea.blur()},Wo.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Wo.prototype.receivedFocus=function(){this.slowPoll()},Wo.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Wo.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},Wo.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Le(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(o&&s>=9&&this.hasSelection===i||b&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(8203!=a||r||(r=""),8666==a)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l<c&&r.charCodeAt(l)==i.charCodeAt(l);)++l;return $r(t,(function(){Lo(t,i.slice(l),r.length-l,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Wo.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Wo.prototype.onKeyPress=function(){o&&s>=9&&(this.hasSelection=null),this.fastPoll()},Wo.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=cr(n,e),c=r.scroller.scrollTop;if(a&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(a)&&ei(n,$i)(n.doc,Ci(a),z);var u,h=i.style.cssText,f=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(o?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),o&&s>=9&&g(),k){_e(e);var m=function(){fe(window,"mouseup",m),setTimeout(v,20)};de(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=i.selectionStart){var e=n.somethingSelected(),a=""+(e?i.value:"");i.value="⇚",i.value=a,t.prevInput=e?"":"",i.selectionStart=1,i.selectionEnd=a.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=h,o&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!o||o&&s<9)&&g();var e=0,a=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&""==t.prevInput?ei(n,sa)(n):e++<10?r.detectingSelectAll=setTimeout(a,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(a,200)}}},Wo.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},Wo.prototype.setUneditable=function(){},Wo.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,a){e.defaults[n]=r,i&&(t[n]=a?function(e,t,n){n!=_o&&i(e,t,n)}:i)}e.defineOption=n,e.Init=_o,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Ii(e)}),!0),n("indentUnit",2,Ii,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Di(e),Un(e),dr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var a=e.text.indexOf(t,i);if(-1==a)break;i=a+t.length,n.push(et(r,a))}r++}));for(var i=n.length-1;i>=0;i--)pa(e.doc,t,n[i],et(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=_o&&e.refresh()})),n("specialCharPlaceholder",Zt,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!E),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){xo(e),mi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Qa(t),i=n!=_o&&Qa(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,So,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=fi(t,e.options.lineNumbers),mi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?or(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Hr(e)}),!0),n("scrollbarStyle","native",(function(e){Vr(e),Hr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=fi(e.options.gutters,t),mi(e)}),!0),n("firstLineNumber",1,mi,!0),n("lineNumberFormatter",(function(e){return e}),mi,!0),n("showCursorWhenSelecting",!1,gr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Cr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Co),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,gr,!0),n("singleCursorHeightPerLine",!0,gr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Di,!0),n("addModeClass",!1,Di,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Di,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(Oo),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&ei(this,t[e])(this,n,i),pe(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Qa(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:ti((function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");!function(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,dr(this)})),removeOverlay:ti((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void dr(this)}})),indentLine:ti((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),Ze(this.doc,e)&&To(this,e,t,n)})),indentSelection:ti((function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(To(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Dr(this));else{var a=i.from(),o=i.to(),s=Math.max(n,a.line);n=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var l=s;l<n;++l)To(this,l,e);var c=this.doc.sel.ranges;0==a.ch&&t.length==c.length&&c[r].from().ch>0&&Ji(this.doc,r,new ki(a,c[r].to()),z)}}})),getTokenAt:function(e,t){return bt(this,e,t)},getLineTokens:function(e,t){return bt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=st(this.doc,e);var t,n=ht(this,Ke(this.doc,e.line)),r=0,i=(n.length-1)/2,a=e.ch;if(0==a)t=n[2];else for(;;){var o=r+i>>1;if((o?n[2*o-1]:0)>=a)i=o;else{if(!(n[2*o+1]<a)){t=n[2*o+2];break}r=o+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var i=n[t],a=this.getModeAt(e);if("string"==typeof a[t])i[a[t]]&&r.push(i[a[t]]);else if(a[t])for(var o=0;o<a[t].length;o++){var s=i[a[t][o]];s&&r.push(s)}else a.helperType&&i[a.helperType]?r.push(i[a.helperType]):i[a.name]&&r.push(i[a.name]);for(var l=0;l<i._global.length;l++){var c=i._global[l];c.pred(a,this)&&-1==U(r,c.val)&&r.push(c.val)}return r},getStateAfter:function(e,t){var n=this.doc;return ft(this,(e=ot(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return qn(this,null==e?n.head:"object"==typeof e?st(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return Kn(this,st(this.doc,e),t||"page")},coordsChar:function(e,t){return Jn(this,(e=Wn(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=Wn(this,{top:e,left:0},t||"page").top,Xe(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,i=!1;if("number"==typeof e){var a=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>a&&(e=a,i=!0),r=Ke(this.doc,e)}else r=e;return Vn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-Gt(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var a,o,s,l=this.display,c=(e=qn(this,st(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==r)c=e.top;else if("above"==r||"near"==r){var d=Math.max(l.wrapper.clientHeight,this.doc.height),h=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>d)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=d&&(c=e.bottom),u+t.offsetWidth>h&&(u=h-t.offsetWidth)}t.style.top=c+"px",t.style.left=t.style.right="","right"==i?(u=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),n&&(a=this,o={left:u,top:c,right:u+t.offsetWidth,bottom:c+t.offsetHeight},null!=(s=Tr(a,o)).scrollTop&&jr(a,s.scrollTop),null!=s.scrollLeft&&Pr(a,s.scrollLeft))},triggerOnKeyDown:ti(co),triggerOnKeyPress:ti(ho),triggerOnKeyUp:uo,triggerOnMouseDown:ti(go),execCommand:function(e){if(eo.hasOwnProperty(e))return eo[e].call(null,this)},triggerElectric:ti((function(e){No(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var a=st(this.doc,e),o=0;o<t&&!(a=Bo(this.doc,a,i,n,r)).hitSide;++o);return a},moveH:ti((function(e,t){var n=this;this.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?Bo(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()}),V)})),deleteH:ti((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Ja(this,(function(n){var i=Bo(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}}))})),findPosV:function(e,t,n,r){var i=1,a=r;t<0&&(i=-1,t=-t);for(var o=st(this.doc,e),s=0;s<t;++s){var l=qn(this,o,"div");if(null==a?a=l.left:l.left=a,(o=Fo(this,l,i,n)).hitSide)break}return o},moveV:ti((function(e,t){var n=this,r=this.doc,i=[],a=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(o){if(a)return e<0?o.from():o.to();var s=qn(n,o.head,"div");null!=o.goalColumn&&(s.left=o.goalColumn),i.push(s.left);var l=Fo(n,s,e,t);return"page"==t&&o==r.sel.primary()&&Ir(n,Kn(n,l,"div").top-s.top),l}),V),i.length)for(var o=0;o<r.sel.ranges.length;o++)r.sel.ranges[o].goalColumn=i[o]})),findWordAt:function(e){var t=Ke(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=t.length||!n?++r:--n;for(var a=t.charAt(n),o=ee(a,i)?function(e){return ee(e,i)}:/\s/.test(a)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!ee(e)};n>0&&o(t.charAt(n-1));)--n;for(;r<t.length&&o(t.charAt(r));)++r}return new ki(et(e.line,n),et(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?R(this.display.cursorDiv,"CodeMirror-overwrite"):S(this.display.cursorDiv,"CodeMirror-overwrite"),pe(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==L()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:ti((function(e,t){Lr(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Sn(this)-this.display.barHeight,width:e.scrollWidth-Sn(this)-this.display.barWidth,clientHeight:An(this),clientWidth:On(this)}},scrollIntoView:ti((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:et(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?function(e,t){Rr(e),e.curOp.scrollToPos=t}(this,e):Nr(this,e.from,e.to,e.margin)})),setSize:ti((function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&Fn(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){hr(n,i,"widget");break}++i})),this.curOp.forceUpdate=!0,pe(this,"refresh",this)})),operation:function(e){return $r(this,e)},startOperation:function(){return Kr(this)},endOperation:function(){return qr(this)},refresh:ti((function(){var e=this.display.cachedTextHeight;dr(this),this.curOp.forceUpdate=!0,Un(this),Lr(this,this.doc.scrollLeft,this.doc.scrollTop),ci(this.display),(null==e||Math.abs(e-rr(this.display))>.5||this.options.lineWrapping)&&lr(this),pe(this,"refresh",this)})),swapDoc:ti((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),ji(this,e),Un(this),this.display.input.reset(),Lr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ln(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},be(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,a){e.registerHelper(t,r,a),n[t]._global.push({pred:i,val:a})}}(Oo);var Ko="iter insert remove copy getEditor constructor".split(" ");for(var qo in Ia.prototype)Ia.prototype.hasOwnProperty(qo)&&U(Ko,qo)<0&&(Oo.prototype[qo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ia.prototype[qo]));return be(Ia),Oo.inputStyles={textarea:Wo,contenteditable:Uo},Oo.defineMode=function(e){Oo.defaults.mode||"null"==e||(Oo.defaults.mode=e),Pe.apply(this,arguments)},Oo.defineMIME=function(e,t){Me[e]=t},Oo.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Oo.defineMIME("text/plain","null"),Oo.defineExtension=function(e,t){Oo.prototype[e]=t},Oo.defineDocExtension=function(e,t){Ia.prototype[e]=t},Oo.fromTextArea=function(e,t){if((t=t?P(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=L();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(de(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var o=a.submit=function(){r(),a.submit=i,a.submit(),a.submit=o}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(fe(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=Oo((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=fe,e.on=de,e.wheelEventPixels=Ei,e.Doc=Ia,e.splitLines=De,e.countColumn=B,e.findColumn=W,e.isWordChar=$,e.Pass=H,e.signal=pe,e.Line=Kt,e.changeEnd=Si,e.scrollbarModel=Gr,e.Pos=et,e.cmpPos=tt,e.modes=je,e.mimeModes=Me,e.resolveMode=Be,e.getMode=Fe,e.modeExtensions=Ue,e.extendMode=He,e.copyState=ze,e.startState=Ve,e.innerMode=Ge,e.commands=eo,e.keyMap=za,e.keyName=Ya,e.isModifierKey=Ka,e.lookupKey=Wa,e.normalizeKeyMap=Va,e.StringStream=We,e.SharedTextMarker=Sa,e.TextMarker=wa,e.LineWidget=xa,e.e_preventDefault=ye,e.e_stopPropagation=Ee,e.e_stop=_e,e.addClass=R,e.contains=D,e.rmClass=S,e.keyNames=Ba}(Oo),Oo.version="5.58.2",Oo}()},W6BS:
|
|
|
/*!************************************************!*\
|
|
|
!*** ./src/assets/images/icons/weibaitong.png ***!
|
|
|
\************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAVs0lEQVRoQ+2aa6xlZ3nff++677Xv+9zPHM/YHo+xwQ4E14GKKESkiFsSM8bYQBIEkaBEAkqbRmo/9FulSoX2Qz9GVVQJqUJBhKKA1KRJCIlowwdDDDa+jOd65syc275f1v1d1fOufYYE2ZhJZKRWXjOjvffaa6/1/p//8/yfyzuqLMuS/48P9RrA/8fZfY3B2yXQBHQpf185tBUK+SvH8uV2H/eK1/+jGfwRIBC5ks/Vq/yplq2Wqz+B/ONg5LNlrlz+Qhnot373iih+wgX/YIAivrJgjTKA9BKcYa/Uy/MnUEpD0S2AyzdKkMslZYklbwVYWZpXQSygrSVoc+4fcPzUAKtsom4xpIGiLCkMZbJGs1LkvOHPfJbrhRX5/CM/NDwJZlXiqBKlc7AEjg1aI2iVDXZpoeS9AFXlkmV1W8z+VACLE7dbMiWLE2CFADLgqig6SakCSs4jizcvAvBHMVkqxxhKkePqAs8S1mxyLUxqw6AYKLdtbMtGINpiKKUM07bc96dk9BUBykIFoNYVC/JewMkCDDh18p0so6w+GzfT+FoWC7Yl11curQpFVCoyJQsvDThP6crNdVldi0KLcwogyzJGssVrxYWXAOWzwWg84eXd92UByoK0WHEJqBCA4oC6ChstYHRJIW6lZHWQlsoYQH6rypyOLZ5Xuahx3NIi1TAvLBIcHIlUw8rfcWFLFmzhmPBUxi0NKIRdAVi5qmPAL88LrS9z/AigmHBpCcOaCIUA1BVj4ma6LCi1FkjLBZRoVRrLR9piXjhkysI2mqJxhY2lQUrDjG3iVv5k5YmgyHI1ngLPBqfUxg21nC5LbGUhHJbGUPKu8hTbUthKGcZP3Palks3fY/BECQVQLoDk0QWURYFVFuTaNudtS+Pb8mCNZcQEYmMQi8KymCSQGLJLIx7zKCFKi1uuJNZvNXxDvLBVszUtW5xSm0WL8Mh9hV0xoGFfKRItVzjYJmaFSQtHAFqVwY3i/pi7Kl2e6N9SOJaxkJk4q0CmqcZVBaGtybFY5OIaCscqKqsaUYBE6LYU08Jimi/dxrIYjudM5ynCohzCyvZaw3iCLEviqW3ntDxR1SreTDCbQ1OI65c2qZKQsY0RKlUVFoVxWcsS5DLdnHisKk6iX1iTeBOXlNgqK4kXxmTdgapAVlWKYpKLsuVYykSJictxVtKPNMq1K0saFiym8wWzKKkiSnKeDSud9i1llOe0XE3PrUTMLEmerys1zpVEYCVWIjqVS1aGEjYlJKrvKvYrAVoWGcKgxIkBYmKuurlRTuOqmkIrdCEOJ8qpyIuc/iInL7R5oAEoOVEXRv0cx8HyHBZxZAySJilplqFE8i3bGLHXqZvFlEp4qOJOKM6zrJKkUuN7Lp6t8GxxxcqIEtfCsnFNw1yViuQuxlVNbJ6AFNUuSjEUmbFWBfJEZITF6rywalW5ryyJc21czpSSy/RmErpSFIU2bJWWRRTFVcqwHPOdo3I8HbO60mVi1Y31qwqmYkN+Ox5Nl/Kv2V7t4DhWJWoSfZZFzy3whTUJCxNA4m02meVWgAWcASr31Kgk1+XJwitfl3ykDaPyWdzTiIeW9xKDBWlREkkgVmloWTdWorBIcwajiTlryZOkJClSVDRARUN0HvPut7+NuarxbD8hKqrEbcJTjDePTfiJiKy267iOu8yBot6KrgC0xWMkHiUMSiNsri2GqAoCCYETJlWU6VJcRpiTxUp6yMU1JQ7lPMJKFZvGXUXic4ijtKodxY7KIs8LFlFElC4rEbFwFsGsTzk74sbNI/70UsQDd67zyXe9mSKes3XnnVxZKK7sz8yzxcWWkWMW3mk3cB1xzyqXmtRg2LRMvMn13tItxXVFeBwJF0kfAlIqHgEoYPJSJFjyU0kugITJQlVgTYo4UVlFlmvyRFxUtNliMl2wWLqlZTuUyZxkvE/Wv8rFG2P+aq/g/yR1Um+dT53L+MyvvoUXD2esFGPO7qyhWqs8f3PGMMEsrCpQFM1miOvYOLbCtW2U5EgKE2+uFANWWamnI6AroTEKWyocAxDULClKEXsBUrEkqlm5ZxQXZLkIx7INEoYtG5NC4qxSYsthOJ+RZZp8MSUeXGF84wYv7A74q8OSZ4Yp+dadnGpYvKkW88vr8L5feQffGyo8yyU/usIDpwJ2du7gRuJyaRBRaI1rKxqdLkVekC5mzIaHnFnv4DRWsFWBrWxciTeTSKRIKAlcSTlV2hG3NwAnaVFKjFUsanItLiklmMUsTsky0dOTvk5R2DapUaXCKKhtW+xd36W/+zyH13Z5+uox3+6XXKWH17D4OTfi/tWQerLg2qjgvtNNPvbrv8K1m4c49R5Huk6jHtCY3eTcVkh9ZZtn+xnXb+4zH+9x/cJFJkf7BI7iNz78OO3tc9xc5NSEIaEsLxhNMpo1m9W2Z0SryqXiriVqnIjICIPaMJMLuKIqdhdJsgQoNQMMo4RUa0rbMbknGRxwcOUZLj73It/dnfA3U8U4Vpzq+Lxho8YOBcPpnCuJy1z5lG6Dd52Gjzx+nmf6BSvJDWppjFrZ5jj2qLs5O/6cuzZX+fZ3nuS//+GXTBz11k/R7K7yofe/lzu21om8JoeLAlvUM8lJC00YWKw0PcNelUbEVUvUKClLkf7MKKcxyDIdWEQnDJYWgac4mMdEGYz3d7n5/JNcuHCZJ/cWPD0u0Y7L2Y0G9wXgZDHXJhl7sUWSlnTXemzVYcsvOde1eeyD57kwUEROm3h0zE4zJcgXxO0dJrGibo24by0kmy/4ytf+mJuHx3RX1njiA49gez5NV+H1Nrl0nOFIzyhdia/otURxJVVonGUNqwaxLiVXSb4TIalctYrJJMlMvSe+/fyFF/iDL/1PvLCGH+3zv184Znde0Gp1eF3PYtWF/qzg4njBOLOot2qcabqc8nNCzyaKNLtzhwd26nzqo49xae+ItZpN4nWIW6tMR2N27DmBnTMPegwjm1P1jJ265vf/4IvYrsfjH3iUYPUU2XxA09J47TVujIQQi1oAnaazLCGlIKjKctWP88pFDbglwEK0o2oFnn3+Al/6+p/x7aeukRSKaf8Kd6+vMCngbCekKHN2+ykHixw3CNgRUC2bhl0yTkpuTguGqkFpe4jCvn1b87GPfYQfzBp0VETQ32WzV6OwA7LmNkk8o82Y0C4ZuqvU0hHf/PrXSCn5zQ9+AK97iv7xDVp1H0+VtFpdrs5sfNun2zzpMERdq/e3AIqWSCKXMksi8LtPP88Xv/a/+NZTV8nckE5vlWQ8ZHF4kbee7nF5EHMwzU2SXW/4nGo51FyYRQV7EfQz1whVqFLarQYbtYL1oGDdhw9/8AOo+ip7WY3RPKPXaaCm+3TtCK/WQNfXiZKYlrWg6RR8+ctfQyv40KPncbobFOni1vjEL2Ka7R6TMsCWErEs8BwIPZMt/w5AuUNZ8L3v/5D/9kd/yp8/dY1ZaRHW5IeKmhdiJxGL4R4bjYBpUrDTklbHYZzAzUXJsLDNA9qBzXrDZTVMWbczPJWT5jAvA+qBy71ntui26txz5gy9nTNE3gr9eY5da6KSEV0VmfxXNnqo6JBvfPUbaKX4yGOP0tjc4ehgn3araepbycV2HtNqNJmoJnkSUQsCVpoOlkwNbrmoFMXzOe/55L/nuVFCKwywpf6TYrdWJ2h2SKcT5jee5+c26xzNcg4XmrEWkCVrocVGqFi1clyVkOUpi8Iz8ZSqOkVjg6y+wYP+DX73n3+YZy5cZTE6IjoesNkOWNvcpLW6Req0SLyAdD6l5cQ0SPnDr3wdbdt86PwjWO0ViiTC93ziNMb1fMosMa+DhUWjXqfmO6w07R8HqEgWc9772f/M1cEY31Km0pdaUqoL16uhkgXp+AYrgccwKdgKNWtuQSiAsoJRDlOrSeT2SFtr0tNj1+u4cUJYU0S5zZnkAr/z6c8xi2BnewWdxswnxyz6+4wPbtDwLLa3t2msbuGvbZH29/jjr3wV7Xg88egjhJtnGPf3qbmeSc8iMKpIsL0ax4uSXqtJ4Dn0mnZVthkGpZBGkUYR7/7MF7g6nOJL3yWjBNfFDgLCRodiPjYJ/RdWC/L5hJG2megaU7tDFrSw7Rp23aNt2fRaHuuhzXY7pBfa3H/XFg/9k7dw/dJz2BtneXFvhvbq6DwhsApWuy08pyAeDTjcvUg02SdUDmfvOcuf/OW3cJ2Ax87/GrG3SjQfs73eIY1j07WUeY7teAwSixWpX215vsx8LNQgLpbdBESLiPd++j9ydTjDcaW6kxYILFtUyiFfLJiOD+gGAX4yZNy+h17DpRf6bPd8tkOHjW6dhqcME4WCRZwxj1LuP3c373/fO43r1ms1U8DPEs3hLGV3MKe/kM8JUvkHrk27XuNo90W+9T++SKfbpdXu8eivvYeodZpo2qfu26gix5f8kEZYtscwdel1mqau3Oh4+I6NGsZSqkFSwmgScf53/xPX+hPDoJQ7ruPg+QFOo0OnXKDGN7h7Z53NsKTVWaHpS5uSsUil77N5dnfI6TWfb//wiMZaB3824Wri8W/Pv4kHf+k9PHPtJg+tWBzqBmE559RaD6U1YehXRUSiORhF9Oea4+Njvvnl368YWVvn8fe/jwNrnWgyYLXbrCZudombx3h+jWHqGE+QY7O9BDgyAEtSA3DB+c99gWujObbkQXFyS4avVWvyxBtabDUcRrOUSVS1TtcOI06thTy1N+EX7+rx/Rsj3nhmhfF0SiMMaDnC4oI3PvB6nnjsPP3RhHbD5zD2IBkztQLy+QisOg07QzkO6w1PujrT9gyPjti7ecizL77Im99wP/vuafJkTCusUeYyJbDwSHFdj1R5rHVbpszcarumWVaTWGpRTYZiNIt55LNf4NJghGu7ph0x/ZhfpxO43FeLqXslea6o+VIO2SRFSTdUHExj1kOPZ/s59/U8vrM7YbXXppgOuZGF/Kt338tb3/M437uyyy+s+xxlLr4V0wzqFDqiXu9CnphFinpHmSbRBTXXIQzrXHnuaXScct2/h2S+T7veQBUpjhuaKYHjunhByEq3bXjZ7Mj9S9Q0LctqyFRw4dI1/sV/+K8cLyK6niKwLZM0m3aKVh5d1yJzfKJE5iZVz9Wf5ex0PK4Mc16/6nBtmnNn1zV5re471FTGPNE8/MbX8Vsf/U1GozHtekA/d3CKiKT0ydMZuRXg6oyFVrQ8mftUfZ909rWgxqXnnyXPUi6rM+hE7tEwY/6isPDLBa4XENbrZqxhpgwWPHimi5qnupQkOhsN+czv/TuSLEZJ01qYmbXpEeVGMq5r1VxKp40uJcFKV20xiXN6fsneXHNHy+IHfYsHVkue2Yuot+t48Zy9LOR33nGGdz72cf724lUe2nA50CENEiyvgU6m1MI6vjTctk3o2qSZNN/g26IZFrsXLpDGC75nvw4VjWj5MrbQxvA15vhuwFqnUc1mtAzKSt567ypqkelSW4pR/5hPfvbfEEuBbfYKSjKkMpFZSEGuLDphCH6DPNfVwMjCjCg6gc0gUWzVUo5ih9VAM4+1WV1YZIzTkrf9/Dk+8clPMZjO6dUcxri42YKs9CjSOTpo4Ocps1yKe5uiyMhKaXxdiiJl/9JFoijiyDmFThY4gWcmfalWODrFdXy2N1bJZcBVajNyfMu5VVSSlbJlwHH/iI9/4tNMU/BktKRcclVgaRtLi2UVnaAOQYM0l8FrhrJtJqliJdDsRTZ3hylPj33e0Em51M+pd3uEi0P2dIPf/qen+PWPfoKnL+/x4JrPXuYTFlMIOuTRGK/eoVbGLAqLRijViSbTOTU3QArR65dfZL6IcdbvIs1TdocF3bpPJ3RMzGWzASvr22C7ZpIn/x6+W+LUzPXgsN/nN574CEmSUtrVjo4lvaFTYDlSiSt6Gx1Cv0vhxliJTe6UlEnN7CRpw7QiLmVvopoOoF0sO2MclfzSm+/hM//y95guUtpShARtnCJmEeUoFeM1mziZJo4WeEHN7EUUSUpk73P95vfZvTYAvUa+ukGez9g7njPqF7Rd6RwKiugKi/llHMfHsnwzZG76ddTBwWGZZinD4YjPfvpzTGYzijwxsxBJxt07MlpnE1RmYbuKQG+iuhP0wEe1c+ILr8d2UhOrWldjDKu7TznaJFjbZX58Cqt2mTfd+y5+6+Nv53jyIr3mvYRunX5ymZ71MK6q4Qc+cVYwi2IaNR/PtdGpx7Xoqzx3+CeE84d54NR5IYhWo8Zf/s03+Oo3/wtrvW1Ct0PgrhA6K9TcDqV2jSAJc+rzn/98OZ1Ol/MVl7IsiOOINM0YTw4ZRJeJ9ZDpZEzQ9fGKDexmRJkVqMBn+twOyo5pNJsEYcjx8QG9h55kcel1hGcvMnvhHGrlBR66/1f55X+2zQvX/5q13r2QOQzzH/Lz7X/NYfEAvaZiePOQsrfOSnJIOwiNmz23+xccHr3AweGc8RjCIOD05lksakyjIzrBnRRimNmYXGdmHTs7pzh37pypadW1a9dKqRgODg7Y399nMhmTZZm5ecIxUTpgkR4yiQ+IFhPiLCeOZpSFB3GTXDdwdIv17hmarR4//MGT3PGL+1z/bo/em6/S/84pmg89zwPrj/COd55mMDkirNWwkx3G0QsUB2/Ba57jjq0OZTxGOS46ryYJ82jApetPcTDYJ6yt4tshtVoIuUMz7NI/HqJ1SthscMfOHZy9+y62trbwPO/WbuHf3z7TmvlcLDVmMBgwHIwYjSbMJ3Nm0ZxI5p3JjHk6RkbCgVfDsgN8ArP3N5juM5jdJD26xrOjq9TzCcfzkGYYcXrrbTz6xDs5OrrMeHzIjck+2eiA65OYdrjOPace5NzOw/hO10zW5ZDm27VDUxdLnMtwOctSk+NqtYDNzU3W1tfpdbvm2pc6bgE0u7IvsRUs56M4Yj6dmfJrOhwyGE8YjkaMxkNmszlpLDGbkeUx02RAlC2Y5UeUSZ+pdYyaz1k4Y9OdhE4D5dVoB6dZWbuLlneaXm2DPC1NR5BGCbF0CWVJEAQ0GnXanTb1sE69Xmdzc4uNjQ1ardZy4+dlN3fNF6+4R/9SP5eHJ0nMYhEh8TscDun3+0aoJuMJi8WCJMnRZgRZkJOR5FMKvWBz/QyN2gqqsEjTBE1q7iU5znZsfN83i2+32zSbTXq9HisrK6yurtJoNH4ympf49rYAvhzL1b5JSZqmZqGTyZT+4Jj+cd+4+mg4Yh7F5Kk0xqK4Jb7rVP87w1KGpU6nR6vVNMAEkPzrdDqGxX/McVsAb/dBsh0mKWgxnzMajxgOhhwf9+n3j5nNZ7RbbbrdrgElYE5Aua57u4962etfNYAvx7YISJIkxrXFxdvtlnFJW+Yiy+MnecrtIn/VAN7uQl6t618D+GpZ9md139cY/FlZ+tV6zmsMvlqW/Vnd9/8CAe3hZpCQX/4AAAAASUVORK5CYII="},WaYH:
|
|
|
/*!*********************************************************!*\
|
|
|
!*** ./node_modules/rc-tree/es/TreeNode.js + 1 modules ***!
|
|
|
\*********************************************************/
|
|
|
/*! exports provided: InternalTreeNode, default */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/contextTypes.js because of ./node_modules/rc-tree/es/Tree.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/util.js because of ./node_modules/antd/es/table/hooks/useSelection.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/utils/treeUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("rePB"),i=n("Ff2n"),a=n("VTBJ"),o=n("1OyB"),s=n("vuIU"),l=n("JX7q"),c=n("Ji7U"),u=n("LK+K"),d=n("q1tI"),h=n("TSYQ"),f=n.n(h),p=n("sboe"),m=n("OZM5"),g=function(e){var t=e.prefixCls,n=e.level,i=e.isStart,a=e.isEnd;if(!n)return null;for(var o="".concat(t,"-indent-unit"),s=[],l=0;l<n;l+=1){var c;s.push(d.createElement("span",{key:l,className:f()(o,(c={},Object(r.a)(c,"".concat(o,"-start"),i[l+1]),Object(r.a)(c,"".concat(o,"-end"),a[l+1]),Object(r.a)(c,"".concat(o,"-end-first-level"),!l&&a[0]),c))}))}return d.createElement("span",{"aria-hidden":"true",className:"".concat(t,"-indent")},s)},v=n("815F"),b=function(e){Object(c.a)(n,e);var t=Object(u.a)(n);function n(){var e;return Object(o.a)(this,n),(e=t.apply(this,arguments)).state={dragNodeHighlight:!1},e.onSelectorClick=function(t){(0,e.props.context.onNodeClick)(t,Object(v.b)(e.props)),e.isSelectable()?e.onSelect(t):e.onCheck(t)},e.onSelectorDoubleClick=function(t){(0,e.props.context.onNodeDoubleClick)(t,Object(v.b)(e.props))},e.onSelect=function(t){if(!e.isDisabled()){var n=e.props.context.onNodeSelect;t.preventDefault(),n(t,Object(v.b)(e.props))}},e.onCheck=function(t){if(!e.isDisabled()){var n=e.props,r=n.disableCheckbox,i=n.checked,a=e.props.context.onNodeCheck;if(e.isCheckable()&&!r){t.preventDefault();var o=!i;a(t,Object(v.b)(e.props),o)}}},e.onMouseEnter=function(t){(0,e.props.context.onNodeMouseEnter)(t,Object(v.b)(e.props))},e.onMouseLeave=function(t){(0,e.props.context.onNodeMouseLeave)(t,Object(v.b)(e.props))},e.onContextMenu=function(t){(0,e.props.context.onNodeContextMenu)(t,Object(v.b)(e.props))},e.onDragStart=function(t){var n=e.props.context.onNodeDragStart;t.stopPropagation(),e.setState({dragNodeHighlight:!0}),n(t,Object(l.a)(e));try{t.dataTransfer.setData("text/plain","")}catch(e){}},e.onDragEnter=function(t){var n=e.props.context.onNodeDragEnter;t.preventDefault(),t.stopPropagation(),n(t,Object(l.a)(e))},e.onDragOver=function(t){var n=e.props.context.onNodeDragOver;t.preventDefault(),t.stopPropagation(),n(t,Object(l.a)(e))},e.onDragLeave=function(t){var n=e.props.context.onNodeDragLeave;t.stopPropagation(),n(t,Object(l.a)(e))},e.onDragEnd=function(t){var n=e.props.context.onNodeDragEnd;t.stopPropagation(),e.setState({dragNodeHighlight:!1}),n(t,Object(l.a)(e))},e.onDrop=function(t){var n=e.props.context.onNodeDrop;t.preventDefault(),t.stopPropagation(),e.setState({dragNodeHighlight:!1}),n(t,Object(l.a)(e))},e.onExpand=function(t){(0,e.props.context.onNodeExpand)(t,Object(v.b)(e.props))},e.setSelectHandle=function(t){e.selectHandle=t},e.getNodeState=function(){var t=e.props.expanded;return e.isLeaf()?null:t?"open":"close"},e.hasChildren=function(){var t=e.props.eventKey;return!!((e.props.context.keyEntities[t]||{}).children||[]).length},e.isLeaf=function(){var t=e.props,n=t.isLeaf,r=t.loaded,i=e.props.context.loadData,a=e.hasChildren();return!1!==n&&(n||!i&&!a||i&&r&&!a)},e.isDisabled=function(){var t=e.props.disabled;return!(!e.props.context.disabled&&!t)},e.isCheckable=function(){var t=e.props.checkable,n=e.props.context.checkable;return!(!n||!1===t)&&n},e.syncLoadData=function(t){var n=t.expanded,r=t.loading,i=t.loaded,a=e.props.context,o=a.loadData,s=a.onNodeLoad;r||o&&n&&!e.isLeaf()&&(e.hasChildren()||i||s(Object(v.b)(e.props)))},e.renderSwitcher=function(){var t=e.props,n=t.expanded,r=t.switcherIcon,i=e.props.context,o=i.prefixCls,s=i.switcherIcon,l=r||s;if(e.isLeaf())return d.createElement("span",{className:f()("".concat(o,"-switcher"),"".concat(o,"-switcher-noop"))},"function"==typeof l?l(Object(a.a)(Object(a.a)({},e.props),{},{isLeaf:!0})):l);var c=f()("".concat(o,"-switcher"),"".concat(o,"-switcher_").concat(n?"open":"close"));return d.createElement("span",{onClick:e.onExpand,className:c},"function"==typeof l?l(Object(a.a)(Object(a.a)({},e.props),{},{isLeaf:!1})):l)},e.renderCheckbox=function(){var t=e.props,n=t.checked,r=t.halfChecked,i=t.disableCheckbox,a=e.props.context.prefixCls,o=e.isDisabled(),s=e.isCheckable();if(!s)return null;var l="boolean"!=typeof s?s:null;return d.createElement("span",{className:f()("".concat(a,"-checkbox"),n&&"".concat(a,"-checkbox-checked"),!n&&r&&"".concat(a,"-checkbox-indeterminate"),(o||i)&&"".concat(a,"-checkbox-disabled")),onClick:e.onCheck},l)},e.renderIcon=function(){var t=e.props.loading,n=e.props.context.prefixCls;return d.createElement("span",{className:f()("".concat(n,"-iconEle"),"".concat(n,"-icon__").concat(e.getNodeState()||"docu"),t&&"".concat(n,"-icon_loading"))})},e.renderSelector=function(){var t,n,r=e.state.dragNodeHighlight,i=e.props,a=i.title,o=i.selected,s=i.icon,l=i.loading,c=i.data,u=e.props.context,h=u.prefixCls,p=u.showIcon,m=u.icon,g=u.draggable,v=u.loadData,b=u.titleRender,y=e.isDisabled(),E="".concat(h,"-node-content-wrapper");if(p){var x=s||m;t=x?d.createElement("span",{className:f()("".concat(h,"-iconEle"),"".concat(h,"-icon__customize"))},"function"==typeof x?x(e.props):x):e.renderIcon()}else v&&l&&(t=e.renderIcon());n="function"==typeof a?a(c):b?b(c):a;var _=d.createElement("span",{className:"".concat(h,"-title")},n);return d.createElement("span",{ref:e.setSelectHandle,title:"string"==typeof a?a:"",className:f()("".concat(E),"".concat(E,"-").concat(e.getNodeState()||"normal"),!y&&(o||r)&&"".concat(h,"-node-selected"),!y&&g&&"draggable"),draggable:!y&&g||void 0,"aria-grabbed":!y&&g||void 0,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onContextMenu:e.onContextMenu,onClick:e.onSelectorClick,onDoubleClick:e.onSelectorDoubleClick,onDragStart:g?e.onDragStart:void 0},t,_)},e}return Object(s.a)(n,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var e=this.props.selectable,t=this.props.context.selectable;return"boolean"==typeof e?e:t}},{key:"render",value:function(){var e,t=this.props,n=t.eventKey,a=t.className,o=t.style,s=t.dragOver,l=t.dragOverGapTop,c=t.dragOverGapBottom,u=t.isLeaf,h=t.isStart,p=t.isEnd,b=t.expanded,y=t.selected,E=t.checked,x=t.halfChecked,_=t.loading,k=t.domRef,w=t.active,C=t.onMouseMove,S=Object(i.a)(t,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),O=this.props.context,A=O.prefixCls,T=O.filterTreeNode,I=O.draggable,D=O.keyEntities,L=this.isDisabled(),R=Object(m.f)(S),N=(D[n]||{}).level,j=p[p.length-1];return d.createElement("div",Object.assign({ref:k,className:f()(a,"".concat(A,"-treenode"),(e={},Object(r.a)(e,"".concat(A,"-treenode-disabled"),L),Object(r.a)(e,"".concat(A,"-treenode-switcher-").concat(b?"open":"close"),!u),Object(r.a)(e,"".concat(A,"-treenode-checkbox-checked"),E),Object(r.a)(e,"".concat(A,"-treenode-checkbox-indeterminate"),x),Object(r.a)(e,"".concat(A,"-treenode-selected"),y),Object(r.a)(e,"".concat(A,"-treenode-loading"),_),Object(r.a)(e,"".concat(A,"-treenode-active"),w),Object(r.a)(e,"".concat(A,"-treenode-leaf-last"),j),Object(r.a)(e,"drag-over",!L&&s),Object(r.a)(e,"drag-over-gap-top",!L&&l),Object(r.a)(e,"drag-over-gap-bottom",!L&&c),Object(r.a)(e,"filter-node",T&&T(Object(v.b)(this.props))),e)),style:o,onDragEnter:I?this.onDragEnter:void 0,onDragOver:I?this.onDragOver:void 0,onDragLeave:I?this.onDragLeave:void 0,onDrop:I?this.onDrop:void 0,onDragEnd:I?this.onDragEnd:void 0,onMouseMove:C},R),d.createElement(g,{prefixCls:A,level:N,isStart:h,isEnd:p}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),n}(d.Component),y=function(e){return d.createElement(p.a.Consumer,null,(function(t){return d.createElement(b,Object.assign({},e,{context:t}))}))};y.displayName="TreeNode",y.defaultProps={title:"---"},y.isTreeNode=1;t.a=y},XIdC:
|
|
|
/*!********************************************!*\
|
|
|
!*** ./node_modules/rc-switch/es/index.js ***!
|
|
|
\********************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! @babel/runtime/helpers/esm/defineProperty */"rePB"),i=n(/*! @babel/runtime/helpers/esm/slicedToArray */"ODXe"),a=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),o=n(/*! react */"q1tI"),s=n(/*! classnames */"TSYQ"),l=n.n(s),c=n(/*! rc-util/es/hooks/useMergedState */"6cGi"),u=n(/*! rc-util/es/KeyCode */"4IlW"),d=o.forwardRef((function(e,t){var n,s=e.prefixCls,d=void 0===s?"rc-switch":s,h=e.className,f=e.checked,p=e.defaultChecked,m=e.disabled,g=e.loadingIcon,v=e.checkedChildren,b=e.unCheckedChildren,y=e.onClick,E=e.onChange,x=e.onKeyDown,_=Object(a.a)(e,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),k=Object(c.a)(!1,{value:f,defaultValue:p}),w=Object(i.a)(k,2),C=w[0],S=w[1];function O(e,t){var n=C;return m||(S(n=e),null==E||E(n,t)),n}var A=l()(d,h,(n={},Object(r.a)(n,"".concat(d,"-checked"),C),Object(r.a)(n,"".concat(d,"-disabled"),m),n));return o.createElement("button",Object.assign({},_,{type:"button",role:"switch","aria-checked":C,disabled:m,className:A,ref:t,onKeyDown:function(e){e.which===u.a.LEFT?O(!1,e):e.which===u.a.RIGHT&&O(!0,e),null==x||x(e)},onClick:function(e){var t=O(!C,e);null==y||y(t,e)}}),g,o.createElement("span",{className:"".concat(d,"-inner")},C?v:b))}));d.displayName="Switch",t.a=d},Xmg4:
|
|
|
/*!*******************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/Layer.js ***!
|
|
|
\*******************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./core/util */"bYtY"),i=n(/*! ./config */"LPTA").devicePixelRatio,a=n(/*! ./graphic/Style */"K2GJ"),o=n(/*! ./graphic/Pattern */"3C/r");function s(){return!1}function l(e,t,n){var i=r.createCanvas(),a=t.getWidth(),o=t.getHeight(),s=i.style;return s&&(s.position="absolute",s.left=0,s.top=0,s.width=a+"px",s.height=o+"px",i.setAttribute("data-zr-dom-id",e)),i.width=a*n,i.height=o*n,i}var c=function(e,t,n){var a;n=n||i,"string"==typeof e?a=l(e,t,n):r.isObject(e)&&(e=(a=e).id),this.id=e,this.dom=a;var o=a.style;o&&(a.onselectstart=s,o["-webkit-user-select"]="none",o["user-select"]="none",o["-webkit-touch-callout"]="none",o["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",o.padding=0,o.margin=0,o["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=t,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=n};c.prototype={constructor:c,__dirty:!0,__used:!1,__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var e=this.dpr;this.domBack=l("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},resize:function(e,t){var n=this.dpr,r=this.dom,i=r.style,a=this.domBack;i&&(i.width=e+"px",i.height=t+"px"),r.width=e*n,r.height=t*n,a&&(a.width=e*n,a.height=t*n,1!==n&&this.ctxBack.scale(n,n))},clear:function(e,t){var n,r=this.dom,i=this.ctx,s=r.width,l=r.height,c=(t=t||this.clearColor,this.motionBlur&&!e),u=this.lastFrameAlpha,d=this.dpr;(c&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(r,0,0,s/d,l/d)),i.clearRect(0,0,s,l),t&&"transparent"!==t)&&(t.colorStops?(n=t.__canvasGradient||a.getGradient(i,t,{x:0,y:0,width:s,height:l}),t.__canvasGradient=n):t.image&&(n=o.prototype.getCanvasPattern.call(t,i)),i.save(),i.fillStyle=n||t,i.fillRect(0,0,s,l),i.restore());if(c){var h=this.domBack;i.save(),i.globalAlpha=u,i.drawImage(h,0,0,s,l),i.restore()}}};var u=c;e.exports=u},Xnb7:
|
|
|
/*!**********************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/helper/image.js ***!
|
|
|
\**********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=new(n(/*! ../../core/LRU */"1RvN"))(50);function i(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function a(e){return e&&e.width&&e.height}t.findExistImage=function(e){if("string"==typeof e){var t=r.get(e);return t&&t.image}return e},t.createOrUpdateImage=function(e,t,n,o,s){if(e){if("string"==typeof e){if(t&&t.__zrImageSrc===e||!n)return t;var l=r.get(e),c={hostEl:n,cb:o,cbPayload:s};return l?!a(t=l.image)&&l.pending.push(c):((t=new Image).onload=t.onerror=i,r.put(e,t.__cachedImgObj={image:t,pending:[c]}),t.src=t.__zrImageSrc=e),t}return e}return t},t.isImageReady=a},Xsq0:
|
|
|
/*!*************************************************!*\
|
|
|
!*** ./src/assets/images/banner/mainbanner.jpg ***!
|
|
|
\*************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/mainbanner.0a951716.jpg"},Y1PL:
|
|
|
/*!**********************************************************!*\
|
|
|
!*** ./node_modules/rc-textarea/es/index.js + 7 modules ***!
|
|
|
\**********************************************************/
|
|
|
/*! exports provided: ResizableTextArea, default */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/findDOMNode.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/omit.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.r(t),n.d(t,"ResizableTextArea",(function(){return R}));var r=n("wx14"),i=n("1OyB"),a=n("vuIU"),o=n("Ji7U"),s=n("LK+K"),l=n("q1tI"),c=n("VTBJ"),u=n("rePB"),d=n("Zm9Q"),h=(n("Kwbf"),n("c+Xe")),f=n("m+aA"),p=n("bdgK"),m=new Map;var g=new p.default((function(e){e.forEach((function(e){var t,n=e.target;null===(t=m.get(n))||void 0===t||t.forEach((function(e){return e(n)}))}))}));var v=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"render",value:function(){return this.props.children}}]),n}(l.Component),b=l.createContext(null);function y(e){var t=e.children,n=e.disabled,r=l.useRef(null),i=l.useRef(null),a=l.useContext(b),o=l.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),s=l.isValidElement(t)&&Object(h.c)(t),u=s?t.ref:null,d=l.useMemo((function(){return Object(h.a)(u,r)}),[u,r]),p=l.useRef(e);p.current=e;var y=l.useCallback((function(e){var t=p.current,n=t.onResize,r=t.data,i=e.getBoundingClientRect(),s=i.width,l=i.height,u=e.offsetWidth,d=e.offsetHeight,h=Math.floor(s),f=Math.floor(l);if(o.current.width!==h||o.current.height!==f||o.current.offsetWidth!==u||o.current.offsetHeight!==d){var m={width:h,height:f,offsetWidth:u,offsetHeight:d};o.current=m;var g=u===Math.round(s)?s:u,v=d===Math.round(l)?l:d,b=Object(c.a)(Object(c.a)({},m),{},{offsetWidth:g,offsetHeight:v});null==a||a(b,e,r),n&&Promise.resolve().then((function(){n(b,e)}))}}),[]);return l.useEffect((function(){var e,t,a=Object(f.a)(r.current)||Object(f.a)(i.current);return a&&!n&&(e=a,t=y,m.has(e)||(m.set(e,new Set),g.observe(e)),m.get(e).add(t)),function(){return function(e,t){m.has(e)&&(m.get(e).delete(t),m.get(e).size||(g.unobserve(e),m.delete(e)))}(a,y)}}),[r.current,n]),l.createElement(v,{ref:i},s?l.cloneElement(t,{ref:d}):t)}function E(e){var t=e.children;return Object(d.a)(t).map((function(t,n){var i=(null==t?void 0:t.key)||"".concat("rc-observer-key","-").concat(n);return l.createElement(y,Object(r.a)({},e,{key:i}),t)}))}E.Collection=function(e){var t=e.children,n=e.onBatchResize,r=l.useRef(0),i=l.useRef([]),a=l.useContext(b),o=l.useCallback((function(e,t,o){r.current+=1;var s=r.current;i.current.push({size:e,element:t,data:o}),Promise.resolve().then((function(){s===r.current&&(null==n||n(i.current),i.current=[])})),null==a||a(e,t,o)}),[n,a]);return l.createElement(b.Provider,{value:o},t)};var x,_=E,k=n("bT9E"),w=n("TSYQ"),C=n.n(w),S="\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n",O=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],A={};function T(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&A[n])return A[n];var r=window.getComputedStyle(e),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),a=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),o=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),s=O.map((function(e){return"".concat(e,":").concat(r.getPropertyValue(e))})).join(";"),l={sizingStyle:s,paddingSize:a,borderSize:o,boxSizing:i};return t&&n&&(A[n]=l),l}var I,D=n("Gytx"),L=n.n(D);!function(e){e[e.NONE=0]="NONE",e[e.RESIZING=1]="RESIZING",e[e.RESIZED=2]="RESIZED"}(I||(I={}));var R=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var a;return Object(i.a)(this,n),(a=t.call(this,e)).nextFrameActionId=void 0,a.resizeFrameId=void 0,a.textArea=void 0,a.saveTextArea=function(e){a.textArea=e},a.handleResize=function(e){var t=a.state.resizeStatus,n=a.props,r=n.autoSize,i=n.onResize;t===I.NONE&&("function"==typeof i&&i(e),r&&a.resizeOnNextFrame())},a.resizeOnNextFrame=function(){cancelAnimationFrame(a.nextFrameActionId),a.nextFrameActionId=requestAnimationFrame(a.resizeTextarea)},a.resizeTextarea=function(){var e=a.props.autoSize;if(e&&a.textArea){var t=e.minRows,n=e.maxRows,r=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;x||((x=document.createElement("textarea")).setAttribute("tab-index","-1"),x.setAttribute("aria-hidden","true"),document.body.appendChild(x)),e.getAttribute("wrap")?x.setAttribute("wrap",e.getAttribute("wrap")):x.removeAttribute("wrap");var i=T(e,t),a=i.paddingSize,o=i.borderSize,s=i.boxSizing,l=i.sizingStyle;x.setAttribute("style","".concat(l,";").concat(S)),x.value=e.value||e.placeholder||"";var c,u=Number.MIN_SAFE_INTEGER,d=Number.MAX_SAFE_INTEGER,h=x.scrollHeight;if("border-box"===s?h+=o:"content-box"===s&&(h-=a),null!==n||null!==r){x.value=" ";var f=x.scrollHeight-a;null!==n&&(u=f*n,"border-box"===s&&(u=u+a+o),h=Math.max(u,h)),null!==r&&(d=f*r,"border-box"===s&&(d=d+a+o),c=h>d?"":"hidden",h=Math.min(d,h))}return{height:h,minHeight:u,maxHeight:d,overflowY:c,resize:"none"}}(a.textArea,!1,t,n);a.setState({textareaStyles:r,resizeStatus:I.RESIZING},(function(){cancelAnimationFrame(a.resizeFrameId),a.resizeFrameId=requestAnimationFrame((function(){a.setState({resizeStatus:I.RESIZED},(function(){a.resizeFrameId=requestAnimationFrame((function(){a.setState({resizeStatus:I.NONE}),a.fixFirefoxAutoScroll()}))}))}))}))}},a.renderTextArea=function(){var e=a.props,t=e.prefixCls,n=void 0===t?"rc-textarea":t,i=e.autoSize,o=e.onResize,s=e.className,d=e.disabled,h=a.state,f=h.textareaStyles,p=h.resizeStatus,m=Object(k.a)(a.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),g=C()(n,s,Object(u.a)({},"".concat(n,"-disabled"),d));"value"in m&&(m.value=m.value||"");var v=Object(c.a)(Object(c.a)(Object(c.a)({},a.props.style),f),p===I.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return l.createElement(_,{onResize:a.handleResize,disabled:!(i||o)},l.createElement("textarea",Object(r.a)({},m,{className:g,style:v,ref:a.saveTextArea})))},a.state={textareaStyles:{},resizeStatus:I.NONE},a}return Object(a.a)(n,[{key:"componentDidUpdate",value:function(e){e.value===this.props.value&&L()(e.autoSize,this.props.autoSize)||this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var e=this.textArea.selectionStart,t=this.textArea.selectionEnd;this.textArea.setSelectionRange(e,t)}}catch(e){}}},{key:"render",value:function(){return this.renderTextArea()}}]),n}(l.Component),N=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;Object(i.a)(this,n),(r=t.call(this,e)).resizableTextArea=void 0,r.focus=function(){r.resizableTextArea.textArea.focus()},r.saveTextArea=function(e){r.resizableTextArea=e},r.handleChange=function(e){var t=r.props.onChange;r.setValue(e.target.value,(function(){r.resizableTextArea.resizeTextarea()})),t&&t(e)},r.handleKeyDown=function(e){var t=r.props,n=t.onPressEnter,i=t.onKeyDown;13===e.keyCode&&n&&n(e),i&&i(e)};var a=void 0===e.value||null===e.value?e.defaultValue:e.value;return r.state={value:a},r}return Object(a.a)(n,[{key:"setValue",value:function(e,t){"value"in this.props||this.setState({value:e},t)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return l.createElement(R,Object(r.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(e){return"value"in e?{value:e.value}:null}}]),n}(l.Component);t.default=N},YH21:
|
|
|
/*!************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/core/event.js ***!
|
|
|
\************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../mixin/Eventful */"H6uX");t.Dispatcher=r;var i=n(/*! ./env */"ItGF"),a=n(/*! ./dom */"Ze12"),o=a.isCanvasEl,s=a.transformCoordWithViewport,l="undefined"!=typeof window&&!!window.addEventListener,c=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,u=[];function d(e,t,n,r){return n=n||{},r||!i.canvasSupported?h(e,t,n):i.browser.firefox&&null!=t.layerX&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):null!=t.offsetX?(n.zrX=t.offsetX,n.zrY=t.offsetY):h(e,t,n),n}function h(e,t,n){if(i.domSupported&&e.getBoundingClientRect){var r=t.clientX,a=t.clientY;if(o(e)){var l=e.getBoundingClientRect();return n.zrX=r-l.left,void(n.zrY=a-l.top)}if(s(u,e,r,a))return n.zrX=u[0],void(n.zrY=u[1])}n.zrX=n.zrY=0}function f(e){return e||window.event}var p=l?function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0}:function(e){e.returnValue=!1,e.cancelBubble=!0};t.clientToLocal=d,t.getNativeEvent=f,t.normalizeEvent=function(e,t,n){if(null!=(t=f(t)).zrX)return t;var r=t.type;if(r&&r.indexOf("touch")>=0){var i="touchend"!==r?t.targetTouches[0]:t.changedTouches[0];i&&d(e,i,t,n)}else d(e,t,t,n),t.zrDelta=t.wheelDelta?t.wheelDelta/120:-(t.detail||0)/3;var a=t.button;return null==t.which&&void 0!==a&&c.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t},t.addEventListener=function(e,t,n,r){l?e.addEventListener(t,n,r):e.attachEvent("on"+t,n)},t.removeEventListener=function(e,t,n,r){l?e.removeEventListener(t,n,r):e.detachEvent("on"+t,n)},t.stop=p,t.isMiddleOrRightButtonOnMouseUpDown=function(e){return 2===e.which||3===e.which},t.notLeftMouse=function(e){return e.which>1}},"YJx+":
|
|
|
/*!*********************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Edit/components/editor.less?modules ***!
|
|
|
\*********************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___TKIS5",flex_space_between:"flex_space_between___3ITJg",flex_box_vertical_center:"flex_box_vertical_center___pGLbk",flex_box_center_end:"flex_box_center_end___3-z2A",flex_box_column:"flex_box_column___1SlIq",wrap:"wrap___2TxDh",modal:"modal___jkvmI",titleWrap:"titleWrap___386Y5",required:"required___3ddar",title:"title___2scfU",colorGray:"colorGray___10JDh",choiceWrap:"choiceWrap___3UMox",answer:"answer___1kvCr",activeAnswer:"activeAnswer___1tun2",deleteIcon:"deleteIcon___2_EJk",addIcon:"addIcon___b404_",editorWrap:"editorWrap___1qDS7",htmlWrap:"htmlWrap___2ear6",radio:"radio___3EFAB",color333:"color333___lt3ql",color999:"color999___11Mt_",questionType:"questionType___1yIj7",questionChoices:"questionChoices___1n3A7",action:"action___3PqBm",difficult:"difficult___1L4Zj",fold:"fold___3zBy6",head:"head___1dsW5"}},YgsL:
|
|
|
/*!*****************************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/helper/smoothSpline.js ***!
|
|
|
\*****************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../../core/vector */"QBsz").distance;function i(e,t,n,r,i,a,o){var s=.5*(n-e),l=.5*(r-t);return(2*(t-n)+s+l)*o+(-3*(t-n)-2*s-l)*a+s*i+t}e.exports=function(e,t){for(var n=e.length,a=[],o=0,s=1;s<n;s++)o+=r(e[s-1],e[s]);var l=o/2;for(l=l<n?n:l,s=0;s<l;s++){var c,u,d,h=s/(l-1)*(t?n:n-1),f=Math.floor(h),p=h-f,m=e[f%n];t?(c=e[(f-1+n)%n],u=e[(f+1)%n],d=e[(f+2)%n]):(c=e[0===f?f:f-1],u=e[f>n-2?n-1:f+1],d=e[f>n-3?n-1:f+2]);var g=p*p,v=p*g;a.push([i(c[0],m[0],u[0],d[0],p,g,v),i(c[1],m[1],u[1],d[1],p,g,v)])}return a}},ZW9T:
|
|
|
/*!************************************************************!*\
|
|
|
!*** ./src/components/monaco-editor/index.jsx + 1 modules ***!
|
|
|
\************************************************************/
|
|
|
/*! exports provided: getLanguageByMirrorName, default, DiffEditor */
|
|
|
/*! exports used: DiffEditor, default */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n("k1fw"),i=(n("miYZ"),n("tsqr")),a=n("rAM+"),o=n("tJVT"),s=n("PpiC"),l=n("q1tI"),c=n.n(l),u=n("bdgK");function d(e,t,n,i,a){var o=t.getWordUntilPosition(n),s={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:o.startColumn,endColumn:o.endColumn},l=i.map((function(t){return{label:t,kind:e.languages.CompletionItemKind.Keyword,insertText:t,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:s}}));return a.map((function(e){l.push(Object(r.a)(Object(r.a)({},e),{},{range:s}))})),l}n("LvDl");function h(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}function f(){}var p={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e;if(Array.isArray(e)){for(var n=0;n<e.length;n++){var r=p[e[n]];if(r)return r}return t[0]}return p[t]||t}var g=null;t.b=function(e){var t=e.width,p=void 0===t?"100%":t,v=e.height,b=void 0===v?"100%":v,y=e.value,E=e.language,x=void 0===E?"javascript":E,_=e.style,k=void 0===_?{}:_,w=e.options,C=void 0===w?{}:w,S=e.overrideServices,O=void 0===S?{}:S,A=e.theme,T=void 0===A?"vs-dark":A,I=e.onEditBlur,D=e.onSave,L=e.autoHeight,R=void 0!==L&&L,N=e.forbidCopy,j=void 0!==N&&N,M=e.onChange,P=void 0===M?f:M,B=e.editorDidMount,F=void 0===B?f:B,U=e.onFocus,H=void 0===U?f:U,z=e.filename,G=void 0===z?"educoder.txt":z,V=(Object(s.a)(e,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),Object(l.useRef)()),W=Object(l.useRef)({}),K=Object(l.useRef)(),q=Object(l.useRef)(!1),Y=Object(l.useRef)(),Q=Object(l.useState)(!1),J=Object(o.a)(Q,2),X=J[0],Z=J[1];function $(){i.b.warn(decodeURIComponent("该任务关卡设置了禁止复制粘贴,请手动输入代码。"))}function ee(){var e=W.current.instance;if(e){var t=e.getSelection(),n=W.current.pastePos||{},r=new g.Range(n.startLineNumber||t.endLineNumber,n.startColumn||t.endColumn,n.endLineNumber||t.endLineNumber,n.endColumn||t.endColumn);setTimeout((function(){e.executeEdits("",[{range:r,text:""}])}),300)}}function te(e){(window.navigator.platform.match("Mac")?e.metaKey:e.ctrlKey)&&83==e.keyCode&&(e.preventDefault(),D())}Object(l.useEffect)((function(){K.current&&clearTimeout(K.current),K.current=setTimeout((function(){!function(){var e=W.current.instance;if(null!=y&&e&&X){var t=e.getModel();t&&y!==t.getValue()&&(!0,t.setValue(y),e.layout(),!1)}}()}),500)}),[y,X,W.current]);var ne=function(){if(R&&W.current.instance){var e=W.current.instance.getContentHeight();ue(e<b?b:e)}else ue(b)};function re(e,t){var n,r,i=window.URL||window.webkitURL||window,a=new Blob([t]),o=document.createElementNS("http://www.w3.org/1999/xhtml","a");o.href=i.createObjectURL(a),o.download=e,n=o,(r=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(r)}Object(l.useEffect)((function(){ne()}),[ne]),Object(l.useEffect)((function(){V.current&&!X&&n.e(/*! import() | monaco-editor */27).then(n.t.bind(null,/*! monaco-editor/esm/vs/editor/editor.api.js */"M/lh",7)).then((function(e){try{g=e,W.current.instance=g.editor.create(V.current,{value:y,language:m(x),theme:T,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},O);var t=W.current.instance;if(F(t,g),setTimeout((function(){ne(),W.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){re(G||"educoder.txt",t.getValue())}})}),500),W.current.subscription=t.onDidChangeModelContent((function(e){q.current?clearTimeout(Y.current):(ne(),P(t.getValue(),e)),Y.current=setTimeout((function(){q.current=!1}),500)})),window.Monaco||function(e){var t={label:"ifelse",kind:e.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {","\t$0","} else {","\t","}"].join("\n"),insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet},n=["auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while","inline","restrict","_Bool","_Complex","_Imaginary","_Alignas","_Alignof","_Atomic","_Static_assert","_Noreturn","_Thread_local","_Generic"];e.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(r,i){return{suggestions:d(e,r,i,n,[t])}}});var r=["False","None","True","and","as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"];e.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(t,n){var i=[{label:"print",kind:e.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join("\n"),insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet}];return{suggestions:d(e,t,n,r,i)}}});var i=["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instance of","int","interface","long","native","new","package","private","protected","public","return","strictfp","short","static","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while"];e.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(n,r){var a=[t,{label:"main",kind:e.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {","\t$0","}"].join("\n"),insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:e.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join("\n"),insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet}];return{suggestions:d(e,n,r,i,a)}}})}(g),j&&(t.addCommand(g.KeyMod.CtrlCmd|g.KeyMod.Shift|g.KeyCode.KEY_V,(function(){return $(),null})),t.addCommand(g.KeyMod.CtrlCmd|g.KeyCode.KEY_C,(function(){return $(),null}))),window.Monaco=g,I&&t.onDidBlurEditorWidget((function(){I(t.getValue())})),H&&t.onDidFocusEditorText((function(){H(t.getValue())})),j){t.addCommand(g.KeyMod.CtrlCmd|g.KeyCode.KEY_V,(function(){return $(),null})),t.onDidPaste((function(e){W.current.pastePos=e}));try{window.addEventListener("paste",ee)}catch(e){}}var n=function(){var e;return V.current&&(e=new u.default((function(e){var t,n=Object(a.a)(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;(r.target.offsetHeight>0||r.target.offsetWidth>0)&&W.current.instance.layout()}}catch(e){n.e(e)}finally{n.f()}}))).observe(V.current),e}();return Z(!0),function(){var e=W.current.instance;e.dispose();var t=e.getModel();t&&t.dispose(),W.current.subscription&&W.current.subscription.dispose(),j&&window.removeEventListener("paste",ee),n.unobserve(V.current)}}catch(e){}}))}),[]),Object(l.useEffect)((function(){if(W.current.instance&&X)return document.addEventListener("keydown",te,!1),function(){document.removeEventListener("keydown",te)}}),[D,X]),Object(l.useEffect)((function(){var e=W.current.instance;if(e&&X){var t=m(x);g.editor.setModelLanguage(e.getModel(),t),console.log("language:",x,e.getModel(),t)}}),[x,X]),Object(l.useEffect)((function(){W.current.instance&&X&&g.editor.setTheme(T)}),[T,X]),Object(l.useEffect)((function(){var e=W.current.instance;e&&X&&(e.updateOptions(Object(r.a)({},C)),setTimeout((function(){e.getModel().updateOptions(Object(r.a)({},C))}),200))}),[JSON.stringify(C),X]),Object(l.useEffect)((function(){var e=W.current.instance;e&&X&&e.layout()}),[p,b,X]);var ie=Object(l.useState)(h(p)),ae=Object(o.a)(ie,2),oe=ae[0],se=(ae[1],Object(l.useState)(h(b))),le=Object(o.a)(se,2),ce=le[0],ue=le[1],de=Object(r.a)(Object(r.a)({},k),{},{width:oe,height:ce});return c.a.createElement("div",{className:"my-monaco-editor",ref:V,style:de})};function v(e){var t=e.width,i=void 0===t?"100%":t,s=e.height,d=void 0===s?"100%":s,f=e.original,p=e.modified,m=e.language,v=e.options,b=void 0===v?{}:v,y=Object(l.useRef)(),E=Object(l.useState)(null),x=Object(o.a)(E,2),_=x[0],k=x[1];Object(l.useEffect)((function(){y.current&&n.e(/*! import() | monaco-editor */27).then(n.t.bind(null,/*! monaco-editor/esm/vs/editor/editor.api.js */"M/lh",7)).then((function(e){var t=(g=e).editor.createDiffEditor(y.current,Object(r.a)(Object(r.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},b),{},{wordWrap:!0}));k(t);var n=function(e){var t;return y.current&&(t=new u.default((function(t){var n,r=Object(a.a)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&e.layout()}}catch(e){r.e(e)}finally{r.f()}}))).observe(y.current),t}(t);return function(){t.dispose();var e=t.getModel();e&&e.dispose(),n.unobserve(y.current)}}))}),[]),Object(l.useEffect)((function(){_&&_.setModel({original:g.editor.createModel(f,m),modified:g.editor.createModel(p,m)})}),[f,p,m,_]);var w={width:h(i),height:h(d)};return c.a.createElement("div",{className:"my-diff-editor",ref:y,style:w})}},Ze12:
|
|
|
/*!**********************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/core/dom.js ***!
|
|
|
\**********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./env */"ItGF"),i=n(/*! ./fourPointsTransform */"hOwI").buildTransformer,a=[];function o(e,t,n,a,o){if(t.getBoundingClientRect&&r.domSupported&&!s(t)){var l=t.___zrEVENTSAVED||(t.___zrEVENTSAVED={}),c=function(e,t,n){for(var r=n?"invTrans":"trans",a=t[r],o=t.srcCoords,s=!0,l=[],c=[],u=0;u<4;u++){var d=e[u].getBoundingClientRect(),h=2*u,f=d.left,p=d.top;l.push(f,p),s=s&&o&&f===o[h]&&p===o[h+1],c.push(e[u].offsetLeft,e[u].offsetTop)}return s&&a?a:(t.srcCoords=l,t[r]=n?i(c,l):i(l,c))}(function(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=["left","right"],i=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,l=a%2,c=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[l]+":0",i[c]+":0",r[1-l]+":auto",i[1-c]+":auto",""].join("!important;"),e.appendChild(o),n.push(o)}return n}(t,l),l,o);if(c)return c(e,n,a),!0}return!1}function s(e){return"CANVAS"===e.nodeName.toUpperCase()}t.transformLocalCoord=function(e,t,n,r,i){return o(a,t,r,i,!0)&&o(e,n,a[0],a[1])},t.transformCoordWithViewport=o,t.isCanvasEl=s},ZpRC:
|
|
|
/*!*************************************************************************!*\
|
|
|
!*** ./node_modules/scroll-into-view-if-needed/es/index.js + 1 modules ***!
|
|
|
\*************************************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";function r(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function i(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function a(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return i(n.overflowY,t)||i(n.overflowX,t)||function(e){var t=function(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function o(e,t,n,r,i,a,o,s){return a<e&&o>t||a>e&&o<t?0:a<=e&&s<=n||o>=t&&s>=n?a-e-r:o>t&&s<n||a<e&&s>n?o-t+i:0}var s=function(e,t){var n=window,i=t.scrollMode,s=t.block,l=t.inline,c=t.boundary,u=t.skipOverflowHiddenElements,d="function"==typeof c?c:function(e){return e!==c};if(!r(e))throw new TypeError("Invalid target");for(var h=document.scrollingElement||document.documentElement,f=[],p=e;r(p)&&d(p);){if((p=p.parentElement)===h){f.push(p);break}null!=p&&p===document.body&&a(p)&&!a(document.documentElement)||null!=p&&a(p,u)&&f.push(p)}for(var m=n.visualViewport?n.visualViewport.width:innerWidth,g=n.visualViewport?n.visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,b=window.scrollY||pageYOffset,y=e.getBoundingClientRect(),E=y.height,x=y.width,_=y.top,k=y.right,w=y.bottom,C=y.left,S="start"===s||"nearest"===s?_:"end"===s?w:_+E/2,O="center"===l?C+x/2:"end"===l?k:C,A=[],T=0;T<f.length;T++){var I=f[T],D=I.getBoundingClientRect(),L=D.height,R=D.width,N=D.top,j=D.right,M=D.bottom,P=D.left;if("if-needed"===i&&_>=0&&C>=0&&w<=g&&k<=m&&_>=N&&w<=M&&C>=P&&k<=j)return A;var B=getComputedStyle(I),F=parseInt(B.borderLeftWidth,10),U=parseInt(B.borderTopWidth,10),H=parseInt(B.borderRightWidth,10),z=parseInt(B.borderBottomWidth,10),G=0,V=0,W="offsetWidth"in I?I.offsetWidth-I.clientWidth-F-H:0,K="offsetHeight"in I?I.offsetHeight-I.clientHeight-U-z:0;if(h===I)G="start"===s?S:"end"===s?S-g:"nearest"===s?o(b,b+g,g,U,z,b+S,b+S+E,E):S-g/2,V="start"===l?O:"center"===l?O-m/2:"end"===l?O-m:o(v,v+m,m,F,H,v+O,v+O+x,x),G=Math.max(0,G+b),V=Math.max(0,V+v);else{G="start"===s?S-N-U:"end"===s?S-M+z+K:"nearest"===s?o(N,M,L,U,z+K,S,S+E,E):S-(N+L/2)+K/2,V="start"===l?O-P-F:"center"===l?O-(P+R/2)+W/2:"end"===l?O-j+H+W:o(P,j,R,F,H+W,O,O+x,x);var q=I.scrollLeft,Y=I.scrollTop;S+=Y-(G=Math.max(0,Math.min(Y+G,I.scrollHeight-L+K))),O+=q-(V=Math.max(0,Math.min(q+V,I.scrollWidth-R+W)))}A.push({el:I,top:G,left:V})}return A};function l(e){return e===Object(e)&&0!==Object.keys(e).length}t.a=function(e,t){var n=!e.ownerDocument.documentElement.contains(e);if(l(t)&&"function"==typeof t.behavior)return t.behavior(n?[]:s(e,t));if(!n){var r=function(e){return!1===e?{block:"end",inline:"nearest"}:l(e)?e:{block:"start",inline:"nearest"}}(t);return function(e,t){void 0===t&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach((function(e){var r=e.el,i=e.top,a=e.left;r.scroll&&n?r.scroll({top:i,left:a,behavior:t}):(r.scrollTop=i,r.scrollLeft=a)}))}(s(e,r),r.behavior)}}},Zss7:
|
|
|
/*!**********************************************!*\
|
|
|
!*** ./node_modules/tinycolor2/tinycolor.js ***!
|
|
|
\**********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;!function(i){var a=/^\s+/,o=/\s+$/,s=0,l=i.round,c=i.min,u=i.max,d=i.random;function h(e,t){if(t=t||{},(e=e||"")instanceof h)return e;if(!(this instanceof h))return new h(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,s=null,l=null,d=!1,h=!1;"string"==typeof e&&(e=function(e){e=e.replace(a,"").replace(o,"").toLowerCase();var t,n=!1;if(I[e])e=I[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=G.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=G.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=G.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=G.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=G.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=G.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=G.hex8.exec(e))return{r:j(t[1]),g:j(t[2]),b:j(t[3]),a:F(t[4]),format:n?"name":"hex8"};if(t=G.hex6.exec(e))return{r:j(t[1]),g:j(t[2]),b:j(t[3]),format:n?"name":"hex"};if(t=G.hex4.exec(e))return{r:j(t[1]+""+t[1]),g:j(t[2]+""+t[2]),b:j(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=G.hex3.exec(e))return{r:j(t[1]+""+t[1]),g:j(t[2]+""+t[2]),b:j(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(V(e.r)&&V(e.g)&&V(e.b)?(f=e.r,p=e.g,m=e.b,t={r:255*R(f,255),g:255*R(p,255),b:255*R(m,255)},d=!0,h="%"===String(e.r).substr(-1)?"prgb":"rgb"):V(e.h)&&V(e.s)&&V(e.v)?(r=P(e.s),s=P(e.v),t=function(e,t,n){e=6*R(e,360),t=R(t,100),n=R(n,100);var r=i.floor(e),a=e-r,o=n*(1-t),s=n*(1-a*t),l=n*(1-(1-a)*t),c=r%6;return{r:255*[n,s,o,o,l,n][c],g:255*[l,n,n,s,o,o][c],b:255*[o,o,l,n,n,s][c]}}(e.h,r,s),d=!0,h="hsv"):V(e.h)&&V(e.s)&&V(e.l)&&(r=P(e.s),l=P(e.l),t=function(e,t,n){var r,i,a;function o(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=R(e,360),t=R(t,100),n=R(n,100),0===t)r=i=a=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=o(l,s,e+1/3),i=o(l,s,e),a=o(l,s,e-1/3)}return{r:255*r,g:255*i,b:255*a}}(e.h,r,l),d=!0,h="hsl"),e.hasOwnProperty("a")&&(n=e.a));var f,p,m;return n=L(n),{ok:d,format:e.format||h,r:c(255,u(t.r,0)),g:c(255,u(t.g,0)),b:c(255,u(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=s++}function f(e,t,n){e=R(e,255),t=R(t,255),n=R(n,255);var r,i,a=u(e,t,n),o=c(e,t,n),s=(a+o)/2;if(a==o)r=i=0;else{var l=a-o;switch(i=s>.5?l/(2-a-o):l/(a+o),a){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:i,l:s}}function p(e,t,n){e=R(e,255),t=R(t,255),n=R(n,255);var r,i,a=u(e,t,n),o=c(e,t,n),s=a,l=a-o;if(i=0===a?0:l/a,a==o)r=0;else{switch(a){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:i,v:s}}function m(e,t,n,r){var i=[M(l(e).toString(16)),M(l(t).toString(16)),M(l(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function g(e,t,n,r){return[M(B(r)),M(l(e).toString(16)),M(l(t).toString(16)),M(l(n).toString(16))].join("")}function v(e,t){t=0===t?0:t||10;var n=h(e).toHsl();return n.s-=t/100,n.s=N(n.s),h(n)}function b(e,t){t=0===t?0:t||10;var n=h(e).toHsl();return n.s+=t/100,n.s=N(n.s),h(n)}function y(e){return h(e).desaturate(100)}function E(e,t){t=0===t?0:t||10;var n=h(e).toHsl();return n.l+=t/100,n.l=N(n.l),h(n)}function x(e,t){t=0===t?0:t||10;var n=h(e).toRgb();return n.r=u(0,c(255,n.r-l(-t/100*255))),n.g=u(0,c(255,n.g-l(-t/100*255))),n.b=u(0,c(255,n.b-l(-t/100*255))),h(n)}function _(e,t){t=0===t?0:t||10;var n=h(e).toHsl();return n.l-=t/100,n.l=N(n.l),h(n)}function k(e,t){var n=h(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,h(n)}function w(e){var t=h(e).toHsl();return t.h=(t.h+180)%360,h(t)}function C(e){var t=h(e).toHsl(),n=t.h;return[h(e),h({h:(n+120)%360,s:t.s,l:t.l}),h({h:(n+240)%360,s:t.s,l:t.l})]}function S(e){var t=h(e).toHsl(),n=t.h;return[h(e),h({h:(n+90)%360,s:t.s,l:t.l}),h({h:(n+180)%360,s:t.s,l:t.l}),h({h:(n+270)%360,s:t.s,l:t.l})]}function O(e){var t=h(e).toHsl(),n=t.h;return[h(e),h({h:(n+72)%360,s:t.s,l:t.l}),h({h:(n+216)%360,s:t.s,l:t.l})]}function A(e,t,n){t=t||6,n=n||30;var r=h(e).toHsl(),i=360/n,a=[h(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(h(r));return a}function T(e,t){t=t||6;for(var n=h(e).toHsv(),r=n.h,i=n.s,a=n.v,o=[],s=1/t;t--;)o.push(h({h:r,s:i,v:a})),a=(a+s)%1;return o}h.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:i.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:i.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:i.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=L(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,i){var a=[M(l(e).toString(16)),M(l(t).toString(16)),M(l(n).toString(16)),M(B(r))];if(i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1))return a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0);return a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*R(this._r,255))+"%",g:l(100*R(this._g,255))+"%",b:l(100*R(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*R(this._r,255))+"%, "+l(100*R(this._g,255))+"%, "+l(100*R(this._b,255))+"%)":"rgba("+l(100*R(this._r,255))+"%, "+l(100*R(this._g,255))+"%, "+l(100*R(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(D[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=h(e);n="#"+g(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return h(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(E,arguments)},brighten:function(){return this._applyModification(x,arguments)},darken:function(){return this._applyModification(_,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(k,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(w,arguments)},monochromatic:function(){return this._applyCombination(T,arguments)},splitcomplement:function(){return this._applyCombination(O,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(S,arguments)}},h.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:P(e[r]));e=n}return h(e,t)},h.equals=function(e,t){return!(!e||!t)&&h(e).toRgbString()==h(t).toRgbString()},h.random=function(){return h.fromRatio({r:d(),g:d(),b:d()})},h.mix=function(e,t,n){n=0===n?0:n||50;var r=h(e).toRgb(),i=h(t).toRgb(),a=n/100;return h({r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a})},h.readability=function(e,t){var n=h(e),r=h(t);return(i.max(n.getLuminance(),r.getLuminance())+.05)/(i.min(n.getLuminance(),r.getLuminance())+.05)},h.isReadable=function(e,t,n){var r,i,a=h.readability(e,t);switch(i=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":i=a>=4.5;break;case"AAlarge":i=a>=3;break;case"AAAsmall":i=a>=7}return i},h.mostReadable=function(e,t,n){var r,i,a,o,s=null,l=0;i=(n=n||{}).includeFallbackColors,a=n.level,o=n.size;for(var c=0;c<t.length;c++)(r=h.readability(e,t[c]))>l&&(l=r,s=h(t[c]));return h.isReadable(e,s,{level:a,size:o})||!i?s:(n.includeFallbackColors=!1,h.mostReadable(e,["#fff","#000"],n))};var I=h.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},D=h.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(I);function L(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function R(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),i.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function N(e){return c(1,u(0,e))}function j(e){return parseInt(e,16)}function M(e){return 1==e.length?"0"+e:""+e}function P(e){return e<=1&&(e=100*e+"%"),e}function B(e){return i.round(255*parseFloat(e)).toString(16)}function F(e){return j(e)/255}var U,H,z,G=(H="[\\s|\\(]+("+(U="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?",z="[\\s|\\(]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?",{CSS_UNIT:new RegExp(U),rgb:new RegExp("rgb"+H),rgba:new RegExp("rgba"+z),hsl:new RegExp("hsl"+H),hsla:new RegExp("hsla"+z),hsv:new RegExp("hsv"+H),hsva:new RegExp("hsva"+z),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function V(e){return!!G.CSS_UNIT.exec(e)}e.exports?e.exports=h:void 0===(r=function(){return h}.call(t,n,t,e))||(e.exports=r)}(Math)},aKvl:
|
|
|
/*!*******************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/contain/quadratic.js ***!
|
|
|
\*******************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/curve */"Sj9i").quadraticProjectPoint;t.containStroke=function(e,t,n,i,a,o,s,l,c){if(0===s)return!1;var u=s;return!(c>t+u&&c>i+u&&c>o+u||c<t-u&&c<i-u&&c<o-u||l>e+u&&l>n+u&&l>a+u||l<e-u&&l<n-u&&l<a-u)&&r(e,t,n,i,a,o,l,c,null)<=u/2}},aRTE:
|
|
|
/*!*****************************************************!*\
|
|
|
!*** ./node_modules/qr.js/lib/ErrorCorrectLevel.js ***!
|
|
|
\*****************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports={L:1,M:0,Q:3,H:2}},aX58:
|
|
|
/*!*********************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/zrender.js ***!
|
|
|
\*********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./core/guid */"3gBT"),i=n(/*! ./core/env */"ItGF"),a=n(/*! ./core/util */"bYtY"),o=n(/*! ./Handler */"0s+r"),s=n(/*! ./Storage */"r6Bn"),l=n(/*! ./Painter */"7SHv"),c=n(/*! ./animation/Animation */"MKOG"),u=n(/*! ./dom/HandlerProxy */"zarK"),d=!i.canvasSupported,h={canvas:l},f={};var p=function(e,t,n){n=n||{},this.dom=t,this.id=e;var r=this,l=new s,f=n.renderer;if(d){if(!h.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");f="vml"}else f&&h[f]||(f="canvas");var p=new h[f](t,l,n,e);this.storage=l,this.painter=p;var m=i.node||i.worker?null:new u(p.getViewportRoot(),p.root);this.handler=new o(l,p,m,p.root),this.animation=new c({stage:{update:a.bind(this.flush,this)}}),this.animation.start(),this._needsRefresh;var g=l.delFromStorage,v=l.addToStorage;l.delFromStorage=function(e){g.call(l,e),e&&e.removeSelfFromZr(r)},l.addToStorage=function(e){v.call(l,e),e.addSelfToZr(r)}};p.prototype={constructor:p,getId:function(){return this.id},add:function(e){this.storage.addRoot(e),this._needsRefresh=!0},remove:function(e){this.storage.delRoot(e),this._needsRefresh=!0},configLayer:function(e,t){this.painter.configLayer&&this.painter.configLayer(e,t),this._needsRefresh=!0},setBackgroundColor:function(e){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh(),this._needsRefresh=this._needsRefreshHover=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var e;this._needsRefresh&&(e=!0,this.refreshImmediately()),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately()),e&&this.trigger("rendered")},addHover:function(e,t){if(this.painter.addHover){var n=this.painter.addHover(e,t);return this.refreshHover(),n}},removeHover:function(e){this.painter.removeHover&&(this.painter.removeHover(e),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(e){e=e||{},this.painter.resize(e.width,e.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(e,t){return this.painter.pathToImage(e,t)},setCursorStyle:function(e){this.handler.setCursorStyle(e)},findHover:function(e,t){return this.handler.findHover(e,t)},on:function(e,t,n){this.handler.on(e,t,n)},off:function(e,t){this.handler.off(e,t)},trigger:function(e,t){this.handler.trigger(e,t)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){var e;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,e=this.id,delete f[e]}},t.version="4.3.1",t.init=function(e,t){var n=new p(r(),e,t);return f[n.id]=n,n},t.dispose=function(e){if(e)e.dispose();else{for(var t in f)f.hasOwnProperty(t)&&f[t].dispose();f={}}return this},t.getInstance=function(e){return f[e]},t.registerPainter=function(e,t){h[e]=t}},b6Jr:
|
|
|
/*!****************************************************************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Detail/components/DuplicateChecking/components/SubjectTable/index.less?modules ***!
|
|
|
\****************************************************************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___cC3Lp",flex_space_between:"flex_space_between___2W9GQ",flex_box_vertical_center:"flex_box_vertical_center___2L7-n",flex_box_center_end:"flex_box_center_end___2GJdf",flex_box_column:"flex_box_column___3xK7a",subjectTable:"subjectTable___3Mhzq",title:"title___1p9nz",customTable:"customTable___38s3v",row:"row___2AxLA",line:"line___2V4Vj"}},bT9E:
|
|
|
/*!*****************************************!*\
|
|
|
!*** ./node_modules/rc-util/es/omit.js ***!
|
|
|
\*****************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ");function i(e,t){var n=Object(r.a)({},e);return Array.isArray(t)&&t.forEach((function(e){delete n[e]})),n}},bYtY:
|
|
|
/*!***********************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/core/util.js ***!
|
|
|
\***********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},r={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},i=Object.prototype.toString,a=Array.prototype,o=a.forEach,s=a.filter,l=a.slice,c=a.map,u=a.reduce,d={};function h(e){if(null==e||"object"!=typeof e)return e;var t=e,a=i.call(e);if("[object Array]"===a){if(!k(e)){t=[];for(var o=0,s=e.length;o<s;o++)t[o]=h(e[o])}}else if(r[a]){if(!k(e)){var l=e.constructor;if(e.constructor.from)t=l.from(e);else{t=new l(e.length);for(o=0,s=e.length;o<s;o++)t[o]=h(e[o])}}}else if(!n[a]&&!k(e)&&!_(e))for(var c in t={},e)e.hasOwnProperty(c)&&(t[c]=h(e[c]));return t}function f(e,t,n){if(!E(t)||!E(e))return n?h(t):e;for(var r in t)if(t.hasOwnProperty(r)){var i=e[r],a=t[r];!E(a)||!E(i)||y(a)||y(i)||_(a)||_(i)||x(a)||x(i)||k(a)||k(i)?!n&&r in e||(e[r]=h(t[r])):f(i,a,n)}return e}function p(e,t,n){for(var r in t)t.hasOwnProperty(r)&&(n?null!=t[r]:null==e[r])&&(e[r]=t[r]);return e}var m,g=function(){return d.createCanvas()};function v(e,t,n){if(e&&t)if(e.forEach&&e.forEach===o)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(n,e[a],a,e)}function b(e,t){var n=l.call(arguments,2);return function(){return e.apply(t,n.concat(l.call(arguments)))}}function y(e){return"[object Array]"===i.call(e)}function E(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function x(e){return!!n[i.call(e)]}function _(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}d.createCanvas=function(){return document.createElement("canvas")};function k(e){return e.__ec_primitive__}function w(e){var t=y(e);this.data={};var n=this;function r(e,r){t?n.set(e,r):n.set(r,e)}e instanceof w?e.each(r):e&&v(e,r)}w.prototype={constructor:w,get:function(e){return this.data.hasOwnProperty(e)?this.data[e]:null},set:function(e,t){return this.data[e]=t},each:function(e,t){for(var n in void 0!==t&&(e=b(e,t)),this.data)this.data.hasOwnProperty(n)&&e(this.data[n],n)},removeKey:function(e){delete this.data[e]}},t.$override=function(e,t){"createCanvas"===e&&(m=null),d[e]=t},t.clone=h,t.merge=f,t.mergeAll=function(e,t){for(var n=e[0],r=1,i=e.length;r<i;r++)n=f(n,e[r],t);return n},t.extend=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},t.defaults=p,t.createCanvas=g,t.getContext=function(){return m||(m=g().getContext("2d")),m},t.indexOf=function(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1},t.inherits=function(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t},t.mixin=function(e,t,n){p(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,n)},t.isArrayLike=function(e){if(e)return"string"!=typeof e&&"number"==typeof e.length},t.each=v,t.map=function(e,t,n){if(e&&t){if(e.map&&e.map===c)return e.map(t,n);for(var r=[],i=0,a=e.length;i<a;i++)r.push(t.call(n,e[i],i,e));return r}},t.reduce=function(e,t,n,r){if(e&&t){if(e.reduce&&e.reduce===u)return e.reduce(t,n,r);for(var i=0,a=e.length;i<a;i++)n=t.call(r,n,e[i],i,e);return n}},t.filter=function(e,t,n){if(e&&t){if(e.filter&&e.filter===s)return e.filter(t,n);for(var r=[],i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}},t.find=function(e,t,n){if(e&&t)for(var r=0,i=e.length;r<i;r++)if(t.call(n,e[r],r,e))return e[r]},t.bind=b,t.curry=function(e){var t=l.call(arguments,1);return function(){return e.apply(this,t.concat(l.call(arguments)))}},t.isArray=y,t.isFunction=function(e){return"function"==typeof e},t.isString=function(e){return"[object String]"===i.call(e)},t.isObject=E,t.isBuiltInObject=x,t.isTypedArray=function(e){return!!r[i.call(e)]},t.isDom=_,t.eqNaN=function(e){return e!=e},t.retrieve=function(e){for(var t=0,n=arguments.length;t<n;t++)if(null!=arguments[t])return arguments[t]},t.retrieve2=function(e,t){return null!=e?e:t},t.retrieve3=function(e,t,n){return null!=e?e:null!=t?t:n},t.slice=function(){return Function.call.apply(l,arguments)},t.normalizeCssArray=function(e){if("number"==typeof e)return[e,e,e,e];var t=e.length;return 2===t?[e[0],e[1],e[0],e[1]]:3===t?[e[0],e[1],e[2],e[1]]:e},t.assert=function(e,t){if(!e)throw new Error(t)},t.trim=function(e){return null==e?null:"function"==typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},t.setAsPrimitive=function(e){e.__ec_primitive__=!0},t.isPrimitive=k,t.createHashMap=function(e){return new w(e)},t.concatArray=function(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];var i=e.length;for(r=0;r<t.length;r++)n[r+i]=t[r];return n},t.noop=function(){}},biw7:
|
|
|
/*!**********************************************************!*\
|
|
|
!*** ./node_modules/rc-table/es/context/TableContext.js ***!
|
|
|
\**********************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! react */"q1tI"),i=r.createContext(null);t.a=i},c5Ni:
|
|
|
/*!******************************************************!*\
|
|
|
!*** ./node_modules/codemirror/theme/blackboard.css ***!
|
|
|
\******************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},cRFk:
|
|
|
/*!**************************************************!*\
|
|
|
!*** ./src/assets/images/RepositoryNoneData.png ***!
|
|
|
\**************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/RepositoryNoneData.828085a8.png"},chpo:
|
|
|
/*!********************************************!*\
|
|
|
!*** ./node_modules/size-sensor/lib/id.js ***!
|
|
|
\********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=1;t.default=function(){return"".concat(r++)}},csWT:
|
|
|
/*!********************************************!*\
|
|
|
!*** ./src/assets/images/icons/choose.svg ***!
|
|
|
\********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/choose.4ad1045f.svg"},dMvE:
|
|
|
/*!******************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/animation/easing.js ***!
|
|
|
\******************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return.5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return 0===e?0:Math.pow(1024,e-1)},exponentialOut:function(e){return 1===e?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))},elasticOut:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*-.5:n*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-n.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?.5*n.bounceIn(2*e):.5*n.bounceOut(2*e-1)+.5}},r=n;e.exports=r},dQei:
|
|
|
/*!****************************************!*\
|
|
|
!*** ./node_modules/qr.js/lib/math.js ***!
|
|
|
\****************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){for(var n={glog:function(e){if(e<1)throw new Error("glog("+e+")");return n.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return n.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},r=0;r<8;r++)n.EXP_TABLE[r]=1<<r;for(r=8;r<256;r++)n.EXP_TABLE[r]=n.EXP_TABLE[r-4]^n.EXP_TABLE[r-5]^n.EXP_TABLE[r-6]^n.EXP_TABLE[r-8];for(r=0;r<255;r++)n.LOG_TABLE[n.EXP_TABLE[r]]=r;e.exports=n},dWSS:
|
|
|
/*!**********************************************!*\
|
|
|
!*** ./node_modules/qr.js/lib/Polynomial.js ***!
|
|
|
\**********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./math */"dQei");function i(e,t){if(null==e.length)throw new Error(e.length+"/"+t);for(var n=0;n<e.length&&0==e[n];)n++;this.num=new Array(e.length-n+t);for(var r=0;r<e.length-n;r++)this.num[r]=e[r+n]}i.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),n=0;n<this.getLength();n++)for(var a=0;a<e.getLength();a++)t[n+a]^=r.gexp(r.glog(this.get(n))+r.glog(e.get(a)));return new i(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=r.glog(this.get(0))-r.glog(e.get(0)),n=new Array(this.getLength()),a=0;a<this.getLength();a++)n[a]=this.get(a);for(a=0;a<e.getLength();a++)n[a]^=r.gexp(r.glog(e.get(a))+t);return new i(n,0).mod(e)}},e.exports=i},dejd:
|
|
|
/*!***********************************************************!*\
|
|
|
!*** ./src/components/markdown-editor/toolbar/index.less ***!
|
|
|
\***********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},djh8:
|
|
|
/*!********************************************!*\
|
|
|
!*** ./src/assets/images/icons/qrCode.png ***!
|
|
|
\********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/qrCode.42927872.png"},dmUQ:
|
|
|
/*!**************************************************************!*\
|
|
|
!*** ./node_modules/rc-input-number/es/index.js + 1 modules ***!
|
|
|
\**************************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("Ff2n"),i=n("rePB"),a=n("1OyB"),o=n("vuIU"),s=n("Ji7U"),l=n("md7G"),c=n("foSv"),u=n("q1tI"),d=n.n(u),h=n("TSYQ"),f=n.n(h),p=n("4IlW");function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}function b(){}function y(e){e.preventDefault()}var E=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,x=function(e){return null!=e},_=function(e,t){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)},k=function(e){Object(s.a)(n,e);var t=v(n);function n(e){var r;Object(a.a)(this,n),(r=t.call(this,e)).onKeyDown=function(e){var t=r.props,n=t.onKeyDown,i=t.onPressEnter;if(e.keyCode===p.a.UP){var a=r.getRatio(e);r.up(e,a,null),r.stop()}else if(e.keyCode===p.a.DOWN){var o=r.getRatio(e);r.down(e,o,null),r.stop()}else e.keyCode===p.a.ENTER&&i&&i(e);if(r.recordCursorPosition(),r.lastKeyCode=e.keyCode,n){for(var s=arguments.length,l=new Array(s>1?s-1:0),c=1;c<s;c++)l[c-1]=arguments[c];n.apply(void 0,[e].concat(l))}},r.onKeyUp=function(e){var t=r.props.onKeyUp;if(r.stop(),r.recordCursorPosition(),t){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];t.apply(void 0,[e].concat(i))}},r.onChange=function(e){var t=r.props.onChange;r.state.focused&&(r.inputting=!0),r.rawInput=r.props.parser(r.getValueFromEvent(e)),r.setState({inputValue:r.rawInput}),t(r.toNumber(r.rawInput))},r.onMouseUp=function(){var e=r.props.onMouseUp;r.recordCursorPosition(),e&&e.apply(void 0,arguments)},r.onFocus=function(){var e;r.setState({focused:!0}),(e=r.props).onFocus.apply(e,arguments)},r.onBlur=function(){var e=r.props.onBlur;r.inputting=!1,r.setState({focused:!1});var t=r.getCurrentValidValue(r.state.inputValue),n=r.setValue(t,b);if(e){var i=r.input.value,a=r.getInputDisplayValue({focus:!1,value:n});r.input.value=a?Number(a):a,e.apply(void 0,arguments),r.input.value=i}},r.getRatio=function(e){var t=1;return e.metaKey||e.ctrlKey?t=.1:e.shiftKey&&(t=10),t},r.getFullNum=function(e){return isNaN(e)?e:/e/i.test(String(e))?Number(e).toFixed(18).replace(/\.?0+$/,""):e},r.getPrecision=function(e){if(x(r.props.precision))return r.props.precision;var t=String(e);if(t.indexOf("e-")>=0)return parseInt(t.slice(t.indexOf("e-")+2),10);var n=0;return t.indexOf(".")>=0&&(n=t.length-t.indexOf(".")-1),n},r.getInputDisplayValue=function(e){var t,n=e||r.state,i=n.focused,a=n.inputValue,o=n.value;null==(t=i?a:r.toPrecisionAsStep(o))&&(t="");var s=r.formatWrapper(t);return x(r.props.decimalSeparator)&&(s=s.toString().replace(".",r.props.decimalSeparator)),s},r.recordCursorPosition=function(){try{r.cursorStart=r.input.selectionStart,r.cursorEnd=r.input.selectionEnd,r.currentValue=r.input.value,r.cursorBefore=r.input.value.substring(0,r.cursorStart),r.cursorAfter=r.input.value.substring(r.cursorEnd)}catch(e){}},r.restoreByAfter=function(e){if(void 0===e)return!1;var t=r.input.value,n=t.lastIndexOf(e);if(-1===n)return!1;var i=r.cursorBefore.length;return r.lastKeyCode===p.a.DELETE&&r.cursorBefore.charAt(i-1)===e[0]?(r.fixCaret(i,i),!0):n+e.length===t.length&&(r.fixCaret(n,n),!0)},r.partRestoreByAfter=function(e){return void 0!==e&&Array.prototype.some.call(e,(function(t,n){var i=e.substring(n);return r.restoreByAfter(i)}))},r.isNotCompleteNumber=function(e){return isNaN(e)||""===e||null===e||e&&e.toString().indexOf(".")===e.toString().length-1},r.stop=function(){r.autoStepTimer&&clearTimeout(r.autoStepTimer)},r.down=function(e,t,n){r.pressingUpOrDown=!0,r.step("down",e,t,n)},r.up=function(e,t,n){r.pressingUpOrDown=!0,r.step("up",e,t,n)},r.saveInput=function(e){r.input=e};var i=e.value;void 0===i&&(i=e.defaultValue),r.state={focused:e.autoFocus};var o=r.getValidValue(r.toNumber(i));return r.state=g(g({},r.state),{},{inputValue:r.toPrecisionAsStep(o),value:o}),r}return Object(o.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.value,r=t.onChange,i=t.max,a=t.min,o=this.state.focused;if(e){if(!_(e.value,n)||!_(e.max,i)||!_(e.min,a)){var s,l=o?n:this.getValidValue(n);s=this.pressingUpOrDown?l:this.inputting?this.rawInput:this.toPrecisionAsStep(l),this.setState({value:l,inputValue:s})}var c="value"in this.props?n:this.state.value;"max"in this.props&&e.max!==i&&"number"==typeof c&&c>i&&r&&r(i),"min"in this.props&&e.min!==a&&"number"==typeof c&&c<a&&r&&r(a)}try{if(void 0!==this.cursorStart&&this.state.focused)if(this.partRestoreByAfter(this.cursorAfter)||this.state.value===this.props.value){if(this.currentValue===this.input.value)switch(this.lastKeyCode){case p.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case p.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1)}}else{var u=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===p.a.BACKSPACE?u=this.cursorStart-1:this.lastKeyCode===p.a.DELETE&&(u=this.cursorStart):u=this.input.value.length,this.fixCaret(u,u)}}catch(e){}this.lastKeyCode=null,this.pressingUpOrDown&&this.props.focusOnUpDown&&this.state.focused&&document.activeElement!==this.input&&this.focus()}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(e){var t=e;return t=""===t?"":this.isNotCompleteNumber(parseFloat(t))?this.state.value:this.getValidValue(t),this.toNumber(t)}},{key:"getValueFromEvent",value:function(e){var t=e.target.value.trim().replace(/。/g,".");return x(this.props.decimalSeparator)&&(t=t.replace(this.props.decimalSeparator,".")),t}},{key:"getValidValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.props.min,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props.max,r=parseFloat(e);return isNaN(r)?e:(r<t&&(r=t),r>n&&(r=n),r)}},{key:"setValue",value:function(e,t){var n=this.props.precision,r=this.isNotCompleteNumber(parseFloat(e))?null:parseFloat(e),i=this.state.value,a=void 0===i?null:i,o=this.state.inputValue,s=void 0===o?null:o,l="number"==typeof r?r.toFixed(n):"".concat(r),c=r!==a||l!=="".concat(s);return"value"in this.props?(s=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:s},t)):this.setState({value:r,inputValue:this.toPrecisionAsStep(e)},t),c&&this.props.onChange(r),r}},{key:"getMaxPrecision",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.props,r=n.precision,i=n.step;if(x(r))return r;var a=this.getPrecision(t),o=this.getPrecision(i),s=this.getPrecision(e);return e?Math.max(s,a+o):a+o}},{key:"getPrecisionFactor",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.getMaxPrecision(e,t);return Math.pow(10,n)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(e){return this.props.formatter?this.props.formatter(e):e}},{key:"toPrecisionAsStep",value:function(e){if(this.isNotCompleteNumber(e)||""===e)return e;var t=Math.abs(this.getMaxPrecision(e));return isNaN(t)?e.toString():Number(e).toFixed(t)}},{key:"toNumber",value:function(e){var t=this.props.precision,n=this.state.focused,r=e&&e.length>16&&n;return this.isNotCompleteNumber(e)||r?e:x(t)?Math.round(e*Math.pow(10,t))/Math.pow(10,t):Number(e)}},{key:"upStep",value:function(e,t){var n=this.props.step,r=this.getPrecisionFactor(e,t),i=Math.abs(this.getMaxPrecision(e,t)),a=((r*e+r*n*t)/r).toFixed(i);return this.toNumber(a)}},{key:"downStep",value:function(e,t){var n=this.props.step,r=this.getPrecisionFactor(e,t),i=Math.abs(this.getMaxPrecision(e,t)),a=((r*e-r*n*t)/r).toFixed(i);return this.toNumber(a)}},{key:"step",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3?arguments[3]:void 0;this.stop(),t&&(t.persist(),t.preventDefault());var a=this.props;if(!a.disabled){var o=this.getCurrentValidValue(this.state.inputValue)||0;if(!this.isNotCompleteNumber(o)){var s=this["".concat(e,"Step")](o,r),l=s>a.max||s<a.min;s>a.max?s=a.max:s<a.min&&(s=a.min),this.setValue(s,null),this.setState({focused:!0},(function(){n.pressingUpOrDown=!1})),l||(this.autoStepTimer=setTimeout((function(){n[e](t,r,!0)}),i?200:600))}}}},{key:"fixCaret",value:function(e,t){if(void 0!==e&&void 0!==t&&this.input&&this.input.value)try{var n=this.input.selectionStart,r=this.input.selectionEnd;e===n&&t===r||this.input.setSelectionRange(e,t)}catch(e){}}},{key:"render",value:function(){var e,t=this.props,n=t.prefixCls,a=t.disabled,o=t.readOnly,s=t.useTouch,l=t.autoComplete,c=t.upHandler,u=t.downHandler,h=t.className,p=t.max,m=t.min,g=t.style,v=t.title,E=t.onMouseEnter,x=t.onMouseLeave,_=t.onMouseOver,k=t.onMouseOut,w=t.required,C=t.onClick,S=t.tabIndex,O=t.type,A=t.placeholder,T=t.id,I=t.inputMode,D=t.pattern,L=t.step,R=t.maxLength,N=t.autoFocus,j=t.name,M=t.onPaste,P=t.onInput,B=Object(r.a)(t,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),F=this.state,U=F.value,H=F.focused,z=f()(n,(e={},Object(i.a)(e,h,!!h),Object(i.a)(e,"".concat(n,"-disabled"),a),Object(i.a)(e,"".concat(n,"-focused"),H),e)),G={};Object.keys(B).forEach((function(e){"data-"!==e.substr(0,5)&&"aria-"!==e.substr(0,5)&&"role"!==e||(G[e]=B[e])}));var V=!o&&!a,W=this.getInputDisplayValue(null),K=(U||0===U)&&(isNaN(U)||Number(U)>=p)||a||o,q=(U||0===U)&&(isNaN(U)||Number(U)<=m)||a||o,Y=f()("".concat(n,"-handler"),"".concat(n,"-handler-up"),Object(i.a)({},"".concat(n,"-handler-up-disabled"),K)),Q=f()("".concat(n,"-handler"),"".concat(n,"-handler-down"),Object(i.a)({},"".concat(n,"-handler-down-disabled"),q)),J=s?{onTouchStart:K?b:this.up,onTouchEnd:this.stop}:{onMouseDown:K?b:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},X=s?{onTouchStart:q?b:this.down,onTouchEnd:this.stop}:{onMouseDown:q?b:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return d.a.createElement("div",{className:z,style:g,title:v,onMouseEnter:E,onMouseLeave:x,onMouseOver:_,onMouseOut:k,onFocus:function(){return null},onBlur:function(){return null}},d.a.createElement("div",{className:"".concat(n,"-handler-wrap")},d.a.createElement("span",Object.assign({unselectable:"on"},J,{role:"button","aria-label":"Increase Value","aria-disabled":K,className:Y}),c||d.a.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-up-inner"),onClick:y})),d.a.createElement("span",Object.assign({unselectable:"on"},X,{role:"button","aria-label":"Decrease Value","aria-disabled":q,className:Q}),u||d.a.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-down-inner"),onClick:y}))),d.a.createElement("div",{className:"".concat(n,"-input-wrap")},d.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":m,"aria-valuemax":p,"aria-valuenow":U,required:w,type:O,placeholder:A,onPaste:M,onClick:C,onMouseUp:this.onMouseUp,className:"".concat(n,"-input"),tabIndex:S,autoComplete:l,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:V?this.onKeyDown:b,onKeyUp:V?this.onKeyUp:b,autoFocus:N,maxLength:R,readOnly:o,disabled:a,max:p,min:m,step:L,name:j,title:v,id:T,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(W),pattern:D,inputMode:I,onInput:P},G))))}}]),n}(d.a.Component);k.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:E,min:-E,step:1,style:{},onChange:b,onKeyDown:b,onPressEnter:b,onFocus:b,onBlur:b,parser:function(e){return e.replace(/[^\w.-]+/g,"")},required:!1,autoComplete:"off"};var w=k;t.a=w},dqUG:
|
|
|
/*!**************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/Text.js ***!
|
|
|
\**************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./Displayable */"Gev7"),i=n(/*! ../core/util */"bYtY"),a=n(/*! ../contain/text */"6GrX"),o=n(/*! ./helper/text */"pzxd"),s=n(/*! ./constant */"gut8").ContextCachedBy,l=function(e){r.call(this,e)};l.prototype={constructor:l,type:"text",brush:function(e,t){var n=this.style;this.__dirty&&o.normalizeTextStyle(n,!0),n.fill=n.stroke=n.shadowBlur=n.shadowColor=n.shadowOffsetX=n.shadowOffsetY=null;var r=n.text;null!=r&&(r+=""),o.needDrawText(r,n)?(this.setTransform(e),o.renderText(this,e,r,n,null,t),this.restoreTransform(e)):e.__attrCachedBy=s.NONE},getBoundingRect:function(){var e=this.style;if(this.__dirty&&o.normalizeTextStyle(e,!0),!this._rect){var t=e.text;null!=t?t+="":t="";var n=a.getBoundingRect(e.text+"",e.font,e.textAlign,e.textVerticalAlign,e.textPadding,e.textLineHeight,e.rich);if(n.x+=e.x||0,n.y+=e.y||0,o.getStroke(e.textStroke,e.textStrokeWidth)){var r=e.textStrokeWidth;n.x-=r/2,n.y-=r/2,n.width+=r,n.height+=r}this._rect=n}return this._rect}},i.inherits(l,r);var c=l;e.exports=c},f4xo:
|
|
|
/*!********************************************!*\
|
|
|
!*** ./node_modules/qr.js/lib/8BitByte.js ***!
|
|
|
\********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./mode */"nVVt");function i(e){this.mode=r.MODE_8BIT_BYTE,this.data=e}i.prototype={getLength:function(e){return this.data.length},write:function(e){for(var t=0;t<this.data.length;t++)e.put(this.data.charCodeAt(t),8)}},e.exports=i},fW2E:
|
|
|
/*!**************************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/helper/fixShadow.js ***!
|
|
|
\**************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};e.exports=function(e,t,r){return n.hasOwnProperty(t)?r*e.dpr:r}},fyJ8:
|
|
|
/*!************************************************!*\
|
|
|
!*** ./node_modules/rc-table/es/Cell/index.js ***!
|
|
|
\************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! @babel/runtime/helpers/esm/defineProperty */"rePB"),i=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),a=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),o=n(/*! @babel/runtime/helpers/esm/typeof */"U8pU"),s=n(/*! react */"q1tI"),l=n(/*! classnames */"TSYQ"),c=n.n(l),u=n(/*! rc-util/es/ref */"c+Xe"),d=n(/*! ../utils/valueUtil */"sR1s");var h=s.forwardRef((function(e,t){var n,l,h,f=e.prefixCls,p=e.className,m=e.record,g=e.index,v=e.dataIndex,b=e.render,y=e.children,E=e.component,x=void 0===E?"td":E,_=e.colSpan,k=e.rowSpan,w=e.fixLeft,C=e.fixRight,S=e.firstFixLeft,O=e.lastFixLeft,A=e.firstFixRight,T=e.lastFixRight,I=e.appendNode,D=e.additionalProps,L=void 0===D?{}:D,R=e.ellipsis,N=e.align,j=e.rowType,M=e.isSticky,P="".concat(f,"-cell");if(y)h=y;else{var B=Object(d.b)(m,v);if(h=B,b){var F=b(B,m,g);!function(e){return e&&"object"===Object(o.a)(e)&&!Array.isArray(e)&&!s.isValidElement(e)}(F)?h=F:(h=F.children,l=F.props)}}"object"!==Object(o.a)(h)||Array.isArray(h)||s.isValidElement(h)||(h=null),R&&(O||A)&&(h=s.createElement("span",{className:"".concat(P,"-content")},h));var U=l||{},H=U.colSpan,z=U.rowSpan,G=U.style,V=U.className,W=Object(a.a)(U,["colSpan","rowSpan","style","className"]),K=void 0!==H?H:_,q=void 0!==z?z:k;if(0===K||0===q)return null;var Y={},Q="number"==typeof w,J="number"==typeof C;Q&&(Y.position="sticky",Y.left=w),J&&(Y.position="sticky",Y.right=C);var X,Z={};N&&(Z.textAlign=N);var $=!0===R?{showTitle:!0}:R;$&&($.showTitle||"header"===j)&&("string"==typeof h||"number"==typeof h?X=h.toString():s.isValidElement(h)&&"string"==typeof h.props.children&&(X=h.props.children));var ee,te=Object(i.a)(Object(i.a)(Object(i.a)({title:X},W),L),{},{colSpan:K&&1!==K?K:null,rowSpan:q&&1!==q?q:null,className:c()(P,p,(n={},Object(r.a)(n,"".concat(P,"-fix-left"),Q),Object(r.a)(n,"".concat(P,"-fix-left-first"),S),Object(r.a)(n,"".concat(P,"-fix-left-last"),O),Object(r.a)(n,"".concat(P,"-fix-right"),J),Object(r.a)(n,"".concat(P,"-fix-right-first"),A),Object(r.a)(n,"".concat(P,"-fix-right-last"),T),Object(r.a)(n,"".concat(P,"-ellipsis"),R),Object(r.a)(n,"".concat(P,"-with-append"),I),Object(r.a)(n,"".concat(P,"-fix-sticky"),(Q||J)&&M),n),L.className,V),style:Object(i.a)(Object(i.a)(Object(i.a)(Object(i.a)({},L.style),Z),Y),G),ref:(ee=x,"string"==typeof ee||Object(u.c)(ee)?t:null)});return s.createElement(x,Object.assign({},te),I,h)}));h.displayName="Cell";var f=s.memo(h,(function(e,t){return!!t.shouldCellUpdate&&!t.shouldCellUpdate(t.record,e.record)}));t.a=f},gut8:
|
|
|
/*!******************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/constant.js ***!
|
|
|
\******************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){t.ContextCachedBy={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},t.WILL_BE_RESTORED=9},h78n:
|
|
|
/*!**********************************************************!*\
|
|
|
!*** ./node_modules/rc-progress/es/index.js + 3 modules ***!
|
|
|
\**********************************************************/
|
|
|
/*! exports provided: Line, Circle, default */
|
|
|
/*! exports used: Circle */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return k}));var r=n("q1tI"),i=n.n(r),a=n("TSYQ"),o=n.n(a),s={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},l=function(e){var t=e.map((function(){return Object(r.useRef)()})),n=Object(r.useRef)();return Object(r.useEffect)((function(){var e=Date.now(),r=!1;Object.keys(t).forEach((function(i){var a=t[i].current;if(a){r=!0;var o=a.style;o.transitionDuration=".3s, .3s, .3s, .06s",n.current&&e-n.current<100&&(o.transitionDuration="0s, 0s")}})),r&&(n.current=Date.now())})),[t]};function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var f=function(e){var t=e.className,n=e.percent,r=e.prefixCls,a=e.strokeColor,s=e.strokeLinecap,d=e.strokeWidth,f=e.style,p=e.trailColor,m=e.trailWidth,g=e.transition,v=h(e,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete v.gapPosition;var b=Array.isArray(n)?n:[n],y=Array.isArray(a)?a:[a],E=u(l(b),1)[0],x=d/2,_=100-d/2,k="M ".concat("round"===s?x:0,",").concat(x,"\n L ").concat("round"===s?_:100,",").concat(x),w="0 0 100 ".concat(d),C=0;return i.a.createElement("svg",c({className:o()("".concat(r,"-line"),t),viewBox:w,preserveAspectRatio:"none",style:f},v),i.a.createElement("path",{className:"".concat(r,"-line-trail"),d:k,strokeLinecap:s,stroke:p,strokeWidth:m||d,fillOpacity:"0"}),b.map((function(e,t){var n={strokeDasharray:"".concat(e,"px, 100px"),strokeDashoffset:"-".concat(C,"px"),transition:g||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},a=y[t]||y[y.length-1];return C+=e,i.a.createElement("path",{key:t,className:"".concat(r,"-line-path"),d:k,strokeLinecap:s,stroke:a,strokeWidth:d,fillOpacity:"0",ref:E[t],style:n})})))};f.defaultProps=s;function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var b=0;function y(e){return+e.replace("%","")}function E(e){return Array.isArray(e)?e:[e]}function x(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5?arguments[5]:void 0,o=50-r/2,s=0,l=-o,c=0,u=-2*o;switch(a){case"left":s=-o,l=0,c=2*o,u=0;break;case"right":s=o,l=0,c=-2*o,u=0;break;case"bottom":l=o,u=2*o}var d="M 50,50 m ".concat(s,",").concat(l,"\n a ").concat(o,",").concat(o," 0 1 1 ").concat(c,",").concat(-u,"\n a ").concat(o,",").concat(o," 0 1 1 ").concat(-c,",").concat(u),h=2*Math.PI*o,f={stroke:n,strokeDasharray:"".concat(t/100*(h-i),"px ").concat(h,"px"),strokeDashoffset:"-".concat(i/2+e/100*(h-i),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:d,pathStyle:f}}var _=function(e){var t,n=e.prefixCls,a=e.strokeWidth,s=e.trailWidth,c=e.gapDegree,u=e.gapPosition,d=e.trailColor,h=e.strokeLinecap,f=e.style,g=e.className,_=e.strokeColor,k=e.percent,w=v(e,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),C=Object(r.useMemo)((function(){return b+=1}),[]),S=x(0,100,d,a,c,u),O=S.pathString,A=S.pathStyle,T=E(k),I=E(_),D=I.find((function(e){return"[object Object]"===Object.prototype.toString.call(e)})),L=m(l(T),1)[0];return i.a.createElement("svg",p({className:o()("".concat(n,"-circle"),g),viewBox:"0 0 100 100",style:f},w),D&&i.a.createElement("defs",null,i.a.createElement("linearGradient",{id:"".concat(n,"-gradient-").concat(C),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(D).sort((function(e,t){return y(e)-y(t)})).map((function(e,t){return i.a.createElement("stop",{key:t,offset:e,stopColor:D[e]})})))),i.a.createElement("path",{className:"".concat(n,"-circle-trail"),d:O,stroke:d,strokeLinecap:h,strokeWidth:s||a,fillOpacity:"0",style:A}),(t=0,T.map((function(e,r){var o=I[r]||I[I.length-1],s="[object Object]"===Object.prototype.toString.call(o)?"url(#".concat(n,"-gradient-").concat(C,")"):"",l=x(t,e,o,a,c,u);return t+=e,i.a.createElement("path",{key:r,className:"".concat(n,"-circle-path"),d:l.pathString,stroke:s,strokeLinecap:h,strokeWidth:a,opacity:0===e?0:1,fillOpacity:"0",style:l.pathStyle,ref:L[r]})}))).reverse())};_.defaultProps=s;var k=_},h7HQ:
|
|
|
/*!***********************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/shape/Polygon.js ***!
|
|
|
\***********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../Path */"y+Vt"),i=n(/*! ../helper/poly */"T6xi"),a=r.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(e,t){i.buildPath(e,t,!0)}});e.exports=a},hOwI:
|
|
|
/*!**************************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/core/fourPointsTransform.js ***!
|
|
|
\**************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=Math.log(2);function r(e,t,i,a,o,s){var l=a+"-"+o,c=e.length;if(s.hasOwnProperty(l))return s[l];if(1===t){var u=Math.round(Math.log((1<<c)-1&~o)/n);return e[i][u]}for(var d=a|1<<i,h=i+1;a&1<<h;)h++;for(var f=0,p=0,m=0;p<c;p++){var g=1<<p;g&o||(f+=(m%2?-1:1)*e[i][p]*r(e,t-1,h,d,o|g,s),m++)}return s[l]=f,f}t.buildTransformer=function(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],i={},a=r(n,8,0,0,0,i);if(0!==a){for(var o=[],s=0;s<8;s++)for(var l=0;l<8;l++)null==o[l]&&(o[l]=0),o[l]+=((s+l)%2?-1:1)*r(n,7,0===s?1:0,1<<s,1<<l,i)/a*t[s];return function(e,t,n){var r=t*o[6]+n*o[7]+1;e[0]=(t*o[0]+n*o[1]+o[2])/r,e[1]=(t*o[3]+n*o[4]+o[5])/r}}}},hW8S:
|
|
|
/*!******************************************************!*\
|
|
|
!*** ./node_modules/rc-table/es/utils/legacyUtil.js ***!
|
|
|
\******************************************************/
|
|
|
/*! exports provided: INTERNAL_COL_DEFINE, getExpandableProps, getDataAndAriaProps */
|
|
|
/*! exports used: INTERNAL_COL_DEFINE, getDataAndAriaProps, getExpandableProps */function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return s}));var r=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),i=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),a=(n(/*! rc-util/es/warning */"Kwbf"),"RC_TABLE_INTERNAL_COL_DEFINE");function o(e){var t=e.expandable,n=Object(i.a)(e,["expandable"]);return"expandable"in e?Object(r.a)(Object(r.a)({},n),t):n}function s(e){return Object.keys(e).reduce((function(t,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)||(t[n]=e[n]),t}),{})}},hX1E:
|
|
|
/*!**************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/contain/util.js ***!
|
|
|
\**************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=2*Math.PI;t.normalizeRadian=function(e){return(e%=n)<0&&(e+=n),e}},hZbv:
|
|
|
/*!***************************************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Detail/components/CameraMonitoring/index.less?modules ***!
|
|
|
\***************************************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___3BRsr",flex_space_between:"flex_space_between___3LYgr",flex_box_vertical_center:"flex_box_vertical_center___13f_l",flex_box_center_end:"flex_box_center_end___rqXMW",flex_box_column:"flex_box_column___1IXy2",wrap:"wrap___1RX9-",control:"control___wOcj9",bgH:"bgH___11FpV",sys:"sys___2dkuR",li:"li___22ZND",d1:"d1___2jael",img:"img___RLf0e",btn:"btn___3j-8v",b1:"b1___1fUCu",b2:"b2___26bWj",big:"big___4woyC",cusModal:"cusModal___3JeLM",video:"video___1k_iz",imgWrap:"imgWrap___3HEoA",iBtn:"iBtn___2KoP4",text:"text___3P5y3",no:"no___2apbv",textP:"textP___12hmL",l:"l___wd0bc",r:"r___2njJJ",fo:"fo___3QVZk",b:"b___1kia1"}},hjlX:
|
|
|
/*!*******************************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Detail/components/WorkList/index.less?modules ***!
|
|
|
\*******************************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___1RcrA",flex_space_between:"flex_space_between___3MV00",flex_box_vertical_center:"flex_box_vertical_center___2YkL3",flex_box_center_end:"flex_box_center_end___Jrwqr",flex_box_column:"flex_box_column___1kkFX",rightFilter:"rightFilter___36zCw",classwidth:"classwidth___1XAVK"}},hydK:
|
|
|
/*!**********************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/svg/core.js ***!
|
|
|
\**********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){t.createElement=function(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}},hyiK:
|
|
|
/*!*********************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/contain/windingLine.js ***!
|
|
|
\*********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=function(e,t,n,r,i,a){if(a>t&&a>r||a<t&&a<r)return 0;if(r===t)return 0;var o=r<t?1:-1,s=(a-t)/(r-t);1!==s&&0!==s||(o=r<t?.5:-.5);var l=s*(n-e)+e;return l===i?1/0:l>i?o:0}},i58Z:
|
|
|
/*!*****************************************************!*\
|
|
|
!*** ./src/components/Knowledge/index.less?modules ***!
|
|
|
\*****************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={wrap:"wrap___Yg2Z9",addKnowledge:"addKnowledge___2FlI0",disabled:"disabled___1_wxN"}},iXp4:
|
|
|
/*!**********************************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/helper/fixClipWithShadow.js ***!
|
|
|
\**********************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../../core/env */"ItGF"),i=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];e.exports=function(e){return r.browser.ie&&r.browser.version>=11?function(){var t,n=this.__clipPaths,r=this.style;if(n)for(var a=0;a<n.length;a++){var o=n[a],s=o&&o.shape,l=o&&o.type;if(s&&("sector"===l&&s.startAngle===s.endAngle||"rect"===l&&(!s.width||!s.height))){for(var c=0;c<i.length;c++)i[c][2]=r[i[c][0]],r[i[c][0]]=i[c][1];t=!0;break}}if(e.apply(this,arguments),t)for(c=0;c<i.length;c++)r[i[c][0]]=i[c][2]}:e}},j5sG:
|
|
|
/*!****************************************************************!*\
|
|
|
!*** ./node_modules/size-sensor/lib/sensors/resizeObserver.js ***!
|
|
|
\****************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSensor=void 0;var r,i=(r=n(/*! ../debounce */"NohK"))&&r.__esModule?r:{default:r};t.createSensor=function(e){var t=void 0,n=[],r=(0,i.default)((function(){n.forEach((function(t){t(e)}))})),a=function(){t.disconnect(),n=[],t=void 0};return{element:e,bind:function(i){var a;t||((a=new ResizeObserver(r)).observe(e),r(),t=a),-1===n.indexOf(i)&&n.push(i)},destroy:a,unbind:function(e){var r=n.indexOf(e);-1!==r&&n.splice(r,1),0===n.length&&t&&a()}}}},jTL6:
|
|
|
/*!*******************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/shape/Arc.js ***!
|
|
|
\*******************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../Path */"y+Vt").extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r,0),a=t.startAngle,o=t.endAngle,s=t.clockwise,l=Math.cos(a),c=Math.sin(a);e.moveTo(l*i+n,c*i+r),e.arc(n,r,i,a,o,!s)}});e.exports=r},ji0R:
|
|
|
/*!*******************************************!*\
|
|
|
!*** ./src/assets/images/icons/douyu.jpg ***!
|
|
|
\*******************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/douyu.3e6df9ee.jpg"},"jr/l":
|
|
|
/*!**************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/components/TrfList/index.tsx ***!
|
|
|
\**************************************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/row/style */"14J3");var r=n(/*! antd/es/row */"BMrR"),i=(n(/*! antd/es/checkbox/style */"sRBo"),n(/*! antd/es/checkbox */"kaz8")),a=(n(/*! antd/es/input/style */"5NDa"),n(/*! antd/es/input */"5rEg")),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),c=n.n(l),u=n(/*! react */"q1tI"),d=n.n(u),h=n(/*! ./index.less?modules */"LIjs"),f=n.n(h),p=n(/*! ./delete.png */"NZPE"),m=n.n(p),g=n(/*! @/components/NoData */"BdwD");t.a=function(e){var t=e.data,n=(e.value,e.handleChangePage,e.setSelectedRowKeys),l=e.selectedRowKeys,h=(e.onChange,Object(u.useState)([])),p=Object(s.a)(h,2),v=p[0],b=p[1],y=Object(u.useState)([]),E=Object(s.a)(y,2),x=E[0],_=E[1],k=Object(u.useState)([]),w=Object(s.a)(k,2),C=w[0],S=w[1],O=Object(u.useState)(1),A=Object(s.a)(O,2),T=(A[0],A[1],Object(u.useState)()),I=Object(s.a)(T,2);I[0],I[1];return Object(u.useEffect)((function(){b(t),_([]),S([])}),[t]),Object(u.useEffect)((function(){n&&(_(l),S(l))}),[l]),d.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},d.a.createElement("div",{className:f.a.leftdiv},d.a.createElement(a.a.Search,{size:"large",onChange:function(){var e=Object(o.a)(c.a.mark((function e(n){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:b(t.filter((function(e){var t;return null==e||null===(t=e.name)||void 0===t?void 0:t.includes(n.target.value)})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),placeholder:"可输入班级名称查询"}),0===v.length&&d.a.createElement(g.a,{styles:{margin:"70px auto"},customText:"暂无分班"}),d.a.createElement("div",{style:{height:"85%",overflow:"auto",overflowX:"hidden"}},d.a.createElement(i.a.Group,{value:x.map((function(e){return"".concat(e.course_group_id)})),onChange:function(e){n(v.filter((function(t){return e.includes("".concat(t.course_group_id))})))},style:{marginTop:"10px"}},v.map((function(e,t){return d.a.createElement(r.a,{key:e.course_group_id,style:{marginTop:"10px",lineHeight:"24px",display:"flex",width:200}},d.a.createElement(i.a,{style:{display:"flex",height:"24px",alignItems:"center"},disabled:e.is_published,value:"".concat(e.course_group_id)},d.a.createElement("div",{className:f.a.listClass},d.a.createElement("span",{className:f.a.spantitle,style:{width:e.is_published?"108px":"170px"}},e.name),e.is_published&&d.a.createElement("span",{style:{width:"52px",height:"24px",background:"#B8B8B8",borderRadius:"13px",color:"white",lineHeight:"24px",textAlign:"center",display:"inline-block"}},"已发布"))))}))))),d.a.createElement("div",{className:f.a.rightdiv},d.a.createElement(a.a.Search,{onChange:function(e){S(x.filter((function(t){return t.name.includes(e.target.value)})))},size:"large",placeholder:"可输入班级名称查询"}),0===C.length&&d.a.createElement(g.a,{styles:{margin:"70px auto"},customText:"暂未选择分班"}),C.length>0&&d.a.createElement("div",{style:{marginTop:"10px",height:"85%",overflow:"hidden",position:"relative"}},d.a.createElement("div",{style:{overflowX:"hidden",overflowY:"scroll",position:"absolute",left:0,top:0,right:-17,bottom:0}},C.map((function(e,t){return d.a.createElement(r.a,{justify:"space-between",style:{marginTop:"10px"},key:e.course_group_id},d.a.createElement("div",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",marginRight:"5px",marginLeft:"5px",width:"75%"}},e.name),d.a.createElement("img",{src:m.a,style:{cursor:"pointer",height:"16px",marginRight:17},onClick:function(){n(x.filter((function(t){return"".concat(t.course_group_name)!="".concat(e.course_group_name)})))}}))}))))))}},juDX:
|
|
|
/*!*********************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/svg/svg.js ***!
|
|
|
\*********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ./graphic */"P47w"),(0,n(/*! ../zrender */"aX58").registerPainter)("svg",n(/*! ./Painter */"3CBa"))},k3GJ:
|
|
|
/*!*******************************************************!*\
|
|
|
!*** ./node_modules/rc-tabs/es/index.js + 50 modules ***!
|
|
|
\*******************************************************/
|
|
|
/*! exports provided: TabPane, default */
|
|
|
/*! exports used: TabPane, default */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/mini-store/esm/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-align/es/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-dropdown/es/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/canUseDom.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/contains.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/findDOMNode.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Portal.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/createChainedFunction.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMergedState.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/omit.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/raf.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-dom/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return Wt}));var r=n("rePB"),i=n("ODXe"),a=n("Ff2n"),o=n("VTBJ"),s=n("q1tI"),l=n("TSYQ"),c=n.n(l),u=n("Zm9Q"),d=n("6cGi"),h=n("KQm4"),f=n("xEkU"),p=n.n(f),m=n("t23M");function g(e){var t=Object(s.useRef)(),n=Object(s.useRef)(!1);return Object(s.useEffect)((function(){return function(){n.current=!0,p.a.cancel(t.current)}}),[]),function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];n.current||(p.a.cancel(t.current),t.current=p()((function(){e.apply(void 0,i)})))}}var v=n("4IlW");var b=s.forwardRef((function(e,t){var n,i=e.prefixCls,a=e.id,o=e.active,l=e.rtl,u=e.tab,d=u.key,h=u.tab,f=u.disabled,p=u.closeIcon,m=e.tabBarGutter,g=e.tabPosition,b=e.closable,y=e.renderWrapper,E=e.removeAriaLabel,x=e.editable,_=e.onClick,k=e.onRemove,w=e.onFocus,C="".concat(i,"-tab");s.useEffect((function(){return k}),[]);var S={};"top"===g||"bottom"===g?S[l?"marginLeft":"marginRight"]=m:S.marginBottom=m;var O=x&&!1!==b&&!f;function A(e){f||_(e)}var T=s.createElement("div",{key:d,ref:t,className:c()(C,(n={},Object(r.a)(n,"".concat(C,"-with-remove"),O),Object(r.a)(n,"".concat(C,"-active"),o),Object(r.a)(n,"".concat(C,"-disabled"),f),n)),style:S,onClick:A},s.createElement("div",{role:"tab","aria-selected":o,id:a&&"".concat(a,"-tab-").concat(d),className:"".concat(C,"-btn"),"aria-controls":a&&"".concat(a,"-panel-").concat(d),"aria-disabled":f,tabIndex:f?null:0,onClick:function(e){e.stopPropagation(),A(e)},onKeyDown:function(e){[v.a.SPACE,v.a.ENTER].includes(e.which)&&(e.preventDefault(),A(e))},onFocus:w},h),O&&s.createElement("button",{type:"button","aria-label":E||"remove",tabIndex:0,className:"".concat(C,"-remove"),onClick:function(e){var t;e.stopPropagation(),(t=e).preventDefault(),t.stopPropagation(),x.onEdit("remove",{key:d,event:t})}},p||x.removeIcon||"×"));return y&&(T=y(T)),T})),y={width:0,height:0,left:0,top:0};var E={width:0,height:0,left:0,top:0,right:0};var x=n("wx14"),_=n("1OyB"),k=n("vuIU"),w=n("JX7q"),C=n("Ji7U"),S=n("LK+K"),O=n("I8Z2"),A=n("bT9E"),T=n("2GS6"),I=n("Gytx"),D=n.n(I),L=n("U8pU"),R=/iPhone/i,N=/iPod/i,j=/iPad/i,M=/\bAndroid(?:.+)Mobile\b/i,P=/Android/i,B=/\bAndroid(?:.+)SD4930UR\b/i,F=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,U=/Windows Phone/i,H=/\bWindows(?:.+)ARM\b/i,z=/BlackBerry/i,G=/BB10/i,V=/Opera Mini/i,W=/\b(CriOS|Chrome)(?:.+)Mobile/i,K=/Mobile(?:.+)Firefox\b/i;function q(e,t){return e.test(t)}function Y(e){var t=e||("undefined"!=typeof navigator?navigator.userAgent:""),n=(t||"").split("[FBAN");if(void 0!==n[1]){var r=n;t=Object(i.a)(r,1)[0]}if(void 0!==(n=t.split("Twitter"))[1]){var a=n;t=Object(i.a)(a,1)[0]}var o={apple:{phone:q(R,t)&&!q(U,t),ipod:q(N,t),tablet:!q(R,t)&&q(j,t)&&!q(U,t),device:(q(R,t)||q(N,t)||q(j,t))&&!q(U,t)},amazon:{phone:q(B,t),tablet:!q(B,t)&&q(F,t),device:q(B,t)||q(F,t)},android:{phone:!q(U,t)&&q(B,t)||!q(U,t)&&q(M,t),tablet:!q(U,t)&&!q(B,t)&&!q(M,t)&&(q(F,t)||q(P,t)),device:!q(U,t)&&(q(B,t)||q(F,t)||q(M,t)||q(P,t))||q(/\bokhttp\b/i,t)},windows:{phone:q(U,t),tablet:q(H,t),device:q(U,t)||q(H,t)},other:{blackberry:q(z,t),blackberry10:q(G,t),opera:q(V,t),firefox:q(K,t),chrome:q(W,t),device:q(z,t)||q(G,t)||q(V,t)||q(K,t)||q(W,t)},any:null,phone:null,tablet:null};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}var Q=Object(o.a)(Object(o.a)({},Y()),{},{isMobile:Y});function J(){}function X(e,t,n){var r=t||"";return e.key||"".concat(r,"item_").concat(n)}function Z(e){return"".concat(e,"-menu-")}function $(e,t){var n=-1;s.Children.forEach(e,(function(e){n+=1,e&&e.type&&e.type.isMenuItemGroup?s.Children.forEach(e.props.children,(function(e){t(e,n+=1)})):t(e,n)}))}var ee=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],te=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e&&"function"==typeof e.getBoundingClientRect&&e.getBoundingClientRect().width;if(n){if(t){var r=getComputedStyle(e),i=r.marginLeft,a=r.marginRight;n+=+i.replace("px","")+ +a.replace("px","")}n=+n.toFixed(6)}return n||0},ne=function(e,t,n){e&&"object"===Object(L.a)(e.style)&&(e.style[t]=n)},re=n("bdgK"),ie=n("i8i4"),ae=n.n(ie),oe=n("wgJM"),se=n("l4aY"),le=n("m+aA"),ce=n("c+Xe"),ue=n("zT1h"),de=n("QC+M");function he(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}var fe=n("MNnm");function pe(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}var me,ge,ve,be=(me=Object(fe.a)(),ge="undefined"!=typeof window?window:{},ve={animationend:pe("Animation","AnimationEnd"),transitionend:pe("Transition","TransitionEnd")},me&&("AnimationEvent"in ge||delete ve.animationend.animation,"TransitionEvent"in ge||delete ve.transitionend.transition),ve),ye={};if(Object(fe.a)()){var Ee=document.createElement("div");ye=Ee.style}var xe={};function _e(e){if(xe[e])return xe[e];var t=be[e];if(t)for(var n=Object.keys(t),r=n.length,i=0;i<r;i+=1){var a=n[i];if(Object.prototype.hasOwnProperty.call(t,a)&&a in ye)return xe[e]=t[a],xe[e]}return""}var ke=_e("animationend"),we=_e("transitionend"),Ce=!(!ke||!we),Se=ke||"animationend",Oe=we||"transitionend";function Ae(e,t){return e?"object"===Object(L.a)(e)?e[t.replace(/-\w/g,(function(e){return e[1].toUpperCase()}))]:"".concat(e,"-").concat(t):null}function Te(e){var t=Object(s.useRef)(!1),n=Object(s.useState)(e),r=Object(i.a)(n,2),a=r[0],o=r[1];return Object(s.useEffect)((function(){return function(){t.current=!0}}),[]),[a,function(e){t.current||o(e)}]}var Ie=Object(fe.a)()?s.useLayoutEffect:s.useEffect,De=["prepare","start","active","end"];function Le(e){return"active"===e||"end"===e}var Re=function(e,t){var n=s.useState("none"),r=Object(i.a)(n,2),a=r[0],o=r[1],l=function(){var e=s.useRef(null);function t(){oe.a.cancel(e.current)}return s.useEffect((function(){return function(){t()}}),[]),[function n(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;t();var a=Object(oe.a)((function(){i<=1?r({isCanceled:function(){return a!==e.current}}):n(r,i-1)}));e.current=a},t]}(),c=Object(i.a)(l,2),u=c[0],d=c[1];return Ie((function(){if("none"!==a&&"end"!==a){var e=De.indexOf(a),n=De[e+1],r=t(a);!1===r?o(n):u((function(e){function t(){e.isCanceled()||o(n)}!0===r?t():Promise.resolve(r).then(t)}))}}),[e,a]),s.useEffect((function(){return function(){d()}}),[]),[function(){o("prepare")},a]};function Ne(e,t,n,a){var l=a.motionEnter,c=void 0===l||l,u=a.motionAppear,d=void 0===u||u,h=a.motionLeave,f=void 0===h||h,p=a.motionDeadline,m=a.motionLeaveImmediately,g=a.onAppearPrepare,v=a.onEnterPrepare,b=a.onLeavePrepare,y=a.onAppearStart,E=a.onEnterStart,x=a.onLeaveStart,_=a.onAppearActive,k=a.onEnterActive,w=a.onLeaveActive,C=a.onAppearEnd,S=a.onEnterEnd,O=a.onLeaveEnd,A=a.onVisibleChanged,T=Te(),I=Object(i.a)(T,2),D=I[0],L=I[1],R=Te("none"),N=Object(i.a)(R,2),j=N[0],M=N[1],P=Te(null),B=Object(i.a)(P,2),F=B[0],U=B[1],H=Object(s.useRef)(!1),z=Object(s.useRef)(null),G=Object(s.useRef)(!1),V=Object(s.useRef)(null);function W(){return n()||V.current}var K=Object(s.useRef)(!1);function q(e){var t,n=W();e&&!e.deadline&&e.target!==n||("appear"===j&&K.current?t=null==C?void 0:C(n,e):"enter"===j&&K.current?t=null==S?void 0:S(n,e):"leave"===j&&K.current&&(t=null==O?void 0:O(n,e)),!1===t||G.current||(M("none"),U(null)))}var Y=function(e){var t=Object(s.useRef)(),n=Object(s.useRef)(e);n.current=e;var r=s.useCallback((function(e){n.current(e)}),[]);function i(e){e&&(e.removeEventListener(Oe,r),e.removeEventListener(Se,r))}return s.useEffect((function(){return function(){i(t.current)}}),[]),[function(e){t.current&&t.current!==e&&i(t.current),e&&e!==t.current&&(e.addEventListener(Oe,r),e.addEventListener(Se,r),t.current=e)},i]}(q),Q=Object(i.a)(Y,1)[0],J=s.useMemo((function(){var e,t,n;switch(j){case"appear":return e={},Object(r.a)(e,"prepare",g),Object(r.a)(e,"start",y),Object(r.a)(e,"active",_),e;case"enter":return t={},Object(r.a)(t,"prepare",v),Object(r.a)(t,"start",E),Object(r.a)(t,"active",k),t;case"leave":return n={},Object(r.a)(n,"prepare",b),Object(r.a)(n,"start",x),Object(r.a)(n,"active",w),n;default:return{}}}),[j]),X=Re(j,(function(e){if("prepare"===e){var t=J.prepare;return!!t&&t(W())}var n;ee in J&&U((null===(n=J[ee])||void 0===n?void 0:n.call(J,W(),null))||null);return"active"===ee&&(Q(W()),p>0&&(clearTimeout(z.current),z.current=setTimeout((function(){q({deadline:!0})}),p))),!0})),Z=Object(i.a)(X,2),$=Z[0],ee=Z[1],te=Le(ee);K.current=te,Ie((function(){L(t);var n,r=H.current;(H.current=!0,e)&&(!r&&t&&d&&(n="appear"),r&&t&&c&&(n="enter"),(r&&!t&&f||!r&&m&&!t&&f)&&(n="leave"),n&&(M(n),$()))}),[t]),Object(s.useEffect)((function(){("appear"===j&&!d||"enter"===j&&!c||"leave"===j&&!f)&&M("none")}),[d,c,f]),Object(s.useEffect)((function(){return function(){clearTimeout(z.current),G.current=!0}}),[]),Object(s.useEffect)((function(){void 0!==D&&"none"===j&&(null==A||A(D))}),[D,j]);var ne=F;return J.prepare&&"start"===ee&&(ne=Object(o.a)({transition:"none"},ne)),[j,ee,ne,null!=D?D:t]}var je=function(e){Object(C.a)(n,e);var t=Object(S.a)(n);function n(){return Object(_.a)(this,n),t.apply(this,arguments)}return Object(k.a)(n,[{key:"render",value:function(){return this.props.children}}]),n}(s.Component);var Me=function(e){var t=e;function n(e){return!(!e.motionName||!t)}"object"===Object(L.a)(e)&&(t=e.transitionSupport);var a=s.forwardRef((function(e,t){var a=e.visible,l=void 0===a||a,u=e.removeOnLeave,d=void 0===u||u,h=e.forceRender,f=e.children,p=e.motionName,m=e.leavedClassName,g=e.eventProps,v=n(e),b=Object(s.useRef)(),y=Object(s.useRef)();var E=Ne(v,l,(function(){try{return Object(le.a)(b.current||y.current)}catch(e){return null}}),e),x=Object(i.a)(E,4),_=x[0],k=x[1],w=x[2],C=x[3],S=s.useRef(C);C&&(S.current=!0);var O=Object(s.useRef)(t);O.current=t;var A,T=s.useCallback((function(e){b.current=e,Object(ce.b)(O.current,e)}),[]),I=Object(o.a)(Object(o.a)({},g),{},{visible:l});if(f)if("none"!==_&&n(e)){var D,L;"prepare"===k?L="prepare":Le(k)?L="active":"start"===k&&(L="start"),A=f(Object(o.a)(Object(o.a)({},I),{},{className:c()(Ae(p,_),(D={},Object(r.a)(D,Ae(p,"".concat(_,"-").concat(L)),L),Object(r.a)(D,p,"string"==typeof p),D)),style:w}),T)}else A=C?f(Object(o.a)({},I),T):!d&&S.current?f(Object(o.a)(Object(o.a)({},I),{},{className:m}),T):h?f(Object(o.a)(Object(o.a)({},I),{},{style:{display:"none"}}),T):null;else A=null;return s.createElement(je,{ref:y},A)}));return a.displayName="CSSMotion",a}(Ce);function Pe(e){var t;return t=e&&"object"===Object(L.a)(e)&&"key"in e?e:{key:e},Object(o.a)(Object(o.a)({},t),{},{key:String(t.key)})}function Be(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(Pe)}function Fe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,i=t.length,a=Be(e),s=Be(t);a.forEach((function(e){for(var t=!1,a=r;a<i;a+=1){var l=s[a];if(l.key===e.key){r<a&&(n=n.concat(s.slice(r,a).map((function(e){return Object(o.a)(Object(o.a)({},e),{},{status:"add"})}))),r=a),n.push(Object(o.a)(Object(o.a)({},l),{},{status:"keep"})),r+=1,t=!0;break}}t||n.push(Object(o.a)(Object(o.a)({},e),{},{status:"remove"}))})),r<i&&(n=n.concat(s.slice(r).map((function(e){return Object(o.a)(Object(o.a)({},e),{},{status:"add"})}))));var l={};n.forEach((function(e){var t=e.key;l[t]=(l[t]||0)+1}));var c=Object.keys(l).filter((function(e){return l[e]>1}));return c.forEach((function(e){(n=n.filter((function(t){var n=t.key,r=t.status;return n!==e||"remove"!==r}))).forEach((function(t){t.key===e&&(t.status="keep")}))})),n}var Ue=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Me,n=function(e){Object(C.a)(r,e);var n=Object(S.a)(r);function r(){var e;return Object(_.a)(this,r),(e=n.apply(this,arguments)).state={keyEntities:[]},e.removeKey=function(t){e.setState((function(e){return{keyEntities:e.keyEntities.map((function(e){return e.key!==t?e:Object(o.a)(Object(o.a)({},e),{},{status:"removed"})}))}}))},e}return Object(k.a)(r,[{key:"render",value:function(){var e=this,n=this.state.keyEntities,r=this.props,i=r.component,o=r.children,l=r.onVisibleChanged,c=Object(a.a)(r,["component","children","onVisibleChanged"]),u=i||s.Fragment,d={};return Ue.forEach((function(e){d[e]=c[e],delete c[e]})),delete c.keys,s.createElement(u,c,n.map((function(n){var r=n.status,i=Object(a.a)(n,["status"]),c="add"===r||"keep"===r;return s.createElement(t,Object(x.a)({},d,{key:i.key,visible:c,eventProps:i,onVisibleChanged:function(t){null==l||l(t,{key:i.key}),t||e.removeKey(i.key)}}),o)})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.keys,r=t.keyEntities,i=Be(n);return{keyEntities:Fe(r,i).filter((function(e){var t=r.find((function(t){var n=t.key;return e.key===n}));return!t||"removed"!==t.status||"remove"!==e.status}))}}}]),r}(s.Component);n.defaultProps={component:"div"}}(Ce);var He=Me;function ze(e){var t=e.prefixCls,n=e.motion,r=e.animation,i=e.transitionName;return n||(r?{motionName:"".concat(t,"-").concat(r)}:i?{motionName:i}:null)}function Ge(e){var t=e.prefixCls,n=e.visible,r=e.zIndex,i=e.mask,a=e.maskMotion,l=e.maskAnimation,u=e.maskTransitionName;if(!i)return null;var d={};return(a||u||l)&&(d=Object(o.a)({motionAppear:!0},ze({motion:a,prefixCls:t,transitionName:u,animation:l}))),s.createElement(He,Object(x.a)({},d,{visible:n,removeOnLeave:!0}),(function(e){var n=e.className;return s.createElement("div",{style:{zIndex:r},className:c()("".concat(t,"-mask"),n)})}))}var Ve=n("9mu1"),We=n("o0o1"),Ke=n.n(We),qe=n("HaE+"),Ye=["measure","align",null,"motion"],Qe=s.forwardRef((function(e,t){var n=e.visible,r=e.prefixCls,a=e.className,l=e.style,u=e.children,d=e.zIndex,h=e.stretch,f=e.destroyPopupOnHide,p=e.forceRender,m=e.align,g=e.point,v=e.getRootDomNode,b=e.getClassNameFromAlign,y=e.onAlign,E=e.onMouseEnter,_=e.onMouseLeave,k=e.onMouseDown,w=e.onTouchStart,C=Object(s.useRef)(),S=Object(s.useRef)(),O=Object(s.useState)(),A=Object(i.a)(O,2),T=A[0],I=A[1],D=function(e){var t=s.useState({width:0,height:0}),n=Object(i.a)(t,2),r=n[0],a=n[1];return[s.useMemo((function(){var t={};if(e){var n=r.width,i=r.height;-1!==e.indexOf("height")&&i?t.height=i:-1!==e.indexOf("minHeight")&&i&&(t.minHeight=i),-1!==e.indexOf("width")&&n?t.width=n:-1!==e.indexOf("minWidth")&&n&&(t.minWidth=n)}return t}),[e,r]),function(e){a({width:e.offsetWidth,height:e.offsetHeight})}]}(h),L=Object(i.a)(D,2),R=L[0],N=L[1];var j=function(e,t){var n=Object(s.useState)(null),r=Object(i.a)(n,2),a=r[0],o=r[1],l=Object(s.useRef)(),c=Object(s.useRef)(!1);function u(e){c.current||o(e)}function d(){oe.a.cancel(l.current)}return Object(s.useEffect)((function(){u("measure")}),[e]),Object(s.useEffect)((function(){switch(a){case"measure":t()}a&&(l.current=Object(oe.a)(Object(qe.a)(Ke.a.mark((function e(){var t,n;return Ke.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Ye.indexOf(a),(n=Ye[t+1])&&-1!==t&&u(n);case 3:case"end":return e.stop()}}),e)})))))}),[a]),Object(s.useEffect)((function(){return function(){c.current=!0,d()}}),[]),[a,function(e){d(),l.current=Object(oe.a)((function(){u((function(e){switch(a){case"align":return"motion";case"motion":return"stable"}return e})),null==e||e()}))}]}(n,(function(){h&&N(v())})),M=Object(i.a)(j,2),P=M[0],B=M[1],F=Object(s.useRef)();function U(){var e;null===(e=C.current)||void 0===e||e.forceAlign()}function H(e,t){var n=b(t);T!==n&&I(n),"align"===P&&(T!==n?Promise.resolve().then((function(){U()})):B((function(){var e;null===(e=F.current)||void 0===e||e.call(F)})),null==y||y(e,t))}var z=Object(o.a)({},ze(e));function G(){return new Promise((function(e){F.current=e}))}["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach((function(e){var t=z[e];z[e]=function(e,n){return B(),null==t?void 0:t(e,n)}})),s.useEffect((function(){z.motionName||"motion"!==P||B()}),[z.motionName,P]),s.useImperativeHandle(t,(function(){return{forceAlign:U,getElement:function(){return S.current}}}));var V=Object(o.a)(Object(o.a)({},R),{},{zIndex:d,opacity:"motion"!==P&&"stable"!==P&&n?0:void 0,pointerEvents:"stable"===P?void 0:"none"},l),W=!0;!(null==m?void 0:m.points)||"align"!==P&&"stable"!==P||(W=!1);var K=u;return s.Children.count(u)>1&&(K=s.createElement("div",{className:"".concat(r,"-content")},u)),s.createElement(He,Object(x.a)({visible:n,ref:S,leavedClassName:"".concat(r,"-hidden")},z,{onAppearPrepare:G,onEnterPrepare:G,removeOnLeave:f,forceRender:p}),(function(e,t){var n=e.className,i=e.style,l=c()(r,a,T,n);return s.createElement(Ve.a,{target:g||v,key:"popup",ref:C,monitorWindowResize:!0,disabled:W,align:m,onAlign:H},s.createElement("div",{ref:t,className:l,onMouseEnter:E,onMouseLeave:_,onMouseDownCapture:k,onTouchStartCapture:w,style:Object(o.a)(Object(o.a)({},i),V)},K))}))}));Qe.displayName="PopupInner";var Je=Qe,Xe=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.visible,i=e.zIndex,a=e.children,l=e.mobile,u=(l=void 0===l?{}:l).popupClassName,d=l.popupStyle,h=l.popupMotion,f=void 0===h?{}:h,p=l.popupRender,m=s.useRef();s.useImperativeHandle(t,(function(){return{forceAlign:function(){},getElement:function(){return m.current}}}));var g=Object(o.a)({zIndex:i},d),v=a;return s.Children.count(a)>1&&(v=s.createElement("div",{className:"".concat(n,"-content")},a)),p&&(v=p(v)),s.createElement(He,Object(x.a)({visible:r,ref:m,removeOnLeave:!0},f),(function(e,t){var r=e.className,i=e.style,a=c()(n,u,r);return s.createElement("div",{ref:t,className:a,style:Object(o.a)(Object(o.a)({},i),g)},v)}))}));Xe.displayName="MobilePopupInner";var Ze=Xe,$e=["visible","mobile"],et=s.forwardRef((function(e,t){var n=e.visible,r=e.mobile,l=Object(a.a)(e,$e),c=Object(s.useState)(n),u=Object(i.a)(c,2),d=u[0],h=u[1],f=Object(s.useState)(!1),p=Object(i.a)(f,2),m=p[0],g=p[1],v=Object(o.a)(Object(o.a)({},l),{},{visible:d});Object(s.useEffect)((function(){h(n),n&&r&&g(function(){if("undefined"==typeof navigator||"undefined"==typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null==e?void 0:e.substr(0,4)))}())}),[n,r]);var b=m?s.createElement(Ze,Object(x.a)({},v,{mobile:r,ref:t})):s.createElement(Je,Object(x.a)({},v,{ref:t}));return s.createElement("div",null,s.createElement(Ge,v),b)}));et.displayName="Popup";var tt=et,nt=s.createContext(null);function rt(){}function it(){return""}function at(e){return e?e.ownerDocument:window.document}var ot=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];var st,lt,ct=(st=de.a,(lt=function(e){Object(C.a)(n,e);var t=Object(S.a)(n);function n(e){var r,i;return Object(_.a)(this,n),(r=t.call(this,e)).popupRef=s.createRef(),r.triggerRef=s.createRef(),r.attachId=void 0,r.clickOutsideHandler=void 0,r.touchOutsideHandler=void 0,r.contextMenuOutsideHandler1=void 0,r.contextMenuOutsideHandler2=void 0,r.mouseDownTimeout=void 0,r.focusTime=void 0,r.preClickTime=void 0,r.preTouchTime=void 0,r.delayTimer=void 0,r.hasPopupMouseDown=void 0,r.onMouseEnter=function(e){var t=r.props.mouseEnterDelay;r.fireEvents("onMouseEnter",e),r.delaySetPopupVisible(!0,t,t?null:e)},r.onMouseMove=function(e){r.fireEvents("onMouseMove",e),r.setPoint(e)},r.onMouseLeave=function(e){r.fireEvents("onMouseLeave",e),r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)},r.onPopupMouseEnter=function(){r.clearDelayTimer()},r.onPopupMouseLeave=function(e){var t;e.relatedTarget&&!e.relatedTarget.setTimeout&&Object(se.a)(null===(t=r.popupRef.current)||void 0===t?void 0:t.getElement(),e.relatedTarget)||r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)},r.onFocus=function(e){r.fireEvents("onFocus",e),r.clearDelayTimer(),r.isFocusToShow()&&(r.focusTime=Date.now(),r.delaySetPopupVisible(!0,r.props.focusDelay))},r.onMouseDown=function(e){r.fireEvents("onMouseDown",e),r.preClickTime=Date.now()},r.onTouchStart=function(e){r.fireEvents("onTouchStart",e),r.preTouchTime=Date.now()},r.onBlur=function(e){r.fireEvents("onBlur",e),r.clearDelayTimer(),r.isBlurToHide()&&r.delaySetPopupVisible(!1,r.props.blurDelay)},r.onContextMenu=function(e){e.preventDefault(),r.fireEvents("onContextMenu",e),r.setPopupVisible(!0,e)},r.onContextMenuClose=function(){r.isContextMenuToShow()&&r.close()},r.onClick=function(e){if(r.fireEvents("onClick",e),r.focusTime){var t;if(r.preClickTime&&r.preTouchTime?t=Math.min(r.preClickTime,r.preTouchTime):r.preClickTime?t=r.preClickTime:r.preTouchTime&&(t=r.preTouchTime),Math.abs(t-r.focusTime)<20)return;r.focusTime=0}r.preClickTime=0,r.preTouchTime=0,r.isClickToShow()&&(r.isClickToHide()||r.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault();var n=!r.state.popupVisible;(r.isClickToHide()&&!n||n&&r.isClickToShow())&&r.setPopupVisible(!r.state.popupVisible,e)},r.onPopupMouseDown=function(){var e;r.hasPopupMouseDown=!0,clearTimeout(r.mouseDownTimeout),r.mouseDownTimeout=window.setTimeout((function(){r.hasPopupMouseDown=!1}),0),r.context&&(e=r.context).onPopupMouseDown.apply(e,arguments)},r.onDocumentClick=function(e){if(!r.props.mask||r.props.maskClosable){var t=e.target,n=r.getRootDomNode(),i=r.getPopupDomNode();Object(se.a)(n,t)&&!r.isContextMenuOnly()||Object(se.a)(i,t)||r.hasPopupMouseDown||r.close()}},r.getRootDomNode=function(){var e=r.props.getTriggerDOMNode;if(e)return e(r.triggerRef.current);try{var t=Object(le.a)(r.triggerRef.current);if(t)return t}catch(e){}return ae.a.findDOMNode(Object(w.a)(r))},r.getPopupClassNameFromAlign=function(e){var t=[],n=r.props,i=n.popupPlacement,a=n.builtinPlacements,o=n.prefixCls,s=n.alignPoint,l=n.getPopupClassNameFromAlign;return i&&a&&t.push(function(e,t,n,r){for(var i=n.points,a=Object.keys(e),o=0;o<a.length;o+=1){var s=a[o];if(he(e[s].points,i,r))return"".concat(t,"-placement-").concat(s)}return""}(a,o,e,s)),l&&t.push(l(e)),t.join(" ")},r.getComponent=function(){var e=r.props,t=e.prefixCls,n=e.destroyPopupOnHide,i=e.popupClassName,a=e.onPopupAlign,o=e.popupMotion,l=e.popupAnimation,c=e.popupTransitionName,u=e.popupStyle,d=e.mask,h=e.maskAnimation,f=e.maskTransitionName,p=e.maskMotion,m=e.zIndex,g=e.popup,v=e.stretch,b=e.alignPoint,y=e.mobile,E=e.forceRender,_=r.state,k=_.popupVisible,w=_.point,C=r.getPopupAlign(),S={};return r.isMouseEnterToShow()&&(S.onMouseEnter=r.onPopupMouseEnter),r.isMouseLeaveToHide()&&(S.onMouseLeave=r.onPopupMouseLeave),S.onMouseDown=r.onPopupMouseDown,S.onTouchStart=r.onPopupMouseDown,s.createElement(tt,Object(x.a)({prefixCls:t,destroyPopupOnHide:n,visible:k,point:b&&w,className:i,align:C,onAlign:a,animation:l,getClassNameFromAlign:r.getPopupClassNameFromAlign},S,{stretch:v,getRootDomNode:r.getRootDomNode,style:u,mask:d,zIndex:m,transitionName:c,maskAnimation:h,maskTransitionName:f,maskMotion:p,ref:r.popupRef,motion:o,mobile:y,forceRender:E}),"function"==typeof g?g():g)},r.attachParent=function(e){oe.a.cancel(r.attachId);var t,n=r.props,i=n.getPopupContainer,a=n.getDocument,o=r.getRootDomNode();i?(o||0===i.length)&&(t=i(o)):t=a(r.getRootDomNode()).body,t?t.appendChild(e):r.attachId=Object(oe.a)((function(){r.attachParent(e)}))},r.getContainer=function(){var e=(0,r.props.getDocument)(r.getRootDomNode()).createElement("div");return e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",r.attachParent(e),e},r.setPoint=function(e){r.props.alignPoint&&e&&r.setState({point:{pageX:e.pageX,pageY:e.pageY}})},r.handlePortalUpdate=function(){r.state.prevPopupVisible!==r.state.popupVisible&&r.props.afterPopupVisibleChange(r.state.popupVisible)},r.triggerContextValue={onPopupMouseDown:r.onPopupMouseDown},i="popupVisible"in e?!!e.popupVisible:!!e.defaultPopupVisible,r.state={prevPopupVisible:i,popupVisible:i},ot.forEach((function(e){r["fire".concat(e)]=function(t){r.fireEvents(e,t)}})),r}return Object(k.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e,t=this.props;if(this.state.popupVisible)return this.clickOutsideHandler||!this.isClickToHide()&&!this.isContextMenuToShow()||(e=t.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(ue.a)(e,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(e=e||t.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(ue.a)(e,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(e=e||t.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(ue.a)(e,"scroll",this.onContextMenuClose)),void(!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(ue.a)(window,"blur",this.onContextMenuClose)));this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),oe.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var e;return(null===(e=this.popupRef.current)||void 0===e?void 0:e.getElement())||null}},{key:"getPopupAlign",value:function(){var e=this.props,t=e.popupPlacement,n=e.popupAlign,r=e.builtinPlacements;return t&&r?function(e,t,n){var r=e[t]||{};return Object(o.a)(Object(o.a)({},r),n)}(r,t,n):n}},{key:"setPopupVisible",value:function(e,t){var n=this.props.alignPoint,r=this.state.popupVisible;this.clearDelayTimer(),r!==e&&("popupVisible"in this.props||this.setState({popupVisible:e,prevPopupVisible:r}),this.props.onPopupVisibleChange(e)),n&&t&&e&&this.setPoint(t)}},{key:"delaySetPopupVisible",value:function(e,t,n){var r=this,i=1e3*t;if(this.clearDelayTimer(),i){var a=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=window.setTimeout((function(){r.setPopupVisible(e,a),r.clearDelayTimer()}),i)}else this.setPopupVisible(e,n)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(e){var t=this.props.children.props,n=this.props;return t[e]&&n[e]?this["fire".concat(e)]:t[e]||n[e]}},{key:"isClickToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")}},{key:"isContextMenuOnly",value:function(){var e=this.props.action;return"contextMenu"===e||1===e.length&&"contextMenu"===e[0]}},{key:"isContextMenuToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("contextMenu")||-1!==n.indexOf("contextMenu")}},{key:"isClickToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")}},{key:"isMouseEnterToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseEnter")}},{key:"isMouseLeaveToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseLeave")}},{key:"isFocusToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("focus")}},{key:"isBlurToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("blur")}},{key:"forcePopupAlign",value:function(){var e;this.state.popupVisible&&(null===(e=this.popupRef.current)||void 0===e||e.forceAlign())}},{key:"fireEvents",value:function(e,t){var n=this.props.children.props[e];n&&n(t);var r=this.props[e];r&&r(t)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var e=this.state.popupVisible,t=this.props,n=t.children,r=t.forceRender,i=t.alignPoint,a=t.className,l=t.autoDestroy,u=s.Children.only(n),d={key:"trigger"};this.isContextMenuToShow()?d.onContextMenu=this.onContextMenu:d.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(d.onClick=this.onClick,d.onMouseDown=this.onMouseDown,d.onTouchStart=this.onTouchStart):(d.onClick=this.createTwoChains("onClick"),d.onMouseDown=this.createTwoChains("onMouseDown"),d.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(d.onMouseEnter=this.onMouseEnter,i&&(d.onMouseMove=this.onMouseMove)):d.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?d.onMouseLeave=this.onMouseLeave:d.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(d.onFocus=this.onFocus,d.onBlur=this.onBlur):(d.onFocus=this.createTwoChains("onFocus"),d.onBlur=this.createTwoChains("onBlur"));var h=c()(u&&u.props&&u.props.className,a);h&&(d.className=h);var f=Object(o.a)({},d);Object(ce.c)(u)&&(f.ref=Object(ce.a)(this.triggerRef,u.ref));var p,m=s.cloneElement(u,f);return(e||this.popupRef.current||r)&&(p=s.createElement(st,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!e&&l&&(p=null),s.createElement(nt.Provider,{value:this.triggerContextValue},m,p)}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.popupVisible,r={};return void 0!==n&&t.popupVisible!==n&&(r.popupVisible=n,r.prevPopupVisible=t.popupVisible),r}}]),n}(s.Component)).contextType=nt,lt.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:it,getDocument:at,onPopupVisibleChange:rt,afterPopupVisibleChange:rt,onPopupAlign:rt,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},lt),ut={adjustX:1,adjustY:1},dt={topLeft:{points:["bl","tl"],overflow:ut,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ut,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:ut,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:ut,offset:[4,0]}},ht={topLeft:{points:["bl","tl"],overflow:ut,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ut,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:ut,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:ut,offset:[4,0]}},ft=0,pt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},mt=function(e,t,n){var i=Z(t),a=e.getState();e.setState({defaultActiveFirst:Object(o.a)(Object(o.a)({},a.defaultActiveFirst),{},Object(r.a)({},i,n))})},gt=function(e){Object(C.a)(n,e);var t=Object(S.a)(n);function n(e){var r;Object(_.a)(this,n),(r=t.call(this,e)).onDestroy=function(e){r.props.onDestroy(e)},r.onKeyDown=function(e){var t=e.keyCode,n=r.menuInstance,i=r.props.store,a=r.getVisible();if(t===v.a.ENTER)return r.onTitleClick(e),mt(i,r.props.eventKey,!0),!0;if(t===v.a.RIGHT)return a?n.onKeyDown(e):(r.triggerOpenChange(!0),mt(i,r.props.eventKey,!0)),!0;if(t===v.a.LEFT){var o;if(!a)return;return(o=n.onKeyDown(e))||(r.triggerOpenChange(!1),o=!0),o}return!a||t!==v.a.UP&&t!==v.a.DOWN?void 0:n.onKeyDown(e)},r.onOpenChange=function(e){r.props.onOpenChange(e)},r.onPopupVisibleChange=function(e){r.triggerOpenChange(e,e?"mouseenter":"mouseleave")},r.onMouseEnter=function(e){var t=r.props,n=t.eventKey,i=t.onMouseEnter,a=t.store;mt(a,r.props.eventKey,!1),i({key:n,domEvent:e})},r.onMouseLeave=function(e){var t=r.props,n=t.parentMenu,i=t.eventKey,a=t.onMouseLeave;n.subMenuInstance=Object(w.a)(r),a({key:i,domEvent:e})},r.onTitleMouseEnter=function(e){var t=r.props,n=t.eventKey,i=t.onItemHover,a=t.onTitleMouseEnter;i({key:n,hover:!0}),a({key:n,domEvent:e})},r.onTitleMouseLeave=function(e){var t=r.props,n=t.parentMenu,i=t.eventKey,a=t.onItemHover,o=t.onTitleMouseLeave;n.subMenuInstance=Object(w.a)(r),a({key:i,hover:!1}),o({key:i,domEvent:e})},r.onTitleClick=function(e){var t=Object(w.a)(r).props;t.onTitleClick({key:t.eventKey,domEvent:e}),"hover"!==t.triggerSubMenuAction&&(r.triggerOpenChange(!r.getVisible(),"click"),mt(t.store,r.props.eventKey,!1))},r.onSubMenuClick=function(e){"function"==typeof r.props.onClick&&r.props.onClick(r.addKeyPath(e))},r.onSelect=function(e){r.props.onSelect(e)},r.onDeselect=function(e){r.props.onDeselect(e)},r.getPrefixCls=function(){return"".concat(r.props.rootPrefixCls,"-submenu")},r.getActiveClassName=function(){return"".concat(r.getPrefixCls(),"-active")},r.getDisabledClassName=function(){return"".concat(r.getPrefixCls(),"-disabled")},r.getSelectedClassName=function(){return"".concat(r.getPrefixCls(),"-selected")},r.getOpenClassName=function(){return"".concat(r.props.rootPrefixCls,"-submenu-open")},r.getVisible=function(){return r.state.isOpen},r.getMode=function(){return r.state.mode},r.saveMenuInstance=function(e){r.menuInstance=e},r.addKeyPath=function(e){return Object(o.a)(Object(o.a)({},e),{},{keyPath:(e.keyPath||[]).concat(r.props.eventKey)})},r.triggerOpenChange=function(e,t){var n=r.props.eventKey,i=function(){r.onOpenChange({key:n,item:Object(w.a)(r),trigger:t,open:e})};"mouseenter"===t?r.mouseenterTimeout=setTimeout((function(){i()}),0):i()},r.isChildrenSelected=function(){var e={find:!1};return function e(t,n,r){t&&!r.find&&s.Children.forEach(t,(function(t){if(t){var i=t.type;if(!i||!(i.isSubMenu||i.isMenuItem||i.isMenuItemGroup))return;-1!==n.indexOf(t.key)?r.find=!0:t.props.children&&e(t.props.children,n,r)}}))}(r.props.children,r.props.selectedKeys,e),e.find},r.isInlineMode=function(){return"inline"===r.getMode()},r.adjustWidth=function(){if(r.subMenuTitle&&r.menuInstance){var e=ie.findDOMNode(r.menuInstance);e.offsetWidth>=r.subMenuTitle.offsetWidth||(e.style.minWidth="".concat(r.subMenuTitle.offsetWidth,"px"))}},r.saveSubMenuTitle=function(e){r.subMenuTitle=e},r.getBaseProps=function(){var e=Object(w.a)(r).props,t=r.getMode();return{mode:"horizontal"===t?"vertical":t,visible:r.getVisible(),level:e.level+1,inlineIndent:e.inlineIndent,focusable:!1,onClick:r.onSubMenuClick,onSelect:r.onSelect,onDeselect:r.onDeselect,onDestroy:r.onDestroy,selectedKeys:e.selectedKeys,eventKey:"".concat(e.eventKey,"-menu-"),openKeys:e.openKeys,motion:e.motion,onOpenChange:r.onOpenChange,subMenuOpenDelay:e.subMenuOpenDelay,parentMenu:Object(w.a)(r),subMenuCloseDelay:e.subMenuCloseDelay,forceSubMenuRender:e.forceSubMenuRender,triggerSubMenuAction:e.triggerSubMenuAction,builtinPlacements:e.builtinPlacements,defaultActiveFirst:e.store.getState().defaultActiveFirst[Z(e.eventKey)],multiple:e.multiple,prefixCls:e.rootPrefixCls,id:r.internalMenuId,manualRef:r.saveMenuInstance,itemIcon:e.itemIcon,expandIcon:e.expandIcon,direction:e.direction}},r.getMotion=function(e,t){var n=Object(w.a)(r).haveRendered,i=r.props,a=i.motion,s=i.rootPrefixCls;return Object(o.a)(Object(o.a)({},a),{},{leavedClassName:"".concat(s,"-hidden"),removeOnLeave:!1,motionAppear:n||!t||"inline"!==e})};var i=e.store,a=e.eventKey,l=i.getState().defaultActiveFirst;r.isRootMenu=!1;var c=!1;return l&&(c=l[a]),mt(i,a,c),r.state={mode:e.mode,isOpen:e.isOpen},r}return Object(k.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e=this,t=this.props,n=t.mode,r=t.parentMenu,i=t.manualRef,a=t.isOpen,o=function(){e.setState({mode:n,isOpen:a})},s=a!==this.state.isOpen,l=n!==this.state.mode;(l||s)&&(oe.a.cancel(this.updateStateRaf),l?this.updateStateRaf=Object(oe.a)(o):o()),i&&i(this),"horizontal"===n&&(null==r?void 0:r.isRootMenu)&&a&&(this.minWidthTimeout=setTimeout((function(){return e.adjustWidth()}),0))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.onDestroy,n=e.eventKey;t&&t(n),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),oe.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(e,t){var n=this.getBaseProps();return s.createElement(St,Object(x.a)({},n,{id:this.internalMenuId,className:e,style:t}),this.props.children)}},{key:"renderChildren",value:function(){var e=this,t=this.getBaseProps(),n=t.mode,i=t.visible,a=t.forceSubMenuRender,o=t.direction,l=this.getMotion(n,i);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||i||a,!this.haveOpened)return s.createElement("div",null);var u=c()("".concat(t.prefixCls,"-sub"),Object(r.a)({},"".concat(t.prefixCls,"-rtl"),"rtl"===o));return this.isInlineMode()?s.createElement(He,Object(x.a)({visible:t.visible,forceRender:a},l),(function(t){var n=t.className,r=t.style,i=c()(u,n);return e.renderPopupMenu(i,r)})):this.renderPopupMenu(u)}},{key:"render",value:function(){var e,t,n,i=Object(o.a)({},this.props),a=this.getVisible(),l=this.getPrefixCls(),u=this.isInlineMode(),d=this.getMode(),h=c()(l,"".concat(l,"-").concat(d),(e={},Object(r.a)(e,i.className,!!i.className),Object(r.a)(e,this.getOpenClassName(),a),Object(r.a)(e,this.getActiveClassName(),i.active||a&&!u),Object(r.a)(e,this.getDisabledClassName(),i.disabled),Object(r.a)(e,this.getSelectedClassName(),this.isChildrenSelected()),e));this.internalMenuId||(i.eventKey?this.internalMenuId="".concat(i.eventKey,"$Menu"):(ft+=1,this.internalMenuId="$__$".concat(ft,"$Menu")));var f={},p={},m={};i.disabled||(f={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},p={onClick:this.onTitleClick},m={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var g={},v="rtl"===i.direction;u&&(v?g.paddingRight=i.inlineIndent*i.level:g.paddingLeft=i.inlineIndent*i.level);var b={};this.getVisible()&&(b={"aria-owns":this.internalMenuId});var y=null;"horizontal"!==d&&(y=this.props.expandIcon,"function"==typeof this.props.expandIcon&&(y=s.createElement(this.props.expandIcon,Object(o.a)({},this.props))));var E=s.createElement("div",Object(x.a)({ref:this.saveSubMenuTitle,style:g,className:"".concat(l,"-title"),role:"button"},m,p,{"aria-expanded":a},b,{"aria-haspopup":"true",title:"string"==typeof i.title?i.title:void 0}),i.title,y||s.createElement("i",{className:"".concat(l,"-arrow")})),_=this.renderChildren(),k=(null===(t=i.parentMenu)||void 0===t?void 0:t.isRootMenu)?i.parentMenu.props.getPopupContainer:function(e){return e.parentNode},w=pt[d],C=i.popupOffset?{offset:i.popupOffset}:{},S=c()((n={},Object(r.a)(n,i.popupClassName,i.popupClassName&&!u),Object(r.a)(n,"".concat(l,"-rtl"),v),n)),O=i.disabled,A=i.triggerSubMenuAction,T=i.subMenuOpenDelay,I=i.forceSubMenuRender,D=i.subMenuCloseDelay,L=i.builtinPlacements;ee.forEach((function(e){return delete i[e]})),delete i.onClick;var R=v?Object(o.a)(Object(o.a)({},ht),L):Object(o.a)(Object(o.a)({},dt),L);delete i.direction;var N=this.getBaseProps(),j=u?null:this.getMotion(N.mode,N.visible);return s.createElement("li",Object(x.a)({},i,f,{className:h,role:"menuitem"}),s.createElement(ct,{prefixCls:l,popupClassName:c()("".concat(l,"-popup"),S),getPopupContainer:k,builtinPlacements:R,popupPlacement:w,popupVisible:!u&&a,popupAlign:C,popup:u?null:_,action:O||u?[]:[A],mouseEnterDelay:T,mouseLeaveDelay:D,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:I,popupMotion:j},E),u?_:null)}}]),n}(s.Component);gt.defaultProps={onMouseEnter:J,onMouseLeave:J,onTitleMouseEnter:J,onTitleMouseLeave:J,onTitleClick:J,manualRef:J,mode:"vertical",title:""};var vt=Object(O.b)((function(e,t){var n=e.openKeys,r=e.activeKey,i=e.selectedKeys,a=t.eventKey,o=t.subMenuKey;return{isOpen:n.indexOf(a)>-1,active:r[o]===a,selectedKeys:i}}))(gt);vt.isSubMenu=!0;var bt=vt,yt=function(e){Object(C.a)(n,e);var t=Object(S.a)(n);function n(){var e;return Object(_.a)(this,n),(e=t.apply(this,arguments)).resizeObserver=null,e.mutationObserver=null,e.originalTotalWidth=0,e.overflowedItems=[],e.menuItemSizes=[],e.cancelFrameId=null,e.state={lastVisibleIndex:void 0},e.childRef=s.createRef(),e.getMenuItemNodes=function(){var t=e.props.prefixCls,n=e.childRef.current;return n?[].slice.call(n.children).filter((function(e){return e.className.split(" ").indexOf("".concat(t,"-overflowed-submenu"))<0})):[]},e.getOverflowedSubMenuItem=function(t,n,r){var i=e.props,l=i.overflowedIndicator,c=i.level,u=i.mode,d=i.prefixCls,h=i.theme;if(1!==c||"horizontal"!==u)return null;var f=e.props.children[0].props,p=(f.children,f.title,f.style),m=Object(a.a)(f,["children","title","style"]),g=Object(o.a)({},p),v="".concat(t,"-overflowed-indicator"),b="".concat(t,"-overflowed-indicator");0===n.length&&!0!==r?g=Object(o.a)(Object(o.a)({},g),{},{display:"none"}):r&&(g=Object(o.a)(Object(o.a)({},g),{},{visibility:"hidden",position:"absolute"}),v="".concat(v,"-placeholder"),b="".concat(b,"-placeholder"));var y=h?"".concat(d,"-").concat(h):"",E={};return ee.forEach((function(e){void 0!==m[e]&&(E[e]=m[e])})),s.createElement(bt,Object(x.a)({title:l,className:"".concat(d,"-overflowed-submenu"),popupClassName:y},E,{key:v,eventKey:b,disabled:!1,style:g}),n)},e.setChildrenWidthAndResize=function(){if("horizontal"===e.props.mode){var t=e.childRef.current;if(t){var n=t.children;if(n&&0!==n.length){var r=t.children[n.length-1];ne(r,"display","inline-block");var i=e.getMenuItemNodes(),a=i.filter((function(e){return e.className.split(" ").indexOf("menuitem-overflowed")>=0}));a.forEach((function(e){ne(e,"display","inline-block")})),e.menuItemSizes=i.map((function(e){return te(e,!0)})),a.forEach((function(e){ne(e,"display","none")})),e.overflowedIndicatorWidth=te(t.children[t.children.length-1],!0),e.originalTotalWidth=e.menuItemSizes.reduce((function(e,t){return e+t}),0),e.handleResize(),ne(r,"display","none")}}}},e.handleResize=function(){if("horizontal"===e.props.mode){var t=e.childRef.current;if(t){var n=te(t);e.overflowedItems=[];var r,i=0;e.originalTotalWidth>n+.5&&(r=-1,e.menuItemSizes.forEach((function(t){(i+=t)+e.overflowedIndicatorWidth<=n&&(r+=1)}))),e.setState({lastVisibleIndex:r})}}},e}return Object(k.a)(n,[{key:"componentDidMount",value:function(){var e=this;if(this.setChildrenWidthAndResize(),1===this.props.level&&"horizontal"===this.props.mode){var t=this.childRef.current;if(!t)return;this.resizeObserver=new re.default((function(t){t.forEach((function(){var t=e.cancelFrameId;cancelAnimationFrame(t),e.cancelFrameId=requestAnimationFrame(e.setChildrenWidthAndResize)}))})),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver((function(){e.resizeObserver.disconnect(),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),e.setChildrenWidthAndResize()})),this.mutationObserver.observe(t,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(e){var t=this,n=this.state.lastVisibleIndex;return(e||[]).reduce((function(r,i,a){var o=i;if("horizontal"===t.props.mode){var l=t.getOverflowedSubMenuItem(i.props.eventKey,[]);void 0!==n&&-1!==t.props.className.indexOf("".concat(t.props.prefixCls,"-root"))&&(a>n&&(o=s.cloneElement(i,{style:{display:"none"},eventKey:"".concat(i.props.eventKey,"-hidden"),className:"".concat("menuitem-overflowed")})),a===n+1&&(t.overflowedItems=e.slice(n+1).map((function(e){return s.cloneElement(e,{key:e.props.eventKey,mode:"vertical-left"})})),l=t.getOverflowedSubMenuItem(i.props.eventKey,t.overflowedItems)));var c=[].concat(Object(h.a)(r),[l,o]);return a===e.length-1&&c.push(t.getOverflowedSubMenuItem(i.props.eventKey,[],!0)),c}return[].concat(Object(h.a)(r),[o])}),[])}},{key:"render",value:function(){var e=this.props,t=(e.visible,e.prefixCls,e.overflowedIndicator,e.mode,e.level,e.tag),n=e.children,r=(e.theme,Object(a.a)(e,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"])),i=t;return s.createElement(i,Object(x.a)({ref:this.childRef},r),this.renderChildren(n))}}]),n}(s.Component);yt.defaultProps={tag:"div",className:""};var Et=yt;function xt(e,t,n){var i=e.getState();e.setState({activeKey:Object(o.a)(Object(o.a)({},i.activeKey),{},Object(r.a)({},t,n))})}function _t(e){return e.eventKey||"0-menu-"}function kt(e,t){var n,r=t,i=e.children,a=e.eventKey;if(r&&($(i,(function(e,t){e&&e.props&&!e.props.disabled&&r===X(e,a,t)&&(n=!0)})),n))return r;return r=null,e.defaultActiveFirst?($(i,(function(e,t){r||!e||e.props.disabled||(r=X(e,a,t))})),r):r}function wt(e){if(e){var t=this.instanceArray.indexOf(e);-1!==t?this.instanceArray[t]=e:this.instanceArray.push(e)}}var Ct=function(e){Object(C.a)(n,e);var t=Object(S.a)(n);function n(e){var i;return Object(_.a)(this,n),(i=t.call(this,e)).onKeyDown=function(e,t){var n,r=e.keyCode;if(i.getFlatInstanceArray().forEach((function(t){t&&t.props.active&&t.onKeyDown&&(n=t.onKeyDown(e))})),n)return 1;var a=null;return r!==v.a.UP&&r!==v.a.DOWN||(a=i.step(r===v.a.UP?-1:1)),a?(e.preventDefault(),xt(i.props.store,_t(i.props),a.props.eventKey),"function"==typeof t&&t(a),1):void 0},i.onItemHover=function(e){var t=e.key,n=e.hover;xt(i.props.store,_t(i.props),n?t:null)},i.onDeselect=function(e){i.props.onDeselect(e)},i.onSelect=function(e){i.props.onSelect(e)},i.onClick=function(e){i.props.onClick(e)},i.onOpenChange=function(e){i.props.onOpenChange(e)},i.onDestroy=function(e){i.props.onDestroy(e)},i.getFlatInstanceArray=function(){return i.instanceArray},i.step=function(e){var t=i.getFlatInstanceArray(),n=i.props.store.getState().activeKey[_t(i.props)],r=t.length;if(!r)return null;e<0&&(t=t.concat().reverse());var a=-1;if(t.every((function(e,t){return!e||e.props.eventKey!==n||(a=t,!1)})),i.props.defaultActiveFirst||-1===a||(o=t.slice(a,r-1)).length&&!o.every((function(e){return!!e.props.disabled}))){var o,s=(a+1)%r,l=s;do{var c=t[l];if(c&&!c.props.disabled)return c;l=(l+1)%r}while(l!==s);return null}},i.renderCommonMenuItem=function(e,t,n){var r=i.props.store.getState(),a=Object(w.a)(i).props,l=X(e,a.eventKey,t),c=e.props;if(!c||"string"==typeof e.type)return e;var u=l===r.activeKey,d=Object(o.a)(Object(o.a)({mode:c.mode||a.mode,level:a.level,inlineIndent:a.inlineIndent,renderMenuItem:i.renderMenuItem,rootPrefixCls:a.prefixCls,index:t,parentMenu:a.parentMenu,manualRef:c.disabled?void 0:Object(T.a)(e.ref,wt.bind(Object(w.a)(i))),eventKey:l,active:!c.disabled&&u,multiple:a.multiple,onClick:function(e){(c.onClick||J)(e),i.onClick(e)},onItemHover:i.onItemHover,motion:a.motion,subMenuOpenDelay:a.subMenuOpenDelay,subMenuCloseDelay:a.subMenuCloseDelay,forceSubMenuRender:a.forceSubMenuRender,onOpenChange:i.onOpenChange,onDeselect:i.onDeselect,onSelect:i.onSelect,builtinPlacements:a.builtinPlacements,itemIcon:c.itemIcon||i.props.itemIcon,expandIcon:c.expandIcon||i.props.expandIcon},n),{},{direction:a.direction});return("inline"===a.mode||Q.any)&&(d.triggerSubMenuAction="click"),s.cloneElement(e,Object(o.a)(Object(o.a)({},d),{},{key:l||t}))},i.renderMenuItem=function(e,t,n){if(!e)return null;var r=i.props.store.getState(),a={openKeys:r.openKeys,selectedKeys:r.selectedKeys,triggerSubMenuAction:i.props.triggerSubMenuAction,subMenuKey:n};return i.renderCommonMenuItem(e,t,a)},e.store.setState({activeKey:Object(o.a)(Object(o.a)({},e.store.getState().activeKey),{},Object(r.a)({},e.eventKey,kt(e,e.activeKey)))}),i.instanceArray=[],i}return Object(k.a)(n,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(e){return this.props.visible||e.visible||this.props.className!==e.className||!D()(this.props.style,e.style)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n="activeKey"in t?t.activeKey:t.store.getState().activeKey[_t(t)],r=kt(t,n);if(r!==n)xt(t.store,_t(t),r);else if("activeKey"in e){r!==kt(e,e.activeKey)&&xt(t.store,_t(t),r)}}},{key:"render",value:function(){var e=this,t=Object(x.a)({},this.props);this.instanceArray=[];var n={className:c()(t.prefixCls,t.className,"".concat(t.prefixCls,"-").concat(t.mode)),role:t.role||"menu"};t.id&&(n.id=t.id),t.focusable&&(n.tabIndex=0,n.onKeyDown=this.onKeyDown);var r=t.prefixCls,i=t.eventKey,a=t.visible,o=t.level,l=t.mode,d=t.overflowedIndicator,h=t.theme;return ee.forEach((function(e){return delete t[e]})),delete t.onClick,s.createElement(Et,Object(x.a)({},t,{prefixCls:r,mode:l,tag:"ul",level:o,theme:h,visible:a,overflowedIndicator:d},n),Object(u.a)(t.children).map((function(t,n){return e.renderMenuItem(t,n,i||"0-menu-")})))}}]),n}(s.Component);Ct.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:J};var St=Object(O.b)()(Ct),Ot=n("Kwbf");function At(e,t,n){var r=e.prefixCls,i=e.motion,a=e.defaultMotions,o=void 0===a?{}:a,s=e.openAnimation,l=e.openTransitionName,c=t.switchingModeFromInline;if(i)return i;if("object"===Object(L.a)(s)&&s)Object(Ot.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if("string"==typeof s)return{motionName:"".concat(r,"-open-").concat(s)};if(l)return{motionName:l};var u=o[n];return u||(c?null:o.other)}var Tt=function(e){Object(C.a)(n,e);var t=Object(S.a)(n);function n(e){var r;Object(_.a)(this,n),(r=t.call(this,e)).onSelect=function(e){var t=Object(w.a)(r).props;if(t.selectable){var n=r.store.getState().selectedKeys,i=e.key;n=t.multiple?n.concat([i]):[i],"selectedKeys"in t||r.store.setState({selectedKeys:n}),t.onSelect(Object(o.a)(Object(o.a)({},e),{},{selectedKeys:n}))}},r.onClick=function(e){var t=r.getRealMenuMode(),n=Object(w.a)(r),i=n.store,a=n.props.onOpenChange;"inline"===t||"openKeys"in r.props||(i.setState({openKeys:[]}),a([])),r.props.onClick(e)},r.onKeyDown=function(e,t){r.innerMenu.getWrappedInstance().onKeyDown(e,t)},r.onOpenChange=function(e){var t=Object(w.a)(r).props,n=r.store.getState().openKeys.concat(),i=!1,a=function(e){var t=!1;if(e.open)(t=-1===n.indexOf(e.key))&&n.push(e.key);else{var r=n.indexOf(e.key);(t=-1!==r)&&n.splice(r,1)}i=i||t};Array.isArray(e)?e.forEach(a):a(e),i&&("openKeys"in r.props||r.store.setState({openKeys:n}),t.onOpenChange(n))},r.onDeselect=function(e){var t=Object(w.a)(r).props;if(t.selectable){var n=r.store.getState().selectedKeys.concat(),i=e.key,a=n.indexOf(i);-1!==a&&n.splice(a,1),"selectedKeys"in t||r.store.setState({selectedKeys:n}),t.onDeselect(Object(o.a)(Object(o.a)({},e),{},{selectedKeys:n}))}},r.onMouseEnter=function(e){r.restoreModeVerticalFromInline();var t=r.props.onMouseEnter;t&&t(e)},r.onTransitionEnd=function(e){var t="width"===e.propertyName&&e.target===e.currentTarget,n=e.target.className,i="[object SVGAnimatedString]"===Object.prototype.toString.call(n)?n.animVal:n,a="font-size"===e.propertyName&&i.indexOf("anticon")>=0;(t||a)&&r.restoreModeVerticalFromInline()},r.setInnerMenu=function(e){r.innerMenu=e},r.isRootMenu=!0;var i=e.defaultSelectedKeys,a=e.defaultOpenKeys;return"selectedKeys"in e&&(i=e.selectedKeys||[]),"openKeys"in e&&(a=e.openKeys||[]),r.store=Object(O.c)({selectedKeys:i,openKeys:a,activeKey:{"0-menu-":kt(e,e.activeKey)}}),r.state={switchingModeFromInline:!1,prevProps:e,inlineOpenKeys:[],store:r.store},r}return Object(k.a)(n,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.siderCollapsed,r=t.inlineCollapsed,i=t.onOpenChange;(!e.inlineCollapsed&&r||!e.siderCollapsed&&n)&&i([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var e=this.props.collapsedWidth,t=this.store,n=this.prevOpenKeys;this.getInlineCollapsed()&&(0===e||"0"===e||"0px"===e)?(this.prevOpenKeys=t.getState().openKeys.concat(),this.store.setState({openKeys:[]})):n&&(this.store.setState({openKeys:n}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var e=this.props.mode,t=this.state.switchingModeFromInline,n=this.getInlineCollapsed();return t&&n?"inline":n?"vertical":e}},{key:"getInlineCollapsed",value:function(){var e=this.props,t=e.inlineCollapsed,n=e.siderCollapsed;return void 0!==n?n:t}},{key:"restoreModeVerticalFromInline",value:function(){this.state.switchingModeFromInline&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var e=Object(o.a)({},Object(A.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),t=this.getRealMenuMode();return e.className+=" ".concat(e.prefixCls,"-root"),"rtl"===e.direction&&(e.className+=" ".concat(e.prefixCls,"-rtl")),delete(e=Object(o.a)(Object(o.a)({},e),{},{mode:t,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:At(this.props,this.state,t)})).openAnimation,delete e.openTransitionName,s.createElement(O.a,{store:this.store},s.createElement(St,Object(x.a)({},e,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.store,i=r.getState(),a={},o={prevProps:e};return"inline"===n.mode&&"inline"!==e.mode&&(o.switchingModeFromInline=!0),"openKeys"in e?a.openKeys=e.openKeys||[]:((e.inlineCollapsed&&!n.inlineCollapsed||e.siderCollapsed&&!n.siderCollapsed)&&(o.switchingModeFromInline=!0,o.inlineOpenKeys=i.openKeys,a.openKeys=[]),(!e.inlineCollapsed&&n.inlineCollapsed||!e.siderCollapsed&&n.siderCollapsed)&&(a.openKeys=t.inlineOpenKeys,o.inlineOpenKeys=[])),Object.keys(a).length&&r.setState(a),o}}]),n}(s.Component);Tt.defaultProps={selectable:!0,onClick:J,onSelect:J,onOpenChange:J,onDeselect:J,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:s.createElement("span",null,"···")};var It=Tt,Dt=function(e){Object(C.a)(n,e);var t=Object(S.a)(n);function n(){var e;return Object(_.a)(this,n),(e=t.apply(this,arguments)).onKeyDown=function(t){if(t.keyCode===v.a.ENTER)return e.onClick(t),!0},e.onMouseLeave=function(t){var n=e.props,r=n.eventKey,i=n.onItemHover,a=n.onMouseLeave;i({key:r,hover:!1}),a({key:r,domEvent:t})},e.onMouseEnter=function(t){var n=e.props,r=n.eventKey,i=n.onItemHover,a=n.onMouseEnter;i({key:r,hover:!0}),a({key:r,domEvent:t})},e.onClick=function(t){var n=e.props,r=n.eventKey,i=n.multiple,a=n.onClick,o=n.onSelect,s=n.onDeselect,l=n.isSelected,c={key:r,keyPath:[r],item:Object(w.a)(e),domEvent:t};a(c),i?l?s(c):o(c):l||o(c)},e.saveNode=function(t){e.node=t},e}return Object(k.a)(n,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var e=this.props;e.onDestroy&&e.onDestroy(e.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var e,t=Object(o.a)({},this.props),n=c()(this.getPrefixCls(),t.className,(e={},Object(r.a)(e,this.getActiveClassName(),!t.disabled&&t.active),Object(r.a)(e,this.getSelectedClassName(),t.isSelected),Object(r.a)(e,this.getDisabledClassName(),t.disabled),e)),i=Object(o.a)(Object(o.a)({},t.attribute),{},{title:"string"==typeof t.title?t.title:void 0,className:n,role:t.role||"menuitem","aria-disabled":t.disabled});"option"===t.role?i=Object(o.a)(Object(o.a)({},i),{},{role:"option","aria-selected":t.isSelected}):null!==t.role&&"none"!==t.role||(i.role="none");var a={onClick:t.disabled?null:this.onClick,onMouseLeave:t.disabled?null:this.onMouseLeave,onMouseEnter:t.disabled?null:this.onMouseEnter},l=Object(o.a)({},t.style);"inline"===t.mode&&("rtl"===t.direction?l.paddingRight=t.inlineIndent*t.level:l.paddingLeft=t.inlineIndent*t.level),ee.forEach((function(e){return delete t[e]})),delete t.direction;var u=this.props.itemIcon;return"function"==typeof this.props.itemIcon&&(u=s.createElement(this.props.itemIcon,this.props)),s.createElement("li",Object(x.a)({},Object(A.a)(t,["onClick","onMouseEnter","onMouseLeave","onSelect"]),i,a,{style:l,ref:this.saveNode}),t.children,u)}}]),n}(s.Component);Dt.isMenuItem=!0,Dt.defaultProps={onSelect:J,onMouseEnter:J,onMouseLeave:J,manualRef:J};var Lt=Object(O.b)((function(e,t){var n=e.activeKey,r=e.selectedKeys,i=t.eventKey;return{active:n[t.subMenuKey]===i,isSelected:Array.isArray(r)?-1!==r.indexOf(i):r===i}}))(Dt),Rt=function(e){Object(C.a)(n,e);var t=Object(S.a)(n);function n(){var e;return Object(_.a)(this,n),(e=t.apply(this,arguments)).renderInnerMenuItem=function(t){var n=e.props;return(0,n.renderMenuItem)(t,n.index,e.props.subMenuKey)},e}return Object(k.a)(n,[{key:"render",value:function(){var e=Object(x.a)({},this.props),t=e.className,n=void 0===t?"":t,r=e.rootPrefixCls,i="".concat(r,"-item-group-title"),a="".concat(r,"-item-group-list"),o=e.title,l=e.children;return ee.forEach((function(t){return delete e[t]})),delete e.direction,s.createElement("li",Object(x.a)({},e,{onClick:function(e){return e.stopPropagation()},className:"".concat(n," ").concat(r,"-item-group")}),s.createElement("div",{className:i,title:"string"==typeof o?o:void 0},o),s.createElement("ul",{className:a},s.Children.map(l,this.renderInnerMenuItem)))}}]),n}(s.Component);Rt.isMenuItemGroup=!0,Rt.defaultProps={disabled:!0};var Nt=function(e){var t=e.className,n=e.rootPrefixCls,r=e.style;return s.createElement("li",{className:"".concat(t," ").concat(n,"-item-divider"),style:r})};Nt.defaultProps={disabled:!0,className:"",style:{}};var jt=It,Mt=n("eDIo");var Pt=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.editable,i=e.locale,a=e.style;return r&&!1!==r.showAdd?s.createElement("button",{ref:t,type:"button",className:"".concat(n,"-nav-add"),style:a,"aria-label":(null==i?void 0:i.addAriaLabel)||"Add tab",onClick:function(e){r.onEdit("add",{event:e})}},r.addIcon||"+"):null}));var Bt=s.forwardRef((function(e,t){var n=e.prefixCls,a=e.id,o=e.tabs,l=e.locale,u=e.mobile,d=e.moreIcon,h=void 0===d?"More":d,f=e.moreTransitionName,p=e.style,m=e.className,g=e.editable,b=e.tabBarGutter,y=e.rtl,E=e.onTabClick,x=Object(s.useState)(!1),_=Object(i.a)(x,2),k=_[0],w=_[1],C=Object(s.useState)(null),S=Object(i.a)(C,2),O=S[0],A=S[1],T="".concat(a,"-more-popup"),I="".concat(n,"-dropdown"),D=null!==O?"".concat(T,"-").concat(O):null,L=null==l?void 0:l.dropdownAriaLabel,R=s.createElement(jt,{onClick:function(e){var t=e.key,n=e.domEvent;E(t,n),w(!1)},id:T,tabIndex:-1,role:"listbox","aria-activedescendant":D,selectedKeys:[O],"aria-label":void 0!==L?L:"expanded dropdown"},o.map((function(e){return s.createElement(Lt,{key:e.key,id:"".concat(T,"-").concat(e.key),role:"option","aria-controls":a&&"".concat(a,"-panel-").concat(e.key),disabled:e.disabled},e.tab)})));function N(e){for(var t=o.filter((function(e){return!e.disabled})),n=t.findIndex((function(e){return e.key===O}))||0,r=t.length,i=0;i<r;i+=1){var a=t[n=(n+e+r)%r];if(!a.disabled)return void A(a.key)}}Object(s.useEffect)((function(){var e=document.getElementById(D);e&&e.scrollIntoView&&e.scrollIntoView(!1)}),[O]),Object(s.useEffect)((function(){k||A(null)}),[k]);var j=Object(r.a)({},y?"marginLeft":"marginRight",b);o.length||(j.visibility="hidden",j.order=1);var M=c()(Object(r.a)({},"".concat(I,"-rtl"),y)),P=u?null:s.createElement(Mt.a,{prefixCls:I,overlay:R,trigger:["hover"],visible:k,transitionName:f,onVisibleChange:w,overlayClassName:M,mouseEnterDelay:.1,mouseLeaveDelay:.1},s.createElement("button",{type:"button",className:"".concat(n,"-nav-more"),style:j,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":T,id:"".concat(a,"-more"),"aria-expanded":k,onKeyDown:function(e){var t=e.which;if(k)switch(t){case v.a.UP:N(-1),e.preventDefault();break;case v.a.DOWN:N(1),e.preventDefault();break;case v.a.ESC:w(!1);break;case v.a.SPACE:case v.a.ENTER:null!==O&&E(O,e)}else[v.a.DOWN,v.a.SPACE,v.a.ENTER].includes(t)&&(w(!0),e.preventDefault())}},h));return s.createElement("div",{className:c()("".concat(n,"-nav-operations"),m),style:p,ref:t},P,s.createElement(Pt,{prefixCls:n,locale:l,editable:g}))})),Ft=Object(s.createContext)(null),Ut=Math.pow(.995,20);function Ht(e,t){var n=s.useRef(e),r=s.useState({}),a=Object(i.a)(r,2)[1];return[n.current,function(e){var r="function"==typeof e?e(n.current):e;r!==n.current&&t(r,n.current),n.current=r,a({})}]}var zt=function(e){var t,n=e.position,r=e.prefixCls,i=e.extra;if(!i)return null;var a=i;return"right"===n&&(t=a.right||!a.left&&a||null),"left"===n&&(t=a.left||null),t?s.createElement("div",{className:"".concat(r,"-extra-content")},t):null};var Gt=s.forwardRef((function(e,t){var n,a,l=s.useContext(Ft),u=l.prefixCls,d=l.tabs,f=e.className,v=e.style,x=e.id,_=e.animated,k=e.activeKey,w=e.rtl,C=e.extra,S=e.editable,O=e.locale,A=e.tabPosition,T=e.tabBarGutter,I=e.children,D=e.onTabClick,L=e.onTabScroll,R=Object(s.useRef)(),N=Object(s.useRef)(),j=Object(s.useRef)(),M=Object(s.useRef)(),P=(a=Object(s.useRef)(new Map),[function(e){return a.current.has(e)||a.current.set(e,s.createRef()),a.current.get(e)},function(e){a.current.delete(e)}]),B=Object(i.a)(P,2),F=B[0],U=B[1],H="top"===A||"bottom"===A,z=Ht(0,(function(e,t){H&&L&&L({direction:e>t?"left":"right"})})),G=Object(i.a)(z,2),V=G[0],W=G[1],K=Ht(0,(function(e,t){!H&&L&&L({direction:e>t?"top":"bottom"})})),q=Object(i.a)(K,2),Y=q[0],Q=q[1],J=Object(s.useState)(0),X=Object(i.a)(J,2),Z=X[0],$=X[1],ee=Object(s.useState)(0),te=Object(i.a)(ee,2),ne=te[0],re=te[1],ie=Object(s.useState)(0),ae=Object(i.a)(ie,2),oe=ae[0],se=ae[1],le=Object(s.useState)(0),ce=Object(i.a)(le,2),ue=ce[0],de=ce[1],he=Object(s.useState)(null),fe=Object(i.a)(he,2),pe=fe[0],me=fe[1],ge=Object(s.useState)(null),ve=Object(i.a)(ge,2),be=ve[0],ye=ve[1],Ee=Object(s.useState)(0),xe=Object(i.a)(Ee,2),_e=xe[0],ke=xe[1],we=Object(s.useState)(0),Ce=Object(i.a)(we,2),Se=Ce[0],Oe=Ce[1],Ae=function(e){var t=Object(s.useRef)([]),n=Object(s.useState)({}),r=Object(i.a)(n,2)[1],a=Object(s.useRef)("function"==typeof e?e():e),o=g((function(){var e=a.current;t.current.forEach((function(t){e=t(e)})),t.current=[],a.current=e,r({})}));return[a.current,function(e){t.current.push(e),o()}]}(new Map),Te=Object(i.a)(Ae,2),Ie=Te[0],De=Te[1],Le=function(e,t,n){return Object(s.useMemo)((function(){for(var n,r=new Map,i=t.get(null===(n=e[0])||void 0===n?void 0:n.key)||y,a=i.left+i.width,s=0;s<e.length;s+=1){var l,c=e[s].key,u=t.get(c);if(!u)u=t.get(null===(l=e[s-1])||void 0===l?void 0:l.key)||y;var d=r.get(c)||Object(o.a)({},u);d.right=a-d.left-d.width,r.set(c,d)}return r}),[e.map((function(e){return e.key})).join("_"),t,n])}(d,Ie,Z),Re="".concat(u,"-nav-operations-hidden"),Ne=0,je=0;function Me(e){return e<Ne?[Ne,!1]:e>je?[je,!1]:[e,!0]}H?w?(Ne=0,je=Math.max(0,Z-pe)):(Ne=Math.min(0,pe-Z),je=0):(Ne=Math.min(0,be-ne),je=0);var Pe=Object(s.useRef)(),Be=Object(s.useState)(),Fe=Object(i.a)(Be,2),Ue=Fe[0],He=Fe[1];function ze(){He(Date.now())}function Ge(){window.clearTimeout(Pe.current)}function Ve(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:k,t=Le.get(e);if(t)if(H){var n=V;w?t.right<V?n=t.right:t.right+t.width>V+pe&&(n=t.right+t.width-pe):t.left<-V?n=-t.left:t.left+t.width>-V+pe&&(n=-(t.left+t.width-pe)),Q(0),W(Me(n)[0])}else{var r=Y;t.top<-Y?r=-t.top:t.top+t.height>-Y+be&&(r=-(t.top+t.height-be)),W(0),Q(Me(r)[0])}}!function(e,t){var n=Object(s.useState)(),r=Object(i.a)(n,2),a=r[0],o=r[1],l=Object(s.useState)(0),c=Object(i.a)(l,2),u=c[0],d=c[1],h=Object(s.useState)(0),f=Object(i.a)(h,2),p=f[0],m=f[1],g=Object(s.useState)(),v=Object(i.a)(g,2),b=v[0],y=v[1],E=Object(s.useRef)(),x=Object(s.useRef)(0),_=Object(s.useRef)(!1),k=Object(s.useRef)(),w=Object(s.useRef)(null);w.current={onTouchStart:function(e){var t=e.touches[0],n=t.screenX,r=t.screenY;o({x:n,y:r}),window.clearInterval(E.current)},onTouchMove:function(e){if(a){e.preventDefault();var n=e.touches[0],r=n.screenX,i=n.screenY;o({x:r,y:i});var s=r-a.x,l=i-a.y;t(s,l);var c=Date.now();d(c),m(c-u),y({x:s,y:l})}},onTouchEnd:function(){if(a&&(o(null),y(null),b)){var e=b.x/p,n=b.y/p,r=Math.abs(e),i=Math.abs(n);if(Math.max(r,i)<.1)return;var s=e,l=n;E.current=window.setInterval((function(){Math.abs(s)<.01&&Math.abs(l)<.01?window.clearInterval(E.current):t(20*(s*=Ut),20*(l*=Ut))}),20)}},onWheel:function(e){var n=e.deltaX,r=e.deltaY,i=0,a=Math.abs(n),o=Math.abs(r);a===o?i="x"===k.current?n:r:a>o?(i=n,k.current="x"):(i=r,k.current="y");var s=Date.now();s-x.current>100&&(_.current=!1),(t(-i,-i)||_.current)&&(e.preventDefault(),_.current=!0),x.current=s}},s.useEffect((function(){function t(e){w.current.onTouchMove(e)}function n(e){w.current.onTouchEnd(e)}return document.addEventListener("touchmove",t,{passive:!1}),document.addEventListener("touchend",n,{passive:!1}),e.current.addEventListener("touchstart",(function(e){w.current.onTouchStart(e)}),{passive:!1}),e.current.addEventListener("wheel",(function(e){w.current.onWheel(e)})),function(){document.removeEventListener("touchmove",t),document.removeEventListener("touchend",n)}}),[])}(R,(function(e,t){var n=!1;function r(e,t){e((function(e){var r=Me(e+t),a=Object(i.a)(r,2),o=a[0],s=a[1];return n=s,o}))}if(H){if(pe>=Z)return n;r(W,e)}else{if(be>=ne)return n;r(Q,t)}return Ge(),ze(),n})),Object(s.useEffect)((function(){return Ge(),Ue&&(Pe.current=window.setTimeout((function(){He(0)}),100)),Ge}),[Ue]);var We=function(e,t,n,r,i){var a,o,l,c=i.tabs,u=i.tabPosition,d=i.rtl;["top","bottom"].includes(u)?(a="width",o=d?"right":"left",l=Math.abs(t.left)):(a="height",o="top",l=-t.top);var h=t[a],f=n[a],p=r[a],m=h;return f+p>h&&(m=h-p),Object(s.useMemo)((function(){if(!c.length)return[0,0];for(var t=c.length,n=t,r=0;r<t;r+=1){var i=e.get(c[r].key)||E;if(i[o]+i[a]>l+m){n=r-1;break}}for(var s=0,u=t-1;u>=0;u-=1){if((e.get(c[u].key)||E)[o]<l){s=u+1;break}}return[s,n]}),[e,l,m,u,c.map((function(e){return e.key})).join("_"),d])}(Le,{width:pe,height:be,left:V,top:Y},{width:oe,height:ue},{width:_e,height:Se},Object(o.a)(Object(o.a)({},e),{},{tabs:d})),Ke=Object(i.a)(We,2),qe=Ke[0],Ye=Ke[1],Qe=d.map((function(e){var t=e.key;return s.createElement(b,{id:x,prefixCls:u,key:t,rtl:w,tab:e,closable:e.closable,editable:S,active:t===k,tabPosition:A,tabBarGutter:T,renderWrapper:I,removeAriaLabel:null==O?void 0:O.removeAriaLabel,ref:F(t),onClick:function(e){D(t,e)},onRemove:function(){U(t)},onFocus:function(){Ve(t),ze(),w||(R.current.scrollLeft=0),R.current.scrollTop=0}})})),Je=g((function(){var e,t,n,r,i,a,o,s,l,c=(null===(e=R.current)||void 0===e?void 0:e.offsetWidth)||0,u=(null===(t=R.current)||void 0===t?void 0:t.offsetHeight)||0,h=(null===(n=M.current)||void 0===n?void 0:n.offsetWidth)||0,f=(null===(r=M.current)||void 0===r?void 0:r.offsetHeight)||0,p=(null===(i=j.current)||void 0===i?void 0:i.offsetWidth)||0,m=(null===(a=j.current)||void 0===a?void 0:a.offsetHeight)||0;me(c),ye(u),ke(h),Oe(f);var g=((null===(o=N.current)||void 0===o?void 0:o.offsetWidth)||0)-h,v=((null===(s=N.current)||void 0===s?void 0:s.offsetHeight)||0)-f;$(g),re(v);var b=null===(l=j.current)||void 0===l?void 0:l.className.includes(Re);se(g-(b?0:p)),de(v-(b?0:m)),De((function(){var e=new Map;return d.forEach((function(t){var n=t.key,r=F(n).current;r&&e.set(n,{width:r.offsetWidth,height:r.offsetHeight,left:r.offsetLeft,top:r.offsetTop})})),e}))})),Xe=d.slice(0,qe),Ze=d.slice(Ye+1),$e=[].concat(Object(h.a)(Xe),Object(h.a)(Ze)),et=Object(s.useState)(),tt=Object(i.a)(et,2),nt=tt[0],rt=tt[1],it=Le.get(k),at=Object(s.useRef)();function ot(){p.a.cancel(at.current)}Object(s.useEffect)((function(){var e={};return it&&(H?(w?e.right=it.right:e.left=it.left,e.width=it.width):(e.top=it.top,e.height=it.height)),ot(),at.current=p()((function(){rt(e)})),ot}),[it,H,w]),Object(s.useEffect)((function(){Ve()}),[k,it,Le,H]),Object(s.useEffect)((function(){Je()}),[w,T,k,d.map((function(e){return e.key})).join("_")]);var st,lt,ct,ut,dt=!!$e.length,ht="".concat(u,"-nav-wrap");return H?w?(lt=V>0,st=V+pe<Z):(st=V<0,lt=-V+pe<Z):(ct=Y<0,ut=-Y+be<ne),s.createElement("div",{ref:t,role:"tablist",className:c()("".concat(u,"-nav"),f),style:v,onKeyDown:function(){ze()}},s.createElement(zt,{position:"left",extra:C,prefixCls:u}),s.createElement(m.a,{onResize:Je},s.createElement("div",{className:c()(ht,(n={},Object(r.a)(n,"".concat(ht,"-ping-left"),st),Object(r.a)(n,"".concat(ht,"-ping-right"),lt),Object(r.a)(n,"".concat(ht,"-ping-top"),ct),Object(r.a)(n,"".concat(ht,"-ping-bottom"),ut),n)),ref:R},s.createElement(m.a,{onResize:Je},s.createElement("div",{ref:N,className:"".concat(u,"-nav-list"),style:{transform:"translate(".concat(V,"px, ").concat(Y,"px)"),transition:Ue?"none":void 0}},Qe,s.createElement(Pt,{ref:M,prefixCls:u,locale:O,editable:S,style:{visibility:dt?"hidden":null}}),s.createElement("div",{className:c()("".concat(u,"-ink-bar"),Object(r.a)({},"".concat(u,"-ink-bar-animated"),_.inkBar)),style:nt}))))),s.createElement(Bt,Object.assign({},e,{ref:j,prefixCls:u,tabs:$e,className:!dt&&Re})),s.createElement(zt,{position:"right",extra:C,prefixCls:u}))}));function Vt(e){var t=e.id,n=e.activeKey,i=e.animated,a=e.tabPosition,o=e.rtl,l=e.destroyInactiveTabPane,u=s.useContext(Ft),d=u.prefixCls,h=u.tabs,f=i.tabPane,p=h.findIndex((function(e){return e.key===n}));return s.createElement("div",{className:c()("".concat(d,"-content-holder"))},s.createElement("div",{className:c()("".concat(d,"-content"),"".concat(d,"-content-").concat(a),Object(r.a)({},"".concat(d,"-content-animated"),f)),style:p&&f?Object(r.a)({},o?"marginRight":"marginLeft","-".concat(p,"00%")):null},h.map((function(e){return s.cloneElement(e.node,{key:e.key,prefixCls:d,tabKey:e.key,id:t,animated:f,active:e.key===n,destroyInactiveTabPane:l})}))))}function Wt(e){var t=e.prefixCls,n=e.forceRender,r=e.className,a=e.style,l=e.id,u=e.active,d=e.animated,h=e.destroyInactiveTabPane,f=e.tabKey,p=e.children,m=s.useState(n),g=Object(i.a)(m,2),v=g[0],b=g[1];s.useEffect((function(){u?b(!0):h&&b(!1)}),[u,h]);var y={};return u||(d?(y.visibility="hidden",y.height=0,y.overflowY="hidden"):y.display="none"),s.createElement("div",{id:l&&"".concat(l,"-panel-").concat(f),role:"tabpanel",tabIndex:u?0:-1,"aria-labelledby":l&&"".concat(l,"-tab-").concat(f),"aria-hidden":!u,style:Object(o.a)(Object(o.a)({},y),a),className:c()("".concat(t,"-tabpane"),u&&"".concat(t,"-tabpane-active"),r)},(u||v||n)&&p)}var Kt=0;var qt=s.forwardRef((function(e,t){var n,l,h=e.id,f=e.prefixCls,p=void 0===f?"rc-tabs":f,m=e.className,g=e.children,v=e.direction,b=e.activeKey,y=e.defaultActiveKey,E=e.editable,x=e.animated,_=e.tabPosition,k=void 0===_?"top":_,w=e.tabBarGutter,C=e.tabBarStyle,S=e.tabBarExtraContent,O=e.locale,A=e.moreIcon,T=e.moreTransitionName,I=e.destroyInactiveTabPane,D=e.renderTabBar,L=e.onChange,R=e.onTabClick,N=e.onTabScroll,j=Object(a.a)(e,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),M=function(e){return Object(u.a)(e).map((function(e){if(s.isValidElement(e)){var t=void 0!==e.key?String(e.key):void 0;return Object(o.a)(Object(o.a)({key:t},e.props),{},{node:e})}return null})).filter((function(e){return e}))}(g),P="rtl"===v;l=!1===x?{inkBar:!1,tabPane:!1}:Object(o.a)({inkBar:!0,tabPane:!1},!0!==x?x:null);var B=Object(s.useState)(!1),F=Object(i.a)(B,2),U=F[0],H=F[1];Object(s.useEffect)((function(){var e;H((e=navigator.userAgent||navigator.vendor||window.opera,!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e.substr(0,4)))))}),[]);var z=Object(d.a)((function(){var e;return null===(e=M[0])||void 0===e?void 0:e.key}),{value:b,defaultValue:y}),G=Object(i.a)(z,2),V=G[0],W=G[1],K=Object(s.useState)((function(){return M.findIndex((function(e){return e.key===V}))})),q=Object(i.a)(K,2),Y=q[0],Q=q[1];Object(s.useEffect)((function(){var e,t=M.findIndex((function(e){return e.key===V}));-1===t&&(t=Math.max(0,Math.min(Y,M.length-1)),W(null===(e=M[t])||void 0===e?void 0:e.key));Q(t)}),[M.map((function(e){return e.key})).join("_"),V,Y]);var J=Object(d.a)(null,{value:h}),X=Object(i.a)(J,2),Z=X[0],$=X[1],ee=k;U&&!["left","right"].includes(k)&&(ee="top"),Object(s.useEffect)((function(){h||($("rc-tabs-".concat(Kt)),Kt+=1)}),[]);var te,ne={id:Z,activeKey:V,animated:l,tabPosition:ee,rtl:P,mobile:U},re=Object(o.a)(Object(o.a)({},ne),{},{editable:E,locale:O,moreIcon:A,moreTransitionName:T,tabBarGutter:w,onTabClick:function(e,t){null==R||R(e,t),W(e),null==L||L(e)},onTabScroll:N,extra:S,style:C,panes:g});return te=D?D(re,Gt):s.createElement(Gt,Object.assign({},re)),s.createElement(Ft.Provider,{value:{tabs:M,prefixCls:p}},s.createElement("div",Object.assign({ref:t,id:h,className:c()(p,"".concat(p,"-").concat(ee),(n={},Object(r.a)(n,"".concat(p,"-mobile"),U),Object(r.a)(n,"".concat(p,"-editable"),E),Object(r.a)(n,"".concat(p,"-rtl"),P),n),m)},j),te,s.createElement(Vt,Object.assign({destroyInactiveTabPane:I},ne,{animated:l}))))}));qt.TabPane=Wt;var Yt=qt;t.b=Yt},k5F3:
|
|
|
/*!******************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Export/components/Head/index.tsx ***!
|
|
|
\******************************************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/table/style */"g9YV");var r=n(/*! antd/es/table */"wCAj"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),c=n.n(l),u=n(/*! react */"q1tI"),d=n.n(u),h=n(/*! umi */"Ty5D"),f=n(/*! umi */"9kvl"),p=n(/*! ./index.less?modules */"uJ6K"),m=n.n(p),g=n(/*! @/service/exercise */"V0Rq"),v=n(/*! @/components/RenderHtml */"9Bee"),b=n(/*! @/utils/util */"1vsH");t.a=Object(f.a)((function(e){var t=e.exercise,n=e.loading,r=e.user;return{exercise:t,globalSetting:e.globalSetting,user:r,loading:n.effects}}))((function(e){var t,n,l,f,p=e.isPreview,y=void 0!==p&&p,E=e.isExportBlank,x=void 0!==E&&E,_=e.activeTabs,k=e.exercise,w=(e.globalSetting,e.loading,e.user),C=(e.dispatch,Object(h.i)()),S=w.userInfo,O=Object(u.useState)(),A=Object(s.a)(O,2),T=A[0],I=A[1],D=Object(u.useState)(),L=Object(s.a)(D,2),R=L[0],N=L[1],j=Object(u.useRef)(null),M=Object(u.useState)(21),P=Object(s.a)(M,2),B=P[0],F=P[1];Object(u.useEffect)((function(){Object(b.N)(_)||"2"===_&&U()}),[C.userId,C.coursesId,C.exerciseId,C.categoryId,_]),Object(u.useEffect)((function(){j.current&&F(j.current.clientHeight)}),[j.current]),Object(u.useEffect)((function(){var e;if(null!==(e=k.exerciseExportHeadData)&&void 0!==e&&e.title){var t=k.exerciseExportHeadData;I(Object(o.a)({},t||{}));var n,r,i=(t||{}).table;(null!=i&&i.total_singles_scores||null!=i&&i.total_doubles_scores||null!=i&&i.total_nulls_scores||null!=i&&i.total_judges_scores||null!=i&&i.total_pros_scores||null!=i&&i.total_shixuns_scores||null!=i&&i.total_mains_scores||null!=i&&i.total_photographs_scores||null!=i&&i.total_fileuploads_scores||null!=i&&i.total_combination_scores)&&(n=Number(null==i?void 0:i.total_singles_scores)+Number(null==i?void 0:i.total_doubles_scores)+Number(null==i?void 0:i.total_nulls_scores)+Number(null==i?void 0:i.total_judges_scores)+Number(null==i?void 0:i.total_pros_scores)+Number(null==i?void 0:i.total_shixuns_scores)+Number(null==i?void 0:i.total_mains_scores)+Number(null==i?void 0:i.total_photographs_scores)+Number(null==i?void 0:i.total_fileuploads_scores)+Number(null==i?void 0:i.total_combination_scores)),(null!=i&&i.singles_scores||null!=i&&i.doubles_scores||null!=i&&i.nulls_scores||null!=i&&i.judges_scores||null!=i&&i.pros_scores||null!=i&&i.shixuns_scores||null!=i&&i.mains_scores||null!=i&&i.photographs_scores||null!=i&&i.fileuploads_scores||null!=i&&i.combination_scores)&&(r=Number(null==i?void 0:i.singles_scores)+Number(null==i?void 0:i.doubles_scores)+Number(null==i?void 0:i.nulls_scores)+Number(null==i?void 0:i.judges_scores)+Number(null==i?void 0:i.pros_scores)+Number(null==i?void 0:i.shixuns_scores)+Number(null==i?void 0:i.photographs_scores)+Number(null==i?void 0:i.fileuploads_scores)+Number(null==i?void 0:i.mains_scores)+Number(null==i?void 0:i.combination_scores));var s=[{key:"1",name:"应得分",singles_score:null==i?void 0:i.total_singles_scores,doubles_score:null==i?void 0:i.total_doubles_scores,nulls_score:null==i?void 0:i.total_nulls_scores,judges_score:null==i?void 0:i.total_judges_scores,pros_score:null==i?void 0:i.total_pros_scores,shixuns_score:null==i?void 0:i.total_shixuns_scores,mains_score:null==i?void 0:i.total_mains_scores,photographs_scores:null==i?void 0:i.total_photographs_scores,fileuploads_scores:null==i?void 0:i.total_fileuploads_scores,total_combination_scores:null==i?void 0:i.total_combination_scores,total_score:n},{key:"2",name:"实得分",singles_score:null==i?void 0:i.singles_scores,doubles_score:null==i?void 0:i.doubles_scores,nulls_score:null==i?void 0:i.nulls_scores,judges_score:null==i?void 0:i.judges_scores,pros_score:null==i?void 0:i.pros_scores,shixuns_score:null==i?void 0:i.shixuns_scores,mains_score:null==i?void 0:i.mains_scores,photographs_scores:null==i?void 0:i.photographs_scores,fileuploads_scores:null==i?void 0:i.fileuploads_scores,total_combination_scores:null==i?void 0:i.combination_scores,total_score:r},{key:"3",name:"评卷人"}],l=[{key:"1",name:"应得分",singles_score:null==i?void 0:i.total_singles_scores,doubles_score:null==i?void 0:i.total_doubles_scores,nulls_score:null==i?void 0:i.total_nulls_scores,judges_score:null==i?void 0:i.total_judges_scores,pros_score:null==i?void 0:i.total_pros_scores,shixuns_score:null==i?void 0:i.total_shixuns_scores,photographs_scores:null==i?void 0:i.total_photographs_scores,fileuploads_scores:null==i?void 0:i.total_fileuploads_scores,mains_score:null==i?void 0:i.total_mains_scores,total_combination_scores:null==i?void 0:i.total_combination_scores,total_score:n},{key:"2",name:"实得分"},{key:"3",name:"评卷人"}];N(Object(a.a)(x?l:s))}}),[k.exerciseExportHeadData]);var U=function(){var e=Object(i.a)(c.a.mark((function e(){var t,n,r,i,a,o,s;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={id:C.exerciseId||C.categoryId,identify:(null==S?void 0:S.login)||null},e.next=3,Object(g.u)(t);case 3:n=e.sent,I(n||{}),(null!=(r=(n||{}).table)&&r.total_singles_scores||null!=r&&r.total_doubles_scores||null!=r&&r.total_nulls_scores||null!=r&&r.total_judges_scores||null!=r&&r.total_pros_scores||null!=r&&r.total_shixuns_scores||null!=r&&r.total_mains_scores||null!=r&&r.total_photographs_scores||null!=r&&r.total_fileuploads_scores||null!=r&&r.total_combination_scores)&&(i=Number(null==r?void 0:r.total_singles_scores)+Number(null==r?void 0:r.total_doubles_scores)+Number(null==r?void 0:r.total_nulls_scores)+Number(null==r?void 0:r.total_photographs_scores)+Number(null==r?void 0:r.total_fileuploads_scores)+Number(null==r?void 0:r.total_judges_scores)+Number(null==r?void 0:r.total_pros_scores)+Number(null==r?void 0:r.total_shixuns_scores)+Number(null==r?void 0:r.total_mains_scores)+Number(null==r?void 0:r.total_combination_scores)),(null!=r&&r.singles_scores||null!=r&&r.doubles_scores||null!=r&&r.nulls_scores||null!=r&&r.judges_scores||null!=r&&r.pros_scores||null!=r&&r.shixuns_scores||null!=r&&r.photographs_scores||null!=r&&r.fileuploads_scores||null!=r&&r.mains_scores||null!=r&&r.combination_scores)&&(a=Number(null==r?void 0:r.singles_scores)+Number(null==r?void 0:r.doubles_scores)+Number(null==r?void 0:r.nulls_scores)+Number(null==r?void 0:r.judges_scores)+Number(null==r?void 0:r.pros_scores)+Number(null==r?void 0:r.shixuns_scores)+Number(null==r?void 0:r.photographs_scores)+Number(null==r?void 0:r.fileuploads_scores)+Number(null==r?void 0:r.mains_scores)+Number(null==r?void 0:r.combination_scores)),o=[{key:"1",name:"应得分",singles_score:null==r?void 0:r.total_singles_scores,doubles_score:null==r?void 0:r.total_doubles_scores,nulls_score:null==r?void 0:r.total_nulls_scores,judges_score:null==r?void 0:r.total_judges_scores,pros_score:null==r?void 0:r.total_pros_scores,shixuns_score:null==r?void 0:r.total_shixuns_scores,photographs_scores:null==r?void 0:r.total_photographs_scores,fileuploads_scores:null==r?void 0:r.total_fileuploads_scores,mains_score:null==r?void 0:r.total_mains_scores,total_combination_scores:null==r?void 0:r.total_combination_scores,total_score:i},{key:"2",name:"实得分",singles_score:null==r?void 0:r.singles_scores,doubles_score:null==r?void 0:r.doubles_scores,nulls_score:null==r?void 0:r.nulls_scores,judges_score:null==r?void 0:r.judges_scores,pros_score:null==r?void 0:r.pros_scores,shixuns_score:null==r?void 0:r.shixuns_scores,photographs_scores:null==r?void 0:r.photographs_scores,fileuploads_scores:null==r?void 0:r.fileuploads_scores,mains_score:null==r?void 0:r.mains_scores,total_combination_scores:null==r?void 0:r.combination_scores,total_score:a},{key:"3",name:"评卷人"}],s=[{key:"1",name:"应得分"},{key:"2",name:"实得分"},{key:"3",name:"评卷人"}],N(x?s:o);case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),H=[{width:"8%",title:"题型",align:"center",dataIndex:"name",render:function(e){return d.a.createElement("a",null,e)}},{width:"8%",title:"单选题",align:"center",dataIndex:"singles_score",render:function(e){return d.a.createElement("a",null,"0.0"===e?0:e)}},{width:"8%",title:"多选题",align:"center",dataIndex:"doubles_score",render:function(e){return d.a.createElement("a",null,"0.0"===e?0:e)}},{width:"8%",title:"填空题",align:"center",dataIndex:"nulls_score",render:function(e){return d.a.createElement("a",null,"0.0"===e?0:e)}},{width:140,title:"判断题",align:"center",dataIndex:"judges_score",render:function(e){return d.a.createElement("a",null,"0.0"===e?0:e)}},{width:"8%",title:"编程题",align:"center",dataIndex:"pros_score",render:function(e){return d.a.createElement("a",null,"0.0"===e?0:e)}},{width:"8%",title:"实训题",align:"center",dataIndex:"shixuns_score",render:function(e){return d.a.createElement("a",null,"0.0"===e?0:e)}},{width:"8%",title:"简答题",align:"center",dataIndex:"mains_score",render:function(e){return d.a.createElement("a",null,"0.0"===e?0:e)}},{width:"10%",title:"拍照上传题",align:"center",dataIndex:"photographs_scores",render:function(e){return d.a.createElement("a",null,"0.0"===e?0:e)}},{width:"10%",title:"文件上传题",align:"center",dataIndex:"fileuploads_scores",render:function(e){return d.a.createElement("a",null,"0.0"===e?0:e)}},{width:"8%",title:"接龙题",align:"center",dataIndex:"total_combination_scores",render:function(e){return d.a.createElement("a",null,"0.0"===e?0:e)}},{width:"8%",title:"总分",align:"center",dataIndex:"total_score",render:function(e){return d.a.createElement("a",null,"0.0"===e?0:e)}}],z=(T||{}).exercise_header;return d.a.createElement(d.a.Fragment,null,((null==z?void 0:z.show_user)||(null==z?void 0:z.show_no)||(null==z?void 0:z.show_group))&&d.a.createElement("section",{className:m.a.glassSeal},(null==z?void 0:z.show_user)&&d.a.createElement("span",null,"姓名:",d.a.createElement("span",null,null==T?void 0:T.user)),(null==z?void 0:z.show_no)&&d.a.createElement("span",null,"学号:",d.a.createElement("span",null,null==T?void 0:T.student_id)),(null==z?void 0:z.show_group)&&d.a.createElement("span",null,"专业班级:",d.a.createElement("span",null,null==T?void 0:T.group_name))),d.a.createElement("section",{className:"".concat(m.a.wrap," ").concat(y?"pl20":""," ")},(null==T?void 0:T.photo_url)&&d.a.createElement("img",{className:m.a.img,src:null==T?void 0:T.photo_url}),(null==z?void 0:z.show_title)&&d.a.createElement("p",{className:"font16 tc c-grey-333"},d.a.createElement("strong",null,null==T?void 0:T.title)),(null==z?void 0:z.show_body)&&((null==k||null===(t=k.exerciseExportHeadData)||void 0===t?void 0:t.exercise_description)||(null==k||null===(n=k.commonHeader)||void 0===n?void 0:n.exercise_description))&&d.a.createElement("span",{ref:j,style:{justifyContent:21===B?"center":"left",wordBreak:"break-all",display:"flex",textAlign:"left"},className:"tc c-grey-333"},"作业与测验须知:".concat((null==k||null===(l=k.exerciseExportHeadData)||void 0===l?void 0:l.exercise_description)||(null==k||null===(f=k.commonHeader)||void 0===f?void 0:f.exercise_description))),(null==z?void 0:z.show_info)&&d.a.createElement("p",{className:"tc c-grey-666"},"共:【",null==T?void 0:T.large_counts,"大题】【",null==T?void 0:T.total_count,"小题】【 满分",null==T?void 0:T.score,"分】 作业与测验时间:【",(null==T?void 0:T.time)>-1?"".concat(null==T?void 0:T.time,"分钟"):"不限","】"),(null==z?void 0:z.show_desc)&&d.a.createElement("div",{className:"mt10"},d.a.createElement("p",{className:"font16"},"作业与测验说明:"),d.a.createElement(v.a,{value:null==T?void 0:T.description})),(null==z?void 0:z.show_table)&&d.a.createElement("div",{className:"mt10"},d.a.createElement(r.a,{className:m.a.table,columns:H,dataSource:Object(a.a)(R||[]),bordered:!0,pagination:!1}))))}))},kPWJ:
|
|
|
/*!****************************************!*\
|
|
|
!*** ./src/assets/images/question.gif ***!
|
|
|
\****************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/question.cb52bef9.gif"},kPYp:
|
|
|
/*!******************************************!*\
|
|
|
!*** ./src/assets/images/icons/zoom.png ***!
|
|
|
\******************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF8AAAAUCAYAAADr0+FaAAANEklEQVRYR8WZe5RX1XXHP/vce3/zHoaXgFp5DQyOQLRgUTEtDW1qYyVmZUGNklRdiRpKE3lHfPyc4TngIBgfC0wx1ixt1NRWal2kotbE2lbRiCIISBCGhzDAvGd+87v37K5z5zfDzMCM46pr9fw1a+45+5zz3fvs/d3fn4yr1F8Do0UIUb74UFR8Gm3IO/Wf8MThat7mOYnaDZUmNUF/htpWLlePK4xwCcoQICHQbOGoKDuM4U1p5r0Px1DNrDPrezzQs+qNPUh/o4xXj6tRJhlhGEqeQNrCCYXdGvGfFt5JNHLoozJp7WyvdI0OtR4LEK7CstUIWyJLTSRcLfCnvlAiUKSgCEfV8o6NeMVE/G53itOUiXX3Sxcx2ov4qhG+qjBWoFChWYUqIt6VgFeblR0H5lEL0oGyjKvU1yHezPviyHdZ0Ro180basvD398n77svIFTokK5vrgW8LTELJRwgA6bTSHcaBckot/yWGX2YZtv5untT0dJ7SpOZrAX9mLTeIYarAIIQEYLrZTQNNFj7A8rx6/GrPfDncPmdihV6Y9nkA+Ot4nrIXaDSGElH6KfjdzpBSpVo8ttVU8Xitx/7hw/imWmYD4wXy6Iqjje9mOGYj/uX0bjYf/5nsaLcpY9fqDZ5hNTD8/wi+27bB+CzfOVcqSiq0BMPdRpiBUNANmHNvJUQo1ZFls0lTuXupnOw+0UVamMsCz+eHCuf3MWgUjZ3w76kUZQeW8j4iOnadXmCUNQI3xvsIbl7bX70MEdKpFLutcCA7iz/BxvfrfY2hNVXDb2v2s/TkU/Lf8SZXrtOcUxFfF8P1AiNVSYj0aihUGOoCu/vFFVpQlpmQX1iflQg3dMxxR1OaVHERfUIglXFKf6AIIbs97SnUq7I5VFZ+skiOt+NwSVIHpAu4wwgLBAZ04COkUGoytusEAhUGi9APyO+UTlWVfyPkrt0/kQ8y4FcI3NQF6zYnNAEn1VKtQuAJg1XiPRPOnnggFmwmicTIC/VqOa5wCiFHhCFGGGAtnkNUBGyaLVGKJXvvZXe8ZlpS/UP5DAh8cgPt8nTP8n+LZbS7vIHpdH2WzcBzUZp1njCTgB/HacYNQxS1sluFF4zwmgpHEpa09ckOleGkuUaEa70sRmrU4fgGG7L8VBOPnCiThgvXaU5ByE14rAGcwxA/vsxha3lJPF4ylv0mpCVKYBCGRRFXm5BvedlMcEEVgyY0hSHP+nn8XZiin1G6gu+At3watfC0l8MWIk5GBs+0UhxZbvSyuM545Gvn+ijYsIU9GvKkyeLVIOBUypIwKSbSyt94RUxHCeIgMNRFEauaDBt6fSrdkS+p0MnisUpgGtIlH7rc9nOU8pQyPmF4XGBY5v2G6RRvtp7irkFjeGf7bYTuyXfYVpUhi8gtLOCaoJA1KKPaL2aVHXjM+XievFm6Ti+JlE0GrupIDMqRps+4z6vh+f3DqHcF8MyZVSbdhl9lKCm8gBVBPn+pNq43qHBSlTujgNeDkJUo3+3Iw9BYF3F3i7K5eonUd9hLqhm2lz/IG8OaYADflgjPndMBGHkcqD3B4mMn+Gc2iaszbSOpZtDbFBdN4uFgINOJMAqOjGxLW77bJ/BHJDU7kcfXjOEeEa7s9NzdM65WeNK0sC5dQGjSrPDgB+1zVNiRqmbh7wO2dQWnm2tv0+C8Zq7rfxkbjOEC3AsQmtSyYnc9q8cW8kMDSYHB7saqHGs+xvLgQ36272VJ9Zajh92ukwtH8JCXxxWajvFSC1sjZYEPC0W4pT3RG3jj0xQ/qF8qe86ymVRTbLg2KOQxLBdkvkdWeLoR7qyaL6fOWqMqI+9jZvYAHsEyKP7eVtj//HPBn5bU7CP9uN4oi4GvSFdGcRhhgybYvHuunByzXqd4IZtEmNi2BzZSklrPQ/vKpK43gOJvEzWvZDZrvYCb1ZIDhBZeyE3xt01ZrDRwc5zqhCiyPNtaxZwD63tmRe37jbhZs/1i5iQKSGpIYeZs+7HcKYYZwPfb50bwSK2l/LNOtabzuUet0TGB4VdGmJD5f0qFiro6Ko7cL65OnDVcxjA+zwDFmY9H/TY62/OYuFbzQphthXIRzus8U4kLy10DhGfemi8u3zOuUv9K4Km4gLaF14kIbty7SF75XOAzE0rW6iwxPBxHOFiUt0Plx77HvSjXZiLntI0o/3iJrO+bXZWSCibh8QsjlMRnE06IZYWjiEgb+CLo6RQrm1t4oKbs3E4dnNSh/fLYkvCZHNtRmppDysOAh6oyOHQ/0+i1Ot6HZzyPS1TjunvcRFzVI/gZjn6rKPORzHNps+ro4A6F5aaef+1oXFSl9EFmqvIEkBunBstea5i9Z778T99AgnFr1dWTp0S4sO1u7ETj1LCItiLvEu1RQn6ya7H8Q5/tJnWEzecFz+PSDPtxKWIdMMJFvkNEDHq4iuU1dVSySWrPZXvkeh2SHfEi8EfGQBTRWFdLecLw0IEyaTnXmovX6ng1PC3CeNeuifCZCeP+5OxRXKEXGp95hrgouAjsGBZ+KxHLTCOvd+0YVUrXMUMVB0j70z4cRty0b7H8R19BKqnUGQY20kZnXU1511rm+R5LFa7J2KmOQpJ7lsijfbU7brVOwOcfRSiNIxaqjbBaLeNc5HeAf5DlNQ1fAPyQxoY6yv0vA/xxq3QEAcvFMCumR2eG476vRsKCPQvY0blNbp9y8Xr9YxvyhBFGZS4YRSFzCot4YvvtnVhAT4hN0mDsDSz1PRaoUuCYgcLWAO4IYbXAdzLNTGgtmz5exNxzneMs80n1i7P4TpDLOokY5KiWKlXAYhG+1iXyPw/8FTokO7tT5H8p4CfVlBbyFassFeE6IKvTJRqt5QVfWLVzoXzUE3bOcZpgjYGZmfTgmpBt0UkW71vJe70CNVO9QZbLBl7J3xufCY7tZJq29UPrufdIAYtNG1j9XEqzyq7mwyw+eIiXO2tJ5zrbebfoqKIxVPr5zNB03AOoVd6KWpkbJJwDubXPkf9lgz9powaNdUw1HveqMrUz8Erc6W0OI9bvW8T+Lhy9+003alDcyPd8pVKIu0uHU2O6medaPmP5oZ/KJ+d03DT1i6cy2eSzzE8wTV0P4agS7DeWH+1aJC+VPKhTRXlUNMOkhEhb2d58jLsPHuYNnusqmrXvM2i2DisazeKgkFsRCp1dFRpUWGYifolQDnzv/wV8p5XYfP5CPMpRLu0GzlGrrB9g+Gltbdwc9Dhyzke3HyEqzmKgn2CDSCxWuShzmk86XcvrErDR+vxGsqhNnESbwHiFDJYGvi4+3w8KmEK6Q/azqjzWYLjP8efipBb6eSwQj6XtnbVJQNTEzqiVjZ7PlpYWjuWCbR2ImFYKwkamGMstWf3jBivXVW91+lHIG4W5zKxpJbu9w+0r+CPW6NBcjxcVLo8Lbl/TjvCMmFjRPVNwix/Q0kDiAuc6xy6qoAqHULaKpVGlZ9WzLQtwysLbrR5vZaco1SDO0a6ixzbFgLUcUdhllE+d5OpSiIXhpq0IDnShHrMkSClsM5YluxbJh7HHVWXCaka2BpQb4Vsxo2pr192C084uzq5y2mk7GEaIk4SFi1xHlUmDroC/Z5V79iyUlztrOw58l45OVbMsFbLudEUPbGeFDsnJjsFvYzt9Bf9cbKe0Ui8DnlYY1z2sXcETzfSavdMKB0OI4/7C42EtD5tcLhef+w1c0U0DcpYcXXUauYOus8Mdns1W2eIpy3Y18FGXrjipZmzAMLIoM4ZZQqwmdh7Oaltv3E0id1lMlR1hRJnk8PK+H0mqu7DmHBDB4vw6HtneQ8N06YNalIp4HmF6X8EfV6ljRfk5EmNxJvIdn09ksdYIs7oV2d7h7uGrhUOEzP14ibzoNgXmC3wjQx3dbwZdwM6YcbHpNJFDKjxr4dHOunv3rcY9rANNC7dbR4WFkbhIP7ddFxSxTK3Cr0nzgFMz2+05Su37saTsWJRVS5VnuHnnAnmtp8vPnKne+1NY4jlZwtDfWpob6ijzhQ098fyLVmn/bJ97PMPtQJ5r8Dxck5VUMyqXP0wEzEHjNFHQR438rPPZtuyiKpTtmsdjrji7SGmJmBJrGYZSlIsyfYD7oaJVlVqEAwbejSJeafR5t6dOsfOGTuXMTTHeBExHmCzCaDTurLPEFWOlXqFKlI+s8prfwG92lnXVXkoq9HwTcD/KdSp8mGrmyVSaf+pJJmjff/gKHZaTxR3G8E1rKWyoY4MvbOwJfIdIcSUX+8Ic1yg6yT6Eb7Q1Wc4BORRk+RQZQ2DD3n8Y+Lwn4edT/cEcOd0xL6nmyn5knWghPzuL7JQQJMC0umjzafUbaG5J0XigjFSfeHuHYZXSJIH0Iz+VJtczBL6H58pLZAhTaVqKCmnYfoSWc4l6Tko/nscg8clvMtQPyOFUn/oRVCauJZcs+jeHJFLHOX1wFTW9MkEnyg0kP2EpitJ4+YVU/S8v1xqrW4H9MAAAAABJRU5ErkJggg=="},kSUc:
|
|
|
/*!***************************************************!*\
|
|
|
!*** ./src/components/markdown-editor/index.less ***!
|
|
|
\***************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},"kaH+":
|
|
|
/*!************************************************!*\
|
|
|
!*** ./src/components/image-preview/index.tsx ***!
|
|
|
\************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/button/style */"+L6B");var r=n(/*! antd/es/button */"2/Rp"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),a=n(/*! react */"q1tI"),o=n.n(a),s=(n(/*! ./index.less */"UZu5"),n(/*! @/components/mediator */"dhSg")),l=n(/*! @ant-design/icons */"rLCj"),c=n(/*! @ant-design/icons */"dF/Y"),u=n(/*! @ant-design/icons */"4i/N");t.a=function(){var e=Object(a.useState)(""),t=Object(i.a)(e,2),n=t[0],d=t[1],h=Object(a.useState)(0),f=Object(i.a)(h,2),p=f[0],m=f[1],g=Object(a.useRef)("");function v(e){27==e.keyCode&&g.current&&b()}function b(){document.body.style.overflow="auto",d("")}return Object(a.useEffect)((function(){return s.a.subscribe("preview-image",(function(e){d(e),document.body.style.overflow="hidden"}))}),[]),Object(a.useEffect)((function(){return document.addEventListener("keydown",v),function(){document.removeEventListener("keydown",v)}}),[]),Object(a.useEffect)((function(){g.current=n}),[n]),o.a.createElement(a.Fragment,null,n?o.a.createElement("div",{className:"image-preview-container"},o.a.createElement("div",{className:"button-group"},o.a.createElement(r.a,{onClick:function(){m(p+90)}},"旋转",o.a.createElement(l.a,null)),o.a.createElement(r.a,{href:n},"下载",o.a.createElement(c.a,null)),o.a.createElement(r.a,{onClick:b},"关闭",o.a.createElement(u.a,null))),o.a.createElement("div",{className:"preview-wrp-group"},o.a.createElement("img",{className:"image-preview",src:n,alt:"预览大图",style:{transform:"rotate(".concat(p,"deg)")}}))):null)}},kqOp:
|
|
|
/*!***********************************************!*\
|
|
|
!*** ./src/components/Editor/NullMDEditor.js ***!
|
|
|
\***********************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */"0Owb"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass */"mtLc"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),l=n(/*! react */"q1tI"),c=n.n(l),u=n(/*! ../markdown-editor */"Ot1p"),d=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return(e=t.call.apply(t,[this].concat(a))).getChCountBeforeCursor=function(e,t){for(var n=t.line,r=0,i=0;i<n;i++)r+=e.getLine(i).split("▁").length-1;return r+=e.getLine(n).substring(0,t.ch).split("▁").length-1},e.onCMBeforeChange=function(t,n){var r=t.getRange(n.from,n.to),i=0;if(n.text.forEach((function(e){i+=e.split("▁").length-1})),r&&-1!=r.indexOf("▁")){var a=r.split("▁").length-1,o=e.getChCountBeforeCursor(t,n.from);console.log("删除".concat(a,"个, 之前有").concat(o,"个,新增").concat(i,"个")),e.props.deleteEmptyDisabled?n.cancel():e.props.onPlaceholderChange&&e.props.onPlaceholderChange(o,a,i)}else if(i){var s=e.getChCountBeforeCursor(t,n.from);console.log("新增".concat(i,"个,之前有").concat(s,"个")),e.props.onPlaceholderChange&&e.props.onPlaceholderChange(s,0,i)}},e}return Object(a.a)(n,[{key:"render",value:function(){return c.a.createElement(u.a,Object(r.a)({},this.props,{onCMBeforeChange:this.onCMBeforeChange}))}}]),n}(l.Component)},l2Kq:
|
|
|
/*!***********************************************!*\
|
|
|
!*** ./src/assets/images/forums/match_ad.jpg ***!
|
|
|
\***********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/match_ad.24dc22fd.jpg"},lZu9:
|
|
|
/*!***********************************************************!*\
|
|
|
!*** ./node_modules/codemirror/mode/markdown/markdown.js ***!
|
|
|
\***********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";e.defineMode("markdown",(function(t,n){var r=e.getMode(t,"text/html"),i="null"==r.name;void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.emoji&&(n.emoji=!1),void 0===n.fencedCodeBlockHighlighting&&(n.fencedCodeBlockHighlighting=!0),void 0===n.fencedCodeBlockDefaultMode&&(n.fencedCodeBlockDefaultMode="text/plain"),void 0===n.xml&&(n.xml=!0),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var a={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var o in a)a.hasOwnProperty(o)&&n.tokenTypeOverrides[o]&&(a[o]=n.tokenTypeOverrides[o]);var s=/^([*\-_])(?:\s*\1){2,}\s*$/,l=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,c=/^\[(x| )\](?=\s)/i,u=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,d=/^ {0,3}(?:\={1,}|-{2,})\s*$/,h=/^[^#!\[\]*_\\<>` "'(~:]+/,f=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,p=/^\s*\[[^\]]+?\]:.*$/,m=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/;function g(e,t,n){return t.f=t.inline=n,n(e,t)}function v(e,t,n){return t.f=t.block=n,n(e,t)}function b(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==E){var n=i;if(!n){var a=e.innerMode(r,t.htmlState);n="xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText}n&&(t.f=w,t.block=y,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function y(r,i){var o,h=r.column()===i.indentation,m=!(o=i.prevLine.stream)||!/\S/.test(o.string),v=i.indentedCode,b=i.prevLine.hr,y=!1!==i.list,E=(i.listStack[i.listStack.length-1]||0)+3;i.indentedCode=!1;var k=i.indentation;if(null===i.indentationDiff&&(i.indentationDiff=i.indentation,y)){for(i.list=null;k<i.listStack[i.listStack.length-1];)i.listStack.pop(),i.listStack.length?i.indentation=i.listStack[i.listStack.length-1]:i.list=!1;!1!==i.list&&(i.indentationDiff=k-i.listStack[i.listStack.length-1])}var w=!(m||b||i.prevLine.header||y&&v||i.prevLine.fencedCodeEnd),C=(!1===i.list||b||m)&&i.indentation<=E&&r.match(s),S=null;if(i.indentationDiff>=4&&(v||i.prevLine.fencedCodeEnd||i.prevLine.header||m))return r.skipToEnd(),i.indentedCode=!0,a.code;if(r.eatSpace())return null;if(h&&i.indentation<=E&&(S=r.match(u))&&S[1].length<=6)return i.quote=0,i.header=S[1].length,i.thisLine.header=!0,n.highlightFormatting&&(i.formatting="header"),i.f=i.inline,_(i);if(i.indentation<=E&&r.eat(">"))return i.quote=h?1:i.quote+1,n.highlightFormatting&&(i.formatting="quote"),r.eatSpace(),_(i);if(!C&&!i.setext&&h&&i.indentation<=E&&(S=r.match(l))){var O=S[1]?"ol":"ul";return i.indentation=k+r.current().length,i.list=!0,i.quote=0,i.listStack.push(i.indentation),i.em=!1,i.strong=!1,i.code=!1,i.strikethrough=!1,n.taskLists&&r.match(c,!1)&&(i.taskList=!0),i.f=i.inline,n.highlightFormatting&&(i.formatting=["list","list-"+O]),_(i)}return h&&i.indentation<=E&&(S=r.match(f,!0))?(i.quote=0,i.fencedEndRE=new RegExp(S[1]+"+ *$"),i.localMode=n.fencedCodeBlockHighlighting&&function(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=e.getMode(t,n);return"null"==i.name?null:i}(S[2]||n.fencedCodeBlockDefaultMode),i.localMode&&(i.localState=e.startState(i.localMode)),i.f=i.block=x,n.highlightFormatting&&(i.formatting="code-block"),i.code=-1,_(i)):i.setext||!(w&&y||i.quote||!1!==i.list||i.code||C||p.test(r.string))&&(S=r.lookAhead(1))&&(S=S.match(d))?(i.setext?(i.header=i.setext,i.setext=0,r.skipToEnd(),n.highlightFormatting&&(i.formatting="header")):(i.header="="==S[0].charAt(0)?1:2,i.setext=i.header),i.thisLine.header=!0,i.f=i.inline,_(i)):C?(r.skipToEnd(),i.hr=!0,i.thisLine.hr=!0,a.hr):"["===r.peek()?g(r,i,A):g(r,i,i.inline)}function E(t,n){var a=r.token(t,n.htmlState);if(!i){var o=e.innerMode(r,n.htmlState);("xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText||n.md_inside&&t.current().indexOf(">")>-1)&&(n.f=w,n.block=y,n.htmlState=null)}return a}function x(e,t){var r,i=t.listStack[t.listStack.length-1]||0,o=t.indentation<i,s=i+3;return t.fencedEndRE&&t.indentation<=s&&(o||e.match(t.fencedEndRE))?(n.highlightFormatting&&(t.formatting="code-block"),o||(r=_(t)),t.localMode=t.localState=null,t.block=y,t.f=w,t.fencedEndRE=null,t.code=0,t.thisLine.fencedCodeEnd=!0,o?v(e,t,t.block):r):t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),a.code)}function _(e){var t=[];if(e.formatting){t.push(a.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var r=0;r<e.formatting.length;r++)t.push(a.formatting+"-"+e.formatting[r]),"header"===e.formatting[r]&&t.push(a.formatting+"-"+e.formatting[r]+"-"+e.header),"quote"===e.formatting[r]&&(!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(a.formatting+"-"+e.formatting[r]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(a.linkHref,"url"):(e.strong&&t.push(a.strong),e.em&&t.push(a.em),e.strikethrough&&t.push(a.strikethrough),e.emoji&&t.push(a.emoji),e.linkText&&t.push(a.linkText),e.code&&t.push(a.code),e.image&&t.push(a.image),e.imageAltText&&t.push(a.imageAltText,"link"),e.imageMarker&&t.push(a.imageMarker)),e.header&&t.push(a.header,a.header+"-"+e.header),e.quote&&(t.push(a.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(a.quote+"-"+e.quote):t.push(a.quote+"-"+n.maxBlockquoteDepth)),!1!==e.list){var i=(e.listStack.length-1)%3;i?1===i?t.push(a.list2):t.push(a.list3):t.push(a.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function k(e,t){if(e.match(h,!0))return _(t)}function w(t,i){var o=i.text(t,i);if(void 0!==o)return o;if(i.list)return i.list=null,_(i);if(i.taskList)return" "===t.match(c,!0)[1]?i.taskOpen=!0:i.taskClosed=!0,n.highlightFormatting&&(i.formatting="task"),i.taskList=!1,_(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(i.formatting="header"),_(i);var s=t.next();if(i.linkTitle){i.linkTitle=!1;var l=s;"("===s&&(l=")");var u="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(t.match(new RegExp(u),!0))return a.linkHref}if("`"===s){var d=i.formatting;n.highlightFormatting&&(i.formatting="code"),t.eatWhile("`");var h=t.current().length;if(0!=i.code||i.quote&&1!=h){if(h==i.code){var f=_(i);return i.code=0,f}return i.formatting=d,_(i)}return i.code=h,_(i)}if(i.code)return _(i);if("\\"===s&&(t.next(),n.highlightFormatting)){var p=_(i),g=a.formatting+"-escape";return p?p+" "+g:g}if("!"===s&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,n.highlightFormatting&&(i.formatting="image"),_(i);if("["===s&&i.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,n.highlightFormatting&&(i.formatting="image"),_(i);if("]"===s&&i.imageAltText){n.highlightFormatting&&(i.formatting="image");var p=_(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=S,p}if("["===s&&!i.image)return i.linkText&&t.match(/^.*?\]/)||(i.linkText=!0,n.highlightFormatting&&(i.formatting="link")),_(i);if("]"===s&&i.linkText){n.highlightFormatting&&(i.formatting="link");var p=_(i);return i.linkText=!1,i.inline=i.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?S:w,p}if("<"===s&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=C,n.highlightFormatting&&(i.formatting="link"),(p=_(i))?p+=" ":p="",p+a.linkInline;if("<"===s&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=C,n.highlightFormatting&&(i.formatting="link"),(p=_(i))?p+=" ":p="",p+a.linkEmail;if(n.xml&&"<"===s&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var b=t.string.indexOf(">",t.pos);if(-1!=b){var y=t.string.substring(t.start,b);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(y)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=e.startState(r),v(t,i,E)}if(n.xml&&"<"===s&&t.match(/^\/\w*?>/))return i.md_inside=!1,"tag";if("*"===s||"_"===s){for(var x=1,k=1==t.pos?" ":t.string.charAt(t.pos-2);x<3&&t.eat(s);)x++;var O=t.peek()||" ",A=!/\s/.test(O)&&(!m.test(O)||/\s/.test(k)||m.test(k)),T=!/\s/.test(k)&&(!m.test(k)||/\s/.test(O)||m.test(O)),I=null,D=null;if(x%2&&(i.em||!A||"*"!==s&&T&&!m.test(k)?i.em!=s||!T||"*"!==s&&A&&!m.test(O)||(I=!1):I=!0),x>1&&(i.strong||!A||"*"!==s&&T&&!m.test(k)?i.strong!=s||!T||"*"!==s&&A&&!m.test(O)||(D=!1):D=!0),null!=D||null!=I)return n.highlightFormatting&&(i.formatting=null==I?"strong":null==D?"em":"strong em"),!0===I&&(i.em=s),!0===D&&(i.strong=s),f=_(i),!1===I&&(i.em=!1),!1===D&&(i.strong=!1),f}else if(" "===s&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return _(i);t.backUp(1)}if(n.strikethrough)if("~"===s&&t.eatWhile(s)){if(i.strikethrough)return n.highlightFormatting&&(i.formatting="strikethrough"),f=_(i),i.strikethrough=!1,f;if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting="strikethrough"),_(i)}else if(" "===s&&t.match(/^~~/,!0)){if(" "===t.peek())return _(i);t.backUp(2)}if(n.emoji&&":"===s&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,n.highlightFormatting&&(i.formatting="emoji");var L=_(i);return i.emoji=!1,L}return" "===s&&(t.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),_(i)}function C(e,t){if(">"===e.next()){t.f=t.inline=w,n.highlightFormatting&&(t.formatting="link");var r=_(t);return r?r+=" ":r="",r+a.linkInline}return e.match(/^[^>]+/,!0),a.linkInline}function S(e,t){if(e.eatSpace())return null;var r,i=e.next();return"("===i||"["===i?(t.f=t.inline=(r="("===i?")":"]",function(e,t){if(e.next()===r){t.f=t.inline=w,n.highlightFormatting&&(t.formatting="link-string");var i=_(t);return t.linkHref=!1,i}return e.match(O[r]),t.linkHref=!0,_(t)}),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,_(t)):"error"}var O={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function A(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=T,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,_(t)):g(e,t,w)}function T(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=I,n.highlightFormatting&&(t.formatting="link");var r=_(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),a.linkText}function I(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=w,a.linkHref+" url")}var D={startState:function(){return{f:y,prevLine:{stream:null},thisLine:{stream:null},block:y,htmlState:null,indentation:0,inline:w,text:k,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(r,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return b(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=E)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==E?{state:e.htmlState,mode:r}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:D}},indent:function(t,n,i){return t.block==E&&r.indent?r.indent(t.htmlState,n,i):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,n,i):e.Pass},blankLine:b,getType:_,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return D}),"xml"),e.defineMIME("text/markdown","markdown"),e.defineMIME("text/x-markdown","markdown")}(n(/*! ../../lib/codemirror */"VrN/"),n(/*! ../xml/xml */"1eCo"),n(/*! ../meta */"8EBN"))},loD1:
|
|
|
/*!**************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/contain/line.js ***!
|
|
|
\**************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){t.containStroke=function(e,t,n,r,i,a,o){if(0===i)return!1;var s=i,l=0;if(o>t+s&&o>r+s||o<t-s&&o<r-s||a>e+s&&a>n+s||a<e-s&&a<n-s)return!1;if(e===n)return Math.abs(a-e)<=s/2;var c=(l=(t-r)/(e-n))*a-o+(e*r-n*t)/(e-n);return c*c/(l*l+1)<=s/2*s/2}},loLm:
|
|
|
/*!*******************************************************!*\
|
|
|
!*** ./src/components/DragSubject/index.less?modules ***!
|
|
|
\*******************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___Ea2v9",flex_space_between:"flex_space_between___1bTGw",flex_box_vertical_center:"flex_box_vertical_center___2J4zW",flex_box_center_end:"flex_box_center_end___9_5OK",flex_box_column:"flex_box_column___2FLgO",posWarp:"posWarp___3pf1n",pos:"pos___3-NfR",tips:"tips___2-j_s"}},lzim:
|
|
|
/*!********************************************!*\
|
|
|
!*** ./src/components/ImagesIcon/index.ts ***!
|
|
|
\********************************************/
|
|
|
/*! exports provided: qrCode, searchIcon, search1Icon, noDataIcon, smallProgramIcon, anonyIcon, errIcon, chromeIcon, firefoxIcon, exportExerciseTemplate, txLiveIcon, blibliIcon, douyuIcon, weibaitongIcon, zoomIcon, groups1Icon, groups2Icon, groups3Icon, matchAdIcon, hbIcon, lockcloseIcon, teacherQQIcon, emptyIcon, charpterWhiteIcon, mainbannerBg, certificateIcon, chooseIcon, emptyIcon2, repositoryNoneDataIcon, questionIcon, noticeIcon, qrCodeIcon, done1Icon, done2Icon, done3Icon, UserQrCode */
|
|
|
/*! exports used: UserQrCode, anonyIcon, blibliIcon, certificateIcon, charpterWhiteIcon, chooseIcon, chromeIcon, done1Icon, done2Icon, done3Icon, douyuIcon, emptyIcon, emptyIcon2, errIcon, exportExerciseTemplate, firefoxIcon, hbIcon, lockcloseIcon, mainbannerBg, matchAdIcon, noDataIcon, noticeIcon, qrCode, qrCodeIcon, questionIcon, repositoryNoneDataIcon, search1Icon, searchIcon, smallProgramIcon, teacherQQIcon, txLiveIcon, weibaitongIcon, zoomIcon */function(e,t,n){"use strict";var r=n(/*! @/assets/images/icons/search.png */"E7E6"),i=n.n(r);n.d(t,"B",(function(){return i.a}));var a=n(/*! @/assets/images/icons/search1.png */"/GNS"),o=n.n(a);n.d(t,"A",(function(){return o.a}));var s=n(/*! @/assets/images/icons/nodata.png */"FOrL"),l=n.n(s);n.d(t,"u",(function(){return l.a}));var c=n(/*! @/assets/images/classrooms/small_program.png */"HpTS"),u=n.n(c);n.d(t,"C",(function(){return u.a}));var d=n(/*! @/assets/images/icons/anony.png */"tWlo"),h=n.n(d);n.d(t,"b",(function(){return h.a}));var f=n(/*! @/assets/images/classrooms/err.png */"7ZXX"),p=n.n(f);n.d(t,"n",(function(){return p.a}));var m=n(/*! @/assets/images/icons/chrome.png */"GABl"),g=n.n(m);n.d(t,"g",(function(){return g.a}));var v=n(/*! @/assets/images/icons/firefox.png */"onxn"),b=n.n(v);n.d(t,"p",(function(){return b.a}));var y=n(/*! @/assets/images/classrooms/export_exercise-template.png */"nKGa"),E=n.n(y);n.d(t,"o",(function(){return E.a}));var x=n(/*! @/assets/images/icons/tx-live.png */"4qgm"),_=n.n(x);n.d(t,"E",(function(){return _.a}));var k=n(/*! @/assets/images/icons/blibli.png */"JeFH"),w=n.n(k);n.d(t,"c",(function(){return w.a}));var C=n(/*! @/assets/images/icons/douyu.jpg */"ji0R"),S=n.n(C);n.d(t,"k",(function(){return S.a}));var O=n(/*! @/assets/images/icons/weibaitong.png */"W6BS"),A=n.n(O);n.d(t,"F",(function(){return A.a}));var T=n(/*! @/assets/images/icons/zoom.png */"kPYp"),I=n.n(T);n.d(t,"G",(function(){return I.a}));n(/*! @/assets/images/icons/groups1.png */"nukY"),n(/*! @/assets/images/icons/groups2.png */"4u4S"),n(/*! @/assets/images/icons/groups3.png */"yslc");var D=n(/*! @/assets/images/forums/match_ad.jpg */"l2Kq"),L=n.n(D);n.d(t,"t",(function(){return L.a}));var R=n(/*! @/assets/images/hb.png */"RMFE"),N=n.n(R);n.d(t,"q",(function(){return N.a}));var j=n(/*! @/assets/images/icons/lockclose.svg */"TGq3"),M=n.n(j);n.d(t,"r",(function(){return M.a}));var P=n(/*! @/assets/images/teacherQQ.png */"SMhR"),B=n.n(P);n.d(t,"D",(function(){return B.a}));var F=n(/*! @/assets/images/empty.png */"8/bI"),U=n.n(F);n.d(t,"l",(function(){return U.a}));var H=n(/*! @/assets/images/icons/charpter-white.svg */"JWDV"),z=n.n(H);n.d(t,"e",(function(){return z.a}));var G=n(/*! @/assets/images/banner/mainbanner.jpg */"Xsq0"),V=n.n(G);n.d(t,"s",(function(){return V.a}));var W=n(/*! @/assets/images/certificate.jpg */"Ohmc"),K=n.n(W);n.d(t,"d",(function(){return K.a}));var q=n(/*! @/assets/images/icons/choose.svg */"csWT"),Y=n.n(q);n.d(t,"f",(function(){return Y.a}));var Q=n(/*! @/assets/images/empty2.png */"7v3h"),J=n.n(Q);n.d(t,"m",(function(){return J.a}));var X=n(/*! @/assets/images/RepositoryNoneData.png */"cRFk"),Z=n.n(X);n.d(t,"z",(function(){return Z.a}));var $=n(/*! @/assets/images/question.gif */"kPWJ"),ee=n.n($);n.d(t,"y",(function(){return ee.a}));var te=n(/*! @/assets/images/notice.gif */"qgvg"),ne=n.n(te);n.d(t,"v",(function(){return ne.a}));var re=n(/*! @/assets/images/qrCode.png */"FPkq"),ie=n.n(re);n.d(t,"x",(function(){return ie.a}));var ae=n(/*! @/assets/images/icons/done1.png */"A/g1"),oe=n.n(ae);n.d(t,"h",(function(){return oe.a}));var se=n(/*! @/assets/images/icons/done2.png */"Nmxd"),le=n.n(se);n.d(t,"i",(function(){return le.a}));var ce=n(/*! @/assets/images/icons/done3.png */"5D2P"),ue=n.n(ce);n.d(t,"j",(function(){return ue.a}));var de=n(/*! @/assets/images/icons/qrCode.png */"djh8"),he=n.n(de);n.d(t,"w",(function(){return he.a}));var fe=n(/*! @/assets/images/user/qrcode.png */"Jq4h"),pe=n.n(fe);n.d(t,"a",(function(){return pe.a}))},mFDi:
|
|
|
/*!*******************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/core/BoundingRect.js ***!
|
|
|
\*******************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,a,o,s=n(/*! ./vector */"QBsz"),l=n(/*! ./matrix */"Fofx"),c=s.applyTransform,u=Math.min,d=Math.max;function h(e,t,n,r){n<0&&(e+=n,n=-n),r<0&&(t+=r,r=-r),this.x=e,this.y=t,this.width=n,this.height=r}h.prototype={constructor:h,union:function(e){var t=u(e.x,this.x),n=u(e.y,this.y);this.width=d(e.x+e.width,this.x+this.width)-t,this.height=d(e.y+e.height,this.y+this.height)-n,this.x=t,this.y=n},applyTransform:(r=[],i=[],a=[],o=[],function(e){if(e){r[0]=a[0]=this.x,r[1]=o[1]=this.y,i[0]=o[0]=this.x+this.width,i[1]=a[1]=this.y+this.height,c(r,r,e),c(i,i,e),c(a,a,e),c(o,o,e),this.x=u(r[0],i[0],a[0],o[0]),this.y=u(r[1],i[1],a[1],o[1]);var t=d(r[0],i[0],a[0],o[0]),n=d(r[1],i[1],a[1],o[1]);this.width=t-this.x,this.height=n-this.y}}),calculateTransform:function(e){var t=this,n=e.width/t.width,r=e.height/t.height,i=l.create();return l.translate(i,i,[-t.x,-t.y]),l.scale(i,i,[n,r]),l.translate(i,i,[e.x,e.y]),i},intersect:function(e){if(!e)return!1;e instanceof h||(e=h.create(e));var t=this,n=t.x,r=t.x+t.width,i=t.y,a=t.y+t.height,o=e.x,s=e.x+e.width,l=e.y,c=e.y+e.height;return!(r<o||s<n||a<l||c<i)},contain:function(e,t){return e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height},clone:function(){return new h(this.x,this.y,this.width,this.height)},copy:function(e){this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},h.create=function(e){return new h(e.x,e.y,e.width,e.height)};var f=h;e.exports=f},mLcG:
|
|
|
/*!*********************************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/animation/requestAnimationFrame.js ***!
|
|
|
\*********************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){setTimeout(e,16)};e.exports=n},mgmH:
|
|
|
/*!*****************************!*\
|
|
|
!*** ./src/utils/export.ts ***!
|
|
|
\*****************************/
|
|
|
/*! exports provided: ExportCourseInfo, ExportCourseActScore, ExportCourseMemberScores, ExportCourseAndOther, exportMoocrecord, ExportCourseTotalScore, ExportCourseWorkListScores, ExportCourseWorkListAppendix, ExportPollsScores, ExportAttendance, ExportVideoStudent, ExportCourseStudentsInfo, ExportProblemset, Exportcompetitions, ExportExerciseStudentScores, getDownFile, getecyears, getec_training_objectives, getec_graduation_requirements */
|
|
|
/*! exports used: ExportAttendance, ExportCourseActScore, ExportCourseAndOther, ExportCourseInfo, ExportCourseMemberScores, ExportCourseStudentsInfo, ExportCourseTotalScore, ExportCourseWorkListScores, ExportExerciseStudentScores, ExportPollsScores, ExportProblemset, ExportVideoStudent, Exportcompetitions, exportMoocrecord, getDownFile, getec_graduation_requirements, getec_training_objectives, getecyears */function(e,t,n){"use strict";n.d(t,"d",(function(){return p})),n.d(t,"b",(function(){return m})),n.d(t,"e",(function(){return g})),n.d(t,"c",(function(){return v})),n.d(t,"n",(function(){return b})),n.d(t,"g",(function(){return y})),n.d(t,"h",(function(){return E})),n.d(t,"j",(function(){return x})),n.d(t,"a",(function(){return _})),n.d(t,"l",(function(){return k})),n.d(t,"f",(function(){return w})),n.d(t,"k",(function(){return C})),n.d(t,"m",(function(){return S})),n.d(t,"i",(function(){return O})),n.d(t,"o",(function(){return A})),n.d(t,"r",(function(){return T})),n.d(t,"q",(function(){return I})),n.d(t,"p",(function(){return D}));n(/*! antd/es/message/style */"miYZ");var r=n(/*! antd/es/message */"tsqr"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),s=n.n(o),l=n(/*! @/service/classrooms */"oUNq"),c=n(/*! umi */"9kvl"),u=n(/*! ./util */"1vsH"),d=n(/*! ./env */"m3rI"),h=function(){Object(c.c)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"正在生成文件,请稍后..."}})},f=function(){Object(c.c)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}})},p=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h(),e.next=3,Object(l.s)(Object(i.a)({},t));case 3:if(0!==e.sent.status){e.next=7;break}return e.next=7,Object(u.u)("",Object(u.W)({url:d.a.API_SERVER+"/api/courses/".concat(t.coursesId,"/export_couser_info.json"),query:t}));case 7:f();case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),m=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.q)(Object(i.a)({},t));case 2:if(0!==(n=e.sent).status){e.next=8;break}r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_member_act_score")),e.next=13;break;case 8:if(-2!==n.status){e.next=12;break}return e.abrupt("return",n);case 12:-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_member_act_score")));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),g=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.t)(Object(i.a)({},t));case 2:if(0!==(n=e.sent).status){e.next=8;break}r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_score")),e.next=13;break;case 8:if(-2!==n.status){e.next=12;break}return e.abrupt("return",n);case 12:-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_score")));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),v=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.r)(Object(i.a)({},t));case 2:if(0!==(n=e.sent).status){e.next=8;break}r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_exercise_and_other")),e.next=13;break;case 8:if(-2!==n.status){e.next=12;break}return e.abrupt("return",n);case 12:-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_exercise_and_other")));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),b=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.y)(Object(i.a)({},t));case 2:if(0!==(n=e.sent).status){e.next=8;break}r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_exercise_and_other")),e.next=13;break;case 8:if(-2!==n.status){e.next=12;break}return e.abrupt("return",n);case 12:-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_exercise_and_other")));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.u)(Object(i.a)({},t));case 2:if(0!==(n=e.sent).status){e.next=8;break}r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_homework")),e.next=13;break;case 8:if(-2!==n.status){e.next=12;break}return e.abrupt("return",n);case 12:-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_homework")));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),E=function(){var e=Object(a.a)(s.a.mark((function e(t,n){var a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.w)(Object(i.a)({},t));case 2:0===(a=e.sent).status?(r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/").concat(n))):-3===a.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/").concat(n)));case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),x=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h(),e.next=3,Object(l.z)(Object(i.a)({},t));case 3:if(0!==e.sent.status){e.next=7;break}return e.next=7,Object(u.u)("",Object(u.W)({url:d.a.API_SERVER+"/api/polls/".concat(t.categoryId,"/commit_result.xlsx"),query:t}));case 7:f();case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),_=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.W)({url:d.a.API_SERVER+"/api/courses/".concat(t.coursesId,"/attendances/export_xlsx_data.xlsx"),query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),k=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.W)({url:d.a.API_SERVER+"/api/courses/".concat(t.coursesId,"/video_study_statics.xlsx"),query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),w=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.W)({url:d.a.API_SERVER+"/api/courses/".concat(t.coursesId,"/export_course_students_info.xlsx"),query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),C=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.W)({url:d.a.API_SERVER+"/api/item_banks/export.xlsx",query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),S=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.W)({url:d.a.API_SERVER+"/api/competitions/region_reports.xlsx",query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),O=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.x)(Object(i.a)({},t));case 2:0===(n=e.sent).status?(r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/exercise_score"))):-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/exercise_score")));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),A=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("----------","调用下载"),e.next=3,Object(u.t)("",Object(u.W)({url:d.a.API_SERVER+"/api/export_records/".concat(t.id,".xlsx"),query:t}));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),T=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.W)({url:d.a.API_SERVER+"/api/ec_major_schools/0/ec_years.xlsx",query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),I=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.W)({url:d.a.API_SERVER+"/api/ec_years/".concat(null==t?void 0:t.ec_year_id,"/ec_training_objectives.xlsx"),query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),D=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.W)({url:d.a.API_SERVER+"/api/ec_years/".concat(null==t?void 0:t.ec_year_id,"/ec_graduation_requirements.xlsx"),query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},mxOx:
|
|
|
/*!*********************************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Detail/components/FaceReview/index.less?modules ***!
|
|
|
\*********************************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___1OKqY",flex_space_between:"flex_space_between___9LtA4",flex_box_vertical_center:"flex_box_vertical_center___1eoO3",flex_box_center_end:"flex_box_center_end___2z5cA",flex_box_column:"flex_box_column___EmE-R",wrap:"wrap___1KKiW",control:"control___1QLLH",btn:"btn___2uv5p",customTable:"customTable___1j8g4",bgH:"bgH___38VTN",cusModal:"cusModal___3m_hn",imgWrap:"imgWrap___1V_Vd",img:"img___3YaEG",iBtn:"iBtn___2kloF",text:"text___3R4ja",no:"no___1ION1",textP:"textP___1nOEX",video:"video___TW5nF",sys:"sys___lyOTD",li:"li___1BzVB",d1:"d1___fIaVJ",b1:"b1____gBjv",es:"es___2kUwZ"}},n1HI:
|
|
|
/*!*************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/contain/arc.js ***!
|
|
|
\*************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./util */"hX1E").normalizeRadian,i=2*Math.PI;t.containStroke=function(e,t,n,a,o,s,l,c,u){if(0===l)return!1;var d=l;c-=e,u-=t;var h=Math.sqrt(c*c+u*u);if(h-d>n||h+d<n)return!1;if(Math.abs(a-o)%i<1e-4)return!0;if(s){var f=a;a=r(o),o=r(f)}else a=r(a),o=r(o);a>o&&(o+=i);var p=Math.atan2(u,c);return p<0&&(p+=i),p>=a&&p<=o||p+i>=a&&p+i<=o}},n6Mw:
|
|
|
/*!****************************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/svg/helper/ClippathManager.js ***!
|
|
|
\****************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./Definable */"SrGk"),i=n(/*! ../../core/util */"bYtY"),a=n(/*! ../../core/matrix */"Fofx");function o(e,t){r.call(this,e,t,"clipPath","__clippath_in_use__")}i.inherits(o,r),o.prototype.update=function(e){var t=this.getSvgElement(e);t&&this.updateDom(t,e.__clipPaths,!1);var n=this.getTextSvgElement(e);n&&this.updateDom(n,e.__clipPaths,!0),this.markUsed(e)},o.prototype.updateDom=function(e,t,n){if(t&&t.length>0){var r,i,o=this.getDefs(!0),s=t[0],l=n?"_textDom":"_dom";s[l]?(i=s[l].getAttribute("id"),r=s[l],o.contains(r)||o.appendChild(r)):(i="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(r=this.createElement("clipPath")).setAttribute("id",i),o.appendChild(r),s[l]=r);var c=this.getSvgProxy(s);if(s.transform&&s.parent.invTransform&&!n){var u=Array.prototype.slice.call(s.transform);a.mul(s.transform,s.parent.invTransform,s.transform),c.brush(s),s.transform=u}else c.brush(s);var d=this.getSvgElement(s);r.innerHTML="",r.appendChild(d.cloneNode()),e.setAttribute("clip-path","url(#"+i+")"),t.length>1&&this.updateDom(r,t.slice(1),n)}else e&&e.setAttribute("clip-path","none")},o.prototype.markUsed=function(e){var t=this;e.__clipPaths&&i.each(e.__clipPaths,(function(e){e._dom&&r.prototype.markUsed.call(t,e._dom),e._textDom&&r.prototype.markUsed.call(t,e._textDom)}))};var s=o;e.exports=s},n6Qo:
|
|
|
/*!**************************************************************!*\
|
|
|
!*** ./node_modules/rc-table/es/Footer/index.js + 2 modules ***!
|
|
|
\**************************************************************/
|
|
|
/*! exports provided: default, FooterComponents */
|
|
|
/*! exports used: FooterComponents, default */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("q1tI"),i=n("biw7"),a=n("fyJ8");t.b=function(e){var t=e.children,n=r.useContext(i.a).prefixCls;return r.createElement("tfoot",{className:"".concat(n,"-summary")},t)};var o={Cell:function(e){var t=e.className,n=e.index,o=e.children,s=e.colSpan,l=e.rowSpan,c=r.useContext(i.a),u=c.prefixCls,d=c.fixedInfoList[n];return r.createElement(a.a,Object.assign({className:t,index:n,component:"td",prefixCls:u,record:null,dataIndex:null,render:function(){return{children:o,props:{colSpan:s,rowSpan:l}}}},d))},Row:function(e){return r.createElement("tr",Object.assign({},e))}}},nCxF:
|
|
|
/*!*****************************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/helper/smoothBezier.js ***!
|
|
|
\*****************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../../core/vector */"QBsz"),i=r.min,a=r.max,o=r.scale,s=r.distance,l=r.add,c=r.clone,u=r.sub;e.exports=function(e,t,n,r){var d,h,f,p,m=[],g=[],v=[],b=[];if(r){f=[1/0,1/0],p=[-1/0,-1/0];for(var y=0,E=e.length;y<E;y++)i(f,f,e[y]),a(p,p,e[y]);i(f,f,r[0]),a(p,p,r[1])}for(y=0,E=e.length;y<E;y++){var x=e[y];if(n)d=e[y?y-1:E-1],h=e[(y+1)%E];else{if(0===y||y===E-1){m.push(c(e[y]));continue}d=e[y-1],h=e[y+1]}u(g,h,d),o(g,g,t);var _=s(x,d),k=s(x,h),w=_+k;0!==w&&(_/=w,k/=w),o(v,g,-_),o(b,g,k);var C=l([],x,v),S=l([],x,b);r&&(a(C,C,f),i(C,C,p),a(S,S,f),i(S,S,p)),m.push(C),m.push(S)}return n&&m.push(m.shift()),m}},nKGa:
|
|
|
/*!*******************************************************************!*\
|
|
|
!*** ./src/assets/images/classrooms/export_exercise-template.png ***!
|
|
|
\*******************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/export_exercise-template.f7655c19.png"},nPnh:
|
|
|
/*!*********************************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/helper/subPixelOptimize.js ***!
|
|
|
\*********************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=Math.round;function r(e,t,r){if(!t)return e;var i=n(2*e);return(i+n(t))%2==0?i/2:(i+(r?1:-1))/2}t.subPixelOptimizeLine=function(e,t,i){if(t){var a=t.x1,o=t.x2,s=t.y1,l=t.y2;e.x1=a,e.x2=o,e.y1=s,e.y2=l;var c=i&&i.lineWidth;c&&(n(2*a)===n(2*o)&&(e.x1=e.x2=r(a,c,!0)),n(2*s)===n(2*l)&&(e.y1=e.y2=r(s,c,!0)))}},t.subPixelOptimizeRect=function(e,t,n){if(t){var i=t.x,a=t.y,o=t.width,s=t.height;e.x=i,e.y=a,e.width=o,e.height=s;var l=n&&n.lineWidth;l&&(e.x=r(i,l,!0),e.y=r(a,l,!0),e.width=Math.max(r(i+o,l,!1)-e.x,0===o?0:1),e.height=Math.max(r(a+s,l,!1)-e.y,0===s?0:1))}},t.subPixelOptimize=r},nVVt:
|
|
|
/*!****************************************!*\
|
|
|
!*** ./node_modules/qr.js/lib/mode.js ***!
|
|
|
\****************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}},ngQI:
|
|
|
/*!**************************************************************************************!*\
|
|
|
!*** ./node_modules/react-beautiful-dnd/dist/react-beautiful-dnd.esm.js + 4 modules ***!
|
|
|
\**************************************************************************************/
|
|
|
/*! exports provided: DragDropContext, Draggable, Droppable, resetServerContext */
|
|
|
/*! exports used: DragDropContext, Draggable, Droppable */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-dom/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-redux/es/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/redux/es/redux.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/tiny-invariant/dist/tiny-invariant.esm.js */function(e,t,n){"use strict";n.d(t,"a",(function(){return Nr})),n.d(t,"b",(function(){return gi})),n.d(t,"c",(function(){return xi}));var r=n("q1tI"),i=n.n(r),a=n("dI71"),o=n("wx14"),s=n("ANjH"),l=n("/MKj");function c(e,t){var n=Object(r.useState)((function(){return{inputs:t,result:e()}}))[0],i=Object(r.useRef)(!0),a=Object(r.useRef)(n),o=i.current||Boolean(t&&a.current.inputs&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,a.current.inputs))?a.current:{inputs:t,result:e()};return Object(r.useEffect)((function(){i.current=!1,a.current=o}),[o]),o.result}var u=c,d=function(e,t){return c((function(){return e}),t)},h=n("9R94"),f=function(e){var t=e.top,n=e.right,r=e.bottom,i=e.left;return{top:t,right:n,bottom:r,left:i,width:n-i,height:r-t,x:i,y:t,center:{x:(n+i)/2,y:(r+t)/2}}},p=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},m=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},g={top:0,right:0,bottom:0,left:0},v=function(e){var t=e.borderBox,n=e.margin,r=void 0===n?g:n,i=e.border,a=void 0===i?g:i,o=e.padding,s=void 0===o?g:o,l=f(p(t,r)),c=f(m(t,a)),u=f(m(c,s));return{marginBox:l,borderBox:f(t),paddingBox:c,contentBox:u,margin:r,border:a,padding:s}},b=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var n=Number(t);return isNaN(n)&&Object(h.a)(!1),n},y=function(e,t){var n,r,i=e.borderBox,a=e.border,o=e.margin,s=e.padding,l=(r=t,{top:(n=i).top+r.y,left:n.left+r.x,bottom:n.bottom+r.y,right:n.right+r.x});return v({borderBox:l,border:a,margin:o,padding:s})},E=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),y(e,t)},x=function(e,t){var n={top:b(t.marginTop),right:b(t.marginRight),bottom:b(t.marginBottom),left:b(t.marginLeft)},r={top:b(t.paddingTop),right:b(t.paddingRight),bottom:b(t.paddingBottom),left:b(t.paddingLeft)},i={top:b(t.borderTopWidth),right:b(t.borderRightWidth),bottom:b(t.borderBottomWidth),left:b(t.borderLeftWidth)};return v({borderBox:e,margin:n,padding:r,border:i})},_=function(e){var t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return x(t,n)},k=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function w(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],i=t[n],!(r===i||k(r)&&k(i)))return!1;var r,i;return!0}var C=function(e,t){var n;void 0===t&&(t=w);var r,i=[],a=!1;return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];return a&&n===this&&t(o,i)||(r=e.apply(this,o),a=!0,n=this,i=o),r}},S=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];t=i,n||(n=requestAnimationFrame((function(){n=null,e.apply(void 0,t)})))};return r.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},r},O=n("i8i4"),A=n.n(O);function T(e,t){}T.bind(null,"warn"),T.bind(null,"error");function I(){}function D(e,t,n){var r=t.map((function(t){var r,i,a=(r=n,i=t.options,Object(o.a)({},r,{},i));return e.addEventListener(t.eventName,t.fn,a),function(){e.removeEventListener(t.eventName,t.fn,a)}}));return function(){r.forEach((function(e){e()}))}}function L(e){this.message=e}function R(e,t){if(!e)throw new L("Invariant failed")}L.prototype.toString=function(){return this.message};var N=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).callbacks=null,t.unbind=I,t.onWindowError=function(e){var n=t.getCallbacks();n.isDragging()&&n.tryAbort(),e.error instanceof L&&e.preventDefault()},t.getCallbacks=function(){if(!t.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return t.callbacks},t.setCallbacks=function(e){t.callbacks=e},t}Object(a.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.unbind=D(window,[{eventName:"error",fn:this.onWindowError}])},n.componentWillUnmount=function(){this.unbind()},n.componentDidCatch=function(e){if(!(e instanceof L))throw e;this.setState({})},n.render=function(){return this.props.children(this.setCallbacks)},t}(i.a.Component),j=function(e){return e+1},M=function(e,t){var n=e.droppableId===t.droppableId,r=j(e.index),i=j(t.index);return n?"\n You have moved the item from position "+r+"\n to position "+i+"\n ":"\n You have moved the item from position "+r+"\n in list "+e.droppableId+"\n to list "+t.droppableId+"\n in position "+i+"\n "},P=function(e,t,n){return t.droppableId===n.droppableId?"\n The item "+e+"\n has been combined with "+n.draggableId:"\n The item "+e+"\n in list "+t.droppableId+"\n has been combined with "+n.draggableId+"\n in list "+n.droppableId+"\n "},B=function(e){return"\n The item has returned to its starting position\n of "+j(e.index)+"\n"},F="\n Press space bar to start a drag.\n When dragging you can use the arrow keys to move the item around and escape to cancel.\n Some screen readers may require you to be in focus mode or to use your pass through key\n",U=function(e){return"\n You have lifted an item in position "+j(e.source.index)+"\n"},H=function(e){var t=e.destination;if(t)return M(e.source,t);var n=e.combine;return n?P(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},z=function(e){if("CANCEL"===e.reason)return"\n Movement cancelled.\n "+B(e.source)+"\n ";var t=e.destination,n=e.combine;return t?"\n You have dropped the item.\n "+M(e.source,t)+"\n ":n?"\n You have dropped the item.\n "+P(e.draggableId,e.source,n)+"\n ":"\n The item has been dropped while not over a drop area.\n "+B(e.source)+"\n "},G={x:0,y:0},V=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},W=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},K=function(e,t){return e.x===t.x&&e.y===t.y},q=function(e){return{x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}},Y=function(e,t,n){var r;return void 0===n&&(n=0),(r={})[e]=t,r["x"===e?"y":"x"]=n,r},Q=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},J=function(e,t){return Math.min.apply(Math,t.map((function(t){return Q(e,t)})))},X=function(e){return function(t){return{x:e(t.x),y:e(t.y)}}},Z=function(e,t){return{top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}},$=function(e){return[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}]},ee=function(e,t){return t&&t.shouldClipSubject?function(e,t){var n=f({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n}(t.pageMarginBox,e):f(e)},te=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,i=e.frame,a=function(e,t,n){var r;return n&&n.increasedBy?Object(o.a)({},e,((r={})[t.end]=e[t.end]+n.increasedBy[t.line],r)):e}(function(e,t){return t?Z(e,t.scroll.diff.displacement):e}(t.marginBox,i),r,n);return{page:t,withPlaceholder:n,active:ee(a,i)}},ne=function(e,t){e.frame||R(!1);var n=e.frame,r=W(t,n.scroll.initial),i=q(r),a=Object(o.a)({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}}),s=te({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:a});return Object(o.a)({},e,{frame:a,subject:s})};function re(e){return Object.values?Object.values(e):Object.keys(e).map((function(t){return e[t]}))}function ie(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function ae(e,t){if(e.find)return e.find(t);var n=ie(e,t);return-1!==n?e[n]:void 0}function oe(e){return Array.prototype.slice.call(e)}var se=C((function(e){return e.reduce((function(e,t){return e[t.descriptor.id]=t,e}),{})})),le=C((function(e){return e.reduce((function(e,t){return e[t.descriptor.id]=t,e}),{})})),ce=C((function(e){return re(e)})),ue=C((function(e){return re(e)})),de=C((function(e,t){return ue(t).filter((function(t){return e===t.descriptor.droppableId})).sort((function(e,t){return e.descriptor.index-t.descriptor.index}))}));function he(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function fe(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var pe=C((function(e,t){return t.filter((function(t){return t.descriptor.id!==e.descriptor.id}))})),me=function(e,t){return e.descriptor.droppableId===t.descriptor.id},ge={point:G,value:0},ve={invisible:{},visible:{},all:[]},be={displaced:ve,displacedBy:ge,at:null},ye=function(e,t){return function(n){return e<=n&&n<=t}},Ee=function(e){var t=ye(e.top,e.bottom),n=ye(e.left,e.right);return function(r){if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;var i=t(r.top)||t(r.bottom),a=n(r.left)||n(r.right);if(i&&a)return!0;var o=r.top<e.top&&r.bottom>e.bottom,s=r.left<e.left&&r.right>e.right;return!(!o||!s)||(o&&a||s&&i)}},xe=function(e){var t=ye(e.top,e.bottom),n=ye(e.left,e.right);return function(e){return t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)}},_e={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},ke={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},we=function(e){var t=e.target,n=e.destination,r=e.viewport,i=e.withDroppableDisplacement,a=e.isVisibleThroughFrameFn,o=i?function(e,t){var n=t.frame?t.frame.scroll.diff.displacement:G;return Z(e,n)}(t,n):t;return function(e,t,n){return!!t.subject.active&&n(t.subject.active)(e)}(o,n,a)&&function(e,t,n){return n(t)(e)}(o,r,a)},Ce=function(e){return we(Object(o.a)({},e,{isVisibleThroughFrameFn:Ee}))},Se=function(e){return we(Object(o.a)({},e,{isVisibleThroughFrameFn:xe}))};function Oe(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,i=e.viewport,a=e.forceShouldAnimate,o=e.last;return t.reduce((function(e,t){var s=function(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return f(p(n,r))}(t,r),l=t.descriptor.id;if(e.all.push(l),!Ce({target:s,destination:n,viewport:i,withDroppableDisplacement:!0}))return e.invisible[t.descriptor.id]=!0,e;var c={draggableId:l,shouldAnimate:function(e,t,n){if("boolean"==typeof n)return n;if(!t)return!0;var r=t.invisible,i=t.visible;if(r[e])return!1;var a=i[e];return!a||a.shouldAnimate}(l,o,a)};return e.visible[l]=c,e}),{all:[],visible:{},invisible:{}})}function Ae(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,i=e.destination,a=function(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}(t,{inHomeList:n});return{displaced:ve,displacedBy:r,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:a}}}}function Te(e){var t=e.draggable,n=e.insideDestination,r=e.destination,i=e.viewport,a=e.displacedBy,o=e.last,s=e.index,l=e.forceShouldAnimate,c=me(t,r);if(null==s)return Ae({insideDestination:n,inHomeList:c,displacedBy:a,destination:r});var u=ae(n,(function(e){return e.descriptor.index===s}));if(!u)return Ae({insideDestination:n,inHomeList:c,displacedBy:a,destination:r});var d=pe(t,n),h=n.indexOf(u);return{displaced:Oe({afterDragging:d.slice(h),destination:r,displacedBy:a,last:o,viewport:i.frame,forceShouldAnimate:l}),displacedBy:a,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:s}}}}function Ie(e,t){return Boolean(t.effected[e])}var De=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,i=e.draggables,a=e.destination,o=e.insideDestination,s=e.previousImpact,l=e.viewport,c=e.afterCritical,u=s.at;if(u||R(!1),"REORDER"===u.type){var d=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,i=e.location;if(!r.length)return null;var a=i.index,o=t?a+1:a-1,s=r[0].descriptor.index,l=r[r.length-1].descriptor.index;return o<s||o>(n?l:l+1)?null:o}({isMovingForward:t,isInHomeList:n,location:u.destination,insideDestination:o});return null==d?null:Te({draggable:r,insideDestination:o,destination:a,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:d})}var h=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,i=e.combine,a=e.afterCritical;if(!n.isCombineEnabled)return null;var o=i.draggableId,s=r[o].descriptor.index;return Ie(o,a)?t?s:s-1:t?s+1:s}({isMovingForward:t,destination:a,displaced:s.displaced,draggables:i,combine:u.combine,afterCritical:c});return null==h?null:Te({draggable:r,insideDestination:o,destination:a,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:h})},Le=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,i=fe(n);i||R(!1);var a=i.draggableId,o=r[a].page.borderBox.center,s=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,i=e.displacedBy,a=Boolean(t.visible[r]||t.invisible[r]);return Ie(r,n)?a?G:q(i.point):a?i.point:G}({displaced:n.displaced,afterCritical:t,combineWith:a,displacedBy:n.displacedBy});return V(o,s)},Re=function(e,t){return t.margin[e.start]+t.borderBox[e.size]/2},Ne=function(e,t,n){return t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2},je=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return Y(t.line,n.marginBox[t.end]+Re(t,r),Ne(t,n.marginBox,r))},Me=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return Y(t.line,n.marginBox[t.start]-function(e,t){return t.margin[e.end]+t.borderBox[e.size]/2}(t,r),Ne(t,n.marginBox,r))},Pe=function(e){var t=e.impact,n=e.draggable,r=e.draggables,i=e.droppable,a=e.afterCritical,o=de(i.descriptor.id,r),s=n.page,l=i.axis;if(!o.length)return function(e){var t=e.axis,n=e.moveInto,r=e.isMoving;return Y(t.line,n.contentBox[t.start]+Re(t,r),Ne(t,n.contentBox,r))}({axis:l,moveInto:i.page,isMoving:s});var c=t.displaced,u=t.displacedBy,d=c.all[0];if(d){var h=r[d];if(Ie(d,a))return Me({axis:l,moveRelativeTo:h.page,isMoving:s});var f=y(h.page,u.point);return Me({axis:l,moveRelativeTo:f,isMoving:s})}var p=o[o.length-1];if(p.descriptor.id===n.descriptor.id)return s.borderBox.center;if(Ie(p.descriptor.id,a)){var m=y(p.page,q(a.displacedBy.point));return je({axis:l,moveRelativeTo:m,isMoving:s})}return je({axis:l,moveRelativeTo:p.page,isMoving:s})},Be=function(e,t){var n=e.frame;return n?V(t,n.scroll.diff.displacement):t},Fe=function(e){var t=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,a=e.afterCritical,o=n.page.borderBox.center,s=t.at;return r&&s?"REORDER"===s.type?Pe({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:a}):Le({impact:t,draggables:i,afterCritical:a}):o}(e),n=e.droppable;return n?Be(n,t):t},Ue=function(e,t){var n=W(t,e.scroll.initial),r=q(n);return{frame:f({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function He(e,t){return e.map((function(e){return t[e]}))}var ze=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,r=function(e,t){return V(e.scroll.diff.displacement,t)}(e.viewport,t),i=W(r,n.page.borderBox.center);return V(n.client.borderBox.center,i)},Ge=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,i=e.viewport,a=e.withDroppableDisplacement,s=e.onlyOnMainAxis,l=void 0!==s&&s,c=W(r,t.page.borderBox.center),u={target:Z(t.page.borderBox,c),destination:n,withDroppableDisplacement:a,viewport:i};return l?function(e){return we(Object(o.a)({},e,{isVisibleThroughFrameFn:(t=e.destination.axis,function(e){var n=ye(e.top,e.bottom),r=ye(e.left,e.right);return function(e){return t===_e?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)}})}));var t}(u):Se(u)},Ve=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,i=e.draggables,a=e.previousImpact,s=e.viewport,l=e.previousPageBorderBoxCenter,c=e.previousClientSelection,u=e.afterCritical;if(!r.isEnabled)return null;var d=de(r.descriptor.id,i),h=me(n,r),f=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,i=e.insideDestination,a=e.previousImpact;if(!r.isCombineEnabled)return null;if(!he(a))return null;function s(e){var t={type:"COMBINE",combine:{draggableId:e,droppableId:r.descriptor.id}};return Object(o.a)({},a,{at:t})}var l=a.displaced.all,c=l.length?l[0]:null;if(t)return c?s(c):null;var u=pe(n,i);if(!c)return u.length?s(u[u.length-1].descriptor.id):null;var d=ie(u,(function(e){return e.descriptor.id===c}));-1===d&&R(!1);var h=d-1;return h<0?null:s(u[h].descriptor.id)}({isMovingForward:t,draggable:n,destination:r,insideDestination:d,previousImpact:a})||De({isMovingForward:t,isInHomeList:h,draggable:n,draggables:i,destination:r,insideDestination:d,previousImpact:a,viewport:s,afterCritical:u});if(!f)return null;var p=Fe({impact:f,draggable:n,droppable:r,draggables:i,afterCritical:u});if(Ge({draggable:n,destination:r,newPageBorderBoxCenter:p,viewport:s.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:ze({pageBorderBoxCenter:p,draggable:n,viewport:s}),impact:f,scrollJumpRequest:null};var m=W(p,l);return{clientSelection:c,impact:function(e){var t=e.impact,n=e.viewport,r=e.destination,i=e.draggables,a=e.maxScrollChange,s=Ue(n,V(n.scroll.current,a)),l=r.frame?ne(r,V(r.frame.scroll.current,a)):r,c=t.displaced,u=Oe({afterDragging:He(c.all,i),destination:r,displacedBy:t.displacedBy,viewport:s.frame,last:c,forceShouldAnimate:!1}),d=Oe({afterDragging:He(c.all,i),destination:l,displacedBy:t.displacedBy,viewport:n.frame,last:c,forceShouldAnimate:!1}),h={},f={},p=[c,u,d];return c.all.forEach((function(e){var t=function(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}(e,p);t?f[e]=t:h[e]=!0})),Object(o.a)({},t,{displaced:{all:c.all,invisible:h,visible:f}})}({impact:f,viewport:s,destination:r,draggables:i,maxScrollChange:m}),scrollJumpRequest:m}},We=function(e){var t=e.subject.active;return t||R(!1),t},Ke=function(e,t){var n=e.page.borderBox.center;return Ie(e.descriptor.id,t)?W(n,t.displacedBy.point):n},qe=function(e,t){var n=e.page.borderBox;return Ie(e.descriptor.id,t)?Z(n,q(t.displacedBy.point)):n},Ye=C((function(e,t){var n=t[e.line];return{value:n,point:Y(e.line,n)}})),Qe=function(e,t){return Object(o.a)({},e,{scroll:Object(o.a)({},e.scroll,{max:t})})},Je=function(e,t,n){var r=e.frame;me(t,e)&&R(!1),e.subject.withPlaceholder&&R(!1);var i=Ye(e.axis,t.displaceBy).point,a=function(e,t,n){var r=e.axis;if("virtual"===e.descriptor.mode)return Y(r.line,t[r.line]);var i=e.subject.page.contentBox[r.size],a=de(e.descriptor.id,n).reduce((function(e,t){return e+t.client.marginBox[r.size]}),0)+t[r.line]-i;return a<=0?null:Y(r.line,a)}(e,i,n),s={placeholderSize:i,increasedBy:a,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){var l=te({page:e.subject.page,withPlaceholder:s,axis:e.axis,frame:e.frame});return Object(o.a)({},e,{subject:l})}var c=a?V(r.scroll.max,a):r.scroll.max,u=Qe(r,c),d=te({page:e.subject.page,withPlaceholder:s,axis:e.axis,frame:u});return Object(o.a)({},e,{subject:d,frame:u})},Xe=function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,i=e.isOver,a=e.draggables,o=e.droppables,s=e.viewport,l=e.afterCritical,c=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,r=e.source,i=e.droppables,a=e.viewport,o=r.subject.active;if(!o)return null;var s=r.axis,l=ye(o[s.start],o[s.end]),c=ce(i).filter((function(e){return e!==r})).filter((function(e){return e.isEnabled})).filter((function(e){return Boolean(e.subject.active)})).filter((function(e){return Ee(a.frame)(We(e))})).filter((function(e){var n=We(e);return t?o[s.crossAxisEnd]<n[s.crossAxisEnd]:n[s.crossAxisStart]<o[s.crossAxisStart]})).filter((function(e){var t=We(e),n=ye(t[s.start],t[s.end]);return l(t[s.start])||l(t[s.end])||n(o[s.start])||n(o[s.end])})).sort((function(e,n){var r=We(e)[s.crossAxisStart],i=We(n)[s.crossAxisStart];return t?r-i:i-r})).filter((function(e,t,n){return We(e)[s.crossAxisStart]===We(n[0])[s.crossAxisStart]}));if(!c.length)return null;if(1===c.length)return c[0];var u=c.filter((function(e){return ye(We(e)[s.start],We(e)[s.end])(n[s.line])}));return 1===u.length?u[0]:u.length>1?u.sort((function(e,t){return We(e)[s.start]-We(t)[s.start]}))[0]:c.sort((function(e,t){var r=J(n,$(We(e))),i=J(n,$(We(t)));return r!==i?r-i:We(e)[s.start]-We(t)[s.start]}))[0]}({isMovingForward:t,pageBorderBoxCenter:n,source:i,droppables:o,viewport:s});if(!c)return null;var u=de(c.descriptor.id,a),d=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,r=e.insideDestination,i=e.draggable,a=e.draggables,o=e.destination,s=e.viewport,l=e.afterCritical;if(!n){if(r.length)return null;var c={displaced:ve,displacedBy:ge,at:{type:"REORDER",destination:{droppableId:o.descriptor.id,index:0}}},u=Fe({impact:c,draggable:i,droppable:o,draggables:a,afterCritical:l}),d=me(i,o)?o:Je(o,i,a);return Ge({draggable:i,destination:d,newPageBorderBoxCenter:u,viewport:s.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?c:null}var h,f=Boolean(t[o.axis.line]<=n.page.borderBox.center[o.axis.line]),p=(h=n.descriptor.index,n.descriptor.id===i.descriptor.id||f?h:h+1),m=Ye(o.axis,i.displaceBy);return Te({draggable:i,insideDestination:r,destination:o,viewport:s,displacedBy:m,last:ve,index:p})}({previousPageBorderBoxCenter:n,destination:c,draggable:r,draggables:a,moveRelativeTo:function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,i=e.insideDestination,a=e.afterCritical;return i.filter((function(e){return Se({target:qe(e,a),destination:r,viewport:n.frame,withDroppableDisplacement:!0})})).sort((function(e,n){var i=Q(t,Be(r,Ke(e,a))),o=Q(t,Be(r,Ke(n,a)));return i<o?-1:o<i?1:e.descriptor.index-n.descriptor.index}))[0]||null}({pageBorderBoxCenter:n,viewport:s,destination:c,insideDestination:u,afterCritical:l}),insideDestination:u,viewport:s,afterCritical:l});if(!d)return null;var h=Fe({impact:d,draggable:r,droppable:c,draggables:a,afterCritical:l});return{clientSelection:ze({pageBorderBoxCenter:h,draggable:r,viewport:s}),impact:d,scrollJumpRequest:null}},Ze=function(e){var t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null},$e=function(e){var t=e.state,n=e.type,r=function(e,t){var n=Ze(e);return n?t[n]:null}(t.impact,t.dimensions.droppables),i=Boolean(r),a=t.dimensions.droppables[t.critical.droppable.id],o=r||a,s=o.axis.direction,l="vertical"===s&&("MOVE_UP"===n||"MOVE_DOWN"===n)||"horizontal"===s&&("MOVE_LEFT"===n||"MOVE_RIGHT"===n);if(l&&!i)return null;var c="MOVE_DOWN"===n||"MOVE_RIGHT"===n,u=t.dimensions.draggables[t.critical.draggable.id],d=t.current.page.borderBoxCenter,h=t.dimensions,f=h.draggables,p=h.droppables;return l?Ve({isMovingForward:c,previousPageBorderBoxCenter:d,draggable:u,destination:o,draggables:f,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):Xe({isMovingForward:c,previousPageBorderBoxCenter:d,draggable:u,isOver:o,draggables:f,droppables:p,viewport:t.viewport,afterCritical:t.afterCritical})};function et(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function tt(e){var t=ye(e.top,e.bottom),n=ye(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}function nt(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,i=ce(r).filter((function(e){if(!e.isEnabled)return!1;var n,r,i=e.subject.active;if(!i)return!1;if(r=i,!((n=t).left<r.right&&n.right>r.left&&n.top<r.bottom&&n.bottom>r.top))return!1;if(tt(i)(t.center))return!0;var a=e.axis,o=i.center[a.crossAxisLine],s=t[a.crossAxisStart],l=t[a.crossAxisEnd],c=ye(i[a.crossAxisStart],i[a.crossAxisEnd]),u=c(s),d=c(l);return!u&&!d||(u?s<o:l>o)}));return i.length?1===i.length?i[0].descriptor.id:function(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,i=n.page.borderBox.center,a=r.map((function(e){var n=e.axis,r=Y(e.axis.line,t.center[n.line],e.page.borderBox.center[n.crossAxisLine]);return{id:e.descriptor.id,distance:Q(i,r)}})).sort((function(e,t){return t.distance-e.distance}));return a[0]?a[0].id:null}({pageBorderBox:t,draggable:n,candidates:i}):null}var rt=function(e,t){return f(Z(e,t))};function it(e){var t=e.displaced,n=e.id;return Boolean(t.visible[n]||t.invisible[n])}var at=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,i=e.droppables,a=e.previousImpact,o=e.viewport,s=e.afterCritical,l=rt(n.page.borderBox,t),c=nt({pageBorderBox:l,draggable:n,droppables:i});if(!c)return be;var u,d,h=i[c],f=de(h.descriptor.id,r),p=(u=l,(d=h.frame)?rt(u,d.scroll.diff.value):u);return function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,i=e.destination,a=e.insideDestination,o=e.afterCritical;if(!i.isCombineEnabled)return null;var s=i.axis,l=Ye(i.axis,t.displaceBy),c=l.value,u=n[s.start],d=n[s.end],h=ae(pe(t,a),(function(e){var t=e.descriptor.id,n=e.page.borderBox,i=n[s.size]/4,a=Ie(t,o),l=it({displaced:r.displaced,id:t});return a?l?d>n[s.start]+i&&d<n[s.end]-i:u>n[s.start]-c+i&&u<n[s.end]-c-i:l?d>n[s.start]+c+i&&d<n[s.end]+c-i:u>n[s.start]+i&&u<n[s.end]-i}));return h?{displacedBy:l,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:h.descriptor.id,droppableId:i.descriptor.id}}}:null}({pageBorderBoxWithDroppableScroll:p,draggable:n,previousImpact:a,destination:h,insideDestination:f,afterCritical:s})||function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,i=e.insideDestination,a=e.last,o=e.viewport,s=e.afterCritical,l=r.axis,c=Ye(r.axis,n.displaceBy),u=c.value,d=t[l.start],h=t[l.end],f=function(e){var t=e.draggable,n=e.closest,r=e.inHomeList;return n?r&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}({draggable:n,closest:ae(pe(n,i),(function(e){var t=e.descriptor.id,n=e.page.borderBox.center[l.line],r=Ie(t,s),i=it({displaced:a,id:t});return r?i?h<=n:d<n-u:i?h<=n+u:d<n})),inHomeList:me(n,r)});return Te({draggable:n,insideDestination:i,destination:r,viewport:o,last:a,displacedBy:c,index:f})}({pageBorderBoxWithDroppableScroll:p,draggable:n,destination:h,insideDestination:f,last:a.displaced,viewport:o,afterCritical:s})},ot=function(e,t){var n;return Object(o.a)({},e,((n={})[t.descriptor.id]=t,n))},st=function(e){var t=e.previousImpact,n=e.impact,r=e.droppables,i=Ze(t),a=Ze(n);if(!i)return r;if(i===a)return r;var s=r[i];if(!s.subject.withPlaceholder)return r;var l=function(e){var t=e.subject.withPlaceholder;t||R(!1);var n=e.frame;if(!n){var r=te({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return Object(o.a)({},e,{subject:r})}var i=t.oldFrameMaxScroll;i||R(!1);var a=Qe(n,i),s=te({page:e.subject.page,axis:e.axis,frame:a,withPlaceholder:null});return Object(o.a)({},e,{subject:s,frame:a})}(s);return ot(r,l)},lt=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,i=e.viewport,a=e.impact,s=e.scrollJumpRequest,l=i||t.viewport,c=r||t.dimensions,u=n||t.current.client.selection,d=W(u,t.initial.client.selection),h={offset:d,selection:u,borderBoxCenter:V(t.initial.client.borderBoxCenter,d)},f={selection:V(h.selection,l.scroll.current),borderBoxCenter:V(h.borderBoxCenter,l.scroll.current),offset:V(h.offset,l.scroll.diff.value)},p={client:h,page:f};if("COLLECTING"===t.phase)return Object(o.a)({phase:"COLLECTING"},t,{dimensions:c,viewport:l,current:p});var m=c.draggables[t.critical.draggable.id],g=a||at({pageOffset:f.offset,draggable:m,draggables:c.draggables,droppables:c.droppables,previousImpact:t.impact,viewport:l,afterCritical:t.afterCritical}),v=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,i=e.previousImpact,a=e.impact,o=st({previousImpact:i,impact:a,droppables:r}),s=Ze(a);if(!s)return o;var l=r[s];if(me(t,l))return o;if(l.subject.withPlaceholder)return o;var c=Je(l,t,n);return ot(o,c)}({draggable:m,impact:g,previousImpact:t.impact,draggables:c.draggables,droppables:c.droppables});return Object(o.a)({},t,{current:p,dimensions:{draggables:c.draggables,droppables:v},impact:g,viewport:l,scrollJumpRequest:s||null,forceShouldAnimate:!s&&null})};var ct=function(e){var t=e.impact,n=e.viewport,r=e.draggables,i=e.destination,a=e.forceShouldAnimate,s=t.displaced,l=Oe({afterDragging:function(e,t){return e.map((function(e){return t[e]}))}(s.all,r),destination:i,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:a,last:s});return Object(o.a)({},t,{displaced:l})},ut=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,a=e.viewport,o=e.afterCritical,s=Fe({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:o});return ze({pageBorderBoxCenter:s,draggable:n,viewport:a})},dt=function(e){var t=e.state,n=e.dimensions,r=e.viewport;"SNAP"!==t.movementMode&&R(!1);var i=t.impact,a=r||t.viewport,o=n||t.dimensions,s=o.draggables,l=o.droppables,c=s[t.critical.draggable.id],u=Ze(i);u||R(!1);var d=l[u],h=ct({impact:i,viewport:a,destination:d,draggables:s}),f=ut({impact:h,draggable:c,droppable:d,draggables:s,viewport:a,afterCritical:t.afterCritical});return lt({impact:h,clientSelection:f,state:t,dimensions:o,viewport:a})},ht=function(e){var t=e.draggable,n=e.home,r=e.draggables,i=e.viewport,a=Ye(n.axis,t.displaceBy),o=de(n.descriptor.id,r),s=o.indexOf(t);-1===s&&R(!1);var l,c=o.slice(s+1),u=c.reduce((function(e,t){return e[t.descriptor.id]=!0,e}),{}),d={inVirtualList:"virtual"===n.descriptor.mode,displacedBy:a,effected:u};return{impact:{displaced:Oe({afterDragging:c,destination:n,displacedBy:a,last:null,viewport:i.frame,forceShouldAnimate:!1}),displacedBy:a,at:{type:"REORDER",destination:(l=t.descriptor,{index:l.index,droppableId:l.droppableId})}},afterCritical:d}},ft=function(e){0},pt=function(e){0},mt=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,i=r.scroll.diff.value;return t.map((function(e){var t=e.descriptor.droppableId,a=function(e){var t=e.frame;return t||R(!1),t}(n[t]).scroll.diff.value;return function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,i=y(t.client,n),a=E(i,r);return Object(o.a)({},t,{placeholder:Object(o.a)({},t.placeholder,{client:i}),client:i,page:a})}({draggable:e,offset:V(i,a),initialWindowScroll:r.scroll.initial})}))},gt=function(e){return"SNAP"===e.movementMode},vt=function(e,t,n){var r=function(e,t){return{draggables:e.draggables,droppables:ot(e.droppables,t)}}(e.dimensions,t);return!gt(e)||n?lt({state:e,dimensions:r}):dt({state:e,dimensions:r})};function bt(e){return e.isDragging&&"SNAP"===e.movementMode?Object(o.a)({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var yt={phase:"IDLE",completed:null,shouldFlush:!1},Et=function(e,t){if(void 0===e&&(e=yt),"FLUSH"===t.type)return Object(o.a)({},yt,{shouldFlush:!0});if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&R(!1);var n=t.payload,r=n.critical,i=n.clientSelection,a=n.viewport,s=n.dimensions,l=n.movementMode,c=s.draggables[r.draggable.id],u=s.droppables[r.droppable.id],d={selection:i,borderBoxCenter:c.client.borderBox.center,offset:G},h={client:d,page:{selection:V(d.selection,a.scroll.initial),borderBoxCenter:V(d.selection,a.scroll.initial),offset:V(d.selection,a.scroll.diff.value)}},f=ce(s.droppables).every((function(e){return!e.isFixedOnPage})),p=ht({draggable:c,home:u,draggables:s.draggables,viewport:a}),m=p.impact;return{phase:"DRAGGING",isDragging:!0,critical:r,movementMode:l,dimensions:s,initial:h,current:h,isWindowScrollAllowed:f,impact:m,afterCritical:p.afterCritical,onLiftImpact:m,viewport:a,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type)return"COLLECTING"===e.phase||"DROP_PENDING"===e.phase?e:("DRAGGING"!==e.phase&&R(!1),Object(o.a)({phase:"COLLECTING"},e,{phase:"COLLECTING"}));if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&R(!1),function(e){var t=e.state,n=e.published;ft();var r=n.modified.map((function(e){var n=t.dimensions.droppables[e.droppableId];return ne(n,e.scroll)})),i=Object(o.a)({},t.dimensions.droppables,{},se(r)),a=le(mt({additions:n.additions,updatedDroppables:i,viewport:t.viewport})),s=Object(o.a)({},t.dimensions.draggables,{},a);n.removals.forEach((function(e){delete s[e]}));var l={droppables:i,draggables:s},c=Ze(t.impact),u=c?l.droppables[c]:null,d=l.draggables[t.critical.draggable.id],h=l.droppables[t.critical.droppable.id],f=ht({draggable:d,home:h,draggables:s,viewport:t.viewport}),p=f.impact,m=f.afterCritical,g=u&&u.isCombineEnabled?t.impact:p,v=at({pageOffset:t.current.page.offset,draggable:l.draggables[t.critical.draggable.id],draggables:l.draggables,droppables:l.droppables,previousImpact:g,viewport:t.viewport,afterCritical:m});pt();var b=Object(o.a)({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:v,onLiftImpact:p,dimensions:l,afterCritical:m,forceShouldAnimate:!1});return"COLLECTING"===t.phase?b:Object(o.a)({phase:"DROP_PENDING"},b,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1})}({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;et(e)||R(!1);var g=t.payload.client;return K(g,e.current.client.selection)?e:lt({state:e,clientSelection:g,impact:gt(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return bt(e);if("COLLECTING"===e.phase)return bt(e);et(e)||R(!1);var v=t.payload,b=v.id,y=v.newScroll,E=e.dimensions.droppables[b];if(!E)return e;var x=ne(E,y);return vt(e,x,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;et(e)||R(!1);var _=t.payload,k=_.id,w=_.isEnabled,C=e.dimensions.droppables[k];C||R(!1),C.isEnabled===w&&R(!1);var S=Object(o.a)({},C,{isEnabled:w});return vt(e,S,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;et(e)||R(!1);var O=t.payload,A=O.id,T=O.isCombineEnabled,I=e.dimensions.droppables[A];I||R(!1),I.isCombineEnabled===T&&R(!1);var D=Object(o.a)({},I,{isCombineEnabled:T});return vt(e,D,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;et(e)||R(!1),e.isWindowScrollAllowed||R(!1);var L=t.payload.newScroll;if(K(e.viewport.scroll.current,L))return bt(e);var N=Ue(e.viewport,L);return gt(e)?dt({state:e,viewport:N}):lt({state:e,viewport:N})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!et(e))return e;var j=t.payload.maxScroll;if(K(j,e.viewport.scroll.max))return e;var M=Object(o.a)({},e.viewport,{scroll:Object(o.a)({},e.viewport.scroll,{max:j})});return Object(o.a)({phase:"DRAGGING"},e,{viewport:M})}if("MOVE_UP"===t.type||"MOVE_DOWN"===t.type||"MOVE_LEFT"===t.type||"MOVE_RIGHT"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&R(!1);var P=$e({state:e,type:t.type});return P?lt({state:e,impact:P.impact,clientSelection:P.clientSelection,scrollJumpRequest:P.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){var B=t.payload.reason;return"COLLECTING"!==e.phase&&R(!1),Object(o.a)({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:B})}if("DROP_ANIMATE"===t.type){var F=t.payload,U=F.completed,H=F.dropDuration,z=F.newHomeClientOffset;return"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&R(!1),{phase:"DROP_ANIMATING",completed:U,dropDuration:H,newHomeClientOffset:z,dimensions:e.dimensions}}return"DROP_COMPLETE"===t.type?{phase:"IDLE",completed:t.payload.completed,shouldFlush:!1}:e},xt=function(e){return{type:"PUBLISH_WHILE_DRAGGING",payload:e}},_t=function(){return{type:"COLLECTION_STARTING",payload:null}},kt=function(e){return{type:"UPDATE_DROPPABLE_SCROLL",payload:e}},wt=function(e){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}},Ct=function(e){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}},St=function(e){return{type:"MOVE",payload:e}},Ot=function(){return{type:"MOVE_UP",payload:null}},At=function(){return{type:"MOVE_DOWN",payload:null}},Tt=function(){return{type:"MOVE_RIGHT",payload:null}},It=function(){return{type:"MOVE_LEFT",payload:null}},Dt=function(e){return{type:"DROP_COMPLETE",payload:e}},Lt=function(e){return{type:"DROP",payload:e}},Rt=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}};var Nt="cubic-bezier(.2,1,.1,1)",jt={drop:0,combining:.7},Mt={drop:.75},Pt=.2+"s "+"cubic-bezier(0.2, 0, 0, 1)",Bt={fluid:"opacity "+Pt,snap:"transform "+Pt+", opacity "+Pt,drop:function(e){var t=e+"s "+Nt;return"transform "+t+", opacity "+t},outOfTheWay:"transform "+Pt,placeholder:"height "+Pt+", width "+Pt+", margin "+Pt},Ft=function(e){return K(e,G)?null:"translate("+e.x+"px, "+e.y+"px)"},Ut=Ft,Ht=function(e,t){var n=Ft(e);return n?t?n+" scale("+Mt.drop+")":n:null},zt=.33,Gt=.55,Vt=Gt-zt,Wt=function(e){var t=e.getState,n=e.dispatch;return function(e){return function(r){if("DROP"===r.type){var i=t(),a=r.payload.reason;if("COLLECTING"!==i.phase){if("IDLE"!==i.phase){"DROP_PENDING"===i.phase&&i.isWaiting&&R(!1),"DRAGGING"!==i.phase&&"DROP_PENDING"!==i.phase&&R(!1);var s=i.critical,l=i.dimensions,c=l.draggables[i.critical.draggable.id],u=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,i=e.home,a=e.viewport,s=e.onLiftImpact;return r.at&&"DROP"===n?"REORDER"===r.at.type?{impact:r,didDropInsideDroppable:!0}:{impact:Object(o.a)({},r,{displaced:ve}),didDropInsideDroppable:!0}:{impact:ct({draggables:t,impact:s,destination:i,viewport:a,forceShouldAnimate:!0}),didDropInsideDroppable:!1}}({reason:a,lastImpact:i.impact,afterCritical:i.afterCritical,onLiftImpact:i.onLiftImpact,home:i.dimensions.droppables[i.critical.droppable.id],viewport:i.viewport,draggables:i.dimensions.draggables}),d=u.impact,h=u.didDropInsideDroppable,f=h?he(d):null,p=h?fe(d):null,m={index:s.draggable.index,droppableId:s.droppable.id},g={draggableId:c.descriptor.id,type:c.descriptor.type,source:m,reason:a,mode:i.movementMode,destination:f,combine:p},v=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,i=e.viewport,a=e.afterCritical,o=r.draggables,s=r.droppables,l=Ze(t),c=l?s[l]:null,u=s[n.descriptor.droppableId],d=ut({impact:t,draggable:n,draggables:o,afterCritical:a,droppable:c||u,viewport:i});return W(d,n.client.borderBox.center)}({impact:d,draggable:c,dimensions:l,viewport:i.viewport,afterCritical:i.afterCritical}),b={critical:i.critical,afterCritical:i.afterCritical,result:g,impact:d};if(!K(i.current.client.offset,v)||Boolean(g.combine)){var y=function(e){var t=e.current,n=e.destination,r=e.reason,i=Q(t,n);if(i<=0)return zt;if(i>=1500)return Gt;var a=zt+Vt*(i/1500);return Number(("CANCEL"===r?.6*a:a).toFixed(2))}({current:i.current.client.offset,destination:v,reason:a});n(function(e){return{type:"DROP_ANIMATE",payload:e}}({newHomeClientOffset:v,dropDuration:y,completed:b}))}else n(Dt({completed:b}))}}else n(function(e){return{type:"DROP_PENDING",payload:e}}({reason:a}))}else e(r)}}},Kt=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function qt(e){var t=e.onWindowScroll;var n,r=S((function(){t(Kt())})),i=(n=r,{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(e){e.target!==window&&e.target!==window.document||n()}}),a=I;function o(){return a!==I}return{start:function(){o()&&R(!1),a=D(window,[i])},stop:function(){o()||R(!1),r.cancel(),a(),a=I},isActive:o}}var Yt=function(e){var t=qt({onWindowScroll:function(t){e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return function(e){return function(n){t.isActive()||"INITIAL_PUBLISH"!==n.type||t.start(),t.isActive()&&function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(n)&&t.stop(),e(n)}}},Qt=function(){var e=[];return{add:function(t){var n=setTimeout((function(){return function(t){var n=ie(e,(function(e){return e.timerId===t}));-1===n&&R(!1),e.splice(n,1)[0].callback()}(n)})),r={timerId:n,callback:t};e.push(r)},flush:function(){if(e.length){var t=[].concat(e);e.length=0,t.forEach((function(e){clearTimeout(e.timerId),e.callback()}))}}}},Jt=function(e,t){ft(),t(),pt()},Xt=function(e,t){return{draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t}},Zt=function(e,t,n,r){if(e){var i=function(e){var t=!1,n=!1,r=setTimeout((function(){n=!0})),i=function(i){t||n||(t=!0,e(i),clearTimeout(r))};return i.wasCalled=function(){return t},i}(n);e(t,{announce:i}),i.wasCalled()||n(r(t))}else n(r(t))},$t=function(e,t){var n=function(e,t){var n=Qt(),r=null,i=function(n){r||R(!1),r=null,Jt(0,(function(){return Zt(e().onDragEnd,n,t,z)}))};return{beforeCapture:function(t,n){r&&R(!1),Jt(0,(function(){var r=e().onBeforeCapture;r&&r({draggableId:t,mode:n})}))},beforeStart:function(t,n){r&&R(!1),Jt(0,(function(){var r=e().onBeforeDragStart;r&&r(Xt(t,n))}))},start:function(i,a){r&&R(!1);var o=Xt(i,a);r={mode:a,lastCritical:i,lastLocation:o.source,lastCombine:null},n.add((function(){Jt(0,(function(){return Zt(e().onDragStart,o,t,U)}))}))},update:function(i,a){var s=he(a),l=fe(a);r||R(!1);var c=!function(e,t){if(e===t)return!0;var n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r}(i,r.lastCritical);c&&(r.lastCritical=i);var u,d,h=(u=r.lastLocation,d=s,!(null==u&&null==d||null!=u&&null!=d&&u.droppableId===d.droppableId&&u.index===d.index));h&&(r.lastLocation=s);var f=!function(e,t){return null==e&&null==t||null!=e&&null!=t&&(e.draggableId===t.draggableId&&e.droppableId===t.droppableId)}(r.lastCombine,l);if(f&&(r.lastCombine=l),c||h||f){var p=Object(o.a)({},Xt(i,r.mode),{combine:l,destination:s});n.add((function(){Jt(0,(function(){return Zt(e().onDragUpdate,p,t,H)}))}))}},flush:function(){r||R(!1),n.flush()},drop:i,abort:function(){if(r){var e=Object(o.a)({},Xt(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});i(e)}}}}(e,t);return function(e){return function(t){return function(r){if("BEFORE_INITIAL_CAPTURE"!==r.type){if("INITIAL_PUBLISH"===r.type){var i=r.payload.critical;return n.beforeStart(i,r.payload.movementMode),t(r),void n.start(i,r.payload.movementMode)}if("DROP_COMPLETE"===r.type){var a=r.payload.completed.result;return n.flush(),t(r),void n.drop(a)}if(t(r),"FLUSH"!==r.type){var o=e.getState();"DRAGGING"===o.phase&&n.update(o.critical,o.impact)}else n.abort()}else n.beforeCapture(r.payload.draggableId,r.payload.movementMode)}}}},en=function(e){return function(t){return function(n){if("DROP_ANIMATION_FINISHED"===n.type){var r=e.getState();"DROP_ANIMATING"!==r.phase&&R(!1),e.dispatch(Dt({completed:r.completed}))}else t(n)}}},tn=function(e){var t=null,n=null;return function(r){return function(i){if("FLUSH"!==i.type&&"DROP_COMPLETE"!==i.type&&"DROP_ANIMATION_FINISHED"!==i.type||(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(i),"DROP_ANIMATE"===i.type){var a={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};n=requestAnimationFrame((function(){n=null,t=D(window,[a])}))}}}},nn=function(e){return function(t){return function(n){if(t(n),"PUBLISH_WHILE_DRAGGING"===n.type){var r=e.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||e.dispatch(Lt({reason:r.reason})))}}}},rn=s.d,an=function(e){var t,n=e.dimensionMarshal,r=e.focusMarshal,i=e.styleMarshal,a=e.getResponders,o=e.announce,l=e.autoScroller;return Object(s.e)(Et,rn(Object(s.a)((t=i,function(){return function(e){return function(n){"INITIAL_PUBLISH"===n.type&&t.dragging(),"DROP_ANIMATE"===n.type&&t.dropping(n.payload.completed.result.reason),"FLUSH"!==n.type&&"DROP_COMPLETE"!==n.type||t.resting(),e(n)}}}),function(e){return function(){return function(t){return function(n){"DROP_COMPLETE"!==n.type&&"FLUSH"!==n.type&&"DROP_ANIMATE"!==n.type||e.stopPublishing(),t(n)}}}}(n),function(e){return function(t){var n=t.getState,r=t.dispatch;return function(t){return function(i){if("LIFT"===i.type){var a=i.payload,o=a.id,s=a.clientSelection,l=a.movementMode,c=n();"DROP_ANIMATING"===c.phase&&r(Dt({completed:c.completed})),"IDLE"!==n().phase&&R(!1),r({type:"FLUSH",payload:null}),r({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:o,movementMode:l}});var u={draggableId:o,scrollOptions:{shouldPublishImmediately:"SNAP"===l}},d=e.startPublishing(u),h=d.critical,f=d.dimensions,p=d.viewport;r(function(e){return{type:"INITIAL_PUBLISH",payload:e}}({critical:h,dimensions:f,clientSelection:s,movementMode:l,viewport:p}))}else t(i)}}}}(n),Wt,en,tn,nn,function(e){return function(t){return function(n){return function(r){if(function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(r))return e.stop(),void n(r);if("INITIAL_PUBLISH"===r.type){n(r);var i=t.getState();return"DRAGGING"!==i.phase&&R(!1),void e.start(i)}n(r),e.scroll(t.getState())}}}}(l),Yt,function(e){var t=!1;return function(){return function(n){return function(r){if("INITIAL_PUBLISH"===r.type)return t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),void e.tryRestoreFocusRecorded();if(n(r),t){if("FLUSH"===r.type)return t=!1,void e.tryRestoreFocusRecorded();if("DROP_COMPLETE"===r.type){t=!1;var i=r.payload.completed.result;i.combine&&e.tryShiftRecord(i.draggableId,i.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}}(r),$t(a,o))))};var on=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,i=e.width,a=W({x:n,y:t},{x:i,y:r});return{x:Math.max(0,a.x),y:Math.max(0,a.y)}},sn=function(){var e=document.documentElement;return e||R(!1),e},ln=function(){var e=sn();return on({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},cn=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry;ft();var i,a,o,s,l,c,u,d=(i=Kt(),a=ln(),o=i.y,s=i.x,l=sn(),c=l.clientWidth,u=l.clientHeight,{frame:f({top:o,left:s,right:s+c,bottom:o+u}),scroll:{initial:i,current:i,max:a,diff:{value:G,displacement:G}}}),h=d.scroll.current,p=t.droppable,m=r.droppable.getAllByType(p.type).map((function(e){return e.callbacks.getDimensionAndWatchScroll(h,n)})),g=r.draggable.getAllByType(t.draggable.type).map((function(e){return e.getDimension(h)})),v={draggables:le(g),droppables:se(m)};return pt(),{dimensions:v,critical:t,viewport:d}};function un(e,t,n){return n.descriptor.id!==t.id&&(n.descriptor.type===t.type&&"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode)}var dn,hn,fn=function(e,t){var n=null,r=function(e){var t=e.registry,n=e.callbacks,r={additions:{},removals:{},modified:{}},i=null,a=function(){i||(n.collectionStarting(),i=requestAnimationFrame((function(){i=null,ft();var e=r,a=e.additions,o=e.removals,s=e.modified,l=Object.keys(a).map((function(e){return t.draggable.getById(e).getDimension(G)})).sort((function(e,t){return e.descriptor.index-t.descriptor.index})),c=Object.keys(s).map((function(e){return{droppableId:e,scroll:t.droppable.getById(e).callbacks.getScrollWhileDragging()}})),u={additions:l,removals:Object.keys(o),modified:c};r={additions:{},removals:{},modified:{}},pt(),n.publish(u)})))};return{add:function(e){var t=e.descriptor.id;r.additions[t]=e,r.modified[e.descriptor.droppableId]=!0,r.removals[t]&&delete r.removals[t],a()},remove:function(e){var t=e.descriptor;r.removals[t.id]=!0,r.modified[t.droppableId]=!0,r.additions[t.id]&&delete r.additions[t.id],a()},stop:function(){i&&(cancelAnimationFrame(i),i=null,r={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=function(t){n||R(!1);var i=n.critical.draggable;"ADDITION"===t.type&&un(e,i,t.value)&&r.add(t.value),"REMOVAL"===t.type&&un(e,i,t.value)&&r.remove(t.value)};return{updateDroppableIsEnabled:function(r,i){e.droppable.exists(r)||R(!1),n&&t.updateDroppableIsEnabled({id:r,isEnabled:i})},updateDroppableIsCombineEnabled:function(r,i){n&&(e.droppable.exists(r)||R(!1),t.updateDroppableIsCombineEnabled({id:r,isCombineEnabled:i}))},scrollDroppable:function(t,r){n&&e.droppable.getById(t).callbacks.scroll(r)},updateDroppableScroll:function(r,i){n&&(e.droppable.exists(r)||R(!1),t.updateDroppableScroll({id:r,newScroll:i}))},startPublishing:function(t){n&&R(!1);var r=e.draggable.getById(t.draggableId),a=e.droppable.getById(r.descriptor.droppableId),o={draggable:r.descriptor,droppable:a.descriptor},s=e.subscribe(i);return n={critical:o,unsubscribe:s},cn({critical:o,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:function(){if(n){r.stop();var t=n.critical.droppable;e.droppable.getAllByType(t.type).forEach((function(e){return e.callbacks.dragStopped()})),n.unsubscribe(),n=null}}}},pn=function(e,t){return"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&(e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason)},mn=function(e){window.scrollBy(e.x,e.y)},gn=C((function(e){return ce(e).filter((function(e){return!!e.isEnabled&&!!e.frame}))})),vn=function(e){var t=e.center,n=e.destination,r=e.droppables;if(n){var i=r[n];return i.frame?i:null}return function(e,t){return ae(gn(t),(function(t){return t.frame||R(!1),tt(t.frame.pageMarginBox)(e)}))}(t,r)},bn=.25,yn=.05,En=28,xn=function(e){return Math.pow(e,2)},_n={stopDampeningAt:1200,accelerateAt:360},kn=function(e){var t=e.startOfRange,n=e.endOfRange,r=e.current,i=n-t;return 0===i?0:(r-t)/i},wn=_n.accelerateAt,Cn=_n.stopDampeningAt,Sn=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,i=e.shouldUseTimeDampening,a=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return En;if(e===t.startScrollingFrom)return 1;var n=kn({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=En*xn(1-n);return Math.ceil(r)}(t,n);return 0===a?0:i?Math.max(function(e,t){var n=t,r=Cn,i=Date.now()-n;if(i>=Cn)return e;if(i<wn)return 1;var a=kn({startOfRange:wn,endOfRange:r,current:i}),o=e*xn(a);return Math.ceil(o)}(a,r),1):a},On=function(e){var t=e.container,n=e.distanceToEdges,r=e.dragStartTime,i=e.axis,a=e.shouldUseTimeDampening,o=function(e,t){return{startScrollingFrom:e[t.size]*bn,maxScrollValueAt:e[t.size]*yn}}(t,i);return n[i.end]<n[i.start]?Sn({distanceToEdge:n[i.end],thresholds:o,dragStartTime:r,shouldUseTimeDampening:a}):-1*Sn({distanceToEdge:n[i.start],thresholds:o,dragStartTime:r,shouldUseTimeDampening:a})},An=X((function(e){return 0===e?0:e})),Tn=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,i=e.center,a=e.shouldUseTimeDampening,o={top:i.y-n.top,right:n.right-i.x,bottom:n.bottom-i.y,left:i.x-n.left},s=On({container:n,distanceToEdges:o,dragStartTime:t,axis:_e,shouldUseTimeDampening:a}),l=On({container:n,distanceToEdges:o,dragStartTime:t,axis:ke,shouldUseTimeDampening:a}),c=An({x:l,y:s});if(K(c,G))return null;var u=function(e){var t=e.container,n=e.subject,r=e.proposedScroll,i=n.height>t.height,a=n.width>t.width;return a||i?a&&i?null:{x:a?0:r.x,y:i?0:r.y}:r}({container:n,subject:r,proposedScroll:c});return u?K(u,G)?null:u:null},In=X((function(e){return 0===e?0:e>0?1:-1})),Dn=(dn=function(e,t){return e<0?e:e>t?e-t:0},function(e){var t=e.current,n=e.max,r=e.change,i=V(t,r),a={x:dn(i.x,n.x),y:dn(i.y,n.y)};return K(a,G)?null:a}),Ln=function(e){var t=e.max,n=e.current,r=e.change,i={x:Math.max(n.x,t.x),y:Math.max(n.y,t.y)},a=In(r),o=Dn({max:i,current:n,change:a});return!o||(0!==a.x&&0===o.x||0!==a.y&&0===o.y)},Rn=function(e,t){return Ln({current:e.scroll.current,max:e.scroll.max,change:t})},Nn=function(e,t){var n=e.frame;return!!n&&Ln({current:n.scroll.current,max:n.scroll.max,change:t})},jn=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,i=e.scrollWindow,a=e.scrollDroppable,o=t.current.page.borderBoxCenter,s=t.dimensions.draggables[t.critical.draggable.id].page.marginBox;if(t.isWindowScrollAllowed){var l=function(e){var t=e.viewport,n=e.subject,r=e.center,i=e.dragStartTime,a=e.shouldUseTimeDampening,o=Tn({dragStartTime:i,container:t.frame,subject:n,center:r,shouldUseTimeDampening:a});return o&&Rn(t,o)?o:null}({dragStartTime:n,viewport:t.viewport,subject:s,center:o,shouldUseTimeDampening:r});if(l)return void i(l)}var c=vn({center:o,destination:Ze(t.impact),droppables:t.dimensions.droppables});if(c){var u=function(e){var t=e.droppable,n=e.subject,r=e.center,i=e.dragStartTime,a=e.shouldUseTimeDampening,o=t.frame;if(!o)return null;var s=Tn({dragStartTime:i,container:o.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:a});return s&&Nn(t,s)?s:null}({dragStartTime:n,droppable:c,subject:s,center:o,shouldUseTimeDampening:r});u&&a(c.descriptor.id,u)}},Mn=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,i=function(e,t){if(!Nn(e,t))return t;var r=function(e,t){var n=e.frame;return n&&Nn(e,t)?Dn({current:n.scroll.current,max:n.scroll.max,change:t}):null}(e,t);if(!r)return n(e.descriptor.id,t),null;var i=W(t,r);return n(e.descriptor.id,i),W(t,i)},a=function(e,t,n){if(!e)return n;if(!Rn(t,n))return n;var i=function(e,t){if(!Rn(e,t))return null;var n=e.scroll.max,r=e.scroll.current;return Dn({current:r,max:n,change:t})}(t,n);if(!i)return r(n),null;var a=W(n,i);return r(a),W(n,a)};return function(e){var n=e.scrollJumpRequest;if(n){var r=Ze(e.impact);r||R(!1);var o=i(e.dimensions.droppables[r],n);if(o){var s=e.viewport,l=a(e.isWindowScrollAllowed,s,o);l&&function(e,n){var r=V(e.current.client.selection,n);t({client:r})}(e,l)}}}},Pn=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,i=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=S(t),i=S(n),a=null,o=function(e){a||R(!1);var t=a,n=t.shouldUseTimeDampening,o=t.dragStartTime;jn({state:e,scrollWindow:r,scrollDroppable:i,dragStartTime:o,shouldUseTimeDampening:n})};return{start:function(e){ft(),a&&R(!1);var t=Date.now(),n=!1,r=function(){n=!0};jn({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:r,scrollDroppable:r}),a={dragStartTime:t,shouldUseTimeDampening:n},pt(),n&&o(e)},stop:function(){a&&(r.cancel(),i.cancel(),a=null)},scroll:o}}({scrollWindow:n,scrollDroppable:t}),a=Mn({move:r,scrollWindow:n,scrollDroppable:t});return{scroll:function(e){"DRAGGING"===e.phase&&("FLUID"!==e.movementMode?e.scrollJumpRequest&&a(e):i.scroll(e))},start:i.start,stop:i.stop}},Bn={base:hn="data-rbd-drag-handle",draggableId:hn+"-draggable-id",contextId:hn+"-context-id"},Fn=function(){var e="data-rbd-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),Un=function(){var e="data-rbd-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),Hn={contextId:"data-rbd-scroll-container-context-id"},zn=function(e,t){return e.map((function(e){var n=e.styles[t];return n?e.selector+" { "+n+" }":""})).join(" ")},Gn="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect,Vn=function(){var e=document.querySelector("head");return e||R(!1),e},Wn=function(e){var t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function Kn(e,t){var n=u((function(){return function(e){var t,n,r,i=(t=e,function(e){return"["+e+'="'+t+'"]'}),a=(n="\n cursor: -webkit-grab;\n cursor: grab;\n ",{selector:i(Bn.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:n,dragging:"pointer-events: none;",dropAnimating:n}}),o=[(r="\n transition: "+Bt.outOfTheWay+";\n ",{selector:i(Fn.contextId),styles:{dragging:r,dropAnimating:r,userCancel:r}}),a,{selector:i(Un.contextId),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n cursor: grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n overflow-anchor: none;\n "}}];return{always:zn(o,"always"),resting:zn(o,"resting"),dragging:zn(o,"dragging"),dropAnimating:zn(o,"dropAnimating"),userCancel:zn(o,"userCancel")}}(e)}),[e]),i=Object(r.useRef)(null),a=Object(r.useRef)(null),o=d(C((function(e){var t=a.current;t||R(!1),t.textContent=e})),[]),s=d((function(e){var t=i.current;t||R(!1),t.textContent=e}),[]);Gn((function(){(i.current||a.current)&&R(!1);var r=Wn(t),l=Wn(t);return i.current=r,a.current=l,r.setAttribute("data-rbd-always",e),l.setAttribute("data-rbd-dynamic",e),Vn().appendChild(r),Vn().appendChild(l),s(n.always),o(n.resting),function(){var e=function(e){var t=e.current;t||R(!1),Vn().removeChild(t),e.current=null};e(i),e(a)}}),[t,s,o,n.always,n.resting,e]);var l=d((function(){return o(n.dragging)}),[o,n.dragging]),c=d((function(e){o("DROP"!==e?n.userCancel:n.dropAnimating)}),[o,n.dropAnimating,n.userCancel]),h=d((function(){a.current&&o(n.resting)}),[o,n.resting]);return u((function(){return{dragging:l,dropping:c,resting:h}}),[l,c,h])}var qn=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function Yn(e){return e instanceof qn(e).HTMLElement}function Qn(e,t){var n="["+Bn.contextId+'="'+e+'"]',r=oe(document.querySelectorAll(n));if(!r.length)return null;var i=ae(r,(function(e){return e.getAttribute(Bn.draggableId)===t}));return i&&Yn(i)?i:null}function Jn(){var e={draggables:{},droppables:{}},t=[];function n(e){t.length&&t.forEach((function(t){return t(e)}))}function r(t){return e.draggables[t]||null}function i(t){return e.droppables[t]||null}return{draggable:{register:function(t){e.draggables[t.descriptor.id]=t,n({type:"ADDITION",value:t})},update:function(t,n){var r=e.draggables[n.descriptor.id];r&&r.uniqueId===t.uniqueId&&(delete e.draggables[n.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:function(t){var i=t.descriptor.id,a=r(i);a&&t.uniqueId===a.uniqueId&&(delete e.draggables[i],n({type:"REMOVAL",value:t}))},getById:function(e){var t=r(e);return t||R(!1),t},findById:r,exists:function(e){return Boolean(r(e))},getAllByType:function(t){return re(e.draggables).filter((function(e){return e.descriptor.type===t}))}},droppable:{register:function(t){e.droppables[t.descriptor.id]=t},unregister:function(t){var n=i(t.descriptor.id);n&&t.uniqueId===n.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){var t=i(e);return t||R(!1),t},findById:i,exists:function(e){return Boolean(i(e))},getAllByType:function(t){return re(e.droppables).filter((function(e){return e.descriptor.type===t}))}},subscribe:function(e){return t.push(e),function(){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var Xn=i.a.createContext(null),Zn=function(){var e=document.body;return e||R(!1),e},$n={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"};var er=0,tr={separator:"::"};function nr(e,t){return void 0===t&&(t=tr),u((function(){return""+e+t.separator+er++}),[t.separator,e])}var rr=i.a.createContext(null);function ir(e){0}function ar(e,t){ir()}function or(){ar()}function sr(e){var t=Object(r.useRef)(e);return Object(r.useEffect)((function(){t.current=e})),t}var lr,cr=((lr={})[13]=!0,lr[9]=!0,lr),ur=function(e){cr[e.keyCode]&&e.preventDefault()},dr=function(){var e="visibilitychange";return"undefined"==typeof document?e:ae([e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],(function(e){return"on"+e in document}))||e}();var hr,fr={type:"IDLE"};function pr(e){var t=e.cancel,n=e.completed,r=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(e){var t=e.button,n=e.clientX,a=e.clientY;if(0===t){var o={x:n,y:a},s=r();if("DRAGGING"===s.type)return e.preventDefault(),void s.actions.move(o);"PENDING"!==s.type&&R(!1);var l=s.point;if(c=l,u=o,Math.abs(u.x-c.x)>=5||Math.abs(u.y-c.y)>=5){var c,u;e.preventDefault();var d=s.actions.fluidLift(o);i({type:"DRAGGING",actions:d})}}}},{eventName:"mouseup",fn:function(e){var i=r();"DRAGGING"===i.type?(e.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"mousedown",fn:function(e){"DRAGGING"===r().type&&e.preventDefault(),t()}},{eventName:"keydown",fn:function(e){if("PENDING"!==r().type)return 27===e.keyCode?(e.preventDefault(),void t()):void ur(e);t()}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){"PENDING"===r().type&&t()}},{eventName:"webkitmouseforcedown",fn:function(e){var n=r();"IDLE"===n.type&&R(!1),n.actions.shouldRespectForcePress()?t():e.preventDefault()}},{eventName:dr,fn:t}]}function mr(){}var gr=((hr={})[34]=!0,hr[33]=!0,hr[36]=!0,hr[35]=!0,hr);function vr(e,t){function n(){t(),e.cancel()}return[{eventName:"keydown",fn:function(r){return 27===r.keyCode?(r.preventDefault(),void n()):32===r.keyCode?(r.preventDefault(),t(),void e.drop()):40===r.keyCode?(r.preventDefault(),void e.moveDown()):38===r.keyCode?(r.preventDefault(),void e.moveUp()):39===r.keyCode?(r.preventDefault(),void e.moveRight()):37===r.keyCode?(r.preventDefault(),void e.moveLeft()):void(gr[r.keyCode]?r.preventDefault():ur(r))}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:dr,fn:n}]}var br={type:"IDLE"};var yr={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Er(e,t){var n=t.target;return!!Yn(n)&&function e(t,n){if(null==n)return!1;if(Boolean(yr[n.tagName.toLowerCase()]))return!0;var r=n.getAttribute("contenteditable");return"true"===r||""===r||n!==t&&e(t,n.parentElement)}(e,n)}var xr=function(e){return f(e.getBoundingClientRect()).center};var _r="undefined"==typeof document?"matches":ae(["matches","msMatchesSelector","webkitMatchesSelector"],(function(e){return e in Element.prototype}))||"matches";function kr(e,t){return e.closest?e.closest(t):function e(t,n){return null==t?null:t[_r](n)?t:e(t.parentElement,n)}(e,t)}function wr(e,t){var n,r=t.target;if(!((n=r)instanceof qn(n).Element))return null;var i=kr(r,function(e){return"["+Bn.contextId+'="'+e+'"]'}(e));return i&&Yn(i)?i:null}function Cr(e){e.preventDefault()}function Sr(e){var t=e.expected,n=e.phase,r=e.isLockActive;e.shouldWarn;return!!r()&&t===n}function Or(e){var t=e.lockAPI,n=e.store,r=e.registry,i=e.draggableId;if(t.isClaimed())return!1;var a=r.draggable.findById(i);return!!a&&(!!a.options.isEnabled&&!!pn(n.getState(),i))}function Ar(e){var t=e.lockAPI,n=e.contextId,r=e.store,i=e.registry,a=e.draggableId,s=e.forceSensorStop,l=e.sourceEvent;if(!Or({lockAPI:t,store:r,registry:i,draggableId:a}))return null;var c=i.draggable.getById(a),u=function(e,t){var n="["+Fn.contextId+'="'+e+'"]',r=ae(oe(document.querySelectorAll(n)),(function(e){return e.getAttribute(Fn.id)===t}));return r&&Yn(r)?r:null}(n,c.descriptor.id);if(!u)return null;if(l&&!c.options.canDragInteractiveElements&&Er(u,l))return null;var d=t.claim(s||I),h="PRE_DRAG";function f(){return c.options.shouldRespectForcePress}function p(){return t.isActive(d)}var m=function(e,t){Sr({expected:e,phase:h,isLockActive:p,shouldWarn:!0})&&r.dispatch(t())}.bind(null,"DRAGGING");function g(e){function n(){t.release(),h="COMPLETED"}function i(t,i){if(void 0===i&&(i={shouldBlockNextClick:!1}),e.cleanup(),i.shouldBlockNextClick){var a=D(window,[{eventName:"click",fn:Cr,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(a)}n(),r.dispatch(Lt({reason:t}))}return"PRE_DRAG"!==h&&(n(),"PRE_DRAG"!==h&&R(!1)),r.dispatch(function(e){return{type:"LIFT",payload:e}}(e.liftActionArgs)),h="DRAGGING",Object(o.a)({isActive:function(){return Sr({expected:"DRAGGING",phase:h,isLockActive:p,shouldWarn:!1})},shouldRespectForcePress:f,drop:function(e){return i("DROP",e)},cancel:function(e){return i("CANCEL",e)}},e.actions)}return{isActive:function(){return Sr({expected:"PRE_DRAG",phase:h,isLockActive:p,shouldWarn:!1})},shouldRespectForcePress:f,fluidLift:function(e){var t=S((function(e){m((function(){return St({client:e})}))})),n=g({liftActionArgs:{id:a,clientSelection:e,movementMode:"FLUID"},cleanup:function(){return t.cancel()},actions:{move:t}});return Object(o.a)({},n,{move:t})},snapLift:function(){var e={moveUp:function(){return m(Ot)},moveRight:function(){return m(Tt)},moveDown:function(){return m(At)},moveLeft:function(){return m(It)}};return g({liftActionArgs:{id:a,clientSelection:xr(u),movementMode:"SNAP"},cleanup:I,actions:e})},abort:function(){Sr({expected:"PRE_DRAG",phase:h,isLockActive:p,shouldWarn:!0})&&t.release()}}}var Tr=[function(e){var t=Object(r.useRef)(fr),n=Object(r.useRef)(I),i=u((function(){return{eventName:"mousedown",fn:function(t){if(!t.defaultPrevented&&0===t.button&&!(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)){var r=e.findClosestDraggableId(t);if(r){var i=e.tryGetLock(r,s,{sourceEvent:t});if(i){t.preventDefault();var a={x:t.clientX,y:t.clientY};n.current(),h(i,a)}}}}}}),[e]),a=u((function(){return{eventName:"webkitmouseforcewillbegin",fn:function(t){if(!t.defaultPrevented){var n=e.findClosestDraggableId(t);if(n){var r=e.findOptionsForDraggable(n);r&&(r.shouldRespectForcePress||e.canGetLock(n)&&t.preventDefault())}}}}}),[e]),o=d((function(){n.current=D(window,[a,i],{passive:!1,capture:!0})}),[a,i]),s=d((function(){"IDLE"!==t.current.type&&(t.current=fr,n.current(),o())}),[o]),l=d((function(){var e=t.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[s]),c=d((function(){var e=pr({cancel:l,completed:s,getPhase:function(){return t.current},setPhase:function(e){t.current=e}});n.current=D(window,e,{capture:!0,passive:!1})}),[l,s]),h=d((function(e,n){"IDLE"!==t.current.type&&R(!1),t.current={type:"PENDING",point:n,actions:e},c()}),[c]);Gn((function(){return o(),function(){n.current()}}),[o])},function(e){var t=Object(r.useRef)(mr),n=u((function(){return{eventName:"keydown",fn:function(n){if(!n.defaultPrevented&&32===n.keyCode){var r=e.findClosestDraggableId(n);if(r){var a=e.tryGetLock(r,l,{sourceEvent:n});if(a){n.preventDefault();var o=!0,s=a.snapLift();t.current(),t.current=D(window,vr(s,l),{capture:!0,passive:!1})}}}function l(){o||R(!1),o=!1,t.current(),i()}}}}),[e]),i=d((function(){t.current=D(window,[n],{passive:!1,capture:!0})}),[n]);Gn((function(){return i(),function(){t.current()}}),[i])},function(e){var t=Object(r.useRef)(br),n=Object(r.useRef)(I),i=d((function(){return t.current}),[]),a=d((function(e){t.current=e}),[]),o=u((function(){return{eventName:"touchstart",fn:function(t){if(!t.defaultPrevented){var r=e.findClosestDraggableId(t);if(r){var i=e.tryGetLock(r,l,{sourceEvent:t});if(i){var a=t.touches[0],o={x:a.clientX,y:a.clientY};n.current(),p(i,o)}}}}}}),[e]),s=d((function(){n.current=D(window,[o],{capture:!0,passive:!1})}),[o]),l=d((function(){var e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),a(br),n.current(),s())}),[s,a]),c=d((function(){var e=t.current;l(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[l]),h=d((function(){var e={capture:!0,passive:!1},t={cancel:c,completed:l,getPhase:i},r=D(window,function(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(e){var n=r();if("DRAGGING"===n.type){n.hasMoved=!0;var i=e.touches[0],a={x:i.clientX,y:i.clientY};e.preventDefault(),n.actions.move(a)}else t()}},{eventName:"touchend",fn:function(e){var i=r();"DRAGGING"===i.type?(e.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"touchcancel",fn:function(e){"DRAGGING"===r().type?(e.preventDefault(),t()):t()}},{eventName:"touchforcechange",fn:function(e){var n=r();"IDLE"===n.type&&R(!1);var i=e.touches[0];if(i&&i.force>=.15){var a=n.actions.shouldRespectForcePress();if("PENDING"!==n.type)return a?n.hasMoved?void e.preventDefault():void t():void e.preventDefault();a&&t()}}},{eventName:dr,fn:t}]}(t),e),a=D(window,function(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(e){e.preventDefault()}},{eventName:"keydown",fn:function(e){"DRAGGING"===n().type?(27===e.keyCode&&e.preventDefault(),t()):t()}},{eventName:dr,fn:t}]}(t),e);n.current=function(){r(),a()}}),[c,i,l]),f=d((function(){var e=i();"PENDING"!==e.type&&R(!1);var t=e.actions.fluidLift(e.point);a({type:"DRAGGING",actions:t,hasMoved:!1})}),[i,a]),p=d((function(e,t){"IDLE"!==i().type&&R(!1);var n=setTimeout(f,120);a({type:"PENDING",point:t,actions:e,longPressTimerId:n}),h()}),[h,i,a,f]);Gn((function(){return s(),function(){n.current();var e=i();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),a(br))}}),[i,s,a]),Gn((function(){return D(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}])}),[])}];function Ir(e){var t=e.contextId,n=e.store,i=e.registry,a=e.customSensors,o=e.enableDefaultSensors,s=[].concat(o?Tr:[],a||[]),l=Object(r.useState)((function(){return function(){var e=null;function t(){e||R(!1),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&R(!1);var n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}()}))[0],c=d((function(e,t){e.isDragging&&!t.isDragging&&l.tryAbandon()}),[l]);Gn((function(){var e=n.getState();return n.subscribe((function(){var t=n.getState();c(e,t),e=t}))}),[l,n,c]),Gn((function(){return l.tryAbandon}),[l.tryAbandon]);var h=d((function(e){return Or({lockAPI:l,registry:i,store:n,draggableId:e})}),[l,i,n]),f=d((function(e,r,a){return Ar({lockAPI:l,registry:i,contextId:t,store:n,draggableId:e,forceSensorStop:r,sourceEvent:a&&a.sourceEvent?a.sourceEvent:null})}),[t,l,i,n]),p=d((function(e){return function(e,t){var n=wr(e,t);return n?n.getAttribute(Bn.draggableId):null}(t,e)}),[t]),m=d((function(e){var t=i.draggable.findById(e);return t?t.options:null}),[i.draggable]),g=d((function(){l.isClaimed()&&(l.tryAbandon(),"IDLE"!==n.getState().phase&&n.dispatch({type:"FLUSH",payload:null}))}),[l,n]),v=d(l.isClaimed,[l]),b=u((function(){return{canGetLock:h,tryGetLock:f,findClosestDraggableId:p,findOptionsForDraggable:m,tryReleaseLock:g,isLockClaimed:v}}),[h,f,p,m,g,v]);ir();for(var y=0;y<s.length;y++)s[y](b)}function Dr(e){return e.current||R(!1),e.current}function Lr(e){var t=e.contextId,n=e.setCallbacks,a=e.sensors,c=e.nonce,h=e.dragHandleUsageInstructions,f=Object(r.useRef)(null);or();var p=sr(e),m=d((function(){return function(e){return{onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}}(p.current)}),[p]),g=function(e){var t=u((function(){return function(e){return"rbd-announcement-"+e}(e)}),[e]),n=Object(r.useRef)(null);return Object(r.useEffect)((function(){var e=document.createElement("div");return n.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),Object(o.a)(e.style,$n),Zn().appendChild(e),function(){setTimeout((function(){var t=Zn();t.contains(e)&&t.removeChild(e),e===n.current&&(n.current=null)}))}}),[t]),d((function(e){var t=n.current;t&&(t.textContent=e)}),[])}(t),v=function(e){var t=e.contextId,n=e.text,i=nr("hidden-text",{separator:"-"}),a=u((function(){return"rbd-hidden-text-"+(e={contextId:t,uniqueId:i}).contextId+"-"+e.uniqueId;var e}),[i,t]);return Object(r.useEffect)((function(){var e=document.createElement("div");return e.id=a,e.textContent=n,e.style.display="none",Zn().appendChild(e),function(){var t=Zn();t.contains(e)&&t.removeChild(e)}}),[a,n]),a}({contextId:t,text:h}),b=Kn(t,c),y=d((function(e){Dr(f).dispatch(e)}),[]),E=u((function(){return Object(s.b)({publishWhileDragging:xt,updateDroppableScroll:kt,updateDroppableIsEnabled:wt,updateDroppableIsCombineEnabled:Ct,collectionStarting:_t},y)}),[y]),x=function(){var e=u(Jn,[]);return Object(r.useEffect)((function(){return function(){requestAnimationFrame(e.clean)}}),[e]),e}(),_=u((function(){return fn(x,E)}),[x,E]),k=u((function(){return Pn(Object(o.a)({scrollWindow:mn,scrollDroppable:_.scrollDroppable},Object(s.b)({move:St},y)))}),[_.scrollDroppable,y]),w=function(e){var t=Object(r.useRef)({}),n=Object(r.useRef)(null),i=Object(r.useRef)(null),a=Object(r.useRef)(!1),o=d((function(e,n){var r={id:e,focus:n};return t.current[e]=r,function(){var n=t.current;n[e]!==r&&delete n[e]}}),[]),s=d((function(t){var n=Qn(e,t);n&&n!==document.activeElement&&n.focus()}),[e]),l=d((function(e,t){n.current===e&&(n.current=t)}),[]),c=d((function(){i.current||a.current&&(i.current=requestAnimationFrame((function(){i.current=null;var e=n.current;e&&s(e)})))}),[s]),h=d((function(e){n.current=null;var t=document.activeElement;t&&t.getAttribute(Bn.draggableId)===e&&(n.current=e)}),[]);return Gn((function(){return a.current=!0,function(){a.current=!1;var e=i.current;e&&cancelAnimationFrame(e)}}),[]),u((function(){return{register:o,tryRecordFocus:h,tryRestoreFocusRecorded:c,tryShiftRecord:l}}),[o,h,c,l])}(t),C=u((function(){return an({announce:g,autoScroller:k,dimensionMarshal:_,focusMarshal:w,getResponders:m,styleMarshal:b})}),[g,k,_,w,m,b]);f.current=C;var S=d((function(){var e=Dr(f);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})}),[]),O=d((function(){var e=Dr(f).getState();return e.isDragging||"DROP_ANIMATING"===e.phase}),[]);n(u((function(){return{isDragging:O,tryAbort:S}}),[O,S]));var A=d((function(e){return pn(Dr(f).getState(),e)}),[]),T=d((function(){return et(Dr(f).getState())}),[]),I=u((function(){return{marshal:_,focus:w,contextId:t,canLift:A,isMovementAllowed:T,dragHandleUsageInstructionsId:v,registry:x}}),[t,_,v,w,A,T,x]);return Ir({contextId:t,store:C,registry:x,customSensors:a,enableDefaultSensors:!1!==e.enableDefaultSensors}),Object(r.useEffect)((function(){return S}),[S]),i.a.createElement(rr.Provider,{value:I},i.a.createElement(l.a,{context:Xn,store:C},e.children))}var Rr=0;function Nr(e){var t=u((function(){return""+Rr++}),[]),n=e.dragHandleUsageInstructions||F;return i.a.createElement(N,null,(function(r){return i.a.createElement(Lr,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd},e.children)}))}var jr=function(e){return function(t){return e===t}},Mr=jr("scroll"),Pr=jr("auto"),Br=(jr("visible"),function(e,t){return t(e.overflowX)||t(e.overflowY)}),Fr=function(e){var t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return Br(n,Mr)||Br(n,Pr)},Ur=function e(t){return null==t||t===document.body||t===document.documentElement?null:Fr(t)?t:e(t.parentElement)},Hr=function(e){return{x:e.scrollLeft,y:e.scrollTop}},zr=function(e){return{closestScrollable:Ur(e),isFixedOnPage:function e(t){return!!t&&("fixed"===window.getComputedStyle(t).position||e(t.parentElement))}(e)}},Gr=function(e){var t=e.ref,n=e.descriptor,r=e.env,i=e.windowScroll,a=e.direction,o=e.isDropDisabled,s=e.isCombineEnabled,l=e.shouldClipSubject,c=r.closestScrollable,u=function(e,t){var n=_(e);if(!t)return n;if(e!==t)return n;var r=n.paddingBox.top-t.scrollTop,i=n.paddingBox.left-t.scrollLeft,a=r+t.scrollHeight,o=i+t.scrollWidth,s=p({top:r,right:o,bottom:a,left:i},n.border);return v({borderBox:s,margin:n.margin,border:n.border,padding:n.padding})}(t,c),d=E(u,i),h=function(){if(!c)return null;var e=_(c),t={scrollHeight:c.scrollHeight,scrollWidth:c.scrollWidth};return{client:e,page:E(e,i),scroll:Hr(c),scrollSize:t,shouldClipSubject:l}}();return function(e){var t=e.descriptor,n=e.isEnabled,r=e.isCombineEnabled,i=e.isFixedOnPage,a=e.direction,o=e.client,s=e.page,l=e.closest,c=function(){if(!l)return null;var e=l.scrollSize,t=l.client,n=on({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:l.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:l.shouldClipSubject,scroll:{initial:l.scroll,current:l.scroll,max:n,diff:{value:G,displacement:G}}}}(),u="vertical"===a?_e:ke;return{descriptor:t,isCombineEnabled:r,isFixedOnPage:i,axis:u,isEnabled:n,client:o,page:s,frame:c,subject:te({page:s,withPlaceholder:null,axis:u,frame:c})}}({descriptor:n,isEnabled:!o,isCombineEnabled:s,isFixedOnPage:r.isFixedOnPage,direction:a,client:u,page:d,closest:h})},Vr={passive:!1},Wr={passive:!0},Kr=function(e){return e.shouldPublishImmediately?Vr:Wr};function qr(e){var t=Object(r.useContext)(e);return t||R(!1),t}var Yr=function(e){return e&&e.env.closestScrollable||null};function Qr(){}var Jr={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},Xr=function(e){var t=e.isAnimatingOpenOnMount,n=e.placeholder,r=e.animate,i=function(e){var t=e.isAnimatingOpenOnMount,n=e.placeholder,r=e.animate;return t||"close"===r?Jr:{height:n.client.borderBox.height,width:n.client.borderBox.width,margin:n.client.margin}}({isAnimatingOpenOnMount:t,placeholder:n,animate:r});return{display:n.display,boxSizing:"border-box",width:i.width,height:i.height,marginTop:i.margin.top,marginRight:i.margin.right,marginBottom:i.margin.bottom,marginLeft:i.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==r?Bt.placeholder:null}};var Zr=i.a.memo((function(e){var t=Object(r.useRef)(null),n=d((function(){t.current&&(clearTimeout(t.current),t.current=null)}),[]),a=e.animate,o=e.onTransitionEnd,s=e.onClose,l=e.contextId,c=Object(r.useState)("open"===e.animate),u=c[0],h=c[1];Object(r.useEffect)((function(){return u?"open"!==a?(n(),h(!1),Qr):t.current?Qr:(t.current=setTimeout((function(){t.current=null,h(!1)})),n):Qr}),[a,u,n]);var f=d((function(e){"height"===e.propertyName&&(o(),"close"===a&&s())}),[a,s,o]),p=Xr({isAnimatingOpenOnMount:u,animate:e.animate,placeholder:e.placeholder});return i.a.createElement(e.placeholder.tagName,{style:p,"data-rbd-placeholder-context-id":l,onTransitionEnd:f,ref:e.innerRef})})),$r=i.a.createContext(null);var ei=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={isVisible:Boolean(t.props.on),data:t.props.on,animate:t.props.shouldAnimate&&t.props.on?"open":"none"},t.onClose=function(){"close"===t.state.animate&&t.setState({isVisible:!1})},t}return Object(a.a)(t,e),t.getDerivedStateFromProps=function(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}},t.prototype.render=function(){if(!this.state.isVisible)return null;var e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)},t}(i.a.PureComponent),ti=5e3,ni=4500,ri=function(e,t){return t?Bt.drop(t.duration):e?Bt.snap:Bt.fluid},ii=function(e,t){return e?t?jt.drop:jt.combining:null};function ai(e){return"DRAGGING"===e.type?(r=(n=e).dimension.client,i=n.offset,a=n.combineWith,o=n.dropping,s=Boolean(a),l=function(e){return null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode}(n),c=Boolean(o),u=c?Ht(i,s):Ut(i),{position:"fixed",top:r.marginBox.top,left:r.marginBox.left,boxSizing:"border-box",width:r.borderBox.width,height:r.borderBox.height,transition:ri(l,o),transform:u,opacity:ii(s,c),zIndex:c?ni:ti,pointerEvents:"none"}):{transform:Ut((t=e).offset),transition:t.shouldAnimateDisplacement?null:"none"};var t,n,r,i,a,o,s,l,c,u}function oi(e){var t=nr("draggable"),n=e.descriptor,i=e.registry,a=e.getDraggableRef,o=e.canDragInteractiveElements,s=e.shouldRespectForcePress,l=e.isEnabled,c=u((function(){return{canDragInteractiveElements:o,shouldRespectForcePress:s,isEnabled:l}}),[o,l,s]),h=d((function(e){var t=a();return t||R(!1),function(e,t,n){void 0===n&&(n=G);var r=window.getComputedStyle(t),i=t.getBoundingClientRect(),a=x(i,r),o=E(a,n);return{descriptor:e,placeholder:{client:a,tagName:t.tagName.toLowerCase(),display:r.display},displaceBy:{x:a.marginBox.width,y:a.marginBox.height},client:a,page:o}}(n,t,e)}),[n,a]),f=u((function(){return{uniqueId:t,descriptor:n,options:c,getDimension:h}}),[n,h,c,t]),p=Object(r.useRef)(f),m=Object(r.useRef)(!0);Gn((function(){return i.draggable.register(p.current),function(){return i.draggable.unregister(p.current)}}),[i.draggable]),Gn((function(){if(m.current)m.current=!1;else{var e=p.current;p.current=f,i.draggable.update(f,e)}}),[f,i.draggable])}function si(e,t,n){ar()}function li(e){e.preventDefault()}var ci=function(e,t){return e===t},ui=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null};function di(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var hi={mapped:{type:"SECONDARY",offset:G,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:di(null)}};var fi={dropAnimationFinished:Rt},pi=Object(l.c)((function(){var e,t,n,r=(e=C((function(e,t){return{x:e,y:t}})),t=C((function(e,t,n,r,i){return{isDragging:!0,isClone:t,isDropAnimating:Boolean(i),dropAnimation:i,mode:e,draggingOver:n,combineWith:r,combineTargetFor:null}})),n=C((function(e,n,r,i,a,o,s){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:a,combineWith:o,mode:n,offset:e,dimension:r,forceShouldAnimate:s,snapshot:t(n,i,a,o,null)}}})),function(r,i){if(r.isDragging){if(r.critical.draggable.id!==i.draggableId)return null;var a=r.current.client.offset,o=r.dimensions.draggables[i.draggableId],s=Ze(r.impact),l=(u=r.impact).at&&"COMBINE"===u.at.type?u.at.combine.draggableId:null,c=r.forceShouldAnimate;return n(e(a.x,a.y),r.movementMode,o,i.isClone,s,l,c)}var u;if("DROP_ANIMATING"===r.phase){var d=r.completed;if(d.result.draggableId!==i.draggableId)return null;var h=i.isClone,f=r.dimensions.draggables[i.draggableId],p=d.result,m=p.mode,g=ui(p),v=function(e){return e.combine?e.combine.draggableId:null}(p),b={duration:r.dropDuration,curve:Nt,moveTo:r.newHomeClientOffset,opacity:v?jt.drop:null,scale:v?Mt.drop:null};return{mapped:{type:"DRAGGING",offset:r.newHomeClientOffset,dimension:f,dropping:b,draggingOver:g,combineWith:v,mode:m,forceShouldAnimate:null,snapshot:t(m,h,g,v,b)}}}return null}),i=function(){var e=C((function(e,t){return{x:e,y:t}})),t=C(di),n=C((function(e,n,r){return void 0===n&&(n=null),{mapped:{type:"SECONDARY",offset:e,combineTargetFor:n,shouldAnimateDisplacement:r,snapshot:t(n)}}})),r=function(e){return e?n(G,e,!0):null},i=function(t,i,a,o){var s=a.displaced.visible[t],l=Boolean(o.inVirtualList&&o.effected[t]),c=fe(a),u=c&&c.draggableId===t?i:null;if(!s){if(!l)return r(u);if(a.displaced.invisible[t])return null;var d=q(o.displacedBy.point),h=e(d.x,d.y);return n(h,u,!0)}if(l)return r(u);var f=a.displacedBy.point,p=e(f.x,f.y);return n(p,u,s.shouldAnimate)};return function(e,t){if(e.isDragging)return e.critical.draggable.id===t.draggableId?null:i(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){var n=e.completed;return n.result.draggableId===t.draggableId?null:i(t.draggableId,n.result.draggableId,n.impact,n.afterCritical)}return null}}();return function(e,t){return r(e,t)||i(e,t)||hi}}),fi,null,{context:Xn,pure:!0,areStatePropsEqual:ci})((function(e){var t=Object(r.useRef)(null),n=d((function(e){t.current=e}),[]),i=d((function(){return t.current}),[]),a=qr(rr),o=a.contextId,s=a.dragHandleUsageInstructionsId,l=a.registry,c=qr($r),h=c.type,f=c.droppableId,p=u((function(){return{id:e.draggableId,index:e.index,type:h,droppableId:f}}),[e.draggableId,e.index,h,f]),m=e.children,g=e.draggableId,v=e.isEnabled,b=e.shouldRespectForcePress,y=e.canDragInteractiveElements,E=e.isClone,x=e.mapped,_=e.dropAnimationFinished;si(),ir(),E||oi(u((function(){return{descriptor:p,registry:l,getDraggableRef:i,canDragInteractiveElements:y,shouldRespectForcePress:b,isEnabled:v}}),[p,l,i,y,b,v]));var k=u((function(){return v?{tabIndex:0,role:"button","aria-describedby":s,"data-rbd-drag-handle-draggable-id":g,"data-rbd-drag-handle-context-id":o,draggable:!1,onDragStart:li}:null}),[o,s,g,v]),w=d((function(e){"DRAGGING"===x.type&&x.dropping&&"transform"===e.propertyName&&_()}),[_,x]),C=u((function(){var e=ai(x),t="DRAGGING"===x.type&&x.dropping?w:null;return{innerRef:n,draggableProps:{"data-rbd-draggable-context-id":o,"data-rbd-draggable-id":g,style:e,onTransitionEnd:t},dragHandleProps:k}}),[o,k,g,x,w,n]),S=u((function(){return{draggableId:p.id,type:p.type,source:{index:p.index,droppableId:p.droppableId}}}),[p.droppableId,p.id,p.index,p.type]);return m(C,x.snapshot,S)}));function mi(e){return qr($r).isUsingCloneFor!==e.draggableId||e.isClone?i.a.createElement(pi,e):null}function gi(e){var t="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return i.a.createElement(mi,Object(o.a)({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}var vi=function(e,t){return e===t.droppable.type},bi=function(e,t){return t.draggables[e.draggable.id]},yi={updateViewportMaxScroll:function(e){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}}};var Ei={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||R(!1),document.body}},xi=Object(l.c)((function(){var e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t=Object(o.a)({},e,{shouldAnimatePlaceholder:!1}),n=C((function(e){return{draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}}})),r=C((function(r,i,a,o,s,l){var c=s.descriptor.id;if(s.descriptor.droppableId===r){var u=l?{render:l,dragging:n(s.descriptor)}:null,d={isDraggingOver:a,draggingOverWith:a?c:null,draggingFromThisWith:c,isUsingPlaceholder:!0};return{placeholder:s.placeholder,shouldAnimatePlaceholder:!1,snapshot:d,useClone:u}}if(!i)return t;if(!o)return e;var h={isDraggingOver:a,draggingOverWith:c,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:s.placeholder,shouldAnimatePlaceholder:!0,snapshot:h,useClone:null}}));return function(n,i){var a=i.droppableId,o=i.type,s=!i.isDropDisabled,l=i.renderClone;if(n.isDragging){var c=n.critical;if(!vi(o,c))return t;var u=bi(c,n.dimensions),d=Ze(n.impact)===a;return r(a,s,d,d,u,l)}if("DROP_ANIMATING"===n.phase){var h=n.completed;if(!vi(o,h.critical))return t;var f=bi(h.critical,n.dimensions);return r(a,s,ui(h.result)===a,Ze(h.impact)===a,f,l)}if("IDLE"===n.phase&&n.completed&&!n.shouldFlush){var p=n.completed;if(!vi(o,p.critical))return t;var m=Ze(p.impact)===a,g=Boolean(p.impact.at&&"COMBINE"===p.impact.at.type),v=p.critical.droppable.id===a;return m?g?e:t:v?e:t}return t}}),yi,null,{context:Xn,pure:!0,areStatePropsEqual:ci})((function(e){var t=Object(r.useContext)(rr);t||R(!1);var n=t.contextId,a=t.isMovementAllowed,o=Object(r.useRef)(null),s=Object(r.useRef)(null),l=e.children,c=e.droppableId,h=e.type,f=e.mode,p=e.direction,m=e.ignoreContainerClipping,g=e.isDropDisabled,v=e.isCombineEnabled,b=e.snapshot,y=e.useClone,E=e.updateViewportMaxScroll,x=e.getContainerForClone,_=d((function(){return o.current}),[]),k=d((function(e){o.current=e}),[]),w=(d((function(){return s.current}),[]),d((function(e){s.current=e}),[]));ar();var O=d((function(){a()&&E({maxScroll:ln()})}),[a,E]);!function(e){var t=Object(r.useRef)(null),n=qr(rr),i=nr("droppable"),a=n.registry,o=n.marshal,s=sr(e),l=u((function(){return{id:e.droppableId,type:e.type,mode:e.mode}}),[e.droppableId,e.mode,e.type]),c=Object(r.useRef)(l),h=u((function(){return C((function(e,n){t.current||R(!1);var r={x:e,y:n};o.updateDroppableScroll(l.id,r)}))}),[l.id,o]),f=d((function(){var e=t.current;return e&&e.env.closestScrollable?Hr(e.env.closestScrollable):G}),[]),p=d((function(){var e=f();h(e.x,e.y)}),[f,h]),m=u((function(){return S(p)}),[p]),g=d((function(){var e=t.current,n=Yr(e);e&&n||R(!1),e.scrollOptions.shouldPublishImmediately?p():m()}),[m,p]),v=d((function(e,r){t.current&&R(!1);var i=s.current,a=i.getDroppableRef();a||R(!1);var o=zr(a),c={ref:a,descriptor:l,env:o,scrollOptions:r};t.current=c;var u=Gr({ref:a,descriptor:l,env:o,windowScroll:e,direction:i.direction,isDropDisabled:i.isDropDisabled,isCombineEnabled:i.isCombineEnabled,shouldClipSubject:!i.ignoreContainerClipping}),d=o.closestScrollable;return d&&(d.setAttribute(Hn.contextId,n.contextId),d.addEventListener("scroll",g,Kr(c.scrollOptions))),u}),[n.contextId,l,g,s]),b=d((function(){var e=t.current,n=Yr(e);return e&&n||R(!1),Hr(n)}),[]),y=d((function(){var e=t.current;e||R(!1);var n=Yr(e);t.current=null,n&&(m.cancel(),n.removeAttribute(Hn.contextId),n.removeEventListener("scroll",g,Kr(e.scrollOptions)))}),[g,m]),E=d((function(e){var n=t.current;n||R(!1);var r=Yr(n);r||R(!1),r.scrollTop+=e.y,r.scrollLeft+=e.x}),[]),x=u((function(){return{getDimensionAndWatchScroll:v,getScrollWhileDragging:b,dragStopped:y,scroll:E}}),[y,v,b,E]),_=u((function(){return{uniqueId:i,descriptor:l,callbacks:x}}),[x,l,i]);Gn((function(){return c.current=_.descriptor,a.droppable.register(_),function(){t.current&&y(),a.droppable.unregister(_)}}),[x,l,y,_,o,a.droppable]),Gn((function(){t.current&&o.updateDroppableIsEnabled(c.current.id,!e.isDropDisabled)}),[e.isDropDisabled,o]),Gn((function(){t.current&&o.updateDroppableIsCombineEnabled(c.current.id,e.isCombineEnabled)}),[e.isCombineEnabled,o])}({droppableId:c,type:h,mode:f,direction:p,isDropDisabled:g,isCombineEnabled:v,ignoreContainerClipping:m,getDroppableRef:_});var T=i.a.createElement(ei,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},(function(e){var t=e.onClose,r=e.data,a=e.animate;return i.a.createElement(Zr,{placeholder:r,onClose:t,innerRef:w,animate:a,contextId:n,onTransitionEnd:O})})),I=u((function(){return{innerRef:k,placeholder:T,droppableProps:{"data-rbd-droppable-id":c,"data-rbd-droppable-context-id":n}}}),[n,c,T,k]),D=y?y.dragging.draggableId:null,L=u((function(){return{droppableId:c,type:h,isUsingCloneFor:D}}),[c,D,h]);return i.a.createElement($r.Provider,{value:L},l(I,b),function(){if(!y)return null;var e=y.dragging,t=y.render,n=i.a.createElement(mi,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(function(n,r){return t(n,r,e)}));return A.a.createPortal(n,x())}())}));xi.defaultProps=Ei},ni6a:
|
|
|
/*!************************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/mixin/RectText.js ***!
|
|
|
\************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../helper/text */"pzxd"),i=n(/*! ../../core/BoundingRect */"mFDi"),a=n(/*! ../constant */"gut8").WILL_BE_RESTORED,o=new i,s=function(){};s.prototype={constructor:s,drawRectText:function(e,t){var n=this.style;t=n.textRect||t,this.__dirty&&r.normalizeTextStyle(n,!0);var i=n.text;if(null!=i&&(i+=""),r.needDrawText(i,n)){e.save();var s=this.transform;n.transformText?this.setTransform(e):s&&(o.copy(t),o.applyTransform(s),t=o),r.renderText(this,e,i,n,t,a),e.restore()}}};var l=s;e.exports=l},nukY:
|
|
|
/*!*********************************************!*\
|
|
|
!*** ./src/assets/images/icons/groups1.png ***!
|
|
|
\*********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAAMkklEQVR4Xu2dWWwcSRnHv7Yd577v+74vkgWEQCAEy6IVWuCB62GVICFIYkcsvMC+LW8LL7BIiTiEhCweInjgPrRCC2KBJTBVYzm24yRO4ty3kziJj9ie+tC/d9oaT2b67ume7irJsjdbVf19X/266quvjjaEEG8w8yukk7ZAii1gMHODEOK3RPRSivXUqmXcAgb07+jomDk2NvYPZn4u4/bQ6qfUAiboSEKI5cz8XyJanVJdtVoZtsAE6EXYdzPzv4hoToZtolVPoQUmgV6E/QVm/hMRNaVQX61SRi3wDOiwg5Tya0qpn2TUJlrtFFqgIujFnv27zPztFOqsVcqgBaqCzsyGlPJXzPy5DNpFq5wyC1QFHXr29fVN6+/v/zszfyBlemt1MmYBW9Bhi3w+v7hQKJwkog0Zs41WN0UWcAS96K9vI6J3mHl+inTXqmTIAq5Ahz1yudxHDcN4k5mbM2QfrWpKLOAa9CLsB4ioLSW6azUyZAFPoBdh/w4RvZYhG2lVU2ABz6AXYf8FEb2cAv21ChmxgC/Qu7q6moeHh/9KRB/JiJ20mnVuAV+gQ+fu7u4FQ0ND/yGiLXVuAy1+BizgG/Ri2HEjEZ1k5kUZsJVWsY4tEAh06N3e3v7B8fHxt4hoWh3bIRbRm5qaaHx83NOzDcMg/DCz+RNlamhoMKtXSkX5mJrUHRh0SCml/CIzn8D+mJpInYKHNDY20p49e2hoaIguX75MIyMjrrRatWoVLVu2jJ48eUJnzpxxVcZPpunTp9POnTvNot3d3TQ8POynmsSUCQ1MIcSrzPx6YjSrIMiSJUvM3jCK9PTpU3r48KHrqhcvXkxr166lQqFAp06dMn+7SRp0N1Z6Nk+orS6E+Bkzf8WfKNGX2rdvH6EnjSINDAxQb2+v66p37NhBM2bMoNu3b9PVq1ddl9OguzbVpIyhgs7MTUKIvxDR8/7EibbU1q1byfI7w3pSc3MzTZkyhbyADsABOnzsrq4uwmhgJYw406ZVn+4sXbqUFi1aZLo8fX19VdUYHR2dNEqsWbOG5sxxf0ISckydOtWsH/J5mQ88ePCArl+/HpaJQ6knVNAhkRBiLjP/m4jedfBSntatW2eC5wV0QAc3CkBcuHBhkoWslyCo2S5dukT37t2bqGbTpk00b968oNW6Ko/n4vlJSqGDDuXy+fza4tbeZUlSNgpZvIKOSMvu3btNF+rs2bP0+PHjmoA+e/Zsc+RxmzBSwU1CunbtGmGEcJswAgwODrrNXpN8kYBehP29SincFTOjJprE9BCvoK9evZrgfgBwgG4lRDkA4/37923dhJUrV5qjAUA6d+5cVa0REvTibpRXpKMuHoDK5XKfMQzj17gNzEOxSLMi2oFGBCj9/f2Bn+UFdPSSu3btMiM/PT09pp9tpS1btpg+NEC/ePFiVbn0ZNRfk0XWo1viSCm/oZT6gT/xwi+1ceNGmj9/vum/huFHegHdylv+bPTkmCijF8bk1M5NCAo63Be87E4JLhZGDqQ7d+64WtiCXl5cHCcZwvz/kYMOYXO53DEiag1TcL91xQU6IilYgLFgHhsbM1VA775t2zaaOXMm3bp1y/SH7VJQ0MOa7FaSsdKcw287hV2uJqAzc6OU8nfM/KmwFfBaXxygoxcFzAjXwWXCD/4G/HBnADu2AnR2dpohQfw33KtKCf79woULzZXKauFF9KrVthaUgo4Frmp+PCbLVjjy0aNHtgtaGCGRMg86jNDV1TVreHj4bSLa5xXOMPPHBfrevXtt1cA2gLt375p58BIgMuM3YVTA6FAplYLe0dFB1shSntftZBTrEvv379eglxown8+vKBQKuMj03bhVDMkCHT1ntUb2IhZ6a/R+TnF0PBe9J0Jv2NeC3wsWLJiIoGByaiUNupcWcJe3Jq5LGex7C4XCP4lotjsRw81lgR5ureQIeqUec/v27aabgs1Z5XHnICu4drsNdY8edsvb1CelfEkp9fsaPnLiURboiGNbrkIYcmB0KF/8sasXkGMC6nWvS1BZNehBLeihvJTy+0qpb3ooElrWsH10P4JhQomFI7gwp0+frul+71LQ8aJX6/0RXsSkFwnrDXb75qEPkp6MltAgpXxZKYXD1bGkuEFHL46YOVwWgIF95aUJ/jn8d4AGWb0mLDjZjVQ6vOjVoj7ySymfU0rhQwOxnUaKE3RMXOGyIKRoRUbwN8J41g8gx8QU/46DGV6TUyweMlg9cKW6EfLE5i+EKCEDkvU3wpF2B0TwgpXuxPQqe5T5azYZ7ejoWDI6Oiri/nRMXKADGjwbPTr8eUADuK2tsFYj49/Pnz8/CfQbN244Roiw2one2gl0O5gwiuBFxG/E6LHjEQn77NevX2/G0vESej3+FyXAbuuuCehCCGybe4uZP+xWsKjyRQ06lvkBK8KNpYsxGzZsMMOJ5Qk+MtwX5Ec5q0cs7dGxkOTUU1rbcP2CDlcK+22wHQFbIxAFKj1Kh7g6dMCEG5vJgmwYi6pt7eqtFeg/YubDcShY/swoQUc8HaeYkDDJLN20hYkdXgIAi3/HyiZ+A5xKE8Jago5QJiCGy2KNKJUWjHD0DyMHZMao4/b4XxLaPXLQpZRfVUr9NAnKQoYoQS9d6ClfdbRO77s9UV8r0OGmbN682XSpADDcFMhYbWUULgxeWvjqyOs00iSl3SMFHVdhFAoFfEggMTfwRgn63LlzTWgwrEspfbWxdXgbk0ZrMhqV6zJr1izT98YLCvcJLon1ItptAbBsCF/9ypUr5tbipKfIQC8u96O1E3XKKErQcQ0FdhfCLcEVEW4TelW8JHAdMEHFSincgqhAh4sFOXEEEC9WJVfEDnSUwXFAa7sv3B3s1QljS4Vbm3nNFwnovb29UwcGBt5m5vd7FSjq/NbQiyEXPWWYCfFxTOawwGJ3cBm9NVwFREkANv4uvYYDL0kUoOMZmBDjlJIVOqw2eXWzqQsvCoCHj4/e/ebNm+be9SROVCMBXQjxc2b+cpgQhVXX8uXLzYZGQiMDyqCHBQCFtUEL9QLy0tNL6EFxiAFA46fS2U1MTHFYGr0jRoRSHx2ugdPEzwpVVgIXgANKjDhWOBNgIrpS7S4aN6BDV7ysGCWtemFLAI9DGEkCPnTQhRBfZ+YfhgVm2PWgQRA2C7Jpyk4mDN84JVQKJsAu36aLfPCL4TYAtvKXLcwFoxUrVhB+kAAfXhwsWNm5Gm5BR52wJerHQpQ1MiH2j5+kpFBBx+dfiAjXSSf6q9PwhzHkli/WBGkUAARocRlRpevbcPDCOnQBwJ1GkVLQnfaaQG7499CnUo8OEPFyA2zI5+aEvhfQLbuhDEKQSNjekMoeHVdcKKVEPd2sC5cCvW3Qa+qsfeZhNmzY4UXo6WWy6Ad0C3jY1cnVCtKp+CkbSo8uhJhRvLToPX6E0GUqW8Dy5d0ACrjQcwMwt7F6O7sHuakrie0ZCui5XO4EEX0piQpqmbQFYIHAoOdyuW8R0fe0ObUFkmyBQKBLKT/JzH9O0gVFSTa2li0+C/gGXUq5iZn/p78mHV/j6Se7t4Av0ItXV5zMyo257s2pcybVAp5Bx+dbpJS4T/GzSVVKy6UtUG4Bz6BLKV9TSuHr0TppC9SNBTyBXrwd9zf6o1x1075a0KIFXIMupdyulMItW7FcPKRbTFsgiAVcgd7e3j6vUCggwrI5yMN0WW2BuCzgCDpi5EKIPxLRi3EJqZ+rLRDUAo6gCyFeZ+ZXgz5Il9cWiNMCtqBLKb+glPplnALqZ2sLhGGBqqDn8/m9Sql30v6xrTCMqOtIvgUqgt7T07NwcHAQe8vXJV8FLaG2gLMFngEdX3+WUr7JzB9zLq5zaAvUhwWeAV0I8QYzv1If4msptQXcWWAS6Llc7gARtbkrqnNpC9SPBSZAb29vf9/4+Dg+phXblc71YzYtab1ZwAS9s7Nz6cjICK50ju0jWvVmOC1vfVnAKF7pjPsRP1RfomtptQXcWwB7y3+slDrkvojOqS1QfxZw3AJQfyppibNkgWPHjrGDvsowjMMa9CxRkUJdHUAfNwzjQGtr6wkNegobP0sq2YD+1DCMz7e2tv4B9tCgZ4mKFOpaBfTBxsbGTx85cuRvlsoa9BQ2fpZUqgD6w4aGhhdbWlpwS8VE0qBniYoU6loKumEYdxobG184fPhwR7mqGvQUNn6WVCoB/VpDQ8PzLS0tZyvpr0HPEhUp1LUI+gUi+vjRo0cvV1NRg57Cxs+SSsePH+9qamr6xKFDh27a6a1BzxIVKdS1ra1t4cGDB/udVPs/YIoD4AHLutsAAAAASUVORK5CYII="},ogmK:
|
|
|
/*!*********************************************************!*\
|
|
|
!*** ./node_modules/rc-picker/es/index.js + 42 modules ***!
|
|
|
\*********************************************************/
|
|
|
/*! exports provided: PickerPanel, RangePicker, default */
|
|
|
/*! exports used: RangePicker, default */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-trigger/es/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMemo.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMergedState.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return ze}));var r=n("1OyB"),i=n("vuIU"),a=n("Ji7U"),o=n("LK+K"),s=n("rePB"),l=n("VTBJ"),c=n("ODXe"),u=n("q1tI"),d=n("TSYQ"),h=n.n(d),f=n("Kwbf"),p=n("6cGi"),m=n("U8pU"),g=n("4IlW"),v=u.createContext({}),b={visibility:"hidden"};var y=function(e){var t=e.prefixCls,n=e.prevIcon,r=void 0===n?"‹":n,i=e.nextIcon,a=void 0===i?"›":i,o=e.superPrevIcon,s=void 0===o?"«":o,l=e.superNextIcon,c=void 0===l?"»":l,d=e.onSuperPrev,h=e.onSuperNext,f=e.onPrev,p=e.onNext,m=e.children,g=u.useContext(v),y=g.hideNextBtn,E=g.hidePrevBtn;return u.createElement("div",{className:t},d&&u.createElement("button",{type:"button",onClick:d,tabIndex:-1,className:"".concat(t,"-super-prev-btn"),style:E?b:{}},s),f&&u.createElement("button",{type:"button",onClick:f,tabIndex:-1,className:"".concat(t,"-prev-btn"),style:E?b:{}},r),u.createElement("div",{className:"".concat(t,"-view")},m),p&&u.createElement("button",{type:"button",onClick:p,tabIndex:-1,className:"".concat(t,"-next-btn"),style:y?b:{}},a),h&&u.createElement("button",{type:"button",onClick:h,tabIndex:-1,className:"".concat(t,"-super-next-btn"),style:y?b:{}},c))};var E=function(e){if(u.useContext(v).hideHeader)return null;var t=e.prefixCls,n=e.generateConfig,r=e.locale,i=e.value,a=e.format,o="".concat(t,"-header");return u.createElement(y,{prefixCls:o},i?n.locale.format(r.locale,i,a):" ")},x=n("YrtM"),_=n("KQm4"),k=new Map;function w(e,t,n){if(k.get(e)&&cancelAnimationFrame(k.get(e)),n<=0)k.set(e,requestAnimationFrame((function(){e.scrollTop=t})));else{var r=(t-e.scrollTop)/n*10;k.set(e,requestAnimationFrame((function(){e.scrollTop+=r,e.scrollTop!==t&&w(e,t,n-10)})))}}function C(e,t){var n=t.onLeftRight,r=t.onCtrlLeftRight,i=t.onUpDown,a=t.onPageUpDown,o=t.onEnter,s=e.which,l=e.ctrlKey,c=e.metaKey;switch(s){case g.a.LEFT:if(l||c){if(r)return r(-1),!0}else if(n)return n(-1),!0;break;case g.a.RIGHT:if(l||c){if(r)return r(1),!0}else if(n)return n(1),!0;break;case g.a.UP:if(i)return i(-1),!0;break;case g.a.DOWN:if(i)return i(1),!0;break;case g.a.PAGE_UP:if(a)return a(-1),!0;break;case g.a.PAGE_DOWN:if(a)return a(1),!0;break;case g.a.ENTER:if(o)return o(),!0}return!1}function S(e,t,n,r){var i=e;if(!i)switch(t){case"time":i=r?"hh:mm:ss a":"HH:mm:ss";break;case"week":i="gggg-wo";break;case"month":i="YYYY-MM";break;case"quarter":i="YYYY-[Q]Q";break;case"year":i="YYYY";break;default:i=n?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD"}return i}function O(e,t){var n="time"===e?8:10;return Math.max(n,t.length)+2}var A=null,T=new Set;var I={year:function(e){return"month"===e||"date"===e?"year":e},month:function(e){return"date"===e?"month":e},quarter:function(e){return"month"===e||"date"===e?"quarter":e},week:function(e){return"date"===e?"week":e},time:null,date:null};function D(e,t){return e.some((function(e){return e&&e.contains(t)}))}var L=function(e){var t=e.prefixCls,n=e.units,r=e.onSelect,i=e.value,a=e.active,o=e.hideDisabledOptions,l="".concat(t,"-cell"),c=u.useContext(v).open,d=u.useRef(null),f=u.useRef(new Map);return u.useLayoutEffect((function(){var e=f.current.get(i);e&&!1!==c&&w(d.current,e.offsetTop,120)}),[i]),u.useLayoutEffect((function(){if(c){var e=f.current.get(i);e&&w(d.current,e.offsetTop,0)}}),[c]),u.createElement("ul",{className:h()("".concat(t,"-column"),Object(s.a)({},"".concat(t,"-column-active"),a)),ref:d,style:{position:"relative"}},n.map((function(e){var t;return o&&e.disabled?null:u.createElement("li",{key:e.value,ref:function(t){f.current.set(e.value,t)},className:h()(l,(t={},Object(s.a)(t,"".concat(l,"-disabled"),e.disabled),Object(s.a)(t,"".concat(l,"-selected"),i===e.value),t)),onClick:function(){e.disabled||r(e.value)}},u.createElement("div",{className:"".concat(l,"-inner")},e.label))})))};function R(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"0",r=String(e);r.length<t;)r="".concat(n).concat(e);return r}function N(e){return null==e?[]:Array.isArray(e)?e:[e]}function j(e){var t={};return Object.keys(e).forEach((function(n){"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)&&"role"!==n&&"name"!==n||"data-__"===n.substr(0,7)||(t[n]=e[n])})),t}function M(e,t){return e?e[t]:null}function P(e,t,n){var r=[M(e,0),M(e,1)];return r[n]="function"==typeof t?t(r[n]):t,r[0]||r[1]?r:null}function B(e,t,n,r,i){var a=e.setHour(t,n);return a=e.setMinute(a,r),a=e.setSecond(a,i)}function F(e,t){if(e.length!==t.length)return!0;for(var n=0;n<e.length;n+=1)if(e[n].disabled!==t[n].disabled)return!0;return!1}function U(e,t,n,r){for(var i=[],a=e;a<=t;a+=n)i.push({label:R(a,2),value:a,disabled:(r||[]).includes(a)});return i}var H=function(e){var t,n=e.generateConfig,r=e.prefixCls,i=e.operationRef,a=e.activeColumnIndex,o=e.value,s=e.showHour,d=e.showMinute,h=e.showSecond,f=e.use12Hours,p=e.hourStep,m=void 0===p?1:p,g=e.minuteStep,v=void 0===g?1:g,b=e.secondStep,y=void 0===b?1:b,E=e.disabledHours,_=e.disabledMinutes,k=e.disabledSeconds,w=e.hideDisabledOptions,C=e.onSelect,S=[],O="".concat(r,"-content"),A="".concat(r,"-time-panel"),T=o?n.getHour(o):-1,I=o?n.getMinute(o):-1,D=o?n.getSecond(o):-1,N=function(e,t,r,i){var a=o||n.getNow(),s=Math.max(0,t),l=Math.max(0,r),c=Math.max(0,i);return a=B(n,a,f&&e?s+12:s,l,c)},j=U(0,23,m,E&&E()),M=Object(x.a)((function(){return j}),j,F);f&&(t=T>=12,T%=12);var P=u.useMemo((function(){if(!f)return[!1,!1];var e=[!0,!0];return M.forEach((function(t){var n=t.disabled,r=t.value;n||(r>=12?e[1]=!1:e[0]=!1)})),e}),[f,M]),H=Object(c.a)(P,2),z=H[0],G=H[1],V=u.useMemo((function(){return f?M.filter(t?function(e){return e.value>=12}:function(e){return e.value<12}).map((function(e){var t=e.value%12,n=0===t?"12":R(t,2);return Object(l.a)(Object(l.a)({},e),{},{label:n,value:t})})):M}),[f,M]),W=U(0,59,v,_&&_(T)),K=U(0,59,y,k&&k(T,I));function q(e,t,n,r,i){!1!==e&&S.push({node:u.cloneElement(t,{prefixCls:A,value:n,active:a===S.length,onSelect:i,units:r,hideDisabledOptions:w}),onSelect:i,value:n,units:r})}i.current={onUpDown:function(e){var t=S[a];if(t)for(var n=t.units.findIndex((function(e){return e.value===t.value})),r=t.units.length,i=1;i<r;i+=1){var o=t.units[(n+e*i+r)%r];if(!0!==o.disabled){t.onSelect(o.value);break}}}},q(s,u.createElement(L,{key:"hour"}),T,V,(function(e){C(N(t,e,I,D),"mouse")})),q(d,u.createElement(L,{key:"minute"}),I,W,(function(e){C(N(t,T,e,D),"mouse")})),q(h,u.createElement(L,{key:"second"}),D,K,(function(e){C(N(t,T,I,e),"mouse")}));var Y=-1;return"boolean"==typeof t&&(Y=t?1:0),q(!0===f,u.createElement(L,{key:"12hours"}),Y,[{label:"AM",value:0,disabled:z},{label:"PM",value:1,disabled:G}],(function(e){C(N(!!e,T,I,D),"mouse")})),u.createElement("div",{className:O},S.map((function(e){return e.node})))};var z=function(e){var t=e.generateConfig,n=e.format,r=void 0===n?"HH:mm:ss":n,i=e.prefixCls,a=e.active,o=e.operationRef,l=e.showHour,d=e.showMinute,f=e.showSecond,p=e.use12Hours,m=void 0!==p&&p,g=e.onSelect,v=e.value,b="".concat(i,"-time-panel"),y=u.useRef(),x=u.useState(-1),_=Object(c.a)(x,2),k=_[0],w=_[1],S=[l,d,f,m].filter((function(e){return!1!==e})).length;return o.current={onKeyDown:function(e){return C(e,{onLeftRight:function(e){w((k+e+S)%S)},onUpDown:function(e){-1===k?w(0):y.current&&y.current.onUpDown(e)},onEnter:function(){g(v||t.getNow(),"key"),w(-1)}})},onBlur:function(){w(-1)}},u.createElement("div",{className:h()(b,Object(s.a)({},"".concat(b,"-active"),a))},u.createElement(E,Object.assign({},e,{format:r,prefixCls:i})),u.createElement(H,Object.assign({},e,{prefixCls:i,activeColumnIndex:k,operationRef:y})))};function G(e,t){return!e&&!t||!(!e||!t)&&void 0}function V(e,t,n){var r=G(t,n);return"boolean"==typeof r?r:e.getYear(t)===e.getYear(n)}function W(e,t){return Math.floor(e.getMonth(t)/3)+1}function K(e,t,n){var r=G(t,n);return"boolean"==typeof r?r:V(e,t,n)&&W(e,t)===W(e,n)}function q(e,t,n){var r=G(t,n);return"boolean"==typeof r?r:V(e,t,n)&&e.getMonth(t)===e.getMonth(n)}function Y(e,t,n){var r=G(t,n);return"boolean"==typeof r?r:e.getYear(t)===e.getYear(n)&&e.getMonth(t)===e.getMonth(n)&&e.getDate(t)===e.getDate(n)}function Q(e,t,n,r){var i=G(n,r);return"boolean"==typeof i?i:e.locale.getWeek(t,n)===e.locale.getWeek(t,r)}function J(e,t,n){return Y(e,t,n)&&function(e,t,n){var r=G(t,n);return"boolean"==typeof r?r:e.getHour(t)===e.getHour(n)&&e.getMinute(t)===e.getMinute(n)&&e.getSecond(t)===e.getSecond(n)}(e,t,n)}function X(e,t,n,r){return!!(t&&n&&r)&&(!Y(e,t,r)&&!Y(e,n,r)&&e.isAfter(r,t)&&e.isAfter(n,r))}function Z(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;switch(t){case"year":return n.addYear(e,10*r);case"quarter":case"month":return n.addYear(e,r);default:return n.addMonth(e,r)}}var $=u.createContext({});function ee(e){var t=e.cellPrefixCls,n=e.generateConfig,r=e.rangedValue,i=e.hoverRangedValue,a=e.isInView,o=e.isSameCell,l=e.offsetCell,c=e.today,u=e.value;return function(e){var d,h=l(e,-1),f=l(e,1),p=M(r,0),m=M(r,1),g=M(i,0),v=M(i,1),b=X(n,g,v,e);function y(e){return o(p,e)}function E(e){return o(m,e)}var x=o(g,e),_=o(v,e),k=(b||_)&&(!a(h)||E(h)),w=(b||x)&&(!a(f)||y(f));return d={},Object(s.a)(d,"".concat(t,"-in-view"),a(e)),Object(s.a)(d,"".concat(t,"-in-range"),X(n,p,m,e)),Object(s.a)(d,"".concat(t,"-range-start"),y(e)),Object(s.a)(d,"".concat(t,"-range-end"),E(e)),Object(s.a)(d,"".concat(t,"-range-start-single"),y(e)&&!m),Object(s.a)(d,"".concat(t,"-range-end-single"),E(e)&&!p),Object(s.a)(d,"".concat(t,"-range-start-near-hover"),y(e)&&(o(h,g)||X(n,g,v,h))),Object(s.a)(d,"".concat(t,"-range-end-near-hover"),E(e)&&(o(f,v)||X(n,g,v,f))),Object(s.a)(d,"".concat(t,"-range-hover"),b),Object(s.a)(d,"".concat(t,"-range-hover-start"),x),Object(s.a)(d,"".concat(t,"-range-hover-end"),_),Object(s.a)(d,"".concat(t,"-range-hover-edge-start"),k),Object(s.a)(d,"".concat(t,"-range-hover-edge-end"),w),Object(s.a)(d,"".concat(t,"-range-hover-edge-start-near-range"),k&&o(h,m)),Object(s.a)(d,"".concat(t,"-range-hover-edge-end-near-range"),w&&o(f,p)),Object(s.a)(d,"".concat(t,"-today"),o(c,e)),Object(s.a)(d,"".concat(t,"-selected"),o(u,e)),d}}function te(e){for(var t=e.prefixCls,n=e.disabledDate,r=e.onSelect,i=e.rowNum,a=e.colNum,o=e.prefixColumn,c=e.rowClassName,d=e.baseDate,f=e.getCellClassName,p=e.getCellText,m=e.getCellNode,g=e.getCellDate,b=e.titleCell,y=e.headerCells,E=u.useContext(v),x=E.onDateMouseEnter,_=E.onDateMouseLeave,k="".concat(t,"-cell"),w=[],C=0;C<i;C+=1){for(var S=[],O=void 0,A=function(e){var t=g(d,C*a+e),i=n&&n(t);0===e&&(O=t,o&&S.push(o(O))),S.push(u.createElement("td",{key:e,title:b&&b(t),className:h()(k,Object(l.a)(Object(s.a)({},"".concat(k,"-disabled"),i),f(t))),onClick:function(){i||r(t)},onMouseEnter:function(){!i&&x&&x(t)},onMouseLeave:function(){!i&&_&&_(t)}},m?m(t):u.createElement("div",{className:"".concat(k,"-inner")},p(t))))},T=0;T<a;T+=1)A(T);w.push(u.createElement("tr",{key:C,className:c&&c(O)},S))}return u.createElement("div",{className:"".concat(t,"-body")},u.createElement("table",{className:"".concat(t,"-content")},y&&u.createElement("thead",null,u.createElement("tr",null,y)),u.createElement("tbody",null,w)))}var ne=function(e){var t=e.prefixCls,n=e.generateConfig,r=e.prefixColumn,i=e.locale,a=e.rowCount,o=e.viewDate,s=e.value,l=e.dateRender,c=u.useContext($),d=c.rangedValue,h=c.hoverRangedValue,f=function(e,t,n){var r=t.locale.getWeekFirstDay(e),i=t.setDate(n,1),a=t.getWeekDay(i),o=t.addDate(i,r-a);return t.getMonth(o)===t.getMonth(n)&&t.getDate(o)>1&&(o=t.addDate(o,-7)),o}(i.locale,n,o),p="".concat(t,"-cell"),m=n.locale.getWeekFirstDay(i.locale),g=n.getNow(),v=[],b=i.shortWeekDays||(n.locale.getShortWeekDays?n.locale.getShortWeekDays(i.locale):[]);r&&v.push(u.createElement("th",{key:"empty","aria-label":"empty cell"}));for(var y=0;y<7;y+=1)v.push(u.createElement("th",{key:y},b[(y+m)%7]));var E=ee({cellPrefixCls:p,today:g,value:s,generateConfig:n,rangedValue:r?null:d,hoverRangedValue:r?null:h,isSameCell:function(e,t){return Y(n,e,t)},isInView:function(e){return q(n,e,o)},offsetCell:function(e,t){return n.addDate(e,t)}}),x=l?function(e){return l(e,g)}:void 0;return u.createElement(te,Object.assign({},e,{rowNum:a,colNum:7,baseDate:f,getCellNode:x,getCellText:n.getDate,getCellClassName:E,getCellDate:n.addDate,titleCell:function(e){return n.locale.format(i.locale,e,"YYYY-MM-DD")},headerCells:v}))};var re=function(e){var t=e.prefixCls,n=e.generateConfig,r=e.locale,i=e.viewDate,a=e.onNextMonth,o=e.onPrevMonth,s=e.onNextYear,l=e.onPrevYear,c=e.onYearClick,d=e.onMonthClick;if(u.useContext(v).hideHeader)return null;var h="".concat(t,"-header"),f=r.shortMonths||(n.locale.getShortMonths?n.locale.getShortMonths(r.locale):[]),p=n.getMonth(i),m=u.createElement("button",{type:"button",key:"year",onClick:c,tabIndex:-1,className:"".concat(t,"-year-btn")},n.locale.format(r.locale,i,r.yearFormat)),g=u.createElement("button",{type:"button",key:"month",onClick:d,tabIndex:-1,className:"".concat(t,"-month-btn")},r.monthFormat?n.locale.format(r.locale,i,r.monthFormat):f[p]),b=r.monthBeforeYear?[g,m]:[m,g];return u.createElement(y,Object.assign({},e,{prefixCls:h,onSuperPrev:l,onPrev:o,onNext:a,onSuperNext:s}),b)};var ie=function(e){var t=e.prefixCls,n=e.panelName,r=void 0===n?"date":n,i=e.keyboardConfig,a=e.active,o=e.operationRef,c=e.generateConfig,d=e.value,f=e.viewDate,p=e.onViewDateChange,m=e.onPanelChange,g=e.onSelect,v="".concat(t,"-").concat(r,"-panel");o.current={onKeyDown:function(e){return C(e,Object(l.a)({onLeftRight:function(e){g(c.addDate(d||f,e),"key")},onCtrlLeftRight:function(e){g(c.addYear(d||f,e),"key")},onUpDown:function(e){g(c.addDate(d||f,7*e),"key")},onPageUpDown:function(e){g(c.addMonth(d||f,e),"key")}},i))}};var b=function(e){var t=c.addYear(f,e);p(t),m(null,t)},y=function(e){var t=c.addMonth(f,e);p(t),m(null,t)};return u.createElement("div",{className:h()(v,Object(s.a)({},"".concat(v,"-active"),a))},u.createElement(re,Object.assign({},e,{prefixCls:t,value:d,viewDate:f,onPrevYear:function(){b(-1)},onNextYear:function(){b(1)},onPrevMonth:function(){y(-1)},onNextMonth:function(){y(1)},onMonthClick:function(){m("month",f)},onYearClick:function(){m("year",f)}})),u.createElement(ne,Object.assign({},e,{onSelect:function(e){return g(e,"mouse")},prefixCls:t,value:d,viewDate:f,rowCount:6})))};var ae=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t}("date","time");var oe=function(e){var t=e.prefixCls,n=e.operationRef,r=e.generateConfig,i=e.value,a=e.defaultValue,o=e.disabledTime,d=e.showTime,f=e.onSelect,p="".concat(t,"-datetime-panel"),v=u.useState(null),b=Object(c.a)(v,2),y=b[0],E=b[1],x=u.useRef({}),_=u.useRef({}),k="object"===Object(m.a)(d)?Object(l.a)({},d):{},w=function(e){_.current.onBlur&&_.current.onBlur(e),E(null)};n.current={onKeyDown:function(e){if(e.which===g.a.TAB){var t=(n=e.shiftKey?-1:1,r=ae.indexOf(y)+n,ae[r]||null);return E(t),t&&e.preventDefault(),!0}var n,r;if(y){var i="date"===y?x:_;return i.current&&i.current.onKeyDown&&i.current.onKeyDown(e),!0}return!![g.a.LEFT,g.a.RIGHT,g.a.UP,g.a.DOWN].includes(e.which)&&(E("date"),!0)},onBlur:w,onClose:w};var C=function(e,t){var n=e;"date"===t&&!i&&k.defaultValue?(n=r.setHour(n,r.getHour(k.defaultValue)),n=r.setMinute(n,r.getMinute(k.defaultValue)),n=r.setSecond(n,r.getSecond(k.defaultValue))):"time"===t&&!i&&a&&(n=r.setYear(n,r.getYear(a)),n=r.setMonth(n,r.getMonth(a)),n=r.setDate(n,r.getDate(a))),f&&f(n,"mouse")},S=o?o(i||null):{};return u.createElement("div",{className:h()(p,Object(s.a)({},"".concat(p,"-active"),y))},u.createElement(ie,Object.assign({},e,{operationRef:x,active:"date"===y,onSelect:function(e){C(function(e,t,n){if(!n)return t;var r=t;return r=e.setHour(r,e.getHour(n)),r=e.setMinute(r,e.getMinute(n)),r=e.setSecond(r,e.getSecond(n))}(r,e,d&&"object"===Object(m.a)(d)?d.defaultValue:null),"date")}})),u.createElement(z,Object.assign({},e,{format:void 0},k,S,{defaultValue:void 0,operationRef:_,active:"time"===y,onSelect:function(e){C(e,"time")}})))};var se=function(e){var t=e.prefixCls,n=e.generateConfig,r=e.locale,i=e.value,a="".concat(t,"-cell"),o="".concat(t,"-week-panel-row");return u.createElement(ie,Object.assign({},e,{panelName:"week",prefixColumn:function(e){return u.createElement("td",{key:"week",className:h()(a,"".concat(a,"-week"))},n.locale.getWeek(r.locale,e))},rowClassName:function(e){return h()(o,Object(s.a)({},"".concat(o,"-selected"),Q(n,r.locale,i,e)))},keyboardConfig:{onLeftRight:null}}))};var le=function(e){var t=e.prefixCls,n=e.generateConfig,r=e.locale,i=e.viewDate,a=e.onNextYear,o=e.onPrevYear,s=e.onYearClick;if(u.useContext(v).hideHeader)return null;var l="".concat(t,"-header");return u.createElement(y,Object.assign({},e,{prefixCls:l,onSuperPrev:o,onSuperNext:a}),u.createElement("button",{type:"button",onClick:s,className:"".concat(t,"-year-btn")},n.locale.format(r.locale,i,r.yearFormat)))};var ce=function(e){var t=e.prefixCls,n=e.locale,r=e.value,i=e.viewDate,a=e.generateConfig,o=e.monthCellRender,s=u.useContext($),l=s.rangedValue,c=s.hoverRangedValue,d=ee({cellPrefixCls:"".concat(t,"-cell"),value:r,generateConfig:a,rangedValue:l,hoverRangedValue:c,isSameCell:function(e,t){return q(a,e,t)},isInView:function(){return!0},offsetCell:function(e,t){return a.addMonth(e,t)}}),h=n.shortMonths||(a.locale.getShortMonths?a.locale.getShortMonths(n.locale):[]),f=a.setMonth(i,0),p=o?function(e){return o(e,n)}:void 0;return u.createElement(te,Object.assign({},e,{rowNum:4,colNum:3,baseDate:f,getCellNode:p,getCellText:function(e){return n.monthFormat?a.locale.format(n.locale,e,n.monthFormat):h[a.getMonth(e)]},getCellClassName:d,getCellDate:a.addMonth,titleCell:function(e){return a.locale.format(n.locale,e,"YYYY-MM")}}))};var ue=function(e){var t=e.prefixCls,n=e.operationRef,r=e.onViewDateChange,i=e.generateConfig,a=e.value,o=e.viewDate,s=e.onPanelChange,l=e.onSelect,c="".concat(t,"-month-panel");n.current={onKeyDown:function(e){return C(e,{onLeftRight:function(e){l(i.addMonth(a||o,e),"key")},onCtrlLeftRight:function(e){l(i.addYear(a||o,e),"key")},onUpDown:function(e){l(i.addMonth(a||o,3*e),"key")},onEnter:function(){s("date",a||o)}})}};var d=function(e){var t=i.addYear(o,e);r(t),s(null,t)};return u.createElement("div",{className:c},u.createElement(le,Object.assign({},e,{prefixCls:t,onPrevYear:function(){d(-1)},onNextYear:function(){d(1)},onYearClick:function(){s("year",o)}})),u.createElement(ce,Object.assign({},e,{prefixCls:t,onSelect:function(e){l(e,"mouse"),s("date",e)}})))};var de=function(e){var t=e.prefixCls,n=e.generateConfig,r=e.locale,i=e.viewDate,a=e.onNextYear,o=e.onPrevYear,s=e.onYearClick;if(u.useContext(v).hideHeader)return null;var l="".concat(t,"-header");return u.createElement(y,Object.assign({},e,{prefixCls:l,onSuperPrev:o,onSuperNext:a}),u.createElement("button",{type:"button",onClick:s,className:"".concat(t,"-year-btn")},n.locale.format(r.locale,i,r.yearFormat)))};var he=function(e){var t=e.prefixCls,n=e.locale,r=e.value,i=e.viewDate,a=e.generateConfig,o=u.useContext($),s=o.rangedValue,l=o.hoverRangedValue,c=ee({cellPrefixCls:"".concat(t,"-cell"),value:r,generateConfig:a,rangedValue:s,hoverRangedValue:l,isSameCell:function(e,t){return K(a,e,t)},isInView:function(){return!0},offsetCell:function(e,t){return a.addMonth(e,3*t)}}),d=a.setDate(a.setMonth(i,0),1);return u.createElement(te,Object.assign({},e,{rowNum:1,colNum:4,baseDate:d,getCellText:function(e){return a.locale.format(n.locale,e,n.quarterFormat||"[Q]Q")},getCellClassName:c,getCellDate:function(e,t){return a.addMonth(e,3*t)},titleCell:function(e){return a.locale.format(n.locale,e,"YYYY-[Q]Q")}}))};var fe=function(e){var t=e.prefixCls,n=e.operationRef,r=e.onViewDateChange,i=e.generateConfig,a=e.value,o=e.viewDate,s=e.onPanelChange,l=e.onSelect,c="".concat(t,"-quarter-panel");n.current={onKeyDown:function(e){return C(e,{onLeftRight:function(e){l(i.addMonth(a||o,3*e),"key")},onCtrlLeftRight:function(e){l(i.addYear(a||o,e),"key")},onUpDown:function(e){l(i.addYear(a||o,e),"key")}})}};var d=function(e){var t=i.addYear(o,e);r(t),s(null,t)};return u.createElement("div",{className:c},u.createElement(de,Object.assign({},e,{prefixCls:t,onPrevYear:function(){d(-1)},onNextYear:function(){d(1)},onYearClick:function(){s("year",o)}})),u.createElement(he,Object.assign({},e,{prefixCls:t,onSelect:function(e){l(e,"mouse")}})))};var pe=function(e){var t=e.prefixCls,n=e.generateConfig,r=e.viewDate,i=e.onPrevDecade,a=e.onNextDecade,o=e.onDecadeClick;if(u.useContext(v).hideHeader)return null;var s="".concat(t,"-header"),l=n.getYear(r),c=Math.floor(l/ge)*ge,d=c+ge-1;return u.createElement(y,Object.assign({},e,{prefixCls:s,onSuperPrev:i,onSuperNext:a}),u.createElement("button",{type:"button",onClick:o,className:"".concat(t,"-decade-btn")},c,"-",d))};var me=function(e){var t=e.prefixCls,n=e.value,r=e.viewDate,i=e.locale,a=e.generateConfig,o=u.useContext($),s=o.rangedValue,l=o.hoverRangedValue,c="".concat(t,"-cell"),d=a.getYear(r),h=Math.floor(d/ge)*ge,f=h+ge-1,p=a.setYear(r,h-Math.ceil((12-ge)/2)),m=ee({cellPrefixCls:c,value:n,generateConfig:a,rangedValue:s,hoverRangedValue:l,isSameCell:function(e,t){return V(a,e,t)},isInView:function(e){var t=a.getYear(e);return h<=t&&t<=f},offsetCell:function(e,t){return a.addYear(e,t)}});return u.createElement(te,Object.assign({},e,{rowNum:4,colNum:3,baseDate:p,getCellText:a.getYear,getCellClassName:m,getCellDate:a.addYear,titleCell:function(e){return a.locale.format(i.locale,e,"YYYY")}}))},ge=10;var ve=function(e){var t=e.prefixCls,n=e.operationRef,r=e.onViewDateChange,i=e.generateConfig,a=e.value,o=e.viewDate,s=e.sourceMode,l=e.onSelect,c=e.onPanelChange,d="".concat(t,"-year-panel");n.current={onKeyDown:function(e){return C(e,{onLeftRight:function(e){l(i.addYear(a||o,e),"key")},onCtrlLeftRight:function(e){l(i.addYear(a||o,e*ge),"key")},onUpDown:function(e){l(i.addYear(a||o,3*e),"key")},onEnter:function(){c("date"===s?"date":"month",a||o)}})}};var h=function(e){var t=i.addYear(o,10*e);r(t),c(null,t)};return u.createElement("div",{className:d},u.createElement(pe,Object.assign({},e,{prefixCls:t,onPrevDecade:function(){h(-1)},onNextDecade:function(){h(1)},onDecadeClick:function(){c("decade",o)}})),u.createElement(me,Object.assign({},e,{prefixCls:t,onSelect:function(e){c("date"===s?"date":"month",e),l(e,"mouse")}})))};var be=function(e){var t=e.prefixCls,n=e.generateConfig,r=e.viewDate,i=e.onPrevDecades,a=e.onNextDecades;if(u.useContext(v).hideHeader)return null;var o="".concat(t,"-header"),s=n.getYear(r),l=Math.floor(s/xe)*xe,c=l+xe-1;return u.createElement(y,Object.assign({},e,{prefixCls:o,onSuperPrev:i,onSuperNext:a}),l,"-",c)};var ye=function(e){var t=Ee-1,n=e.prefixCls,r=e.viewDate,i=e.generateConfig,a=e.disabledDate,o="".concat(n,"-cell"),l=i.getYear(r),c=Math.floor(l/Ee)*Ee,d=Math.floor(l/xe)*xe,h=d+xe-1,f=i.setYear(r,d-Math.ceil((12*Ee-xe)/2));return u.createElement(te,Object.assign({},e,{rowNum:4,colNum:3,baseDate:f,getCellText:function(e){var n=i.getYear(e);return"".concat(n,"-").concat(n+t)},getCellClassName:function(e){var n,r=a&&a(e),l=i.getYear(e),u=l+t;return n={},Object(s.a)(n,"".concat(o,"-disabled"),r),Object(s.a)(n,"".concat(o,"-in-view"),d<=l&&u<=h),Object(s.a)(n,"".concat(o,"-selected"),l===c),n},getCellDate:function(e,t){return i.addYear(e,t*Ee)}}))},Ee=10,xe=10*Ee;var _e=function(e){var t=e.prefixCls,n=e.onViewDateChange,r=e.generateConfig,i=e.viewDate,a=e.operationRef,o=e.onSelect,s=e.onPanelChange,l="".concat(t,"-decade-panel");a.current={onKeyDown:function(e){return C(e,{onLeftRight:function(e){o(r.addYear(i,e*Ee),"key")},onCtrlLeftRight:function(e){o(r.addYear(i,e*xe),"key")},onUpDown:function(e){o(r.addYear(i,e*Ee*3),"key")},onEnter:function(){s("year",i)}})}};var c=function(e){var t=r.addYear(i,e*xe);n(t),s(null,t)};return u.createElement("div",{className:l},u.createElement(be,Object.assign({},e,{prefixCls:t,onPrevDecades:function(){c(-1)},onNextDecades:function(){c(1)}})),u.createElement(ye,Object.assign({},e,{prefixCls:t,onSelect:function(e){o(e,"mouse"),s("year",e)}})))};function ke(e,t,n){return n?u.createElement("div",{className:"".concat(e,"-footer-extra")},n(t)):null}function we(e){var t,n,r=e.prefixCls,i=e.rangeList,a=void 0===i?[]:i,o=e.components,s=void 0===o?{}:o,l=e.needConfirmButton,c=e.onNow,d=e.onOk,h=e.okDisabled,f=e.showNow,p=e.locale;if(a.length){var m=s.rangeItem||"span";t=u.createElement(u.Fragment,null,a.map((function(e){var t=e.label,n=e.onClick,i=e.onMouseEnter,a=e.onMouseLeave;return u.createElement("li",{key:t,className:"".concat(r,"-preset")},u.createElement(m,{onClick:n,onMouseEnter:i,onMouseLeave:a},t))})))}if(l){var g=s.button||"button";c&&!t&&!1!==f&&(t=u.createElement("li",{className:"".concat(r,"-now")},u.createElement("a",{className:"".concat(r,"-now-btn"),onClick:c},p.now))),n=l&&u.createElement("li",{className:"".concat(r,"-ok")},u.createElement(g,{disabled:h,onClick:d},p.ok))}return t||n?u.createElement("ul",{className:"".concat(r,"-ranges")},t,n):null}var Ce=function(e){var t,n=e.prefixCls,r=void 0===n?"rc-picker":n,i=e.className,a=e.style,o=e.locale,d=e.generateConfig,b=e.value,y=e.defaultValue,E=e.pickerValue,x=e.defaultPickerValue,_=e.disabledDate,k=e.mode,w=e.picker,C=void 0===w?"date":w,S=e.tabIndex,O=void 0===S?0:S,A=e.showNow,T=e.showTime,D=e.showToday,L=e.renderExtraFooter,R=e.hideHeader,N=e.onSelect,j=e.onChange,M=e.onPanelChange,P=e.onMouseDown,F=e.onPickerValueChange,U=e.onOk,H=e.components,G=e.direction,V=e.hourStep,W=void 0===V?1:V,K=e.minuteStep,q=void 0===K?1:K,Y=e.secondStep,Q=void 0===Y?1:Y,X="date"===C&&!!T||"time"===C,Z=24%W==0,ee=60%q==0,te=60%Q==0,ne=u.useContext(v),re=ne.operationRef,ae=ne.panelRef,le=ne.onSelect,ce=ne.hideRanges,de=ne.defaultOpenValue,he=u.useContext($),pe=he.inRange,me=he.panelPosition,ge=he.rangedValue,be=he.hoverRangedValue,ye=u.useRef({}),Ee=u.useRef(!0),xe=Object(p.a)(null,{value:b,defaultValue:y,postState:function(e){return!e&&de&&"time"===C?de:e}}),Ce=Object(c.a)(xe,2),Se=Ce[0],Oe=Ce[1],Ae=Object(p.a)(null,{value:E,defaultValue:x||Se,postState:function(e){return e||d.getNow()}}),Te=Object(c.a)(Ae,2),Ie=Te[0],De=Te[1],Le=function(e){De(e),F&&F(e)},Re=function(e){var t=I[C];return t?t(e):e},Ne=Object(p.a)((function(){return"time"===C?"time":Re("date")}),{value:k}),je=Object(c.a)(Ne,2),Me=je[0],Pe=je[1];u.useEffect((function(){Pe(C)}),[C]);var Be,Fe=u.useState((function(){return Me})),Ue=Object(c.a)(Fe,2),He=Ue[0],ze=Ue[1],Ge=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(Me===C||n)&&(Oe(e),N&&N(e),le&&le(e,t),j&&!J(d,e,Se)&&j(e))},Ve=function(e){return ye.current&&ye.current.onKeyDown?([g.a.LEFT,g.a.RIGHT,g.a.UP,g.a.DOWN,g.a.PAGE_UP,g.a.PAGE_DOWN,g.a.ENTER].includes(e.which)&&e.preventDefault(),ye.current.onKeyDown(e)):(Object(f.a)(!1,"Panel not correct handle keyDown event. Please help to fire issue about this."),!1)};re&&"right"!==me&&(re.current={onKeyDown:Ve,onClose:function(){ye.current&&ye.current.onClose&&ye.current.onClose()}}),u.useEffect((function(){b&&!Ee.current&&De(b)}),[b]),u.useEffect((function(){Ee.current=!1}),[]);var We,Ke,qe,Ye=Object(l.a)(Object(l.a)({},e),{},{operationRef:ye,prefixCls:r,viewDate:Ie,value:Se,onViewDateChange:Le,sourceMode:He,onPanelChange:function(e,t){var n=Re(e||Me);ze(Me),Pe(n),M&&(Me!==n||J(d,Ie,Ie))&&M(t,n)},disabledDate:"decade"!==Me?_:void 0});switch(delete Ye.onChange,delete Ye.onSelect,Me){case"decade":Be=u.createElement(_e,Object.assign({},Ye,{onSelect:function(e,t){Le(e),Ge(e,t)}}));break;case"year":Be=u.createElement(ve,Object.assign({},Ye,{onSelect:function(e,t){Le(e),Ge(e,t)}}));break;case"month":Be=u.createElement(ue,Object.assign({},Ye,{onSelect:function(e,t){Le(e),Ge(e,t)}}));break;case"quarter":Be=u.createElement(fe,Object.assign({},Ye,{onSelect:function(e,t){Le(e),Ge(e,t)}}));break;case"week":Be=u.createElement(se,Object.assign({},Ye,{onSelect:function(e,t){Le(e),Ge(e,t)}}));break;case"time":delete Ye.showTime,Be=u.createElement(z,Object.assign({},Ye,"object"===Object(m.a)(T)?T:null,{onSelect:function(e,t){Le(e),Ge(e,t)}}));break;default:Be=T?u.createElement(oe,Object.assign({},Ye,{onSelect:function(e,t){Le(e),Ge(e,t)}})):u.createElement(ie,Object.assign({},Ye,{onSelect:function(e,t){Le(e),Ge(e,t)}}))}if(ce||(We=ke(r,Me,L),Ke=we({prefixCls:r,components:H,needConfirmButton:X,okDisabled:!Se||_&&_(Se),locale:o,showNow:A,onNow:X&&function(){var e=d.getNow(),t=function(e,t,n,r,i,a){var o=Math.floor(e/r)*r;if(o<e)return[o,60-i,60-a];var s=Math.floor(t/i)*i;return s<t?[o,s,60-a]:[o,s,Math.floor(n/a)*a]}(d.getHour(e),d.getMinute(e),d.getSecond(e),Z?W:1,ee?q:1,te?Q:1),n=B(d,e,t[0],t[1],t[2]);Ge(n,"submit")},onOk:function(){Se&&(Ge(Se,"submit",!0),U&&U(Se))}})),D&&"date"===Me&&"date"===C&&!T){var Qe=d.getNow(),Je="".concat(r,"-today-btn"),Xe=_&&_(Qe);qe=u.createElement("a",{className:h()(Je,Xe&&"".concat(Je,"-disabled")),"aria-disabled":Xe,onClick:function(){Xe||Ge(Qe,"mouse",!0)}},o.today)}return u.createElement(v.Provider,{value:Object(l.a)(Object(l.a)({},ne),{},{hideHeader:"hideHeader"in e?R:ne.hideHeader,hidePrevBtn:pe&&"right"===me,hideNextBtn:pe&&"left"===me})},u.createElement("div",{tabIndex:O,className:h()("".concat(r,"-panel"),i,(t={},Object(s.a)(t,"".concat(r,"-panel-has-range"),ge&&ge[0]&&ge[1]),Object(s.a)(t,"".concat(r,"-panel-has-range-hover"),be&&be[0]&&be[1]),Object(s.a)(t,"".concat(r,"-panel-rtl"),"rtl"===G),t)),style:a,onKeyDown:Ve,onBlur:function(e){ye.current&&ye.current.onBlur&&ye.current.onBlur(e)},onMouseDown:P,ref:ae},Be,We||Ke||qe?u.createElement("div",{className:"".concat(r,"-footer")},We,Ke,qe):null))},Se=n("uciX"),Oe={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}};var Ae=function(e){var t,n=e.prefixCls,r=e.popupElement,i=e.popupStyle,a=e.visible,o=e.dropdownClassName,l=e.dropdownAlign,c=e.transitionName,d=e.getPopupContainer,f=e.children,p=e.range,m=e.popupPlacement,g=e.direction,v="".concat(n,"-dropdown");return u.createElement(Se.a,{showAction:[],hideAction:[],popupPlacement:void 0!==m?m:"rtl"===g?"bottomRight":"bottomLeft",builtinPlacements:Oe,prefixCls:v,popupTransitionName:c,popup:r,popupAlign:l,popupVisible:a,popupClassName:h()(o,(t={},Object(s.a)(t,"".concat(v,"-range"),p),Object(s.a)(t,"".concat(v,"-rtl"),"rtl"===g),t)),popupStyle:i,getPopupContainer:d},f)};function Te(e){var t=e.open,n=e.value,r=e.isClickOutside,i=e.triggerOpen,a=e.forwardKeyDown,o=e.blurToCancel,s=e.onSubmit,l=e.onCancel,d=e.onFocus,h=e.onBlur,f=Object(u.useState)(!1),p=Object(c.a)(f,2),m=p[0],v=p[1],b=Object(u.useState)(!1),y=Object(c.a)(b,2),E=y[0],x=y[1],k=Object(u.useRef)(!1),w=Object(u.useRef)(!1),C={onMouseDown:function(){v(!0),i(!0)},onKeyDown:function(e){switch(e.which){case g.a.ENTER:return t?!1!==s()&&v(!0):i(!0),void e.preventDefault();case g.a.TAB:return void(m&&t&&!e.shiftKey?(v(!1),e.preventDefault()):!m&&t&&!a(e)&&e.shiftKey&&(v(!0),e.preventDefault()));case g.a.ESC:return v(!0),void l()}t||[g.a.SHIFT].includes(e.which)?m||a(e):i(!0)},onFocus:function(e){v(!0),x(!0),d&&d(e)},onBlur:function(e){!k.current&&r(document.activeElement)?(o?setTimeout((function(){r(document.activeElement)&&l()}),0):t&&(i(!1),w.current&&s()),x(!1),h&&h(e)):k.current=!1}};return Object(u.useEffect)((function(){w.current=!1}),[t]),Object(u.useEffect)((function(){w.current=!0}),[n]),Object(u.useEffect)((function(){return e=function(e){var n=e.target;t&&(r(n)?E||i(!1):(k.current=!0,requestAnimationFrame((function(){k.current=!1}))))},!A&&"undefined"!=typeof window&&window.addEventListener&&(A=function(e){Object(_.a)(T).forEach((function(t){t(e)}))},window.addEventListener("mousedown",A)),T.add(e),function(){T.delete(e),0===T.size&&(window.removeEventListener("mousedown",A),A=null)};var e})),[C,{focused:E,typing:m}]}function Ie(e){var t=e.valueTexts,n=e.onTextChange,r=u.useState(""),i=Object(c.a)(r,2),a=i[0],o=i[1],s=u.useRef([]);function l(){o(s.current[0])}return s.current=t,u.useEffect((function(){t.every((function(e){return e!==a}))&&l()}),[t.join("||")]),[a,function(e){o(e),n(e)},l]}var De=n("Gytx"),Le=n.n(De);function Re(e,t){var n=t.formatList,r=t.generateConfig,i=t.locale;return Object(x.a)((function(){if(!e)return[[""],""];for(var t="",a=[],o=0;o<n.length;o+=1){var s=n[o],l=r.locale.format(i.locale,e,s);a.push(l),0===o&&(t=l)}return[a,t]}),[e,n],(function(e,t){return e[0]!==t[0]||!Le()(e[1],t[1])}))}function Ne(e,t){var n=t.formatList,r=t.generateConfig,i=t.locale,a=Object(u.useState)(null),o=Object(c.a)(a,2),s=o[0],l=o[1],d=Object(u.useRef)(null);function h(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];cancelAnimationFrame(d.current),t?l(e):d.current=requestAnimationFrame((function(){l(e)}))}var f=Re(s,{formatList:n,generateConfig:r,locale:i}),p=Object(c.a)(f,2)[1];function m(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];h(null,e)}return Object(u.useEffect)((function(){m(!0)}),[e]),Object(u.useEffect)((function(){return function(){return cancelAnimationFrame(d.current)}}),[]),[p,function(e){h(e)},m]}function je(e){var t,n=e.prefixCls,r=void 0===n?"rc-picker":n,i=e.id,a=e.tabIndex,o=e.style,d=e.className,m=e.dropdownClassName,g=e.dropdownAlign,b=e.popupStyle,y=e.transitionName,E=e.generateConfig,x=e.locale,_=e.inputReadOnly,k=e.allowClear,w=e.autoFocus,C=e.showTime,A=e.picker,T=void 0===A?"date":A,I=e.format,L=e.use12Hours,R=e.value,M=e.defaultValue,P=e.open,B=e.defaultOpen,F=e.defaultOpenValue,U=e.suffixIcon,H=e.clearIcon,z=e.disabled,G=e.disabledDate,V=e.placeholder,W=e.getPopupContainer,K=e.pickerRef,q=e.panelRender,Y=e.onChange,Q=e.onOpenChange,X=e.onFocus,Z=e.onBlur,$=e.onMouseDown,ee=e.onMouseUp,te=e.onMouseEnter,ne=e.onMouseLeave,re=e.onContextMenu,ie=e.onClick,ae=e.direction,oe=e.autoComplete,se=void 0===oe?"off":oe,le=u.useRef(null),ce="date"===T&&!!C||"time"===T,ue=N(S(I,T,C,L)),de=u.useRef(null),he=u.useRef(null),fe=Object(p.a)(null,{value:R,defaultValue:M}),pe=Object(c.a)(fe,2),me=pe[0],ge=pe[1],ve=u.useState(me),be=Object(c.a)(ve,2),ye=be[0],Ee=be[1],xe=u.useRef(null),_e=Object(p.a)(!1,{value:P,defaultValue:B,postState:function(e){return!z&&e},onChange:function(e){Q&&Q(e),!e&&xe.current&&xe.current.onClose&&xe.current.onClose()}}),ke=Object(c.a)(_e,2),we=ke[0],Se=ke[1],Oe=Re(ye,{formatList:ue,generateConfig:E,locale:x}),De=Object(c.a)(Oe,2),Le=De[0],je=De[1],Me=Ie({valueTexts:Le,onTextChange:function(e){var t=E.locale.parse(x.locale,e,ue);!t||G&&G(t)||Ee(t)}}),Pe=Object(c.a)(Me,3),Be=Pe[0],Fe=Pe[1],Ue=Pe[2],He=function(e){Ee(e),ge(e),Y&&!J(E,me,e)&&Y(e,e?E.locale.format(x.locale,e,ue[0]):"")},ze=function(e){z&&e||Se(e)},Ge=Te({blurToCancel:ce,open:we,value:Be,triggerOpen:ze,forwardKeyDown:function(e){return we&&xe.current&&xe.current.onKeyDown?xe.current.onKeyDown(e):(Object(f.a)(!1,"Picker not correct forward KeyDown operation. Please help to fire issue about this."),!1)},isClickOutside:function(e){return!D([de.current,he.current],e)},onSubmit:function(){return(!G||!G(ye))&&(He(ye),ze(!1),Ue(),!0)},onCancel:function(){ze(!1),Ee(me),Ue()},onFocus:X,onBlur:Z}),Ve=Object(c.a)(Ge,2),We=Ve[0],Ke=Ve[1],qe=Ke.focused,Ye=Ke.typing;u.useEffect((function(){we||(Ee(me),Le.length&&""!==Le[0]?je!==Be&&Ue():Fe(""))}),[we,Le]),u.useEffect((function(){we||Ue()}),[T]),u.useEffect((function(){Ee(me)}),[me]),K&&(K.current={focus:function(){le.current&&le.current.focus()},blur:function(){le.current&&le.current.blur()}});var Qe=Object(l.a)(Object(l.a)({},e),{},{className:void 0,style:void 0,pickerValue:void 0,onPickerValueChange:void 0}),Je=u.createElement(Ce,Object.assign({},Qe,{generateConfig:E,className:h()(Object(s.a)({},"".concat(r,"-panel-focused"),!Ye)),value:ye,locale:x,tabIndex:-1,onChange:Ee,direction:ae}));q&&(Je=q(Je));var Xe,Ze,$e=u.createElement("div",{className:"".concat(r,"-panel-container"),onMouseDown:function(e){e.preventDefault()}},Je);U&&(Xe=u.createElement("span",{className:"".concat(r,"-suffix")},U)),k&&me&&!z&&(Ze=u.createElement("span",{onMouseDown:function(e){e.preventDefault(),e.stopPropagation()},onMouseUp:function(e){e.preventDefault(),e.stopPropagation(),He(null),ze(!1)},className:"".concat(r,"-clear")},H||u.createElement("span",{className:"".concat(r,"-clear-btn")})));var et="rtl"===ae?"bottomRight":"bottomLeft",tt=Ne(Be,{formatList:ue,generateConfig:E,locale:x}),nt=Object(c.a)(tt,3),rt=nt[0],it=nt[1],at=nt[2];return u.createElement(v.Provider,{value:{operationRef:xe,hideHeader:"time"===T,panelRef:de,onSelect:function(e,t){("submit"===t||"key"!==t&&!ce)&&(He(e),ze(!1))},open:we,defaultOpenValue:F,onDateMouseEnter:it,onDateMouseLeave:at}},u.createElement(Ae,{visible:we,popupElement:$e,popupStyle:b,prefixCls:r,dropdownClassName:m,dropdownAlign:g,getPopupContainer:W,transitionName:y,popupPlacement:et,direction:ae},u.createElement("div",{className:h()(r,d,(t={},Object(s.a)(t,"".concat(r,"-disabled"),z),Object(s.a)(t,"".concat(r,"-focused"),qe),Object(s.a)(t,"".concat(r,"-rtl"),"rtl"===ae),t)),style:o,onMouseDown:$,onMouseUp:function(){ee&&ee.apply(void 0,arguments),le.current&&(le.current.focus(),ze(!0))},onMouseEnter:te,onMouseLeave:ne,onContextMenu:re,onClick:ie},u.createElement("div",{className:h()("".concat(r,"-input"),Object(s.a)({},"".concat(r,"-input-placeholder"),!!rt)),ref:he},u.createElement("input",Object.assign({id:i,tabIndex:a,disabled:z,readOnly:_||!Ye,value:rt||Be,onChange:function(e){Fe(e.target.value)},autoFocus:w,placeholder:V,ref:le,title:Be},We,{size:O(T,ue[0])},j(e),{autoComplete:se})),Xe,Ze))))}var Me=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).pickerRef=u.createRef(),e.focus=function(){e.pickerRef.current&&e.pickerRef.current.focus()},e.blur=function(){e.pickerRef.current&&e.pickerRef.current.blur()},e}return Object(i.a)(n,[{key:"render",value:function(){return u.createElement(je,Object.assign({},this.props,{pickerRef:this.pickerRef}))}}]),n}(u.Component);function Pe(e,t,n,r){var i=Z(e,n,r,1);function a(n){return n(e,t)?"same":n(i,t)?"closing":"far"}switch(n){case"year":return a((function(e,t){return function(e,t,n){var r=G(t,n);return"boolean"==typeof r?r:Math.floor(e.getYear(t)/10)===Math.floor(e.getYear(n)/10)}(r,e,t)}));case"quarter":case"month":return a((function(e,t){return V(r,e,t)}));default:return a((function(e,t){return q(r,e,t)}))}}function Be(e){var t=e.values,n=e.picker,r=e.defaultDates,i=e.generateConfig,a=u.useState((function(){return[M(r,0),M(r,1)]})),o=Object(c.a)(a,2),s=o[0],l=o[1],d=u.useState(null),h=Object(c.a)(d,2),f=h[0],p=h[1],m=M(t,0),g=M(t,1);return[function(e){return s[e]?s[e]:M(f,e)||function(e,t,n,r){var i=M(e,0),a=M(e,1);if(0===t)return i;if(i&&a)switch(Pe(i,a,n,r)){case"same":case"closing":return i;default:return Z(a,n,r,-1)}return i}(t,e,n,i)||m||g||i.getNow()},function(e,n){if(e){var r=P(f,e,n);l(P(s,null,n)||[null,null]);var i=(n+1)%2;M(t,i)||(r=P(r,e,i)),p(r)}else(m||g)&&p(null)}]}function Fe(e,t){return e&&e[0]&&e[1]&&t.isAfter(e[0],e[1])?[e[1],e[0]]:e}function Ue(e,t,n,r){return!!e||(!(!r||!r[t])||!!n[(t+1)%2])}function He(e){var t,n,r,i=e.prefixCls,a=void 0===i?"rc-picker":i,o=e.id,d=e.style,g=e.className,b=e.popupStyle,y=e.dropdownClassName,E=e.transitionName,x=e.dropdownAlign,_=e.getPopupContainer,k=e.generateConfig,w=e.locale,C=e.placeholder,A=e.autoFocus,T=e.disabled,I=e.format,L=e.picker,R=void 0===L?"date":L,B=e.showTime,F=e.use12Hours,U=e.separator,H=void 0===U?"~":U,z=e.value,G=e.defaultValue,V=e.defaultPickerValue,q=e.open,X=e.defaultOpen,ee=e.disabledDate,te=e.disabledTime,ne=e.dateRender,re=e.panelRender,ie=e.ranges,ae=e.allowEmpty,oe=e.allowClear,se=e.suffixIcon,le=e.clearIcon,ce=e.pickerRef,ue=e.inputReadOnly,de=e.mode,he=e.renderExtraFooter,fe=e.onChange,pe=e.onOpenChange,me=e.onPanelChange,ge=e.onCalendarChange,ve=e.onFocus,be=e.onBlur,ye=e.onOk,Ee=e.components,xe=e.order,_e=e.direction,Se=e.activePickerIndex,Oe=e.autoComplete,De=void 0===Oe?"off":Oe,Le="date"===R&&!!B||"time"===R,je=Object(u.useRef)({}),Me=Object(u.useRef)(null),Pe=Object(u.useRef)(null),He=Object(u.useRef)(null),ze=Object(u.useRef)(null),Ge=Object(u.useRef)(null),Ve=Object(u.useRef)(null),We=Object(u.useRef)(null),Ke=N(S(I,R,B,F)),qe=Object(p.a)(0,{value:Se}),Ye=Object(c.a)(qe,2),Qe=Ye[0],Je=Ye[1],Xe=Object(u.useRef)(null),Ze=u.useMemo((function(){return Array.isArray(T)?T:[T||!1,T||!1]}),[T]),$e=Object(p.a)(null,{value:z,defaultValue:G,postState:function(e){return"time"!==R||xe?Fe(e,k):e}}),et=Object(c.a)($e,2),tt=et[0],nt=et[1],rt=Be({values:tt,picker:R,defaultDates:V,generateConfig:k}),it=Object(c.a)(rt,2),at=it[0],ot=it[1],st=Object(p.a)(tt,{postState:function(e){var t=e;if(Ze[0]&&Ze[1])return t;for(var n=0;n<2;n+=1)!Ze[n]||M(t,n)||M(ae,n)||(t=P(t,k.getNow(),n));return t}}),lt=Object(c.a)(st,2),ct=lt[0],ut=lt[1],dt=Object(p.a)([R,R],{value:de}),ht=Object(c.a)(dt,2),ft=ht[0],pt=ht[1];Object(u.useEffect)((function(){pt([R,R])}),[R]);var mt=function(e,t){pt(e),me&&me(t,e)},gt=function(e,t,n){var r=e.picker,i=e.locale,a=e.selectedValue,o=e.disabledDate,s=e.disabled,l=e.generateConfig,c=M(a,0),d=M(a,1);function h(e){return 100*l.getYear(e)+l.locale.getWeek(i.locale,e)}function f(e){return 100*l.getYear(e)+l.getMonth(e)}function p(e){return 10*l.getYear(e)+W(l,e)}return[u.useCallback((function(e){if(o&&o(e))return!0;if(s[1]&&d)return!Y(l,e,d)&&l.isAfter(e,d);if(t&&d)switch(r){case"quarter":return p(e)>p(d);case"month":return f(e)>f(d);case"week":return h(e)>h(d);default:return!Y(l,e,d)&&l.isAfter(e,d)}return!1}),[o,s[1],d,t]),u.useCallback((function(e){if(o&&o(e))return!0;if(s[0]&&c)return!Y(l,e,d)&&l.isAfter(c,e);if(n&&c)switch(r){case"quarter":return p(e)<p(c);case"month":return f(e)<f(c);case"week":return h(e)<h(c);default:return!Y(l,e,c)&&l.isAfter(c,e)}return!1}),[o,s[0],c,n])]}({picker:R,selectedValue:ct,locale:w,disabled:Ze,disabledDate:ee,generateConfig:k},je.current[1],je.current[0]),vt=Object(c.a)(gt,2),bt=vt[0],yt=vt[1],Et=Object(p.a)(!1,{value:q,defaultValue:X,postState:function(e){return!Ze[Qe]&&e},onChange:function(e){pe&&pe(e),!e&&Xe.current&&Xe.current.onClose&&Xe.current.onClose()}}),xt=Object(c.a)(Et,2),_t=xt[0],kt=xt[1],wt=_t&&0===Qe,Ct=_t&&1===Qe,St=Object(u.useState)(0),Ot=Object(c.a)(St,2),At=Ot[0],Tt=Ot[1];Object(u.useEffect)((function(){!_t&&Me.current&&Tt(Me.current.offsetWidth)}),[_t]);var It=u.useRef();function Dt(e,t){if(e)clearTimeout(It.current),je.current[t]=!0,Je(t),kt(e),_t||ot(null,t);else if(Qe===t){kt(e);var n=je.current;It.current=setTimeout((function(){n===je.current&&(je.current={})}))}}function Lt(e){Dt(!0,e),setTimeout((function(){var t=[Ve,We][e];t.current&&t.current.focus()}),0)}function Rt(e,t){var n=e,r=M(n,0),i=M(n,1);r&&i&&k.isAfter(r,i)&&("week"===R&&!Q(k,w.locale,r,i)||"quarter"===R&&!K(k,r,i)||"week"!==R&&"quarter"!==R&&"time"!==R&&!Y(k,r,i)?(0===t?(n=[r,null],i=null):(r=null,n=[null,i]),je.current=Object(s.a)({},t,!0)):"time"===R&&!1===xe||(n=Fe(n,k))),ut(n);var a=n&&n[0]?k.locale.format(w.locale,n[0],Ke[0]):"",o=n&&n[1]?k.locale.format(w.locale,n[1],Ke[0]):"";ge&&ge(n,[a,o],{range:0===t?"start":"end"});var l=Ue(r,0,Ze,ae),c=Ue(i,1,Ze,ae);(null===n||l&&c)&&(nt(n),!fe||J(k,M(tt,0),r)&&J(k,M(tt,1),i)||fe(n,[a,o]));var u=null;0!==t||Ze[1]?1!==t||Ze[0]||(u=0):u=1,null===u||u===Qe||je.current[u]&&M(n,u)||!M(n,t)?Dt(!1,t):Lt(u)}var Nt=function(e){return _t&&Xe.current&&Xe.current.onKeyDown?Xe.current.onKeyDown(e):(Object(f.a)(!1,"Picker not correct forward KeyDown operation. Please help to fire issue about this."),!1)},jt={formatList:Ke,generateConfig:k,locale:w},Mt=Re(M(ct,0),jt),Pt=Object(c.a)(Mt,2),Bt=Pt[0],Ft=Pt[1],Ut=Re(M(ct,1),jt),Ht=Object(c.a)(Ut,2),zt=Ht[0],Gt=Ht[1],Vt=function(e,t){var n=k.locale.parse(w.locale,e,Ke);n&&!(0===t?bt:yt)(n)&&(ut(P(ct,n,t)),ot(n,t))},Wt=Ie({valueTexts:Bt,onTextChange:function(e){return Vt(e,0)}}),Kt=Object(c.a)(Wt,3),qt=Kt[0],Yt=Kt[1],Qt=Kt[2],Jt=Ie({valueTexts:zt,onTextChange:function(e){return Vt(e,1)}}),Xt=Object(c.a)(Jt,3),Zt=Xt[0],$t=Xt[1],en=Xt[2],tn=Object(u.useState)(null),nn=Object(c.a)(tn,2),rn=nn[0],an=nn[1],on=Object(u.useState)(null),sn=Object(c.a)(on,2),ln=sn[0],cn=sn[1],un=Ne(qt,{formatList:Ke,generateConfig:k,locale:w}),dn=Object(c.a)(un,3),hn=dn[0],fn=dn[1],pn=dn[2],mn=Ne(Zt,{formatList:Ke,generateConfig:k,locale:w}),gn=Object(c.a)(mn,3),vn=gn[0],bn=gn[1],yn=gn[2],En=function(e,t){return{blurToCancel:Le,forwardKeyDown:Nt,onBlur:be,isClickOutside:function(e){return!D([Pe.current,He.current,ze.current],e)},onFocus:function(t){Je(e),ve&&ve(t)},triggerOpen:function(t){Dt(t,e)},onSubmit:function(){Rt(ct,e),t()},onCancel:function(){Dt(!1,e),ut(tt),t()}}},xn=Te(Object(l.a)(Object(l.a)({},En(0,Qt)),{},{open:wt,value:qt})),_n=Object(c.a)(xn,2),kn=_n[0],wn=_n[1],Cn=wn.focused,Sn=wn.typing,On=Te(Object(l.a)(Object(l.a)({},En(1,en)),{},{open:Ct,value:Zt})),An=Object(c.a)(On,2),Tn=An[0],In=An[1],Dn=In.focused,Ln=In.typing,Rn=tt&&tt[0]?k.locale.format(w.locale,tt[0],"YYYYMMDDHHmmss"):"",Nn=tt&&tt[1]?k.locale.format(w.locale,tt[1],"YYYYMMDDHHmmss"):"";Object(u.useEffect)((function(){_t||(ut(tt),Bt.length&&""!==Bt[0]?Ft!==qt&&Qt():Yt(""),zt.length&&""!==zt[0]?Gt!==Zt&&en():$t(""))}),[_t,Bt,zt]),Object(u.useEffect)((function(){ut(tt)}),[Rn,Nn]),ce&&(ce.current={focus:function(){Ve.current&&Ve.current.focus()},blur:function(){Ve.current&&Ve.current.blur(),We.current&&We.current.blur()}});var jn=Object.keys(ie||{}).map((function(e){var t=ie[e],n="function"==typeof t?t():t;return{label:e,onClick:function(){Rt(n,null),Dt(!1,Qe)},onMouseEnter:function(){an(n)},onMouseLeave:function(){an(null)}}}));function Mn(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null;_t&&ln&&ln[0]&&ln[1]&&k.isAfter(ln[1],ln[0])&&(r=ln);var i=B;if(B&&"object"===Object(m.a)(B)&&B.defaultValue){var o=B.defaultValue;i=Object(l.a)(Object(l.a)({},B),{},{defaultValue:M(o,Qe)||void 0})}var c=null;return ne&&(c=function(e,t){return ne(e,t,{range:Qe?"end":"start"})}),u.createElement($.Provider,{value:{inRange:!0,panelPosition:t,rangedValue:rn||ct,hoverRangedValue:r}},u.createElement(Ce,Object.assign({},e,n,{dateRender:c,showTime:i,mode:ft[Qe],generateConfig:k,style:void 0,direction:_e,disabledDate:0===Qe?bt:yt,disabledTime:function(e){return!!te&&te(e,0===Qe?"start":"end")},className:h()(Object(s.a)({},"".concat(a,"-panel-focused"),0===Qe?!Sn:!Ln)),value:M(ct,Qe),locale:w,tabIndex:-1,onPanelChange:function(e,n){mt(P(ft,n,Qe),P(ct,e,Qe));var r=e;"right"===t&&ft[Qe]===n&&(r=Z(r,n,k,-1)),ot(r,Qe)},onOk:null,onSelect:void 0,onChange:void 0,defaultValue:void 0,defaultPickerValue:void 0})))}var Pn=0,Bn=0;Qe&&He.current&&Ge.current&&Pe.current&&(Pn=He.current.offsetWidth+Ge.current.offsetWidth,Pe.current.offsetWidth&&Pn>Pe.current.offsetWidth&&(Bn=Pn));var Fn="rtl"===_e?{right:Pn}:{left:Pn};var Un,Hn,zn=u.createElement("div",{className:h()("".concat(a,"-range-wrapper"),"".concat(a,"-").concat(R,"-range-wrapper")),style:{minWidth:At}},u.createElement("div",{className:"".concat(a,"-range-arrow"),style:Fn}),function(){var e,t=ke(a,ft[Qe],he),n=we({prefixCls:a,components:Ee,needConfirmButton:Le,okDisabled:!M(ct,Qe)||ee&&ee(ct[Qe]),locale:w,rangeList:jn,onOk:function(){M(ct,Qe)&&(Rt(ct,Qe),ye&&ye(ct))}});if("time"===R||B)e=Mn();else{var r=at(Qe),i=Z(r,R,k),o=ft[Qe]===R,s=Mn(!!o&&"left",{pickerValue:r,onPickerValueChange:function(e){ot(e,Qe)}}),l=Mn("right",{pickerValue:i,onPickerValueChange:function(e){ot(Z(e,R,k,-1),Qe)}});e="rtl"===_e?u.createElement(u.Fragment,null,l,o&&s):u.createElement(u.Fragment,null,s,o&&l)}var c=u.createElement(u.Fragment,null,u.createElement("div",{className:"".concat(a,"-panels")},e),(t||n)&&u.createElement("div",{className:"".concat(a,"-footer")},t,n));return re&&(c=re(c)),u.createElement("div",{className:"".concat(a,"-panel-container"),style:{marginLeft:Bn},ref:Pe,onMouseDown:function(e){e.preventDefault()}},c)}());se&&(Un=u.createElement("span",{className:"".concat(a,"-suffix")},se)),oe&&(M(tt,0)&&!Ze[0]||M(tt,1)&&!Ze[1])&&(Hn=u.createElement("span",{onMouseDown:function(e){e.preventDefault(),e.stopPropagation()},onMouseUp:function(e){e.preventDefault(),e.stopPropagation();var t=tt;Ze[0]||(t=P(t,null,0)),Ze[1]||(t=P(t,null,1)),Rt(t,null),Dt(!1,Qe)},className:"".concat(a,"-clear")},le||u.createElement("span",{className:"".concat(a,"-clear-btn")})));var Gn={size:O(R,Ke[0])},Vn=0,Wn=0;He.current&&ze.current&&Ge.current&&(0===Qe?Wn=He.current.offsetWidth:(Vn=Pn,Wn=ze.current.offsetWidth));var Kn="rtl"===_e?{right:Vn}:{left:Vn};return u.createElement(v.Provider,{value:{operationRef:Xe,hideHeader:"time"===R,onDateMouseEnter:function(e){cn(P(ct,e,Qe)),0===Qe?fn(e):bn(e)},onDateMouseLeave:function(){cn(P(ct,null,Qe)),0===Qe?pn():yn()},hideRanges:!0,onSelect:function(e,t){var n=P(ct,e,Qe);"submit"===t||"key"!==t&&!Le?(Rt(n,Qe),0===Qe?pn():yn()):ut(n)},open:_t}},u.createElement(Ae,{visible:_t,popupElement:zn,popupStyle:b,prefixCls:a,dropdownClassName:y,dropdownAlign:x,getPopupContainer:_,transitionName:E,range:!0,direction:_e},u.createElement("div",Object.assign({ref:Me,className:h()(a,"".concat(a,"-range"),g,(t={},Object(s.a)(t,"".concat(a,"-disabled"),Ze[0]&&Ze[1]),Object(s.a)(t,"".concat(a,"-focused"),0===Qe?Cn:Dn),Object(s.a)(t,"".concat(a,"-rtl"),"rtl"===_e),t)),style:d,onClick:function(e){_t||Ve.current.contains(e.target)||We.current.contains(e.target)||(Ze[0]?Ze[1]||Lt(1):Lt(0))},onMouseDown:function(e){!_t||!Cn&&!Dn||Ve.current.contains(e.target)||We.current.contains(e.target)||e.preventDefault()}},j(e)),u.createElement("div",{className:h()("".concat(a,"-input"),(n={},Object(s.a)(n,"".concat(a,"-input-active"),0===Qe),Object(s.a)(n,"".concat(a,"-input-placeholder"),!!hn),n)),ref:He},u.createElement("input",Object.assign({id:o,disabled:Ze[0],readOnly:ue||!Sn,value:hn||qt,onChange:function(e){Yt(e.target.value)},autoFocus:A,placeholder:M(C,0)||"",ref:Ve},kn,Gn,{autoComplete:De}))),u.createElement("div",{className:"".concat(a,"-range-separator"),ref:Ge},H),u.createElement("div",{className:h()("".concat(a,"-input"),(r={},Object(s.a)(r,"".concat(a,"-input-active"),1===Qe),Object(s.a)(r,"".concat(a,"-input-placeholder"),!!vn),r)),ref:ze},u.createElement("input",Object.assign({disabled:Ze[1],readOnly:ue||!Ln,value:vn||Zt,onChange:function(e){$t(e.target.value)},placeholder:M(C,1)||"",ref:We},Tn,Gn,{autoComplete:De}))),u.createElement("div",{className:"".concat(a,"-active-bar"),style:Object(l.a)(Object(l.a)({},Kn),{},{width:Wn,position:"absolute"})}),Un,Hn)))}var ze=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).pickerRef=u.createRef(),e.focus=function(){e.pickerRef.current&&e.pickerRef.current.focus()},e.blur=function(){e.pickerRef.current&&e.pickerRef.current.blur()},e}return Object(i.a)(n,[{key:"render",value:function(){return u.createElement(He,Object.assign({},this.props,{pickerRef:this.pickerRef}))}}]),n}(u.Component);t.b=Me},onxn:
|
|
|
/*!*********************************************!*\
|
|
|
!*** ./src/assets/images/icons/firefox.png ***!
|
|
|
\*********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAQFElEQVRoQ71aCXRUVZr+7ttqr6yVPSRASCBIVFBUWgUURZFW7FYa9Xhc2lHWGdM9bYszaqa1tcUFV9RRu3V6etw4DQJqY4MDLUJQEQIYEsieqspW2Wp/9ZY7570ia1VIRXH+cyo59e6/3O/+//3vf/9XBGeR8sr/lipS6QpKyMUApoOiGISmgBIbJZSAwkdA+ihQB0JqCPAVy3K7Op5Z3Hm2pkF+qKKiik/sfV7lF5SSOwF6MSiYiekklBAcIqDvmAzkLy1/WNo7MfmR3N8bUF75fpOInnIK+iClsP2QSQzIEiAIBk8L9uwN7ooLgt9H54QBUUqJo3zHrZTgSVDkfx+jY8lcaqgDJ0awl5S6KGXWezYu+W9CCJ2IjQkByvzXnZNlRXoPlM4dywghBJRhwBACkNPRp1nRpqX/p6CqJq2Cqqr+XSdFgVGg2DRlG85FE7Y6i/Bs6NqvZdZwc9uz1zUnCiouIPrBzaxr9+Eb816v2zygKONXO+apKrZSUEeMcg0AwwAMB8JMaI2iABUFqihC7e0HMQr43YwDuGvqd/B2yni0bn7/X6W5i47J5aUC1K1pL9V5zwQurnXXqmnrKMX8vNdO3aQJp//641ug0D9RUMOgMs0BLBf9aN44C0RlGbKrHVSW8OCsY1hXVg0qq6issStfdOQ+ssrw+VKVKtfnPHvSM2aEjB6gFQuMzjaXi4AazclJOcWR391LqbphiI+AcGwMkDsNO7DCvBNFllYc8J6L273/8b0gamEot7WDhsJ4+JxDWHleva6ntQl0c2PRK/fYv1zESOwjjicPb463v2KW1rWyeIVK1Xc1JSeZ3E+XG35zDUB1PsKwYHgeGOaROVw13nI8jmxr9Chp6MvHPM9boDTB7K1SqH4/wLIgRgMIy4JTJZCudgR8Et77yW5cNrlb193WotLaOn7TvOn9a8KuwIbs3x/77ehViwHkXDntY0rpEo1RDPF0m3AB+b11OViOxSS2B4WcGy7GgXopH4u5SryVXwGek3W9vrAVs5zvIUSNCXtH6eiE4vNH+QkBa7fBEvRg2/kfoaOHxfrm+dh67R6k2RWdpaNeUpSWnu0ZZUk3BI93Xpy98eRXw43FAGpdWdQDihRR5CAGObCciu6kZGSrPeAhg+EU8FYRooVBRnonBENkUN8jrlV4PfjzhMFojHJ7Z9RDo6jQ7MOuqz8GI0r4pCEHN14Y9ZJGx48xvpIMP1V8kj91UuEksvzDKNrTiXSQsW3l9EKZyo2yxCDoF8ALCkxmKZpu4xBhVKQVt8FoD8EXtmCac0vioTagT8twEUlP21pSoOEwVH9AH51u7cFn132mlx5UoWCMrP5cSxQNDcQ9dQrNDhxsvzvj6eq34wNaVTRfVrEn4DOA52UIxkHgY656xsxWCBYR3zpn4drQxgl5ZyxmLQw1kMQg4IXCHfhZWUcMq9QnUc7MyqLb70m7/6ucuIDcq4uuFsPMTm2Q4/XT78zEqMid06DnCNfRPDyl3In3rQvGk5rQON/pxndXvQPeFCdMFJVSFaR/f9tVuRtP7IoJuTdWL69YLH/7aKLHCmeKIGtWiz7BhsqpCPeb4DVYEGSMCDEGeIkZzX6CPRkLcdhaOiEgA8xUkvGY5V3cPts1pnyoumdn+kPfXhMD6G+rrvDOVFsSLjQNSUE4Sty6obovihEJCjFGWwMEp4QcPFbym9gJaftGkvVUDZ4bO6z7G3Fw8fsjxhm5DyqXrD+TOoL9yfft178M+nHL6ut+eYFS++ZEltGYHEB6cZsu0vR1IYI91hhxr92B59hF2Jty0YgxqlJIzS16MtCJZSEUThpxxg0IqIEgjs99EbZhS82Fm6EIGaCMCUpARvCLnsys1452DgL6ZtUFTZlqX8FEAAmWMDJmOnWR9upcBKRS8JmZYA0GRDo7YJ5RisaICTc0XhajVnK69Yw2nBizGVx2ZiwoSvGu4xVcXDSU3tlIGxjZC8lcohe+3kr3kuynqj/VAblWlZSoqlIzETAaLyPIyDmvSRfz+yZDmXH/CBWHGv24o+VCRNSRVYMWZrp34hCbngY2OWlohFJI7jaszjqIh35SO/ickXog+I4jnKotFkH4uKc87d+PPK8DqrnvnA0WhOME+fgQM85pgWCOQFUIvBkPg5jSIPZ78W8n87HNnxdXgVavqZ5uqMEgqBx7NLBJdrCOdF02V2xFyN2LkqR+/M+SL4cB6oPR+w3CyXOhsnaEjvc+rnSJL+uAjq46vzZF9RWPP/1YDrPDi9TJ0TouJBbgSPhnuKlrCeRo+TcuKX1eKJ7Y4pmxmEFMZsy2tOH53C245dvFOHCTfqLoxEQ8MPqOIGKeAtk0Be3HfO8a3L07CS2/xNQa9PgIaPQYTpQIhS27V/8wbPSSpv3NOvX30QVIjEbZ5dYvd2xaKrR9IzW3gkpSDB9jEFCcKWP35e/huf8twK8WDt3zWLEdBv9xyIIDEdu5qK0UD2T2dewl7lXT57QR2xcZSq8pUSysICFtWrteIYym0rrN6KbRdBqPNCBSQ3TfaZlNSwKyM5r6RxPhOORmCTi44G30dipISWcx0IJhRRcM/hNQWTPCyfPwx12Oqhulb+qJc/W08/YyZQcul6oSKpEZXkZGqROsQUbEZ0QkJKCLSQHHS8g2dyGv6dMzrou2Z6SmxG7UhGFgNhOcXKbfZoau8QD4QA34sFO/2ASs83Hb3690bmL+XKUH+r7VlyoFSntCF5i0Ei1cAPexPB2MxHBYWvAHRAiHEtKMWnrmzK8VoFJT/AwXbyVYQtFy24cxQ8a+A2CUaBHbTS/BVftWeLcbX9pD+stnpvqCooeOWVMP6RKsISQVeNBwYCqoEsVfaSvFese9iUarvsqRxkZApYB2WYyzd4YrM3MyTq34a/SRKgKMAVAjMPf+Y5DtSM9CPHBsofQn05+3E+fKaUsppdsTmVFSvgc+jxV97uge0arxzcnzsdGstx4SJqXfCzAMWLMJES38ztCoKrL3Y+/1OwFVAhvphGLMBRd2QggMHZsvVK8A2yurNwpVbxDXyuInVao+mMhsUqe1oeXbfKgyp4MxmiRECI8Pci7BxuAt42a3eDbktg6ogWjoxKOrspx4e9F+ECUAPliPiPUcGPv2g1GjVYa2Fk/sW4E7hEOUIeSfNQ99Fqb8IgMi4x4cyYWdaDk8CRyvwGwdSrPZcxrwlW8WVnieQHhYY2hgggKVcD5biwuEE+hV7NitXIgONTUaRYEANFDxaEnqCUxNjuDBebVgpG4I/mrI5skQ/EPeURQWbYcmR8UJt5A4VxY9U8vm/0ux3Dp2uXvamjW7D+01mbDYIiDMUJzY87phz+lFQDThma478Mfg9RBIBD/lvsQ91q0oSWkAyw1VBIrCYFPHL/B44Jd6X05u17wUBGuzQfH5BrEdvHQjZJKEwgIruHArhEAtVNYIRhmqASNBAzqP50MFQ+0mcyrpXD2zaC+Zcvhi+URsqTxq2QzJAfg67BAMCiglGN6ltWT0w57bA5ZXoltCyzKnfa7IDJQID6oS/TkryPrnmuZXcEQqiXrqdJNRckWrd42ci9dDMJoh2UrAB2rBh1tjHBnw2NDbkIlDaqG47I1dRt3kf629uW6hdHjqePtIO4PkCA+GUIRD2gQBg0kGM8xbnEkEZ5T0LKh95AgHVeJ0MLLM6DIKyyJgMeAJ2y3Yq84eMkspIvWN+neWKOi6dh1UzgbRPgeC5yA4MuS9AaGexgwEu+x4UVlU8/Sbr83QAf1l3c+3XB6pWjYeoBHjFAj4DVBkogPSukMsR4e8RgFF1QAQKArRi1eNGq3ZeCr5VtQKsX1+rfzRyiCN1k/ZhQdKPoDC2NDdkA9HQfXwduDgVNqqChAOG7EC5U9/9Z8rH9CtfLL2p8tmSSe2TAiQ3ncnCAd5SJHxz2TKMnjVcQM+NM8f04zS3QOlt08fPzr/CeSbmxAJGOBzp+il1miSRQ7tVYXYJp5DH7Xeled5+Qa3Dkhrztd+XiNaaGhiBeppC5LEIBLmdW+NJonlsN86E8+lrICXGbtcVMPhwZou19iDo/PXQxF5hPvM0K762hVlNPW7UuF1pWFdeEXfR+88lqKND85g59orj5RKzedO1EvD+ZtIJt4WFiNV9qGdS8XXxhL0MPaEVMqdXVC90T2yvWwj5mXVwHMqG9aMfphTY88pLfG0VxVgu68MIc5Sef8b710yAtDna69cPU1qfiUh62dgOspNwUOWe9DGRM+ZRGmKtw62Xieuzq5Ceckn6D6ZCXNaAAZ7CLwp1jthrwnHvpuBfXIRvcZY+3Tpa1V6n3vQQ7RiAXe409/nUPosiU5iLL4QMaCeycFxbjK+4Gehkp8xpkoGKubKNdjgfwP9ioA8iweqyMKW1acDMaX64yaDzpocrHbdhg227YqBKMvyXju1YwQg7cvuNVfcXyy3nJ32J4AAMeFz4Tzs4mejgclBO5sCCoJ0tR9TVTeWipXIUz2YLrfoffMBsmb1InlSNwLdVljSYvveWqJ49OtbYGZlepehMpyXnZdKKvbop+2IXUwrKpjDHR93OdTeicVLgi6VwUJ7t89ijK4sQ2HP6dGrDm2PhLotetiNpgPVZXi741I8aN0t80R9Pv/VU4P9kJi0VLnm8iU5cvsOAu1Y//8jLZMlF3SBN0ZrRNFnBG8RRxza2utYf3syDjWVoIjV30Z8kzc7aR6579BgYRl30tvXLH7rPLn+7h8bjlZ5mFP9MDt8EMxD13lt4lpb2ZQc0qegnTeyyKOv2QE5FO3OSgzvFjjporyX6qKNwdMU/6UxpWTfmsuOFCrtZT8WKMKqyJkdbfSPpn5nql4XamMamN5GB0TvUK4KE6HbTqS5ma+eahgtO2ZY9fx2TlKtVziZp3Zl/FigUiZ3wOIYWZ/52pLR35oOU6oPtuw+dNdl6QfsAHmYlMZcEpiXsak6tnQY70bWubrUepjkNJTKTbGv8s8SSlOaD5Z0LwhL4XWmQvSa42rWrgf7+Fn7byVVV5KX6mLbTWcKueEa6etz+M+OphwqlZtmnSUME1bjJyb6vOmm8tc3PvrCeMIJZTLt5zBb1i59tUxuvDeRm+14RscbD1IB9Uo6ZnHRfp2XsX4489Ujy8eT08YTAjSg6Plf333p9HDLpzPlpnEvg4kYH83TrZrxcugy7IkU4SnrdszlW6AS5iOzndzu2FAbexmKY2RCgDR5zVsfrFm2YSrc92cqveNe2xMF9pk4HZvFMmQwflxrqMZFXKub49R1+ZtOne5hJaZpwoAG1GpXjhf/YXuxTK37pyLFPZSGErM7JleYCPVGRN7kreaXsp45OnY7aAwN3xvQcH1b1y65VabMwzMU5zQ79bMKmLHLm2GCEXC0jUkVRSLUF6hdW62c8n7WyzXHfsianBVAg16rqGCOerYt+E4tuOIbviR3suK+cBp1Zdpp0GRVRfZl4/XHD7AzTpnYSFWB0vHlzS2TDiz/cPn4vx2YAML/AxiD3K8wfl5pAAAAAElFTkSuQmCC"},osHv:
|
|
|
/*!********************************************************!*\
|
|
|
!*** ./node_modules/codemirror/addon/fold/xml-fold.js ***!
|
|
|
\********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";var t=e.Pos;function n(e,t){return e.line-t.line||e.ch-t.ch}var r="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i=new RegExp("<(/?)(["+r+"]["+r+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function a(e,t,n,r){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=r?Math.max(r.from,e.firstLine()):e.firstLine(),this.max=r?Math.min(r.to-1,e.lastLine()):e.lastLine()}function o(e,n){var r=e.cm.getTokenTypeAt(t(e.line,n));return r&&/\btag\b/.test(r)}function s(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function l(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function c(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(s(e))continue;return}if(o(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t+1}}function u(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(l(e))continue;return}if(o(e,t+1)){i.lastIndex=t,e.ch=t;var n=i.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function d(e){for(;;){i.lastIndex=e.ch;var t=i.exec(e.text);if(!t){if(s(e))continue;return}if(o(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function h(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(l(e))continue;return}if(o(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t}}function f(e,n){for(var r=[];;){var i,a=d(e),o=e.line,s=e.ch-(a?a[0].length:0);if(!a||!(i=c(e)))return;if("selfClose"!=i)if(a[1]){for(var l=r.length-1;l>=0;--l)if(r[l]==a[2]){r.length=l;break}if(l<0&&(!n||n==a[2]))return{tag:a[2],from:t(o,s),to:t(e.line,e.ch)}}else r.push(a[2])}}function p(e,n){for(var r=[];;){var i=h(e);if(!i)return;if("selfClose"!=i){var a=e.line,o=e.ch,s=u(e);if(!s)return;if(s[1])r.push(s[2]);else{for(var l=r.length-1;l>=0;--l)if(r[l]==s[2]){r.length=l;break}if(l<0&&(!n||n==s[2]))return{tag:s[2],from:t(e.line,e.ch),to:t(a,o)}}}else u(e)}}e.registerHelper("fold","xml",(function(e,r){for(var i=new a(e,r.line,0);;){var o=d(i);if(!o||i.line!=r.line)return;var s=c(i);if(!s)return;if(!o[1]&&"selfClose"!=s){var l=t(i.line,i.ch),u=f(i,o[2]);return u&&n(u.from,l)>0?{from:l,to:u.from}:null}}})),e.findMatchingTag=function(e,r,i){var o=new a(e,r.line,r.ch,i);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var s=c(o),l=s&&t(o.line,o.ch),d=s&&u(o);if(s&&d&&!(n(o,r)>0)){var h={from:t(o.line,o.ch),to:l,tag:d[2]};return"selfClose"==s?{open:h,close:null,at:"open"}:d[1]?{open:p(o,d[2]),close:h,at:"close"}:{open:h,close:f(o=new a(e,l.line,l.ch,i),d[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,n,r){for(var i=new a(e,t.line,t.ch,n);;){var o=p(i,r);if(!o)break;var s=f(new a(e,t.line,t.ch,n),o.tag);if(s)return{open:o,close:s}}},e.scanForClosingTag=function(e,t,n,r){return f(new a(e,t.line,t.ch,r?{from:0,to:r}:null),n)}}(n(/*! ../../lib/codemirror */"VrN/"))},p5ED:
|
|
|
/*!*********************************************!*\
|
|
|
!*** ./src/components/PreviewAll/index.tsx ***!
|
|
|
\*********************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/button/style */"+L6B");var r=n(/*! antd/es/button */"2/Rp"),i=(n(/*! antd/es/tooltip/style */"5Dmo"),n(/*! antd/es/tooltip */"3S7+")),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),s=n(/*! react */"q1tI"),l=n.n(s),c=n(/*! ./index.less?modules */"vHTk"),u=n.n(c),d=n(/*! @ant-design/icons */"yEEn"),h=n(/*! @/components/monaco-editor */"ZW9T"),f=n(/*! @/utils/util */"1vsH");t.a=function(e){var t=e.name,n=e.data,c=(e.theme,e.type),p=e.filename,m=e.monacoEditor,g=e.className,v=e.style,b=e.close,y=e.onClose,E=e.hasMask,x=Object(s.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),_=Object(o.a)(x,2),k=(_[0],_[1],Object(s.useState)("")),w=Object(o.a)(k,2),C=(w[0],w[1]),S=Object(s.useRef)();p&&(m.filename=p),Object(s.useEffect)((function(){var e,t,n=null===(e=document.cookie)||void 0===e||null===(t=e.replace(/\s/g,""))||void 0===t?void 0:t.split(";");null==n||n.map((function(e){var t=e.split("=");"_educoder_session"===t[0]&&C(t[1])}))}),[]);var O=function(){n.startsWith("http")||n.startsWith("/")?A():Object(f.x)(p||"educoder",n,p)},A=function(){Object(f.v)(p||t,n)};return console.log("data:",n,"fileanme:",p," name:",t),l.a.createElement("div",{style:Object(a.a)({},v||{}),className:"".concat(E&&u.a.bgBlack," ").concat(c?u.a.wrp:"hide")},b&&l.a.createElement("div",{className:u.a.close,ref:S},l.a.createElement(i.a,{title:"点击下载此文件",getPopupContainer:function(){return S.current}},l.a.createElement("span",{onClick:A},l.a.createElement("i",{className:"icon-quxiaozhiding"}))),l.a.createElement(i.a,{title:"关闭",getPopupContainer:function(){return S.current}},l.a.createElement("span",{className:"",onClick:y},l.a.createElement("i",{className:"icon-guanbi1"})))),l.a.createElement("div",{className:"".concat(u.a[g]," ").concat(g," ").concat(u.a.monaco," ").concat("txt"===c?"show":"hide")},"txt"===c&&l.a.createElement(h.b,m)),"audio"===c&&l.a.createElement("audio",{src:"".concat(null!=n&&n.startsWith("/")||(null==n?void 0:n.indexOf("https://"))>-1?n:"data:audio/mp3;base64,").concat(n),autoPlay:!0}),"video"===c&&l.a.createElement(l.a.Fragment,null,null!=n&&n.startsWith("/")?l.a.createElement("video",{controls:!0,src:"".concat(n),autoPlay:!0}):l.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(n),autoPlay:!0})),"html"===c&&l.a.createElement("iframe",{src:n+"&disposition=inline"}),"pdf"===c&&l.a.createElement("embed",{className:u.a.embed,src:n}),"pdfeditor"===c&&l.a.createElement("div",null,l.a.createElement("iframe",{src:"https://a1office.co/solutions/editor/pdf-editor/查重文档1-8839d79b81e8bda0d298ca058913ab88.pdf"}),l.a.createElement("div",{style:{position:"absolute",left:"1px",top:"1px",width:180,height:60,background:"#f9f9f9"}})),"image"===c&&l.a.createElement(l.a.Fragment,null,l.a.createElement("img",{src:"".concat(null!=n&&n.startsWith("/")||(null==n?void 0:n.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(n)})),"other"===c&&l.a.createElement("div",null,l.a.createElement(r.a,{type:"primary",size:"large",onClick:O},l.a.createElement(d.a,null),"点击下载")),("download"===c||"office"===c)&&l.a.createElement(r.a,{type:"primary",size:"large",onClick:O},l.a.createElement(d.a,null),"点击下载"))}},"p77/":
|
|
|
/*!****************************************************!*\
|
|
|
!*** ./node_modules/codemirror/lib/codemirror.css ***!
|
|
|
\****************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},pzxd:
|
|
|
/*!*********************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/helper/text.js ***!
|
|
|
\*********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../../core/util */"bYtY"),i=r.retrieve2,a=r.retrieve3,o=r.each,s=r.normalizeCssArray,l=r.isString,c=r.isObject,u=n(/*! ../../contain/text */"6GrX"),d=n(/*! ./roundRect */"VpOo"),h=n(/*! ./image */"Xnb7"),f=n(/*! ./fixShadow */"fW2E"),p=n(/*! ../constant */"gut8"),m=p.ContextCachedBy,g=p.WILL_BE_RESTORED,v=u.DEFAULT_FONT,b={left:1,right:1,center:1},y={top:1,bottom:1,middle:1},E=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],x={},_={};function k(e){if(e){e.font=u.makeFont(e);var t=e.textAlign;"middle"===t&&(t="center"),e.textAlign=null==t||b[t]?t:"left";var n=e.textVerticalAlign||e.textBaseline;"center"===n&&(n="middle"),e.textVerticalAlign=null==n||y[n]?n:"top",e.textPadding&&(e.textPadding=s(e.textPadding))}}function w(e,t,n,r,i){if(n&&t.textRotation){var a=t.textOrigin;"center"===a?(r=n.width/2+n.x,i=n.height/2+n.y):a&&(r=a[0]+n.x,i=a[1]+n.y),e.translate(r,i),e.rotate(-t.textRotation),e.translate(-r,-i)}}function C(e,t,n,r,o,s,l,c){var u=r.rich[n.styleName]||{};u.text=n.text;var d=n.textVerticalAlign,h=s+o/2;"top"===d?h=s+n.height/2:"bottom"===d&&(h=s+o-n.height/2),!n.isLineHolder&&S(u)&&O(e,t,u,"right"===c?l-n.width:"center"===c?l-n.width/2:l,h-n.height/2,n.width,n.height);var f=n.textPadding;f&&(l=N(l,c,f),h-=n.height/2-f[2]-n.textHeight/2),I(t,"shadowBlur",a(u.textShadowBlur,r.textShadowBlur,0)),I(t,"shadowColor",u.textShadowColor||r.textShadowColor||"transparent"),I(t,"shadowOffsetX",a(u.textShadowOffsetX,r.textShadowOffsetX,0)),I(t,"shadowOffsetY",a(u.textShadowOffsetY,r.textShadowOffsetY,0)),I(t,"textAlign",c),I(t,"textBaseline","middle"),I(t,"font",n.font||v);var p=D(u.textStroke||r.textStroke,g),m=L(u.textFill||r.textFill),g=i(u.textStrokeWidth,r.textStrokeWidth);p&&(I(t,"lineWidth",g),I(t,"strokeStyle",p),t.strokeText(n.text,l,h)),m&&(I(t,"fillStyle",m),t.fillText(n.text,l,h))}function S(e){return!!(e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor)}function O(e,t,n,r,i,a,o){var s=n.textBackgroundColor,u=n.textBorderWidth,f=n.textBorderColor,p=l(s);if(I(t,"shadowBlur",n.textBoxShadowBlur||0),I(t,"shadowColor",n.textBoxShadowColor||"transparent"),I(t,"shadowOffsetX",n.textBoxShadowOffsetX||0),I(t,"shadowOffsetY",n.textBoxShadowOffsetY||0),p||u&&f){t.beginPath();var m=n.textBorderRadius;m?d.buildPath(t,{x:r,y:i,width:a,height:o,r:m}):t.rect(r,i,a,o),t.closePath()}if(p)if(I(t,"fillStyle",s),null!=n.fillOpacity){var g=t.globalAlpha;t.globalAlpha=n.fillOpacity*n.opacity,t.fill(),t.globalAlpha=g}else t.fill();else if(c(s)){var v=s.image;(v=h.createOrUpdateImage(v,null,e,A,s))&&h.isImageReady(v)&&t.drawImage(v,r,i,a,o)}if(u&&f)if(I(t,"lineWidth",u),I(t,"strokeStyle",f),null!=n.strokeOpacity){g=t.globalAlpha;t.globalAlpha=n.strokeOpacity*n.opacity,t.stroke(),t.globalAlpha=g}else t.stroke()}function A(e,t){t.image=e}function T(e,t,n,r){var i=n.x||0,a=n.y||0,o=n.textAlign,s=n.textVerticalAlign;if(r){var l=n.textPosition;if(l instanceof Array)i=r.x+R(l[0],r.width),a=r.y+R(l[1],r.height);else{var c=t&&t.calculateTextPosition?t.calculateTextPosition(x,n,r):u.calculateTextPosition(x,n,r);i=c.x,a=c.y,o=o||c.textAlign,s=s||c.textVerticalAlign}var d=n.textOffset;d&&(i+=d[0],a+=d[1])}return(e=e||{}).baseX=i,e.baseY=a,e.textAlign=o,e.textVerticalAlign=s,e}function I(e,t,n){return e[t]=f(e,t,n),e[t]}function D(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function L(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function R(e,t){return"string"==typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function N(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}t.normalizeTextStyle=function(e){return k(e),o(e.rich,k),e},t.renderText=function(e,t,n,r,i,a){r.rich?function(e,t,n,r,i,a){a!==g&&(t.__attrCachedBy=m.NONE);var o=e.__textCotentBlock;o&&!e.__dirtyText||(o=e.__textCotentBlock=u.parseRichText(n,r));!function(e,t,n,r,i){var a=n.width,o=n.outerWidth,s=n.outerHeight,l=r.textPadding,c=T(_,e,r,i),d=c.baseX,h=c.baseY,f=c.textAlign,p=c.textVerticalAlign;w(t,r,i,d,h);var m=u.adjustTextX(d,o,f),g=u.adjustTextY(h,s,p),v=m,b=g;l&&(v+=l[3],b+=l[0]);var y=v+a;S(r)&&O(e,t,r,m,g,o,s);for(var E=0;E<n.lines.length;E++){for(var x,k=n.lines[E],A=k.tokens,I=A.length,D=k.lineHeight,L=k.width,R=0,N=v,j=y,M=I-1;R<I&&(!(x=A[R]).textAlign||"left"===x.textAlign);)C(e,t,x,r,D,b,N,"left"),L-=x.width,N+=x.width,R++;for(;M>=0&&"right"===(x=A[M]).textAlign;)C(e,t,x,r,D,b,j,"right"),L-=x.width,j-=x.width,M--;for(N+=(a-(N-v)-(y-j)-L)/2;R<=M;)x=A[R],C(e,t,x,r,D,b,N+x.width/2,"center"),N+=x.width,R++;b+=D}}(e,t,o,r,i)}(e,t,n,r,i,a):function(e,t,n,r,i,a){"use strict";var o,s=S(r),l=!1,c=t.__attrCachedBy===m.PLAIN_TEXT;a!==g?(a&&(o=a.style,l=!s&&c&&o),t.__attrCachedBy=s?m.NONE:m.PLAIN_TEXT):c&&(t.__attrCachedBy=m.NONE);var d=r.font||v;l&&d===(o.font||v)||(t.font=d);var h=e.__computedFont;e.__styleFont!==d&&(e.__styleFont=d,h=e.__computedFont=t.font);var p=r.textPadding,b=r.textLineHeight,y=e.__textCotentBlock;y&&!e.__dirtyText||(y=e.__textCotentBlock=u.parsePlainText(n,h,p,b,r.truncate));var x=y.outerHeight,k=y.lines,C=y.lineHeight,A=T(_,e,r,i),I=A.baseX,R=A.baseY,j=A.textAlign||"left",M=A.textVerticalAlign;w(t,r,i,I,R);var P=u.adjustTextY(R,x,M),B=I,F=P;if(s||p){var U=u.getWidth(n,h);p&&(U+=p[1]+p[3]);var H=u.adjustTextX(I,U,j);s&&O(e,t,r,H,P,U,x),p&&(B=N(I,j,p),F+=p[0])}t.textAlign=j,t.textBaseline="middle",t.globalAlpha=r.opacity||1;for(var z=0;z<E.length;z++){var G=E[z],V=G[0],W=G[1],K=r[V];l&&K===o[V]||(t[W]=f(t,W,K||G[2]))}F+=C/2;var q=r.textStrokeWidth,Y=l?o.textStrokeWidth:null,Q=!l||q!==Y,J=!l||Q||r.textStroke!==o.textStroke,X=D(r.textStroke,q),Z=L(r.textFill);X&&(Q&&(t.lineWidth=q),J&&(t.strokeStyle=X));Z&&(l&&r.textFill===o.textFill||(t.fillStyle=Z));if(1===k.length)X&&t.strokeText(k[0],B,F),Z&&t.fillText(k[0],B,F);else for(z=0;z<k.length;z++)X&&t.strokeText(k[z],B,F),Z&&t.fillText(k[z],B,F),F+=C}(e,t,n,r,i,a)},t.getBoxPosition=T,t.getStroke=D,t.getFill=L,t.parsePercent=R,t.needDrawText=function(e,t){return null!=e&&(e||t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor||t.textPadding)}},qH13:
|
|
|
/*!*************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/vml/graphic.js ***!
|
|
|
\*************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/env */"ItGF"),i=n(/*! ../core/vector */"QBsz").applyTransform,a=n(/*! ../core/BoundingRect */"mFDi"),o=n(/*! ../tool/color */"Qe9p"),s=n(/*! ../contain/text */"6GrX"),l=n(/*! ../graphic/helper/text */"pzxd"),c=n(/*! ../graphic/mixin/RectText */"ni6a"),u=n(/*! ../graphic/Displayable */"Gev7"),d=n(/*! ../graphic/Image */"Dagg"),h=n(/*! ../graphic/Text */"dqUG"),f=n(/*! ../graphic/Path */"y+Vt"),p=n(/*! ../core/PathProxy */"IMiH"),m=n(/*! ../graphic/Gradient */"QuXc"),g=n(/*! ./core */"06Qe"),v=p.CMD,b=Math.round,y=Math.sqrt,E=Math.abs,x=Math.cos,_=Math.sin,k=Math.max;if(!r.canvasSupported){var w=21600,C=w/2,S=function(e){e.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",e.coordsize=w+","+w,e.coordorigin="0,0"},O=function(e,t,n){return"rgb("+[e,t,n].join(",")+")"},A=function(e,t){t&&e&&t.parentNode!==e&&e.appendChild(t)},T=function(e,t){t&&e&&t.parentNode===e&&e.removeChild(t)},I=function(e,t,n){return 1e5*(parseFloat(e)||0)+1e3*(parseFloat(t)||0)+n},D=l.parsePercent,L=function(e,t,n){var r=o.parse(t);n=+n,isNaN(n)&&(n=1),r&&(e.color=O(r[0],r[1],r[2]),e.opacity=n*r[3])},R=function(e,t,n,r){var a="fill"===t,s=e.getElementsByTagName(t)[0];null!=n[t]&&"none"!==n[t]&&(a||!a&&n.lineWidth)?(e[a?"filled":"stroked"]="true",n[t]instanceof m&&T(e,s),s||(s=g.createNode(t)),a?function(e,t,n){var r,a,s=t.fill;if(null!=s)if(s instanceof m){var l,c=0,u=[0,0],d=0,h=1,f=n.getBoundingRect(),p=f.width,g=f.height;if("linear"===s.type){l="gradient";var v=n.transform,b=[s.x*p,s.y*g],y=[s.x2*p,s.y2*g];v&&(i(b,b,v),i(y,y,v));var E=y[0]-b[0],x=y[1]-b[1];(c=180*Math.atan2(E,x)/Math.PI)<0&&(c+=360),c<1e-6&&(c=0)}else{l="gradientradial";b=[s.x*p,s.y*g],v=n.transform;var _=n.scale,C=p,S=g;u=[(b[0]-f.x)/C,(b[1]-f.y)/S],v&&i(b,b,v),C/=_[0]*w,S/=_[1]*w;var A=k(C,S);d=0/A,h=2*s.r/A-d}var T=s.colorStops.slice();T.sort((function(e,t){return e.offset-t.offset}));for(var I=T.length,D=[],R=[],N=0;N<I;N++){var j=T[N],M=(r=j.color,a=void 0,a=o.parse(r),[O(a[0],a[1],a[2]),a[3]]);R.push(j.offset*h+d+" "+M[0]),0!==N&&N!==I-1||D.push(M)}if(I>=2){var P=D[0][0],B=D[1][0],F=D[0][1]*t.opacity,U=D[1][1]*t.opacity;e.type=l,e.method="none",e.focus="100%",e.angle=c,e.color=P,e.color2=B,e.colors=R.join(","),e.opacity=U,e.opacity2=F}"radial"===l&&(e.focusposition=u.join(","))}else L(e,s,t.opacity)}(s,n,r):function(e,t){t.lineDash&&(e.dashstyle=t.lineDash.join(" ")),null==t.stroke||t.stroke instanceof m||L(e,t.stroke,t.opacity)}(s,n),A(e,s)):(e[a?"filled":"stroked"]="false",T(e,s))},N=[[],[],[]];f.prototype.brushVML=function(e){var t=this.style,n=this._vmlEl;n||(n=g.createNode("shape"),S(n),this._vmlEl=n),R(n,"fill",t,this),R(n,"stroke",t,this);var r=this.transform,a=null!=r,o=n.getElementsByTagName("stroke")[0];if(o){var s=t.lineWidth;if(a&&!t.strokeNoScale){var l=r[0]*r[3]-r[1]*r[2];s*=y(E(l))}o.weight=s+"px"}var c=this.path||(this.path=new p);this.__dirtyPath&&(c.beginPath(),c.subPixelOptimize=!1,this.buildPath(c,this.shape),c.toStatic(),this.__dirtyPath=!1),n.path=function(e,t){var n,r,a,o,s,l,c=v.M,u=v.C,d=v.L,h=v.A,f=v.Q,p=[],m=e.data,g=e.len();for(o=0;o<g;){switch(r="",n=0,a=m[o++]){case c:r=" m ",n=1,s=m[o++],l=m[o++],N[0][0]=s,N[0][1]=l;break;case d:r=" l ",n=1,s=m[o++],l=m[o++],N[0][0]=s,N[0][1]=l;break;case f:case u:r=" c ",n=3;var E,k,S=m[o++],O=m[o++],A=m[o++],T=m[o++];a===f?(E=A,k=T,A=(A+2*S)/3,T=(T+2*O)/3,S=(s+2*S)/3,O=(l+2*O)/3):(E=m[o++],k=m[o++]),N[0][0]=S,N[0][1]=O,N[1][0]=A,N[1][1]=T,N[2][0]=E,N[2][1]=k,s=E,l=k;break;case h:var I=0,D=0,L=1,R=1,j=0;t&&(I=t[4],D=t[5],L=y(t[0]*t[0]+t[1]*t[1]),R=y(t[2]*t[2]+t[3]*t[3]),j=Math.atan2(-t[1]/R,t[0]/L));var M=m[o++],P=m[o++],B=m[o++],F=m[o++],U=m[o++]+j,H=m[o++]+U+j;o++;var z=m[o++],G=M+x(U)*B,V=P+_(U)*F,W=(S=M+x(H)*B,O=P+_(H)*F,z?" wa ":" at ");Math.abs(G-S)<1e-4&&(Math.abs(H-U)>.01?z&&(G+=.0125):Math.abs(V-P)<1e-4?z&&G<M||!z&&G>M?O-=.0125:O+=.0125:z&&V<P||!z&&V>P?S+=.0125:S-=.0125),p.push(W,b(((M-B)*L+I)*w-C),",",b(((P-F)*R+D)*w-C),",",b(((M+B)*L+I)*w-C),",",b(((P+F)*R+D)*w-C),",",b((G*L+I)*w-C),",",b((V*R+D)*w-C),",",b((S*L+I)*w-C),",",b((O*R+D)*w-C)),s=S,l=O;break;case v.R:var K=N[0],q=N[1];K[0]=m[o++],K[1]=m[o++],q[0]=K[0]+m[o++],q[1]=K[1]+m[o++],t&&(i(K,K,t),i(q,q,t)),K[0]=b(K[0]*w-C),q[0]=b(q[0]*w-C),K[1]=b(K[1]*w-C),q[1]=b(q[1]*w-C),p.push(" m ",K[0],",",K[1]," l ",q[0],",",K[1]," l ",q[0],",",q[1]," l ",K[0],",",q[1]);break;case v.Z:p.push(" x ")}if(n>0){p.push(r);for(var Y=0;Y<n;Y++){var Q=N[Y];t&&i(Q,Q,t),p.push(b(Q[0]*w-C),",",b(Q[1]*w-C),Y<n-1?",":"")}}}return p.join("")}(c,this.transform),n.style.zIndex=I(this.zlevel,this.z,this.z2),A(e,n),null!=t.text?this.drawRectText(e,this.getBoundingRect()):this.removeRectText(e)},f.prototype.onRemove=function(e){T(e,this._vmlEl),this.removeRectText(e)},f.prototype.onAdd=function(e){A(e,this._vmlEl),this.appendRectText(e)};d.prototype.brushVML=function(e){var t,n,r,a=this.style,o=a.image;if("object"==typeof(r=o)&&r.tagName&&"IMG"===r.tagName.toUpperCase()){var s=o.src;if(s===this._imageSrc)t=this._imageWidth,n=this._imageHeight;else{var l=o.runtimeStyle,c=l.width,u=l.height;l.width="auto",l.height="auto",t=o.width,n=o.height,l.width=c,l.height=u,this._imageSrc=s,this._imageWidth=t,this._imageHeight=n}o=s}else o===this._imageSrc&&(t=this._imageWidth,n=this._imageHeight);if(o){var d=a.x||0,h=a.y||0,f=a.width,p=a.height,m=a.sWidth,v=a.sHeight,E=a.sx||0,x=a.sy||0,_=m&&v,w=this._vmlEl;w||(w=g.doc.createElement("div"),S(w),this._vmlEl=w);var C,O=w.style,T=!1,D=1,L=1;if(this.transform&&(C=this.transform,D=y(C[0]*C[0]+C[1]*C[1]),L=y(C[2]*C[2]+C[3]*C[3]),T=C[1]||C[2]),T){var R=[d,h],N=[d+f,h],j=[d,h+p],M=[d+f,h+p];i(R,R,C),i(N,N,C),i(j,j,C),i(M,M,C);var P=k(R[0],N[0],j[0],M[0]),B=k(R[1],N[1],j[1],M[1]),F=[];F.push("M11=",C[0]/D,",","M12=",C[2]/L,",","M21=",C[1]/D,",","M22=",C[3]/L,",","Dx=",b(d*D+C[4]),",","Dy=",b(h*L+C[5])),O.padding="0 "+b(P)+"px "+b(B)+"px 0",O.filter="progid:DXImageTransform.Microsoft.Matrix("+F.join("")+", SizingMethod=clip)"}else C&&(d=d*D+C[4],h=h*L+C[5]),O.filter="",O.left=b(d)+"px",O.top=b(h)+"px";var U=this._imageEl,H=this._cropEl;U||(U=g.doc.createElement("div"),this._imageEl=U);var z=U.style;if(_){if(t&&n)z.width=b(D*t*f/m)+"px",z.height=b(L*n*p/v)+"px";else{var G=new Image,V=this;G.onload=function(){G.onload=null,t=G.width,n=G.height,z.width=b(D*t*f/m)+"px",z.height=b(L*n*p/v)+"px",V._imageWidth=t,V._imageHeight=n,V._imageSrc=o},G.src=o}H||((H=g.doc.createElement("div")).style.overflow="hidden",this._cropEl=H);var W=H.style;W.width=b((f+E*f/m)*D),W.height=b((p+x*p/v)*L),W.filter="progid:DXImageTransform.Microsoft.Matrix(Dx="+-E*f/m*D+",Dy="+-x*p/v*L+")",H.parentNode||w.appendChild(H),U.parentNode!==H&&H.appendChild(U)}else z.width=b(D*f)+"px",z.height=b(L*p)+"px",w.appendChild(U),H&&H.parentNode&&(w.removeChild(H),this._cropEl=null);var K="",q=a.opacity;q<1&&(K+=".Alpha(opacity="+b(100*q)+") "),K+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+o+", SizingMethod=scale)",z.filter=K,w.style.zIndex=I(this.zlevel,this.z,this.z2),A(e,w),null!=a.text&&this.drawRectText(e,this.getBoundingRect())}},d.prototype.onRemove=function(e){T(e,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(e)},d.prototype.onAdd=function(e){A(e,this._vmlEl),this.appendRectText(e)};var j,M={},P=0,B=document.createElement("div");s.$override("measureText",(function(e,t){var n=g.doc;j||((j=n.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",g.doc.body.appendChild(j));try{j.style.font=t}catch(e){}return j.innerHTML="",j.appendChild(n.createTextNode(e)),{width:j.offsetWidth}}));for(var F=new a,U=function(e,t,n,r){var a=this.style;this.__dirty&&l.normalizeTextStyle(a,!0);var o=a.text;if(null!=o&&(o+=""),o){if(a.rich){var c=s.parseRichText(o,a);o=[];for(var u=0;u<c.lines.length;u++){for(var d=c.lines[u].tokens,h=[],f=0;f<d.length;f++)h.push(d[f].text);o.push(h.join(""))}o=o.join("\n")}var p,m,v=a.textAlign,y=a.textVerticalAlign,E=function(e){var t=M[e];if(!t){P>100&&(P=0,M={});var n,r=B.style;try{r.font=e,n=r.fontFamily.split(",")[0]}catch(e){}t={style:r.fontStyle||"normal",variant:r.fontVariant||"normal",weight:r.fontWeight||"normal",size:0|parseFloat(r.fontSize||12),family:n||"Microsoft YaHei"},M[e]=t,P++}return t}(a.font),x=E.style+" "+E.variant+" "+E.weight+" "+E.size+'px "'+E.family+'"';n=n||s.getBoundingRect(o,x,v,y,a.textPadding,a.textLineHeight);var _=this.transform;if(_&&!r&&(F.copy(t),F.applyTransform(_),t=F),r)p=t.x,m=t.y;else{var k=a.textPosition;if(k instanceof Array)p=t.x+D(k[0],t.width),m=t.y+D(k[1],t.height),v=v||"left";else{var w=this.calculateTextPosition?this.calculateTextPosition({},a,t):s.calculateTextPosition({},a,t);p=w.x,m=w.y,v=v||w.textAlign,y=y||w.textVerticalAlign}}p=s.adjustTextX(p,n.width,v),m=s.adjustTextY(m,n.height,y),m+=n.height/2;var C,O,T,L=g.createNode,N=this._textVmlEl;N?O=(C=(T=N.firstChild).nextSibling).nextSibling:(N=L("line"),C=L("path"),O=L("textpath"),T=L("skew"),O.style["v-text-align"]="left",S(N),C.textpathok=!0,O.on=!0,N.from="0 0",N.to="1000 0.05",A(N,T),A(N,C),A(N,O),this._textVmlEl=N);var j=[p,m],U=N.style;_&&r?(i(j,j,_),T.on=!0,T.matrix=_[0].toFixed(3)+","+_[2].toFixed(3)+","+_[1].toFixed(3)+","+_[3].toFixed(3)+",0,0",T.offset=(b(j[0])||0)+","+(b(j[1])||0),T.origin="0 0",U.left="0px",U.top="0px"):(T.on=!1,U.left=b(p)+"px",U.top=b(m)+"px"),O.string=String(o).replace(/&/g,"&").replace(/"/g,""");try{O.style.font=x}catch(e){}R(N,"fill",{fill:a.textFill,opacity:a.opacity},this),R(N,"stroke",{stroke:a.textStroke,opacity:a.opacity,lineDash:a.lineDash||null},this),N.style.zIndex=I(this.zlevel,this.z,this.z2),A(e,N)}},H=function(e){T(e,this._textVmlEl),this._textVmlEl=null},z=function(e){A(e,this._textVmlEl)},G=[c,u,d,f,h],V=0;V<G.length;V++){var W=G[V].prototype;W.drawRectText=U,W.removeRectText=H,W.appendRectText=z}h.prototype.brushVML=function(e){var t=this.style;null!=t.text?this.drawRectText(e,{x:t.x||0,y:t.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(e)},h.prototype.onRemove=function(e){this.removeRectText(e)},h.prototype.onAdd=function(e){this.appendRectText(e)}}},qgvg:
|
|
|
/*!**************************************!*\
|
|
|
!*** ./src/assets/images/notice.gif ***!
|
|
|
\**************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/gif;base64,R0lGODlhFAAQAOZVAD6Q33p6ezZto2VnaW5vcDuCxiYvNysvM1tdXzNij5eXlyg0QTA0OExOUWZnaS8zN19hYzFYf0Oi/Sg1QoeHh2JjZWZoaTdzrTRmljl5tzFZgDBWez6P3Tl4tjl8uzdxqWBiYys/VCUqL39/gHV2dy4yNScyPDJeiEpNTzk8P0CX6jc7PiYuNWlqaywwNDZtojAzNytDWScrLitAVUGb8Xl6eoWFhTp+wDNgjWRmZ4+QkFdZWzo9QIODgyo/Uzh3syg0QCczPmprbTRllW9wcSotMVJUVjZupDuEylBSVUGb8kxPUZGRkTd0rUGc82JkZUKe9j2M1zg7P4iIiEOj/yUpLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6N0U3Nzk1NkY5QkRGMTFFQUIzQzFDQjY5MEVFODZDMDciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6N0U3Nzk1NzA5QkRGMTFFQUIzQzFDQjY5MEVFODZDMDciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3RTc3OTU2RDlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3RTc3OTU2RTlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAUyAFUALAAAAAAUABAAAAd5gFWCg4RSLoSIiVUPFlNEhAwDCIoyST1TUwGCBwM6AweJPCSYmJpVCAMMgykgFRUtFKSlilVCsreZtAS4sqaJu7yzisDBvhAKyBDEvL6Iy7jNhA7BwoklKA0NRiO30bRFOzakpqiqtItPsTWbA0wWoOcrOUuEMA6TgQAh+QQFMgBVACwAAAAAFAAQAAAHeIBVgoOEISaEiIlVExlUSIQLAgmKIidOVFQAggYCNAIGiTFRmJiaVQkCC4MzHxcXHhKkpYpVN7K3mbQFuLKmibu8s4rAwb4YpBjEvL6IyrjMhB3BwolBGxEROCq30LQsQ1CkpqiqtItNsRybAkpHoOY+PxqEQC+TgQA7"},r6Bn:
|
|
|
/*!*********************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/Storage.js ***!
|
|
|
\*********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./core/util */"bYtY"),i=n(/*! ./core/env */"ItGF"),a=n(/*! ./container/Group */"4fz+"),o=n(/*! ./core/timsort */"BPZU");function s(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var l=function(){this._roots=[],this._displayList=[],this._displayListLen=0};l.prototype={constructor:l,traverse:function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},getDisplayList:function(e,t){return t=t||!1,e&&this.updateDisplayList(t),this._displayList},updateDisplayList:function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,a=t.length;r<a;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,i.canvasSupported&&o(n,s)},_updateAndAddDisplayable:function(e,t,n){if(!e.ignore||n){e.beforeUpdate(),e.__dirty&&e.update(),e.afterUpdate();var r=e.clipPath;if(r){t=t?t.slice():[];for(var i=r,a=e;i;)i.parent=a,i.updateTransform(),t.push(i),a=i,i=i.clipPath}if(e.isGroup){for(var o=e._children,s=0;s<o.length;s++){var l=o[s];e.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,t,n)}e.__dirty=!1}else e.__clipPaths=t,this._displayList[this._displayListLen++]=e}},addRoot:function(e){e.__storage!==this&&(e instanceof a&&e.addChildrenToStorage(this),this.addToStorage(e),this._roots.push(e))},delRoot:function(e){if(null==e){for(var t=0;t<this._roots.length;t++){var n=this._roots[t];n instanceof a&&n.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(e instanceof Array){t=0;for(var i=e.length;t<i;t++)this.delRoot(e[t])}else{var o=r.indexOf(this._roots,e);o>=0&&(this.delFromStorage(e),this._roots.splice(o,1),e instanceof a&&e.delChildrenFromStorage(this))}},addToStorage:function(e){return e&&(e.__storage=this,e.dirty(!1)),this},delFromStorage:function(e){return e&&(e.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:s};var c=l;e.exports=c},rA99:
|
|
|
/*!***************************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/shape/BezierCurve.js ***!
|
|
|
\***************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../Path */"y+Vt"),i=n(/*! ../../core/vector */"QBsz"),a=n(/*! ../../core/curve */"Sj9i"),o=a.quadraticSubdivide,s=a.cubicSubdivide,l=a.quadraticAt,c=a.cubicAt,u=a.quadraticDerivativeAt,d=a.cubicDerivativeAt,h=[];function f(e,t,n){var r=e.cpx2,i=e.cpy2;return null===r||null===i?[(n?d:c)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?d:c)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?u:l)(e.x1,e.cpx1,e.x2,t),(n?u:l)(e.y1,e.cpy1,e.y2,t)]}var p=r.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(e,t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2,l=t.cpx1,c=t.cpy1,u=t.cpx2,d=t.cpy2,f=t.percent;0!==f&&(e.moveTo(n,r),null==u||null==d?(f<1&&(o(n,l,i,f,h),l=h[1],i=h[2],o(r,c,a,f,h),c=h[1],a=h[2]),e.quadraticCurveTo(l,c,i,a)):(f<1&&(s(n,l,u,i,f,h),l=h[1],u=h[2],i=h[3],s(r,c,d,a,f,h),c=h[1],d=h[2],a=h[3]),e.bezierCurveTo(l,c,u,d,i,a)))},pointAt:function(e){return f(this.shape,e,!1)},tangentAt:function(e){var t=f(this.shape,e,!0);return i.normalize(t,t)}});e.exports=p},"rAM+":
|
|
|
/*!*******************************************************************************************************************!*\
|
|
|
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js ***!
|
|
|
\*******************************************************************************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(/*! @babel/runtime/helpers/esm/unsupportedIterableToArray */"Qw5x");function i(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=Object(r.a)(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,a=function(){};return{s:a,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw o}}}}},rUJ1:
|
|
|
/*!********************************************!*\
|
|
|
!*** ./node_modules/marked/src/helpers.js ***!
|
|
|
\********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: escape */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){const n=/[&<>"']/,r=/[&<>"']/g,i=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},s=e=>o[e];const l=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function c(e){return e.replace(l,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")}const u=/(^|[^\[])\^/g;const d=/[^\w:]/g,h=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const f={},p=/^[^:]+:\/*[^/]*$/,m=/^([^:]+:)[\s\S]*$/,g=/^([^:]+:\/*[^/]*)[\s\S]*$/;function v(e,t){f[" "+e]||(p.test(e)?f[" "+e]=e+"/":f[" "+e]=b(e,"/",!0));const n=-1===(e=f[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(m,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(g,"$1")+t:e+t}function b(e,t,n){const r=e.length;if(0===r)return"";let i=0;for(;i<r;){const a=e.charAt(r-i-1);if(a!==t||n){if(a===t||!n)break;i++}else i++}return e.substr(0,r-i)}e.exports={escape:function(e,t){if(t){if(n.test(e))return e.replace(r,s)}else if(i.test(e))return e.replace(a,s);return e},unescape:c,edit:function(e,t){e=e.source||e,t=t||"";const n={replace:(t,r)=>(r=(r=r.source||r).replace(u,"$1"),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n},cleanUrl:function(e,t,n){if(e){let e;try{e=decodeURIComponent(c(n)).replace(d,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!h.test(n)&&(n=v(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n},resolveUrl:v,noopTest:{exec:function(){}},merge:function(e){let t,n,r=1;for(;r<arguments.length;r++)for(n in t=arguments[r],t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},splitCells:function(e,t){const n=e.replace(/\|/g,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(/ \|/);let r=0;if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n},rtrim:b,findClosingBracket:function(e,t){if(-1===e.indexOf(t[1]))return-1;const n=e.length;let r=0,i=0;for(;i<n;i++)if("\\"===e[i])i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return-1},checkSanitizeDeprecation:function(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}}},rcnY:
|
|
|
/*!*******************************************!*\
|
|
|
!*** ./node_modules/qr.js/lib/RSBlock.js ***!
|
|
|
\*******************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./ErrorCorrectLevel */"aRTE");function i(e,t){this.totalCount=e,this.dataCount=t}i.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],i.getRSBlocks=function(e,t){var n=i.getRsBlockTable(e,t);if(null==n)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var r=n.length/3,a=new Array,o=0;o<r;o++)for(var s=n[3*o+0],l=n[3*o+1],c=n[3*o+2],u=0;u<s;u++)a.push(new i(l,c));return a},i.getRsBlockTable=function(e,t){switch(t){case r.L:return i.RS_BLOCK_TABLE[4*(e-1)+0];case r.M:return i.RS_BLOCK_TABLE[4*(e-1)+1];case r.Q:return i.RS_BLOCK_TABLE[4*(e-1)+2];case r.H:return i.RS_BLOCK_TABLE[4*(e-1)+3];default:return}},e.exports=i},rmlV:
|
|
|
/*!***********************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/shape/Ellipse.js ***!
|
|
|
\***********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../Path */"y+Vt").extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(e,t){var n=.5522848,r=t.cx,i=t.cy,a=t.rx,o=t.ry,s=a*n,l=o*n;e.moveTo(r-a,i),e.bezierCurveTo(r-a,i-l,r-s,i-o,r,i-o),e.bezierCurveTo(r+s,i-o,r+a,i-l,r+a,i),e.bezierCurveTo(r+a,i+l,r+s,i+o,r,i+o),e.bezierCurveTo(r-s,i+o,r-a,i+l,r-a,i),e.closePath()}});e.exports=r},sDPU:
|
|
|
/*!*************************************************************!*\
|
|
|
!*** ./src/pages/Paperlibrary/Random/PreviewEdit/index.tsx ***!
|
|
|
\*************************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/.umi-production/core/routes.ts (referenced with import()) */function(e,t,n){"use strict";n.r(t);n(/*! antd/es/skeleton/style */"cWXX");var r=n(/*! antd/es/skeleton */"/ezw"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),l=n.n(s),c=n(/*! react */"q1tI"),u=n.n(c),d=n(/*! umi */"Ty5D"),h=n(/*! umi */"9kvl"),f=n(/*! ./index.less?modules */"FIWC"),p=n.n(f),m=n(/*! @/pages/Paperlibrary/Random/AddAndEdit/components/StepPreview */"sbIO"),g=n(/*! @/utils/fetch */"ErOA"),v=n(/*! lodash */"LvDl");t.default=Object(h.a)((function(e){return{paperlibrary:e.paperlibrary,user:e.user,globalSetting:e.globalSetting}}))((function(e){e.paperlibrary;var t,n,s,f,b=e.user,y=(e.globalSetting,e.dispatch),E=e.location,x=(null==E||null===(t=E.query)||void 0===t?void 0:t.select)||0,_=Object(c.useState)(!1),k=Object(o.a)(_,2),w=k[0],C=(k[1],Object(c.useState)(!0)),S=Object(o.a)(C,2),O=S[0],A=S[1],T=Object(c.useState)(Number(x)),I=Object(o.a)(T,2),D=I[0],L=I[1],R=Object(c.useState)({}),N=Object(o.a)(R,2),j=N[0],M=N[1],P=Object(d.i)(),B=b.userInfo;Object(c.useEffect)((function(){return y({type:"globalSetting/footerToggle",payload:!1}),function(){y({type:"globalSetting/footerToggle",payload:!0})}}),[]),Object(c.useEffect)((function(){return y({type:"globalSetting/onlyShowBackTopToggle",payload:!1}),y({type:"globalSetting/onlyShowBackTopIconToggle",payload:!1}),function(){y({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),y({type:"globalSetting/onlyShowBackTopIconToggle",payload:!0})}}),[]),Object(c.useEffect)((function(){return document.body.setAttribute("data-custom","initial"),function(){document.body.removeAttribute("data-custom")}}),[]),Object(c.useEffect)((function(){F(D)}),[]);var F=function(){var e=Object(a.a)(l.a.mark((function e(){var t,n,r=arguments;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:0,console.log(P),e.next=4,Object(g.a)("/api/exercises/".concat(P.categoryId,"/preview_random_exercise.json"),{method:"get",params:{num:t}});case 4:n=e.sent,A(!1),M(U(n));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),U=function(e){var t={1:"一",2:"二",3:"三",4:"四",5:"五",6:"六",7:"七"};if(e){var n=e||{},r=n.exam,a=n.single_questions,o=n.multiple_questions,s=n.judgement_questions,l=n.program_questions,c=n.completion_questions,u=n.subjective_questions,d=n.practical_questions,h=n.combination_questions,f=n.fileupload_questions,p=n.photograph_questions,m=[Object(i.a)({type:"SINGLE",name:"单选题"},a),Object(i.a)({type:"MULTIPLE",name:"多选题"},o),Object(i.a)({type:"COMPLETION",name:"填空题"},c),Object(i.a)({type:"JUDGMENT",name:"判断题"},s),Object(i.a)({type:"SUBJECTIVE",name:"简答题"},u),Object(i.a)({type:"PROGRAM",name:"编程题"},l),Object(i.a)({type:"SUBJECTIVE",name:"文件上传题"},f),Object(i.a)({type:"SUBJECTIVE",name:"拍照上传题"},p),Object(i.a)({type:"PRACTICAL",name:"实训题"},d),Object(i.a)({type:"COMBINATION",name:"接龙题"},h)],g=[],v=0,b=0,y=m.filter((function(e){return e.questions_count>0})).map((function(e,n){var r;return null===(r=e.questions)||void 0===r||r.forEach((function(e){g.push(e.id),v+=e.score,b+=1})),Object(i.a)(Object(i.a)({},e),{number:t[n+1]})}));return{all_questions_count:b,all_score:v,questionList:y,ids:g,exam:r}}},H=function(){var e=Object(a.a)(l.a.mark((function e(t,n){var r,a,o;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(g.a)("/api/exercises/".concat(P.categoryId,"/toggle_random_question.json"),{method:"post",body:{question_id:null==t?void 0:t.single_question_id,type:null==t?void 0:t.type}});case 2:null!=(r=e.sent)&&r.question&&((o=Object(v.cloneDeep)(j)).questionList=null==o||null===(a=o.questionList)||void 0===a?void 0:a.map((function(e){if(e.type===n.type){var t=Object(v.cloneDeep)(null==e?void 0:e.questions);return t.splice(n.index,1,null==r?void 0:r.question),Object(i.a)(Object(i.a)({},e),{},{questions:t})}return e})),M(o));case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),z=function(){var e=Object(a.a)(l.a.mark((function e(t){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:document.body.scrollIntoView(),F(t),L(t);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return console.log(Object(d.h)(),"location333"),u.a.createElement("section",{className:p.a.wrap},u.a.createElement(r.a,{loading:O,active:!0,paragraph:{rows:5}},(null===(n=Object(d.h)())||void 0===n||null===(s=n.pathname)||void 0===s?void 0:s.includes("preview"))&&u.a.createElement("div",{className:p.a.crumbs},u.a.createElement("b",null),u.a.createElement("span",{className:"current",onClick:function(){return h.d.push("/classrooms/".concat(P.coursesId,"/exercise"))}},"".concat(null==B||null===(f=B.course)||void 0===f?void 0:f.course_name,">")),u.a.createElement("span",{className:"current",onClick:function(){return h.d.push("/classrooms/".concat(P.coursesId,"/exercise"))}},"试卷列表>"),u.a.createElement("span",{style:{color:"#bebebe"}},"预览")),u.a.createElement(m.a,{loading:w,submit:function(){alert("保存")},goBack:function(){h.d.push("/classrooms/".concat(P.coursesId,"/exercise"))},data:j,selectValue:D,editPreview:!0,onExchange:H,onSkipExamination:z})))}))},sR1s:
|
|
|
/*!*****************************************************!*\
|
|
|
!*** ./node_modules/rc-table/es/utils/valueUtil.js ***!
|
|
|
\*****************************************************/
|
|
|
/*! exports provided: getPathValue, getColumnsKey, mergeObject, validateValue */
|
|
|
/*! exports used: getColumnsKey, getPathValue, mergeObject, validateValue */function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return l}));var r=n(/*! @babel/runtime/helpers/esm/typeof */"U8pU");function i(e){return null==e?[]:Array.isArray(e)?e:[e]}function a(e,t){if(!t&&"number"!=typeof t)return e;for(var n=i(t),r=e,a=0;a<n.length;a+=1){if(!r)return null;r=r[n[a]]}return r}function o(e){var t=[],n={};return e.forEach((function(e){for(var r=e||{},a=r.key,o=r.dataIndex,s=a||i(o).join("-")||"RC_TABLE_KEY";n[s];)s="".concat(s,"_next");n[s]=!0,t.push(s)})),t}function s(){var e={};function t(e,n){n&&Object.keys(n).forEach((function(i){var a=n[i];a&&"object"===Object(r.a)(a)?(e[i]=e[i]||{},t(e[i],a)):e[i]=a}))}for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return i.forEach((function(n){t(e,n)})),e}function l(e){return null!=e}},"sW+o":
|
|
|
/*!****************************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/svg/helper/GradientManager.js ***!
|
|
|
\****************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./Definable */"SrGk"),i=n(/*! ../../core/util */"bYtY"),a=n(/*! ../../core/log */"SUKs"),o=n(/*! ../../tool/color */"Qe9p");function s(e,t){r.call(this,e,t,["linearGradient","radialGradient"],"__gradient_in_use__")}i.inherits(s,r),s.prototype.addWithoutUpdate=function(e,t){if(t&&t.style){var n=this;i.each(["fill","stroke"],(function(r){if(t.style[r]&&("linear"===t.style[r].type||"radial"===t.style[r].type)){var i,a=t.style[r],o=n.getDefs(!0);a._dom?(i=a._dom,o.contains(a._dom)||n.addDom(i)):i=n.add(a),n.markUsed(t);var s=i.getAttribute("id");e.setAttribute(r,"url(#"+s+")")}}))}},s.prototype.add=function(e){var t;if("linear"===e.type)t=this.createElement("linearGradient");else{if("radial"!==e.type)return a("Illegal gradient type."),null;t=this.createElement("radialGradient")}return e.id=e.id||this.nextId++,t.setAttribute("id","zr"+this._zrId+"-gradient-"+e.id),this.updateDom(e,t),this.addDom(t),t},s.prototype.update=function(e){var t=this;r.prototype.update.call(this,e,(function(){var n=e.type,r=e._dom.tagName;"linear"===n&&"linearGradient"===r||"radial"===n&&"radialGradient"===r?t.updateDom(e,e._dom):(t.removeDom(e),t.add(e))}))},s.prototype.updateDom=function(e,t){if("linear"===e.type)t.setAttribute("x1",e.x),t.setAttribute("y1",e.y),t.setAttribute("x2",e.x2),t.setAttribute("y2",e.y2);else{if("radial"!==e.type)return void a("Illegal gradient type.");t.setAttribute("cx",e.x),t.setAttribute("cy",e.y),t.setAttribute("r",e.r)}e.global?t.setAttribute("gradientUnits","userSpaceOnUse"):t.setAttribute("gradientUnits","objectBoundingBox"),t.innerHTML="";for(var n=e.colorStops,r=0,i=n.length;r<i;++r){var s=this.createElement("stop");s.setAttribute("offset",100*n[r].offset+"%");var l=n[r].color;if(l.indexOf(!1)){var c=o.parse(l)[3],u=o.toHex(l);s.setAttribute("stop-color","#"+u),s.setAttribute("stop-opacity",c)}else s.setAttribute("stop-color",n[r].color);t.appendChild(s)}e._dom=t},s.prototype.markUsed=function(e){if(e.style){var t=e.style.fill;t&&t._dom&&r.prototype.markUsed.call(this,t._dom),(t=e.style.stroke)&&t._dom&&r.prototype.markUsed.call(this,t._dom)}};var l=s;e.exports=l},sbIO:
|
|
|
/*!***********************************************************************************************!*\
|
|
|
!*** ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepPreview/index.tsx + 6 modules ***!
|
|
|
\***********************************************************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepPreview/components/editor.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepPreview/index.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/umiExports.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/Editor/NullChildEditor/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/Editor/NullMDEditor.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/index.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/paper/bi.svg (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/paper/jinshi.svg (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/paper/xixi.svg (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/paper/zhong.svg (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/checkbox/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/checkbox/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/divider/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/divider/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/pagination/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/pagination/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/popover/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/popover/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/lodash.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router/esm/react-router.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n("DjyN");var r=n("NUBc"),i=(n("5Dmo"),n("3S7+")),a=(n("/zsF"),n("PArb")),o=(n("Q9mQ"),n("diRs")),s=(n("+L6B"),n("2/Rp")),l=(n("7Kak"),n("9yH6")),c=(n("5NDa"),n("5rEg")),u=(n("miYZ"),n("tsqr")),d=n("9og8"),h=(n("giR+"),n("fyUT")),f=(n("2qtc"),n("kLXV")),p=n("tJVT"),m=n("WmNS"),g=n.n(m),v=n("q1tI"),b=n.n(v),y=n("PsQE"),E=n.n(y),x=n("0eGx"),_=n.n(x),k=n("9Bee"),w=n("Ty5D"),C=n("9kvl"),S=n("ErOA"),O=n("+yhJ"),A=n.n(O),T=n("RZ/O"),I=n.n(T),D=n("LvDl"),L=n("6K3P"),R=n.n(L),N=(n("sRBo"),n("kaz8")),j=n("oBTY"),M=n("PpiC"),P=n("Ot1p"),B=n("kqOp"),F=n("7qnI"),U=n("1vsH"),H=n("PGNT"),z=n.n(H),G=function(e,t){e.globalSetting,e.loading,e.dispatch;var n=e.isEdit,r=e.editData,i=(Object(M.a)(e,["globalSetting","loading","dispatch","isEdit","editData"]),Object(v.useState)("")),a=Object(p.a)(i,2),o=a[0],s=a[1],l=Object(v.useState)(""),c=Object(p.a)(l,2),d=c[0],h=c[1],m=Object(v.useState)([]),g=Object(p.a)(m,2),y=g[0],E=g[1],x=Object(v.useState)(""),_=Object(p.a)(x,2),k=_[0],w=_[1],C=Object(v.useState)(),S=Object(p.a)(C,2),O=S[0],A=S[1],T=Object(v.useState)(!1),I=Object(p.a)(T,2),D=I[0],L=I[1];Object(v.useEffect)((function(){r&&n&&(s(null==r?void 0:r.name),h(null==r?void 0:r.analysis),A(null==r?void 0:r.is_ordered),L(!0))}),[r]),Object(v.useEffect)((function(){if(D){var e=null==r?void 0:r.standard_answer.map((function(e){return e.answer_text}));E(e),L(!1)}}),[D]),Object(v.useImperativeHandle)(t,(function(){return{onSave:R,Clear:H}}));var R=function(){var e=[],t=!1;return o?(y.forEach((function(n,r){e.push({position:r+1,answer_text:[]}),n.forEach((function(n,i){e[r].answer_text.push(n),n&&Object(U.bb)(n,1e4)||(w("".concat(r,"-").concat(i)),u.b.info(n?"答案不能超过10000字符":"答案:不能为空"),t=!0)}))})),!t&&((null==e?void 0:e.length)>20?(u.b.warn("填空题标准答案不能为空/不能超过20个!"),!1):{name:o,analysis:d,standard_answers:e,is_ordered:O})):(u.b.info("请您输入题干"),!1)},H=function(){s(""),h(""),E([]),A(!1)},G=function(e,t,n){w("");var r=y.slice();r[e][t]=n,E(r)},V=function(e){var t=y.slice();t[e]=[].concat(Object(j.a)(t[e]),[""]),E(t)},W=function(e,t){var n=y.slice();if(!n[e][t])return n[e]=n[e].filter((function(e,n){return n!==t})),void E(n);f.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:z.a.modal,onOk:function(){n[e]=n[e].filter((function(e,n){return n!==t})),E(n)}})},K=function(e){f.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:z.a.modal,onOk:function(){var t=y.slice();t=y.filter((function(t,n){return e!==n})),E(t)}})};return b.a.createElement("section",{className:z.a.wrap},b.a.createElement("p",{className:z.a.titleWrap},b.a.createElement("span",{className:z.a.required},"*"),b.a.createElement("span",{className:z.a.title},"题干:")),b.a.createElement("div",null,b.a.createElement(B.a,{id:"completion-question-tittle",placeholder:"请您输入题目",height:155,defaultValue:o,onChange:function(e){return s(e)},showNullButton:!0,onPlaceholderChange:function(e,t,n){var r=y.slice();if(t&&r.splice(e,t),n)for(var i=0;i<n;i++)r.splice(e+i,0,[""]);E(r)}})),b.a.createElement("div",{className:"mt20"},y.map((function(e,t){return b.a.createElement(F.a,{key:t,answers:e,index:t,flex:1,is_md:!0,activeOptionErrorIndex:k,onAnswerChange:G,addChildAnswer:V,deleteChildAnswer:W,deleteChildAnswermain:K})}))),b.a.createElement("div",{className:"mt20"},y.length>1&&b.a.createElement("span",null,b.a.createElement(N.a,{checked:O,onChange:function(e){return A(e.target.checked)},className:"".concat(z.a.color333," font14")},"多个填空的答案有顺序要求"),b.a.createElement("span",{className:"".concat(z.a.color999," font12")},"(选中,每个填空的答案顺序必须与参考答案一致)"))),b.a.createElement("p",{className:z.a.titleWrap},b.a.createElement("span",{className:z.a.title},"题目解析:")),b.a.createElement(P.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:d,onChange:function(e){return h(e)}}))},V=Object(C.a)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t.effects}}),null,null,{forwardRef:!0})(Object(v.forwardRef)(G)),W=function(e,t){e.globalSetting,e.loading;var n=e.editData,r=(e.dispatch,e.onRef,e.isEdit),i=(Object(M.a)(e,["globalSetting","loading","editData","dispatch","onRef","isEdit"]),Object(v.useState)()),a=Object(p.a)(i,2),o=a[0],s=a[1],c=Object(v.useState)(""),d=Object(p.a)(c,2),h=d[0],f=d[1],m=Object(v.useState)(""),g=Object(p.a)(m,2),y=g[0],E=g[1];Object(v.useEffect)((function(){if(n&&r){f(null==n?void 0:n.name),E(null==n?void 0:n.analysis);var e=null==n?void 0:n.choices.find((function(e){return e.is_answer}));s("正确"===e.choice_text?"0":"1")}}),[n]),Object(v.useImperativeHandle)(t,(function(){return{onSave:x,Clear:_}}));var x=function(){return h?o?{name:h,choices:[{choice_text:"正确",is_answer:"0"===o?1:0},{choice_text:"错误",is_answer:"1"===o?1:0}],analysis:y}:(u.b.info("请先点击选择本选择题的正确选项"),!1):(u.b.info("请您输入题干"),!1)},_=function(){f(""),E(""),s("")};return b.a.createElement("section",{className:z.a.wrap},b.a.createElement("p",{className:z.a.titleWrap},b.a.createElement("span",{className:z.a.required},"*"),b.a.createElement("span",{className:z.a.title},"题干:")),b.a.createElement(P.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:h,onChange:function(e){return f(e)}}),b.a.createElement("p",{className:z.a.titleWrap},b.a.createElement("span",{className:z.a.required},"*"),b.a.createElement("span",{className:z.a.title},"答案选项:",b.a.createElement("span",{className:z.a.colorGray},"点击选项可设置正确答案"))),b.a.createElement(l.a.Group,{buttonStyle:"solid",value:o,onChange:function(e){return s(e.target.value)}},b.a.createElement(l.a.Button,{value:"0",className:"".concat(z.a.radio," mr40")},"正确"),b.a.createElement(l.a.Button,{value:"1",className:z.a.radio},"错误")),b.a.createElement("p",{className:z.a.titleWrap},b.a.createElement("span",{className:z.a.title},"题目解析:")),b.a.createElement(P.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:y,onChange:function(e){return E(e)}}))},K=Object(C.a)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t.effects}}),null,null,{forwardRef:!0})(Object(v.forwardRef)(W)),q=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Y=function(e,t){var n=e.editData,r=(e.globalSetting,e.loading,e.dispatch,e.onRef,e.isEdit),a=(Object(M.a)(e,["editData","globalSetting","loading","dispatch","onRef","isEdit"]),Object(v.useState)([])),o=Object(p.a)(a,2),s=o[0],l=o[1],c=Object(v.useState)(),d=Object(p.a)(c,2),h=d[0],f=d[1],m=Object(v.useState)([]),g=Object(p.a)(m,2),y=g[0],E=g[1],x=Object(v.useState)(""),_=Object(p.a)(x,2),w=_[0],C=_[1],S=Object(v.useState)(""),O=Object(p.a)(S,2),A=O[0],T=O[1];Object(v.useEffect)((function(){l(["","","",""])}),[]),Object(v.useEffect)((function(){if(n&&r){C(null==n?void 0:n.name),T(null==n?void 0:n.analysis),l(null==n?void 0:n.choices.map((function(e){return e.choice_text})));var e=[];null==n||n.choices.map((function(t,n){t.is_answer&&e.push(n)})),E(e)}}),[n]),Object(v.useImperativeHandle)(t,(function(){return{onSave:I,Clear:D}}));var I=function(){if(!w)return u.b.info("请您输入题干"),!1;var e=s.findIndex((function(e){return!e}));if(e>-1)return u.b.info("请先输入 ".concat(q[e]," 选项的内容")),!1;if(!y.length)return u.b.info("请设置本题的正确答案,点击选项A/B...即可完成设置"),!1;if(y.length<2)return u.b.info("多选题最小正确选项为2个"),!1;var t=s.map((function(e,t){return{choice_text:e,is_answer:y.includes(t)?1:0}}));return{name:w,choices:t,analysis:A}},D=function(){l(["","","",""]),C(""),T(""),E("")};return b.a.createElement("section",{className:z.a.wrap},b.a.createElement("p",{className:z.a.titleWrap},b.a.createElement("span",{className:z.a.required},"*"),b.a.createElement("span",{className:z.a.title},"题干:")),b.a.createElement(P.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:w,onChange:function(e){return C(e)}}),b.a.createElement("p",{className:z.a.titleWrap},b.a.createElement("span",{className:z.a.required},"*"),b.a.createElement("span",{className:z.a.title},"答案选项:",b.a.createElement("span",{className:z.a.colorGray},"点击选项可设置正确答案"))),s.map((function(e,t){return b.a.createElement("div",{className:z.a.choiceWrap,key:t},b.a.createElement(i.a,{title:"点击设置为标准答案",placement:"left"},b.a.createElement("div",{className:"".concat(z.a.answer," ").concat(y.includes(t)?z.a.activeAnswer:""),onClick:function(){y.includes(t)?E(y.filter((function(e){return e!==t}))):E([].concat(Object(j.a)(y),[t]))}},q[t])),b.a.createElement("div",{className:z.a.editorWrap},h===t?b.a.createElement(P.a,{id:"single-question-option-".concat(t),watch:!0,height:155,placeholder:"请您输入选项",defaultValue:e,onChange:function(e){s[t]=e,l(s)}}):b.a.createElement("div",{className:z.a.htmlWrap,onClick:function(){return f(t)}},b.a.createElement(k.a,{value:e}))),t>1&&b.a.createElement(i.a,{title:"删除"},b.a.createElement("i",{className:"".concat(z.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){l(s.filter((function(e,n){return n!==t}))),y.includes(t)?E(y.filter((function(e){return e!==t}))):E([].concat(Object(j.a)(y),[t]))}})),t<7&&t===s.length-1&&b.a.createElement(i.a,{title:"新增参考答案"},b.a.createElement("i",{className:"".concat(z.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return l([].concat(Object(j.a)(s),[""]))}})))})),b.a.createElement("p",{className:z.a.titleWrap},b.a.createElement("span",{className:z.a.title},"题目解析:")),b.a.createElement(P.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:A,onChange:function(e){return T(e)}}))},Q=Object(C.a)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t.effects}}),null,null,{forwardRef:!0})(Object(v.forwardRef)(Y)),J=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],X=function(e,t){var n=e.editData,r=(e.globalSetting,e.loading,e.dispatch,e.onRef,e.isEdit),a=(Object(M.a)(e,["editData","globalSetting","loading","dispatch","onRef","isEdit"]),Object(v.useState)([])),o=Object(p.a)(a,2),s=o[0],l=o[1],c=Object(v.useState)(),d=Object(p.a)(c,2),h=d[0],f=d[1],m=Object(v.useState)(),g=Object(p.a)(m,2),y=g[0],E=g[1],x=Object(v.useState)(""),_=Object(p.a)(x,2),w=_[0],C=_[1],S=Object(v.useState)(""),O=Object(p.a)(S,2),A=O[0],T=O[1];Object(v.useEffect)((function(){l(["","","",""])}),[]),Object(v.useEffect)((function(){n&&r&&(C(null==n?void 0:n.name),T(null==n?void 0:n.analysis),l(null==n?void 0:n.choices.map((function(e){return e.choice_text}))),E(null==n?void 0:n.choices.findIndex((function(e){return e.is_answer}))))}),[n]),Object(v.useImperativeHandle)(t,(function(){return{onSave:I,Clear:D}}));var I=function(){if(!w)return u.b.info("请您输入题干"),!1;var e=s.findIndex((function(e){return!e}));if(e>-1)return u.b.info("请先输入 ".concat(J[e]," 选项的内容")),!1;if(console.log("activeAnswer: ",y),"number"!=typeof y)return u.b.info("请设置本题的正确答案,点击选项A/B...即可完成设置"),!1;var t=s.map((function(e,t){return{choice_text:e,is_answer:y===t?1:0}}));return{name:w,choices:t,analysis:A}},D=function(){l(["","","",""]),C(""),T(""),E("")};return b.a.createElement("section",{className:z.a.wrap},b.a.createElement("p",{className:z.a.titleWrap},b.a.createElement("span",{className:z.a.required},"*"),b.a.createElement("span",{className:z.a.title},"题干:")),b.a.createElement(P.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:w,onChange:function(e){return C(e)}}),b.a.createElement("p",{className:z.a.titleWrap},b.a.createElement("span",{className:z.a.required},"*"),b.a.createElement("span",{className:z.a.title},"答案选项:",b.a.createElement("span",{className:z.a.colorGray},"点击选项可设置正确答案"))),s.map((function(e,t){return b.a.createElement("div",{className:z.a.choiceWrap,key:t},b.a.createElement(i.a,{title:"点击设置为标准答案",placement:"left"},b.a.createElement("div",{className:"".concat(z.a.answer," ").concat(y===t?z.a.activeAnswer:""),onClick:function(){return E(t)}},J[t])),b.a.createElement("div",{className:z.a.editorWrap},h===t?b.a.createElement(P.a,{id:"single-question-option-".concat(t),watch:!0,height:155,isFocus:!0,placeholder:"请您输入选项",defaultValue:e,onChange:function(e){s[t]=e,l(s)}}):b.a.createElement("div",{className:z.a.htmlWrap,onClick:function(){return f(t)}},b.a.createElement(k.a,{value:e}))),t>1&&b.a.createElement(i.a,{title:"删除"},b.a.createElement("i",{className:"".concat(z.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){l(s.filter((function(e,n){return n!==t}))),t===y&&E(null)}})),t<7&&t===s.length-1&&b.a.createElement(i.a,{title:"新增参考答案"},b.a.createElement("i",{className:"".concat(z.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return l([].concat(Object(j.a)(s),[""]))}})))})),b.a.createElement("p",{className:z.a.titleWrap},b.a.createElement("span",{className:z.a.title},"题目解析:")),b.a.createElement(P.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:A,onChange:function(e){return T(e)}}))},Z=Object(C.a)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t.effects}}),null,null,{forwardRef:!0})(Object(v.forwardRef)(X)),$=function(e,t){var n=e.editData,r=(e.globalSetting,e.loading,e.dispatch,e.onRef,e.isEdit),i=(Object(M.a)(e,["editData","globalSetting","loading","dispatch","onRef","isEdit"]),Object(v.useState)("")),a=Object(p.a)(i,2),o=a[0],s=a[1],l=Object(v.useState)(""),c=Object(p.a)(l,2),d=c[0],h=c[1],f=Object(v.useState)(""),m=Object(p.a)(f,2),g=m[0],y=m[1];Object(v.useEffect)((function(){var e;n&&r&&(s(null==n?void 0:n.name),h(null==n?void 0:n.analysis),y(null==n||null===(e=n.answer_texts)||void 0===e?void 0:e[0]))}),[n]),Object(v.useImperativeHandle)(t,(function(){return{onSave:E,Clear:x}}));var E=function(){return o?g?{name:o,answer_texts:[g],analysis:d}:(u.b.info("请您输入参考答案"),!1):(u.b.info("请您输入题干"),!1)},x=function(){s(""),h(""),y("")};return b.a.createElement("section",{className:z.a.wrap},b.a.createElement("p",{className:z.a.titleWrap},b.a.createElement("span",{className:z.a.required},"*"),b.a.createElement("span",{className:z.a.title},"题干:")),b.a.createElement(P.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:o,onChange:function(e){return s(e)}}),b.a.createElement("p",{className:z.a.titleWrap},b.a.createElement("span",{className:z.a.title},"参考答案:")),b.a.createElement(P.a,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"请您输入参考答案",defaultValue:g,onChange:function(e){return y(e)}}),b.a.createElement("p",{className:z.a.titleWrap},b.a.createElement("span",{className:z.a.title},"题目解析:")),b.a.createElement(P.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:d,onChange:function(e){return h(e)}}))},ee=Object(C.a)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t.effects}}),null,null,{forwardRef:!0})(Object(v.forwardRef)($)),te=n("k1fw"),ne=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],re=function(e,t){e.globalSetting,e.loading,e.dispatch;var n=e.editData,r=(e.onRef,e.isEdit),a=(Object(M.a)(e,["globalSetting","loading","dispatch","editData","onRef","isEdit"]),Object(v.useState)("")),o=Object(p.a)(a,2),s=o[0],l=o[1],c=Object(v.useState)([]),d=Object(p.a)(c,2),h=d[0],f=d[1];console.log(h),Object(v.useEffect)((function(){var e;if(n&&r){l(null==n?void 0:n.name);var t=null==n||null===(e=n.sub_item_banks)||void 0===e?void 0:e.map((function(e){var t,n,r;return Object(te.a)(Object(te.a)({},e),{},{id:e.id,open:!1,qusList:null==e||null===(t=e.choices)||void 0===t?void 0:t.map((function(e){return e.choice_text})),activeQusEditor:null,qusAnswer:null===(n=[null==e||null===(r=e.choices)||void 0===r?void 0:r.findIndex((function(e){return e.is_answer}))])||void 0===n?void 0:n.filter((function(e){return-1!==e}))})}));f(t)}}),[n]),Object(v.useImperativeHandle)(t,(function(){return{onSave:m,Clear:g}}));var m=function(){if(!s)return u.b.info("请您输入题干"),!1;if(0===h.length)return u.b.info("请您添加小题"),!1;for(var e=0;e<h.length;e++){var t,n=h[e];if(null==n||!n.name)return u.b.info("请您输入第".concat(e+1,"小题题干")),!1;var r=null==n||null===(t=n.qusList)||void 0===t?void 0:t.findIndex((function(e){return!e}));if(r>-1)return u.b.info("请先输入第".concat(e+1,"小题").concat(ne[r],"选项的内容")),!1;if(null==n||!n.qusAnswer.length)return u.b.info("请设置第".concat(e+1,"小题的正确答案,点击选项A/B...即可完成设置")),!1}var i=h.map((function(e){return{id:e.id>1?e.id:null,name:e.name,item_type:e.item_type,analysis:e.analysis,choices:e.qusList.map((function(t,n){return{choice_text:t,is_answer:e.qusAnswer[0]===n?1:0}}))}}));return{name:s,sub_item_banks:i}},g=function(){l(""),f([])},y=function(e,t,n){var r,i=Object(D.cloneDeep)(h);("open"===e&&(i[t].open=!i[t].open),"delete"===e&&i.splice(t,1),"value"===e&&(i[t].name=n),"answer"===e&&(i[t].qusAnswer=[n]),"edit"===e&&(i[t].activeQusEditor=n),"details"===e&&(i[t].qusList[i[t].activeQusEditor]=n),"addQus"===e&&(i[t].qusList=i[t].qusList.concat("")),"deleteQus"===e)&&(i[t].qusList=i[t].qusList.filter((function(e,t){return t!==n})),i[t].qusAnswer=null===(r=i[t].qusAnswer)||void 0===r?void 0:r.filter((function(e){return e!==n})));"analysis"===e&&(i[t].analysis=n),f(i)};return b.a.createElement("section",{className:z.a.wrap},b.a.createElement("p",{className:z.a.titleWrap},b.a.createElement("span",{className:z.a.required},"*"),b.a.createElement("span",{className:z.a.title},"题干:")),b.a.createElement(P.a,{id:"combination-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:s,onChange:function(e){return l(e)}}),null==h?void 0:h.map((function(e,t){var n;return b.a.createElement("div",{className:z.a.fold,key:e.id},b.a.createElement("div",{onClick:function(){return y("open",t)},className:z.a.head},b.a.createElement("i",{className:"iconfont icon-sanjiaoxing",style:{transform:e.open?"initial":"rotate(270deg) translate(2px, 4px)"}}),b.a.createElement("span",null,"第",t+1,"小题(单选题)"),b.a.createElement("b",{style:{visibility:"hidden"},onClick:function(e){e.stopPropagation(),y("delete",t)},className:"iconfont icon-shanchu8"})),b.a.createElement("div",{className:"mb10",style:{display:e.open?"block":"none"}},b.a.createElement(P.a,{watch:!0,height:155,placeholder:"请您输入题干",defaultValue:null==e?void 0:e.name,onChange:function(e){return y("value",t,e)}}),b.a.createElement("p",{className:z.a.titleWrap},b.a.createElement("span",{className:z.a.required},"*"),b.a.createElement("span",{className:z.a.title},"答案选项:",b.a.createElement("span",{className:z.a.colorGray},"点击选项可设置正确答案"))),null==e||null===(n=e.qusList)||void 0===n?void 0:n.map((function(n,r){var a,o;return b.a.createElement("div",{className:z.a.choiceWrap,key:r},b.a.createElement(i.a,{title:"点击设置为标准答案",placement:"left"},b.a.createElement("div",{className:"".concat(z.a.answer," ").concat(null!=e&&null!==(a=e.qusAnswer)&&void 0!==a&&a.includes(r)?z.a.activeAnswer:""),onClick:function(){return y("answer",t,r)}},ne[r])),b.a.createElement("div",{className:z.a.editorWrap},(null==e?void 0:e.activeQusEditor)===r?b.a.createElement(P.a,{id:"single-question-option-".concat(r),watch:!0,height:155,isFocus:!0,placeholder:"请您输入选项",defaultValue:n,onChange:function(e){return y("details",t,e)}}):b.a.createElement("div",{className:z.a.htmlWrap,onClick:function(){return y("edit",t,r)}},b.a.createElement(k.a,{value:n}))),r>1&&b.a.createElement(i.a,{title:"删除"},b.a.createElement("i",{className:"".concat(z.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return y("deleteQus",t,r)}})),r<7&&r===(null==e||null===(o=e.qusList)||void 0===o?void 0:o.length)-1&&b.a.createElement(i.a,{title:"新增参考答案"},b.a.createElement("i",{className:"".concat(z.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return y("addQus",t)}})))})),b.a.createElement("p",{className:"mb10 mt10"},b.a.createElement("span",{className:z.a.title},"题目解析:")),b.a.createElement(P.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:e.analysis,onChange:function(e){return y("analysis",t,e)}})))})))},ie=Object(C.a)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t.effects}}),null,null,{forwardRef:!0})(Object(v.forwardRef)(re));t.a=function(e){var t,n,m,y,x,O,T,L,N=e.data,j=e.submit,M=e.goBack,P=e.loading,B=e.onTypeScore,F=e.editPreview,U=void 0!==F&&F,H=e.onSkipExamination,z=e.selectValue,G=e.onExchange,W=Object(v.useRef)(),q=Object(v.useRef)(Object(D.debounce)((function(){return le()}),100,{leading:!0,trailing:!0})),Y=Object(v.useState)(null),J=Object(p.a)(Y,2),X=J[0],$=J[1],te=Object(v.useState)(!1),ne=Object(p.a)(te,2),re=ne[0],ae=ne[1],oe=Object(w.i)();Object(v.useEffect)((function(){return window.addEventListener("scroll",null==q?void 0:q.current),function(){window.removeEventListener("scroll",null==q?void 0:q.current)}}),[]),Object(v.useEffect)((function(){ae(!0)}),[]),Object(v.useEffect)((function(){var e,t,n,r,i=null===(e=document.getElementById("examName"))||void 0===e||null===(t=e.getElementsByClassName("ant-pagination-options-quick-jumper"))||void 0===t||null===(n=t[0])||void 0===n||null===(r=n.childNodes)||void 0===r?void 0:r[2];i&&(i.nodeValue="份")}),[N]);var se=function(e){var t=parseInt(e);return isNaN(t)?"":t};var le=function(){var e,t,n,r,i=document.getElementById("preview_btns"),a=document.getElementById("preview_btns_else");n=0,r=0,document.body&&(n=document.body.scrollTop),document.documentElement&&(r=document.documentElement.scrollTop),(n-r>0?n:r)+("CSS1Compat"==document.compatMode?document.documentElement.clientHeight:document.body.clientHeight)>=(e=0,t=0,document.body&&(e=document.body.scrollHeight),document.documentElement&&(t=document.documentElement.scrollHeight),(e-t>0?e:t)-68)?(i.style.visibility="hidden",a.style.visibility="visible"):(i.style.visibility="visible",a.style.visibility="hidden")},ce=["容易","简单","适中","困难"],ue=function(e){var t;return b.a.createElement("div",{className:E.a.analysis},b.a.createElement("div",null,"正确答案:",null==e||null===(t=e.answer_texts)||void 0===t?void 0:t[0]),b.a.createElement("aside",null,b.a.createElement("span",{className:E.a.text},"解析:"),b.a.createElement(k.a,{value:e.analysis?e.analysis:"暂无解析"})),b.a.createElement("ul",null,b.a.createElement("li",null,b.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"方向&课程:"),"".concat(null==e?void 0:e.discipline_name,"/").concat(null==e?void 0:e.sub_discipline_name)),b.a.createElement("li",null,b.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"知识点:"),null==e?void 0:e.tag_discipline_name)))},de=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],he=function(e){console.log(e,"key"),H(e-1)},fe=function(){return b.a.createElement(b.a.Fragment,null,b.a.createElement(o.a,{color:"#55575D",overlayClassName:E.a.popover,visible:re,getPopupContainer:function(e){return null==e?void 0:e.parentNode},content:"如您对此份试题满意,可将此份试题保存为固定试卷"},b.a.createElement(s.a,{onMouseEnter:function(){return ae(!0)},onMouseLeave:function(){return ae(!1)},onClick:function(){var e,t;t="",f.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"保存试卷",content:b.a.createElement("div",{className:E.a.modalColumn},b.a.createElement("div",{style:{color:"#676A6C",display:"flex"},className:"font14 mt20"},b.a.createElement("img",{style:{marginRight:5},src:R.a}),"保存后单独生成一份人工组卷类型的固定试卷。"),b.a.createElement("div",{className:E.a.modalRow,style:{marginTop:20}},b.a.createElement("sup",{className:E.a.sup},"*"),b.a.createElement("span",{style:{flexShrink:0}},"试卷名称:"),b.a.createElement(c.a,{placeholder:"请输入试卷名称",min:0,maxLength:60,defaultValue:t,onChange:function(e){t=e.target.value}}))),okText:"确认",cancelText:"取消",onOk:(e=Object(d.a)(g.a.mark((function e(){var n,r,i,a,o;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=3;break}return u.b.warn("试卷名称不能为空"),e.abrupt("return",Promise.reject());case 3:return r=[],i=[],a=[],null==N||null===(n=N.questionList)||void 0===n||n.forEach((function(e){var t;null===(t=e.questions)||void 0===t||t.forEach((function(t){r.push(t.id),i.push(e.questions_score/e.questions_count),"COMBINATION"===e.type&&a.push({id:t.id,sub_item_bank_ids:t.sub_item_banks.map((function(e){return e.id}))})}))})),console.log("-----",a),o={item_bank_ids:r,item_bank_scores:i,name:t,combination_item_banks:a},e.next=11,j(o);case 11:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})}},"保存")),b.a.createElement(s.a,{onClick:function(){document.body.scrollIntoView(),M()}},"返回"),b.a.createElement(s.a,{loading:P,onClick:function(){return j()},type:"primary"},"提交"))},pe=function(){var e;return b.a.createElement(b.a.Fragment,null,b.a.createElement(s.a,{onClick:M},"返回"),z>0&&b.a.createElement(s.a,{onClick:function(){return he(z)},type:"primary"},"上一份"),z<(null==N||null===(e=N.exam)||void 0===e?void 0:e.total_num)-1&&b.a.createElement(s.a,{onClick:function(){return he(z+2)}},"下一份"))},me=function(){var e=Object(d.a)(g.a.mark((function e(t,n){var r,i,a,o,s,l,c,d,h,f;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(r=W.current)||void 0===r?void 0:r.onSave();case 2:if(i=e.sent){e.next=5;break}return e.abrupt("return");case 5:return a={question_score:n.score,analysis:i.analysis},console.log(i,"editorData"),"SINGLE"!==t&&"MULTIPLE"!==t&&"JUDGMENT"!==t||(s=[],l=[],a.question_type="JUDGMENT"===t?2:1,a.question_title=null==i?void 0:i.name,null==i||null===(o=i.choices)||void 0===o||o.forEach((function(e,t){s.push(e.choice_text),null!=e&&e.is_answer&&l.push(t+1)})),a.question_choices=s,a.standard_answers=l),"COMPLETION"===t&&(a.is_ordered=i.is_ordered,a.question_title=null==i?void 0:i.name,a.question_type=3,d=[],null==i||null===(c=i.standard_answers)||void 0===c||c.forEach((function(e,t){d.push({choice_id:e.position,answer_text:e.answer_text})})),a.standard_answers=d),"SUBJECTIVE"===t&&(a.question_title=null==i?void 0:i.name,a.question_type=3,a.standard_answers=null==i?void 0:i.answer_texts),"COMBINATION"===t&&(a.question_title=null==i?void 0:i.name,a.question_type=7,a.sub_questions=null==i||null===(h=i.sub_item_banks)||void 0===h?void 0:h.map((function(e,t){return{id:e.id,question_title:e.name,question_type:1,question_choices:e.choices.map((function(e){return e.choice_text})),standard_answers:[e.choices.findIndex((function(e){return e.is_answer}))+1],analysis:e.analysis}})),delete a.analysis),e.next=13,Object(S.a)("/api/exercise_questions/".concat(n.id,".json"),{method:"put",body:a});case 13:0===(null==(f=e.sent)?void 0:f.status)&&(u.b.success("编辑成功"),he(z+1)),$(null);case 16:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();console.log(function(){for(var e=[],t=0;t<(null==N||null===(n=N.exam)||void 0===n?void 0:n.total_num);t++){var n;e.push({})}return e}(),"data");var ge=null==N||null===(t=N.questionList)||void 0===t?void 0:t.reduce((function(e,t){return e+t.questions_score}),0),ve=U&&1!==(null==N||null===(n=N.exam)||void 0===n?void 0:n.exercise_status);return b.a.createElement("section",{className:E.a.wrap},b.a.createElement("div",{id:"id_left_preview",className:E.a.left,onMouseEnter:function(e){document.getElementById("id_left_preview").style.overflowY="auto"},onMouseLeave:function(e){document.getElementById("id_left_preview").style.overflowY="hidden"}},b.a.createElement("div",{className:E.a.title},b.a.createElement("div",null,b.a.createElement("b",null),b.a.createElement("span",null,"答题卡"))),b.a.createElement("div",{className:E.a.total},b.a.createElement("div",null,b.a.createElement("img",{src:A.a}),b.a.createElement("span",null,"题数(道)"),b.a.createElement("aside",null,null==N?void 0:N.all_questions_count)),b.a.createElement("div",{className:"mr30 ml30"},b.a.createElement("img",{src:I.a}),b.a.createElement("span",null,"总分(分)"),b.a.createElement("aside",null,ge)),b.a.createElement("div",null,b.a.createElement("img",{src:_.a}),b.a.createElement("span",null,"时长(分)"),b.a.createElement("aside",null,null==N||null===(m=N.exam)||void 0===m?void 0:m.time))),null==N||null===(y=N.questionList)||void 0===y?void 0:y.map((function(e,t){var n;return b.a.createElement("div",{className:E.a.list,key:t},b.a.createElement("div",{className:E.a.name},b.a.createElement("b",null),b.a.createElement("span",null,e.name)),b.a.createElement("aside",null,b.a.createElement("div",null,"共",b.a.createElement("span",{className:E.a.b},e.questions_count),"题 ",b.a.createElement("span",{className:E.a.l},"|"),"共",b.a.createElement("span",{className:E.a.r},e.questions_score),"分"),b.a.createElement("div",{className:E.a.answerSheet},null==e||null===(n=e.questions)||void 0===n?void 0:n.map((function(e,t){return b.a.createElement("div",{onClick:function(){var t="Anchor_".concat(e.id),n=document.getElementById(t);n&&setTimeout((function(){return n.scrollIntoView({block:"center",behavior:"smooth"})}))},key:e.id,className:E.a.tag},t+1)})))))}))),b.a.createElement("div",{className:E.a.right},b.a.createElement("div",{className:E.a.examName,id:"examName"},b.a.createElement("div",{className:E.a.name},b.a.createElement(i.a,{title:null==N||null===(x=N.exam)||void 0===x?void 0:x.name,getPopupContainer:function(e){return e.parentNode}},b.a.createElement("span",{className:E.a.t},null==N||null===(O=N.exam)||void 0===O?void 0:O.name))),U?b.a.createElement(r.a,{showTotal:function(e){return b.a.createElement("span",{style:{color:"#656F87",fontSize:14}},"共计",b.a.createElement("span",{className:"c-light-primary"},e),"份试卷")},total:null==N||null===(T=N.exam)||void 0===T?void 0:T.total_num,pageSize:1,current:z+1,showSizeChanger:!1,onChange:he,showQuickJumper:!0,hideOnSinglePage:!1}):b.a.createElement(s.a,{onClick:function(){var e,t=f.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"温馨提示",content:"确认更换预览中的所有试题吗?",cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"确认",cancelText:"取消",onOk:(e=Object(d.a)(g.a.mark((function e(){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.update({cancelButtonProps:{disabled:!0}}),e.next=3,G();case 3:t.update({cancelButtonProps:{disabled:!1}}),u.b.success("已重新随机生成整张试题");case 5:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},type:"primary"},"随机更换")),b.a.createElement("div",{className:E.a.topWarp},null==N||null===(L=N.questionList)||void 0===L?void 0:L.map((function(e,t){var n,r;return b.a.createElement(b.a.Fragment,{key:t},b.a.createElement("div",{className:E.a.head,style:0===t?{border:0,marginTop:-16}:{}},b.a.createElement("div",{className:E.a.name},b.a.createElement("b",null),b.a.createElement("span",null,e.name)),b.a.createElement("div",{className:E.a.so},"共",b.a.createElement("span",{className:E.a.b},e.questions_count," "),"题 ","COMBINATION"===e.type&&"(包含".concat(null==e||null===(n=e.questions)||void 0===n?void 0:n.map((function(e){var t;return null==e||null===(t=e.sub_item_banks)||void 0===t?void 0:t.length})).reduce((function(e,t){return e+t})),"小题)"),b.a.createElement("span",{className:E.a.l},"|"),"共",b.a.createElement("span",{className:E.a.r},e.questions_score),"分"),!U&&b.a.createElement("div",{className:E.a.btn},b.a.createElement(s.a,{onClick:function(){!function(e){console.log("---",e);var t=[];e.questions.map((function(e){return null==e?void 0:e.sub_item_banks.map((function(e){t.push(e)}))}));var n,r=0;r="COMBINATION"===e.type?e.questions_score/t.length:e.questions_score/e.questions_count,f.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"分数设置",content:b.a.createElement("div",{className:E.a.modalColumn},b.a.createElement("div",{className:E.a.modalRow,style:{justifyContent:"flex-start"}},b.a.createElement("sup",{className:E.a.sup},"*"),b.a.createElement("span",null,null==e?void 0:e.name,"COMBINATION"===(null==e?void 0:e.type)&&"中的每小题",":"),b.a.createElement(h.a,{min:1,parser:se,defaultValue:r,onChange:function(e){r=e}}),b.a.createElement("span",{className:"ml5"},"分/题"))),okText:"确认",cancelText:"取消",onOk:(n=Object(d.a)(g.a.mark((function n(){var i,a;return g.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r){n.next=3;break}return u.b.warn("分数不能为空或为0"),n.abrupt("return",Promise.reject());case 3:"COMBINATION"===e.type?(i={type:null==e?void 0:e.type,score:r,scoreTotal:r*(null==t?void 0:t.length)},B(i)):(a={type:null==e?void 0:e.type,score:r,scoreTotal:r*e.questions_count},B(a));case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})})}(e)},type:"primary",ghost:!0,className:"mr20"},"设置得分"),b.a.createElement(s.a,{onClick:function(){return i=null===(n=(t=e).questions)||void 0===n?void 0:n.map((function(e){return e.id})),a=t.name,void(o=f.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"温馨提示",content:"确认更换".concat(a,"中的所有试题吗?"),cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"确认",cancelText:"取消",onOk:(r=Object(d.a)(g.a.mark((function e(){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o.update({cancelButtonProps:{disabled:!0}}),e.next=3,G({seleted_item_bank_ids:i},{type:t.type});case 3:o.update({cancelButtonProps:{disabled:!1}}),u.b.success("已重新随机生成".concat(a,"试题"));case 5:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)})}));var t,n,r,i,a,o},type:"primary",ghost:!0},"随机更换"))),null==e||null===(r=e.questions)||void 0===r?void 0:r.map((function(t,n){return X===t.id?b.a.createElement("div",{id:"Anchor_".concat(t.id),className:E.a.content,style:{padding:0,marginTop:10},key:t.id},b.a.createElement("div",{style:{float:"right",marginTop:-6}},b.a.createElement(s.a,{onClick:function(){return $(null)},className:"mr20",type:"primary",ghost:!0},"取消"),b.a.createElement(s.a,{onClick:function(){return me(null==e?void 0:e.type,t)},type:"primary"},"保存")),function(e,t){if(console.log(e,222),"SINGLE"===t)return b.a.createElement(b.a.Fragment,null,b.a.createElement(Z,{ref:W,editData:e,isEdit:!0}),b.a.createElement(a.a,null));if("MULTIPLE"===t)return b.a.createElement(b.a.Fragment,null,b.a.createElement(Q,{ref:W,editData:e,isEdit:!0}),b.a.createElement(a.a,null));if("JUDGMENT"===t)return b.a.createElement(b.a.Fragment,null,b.a.createElement(K,{ref:W,editData:e,isEdit:!0}),b.a.createElement(a.a,null));if("COMPLETION"===t)return b.a.createElement(b.a.Fragment,null,b.a.createElement(V,{ref:W,editData:e,isEdit:!0}),b.a.createElement(a.a,null));if("SUBJECTIVE"===t)return b.a.createElement(b.a.Fragment,null,b.a.createElement(ee,{ref:W,editData:e,isEdit:!0}),b.a.createElement(a.a,null));if("COMBINATION"===t)return b.a.createElement(b.a.Fragment,null,b.a.createElement(ie,{ref:W,editData:e,isEdit:!0}),b.a.createElement(a.a,null));var n;"PROGRAM"===t&&C.d.push("/problems/".concat(null==e||null===(n=e.program_attr)||void 0===n?void 0:n.identifier,"/edit?type=exercises&express_id=").concat(oe.categoryId,"&question_id=").concat(null==e?void 0:e.id,"&score=").concat(null==e?void 0:e.score,"&callback_url=").concat(location.pathname,"&select=").concat(z,"&exercise=true"))}(t,e.type)):b.a.createElement("div",{id:"Anchor_".concat(t.id),className:E.a.content,key:t.id},b.a.createElement("div",{className:E.a.titleWrap},b.a.createElement(k.a,{style:{paddingRight:10},className:E.a.titleHtml,value:n+1+"、"+"".concat("combination"===(null==t?void 0:t.item_type)?"(题干)":"")+t.name}),U&&b.a.createElement(s.a,{disabled:ve,onClick:function(){X?u.b.warn("先保存或取消当前正在编辑的试题"):$(t.id)},type:"primary",className:"mr20",style:{marginLeft:"auto"},ghost:!0},"编辑"),b.a.createElement(s.a,{disabled:ve,onClick:function(){return function(e,t,n,r){var i,a,o=null===(i=r.questions)||void 0===i?void 0:i.map((function(e){return e.id})),s="default",c=f.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"温馨提示",content:b.a.createElement("div",null,b.a.createElement("p",null,"系统按以下规则为您更换该试题"),b.a.createElement("div",null,b.a.createElement("span",null,"使用频度:"),b.a.createElement(l.a.Group,{defaultValue:s,onChange:function(e){s=e.target.value}},b.a.createElement(l.a,{value:"default"},"不设定"),b.a.createElement(l.a,{value:"high"},"使用次数高"),b.a.createElement(l.a,{value:"low"},"使用次数低")))),cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"确认",cancelText:"取消",onOk:(a=Object(d.a)(g.a.mark((function r(){return g.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return c.update({cancelButtonProps:{disabled:!0}}),r.next=3,G({single_question_id:e,seleted_item_bank_ids:o,type:s},{type:t,index:n});case 3:c.update({cancelButtonProps:{disabled:!1}}),u.b.success("已重新随机生成试题");case 5:case"end":return r.stop()}}),r)}))),function(){return a.apply(this,arguments)})})}(t.id,e.type,n,e)},type:"primary",ghost:!0},"换一题")),("SINGLE"===e.type||"JUDGMENT"===e.type||"MULTIPLE"===e.type)&&(c=t,p=[],b.a.createElement(b.a.Fragment,null,b.a.createElement("aside",{className:E.a.single},null==c||null===(h=c.choices)||void 0===h?void 0:h.map((function(e,t){return e.is_answer&&p.push(de[t]),b.a.createElement("ul",{key:t},b.a.createElement("li",null,de[t],"、"),b.a.createElement("li",null,b.a.createElement(k.a,{value:e.choice_text})))}))),b.a.createElement("div",{className:E.a.analysis},b.a.createElement("div",null,"正确答案:",p.join(""),b.a.createElement("span",{className:"ml30"},"难度:",ce[c.difficulty])),b.a.createElement("aside",null,b.a.createElement("span",{className:E.a.text},"解析:"),b.a.createElement(k.a,{value:c.analysis?c.analysis:"暂无解析"})),b.a.createElement("ul",null,b.a.createElement("li",null,b.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"方向&课程:"),"".concat(null==c?void 0:c.discipline_name,"/").concat(null==c?void 0:c.sub_discipline_name)),b.a.createElement("li",null,b.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"知识点:"),null==c?void 0:c.tag_discipline_name))))),"COMPLETION"===e.type&&function(e){var t,n=null==e||null===(t=e.standard_answer)||void 0===t?void 0:t.map((function(e){var t;return"答案(填空".concat(e.position,"):").concat(null==e||null===(t=e.answer_text)||void 0===t?void 0:t.join("、"))}));return b.a.createElement(b.a.Fragment,null,b.a.createElement("div",{className:E.a.analysis},b.a.createElement("div",null,"正确答案:",n),b.a.createElement("aside",null,b.a.createElement("span",{className:E.a.text},"解析:"),b.a.createElement(k.a,{value:e.analysis?e.analysis:"暂无解析"})),b.a.createElement("ul",null,b.a.createElement("li",null,b.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"方向&课程:"),"".concat(null==e?void 0:e.discipline_name,"/").concat(null==e?void 0:e.sub_discipline_name)),b.a.createElement("li",null,b.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"知识点:"),null==e?void 0:e.tag_discipline_name))))}(t),"SUBJECTIVE"===e.type&&ue(t),"FILEUPLOAD"===e.type&&ue(t),"PHOTOGRAPH"===e.type&&ue(t),"PROGRAM"===e.type&&function(e){var t;return b.a.createElement("div",{className:E.a.analysis},b.a.createElement("aside",null,b.a.createElement("span",{className:E.a.text},"预期输出:"),b.a.createElement(k.a,{value:null==e||null===(t=e.program_attr)||void 0===t?void 0:t.description})),b.a.createElement("ul",null,b.a.createElement("li",null,b.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"方向&课程:"),"".concat(null==e?void 0:e.discipline_name,"/").concat(null==e?void 0:e.sub_discipline_name)),b.a.createElement("li",null,b.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"知识点:"),null==e?void 0:e.tag_discipline_name)))}(t),"COMBINATION"===e.type&&(r=t,i=n,b.a.createElement("div",null,null==r||null===(o=r.sub_item_banks)||void 0===o?void 0:o.map((function(e,t){var n,a=[];return b.a.createElement(b.a.Fragment,null,b.a.createElement("div",{style:{marginLeft:25,fontSize:"16px",color:"#333"}},i+1+"."+(t+1),"(单选题)",e.name),b.a.createElement("aside",{className:E.a.single},null==e||null===(n=e.choices)||void 0===n?void 0:n.map((function(e,t){return e.is_answer&&a.push(de[t]),b.a.createElement("ul",{key:t},b.a.createElement("li",null,de[t],"、"),b.a.createElement("li",null,b.a.createElement(k.a,{value:e.choice_text})))}))),b.a.createElement("div",{className:E.a.analysis},b.a.createElement("div",null,"正确答案:",a.join(""),b.a.createElement("span",{className:"ml30"},"难度:",ce[e.difficulty])),b.a.createElement("aside",null,b.a.createElement("span",{className:E.a.text},"解析:"),b.a.createElement(k.a,{value:e.analysis?e.analysis:"暂无解析"})),b.a.createElement("ul",null,b.a.createElement("li",null,b.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"方向&课程:"),"".concat(null==r?void 0:r.discipline_name,"/").concat(null==r?void 0:r.sub_discipline_name)),b.a.createElement("li",null,b.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"知识点:"),null==r?void 0:r.tag_discipline_name))))})))),b.a.createElement("div",null));var r,i,o,c,h,p})))}))),b.a.createElement("div",{className:E.a.btnsElse,id:"preview_btns_else"},U?pe():fe()),b.a.createElement("div",{className:E.a.btnsWrap,id:"preview_btns"},b.a.createElement("div",{className:E.a.btns},U?pe():fe()))))}},sboe:
|
|
|
/*!*************************************************!*\
|
|
|
!*** ./node_modules/rc-tree/es/contextTypes.js ***!
|
|
|
\*************************************************/
|
|
|
/*! exports provided: TreeContext */
|
|
|
/*! exports used: TreeContext */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(/*! react */"q1tI"),i=r.createContext(null)},t23M:
|
|
|
/*!*****************************************************!*\
|
|
|
!*** ./node_modules/rc-resize-observer/es/index.js ***!
|
|
|
\*****************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),i=n(/*! @babel/runtime/helpers/esm/classCallCheck */"1OyB"),a=n(/*! @babel/runtime/helpers/esm/createClass */"vuIU"),o=n(/*! @babel/runtime/helpers/esm/inherits */"Ji7U"),s=n(/*! @babel/runtime/helpers/esm/createSuper */"LK+K"),l=n(/*! react */"q1tI"),c=n(/*! rc-util/es/Dom/findDOMNode */"m+aA"),u=n(/*! rc-util/es/Children/toArray */"Zm9Q"),d=n(/*! rc-util/es/warning */"Kwbf"),h=n(/*! rc-util/es/ref */"c+Xe"),f=n(/*! resize-observer-polyfill */"bdgK"),p=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).resizeObserver=null,e.childNode=null,e.currentElement=null,e.state={width:0,height:0,offsetHeight:0,offsetWidth:0},e.onResize=function(t){var n=e.props.onResize,i=t[0].target,a=i.getBoundingClientRect(),o=a.width,s=a.height,l=i.offsetWidth,c=i.offsetHeight,u=Math.floor(o),d=Math.floor(s);if(e.state.width!==u||e.state.height!==d||e.state.offsetWidth!==l||e.state.offsetHeight!==c){var h={width:u,height:d,offsetWidth:l,offsetHeight:c};e.setState(h),n&&Promise.resolve().then((function(){n(Object(r.a)(Object(r.a)({},h),{},{offsetWidth:l,offsetHeight:c}))}))}},e.setChildNode=function(t){e.childNode=t},e}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){if(this.props.disabled)this.destroyObserver();else{var e=Object(c.a)(this.childNode||this);e!==this.currentElement&&(this.destroyObserver(),this.currentElement=e),!this.resizeObserver&&e&&(this.resizeObserver=new f.default(this.onResize),this.resizeObserver.observe(e))}}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var e=this.props.children,t=Object(u.a)(e);if(t.length>1)Object(d.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(0===t.length)return Object(d.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var n=t[0];if(l.isValidElement(n)&&Object(h.c)(n)){var r=n.ref;t[0]=l.cloneElement(n,{ref:Object(h.a)(r,this.setChildNode)})}return 1===t.length?t[0]:t.map((function(e,t){return!l.isValidElement(e)||"key"in e&&null!==e.key?e:l.cloneElement(e,{key:"".concat("rc-observer-key","-").concat(t)})}))}}]),n}(l.Component);p.displayName="ResizeObserver",t.a=p},tWlo:
|
|
|
/*!*******************************************!*\
|
|
|
!*** ./src/assets/images/icons/anony.png ***!
|
|
|
\*******************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkVCNENBMTM0OENGMTExRTk4NzNCRkMxMzdBMjc5MEY5IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkVCNENBMTM1OENGMTExRTk4NzNCRkMxMzdBMjc5MEY5Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6RUI0Q0ExMzI4Q0YxMTFFOTg3M0JGQzEzN0EyNzkwRjkiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6RUI0Q0ExMzM4Q0YxMTFFOTg3M0JGQzEzN0EyNzkwRjkiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7p3KzkAAAFvElEQVR42sRae0ybVRQ/peVRaFce8pwgj1Je5TFsEHGbMAkzmqiJyba4hYh/LJlxiRr9Z0aNGv8xvhKTGckM2zKWmGEgU7MsPnCZIrKBjMcKY9BCBMqjjEcLtFDwHPZVC12h934f8yS/P6Dfud/5nXvvueec+8neOPEuSCAxiDJEMSITkYKIRoQJv9sREwgTogfRjGhEjIt9sUKEbhSiEvEC4mGEbJNngxGRiAzEk8L/VhGtiPOIswgrjxEBHDrxiE8Qg4hPEYYtjPclMkGXxhhCfIFI2E4CNFtvIm4hXvdYHlJIKOIVRK/wjkCpCaQjWhAfIVSwfaIS3kHvypaKwLOI64hdcP+kAPEn4jmxBI4ivkXsgPsvNBt1gg1cBI4hvkLI4f8TuWDDMdYw+owQFdh3Y6gSCnL1oNOmQnxcHAQHB8HCwiLMzM7C8KgFjD23oN9khtXVVZZhyZZhxEV/CGQhalk9r1AoYO9jxfBokQGCgoK8SBHi42LBsCsfJq1TcOnHn+F2v4llJsimIoRx3Q8le0o9/6bwdRmRxGJ8ZEQ4vHjkEORkZYBcLvdrlvL0OeBwOuDv4RF/X0Ne2Y34GrHiaw+8ishnMT4tNRmOVlVCTPQDzKfY/vJ9kJWpY1Ej217ztYnpFHyH6UjGJXH4wPOgVIZw7VAi8XRFOSjkTKv1bc8T25PACdZDan95mV9LZjNRq1Wg02lZw+tbGwnQ/L/EMooyJASSkxIliZUp7ONUCTb/S+AI2cTqOZlMJgmBcI2GVUUp2LyOAJMwxvHN04EAnqQYDrsJUDFSyKrtdC5JRmDR4eBRoxokgQjs48nn5+fnJSNgt3ONRTaXEYFHeLSXlpd5Peclk1Yrr6ohQKhhuWR6ekYSAiOWMV7VDCKg5Z0/uwTLaNnlAssYd22fTgRieTRz9dmQlpIsmgCdwuWle3nVY4mAmkczLCxUsk0cEaHhVVUH8GqOT0xKRmB6ZpZX1UkE5ng0zeYhsNntkhBgqAs2yhwR4AoBrpUVaO/oEm38nelp6B/gJnCHCNzm1f79jxaWgsRLbDY7XKj/Dlb405I+ItDDqz2/sACnTp9DEqNc+qfO1MLwyKiYCewNEPov3EK+G59k39BOp3Nt+YiUViLQKNjBH8sV7EXNivhslgb4xb2J28SMtMSRmbrwBBYpZPOI+xw4J2aka23tzB4VETrdct6zoCECC7wjjWIy1tbewZT//9R4RYzxZOtZTwK0C2vEjHjT2Ov3sx2d3TA7ZxPzuhrB5nVdiQ8pNPPvKP+XkEjjbYKtXm0VOpHe5x01KDDI72dFtmI+EGz1IkDyOeIvnlETH/T/digqKoLXeLLts3UNgY0REXGQZpmpqtCmrjV1/ZWcrEzIzEhnTtwQhwQb/5vNDc1dkinak4gDsMUFSEhwMJQ9vhueqihnWhYBMhnokYRGowGLZRwcW9fWLsGxTV6HqA8F6sMfR5z0qiDUKsjQpoEuPQ1SsSILVPDd1FJTrDA/Fwry9NDX1w9dxh7MSs2+ytTjcI+7gc0IkHwpMD+JnpbnZGdCXk4WPJSUKFlHzj0bGTrtGqhZNjJqgQHzIHRjWMbzhd7/MqLaZxqzxfjVFU+UjhcZCs+gp7f9nowcszMhfg17SoptSKDyym9N9cbePt8O2GrQ5pbrDRMTkwbe6MQpN6hfFRUVWa+Qb+7je23ideLAtPdGZ/cUZpw1iTsTFtFLJcBwEc2RIryHqELvW2q/qQPT4JA4AmupL5aP/Saza8A0eDU2Jvr0DrWaNkEe3L32kULmhXV+cHHR8cOvV5tcDd9f8qvm9ouAW2Zm5yhpm5uwWi9HRoRXq1UqC9zt08cDe391VUiJPyaPo+F1zddaZy80XFyLRv52v2ViPrehiJSvz6Z7rthQpZI+t6E+K91yuj+3UXnkL+7PbYxCFdiIKfgYdTcohHZ23QTnEntd8Y8AAwCTubpzlq2wWAAAAABJRU5ErkJggg=="},tf39:
|
|
|
/*!***********************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Detail/index.less?modules ***!
|
|
|
\***********************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___15tXk",flex_space_between:"flex_space_between___2JIaf",flex_box_vertical_center:"flex_box_vertical_center___3168W",flex_box_center_end:"flex_box_center_end___16myc",flex_box_column:"flex_box_column___Ye8vh",title:"title___z0esv",export:"export___1cim9",bg:"bg___1nEgJ",tabs:"tabs___1HwEE"}},u2Z1:
|
|
|
/*!********************************************!*\
|
|
|
!*** ./src/components/Knowledge/index.tsx ***!
|
|
|
\********************************************/
|
|
|
/*! exports provided: Knowledge */
|
|
|
/*! exports used: Knowledge */function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));n(/*! antd/es/message/style */"miYZ");var r=n(/*! antd/es/message */"tsqr"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),a=(n(/*! antd/es/input/style */"5NDa"),n(/*! antd/es/input */"5rEg")),o=(n(/*! antd/es/modal/style */"2qtc"),n(/*! antd/es/modal */"kLXV")),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),l=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),c=(n(/*! antd/es/select/style */"OaEy"),n(/*! antd/es/select */"2fM7")),u=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),d=n.n(u),h=n(/*! react */"q1tI"),f=n.n(h),p=n(/*! @/utils/fetch */"ErOA"),m=n(/*! ./index.less?modules */"i58Z"),g=n.n(m),v=n(/*! ./icon.png */"T1X5"),b=n.n(v),y=c.a.Option,E=function(e){var t=e.subId,n=e.value,u=e.selectvalues,m=e.disabled,v=e.knowledgeOptions,E=void 0===v?[]:v,x=e.onChange,_=void 0===x?function(){}:x,k=e.onAddKnowledgeFinish,w=void 0===k?function(){}:k,C=Object(h.useRef)(),S=Object(h.useState)([]),O=Object(l.a)(S,2),A=O[0],T=O[1];n=n||[];Object(h.useEffect)((function(){(null==u?void 0:u.length)>0&&(T(Object(s.a)(u)),_(Object(s.a)(u)))}),[E]),Object(h.useEffect)((function(){var e;(null===(e=n)||void 0===e?void 0:e.length)>0&&_(Object(s.a)(n))}),[E]);return f.a.createElement("div",{className:g.a.wrap},f.a.createElement(c.a,{disabled:!t||m,className:"mr5",style:{width:"242px"},onChange:function(e,t){e?(T([t.key]),_([t.key])):(T([]),_([]))},showSearch:!0,allowClear:!0,value:null==E?void 0:E.filter((function(e){return(null==A?void 0:A.includes(null==e?void 0:e.id))||(null==A?void 0:A.includes((null==e?void 0:e.id)+""))})).map((function(e){return e.name}))},null==E?void 0:E.map((function(e){return f.a.createElement(y,{key:e.id,value:e.name},f.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},f.a.createElement("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},e.name),f.a.createElement("span",null,"personal"===e.type?"(自用)":"")))}))),f.a.createElement("button",{disabled:!t,className:"".concat(g.a.addKnowledge," ").concat(t?"":g.a.disabled),onClick:function(e){e.preventDefault(),C.current="",o.a.confirm({centered:!0,width:700,okText:"确定",cancelText:"取消",icon:null,title:"新建知识点",className:"custom-modal-divider",content:f.a.createElement("div",{className:"font14"},f.a.createElement("div",{style:{display:"flex",marginTop:"48px",marginBottom:"36px"}},f.a.createElement("img",{src:b.a,style:{width:"108px",height:"108px",marginRight:"29px"}}),"您填写的知识点暂时仅对本人可见,平台审核通过后将列入公开知识点,对所有用户可见;",f.a.createElement("br",null),"平台审核过程中有权删除不合适的知识点(包括但不限于错误、非法、不雅、不匹配当前课程等情形),删除后可能影响您的试题的正常使用。",f.a.createElement("br",null),"请认真填写与教学内容相关的真实知识点 ",f.a.createElement("br",null)),f.a.createElement(a.a,{className:"mt5",maxLength:20,style:{marginBottom:"42px"},placeholder:"请输入不超过20字的知识点名称",defaultValue:C.current,onChange:function(e){C.current=e.target.value}})),onOk:function(){return new Promise(function(){var e=Object(i.a)(d.a.mark((function e(n,i){var a,o;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(C.current){e.next=3;break}return r.b.warn("请输入知识点名称"),e.abrupt("return",i());case 3:if(!(C.current.length>20)){e.next=6;break}return r.b.warn("请输入不超过20字的知识点名称"),e.abrupt("return",i());case 6:return e.next=8,Object(p.a)("/api/tag_disciplines.json",{method:"post",body:{name:C.current,sub_discipline_id:t}});case 8:return 0===(null==(a=e.sent)?void 0:a.status)&&(w({id:a.tag_discipline_id,name:C.current,type:"personal"}),(o=[]).push(a.tag_discipline_id),_([].concat(o)),T([a.tag_discipline_id]),_([].concat(o))),e.abrupt("return",n());case 11:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}())}})}},"新建知识点"))}},u3os:
|
|
|
/*!***********************************************!*\
|
|
|
!*** ./node_modules/size-sensor/lib/index.js ***!
|
|
|
\***********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ver=t.clear=t.bind=void 0;var r=n(/*! ./sensorPool */"P4Qj");t.bind=function(e,t){var n=(0,r.getSensor)(e);return n.bind(t),function(){n.unbind(t)}};t.clear=function(e){var t=(0,r.getSensor)(e);(0,r.removeSensor)(t)};t.ver="1.0.1"},uJ6K:
|
|
|
/*!***************************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Export/components/Head/index.less?modules ***!
|
|
|
\***************************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={wrap:"wrap___1AALq",img:"img___20GEO",table:"table___26NT5",totalScore:"totalScore___1t1Bx",people:"people___BMR7K",glassSeal:"glassSeal___2woZ-"}},ueOF:
|
|
|
/*!*******************************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Detail/components/Checking/index.less?modules ***!
|
|
|
\*******************************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___3u1kD",flex_space_between:"flex_space_between___1iSrL",flex_box_vertical_center:"flex_box_vertical_center___18buA",flex_box_center_end:"flex_box_center_end___35UIs",flex_box_column:"flex_box_column___2UKLk",customModal:"customModal___ppNnJ",checking:"checking___3Jkqo",content:"content___1lP2Z",group:"group___29dCl",footer:"footer___3jXcc"}},ulZh:
|
|
|
/*!*****************************************!*\
|
|
|
!*** ./node_modules/hls.js/dist/hls.js ***!
|
|
|
\*****************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;"undefined"!=typeof window&&(r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/",n(n.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":
|
|
|
/*!*********************************************!*\
|
|
|
!*** ./node_modules/eventemitter3/index.js ***!
|
|
|
\*********************************************/
|
|
|
/*! no static exports found */function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,i="~";function a(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,n,r,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new o(n,r||e,a),l=i?i+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function l(e,t){0==--e._eventsCount?e._events=new a:delete e._events[t]}function c(){this._events=new a,this._eventsCount=0}Object.create&&(a.prototype=Object.create(null),(new a).__proto__||(i=!1)),c.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)r.call(e,t)&&n.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},c.prototype.listeners=function(e){var t=i?i+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,a=n.length,o=new Array(a);r<a;r++)o[r]=n[r].fn;return o},c.prototype.listenerCount=function(e){var t=i?i+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,r,a,o){var s=i?i+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,r),!0;case 5:return u.fn.call(u.context,t,n,r,a),!0;case 6:return u.fn.call(u.context,t,n,r,a,o),!0}for(c=1,l=new Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var h,f=u.length;for(c=0;c<f;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,n);break;case 4:u[c].fn.call(u[c].context,t,n,r);break;default:if(!l)for(h=1,l=new Array(d-1);h<d;h++)l[h-1]=arguments[h];u[c].fn.apply(u[c].context,l)}}return!0},c.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,r){var a=i?i+e:e;if(!this._events[a])return this;if(!t)return l(this,a),this;var o=this._events[a];if(o.fn)o.fn!==t||r&&!o.once||n&&o.context!==n||l(this,a);else{for(var s=0,c=[],u=o.length;s<u;s++)(o[s].fn!==t||r&&!o[s].once||n&&o[s].context!==n)&&c.push(o[s]);c.length?this._events[a]=1===c.length?c[0]:c:l(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=i?i+e:e,this._events[t]&&l(this,t)):(this._events=new a,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=i,c.EventEmitter=c,e.exports=c},"./node_modules/url-toolkit/src/url-toolkit.js":
|
|
|
/*!*****************************************************!*\
|
|
|
!*** ./node_modules/url-toolkit/src/url-toolkit.js ***!
|
|
|
\*****************************************************/
|
|
|
/*! no static exports found */function(e,t,n){var r,i,a,o,s;r=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,i=/^([^\/?#]*)([^]*)$/,a=/(?:\/|^)\.(?=\/)/g,o=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,s={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var r=s.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=s.normalizePath(r.path),s.buildURLFromParts(r)}var a=s.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return n.alwaysNormalize?(a.path=s.normalizePath(a.path),s.buildURLFromParts(a)):t;var o=s.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var l=i.exec(o.path);o.netLoc=l[1],o.path=l[2]}o.netLoc&&!o.path&&(o.path="/");var c={scheme:o.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(c.netLoc=o.netLoc,"/"!==a.path[0]))if(a.path){var u=o.path,d=u.substring(0,u.lastIndexOf("/")+1)+a.path;c.path=s.normalizePath(d)}else c.path=o.path,a.params||(c.params=o.params,a.query||(c.query=o.query));return null===c.path&&(c.path=n.alwaysNormalize?s.normalizePath(a.path):a.path),s.buildURLFromParts(c)},parseURL:function(e){var t=r.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(a,"");e.length!==(e=e.replace(o,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=s},"./node_modules/webworkify-webpack/index.js":
|
|
|
/*!**************************************************!*\
|
|
|
!*** ./node_modules/webworkify-webpack/index.js ***!
|
|
|
\**************************************************/
|
|
|
/*! no static exports found */function(e,t,n){function r(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n.oe=function(e){throw console.error(e),e};var r=n(n.s=ENTRY_MODULE);return r.default||r}function i(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function a(e,t,r){var a={};a[r]=[];var o=t.toString(),s=o.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!s)return a;for(var l,c=s[1],u=new RegExp("(\\\\n|\\W)"+i(c)+"\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)","g");l=u.exec(o);)"dll-reference"!==l[3]&&a[r].push(l[3]);for(u=new RegExp("\\("+i(c)+'\\("(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))"\\)\\)\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)',"g");l=u.exec(o);)e[l[2]]||(a[r].push(l[1]),e[l[2]]=n(l[1]).m),a[l[2]]=a[l[2]]||[],a[l[2]].push(l[4]);for(var d,h=Object.keys(a),f=0;f<h.length;f++)for(var p=0;p<a[h[f]].length;p++)d=a[h[f]][p],isNaN(1*d)||(a[h[f]][p]=1*a[h[f]][p]);return a}function o(e){return Object.keys(e).reduce((function(t,n){return t||e[n].length>0}),!1)}e.exports=function(e,t){t=t||{};var i={main:n.m},s=t.all?{main:Object.keys(i.main)}:function(e,t){for(var n={main:[t]},r={main:[]},i={main:{}};o(n);)for(var s=Object.keys(n),l=0;l<s.length;l++){var c=s[l],u=n[c].pop();if(i[c]=i[c]||{},!i[c][u]&&e[c][u]){i[c][u]=!0,r[c]=r[c]||[],r[c].push(u);for(var d=a(e,e[c][u],c),h=Object.keys(d),f=0;f<h.length;f++)n[h[f]]=n[h[f]]||[],n[h[f]]=n[h[f]].concat(d[h[f]])}}return r}(i,e),l="";Object.keys(s).filter((function(e){return"main"!==e})).forEach((function(e){for(var t=0;s[e][t];)t++;s[e].push(t),i[e][t]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",l=l+"var "+e+" = ("+r.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+s[e].map((function(t){return JSON.stringify(t)+": "+i[e][t].toString()})).join(",")+"});\n"})),l=l+"new (("+r.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+s.main.map((function(e){return JSON.stringify(e)+": "+i.main[e].toString()})).join(",")+"}))(self);";var c=new window.Blob([l],{type:"text/javascript"});if(t.bare)return c;var u=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(c),d=new window.Worker(u);return d.objectURL=u,d}},"./src/config.ts":
|
|
|
/*!***********************!*\
|
|
|
!*** ./src/config.ts ***!
|
|
|
\***********************/
|
|
|
/*! exports provided: hlsDefaultConfig, mergeConfig, enableStreamingMode */function(e,t,n){"use strict";n.r(t),n.d(t,"hlsDefaultConfig",(function(){return k})),n.d(t,"mergeConfig",(function(){return w})),n.d(t,"enableStreamingMode",(function(){return C}));var r=n(/*! ./controller/abr-controller */"./src/controller/abr-controller.ts"),i=n(/*! ./controller/audio-stream-controller */"./src/controller/audio-stream-controller.ts"),a=n(/*! ./controller/audio-track-controller */"./src/controller/audio-track-controller.ts"),o=n(/*! ./controller/subtitle-stream-controller */"./src/controller/subtitle-stream-controller.ts"),s=n(/*! ./controller/subtitle-track-controller */"./src/controller/subtitle-track-controller.ts"),l=n(/*! ./controller/buffer-controller */"./src/controller/buffer-controller.ts"),c=n(/*! ./controller/timeline-controller */"./src/controller/timeline-controller.ts"),u=n(/*! ./controller/cap-level-controller */"./src/controller/cap-level-controller.ts"),d=n(/*! ./controller/fps-controller */"./src/controller/fps-controller.ts"),h=n(/*! ./controller/eme-controller */"./src/controller/eme-controller.ts"),f=n(/*! ./controller/cmcd-controller */"./src/controller/cmcd-controller.ts"),p=n(/*! ./utils/xhr-loader */"./src/utils/xhr-loader.ts"),m=n(/*! ./utils/fetch-loader */"./src/utils/fetch-loader.ts"),g=n(/*! ./utils/cues */"./src/utils/cues.ts"),v=n(/*! ./utils/mediakeys-helper */"./src/utils/mediakeys-helper.ts"),b=n(/*! ./utils/logger */"./src/utils/logger.ts");function y(){return(y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var k=x(x({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,maxBufferSize:6e7,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:p.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:r.default,bufferController:l.default,capLevelController:u.default,fpsController:d.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:v.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},{cueHandler:g.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:o.SubtitleStreamController,subtitleTrackController:s.default,timelineController:c.TimelineController,audioStreamController:i.default,audioTrackController:a.default,emeController:h.default,cmcdController:f.default});function w(e,t){if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(void 0!==t.liveMaxLatencyDurationCount&&(void 0===t.liveSyncDurationCount||t.liveMaxLatencyDurationCount<=t.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(void 0!==t.liveMaxLatencyDuration&&(void 0===t.liveSyncDuration||t.liveMaxLatencyDuration<=t.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return y({},e,t)}function C(e){var t=e.loader;t!==m.default&&t!==p.default?(b.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),e.progressive=!1):Object(m.fetchSupported)()&&(e.loader=m.default,e.progressive=!0,e.enableSoftwareAES=!0,b.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}},"./src/controller/abr-controller.ts":
|
|
|
/*!******************************************!*\
|
|
|
!*** ./src/controller/abr-controller.ts ***!
|
|
|
\******************************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/ewma-bandwidth-estimator */"./src/utils/ewma-bandwidth-estimator.ts"),a=n(/*! ../events */"./src/events.ts"),o=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),s=n(/*! ../errors */"./src/errors.ts"),l=n(/*! ../types/loader */"./src/types/loader.ts"),c=n(/*! ../utils/logger */"./src/utils/logger.ts");function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var d=function(){function e(e){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=e;var t=e.config;this.bwEstimator=new i.default(t.abrEwmaSlowVoD,t.abrEwmaFastVoD,t.abrEwmaDefaultEstimate),this.registerListeners()}var t,n,d,h=e.prototype;return h.registerListeners=function(){var e=this.hls;e.on(a.Events.FRAG_LOADING,this.onFragLoading,this),e.on(a.Events.FRAG_LOADED,this.onFragLoaded,this),e.on(a.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.on(a.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(a.Events.ERROR,this.onError,this)},h.unregisterListeners=function(){var e=this.hls;e.off(a.Events.FRAG_LOADING,this.onFragLoading,this),e.off(a.Events.FRAG_LOADED,this.onFragLoaded,this),e.off(a.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.off(a.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(a.Events.ERROR,this.onError,this)},h.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},h.onFragLoading=function(e,t){var n,r=t.frag;r.type===l.PlaylistLevelType.MAIN&&(this.timer||(this.fragCurrent=r,this.partCurrent=null!=(n=t.part)?n:null,this.timer=self.setInterval(this.onCheck,100)))},h.onLevelLoaded=function(e,t){var n=this.hls.config;t.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD)},h._abandonRulesCheck=function(){var e=this.fragCurrent,t=this.partCurrent,n=this.hls,i=n.autoLevelEnabled,s=n.config,l=n.media;if(e&&l){var u=t?t.stats:e.stats,d=t?t.duration:e.duration;if(u.aborted)return c.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),void(this._nextAutoLevel=-1);if(i&&!l.paused&&l.playbackRate&&l.readyState){var h=performance.now()-u.loading.start,f=Math.abs(l.playbackRate);if(!(h<=500*d/f)){var p=n.levels,m=n.minAutoLevel,g=p[e.level],v=u.total||Math.max(u.loaded,Math.round(d*g.maxBitrate/8)),b=Math.max(1,u.bwEstimate?u.bwEstimate/8:1e3*u.loaded/h),y=(v-u.loaded)/b,E=l.currentTime,x=(o.BufferHelper.bufferInfo(l,E,s.maxBufferHole).end-E)/f;if(!(x>=2*d/f||y<=x)){var _,k=Number.POSITIVE_INFINITY;for(_=e.level-1;_>m&&!((k=d*p[_].maxBitrate/(6.4*b))<x);_--);if(!(k>=y)){var w=this.bwEstimator.getEstimate();c.logger.warn("Fragment "+e.sn+(t?" part "+t.index:"")+" of level "+e.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+_+"\n Current BW estimate: "+(Object(r.isFiniteNumber)(w)?(w/1024).toFixed(3):"Unknown")+" Kb/s\n Estimated load time for current fragment: "+y.toFixed(3)+" s\n Estimated load time for the next fragment: "+k.toFixed(3)+" s\n Time to underbuffer: "+x.toFixed(3)+" s"),n.nextLoadLevel=_,this.bwEstimator.sample(h,u.loaded),this.clearTimer(),e.loader&&(this.fragCurrent=this.partCurrent=null,e.loader.abort()),n.trigger(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:t,stats:u})}}}}}},h.onFragLoaded=function(e,t){var n=t.frag,i=t.part;if(n.type===l.PlaylistLevelType.MAIN&&Object(r.isFiniteNumber)(n.sn)){var o=i?i.stats:n.stats,s=i?i.duration:n.duration;if(this.clearTimer(),this.lastLoadedFragLevel=n.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var c=this.hls.levels[n.level],u=(c.loaded?c.loaded.bytes:0)+o.loaded,d=(c.loaded?c.loaded.duration:0)+s;c.loaded={bytes:u,duration:d},c.realBitrate=Math.round(8*u/d)}if(n.bitrateTest){var h={stats:o,frag:n,part:i,id:n.type};this.onFragBuffered(a.Events.FRAG_BUFFERED,h),n.bitrateTest=!1}}},h.onFragBuffered=function(e,t){var n=t.frag,r=t.part,i=r?r.stats:n.stats;if(!i.aborted&&n.type===l.PlaylistLevelType.MAIN&&"initSegment"!==n.sn){var a=i.parsing.end-i.loading.start;this.bwEstimator.sample(a,i.loaded),i.bwEstimate=this.bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}},h.onError=function(e,t){switch(t.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}},h.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},h.getNextABRAutoLevel=function(){var e=this.fragCurrent,t=this.partCurrent,n=this.hls,r=n.maxAutoLevel,i=n.config,a=n.minAutoLevel,s=n.media,l=t?t.duration:e?e.duration:0,u=s?s.currentTime:0,d=s&&0!==s.playbackRate?Math.abs(s.playbackRate):1,h=this.bwEstimator?this.bwEstimator.getEstimate():i.abrEwmaDefaultEstimate,f=(o.BufferHelper.bufferInfo(s,u,i.maxBufferHole).end-u)/d,p=this.findBestLevel(h,a,r,f,i.abrBandWidthFactor,i.abrBandWidthUpFactor);if(p>=0)return p;c.logger.trace((f?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var m=l?Math.min(l,i.maxStarvationDelay):i.maxStarvationDelay,g=i.abrBandWidthFactor,v=i.abrBandWidthUpFactor;if(!f){var b=this.bitrateTestDelay;b&&(m=(l?Math.min(l,i.maxLoadingDelay):i.maxLoadingDelay)-b,c.logger.trace("bitrate test took "+Math.round(1e3*b)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*m)+" ms"),g=v=1)}return p=this.findBestLevel(h,a,r,f+m,g,v),Math.max(p,0)},h.findBestLevel=function(e,t,n,r,i,a){for(var o,s=this.fragCurrent,l=this.partCurrent,u=this.lastLoadedFragLevel,d=this.hls.levels,h=d[u],f=!(null==h||null===(o=h.details)||void 0===o||!o.live),p=null==h?void 0:h.codecSet,m=l?l.duration:s?s.duration:0,g=n;g>=t;g--){var v=d[g];if(v&&(!p||v.codecSet===p)){var b=v.details,y=(l?null==b?void 0:b.partTarget:null==b?void 0:b.averagetargetduration)||m,E=void 0;E=g<=u?i*e:a*e;var x=d[g].maxBitrate,_=x*y/E;if(c.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+g+"/"+Math.round(E)+"/"+x+"/"+y+"/"+r+"/"+_),E>x&&(!_||f&&!this.bitrateTestDelay||_<r))return g}}return-1},t=e,(n=[{key:"nextAutoLevel",get:function(){var e=this._nextAutoLevel,t=this.bwEstimator;if(!(-1===e||t&&t.canEstimate()))return e;var n=this.getNextABRAutoLevel();return-1!==e&&(n=Math.min(e,n)),n},set:function(e){this._nextAutoLevel=e}}])&&u(t.prototype,n),d&&u(t,d),e}();t.default=d},"./src/controller/audio-stream-controller.ts":
|
|
|
/*!***************************************************!*\
|
|
|
!*** ./src/controller/audio-stream-controller.ts ***!
|
|
|
\***************************************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./base-stream-controller */"./src/controller/base-stream-controller.ts"),a=n(/*! ../events */"./src/events.ts"),o=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),s=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),l=n(/*! ../types/level */"./src/types/level.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts"),u=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),d=n(/*! ../demux/chunk-cache */"./src/demux/chunk-cache.ts"),h=n(/*! ../demux/transmuxer-interface */"./src/demux/transmuxer-interface.ts"),f=n(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),p=n(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),m=n(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),g=n(/*! ../errors */"./src/errors.ts"),v=n(/*! ../utils/logger */"./src/utils/logger.ts");function b(){return(b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var E=function(e){var t,n;function E(t,n){var r;return(r=e.call(this,t,n,"[audio-stream-controller]")||this).videoBuffer=null,r.videoTrackCC=-1,r.waitingVideoCC=-1,r.audioSwitch=!1,r.trackId=-1,r.waitingData=null,r.mainDetails=null,r.bufferFlushed=!1,r._registerListeners(),r}n=e,(t=E).prototype=Object.create(n.prototype),t.prototype.constructor=t,y(t,n);var x=E.prototype;return x.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},x._registerListeners=function(){var e=this.hls;e.on(a.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(a.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(a.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(a.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(a.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(a.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(a.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(a.Events.ERROR,this.onError,this),e.on(a.Events.BUFFER_RESET,this.onBufferReset,this),e.on(a.Events.BUFFER_CREATED,this.onBufferCreated,this),e.on(a.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(a.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(a.Events.FRAG_BUFFERED,this.onFragBuffered,this)},x._unregisterListeners=function(){var e=this.hls;e.off(a.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(a.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(a.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(a.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(a.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(a.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(a.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(a.Events.ERROR,this.onError,this),e.off(a.Events.BUFFER_RESET,this.onBufferReset,this),e.off(a.Events.BUFFER_CREATED,this.onBufferCreated,this),e.off(a.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(a.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(a.Events.FRAG_BUFFERED,this.onFragBuffered,this)},x.onInitPtsFound=function(e,t){var n=t.frag,r=t.id,a=t.initPTS;if("main"===r){var o=n.cc;this.initPTS[n.cc]=a,this.log("InitPTS for cc: "+o+" found from main: "+a),this.videoTrackCC=o,this.state===i.State.WAITING_INIT_PTS&&this.tick()}},x.startLoad=function(e){if(!this.levels)return this.startPosition=e,void(this.state=i.State.STOPPED);var t=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),this.fragLoadError=0,t>0&&-1===e?(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),this.state=i.State.IDLE):(this.loadedmetadata=!1,this.state=i.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()},x.doTick=function(){switch(this.state){case i.State.IDLE:this.doTickIdle();break;case i.State.WAITING_TRACK:var t,n=this.levels,r=this.trackId,a=null==n||null===(t=n[r])||void 0===t?void 0:t.details;if(a){if(this.waitForCdnTuneIn(a))break;this.state=i.State.WAITING_INIT_PTS}break;case i.State.FRAG_LOADING_WAITING_RETRY:var s,l=performance.now(),c=this.retryDate;(!c||l>=c||null!==(s=this.media)&&void 0!==s&&s.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=i.State.IDLE);break;case i.State.WAITING_INIT_PTS:var u=this.waitingData;if(u){var d=u.frag,h=u.part,f=u.cache,m=u.complete;if(void 0!==this.initPTS[d.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=i.State.FRAG_LOADING;var g={frag:d,part:h,payload:f.flush(),networkDetails:null};this._handleFragmentLoadProgress(g),m&&e.prototype._handleFragmentLoadComplete.call(this,g)}else if(this.videoTrackCC!==this.waitingVideoCC)v.logger.log("Waiting fragment cc ("+d.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var b=this.getLoadPosition(),y=o.BufferHelper.bufferInfo(this.mediaBuffer,b,this.config.maxBufferHole);Object(p.fragmentWithinToleranceTest)(y.end,this.config.maxFragLookUpTolerance,d)<0&&(v.logger.log("Waiting fragment cc ("+d.cc+") @ "+d.start+" cancelled because another fragment at "+y.end+" is needed"),this.clearWaitingFragment())}}else this.state=i.State.IDLE}this.onTickEnd()},x.clearWaitingFragment=function(){var e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=i.State.IDLE)},x.onTickEnd=function(){var e=this.media;if(e&&e.readyState){var t=(this.mediaBuffer?this.mediaBuffer:e).buffered;!this.loadedmetadata&&t.length&&(this.loadedmetadata=!0),this.lastCurrentTime=e.currentTime}},x.doTickIdle=function(){var e,t,n=this.hls,r=this.levels,o=this.media,s=this.trackId,l=n.config;if(r&&r[s]&&(o||!this.startFragRequested&&l.startFragPrefetch)){var d=r[s].details;if(!d||d.live&&this.levelLastLoaded!==s||this.waitForCdnTuneIn(d))this.state=i.State.WAITING_TRACK;else{this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,u.ElementaryStreamTypes.AUDIO,c.PlaylistLevelType.AUDIO));var h=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,c.PlaylistLevelType.AUDIO);if(null!==h){var f=h.len,p=this.getMaxBufferLength(),m=this.audioSwitch;if(!(f>=p)||m){if(!m&&this._streamEnded(h,d))return n.trigger(a.Events.BUFFER_EOS,{type:"audio"}),void(this.state=i.State.ENDED);var g=d.fragments[0].start,v=h.end;if(m){var b=this.getLoadPosition();v=b,d.PTSKnown&&b<g&&(h.end>g||h.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),o.currentTime=g+.05)}var y=this.getNextFragment(v,d);y?"identity"!==(null===(e=y.decryptdata)||void 0===e?void 0:e.keyFormat)||null!==(t=y.decryptdata)&&void 0!==t&&t.key?this.loadFragment(y,d,v):this.loadKey(y,d):this.bufferFlushed=!0}}}}},x.getMaxBufferLength=function(){var t=e.prototype.getMaxBufferLength.call(this),n=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,c.PlaylistLevelType.MAIN);return null===n?t:Math.max(t,n.len)},x.onMediaDetaching=function(){this.videoBuffer=null,e.prototype.onMediaDetaching.call(this)},x.onAudioTracksUpdated=function(e,t){var n=t.audioTracks;this.resetTransmuxer(),this.levels=n.map((function(e){return new l.Level(e)}))},x.onAudioTrackSwitching=function(e,t){var n=!!t.url;this.trackId=t.id;var r=this.fragCurrent;null!=r&&r.loader&&r.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),n?this.setInterval(100):this.resetTransmuxer(),n?(this.audioSwitch=!0,this.state=i.State.IDLE):this.state=i.State.STOPPED,this.tick()},x.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},x.onLevelLoaded=function(e,t){this.mainDetails=t.details},x.onAudioTrackLoaded=function(e,t){var n,r=this.levels,a=t.details,o=t.id;if(r){this.log("Track "+o+" loaded ["+a.startSN+","+a.endSN+"],duration:"+a.totalduration);var s=r[o],l=0;if(a.live||null!==(n=s.details)&&void 0!==n&&n.live){var c=this.mainDetails;if(a.fragments[0]||(a.deltaUpdateFailed=!0),a.deltaUpdateFailed||!c)return;!s.details&&a.hasProgramDateTime&&c.hasProgramDateTime?(Object(m.alignMediaPlaylistByPDT)(a,c),l=a.fragments[0].start):l=this.alignPlaylists(a,s.details)}s.details=a,this.levelLastLoaded=o,this.startFragRequested||!this.mainDetails&&a.live||this.setStartPosition(s.details,l),this.state!==i.State.WAITING_TRACK||this.waitForCdnTuneIn(a)||(this.state=i.State.IDLE),this.tick()}else this.warn("Audio tracks were reset while loading level "+o)},x._handleFragmentLoadProgress=function(e){var t,n=e.frag,r=e.part,a=e.payload,o=this.config,s=this.trackId,l=this.levels;if(l){var u=l[s];console.assert(u,"Audio track is defined on fragment load progress");var p=u.details;console.assert(p,"Audio track details are defined on fragment load progress");var m=o.defaultAudioCodec||u.audioCodec||"mp4a.40.2",g=this.transmuxer;g||(g=this.transmuxer=new h.default(this.hls,c.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var b=this.initPTS[n.cc],y=null===(t=n.initSegment)||void 0===t?void 0:t.data;if(void 0!==b){var E=r?r.index:-1,x=-1!==E,_=new f.ChunkMetadata(n.level,n.sn,n.stats.chunkCount,a.byteLength,E,x);g.push(a,y,m,"",n,r,p.totalduration,!1,_,b)}else v.logger.log("Unknown video PTS for cc "+n.cc+", waiting for video PTS before demuxing audio frag "+n.sn+" of ["+p.startSN+" ,"+p.endSN+"],track "+s),(this.waitingData=this.waitingData||{frag:n,part:r,cache:new d.default,complete:!1}).cache.push(new Uint8Array(a)),this.waitingVideoCC=this.videoTrackCC,this.state=i.State.WAITING_INIT_PTS}else this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},x._handleFragmentLoadComplete=function(t){this.waitingData?this.waitingData.complete=!0:e.prototype._handleFragmentLoadComplete.call(this,t)},x.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},x.onBufferCreated=function(e,t){var n=t.tracks.audio;n&&(this.mediaBuffer=n.buffer),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer)},x.onFragBuffered=function(e,t){var n=t.frag,r=t.part;n.type===c.PlaylistLevelType.AUDIO&&(this.fragContextChanged(n)?this.warn("Fragment "+n.sn+(r?" p: "+r.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch):("initSegment"!==n.sn&&(this.fragPrevious=n,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(a.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(n,r)))},x.onError=function(t,n){switch(n.details){case g.ErrorDetails.FRAG_LOAD_ERROR:case g.ErrorDetails.FRAG_LOAD_TIMEOUT:case g.ErrorDetails.KEY_LOAD_ERROR:case g.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(c.PlaylistLevelType.AUDIO,n);break;case g.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case g.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==i.State.ERROR&&this.state!==i.State.STOPPED&&(this.state=n.fatal?i.State.ERROR:i.State.IDLE,this.warn(n.details+" while loading frag, switching to "+this.state+" state"));break;case g.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===n.parent&&(this.state===i.State.PARSING||this.state===i.State.PARSED)){var r=!0,a=this.getFwdBufferInfo(this.mediaBuffer,c.PlaylistLevelType.AUDIO);a&&a.len>.5&&(r=!this.reduceMaxBufferLength(a.len)),r&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}}},x.onBufferFlushed=function(e,t){t.type===u.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},x._handleTransmuxComplete=function(e){var t,n="audio",r=this.hls,o=e.remuxResult,s=e.chunkMeta,l=this.getCurrentContext(s);if(!l)return this.warn("The loading context changed while buffering fragment "+s.sn+" of level "+s.level+". This chunk will not be buffered."),void this.resetLiveStartWhenNotLoaded(s.level);var c=l.frag,d=l.part,h=o.audio,f=o.text,p=o.id3,m=o.initSegment;if(!this.fragContextChanged(c)){if(this.state=i.State.PARSING,this.audioSwitch&&h&&this.completeAudioSwitch(),null!=m&&m.tracks&&(this._bufferInitSegment(m.tracks,c,s),r.trigger(a.Events.FRAG_PARSING_INIT_SEGMENT,{frag:c,id:n,tracks:m.tracks})),h){var g=h.startPTS,v=h.endPTS,y=h.startDTS,E=h.endDTS;d&&(d.elementaryStreams[u.ElementaryStreamTypes.AUDIO]={startPTS:g,endPTS:v,startDTS:y,endDTS:E}),c.setElementaryStreamInfo(u.ElementaryStreamTypes.AUDIO,g,v,y,E),this.bufferFragmentData(h,c,d,s)}if(null!=p&&null!==(t=p.samples)&&void 0!==t&&t.length){var x=b({frag:c,id:n},p);r.trigger(a.Events.FRAG_PARSING_METADATA,x)}if(f){var _=b({frag:c,id:n},f);r.trigger(a.Events.FRAG_PARSING_USERDATA,_)}}},x._bufferInitSegment=function(e,t,n){if(this.state===i.State.PARSING){e.video&&delete e.video;var r=e.audio;if(r){r.levelCodec=r.codec,r.id="audio",this.log("Init audio buffer, container:"+r.container+", codecs[parsed]=["+r.codec+"]"),this.hls.trigger(a.Events.BUFFER_CODECS,e);var o=r.initSegment;if(null!=o&&o.byteLength){var s={type:"audio",frag:t,part:null,chunkMeta:n,parent:t.type,data:o};this.hls.trigger(a.Events.BUFFER_APPENDING,s)}this.tick()}}},x.loadFragment=function(t,n,a){var o=this.fragmentTracker.getState(t);this.fragCurrent=t,(this.audioSwitch||o===s.FragmentState.NOT_LOADED||o===s.FragmentState.PARTIAL)&&("initSegment"===t.sn?this._loadInitSegment(t):n.live&&!Object(r.isFiniteNumber)(this.initPTS[t.cc])?(this.log("Waiting for video PTS in continuity counter "+t.cc+" of live stream before loading audio fragment "+t.sn+" of level "+this.trackId),this.state=i.State.WAITING_INIT_PTS):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,n,a)))},x.completeAudioSwitch=function(){var t=this.hls,n=this.media,r=this.trackId;n&&(this.log("Switching audio track : flushing all audio"),e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,t.trigger(a.Events.AUDIO_TRACK_SWITCHED,{id:r})},E}(i.default);t.default=E},"./src/controller/audio-track-controller.ts":
|
|
|
/*!**************************************************!*\
|
|
|
!*** ./src/controller/audio-track-controller.ts ***!
|
|
|
\**************************************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),o=n(/*! ../types/loader */"./src/types/loader.ts");function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=function(e){var t,n;function a(t){var n;return(n=e.call(this,t,"[audio-track-controller]")||this).tracks=[],n.groupId=null,n.tracksInGroup=[],n.trackId=-1,n.trackName="",n.selectDefaultTrack=!0,n.registerListeners(),n}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n);var c,u,d,h=a.prototype;return h.registerListeners=function(){var e=this.hls;e.on(r.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(r.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(r.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(r.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(r.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(r.Events.ERROR,this.onError,this)},h.unregisterListeners=function(){var e=this.hls;e.off(r.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(r.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(r.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(r.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(r.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(r.Events.ERROR,this.onError,this)},h.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,e.prototype.destroy.call(this)},h.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},h.onManifestParsed=function(e,t){this.tracks=t.audioTracks||[]},h.onAudioTrackLoaded=function(e,t){var n=t.id,r=t.details,i=this.tracksInGroup[n];if(i){var a=i.details;i.details=t.details,this.log("audioTrack "+n+" loaded ["+r.startSN+"-"+r.endSN+"]"),n===this.trackId&&(this.retryCount=0,this.playlistLoaded(n,t,a))}else this.warn("Invalid audio track id "+n)},h.onLevelLoading=function(e,t){this.switchLevel(t.level)},h.onLevelSwitching=function(e,t){this.switchLevel(t.level)},h.switchLevel=function(e){var t=this.hls.levels[e];if(null!=t&&t.audioGroupIds){var n=t.audioGroupIds[t.urlId];if(this.groupId!==n){this.groupId=n;var i=this.tracks.filter((function(e){return!n||e.groupId===n}));this.selectDefaultTrack&&!i.some((function(e){return e.default}))&&(this.selectDefaultTrack=!1),this.tracksInGroup=i;var a={audioTracks:i};this.log("Updating audio tracks, "+i.length+' track(s) found in "'+n+'" group-id'),this.hls.trigger(r.Events.AUDIO_TRACKS_UPDATED,a),this.selectInitialTrack()}}},h.onError=function(t,n){e.prototype.onError.call(this,t,n),!n.fatal&&n.context&&n.context.type===o.PlaylistContextType.AUDIO_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},h.setAudioTrack=function(e){var t=this.tracksInGroup;if(e<0||e>=t.length)this.warn("Invalid id passed to audio-track controller");else{this.clearTimer();var n=t[this.trackId];this.log("Now switching to audio-track index "+e);var i=t[e],a=i.id,o=i.groupId,s=void 0===o?"":o,l=i.name,c=i.type,u=i.url;if(this.trackId=e,this.trackName=l,this.selectDefaultTrack=!1,this.hls.trigger(r.Events.AUDIO_TRACK_SWITCHING,{id:a,groupId:s,name:l,type:c,url:u}),!i.details||i.details.live){var d=this.switchParams(i.url,null==n?void 0:n.details);this.loadPlaylist(d)}}},h.selectInitialTrack=function(){var e=this.tracksInGroup;console.assert(e.length,"Initial audio track should be selected when tracks are known");var t=this.trackName,n=this.findTrackId(t)||this.findTrackId();-1!==n?this.setAudioTrack(n):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},h.findTrackId=function(e){for(var t=this.tracksInGroup,n=0;n<t.length;n++){var r=t[n];if((!this.selectDefaultTrack||r.default)&&(!e||e===r.name))return r.id}return-1},h.loadPlaylist=function(e){var t=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(t)){var n=t.id,i=t.groupId,a=t.url;if(e)try{a=e.addDirectives(a)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("loading audio-track playlist for id: "+n),this.clearTimer(),this.hls.trigger(r.Events.AUDIO_TRACK_LOADING,{url:a,id:n,groupId:i,deliveryDirectives:e||null})}},c=a,(u=[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}}])&&s(c.prototype,u),d&&s(c,d),a}(a.default);t.default=c},"./src/controller/base-playlist-controller.ts":
|
|
|
/*!****************************************************!*\
|
|
|
!*** ./src/controller/base-playlist-controller.ts ***!
|
|
|
\****************************************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return l}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../types/level */"./src/types/level.ts"),a=n(/*! ./level-helper */"./src/controller/level-helper.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ../errors */"./src/errors.ts"),l=function(){function e(e,t){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=o.logger.log.bind(o.logger,t+":"),this.warn=o.logger.warn.bind(o.logger,t+":"),this.hls=e}var t=e.prototype;return t.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},t.onError=function(e,t){t.fatal&&t.type===s.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},t.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},t.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},t.stopLoad=function(){this.canLoad=!1,this.clearTimer()},t.switchParams=function(e,t){var n=null==t?void 0:t.renditionReports;if(n)for(var a=0;a<n.length;a++){var o=n[a],s=""+o.URI;if(s===e.substr(-s.length)){var l=parseInt(o["LAST-MSN"]),c=parseInt(o["LAST-PART"]);if(t&&this.hls.config.lowLatencyMode){var u=Math.min(t.age-t.partTarget,t.targetduration);void 0!==c&&u>t.partTarget&&(c+=1)}if(Object(r.isFiniteNumber)(l))return new i.HlsUrlParameters(l,Object(r.isFiniteNumber)(c)?c:void 0,i.HlsSkip.No)}}},t.loadPlaylist=function(e){},t.shouldLoadTrack=function(e){return this.canLoad&&e&&!!e.url&&(!e.details||e.details.live)},t.playlistLoaded=function(e,t,n){var r=this,i=t.details,o=t.stats,s=o.loading.end?Math.max(0,self.performance.now()-o.loading.end):0;if(i.advancedDateTime=Date.now()-s,i.live||null!=n&&n.live){if(i.reloaded(n),n&&this.log("live playlist "+e+" "+(i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:"MISSED")),n&&i.fragments.length>0&&Object(a.mergeDetails)(n,i),!this.canLoad||!i.live)return;var l,c=void 0,u=void 0;if(i.canBlockReload&&i.endSN&&i.advanced){var d=this.hls.config.lowLatencyMode,h=i.lastPartSn,f=i.endSN,p=i.lastPartIndex,m=h===f;-1!==p?(c=m?f+1:h,u=m?d?0:p:p+1):c=f+1;var g=i.age,v=g+i.ageHeader,b=Math.min(v-i.partTarget,1.5*i.targetduration);if(b>0){if(n&&b>n.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+n.tuneInGoal+" to: "+b+" with playlist age: "+i.age),b=0;else{var y=Math.floor(b/i.targetduration);c+=y,void 0!==u&&(u+=Math.round(b%i.targetduration/i.partTarget)),this.log("CDN Tune-in age: "+i.ageHeader+"s last advanced "+g.toFixed(2)+"s goal: "+b+" skip sn "+y+" to part "+u)}i.tuneInGoal=b}if(l=this.getDeliveryDirectives(i,t.deliveryDirectives,c,u),d||!m)return void this.loadPlaylist(l)}else l=this.getDeliveryDirectives(i,t.deliveryDirectives,c,u);var E=Object(a.computeReloadInterval)(i,o);void 0!==c&&i.canBlockReload&&(E-=i.partTarget||1),this.log("reload live playlist "+e+" in "+Math.round(E)+" ms"),this.timer=self.setTimeout((function(){return r.loadPlaylist(l)}),E)}else this.clearTimer()},t.getDeliveryDirectives=function(e,t,n,r){var a=Object(i.getSkipValue)(e,n);return null!=t&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,a=i.HlsSkip.No),new i.HlsUrlParameters(n,r,a)},t.retryLoadingOrFail=function(e){var t,n=this,r=this.hls.config,i=this.retryCount<r.levelLoadingMaxRetry;if(i)if(this.retryCount++,e.details.indexOf("LoadTimeOut")>-1&&null!==(t=e.context)&&void 0!==t&&t.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+e.details+'"'),this.loadPlaylist();else{var a=Math.min(Math.pow(2,this.retryCount)*r.levelLoadingRetryDelay,r.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout((function(){return n.loadPlaylist()}),a),this.warn("retry playlist loading #"+this.retryCount+" in "+a+' ms after "'+e.details+'"')}else this.warn('cannot recover from error "'+e.details+'"'),this.clearTimer(),e.fatal=!0;return i},e}()},"./src/controller/base-stream-controller.ts":
|
|
|
/*!**************************************************!*\
|
|
|
!*** ./src/controller/base-stream-controller.ts ***!
|
|
|
\**************************************************/
|
|
|
/*! exports provided: State, default */function(e,t,n){"use strict";n.r(t),n.d(t,"State",(function(){return x})),n.d(t,"default",(function(){return _}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../task-loop */"./src/task-loop.ts"),a=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),o=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),s=n(/*! ../utils/logger */"./src/utils/logger.ts"),l=n(/*! ../events */"./src/events.ts"),c=n(/*! ../errors */"./src/errors.ts"),u=n(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),d=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),h=n(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),f=n(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),p=n(/*! ./level-helper */"./src/controller/level-helper.ts"),m=n(/*! ../loader/fragment-loader */"./src/loader/fragment-loader.ts"),g=n(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),v=n(/*! ../utils/time-ranges */"./src/utils/time-ranges.ts"),b=n(/*! ../types/loader */"./src/types/loader.ts");function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var x={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},_=function(e){var t,n;function i(t,n,r){var i;return(i=e.call(this)||this).hls=void 0,i.fragPrevious=null,i.fragCurrent=null,i.fragmentTracker=void 0,i.transmuxer=null,i._state=x.STOPPED,i.media=void 0,i.mediaBuffer=void 0,i.config=void 0,i.bitrateTest=!1,i.lastCurrentTime=0,i.nextLoadPosition=0,i.startPosition=0,i.loadedmetadata=!1,i.fragLoadError=0,i.retryDate=0,i.levels=null,i.fragmentLoader=void 0,i.levelLastLoaded=null,i.startFragRequested=!1,i.decrypter=void 0,i.initPTS=[],i.onvseeking=null,i.onvended=null,i.logPrefix="",i.log=void 0,i.warn=void 0,i.logPrefix=r,i.log=s.logger.log.bind(s.logger,r+":"),i.warn=s.logger.warn.bind(s.logger,r+":"),i.hls=t,i.fragmentLoader=new m.default(t.config),i.fragmentTracker=n,i.config=t.config,i.decrypter=new g.default(t,t.config),t.on(l.Events.KEY_LOADED,i.onKeyLoaded,function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(i)),i}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,E(t,n);var _,k,w,C=i.prototype;return C.doTick=function(){this.onTickEnd()},C.onTickEnd=function(){},C.startLoad=function(e){},C.stopLoad=function(){this.fragmentLoader.abort();var e=this.fragCurrent;e&&this.fragmentTracker.removeFragment(e),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=x.STOPPED},C._streamEnded=function(e,t){var n=this.fragCurrent,r=this.fragmentTracker;if(!t.live&&n&&n.sn===t.endSN&&!e.nextStart){var i=r.getState(n);return i===a.FragmentState.PARTIAL||i===a.FragmentState.OK}return!1},C.onMediaAttached=function(e,t){var n=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),n.addEventListener("seeking",this.onvseeking),n.addEventListener("ended",this.onvended);var r=this.config;this.levels&&r.autoStartLoad&&this.state===x.STOPPED&&this.startLoad(r.startPosition)},C.onMediaDetaching=function(){var e=this.media;null!=e&&e.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},C.onMediaSeeking=function(){var e=this.config,t=this.fragCurrent,n=this.media,i=this.mediaBuffer,a=this.state,s=n?n.currentTime:0,l=o.BufferHelper.bufferInfo(i||n,s,e.maxBufferHole);if(this.log("media seeking to "+(Object(r.isFiniteNumber)(s)?s.toFixed(3):s)+", state: "+a),a===x.ENDED)this.resetLoadingState();else if(t&&!l.len){var c=e.maxFragLookUpTolerance,u=t.start-c,d=s>t.start+t.duration+c;(s<u||d)&&(d&&t.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),t.loader.abort()),this.resetLoadingState())}n&&(this.lastCurrentTime=s),this.loadedmetadata||l.len||(this.nextLoadPosition=this.startPosition=s),this.tickImmediate()},C.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},C.onKeyLoaded=function(e,t){if(this.state===x.KEY_LOADING&&t.frag===this.fragCurrent&&this.levels){this.state=x.IDLE;var n=this.levels[t.frag.level].details;n&&this.loadFragment(t.frag,n,t.frag.start)}},C.onHandlerDestroying=function(){this.stopLoad(),e.prototype.onHandlerDestroying.call(this)},C.onHandlerDestroyed=function(){this.state=x.STOPPED,this.hls.off(l.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,e.prototype.onHandlerDestroyed.call(this)},C.loadKey=function(e,t){this.log("Loading key for "+e.sn+" of ["+t.startSN+"-"+t.endSN+"], "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+e.level),this.state=x.KEY_LOADING,this.fragCurrent=e,this.hls.trigger(l.Events.KEY_LOADING,{frag:e})},C.loadFragment=function(e,t,n){this._loadFragForPlayback(e,t,n)},C._loadFragForPlayback=function(e,t,n){var r=this;this._doFragLoad(e,t,n,(function(t){if(r.fragContextChanged(e))return r.warn("Fragment "+e.sn+(t.part?" p: "+t.part.index:"")+" of level "+e.level+" was dropped during download."),void r.fragmentTracker.removeFragment(e);e.stats.chunkCount++,r._handleFragmentLoadProgress(t)})).then((function(t){if(t){r.fragLoadError=0;var n=r.state;if(!r.fragContextChanged(e))return"payload"in t&&(r.log("Loaded fragment "+e.sn+" of level "+e.level),r.hls.trigger(l.Events.FRAG_LOADED,t),r.state===x.BACKTRACKING)?(r.fragmentTracker.backtrack(e,t),void r.resetFragmentLoading(e)):void r._handleFragmentLoadComplete(t);(n===x.FRAG_LOADING||n===x.BACKTRACKING||!r.fragCurrent&&n===x.PARSING)&&(r.fragmentTracker.removeFragment(e),r.state=x.IDLE)}})).catch((function(t){r.warn(t),r.resetFragmentLoading(e)}))},C.flushMainBuffer=function(e,t,n){if(void 0===n&&(n=null),e-t){var r={startOffset:e,endOffset:t,type:n};this.fragLoadError=0,this.hls.trigger(l.Events.BUFFER_FLUSHING,r)}},C._loadInitSegment=function(e){var t=this;this._doFragLoad(e).then((function(n){if(!n||t.fragContextChanged(e)||!t.levels)throw new Error("init load aborted");return n})).then((function(n){var r=t.hls,i=n.payload,a=e.decryptdata;if(i&&i.byteLength>0&&a&&a.key&&a.iv&&"AES-128"===a.method){var o=self.performance.now();return t.decrypter.webCryptoDecrypt(new Uint8Array(i),a.key.buffer,a.iv.buffer).then((function(t){var i=self.performance.now();return r.trigger(l.Events.FRAG_DECRYPTED,{frag:e,payload:t,stats:{tstart:o,tdecrypt:i}}),n.payload=t,n}))}return n})).then((function(n){var r=t.fragCurrent,i=t.hls,a=t.levels;if(!a)throw new Error("init load aborted, missing levels");var o=a[e.level].details;console.assert(o,"Level details are defined when init segment is loaded");var s=e.stats;t.state=x.IDLE,t.fragLoadError=0,e.data=new Uint8Array(n.payload),s.parsing.start=s.buffering.start=self.performance.now(),s.parsing.end=s.buffering.end=self.performance.now(),n.frag===r&&i.trigger(l.Events.FRAG_BUFFERED,{stats:s,frag:r,part:null,id:e.type}),t.tick()})).catch((function(n){t.warn(n),t.resetFragmentLoading(e)}))},C.fragContextChanged=function(e){var t=this.fragCurrent;return!e||!t||e.level!==t.level||e.sn!==t.sn||e.urlId!==t.urlId},C.fragBufferedComplete=function(e,t){var n=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+e.type+" sn: "+e.sn+(t?" part: "+t.index:"")+" of "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+e.level+" "+v.default.toString(o.BufferHelper.getBuffered(n))),this.state=x.IDLE,this.tick()},C._handleFragmentLoadComplete=function(e){var t=this.transmuxer;if(t){var n=e.frag,r=e.part,i=e.partsLoaded,a=!i||0===i.length||i.some((function(e){return!e})),o=new u.ChunkMetadata(n.level,n.sn,n.stats.chunkCount+1,0,r?r.index:-1,!a);t.flush(o)}},C._handleFragmentLoadProgress=function(e){},C._doFragLoad=function(e,t,n,i){var a=this;if(void 0===n&&(n=null),!this.levels)throw new Error("frag load aborted, missing levels");if(n=Math.max(e.start,n||0),this.config.lowLatencyMode&&t){var o=t.partList;if(o&&i){n>e.end&&t.fragmentHint&&(e=t.fragmentHint);var s=this.getNextPart(o,e,n);if(s>-1){var c=o[s];return this.log("Loading part sn: "+e.sn+" p: "+c.index+" cc: "+e.cc+" of playlist ["+t.startSN+"-"+t.endSN+"] parts [0-"+s+"-"+(o.length-1)+"] "+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(n.toFixed(3))),this.nextLoadPosition=c.start+c.duration,this.state=x.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:e,part:o[s],targetBufferTime:n}),this.doFragPartsLoad(e,o,s,i).catch((function(e){return a.handleFragLoadError(e)}))}if(!e.url||this.loadedEndOfParts(o,n))return Promise.resolve(null)}}return this.log("Loading fragment "+e.sn+" cc: "+e.cc+" "+(t?"of ["+t.startSN+"-"+t.endSN+"] ":"")+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(n.toFixed(3))),Object(r.isFiniteNumber)(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=x.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:e,targetBufferTime:n}),this.fragmentLoader.load(e,i).catch((function(e){return a.handleFragLoadError(e)}))},C.doFragPartsLoad=function(e,t,n,r){var i=this;return new Promise((function(a,o){var s=[];!function n(c){var u=t[c];i.fragmentLoader.loadPart(e,u,r).then((function(r){s[u.index]=r;var o=r.part;i.hls.trigger(l.Events.FRAG_LOADED,r);var d=t[c+1];if(!d||d.fragment!==e)return a({frag:e,part:o,partsLoaded:s});n(c+1)})).catch(o)}(n)}))},C.handleFragLoadError=function(e){var t=e.data;return t&&t.details===c.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(l.Events.ERROR,t),null},C._handleTransmuxerFlush=function(e){var t=this.getCurrentContext(e);if(t&&this.state===x.PARSING){var n=t.frag,r=t.part,i=t.level,a=self.performance.now();n.stats.parsing.end=a,r&&(r.stats.parsing.end=a),this.updateLevelTiming(n,r,i,e.partial)}else this.fragCurrent||(this.state=x.IDLE)},C.getCurrentContext=function(e){var t=this.levels,n=e.level,r=e.sn,i=e.part;if(!t||!t[n])return this.warn("Levels object was unset while buffering fragment "+r+" of level "+n+". The current chunk will not be buffered."),null;var a=t[n],o=i>-1?Object(p.getPartWith)(a,r,i):null,s=o?o.fragment:Object(p.getFragmentWithSN)(a,r,this.fragCurrent);return s?{frag:s,part:o,level:a}:null},C.bufferFragmentData=function(e,t,n,r){if(e&&this.state===x.PARSING){var i=e.data1,a=e.data2,o=i;if(i&&a&&(o=Object(d.appendUint8Array)(i,a)),o&&o.length){var s={type:e.type,frag:t,part:n,chunkMeta:r,parent:t.type,data:o};this.hls.trigger(l.Events.BUFFER_APPENDING,s),e.dropped&&e.independent&&!n&&this.flushBufferGap(t)}}},C.flushBufferGap=function(e){var t=this.media;if(t)if(o.BufferHelper.isBuffered(t,t.currentTime)){var n=t.currentTime,r=o.BufferHelper.bufferInfo(t,n,0),i=e.duration,a=Math.min(2*this.config.maxFragLookUpTolerance,.25*i),s=Math.max(Math.min(e.start-a,r.end-a),n+a);e.start-s>a&&this.flushMainBuffer(s,e.start)}else this.flushMainBuffer(0,e.start)},C.getFwdBufferInfo=function(e,t){var n=this.config,i=this.getLoadPosition();if(!Object(r.isFiniteNumber)(i))return null;var a=o.BufferHelper.bufferInfo(e,i,n.maxBufferHole);if(0===a.len&&void 0!==a.nextStart){var s=this.fragmentTracker.getBufferedFrag(i,t);if(s&&a.nextStart<s.end)return o.BufferHelper.bufferInfo(e,i,Math.max(a.nextStart,n.maxBufferHole))}return a},C.getMaxBufferLength=function(e){var t,n=this.config;return t=e?Math.max(8*n.maxBufferSize/e,n.maxBufferLength):n.maxBufferLength,Math.min(t,n.maxMaxBufferLength)},C.reduceMaxBufferLength=function(e){var t=this.config,n=e||t.maxBufferLength;return t.maxMaxBufferLength>=n&&(t.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+t.maxMaxBufferLength+"s"),!0)},C.getNextFragment=function(e,t){var n,r,i=t.fragments,a=i.length;if(!a)return null;var o,s=this.config,l=i[0].start;if(t.live){var c=s.initialLiveManifestSize;if(a<c)return this.warn("Not enough fragments to start playback (have: "+a+", need: "+c+")"),null;t.PTSKnown||this.startFragRequested||-1!==this.startPosition||(o=this.getInitialLiveFragment(t,i),this.startPosition=o?this.hls.liveSyncPosition||o.start:e)}else e<=l&&(o=i[0]);if(!o){var u=s.lowLatencyMode?t.partEnd:t.fragmentEnd;o=this.getFragmentAtPosition(e,u,t)}return null===(n=o)||void 0===n||!n.initSegment||null!==(r=o)&&void 0!==r&&r.initSegment.data||this.bitrateTest||(o=o.initSegment),o},C.getNextPart=function(e,t,n){for(var r=-1,i=!1,a=!0,o=0,s=e.length;o<s;o++){var l=e[o];if(a=a&&!l.independent,r>-1&&n<l.start)break;var c=l.loaded;!c&&(i||l.independent||a)&&l.fragment===t&&(r=o),i=c}return r},C.loadedEndOfParts=function(e,t){var n=e[e.length-1];return n&&t>n.start&&n.loaded},C.getInitialLiveFragment=function(e,t){var n=this.fragPrevious,r=null;if(n){if(e.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+n.programDateTime),r=Object(f.findFragmentByPDT)(t,n.endProgramDateTime,this.config.maxFragLookUpTolerance)),!r){var i=n.sn+1;if(i>=e.startSN&&i<=e.endSN){var a=t[i-e.startSN];n.cc===a.cc&&(r=a,this.log("Live playlist, switching playlist, load frag with next SN: "+r.sn))}r||(r=Object(f.findFragWithCC)(t,n.cc))&&this.log("Live playlist, switching playlist, load frag with same CC: "+r.sn)}}else{var o=this.hls.liveSyncPosition;null!==o&&(r=this.getFragmentAtPosition(o,this.bitrateTest?e.fragmentEnd:e.edge,e))}return r},C.getFragmentAtPosition=function(e,t,n){var r,i=this.config,o=this.fragPrevious,s=n.fragments,l=n.endSN,c=n.fragmentHint,u=i.maxFragLookUpTolerance,d=!!(i.lowLatencyMode&&n.partList&&c);if(d&&c&&!this.bitrateTest&&(s=s.concat(c),l=c.sn),e<t){var h=e>t-u?0:u;r=Object(f.findFragmentByPTS)(o,s,e,h)}else r=s[s.length-1];if(r){var p=r.sn-n.startSN,m=o&&r.level===o.level,g=s[p+1];if(this.fragmentTracker.getState(r)===a.FragmentState.BACKTRACKED){r=null;for(var v=p;s[v]&&this.fragmentTracker.getState(s[v])===a.FragmentState.BACKTRACKED;)r=o?s[v--]:s[--v];r||(r=g)}else o&&r.sn===o.sn&&!d&&m&&(r.sn<l&&this.fragmentTracker.getState(g)!==a.FragmentState.OK?(this.log("SN "+r.sn+" just loaded, load next one: "+g.sn),r=g):r=null)}return r},C.synchronizeToLiveEdge=function(e){var t=this.config,n=this.media;if(n){var r=this.hls.liveSyncPosition,i=n.currentTime,a=e.fragments[0].start,o=e.edge,s=i>=a-t.maxFragLookUpTolerance&&i<=o;if(null!==r&&n.duration>r&&(i<r||!s)){var l=void 0!==t.liveMaxLatencyDuration?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;(!s&&n.readyState<4||i<o-l)&&(this.loadedmetadata||(this.nextLoadPosition=r),n.readyState&&(this.warn("Playback: "+i.toFixed(3)+" is located too far from the end of live sliding playlist: "+o+", reset currentTime to : "+r.toFixed(3)),n.currentTime=r))}}},C.alignPlaylists=function(e,t){var n=this.levels,i=this.levelLastLoaded,a=this.fragPrevious,o=null!==i?n[i]:null,s=e.fragments.length;if(!s)return this.warn("No fragments in live playlist"),0;var l=e.fragments[0].start,c=!t,u=e.alignedSliding&&Object(r.isFiniteNumber)(l);if(c||!u&&!l){Object(h.alignStream)(a,o,e);var d=e.fragments[0].start;return this.log("Live playlist sliding: "+d.toFixed(2)+" start-sn: "+(t?t.startSN:"na")+"->"+e.startSN+" prev-sn: "+(a?a.sn:"na")+" fragments: "+s),d}return l},C.waitForCdnTuneIn=function(e){return e.live&&e.canBlockReload&&e.tuneInGoal>Math.max(e.partHoldBack,3*e.partTarget)},C.setStartPosition=function(e,t){var n=this.startPosition;if(n<t&&(n=-1),-1===n||-1===this.lastCurrentTime){var i=e.startTimeOffset;Object(r.isFiniteNumber)(i)?(n=t+i,i<0&&(n+=e.totalduration),n=Math.min(Math.max(t,n),t+e.totalduration),this.log("Start time offset "+i+" found in playlist, adjust startPosition to "+n),this.startPosition=n):e.live?n=this.hls.liveSyncPosition||t:this.startPosition=n=0,this.lastCurrentTime=n}this.nextLoadPosition=n},C.getLoadPosition=function(){var e=this.media,t=0;return this.loadedmetadata&&e?t=e.currentTime:this.nextLoadPosition&&(t=this.nextLoadPosition),t},C.handleFragLoadAborted=function(e,t){this.transmuxer&&"initSegment"!==e.sn&&e.stats.aborted&&(this.warn("Fragment "+e.sn+(t?" part"+t.index:"")+" of level "+e.level+" was aborted"),this.resetFragmentLoading(e))},C.resetFragmentLoading=function(e){this.fragCurrent&&this.fragContextChanged(e)||(this.state=x.IDLE)},C.onFragmentOrKeyLoadError=function(e,t){if(!t.fatal){var n=t.frag;if(n&&n.type===e){var r=this.fragCurrent;console.assert(r&&n.sn===r.sn&&n.level===r.level&&n.urlId===r.urlId,"Frag load error must match current frag to retry");var i=this.config;if(this.fragLoadError+1<=i.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(n.level))return;var a=Math.min(Math.pow(2,this.fragLoadError)*i.fragLoadingRetryDelay,i.fragLoadingMaxRetryTimeout);this.warn("Fragment "+n.sn+" of "+e+" "+n.level+" failed to load, retrying in "+a+"ms"),this.retryDate=self.performance.now()+a,this.fragLoadError++,this.state=x.FRAG_LOADING_WAITING_RETRY}else t.levelRetry?(e===b.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=x.IDLE):(s.logger.error(t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.hls.stopLoad(),this.state=x.ERROR)}}},C.afterBufferFlushed=function(e,t,n){if(e){var r=o.BufferHelper.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,r,n),this.state===x.ENDED&&this.resetLoadingState()}},C.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=x.IDLE},C.resetLiveStartWhenNotLoaded=function(e){if(!this.loadedmetadata){this.startFragRequested=!1;var t=this.levels?this.levels[e].details:null;if(null!=t&&t.live)return this.startPosition=-1,this.setStartPosition(t,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},C.updateLevelTiming=function(e,t,n,r){var i=this,a=n.details;console.assert(!!a,"level.details must be defined"),Object.keys(e.elementaryStreams).reduce((function(t,o){var s=e.elementaryStreams[o];if(s){var c=s.endPTS-s.startPTS;if(c<=0)return i.warn("Could not parse fragment "+e.sn+" "+o+" duration reliably ("+c+") resetting transmuxer to fallback to playlist timing"),i.resetTransmuxer(),t||!1;var u=r?0:Object(p.updateFragPTSDTS)(a,e,s.startPTS,s.endPTS,s.startDTS,s.endDTS);return i.hls.trigger(l.Events.LEVEL_PTS_UPDATED,{details:a,level:n,drift:u,type:o,frag:e,start:s.startPTS,end:s.endPTS}),!0}return t}),!1)?(this.state=x.PARSED,this.hls.trigger(l.Events.FRAG_PARSED,{frag:e,part:t})):this.resetLoadingState()},C.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},_=i,(k=[{key:"state",get:function(){return this._state},set:function(e){var t=this._state;t!==e&&(this._state=e,this.log(t+"->"+e))}}])&&y(_.prototype,k),w&&y(_,w),i}(i.default)},"./src/controller/buffer-controller.ts":
|
|
|
/*!*********************************************!*\
|
|
|
!*** ./src/controller/buffer-controller.ts ***!
|
|
|
\*********************************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return f}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=n(/*! ../errors */"./src/errors.ts"),s=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),l=n(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),u=n(/*! ./buffer-operation-queue */"./src/controller/buffer-operation-queue.ts"),d=Object(l.getMediaSource)(),h=/([ha]vc.)(?:\.[^.,]+)+/,f=function(){function e(e){var t=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var e=t.hls,n=t.media,r=t.mediaSource;a.logger.log("[buffer-controller]: Media source opened"),n&&(t.updateMediaElementDuration(),e.trigger(i.Events.MEDIA_ATTACHED,{media:n})),r&&r.removeEventListener("sourceopen",t._onMediaSourceOpen),t.checkPendingTracks()},this._onMediaSourceClose=function(){a.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){a.logger.log("[buffer-controller]: Media source ended")},this.hls=e,this._initSourceBuffer(),this.registerListeners()}var t=e.prototype;return t.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},t.destroy=function(){this.unregisterListeners(),this.details=null},t.registerListeners=function(){var e=this.hls;e.on(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(i.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(i.Events.BUFFER_RESET,this.onBufferReset,this),e.on(i.Events.BUFFER_APPENDING,this.onBufferAppending,this),e.on(i.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.on(i.Events.BUFFER_EOS,this.onBufferEos,this),e.on(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(i.Events.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(i.Events.FRAG_PARSED,this.onFragParsed,this),e.on(i.Events.FRAG_CHANGED,this.onFragChanged,this)},t.unregisterListeners=function(){var e=this.hls;e.off(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(i.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(i.Events.BUFFER_RESET,this.onBufferReset,this),e.off(i.Events.BUFFER_APPENDING,this.onBufferAppending,this),e.off(i.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.off(i.Events.BUFFER_EOS,this.onBufferEos,this),e.off(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(i.Events.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(i.Events.FRAG_PARSED,this.onFragParsed,this),e.off(i.Events.FRAG_CHANGED,this.onFragChanged,this)},t._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new u.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},t.onManifestParsed=function(e,t){var n=2;(t.audio&&!t.video||!t.altAudio)&&(n=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=n,this.details=null,a.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},t.onMediaAttaching=function(e,t){var n=this.media=t.media;if(n&&d){var r=this.mediaSource=new d;r.addEventListener("sourceopen",this._onMediaSourceOpen),r.addEventListener("sourceended",this._onMediaSourceEnded),r.addEventListener("sourceclose",this._onMediaSourceClose),n.src=self.URL.createObjectURL(r),this._objectUrl=n.src}},t.onMediaDetaching=function(){var e=this.media,t=this.mediaSource,n=this._objectUrl;if(t){if(a.logger.log("[buffer-controller]: media source detaching"),"open"===t.readyState)try{t.endOfStream()}catch(e){a.logger.warn("[buffer-controller]: onMediaDetaching: "+e.message+" while calling endOfStream")}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),e&&(n&&self.URL.revokeObjectURL(n),e.src===n?(e.removeAttribute("src"),e.load()):a.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(i.Events.MEDIA_DETACHED,void 0)},t.onBufferReset=function(){var e=this;this.getSourceBufferTypes().forEach((function(t){var n=e.sourceBuffer[t];try{n&&(e.removeBufferListeners(t),e.mediaSource&&e.mediaSource.removeSourceBuffer(n),e.sourceBuffer[t]=void 0)}catch(e){a.logger.warn("[buffer-controller]: Failed to reset the "+t+" buffer",e)}})),this._initSourceBuffer()},t.onBufferCodecs=function(e,t){var n=this,r=this.getSourceBufferTypes().length;Object.keys(t).forEach((function(e){if(r){var i=n.tracks[e];if(i&&"function"==typeof i.buffer.changeType){var a=t[e],o=a.codec,s=a.levelCodec,l=a.container;if((i.levelCodec||i.codec).replace(h,"$1")!==(s||o).replace(h,"$1")){var c=l+";codecs="+(s||o);n.appendChangeType(e,c)}}}else n.pendingTracks[e]=t[e]})),r||(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},t.appendChangeType=function(e,t){var n=this,r=this.operationQueue,i={execute:function(){var i=n.sourceBuffer[e];i&&(a.logger.log("[buffer-controller]: changing "+e+" sourceBuffer type to "+t),i.changeType(t)),r.shiftAndExecuteNext(e)},onStart:function(){},onComplete:function(){},onError:function(t){a.logger.warn("[buffer-controller]: Failed to change "+e+" SourceBuffer type",t)}};r.append(i,e)},t.onBufferAppending=function(e,t){var n=this,r=this.hls,l=this.operationQueue,c=this.tracks,u=t.data,d=t.type,h=t.frag,f=t.part,p=t.chunkMeta,m=p.buffering[d],g=self.performance.now();m.start=g;var v=h.stats.buffering,b=f?f.stats.buffering:null;0===v.start&&(v.start=g),b&&0===b.start&&(b.start=g);var y=c.audio,E="audio"===d&&1===p.id&&"audio/mpeg"===(null==y?void 0:y.container),x={execute:function(){if(m.executeStart=self.performance.now(),E){var e=n.sourceBuffer[d];if(e){var t=h.start-e.timestampOffset;Math.abs(t)>=.1&&(a.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+h.start+" (delta: "+t+") sn: "+h.sn+")"),e.timestampOffset=h.start)}}n.appendExecutor(u,d)},onStart:function(){},onComplete:function(){var e=self.performance.now();m.executeEnd=m.end=e,0===v.first&&(v.first=e),b&&0===b.first&&(b.first=e);var t=n.sourceBuffer,r={};for(var a in t)r[a]=s.BufferHelper.getBuffered(t[a]);n.appendError=0,n.hls.trigger(i.Events.BUFFER_APPENDED,{type:d,frag:h,part:f,chunkMeta:p,parent:h.type,timeRanges:r})},onError:function(e){a.logger.error("[buffer-controller]: Error encountered while trying to append to the "+d+" SourceBuffer",e);var t={type:o.ErrorTypes.MEDIA_ERROR,parent:h.type,details:o.ErrorDetails.BUFFER_APPEND_ERROR,err:e,fatal:!1};e.code===DOMException.QUOTA_EXCEEDED_ERR?t.details=o.ErrorDetails.BUFFER_FULL_ERROR:(n.appendError++,t.details=o.ErrorDetails.BUFFER_APPEND_ERROR,n.appendError>r.config.appendErrorMaxRetry&&(a.logger.error("[buffer-controller]: Failed "+r.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),t.fatal=!0)),r.trigger(i.Events.ERROR,t)}};l.append(x,d)},t.onBufferFlushing=function(e,t){var n=this,r=this.operationQueue,o=function(e){return{execute:n.removeExecutor.bind(n,e,t.startOffset,t.endOffset),onStart:function(){},onComplete:function(){n.hls.trigger(i.Events.BUFFER_FLUSHED,{type:e})},onError:function(t){a.logger.warn("[buffer-controller]: Failed to remove from "+e+" SourceBuffer",t)}}};t.type?r.append(o(t.type),t.type):this.getSourceBufferTypes().forEach((function(e){r.append(o(e),e)}))},t.onFragParsed=function(e,t){var n=this,r=t.frag,o=t.part,s=[],l=o?o.elementaryStreams:r.elementaryStreams;l[c.ElementaryStreamTypes.AUDIOVIDEO]?s.push("audiovideo"):(l[c.ElementaryStreamTypes.AUDIO]&&s.push("audio"),l[c.ElementaryStreamTypes.VIDEO]&&s.push("video")),0===s.length&&a.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+r.type+" level: "+r.level+" sn: "+r.sn),this.blockBuffers((function(){var e=self.performance.now();r.stats.buffering.end=e,o&&(o.stats.buffering.end=e);var t=o?o.stats:r.stats;n.hls.trigger(i.Events.FRAG_BUFFERED,{frag:r,part:o,stats:t,id:r.type})}),s)},t.onFragChanged=function(e,t){this.flushBackBuffer()},t.onBufferEos=function(e,t){var n=this;this.getSourceBufferTypes().reduce((function(e,r){var i=n.sourceBuffer[r];return t.type&&t.type!==r||i&&!i.ended&&(i.ended=!0,a.logger.log("[buffer-controller]: "+r+" sourceBuffer now EOS")),e&&!(i&&!i.ended)}),!0)&&this.blockBuffers((function(){var e=n.mediaSource;e&&"open"===e.readyState&&e.endOfStream()}))},t.onLevelUpdated=function(e,t){var n=t.details;n.fragments.length&&(this.details=n,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},t.flushBackBuffer=function(){var e=this.hls,t=this.details,n=this.media,a=this.sourceBuffer;if(n&&null!==t){var o=this.getSourceBufferTypes();if(o.length){var l=t.live&&null!==e.config.liveBackBufferLength?e.config.liveBackBufferLength:e.config.backBufferLength;if(Object(r.isFiniteNumber)(l)&&!(l<0)){var c=n.currentTime,u=t.levelTargetDuration,d=Math.max(l,u),h=Math.floor(c/u)*u-d;o.forEach((function(n){var r=a[n];if(r){var o=s.BufferHelper.getBuffered(r);o.length>0&&h>o.start(0)&&(e.trigger(i.Events.BACK_BUFFER_REACHED,{bufferEnd:h}),t.live&&e.trigger(i.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:h}),e.trigger(i.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:h,type:n}))}}))}}}},t.updateMediaElementDuration=function(){if(this.details&&this.media&&this.mediaSource&&"open"===this.mediaSource.readyState){var e=this.details,t=this.hls,n=this.media,i=this.mediaSource,o=e.fragments[0].start+e.totalduration,s=n.duration,l=Object(r.isFiniteNumber)(i.duration)?i.duration:0;e.live&&t.config.liveDurationInfinity?(a.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),i.duration=1/0,this.updateSeekableRange(e)):(o>l&&o>s||!Object(r.isFiniteNumber)(s))&&(a.logger.log("[buffer-controller]: Updating Media Source duration to "+o.toFixed(3)),i.duration=o)}},t.updateSeekableRange=function(e){var t=this.mediaSource,n=e.fragments;if(n.length&&e.live&&null!=t&&t.setLiveSeekableRange){var r=Math.max(0,n[0].start),i=Math.max(r,r+e.totalduration);t.setLiveSeekableRange(r,i)}},t.checkPendingTracks=function(){var e=this.bufferCodecEventsExpected,t=this.operationQueue,n=this.pendingTracks,r=Object.keys(n).length;if(r&&!e||2===r){this.createSourceBuffers(n),this.pendingTracks={};var a=this.getSourceBufferTypes();if(0===a.length)return void this.hls.trigger(i.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});a.forEach((function(e){t.executeNext(e)}))}},t.createSourceBuffers=function(e){var t=this.sourceBuffer,n=this.mediaSource;if(!n)throw Error("createSourceBuffers called when mediaSource was null");var r=0;for(var s in e)if(!t[s]){var l=e[s];if(!l)throw Error("source buffer exists for track "+s+", however track does not");var c=l.levelCodec||l.codec,u=l.container+";codecs="+c;a.logger.log("[buffer-controller]: creating sourceBuffer("+u+")");try{var d=t[s]=n.addSourceBuffer(u),h=s;this.addBufferListener(h,"updatestart",this._onSBUpdateStart),this.addBufferListener(h,"updateend",this._onSBUpdateEnd),this.addBufferListener(h,"error",this._onSBUpdateError),this.tracks[s]={buffer:d,codec:c,container:l.container,levelCodec:l.levelCodec,id:l.id},r++}catch(e){a.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+e.message),this.hls.trigger(i.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:e,mimeType:u})}}r&&this.hls.trigger(i.Events.BUFFER_CREATED,{tracks:this.tracks})},t._onSBUpdateStart=function(e){this.operationQueue.current(e).onStart()},t._onSBUpdateEnd=function(e){var t=this.operationQueue;t.current(e).onComplete(),t.shiftAndExecuteNext(e)},t._onSBUpdateError=function(e,t){a.logger.error("[buffer-controller]: "+e+" SourceBuffer error",t),this.hls.trigger(i.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var n=this.operationQueue.current(e);n&&n.onError(t)},t.removeExecutor=function(e,t,n){var i=this.media,o=this.mediaSource,s=this.operationQueue,l=this.sourceBuffer[e];if(!i||!o||!l)return a.logger.warn("[buffer-controller]: Attempting to remove from the "+e+" SourceBuffer, but it does not exist"),void s.shiftAndExecuteNext(e);var c=Object(r.isFiniteNumber)(i.duration)?i.duration:1/0,u=Object(r.isFiniteNumber)(o.duration)?o.duration:1/0,d=Math.max(0,t),h=Math.min(n,c,u);h>d?(a.logger.log("[buffer-controller]: Removing ["+d+","+h+"] from the "+e+" SourceBuffer"),console.assert(!l.updating,e+" sourceBuffer must not be updating"),l.remove(d,h)):s.shiftAndExecuteNext(e)},t.appendExecutor=function(e,t){var n=this.operationQueue,r=this.sourceBuffer[t];if(!r)return a.logger.warn("[buffer-controller]: Attempting to append to the "+t+" SourceBuffer, but it does not exist"),void n.shiftAndExecuteNext(t);r.ended=!1,console.assert(!r.updating,t+" sourceBuffer must not be updating"),r.appendBuffer(e)},t.blockBuffers=function(e,t){var n=this;if(void 0===t&&(t=this.getSourceBufferTypes()),!t.length)return a.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve(e);var r=this.operationQueue,i=t.map((function(e){return r.appendBlocker(e)}));Promise.all(i).then((function(){e(),t.forEach((function(e){var t=n.sourceBuffer[e];t&&t.updating||r.shiftAndExecuteNext(e)}))}))},t.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},t.addBufferListener=function(e,t,n){var r=this.sourceBuffer[e];if(r){var i=n.bind(this,e);this.listeners[e].push({event:t,listener:i}),r.addEventListener(t,i)}},t.removeBufferListeners=function(e){var t=this.sourceBuffer[e];t&&this.listeners[e].forEach((function(e){t.removeEventListener(e.event,e.listener)}))},e}()},"./src/controller/buffer-operation-queue.ts":
|
|
|
/*!**************************************************!*\
|
|
|
!*** ./src/controller/buffer-operation-queue.ts ***!
|
|
|
\**************************************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return i}));var r=n(/*! ../utils/logger */"./src/utils/logger.ts"),i=function(){function e(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}var t=e.prototype;return t.append=function(e,t){var n=this.queues[t];n.push(e),1===n.length&&this.buffers[t]&&this.executeNext(t)},t.insertAbort=function(e,t){this.queues[t].unshift(e),this.executeNext(t)},t.appendBlocker=function(e){var t,n=new Promise((function(e){t=e})),r={execute:t,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(r,e),n},t.executeNext=function(e){var t=this.buffers,n=this.queues,i=t[e],a=n[e];if(a.length){var o=a[0];try{o.execute()}catch(t){r.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),o.onError(t),i&&i.updating||(a.shift(),this.executeNext(e))}}},t.shiftAndExecuteNext=function(e){this.queues[e].shift(),this.executeNext(e)},t.current=function(e){return this.queues[e][0]},e}()},"./src/controller/cap-level-controller.ts":
|
|
|
/*!************************************************!*\
|
|
|
!*** ./src/controller/cap-level-controller.ts ***!
|
|
|
\************************************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts");function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(e){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var t,n,a,o=e.prototype;return o.setStreamController=function(e){this.streamController=e},o.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},o.registerListeners=function(){var e=this.hls;e.on(r.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(r.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(r.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(r.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.on(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},o.unregisterListener=function(){var e=this.hls;e.off(r.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(r.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(r.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(r.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.off(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},o.onFpsDropLevelCapping=function(t,n){e.isLevelAllowed(n.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(n.droppedLevel)},o.onMediaAttaching=function(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null},o.onManifestParsed=function(e,t){var n=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,n.config.capLevelToPlayerSize&&t.video&&this.startCapping()},o.onBufferCodecs=function(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()},o.onMediaDetaching=function(){this.stopCapping()},o.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var e=this.hls.levels;if(e.length){var t=this.hls;t.autoLevelCapping=this.getMaxLevel(e.length-1),t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}},o.getMaxLevel=function(t){var n=this,r=this.hls.levels;if(!r.length)return-1;var i=r.filter((function(r,i){return e.isLevelAllowed(i,n.restrictedLevels)&&i<=t}));return this.clientRect=null,e.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)},o.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},o.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},o.getDimensions=function(){if(this.clientRect)return this.clientRect;var e=this.media,t={width:0,height:0};if(e){var n=e.getBoundingClientRect();t.width=n.width,t.height=n.height,t.width||t.height||(t.width=n.right-n.left||e.width||0,t.height=n.bottom-n.top||e.height||0)}return this.clientRect=t,t},e.isLevelAllowed=function(e,t){return void 0===t&&(t=[]),-1===t.indexOf(e)},e.getMaxLevelByMediaSize=function(e,t,n){if(!e||!e.length)return-1;for(var r,i,a=e.length-1,o=0;o<e.length;o+=1){var s=e[o];if((s.width>=t||s.height>=n)&&(r=s,!(i=e[o+1])||r.width!==i.width||r.height!==i.height)){a=o;break}}return a},t=e,a=[{key:"contentScaleFactor",get:function(){var e=1;try{e=self.devicePixelRatio}catch(e){}return e}}],(n=[{key:"mediaWidth",get:function(){return this.getDimensions().width*e.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*e.contentScaleFactor}}])&&i(t.prototype,n),a&&i(t,a),e}();t.default=a},"./src/controller/cmcd-controller.ts":
|
|
|
/*!*******************************************!*\
|
|
|
!*** ./src/controller/cmcd-controller.ts ***!
|
|
|
\*******************************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return h}));var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../types/cmcd */"./src/types/cmcd.ts"),a=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts");function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),e}function c(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var h=function(){function e(t){var n=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){n.initialized&&(n.starved=!0),n.buffering=!0},this.onPlaying=function(){n.initialized||(n.initialized=!0),n.buffering=!1},this.applyPlaylistData=function(e){try{n.apply(e,{ot:i.CMCDObjectType.MANIFEST,su:!n.initialized})}catch(e){o.logger.warn("Could not generate manifest CMCD data.",e)}},this.applyFragmentData=function(e){try{var t=e.frag,r=n.hls.levels[t.level],a=n.getObjectType(t),s={d:1e3*t.duration,ot:a};a!==i.CMCDObjectType.VIDEO&&a!==i.CMCDObjectType.AUDIO&&a!=i.CMCDObjectType.MUXED||(s.br=r.bitrate/1e3,s.tb=n.getTopBandwidth(a),s.bl=n.getBufferLength(a)),n.apply(e,s)}catch(e){o.logger.warn("Could not generate segment CMCD data.",e)}},this.hls=t;var r=this.config=t.config,a=r.cmcd;null!=a&&(r.pLoader=this.createPlaylistLoader(),r.fLoader=this.createFragmentLoader(),this.sid=a.sessionId||e.uuid(),this.cid=a.contentId,this.useHeaders=!0===a.useHeaders,this.registerListeners())}var t=e.prototype;return t.registerListeners=function(){var e=this.hls;e.on(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(r.Events.MEDIA_DETACHED,this.onMediaDetached,this),e.on(r.Events.BUFFER_CREATED,this.onBufferCreated,this)},t.unregisterListeners=function(){var e=this.hls;e.off(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(r.Events.MEDIA_DETACHED,this.onMediaDetached,this),e.off(r.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},t.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},t.onMediaAttached=function(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},t.onMediaDetached=function(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)},t.onBufferCreated=function(e,t){var n,r;this.audioBuffer=null===(n=t.tracks.audio)||void 0===n?void 0:n.buffer,this.videoBuffer=null===(r=t.tracks.video)||void 0===r?void 0:r.buffer},t.createData=function(){var e;return{v:i.CMCDVersion,sf:i.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:null===(e=this.media)||void 0===e?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},t.apply=function(t,n){void 0===n&&(n={}),d(n,this.createData());var r=n.ot===i.CMCDObjectType.INIT||n.ot===i.CMCDObjectType.VIDEO||n.ot===i.CMCDObjectType.MUXED;if(this.starved&&r&&(n.bs=!0,n.su=!0,this.starved=!1),null==n.su&&(n.su=this.buffering),this.useHeaders){var a=e.toHeaders(n);if(!Object.keys(a).length)return;t.headers||(t.headers={}),d(t.headers,a)}else{var o=e.toQuery(n);if(!o)return;t.url=e.appendQueryToUri(t.url,o)}},t.getObjectType=function(e){var t=e.type;return"subtitle"===t?i.CMCDObjectType.TIMED_TEXT:"initSegment"===e.sn?i.CMCDObjectType.INIT:"audio"===t?i.CMCDObjectType.AUDIO:"main"===t?this.hls.audioTracks.length?i.CMCDObjectType.VIDEO:i.CMCDObjectType.MUXED:void 0},t.getTopBandwidth=function(e){for(var t,n=0,r=c(e===i.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels);!(t=r()).done;){var a=t.value;a.bitrate>n&&(n=a.bitrate)}return n>0?n:NaN},t.getBufferLength=function(e){var t=this.hls.media,n=e===i.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;return n&&t?1e3*a.BufferHelper.bufferInfo(n,t.currentTime,this.config.maxBufferHole).len:NaN},t.createPlaylistLoader=function(){var e=this.config.pLoader,t=this.applyPlaylistData,n=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new n(e)}var r=e.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(e,n,r){t(e),this.loader.load(e,n,r)},l(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),e}()},t.createFragmentLoader=function(){var e=this.config.fLoader,t=this.applyFragmentData,n=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new n(e)}var r=e.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(e,n,r){t(e),this.loader.load(e,n,r)},l(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),e}()},e.uuid=function(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)},e.serialize=function(e){for(var t,n=[],r=function(e){return!Number.isNaN(e)&&null!=e&&""!==e&&!1!==e},i=function(e){return Math.round(e)},a=function(e){return 100*i(e/100)},o={br:i,d:i,bl:a,dl:a,mtp:a,nor:function(e){return encodeURIComponent(e)},rtp:a,tb:i},s=c(Object.keys(e||{}).sort());!(t=s()).done;){var l=t.value,u=e[l];if(r(u)&&!("v"===l&&1===u||"pr"==l&&1===u)){var d=o[l];d&&(u=d(u));var h=typeof u,f=void 0;f="ot"===l||"sf"===l||"st"===l?l+"="+u:"boolean"===h?l:"number"===h?l+"="+u:l+"="+JSON.stringify(u),n.push(f)}}return n.join(",")},e.toHeaders=function(t){for(var n={},r=["Object","Request","Session","Status"],i=[{},{},{},{}],a={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},o=0,s=Object.keys(t);o<s.length;o++){var l=s[o];i[null!=a[l]?a[l]:1][l]=t[l]}for(var c=0;c<i.length;c++){var u=e.serialize(i[c]);u&&(n["CMCD-"+r[c]]=u)}return n},e.toQuery=function(t){return"CMCD="+encodeURIComponent(e.serialize(t))},e.appendQueryToUri=function(e,t){if(!t)return e;var n=e.includes("?")?"&":"?";return""+e+n+t},e}()},"./src/controller/eme-controller.ts":
|
|
|
/*!******************************************!*\
|
|
|
!*** ./src/controller/eme-controller.ts ***!
|
|
|
\******************************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=n(/*! ../utils/mediakeys-helper */"./src/utils/mediakeys-helper.ts");function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var l=function(){function e(e){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=e,this._config=e.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var t,n,l,c=e.prototype;return c.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},c._registerListeners=function(){this.hls.on(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(r.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(r.Events.MANIFEST_PARSED,this.onManifestParsed,this)},c._unregisterListeners=function(){this.hls.off(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(r.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(r.Events.MANIFEST_PARSED,this.onManifestParsed,this)},c.getLicenseServerUrl=function(e){switch(e){case o.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+e+'"')},c._attemptKeySystemAccess=function(e,t,n){var r=this,i=function(e,t,n,r){switch(e){case o.KeySystems.WIDEVINE:return function(e,t,n){var r={audioCapabilities:[],videoCapabilities:[]};return e.forEach((function(e){r.audioCapabilities.push({contentType:'audio/mp4; codecs="'+e+'"',robustness:n.audioRobustness||""})})),t.forEach((function(e){r.videoCapabilities.push({contentType:'video/mp4; codecs="'+e+'"',robustness:n.videoRobustness||""})})),[r]}(t,n,r);default:throw new Error("Unknown key-system: "+e)}}(e,t,n,this._drmSystemOptions);a.logger.log("Requesting encrypted media key-system access");var s=this.requestMediaKeySystemAccess(e,i);this.mediaKeysPromise=s.then((function(t){return r._onMediaKeySystemAccessObtained(e,t)})),s.catch((function(t){a.logger.error('Failed to obtain key-system "'+e+'" access:',t)}))},c._onMediaKeySystemAccessObtained=function(e,t){var n=this;a.logger.log('Access for key-system "'+e+'" obtained');var r={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:t,mediaKeySystemDomain:e};this._mediaKeysList.push(r);var i=Promise.resolve().then((function(){return t.createMediaKeys()})).then((function(t){return r.mediaKeys=t,a.logger.log('Media-keys created for key-system "'+e+'"'),n._onMediaKeysCreated(),t}));return i.catch((function(e){a.logger.error("Failed to create media-keys:",e)})),i},c._onMediaKeysCreated=function(){var e=this;this._mediaKeysList.forEach((function(t){t.mediaKeysSession||(t.mediaKeysSession=t.mediaKeys.createSession(),e._onNewMediaKeySession(t.mediaKeysSession))}))},c._onNewMediaKeySession=function(e){var t=this;a.logger.log("New key-system session "+e.sessionId),e.addEventListener("message",(function(n){t._onKeySessionMessage(e,n.message)}),!1)},c._onKeySessionMessage=function(e,t){a.logger.log("Got EME message event, creating license request"),this._requestLicense(t,(function(t){a.logger.log("Received license data (length: "+(t?t.byteLength:t)+"), updating key-session"),e.update(t)}))},c.onMediaEncrypted=function(e){var t=this;if(a.logger.log('Media is encrypted using "'+e.initDataType+'" init data type'),!this.mediaKeysPromise)return a.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});var n=function(n){t._media&&(t._attemptSetMediaKeys(n),t._generateRequestWithPreferredKeySession(e.initDataType,e.initData))};this.mediaKeysPromise.then(n).catch(n)},c._attemptSetMediaKeys=function(e){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var t=this._mediaKeysList[0];if(!t||!t.mediaKeys)return a.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});a.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(t.mediaKeys),this._hasSetMediaKeys=!0}},c._generateRequestWithPreferredKeySession=function(e,t){var n=this,o=this._mediaKeysList[0];if(!o)return a.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});if(o.mediaKeysSessionInitialized)a.logger.warn("Key-Session already initialized but requested again");else{var s=o.mediaKeysSession;if(!s)return a.logger.error("Fatal: Media is encrypted but no key-session existing"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});if(!t)return a.logger.warn("Fatal: initData required for generating a key session is null"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});a.logger.log('Generating key-session request for "'+e+'" init data type'),o.mediaKeysSessionInitialized=!0,s.generateRequest(e,t).then((function(){a.logger.debug("Key-session generation succeeded")})).catch((function(e){a.logger.error("Error generating key-session request:",e),n.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})}))}},c._createLicenseXhr=function(e,t,n){var r=new XMLHttpRequest;r.responseType="arraybuffer",r.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,r,e,t,n);var i=this._licenseXhrSetup;if(i)try{i.call(this.hls,r,e),i=void 0}catch(e){a.logger.error(e)}try{r.readyState||r.open("POST",e,!0),i&&i.call(this.hls,r,e)}catch(e){throw new Error("issue setting up KeySystem license XHR "+e)}return r},c._onLicenseRequestReadyStageChange=function(e,t,n,o){switch(e.readyState){case 4:if(200===e.status){this._requestLicenseFailureCount=0,a.logger.log("License request succeeded");var s=e.response,l=this._licenseResponseCallback;if(l)try{s=l.call(this.hls,e,t)}catch(e){a.logger.error(e)}o(s)}else{if(a.logger.error("License Request XHR failed ("+t+"). Status: "+e.status+" ("+e.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>3)return void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});var c=3-this._requestLicenseFailureCount+1;a.logger.warn("Retrying license request, "+c+" attempts left"),this._requestLicense(n,o)}}},c._generateLicenseRequestChallenge=function(e,t){switch(e.mediaKeySystemDomain){case o.KeySystems.WIDEVINE:return t}throw new Error("unsupported key-system: "+e.mediaKeySystemDomain)},c._requestLicense=function(e,t){a.logger.log("Requesting content license for key-system");var n=this._mediaKeysList[0];if(!n)return a.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});try{var o=this.getLicenseServerUrl(n.mediaKeySystemDomain),s=this._createLicenseXhr(o,e,t);a.logger.log("Sending license request to URL: "+o);var l=this._generateLicenseRequestChallenge(n,e);s.send(l)}catch(e){a.logger.error("Failure requesting DRM license: "+e),this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},c.onMediaAttached=function(e,t){if(this._emeEnabled){var n=t.media;this._media=n,n.addEventListener("encrypted",this._onMediaEncrypted)}},c.onMediaDetached=function(){var e=this._media,t=this._mediaKeysList;e&&(e.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(t.map((function(e){if(e.mediaKeysSession)return e.mediaKeysSession.close().catch((function(){}))}))).then((function(){return e.setMediaKeys(null)})).catch((function(){})))},c.onManifestParsed=function(e,t){if(this._emeEnabled){var n=t.levels.map((function(e){return e.audioCodec})).filter((function(e){return!!e})),r=t.levels.map((function(e){return e.videoCodec})).filter((function(e){return!!e}));this._attemptKeySystemAccess(o.KeySystems.WIDEVINE,n,r)}},t=e,(n=[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}])&&s(t.prototype,n),l&&s(t,l),e}();t.default=l},"./src/controller/fps-controller.ts":
|
|
|
/*!******************************************!*\
|
|
|
!*** ./src/controller/fps-controller.ts ***!
|
|
|
\******************************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../utils/logger */"./src/utils/logger.ts"),a=function(){function e(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}var t=e.prototype;return t.setStreamController=function(e){this.streamController=e},t.registerListeners=function(){this.hls.on(r.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},t.unregisterListeners=function(){this.hls.off(r.Events.MEDIA_ATTACHING,this.onMediaAttaching)},t.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},t.onMediaAttaching=function(e,t){var n=this.hls.config;if(n.capLevelOnFPSDrop){var r=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=r,r&&"function"==typeof r.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),n.fpsDroppedMonitoringPeriod)}},t.checkFPS=function(e,t,n){var a=performance.now();if(t){if(this.lastTime){var o=a-this.lastTime,s=n-this.lastDroppedFrames,l=t-this.lastDecodedFrames,c=1e3*s/o,u=this.hls;if(u.trigger(r.Events.FPS_DROP,{currentDropped:s,currentDecoded:l,totalDroppedFrames:n}),c>0&&s>u.config.fpsDroppedMonitoringThreshold*l){var d=u.currentLevel;i.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+d),d>0&&(-1===u.autoLevelCapping||u.autoLevelCapping>=d)&&(d-=1,u.trigger(r.Events.FPS_DROP_LEVEL_CAPPING,{level:d,droppedLevel:u.currentLevel}),u.autoLevelCapping=d,this.streamController.nextLevelSwitch())}}this.lastTime=a,this.lastDroppedFrames=n,this.lastDecodedFrames=t}},t.checkFPSInterval=function(){var e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){var t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)},e}();t.default=a},"./src/controller/fragment-finders.ts":
|
|
|
/*!********************************************!*\
|
|
|
!*** ./src/controller/fragment-finders.ts ***!
|
|
|
\********************************************/
|
|
|
/*! exports provided: findFragmentByPDT, findFragmentByPTS, fragmentWithinToleranceTest, pdtWithinToleranceTest, findFragWithCC */function(e,t,n){"use strict";n.r(t),n.d(t,"findFragmentByPDT",(function(){return a})),n.d(t,"findFragmentByPTS",(function(){return o})),n.d(t,"fragmentWithinToleranceTest",(function(){return s})),n.d(t,"pdtWithinToleranceTest",(function(){return l})),n.d(t,"findFragWithCC",(function(){return c}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/binary-search */"./src/utils/binary-search.ts");function a(e,t,n){if(null===t||!Array.isArray(e)||!e.length||!Object(r.isFiniteNumber)(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;n=n||0;for(var i=0;i<e.length;++i){var a=e[i];if(l(t,n,a))return a}return null}function o(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var a=null;if(e?a=t[e.sn-t[0].sn+1]||null:0===n&&0===t[0].start&&(a=t[0]),a&&0===s(n,r,a))return a;var o=i.default.search(t,s.bind(null,n,r));return o||a}function s(e,t,n){void 0===e&&(e=0),void 0===t&&(t=0);var r=Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return n.start+n.duration-r<=e?1:n.start-r>e&&n.start?-1:0}function l(e,t,n){var r=1e3*Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return(n.endProgramDateTime||0)-r>e}function c(e,t){return i.default.search(e,(function(e){return e.cc<t?1:e.cc>t?-1:0}))}},"./src/controller/fragment-tracker.ts":
|
|
|
/*!********************************************!*\
|
|
|
!*** ./src/controller/fragment-tracker.ts ***!
|
|
|
\********************************************/
|
|
|
/*! exports provided: FragmentState, FragmentTracker */function(e,t,n){"use strict";n.r(t),n.d(t,"FragmentState",(function(){return r})),n.d(t,"FragmentTracker",(function(){return o}));var r,i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../types/loader */"./src/types/loader.ts");!function(e){e.NOT_LOADED="NOT_LOADED",e.BACKTRACKED="BACKTRACKED",e.APPENDING="APPENDING",e.PARTIAL="PARTIAL",e.OK="OK"}(r||(r={}));var o=function(){function e(e){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=e,this._registerListeners()}var t=e.prototype;return t._registerListeners=function(){var e=this.hls;e.on(i.Events.BUFFER_APPENDED,this.onBufferAppended,this),e.on(i.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.on(i.Events.FRAG_LOADED,this.onFragLoaded,this)},t._unregisterListeners=function(){var e=this.hls;e.off(i.Events.BUFFER_APPENDED,this.onBufferAppended,this),e.off(i.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.off(i.Events.FRAG_LOADED,this.onFragLoaded,this)},t.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},t.getAppendedFrag=function(e,t){if(t===a.PlaylistLevelType.MAIN){var n=this.activeFragment,r=this.activeParts;if(!n)return null;if(r)for(var i=r.length;i--;){var o=r[i],s=o?o.end:n.appendedPTS;if(o.start<=e&&void 0!==s&&e<=s)return i>9&&(this.activeParts=r.slice(i-9)),o}else if(n.start<=e&&void 0!==n.appendedPTS&&e<=n.appendedPTS)return n}return this.getBufferedFrag(e,t)},t.getBufferedFrag=function(e,t){for(var n=this.fragments,r=Object.keys(n),i=r.length;i--;){var a=n[r[i]];if((null==a?void 0:a.body.type)===t&&a.buffered){var o=a.body;if(o.start<=e&&e<=o.end)return o}}return null},t.detectEvictedFragments=function(e,t,n){var r=this;Object.keys(this.fragments).forEach((function(i){var a=r.fragments[i];if(a)if(a.buffered){var o=a.range[e];o&&o.time.some((function(e){var n=!r.isTimeBuffered(e.startPTS,e.endPTS,t);return n&&r.removeFragment(a.body),n}))}else a.body.type===n&&r.removeFragment(a.body)}))},t.detectPartialFragments=function(e){var t=this,n=this.timeRanges,r=e.frag,i=e.part;if(n&&"initSegment"!==r.sn){var a=l(r),o=this.fragments[a];o&&(Object.keys(n).forEach((function(e){var a=r.elementaryStreams[e];if(a){var s=n[e],l=null!==i||!0===a.partial;o.range[e]=t.getBufferedTimes(r,i,l,s)}})),o.backtrack=o.loaded=null,Object.keys(o.range).length?o.buffered=!0:this.removeFragment(o.body))}},t.fragBuffered=function(e){var t=l(e),n=this.fragments[t];n&&(n.backtrack=n.loaded=null,n.buffered=!0)},t.getBufferedTimes=function(e,t,n,r){for(var i={time:[],partial:n},a=t?t.start:e.start,o=t?t.end:e.end,s=e.minEndPTS||o,l=e.maxStartPTS||a,c=0;c<r.length;c++){var u=r.start(c)-this.bufferPadding,d=r.end(c)+this.bufferPadding;if(l>=u&&s<=d){i.time.push({startPTS:Math.max(a,r.start(c)),endPTS:Math.min(o,r.end(c))});break}if(a<d&&o>u)i.partial=!0,i.time.push({startPTS:Math.max(a,r.start(c)),endPTS:Math.min(o,r.end(c))});else if(o<=u)break}return i},t.getPartialFragment=function(e){var t,n,r,i=null,a=0,o=this.bufferPadding,l=this.fragments;return Object.keys(l).forEach((function(c){var u=l[c];u&&s(u)&&(n=u.body.start-o,r=u.body.end+o,e>=n&&e<=r&&(t=Math.min(e-n,r-e),a<=t&&(i=u.body,a=t)))})),i},t.getState=function(e){var t=l(e),n=this.fragments[t];return n?n.buffered?s(n)?r.PARTIAL:r.OK:n.backtrack?r.BACKTRACKED:r.APPENDING:r.NOT_LOADED},t.backtrack=function(e,t){var n=l(e),r=this.fragments[n];if(!r||r.backtrack)return null;var i=r.backtrack=t||r.loaded;return r.loaded=null,i},t.getBacktrackData=function(e){var t=l(e),n=this.fragments[t];if(n){var r,i=n.backtrack;if(null!=i&&null!==(r=i.payload)&&void 0!==r&&r.byteLength)return i;this.removeFragment(e)}return null},t.isTimeBuffered=function(e,t,n){for(var r,i,a=0;a<n.length;a++){if(r=n.start(a)-this.bufferPadding,i=n.end(a)+this.bufferPadding,e>=r&&t<=i)return!0;if(t<=r)return!1}return!1},t.onFragLoaded=function(e,t){var n=t.frag,r=t.part;if("initSegment"!==n.sn&&!n.bitrateTest&&!r){var i=l(n);this.fragments[i]={body:n,loaded:t,backtrack:null,buffered:!1,range:Object.create(null)}}},t.onBufferAppended=function(e,t){var n=this,r=t.frag,i=t.part,o=t.timeRanges;if(r.type===a.PlaylistLevelType.MAIN)if(this.activeFragment=r,i){var s=this.activeParts;s||(this.activeParts=s=[]),s.push(i)}else this.activeParts=null;this.timeRanges=o,Object.keys(o).forEach((function(e){var t=o[e];if(n.detectEvictedFragments(e,t),!i)for(var a=0;a<t.length;a++)r.appendedPTS=Math.max(t.end(a),r.appendedPTS||0)}))},t.onFragBuffered=function(e,t){this.detectPartialFragments(t)},t.hasFragment=function(e){var t=l(e);return!!this.fragments[t]},t.removeFragmentsInRange=function(e,t,n){var r=this;Object.keys(this.fragments).forEach((function(i){var a=r.fragments[i];if(a&&a.buffered){var o=a.body;o.type===n&&o.start<t&&o.end>e&&r.removeFragment(o)}}))},t.removeFragment=function(e){var t=l(e);e.stats.loaded=0,e.clearElementaryStreamInfo(),delete this.fragments[t]},t.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},e}();function s(e){var t,n;return e.buffered&&((null===(t=e.range.video)||void 0===t?void 0:t.partial)||(null===(n=e.range.audio)||void 0===n?void 0:n.partial))}function l(e){return e.type+"_"+e.level+"_"+e.urlId+"_"+e.sn}},"./src/controller/gap-controller.ts":
|
|
|
/*!******************************************!*\
|
|
|
!*** ./src/controller/gap-controller.ts ***!
|
|
|
\******************************************/
|
|
|
/*! exports provided: STALL_MINIMUM_DURATION_MS, MAX_START_GAP_JUMP, SKIP_BUFFER_HOLE_STEP_SECONDS, SKIP_BUFFER_RANGE_START, default */function(e,t,n){"use strict";n.r(t),n.d(t,"STALL_MINIMUM_DURATION_MS",(function(){return s})),n.d(t,"MAX_START_GAP_JUMP",(function(){return l})),n.d(t,"SKIP_BUFFER_HOLE_STEP_SECONDS",(function(){return c})),n.d(t,"SKIP_BUFFER_RANGE_START",(function(){return u})),n.d(t,"default",(function(){return d}));var r=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),i=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ../events */"./src/events.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=250,l=2,c=.1,u=.05,d=function(){function e(e,t,n,r){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=t,this.fragmentTracker=n,this.hls=r}var t=e.prototype;return t.destroy=function(){this.hls=this.fragmentTracker=this.media=null},t.poll=function(e){var t=this.config,n=this.media,i=this.stalled,a=n.currentTime,c=n.seeking,u=this.seeking&&!c,d=!this.seeking&&c;if(this.seeking=c,a===e){if((d||u)&&(this.stalled=null),!n.paused&&!n.ended&&0!==n.playbackRate&&r.BufferHelper.getBuffered(n).length){var h=r.BufferHelper.bufferInfo(n,a,0),f=h.len>0,p=h.nextStart||0;if(f||p){if(c){var m=h.len>l,g=!p||p-a>l&&!this.fragmentTracker.getPartialFragment(a);if(m||g)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var v,b=Math.max(p,h.start||0)-a,y=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,E=(null==y||null===(v=y.details)||void 0===v?void 0:v.live)?2*y.details.targetduration:l;if(b>0&&b<=E)return void this._trySkipBufferHole(null)}var x=self.performance.now();if(null!==i){var _=x-i;!c&&_>=s&&this._reportStall(h.len);var k=r.BufferHelper.bufferInfo(n,a,t.maxBufferHole);this._tryFixBufferStall(k,_)}else this.stalled=x}}}else if(this.moved=!0,null!==i){if(this.stallReported){var w=self.performance.now()-i;o.logger.warn("playback not stuck anymore @"+a+", after "+Math.round(w)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},t._tryFixBufferStall=function(e,t){var n=this.config,r=this.fragmentTracker,i=this.media.currentTime,a=r.getPartialFragment(i);a&&this._trySkipBufferHole(a)||e.len>n.maxBufferHole&&t>1e3*n.highBufferWatchdogPeriod&&(o.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},t._reportStall=function(e){var t=this.hls,n=this.media;this.stallReported||(this.stallReported=!0,o.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+e+")"),t.trigger(a.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:e}))},t._trySkipBufferHole=function(e){for(var t=this.config,n=this.hls,s=this.media,l=s.currentTime,d=0,h=r.BufferHelper.getBuffered(s),f=0;f<h.length;f++){var p=h.start(f);if(l+t.maxBufferHole>=d&&l<p){var m=Math.max(p+u,s.currentTime+c);return o.logger.warn("skipping hole, adjusting currentTime from "+l+" to "+m),this.moved=!0,this.stalled=null,s.currentTime=m,e&&n.trigger(a.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+l+" to "+m,frag:e}),m}d=h.end(f)}return 0},t._tryNudgeBuffer=function(){var e=this.config,t=this.hls,n=this.media,r=n.currentTime,s=(this.nudgeRetry||0)+1;if(this.nudgeRetry=s,s<e.nudgeMaxRetry){var l=r+s*e.nudgeOffset;o.logger.warn("Nudging 'currentTime' from "+r+" to "+l),n.currentTime=l,t.trigger(a.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else o.logger.error("Playhead still not moving while enough data buffered @"+r+" after "+e.nudgeMaxRetry+" nudges"),t.trigger(a.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},e}()},"./src/controller/id3-track-controller.ts":
|
|
|
/*!************************************************!*\
|
|
|
!*** ./src/controller/id3-track-controller.ts ***!
|
|
|
\************************************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../utils/texttrack-utils */"./src/utils/texttrack-utils.ts"),a=n(/*! ../demux/id3 */"./src/demux/id3.ts"),o=function(){function e(e){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=e,this._registerListeners()}var t=e.prototype;return t.destroy=function(){this._unregisterListeners()},t._registerListeners=function(){var e=this.hls;e.on(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(r.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(r.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},t._unregisterListeners=function(){var e=this.hls;e.off(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(r.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(r.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},t.onMediaAttached=function(e,t){this.media=t.media},t.onMediaDetaching=function(){this.id3Track&&(Object(i.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null)},t.getID3Track=function(e){if(this.media){for(var t=0;t<e.length;t++){var n=e[t];if("metadata"===n.kind&&"id3"===n.label)return Object(i.sendAddTrackEvent)(n,this.media),n}return this.media.addTextTrack("metadata","id3")}},t.onFragParsingMetadata=function(e,t){if(this.media){var n=t.frag,r=t.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var i=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,o=0;o<r.length;o++){var s=a.getID3Frames(r[o].data);if(s){var l=r[o].pts,c=o<r.length-1?r[o+1].pts:n.end;c-l<=0&&(c=l+.25);for(var u=0;u<s.length;u++){var d=s[u];if(!a.isTimeStampFrame(d)){var h=new i(l,c,"");h.value=d,this.id3Track.addCue(h)}}}}}},t.onBufferFlushing=function(e,t){var n=t.startOffset,r=t.endOffset,a=t.type;if(!a||"audio"===a){var o=this.id3Track;o&&Object(i.removeCuesInRange)(o,n,r)}},e}();t.default=o},"./src/controller/latency-controller.ts":
|
|
|
/*!**********************************************!*\
|
|
|
!*** ./src/controller/latency-controller.ts ***!
|
|
|
\**********************************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return s}));var r=n(/*! ../errors */"./src/errors.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts");function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=function(){function e(e){var t=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return t.timeupdate()},this.hls=e,this.config=e.config,this.registerListeners()}var t,n,s,l=e.prototype;return l.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},l.registerListeners=function(){this.hls.on(i.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(i.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(i.Events.ERROR,this.onError,this)},l.unregisterListeners=function(){this.hls.off(i.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(i.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(i.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(i.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(i.Events.ERROR,this.onError)},l.onMediaAttached=function(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},l.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},l.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},l.onLevelUpdated=function(e,t){var n=t.details;this.levelDetails=n,n.advanced&&this.timeupdate(),!n.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},l.onError=function(e,t){t.details===r.ErrorDetails.BUFFER_STALLED_ERROR&&(this.stallCount++,a.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))},l.timeupdate=function(){var e=this.media,t=this.levelDetails;if(e&&t){this.currentTime=e.currentTime;var n=this.computeLatency();if(null!==n){this._latency=n;var r=this.config,i=r.lowLatencyMode,a=r.maxLiveSyncPlaybackRate;if(i&&1!==a){var o=this.targetLatency;if(null!==o){var s=n-o,l=s<Math.min(this.maxLatency,o+t.targetduration);if(t.live&&l&&s>.05&&this.forwardBufferLength>1){var c=Math.min(2,Math.max(1,a)),u=Math.round(2/(1+Math.exp(-.75*s-this.edgeStalled))*20)/20;e.playbackRate=Math.min(c,Math.max(1,u))}else 1!==e.playbackRate&&0!==e.playbackRate&&(e.playbackRate=1)}}}}},l.estimateLiveEdge=function(){var e=this.levelDetails;return null===e?null:e.edge+e.age},l.computeLatency=function(){var e=this.estimateLiveEdge();return null===e?null:e-this.currentTime},t=e,(n=[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var e=this.config,t=this.levelDetails;return void 0!==e.liveMaxLatencyDuration?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}},{key:"targetLatency",get:function(){var e=this.levelDetails;if(null===e)return null;var t=e.holdBack,n=e.partHoldBack,r=e.targetduration,i=this.config,a=i.liveSyncDuration,o=i.liveSyncDurationCount,s=i.lowLatencyMode,l=this.hls.userConfig,c=s&&n||t;(l.liveSyncDuration||l.liveSyncDurationCount||0===c)&&(c=void 0!==a?a:o*r);var u=r;return c+Math.min(1*this.stallCount,u)}},{key:"liveSyncPosition",get:function(){var e=this.estimateLiveEdge(),t=this.targetLatency,n=this.levelDetails;if(null===e||null===t||null===n)return null;var r=n.edge,i=e-t-this.edgeStalled,a=r-n.totalduration,o=r-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(a,i),o)}},{key:"drift",get:function(){var e=this.levelDetails;return null===e?1:e.drift}},{key:"edgeStalled",get:function(){var e=this.levelDetails;if(null===e)return 0;var t=3*(this.config.lowLatencyMode&&e.partTarget||e.targetduration);return Math.max(e.age-t,0)}},{key:"forwardBufferLength",get:function(){var e=this.media,t=this.levelDetails;if(!e||!t)return 0;var n=e.buffered.length;return n?e.buffered.end(n-1):t.edge-this.currentTime}}])&&o(t.prototype,n),s&&o(t,s),e}()},"./src/controller/level-controller.ts":
|
|
|
/*!********************************************!*\
|
|
|
!*** ./src/controller/level-controller.ts ***!
|
|
|
\********************************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return p}));var r=n(/*! ../types/level */"./src/types/level.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../utils/codecs */"./src/utils/codecs.ts"),s=n(/*! ./level-helper */"./src/controller/level-helper.ts"),l=n(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts");function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var f=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),p=function(e){var t,n;function l(t){var n;return(n=e.call(this,t,"[level-controller]")||this)._levels=[],n._firstLevel=-1,n._startLevel=void 0,n.currentLevelIndex=-1,n.manualLevelIndex=-1,n.onParsedComplete=void 0,n._registerListeners(),n}n=e,(t=l).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n);var p,m,g,v=l.prototype;return v._registerListeners=function(){var e=this.hls;e.on(i.Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(i.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(i.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(i.Events.FRAG_LOADED,this.onFragLoaded,this),e.on(i.Events.ERROR,this.onError,this)},v._unregisterListeners=function(){var e=this.hls;e.off(i.Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(i.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(i.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(i.Events.FRAG_LOADED,this.onFragLoaded,this),e.off(i.Events.ERROR,this.onError,this)},v.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,e.prototype.destroy.call(this)},v.startLoad=function(){this._levels.forEach((function(e){e.loadError=0})),e.prototype.startLoad.call(this)},v.onManifestLoaded=function(e,t){var n,l,c=[],u=[],d=[],h={},p=!1,m=!1,g=!1;if(t.levels.forEach((function(e){var t=e.attrs;p=p||!(!e.width||!e.height),m=m||!!e.videoCodec,g=g||!!e.audioCodec,f&&e.audioCodec&&-1!==e.audioCodec.indexOf("mp4a.40.34")&&(e.audioCodec=void 0);var n=e.bitrate+"-"+e.attrs.RESOLUTION+"-"+e.attrs.CODECS;(l=h[n])?l.url.push(e.url):(l=new r.Level(e),h[n]=l,c.push(l)),t&&(t.AUDIO&&Object(s.addGroupId)(l,"audio",t.AUDIO),t.SUBTITLES&&Object(s.addGroupId)(l,"text",t.SUBTITLES))})),(p||m)&&g&&(c=c.filter((function(e){var t=e.videoCodec,n=e.width,r=e.height;return!!t||!(!n||!r)}))),c=c.filter((function(e){var t=e.audioCodec,n=e.videoCodec;return(!t||Object(o.isCodecSupportedInMp4)(t,"audio"))&&(!n||Object(o.isCodecSupportedInMp4)(n,"video"))})),t.audioTracks&&(u=t.audioTracks.filter((function(e){return!e.audioCodec||Object(o.isCodecSupportedInMp4)(e.audioCodec,"audio")})),Object(s.assignTrackIdsByGroup)(u)),t.subtitles&&(d=t.subtitles,Object(s.assignTrackIdsByGroup)(d)),c.length>0){n=c[0].bitrate,c.sort((function(e,t){return e.bitrate-t.bitrate})),this._levels=c;for(var v=0;v<c.length;v++)if(c[v].bitrate===n){this._firstLevel=v,this.log("manifest loaded, "+c.length+" level(s) found, first bitrate: "+n);break}var b=g&&!m,y={levels:c,audioTracks:u,subtitleTracks:d,firstLevel:this._firstLevel,stats:t.stats,audio:g,video:m,altAudio:!b&&u.some((function(e){return!!e.url}))};this.hls.trigger(i.Events.MANIFEST_PARSED,y),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(i.Events.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,reason:"no level with compatible codecs found in manifest"})},v.onError=function(t,n){if(e.prototype.onError.call(this,t,n),!n.fatal){var r=n.context,i=this._levels[this.currentLevelIndex];if(r&&(r.type===c.PlaylistContextType.AUDIO_TRACK&&i.audioGroupIds&&r.groupId===i.audioGroupIds[i.urlId]||r.type===c.PlaylistContextType.SUBTITLE_TRACK&&i.textGroupIds&&r.groupId===i.textGroupIds[i.urlId]))this.redundantFailover(this.currentLevelIndex);else{var o,s=!1,l=!0;switch(n.details){case a.ErrorDetails.FRAG_LOAD_ERROR:case a.ErrorDetails.FRAG_LOAD_TIMEOUT:case a.ErrorDetails.KEY_LOAD_ERROR:case a.ErrorDetails.KEY_LOAD_TIMEOUT:if(n.frag){var u=this._levels[n.frag.level];u?(u.fragmentError++,u.fragmentError>this.hls.config.fragLoadingMaxRetry&&(o=n.frag.level)):o=n.frag.level}break;case a.ErrorDetails.LEVEL_LOAD_ERROR:case a.ErrorDetails.LEVEL_LOAD_TIMEOUT:r&&(r.deliveryDirectives&&(l=!1),o=r.level),s=!0;break;case a.ErrorDetails.REMUX_ALLOC_ERROR:o=n.level,s=!0}void 0!==o&&this.recoverLevel(n,o,s,l)}}},v.recoverLevel=function(e,t,n,r){var i=e.details,a=this._levels[t];if(a.loadError++,n){if(!this.retryLoadingOrFail(e))return void(this.currentLevelIndex=-1);e.levelRetry=!0}if(r){var o=a.url.length;if(o>1&&a.loadError<o)e.levelRetry=!0,this.redundantFailover(t);else if(-1===this.manualLevelIndex){var s=0===t?this._levels.length-1:t-1;this.currentLevelIndex!==s&&0===this._levels[s].loadError&&(this.warn(i+": switch to "+s),e.levelRetry=!0,this.hls.nextAutoLevel=s)}}},v.redundantFailover=function(e){var t=this._levels[e],n=t.url.length;if(n>1){var r=(t.urlId+1)%n;this.warn("Switching to redundant URL-id "+r),this._levels.forEach((function(e){e.urlId=r})),this.level=e}},v.onFragLoaded=function(e,t){var n=t.frag;if(void 0!==n&&n.type===c.PlaylistLevelType.MAIN){var r=this._levels[n.level];void 0!==r&&(r.fragmentError=0,r.loadError=0)}},v.onLevelLoaded=function(e,t){var n,r,i=t.level,a=t.details,o=this._levels[i];if(!o)return this.warn("Invalid level index "+i),void(null!==(r=t.deliveryDirectives)&&void 0!==r&&r.skip&&(a.deltaUpdateFailed=!0));i===this.currentLevelIndex?(0===o.fragmentError&&(o.loadError=0,this.retryCount=0),this.playlistLoaded(i,t,o.details)):null!==(n=t.deliveryDirectives)&&void 0!==n&&n.skip&&(a.deltaUpdateFailed=!0)},v.onAudioTrackSwitched=function(e,t){var n=this.hls.levels[this.currentLevelIndex];if(n&&n.audioGroupIds){for(var r=-1,i=this.hls.audioTracks[t.id].groupId,a=0;a<n.audioGroupIds.length;a++)if(n.audioGroupIds[a]===i){r=a;break}r!==n.urlId&&(n.urlId=r,this.startLoad())}},v.loadPlaylist=function(e){var t=this.currentLevelIndex,n=this._levels[t];if(this.canLoad&&n&&n.url.length>0){var r=n.urlId,a=n.url[r];if(e)try{a=e.addDirectives(a)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("Attempt loading level index "+t+(e?" at sn "+e.msn+" part "+e.part:"")+" with URL-id "+r+" "+a),this.clearTimer(),this.hls.trigger(i.Events.LEVEL_LOADING,{url:a,level:t,id:r,deliveryDirectives:e||null})}},v.removeLevel=function(e,t){var n=function(e,n){return n!==t},r=this._levels.filter((function(r,i){return i!==e||r.url.length>1&&void 0!==t&&(r.url=r.url.filter(n),r.audioGroupIds&&(r.audioGroupIds=r.audioGroupIds.filter(n)),r.textGroupIds&&(r.textGroupIds=r.textGroupIds.filter(n)),r.urlId=0,!0)})).map((function(e,t){var n=e.details;return null!=n&&n.fragments&&n.fragments.forEach((function(e){e.level=t})),e}));this._levels=r,this.hls.trigger(i.Events.LEVELS_UPDATED,{levels:r})},p=l,(m=[{key:"levels",get:function(){return 0===this._levels.length?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(e){var t,n=this._levels;if(0!==n.length&&(this.currentLevelIndex!==e||null===(t=n[e])||void 0===t||!t.details)){if(e<0||e>=n.length){var r=e<0;if(this.hls.trigger(i.Events.ERROR,{type:a.ErrorTypes.OTHER_ERROR,details:a.ErrorDetails.LEVEL_SWITCH_ERROR,level:e,fatal:r,reason:"invalid level idx"}),r)return;e=Math.min(e,n.length-1)}this.clearTimer();var o=this.currentLevelIndex,s=n[o],l=n[e];this.log("switching to level "+e+" from "+o),this.currentLevelIndex=e;var c=u({},l,{level:e,maxBitrate:l.maxBitrate,uri:l.uri,urlId:l.urlId});delete c._urlId,this.hls.trigger(i.Events.LEVEL_SWITCHING,c);var d=l.details;if(!d||d.live){var h=this.switchParams(l.uri,null==s?void 0:s.details);this.loadPlaylist(h)}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel},set:function(e){this._startLevel=e}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}}])&&d(p.prototype,m),g&&d(p,g),l}(l.default)},"./src/controller/level-helper.ts":
|
|
|
/*!****************************************!*\
|
|
|
!*** ./src/controller/level-helper.ts ***!
|
|
|
\****************************************/
|
|
|
/*! exports provided: addGroupId, assignTrackIdsByGroup, updatePTS, updateFragPTSDTS, mergeDetails, mapPartIntersection, mapFragmentIntersection, adjustSliding, addSliding, computeReloadInterval, getFragmentWithSN, getPartWith */function(e,t,n){"use strict";n.r(t),n.d(t,"addGroupId",(function(){return a})),n.d(t,"assignTrackIdsByGroup",(function(){return o})),n.d(t,"updatePTS",(function(){return s})),n.d(t,"updateFragPTSDTS",(function(){return c})),n.d(t,"mergeDetails",(function(){return u})),n.d(t,"mapPartIntersection",(function(){return d})),n.d(t,"mapFragmentIntersection",(function(){return h})),n.d(t,"adjustSliding",(function(){return f})),n.d(t,"addSliding",(function(){return p})),n.d(t,"computeReloadInterval",(function(){return m})),n.d(t,"getFragmentWithSN",(function(){return g})),n.d(t,"getPartWith",(function(){return v}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/logger */"./src/utils/logger.ts");function a(e,t,n){switch(t){case"audio":e.audioGroupIds||(e.audioGroupIds=[]),e.audioGroupIds.push(n);break;case"text":e.textGroupIds||(e.textGroupIds=[]),e.textGroupIds.push(n)}}function o(e){var t={};e.forEach((function(e){var n=e.groupId||"";e.id=t[n]=t[n]||0,t[n]++}))}function s(e,t,n){l(e[t],e[n])}function l(e,t){var n=t.startPTS;if(Object(r.isFiniteNumber)(n)){var i,a=0;t.sn>e.sn?(a=n-e.start,i=e):(a=e.start-n,i=t),i.duration!==a&&(i.duration=a)}else t.sn>e.sn?e.cc===t.cc&&e.minEndPTS?t.start=e.start+(e.minEndPTS-e.start):t.start=e.start+e.duration:t.start=Math.max(e.start-t.duration,0)}function c(e,t,n,a,o,s){a-n<=0&&(i.logger.warn("Fragment should have a positive duration",t),a=n+t.duration,s=o+t.duration);var c=n,u=a,d=t.startPTS,h=t.endPTS;if(Object(r.isFiniteNumber)(d)){var f=Math.abs(d-n);Object(r.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(f,t.deltaPTS):t.deltaPTS=f,c=Math.max(n,d),n=Math.min(n,d),o=Math.min(o,t.startDTS),u=Math.min(a,h),a=Math.max(a,h),s=Math.max(s,t.endDTS)}t.duration=a-n;var p=n-t.start;t.appendedPTS=a,t.start=t.startPTS=n,t.maxStartPTS=c,t.startDTS=o,t.endPTS=a,t.minEndPTS=u,t.endDTS=s;var m,g=t.sn;if(!e||g<e.startSN||g>e.endSN)return 0;var v=g-e.startSN,b=e.fragments;for(b[v]=t,m=v;m>0;m--)l(b[m],b[m-1]);for(m=v;m<b.length-1;m++)l(b[m],b[m+1]);return e.fragmentHint&&l(b[b.length-1],e.fragmentHint),e.PTSKnown=e.alignedSliding=!0,p}function u(e,t){for(var n=null,a=e.fragments,o=a.length-1;o>=0;o--){var s=a[o].initSegment;if(s){n=s;break}}e.fragmentHint&&delete e.fragmentHint.endPTS;var l,u=0;if(h(e,t,(function(e,i){e.relurl&&(u=e.cc-i.cc),Object(r.isFiniteNumber)(e.startPTS)&&Object(r.isFiniteNumber)(e.endPTS)&&(i.start=i.startPTS=e.startPTS,i.startDTS=e.startDTS,i.appendedPTS=e.appendedPTS,i.maxStartPTS=e.maxStartPTS,i.endPTS=e.endPTS,i.endDTS=e.endDTS,i.minEndPTS=e.minEndPTS,i.duration=e.endPTS-e.startPTS,i.duration&&(l=i),t.PTSKnown=t.alignedSliding=!0),i.elementaryStreams=e.elementaryStreams,i.loader=e.loader,i.stats=e.stats,i.urlId=e.urlId,e.initSegment&&(i.initSegment=e.initSegment,n=e.initSegment)})),n&&(t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments).forEach((function(e){var t;e.initSegment&&e.initSegment.relurl!==(null===(t=n)||void 0===t?void 0:t.relurl)||(e.initSegment=n)})),t.skippedSegments&&(t.deltaUpdateFailed=t.fragments.some((function(e){return!e})),t.deltaUpdateFailed)){i.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var p=t.skippedSegments;p--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}var m=t.fragments;if(u){i.logger.warn("discontinuity sliding from playlist, take drift into account");for(var g=0;g<m.length;g++)m[g].cc+=u}t.skippedSegments&&(t.startCC=t.fragments[0].cc),d(e.partList,t.partList,(function(e,t){t.elementaryStreams=e.elementaryStreams,t.stats=e.stats})),l?c(t,l,l.startPTS,l.endPTS,l.startDTS,l.endDTS):f(e,t),m.length&&(t.totalduration=t.edge-m[0].start),t.driftStartTime=e.driftStartTime,t.driftStart=e.driftStart;var v=t.advancedDateTime;if(t.advanced&&v){var b=t.edge;t.driftStart||(t.driftStartTime=v,t.driftStart=b),t.driftEndTime=v,t.driftEnd=b}else t.driftEndTime=e.driftEndTime,t.driftEnd=e.driftEnd,t.advancedDateTime=e.advancedDateTime}function d(e,t,n){if(e&&t)for(var r=0,i=0,a=e.length;i<=a;i++){var o=e[i],s=t[i+r];o&&s&&o.index===s.index&&o.fragment.sn===s.fragment.sn?n(o,s):r--}}function h(e,t,n){for(var r=t.skippedSegments,i=Math.max(e.startSN,t.startSN)-t.startSN,a=(e.fragmentHint?1:0)+(r?t.endSN:Math.min(e.endSN,t.endSN))-t.startSN,o=t.startSN-e.startSN,s=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,l=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,c=i;c<=a;c++){var u=l[o+c],d=s[c];r&&!d&&c<r&&(d=t.fragments[c]=u),u&&d&&n(u,d)}}function f(e,t){var n=t.startSN+t.skippedSegments-e.startSN,r=e.fragments;n<0||n>=r.length||p(t,r[n].start)}function p(e,t){if(t){for(var n=e.fragments,r=e.skippedSegments;r<n.length;r++)n[r].start+=t;e.fragmentHint&&(e.fragmentHint.start+=t)}}function m(e,t){var n,r=1e3*e.levelTargetDuration,i=r/2,a=e.age,o=a>0&&a<3*r,s=t.loading.end-t.loading.start,l=e.availabilityDelay;if(!1===e.updated)if(o){var c=333*e.misses;n=Math.max(Math.min(i,2*s),c),e.availabilityDelay=(e.availabilityDelay||0)+n}else n=i;else o?(l=Math.min(l||r/2,a),e.availabilityDelay=l,n=l+r-a):n=r-s;return Math.round(n)}function g(e,t,n){if(!e||!e.details)return null;var r=e.details,i=r.fragments[t-r.startSN];return i||((i=r.fragmentHint)&&i.sn===t?i:t<r.startSN&&n&&n.sn===t?n:null)}function v(e,t,n){if(!e||!e.details)return null;var r=e.details.partList;if(r)for(var i=r.length;i--;){var a=r[i];if(a.index===n&&a.fragment.sn===t)return a}return null}},"./src/controller/stream-controller.ts":
|
|
|
/*!*********************************************!*\
|
|
|
!*** ./src/controller/stream-controller.ts ***!
|
|
|
\*********************************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return b}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./base-stream-controller */"./src/controller/base-stream-controller.ts"),a=n(/*! ../is-supported */"./src/is-supported.ts"),o=n(/*! ../events */"./src/events.ts"),s=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),l=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts"),u=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),d=n(/*! ../demux/transmuxer-interface */"./src/demux/transmuxer-interface.ts"),h=n(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),f=n(/*! ./gap-controller */"./src/controller/gap-controller.ts"),p=n(/*! ../errors */"./src/errors.ts"),m=n(/*! ../utils/logger */"./src/utils/logger.ts");function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var b=function(e){var t,n;function b(t,n){var r;return(r=e.call(this,t,n,"[stream-controller]")||this).audioCodecSwap=!1,r.gapController=null,r.level=-1,r._forceStartLoad=!1,r.altAudio=!1,r.audioOnly=!1,r.fragPlaying=null,r.onvplaying=null,r.onvseeked=null,r.fragLastKbps=0,r.stalled=!1,r.couldBacktrack=!1,r.audioCodecSwitch=!1,r.videoBuffer=null,r._registerListeners(),r}n=e,(t=b).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n);var y,E,x,_=b.prototype;return _._registerListeners=function(){var e=this.hls;e.on(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(o.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(o.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(o.Events.ERROR,this.onError,this),e.on(o.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(o.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(o.Events.BUFFER_CREATED,this.onBufferCreated,this),e.on(o.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(o.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(o.Events.FRAG_BUFFERED,this.onFragBuffered,this)},_._unregisterListeners=function(){var e=this.hls;e.off(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(o.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(o.Events.ERROR,this.onError,this),e.off(o.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(o.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(o.Events.BUFFER_CREATED,this.onBufferCreated,this),e.off(o.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(o.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(o.Events.FRAG_BUFFERED,this.onFragBuffered,this)},_.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},_.startLoad=function(e){if(this.levels){var t=this.lastCurrentTime,n=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var r=n.startLevel;-1===r&&(n.config.testBandwidth?(r=0,this.bitrateTest=!0):r=n.nextAutoLevel),this.level=n.nextLoadLevel=r,this.loadedmetadata=!1}t>0&&-1===e&&(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=i.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=i.State.STOPPED},_.stopLoad=function(){this._forceStartLoad=!1,e.prototype.stopLoad.call(this)},_.doTick=function(){switch(this.state){case i.State.IDLE:this.doTickIdle();break;case i.State.WAITING_LEVEL:var e,t=this.levels,n=this.level,r=null==t||null===(e=t[n])||void 0===e?void 0:e.details;if(r&&(!r.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(r))break;this.state=i.State.IDLE;break}break;case i.State.FRAG_LOADING_WAITING_RETRY:var a,o=self.performance.now(),s=this.retryDate;(!s||o>=s||null!==(a=this.media)&&void 0!==a&&a.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=i.State.IDLE)}this.onTickEnd()},_.onTickEnd=function(){e.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},_.doTickIdle=function(){var e,t,n=this.hls,r=this.levelLastLoaded,a=this.levels,s=this.media,d=n.config,h=n.nextLoadLevel;if(null!==r&&(s||!this.startFragRequested&&d.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)&&a&&a[h]){var f=a[h];this.level=n.nextLoadLevel=h;var p=f.details;if(!p||this.state===i.State.WAITING_LEVEL||p.live&&this.levelLastLoaded!==h)this.state=i.State.WAITING_LEVEL;else{var m=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:s,c.PlaylistLevelType.MAIN);if(null!==m&&!(m.len>=this.getMaxBufferLength(f.maxBitrate))){if(this._streamEnded(m,p)){var g={};return this.altAudio&&(g.type="video"),this.hls.trigger(o.Events.BUFFER_EOS,g),void(this.state=i.State.ENDED)}var v=m.end,b=this.getNextFragment(v,p);if(this.couldBacktrack&&!this.fragPrevious&&b&&"initSegment"!==b.sn){var y=b.sn-p.startSN;y>1&&(b=p.fragments[y-1],this.fragmentTracker.removeFragment(b))}if(b&&this.fragmentTracker.getState(b)===l.FragmentState.OK&&this.nextLoadPosition>v){var E=this.audioOnly&&!this.altAudio?u.ElementaryStreamTypes.AUDIO:u.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(s,E,c.PlaylistLevelType.MAIN),b=this.getNextFragment(this.nextLoadPosition,p)}b&&(!b.initSegment||b.initSegment.data||this.bitrateTest||(b=b.initSegment),"identity"!==(null===(e=b.decryptdata)||void 0===e?void 0:e.keyFormat)||null!==(t=b.decryptdata)&&void 0!==t&&t.key?this.loadFragment(b,p,v):this.loadKey(b,p))}}}},_.loadFragment=function(t,n,r){var i,a=this.fragmentTracker.getState(t);if(this.fragCurrent=t,a===l.FragmentState.BACKTRACKED){var o=this.fragmentTracker.getBacktrackData(t);if(o)return this._handleFragmentLoadProgress(o),void this._handleFragmentLoadComplete(o);a=l.FragmentState.NOT_LOADED}a===l.FragmentState.NOT_LOADED||a===l.FragmentState.PARTIAL?"initSegment"===t.sn?this._loadInitSegment(t):this.bitrateTest?(t.bitrateTest=!0,this.log("Fragment "+t.sn+" of level "+t.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(t)):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,n,r)):a===l.FragmentState.APPENDING?this.reduceMaxBufferLength(t.duration)&&this.fragmentTracker.removeFragment(t):0===(null===(i=this.media)||void 0===i?void 0:i.buffered.length)&&this.fragmentTracker.removeAllFragments()},_.getAppendedFrag=function(e){var t=this.fragmentTracker.getAppendedFrag(e,c.PlaylistLevelType.MAIN);return t&&"fragment"in t?t.fragment:t},_.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,c.PlaylistLevelType.MAIN)},_.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.end+.5):null},_.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},_.nextLevelSwitch=function(){var e=this.levels,t=this.media;if(null!=t&&t.readyState){var n,r=this.getAppendedFrag(t.currentTime);if(r&&r.start>1&&this.flushMainBuffer(0,r.start-1),!t.paused&&e){var i=e[this.hls.nextLoadLevel],a=this.fragLastKbps;n=a&&this.fragCurrent?this.fragCurrent.duration*i.maxBitrate/(1e3*a)+1:0}else n=0;var o=this.getBufferedFrag(t.currentTime+n);if(o){var s=this.followingBufferedFrag(o);if(s){this.abortCurrentFrag();var l=s.maxStartPTS?s.maxStartPTS:s.start,c=s.duration,u=Math.max(o.end,l+Math.min(Math.max(c-this.config.maxFragLookUpTolerance,.5*c),.75*c));this.flushMainBuffer(u,Number.POSITIVE_INFINITY)}}}},_.abortCurrentFrag=function(){var e=this.fragCurrent;this.fragCurrent=null,null!=e&&e.loader&&e.loader.abort(),this.state===i.State.KEY_LOADING&&(this.state=i.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},_.flushMainBuffer=function(t,n){e.prototype.flushMainBuffer.call(this,t,n,this.altAudio?"video":null)},_.onMediaAttached=function(t,n){e.prototype.onMediaAttached.call(this,t,n);var r=n.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),r.addEventListener("playing",this.onvplaying),r.addEventListener("seeked",this.onvseeked),this.gapController=new f.default(this.config,r,this.fragmentTracker,this.hls)},_.onMediaDetaching=function(){var t=this.media;t&&(t.removeEventListener("playing",this.onvplaying),t.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),e.prototype.onMediaDetaching.call(this)},_.onMediaPlaying=function(){this.tick()},_.onMediaSeeked=function(){var e=this.media,t=e?e.currentTime:null;Object(r.isFiniteNumber)(t)&&this.log("Media seeked to "+t.toFixed(3)),this.tick()},_.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(o.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},_.onManifestParsed=function(e,t){var n,r=!1,i=!1;t.levels.forEach((function(e){(n=e.audioCodec)&&(-1!==n.indexOf("mp4a.40.2")&&(r=!0),-1!==n.indexOf("mp4a.40.5")&&(i=!0))})),this.audioCodecSwitch=r&&i&&!Object(a.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1},_.onLevelLoading=function(e,t){var n=this.levels;if(n&&this.state===i.State.IDLE){var r=n[t.level];(!r.details||r.details.live&&this.levelLastLoaded!==t.level||this.waitForCdnTuneIn(r.details))&&(this.state=i.State.WAITING_LEVEL)}},_.onLevelLoaded=function(e,t){var n,r=this.levels,a=t.level,s=t.details,l=s.totalduration;if(r){this.log("Level "+a+" loaded ["+s.startSN+","+s.endSN+"], cc ["+s.startCC+", "+s.endCC+"] duration:"+l);var c=this.fragCurrent;!c||this.state!==i.State.FRAG_LOADING&&this.state!==i.State.FRAG_LOADING_WAITING_RETRY||c.level!==t.level&&c.loader&&(this.state=i.State.IDLE,c.loader.abort());var u=r[a],d=0;if(s.live||null!==(n=u.details)&&void 0!==n&&n.live){if(s.fragments[0]||(s.deltaUpdateFailed=!0),s.deltaUpdateFailed)return;d=this.alignPlaylists(s,u.details)}if(u.details=s,this.levelLastLoaded=a,this.hls.trigger(o.Events.LEVEL_UPDATED,{details:s,level:a}),this.state===i.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(s))return;this.state=i.State.IDLE}this.startFragRequested?s.live&&this.synchronizeToLiveEdge(s):this.setStartPosition(s,d),this.tick()}else this.warn("Levels were reset while loading level "+a)},_._handleFragmentLoadProgress=function(e){var t,n=e.frag,r=e.part,i=e.payload,a=this.levels;if(a){var o=a[n.level],s=o.details;if(s){var l=o.videoCodec,u=s.PTSKnown||!s.live,f=null===(t=n.initSegment)||void 0===t?void 0:t.data,p=this._getAudioCodec(o),m=this.transmuxer=this.transmuxer||new d.default(this.hls,c.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),g=r?r.index:-1,v=-1!==g,b=new h.ChunkMetadata(n.level,n.sn,n.stats.chunkCount,i.byteLength,g,v),y=this.initPTS[n.cc];m.push(i,f,p,l,n,r,s.totalduration,u,b,y)}else this.warn("Dropping fragment "+n.sn+" of level "+n.level+" after level details were reset")}else this.warn("Levels were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},_.onAudioTrackSwitching=function(e,t){var n=this.altAudio,r=!!t.url,i=t.id;if(!r){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var a=this.fragCurrent;null!=a&&a.loader&&(this.log("Switching to main audio track, cancel main fragment load"),a.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var s=this.hls;n&&s.trigger(o.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),s.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:i})}},_.onAudioTrackSwitched=function(e,t){var n=t.id,r=!!this.hls.audioTracks[n].url;if(r){var i=this.videoBuffer;i&&this.mediaBuffer!==i&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=r,this.tick()},_.onBufferCreated=function(e,t){var n,r,i=t.tracks,a=!1;for(var o in i){var s=i[o];if("main"===s.id){if(r=o,n=s,"video"===o){var l=i[o];l&&(this.videoBuffer=l.buffer)}}else a=!0}a&&n?(this.log("Alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media},_.onFragBuffered=function(e,t){var n=t.frag,r=t.part;if(!n||n.type===c.PlaylistLevelType.MAIN){if(this.fragContextChanged(n))return this.warn("Fragment "+n.sn+(r?" p: "+r.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state),void(this.state===i.State.PARSED&&(this.state=i.State.IDLE));var a=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*a.total/(a.buffering.end-a.loading.first)),"initSegment"!==n.sn&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}},_.onError=function(e,t){switch(t.details){case p.ErrorDetails.FRAG_LOAD_ERROR:case p.ErrorDetails.FRAG_LOAD_TIMEOUT:case p.ErrorDetails.KEY_LOAD_ERROR:case p.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(c.PlaylistLevelType.MAIN,t);break;case p.ErrorDetails.LEVEL_LOAD_ERROR:case p.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==i.State.ERROR&&(t.fatal?(this.warn(""+t.details),this.state=i.State.ERROR):t.levelRetry||this.state!==i.State.WAITING_LEVEL||(this.state=i.State.IDLE));break;case p.ErrorDetails.BUFFER_FULL_ERROR:if("main"===t.parent&&(this.state===i.State.PARSING||this.state===i.State.PARSED)){var n=!0,r=this.getFwdBufferInfo(this.media,c.PlaylistLevelType.MAIN);r&&r.len>.5&&(n=!this.reduceMaxBufferLength(r.len)),n&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}}},_.checkBuffer=function(){var e=this.media,t=this.gapController;if(e&&t&&e.readyState){var n=s.BufferHelper.getBuffered(e);!this.loadedmetadata&&n.length?(this.loadedmetadata=!0,this.seekToStartPos()):t.poll(this.lastCurrentTime),this.lastCurrentTime=e.currentTime}},_.onFragLoadEmergencyAborted=function(){this.state=i.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},_.onBufferFlushed=function(e,t){var n=t.type;if(n!==u.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var r=(n===u.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(r,n,c.PlaylistLevelType.MAIN)}},_.onLevelsUpdated=function(e,t){this.levels=t.levels},_.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},_.seekToStartPos=function(){var e=this.media,t=e.currentTime,n=this.startPosition;if(n>=0&&t<n){if(e.seeking)return void m.logger.log("could not seek to "+n+", already seeking at "+t);var r=s.BufferHelper.getBuffered(e),i=(r.length?r.start(0):0)-n;i>0&&(i<this.config.maxBufferHole||i<this.config.maxFragLookUpTolerance)&&(m.logger.log("adjusting start position by "+i+" to match buffer start"),n+=i,this.startPosition=n),this.log("seek to target start position "+n+" from current time "+t),e.currentTime=n}},_._getAudioCodec=function(e){var t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),t},_._loadBitrateTestFrag=function(e){var t=this;this._doFragLoad(e).then((function(n){var r=t.hls;if(n&&!r.nextLoadLevel&&!t.fragContextChanged(e)){t.fragLoadError=0,t.state=i.State.IDLE,t.startFragRequested=!1,t.bitrateTest=!1;var a=e.stats;a.parsing.start=a.parsing.end=a.buffering.start=a.buffering.end=self.performance.now(),r.trigger(o.Events.FRAG_LOADED,n)}}))},_._handleTransmuxComplete=function(e){var t,n="main",a=this.hls,s=e.remuxResult,l=e.chunkMeta,c=this.getCurrentContext(l);if(!c)return this.warn("The loading context changed while buffering fragment "+l.sn+" of level "+l.level+". This chunk will not be buffered."),void this.resetLiveStartWhenNotLoaded(l.level);var d=c.frag,h=c.part,f=c.level,p=s.video,m=s.text,g=s.id3,v=s.initSegment,b=this.altAudio?void 0:s.audio;if(!this.fragContextChanged(d)){if(this.state=i.State.PARSING,v){v.tracks&&(this._bufferInitSegment(f,v.tracks,d,l),a.trigger(o.Events.FRAG_PARSING_INIT_SEGMENT,{frag:d,id:n,tracks:v.tracks}));var y=v.initPTS,E=v.timescale;Object(r.isFiniteNumber)(y)&&(this.initPTS[d.cc]=y,a.trigger(o.Events.INIT_PTS_FOUND,{frag:d,id:n,initPTS:y,timescale:E}))}if(p&&!1!==s.independent){if(f.details){var x=p.startPTS,_=p.endPTS,k=p.startDTS,w=p.endDTS;if(h)h.elementaryStreams[p.type]={startPTS:x,endPTS:_,startDTS:k,endDTS:w};else if(p.firstKeyFrame&&p.independent&&(this.couldBacktrack=!0),p.dropped&&p.independent){if(this.getLoadPosition()+this.config.maxBufferHole<x)return void this.backtrack(d);d.setElementaryStreamInfo(p.type,d.start,_,d.start,w,!0)}d.setElementaryStreamInfo(p.type,x,_,k,w),this.bufferFragmentData(p,d,h,l)}}else if(!1===s.independent)return void this.backtrack(d);if(b){var C=b.startPTS,S=b.endPTS,O=b.startDTS,A=b.endDTS;h&&(h.elementaryStreams[u.ElementaryStreamTypes.AUDIO]={startPTS:C,endPTS:S,startDTS:O,endDTS:A}),d.setElementaryStreamInfo(u.ElementaryStreamTypes.AUDIO,C,S,O,A),this.bufferFragmentData(b,d,h,l)}if(null!=g&&null!==(t=g.samples)&&void 0!==t&&t.length){var T={frag:d,id:n,samples:g.samples};a.trigger(o.Events.FRAG_PARSING_METADATA,T)}if(m){var I={frag:d,id:n,samples:m.samples};a.trigger(o.Events.FRAG_PARSING_USERDATA,I)}}},_._bufferInitSegment=function(e,t,n,r){var a=this;if(this.state===i.State.PARSING){this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&delete t.audio;var s=t.audio,l=t.video,c=t.audiovideo;if(s){var u=e.audioCodec,d=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(u&&(u=-1!==u.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),1!==s.metadata.channelCount&&-1===d.indexOf("firefox")&&(u="mp4a.40.5")),-1!==d.indexOf("android")&&"audio/mpeg"!==s.container&&(u="mp4a.40.2",this.log("Android: force audio codec to "+u)),e.audioCodec&&e.audioCodec!==u&&this.log('Swapping manifest audio codec "'+e.audioCodec+'" for "'+u+'"'),s.levelCodec=u,s.id="main",this.log("Init audio buffer, container:"+s.container+", codecs[selected/level/parsed]=["+(u||"")+"/"+(e.audioCodec||"")+"/"+s.codec+"]")}l&&(l.levelCodec=e.videoCodec,l.id="main",this.log("Init video buffer, container:"+l.container+", codecs[level/parsed]=["+(e.videoCodec||"")+"/"+l.codec+"]")),c&&this.log("Init audiovideo buffer, container:"+c.container+", codecs[level/parsed]=["+(e.attrs.CODECS||"")+"/"+c.codec+"]"),this.hls.trigger(o.Events.BUFFER_CODECS,t),Object.keys(t).forEach((function(e){var i=t[e].initSegment;null!=i&&i.byteLength&&a.hls.trigger(o.Events.BUFFER_APPENDING,{type:e,data:i,frag:n,part:null,chunkMeta:r,parent:n.type})})),this.tick()}},_.backtrack=function(e){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(e);var t=this.fragmentTracker.backtrack(e);this.fragPrevious=null,this.nextLoadPosition=e.start,t?this.resetFragmentLoading(e):this.state=i.State.BACKTRACKING},_.checkFragmentChanged=function(){var e=this.media,t=null;if(e&&e.readyState>1&&!1===e.seeking){var n=e.currentTime;if(s.BufferHelper.isBuffered(e,n)?t=this.getAppendedFrag(n):s.BufferHelper.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){var r=this.fragPlaying,i=t.level;r&&t.sn===r.sn&&r.level===i&&t.urlId===r.urlId||(this.hls.trigger(o.Events.FRAG_CHANGED,{frag:t}),r&&r.level===i||this.hls.trigger(o.Events.LEVEL_SWITCHED,{level:i}),this.fragPlaying=t)}}},y=b,(E=[{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"currentLevel",get:function(){var e=this.media;if(e){var t=this.getAppendedFrag(e.currentTime);if(t)return t.level}return-1}},{key:"nextBufferedFrag",get:function(){var e=this.media;if(e){var t=this.getAppendedFrag(e.currentTime);return this.followingBufferedFrag(t)}return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}])&&g(y.prototype,E),x&&g(y,x),b}(i.default)},"./src/controller/subtitle-stream-controller.ts":
|
|
|
/*!******************************************************!*\
|
|
|
!*** ./src/controller/subtitle-stream-controller.ts ***!
|
|
|
\******************************************************/
|
|
|
/*! exports provided: SubtitleStreamController */function(e,t,n){"use strict";n.r(t),n.d(t,"SubtitleStreamController",(function(){return m}));var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../utils/logger */"./src/utils/logger.ts"),a=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),o=n(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),s=n(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),l=n(/*! ./level-helper */"./src/controller/level-helper.ts"),c=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),u=n(/*! ./base-stream-controller */"./src/controller/base-stream-controller.ts"),d=n(/*! ../types/loader */"./src/types/loader.ts"),h=n(/*! ../types/level */"./src/types/level.ts");function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m=function(e){var t,n;function m(t,n){var r;return(r=e.call(this,t,n,"[subtitle-stream-controller]")||this).levels=[],r.currentTrackId=-1,r.tracksBuffered=[],r.mainDetails=null,r._registerListeners(),r}n=e,(t=m).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n);var g,v,b,y=m.prototype;return y.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},y._registerListeners=function(){var e=this.hls;e.on(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(r.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(r.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(r.Events.ERROR,this.onError,this),e.on(r.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(r.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(r.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(r.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(r.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},y._unregisterListeners=function(){var e=this.hls;e.off(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(r.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(r.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(r.Events.ERROR,this.onError,this),e.off(r.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(r.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(r.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(r.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(r.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},y.startLoad=function(){this.stopLoad(),this.state=u.State.IDLE,this.setInterval(500),this.tick()},y.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},y.onLevelLoaded=function(e,t){this.mainDetails=t.details},y.onSubtitleFragProcessed=function(e,t){var n=t.frag,r=t.success;if(this.fragPrevious=n,this.state=u.State.IDLE,r){var i=this.tracksBuffered[this.currentTrackId];if(i){for(var a,o=n.start,s=0;s<i.length;s++)if(o>=i[s].start&&o<=i[s].end){a=i[s];break}var l=n.start+n.duration;a?a.end=l:(a={start:o,end:l},i.push(a)),this.fragmentTracker.fragBuffered(n)}}},y.onBufferFlushing=function(e,t){var n=t.startOffset,r=t.endOffset;if(0===n&&r!==Number.POSITIVE_INFINITY){var i=this.currentTrackId,a=this.levels;if(!a.length||!a[i]||!a[i].details)return;var o=r-a[i].details.targetduration;if(o<=0)return;t.endOffsetSubtitles=Math.max(0,o),this.tracksBuffered.forEach((function(e){for(var t=0;t<e.length;)if(e[t].end<=o)e.shift();else{if(!(e[t].start<o))break;e[t].start=o,t++}})),this.fragmentTracker.removeFragmentsInRange(n,o,d.PlaylistLevelType.SUBTITLE)}},y.onError=function(e,t){var n,r=t.frag;r&&r.type===d.PlaylistLevelType.SUBTITLE&&(null!==(n=this.fragCurrent)&&void 0!==n&&n.loader&&this.fragCurrent.loader.abort(),this.state=u.State.IDLE)},y.onSubtitleTracksUpdated=function(e,t){var n=this,r=t.subtitleTracks;this.tracksBuffered=[],this.levels=r.map((function(e){return new h.Level(e)})),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach((function(e){n.tracksBuffered[e.id]=[]})),this.mediaBuffer=null},y.onSubtitleTrackSwitch=function(e,t){if(this.currentTrackId=t.id,this.levels.length&&-1!==this.currentTrackId){var n=this.levels[this.currentTrackId];null!=n&&n.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,n&&this.setInterval(500)}else this.clearInterval()},y.onSubtitleTrackLoaded=function(e,t){var n,r=t.details,i=t.id,a=this.currentTrackId,c=this.levels;if(c.length){var d=c[a];if(!(i>=c.length||i!==a)&&d){if(this.mediaBuffer=this.mediaBufferTimeRanges,r.live||null!==(n=d.details)&&void 0!==n&&n.live){var h=this.mainDetails;if(r.deltaUpdateFailed||!h)return;var f=h.fragments[0];d.details?0===this.alignPlaylists(r,d.details)&&f&&Object(l.addSliding)(r,f.start):r.hasProgramDateTime&&h.hasProgramDateTime?Object(s.alignMediaPlaylistByPDT)(r,h):f&&Object(l.addSliding)(r,f.start)}d.details=r,this.levelLastLoaded=i,this.tick(),r.live&&!this.fragCurrent&&this.media&&this.state===u.State.IDLE&&(Object(o.findFragmentByPTS)(null,r.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),d.details=void 0))}}},y._handleFragmentLoadComplete=function(e){var t=e.frag,n=e.payload,i=t.decryptdata,a=this.hls;if(!this.fragContextChanged(t)&&n&&n.byteLength>0&&i&&i.key&&i.iv&&"AES-128"===i.method){var o=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(n),i.key.buffer,i.iv.buffer).then((function(e){var n=performance.now();a.trigger(r.Events.FRAG_DECRYPTED,{frag:t,payload:e,stats:{tstart:o,tdecrypt:n}})}))}},y.doTick=function(){if(this.media){if(this.state===u.State.IDLE){var e,t=this.currentTrackId,n=this.levels;if(!n.length||!n[t]||!n[t].details)return;var s=n[t].details,l=s.targetduration,d=this.config,h=this.media,f=a.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,h.currentTime-l,d.maxBufferHole),p=f.end;if(f.len>this.getMaxBufferLength()+l)return;console.assert(s,"Subtitle track details are defined on idle subtitle stream controller tick");var m,g=s.fragments,v=g.length,b=s.edge,y=this.fragPrevious;if(p<b){var E=d.maxFragLookUpTolerance;y&&s.hasProgramDateTime&&(m=Object(o.findFragmentByPDT)(g,y.endProgramDateTime,E)),m||!(m=Object(o.findFragmentByPTS)(y,g,p,E))&&y&&y.start<g[0].start&&(m=g[0])}else m=g[v-1];null!==(e=m)&&void 0!==e&&e.encrypted?(i.logger.log("Loading key for "+m.sn),this.state=u.State.KEY_LOADING,this.hls.trigger(r.Events.KEY_LOADING,{frag:m})):m&&this.fragmentTracker.getState(m)===c.FragmentState.NOT_LOADED&&this.loadFragment(m,s,p)}}else this.state=u.State.IDLE},y.loadFragment=function(t,n,r){this.fragCurrent=t,e.prototype.loadFragment.call(this,t,n,r)},g=m,(v=[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}])&&f(g.prototype,v),b&&f(g,b),m}(u.default)},"./src/controller/subtitle-track-controller.ts":
|
|
|
/*!*****************************************************!*\
|
|
|
!*** ./src/controller/subtitle-track-controller.ts ***!
|
|
|
\*****************************************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../utils/texttrack-utils */"./src/utils/texttrack-utils.ts"),a=n(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),o=n(/*! ../types/loader */"./src/types/loader.ts");function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=function(e){var t,n;function a(t){var n;return(n=e.call(this,t,"[subtitle-track-controller]")||this).media=null,n.tracks=[],n.groupId=null,n.tracksInGroup=[],n.trackId=-1,n.selectDefaultTrack=!0,n.queuedDefaultTrack=-1,n.trackChangeListener=function(){return n.onTextTracksChanged()},n.asyncPollTrackChange=function(){return n.pollTrackChange(0)},n.useTextTrackPolling=!1,n.subtitlePollingInterval=-1,n.subtitleDisplay=!0,n.registerListeners(),n}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n);var c,d,h,f=a.prototype;return f.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,e.prototype.destroy.call(this)},f.registerListeners=function(){var e=this.hls;e.on(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(r.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(r.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(r.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(r.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(r.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(r.Events.ERROR,this.onError,this)},f.unregisterListeners=function(){var e=this.hls;e.off(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(r.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(r.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(r.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(r.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(r.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(r.Events.ERROR,this.onError,this)},f.onMediaAttached=function(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))},f.pollTrackChange=function(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,e)},f.onMediaDetaching=function(){this.media&&(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),u(this.media.textTracks).forEach((function(e){Object(i.clearCurrentCues)(e)})),this.subtitleTrack=-1,this.media=null)},f.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},f.onManifestParsed=function(e,t){this.tracks=t.subtitleTracks},f.onSubtitleTrackLoaded=function(e,t){var n=t.id,r=t.details,i=this.trackId,a=this.tracksInGroup[i];if(a){var o=a.details;a.details=t.details,this.log("subtitle track "+n+" loaded ["+r.startSN+"-"+r.endSN+"]"),n===this.trackId&&(this.retryCount=0,this.playlistLoaded(n,t,o))}else this.warn("Invalid subtitle track id "+n)},f.onLevelLoading=function(e,t){this.switchLevel(t.level)},f.onLevelSwitching=function(e,t){this.switchLevel(t.level)},f.switchLevel=function(e){var t=this.hls.levels[e];if(null!=t&&t.textGroupIds){var n=t.textGroupIds[t.urlId];if(this.groupId!==n){var i=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,a=this.tracks.filter((function(e){return!n||e.groupId===n}));this.tracksInGroup=a;var o=this.findTrackId(null==i?void 0:i.name)||this.findTrackId();this.groupId=n;var s={subtitleTracks:a};this.log("Updating subtitle tracks, "+a.length+' track(s) found in "'+n+'" group-id'),this.hls.trigger(r.Events.SUBTITLE_TRACKS_UPDATED,s),-1!==o&&this.setSubtitleTrack(o,i)}}},f.findTrackId=function(e){for(var t=this.tracksInGroup,n=0;n<t.length;n++){var r=t[n];if((!this.selectDefaultTrack||r.default)&&(!e||e===r.name))return r.id}return-1},f.onError=function(t,n){e.prototype.onError.call(this,t,n),!n.fatal&&n.context&&n.context.type===o.PlaylistContextType.SUBTITLE_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},f.loadPlaylist=function(e){var t=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(t)){var n=t.id,i=t.groupId,a=t.url;if(e)try{a=e.addDirectives(a)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("Loading subtitle playlist for id "+n),this.hls.trigger(r.Events.SUBTITLE_TRACK_LOADING,{url:a,id:n,groupId:i,deliveryDirectives:e||null})}},f.toggleTrackModes=function(e){var t=this,n=this.media,r=this.subtitleDisplay,i=this.trackId;if(n){var a=u(n.textTracks),o=a.filter((function(e){return e.groupId===t.groupId}));if(-1===e)[].slice.call(a).forEach((function(e){e.mode="disabled"}));else{var s=o[i];s&&(s.mode="disabled")}var l=o[e];l&&(l.mode=r?"showing":"hidden")}},f.setSubtitleTrack=function(e,t){var n,i=this.tracksInGroup;if(this.media){if(this.trackId!==e&&this.toggleTrackModes(e),!(this.trackId===e&&(-1===e||null!==(n=i[e])&&void 0!==n&&n.details)||e<-1||e>=i.length)){this.clearTimer();var a=i[e];if(this.log("Switching to subtitle track "+e),this.trackId=e,a){var o=a.id,s=a.groupId,l=void 0===s?"":s,c=a.name,u=a.type,d=a.url;this.hls.trigger(r.Events.SUBTITLE_TRACK_SWITCH,{id:o,groupId:l,name:c,type:u,url:d});var h=this.switchParams(a.url,null==t?void 0:t.details);this.loadPlaylist(h)}else this.hls.trigger(r.Events.SUBTITLE_TRACK_SWITCH,{id:e})}}else this.queuedDefaultTrack=e},f.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),this.media&&this.hls.config.renderTextTracksNatively){for(var e=-1,t=u(this.media.textTracks),n=0;n<t.length;n++)if("hidden"===t[n].mode)e=n;else if("showing"===t[n].mode){e=n;break}this.subtitleTrack!==e&&(this.subtitleTrack=e)}},c=a,(d=[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(e){this.selectDefaultTrack=!1;var t=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(e,t)}}])&&s(c.prototype,d),h&&s(c,h),a}(a.default);function u(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];"subtitles"===r.kind&&r.label&&t.push(e[n])}return t}t.default=c},"./src/controller/timeline-controller.ts":
|
|
|
/*!***********************************************!*\
|
|
|
!*** ./src/controller/timeline-controller.ts ***!
|
|
|
\***********************************************/
|
|
|
/*! exports provided: TimelineController */function(e,t,n){"use strict";n.r(t),n.d(t,"TimelineController",(function(){return h}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../utils/cea-608-parser */"./src/utils/cea-608-parser.ts"),o=n(/*! ../utils/output-filter */"./src/utils/output-filter.ts"),s=n(/*! ../utils/webvtt-parser */"./src/utils/webvtt-parser.ts"),l=n(/*! ../utils/texttrack-utils */"./src/utils/texttrack-utils.ts"),c=n(/*! ../utils/imsc1-ttml-parser */"./src/utils/imsc1-ttml-parser.ts"),u=n(/*! ../types/loader */"./src/types/loader.ts"),d=n(/*! ../utils/logger */"./src/utils/logger.ts"),h=function(){function e(e){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}},this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var t=new o.default(this,"textTrack1"),n=new o.default(this,"textTrack2"),r=new o.default(this,"textTrack3"),s=new o.default(this,"textTrack4");this.cea608Parser1=new a.default(1,t,n),this.cea608Parser2=new a.default(3,r,s)}e.on(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(i.Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(i.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(i.Events.FRAG_LOADING,this.onFragLoading,this),e.on(i.Events.FRAG_LOADED,this.onFragLoaded,this),e.on(i.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(i.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(i.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(i.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var t=e.prototype;return t.destroy=function(){var e=this.hls;e.off(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(i.Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(i.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(i.Events.FRAG_LOADING,this.onFragLoading,this),e.off(i.Events.FRAG_LOADED,this.onFragLoaded,this),e.off(i.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(i.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(i.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(i.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},t.addCues=function(e,t,n,r,a){for(var o,s,l,c,u=!1,d=a.length;d--;){var h=a[d],f=(o=h[0],s=h[1],l=t,c=n,Math.min(s,c)-Math.max(o,l));if(f>=0&&(h[0]=Math.min(h[0],t),h[1]=Math.max(h[1],n),u=!0,f/(n-t)>.5))return}if(u||a.push([t,n]),this.config.renderTextTracksNatively){var p=this.captionsTracks[e];this.Cues.newCue(p,t,n,r)}else{var m=this.Cues.newCue(null,t,n,r);this.hls.trigger(i.Events.CUES_PARSED,{type:"captions",cues:m,track:e})}},t.onInitPtsFound=function(e,t){var n=this,r=t.frag,a=t.id,o=t.initPTS,s=t.timescale,l=this.unparsedVttFrags;"main"===a&&(this.initPTS[r.cc]=o,this.timescale[r.cc]=s),l.length&&(this.unparsedVttFrags=[],l.forEach((function(e){n.onFragLoaded(i.Events.FRAG_LOADED,e)})))},t.getExistingTrack=function(e){var t=this.media;if(t)for(var n=0;n<t.textTracks.length;n++){var r=t.textTracks[n];if(r[e])return r}return null},t.createCaptionsTrack=function(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)},t.createNativeTrack=function(e){if(!this.captionsTracks[e]){var t=this.captionsProperties,n=this.captionsTracks,r=this.media,i=t[e],a=i.label,o=i.languageCode,s=this.getExistingTrack(e);if(s)n[e]=s,Object(l.clearCurrentCues)(n[e]),Object(l.sendAddTrackEvent)(n[e],r);else{var c=this.createTextTrack("captions",a,o);c&&(c[e]=!0,n[e]=c)}}},t.createNonNativeTrack=function(e){if(!this.nonNativeCaptionsTracks[e]){var t=this.captionsProperties[e];if(t){var n={_id:e,label:t.label,kind:"captions",default:!!t.media&&!!t.media.default,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=n,this.hls.trigger(i.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[n]})}}},t.createTextTrack=function(e,t,n){var r=this.media;if(r)return r.addTextTrack(e,t,n)},t.onMediaAttaching=function(e,t){this.media=t.media,this._cleanTracks()},t.onMediaDetaching=function(){var e=this.captionsTracks;Object.keys(e).forEach((function(t){Object(l.clearCurrentCues)(e[t]),delete e[t]})),this.nonNativeCaptionsTracks={}},t.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}},this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},t._cleanTracks=function(){var e=this.media;if(e){var t=e.textTracks;if(t)for(var n=0;n<t.length;n++)Object(l.clearCurrentCues)(t[n])}},t.onSubtitleTracksUpdated=function(e,t){var n=this;this.textTracks=[];var r=t.subtitleTracks||[],a=r.some((function(e){return e.textCodec===c.IMSC1_CODEC}));if(this.config.enableWebVTT||a&&this.config.enableIMSC1){var o=this.tracks&&r&&this.tracks.length===r.length;if(this.tracks=r||[],this.config.renderTextTracksNatively){var s=this.media?this.media.textTracks:[];this.tracks.forEach((function(e,t){var r;if(t<s.length){for(var i=null,a=0;a<s.length;a++)if(f(s[a],e)){i=s[a];break}i&&(r=i)}r?Object(l.clearCurrentCues)(r):(r=n.createTextTrack("subtitles",e.name,e.lang))&&(r.mode="disabled"),r&&(r.groupId=e.groupId,n.textTracks.push(r))}))}else if(!o&&this.tracks&&this.tracks.length){var u=this.tracks.map((function(e){return{label:e.name,kind:e.type.toLowerCase(),default:e.default,subtitleTrack:e}}));this.hls.trigger(i.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:u})}}},t.onManifestLoaded=function(e,t){var n=this;this.config.enableCEA708Captions&&t.captions&&t.captions.forEach((function(e){var t=/(?:CC|SERVICE)([1-4])/.exec(e.instreamId);if(t){var r="textTrack"+t[1],i=n.captionsProperties[r];i&&(i.label=e.name,e.lang&&(i.languageCode=e.lang),i.media=e)}}))},t.onFragLoading=function(e,t){var n=this.cea608Parser1,r=this.cea608Parser2,i=this.lastSn,a=this.lastPartIndex;if(this.enabled&&n&&r&&t.frag.type===u.PlaylistLevelType.MAIN){var o,s,l=t.frag.sn,c=null!=(o=null==t||null===(s=t.part)||void 0===s?void 0:s.index)?o:-1;l===i+1||l===i&&c===a+1||(n.reset(),r.reset()),this.lastSn=l,this.lastPartIndex=c}},t.onFragLoaded=function(e,t){var n=t.frag,a=t.payload,o=this.initPTS,s=this.unparsedVttFrags;if(n.type===u.PlaylistLevelType.SUBTITLE)if(a.byteLength){if(!Object(r.isFiniteNumber)(o[n.cc]))return s.push(t),void(o.length&&this.hls.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Missing initial subtitle PTS")}));var l=n.decryptdata;if(null==l||null==l.key||"AES-128"!==l.method){var d=this.tracks[n.level],h=this.vttCCs;h[n.cc]||(h[n.cc]={start:n.start,prevCC:this.prevCC,new:!0},this.prevCC=n.cc),d&&d.textCodec===c.IMSC1_CODEC?this._parseIMSC1(n,a):this._parseVTTs(n,a,h)}}else this.hls.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Empty subtitle payload")})},t._parseIMSC1=function(e,t){var n=this,r=this.hls;Object(c.parseIMSC1)(t,this.initPTS[e.cc],this.timescale[e.cc],(function(t){n._appendCues(t,e.level),r.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(function(t){d.logger.log("Failed to parse IMSC1: "+t),r.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:t})}))},t._parseVTTs=function(e,t,n){var r=this,a=this.hls;Object(s.parseWebVTT)(t,this.initPTS[e.cc],this.timescale[e.cc],n,e.cc,e.start,(function(t){r._appendCues(t,e.level),a.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(function(n){r._fallbackToIMSC1(e,t),d.logger.log("Failed to parse VTT cue: "+n),a.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:n})}))},t._fallbackToIMSC1=function(e,t){var n=this,r=this.tracks[e.level];r.textCodec||Object(c.parseIMSC1)(t,this.initPTS[e.cc],this.timescale[e.cc],(function(){r.textCodec=c.IMSC1_CODEC,n._parseIMSC1(e,t)}),(function(){r.textCodec="wvtt"}))},t._appendCues=function(e,t){var n=this.hls;if(this.config.renderTextTracksNatively){var r=this.textTracks[t];if("disabled"===r.mode)return;e.forEach((function(e){return Object(l.addCueToTrack)(r,e)}))}else{var a=this.tracks[t].default?"default":"subtitles"+t;n.trigger(i.Events.CUES_PARSED,{type:"subtitles",cues:e,track:a})}},t.onFragDecrypted=function(e,t){var n=t.frag;if(n.type===u.PlaylistLevelType.SUBTITLE){if(!Object(r.isFiniteNumber)(this.initPTS[n.cc]))return void this.unparsedVttFrags.push(t);this.onFragLoaded(i.Events.FRAG_LOADED,t)}},t.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},t.onFragParsingUserdata=function(e,t){var n=this.cea608Parser1,r=this.cea608Parser2;if(this.enabled&&n&&r)for(var i=0;i<t.samples.length;i++){var a=t.samples[i].bytes;if(a){var o=this.extractCea608Data(a);n.addData(t.samples[i].pts,o[0]),r.addData(t.samples[i].pts,o[1])}}},t.onBufferFlushing=function(e,t){var n=t.startOffset,r=t.endOffset,i=t.endOffsetSubtitles,a=t.type,o=this.media;if(o&&!(o.currentTime<r)){if(!a||"video"===a){var s=this.captionsTracks;Object.keys(s).forEach((function(e){return Object(l.removeCuesInRange)(s[e],n,r)}))}if(this.config.renderTextTracksNatively&&0===n&&void 0!==i){var c=this.textTracks;Object.keys(c).forEach((function(e){return Object(l.removeCuesInRange)(c[e],n,i)}))}}},t.extractCea608Data=function(e){for(var t=31&e[0],n=2,r=[[],[]],i=0;i<t;i++){var a=e[n++],o=127&e[n++],s=127&e[n++],l=3&a;0===o&&0===s||0!=(4&a)&&(0!==l&&1!==l||(r[l].push(o),r[l].push(s)))}return r},e}();function f(e,t){return e&&e.label===t.name&&!(e.textTrack1||e.textTrack2)}},"./src/crypt/aes-crypto.ts":
|
|
|
/*!*********************************!*\
|
|
|
!*** ./src/crypt/aes-crypto.ts ***!
|
|
|
\*********************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return r}));var r=function(){function e(e,t){this.subtle=void 0,this.aesIV=void 0,this.subtle=e,this.aesIV=t}return e.prototype.decrypt=function(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)},e}()},"./src/crypt/aes-decryptor.ts":
|
|
|
/*!************************************!*\
|
|
|
!*** ./src/crypt/aes-decryptor.ts ***!
|
|
|
\************************************/
|
|
|
/*! exports provided: removePadding, default */function(e,t,n){"use strict";n.r(t),n.d(t,"removePadding",(function(){return i})),n.d(t,"default",(function(){return a}));var r=n(/*! ../utils/typed-array */"./src/utils/typed-array.ts");function i(e){var t=e.byteLength,n=t&&new DataView(e.buffer).getUint8(t-1);return n?Object(r.sliceUint8)(e,0,t-n):e}var a=function(){function e(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var t=e.prototype;return t.uint8ArrayToUint32Array_=function(e){for(var t=new DataView(e),n=new Uint32Array(4),r=0;r<4;r++)n[r]=t.getUint32(4*r);return n},t.initTable=function(){var e=this.sBox,t=this.invSBox,n=this.subMix,r=n[0],i=n[1],a=n[2],o=n[3],s=this.invSubMix,l=s[0],c=s[1],u=s[2],d=s[3],h=new Uint32Array(256),f=0,p=0,m=0;for(m=0;m<256;m++)h[m]=m<128?m<<1:m<<1^283;for(m=0;m<256;m++){var g=p^p<<1^p<<2^p<<3^p<<4;g=g>>>8^255&g^99,e[f]=g,t[g]=f;var v=h[f],b=h[v],y=h[b],E=257*h[g]^16843008*g;r[f]=E<<24|E>>>8,i[f]=E<<16|E>>>16,a[f]=E<<8|E>>>24,o[f]=E,E=16843009*y^65537*b^257*v^16843008*f,l[g]=E<<24|E>>>8,c[g]=E<<16|E>>>16,u[g]=E<<8|E>>>24,d[g]=E,f?(f=v^h[h[h[y^v]]],p^=h[h[p]]):f=p=1}},t.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),n=!0,r=0;r<t.length&&n;)n=t[r]===this.key[r],r++;if(!n){this.key=t;var i=this.keySize=t.length;if(4!==i&&6!==i&&8!==i)throw new Error("Invalid aes key size="+i);var a,o,s,l,c=this.ksRows=4*(i+6+1),u=this.keySchedule=new Uint32Array(c),d=this.invKeySchedule=new Uint32Array(c),h=this.sBox,f=this.rcon,p=this.invSubMix,m=p[0],g=p[1],v=p[2],b=p[3];for(a=0;a<c;a++)a<i?s=u[a]=t[a]:(l=s,a%i==0?(l=h[(l=l<<8|l>>>24)>>>24]<<24|h[l>>>16&255]<<16|h[l>>>8&255]<<8|h[255&l],l^=f[a/i|0]<<24):i>6&&a%i==4&&(l=h[l>>>24]<<24|h[l>>>16&255]<<16|h[l>>>8&255]<<8|h[255&l]),u[a]=s=(u[a-i]^l)>>>0);for(o=0;o<c;o++)a=c-o,l=3&o?u[a]:u[a-4],d[o]=o<4||a<=4?l:m[h[l>>>24]]^g[h[l>>>16&255]]^v[h[l>>>8&255]]^b[h[255&l]],d[o]=d[o]>>>0}},t.networkToHostOrderSwap=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},t.decrypt=function(e,t,n){for(var r,i,a,o,s,l,c,u,d,h,f,p,m,g,v=this.keySize+6,b=this.invKeySchedule,y=this.invSBox,E=this.invSubMix,x=E[0],_=E[1],k=E[2],w=E[3],C=this.uint8ArrayToUint32Array_(n),S=C[0],O=C[1],A=C[2],T=C[3],I=new Int32Array(e),D=new Int32Array(I.length),L=this.networkToHostOrderSwap;t<I.length;){for(d=L(I[t]),h=L(I[t+1]),f=L(I[t+2]),p=L(I[t+3]),s=d^b[0],l=p^b[1],c=f^b[2],u=h^b[3],m=4,g=1;g<v;g++)r=x[s>>>24]^_[l>>16&255]^k[c>>8&255]^w[255&u]^b[m],i=x[l>>>24]^_[c>>16&255]^k[u>>8&255]^w[255&s]^b[m+1],a=x[c>>>24]^_[u>>16&255]^k[s>>8&255]^w[255&l]^b[m+2],o=x[u>>>24]^_[s>>16&255]^k[l>>8&255]^w[255&c]^b[m+3],s=r,l=i,c=a,u=o,m+=4;r=y[s>>>24]<<24^y[l>>16&255]<<16^y[c>>8&255]<<8^y[255&u]^b[m],i=y[l>>>24]<<24^y[c>>16&255]<<16^y[u>>8&255]<<8^y[255&s]^b[m+1],a=y[c>>>24]<<24^y[u>>16&255]<<16^y[s>>8&255]<<8^y[255&l]^b[m+2],o=y[u>>>24]<<24^y[s>>16&255]<<16^y[l>>8&255]<<8^y[255&c]^b[m+3],D[t]=L(r^S),D[t+1]=L(o^O),D[t+2]=L(a^A),D[t+3]=L(i^T),S=d,O=h,A=f,T=p,t+=4}return D.buffer},e}()},"./src/crypt/decrypter.ts":
|
|
|
/*!********************************!*\
|
|
|
!*** ./src/crypt/decrypter.ts ***!
|
|
|
\********************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return c}));var r=n(/*! ./aes-crypto */"./src/crypt/aes-crypto.ts"),i=n(/*! ./fast-aes-key */"./src/crypt/fast-aes-key.ts"),a=n(/*! ./aes-decryptor */"./src/crypt/aes-decryptor.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),l=n(/*! ../utils/typed-array */"./src/utils/typed-array.ts"),c=function(){function e(e,t,n){var r=(void 0===n?{}:n).removePKCS7Padding,i=void 0===r||r;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=e,this.config=t,this.removePKCS7Padding=i,i)try{var a=self.crypto;a&&(this.subtle=a.subtle||a.webkitSubtle)}catch(e){}null===this.subtle&&(this.config.enableSoftwareAES=!0)}var t=e.prototype;return t.destroy=function(){this.observer=null},t.isSync=function(){return this.config.enableSoftwareAES},t.flush=function(){var e=this.currentResult;if(e){var t=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?Object(a.removePadding)(t):t}this.reset()},t.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},t.decrypt=function(e,t,n,r){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(e),t,n);var i=this.flush();i&&r(i.buffer)}else this.webCryptoDecrypt(new Uint8Array(e),t,n).then(r)},t.softwareDecrypt=function(e,t,n){var r=this.currentIV,i=this.currentResult,o=this.remainderData;this.logOnce("JS AES decrypt"),o&&(e=Object(s.appendUint8Array)(o,e),this.remainderData=null);var c=this.getValidChunk(e);if(!c.length)return null;r&&(n=r);var u=this.softwareDecrypter;u||(u=this.softwareDecrypter=new a.default),u.expandKey(t);var d=i;return this.currentResult=u.decrypt(c.buffer,0,n),this.currentIV=Object(l.sliceUint8)(c,-16).buffer,d||null},t.webCryptoDecrypt=function(e,t,n){var a=this,o=this.subtle;return this.key===t&&this.fastAesKey||(this.key=t,this.fastAesKey=new i.default(o,t)),this.fastAesKey.expandKey().then((function(t){return o?new r.default(o,n).decrypt(e.buffer,t):Promise.reject(new Error("web crypto not initialized"))})).catch((function(r){return a.onWebCryptoError(r,e,t,n)}))},t.onWebCryptoError=function(e,t,n,r){return o.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",e),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(t,n,r)},t.getValidChunk=function(e){var t=e,n=e.length-e.length%16;return n!==e.length&&(t=Object(l.sliceUint8)(e,0,n),this.remainderData=Object(l.sliceUint8)(e,n)),t},t.logOnce=function(e){this.logEnabled&&(o.logger.log("[decrypter.ts]: "+e),this.logEnabled=!1)},e}()},"./src/crypt/fast-aes-key.ts":
|
|
|
/*!***********************************!*\
|
|
|
!*** ./src/crypt/fast-aes-key.ts ***!
|
|
|
\***********************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return r}));var r=function(){function e(e,t){this.subtle=void 0,this.key=void 0,this.subtle=e,this.key=t}return e.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},e}()},"./src/demux/aacdemuxer.ts":
|
|
|
/*!*********************************!*\
|
|
|
!*** ./src/demux/aacdemuxer.ts ***!
|
|
|
\*********************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./base-audio-demuxer */"./src/demux/base-audio-demuxer.ts"),i=n(/*! ./adts */"./src/demux/adts.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=n(/*! ../demux/id3 */"./src/demux/id3.ts");function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this).observer=void 0,r.config=void 0,r.observer=t,r.config=n,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var l=r.prototype;return l.resetInitSegment=function(t,n,r){e.prototype.resetInitSegment.call(this,t,n,r),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}},r.probe=function(e){if(!e)return!1;for(var t=(o.getID3Data(e,0)||[]).length,n=e.length;t<n;t++)if(i.probe(e,t))return a.logger.log("ADTS sync word found !"),!0;return!1},l.canParse=function(e,t){return i.canParse(e,t)},l.appendFrame=function(e,t,n){i.initTrackConfig(e,this.observer,t,n,e.manifestCodec);var r=i.appendFrame(e,t,n,this.initPTS,this.frameIndex);if(r&&0===r.missing)return r},r}(r.default);l.minProbeByteLength=9,t.default=l},"./src/demux/adts.ts":
|
|
|
/*!***************************!*\
|
|
|
!*** ./src/demux/adts.ts ***!
|
|
|
\***************************/
|
|
|
/*! exports provided: getAudioConfig, isHeaderPattern, getHeaderLength, getFullFrameLength, canGetFrameLength, isHeader, canParse, probe, initTrackConfig, getFrameDuration, parseFrameHeader, appendFrame */function(e,t,n){"use strict";n.r(t),n.d(t,"getAudioConfig",(function(){return o})),n.d(t,"isHeaderPattern",(function(){return s})),n.d(t,"getHeaderLength",(function(){return l})),n.d(t,"getFullFrameLength",(function(){return c})),n.d(t,"canGetFrameLength",(function(){return u})),n.d(t,"isHeader",(function(){return d})),n.d(t,"canParse",(function(){return h})),n.d(t,"probe",(function(){return f})),n.d(t,"initTrackConfig",(function(){return p})),n.d(t,"getFrameDuration",(function(){return m})),n.d(t,"parseFrameHeader",(function(){return g})),n.d(t,"appendFrame",(function(){return v}));var r=n(/*! ../utils/logger */"./src/utils/logger.ts"),i=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ../events */"./src/events.ts");function o(e,t,n,o){var s,l,c,u,d=navigator.userAgent.toLowerCase(),h=o,f=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];s=1+((192&t[n+2])>>>6);var p=(60&t[n+2])>>>2;if(!(p>f.length-1))return c=(1&t[n+2])<<2,c|=(192&t[n+3])>>>6,r.logger.log("manifest codec:"+o+", ADTS type:"+s+", samplingIndex:"+p),/firefox/i.test(d)?p>=6?(s=5,u=new Array(4),l=p-3):(s=2,u=new Array(2),l=p):-1!==d.indexOf("android")?(s=2,u=new Array(2),l=p):(s=5,u=new Array(4),o&&(-1!==o.indexOf("mp4a.40.29")||-1!==o.indexOf("mp4a.40.5"))||!o&&p>=6?l=p-3:((o&&-1!==o.indexOf("mp4a.40.2")&&(p>=6&&1===c||/vivaldi/i.test(d))||!o&&1===c)&&(s=2,u=new Array(2)),l=p)),u[0]=s<<3,u[0]|=(14&p)>>1,u[1]|=(1&p)<<7,u[1]|=c<<3,5===s&&(u[1]|=(14&l)>>1,u[2]=(1&l)<<7,u[2]|=8,u[3]=0),{config:u,samplerate:f[p],channelCount:c,codec:"mp4a.40."+s,manifestCodec:h};e.trigger(a.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+p})}function s(e,t){return 255===e[t]&&240==(246&e[t+1])}function l(e,t){return 1&e[t+1]?7:9}function c(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function u(e,t){return t+5<e.length}function d(e,t){return t+1<e.length&&s(e,t)}function h(e,t){return u(e,t)&&s(e,t)&&c(e,t)<=e.length-t}function f(e,t){if(d(e,t)){var n=l(e,t);if(t+n>=e.length)return!1;var r=c(e,t);if(r<=n)return!1;var i=t+r;return i===e.length||d(e,i)}return!1}function p(e,t,n,i,a){if(!e.samplerate){var s=o(t,n,i,a);if(!s)return;e.config=s.config,e.samplerate=s.samplerate,e.channelCount=s.channelCount,e.codec=s.codec,e.manifestCodec=s.manifestCodec,r.logger.log("parsed codec:"+e.codec+", rate:"+s.samplerate+", channels:"+s.channelCount)}}function m(e){return 9216e4/e}function g(e,t,n,r,i){var a=l(e,t),o=c(e,t);if((o-=a)>0)return{headerLength:a,frameLength:o,stamp:n+r*i}}function v(e,t,n,r,i){var a=g(t,n,r,i,m(e.samplerate));if(a){var o,s=a.frameLength,l=a.headerLength,c=a.stamp,u=l+s,d=Math.max(0,n+u-t.length);d?(o=new Uint8Array(u-l)).set(t.subarray(n+l,t.length),0):o=t.subarray(n+l,n+u);var h={unit:o,pts:c};return d||e.samples.push(h),{sample:h,length:u,missing:d}}}},"./src/demux/base-audio-demuxer.ts":
|
|
|
/*!*****************************************!*\
|
|
|
!*** ./src/demux/base-audio-demuxer.ts ***!
|
|
|
\*****************************************/
|
|
|
/*! exports provided: initPTSFn, default */function(e,t,n){"use strict";n.r(t),n.d(t,"initPTSFn",(function(){return c}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../demux/id3 */"./src/demux/id3.ts"),a=n(/*! ./dummy-demuxed-track */"./src/demux/dummy-demuxed-track.ts"),o=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),s=n(/*! ../utils/typed-array */"./src/utils/typed-array.ts"),l=function(){function e(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var t=e.prototype;return t.resetInitSegment=function(e,t,n){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},t.resetTimeStamp=function(){},t.resetContiguity=function(){},t.canParse=function(e,t){return!1},t.appendFrame=function(e,t,n){},t.demux=function(e,t){this.cachedData&&(e=Object(o.appendUint8Array)(this.cachedData,e),this.cachedData=null);var n,r,l=i.getID3Data(e,0),u=l?l.length:0,d=this._audioTrack,h=this._id3Track,f=l?i.getTimeStamp(l):void 0,p=e.length;for(0!==this.frameIndex&&null!==this.initPTS||(this.initPTS=c(f,t)),l&&l.length>0&&h.samples.push({pts:this.initPTS,dts:this.initPTS,data:l}),r=this.initPTS;u<p;){if(this.canParse(e,u)){var m=this.appendFrame(d,e,u);m?(this.frameIndex++,r=m.sample.pts,n=u+=m.length):u=p}else i.canParse(e,u)?(l=i.getID3Data(e,u),h.samples.push({pts:r,dts:r,data:l}),n=u+=l.length):u++;if(u===p&&n!==p){var g=Object(s.sliceUint8)(e,n);this.cachedData?this.cachedData=Object(o.appendUint8Array)(this.cachedData,g):this.cachedData=g}}return{audioTrack:d,avcTrack:Object(a.dummyTrack)(),id3Track:h,textTrack:Object(a.dummyTrack)()}},t.demuxSampleAes=function(e,t,n){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},t.flush=function(e){var t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(a.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(a.dummyTrack)()}},t.destroy=function(){},e}(),c=function(e,t){return Object(r.isFiniteNumber)(e)?90*e:9e4*t};t.default=l},"./src/demux/chunk-cache.ts":
|
|
|
/*!**********************************!*\
|
|
|
!*** ./src/demux/chunk-cache.ts ***!
|
|
|
\**********************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return r}));var r=function(){function e(){this.chunks=[],this.dataLength=0}var t=e.prototype;return t.push=function(e){this.chunks.push(e),this.dataLength+=e.length},t.flush=function(){var e,t=this.chunks,n=this.dataLength;return t.length?(e=1===t.length?t[0]:function(e,t){for(var n=new Uint8Array(t),r=0,i=0;i<e.length;i++){var a=e[i];n.set(a,r),r+=a.length}return n}(t,n),this.reset(),e):new Uint8Array(0)},t.reset=function(){this.chunks.length=0,this.dataLength=0},e}()},"./src/demux/dummy-demuxed-track.ts":
|
|
|
/*!******************************************!*\
|
|
|
!*** ./src/demux/dummy-demuxed-track.ts ***!
|
|
|
\******************************************/
|
|
|
/*! exports provided: dummyTrack */function(e,t,n){"use strict";function r(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}n.r(t),n.d(t,"dummyTrack",(function(){return r}))},"./src/demux/exp-golomb.ts":
|
|
|
/*!*********************************!*\
|
|
|
!*** ./src/demux/exp-golomb.ts ***!
|
|
|
\*********************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../utils/logger */"./src/utils/logger.ts"),i=function(){function e(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}var t=e.prototype;return t.loadWord=function(){var e=this.data,t=this.bytesAvailable,n=e.byteLength-t,r=new Uint8Array(4),i=Math.min(4,t);if(0===i)throw new Error("no bytes available");r.set(e.subarray(n,n+i)),this.word=new DataView(r.buffer).getUint32(0),this.bitsAvailable=8*i,this.bytesAvailable-=i},t.skipBits=function(e){var t;this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},t.readBits=function(e){var t=Math.min(this.bitsAvailable,e),n=this.word>>>32-t;return e>32&&r.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0?this.word<<=t:this.bytesAvailable>0&&this.loadWord(),(t=e-t)>0&&this.bitsAvailable?n<<t|this.readBits(t):n},t.skipLZ=function(){var e;for(e=0;e<this.bitsAvailable;++e)if(0!=(this.word&2147483648>>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},t.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.skipEG=function(){this.skipBits(1+this.skipLZ())},t.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},t.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},t.readBoolean=function(){return 1===this.readBits(1)},t.readUByte=function(){return this.readBits(8)},t.readUShort=function(){return this.readBits(16)},t.readUInt=function(){return this.readBits(32)},t.skipScalingList=function(e){for(var t=8,n=8,r=0;r<e;r++)0!==n&&(n=(t+this.readEG()+256)%256),t=0===n?t:n},t.readSPS=function(){var e,t,n,r=0,i=0,a=0,o=0,s=this.readUByte.bind(this),l=this.readBits.bind(this),c=this.readUEG.bind(this),u=this.readBoolean.bind(this),d=this.skipBits.bind(this),h=this.skipEG.bind(this),f=this.skipUEG.bind(this),p=this.skipScalingList.bind(this);s();var m=s();if(l(5),d(3),s(),f(),100===m||110===m||122===m||244===m||44===m||83===m||86===m||118===m||128===m){var g=c();if(3===g&&d(1),f(),f(),d(1),u())for(t=3!==g?8:12,n=0;n<t;n++)u()&&p(n<6?16:64)}f();var v=c();if(0===v)c();else if(1===v)for(d(1),h(),h(),e=c(),n=0;n<e;n++)h();f(),d(1);var b=c(),y=c(),E=l(1);0===E&&d(1),d(1),u()&&(r=c(),i=c(),a=c(),o=c());var x=[1,1];if(u()&&u())switch(s()){case 1:x=[1,1];break;case 2:x=[12,11];break;case 3:x=[10,11];break;case 4:x=[16,11];break;case 5:x=[40,33];break;case 6:x=[24,11];break;case 7:x=[20,11];break;case 8:x=[32,11];break;case 9:x=[80,33];break;case 10:x=[18,11];break;case 11:x=[15,11];break;case 12:x=[64,33];break;case 13:x=[160,99];break;case 14:x=[4,3];break;case 15:x=[3,2];break;case 16:x=[2,1];break;case 255:x=[s()<<8|s(),s()<<8|s()]}return{width:Math.ceil(16*(b+1)-2*r-2*i),height:(2-E)*(y+1)*16-(E?2:4)*(a+o),pixelRatio:x}},t.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},e}();t.default=i},"./src/demux/id3.ts":
|
|
|
/*!**************************!*\
|
|
|
!*** ./src/demux/id3.ts ***!
|
|
|
\**************************/
|
|
|
/*! exports provided: isHeader, isFooter, getID3Data, canParse, getTimeStamp, isTimeStampFrame, getID3Frames, decodeFrame, utf8ArrayToStr, testables */function(e,t,n){"use strict";n.r(t),n.d(t,"isHeader",(function(){return i})),n.d(t,"isFooter",(function(){return a})),n.d(t,"getID3Data",(function(){return o})),n.d(t,"canParse",(function(){return l})),n.d(t,"getTimeStamp",(function(){return c})),n.d(t,"isTimeStampFrame",(function(){return u})),n.d(t,"getID3Frames",(function(){return h})),n.d(t,"decodeFrame",(function(){return f})),n.d(t,"utf8ArrayToStr",(function(){return b})),n.d(t,"testables",(function(){return y}));var r,i=function(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},a=function(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},o=function(e,t){for(var n=t,r=0;i(e,t);)r+=10,r+=s(e,t+6),a(e,t+10)&&(r+=10),t+=r;if(r>0)return e.subarray(n,n+r)},s=function(e,t){var n=0;return n=(127&e[t])<<21,n|=(127&e[t+1])<<14,n|=(127&e[t+2])<<7,n|=127&e[t+3]},l=function(e,t){return i(e,t)&&s(e,t+6)+10<=e.length-t},c=function(e){for(var t=h(e),n=0;n<t.length;n++){var r=t[n];if(u(r))return v(r)}},u=function(e){return e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info},d=function(e){var t=String.fromCharCode(e[0],e[1],e[2],e[3]),n=s(e,4);return{type:t,size:n,data:e.subarray(10,10+n)}},h=function(e){for(var t=0,n=[];i(e,t);){for(var r=s(e,t+6),o=(t+=10)+r;t+8<o;){var l=d(e.subarray(t)),c=f(l);c&&n.push(c),t+=l.size+10}a(e,t)&&(t+=10)}return n},f=function(e){return"PRIV"===e.type?p(e):"W"===e.type[0]?g(e):m(e)},p=function(e){if(!(e.size<2)){var t=b(e.data,!0),n=new Uint8Array(e.data.subarray(t.length+1));return{key:e.type,info:t,data:n.buffer}}},m=function(e){if(!(e.size<2)){if("TXXX"===e.type){var t=1,n=b(e.data.subarray(t),!0);t+=n.length+1;var r=b(e.data.subarray(t));return{key:e.type,info:n,data:r}}var i=b(e.data.subarray(1));return{key:e.type,data:i}}},g=function(e){if("WXXX"===e.type){if(e.size<2)return;var t=1,n=b(e.data.subarray(t),!0);t+=n.length+1;var r=b(e.data.subarray(t));return{key:e.type,info:n,data:r}}var i=b(e.data);return{key:e.type,data:i}},v=function(e){if(8===e.data.byteLength){var t=new Uint8Array(e.data),n=1&t[3],r=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return r/=45,n&&(r+=47721858.84),Math.round(r)}},b=function(e,t){void 0===t&&(t=!1);var n=E();if(n){var r=n.decode(e);if(t){var i=r.indexOf("\0");return-1!==i?r.substring(0,i):r}return r.replace(/\0/g,"")}for(var a,o,s,l=e.length,c="",u=0;u<l;){if(0===(a=e[u++])&&t)return c;if(0!==a&&3!==a)switch(a>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:c+=String.fromCharCode(a);break;case 12:case 13:o=e[u++],c+=String.fromCharCode((31&a)<<6|63&o);break;case 14:o=e[u++],s=e[u++],c+=String.fromCharCode((15&a)<<12|(63&o)<<6|(63&s)<<0)}}return c},y={decodeTextFrame:m};function E(){return r||void 0===self.TextDecoder||(r=new self.TextDecoder("utf-8")),r}},"./src/demux/mp3demuxer.ts":
|
|
|
/*!*********************************!*\
|
|
|
!*** ./src/demux/mp3demuxer.ts ***!
|
|
|
\*********************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./base-audio-demuxer */"./src/demux/base-audio-demuxer.ts"),i=n(/*! ../demux/id3 */"./src/demux/id3.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=n(/*! ./mpegaudio */"./src/demux/mpegaudio.ts");function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var l=r.prototype;return l.resetInitSegment=function(t,n,r){e.prototype.resetInitSegment.call(this,t,n,r),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}},r.probe=function(e){if(!e)return!1;for(var t=(i.getID3Data(e,0)||[]).length,n=e.length;t<n;t++)if(o.probe(e,t))return a.logger.log("MPEG Audio sync word found !"),!0;return!1},l.canParse=function(e,t){return o.canParse(e,t)},l.appendFrame=function(e,t,n){if(null!==this.initPTS)return o.appendFrame(e,t,n,this.initPTS,this.frameIndex)},r}(r.default);l.minProbeByteLength=4,t.default=l},"./src/demux/mp4demuxer.ts":
|
|
|
/*!*********************************!*\
|
|
|
!*** ./src/demux/mp4demuxer.ts ***!
|
|
|
\*********************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),i=n(/*! ./dummy-demuxed-track */"./src/demux/dummy-demuxed-track.ts"),a=function(){function e(e,t){this.remainderData=null,this.config=void 0,this.config=t}var t=e.prototype;return t.resetTimeStamp=function(){},t.resetInitSegment=function(){},t.resetContiguity=function(){},e.probe=function(e){return Object(r.findBox)({data:e,start:0,end:Math.min(e.length,16384)},["moof"]).length>0},t.demux=function(e){var t=e,n=Object(i.dummyTrack)();if(this.config.progressive){this.remainderData&&(t=Object(r.appendUint8Array)(this.remainderData,e));var a=Object(r.segmentValidRange)(t);this.remainderData=a.remainder,n.samples=a.valid||new Uint8Array}else n.samples=t;return{audioTrack:Object(i.dummyTrack)(),avcTrack:n,id3Track:Object(i.dummyTrack)(),textTrack:Object(i.dummyTrack)()}},t.flush=function(){var e=Object(i.dummyTrack)();return e.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(i.dummyTrack)(),avcTrack:e,id3Track:Object(i.dummyTrack)(),textTrack:Object(i.dummyTrack)()}},t.demuxSampleAes=function(e,t,n){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},t.destroy=function(){},e}();a.minProbeByteLength=1024,t.default=a},"./src/demux/mpegaudio.ts":
|
|
|
/*!********************************!*\
|
|
|
!*** ./src/demux/mpegaudio.ts ***!
|
|
|
\********************************/
|
|
|
/*! exports provided: appendFrame, parseHeader, isHeaderPattern, isHeader, canParse, probe */function(e,t,n){"use strict";n.r(t),n.d(t,"appendFrame",(function(){return l})),n.d(t,"parseHeader",(function(){return c})),n.d(t,"isHeaderPattern",(function(){return u})),n.d(t,"isHeader",(function(){return d})),n.d(t,"canParse",(function(){return h})),n.d(t,"probe",(function(){return f}));var r=null,i=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],a=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],o=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],s=[0,1,1,4];function l(e,t,n,r,i){if(!(n+24>t.length)){var a=c(t,n);if(a&&n+a.frameLength<=t.length){var o=r+i*(9e4*a.samplesPerFrame/a.sampleRate),s={unit:t.subarray(n,n+a.frameLength),pts:o,dts:o};return e.config=[],e.channelCount=a.channelCount,e.samplerate=a.sampleRate,e.samples.push(s),{sample:s,length:a.frameLength,missing:0}}}}function c(e,t){var n=e[t+1]>>3&3,l=e[t+1]>>1&3,c=e[t+2]>>4&15,u=e[t+2]>>2&3;if(1!==n&&0!==c&&15!==c&&3!==u){var d=e[t+2]>>1&1,h=e[t+3]>>6,f=1e3*i[14*(3===n?3-l:3===l?3:4)+c-1],p=a[3*(3===n?0:2===n?1:2)+u],m=3===h?1:2,g=o[n][l],v=s[l],b=8*g*v,y=Math.floor(g*f/p+d)*v;if(null===r){var E=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);r=E?parseInt(E[1]):0}return!!r&&r<=87&&2===l&&f>=224e3&&0===h&&(e[t+3]=128|e[t+3]),{sampleRate:p,channelCount:m,frameLength:y,samplesPerFrame:b}}}function u(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}function d(e,t){return t+1<e.length&&u(e,t)}function h(e,t){return u(e,t)&&4<=e.length-t}function f(e,t){if(t+1<e.length&&u(e,t)){var n=c(e,t),r=4;null!=n&&n.frameLength&&(r=n.frameLength);var i=t+r;return i===e.length||d(e,i)}return!1}},"./src/demux/sample-aes.ts":
|
|
|
/*!*********************************!*\
|
|
|
!*** ./src/demux/sample-aes.ts ***!
|
|
|
\*********************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),i=n(/*! ./tsdemuxer */"./src/demux/tsdemuxer.ts"),a=function(){function e(e,t,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new r.default(e,t,{removePKCS7Padding:!1})}var t=e.prototype;return t.decryptBuffer=function(e,t){this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,t)},t.decryptAacSample=function(e,t,n,r){var i=e[t].unit,a=i.subarray(16,i.length-i.length%16),o=a.buffer.slice(a.byteOffset,a.byteOffset+a.length),s=this;this.decryptBuffer(o,(function(a){var o=new Uint8Array(a);i.set(o,16),r||s.decryptAacSamples(e,t+1,n)}))},t.decryptAacSamples=function(e,t,n){for(;;t++){if(t>=e.length)return void n();if(!(e[t].unit.length<32)){var r=this.decrypter.isSync();if(this.decryptAacSample(e,t,n,r),!r)return}}},t.getAvcEncryptedData=function(e){for(var t=16*Math.floor((e.length-48)/160)+16,n=new Int8Array(t),r=0,i=32;i<=e.length-16;i+=160,r+=16)n.set(e.subarray(i,i+16),r);return n},t.getAvcDecryptedUnit=function(e,t){for(var n=new Uint8Array(t),r=0,i=32;i<=e.length-16;i+=160,r+=16)e.set(n.subarray(r,r+16),i);return e},t.decryptAvcSample=function(e,t,n,r,a,o){var s=Object(i.discardEPB)(a.data),l=this.getAvcEncryptedData(s),c=this;this.decryptBuffer(l.buffer,(function(i){a.data=c.getAvcDecryptedUnit(s,i),o||c.decryptAvcSamples(e,t,n+1,r)}))},t.decryptAvcSamples=function(e,t,n,r){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,n=0){if(t>=e.length)return void r();for(var i=e[t].units;!(n>=i.length);n++){var a=i[n];if(!(a.data.length<=48||1!==a.type&&5!==a.type)){var o=this.decrypter.isSync();if(this.decryptAvcSample(e,t,n,r,a,o),!o)return}}}},e}();t.default=a},"./src/demux/transmuxer-interface.ts":
|
|
|
/*!*******************************************!*\
|
|
|
!*** ./src/demux/transmuxer-interface.ts ***!
|
|
|
\*******************************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return d}));var r=n(/*! webworkify-webpack */"./node_modules/webworkify-webpack/index.js"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ../errors */"./src/errors.ts"),l=n(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=n(/*! eventemitter3 */"./node_modules/eventemitter3/index.js"),u=Object(l.getMediaSource)()||{isTypeSupported:function(){return!1}},d=function(){function e(e,t,n,l){var d=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=e,this.id=t,this.onTransmuxComplete=n,this.onFlush=l;var h=e.config,f=function(t,n){(n=n||{}).frag=d.frag,n.id=d.id,e.trigger(t,n)};this.observer=new c.EventEmitter,this.observer.on(i.Events.FRAG_DECRYPTED,f),this.observer.on(i.Events.ERROR,f);var p={mp4:u.isTypeSupported("video/mp4"),mpeg:u.isTypeSupported("audio/mpeg"),mp3:u.isTypeSupported('audio/mp4; codecs="mp3"')},m=navigator.vendor;if(h.enableWorker&&"undefined"!=typeof Worker){var g;o.logger.log("demuxing in webworker");try{g=this.worker=r(/*! ../demux/transmuxer-worker.ts */"./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),g.addEventListener("message",this.onwmsg),g.onerror=function(t){e.trigger(i.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(t.message+" ("+t.filename+":"+t.lineno+")")})},g.postMessage({cmd:"init",typeSupported:p,vendor:m,id:t,config:JSON.stringify(h)})}catch(e){o.logger.warn("Error in worker:",e),o.logger.error("Error while initializing DemuxerWorker, fallback to inline"),g&&self.URL.revokeObjectURL(g.objectURL),this.transmuxer=new a.default(this.observer,p,h,m,t),this.worker=null}}else this.transmuxer=new a.default(this.observer,p,h,m,t)}var t=e.prototype;return t.destroy=function(){var e=this.worker;if(e)e.removeEventListener("message",this.onwmsg),e.terminate(),this.worker=null;else{var t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}var n=this.observer;n&&n.removeAllListeners(),this.observer=null},t.push=function(e,t,n,r,i,s,l,c,u,d){var h=this;u.transmuxing.start=self.performance.now();var f=this.transmuxer,p=this.worker,m=s?s.start:i.start,g=i.decryptdata,v=this.frag,b=!(v&&i.cc===v.cc),y=!(v&&u.level===v.level),E=v?u.sn-v.sn:-1,x=this.part?u.part-this.part.index:1,_=!y&&(1===E||0===E&&1===x),k=self.performance.now();(y||E||0===i.stats.parsing.start)&&(i.stats.parsing.start=k),!s||!x&&_||(s.stats.parsing.start=k);var w=new a.TransmuxState(b,_,c,y,m);if(!_||b){o.logger.log("[transmuxer-interface, "+i.type+"]: Starting new transmux session for sn: "+u.sn+" p: "+u.part+" level: "+u.level+" id: "+u.id+"\n discontinuity: "+b+"\n trackSwitch: "+y+"\n contiguous: "+_+"\n accurateTimeOffset: "+c+"\n timeOffset: "+m);var C=new a.TransmuxConfig(n,r,t,l,d);this.configureTransmuxer(C)}if(this.frag=i,this.part=s,p)p.postMessage({cmd:"demux",data:e,decryptdata:g,chunkMeta:u,state:w},e instanceof ArrayBuffer?[e]:[]);else if(f){var S=f.push(e,g,u,w);Object(a.isPromise)(S)?S.then((function(e){h.handleTransmuxComplete(e)})):this.handleTransmuxComplete(S)}},t.flush=function(e){var t=this;e.transmuxing.start=self.performance.now();var n=this.transmuxer,r=this.worker;if(r)r.postMessage({cmd:"flush",chunkMeta:e});else if(n){var i=n.flush(e);Object(a.isPromise)(i)?i.then((function(n){t.handleFlushResult(n,e)})):this.handleFlushResult(i,e)}},t.handleFlushResult=function(e,t){var n=this;e.forEach((function(e){n.handleTransmuxComplete(e)})),this.onFlush(t)},t.onWorkerMessage=function(e){var t=e.data,n=this.hls;switch(t.event){case"init":self.URL.revokeObjectURL(this.worker.objectURL);break;case"transmuxComplete":this.handleTransmuxComplete(t.data);break;case"flush":this.onFlush(t.data);break;default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,n.trigger(t.event,t.data)}},t.configureTransmuxer=function(e){var t=this.worker,n=this.transmuxer;t?t.postMessage({cmd:"configure",config:e}):n&&n.configure(e)},t.handleTransmuxComplete=function(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)},e}()},"./src/demux/transmuxer-worker.ts":
|
|
|
/*!****************************************!*\
|
|
|
!*** ./src/demux/transmuxer-worker.ts ***!
|
|
|
\****************************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return s}));var r=n(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=n(/*! eventemitter3 */"./node_modules/eventemitter3/index.js");function s(e){var t=new o.EventEmitter,n=function(t,n){e.postMessage({event:t,data:n})};t.on(i.Events.FRAG_DECRYPTED,n),t.on(i.Events.ERROR,n),e.addEventListener("message",(function(i){var o=i.data;switch(o.cmd){case"init":var s=JSON.parse(o.config);e.transmuxer=new r.default(t,o.typeSupported,s,o.vendor,o.id),Object(a.enableLogs)(s.debug),n("init",null);break;case"configure":e.transmuxer.configure(o.config);break;case"demux":var c=e.transmuxer.push(o.data,o.decryptdata,o.chunkMeta,o.state);Object(r.isPromise)(c)?c.then((function(t){l(e,t)})):l(e,c);break;case"flush":var d=o.chunkMeta,h=e.transmuxer.flush(d);Object(r.isPromise)(h)?h.then((function(t){u(e,t,d)})):u(e,h,d)}}))}function l(e,t){if((n=t.remuxResult).audio||n.video||n.text||n.id3||n.initSegment){var n,r=[],i=t.remuxResult,a=i.audio,o=i.video;a&&c(r,a),o&&c(r,o),e.postMessage({event:"transmuxComplete",data:t},r)}}function c(e,t){t.data1&&e.push(t.data1.buffer),t.data2&&e.push(t.data2.buffer)}function u(e,t,n){t.forEach((function(t){l(e,t)})),e.postMessage({event:"flush",data:n})}},"./src/demux/transmuxer.ts":
|
|
|
/*!*********************************!*\
|
|
|
!*** ./src/demux/transmuxer.ts ***!
|
|
|
\*********************************/
|
|
|
/*! exports provided: default, isPromise, TransmuxConfig, TransmuxState */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return b})),n.d(t,"isPromise",(function(){return E})),n.d(t,"TransmuxConfig",(function(){return x})),n.d(t,"TransmuxState",(function(){return _}));var r,i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),s=n(/*! ../demux/aacdemuxer */"./src/demux/aacdemuxer.ts"),l=n(/*! ../demux/mp4demuxer */"./src/demux/mp4demuxer.ts"),c=n(/*! ../demux/tsdemuxer */"./src/demux/tsdemuxer.ts"),u=n(/*! ../demux/mp3demuxer */"./src/demux/mp3demuxer.ts"),d=n(/*! ../remux/mp4-remuxer */"./src/remux/mp4-remuxer.ts"),h=n(/*! ../remux/passthrough-remuxer */"./src/remux/passthrough-remuxer.ts"),f=n(/*! ./chunk-cache */"./src/demux/chunk-cache.ts"),p=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),m=n(/*! ../utils/logger */"./src/utils/logger.ts");try{r=self.performance.now.bind(self.performance)}catch(e){m.logger.debug("Unable to use Performance API on this environment"),r=self.Date.now}var g=[{demux:c.default,remux:d.default},{demux:l.default,remux:h.default},{demux:s.default,remux:d.default},{demux:u.default,remux:d.default}],v=1024;g.forEach((function(e){var t=e.demux;v=Math.max(v,t.minProbeByteLength)}));var b=function(){function e(e,t,n,r,i){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new f.default,this.observer=e,this.typeSupported=t,this.config=n,this.vendor=r,this.id=i}var t=e.prototype;return t.configure=function(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()},t.push=function(e,t,n,i){var a=this,o=n.transmuxing;o.executeStart=r();var s=new Uint8Array(e),l=this.cache,c=this.config,u=this.currentTransmuxState,d=this.transmuxConfig;i&&(this.currentTransmuxState=i);var h=function(e,t){var n=null;return e.byteLength>0&&null!=t&&null!=t.key&&null!==t.iv&&null!=t.method&&(n=t),n}(s,t);if(h&&"AES-128"===h.method){var f=this.getDecrypter();if(!c.enableSoftwareAES)return this.decryptionPromise=f.webCryptoDecrypt(s,h.key.buffer,h.iv.buffer).then((function(e){var t=a.push(e,null,n);return a.decryptionPromise=null,t})),this.decryptionPromise;var m=f.softwareDecrypt(s,h.key.buffer,h.iv.buffer);if(!m)return o.executeEnd=r(),y(n);s=new Uint8Array(m)}var g=i||u,v=g.contiguous,b=g.discontinuity,E=g.trackSwitch,x=g.accurateTimeOffset,_=g.timeOffset,k=d.audioCodec,w=d.videoCodec,C=d.defaultInitPts,S=d.duration,O=d.initSegmentData;if((b||E)&&this.resetInitSegment(O,k,w,S),b&&this.resetInitialTimestamp(C),v||this.resetContiguity(),this.needsProbing(s,b,E)){if(l.dataLength){var A=l.flush();s=Object(p.appendUint8Array)(A,s)}this.configureTransmuxer(s,d)}var T=this.transmux(s,h,_,x,n),I=this.currentTransmuxState;return I.contiguous=!0,I.discontinuity=!1,I.trackSwitch=!1,o.executeEnd=r(),T},t.flush=function(e){var t=this,n=e.transmuxing;n.executeStart=r();var o=this.decrypter,s=this.cache,l=this.currentTransmuxState,c=this.decryptionPromise;if(c)return c.then((function(){return t.flush(e)}));var u=[],d=l.timeOffset;if(o){var h=o.flush();h&&u.push(this.push(h,null,e))}var f=s.dataLength;s.reset();var p=this.demuxer,m=this.remuxer;if(!p||!m)return f>=v&&this.observer.emit(i.Events.ERROR,i.Events.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),n.executeEnd=r(),[y(e)];var g=p.flush(d);return E(g)?g.then((function(n){return t.flushRemux(u,n,e),u})):(this.flushRemux(u,g,e),u)},t.flushRemux=function(e,t,n){var i=t.audioTrack,a=t.avcTrack,o=t.id3Track,s=t.textTrack,l=this.currentTransmuxState,c=l.accurateTimeOffset,u=l.timeOffset;m.logger.log("[transmuxer.ts]: Flushed fragment "+n.sn+(n.part>-1?" p: "+n.part:"")+" of level "+n.level);var d=this.remuxer.remux(i,a,o,s,u,c,!0,this.id);e.push({remuxResult:d,chunkMeta:n}),n.transmuxing.executeEnd=r()},t.resetInitialTimestamp=function(e){var t=this.demuxer,n=this.remuxer;t&&n&&(t.resetTimeStamp(e),n.resetTimeStamp(e))},t.resetContiguity=function(){var e=this.demuxer,t=this.remuxer;e&&t&&(e.resetContiguity(),t.resetNextTimestamp())},t.resetInitSegment=function(e,t,n,r){var i=this.demuxer,a=this.remuxer;i&&a&&(i.resetInitSegment(t,n,r),a.resetInitSegment(e,t,n))},t.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},t.transmux=function(e,t,n,r,i){return t&&"SAMPLE-AES"===t.method?this.transmuxSampleAes(e,t,n,r,i):this.transmuxUnencrypted(e,n,r,i)},t.transmuxUnencrypted=function(e,t,n,r){var i=this.demuxer.demux(e,t,!1,!this.config.progressive),a=i.audioTrack,o=i.avcTrack,s=i.id3Track,l=i.textTrack;return{remuxResult:this.remuxer.remux(a,o,s,l,t,n,!1,this.id),chunkMeta:r}},t.transmuxSampleAes=function(e,t,n,r,i){var a=this;return this.demuxer.demuxSampleAes(e,t,n).then((function(e){return{remuxResult:a.remuxer.remux(e.audioTrack,e.avcTrack,e.id3Track,e.textTrack,n,r,!1,a.id),chunkMeta:i}}))},t.configureTransmuxer=function(e,t){for(var n,r=this.config,i=this.observer,a=this.typeSupported,o=this.vendor,s=t.audioCodec,c=t.defaultInitPts,u=t.duration,d=t.initSegmentData,f=t.videoCodec,p=0,v=g.length;p<v;p++)if(g[p].demux.probe(e)){n=g[p];break}n||(m.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),n={demux:l.default,remux:h.default});var b=this.demuxer,y=this.remuxer,E=n.remux,x=n.demux;y&&y instanceof E||(this.remuxer=new E(i,r,a,o)),b&&b instanceof x||(this.demuxer=new x(i,r,a),this.probe=x.probe),this.resetInitSegment(d,s,f,u),this.resetInitialTimestamp(c)},t.needsProbing=function(e,t,n){return!this.demuxer||!this.remuxer||t||n},t.getDecrypter=function(){var e=this.decrypter;return e||(e=this.decrypter=new o.default(this.observer,this.config)),e},e}(),y=function(e){return{remuxResult:{},chunkMeta:e}};function E(e){return"then"in e&&e.then instanceof Function}var x=function(e,t,n,r,i){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=n,this.duration=r,this.defaultInitPts=i},_=function(e,t,n,r,i){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=n,this.trackSwitch=r,this.timeOffset=i}},"./src/demux/tsdemuxer.ts":
|
|
|
/*!********************************!*\
|
|
|
!*** ./src/demux/tsdemuxer.ts ***!
|
|
|
\********************************/
|
|
|
/*! exports provided: discardEPB, default */function(e,t,n){"use strict";n.r(t),n.d(t,"discardEPB",(function(){return E}));var r=n(/*! ./adts */"./src/demux/adts.ts"),i=n(/*! ./mpegaudio */"./src/demux/mpegaudio.ts"),a=n(/*! ./exp-golomb */"./src/demux/exp-golomb.ts"),o=n(/*! ./id3 */"./src/demux/id3.ts"),s=n(/*! ./sample-aes */"./src/demux/sample-aes.ts"),l=n(/*! ../events */"./src/events.ts"),c=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),u=n(/*! ../utils/logger */"./src/utils/logger.ts"),d=n(/*! ../errors */"./src/errors.ts"),h={video:1,audio:2,id3:3,text:4},f=function(){function e(e,t,n){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=e,this.config=t,this.typeSupported=n}e.probe=function(t){var n=e.syncOffset(t);return!(n<0||(n&&u.logger.warn("MPEG2-TS detected but first sync word found @ offset "+n+", junk ahead ?"),0))},e.syncOffset=function(e){for(var t=Math.min(1e3,e.length-564),n=0;n<t;){if(71===e[n]&&71===e[n+188]&&71===e[n+376])return n;n++}return-1},e.createTrack=function(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:h[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:"audio"===e?t:void 0}};var t=e.prototype;return t.resetInitSegment=function(t,n,r){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=e.createTrack("video",r),this._audioTrack=e.createTrack("audio",r),this._id3Track=e.createTrack("id3",r),this._txtTrack=e.createTrack("text",r),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=t,this.videoCodec=n,this._duration=r},t.resetTimeStamp=function(){},t.resetContiguity=function(){var e=this._audioTrack,t=this._avcTrack,n=this._id3Track;e&&(e.pesData=null),t&&(t.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},t.demux=function(t,n,r,i){var a;void 0===r&&(r=!1),void 0===i&&(i=!1),r||(this.sampleAes=null);var o=this._avcTrack,s=this._audioTrack,h=this._id3Track,f=o.pid,p=o.pesData,b=s.pid,y=h.pid,E=s.pesData,x=h.pesData,_=!1,k=this.pmtParsed,w=this._pmtId,C=t.length;if(this.remainderData&&(C=(t=Object(c.appendUint8Array)(this.remainderData,t)).length,this.remainderData=null),C<188&&!i)return this.remainderData=t,{audioTrack:s,avcTrack:o,id3Track:h,textTrack:this._txtTrack};var S=Math.max(0,e.syncOffset(t));(C-=(C+S)%188)<t.byteLength&&!i&&(this.remainderData=new Uint8Array(t.buffer,C,t.buffer.byteLength-C));for(var O=S;O<C;O+=188)if(71===t[O]){var A=!!(64&t[O+1]),T=((31&t[O+1])<<8)+t[O+2],I=void 0;if((48&t[O+3])>>4>1){if((I=O+5+t[O+4])===O+188)continue}else I=O+4;switch(T){case f:A&&(p&&(a=v(p))&&this.parseAVCPES(a,!1),p={data:[],size:0}),p&&(p.data.push(t.subarray(I,O+188)),p.size+=O+188-I);break;case b:A&&(E&&(a=v(E))&&(s.isAAC?this.parseAACPES(a):this.parseMPEGPES(a)),E={data:[],size:0}),E&&(E.data.push(t.subarray(I,O+188)),E.size+=O+188-I);break;case y:A&&(x&&(a=v(x))&&this.parseID3PES(a),x={data:[],size:0}),x&&(x.data.push(t.subarray(I,O+188)),x.size+=O+188-I);break;case 0:A&&(I+=t[I]+1),w=this._pmtId=m(t,I);break;case w:A&&(I+=t[I]+1);var D=g(t,I,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,r);(f=D.avc)>0&&(o.pid=f),(b=D.audio)>0&&(s.pid=b,s.isAAC=D.isAAC),(y=D.id3)>0&&(h.pid=y),_&&!k&&(u.logger.log("reparse from beginning"),_=!1,O=S-188),k=this.pmtParsed=!0;break;case 17:case 8191:break;default:_=!0}}else this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:d.ErrorTypes.MEDIA_ERROR,details:d.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});o.pesData=p,s.pesData=E,h.pesData=x;var L={audioTrack:s,avcTrack:o,id3Track:h,textTrack:this._txtTrack};return i&&this.extractRemainingSamples(L),L},t.flush=function(){var e,t=this.remainderData;return this.remainderData=null,e=t?this.demux(t,-1,!1,!0):{audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(e),this.sampleAes?this.decrypt(e,this.sampleAes):e},t.extractRemainingSamples=function(e){var t,n=e.audioTrack,r=e.avcTrack,i=e.id3Track,a=r.pesData,o=n.pesData,s=i.pesData;a&&(t=v(a))?(this.parseAVCPES(t,!0),r.pesData=null):r.pesData=a,o&&(t=v(o))?(n.isAAC?this.parseAACPES(t):this.parseMPEGPES(t),n.pesData=null):(null!=o&&o.size&&u.logger.log("last AAC PES packet truncated,might overlap between fragments"),n.pesData=o),s&&(t=v(s))?(this.parseID3PES(t),i.pesData=null):i.pesData=s},t.demuxSampleAes=function(e,t,n){var r=this.demux(e,n,!0,!this.config.progressive),i=this.sampleAes=new s.default(this.observer,this.config,t);return this.decrypt(r,i)},t.decrypt=function(e,t){return new Promise((function(n){var r=e.audioTrack,i=e.avcTrack;r.samples&&r.isAAC?t.decryptAacSamples(r.samples,0,(function(){i.samples?t.decryptAvcSamples(i.samples,0,0,(function(){n(e)})):n(e)})):i.samples&&t.decryptAvcSamples(i.samples,0,0,(function(){n(e)}))}))},t.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},t.parseAVCPES=function(e,t){var n,r=this,i=this._avcTrack,s=this.parseAVCNALu(e.data),l=this.avcSample,c=!1;e.data=null,l&&s.length&&!i.audFound&&(b(l,i),l=this.avcSample=p(!1,e.pts,e.dts,"")),s.forEach((function(t){switch(t.type){case 1:n=!0,l||(l=r.avcSample=p(!0,e.pts,e.dts,"")),l.frame=!0;var s=t.data;if(c&&s.length>4){var u=new a.default(s).readSliceType();2!==u&&4!==u&&7!==u&&9!==u||(l.key=!0)}break;case 5:n=!0,l||(l=r.avcSample=p(!0,e.pts,e.dts,"")),l.key=!0,l.frame=!0;break;case 6:n=!0;var d=new a.default(E(t.data));d.readUByte();for(var h=0,f=0,m=!1,g=0;!m&&d.bytesAvailable>1;){h=0;do{h+=g=d.readUByte()}while(255===g);f=0;do{f+=g=d.readUByte()}while(255===g);if(4===h&&0!==d.bytesAvailable){if(m=!0,181===d.readUByte()&&49===d.readUShort()&&1195456820===d.readUInt()&&3===d.readUByte()){for(var v=d.readUByte(),x=31&v,_=[v,d.readUByte()],k=0;k<x;k++)_.push(d.readUByte()),_.push(d.readUByte()),_.push(d.readUByte());y(r._txtTrack.samples,{type:3,pts:e.pts,bytes:_})}}else if(5===h&&0!==d.bytesAvailable){if(m=!0,f>16){for(var w=[],C=0;C<16;C++)w.push(d.readUByte().toString(16)),3!==C&&5!==C&&7!==C&&9!==C||w.push("-");for(var S=f-16,O=new Uint8Array(S),A=0;A<S;A++)O[A]=d.readUByte();y(r._txtTrack.samples,{pts:e.pts,payloadType:h,uuid:w.join(""),userData:Object(o.utf8ArrayToStr)(O),userDataBytes:O})}}else if(f<d.bytesAvailable)for(var T=0;T<f;T++)d.readUByte()}break;case 7:if(n=!0,c=!0,!i.sps){var I=new a.default(t.data).readSPS();i.width=I.width,i.height=I.height,i.pixelRatio=I.pixelRatio,i.sps=[t.data],i.duration=r._duration;for(var D=t.data.subarray(1,4),L="avc1.",R=0;R<3;R++){var N=D[R].toString(16);N.length<2&&(N="0"+N),L+=N}i.codec=L}break;case 8:n=!0,i.pps||(i.pps=[t.data]);break;case 9:n=!1,i.audFound=!0,l&&b(l,i),l=r.avcSample=p(!1,e.pts,e.dts,"");break;case 12:n=!1;break;default:n=!1,l&&(l.debug+="unknown NAL "+t.type+" ")}l&&n&&l.units.push(t)})),t&&l&&(b(l,i),this.avcSample=null)},t.getLastNalUnit=function(){var e,t,n=this.avcSample;if(!n||0===n.units.length){var r=this._avcTrack.samples;n=r[r.length-1]}if(null!==(e=n)&&void 0!==e&&e.units){var i=n.units;t=i[i.length-1]}return t},t.parseAVCNALu=function(e){var t,n,r=e.byteLength,i=this._avcTrack,a=i.naluState||0,o=a,s=[],l=0,c=-1,u=0;for(-1===a&&(c=0,u=31&e[0],a=0,l=1);l<r;)if(t=e[l++],a)if(1!==a)if(t)if(1===t){if(c>=0){var d={data:e.subarray(c,l-a-1),type:u};s.push(d)}else{var h=this.getLastNalUnit();if(h&&(o&&l<=4-o&&h.state&&(h.data=h.data.subarray(0,h.data.byteLength-o)),(n=l-a-1)>0)){var f=new Uint8Array(h.data.byteLength+n);f.set(h.data,0),f.set(e.subarray(0,n),h.data.byteLength),h.data=f,h.state=0}}l<r?(c=l,u=31&e[l],a=0):a=-1}else a=0;else a=3;else a=t?0:2;else a=t?0:1;if(c>=0&&a>=0){var p={data:e.subarray(c,r),type:u,state:a};s.push(p)}if(0===s.length){var m=this.getLastNalUnit();if(m){var g=new Uint8Array(m.data.byteLength+e.byteLength);g.set(m.data,0),g.set(e,m.data.byteLength),m.data=g}}return i.naluState=a,s},t.parseAACPES=function(e){var t,n,i,a,o,s=0,c=this._audioTrack,h=this.aacOverFlow,f=e.data;if(h){this.aacOverFlow=null;var p=h.sample.unit.byteLength,m=Math.min(h.missing,p),g=p-m;h.sample.unit.set(f.subarray(0,m),g),c.samples.push(h.sample),s=h.missing}for(t=s,n=f.length;t<n-1&&!r.isHeader(f,t);t++);if(t===s||(t<n-1?(i="AAC PES did not start with ADTS header,offset:"+t,a=!1):(i="no ADTS header found in AAC PES",a=!0),u.logger.warn("parsing error:"+i),this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:d.ErrorTypes.MEDIA_ERROR,details:d.ErrorDetails.FRAG_PARSING_ERROR,fatal:a,reason:i}),!a)){if(r.initTrackConfig(c,this.observer,f,t,this.audioCodec),void 0!==e.pts)o=e.pts;else{if(!h)return void u.logger.warn("[tsdemuxer]: AAC PES unknown PTS");var v=r.getFrameDuration(c.samplerate);o=h.sample.pts+v}for(var b=0;t<n;){if(r.isHeader(f,t)){if(t+5<n){var y=r.appendFrame(c,f,t,o,b);if(y){if(!y.missing){t+=y.length,b++;continue}this.aacOverFlow=y}}break}t++}}},t.parseMPEGPES=function(e){var t=e.data,n=t.length,r=0,a=0,o=e.pts;if(void 0!==o)for(;a<n;)if(i.isHeader(t,a)){var s=i.appendFrame(this._audioTrack,t,a,o,r);if(!s)break;a+=s.length,r++}else a++;else u.logger.warn("[tsdemuxer]: MPEG PES unknown PTS")},t.parseID3PES=function(e){void 0!==e.pts?this._id3Track.samples.push(e):u.logger.warn("[tsdemuxer]: ID3 PES unknown PTS")},e}();function p(e,t,n,r){return{key:e,frame:!1,pts:t,dts:n,units:[],debug:r,length:0}}function m(e,t){return(31&e[t+10])<<8|e[t+11]}function g(e,t,n,r){var i={audio:-1,avc:-1,id3:-1,isAAC:!0},a=t+3+((15&e[t+1])<<8|e[t+2])-4;for(t+=12+((15&e[t+10])<<8|e[t+11]);t<a;){var o=(31&e[t+1])<<8|e[t+2];switch(e[t]){case 207:if(!r){u.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:-1===i.audio&&(i.audio=o);break;case 21:-1===i.id3&&(i.id3=o);break;case 219:if(!r){u.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:-1===i.avc&&(i.avc=o);break;case 3:case 4:n?-1===i.audio&&(i.audio=o,i.isAAC=!1):u.logger.log("MPEG audio found, not supported in this browser");break;case 36:u.logger.warn("Unsupported HEVC stream type found")}t+=5+((15&e[t+3])<<8|e[t+4])}return i}function v(e){var t,n,r,i,a,o=0,s=e.data;if(!e||0===e.size)return null;for(;s[0].length<19&&s.length>1;){var l=new Uint8Array(s[0].length+s[1].length);l.set(s[0]),l.set(s[1],s[0].length),s[0]=l,s.splice(1,1)}if(1===((t=s[0])[0]<<16)+(t[1]<<8)+t[2]){if((n=(t[4]<<8)+t[5])&&n>e.size-6)return null;var c=t[7];192&c&&(i=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,64&c?i-(a=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2)>54e5&&(u.logger.warn(Math.round((i-a)/9e4)+"s delta between PTS and DTS, align them"),i=a):a=i);var d=(r=t[8])+9;if(e.size<=d)return null;e.size-=d;for(var h=new Uint8Array(e.size),f=0,p=s.length;f<p;f++){var m=(t=s[f]).byteLength;if(d){if(d>m){d-=m;continue}t=t.subarray(d),m-=d,d=0}h.set(t,o),o+=m}return n&&(n-=r+3),{data:h,pts:i,dts:a,len:n}}return null}function b(e,t){if(e.units.length&&e.frame){if(void 0===e.pts){var n=t.samples,r=n.length;if(!r)return void t.dropped++;var i=n[r-1];e.pts=i.pts,e.dts=i.dts}t.samples.push(e)}e.debug.length&&u.logger.log(e.pts+"/"+e.dts+":"+e.debug)}function y(e,t){var n=e.length;if(n>0){if(t.pts>=e[n-1].pts)e.push(t);else for(var r=n-1;r>=0;r--)if(t.pts<e[r].pts){e.splice(r,0,t);break}}else e.push(t)}function E(e){for(var t=e.byteLength,n=[],r=1;r<t-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;var i=t-n.length,a=new Uint8Array(i),o=0;for(r=0;r<i;o++,r++)o===n[0]&&(o++,n.shift()),a[r]=e[o];return a}f.minProbeByteLength=188,t.default=f},"./src/errors.ts":
|
|
|
/*!***********************!*\
|
|
|
!*** ./src/errors.ts ***!
|
|
|
\***********************/
|
|
|
/*! exports provided: ErrorTypes, ErrorDetails */function(e,t,n){"use strict";var r,i;n.r(t),n.d(t,"ErrorTypes",(function(){return r})),n.d(t,"ErrorDetails",(function(){return i})),function(e){e.NETWORK_ERROR="networkError",e.MEDIA_ERROR="mediaError",e.KEY_SYSTEM_ERROR="keySystemError",e.MUX_ERROR="muxError",e.OTHER_ERROR="otherError"}(r||(r={})),function(e){e.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",e.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",e.KEY_SYSTEM_NO_SESSION="keySystemNoSession",e.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",e.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",e.MANIFEST_LOAD_ERROR="manifestLoadError",e.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",e.MANIFEST_PARSING_ERROR="manifestParsingError",e.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",e.LEVEL_EMPTY_ERROR="levelEmptyError",e.LEVEL_LOAD_ERROR="levelLoadError",e.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",e.LEVEL_SWITCH_ERROR="levelSwitchError",e.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",e.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",e.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",e.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",e.FRAG_LOAD_ERROR="fragLoadError",e.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",e.FRAG_DECRYPT_ERROR="fragDecryptError",e.FRAG_PARSING_ERROR="fragParsingError",e.REMUX_ALLOC_ERROR="remuxAllocError",e.KEY_LOAD_ERROR="keyLoadError",e.KEY_LOAD_TIMEOUT="keyLoadTimeOut",e.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",e.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",e.BUFFER_APPEND_ERROR="bufferAppendError",e.BUFFER_APPENDING_ERROR="bufferAppendingError",e.BUFFER_STALLED_ERROR="bufferStalledError",e.BUFFER_FULL_ERROR="bufferFullError",e.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",e.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",e.INTERNAL_EXCEPTION="internalException",e.INTERNAL_ABORTED="aborted",e.UNKNOWN="unknown"}(i||(i={}))},"./src/events.ts":
|
|
|
/*!***********************!*\
|
|
|
!*** ./src/events.ts ***!
|
|
|
\***********************/
|
|
|
/*! exports provided: Events */function(e,t,n){"use strict";var r;n.r(t),n.d(t,"Events",(function(){return r})),function(e){e.MEDIA_ATTACHING="hlsMediaAttaching",e.MEDIA_ATTACHED="hlsMediaAttached",e.MEDIA_DETACHING="hlsMediaDetaching",e.MEDIA_DETACHED="hlsMediaDetached",e.BUFFER_RESET="hlsBufferReset",e.BUFFER_CODECS="hlsBufferCodecs",e.BUFFER_CREATED="hlsBufferCreated",e.BUFFER_APPENDING="hlsBufferAppending",e.BUFFER_APPENDED="hlsBufferAppended",e.BUFFER_EOS="hlsBufferEos",e.BUFFER_FLUSHING="hlsBufferFlushing",e.BUFFER_FLUSHED="hlsBufferFlushed",e.MANIFEST_LOADING="hlsManifestLoading",e.MANIFEST_LOADED="hlsManifestLoaded",e.MANIFEST_PARSED="hlsManifestParsed",e.LEVEL_SWITCHING="hlsLevelSwitching",e.LEVEL_SWITCHED="hlsLevelSwitched",e.LEVEL_LOADING="hlsLevelLoading",e.LEVEL_LOADED="hlsLevelLoaded",e.LEVEL_UPDATED="hlsLevelUpdated",e.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",e.LEVELS_UPDATED="hlsLevelsUpdated",e.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",e.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",e.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",e.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",e.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",e.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",e.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",e.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",e.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",e.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",e.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",e.CUES_PARSED="hlsCuesParsed",e.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",e.INIT_PTS_FOUND="hlsInitPtsFound",e.FRAG_LOADING="hlsFragLoading",e.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",e.FRAG_LOADED="hlsFragLoaded",e.FRAG_DECRYPTED="hlsFragDecrypted",e.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",e.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",e.FRAG_PARSING_METADATA="hlsFragParsingMetadata",e.FRAG_PARSED="hlsFragParsed",e.FRAG_BUFFERED="hlsFragBuffered",e.FRAG_CHANGED="hlsFragChanged",e.FPS_DROP="hlsFpsDrop",e.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",e.ERROR="hlsError",e.DESTROYING="hlsDestroying",e.KEY_LOADING="hlsKeyLoading",e.KEY_LOADED="hlsKeyLoaded",e.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",e.BACK_BUFFER_REACHED="hlsBackBufferReached"}(r||(r={}))},"./src/hls.ts":
|
|
|
/*!********************!*\
|
|
|
!*** ./src/hls.ts ***!
|
|
|
\********************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return b}));var r=n(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),i=n(/*! ./loader/playlist-loader */"./src/loader/playlist-loader.ts"),a=n(/*! ./loader/key-loader */"./src/loader/key-loader.ts"),o=n(/*! ./controller/id3-track-controller */"./src/controller/id3-track-controller.ts"),s=n(/*! ./controller/latency-controller */"./src/controller/latency-controller.ts"),l=n(/*! ./controller/level-controller */"./src/controller/level-controller.ts"),c=n(/*! ./controller/fragment-tracker */"./src/controller/fragment-tracker.ts"),u=n(/*! ./controller/stream-controller */"./src/controller/stream-controller.ts"),d=n(/*! ./is-supported */"./src/is-supported.ts"),h=n(/*! ./utils/logger */"./src/utils/logger.ts"),f=n(/*! ./config */"./src/config.ts"),p=n(/*! eventemitter3 */"./node_modules/eventemitter3/index.js"),m=n(/*! ./events */"./src/events.ts"),g=n(/*! ./errors */"./src/errors.ts");function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var b=function(){function e(t){void 0===t&&(t={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new p.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var n=this.config=Object(f.mergeConfig)(e.DefaultConfig,t);this.userConfig=t,Object(h.enableLogs)(n.debug),this._autoLevelCapping=-1,n.progressive&&Object(f.enableStreamingMode)(n);var r=n.abrController,d=n.bufferController,m=n.capLevelController,g=n.fpsController,v=this.abrController=new r(this),b=this.bufferController=new d(this),y=this.capLevelController=new m(this),E=new g(this),x=new i.default(this),_=new a.default(this),k=new o.default(this),w=this.levelController=new l.default(this),C=new c.FragmentTracker(this),S=this.streamController=new u.default(this,C);y.setStreamController(S),E.setStreamController(S);var O=[w,S];this.networkControllers=O;var A=[x,_,v,b,y,E,k,C];this.audioTrackController=this.createController(n.audioTrackController,null,O),this.createController(n.audioStreamController,C,O),this.subtitleTrackController=this.createController(n.subtitleTrackController,null,O),this.createController(n.subtitleStreamController,C,O),this.createController(n.timelineController,null,A),this.emeController=this.createController(n.emeController,null,A),this.cmcdController=this.createController(n.cmcdController,null,A),this.latencyController=this.createController(s.default,null,A),this.coreComponents=A}e.isSupported=function(){return Object(d.isSupported)()};var t,n,b,y=e.prototype;return y.createController=function(e,t,n){if(e){var r=t?new e(this,t):new e(this);return n&&n.push(r),r}return null},y.on=function(e,t,n){void 0===n&&(n=this),this._emitter.on(e,t,n)},y.once=function(e,t,n){void 0===n&&(n=this),this._emitter.once(e,t,n)},y.removeAllListeners=function(e){this._emitter.removeAllListeners(e)},y.off=function(e,t,n,r){void 0===n&&(n=this),this._emitter.off(e,t,n,r)},y.listeners=function(e){return this._emitter.listeners(e)},y.emit=function(e,t,n){return this._emitter.emit(e,t,n)},y.trigger=function(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(t){h.logger.error("An internal error happened while handling event "+e+'. Error message: "'+t.message+'". Here is a stacktrace:',t),this.trigger(m.Events.ERROR,{type:g.ErrorTypes.OTHER_ERROR,details:g.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:e,error:t})}return!1},y.listenerCount=function(e){return this._emitter.listenerCount(e)},y.destroy=function(){h.logger.log("destroy"),this.trigger(m.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach((function(e){return e.destroy()})),this.networkControllers.length=0,this.coreComponents.forEach((function(e){return e.destroy()})),this.coreComponents.length=0},y.attachMedia=function(e){h.logger.log("attachMedia"),this._media=e,this.trigger(m.Events.MEDIA_ATTACHING,{media:e})},y.detachMedia=function(){h.logger.log("detachMedia"),this.trigger(m.Events.MEDIA_DETACHING,void 0),this._media=null},y.loadSource=function(e){this.stopLoad();var t=this.media,n=this.url,i=this.url=r.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});h.logger.log("loadSource:"+i),t&&n&&n!==i&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(t)),this.trigger(m.Events.MANIFEST_LOADING,{url:e})},y.startLoad=function(e){void 0===e&&(e=-1),h.logger.log("startLoad("+e+")"),this.networkControllers.forEach((function(t){t.startLoad(e)}))},y.stopLoad=function(){h.logger.log("stopLoad"),this.networkControllers.forEach((function(e){e.stopLoad()}))},y.swapAudioCodec=function(){h.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},y.recoverMediaError=function(){h.logger.log("recoverMediaError");var e=this._media;this.detachMedia(),e&&this.attachMedia(e)},y.removeLevel=function(e,t){void 0===t&&(t=0),this.levelController.removeLevel(e,t)},t=e,b=[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return m.Events}},{key:"ErrorTypes",get:function(){return g.ErrorTypes}},{key:"ErrorDetails",get:function(){return g.ErrorDetails}},{key:"DefaultConfig",get:function(){return e.defaultConfig?e.defaultConfig:f.hlsDefaultConfig},set:function(t){e.defaultConfig=t}}],(n=[{key:"levels",get:function(){var e=this.levelController.levels;return e||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(e){h.logger.log("set currentLevel:"+e),this.loadLevel=e,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(e){h.logger.log("set nextLevel:"+e),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(e){h.logger.log("set loadLevel:"+e),this.levelController.manualLevel=e}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(e){this.levelController.nextLoadLevel=e}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(e){h.logger.log("set firstLevel:"+e),this.levelController.firstLevel=e}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(e){h.logger.log("set startLevel:"+e),-1!==e&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(e){var t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(e){this._autoLevelCapping!==e&&(h.logger.log("set autoLevelCapping:"+e),this._autoLevelCapping=e)}},{key:"bandwidthEstimate",get:function(){var e=this.abrController.bwEstimator;return e?e.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var e=this.levels,t=this.config.minAutoBitrate;if(!e)return 0;for(var n=e.length,r=0;r<n;r++)if(e[r].maxBitrate>t)return r;return 0}},{key:"maxAutoLevel",get:function(){var e=this.levels,t=this.autoLevelCapping;return-1===t&&e&&e.length?e.length-1:t}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(e){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,e)}},{key:"audioTracks",get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]}},{key:"audioTrack",get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)}},{key:"subtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var e=this.subtitleTrackController;return!!e&&e.subtitleDisplay},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(e){this.config.lowLatencyMode=e}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}])&&v(t.prototype,n),b&&v(t,b),e}();b.defaultConfig=void 0},"./src/is-supported.ts":
|
|
|
/*!*****************************!*\
|
|
|
!*** ./src/is-supported.ts ***!
|
|
|
\*****************************/
|
|
|
/*! exports provided: isSupported, changeTypeSupported */function(e,t,n){"use strict";n.r(t),n.d(t,"isSupported",(function(){return a})),n.d(t,"changeTypeSupported",(function(){return o}));var r=n(/*! ./utils/mediasource-helper */"./src/utils/mediasource-helper.ts");function i(){return self.SourceBuffer||self.WebKitSourceBuffer}function a(){var e=Object(r.getMediaSource)();if(!e)return!1;var t=i(),n=e&&"function"==typeof e.isTypeSupported&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),a=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return!!n&&!!a}function o(){var e,t=i();return"function"==typeof(null==t||null===(e=t.prototype)||void 0===e?void 0:e.changeType)}},"./src/loader/fragment-loader.ts":
|
|
|
/*!***************************************!*\
|
|
|
!*** ./src/loader/fragment-loader.ts ***!
|
|
|
\***************************************/
|
|
|
/*! exports provided: default, LoadError */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return d})),n.d(t,"LoadError",(function(){return f}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../errors */"./src/errors.ts");function a(e){var t="function"==typeof Map?new Map:void 0;return(a=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return o(e,arguments,c(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),l(r,e)})(e)}function o(e,t,n){return(o=s()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&l(i,n.prototype),i}).apply(null,arguments)}function s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=Math.pow(2,17),d=function(){function e(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}var t=e.prototype;return t.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},t.abort=function(){this.loader&&this.loader.abort()},t.load=function(e,t){var n=this,r=e.url;if(!r)return Promise.reject(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,networkDetails:null},"Fragment does not have a "+(r?"part list":"url")));this.abort();var a=this.config,o=a.fLoader,s=a.loader;return new Promise((function(r,l){n.loader&&n.loader.destroy();var c=n.loader=e.loader=o?new o(a):new s(a),d=h(e),p={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout,highWaterMark:u};e.stats=c.stats,c.load(d,p,{onSuccess:function(t,i,a,o){n.resetLoader(e,c),r({frag:e,part:null,payload:t.data,networkDetails:o})},onError:function(t,r,a){n.resetLoader(e,c),l(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:t,networkDetails:a}))},onAbort:function(t,r,a){n.resetLoader(e,c),l(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,networkDetails:a}))},onTimeout:function(t,r,a){n.resetLoader(e,c),l(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,networkDetails:a}))},onProgress:function(n,r,i,a){t&&t({frag:e,part:null,payload:i,networkDetails:a})}})}))},t.loadPart=function(e,t,n){var r=this;this.abort();var a=this.config,o=a.fLoader,s=a.loader;return new Promise((function(l,c){r.loader&&r.loader.destroy();var d=r.loader=e.loader=o?new o(a):new s(a),p=h(e,t),m={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout,highWaterMark:u};t.stats=d.stats,d.load(p,m,{onSuccess:function(i,a,o,s){r.resetLoader(e,d),r.updateStatsFromPart(e,t);var c={frag:e,part:t,payload:i.data,networkDetails:s};n(c),l(c)},onError:function(n,a,o){r.resetLoader(e,d),c(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:n,networkDetails:o}))},onAbort:function(n,a,o){e.stats.aborted=t.stats.aborted,r.resetLoader(e,d),c(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,networkDetails:o}))},onTimeout:function(n,a,o){r.resetLoader(e,d),c(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,networkDetails:o}))}})}))},t.updateStatsFromPart=function(e,t){var n=e.stats,r=t.stats,i=r.total;if(n.loaded+=r.loaded,i){var a=Math.round(e.duration/t.duration),o=Math.min(Math.round(n.loaded/i),a),s=(a-o)*Math.round(n.loaded/o);n.total=n.loaded+s}else n.total=Math.max(n.loaded,n.total);var l=n.loading,c=r.loading;l.start?l.first+=c.first-c.start:(l.start=c.start,l.first=c.first),l.end=c.end},t.resetLoader=function(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()},e}();function h(e,t){void 0===t&&(t=null);var n=t||e,i={frag:e,part:t,responseType:"arraybuffer",url:n.url,headers:{},rangeStart:0,rangeEnd:0},a=n.byteRangeStartOffset,o=n.byteRangeEndOffset;return Object(r.isFiniteNumber)(a)&&Object(r.isFiniteNumber)(o)&&(i.rangeStart=a,i.rangeEnd=o),i}var f=function(e){var t,n;function r(t){for(var n,r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return(n=e.call.apply(e,[this].concat(i))||this).data=void 0,n.data=t,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n),r}(a(Error))},"./src/loader/fragment.ts":
|
|
|
/*!********************************!*\
|
|
|
!*** ./src/loader/fragment.ts ***!
|
|
|
\********************************/
|
|
|
/*! exports provided: ElementaryStreamTypes, BaseSegment, Fragment, Part */function(e,t,n){"use strict";n.r(t),n.d(t,"ElementaryStreamTypes",(function(){return r})),n.d(t,"BaseSegment",(function(){return f})),n.d(t,"Fragment",(function(){return p})),n.d(t,"Part",(function(){return m}));var r,i=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),a=n(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ./level-key */"./src/loader/level-key.ts"),l=n(/*! ./load-stats */"./src/loader/load-stats.ts");function c(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,u(e,t)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),e}!function(e){e.AUDIO="audio",e.VIDEO="video",e.AUDIOVIDEO="audiovideo"}(r||(r={}));var f=function(){function e(e){var t;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=((t={})[r.AUDIO]=null,t[r.VIDEO]=null,t[r.AUDIOVIDEO]=null,t),this.baseurl=e}return e.prototype.setByteRange=function(e,t){var n=e.split("@",2),r=[];1===n.length?r[0]=t?t.byteRangeEndOffset:0:r[0]=parseInt(n[1]),r[1]=parseInt(n[0])+r[0],this._byteRange=r},h(e,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(a.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(e){this._url=e}}]),e}(),p=function(e){function t(t,n){var r;return(r=e.call(this,n)||this)._decryptdata=null,r.rawProgramDateTime=null,r.programDateTime=null,r.tagList=[],r.duration=0,r.sn=0,r.levelkey=void 0,r.type=void 0,r.loader=null,r.level=-1,r.cc=0,r.startPTS=void 0,r.endPTS=void 0,r.appendedPTS=void 0,r.startDTS=void 0,r.endDTS=void 0,r.start=0,r.deltaPTS=void 0,r.maxStartPTS=void 0,r.minEndPTS=void 0,r.stats=new l.LoadStats,r.urlId=0,r.data=void 0,r.bitrateTest=!1,r.title=null,r.initSegment=null,r.type=t,r}c(t,e);var n=t.prototype;return n.createInitializationVector=function(e){for(var t=new Uint8Array(16),n=12;n<16;n++)t[n]=e>>8*(15-n)&255;return t},n.setDecryptDataFromLevelKey=function(e,t){var n=e;return"AES-128"===(null==e?void 0:e.method)&&e.uri&&!e.iv&&((n=s.LevelKey.fromURI(e.uri)).method=e.method,n.iv=this.createInitializationVector(t),n.keyFormat="identity"),n},n.setElementaryStreamInfo=function(e,t,n,r,i,a){void 0===a&&(a=!1);var o=this.elementaryStreams,s=o[e];s?(s.startPTS=Math.min(s.startPTS,t),s.endPTS=Math.max(s.endPTS,n),s.startDTS=Math.min(s.startDTS,r),s.endDTS=Math.max(s.endDTS,i)):o[e]={startPTS:t,endPTS:n,startDTS:r,endDTS:i,partial:a}},n.clearElementaryStreamInfo=function(){var e=this.elementaryStreams;e[r.AUDIO]=null,e[r.VIDEO]=null,e[r.AUDIOVIDEO]=null},h(t,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var e=this.sn;"number"!=typeof e&&(this.levelkey&&"AES-128"===this.levelkey.method&&!this.levelkey.iv&&o.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),e=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,e)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!Object(i.isFiniteNumber)(this.programDateTime))return null;var e=Object(i.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+1e3*e}},{key:"encrypted",get:function(){var e;return!(null===(e=this.decryptdata)||void 0===e||!e.keyFormat||!this.decryptdata.uri)}}]),t}(f),m=function(e){function t(t,n,r,i,a){var o;(o=e.call(this,r)||this).fragOffset=0,o.duration=0,o.gap=!1,o.independent=!1,o.relurl=void 0,o.fragment=void 0,o.index=void 0,o.stats=new l.LoadStats,o.duration=t.decimalFloatingPoint("DURATION"),o.gap=t.bool("GAP"),o.independent=t.bool("INDEPENDENT"),o.relurl=t.enumeratedString("URI"),o.fragment=n,o.index=i;var s=t.enumeratedString("BYTERANGE");return s&&o.setByteRange(s,a),a&&(o.fragOffset=a.fragOffset+a.duration),o}return c(t,e),h(t,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var e=this.elementaryStreams;return!!(e.audio||e.video||e.audiovideo)}}]),t}(f)},"./src/loader/key-loader.ts":
|
|
|
/*!**********************************!*\
|
|
|
!*** ./src/loader/key-loader.ts ***!
|
|
|
\**********************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=function(){function e(e){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=e,this._registerListeners()}var t=e.prototype;return t._registerListeners=function(){this.hls.on(r.Events.KEY_LOADING,this.onKeyLoading,this)},t._unregisterListeners=function(){this.hls.off(r.Events.KEY_LOADING,this.onKeyLoading)},t.destroy=function(){for(var e in this._unregisterListeners(),this.loaders){var t=this.loaders[e];t&&t.destroy()}this.loaders={}},t.onKeyLoading=function(e,t){var n=t.frag,i=n.type,o=this.loaders[i];if(n.decryptdata){var s=n.decryptdata.uri;if(s!==this.decrypturl||null===this.decryptkey){var l=this.hls.config;if(o&&(a.logger.warn("abort previous key loader for type:"+i),o.abort()),!s)return void a.logger.warn("key uri is falsy");var c=l.loader,u=n.loader=this.loaders[i]=new c(l);this.decrypturl=s,this.decryptkey=null;var d={url:s,frag:n,responseType:"arraybuffer"},h={timeout:l.fragLoadingTimeOut,maxRetry:0,retryDelay:l.fragLoadingRetryDelay,maxRetryDelay:l.fragLoadingMaxRetryTimeout,highWaterMark:0},f={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(d,h,f)}else this.decryptkey&&(n.decryptdata.key=this.decryptkey,this.hls.trigger(r.Events.KEY_LOADED,{frag:n}))}else a.logger.warn("Missing decryption data on fragment in onKeyLoading")},t.loadsuccess=function(e,t,n){var i=n.frag;i.decryptdata?(this.decryptkey=i.decryptdata.key=new Uint8Array(e.data),i.loader=null,delete this.loaders[i.type],this.hls.trigger(r.Events.KEY_LOADED,{frag:i})):a.logger.error("after key load, decryptdata unset")},t.loaderror=function(e,t){var n=t.frag,a=n.loader;a&&a.abort(),delete this.loaders[n.type],this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:n,response:e})},t.loadtimeout=function(e,t){var n=t.frag,a=n.loader;a&&a.abort(),delete this.loaders[n.type],this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:n})},e}()},"./src/loader/level-details.ts":
|
|
|
/*!*************************************!*\
|
|
|
!*** ./src/loader/level-details.ts ***!
|
|
|
\*************************************/
|
|
|
/*! exports provided: LevelDetails */function(e,t,n){"use strict";n.r(t),n.d(t,"LevelDetails",(function(){return a}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts");function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=e}var t,n,a;return e.prototype.reloaded=function(e){if(!e)return this.advanced=!0,void(this.updated=!0);var t=this.lastPartSn-e.lastPartSn,n=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!n||!!t,this.advanced=this.endSN>e.endSN||t>0||0===t&&n>0,this.updated||this.advanced?this.misses=Math.floor(.6*e.misses):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay},t=e,(n=[{key:"hasProgramDateTime",get:function(){return!!this.fragments.length&&Object(r.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime)}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||10}},{key:"drift",get:function(){var e=this.driftEndTime-this.driftStartTime;return e>0?1e3*(this.driftEnd-this.driftStart)/e:1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var e;return null!==(e=this.fragments)&&void 0!==e&&e.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}])&&i(t.prototype,n),a&&i(t,a),e}()},"./src/loader/level-key.ts":
|
|
|
/*!*********************************!*\
|
|
|
!*** ./src/loader/level-key.ts ***!
|
|
|
\*********************************/
|
|
|
/*! exports provided: LevelKey */function(e,t,n){"use strict";n.r(t),n.d(t,"LevelKey",(function(){return a}));var r=n(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js");function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(e,t){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,this._uri=t?Object(r.buildAbsoluteURL)(e,t,{alwaysNormalize:!0}):e}var t,n,a;return e.fromURL=function(t,n){return new e(t,n)},e.fromURI=function(t){return new e(t)},t=e,(n=[{key:"uri",get:function(){return this._uri}}])&&i(t.prototype,n),a&&i(t,a),e}()},"./src/loader/load-stats.ts":
|
|
|
/*!**********************************!*\
|
|
|
!*** ./src/loader/load-stats.ts ***!
|
|
|
\**********************************/
|
|
|
/*! exports provided: LoadStats */function(e,t,n){"use strict";n.r(t),n.d(t,"LoadStats",(function(){return r}));var r=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":
|
|
|
/*!***********************************!*\
|
|
|
!*** ./src/loader/m3u8-parser.ts ***!
|
|
|
\***********************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return g}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),a=n(/*! ./fragment */"./src/loader/fragment.ts"),o=n(/*! ./level-details */"./src/loader/level-details.ts"),s=n(/*! ./level-key */"./src/loader/level-key.ts"),l=n(/*! ../utils/attr-list */"./src/utils/attr-list.ts"),c=n(/*! ../utils/logger */"./src/utils/logger.ts"),u=n(/*! ../utils/codecs */"./src/utils/codecs.ts"),d=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,h=/#EXT-X-MEDIA:(.*)/g,f=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),p=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),m=/\.(mp4|m4s|m4v|m4a)$/i,g=function(){function e(){}return e.findGroup=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.id===t)return r}},e.convertAVC1ToAVCOTI=function(e){var t=e.split(".");if(t.length>2){var n=t.shift()+".";return n+=parseInt(t.shift()).toString(16),n+=("000"+parseInt(t.shift()).toString(16)).substr(-4)}return e},e.resolve=function(e,t){return i.buildAbsoluteURL(t,e,{alwaysNormalize:!0})},e.parseMasterPlaylist=function(t,n){var r,i=[],a={},o=!1;for(d.lastIndex=0;null!=(r=d.exec(t));)if(r[1]){var s=new l.AttrList(r[1]),c={attrs:s,bitrate:s.decimalInteger("AVERAGE-BANDWIDTH")||s.decimalInteger("BANDWIDTH"),name:s.NAME,url:e.resolve(r[2],n)},u=s.decimalResolution("RESOLUTION");u&&(c.width=u.width,c.height=u.height),v((s.CODECS||"").split(/[ ,]+/).filter((function(e){return e})),c),c.videoCodec&&-1!==c.videoCodec.indexOf("avc1")&&(c.videoCodec=e.convertAVC1ToAVCOTI(c.videoCodec)),i.push(c)}else if(r[3]){var h=new l.AttrList(r[3]);h["DATA-ID"]&&(o=!0,a[h["DATA-ID"]]=h)}return{levels:i,sessionData:o?a:null}},e.parseMasterPlaylistMedia=function(t,n,r,i){var a;void 0===i&&(i=[]);var o=[],s=0;for(h.lastIndex=0;null!==(a=h.exec(t));){var c=new l.AttrList(a[1]);if(c.TYPE===r){var u={attrs:c,bitrate:0,id:s++,groupId:c["GROUP-ID"],instreamId:c["INSTREAM-ID"],name:c.NAME||c.LANGUAGE||"",type:r,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:c.LANGUAGE,url:c.URI?e.resolve(c.URI,n):""};if(i.length){var d=e.findGroup(i,u.groupId)||i[0];b(u,d,"audioCodec"),b(u,d,"textCodec")}o.push(u)}}return o},e.parseLevelPlaylist=function(e,t,n,u,d){var h,g,v,b=new o.LevelDetails(t),E=b.fragments,x=null,_=0,k=0,w=0,C=0,S=null,O=new a.Fragment(u,t),A=-1,T=!1;for(f.lastIndex=0,b.m3u8=e;null!==(h=f.exec(e));){T&&(T=!1,(O=new a.Fragment(u,t)).start=w,O.sn=_,O.cc=C,O.level=n,x&&(O.initSegment=x,O.rawProgramDateTime=x.rawProgramDateTime));var I=h[1];if(I){O.duration=parseFloat(I);var D=(" "+h[2]).slice(1);O.title=D||null,O.tagList.push(D?["INF",I,D]:["INF",I])}else if(h[3])Object(r.isFiniteNumber)(O.duration)&&(O.start=w,v&&(O.levelkey=v),O.sn=_,O.level=n,O.cc=C,O.urlId=d,E.push(O),O.relurl=(" "+h[3]).slice(1),y(O,S),S=O,w+=O.duration,_++,k=0,T=!0);else if(h[4]){var L=(" "+h[4]).slice(1);S?O.setByteRange(L,S):O.setByteRange(L)}else if(h[5])O.rawProgramDateTime=(" "+h[5]).slice(1),O.tagList.push(["PROGRAM-DATE-TIME",O.rawProgramDateTime]),-1===A&&(A=E.length);else{if(!(h=h[0].match(p))){c.logger.warn("No matches on slow regex match for level playlist!");continue}for(g=1;g<h.length&&void 0===h[g];g++);var R=(" "+h[g]).slice(1),N=(" "+h[g+1]).slice(1),j=h[g+2]?(" "+h[g+2]).slice(1):"";switch(R){case"PLAYLIST-TYPE":b.type=N.toUpperCase();break;case"MEDIA-SEQUENCE":_=b.startSN=parseInt(N);break;case"SKIP":var M=new l.AttrList(N),P=M.decimalInteger("SKIPPED-SEGMENTS");if(Object(r.isFiniteNumber)(P)){b.skippedSegments=P;for(var B=P;B--;)E.unshift(null);_+=P}var F=M.enumeratedString("RECENTLY-REMOVED-DATERANGES");F&&(b.recentlyRemovedDateranges=F.split("\t"));break;case"TARGETDURATION":b.targetduration=parseFloat(N);break;case"VERSION":b.version=parseInt(N);break;case"EXTM3U":break;case"ENDLIST":b.live=!1;break;case"#":(N||j)&&O.tagList.push(j?[N,j]:[N]);break;case"DIS":C++;case"GAP":O.tagList.push([R]);break;case"BITRATE":O.tagList.push([R,N]);break;case"DISCONTINUITY-SEQ":C=parseInt(N);break;case"KEY":var U,H=new l.AttrList(N),z=H.enumeratedString("METHOD"),G=H.URI,V=H.hexadecimalInteger("IV"),W=H.enumeratedString("KEYFORMATVERSIONS"),K=H.enumeratedString("KEYID"),q=null!=(U=H.enumeratedString("KEYFORMAT"))?U:"identity";if(["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"].indexOf(q)>-1){c.logger.warn("Keyformat "+q+" is not supported from the manifest");continue}if("identity"!==q)continue;z&&(v=s.LevelKey.fromURL(t,G),G&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(z)>=0&&(v.method=z,v.keyFormat=q,K&&(v.keyID=K),W&&(v.keyFormatVersions=W),v.iv=V));break;case"START":var Y=new l.AttrList(N).decimalFloatingPoint("TIME-OFFSET");Object(r.isFiniteNumber)(Y)&&(b.startTimeOffset=Y);break;case"MAP":var Q=new l.AttrList(N);O.relurl=Q.URI,Q.BYTERANGE&&O.setByteRange(Q.BYTERANGE),O.level=n,O.sn="initSegment",v&&(O.levelkey=v),O.initSegment=null,x=O,T=!0;break;case"SERVER-CONTROL":var J=new l.AttrList(N);b.canBlockReload=J.bool("CAN-BLOCK-RELOAD"),b.canSkipUntil=J.optionalFloat("CAN-SKIP-UNTIL",0),b.canSkipDateRanges=b.canSkipUntil>0&&J.bool("CAN-SKIP-DATERANGES"),b.partHoldBack=J.optionalFloat("PART-HOLD-BACK",0),b.holdBack=J.optionalFloat("HOLD-BACK",0);break;case"PART-INF":var X=new l.AttrList(N);b.partTarget=X.decimalFloatingPoint("PART-TARGET");break;case"PART":var Z=b.partList;Z||(Z=b.partList=[]);var $=k>0?Z[Z.length-1]:void 0,ee=k++,te=new a.Part(new l.AttrList(N),O,t,ee,$);Z.push(te),O.duration+=te.duration;break;case"PRELOAD-HINT":var ne=new l.AttrList(N);b.preloadHint=ne;break;case"RENDITION-REPORT":var re=new l.AttrList(N);b.renditionReports=b.renditionReports||[],b.renditionReports.push(re);break;default:c.logger.warn("line parsed but not handled: "+h)}}}S&&!S.relurl?(E.pop(),w-=S.duration,b.partList&&(b.fragmentHint=S)):b.partList&&(y(O,S),O.cc=C,b.fragmentHint=O);var ie=E.length,ae=E[0],oe=E[ie-1];if((w+=b.skippedSegments*b.targetduration)>0&&ie&&oe){b.averagetargetduration=w/ie;var se=oe.sn;b.endSN="initSegment"!==se?se:0,ae&&(b.startCC=ae.cc,ae.initSegment||b.fragments.every((function(e){return e.relurl&&(t=e.relurl,m.test(null!=(n=null===(r=i.parseURL(t))||void 0===r?void 0:r.path)?n:""));var t,n,r}))&&(c.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(O=new a.Fragment(u,t)).relurl=oe.relurl,O.level=n,O.sn="initSegment",ae.initSegment=O,b.needSidxRanges=!0))}else b.endSN=0,b.startCC=0;return b.fragmentHint&&(w+=b.fragmentHint.duration),b.totalduration=w,b.endCC=C,A>0&&function(e,t){for(var n=e[t],r=t;r--;){var i=e[r];if(!i)return;i.programDateTime=n.programDateTime-1e3*i.duration,n=i}}(E,A),b},e}();function v(e,t){["video","audio","text"].forEach((function(n){var r=e.filter((function(e){return Object(u.isCodecType)(e,n)}));if(r.length){var i=r.filter((function(e){return 0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)}));t[n+"Codec"]=i.length>0?i[0]:r[0],e=e.filter((function(e){return-1===r.indexOf(e)}))}})),t.unknownCodecs=e}function b(e,t,n){var r=t[n];r&&(e[n]=r)}function y(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):null!=t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),Object(r.isFiniteNumber)(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":
|
|
|
/*!***************************************!*\
|
|
|
!*** ./src/loader/playlist-loader.ts ***!
|
|
|
\***************************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),l=n(/*! ./m3u8-parser */"./src/loader/m3u8-parser.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts"),u=n(/*! ../utils/attr-list */"./src/utils/attr-list.ts");function d(e,t){var n=e.url;return void 0!==n&&0!==n.indexOf("data:")||(n=t.url),n}var h=function(){function e(e){this.hls=void 0,this.loaders=Object.create(null),this.hls=e,this.registerListeners()}var t=e.prototype;return t.registerListeners=function(){var e=this.hls;e.on(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(i.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(i.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(i.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.unregisterListeners=function(){var e=this.hls;e.off(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(i.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(i.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(i.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.createInternalLoader=function(e){var t=this.hls.config,n=t.pLoader,r=t.loader,i=new(n||r)(t);return e.loader=i,this.loaders[e.type]=i,i},t.getInternalLoader=function(e){return this.loaders[e.type]},t.resetInternalLoader=function(e){this.loaders[e]&&delete this.loaders[e]},t.destroyInternalLoaders=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}},t.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},t.onManifestLoading=function(e,t){var n=t.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:c.PlaylistContextType.MANIFEST,url:n,deliveryDirectives:null})},t.onLevelLoading=function(e,t){var n=t.id,r=t.level,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:null,level:r,responseType:"text",type:c.PlaylistContextType.LEVEL,url:i,deliveryDirectives:a})},t.onAudioTrackLoading=function(e,t){var n=t.id,r=t.groupId,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:c.PlaylistContextType.AUDIO_TRACK,url:i,deliveryDirectives:a})},t.onSubtitleTrackLoading=function(e,t){var n=t.id,r=t.groupId,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:c.PlaylistContextType.SUBTITLE_TRACK,url:i,deliveryDirectives:a})},t.load=function(e){var t,n,r,i,a,s,l=this.hls.config,u=this.getInternalLoader(e);if(u){var d=u.context;if(d&&d.url===e.url)return void o.logger.trace("[playlist-loader]: playlist request ongoing");o.logger.log("[playlist-loader]: aborting previous loader for type: "+e.type),u.abort()}switch(e.type){case c.PlaylistContextType.MANIFEST:n=l.manifestLoadingMaxRetry,r=l.manifestLoadingTimeOut,i=l.manifestLoadingRetryDelay,a=l.manifestLoadingMaxRetryTimeout;break;case c.PlaylistContextType.LEVEL:case c.PlaylistContextType.AUDIO_TRACK:case c.PlaylistContextType.SUBTITLE_TRACK:n=0,r=l.levelLoadingTimeOut;break;default:n=l.levelLoadingMaxRetry,r=l.levelLoadingTimeOut,i=l.levelLoadingRetryDelay,a=l.levelLoadingMaxRetryTimeout}if(u=this.createInternalLoader(e),null!==(t=e.deliveryDirectives)&&void 0!==t&&t.part&&(e.type===c.PlaylistContextType.LEVEL&&null!==e.level?s=this.hls.levels[e.level].details:e.type===c.PlaylistContextType.AUDIO_TRACK&&null!==e.id?s=this.hls.audioTracks[e.id].details:e.type===c.PlaylistContextType.SUBTITLE_TRACK&&null!==e.id&&(s=this.hls.subtitleTracks[e.id].details),s)){var h=s.partTarget,f=s.targetduration;h&&f&&(r=Math.min(1e3*Math.max(3*h,.8*f),r))}var p={timeout:r,maxRetry:n,retryDelay:i,maxRetryDelay:a,highWaterMark:0},m={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(e,p,m)},t.loadsuccess=function(e,t,n,r){if(void 0===r&&(r=null),n.isSidxRequest)return this.handleSidxRequest(e,n),void this.handlePlaylistLoaded(e,t,n,r);this.resetInternalLoader(n.type);var i=e.data;0===i.indexOf("#EXTM3U")?(t.parsing.start=performance.now(),i.indexOf("#EXTINF:")>0||i.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(e,t,n,r):this.handleMasterPlaylist(e,t,n,r)):this.handleManifestParsingError(e,n,"no EXTM3U delimiter",r)},t.loaderror=function(e,t,n){void 0===n&&(n=null),this.handleNetworkError(t,n,!1,e)},t.loadtimeout=function(e,t,n){void 0===n&&(n=null),this.handleNetworkError(t,n,!0)},t.handleMasterPlaylist=function(e,t,n,r){var a=this.hls,s=e.data,c=d(e,n),h=l.default.parseMasterPlaylist(s,c),f=h.levels,p=h.sessionData;if(f.length){var m=f.map((function(e){return{id:e.attrs.AUDIO,audioCodec:e.audioCodec}})),g=f.map((function(e){return{id:e.attrs.SUBTITLES,textCodec:e.textCodec}})),v=l.default.parseMasterPlaylistMedia(s,c,"AUDIO",m),b=l.default.parseMasterPlaylistMedia(s,c,"SUBTITLES",g),y=l.default.parseMasterPlaylistMedia(s,c,"CLOSED-CAPTIONS");v.length&&(v.some((function(e){return!e.url}))||!f[0].audioCodec||f[0].attrs.AUDIO||(o.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),v.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new u.AttrList({}),bitrate:0,url:""}))),a.trigger(i.Events.MANIFEST_LOADED,{levels:f,audioTracks:v,subtitles:b,captions:y,url:c,stats:t,networkDetails:r,sessionData:p})}else this.handleManifestParsingError(e,n,"no level found in manifest",r)},t.handleTrackOrLevelPlaylist=function(e,t,n,o){var s=this.hls,h=n.id,f=n.level,p=n.type,m=d(e,n),g=Object(r.isFiniteNumber)(h)?h:0,v=Object(r.isFiniteNumber)(f)?f:g,b=function(e){switch(e.type){case c.PlaylistContextType.AUDIO_TRACK:return c.PlaylistLevelType.AUDIO;case c.PlaylistContextType.SUBTITLE_TRACK:return c.PlaylistLevelType.SUBTITLE;default:return c.PlaylistLevelType.MAIN}}(n),y=l.default.parseLevelPlaylist(e.data,m,v,b,g);if(y.fragments.length){if(p===c.PlaylistContextType.MANIFEST){var E={attrs:new u.AttrList({}),bitrate:0,details:y,name:"",url:m};s.trigger(i.Events.MANIFEST_LOADED,{levels:[E],audioTracks:[],url:m,stats:t,networkDetails:o,sessionData:null})}if(t.parsing.end=performance.now(),y.needSidxRanges){var x,_=null===(x=y.fragments[0].initSegment)||void 0===x?void 0:x.url;this.load({url:_,isSidxRequest:!0,type:p,level:f,levelDetails:y,id:h,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null})}else n.levelDetails=y,this.handlePlaylistLoaded(e,t,n,o)}else s.trigger(i.Events.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:m,reason:"no fragments found in level",level:"number"==typeof n.level?n.level:void 0})},t.handleSidxRequest=function(e,t){var n=Object(s.parseSegmentIndex)(new Uint8Array(e.data));if(n){var r=n.references,i=t.levelDetails;r.forEach((function(e,t){var r=e.info,a=i.fragments[t];0===a.byteRange.length&&a.setByteRange(String(1+r.end-r.start)+"@"+String(r.start)),a.initSegment&&a.initSegment.setByteRange(String(n.moovEndOffset)+"@0")}))}},t.handleManifestParsingError=function(e,t,n,r){this.hls.trigger(i.Events.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:t.type===c.PlaylistContextType.MANIFEST,url:e.url,reason:n,response:e,context:t,networkDetails:r})},t.handleNetworkError=function(e,t,n,r){void 0===n&&(n=!1),o.logger.warn("[playlist-loader]: A network "+(n?"timeout":"error")+" occurred while loading "+e.type+" level: "+e.level+" id: "+e.id+' group-id: "'+e.groupId+'"');var s=a.ErrorDetails.UNKNOWN,l=!1,u=this.getInternalLoader(e);switch(e.type){case c.PlaylistContextType.MANIFEST:s=n?a.ErrorDetails.MANIFEST_LOAD_TIMEOUT:a.ErrorDetails.MANIFEST_LOAD_ERROR,l=!0;break;case c.PlaylistContextType.LEVEL:s=n?a.ErrorDetails.LEVEL_LOAD_TIMEOUT:a.ErrorDetails.LEVEL_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.AUDIO_TRACK:s=n?a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.SUBTITLE_TRACK:s=n?a.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:a.ErrorDetails.SUBTITLE_LOAD_ERROR,l=!1}u&&this.resetInternalLoader(e.type);var d={type:a.ErrorTypes.NETWORK_ERROR,details:s,fatal:l,url:e.url,loader:u,context:e,networkDetails:t};r&&(d.response=r),this.hls.trigger(i.Events.ERROR,d)},t.handlePlaylistLoaded=function(e,t,n,r){var a=n.type,o=n.level,s=n.id,l=n.groupId,u=n.loader,d=n.levelDetails,h=n.deliveryDirectives;if(null!=d&&d.targetduration){if(u)switch(d.live&&(u.getCacheAge&&(d.ageHeader=u.getCacheAge()||0),u.getCacheAge&&!isNaN(d.ageHeader)||(d.ageHeader=0)),a){case c.PlaylistContextType.MANIFEST:case c.PlaylistContextType.LEVEL:this.hls.trigger(i.Events.LEVEL_LOADED,{details:d,level:o||0,id:s||0,stats:t,networkDetails:r,deliveryDirectives:h});break;case c.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(i.Events.AUDIO_TRACK_LOADED,{details:d,id:s||0,groupId:l||"",stats:t,networkDetails:r,deliveryDirectives:h});break;case c.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(i.Events.SUBTITLE_TRACK_LOADED,{details:d,id:s||0,groupId:l||"",stats:t,networkDetails:r,deliveryDirectives:h})}}else this.handleManifestParsingError(e,n,"invalid target duration",r)},e}();t.default=h},"./src/polyfills/number.ts":
|
|
|
/*!*********************************!*\
|
|
|
!*** ./src/polyfills/number.ts ***!
|
|
|
\*********************************/
|
|
|
/*! exports provided: isFiniteNumber, MAX_SAFE_INTEGER */function(e,t,n){"use strict";n.r(t),n.d(t,"isFiniteNumber",(function(){return r})),n.d(t,"MAX_SAFE_INTEGER",(function(){return i}));var r=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},i=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":
|
|
|
/*!*********************************!*\
|
|
|
!*** ./src/remux/aac-helper.ts ***!
|
|
|
\*********************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=function(){function e(){}return e.getSilentFrame=function(e,t){switch(e){case"mp4a.40.2":if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}},e}();t.default=r},"./src/remux/mp4-generator.ts":
|
|
|
/*!************************************!*\
|
|
|
!*** ./src/remux/mp4-generator.ts ***!
|
|
|
\************************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=Math.pow(2,32)-1,i=function(){function e(){}return e.init=function(){var t;for(t in e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),r=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);e.HDLR_TYPES={video:n,audio:r};var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),a=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=a,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);e.FTYP=e.box(e.types.ftyp,o,l,o,s),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,i))},e.box=function(e){for(var t=8,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(var a=r.length,o=a;a--;)t+=r[a].byteLength;var s=new Uint8Array(t);for(s[0]=t>>24&255,s[1]=t>>16&255,s[2]=t>>8&255,s[3]=255&t,s.set(e,4),a=0,t=8;a<o;a++)s.set(r[a],t),t+=r[a].byteLength;return s},e.hdlr=function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])},e.mdat=function(t){return e.box(e.types.mdat,t)},e.mdhd=function(t,n){n*=t;var i=Math.floor(n/(r+1)),a=Math.floor(n%(r+1));return e.box(e.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,85,196,0,0]))},e.mdia=function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))},e.mfhd=function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))},e.minf=function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))},e.moof=function(t,n,r){return e.box(e.types.moof,e.mfhd(t),e.traf(r,n))},e.moov=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trak(t[n]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(r).concat(e.mvex(t)))},e.mvex=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trex(t[n]);return e.box.apply(null,[e.types.mvex].concat(r))},e.mvhd=function(t,n){n*=t;var i=Math.floor(n/(r+1)),a=Math.floor(n%(r+1)),o=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e.box(e.types.mvhd,o)},e.sdtp=function(t){var n,r,i=t.samples||[],a=new Uint8Array(4+i.length);for(n=0;n<i.length;n++)r=i[n].flags,a[n+4]=r.dependsOn<<4|r.isDependedOn<<2|r.hasRedundancy;return e.box(e.types.sdtp,a)},e.stbl=function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.STTS),e.box(e.types.stsc,e.STSC),e.box(e.types.stsz,e.STSZ),e.box(e.types.stco,e.STCO))},e.avc1=function(t){var n,r,i,a=[],o=[];for(n=0;n<t.sps.length;n++)i=(r=t.sps[n]).byteLength,a.push(i>>>8&255),a.push(255&i),a=a.concat(Array.prototype.slice.call(r));for(n=0;n<t.pps.length;n++)i=(r=t.pps[n]).byteLength,o.push(i>>>8&255),o.push(255&i),o=o.concat(Array.prototype.slice.call(r));var s=e.box(e.types.avcC,new Uint8Array([1,a[3],a[4],a[5],255,224|t.sps.length].concat(a).concat([t.pps.length]).concat(o))),l=t.width,c=t.height,u=t.pixelRatio[0],d=t.pixelRatio[1];return e.box(e.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,c>>8&255,255&c,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,255&u,d>>24,d>>16&255,d>>8&255,255&d])))},e.esds=function(e){var t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))},e.mp4a=function(t){var n=t.samplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]),e.box(e.types.esds,e.esds(t)))},e.mp3=function(t){var n=t.samplerate;return e.box(e.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]))},e.stsd=function(t){return"audio"===t.type?t.isAAC||"mp3"!==t.codec?e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.mp3(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))},e.tkhd=function(t){var n=t.id,i=t.duration*t.timescale,a=t.width,o=t.height,s=Math.floor(i/(r+1)),l=Math.floor(i%(r+1));return e.box(e.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,l>>24,l>>16&255,l>>8&255,255&l,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,a>>8&255,255&a,0,0,o>>8&255,255&o,0,0]))},e.traf=function(t,n){var i=e.sdtp(t),a=t.id,o=Math.floor(n/(r+1)),s=Math.floor(n%(r+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,s>>24,s>>16&255,s>>8&255,255&s])),e.trun(t,i.length+16+20+8+16+8+8),i)},e.trak=function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))},e.trex=function(t){var n=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},e.trun=function(t,n){var r,i,a,o,s,l,c=t.samples||[],u=c.length,d=12+16*u,h=new Uint8Array(d);for(n+=8+d,h.set([0,0,15,1,u>>>24&255,u>>>16&255,u>>>8&255,255&u,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),r=0;r<u;r++)a=(i=c[r]).duration,o=i.size,s=i.flags,l=i.cts,h.set([a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*r);return e.box(e.types.trun,h)},e.initSegment=function(t){e.types||e.init();var n=e.moov(t),r=new Uint8Array(e.FTYP.byteLength+n.byteLength);return r.set(e.FTYP),r.set(n,e.FTYP.byteLength),r},e}();i.types=void 0,i.HDLR_TYPES=void 0,i.STTS=void 0,i.STSC=void 0,i.STCO=void 0,i.STSZ=void 0,i.VMHD=void 0,i.SMHD=void 0,i.STSD=void 0,i.FTYP=void 0,i.DINF=void 0,t.default=i},"./src/remux/mp4-remuxer.ts":
|
|
|
/*!**********************************!*\
|
|
|
!*** ./src/remux/mp4-remuxer.ts ***!
|
|
|
\**********************************/
|
|
|
/*! exports provided: default, normalizePts */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return m})),n.d(t,"normalizePts",(function(){return g}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./aac-helper */"./src/remux/aac-helper.ts"),a=n(/*! ./mp4-generator */"./src/remux/mp4-generator.ts"),o=n(/*! ../events */"./src/events.ts"),s=n(/*! ../errors */"./src/errors.ts"),l=n(/*! ../utils/logger */"./src/utils/logger.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts"),u=n(/*! ../utils/timescale-conversion */"./src/utils/timescale-conversion.ts");function d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var h=null,f=null,p=!1,m=function(){function e(e,t,n,r){if(void 0===r&&(r=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=e,this.config=t,this.typeSupported=n,this.ISGenerated=!1,null===h){var i=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);h=i?parseInt(i[1]):0}if(null===f){var a=navigator.userAgent.match(/Safari\/(\d+)/i);f=a?parseInt(a[1]):0}p=!!h&&h<75||!!f&&f<600}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(e){l.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e},t.resetNextTimestamp=function(){l.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},t.resetInitSegment=function(){l.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},t.getVideoStartPts=function(e){var t=!1,n=e.reduce((function(e,n){var r=n.pts-e;return r<-4294967296?(t=!0,g(e,n.pts)):r>0?e:n.pts}),e[0].pts);return t&&l.logger.debug("PTS rollover detected"),n},t.remux=function(e,t,n,r,i,a,o,s){var u,d,h,f,p,m,v=i,b=i,y=e.pid>-1,E=t.pid>-1,x=t.samples.length,_=e.samples.length>0,k=x>1;if((!y||_)&&(!E||k)||this.ISGenerated||o){this.ISGenerated||(h=this.generateIS(e,t,i));var w=this.isVideoContiguous,C=-1;if(k&&(C=function(e){for(var t=0;t<e.length;t++)if(e[t].key)return t;return-1}(t.samples),!w&&this.config.forceKeyFrameOnDiscontinuity))if(m=!0,C>0){l.logger.warn("[mp4-remuxer]: Dropped "+C+" out of "+x+" video samples due to a missing keyframe");var S=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(C),t.dropped+=C,b+=(t.samples[0].pts-S)/(t.timescale||9e4)}else-1===C&&(l.logger.warn("[mp4-remuxer]: No keyframe found out of "+x+" video samples"),m=!1);if(this.ISGenerated){if(_&&k){var O=this.getVideoStartPts(t.samples),A=(g(e.samples[0].pts,O)-O)/t.inputTimeScale;v+=Math.max(0,A),b+=Math.max(0,-A)}if(_){if(e.samplerate||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),h=this.generateIS(e,t,i)),d=this.remuxAudio(e,v,this.isAudioContiguous,a,E||k||s===c.PlaylistLevelType.AUDIO?b:void 0),k){var T=d?d.endPTS-d.startPTS:0;t.inputTimeScale||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),h=this.generateIS(e,t,i)),u=this.remuxVideo(t,b,w,T)}}else k&&(u=this.remuxVideo(t,b,w,0));u&&(u.firstKeyFrame=C,u.independent=-1!==C)}}return this.ISGenerated&&(n.samples.length&&(p=this.remuxID3(n,i)),r.samples.length&&(f=this.remuxText(r,i))),{audio:d,video:u,initSegment:h,independent:m,text:f,id3:p}},t.generateIS=function(e,t,n){var i,o,s,l=e.samples,c=t.samples,u=this.typeSupported,d={},h=!Object(r.isFiniteNumber)(this._initPTS),f="audio/mp4";if(h&&(i=o=1/0),e.config&&l.length&&(e.timescale=e.samplerate,e.isAAC||(u.mpeg?(f="audio/mpeg",e.codec=""):u.mp3&&(e.codec="mp3")),d.audio={id:"audio",container:f,codec:e.codec,initSegment:!e.isAAC&&u.mpeg?new Uint8Array(0):a.default.initSegment([e]),metadata:{channelCount:e.channelCount}},h&&(s=e.inputTimeScale,i=o=l[0].pts-Math.round(s*n))),t.sps&&t.pps&&c.length&&(t.timescale=t.inputTimeScale,d.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:a.default.initSegment([t]),metadata:{width:t.width,height:t.height}},h)){s=t.inputTimeScale;var p=this.getVideoStartPts(c),m=Math.round(s*n);o=Math.min(o,g(c[0].dts,p)-m),i=Math.min(i,p-m)}if(Object.keys(d).length)return this.ISGenerated=!0,h&&(this._initPTS=i,this._initDTS=o),{tracks:d,initPTS:i,timescale:s}},t.remuxVideo=function(e,t,n,r){var i,c,f,m=e.inputTimeScale,b=e.samples,y=[],E=b.length,x=this._initPTS,_=this.nextAvcDts,k=8,w=Number.POSITIVE_INFINITY,C=Number.NEGATIVE_INFINITY,S=0,O=!1;n&&null!==_||(_=t*m-(b[0].pts-g(b[0].dts,b[0].pts)));for(var A=0;A<E;A++){var T=b[A];T.pts=g(T.pts-x,_),T.dts=g(T.dts-x,_),T.dts>T.pts&&(S=Math.max(Math.min(S,T.pts-T.dts),-18e3)),T.dts<b[A>0?A-1:A].dts&&(O=!0)}O&&b.sort((function(e,t){var n=e.dts-t.dts,r=e.pts-t.pts;return n||r})),c=b[0].dts,f=b[b.length-1].dts;var I=Math.round((f-c)/(E-1));if(S<0){if(S<-2*I){l.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(u.toMsFromMpegTsClock)(-I,!0)+" ms");for(var D=S,L=0;L<E;L++)b[L].dts=D=Math.max(D,b[L].pts-I),b[L].pts=Math.max(D,b[L].pts)}else{l.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(u.toMsFromMpegTsClock)(S,!0)+" ms to overcome this issue");for(var R=0;R<E;R++)b[R].dts=b[R].dts+S}c=b[0].dts}if(n){var N=c-_,j=N>I;if(j||N<-1){j?l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(N,!0)+" ms ("+N+"dts) hole between fragments detected, filling it"):l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(-N,!0)+" ms ("+N+"dts) overlapping between fragments detected"),c=_;var M=b[0].pts-N;b[0].dts=c,b[0].pts=M,l.logger.log("Video: First PTS/DTS adjusted: "+Object(u.toMsFromMpegTsClock)(M,!0)+"/"+Object(u.toMsFromMpegTsClock)(c,!0)+", delta: "+Object(u.toMsFromMpegTsClock)(N,!0)+" ms")}}p&&(c=Math.max(0,c));for(var P=0,B=0,F=0;F<E;F++){for(var U=b[F],H=U.units,z=H.length,G=0,V=0;V<z;V++)G+=H[V].data.length;B+=G,P+=z,U.length=G,U.dts=Math.max(U.dts,c),U.pts=Math.max(U.pts,U.dts,0),w=Math.min(U.pts,w),C=Math.max(U.pts,C)}f=b[E-1].dts;var W,K=B+4*P+8;try{W=new Uint8Array(K)}catch(e){return void this.observer.emit(o.Events.ERROR,o.Events.ERROR,{type:s.ErrorTypes.MUX_ERROR,details:s.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:K,reason:"fail allocating video mdat "+K})}var q=new DataView(W.buffer);q.setUint32(0,K),W.set(a.default.types.mdat,4);for(var Y=0;Y<E;Y++){for(var Q=b[Y],J=Q.units,X=0,Z=0,$=J.length;Z<$;Z++){var ee=J[Z],te=ee.data,ne=ee.data.byteLength;q.setUint32(k,ne),k+=4,W.set(te,k),k+=ne,X+=4+ne}if(Y<E-1)i=b[Y+1].dts-Q.dts;else{var re=this.config,ie=Q.dts-b[Y>0?Y-1:Y].dts;if(re.stretchShortVideoTrack&&null!==this.nextAudioPts){var ae=Math.floor(re.maxBufferHole*m),oe=(r?w+r*m:this.nextAudioPts)-Q.pts;oe>ae?((i=oe-ie)<0&&(i=ie),l.logger.log("[mp4-remuxer]: It is approximately "+oe/90+" ms to the next segment; using duration "+i/90+" ms for the last video frame.")):i=ie}else i=ie}var se=Math.round(Q.pts-Q.dts);y.push(new v(Q.key,i,X,se))}if(y.length&&h&&h<70){var le=y[0].flags;le.dependsOn=2,le.isNonSync=0}console.assert(void 0!==i,"mp4SampleDuration must be computed"),this.nextAvcDts=_=f+i,this.isVideoContiguous=!0;var ce={data1:a.default.moof(e.sequenceNumber++,c,d({},e,{samples:y})),data2:W,startPTS:w/m,endPTS:(C+i)/m,startDTS:c/m,endDTS:_/m,type:"video",hasAudio:!1,hasVideo:!0,nb:y.length,dropped:e.dropped};return e.samples=[],e.dropped=0,console.assert(W.length,"MDAT length must not be zero"),ce},t.remuxAudio=function(e,t,n,r,c){var u=e.inputTimeScale,h=u/(e.samplerate?e.samplerate:u),f=e.isAAC?1024:1152,p=f*h,m=this._initPTS,b=!e.isAAC&&this.typeSupported.mpeg,y=[],E=e.samples,x=b?0:8,_=this.nextAudioPts||-1,k=t*u;if(this.isAudioContiguous=n=n||E.length&&_>0&&(r&&Math.abs(k-_)<9e3||Math.abs(g(E[0].pts-m,k)-_)<20*p),E.forEach((function(e){e.pts=g(e.pts-m,k)})),!n||_<0){if(!(E=E.filter((function(e){return e.pts>=0}))).length)return;_=0===c?0:r?Math.max(0,k):E[0].pts}if(e.isAAC)for(var w=void 0!==c,C=this.config.maxAudioFramesDrift,S=0,O=_;S<E.length;S++){var A=E[S],T=A.pts,I=T-O,D=Math.abs(1e3*I/u);if(I<=-C*p&&w)0===S&&(l.logger.warn("Audio frame @ "+(T/u).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*I/u)+" ms."),this.nextAudioPts=_=O=T);else if(I>=C*p&&D<1e4&&w){var L=Math.round(I/p);(O=T-L*p)<0&&(L--,O+=p),0===S&&(this.nextAudioPts=_=O),l.logger.warn("[mp4-remuxer]: Injecting "+L+" audio frame @ "+(O/u).toFixed(3)+"s due to "+Math.round(1e3*I/u)+" ms gap.");for(var R=0;R<L;R++){var N=Math.max(O,0),j=i.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);j||(l.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),j=A.unit.subarray()),E.splice(S,0,{unit:j,pts:N}),O+=p,S++}}A.pts=O,O+=p}for(var M,P=null,B=null,F=0,U=E.length;U--;)F+=E[U].unit.byteLength;for(var H=0,z=E.length;H<z;H++){var G=E[H],V=G.unit,W=G.pts;if(null!==B)y[H-1].duration=Math.round((W-B)/h);else{if(n&&e.isAAC&&(W=_),P=W,!(F>0))return;F+=x;try{M=new Uint8Array(F)}catch(e){return void this.observer.emit(o.Events.ERROR,o.Events.ERROR,{type:s.ErrorTypes.MUX_ERROR,details:s.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:F,reason:"fail allocating audio mdat "+F})}b||(new DataView(M.buffer).setUint32(0,F),M.set(a.default.types.mdat,4))}M.set(V,x);var K=V.byteLength;x+=K,y.push(new v(!0,f,K,0)),B=W}var q=y.length;if(q){var Y=y[y.length-1];this.nextAudioPts=_=B+h*Y.duration;var Q=b?new Uint8Array(0):a.default.moof(e.sequenceNumber++,P/h,d({},e,{samples:y}));e.samples=[];var J=P/u,X=_/u,Z={data1:Q,data2:M,startPTS:J,endPTS:X,startDTS:J,endDTS:X,type:"audio",hasAudio:!0,hasVideo:!1,nb:q};return this.isAudioContiguous=!0,console.assert(M.length,"MDAT length must not be zero"),Z}},t.remuxEmptyAudio=function(e,t,n,r){var a=e.inputTimeScale,o=a/(e.samplerate?e.samplerate:a),s=this.nextAudioPts,c=(null!==s?s:r.startDTS*a)+this._initDTS,u=r.endDTS*a+this._initDTS,d=1024*o,h=Math.ceil((u-c)/d),f=i.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(l.logger.warn("[mp4-remuxer]: remux empty Audio"),f){for(var p=[],m=0;m<h;m++){var g=c+m*d;p.push({unit:f,pts:g,dts:g})}return e.samples=p,this.remuxAudio(e,t,n,!1)}l.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec")},t.remuxID3=function(e,t){var n=e.samples.length;if(n){for(var r=e.inputTimeScale,i=this._initPTS,a=this._initDTS,o=0;o<n;o++){var s=e.samples[o];s.pts=g(s.pts-i,t*r)/r,s.dts=g(s.dts-a,t*r)/r}var l=e.samples;return e.samples=[],{samples:l}}},t.remuxText=function(e,t){var n=e.samples.length;if(n){for(var r=e.inputTimeScale,i=this._initPTS,a=0;a<n;a++){var o=e.samples[a];o.pts=g(o.pts-i,t*r)/r}e.samples.sort((function(e,t){return e.pts-t.pts}));var s=e.samples;return e.samples=[],{samples:s}}},e}();function g(e,t){var n;if(null===t)return e;for(n=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=n;return e}var v=function(e,t,n,r){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=t,this.size=n,this.cts=r,this.flags=new b(e)},b=function(e){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=e?2:1,this.isNonSync=e?0:1}},"./src/remux/passthrough-remuxer.ts":
|
|
|
/*!******************************************!*\
|
|
|
!*** ./src/remux/passthrough-remuxer.ts ***!
|
|
|
\******************************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),a=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=function(){function e(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(e){this.initPTS=e,this.lastEndDTS=null},t.resetNextTimestamp=function(){this.lastEndDTS=null},t.resetInitSegment=function(e,t,n){this.audioCodec=t,this.videoCodec=n,this.generateInitSegment(e),this.emitInitSegment=!0},t.generateInitSegment=function(e){var t=this.audioCodec,n=this.videoCodec;if(!e||!e.byteLength)return this.initTracks=void 0,void(this.initData=void 0);var r=this.initData=Object(i.parseInitSegment)(e);t||(t=c(r.audio,a.ElementaryStreamTypes.AUDIO)),n||(n=c(r.video,a.ElementaryStreamTypes.VIDEO));var s={};r.audio&&r.video?s.audiovideo={container:"video/mp4",codec:t+","+n,initSegment:e,id:"main"}:r.audio?s.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:r.video?s.video={container:"video/mp4",codec:n,initSegment:e,id:"main"}:o.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=s},t.remux=function(e,t,n,a,s){var c=this.initPTS,u=this.lastEndDTS,d={audio:void 0,video:void 0,text:a,id3:n,initSegment:void 0};Object(r.isFiniteNumber)(u)||(u=this.lastEndDTS=s||0);var h=t.samples;if(!h||!h.length)return d;var f={initPTS:void 0,timescale:1},p=this.initData;if(p&&p.length||(this.generateInitSegment(h),p=this.initData),!p||!p.length)return o.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),d;this.emitInitSegment&&(f.tracks=this.initTracks,this.emitInitSegment=!1),Object(r.isFiniteNumber)(c)||(this.initPTS=f.initPTS=c=l(p,h,u));var m=Object(i.getDuration)(h,p),g=u,v=m+g;Object(i.offsetStartDTS)(p,h,c),m>0?this.lastEndDTS=v:(o.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var b=!!p.audio,y=!!p.video,E="";b&&(E+="audio"),y&&(E+="video");var x={data1:h,startPTS:g,startDTS:g,endPTS:v,endDTS:v,type:E,hasAudio:b,hasVideo:y,nb:1,dropped:0};return d.audio="audio"===x.type?x:void 0,d.video="audio"!==x.type?x:void 0,d.text=a,d.id3=n,d.initSegment=f,d},e}(),l=function(e,t,n){return Object(i.getStartDTS)(e,t)-n};function c(e,t){var n=null==e?void 0:e.codec;return n&&n.length>4?n:"hvc1"===n?"hvc1.1.c.L120.90":"av01"===n?"av01.0.04M.08":"avc1"===n||t===a.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}t.default=s},"./src/task-loop.ts":
|
|
|
/*!**************************!*\
|
|
|
!*** ./src/task-loop.ts ***!
|
|
|
\**************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return r}));var r=function(){function e(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var t=e.prototype;return t.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},t.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},t.onHandlerDestroyed=function(){},t.hasInterval=function(){return!!this._tickInterval},t.hasNextTick=function(){return!!this._tickTimer},t.setInterval=function(e){return!this._tickInterval&&(this._tickInterval=self.setInterval(this._boundTick,e),!0)},t.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},t.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},t.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},t.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},t.doTick=function(){},e}()},"./src/types/cmcd.ts":
|
|
|
/*!***************************!*\
|
|
|
!*** ./src/types/cmcd.ts ***!
|
|
|
\***************************/
|
|
|
/*! exports provided: CMCDVersion, CMCDObjectType, CMCDStreamingFormat, CMCDStreamType */function(e,t,n){"use strict";n.r(t),n.d(t,"CMCDVersion",(function(){return o})),n.d(t,"CMCDObjectType",(function(){return r})),n.d(t,"CMCDStreamingFormat",(function(){return i})),n.d(t,"CMCDStreamType",(function(){return a}));var r,i,a,o=1;!function(e){e.MANIFEST="m",e.AUDIO="a",e.VIDEO="v",e.MUXED="av",e.INIT="i",e.CAPTION="c",e.TIMED_TEXT="tt",e.KEY="k",e.OTHER="o"}(r||(r={})),function(e){e.DASH="d",e.HLS="h",e.SMOOTH="s",e.OTHER="o"}(i||(i={})),function(e){e.VOD="v",e.LIVE="l"}(a||(a={}))},"./src/types/level.ts":
|
|
|
/*!****************************!*\
|
|
|
!*** ./src/types/level.ts ***!
|
|
|
\****************************/
|
|
|
/*! exports provided: HlsSkip, getSkipValue, HlsUrlParameters, Level */function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i;function a(e,t){var n=e.canSkipUntil,r=e.canSkipDateRanges,a=e.endSN;return n&&(void 0!==t?t-a:0)<n?r?i.v2:i.Yes:i.No}n.r(t),n.d(t,"HlsSkip",(function(){return i})),n.d(t,"getSkipValue",(function(){return a})),n.d(t,"HlsUrlParameters",(function(){return o})),n.d(t,"Level",(function(){return s})),function(e){e.No="",e.Yes="YES",e.v2="v2"}(i||(i={}));var o=function(){function e(e,t,n){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=n}return e.prototype.addDirectives=function(e){var t=new self.URL(e);return void 0!==this.msn&&t.searchParams.set("_HLS_msn",this.msn.toString()),void 0!==this.part&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.toString()},e}(),s=function(){function e(e){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[e.url],this.attrs=e.attrs,this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.unknownCodecs=e.unknownCodecs,this.codecSet=[e.videoCodec,e.audioCodec].filter((function(e){return e})).join(",").replace(/\.[^.,]+/g,"")}var t,n,i;return t=e,(n=[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(e){var t=e%this.url.length;this._urlId!==t&&(this.details=void 0,this._urlId=t)}}])&&r(t.prototype,n),i&&r(t,i),e}()},"./src/types/loader.ts":
|
|
|
/*!*****************************!*\
|
|
|
!*** ./src/types/loader.ts ***!
|
|
|
\*****************************/
|
|
|
/*! exports provided: PlaylistContextType, PlaylistLevelType */function(e,t,n){"use strict";var r,i;n.r(t),n.d(t,"PlaylistContextType",(function(){return r})),n.d(t,"PlaylistLevelType",(function(){return i})),function(e){e.MANIFEST="manifest",e.LEVEL="level",e.AUDIO_TRACK="audioTrack",e.SUBTITLE_TRACK="subtitleTrack"}(r||(r={})),function(e){e.MAIN="main",e.AUDIO="audio",e.SUBTITLE="subtitle"}(i||(i={}))},"./src/types/transmuxer.ts":
|
|
|
/*!*********************************!*\
|
|
|
!*** ./src/types/transmuxer.ts ***!
|
|
|
\*********************************/
|
|
|
/*! exports provided: ChunkMetadata */function(e,t,n){"use strict";n.r(t),n.d(t,"ChunkMetadata",(function(){return r}));var r=function(e,t,n,r,i,a){void 0===r&&(r=0),void 0===i&&(i=-1),void 0===a&&(a=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing={start:0,executeStart:0,executeEnd:0,end:0},this.buffering={audio:{start:0,executeStart:0,executeEnd:0,end:0},video:{start:0,executeStart:0,executeEnd:0,end:0},audiovideo:{start:0,executeStart:0,executeEnd:0,end:0}},this.level=e,this.sn=t,this.id=n,this.size=r,this.part=i,this.partial=a}},"./src/utils/attr-list.ts":
|
|
|
/*!********************************!*\
|
|
|
!*** ./src/utils/attr-list.ts ***!
|
|
|
\********************************/
|
|
|
/*! exports provided: AttrList */function(e,t,n){"use strict";n.r(t),n.d(t,"AttrList",(function(){return a}));var r=/^(\d+)x(\d+)$/,i=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,a=function(){function e(t){for(var n in"string"==typeof t&&(t=e.parseAttrList(t)),t)t.hasOwnProperty(n)&&(this[n]=t[n])}var t=e.prototype;return t.decimalInteger=function(e){var t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.hexadecimalInteger=function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var n=new Uint8Array(t.length/2),r=0;r<t.length/2;r++)n[r]=parseInt(t.slice(2*r,2*r+2),16);return n}return null},t.hexadecimalIntegerAsNumber=function(e){var t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.decimalFloatingPoint=function(e){return parseFloat(this[e])},t.optionalFloat=function(e,t){var n=this[e];return n?parseFloat(n):t},t.enumeratedString=function(e){return this[e]},t.bool=function(e){return"YES"===this[e]},t.decimalResolution=function(e){var t=r.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}},e.parseAttrList=function(e){var t,n={};for(i.lastIndex=0;null!==(t=i.exec(e));){var r=t[2];0===r.indexOf('"')&&r.lastIndexOf('"')===r.length-1&&(r=r.slice(1,-1)),n[t[1]]=r}return n},e}()},"./src/utils/binary-search.ts":
|
|
|
/*!************************************!*\
|
|
|
!*** ./src/utils/binary-search.ts ***!
|
|
|
\************************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),t.default={search:function(e,t){for(var n=0,r=e.length-1,i=null,a=null;n<=r;){var o=t(a=e[i=(n+r)/2|0]);if(o>0)n=i+1;else{if(!(o<0))return a;r=i-1}}return null}}},"./src/utils/buffer-helper.ts":
|
|
|
/*!************************************!*\
|
|
|
!*** ./src/utils/buffer-helper.ts ***!
|
|
|
\************************************/
|
|
|
/*! exports provided: BufferHelper */function(e,t,n){"use strict";n.r(t),n.d(t,"BufferHelper",(function(){return a}));var r=n(/*! ./logger */"./src/utils/logger.ts"),i={length:0,start:function(){return 0},end:function(){return 0}},a=function(){function e(){}return e.isBuffered=function(t,n){try{if(t)for(var r=e.getBuffered(t),i=0;i<r.length;i++)if(n>=r.start(i)&&n<=r.end(i))return!0}catch(e){}return!1},e.bufferInfo=function(t,n,r){try{if(t){var i,a=e.getBuffered(t),o=[];for(i=0;i<a.length;i++)o.push({start:a.start(i),end:a.end(i)});return this.bufferedInfo(o,n,r)}}catch(e){}return{len:0,start:n,end:n,nextStart:void 0}},e.bufferedInfo=function(e,t,n){t=Math.max(0,t),e.sort((function(e,t){var n=e.start-t.start;return n||t.end-e.end}));var r=[];if(n)for(var i=0;i<e.length;i++){var a=r.length;if(a){var o=r[a-1].end;e[i].start-o<n?e[i].end>o&&(r[a-1].end=e[i].end):r.push(e[i])}else r.push(e[i])}else r=e;for(var s,l=0,c=t,u=t,d=0;d<r.length;d++){var h=r[d].start,f=r[d].end;if(t+n>=h&&t<f)c=h,l=(u=f)-t;else if(t+n<h){s=h;break}}return{len:l,start:c||0,end:u||0,nextStart:s}},e.getBuffered=function(e){try{return e.buffered}catch(e){return r.logger.log("failed to get media.buffered",e),i}},e}()},"./src/utils/cea-608-parser.ts":
|
|
|
/*!*************************************!*\
|
|
|
!*** ./src/utils/cea-608-parser.ts ***!
|
|
|
\*************************************/
|
|
|
/*! exports provided: Row, CaptionScreen, default */function(e,t,n){"use strict";n.r(t),n.d(t,"Row",(function(){return g})),n.d(t,"CaptionScreen",(function(){return v}));var r,i=n(/*! ../utils/logger */"./src/utils/logger.ts"),a={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},o=function(e){var t=e;return a.hasOwnProperty(e)&&(t=a[e]),String.fromCharCode(t)},s={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},l={17:2,18:4,21:6,22:8,23:10,19:13,20:15},c={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},u={25:2,26:4,29:6,30:8,31:10,27:13,28:15},d=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];!function(e){e[e.ERROR=0]="ERROR",e[e.TEXT=1]="TEXT",e[e.WARNING=2]="WARNING",e[e.INFO=2]="INFO",e[e.DEBUG=3]="DEBUG",e[e.DATA=3]="DATA"}(r||(r={}));var h=function(){function e(){this.time=null,this.verboseLevel=r.ERROR}return e.prototype.log=function(e,t){this.verboseLevel>=e&&i.logger.log(this.time+" ["+e+"] "+t)},e}(),f=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].toString(16));return t},p=function(){function e(e,t,n,r,i){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=e||"white",this.underline=t||!1,this.italics=n||!1,this.background=r||"black",this.flash=i||!1}var t=e.prototype;return t.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},t.setStyles=function(e){for(var t=["foreground","underline","italics","background","flash"],n=0;n<t.length;n++){var r=t[n];e.hasOwnProperty(r)&&(this[r]=e[r])}},t.isDefault=function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},t.equals=function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash},t.copy=function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash},t.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},e}(),m=function(){function e(e,t,n,r,i,a){this.uchar=void 0,this.penState=void 0,this.uchar=e||" ",this.penState=new p(t,n,r,i,a)}var t=e.prototype;return t.reset=function(){this.uchar=" ",this.penState.reset()},t.setChar=function(e,t){this.uchar=e,this.penState.copy(t)},t.setPenState=function(e){this.penState.copy(e)},t.equals=function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)},t.copy=function(e){this.uchar=e.uchar,this.penState.copy(e.penState)},t.isEmpty=function(){return" "===this.uchar&&this.penState.isDefault()},e}(),g=function(){function e(e){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var t=0;t<100;t++)this.chars.push(new m);this.logger=e,this.pos=0,this.currPenState=new p}var t=e.prototype;return t.equals=function(e){for(var t=!0,n=0;n<100;n++)if(!this.chars[n].equals(e.chars[n])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<100;t++)this.chars[t].copy(e.chars[t])},t.isEmpty=function(){for(var e=!0,t=0;t<100;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e},t.setCursor=function(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(r.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>100&&(this.logger.log(r.DEBUG,"Too large cursor position "+this.pos),this.pos=100)},t.moveCursor=function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)},t.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},t.insertChar=function(e){e>=144&&this.backSpace();var t=o(e);this.pos>=100?this.logger.log(r.ERROR,"Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))},t.clearFromPos=function(e){var t;for(t=e;t<100;t++)this.chars[t].reset()},t.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},t.clearToEndOfRow=function(){this.clearFromPos(this.pos)},t.getTextString=function(){for(var e=[],t=!0,n=0;n<100;n++){var r=this.chars[n].uchar;" "!==r&&(t=!1),e.push(r)}return t?"":e.join("")},t.setPenStyles=function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)},e}(),v=function(){function e(e){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var t=0;t<15;t++)this.rows.push(new g(e));this.logger=e,this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var t=e.prototype;return t.reset=function(){for(var e=0;e<15;e++)this.rows[e].clear();this.currRow=14},t.equals=function(e){for(var t=!0,n=0;n<15;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<15;t++)this.rows[t].copy(e.rows[t])},t.isEmpty=function(){for(var e=!0,t=0;t<15;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},t.backSpace=function(){this.rows[this.currRow].backSpace()},t.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},t.insertChar=function(e){this.rows[this.currRow].insertChar(e)},t.setPen=function(e){this.rows[this.currRow].setPenStyles(e)},t.moveCursor=function(e){this.rows[this.currRow].moveCursor(e)},t.setCursor=function(e){this.logger.log(r.INFO,"setCursor: "+e),this.rows[this.currRow].setCursor(e)},t.setPAC=function(e){this.logger.log(r.INFO,"pacData = "+JSON.stringify(e));var t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(var n=0;n<15;n++)this.rows[n].clear();var i=this.currRow+1-this.nrRollUpRows,a=this.lastOutputScreen;if(a){var o=a.rows[i].cueStartTime,s=this.logger.time;if(o&&null!==s&&o<s)for(var l=0;l<this.nrRollUpRows;l++)this.rows[t-this.nrRollUpRows+l+1].copy(a.rows[i+l])}}this.currRow=t;var c=this.rows[this.currRow];if(null!==e.indent){var u=e.indent,d=Math.max(u-1,0);c.setCursor(e.indent),e.color=c.chars[d].penState.foreground}var h={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(h)},t.setBkgData=function(e){this.logger.log(r.INFO,"bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)},t.setRollUpRows=function(e){this.nrRollUpRows=e},t.rollUp=function(){if(null!==this.nrRollUpRows){this.logger.log(r.TEXT,this.getDisplayText());var e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(r.INFO,"Rolling up")}else this.logger.log(r.DEBUG,"roll_up but nrRollUpRows not set yet")},t.getDisplayText=function(e){e=e||!1;for(var t=[],n="",r=-1,i=0;i<15;i++){var a=this.rows[i].getTextString();a&&(r=i+1,e?t.push("Row "+r+": '"+a+"'"):t.push(a.trim()))}return t.length>0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n},t.getTextAndFormat=function(){return this.rows},e}(),b=function(){function e(e,t,n){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new v(n),this.nonDisplayedMemory=new v(n),this.lastOutputScreen=new v(n),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=n}var t=e.prototype;return t.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},t.getHandler=function(){return this.outputFilter},t.setHandler=function(e){this.outputFilter=e},t.setPAC=function(e){this.writeScreen.setPAC(e)},t.setBkgData=function(e){this.writeScreen.setBkgData(e)},t.setMode=function(e){e!==this.mode&&(this.mode=e,this.logger.log(r.INFO,"MODE="+e),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)},t.insertChars=function(e){for(var t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);var n=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(r.INFO,n+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(r.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},t.ccRCL=function(){this.logger.log(r.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},t.ccBS=function(){this.logger.log(r.INFO,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},t.ccAOF=function(){},t.ccAON=function(){},t.ccDER=function(){this.logger.log(r.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},t.ccRU=function(e){this.logger.log(r.INFO,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},t.ccFON=function(){this.logger.log(r.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},t.ccRDC=function(){this.logger.log(r.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},t.ccTR=function(){this.logger.log(r.INFO,"TR"),this.setMode("MODE_TEXT")},t.ccRTD=function(){this.logger.log(r.INFO,"RTD"),this.setMode("MODE_TEXT")},t.ccEDM=function(){this.logger.log(r.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},t.ccCR=function(){this.logger.log(r.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},t.ccENM=function(){this.logger.log(r.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},t.ccEOC=function(){if(this.logger.log(r.INFO,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(r.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},t.ccTO=function(e){this.logger.log(r.INFO,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)},t.ccMIDROW=function(e){var t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][n]}this.logger.log(r.INFO,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},t.outputDataUpdate=function(e){void 0===e&&(e=!1);var t=this.logger.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))},t.cueSplitAtTime=function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))},e}(),y=function(){function e(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var r=new h;this.channels=[null,new b(e,t,r),new b(e+1,n,r)],this.cmdHistory={a:null,b:null},this.logger=r}var t=e.prototype;return t.getHandler=function(e){return this.channels[e].getHandler()},t.setHandler=function(e,t){this.channels[e].setHandler(t)},t.addData=function(e,t){var n,i,a,o=!1;this.logger.time=e;for(var s=0;s<t.length;s+=2)if(i=127&t[s],a=127&t[s+1],0!==i||0!==a){if(this.logger.log(r.DATA,"["+f([t[s],t[s+1]])+"] -> ("+f([i,a])+")"),(n=this.parseCmd(i,a))||(n=this.parseMidrow(i,a)),n||(n=this.parsePAC(i,a)),n||(n=this.parseBackgroundAttributes(i,a)),!n&&(o=this.parseChars(i,a))){var l=this.currentChannel;l&&l>0?this.channels[l].insertChars(o):this.logger.log(r.WARNING,"No channel found yet. TEXT-MODE?")}n||o||this.logger.log(r.WARNING,"Couldn't parse cleaned data "+f([i,a])+" orig: "+f([t[s],t[s+1]]))}},t.parseCmd=function(e,t){var n=this.cmdHistory;if(!((20===e||28===e||21===e||29===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=33&&t<=35))return!1;if(x(e,t,n))return E(null,null,n),this.logger.log(r.DEBUG,"Repeated command ("+f([e,t])+") is dropped"),!0;var i=20===e||21===e||23===e?1:2,a=this.channels[i];return 20===e||21===e||28===e||29===e?32===t?a.ccRCL():33===t?a.ccBS():34===t?a.ccAOF():35===t?a.ccAON():36===t?a.ccDER():37===t?a.ccRU(2):38===t?a.ccRU(3):39===t?a.ccRU(4):40===t?a.ccFON():41===t?a.ccRDC():42===t?a.ccTR():43===t?a.ccRTD():44===t?a.ccEDM():45===t?a.ccCR():46===t?a.ccENM():47===t&&a.ccEOC():a.ccTO(t-32),E(e,t,n),this.currentChannel=i,!0},t.parseMidrow=function(e,t){var n=0;if((17===e||25===e)&&t>=32&&t<=47){if((n=17===e?1:2)!==this.currentChannel)return this.logger.log(r.ERROR,"Mismatch channel in midrow parsing"),!1;var i=this.channels[n];return!!i&&(i.ccMIDROW(t),this.logger.log(r.DEBUG,"MIDROW ("+f([e,t])+")"),!0)}return!1},t.parsePAC=function(e,t){var n,r=this.cmdHistory;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127||(16===e||24===e)&&t>=64&&t<=95))return!1;if(x(e,t,r))return E(null,null,r),!0;var i=e<=23?1:2;n=t>=64&&t<=95?1===i?s[e]:c[e]:1===i?l[e]:u[e];var a=this.channels[i];return!!a&&(a.setPAC(this.interpretPAC(n,t)),E(e,t,r),this.currentChannel=i,!0)},t.interpretPAC=function(e,t){var n,r={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,r.underline=1==(1&n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r},t.parseChars=function(e,t){var n,i,a=null,s=null;if(e>=25?(n=2,s=e-8):(n=1,s=e),s>=17&&s<=19?(i=17===s?t+80:18===s?t+112:t+144,this.logger.log(r.INFO,"Special char '"+o(i)+"' in channel "+n),a=[i]):e>=32&&e<=127&&(a=0===t?[e]:[e,t]),a){var l=f(a);this.logger.log(r.DEBUG,"Char codes = "+l.join(",")),E(e,t,this.cmdHistory)}return a},t.parseBackgroundAttributes=function(e,t){var n;if(!((16===e||24===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=45&&t<=47))return!1;var r={};16===e||24===e?(n=Math.floor((t-32)/2),r.background=d[n],t%2==1&&(r.background=r.background+"_semi")):45===t?r.background="transparent":(r.foreground="black",47===t&&(r.underline=!0));var i=e<=23?1:2;return this.channels[i].setBkgData(r),E(e,t,this.cmdHistory),!0},t.reset=function(){for(var e=0;e<Object.keys(this.channels).length;e++){var t=this.channels[e];t&&t.reset()}this.cmdHistory={a:null,b:null}},t.cueSplitAtTime=function(e){for(var t=0;t<this.channels.length;t++){var n=this.channels[t];n&&n.cueSplitAtTime(e)}},e}();function E(e,t,n){n.a=e,n.b=t}function x(e,t,n){return n.a===e&&n.b===t}t.default=y},"./src/utils/codecs.ts":
|
|
|
/*!*****************************!*\
|
|
|
!*** ./src/utils/codecs.ts ***!
|
|
|
\*****************************/
|
|
|
/*! exports provided: isCodecType, isCodecSupportedInMp4 */function(e,t,n){"use strict";n.r(t),n.d(t,"isCodecType",(function(){return i})),n.d(t,"isCodecSupportedInMp4",(function(){return a}));var r={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function i(e,t){var n=r[t];return!!n&&!0===n[e.slice(0,4)]}function a(e,t){return MediaSource.isTypeSupported((t||"video")+'/mp4;codecs="'+e+'"')}},"./src/utils/cues.ts":
|
|
|
/*!***************************!*\
|
|
|
!*** ./src/utils/cues.ts ***!
|
|
|
\***************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./vttparser */"./src/utils/vttparser.ts"),i=n(/*! ./webvtt-parser */"./src/utils/webvtt-parser.ts"),a=n(/*! ./texttrack-utils */"./src/utils/texttrack-utils.ts"),o=/\s/,s={newCue:function(e,t,n,s){for(var l,c,u,d,h,f=[],p=self.VTTCue||self.TextTrackCue,m=0;m<s.rows.length;m++)if(u=!0,d=0,h="",!(l=s.rows[m]).isEmpty()){for(var g=0;g<l.chars.length;g++)o.test(l.chars[g].uchar)&&u?d++:(h+=l.chars[g].uchar,u=!1);l.cueStartTime=t,t===n&&(n+=1e-4),d>=16?d--:d++;var v=Object(r.fixLineBreaks)(h.trim()),b=Object(i.generateCueId)(t,n,v);e&&e.cues&&e.cues.getCueById(b)||((c=new p(t,n,v)).id=b,c.line=m+1,c.align="left",c.position=10+Math.min(80,10*Math.floor(8*d/32)),f.push(c))}return e&&f.length&&(f.sort((function(e,t){return"auto"===e.line||"auto"===t.line?0:e.line>8&&t.line>8?t.line-e.line:e.line-t.line})),f.forEach((function(t){return Object(a.addCueToTrack)(e,t)}))),f}};t.default=s},"./src/utils/discontinuities.ts":
|
|
|
/*!**************************************!*\
|
|
|
!*** ./src/utils/discontinuities.ts ***!
|
|
|
\**************************************/
|
|
|
/*! exports provided: findFirstFragWithCC, shouldAlignOnDiscontinuities, findDiscontinuousReferenceFrag, adjustSlidingStart, alignStream, alignPDT, alignFragmentByPDTDelta, alignMediaPlaylistByPDT */function(e,t,n){"use strict";n.r(t),n.d(t,"findFirstFragWithCC",(function(){return o})),n.d(t,"shouldAlignOnDiscontinuities",(function(){return s})),n.d(t,"findDiscontinuousReferenceFrag",(function(){return l})),n.d(t,"adjustSlidingStart",(function(){return u})),n.d(t,"alignStream",(function(){return d})),n.d(t,"alignPDT",(function(){return h})),n.d(t,"alignFragmentByPDTDelta",(function(){return f})),n.d(t,"alignMediaPlaylistByPDT",(function(){return p}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./logger */"./src/utils/logger.ts"),a=n(/*! ../controller/level-helper */"./src/controller/level-helper.ts");function o(e,t){for(var n=null,r=0,i=e.length;r<i;r++){var a=e[r];if(a&&a.cc===t){n=a;break}}return n}function s(e,t,n){return!(!t.details||!(n.endCC>n.startCC||e&&e.cc<n.startCC))}function l(e,t){var n=e.fragments,r=t.fragments;if(r.length&&n.length){var a=o(n,r[0].cc);if(a&&(!a||a.startPTS))return a;i.logger.log("No frag in previous level to align on")}else i.logger.log("No fragments to align")}function c(e,t){if(e){var n=e.start+t;e.start=e.startPTS=n,e.endPTS=n+e.duration}}function u(e,t){for(var n=t.fragments,r=0,i=n.length;r<i;r++)c(n[r],e);t.fragmentHint&&c(t.fragmentHint,e),t.alignedSliding=!0}function d(e,t,n){t&&(function(e,t,n){if(s(e,n,t)){var a=l(n.details,t);a&&Object(r.isFiniteNumber)(a.start)&&(i.logger.log("Adjusting PTS using last level due to CC increase within current level "+t.url),u(a.start,t))}}(e,n,t),!n.alignedSliding&&t.details&&h(n,t.details),n.alignedSliding||!t.details||n.skippedSegments||Object(a.adjustSliding)(t.details,n))}function h(e,t){if(t.fragments.length&&e.hasProgramDateTime&&t.hasProgramDateTime){var n=t.fragments[0].programDateTime,a=e.fragments[0].programDateTime,o=(a-n)/1e3+t.fragments[0].start;o&&Object(r.isFiniteNumber)(o)&&(i.logger.log("Adjusting PTS using programDateTime delta "+(a-n)+"ms, sliding:"+o.toFixed(3)+" "+e.url+" "),u(o,e))}}function f(e,t){var n=e.programDateTime;if(n){var r=(n-t)/1e3;e.start=e.startPTS=r,e.endPTS=r+e.duration}}function p(e,t){if(t.fragments.length&&e.hasProgramDateTime&&t.hasProgramDateTime){var n=t.fragments[0].programDateTime-1e3*t.fragments[0].start;e.fragments.forEach((function(e){f(e,n)})),e.fragmentHint&&f(e.fragmentHint,n),e.alignedSliding=!0}}},"./src/utils/ewma-bandwidth-estimator.ts":
|
|
|
/*!***********************************************!*\
|
|
|
!*** ./src/utils/ewma-bandwidth-estimator.ts ***!
|
|
|
\***********************************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../utils/ewma */"./src/utils/ewma.ts"),i=function(){function e(e,t,n){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=n,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new r.default(e),this.fast_=new r.default(t)}var t=e.prototype;return t.update=function(e,t){var n=this.slow_,i=this.fast_;this.slow_.halfLife!==e&&(this.slow_=new r.default(e,n.getEstimate(),n.getTotalWeight())),this.fast_.halfLife!==t&&(this.fast_=new r.default(t,i.getEstimate(),i.getTotalWeight()))},t.sample=function(e,t){var n=(e=Math.max(e,this.minDelayMs_))/1e3,r=8*t/n;this.fast_.sample(n,r),this.slow_.sample(n,r)},t.canEstimate=function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_},t.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.destroy=function(){},e}();t.default=i},"./src/utils/ewma.ts":
|
|
|
/*!***************************!*\
|
|
|
!*** ./src/utils/ewma.ts ***!
|
|
|
\***************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=function(){function e(e,t,n){void 0===t&&(t=0),void 0===n&&(n=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=n}var t=e.prototype;return t.sample=function(e,t){var n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e},t.getTotalWeight=function(){return this.totalWeight_},t.getEstimate=function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_},e}();t.default=r},"./src/utils/fetch-loader.ts":
|
|
|
/*!***********************************!*\
|
|
|
!*** ./src/utils/fetch-loader.ts ***!
|
|
|
\***********************************/
|
|
|
/*! exports provided: fetchSupported, default */function(e,t,n){"use strict";n.r(t),n.d(t,"fetchSupported",(function(){return h}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),a=n(/*! ../demux/chunk-cache */"./src/demux/chunk-cache.ts");function o(e){var t="function"==typeof Map?new Map:void 0;return(o=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return s(e,arguments,u(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,e)})(e)}function s(e,t,n){return(s=l()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&c(i,n.prototype),i}).apply(null,arguments)}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function h(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(e){}return!1}var f=function(){function e(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||p,this.controller=new self.AbortController,this.stats=new i.LoadStats}var t=e.prototype;return t.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},t.abortInternal=function(){var e=this.response;e&&e.ok||(this.stats.aborted=!0,this.controller.abort())},t.abort=function(){var e;this.abortInternal(),null!==(e=this.callbacks)&&void 0!==e&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},t.load=function(e,t,n){var i=this,a=this.stats;if(a.loading.start)throw new Error("Loader can only be used once.");a.loading.start=self.performance.now();var o=function(e,t){var n={method:"GET",mode:"cors",credentials:"same-origin",signal:t,headers:new self.Headers(d({},e.headers))};return e.rangeEnd&&n.headers.set("Range","bytes="+e.rangeStart+"-"+String(e.rangeEnd-1)),n}(e,this.controller.signal),s=n.onProgress,l="arraybuffer"===e.responseType,c=l?"byteLength":"length";this.context=e,this.config=t,this.callbacks=n,this.request=this.fetchSetup(e,o),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout((function(){i.abortInternal(),n.onTimeout(a,e,i.response)}),t.timeout),self.fetch(this.request).then((function(n){if(i.response=i.loader=n,!n.ok){var o=n.status,c=n.statusText;throw new m(c||"fetch, bad network response",o,n)}return a.loading.first=Math.max(self.performance.now(),a.loading.start),a.total=parseInt(n.headers.get("Content-Length")||"0"),s&&Object(r.isFiniteNumber)(t.highWaterMark)?i.loadProgressively(n,a,e,t.highWaterMark,s):l?n.arrayBuffer():n.text()})).then((function(o){var l=i.response;self.clearTimeout(i.requestTimeout),a.loading.end=Math.max(self.performance.now(),a.loading.first),a.loaded=a.total=o[c];var u={url:l.url,data:o};s&&!Object(r.isFiniteNumber)(t.highWaterMark)&&s(a,e,o,l),n.onSuccess(u,a,e,l)})).catch((function(t){if(self.clearTimeout(i.requestTimeout),!a.aborted){var r=t.code||0;n.onError({code:r,text:t.message},e,t.details)}}))},t.getCacheAge=function(){var e=null;if(this.response){var t=this.response.headers.get("age");e=t?parseFloat(t):null}return e},t.loadProgressively=function(e,t,n,r,i){void 0===r&&(r=0);var o=new a.default,s=e.body.getReader();return function a(){return s.read().then((function(s){if(s.done)return o.dataLength&&i(t,n,o.flush(),e),Promise.resolve(new ArrayBuffer(0));var l=s.value,c=l.length;return t.loaded+=c,c<r||o.dataLength?(o.push(l),o.dataLength>=r&&i(t,n,o.flush(),e)):i(t,n,l,e),a()})).catch((function(){return Promise.reject()}))}()},e}();function p(e,t){return new self.Request(e.url,t)}var m=function(e){var t,n;function r(t,n,r){var i;return(i=e.call(this,t)||this).code=void 0,i.details=void 0,i.code=n,i.details=r,i}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n),r}(o(Error));t.default=f},"./src/utils/imsc1-ttml-parser.ts":
|
|
|
/*!****************************************!*\
|
|
|
!*** ./src/utils/imsc1-ttml-parser.ts ***!
|
|
|
\****************************************/
|
|
|
/*! exports provided: IMSC1_CODEC, parseIMSC1 */function(e,t,n){"use strict";n.r(t),n.d(t,"IMSC1_CODEC",(function(){return u})),n.d(t,"parseIMSC1",(function(){return p}));var r=n(/*! ./mp4-tools */"./src/utils/mp4-tools.ts"),i=n(/*! ./vttparser */"./src/utils/vttparser.ts"),a=n(/*! ./vttcue */"./src/utils/vttcue.ts"),o=n(/*! ../demux/id3 */"./src/demux/id3.ts"),s=n(/*! ./timescale-conversion */"./src/utils/timescale-conversion.ts"),l=n(/*! ./webvtt-parser */"./src/utils/webvtt-parser.ts");function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var u="stpp.ttml.im1t",d=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,h=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,f={left:"start",center:"center",right:"end",start:"start",end:"end"};function p(e,t,n,i,u){var d=Object(r.findBox)(new Uint8Array(e),["mdat"]);if(0!==d.length){var h=d[0],p=Object(o.utf8ArrayToStr)(new Uint8Array(e,h.start,h.end-h.start)),E=Object(s.toTimescaleFromScale)(t,1,n);try{i(function(e,t){var n=(new DOMParser).parseFromString(e,"text/xml").getElementsByTagName("tt")[0];if(!n)throw new Error("Invalid ttml");var r={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},i=Object.keys(r).reduce((function(e,t){return e[t]=n.getAttribute("ttp:"+t)||r[t],e}),{}),o="preserve"!==n.getAttribute("xml:space"),s=g(m(n,"styling","style")),u=g(m(n,"layout","region")),d=m(n,"body","[begin]");return[].map.call(d,(function(e){var n=function e(t,n){return[].slice.call(t.childNodes).reduce((function(t,r,i){var a;return"br"===r.nodeName&&i?t+"\n":null!==(a=r.childNodes)&&void 0!==a&&a.length?e(r,n):n?t+r.textContent.trim().replace(/\s+/g," "):t+r.textContent}),"")}(e,o);if(!n||!e.hasAttribute("begin"))return null;var r=y(e.getAttribute("begin"),i),d=y(e.getAttribute("dur"),i),h=y(e.getAttribute("end"),i);if(null===r)throw b(e);if(null===h){if(null===d)throw b(e);h=r+d}var p=new a.default(r-t,h-t,n);p.id=Object(l.generateCueId)(p.startTime,p.endTime,p.text);var m=u[e.getAttribute("region")],g=s[e.getAttribute("style")];p.position=10,p.size=80;var E=function(e,t){var n="http://www.w3.org/ns/ttml#styling";return["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"].reduce((function(r,i){var a=v(t,n,i)||v(e,n,i);return a&&(r[i]=a),r}),{})}(m,g),x=E.textAlign;if(x){var _=f[x];_&&(p.lineAlign=_),p.align=x}return c(p,E),p})).filter((function(e){return null!==e}))}(p,E))}catch(e){u(e)}}else u(new Error("Could not parse IMSC1 mdat"))}function m(e,t,n){var r=e.getElementsByTagName(t)[0];return r?[].slice.call(r.querySelectorAll(n)):[]}function g(e){return e.reduce((function(e,t){var n=t.getAttribute("xml:id");return n&&(e[n]=t),e}),{})}function v(e,t,n){return e.hasAttributeNS(t,n)?e.getAttributeNS(t,n):null}function b(e){return new Error("Could not parse ttml timestamp "+e)}function y(e,t){if(!e)return null;var n=Object(i.parseTimeStamp)(e);return null===n&&(d.test(e)?n=function(e,t){var n=d.exec(e),r=(0|n[4])+(0|n[5])/t.subFrameRate;return 3600*(0|n[1])+60*(0|n[2])+(0|n[3])+r/t.frameRate}(e,t):h.test(e)&&(n=function(e,t){var n=h.exec(e),r=Number(n[1]);switch(n[2]){case"h":return 3600*r;case"m":return 60*r;case"ms":return 1e3*r;case"f":return r/t.frameRate;case"t":return r/t.tickRate}return r}(e,t))),n}},"./src/utils/logger.ts":
|
|
|
/*!*****************************!*\
|
|
|
!*** ./src/utils/logger.ts ***!
|
|
|
\*****************************/
|
|
|
/*! exports provided: enableLogs, logger */function(e,t,n){"use strict";n.r(t),n.d(t,"enableLogs",(function(){return s})),n.d(t,"logger",(function(){return l}));var r=function(){},i={trace:r,debug:r,log:r,warn:r,info:r,error:r},a=i;function o(e){var t=self.console[e];return t?t.bind(self.console,"["+e+"] >"):r}function s(e){if(self.console&&!0===e||"object"==typeof e){!function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];n.forEach((function(t){a[t]=e[t]?e[t].bind(e):o(t)}))}(e,"debug","log","info","warn","error");try{a.log()}catch(e){a=i}}else a=i}var l=i},"./src/utils/mediakeys-helper.ts":
|
|
|
/*!***************************************!*\
|
|
|
!*** ./src/utils/mediakeys-helper.ts ***!
|
|
|
\***************************************/
|
|
|
/*! exports provided: KeySystems, requestMediaKeySystemAccess */function(e,t,n){"use strict";var r;n.r(t),n.d(t,"KeySystems",(function(){return r})),n.d(t,"requestMediaKeySystemAccess",(function(){return i})),function(e){e.WIDEVINE="com.widevine.alpha",e.PLAYREADY="com.microsoft.playready"}(r||(r={}));var i="undefined"!=typeof self&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null},"./src/utils/mediasource-helper.ts":
|
|
|
/*!*****************************************!*\
|
|
|
!*** ./src/utils/mediasource-helper.ts ***!
|
|
|
\*****************************************/
|
|
|
/*! exports provided: getMediaSource */function(e,t,n){"use strict";function r(){return self.MediaSource||self.WebKitMediaSource}n.r(t),n.d(t,"getMediaSource",(function(){return r}))},"./src/utils/mp4-tools.ts":
|
|
|
/*!********************************!*\
|
|
|
!*** ./src/utils/mp4-tools.ts ***!
|
|
|
\********************************/
|
|
|
/*! exports provided: bin2str, readUint16, readUint32, writeUint32, findBox, parseSegmentIndex, parseInitSegment, getStartDTS, getDuration, computeRawDurationFromSamples, offsetStartDTS, segmentValidRange, appendUint8Array */function(e,t,n){"use strict";n.r(t),n.d(t,"bin2str",(function(){return s})),n.d(t,"readUint16",(function(){return l})),n.d(t,"readUint32",(function(){return c})),n.d(t,"writeUint32",(function(){return u})),n.d(t,"findBox",(function(){return d})),n.d(t,"parseSegmentIndex",(function(){return h})),n.d(t,"parseInitSegment",(function(){return f})),n.d(t,"getStartDTS",(function(){return p})),n.d(t,"getDuration",(function(){return m})),n.d(t,"computeRawDurationFromSamples",(function(){return g})),n.d(t,"offsetStartDTS",(function(){return v})),n.d(t,"segmentValidRange",(function(){return b})),n.d(t,"appendUint8Array",(function(){return y}));var r=n(/*! ./typed-array */"./src/utils/typed-array.ts"),i=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),a=Math.pow(2,32)-1,o=[].push;function s(e){return String.fromCharCode.apply(null,e)}function l(e,t){"data"in e&&(t+=e.start,e=e.data);var n=e[t]<<8|e[t+1];return n<0?65536+n:n}function c(e,t){"data"in e&&(t+=e.start,e=e.data);var n=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3];return n<0?4294967296+n:n}function u(e,t,n){"data"in e&&(t+=e.start,e=e.data),e[t]=n>>24,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n}function d(e,t){var n,r,i,a=[];if(!t.length)return a;"data"in e?(n=e.data,r=e.start,i=e.end):(r=0,i=(n=e).byteLength);for(var l=r;l<i;){var u=c(n,l),h=u>1?l+u:i;if(s(n.subarray(l+4,l+8))===t[0])if(1===t.length)a.push({data:n,start:l+8,end:h});else{var f=d({data:n,start:l+8,end:h},t.slice(1));f.length&&o.apply(a,f)}l=h}return a}function h(e){var t=d(e,["moov"])[0],n=t?t.end:null,r=d(e,["sidx"]);if(!r||!r[0])return null;var i=[],a=r[0],o=a.data[0],s=0===o?8:16,u=c(a,s);s+=4,s+=0===o?8:16,s+=2;var h=a.end+0,f=l(a,s);s+=2;for(var p=0;p<f;p++){var m=s,g=c(a,m);m+=4;var v=2147483647&g;if(1==(2147483648&g)>>>31)return console.warn("SIDX has hierarchical references (not supported)"),null;var b=c(a,m);m+=4,i.push({referenceSize:v,subsegmentDuration:b,info:{duration:b/u,start:h,end:h+v-1}}),h+=v,s=m+=4}return{earliestPresentationTime:0,timescale:u,version:o,referencesCount:f,references:i,moovEndOffset:n}}function f(e){for(var t=[],n=d(e,["moov","trak"]),r=0;r<n.length;r++){var a=n[r],o=d(a,["tkhd"])[0];if(o){var l=o.data[o.start],u=0===l?12:20,h=c(o,u),f=d(a,["mdia","mdhd"])[0];if(f){var p=c(f,u=0===(l=f.data[f.start])?12:20),m=d(a,["mdia","hdlr"])[0];if(m){var g=s(m.data.subarray(m.start+8,m.start+12)),v={soun:i.ElementaryStreamTypes.AUDIO,vide:i.ElementaryStreamTypes.VIDEO}[g];if(v){var b=d(a,["mdia","minf","stbl","stsd"])[0],y=void 0;b&&(y=s(b.data.subarray(b.start+12,b.start+16))),t[h]={timescale:p,type:v},t[v]={timescale:p,id:h,codec:y}}}}}}return d(e,["moov","mvex","trex"]).forEach((function(e){var n=c(e,4),r=t[n];r&&(r.default={duration:c(e,12),flags:c(e,20)})})),t}function p(e,t){return d(t,["moof","traf"]).reduce((function(t,n){var r=d(n,["tfdt"])[0],i=r.data[r.start],a=d(n,["tfhd"]).reduce((function(t,n){var a=c(n,4),o=e[a];if(o){var s=c(r,4);1===i&&(s*=Math.pow(2,32),s+=c(r,8));var l=s/(o.timescale||9e4);if(isFinite(l)&&(null===t||l<t))return l}return t}),null);return null!==a&&isFinite(a)&&(null===t||a<t)?a:t}),null)||0}function m(e,t){for(var n=0,r=0,a=0,o=d(e,["moof","traf"]),s=0;s<o.length;s++){var l=o[s],u=d(l,["tfhd"])[0],f=t[c(u,4)];if(f){var p=f.default,m=c(u,0)|(null==p?void 0:p.flags),v=null==p?void 0:p.duration;8&m&&(v=c(u,2&m?12:8));for(var b=f.timescale||9e4,y=d(l,["trun"]),E=0;E<y.length;E++)n=v?v*c(y[E],4):g(y[E]),f.type===i.ElementaryStreamTypes.VIDEO?r+=n/b:f.type===i.ElementaryStreamTypes.AUDIO&&(a+=n/b)}}if(0===r&&0===a){var x=h(e);if(null!=x&&x.references)return x.references.reduce((function(e,t){return e+t.info.duration||0}),0)}return r||a}function g(e){var t=c(e,0),n=8;1&t&&(n+=4),4&t&&(n+=4);for(var r=0,i=c(e,4),a=0;a<i;a++)256&t&&(r+=c(e,n),n+=4),512&t&&(n+=4),1024&t&&(n+=4),2048&t&&(n+=4);return r}function v(e,t,n){d(t,["moof","traf"]).forEach((function(t){d(t,["tfhd"]).forEach((function(r){var i=c(r,4),o=e[i];if(o){var s=o.timescale||9e4;d(t,["tfdt"]).forEach((function(e){var t=e.data[e.start],r=c(e,4);if(0===t)u(e,4,r-n*s);else{r*=Math.pow(2,32),r+=c(e,8),r-=n*s,r=Math.max(r,0);var i=Math.floor(r/(a+1)),o=Math.floor(r%(a+1));u(e,4,i),u(e,8,o)}}))}}))}))}function b(e){var t={valid:null,remainder:null},n=d(e,["moof"]);if(!n)return t;if(n.length<2)return t.remainder=e,t;var i=n[n.length-1];return t.valid=Object(r.sliceUint8)(e,0,i.start-8),t.remainder=Object(r.sliceUint8)(e,i.start-8),t}function y(e,t){var n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}},"./src/utils/output-filter.ts":
|
|
|
/*!************************************!*\
|
|
|
!*** ./src/utils/output-filter.ts ***!
|
|
|
\************************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return r}));var r=function(){function e(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}var t=e.prototype;return t.dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)},t.newCue=function(e,t,n){(null===this.startTime||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)},t.reset=function(){this.cueRanges=[]},e}()},"./src/utils/texttrack-utils.ts":
|
|
|
/*!**************************************!*\
|
|
|
!*** ./src/utils/texttrack-utils.ts ***!
|
|
|
\**************************************/
|
|
|
/*! exports provided: sendAddTrackEvent, addCueToTrack, clearCurrentCues, removeCuesInRange, getCuesInRange */function(e,t,n){"use strict";n.r(t),n.d(t,"sendAddTrackEvent",(function(){return i})),n.d(t,"addCueToTrack",(function(){return a})),n.d(t,"clearCurrentCues",(function(){return o})),n.d(t,"removeCuesInRange",(function(){return s})),n.d(t,"getCuesInRange",(function(){return l}));var r=n(/*! ./logger */"./src/utils/logger.ts");function i(e,t){var n;try{n=new Event("addtrack")}catch(e){(n=document.createEvent("Event")).initEvent("addtrack",!1,!1)}n.track=e,t.dispatchEvent(n)}function a(e,t){var n=e.mode;if("disabled"===n&&(e.mode="hidden"),e.cues&&!e.cues.getCueById(t.id))try{if(e.addCue(t),!e.cues.getCueById(t.id))throw new Error("addCue is failed for: "+t)}catch(n){r.logger.debug("[texttrack-utils]: "+n);var i=new self.TextTrackCue(t.startTime,t.endTime,t.text);i.id=t.id,e.addCue(i)}"disabled"===n&&(e.mode=n)}function o(e){var t=e.mode;if("disabled"===t&&(e.mode="hidden"),e.cues)for(var n=e.cues.length;n--;)e.removeCue(e.cues[n]);"disabled"===t&&(e.mode=t)}function s(e,t,n){var r=e.mode;if("disabled"===r&&(e.mode="hidden"),e.cues&&e.cues.length>0)for(var i=l(e.cues,t,n),a=0;a<i.length;a++)e.removeCue(i[a]);"disabled"===r&&(e.mode=r)}function l(e,t,n){var r=[],i=function(e,t){if(t<e[0].startTime)return 0;var n=e.length-1;if(t>e[n].endTime)return-1;for(var r=0,i=n;r<=i;){var a=Math.floor((i+r)/2);if(t<e[a].startTime)i=a-1;else{if(!(t>e[a].startTime&&r<n))return a;r=a+1}}return e[r].startTime-t<t-e[i].startTime?r:i}(e,t);if(i>-1)for(var a=i,o=e.length;a<o;a++){var s=e[a];if(s.startTime>=t&&s.endTime<=n)r.push(s);else if(s.startTime>n)return r}return r}},"./src/utils/time-ranges.ts":
|
|
|
/*!**********************************!*\
|
|
|
!*** ./src/utils/time-ranges.ts ***!
|
|
|
\**********************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),t.default={toString:function(e){for(var t="",n=e.length,r=0;r<n;r++)t+="["+e.start(r).toFixed(3)+","+e.end(r).toFixed(3)+"]";return t}}},"./src/utils/timescale-conversion.ts":
|
|
|
/*!*******************************************!*\
|
|
|
!*** ./src/utils/timescale-conversion.ts ***!
|
|
|
\*******************************************/
|
|
|
/*! exports provided: toTimescaleFromBase, toTimescaleFromScale, toMsFromMpegTsClock, toMpegTsClockFromTimescale */function(e,t,n){"use strict";function r(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=!1);var i=e*t*n;return r?Math.round(i):i}function i(e,t,n,i){return void 0===n&&(n=1),void 0===i&&(i=!1),r(e,t,1/n,i)}function a(e,t){return void 0===t&&(t=!1),r(e,1e3,1/9e4,t)}function o(e,t){return void 0===t&&(t=1),r(e,9e4,1/t)}n.r(t),n.d(t,"toTimescaleFromBase",(function(){return r})),n.d(t,"toTimescaleFromScale",(function(){return i})),n.d(t,"toMsFromMpegTsClock",(function(){return a})),n.d(t,"toMpegTsClockFromTimescale",(function(){return o}))},"./src/utils/typed-array.ts":
|
|
|
/*!**********************************!*\
|
|
|
!*** ./src/utils/typed-array.ts ***!
|
|
|
\**********************************/
|
|
|
/*! exports provided: sliceUint8 */function(e,t,n){"use strict";function r(e,t,n){return Uint8Array.prototype.slice?e.slice(t,n):new Uint8Array(Array.prototype.slice.call(e,t,n))}n.r(t),n.d(t,"sliceUint8",(function(){return r}))},"./src/utils/vttcue.ts":
|
|
|
/*!*****************************!*\
|
|
|
!*** ./src/utils/vttcue.ts ***!
|
|
|
\*****************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),t.default=function(){if("undefined"!=typeof self&&self.VTTCue)return self.VTTCue;var e=["","lr","rl"],t=["start","middle","end","left","right"];function n(e,t){if("string"!=typeof t)return!1;if(!Array.isArray(e))return!1;var n=t.toLowerCase();return!!~e.indexOf(n)&&n}function r(e){return n(t,e)}function i(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=1;i<arguments.length;i++){var a=arguments[i];for(var o in a)e[o]=a[o]}return e}function a(t,a,o){var s=this,l={enumerable:!0};s.hasBeenReset=!1;var c="",u=!1,d=t,h=a,f=o,p=null,m="",g=!0,v="auto",b="start",y=50,E="middle",x=50,_="middle";Object.defineProperty(s,"id",i({},l,{get:function(){return c},set:function(e){c=""+e}})),Object.defineProperty(s,"pauseOnExit",i({},l,{get:function(){return u},set:function(e){u=!!e}})),Object.defineProperty(s,"startTime",i({},l,{get:function(){return d},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");d=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"endTime",i({},l,{get:function(){return h},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");h=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"text",i({},l,{get:function(){return f},set:function(e){f=""+e,this.hasBeenReset=!0}})),Object.defineProperty(s,"region",i({},l,{get:function(){return p},set:function(e){p=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"vertical",i({},l,{get:function(){return m},set:function(t){var r=function(t){return n(e,t)}(t);if(!1===r)throw new SyntaxError("An invalid or illegal string was specified.");m=r,this.hasBeenReset=!0}})),Object.defineProperty(s,"snapToLines",i({},l,{get:function(){return g},set:function(e){g=!!e,this.hasBeenReset=!0}})),Object.defineProperty(s,"line",i({},l,{get:function(){return v},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");v=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"lineAlign",i({},l,{get:function(){return b},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");b=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"position",i({},l,{get:function(){return y},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",i({},l,{get:function(){return E},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");E=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",i({},l,{get:function(){return x},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");x=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",i({},l,{get:function(){return _},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");_=t,this.hasBeenReset=!0}})),s.displayState=void 0}return a.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},a}()},"./src/utils/vttparser.ts":
|
|
|
/*!********************************!*\
|
|
|
!*** ./src/utils/vttparser.ts ***!
|
|
|
\********************************/
|
|
|
/*! exports provided: parseTimeStamp, fixLineBreaks, VTTParser */function(e,t,n){"use strict";n.r(t),n.d(t,"parseTimeStamp",(function(){return a})),n.d(t,"fixLineBreaks",(function(){return d})),n.d(t,"VTTParser",(function(){return h}));var r=n(/*! ./vttcue */"./src/utils/vttcue.ts"),i=function(){function e(){}return e.prototype.decode=function(e,t){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))},e}();function a(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+parseFloat(r||0)}var n=e.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return n?parseFloat(n[2])>59?t(n[2],n[3],0,n[4]):t(n[1],n[2],n[3],n[4]):null}var o=function(){function e(){this.values=Object.create(null)}var t=e.prototype;return t.set=function(e,t){this.get(e)||""===t||(this.values[e]=t)},t.get=function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},t.has=function(e){return e in this.values},t.alt=function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},t.integer=function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},t.percent=function(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){var n=parseFloat(t);if(n>=0&&n<=100)return this.set(e,n),!0}return!1},e}();function s(e,t,n,r){var i=r?e.split(r):[e];for(var a in i)if("string"==typeof i[a]){var o=i[a].split(n);2===o.length&&t(o[0],o[1])}}var l=new r.default(0,0,""),c="middle"===l.align?"middle":"center";function u(e,t,n){var r=e;function i(){var t=a(e);if(null===t)throw new Error("Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function u(){e=e.replace(/^\s+/,"")}if(u(),t.startTime=i(),u(),"--\x3e"!==e.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),u(),t.endTime=i(),u(),function(e,t){var r=new o;s(e,(function(e,t){var i;switch(e){case"region":for(var a=n.length-1;a>=0;a--)if(n[a].id===t){r.set(e,n[a].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":i=t.split(","),r.integer(e,i[0]),r.percent(e,i[0])&&r.set("snapToLines",!1),r.alt(e,i[0],["auto"]),2===i.length&&r.alt("lineAlign",i[1],["start",c,"end"]);break;case"position":i=t.split(","),r.percent(e,i[0]),2===i.length&&r.alt("positionAlign",i[1],["start",c,"end","line-left","line-right","auto"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start",c,"end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");var i=r.get("line","auto");"auto"===i&&-1===l.line&&(i=-1),t.line=i,t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align",c);var a=r.get("position","auto");"auto"===a&&50===l.position&&(a="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=a}(e,t)}function d(e){return e.replace(/<br(?: \/)?>/gi,"\n")}var h=function(){function e(){this.state="INITIAL",this.buffer="",this.decoder=new i,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var t=e.prototype;return t.parse=function(e){var t=this;function n(){var e=t.buffer,n=0;for(e=d(e);n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var r=e.substr(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.substr(n),r}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var i="";if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var a=(i=n()).match(/^()?WEBVTT([ \t].*)?$/);if(!a||!a[0])throw new Error("Malformed WebVTT signature.");t.state="HEADER"}for(var o=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(o?o=!1:i=n(),t.state){case"HEADER":/:/.test(i)?s(i,(function(e,t){}),/:/):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;if(t.cue=new r.default(0,0,""),t.state="CUE",-1===i.indexOf("--\x3e")){t.cue.id=i;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{u(i,t.cue,t.regionList)}catch(e){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var l=-1!==i.indexOf("--\x3e");if(!i||l&&(o=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(null===t.cue)continue;t.cue.text&&(t.cue.text+="\n"),t.cue.text+=i;continue;case"BADCUE":i||(t.state="ID")}}}catch(e){"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},t.flush=function(){try{if((this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state||"BADWEBVTT"===this.state)throw new Error("Malformed WebVTT signature.")}catch(e){this.onparsingerror&&this.onparsingerror(e)}return this.onflush&&this.onflush(),this},e}()},"./src/utils/webvtt-parser.ts":
|
|
|
/*!************************************!*\
|
|
|
!*** ./src/utils/webvtt-parser.ts ***!
|
|
|
\************************************/
|
|
|
/*! exports provided: generateCueId, parseWebVTT */function(e,t,n){"use strict";n.r(t),n.d(t,"generateCueId",(function(){return d})),n.d(t,"parseWebVTT",(function(){return h}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./vttparser */"./src/utils/vttparser.ts"),a=n(/*! ../demux/id3 */"./src/demux/id3.ts"),o=n(/*! ./timescale-conversion */"./src/utils/timescale-conversion.ts"),s=n(/*! ../remux/mp4-remuxer */"./src/remux/mp4-remuxer.ts"),l=/\r\n|\n\r|\n|\r/g,c=function(e,t,n){return void 0===n&&(n=0),e.substr(n,t.length)===t},u=function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return(t>>>0).toString()};function d(e,t,n){return u(e.toString())+u(t.toString())+u(n)}function h(e,t,n,u,h,f,p,m){var g,v=new i.VTTParser,b=Object(a.utf8ArrayToStr)(new Uint8Array(e)).trim().replace(l,"\n").split("\n"),y=[],E=Object(o.toMpegTsClockFromTimescale)(t,n),x="00:00.000",_=0,k=0,w=!0,C=!1;v.oncue=function(e){var t=u[h],n=u.ccOffset,r=(_-E)/9e4;if(null!=t&&t.new&&(void 0!==k?n=u.ccOffset=t.start:function(e,t,n){var r=e[t],i=e[r.prevCC];if(!i||!i.new&&r.new)return e.ccOffset=e.presentationOffset=r.start,void(r.new=!1);for(;null!==(a=i)&&void 0!==a&&a.new;){var a;e.ccOffset+=r.start-i.start,r.new=!1,i=e[(r=i).prevCC]}e.presentationOffset=n}(u,h,r)),r&&(n=r-u.presentationOffset),C){var i=e.endTime-e.startTime,a=Object(s.normalizePts)(9e4*(e.startTime+n-k),9e4*f)/9e4;e.startTime=a,e.endTime=a+i}var o=e.text.trim();e.text=decodeURIComponent(encodeURIComponent(o)),e.id||(e.id=d(e.startTime,e.endTime,o)),e.endTime>0&&y.push(e)},v.onparsingerror=function(e){g=e},v.onflush=function(){g?m(g):p(y)},b.forEach((function(e){if(w){if(c(e,"X-TIMESTAMP-MAP=")){w=!1,C=!0,e.substr(16).split(",").forEach((function(e){c(e,"LOCAL:")?x=e.substr(6):c(e,"MPEGTS:")&&(_=parseInt(e.substr(7)))}));try{k=function(e){var t=parseInt(e.substr(-3)),n=parseInt(e.substr(-6,2)),i=parseInt(e.substr(-9,2)),a=e.length>9?parseInt(e.substr(0,e.indexOf(":"))):0;if(!(Object(r.isFiniteNumber)(t)&&Object(r.isFiniteNumber)(n)&&Object(r.isFiniteNumber)(i)&&Object(r.isFiniteNumber)(a)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+e);return t+=1e3*n,t+=6e4*i,t+=36e5*a}(x)/1e3}catch(e){C=!1,g=e}return}""===e&&(w=!1)}v.parse(e+"\n")})),v.flush()}},"./src/utils/xhr-loader.ts":
|
|
|
/*!*********************************!*\
|
|
|
!*** ./src/utils/xhr-loader.ts ***!
|
|
|
\*********************************/
|
|
|
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../utils/logger */"./src/utils/logger.ts"),i=n(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),a=/^age:\s*[\d.]+\s*$/m,o=function(){function e(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=e?e.xhrSetup:null,this.stats=new i.LoadStats,this.retryDelay=0}var t=e.prototype;return t.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},t.abortInternal=function(){var e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,4!==e.readyState&&(this.stats.aborted=!0,e.abort()))},t.abort=function(){var e;this.abortInternal(),null!==(e=this.callbacks)&&void 0!==e&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},t.load=function(e,t,n){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=n,this.retryDelay=t.retryDelay,this.loadInternal()},t.loadInternal=function(){var e=this.config,t=this.context;if(e){var n=this.loader=new self.XMLHttpRequest,r=this.stats;r.loading.first=0,r.loaded=0;var i=this.xhrSetup;try{if(i)try{i(n,t.url)}catch(e){n.open("GET",t.url,!0),i(n,t.url)}n.readyState||n.open("GET",t.url,!0);var a=this.context.headers;if(a)for(var o in a)n.setRequestHeader(o,a[o])}catch(e){return void this.callbacks.onError({code:n.status,text:e.message},t,n)}t.rangeEnd&&n.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),n.onreadystatechange=this.readystatechange.bind(this),n.onprogress=this.loadprogress.bind(this),n.responseType=t.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),e.timeout),n.send()}},t.readystatechange=function(){var e=this.context,t=this.loader,n=this.stats;if(e&&t){var i=t.readyState,a=this.config;if(!n.aborted&&i>=2)if(self.clearTimeout(this.requestTimeout),0===n.loading.first&&(n.loading.first=Math.max(self.performance.now(),n.loading.start)),4===i){t.onreadystatechange=null,t.onprogress=null;var o=t.status;if(o>=200&&o<300){var s,l;if(n.loading.end=Math.max(self.performance.now(),n.loading.first),l="arraybuffer"===e.responseType?(s=t.response).byteLength:(s=t.responseText).length,n.loaded=n.total=l,!this.callbacks)return;var c=this.callbacks.onProgress;if(c&&c(n,e,s,t),!this.callbacks)return;var u={url:t.responseURL,data:s};this.callbacks.onSuccess(u,n,e,t)}else n.retry>=a.maxRetry||o>=400&&o<499?(r.logger.error(o+" while loading "+e.url),this.callbacks.onError({code:o,text:t.statusText},e,t)):(r.logger.warn(o+" while loading "+e.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,a.maxRetryDelay),n.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),a.timeout)}},t.loadtimeout=function(){r.logger.warn("timeout while loading "+this.context.url);var e=this.callbacks;e&&(this.abortInternal(),e.onTimeout(this.stats,this.context,this.loader))},t.loadprogress=function(e){var t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)},t.getCacheAge=function(){var e=null;if(this.loader&&a.test(this.loader.getAllResponseHeaders())){var t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e},e}();t.default=o}}).default},e.exports=r())},vHTk:
|
|
|
/*!******************************************************!*\
|
|
|
!*** ./src/components/PreviewAll/index.less?modules ***!
|
|
|
\******************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},vKoX:
|
|
|
/*!**************************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/svg/helper/ShadowManager.js ***!
|
|
|
\**************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./Definable */"SrGk");function i(e,t){r.call(this,e,t,["filter"],"__filter_in_use__","_shadowDom")}function a(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY||e.textShadowBlur||e.textShadowOffsetX||e.textShadowOffsetY)}n(/*! ../../core/util */"bYtY").inherits(i,r),i.prototype.addWithoutUpdate=function(e,t){if(t&&a(t.style)){var n;if(t._shadowDom)n=t._shadowDom,this.getDefs(!0).contains(t._shadowDom)||this.addDom(n);else n=this.add(t);this.markUsed(t);var r=n.getAttribute("id");e.style.filter="url(#"+r+")"}},i.prototype.add=function(e){var t=this.createElement("filter");return e._shadowDomId=e._shadowDomId||this.nextId++,t.setAttribute("id","zr"+this._zrId+"-shadow-"+e._shadowDomId),this.updateDom(e,t),this.addDom(t),t},i.prototype.update=function(e,t){if(a(t.style)){var n=this;r.prototype.update.call(this,t,(function(){n.updateDom(t,t._shadowDom)}))}else this.remove(e,t)},i.prototype.remove=function(e,t){null!=t._shadowDomId&&(this.removeDom(e),e.style.filter="")},i.prototype.updateDom=function(e,t){var n=t.getElementsByTagName("feDropShadow");n=0===n.length?this.createElement("feDropShadow"):n[0];var r,i,a,o,s=e.style,l=e.scale&&e.scale[0]||1,c=e.scale&&e.scale[1]||1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)r=s.shadowOffsetX||0,i=s.shadowOffsetY||0,a=s.shadowBlur,o=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(t,s);r=s.textShadowOffsetX||0,i=s.textShadowOffsetY||0,a=s.textShadowBlur,o=s.textShadowColor}n.setAttribute("dx",r/l),n.setAttribute("dy",i/c),n.setAttribute("flood-color",o);var u=a/2/l+" "+a/2/c;n.setAttribute("stdDeviation",u),t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width",Math.ceil(a/2*200)+"%"),t.setAttribute("height",Math.ceil(a/2*200)+"%"),t.appendChild(n),e._shadowDom=t},i.prototype.markUsed=function(e){e._shadowDom&&r.prototype.markUsed.call(this,e._shadowDom)};var o=i;e.exports=o},vWvF:
|
|
|
/*!******************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/mixin/Animatable.js ***!
|
|
|
\******************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../animation/Animator */"Bq2U"),i=n(/*! ../core/log */"SUKs"),a=n(/*! ../core/util */"bYtY"),o=a.isString,s=a.isFunction,l=a.isObject,c=a.isArrayLike,u=a.indexOf,d=function(){this.animators=[]};function h(e,t,n,r,i,a,u,d){o(r)?(a=i,i=r,r=0):s(i)?(a=i,i="linear",r=0):s(r)?(a=r,r=0):s(n)?(a=n,n=500):n||(n=500),e.stopAnimation(),function e(t,n,r,i,a,o,s){var u={},d=0;for(var h in i)i.hasOwnProperty(h)&&(null!=r[h]?l(i[h])&&!c(i[h])?e(t,n?n+"."+h:h,r[h],i[h],a,o,s):(s?(u[h]=r[h],f(t,n,h,i[h])):u[h]=i[h],d++):null==i[h]||s||f(t,n,h,i[h]));d>0&&t.animate(n,!1).when(null==a?500:a,u).delay(o||0)}(e,"",e,t,n,r,d);var h=e.animators.slice(),p=h.length;function m(){--p||a&&a()}p||a&&a();for(var g=0;g<h.length;g++)h[g].done(m).start(i,u)}function f(e,t,n,r){if(t){var i={};i[t]={},i[t][n]=r,e.attr(i)}else e.attr(n,r)}d.prototype={constructor:d,animate:function(e,t){var n,a=!1,o=this,s=this.__zr;if(e){var l=e.split("."),c=o;a="shape"===l[0];for(var d=0,h=l.length;d<h;d++)c&&(c=c[l[d]]);c&&(n=c)}else n=o;if(n){var f=o.animators,p=new r(n,t);return p.during((function(e){o.dirty(a)})).done((function(){f.splice(u(f,p),1)})),f.push(p),s&&s.animation.addAnimator(p),p}i('Property "'+e+'" is not existed in element '+o.id)},stopAnimation:function(e){for(var t=this.animators,n=t.length,r=0;r<n;r++)t[r].stop(e);return t.length=0,this},animateTo:function(e,t,n,r,i,a){h(this,e,t,n,r,i,a)},animateFrom:function(e,t,n,r,i,a){h(this,e,t,n,r,i,a,!0)}};var p=d;e.exports=p},wCXF:
|
|
|
/*!********************************************************!*\
|
|
|
!*** ./node_modules/rc-table/es/Table.js + 17 modules ***!
|
|
|
\********************************************************/
|
|
|
/*! exports provided: INTERNAL_HOOKS, default */
|
|
|
/*! exports used: INTERNAL_HOOKS, default */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return Z}));var r=n("rePB"),i=n("VTBJ"),a=n("KQm4"),o=n("U8pU"),s=n("ODXe"),l=n("q1tI"),c=n("TSYQ"),u=n.n(c),d=n("Gytx"),h=n.n(d),f=n("Kwbf"),p=n("t23M"),m=n("qx4F"),g=n("6eGT"),v=n("IBYe"),b=n("Ff2n"),y=n("c+Xe"),E=n("fyJ8"),x=n("biw7");function _(e,t,n,r,i){var a,o,s=n[e]||{},l=n[t]||{};"left"===s.fixed?a=r.left[e]:"right"===l.fixed&&(o=r.right[t]);var c=!1,u=!1,d=!1,h=!1,f=n[t+1],p=n[e-1];if("rtl"===i){if(void 0!==a)h=!(p&&"left"===p.fixed);else if(void 0!==o){d=!(f&&"right"===f.fixed)}}else if(void 0!==a){c=!(f&&"left"===f.fixed)}else if(void 0!==o){u=!(p&&"right"===p.fixed)}return{fixLeft:a,fixRight:o,lastFixLeft:c,firstFixRight:u,lastFixRight:d,firstFixLeft:h,isSticky:r.isSticky}}var k=n("sR1s");function w(e){var t,n=e.cells,r=e.stickyOffsets,i=e.flattenColumns,a=e.rowComponent,o=e.cellComponent,s=e.onHeaderRow,c=e.index,u=l.useContext(x.a),d=u.prefixCls,h=u.direction;s&&(t=s(n.map((function(e){return e.column})),c));var f=Object(k.a)(n.map((function(e){return e.column})));return l.createElement(a,Object.assign({},t),n.map((function(e,t){var n,a=e.column,s=_(e.colStart,e.colEnd,i,r,h);return a&&a.onHeaderCell&&(n=e.column.onHeaderCell(a)),l.createElement(E.a,Object.assign({},e,{ellipsis:a.ellipsis,align:a.align,component:o,prefixCls:d,key:f[t]},s,{additionalProps:n,rowType:"header"}))})))}w.displayName="HeaderRow";var C=w;var S=function(e){var t=e.stickyOffsets,n=e.columns,r=e.flattenColumns,i=e.onHeaderRow,a=l.useContext(x.a),o=a.prefixCls,s=a.getComponent,c=l.useMemo((function(){return function(e){var t=[];!function e(n,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t[i]=t[i]||[];var a=r,o=n.filter(Boolean).map((function(n){var r={key:n.key,className:n.className||"",children:n.title,column:n,colStart:a},o=1,s=n.children;return s&&s.length>0&&(o=e(s,a,i+1).reduce((function(e,t){return e+t}),0),r.hasSubColumns=!0),"colSpan"in n&&(o=n.colSpan),"rowSpan"in n&&(r.rowSpan=n.rowSpan),r.colSpan=o,r.colEnd=r.colStart+o-1,t[i].push(r),a+=o,o}));return o}(e,0);for(var n=t.length,r=function(e){t[e].forEach((function(t){"rowSpan"in t||t.hasSubColumns||(t.rowSpan=n-e)}))},i=0;i<n;i+=1)r(i);return t}(n)}),[n]),u=s(["header","wrapper"],"thead"),d=s(["header","row"],"tr"),h=s(["header","cell"],"th");return l.createElement(u,{className:"".concat(o,"-thead")},c.map((function(e,n){return l.createElement(C,{key:n,flattenColumns:r,cells:e,stickyOffsets:t,rowComponent:d,cellComponent:h,onHeaderRow:i,index:n})})))},O=n("hW8S");var A=function(e){for(var t=e.colWidths,n=e.columns,r=[],i=!1,a=(e.columCount||n.length)-1;a>=0;a-=1){var o=t[a],s=n&&n[a],c=s&&s[O.a];(o||c||i)&&(r.unshift(l.createElement("col",Object.assign({key:a,style:{width:o,minWidth:o}},c))),i=!0)}return l.createElement("colgroup",null,r)};var T=l.forwardRef((function(e,t){var n=e.noData,o=e.columns,s=e.flattenColumns,c=e.colWidths,d=e.columCount,h=e.stickyOffsets,f=e.direction,p=e.fixHeader,m=e.offsetHeader,g=e.stickyClassName,v=e.onScroll,E=Object(b.a)(e,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),_=l.useContext(x.a),k=_.prefixCls,w=_.scrollbarSize,C=_.isSticky,O=C&&!p?0:w,T=l.useRef(null),I=l.useCallback((function(e){Object(y.b)(t,e),Object(y.b)(T,e)}),[]);l.useEffect((function(){var e;function t(e){var t=e.currentTarget,n=e.deltaX;n&&(v({currentTarget:t,scrollLeft:t.scrollLeft+n}),e.preventDefault())}return null===(e=T.current)||void 0===e||e.addEventListener("wheel",t),function(){var e;null===(e=T.current)||void 0===e||e.removeEventListener("wheel",t)}}),[]);var D=s[s.length-1],L={fixed:D?D.fixed:null,onHeaderCell:function(){return{className:"".concat(k,"-cell-scrollbar")}}},R=Object(l.useMemo)((function(){return O?[].concat(Object(a.a)(o),[L]):o}),[O,o]),N=Object(l.useMemo)((function(){return O?[].concat(Object(a.a)(s),[L]):s}),[O,s]),j=Object(l.useMemo)((function(){var e=h.right,t=h.left;return Object(i.a)(Object(i.a)({},h),{},{left:"rtl"===f?[].concat(Object(a.a)(t.map((function(e){return e+O}))),[0]):t,right:"rtl"===f?e:[].concat(Object(a.a)(e.map((function(e){return e+O}))),[0]),isSticky:C})}),[O,h,C]),M=function(e,t){return Object(l.useMemo)((function(){for(var n=[],r=0;r<t;r+=1){var i=e[r];if(void 0===i)return null;n[r]=i}return n}),[e.join("_"),t])}(c,d);return l.createElement("div",{style:Object(i.a)({overflow:"hidden"},C?{top:m}:{}),ref:I,className:u()("".concat(k,"-header"),Object(r.a)({},g,!!g))},l.createElement("table",{style:{tableLayout:"fixed",visibility:n||M?null:"hidden"}},l.createElement(A,{colWidths:M?[].concat(Object(a.a)(M),[O]):[],columCount:d+1,columns:N}),l.createElement(S,Object.assign({},E,{stickyOffsets:j,columns:R,flattenColumns:N}))))}));T.displayName="FixedHeader";var I=T,D=l.createContext(null);var L=function(e){var t=e.prefixCls,n=e.children,r=e.component,i=e.cellComponent,a=e.fixHeader,o=e.fixColumn,s=e.horizonScroll,c=e.className,u=e.expanded,d=e.componentWidth,h=e.colSpan,f=l.useContext(x.a).scrollbarSize;return l.useMemo((function(){var e=n;return o&&(e=l.createElement("div",{style:{width:d-(a?f:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(t,"-expanded-row-fixed")},e)),l.createElement(r,{className:c,style:{display:u?null:"none"}},l.createElement(E.a,{component:i,prefixCls:t,colSpan:h},e))}),[n,r,a,s,c,u,d,h,f])};function R(e){var t=e.className,n=e.style,r=e.record,a=e.index,o=e.rowKey,c=e.getRowKey,d=e.rowExpandable,h=e.expandedKeys,f=e.onRow,p=e.indent,m=void 0===p?0:p,g=e.rowComponent,v=e.cellComponent,b=e.childrenColumnName,y=l.useContext(x.a),_=y.prefixCls,w=y.fixedInfoList,C=l.useContext(D),S=C.fixHeader,O=C.fixColumn,A=C.horizonScroll,T=C.componentWidth,I=C.flattenColumns,N=C.expandableType,j=C.expandRowByClick,M=C.onTriggerExpand,P=C.rowClassName,B=C.expandedRowClassName,F=C.indentSize,U=C.expandIcon,H=C.expandedRowRender,z=C.expandIconColumnIndex,G=l.useState(!1),V=Object(s.a)(G,2),W=V[0],K=V[1],q=h&&h.has(e.recordKey);l.useEffect((function(){q&&K(!0)}),[q]);var Y,Q="row"===N&&(!d||d(r)),J="nest"===N,X=b&&r&&r[b],Z=Q||J;f&&(Y=f(r,a));var $;"string"==typeof P?$=P:"function"==typeof P&&($=P(r,a,m));var ee,te,ne=Object(k.a)(I),re=l.createElement(g,Object.assign({},Y,{"data-row-key":o,className:u()(t,"".concat(_,"-row"),"".concat(_,"-row-level-").concat(m),$,Y&&Y.className),style:Object(i.a)(Object(i.a)({},n),Y?Y.style:null),onClick:function(e){if(j&&Z&&M(r,e),Y&&Y.onClick){for(var t,n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];(t=Y).onClick.apply(t,[e].concat(i))}}}),I.map((function(e,t){var n,i,o=e.render,s=e.dataIndex,c=e.className,u=ne[t],d=w[t];return t===(z||0)&&J&&(n=l.createElement(l.Fragment,null,l.createElement("span",{style:{paddingLeft:"".concat(F*m,"px")},className:"".concat(_,"-row-indent indent-level-").concat(m)}),U({prefixCls:_,expanded:q,expandable:X,record:r,onExpand:M}))),e.onCell&&(i=e.onCell(r,a)),l.createElement(E.a,Object.assign({className:c,ellipsis:e.ellipsis,align:e.align,component:v,prefixCls:_,key:u,record:r,index:a,dataIndex:s,render:o,shouldCellUpdate:e.shouldCellUpdate},d,{appendNode:n,additionalProps:i}))})));if(Q&&(W||q)){var ie=H(r,a,m+1,q),ae=B&&B(r,a,m);ee=l.createElement(L,{expanded:q,className:u()("".concat(_,"-expanded-row"),"".concat(_,"-expanded-row-level-").concat(m+1),ae),prefixCls:_,fixHeader:S,fixColumn:O,horizonScroll:A,component:g,componentWidth:T,cellComponent:v,colSpan:I.length},ie)}return X&&q&&(te=(r[b]||[]).map((function(t,n){var r=c(t,n);return l.createElement(R,Object.assign({},e,{key:r,rowKey:r,record:t,recordKey:r,index:n,indent:m+1}))}))),l.createElement(l.Fragment,null,re,ee,te)}R.displayName="BodyRow";var N=R,j=l.createContext(null);function M(e){var t=e.columnKey,n=e.onColumnResize,r=l.useRef();return l.useEffect((function(){r.current&&n(t,r.current.offsetWidth)}),[]),l.createElement(p.a,{onResize:function(e){var r=e.offsetWidth;n(t,r)}},l.createElement("td",{ref:r,style:{padding:0,border:0,height:0}},l.createElement("div",{style:{height:0,overflow:"hidden"}}," ")))}var P=l.memo((function(e){var t=e.data,n=e.getRowKey,r=e.measureColumnWidth,i=e.expandedKeys,a=e.onRow,o=e.rowExpandable,s=e.emptyNode,c=e.childrenColumnName,u=l.useContext(j).onColumnResize,d=l.useContext(x.a),h=d.prefixCls,f=d.getComponent,p=l.useContext(D),m=p.fixHeader,g=p.horizonScroll,v=p.flattenColumns,b=p.componentWidth;return l.useMemo((function(){var e,d=f(["body","wrapper"],"tbody"),p=f(["body","row"],"tr"),y=f(["body","cell"],"td");e=t.length?t.map((function(e,t){var r=n(e,t);return l.createElement(N,{key:r,rowKey:r,record:e,recordKey:r,index:t,rowComponent:p,cellComponent:y,expandedKeys:i,onRow:a,getRowKey:n,rowExpandable:o,childrenColumnName:c})})):l.createElement(L,{expanded:!0,className:"".concat(h,"-placeholder"),prefixCls:h,fixHeader:m,fixColumn:g,horizonScroll:g,component:p,componentWidth:b,cellComponent:y,colSpan:v.length},s);var E=Object(k.a)(v);return l.createElement(d,{className:"".concat(h,"-tbody")},r&&l.createElement("tr",{"aria-hidden":"true",className:"".concat(h,"-measure-row"),style:{height:0}},E.map((function(e){return l.createElement(M,{key:e,columnKey:e,onColumnResize:u})}))),e)}),[t,h,a,r,i,n,f,b,s,v])}));P.displayName="Body";var B=P,F=n("wRmb"),U=n("xEkU"),H=n.n(U);function z(e){var t=Object(l.useRef)(e),n=Object(l.useState)({}),r=Object(s.a)(n,2)[1],i=Object(l.useRef)(null),a=Object(l.useRef)([]);return Object(l.useEffect)((function(){return function(){H.a.cancel(i.current)}}),[]),[t.current,function(e){null===i.current&&(a.current=[],i.current=H()((function(){a.current.forEach((function(e){t.current=e(t.current)})),i.current=null,r({})}))),a.current.push(e)}]}var G=function(e,t,n){return Object(l.useMemo)((function(){for(var r=[],i=[],a=0,o=0,s=0;s<t;s+=1)if("rtl"===n){i[s]=o,o+=e[s]||0;var l=t-s-1;r[l]=a,a+=e[l]||0}else{r[s]=a,a+=e[s]||0;var c=t-s-1;i[c]=o,o+=e[c]||0}return{left:r,right:i}}),[e,t,n])};var V=function(e){var t=e.className,n=e.children;return l.createElement("div",{className:t},n)},W=n("n6Qo");function K(e){var t,n=e.prefixCls,i=e.record,a=e.onExpand,o=e.expanded,s=e.expandable,c="".concat(n,"-row-expand-icon");if(!s)return l.createElement("span",{className:u()(c,"".concat(n,"-row-spaced"))});return l.createElement("span",{className:u()(c,(t={},Object(r.a)(t,"".concat(n,"-row-expanded"),o),Object(r.a)(t,"".concat(n,"-row-collapsed"),!o),t)),onClick:function(e){a(i,e),e.stopPropagation()}})}var q=n("zT1h"),Y=n("y0+3"),Q=l.forwardRef((function(e,t){var n,a,o=e.scrollBodyRef,c=e.onScroll,d=e.offsetScroll,h=l.useContext(x.a).prefixCls,f=(null===(n=o.current)||void 0===n?void 0:n.scrollWidth)||0,p=(null===(a=o.current)||void 0===a?void 0:a.clientWidth)||0,g=f&&p*(p/f),v=l.useRef(),b=z({scrollLeft:0,isHiddenScrollBar:!1}),y=Object(s.a)(b,2),E=y[0],_=y[1],k=l.useRef({delta:0,x:0}),w=l.useState(!1),C=Object(s.a)(w,2),S=C[0],O=C[1],A=function(){O(!1)},T=function(e){var t,n=(e||(null===(t=window)||void 0===t?void 0:t.event)).buttons;if(S&&0!==n){var r=k.current.x+e.pageX-k.current.x-k.current.delta;r<=0&&(r=0),r+g>=p&&(r=p-g),c({scrollLeft:r/p*(f+2)}),k.current.x=e.pageX}else S&&O(!1)},I=function(){var e=Object(Y.b)(o.current).top,t=e+o.current.offsetHeight,n=document.documentElement.scrollTop+window.innerHeight;t-Object(m.a)()<=n||e>=n-d?_((function(e){return Object(i.a)(Object(i.a)({},e),{},{isHiddenScrollBar:!0})})):_((function(e){return Object(i.a)(Object(i.a)({},e),{},{isHiddenScrollBar:!1})}))},D=function(e){_((function(t){return Object(i.a)(Object(i.a)({},t),{},{scrollLeft:e/f*p||0})}))};return l.useImperativeHandle(t,(function(){return{setScrollLeft:D}})),l.useEffect((function(){var e=Object(q.a)(document.body,"mouseup",A,!1),t=Object(q.a)(document.body,"mousemove",T,!1);return I(),function(){e.remove(),t.remove()}}),[g,S]),l.useEffect((function(){var e=Object(q.a)(window,"scroll",I,!1),t=Object(q.a)(window,"resize",I,!1);return function(){e.remove(),t.remove()}}),[]),l.useEffect((function(){E.isHiddenScrollBar||_((function(e){var t,n;return Object(i.a)(Object(i.a)({},e),{},{scrollLeft:o.current.scrollLeft/(null===(t=o.current)||void 0===t?void 0:t.scrollWidth)*(null===(n=o.current)||void 0===n?void 0:n.clientWidth)})}))}),[E.isHiddenScrollBar]),f<=p||!g||E.isHiddenScrollBar?null:l.createElement("div",{style:{height:Object(m.a)(),width:p,bottom:d},className:"".concat(h,"-sticky-scroll")},l.createElement("div",{onMouseDown:function(e){e.persist(),k.current.delta=e.pageX-E.scrollLeft,k.current.x=0,O(!0),e.preventDefault()},ref:v,className:u()("".concat(h,"-sticky-scroll-bar"),Object(r.a)({},"".concat(h,"-sticky-scroll-bar-active"),S)),style:{width:"".concat(g,"px"),transform:"translate3d(".concat(E.scrollLeft,"px, 0, 0)")}}))}));var J=[],X={},Z="rc-table-internal-hook",$=l.memo((function(e){return e.children}),(function(e,t){return!!h()(e.props,t.props)&&(e.pingLeft!==t.pingLeft||e.pingRight!==t.pingRight)}));function ee(e){var t,n=e.prefixCls,c=e.className,d=e.rowClassName,h=e.style,g=e.data,v=e.rowKey,b=e.scroll,y=e.tableLayout,E=e.direction,w=e.title,C=e.footer,T=e.summary,L=e.id,R=e.showHeader,N=e.components,M=e.emptyText,P=e.onRow,U=e.onHeaderRow,H=e.internalHooks,q=e.transformColumns,Y=e.internalRefs,ee=e.sticky,te=g||J,ne=!!te.length,re=l.useState(0),ie=Object(s.a)(re,2),ae=ie[0],oe=ie[1];l.useEffect((function(){oe(Object(m.a)())}));var se,le,ce,ue=l.useMemo((function(){return Object(k.c)(N,{})}),[N]),de=l.useCallback((function(e,t){return Object(k.b)(ue,e)||t}),[ue]),he=l.useMemo((function(){return"function"==typeof v?v:function(e){return e&&e[v]}}),[v]),fe=Object(O.c)(e),pe=fe.expandIcon,me=fe.expandedRowKeys,ge=fe.defaultExpandedRowKeys,ve=fe.defaultExpandAllRows,be=fe.expandedRowRender,ye=fe.onExpand,Ee=fe.onExpandedRowsChange,xe=fe.expandRowByClick,_e=fe.rowExpandable,ke=fe.expandIconColumnIndex,we=fe.expandedRowClassName,Ce=fe.childrenColumnName,Se=fe.indentSize,Oe=pe||K,Ae=Ce||"children",Te=l.useMemo((function(){return be?"row":!!(e.expandable&&H===Z&&e.expandable.__PARENT_RENDER_ICON__||te.some((function(e){return e&&"object"===Object(o.a)(e)&&e[Ae]})))&&"nest"}),[!!be,te]),Ie=l.useState((function(){return ge||(ve?function(e,t,n){var r=[];return function e(i){(i||[]).forEach((function(i,a){r.push(t(i,a)),e(i[n])}))}(e),r}(te,he,Ae):[])})),De=Object(s.a)(Ie,2),Le=De[0],Re=De[1],Ne=l.useMemo((function(){return new Set(me||Le||[])}),[me,Le]),je=l.useCallback((function(e){var t,n=he(e,te.indexOf(e)),r=Ne.has(n);r?(Ne.delete(n),t=Object(a.a)(Ne)):t=[].concat(Object(a.a)(Ne),[n]),Re(t),ye&&ye(!r,e),Ee&&Ee(t)}),[he,Ne,te,ye,Ee]),Me=l.useState(0),Pe=Object(s.a)(Me,2),Be=Pe[0],Fe=Pe[1],Ue=Object(F.b)(Object(i.a)(Object(i.a)(Object(i.a)({},e),fe),{},{expandable:!!be,expandedKeys:Ne,getRowKey:he,onTriggerExpand:je,expandIcon:Oe,expandIconColumnIndex:ke,direction:E}),H===Z?q:null),He=Object(s.a)(Ue,2),ze=He[0],Ge=He[1],Ve=l.useMemo((function(){return{columns:ze,flattenColumns:Ge}}),[ze,Ge]),We=l.useRef(),Ke=l.useRef(),qe=l.useRef(),Ye=l.useState(!1),Qe=Object(s.a)(Ye,2),Je=Qe[0],Xe=Qe[1],Ze=l.useState(!1),$e=Object(s.a)(Ze,2),et=$e[0],tt=$e[1],nt=z(new Map),rt=Object(s.a)(nt,2),it=rt[0],at=rt[1],ot=Object(k.a)(Ge).map((function(e){return it.get(e)})),st=l.useMemo((function(){return ot}),[ot.join("_")]),lt=G(st,Ge.length,E),ct=b&&Object(k.d)(b.y),ut=b&&Object(k.d)(b.x),dt=ut&&Ge.some((function(e){return e.fixed})),ht=l.useRef(),ft=function(e,t){return l.useMemo((function(){var n=!!e;return{isSticky:n,stickyClassName:n?"".concat(t,"-sticky-header"):"",offsetHeader:"object"===Object(o.a)(e)&&e.offsetHeader||0,offsetScroll:"object"===Object(o.a)(e)&&e.offsetScroll||0}}),[e,t])}(ee,n),pt=ft.isSticky,mt=ft.offsetHeader,gt=ft.offsetScroll,vt=ft.stickyClassName;ct&&(le={overflowY:"scroll",maxHeight:b.y}),ut&&(se={overflowX:"auto"},ct||(le={overflowY:"hidden"}),ce={width:!0===b.x?"auto":b.x,minWidth:"100%"});var bt=l.useCallback((function(e,t){at((function(n){var r=new Map(n);return r.set(e,t),r}))}),[]),yt=function(e){var t=Object(l.useRef)(e),n=Object(l.useRef)(null);function r(){window.clearTimeout(n.current)}return Object(l.useEffect)((function(){return r}),[]),[function(e){t.current=e,r(),n.current=window.setTimeout((function(){t.current=null,n.current=null}),100)},function(){return t.current}]}(null),Et=Object(s.a)(yt,2),xt=Et[0],_t=Et[1];function kt(e,t){t&&("function"==typeof t?t(e):t.scrollLeft!==e&&(t.scrollLeft=e))}var wt=function(e){var t,n=e.currentTarget,r=e.scrollLeft,i="number"==typeof r?r:n.scrollLeft,a=n||X;_t()&&_t()!==a||(xt(a),kt(i,Ke.current),kt(i,qe.current),kt(i,null===(t=ht.current)||void 0===t?void 0:t.setScrollLeft));if(n){var o=n.scrollWidth,s=n.clientWidth;Xe(i>0),tt(i<o-s)}},Ct=function(){qe.current&&wt({currentTarget:qe.current})};l.useEffect((function(){return Ct}),[]),l.useEffect((function(){ut&&Ct()}),[ut]),l.useEffect((function(){H===Z&&Y&&(Y.body.current=qe.current)}));var St,Ot,At=de(["table"],"table"),Tt=l.useMemo((function(){return y||(dt?"max-content"===b.x?"auto":"fixed":ct||Ge.some((function(e){return e.ellipsis}))?"fixed":"auto")}),[ct,dt,Ge,y]),It={colWidths:st,columCount:Ge.length,stickyOffsets:lt,onHeaderRow:U,fixHeader:ct},Dt=l.useMemo((function(){return ne?null:"function"==typeof M?M():M}),[ne,M]),Lt=l.createElement(B,{data:te,measureColumnWidth:ct||ut||pt,expandedKeys:Ne,rowExpandable:_e,getRowKey:he,onRow:P,emptyNode:Dt,childrenColumnName:Ae}),Rt=l.createElement(A,{colWidths:Ge.map((function(e){return e.width})),columns:Ge}),Nt=T&&l.createElement(W.b,null,T(te)),jt=de(["body"]);ct||pt?("function"==typeof jt?(Ot=jt(te,{scrollbarSize:ae,ref:qe,onScroll:wt}),It.colWidths=Ge.map((function(e,t){var n=e.width,r=t===ze.length-1?n-ae:n;return"number"!=typeof r||Number.isNaN(r)?(Object(f.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0):r}))):Ot=l.createElement("div",{style:Object(i.a)(Object(i.a)({},se),le),onScroll:wt,ref:qe,className:u()("".concat(n,"-body"))},l.createElement(At,{style:Object(i.a)(Object(i.a)({},ce),{},{tableLayout:Tt})},Rt,Lt,Nt),pt&&l.createElement(Q,{ref:ht,offsetScroll:gt,scrollBodyRef:qe,onScroll:wt})),St=l.createElement(l.Fragment,null,!1!==R&&l.createElement(I,Object.assign({noData:!te.length},It,Ve,{direction:E,offsetHeader:mt,stickyClassName:vt,ref:Ke,onScroll:wt})),Ot)):St=l.createElement("div",{style:Object(i.a)(Object(i.a)({},se),le),className:u()("".concat(n,"-content")),onScroll:wt,ref:qe},l.createElement(At,{style:Object(i.a)(Object(i.a)({},ce),{},{tableLayout:Tt})},Rt,!1!==R&&l.createElement(S,Object.assign({},It,Ve)),Lt,Nt));var Mt=Object(O.b)(e),Pt=l.createElement("div",Object.assign({className:u()(n,c,(t={},Object(r.a)(t,"".concat(n,"-rtl"),"rtl"===E),Object(r.a)(t,"".concat(n,"-ping-left"),Je),Object(r.a)(t,"".concat(n,"-ping-right"),et),Object(r.a)(t,"".concat(n,"-layout-fixed"),"fixed"===y),Object(r.a)(t,"".concat(n,"-fixed-header"),ct),Object(r.a)(t,"".concat(n,"-fixed-column"),dt),Object(r.a)(t,"".concat(n,"-scroll-horizontal"),ut),Object(r.a)(t,"".concat(n,"-has-fix-left"),Ge[0]&&Ge[0].fixed),Object(r.a)(t,"".concat(n,"-has-fix-right"),Ge[Ge.length-1]&&"right"===Ge[Ge.length-1].fixed),t)),style:h,id:L,ref:We},Mt),l.createElement($,{pingLeft:Je,pingRight:et,props:Object(i.a)(Object(i.a)({},e),{},{stickyOffsets:lt,mergedExpandedKeys:Ne})},w&&l.createElement(V,{className:"".concat(n,"-title")},w(te)),l.createElement("div",{className:"".concat(n,"-container")},St),C&&l.createElement(V,{className:"".concat(n,"-footer")},C(te))));ut&&(Pt=l.createElement(p.a,{onResize:function(e){var t=e.width;Ct(),Fe(We.current?We.current.offsetWidth:t)}},Pt));var Bt=l.useMemo((function(){return{prefixCls:n,getComponent:de,scrollbarSize:ae,direction:E,fixedInfoList:Ge.map((function(e,t){return _(t,t,Ge,lt,E)})),isSticky:pt}}),[n,de,ae,E,Ge,lt,E,pt]),Ft=l.useMemo((function(){return Object(i.a)(Object(i.a)({},Ve),{},{tableLayout:Tt,rowClassName:d,expandedRowClassName:we,componentWidth:Be,fixHeader:ct,fixColumn:dt,horizonScroll:ut,expandIcon:Oe,expandableType:Te,expandRowByClick:xe,expandedRowRender:be,onTriggerExpand:je,expandIconColumnIndex:ke,indentSize:Se})}),[Ve,Tt,d,we,Be,ct,dt,ut,Oe,Te,xe,be,je,ke,Se]),Ut=l.useMemo((function(){return{onColumnResize:bt}}),[bt]);return l.createElement(x.a.Provider,{value:Bt},l.createElement(D.Provider,{value:Ft},l.createElement(j.Provider,{value:Ut},Pt)))}ee.Column=v.a,ee.ColumnGroup=g.a,ee.Summary=W.a,ee.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};t.b=ee},wNxg:
|
|
|
/*!****************************************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Detail/components/DuplicateChecking/index.less?modules ***!
|
|
|
\****************************************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___3z5zI",flex_space_between:"flex_space_between___H1ixm",flex_box_vertical_center:"flex_box_vertical_center___1kFq0",flex_box_center_end:"flex_box_center_end___37HM-",flex_box_column:"flex_box_column___1RpsQ",warp:"warp___30JC0",header:"header___2cVDQ",empty:"empty___25XZq"}},wRmb:
|
|
|
/*!******************************************************!*\
|
|
|
!*** ./node_modules/rc-table/es/hooks/useColumns.js ***!
|
|
|
\******************************************************/
|
|
|
/*! exports provided: convertChildrenToColumns, default */
|
|
|
/*! exports used: convertChildrenToColumns, default */function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(/*! @babel/runtime/helpers/esm/defineProperty */"rePB"),i=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),a=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),o=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),s=n(/*! react */"q1tI"),l=(n(/*! rc-util/es/warning */"Kwbf"),n(/*! rc-util/es/Children/toArray */"Zm9Q")),c=n(/*! ../utils/legacyUtil */"hW8S");function u(e){return Object(l.a)(e).filter((function(e){return s.isValidElement(e)})).map((function(e){var t=e.key,n=e.props,r=n.children,i=Object(o.a)(n,["children"]),s=Object(a.a)({key:t},i);return r&&(s.children=u(r)),s}))}function d(e){return e.reduce((function(e,t){var n=t.fixed,r=!0===n?"left":n,o=t.children;return o&&o.length>0?[].concat(Object(i.a)(e),Object(i.a)(d(o).map((function(e){return Object(a.a)({fixed:r},e)})))):[].concat(Object(i.a)(e),[Object(a.a)(Object(a.a)({},t),{},{fixed:r})])}),[])}t.b=function(e,t){var n=e.prefixCls,i=e.columns,l=e.children,h=e.expandable,f=e.expandedKeys,p=e.getRowKey,m=e.onTriggerExpand,g=e.expandIcon,v=e.rowExpandable,b=e.expandIconColumnIndex,y=e.direction,E=e.expandRowByClick,x=s.useMemo((function(){return i||u(l)}),[i,l]),_=s.useMemo((function(){if(h){var e,t=b||0,i=x[t],a=(e={},Object(r.a)(e,c.a,{className:"".concat(n,"-expand-icon-col")}),Object(r.a)(e,"title",""),Object(r.a)(e,"fixed",i?i.fixed:null),Object(r.a)(e,"className","".concat(n,"-row-expand-icon-cell")),Object(r.a)(e,"render",(function(e,t,r){var i=p(t,r),a=f.has(i),o=!v||v(t),l=g({prefixCls:n,expanded:a,expandable:o,record:t,onExpand:m});return E?s.createElement("span",{onClick:function(e){return e.stopPropagation()}},l):l})),e),o=x.slice();return t>=0&&o.splice(t,0,a),o}return x}),[h,x,p,f,g,y]),k=s.useMemo((function(){var e=_;return t&&(e=t(e)),e.length||(e=[{render:function(){return null}}]),e}),[t,_,y]),w=s.useMemo((function(){return"rtl"===y?function(e){return e.map((function(e){var t=e.fixed,n=Object(o.a)(e,["fixed"]),r=t;return"left"===t?r="right":"right"===t&&(r="left"),Object(a.a)({fixed:r},n)}))}(d(k)):d(k)}),[k,y]);return[k,w]}},wU8J:
|
|
|
/*!*********************************************!*\
|
|
|
!*** ./node_modules/qr.js/lib/BitBuffer.js ***!
|
|
|
\*********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){function n(){this.buffer=new Array,this.length=0}n.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=n},x6Kt:
|
|
|
/*!********************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/shape/Rect.js ***!
|
|
|
\********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../Path */"y+Vt"),i=n(/*! ../helper/roundRect */"VpOo"),a=n(/*! ../helper/subPixelOptimize */"nPnh").subPixelOptimizeRect,o={},s=r.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(e,t){var n,r,s,l;this.subPixelOptimize?(a(o,t,this.style),n=o.x,r=o.y,s=o.width,l=o.height,o.r=t.r,t=o):(n=t.x,r=t.y,s=t.width,l=t.height),t.r?i.buildPath(e,t):e.rect(n,r,s,l),e.closePath()}});e.exports=s},"y+Vt":
|
|
|
/*!**************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/Path.js ***!
|
|
|
\**************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./Displayable */"Gev7"),i=n(/*! ../core/util */"bYtY"),a=n(/*! ../core/PathProxy */"IMiH"),o=n(/*! ../contain/path */"2DNl"),s=n(/*! ./Pattern */"3C/r").prototype.getCanvasPattern,l=Math.abs,c=new a(!0);function u(e){r.call(this,e),this.path=null}u.prototype={constructor:u,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(e,t){var n,r=this.style,i=this.path||c,a=r.hasStroke(),o=r.hasFill(),l=r.fill,u=r.stroke,d=o&&!!l.colorStops,h=a&&!!u.colorStops,f=o&&!!l.image,p=a&&!!u.image;(r.bind(e,this,t),this.setTransform(e),this.__dirty)&&(d&&(n=n||this.getBoundingRect(),this._fillGradient=r.getGradient(e,l,n)),h&&(n=n||this.getBoundingRect(),this._strokeGradient=r.getGradient(e,u,n)));d?e.fillStyle=this._fillGradient:f&&(e.fillStyle=s.call(l,e)),h?e.strokeStyle=this._strokeGradient:p&&(e.strokeStyle=s.call(u,e));var m=r.lineDash,g=r.lineDashOffset,v=!!e.setLineDash,b=this.getGlobalScale();if(i.setScale(b[0],b[1],this.segmentIgnoreThreshold),this.__dirtyPath||m&&!v&&a?(i.beginPath(e),m&&!v&&(i.setLineDash(m),i.setLineDashOffset(g)),this.buildPath(i,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(e.beginPath(),this.path.rebuildPath(e)),o)if(null!=r.fillOpacity){var y=e.globalAlpha;e.globalAlpha=r.fillOpacity*r.opacity,i.fill(e),e.globalAlpha=y}else i.fill(e);if(m&&v&&(e.setLineDash(m),e.lineDashOffset=g),a)if(null!=r.strokeOpacity){y=e.globalAlpha;e.globalAlpha=r.strokeOpacity*r.opacity,i.stroke(e),e.globalAlpha=y}else i.stroke(e);m&&v&&e.setLineDash([]),null!=r.text&&(this.restoreTransform(e),this.drawRectText(e,this.getBoundingRect()))},buildPath:function(e,t,n){},createPathProxy:function(){this.path=new a},getBoundingRect:function(){var e=this._rect,t=this.style,n=!e;if(n){var r=this.path;r||(r=this.path=new a),this.__dirtyPath&&(r.beginPath(),this.buildPath(r,this.shape,!1)),e=r.getBoundingRect()}if(this._rect=e,t.hasStroke()){var i=this._rectWithStroke||(this._rectWithStroke=e.clone());if(this.__dirty||n){i.copy(e);var o=t.lineWidth,s=t.strokeNoScale?this.getLineScale():1;t.hasFill()||(o=Math.max(o,this.strokeContainThreshold||4)),s>1e-10&&(i.width+=o/s,i.height+=o/s,i.x-=o/s/2,i.y-=o/s/2)}return i}return e},contain:function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path.data;if(i.hasStroke()){var s=i.lineWidth,l=i.strokeNoScale?this.getLineScale():1;if(l>1e-10&&(i.hasFill()||(s=Math.max(s,this.strokeContainThreshold)),o.containStroke(a,s/l,e,t)))return!0}if(i.hasFill())return o.contain(a,e,t)}return!1},dirty:function(e){null==e&&(e=!0),e&&(this.__dirtyPath=e,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(e){return this.animate("shape",e)},attrKV:function(e,t){"shape"===e?(this.setShape(t),this.__dirtyPath=!0,this._rect=null):r.prototype.attrKV.call(this,e,t)},setShape:function(e,t){var n=this.shape;if(n){if(i.isObject(e))for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);else n[e]=t;this.dirty(!0)}return this},getLineScale:function(){var e=this.transform;return e&&l(e[0]-1)>1e-10&&l(e[3]-1)>1e-10?Math.sqrt(l(e[0]*e[3]-e[2]*e[1])):1}},u.extend=function(e){var t=function(t){u.call(this,t),e.style&&this.style.extendFrom(e.style,!1);var n=e.shape;if(n){this.shape=this.shape||{};var r=this.shape;for(var i in n)!r.hasOwnProperty(i)&&n.hasOwnProperty(i)&&(r[i]=n[i])}e.init&&e.init.call(this,t)};for(var n in i.inherits(t,u),e)"style"!==n&&"shape"!==n&&(t.prototype[n]=e[n]);return t},i.inherits(u,r);var d=u;e.exports=d},"y0+3":
|
|
|
/*!********************************************!*\
|
|
|
!*** ./node_modules/rc-util/es/Dom/css.js ***!
|
|
|
\********************************************/
|
|
|
/*! exports provided: get, set, getOuterWidth, getOuterHeight, getDocSize, getClientSize, getScroll, getOffset */
|
|
|
/*! exports used: getClientSize, getOffset */function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));function r(){return{width:document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}}function i(e){var t=e.getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}},y23F:
|
|
|
/*!*****************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/mixin/Draggable.js ***!
|
|
|
\*****************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){function n(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function r(e,t){return{target:e,topTarget:t&&t.topTarget}}n.prototype={constructor:n,_dragStart:function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.dispatchToElement(r(t,e),"dragstart",e.event))},_drag:function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,i=e.offsetY,a=n-this._x,o=i-this._y;this._x=n,this._y=i,t.drift(a,o,e),this.dispatchToElement(r(t,e),"drag",e.event);var s=this.findHover(n,i,t).target,l=this._dropTarget;this._dropTarget=s,t!==s&&(l&&s!==l&&this.dispatchToElement(r(l,e),"dragleave",e.event),s&&s!==l&&this.dispatchToElement(r(s,e),"dragenter",e.event))}},_dragEnd:function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.dispatchToElement(r(t,e),"dragend",e.event),this._dropTarget&&this.dispatchToElement(r(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null}};var i=n;e.exports=i},yslc:
|
|
|
/*!*********************************************!*\
|
|
|
!*** ./src/assets/images/icons/groups3.png ***!
|
|
|
\*********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAAOHklEQVR4Xu1dCXQURRr+emZyTO6D3BCEgKCInCKeK3IoiyIqlxLyQBRBV8DNhCCrS3Z9Cq66KOoi68ECKocCcutTLhUERM1MEpBLEuQmQMKEnDNd+6onEzKTuXqmJ5l0V/EeL+mp+qu+r77UVP1V9TcHffZbIJgOlhgDMmaAA8lTwVDxJQh5UMY4GTSFM8AJ+PW6cIDsBEEfhfPB4MuUAYvQaTowOwV1NXtB0E6mWBksBTNwTeiUBENud/CmHwBEKZgTBl2GDNgKnQIsyBkCM9kEEI0M8TJICmWgqdCFkT17MngsUignDLYMGXAsdAo0XzcPILkyxMwgKZAB50InhIMhZxUIGalAXhhkmTHgXOgU6PG8UFwxbgdBf5nhZnAUxoBroVMyjryQgMraPSDoqDBuGFwZMeBe6MLi9IWuIHW7QUisjLAzKApiwDOhC25H3T3g8TUICVYQPwyqTBjwXOgUsD4nC4RfIhPsDIaCGBAndEHsujwQMkdBHDGoMmBAvNAtPvZlAMmUAX4GQSEMeCf0wrxgmCu+ASF3K4QnBrOVM+Cd0Cnoorw4mIw/guD6Vs4Ba74CGPBe6IInJicDZn4PgDYK4IpBbMUM+CZ0Qey5t4M3bwUhoa2YB4dNT1CHIzkoEkZzDYrrLtvkCeU0aBsULTw7WntRbtARoQrGbWHtBVw/Vpaggq9t1Rh9F7qwOM0ZA45fDgJp7PmJ0i4hCegU3AabjAc9qmF24r14JeXP+MZ4GEN+/69NmVvD0rGn8zThWYghF7XE7JFN+0wL0x5BQfVZLL60D1XE5JUNfxTqEZqC/C7Zgumeh96EvvqMP6ppNpvSCTM/ZxbAz222lousqGtIAnZkPIMETThmndmM1y/scGvB30KfFNcPH7YbLbRjwokVWHJ5v/CzltMgWq112z5HGXgQnDdVeFW2cSEmdFcU6nUfgpBJPrPsBwPhqmCsSM/EA9E3CtaXXPoJk09+4XIk9qfQrwuKhaFLNiLVodh7tQS3HX0HpB735Lj+WNTOu0Ojl0yViC/6u88MMqG7opDkaWCo2AJCBvnMtB8MqMFhQdoIPNPmDsH6+vIijCxegjrwDmvzl9BV4LAtYwr+FJEBEzHj1iML8EvVqYY2MKFL3/nSTV2sbTuWGw2jaReAbtI3VxqLuQkDMC91mGBsXXkhRhUvFcQeBBViNWENlcxocxdeSBqInRXHMLpkmU3lfbRtsbnjk8KzdgdetvlmKDVdBZ1COEuvJA/F7KSBwsfPnVyLdy9Suq6lOLUWafULXbGITYTHwZrzYos1yc9GdE8oPJDdHnXcHhCS7En2lsgzJ2kw8pLvA094YaG5teIoBoRnYFunqT43J6koz+E8mX6jLGz7KJ6KtxzvpwvQJ/5Y5XN9nhp4NLo7empTPcqepIlsaOcHF/fgnMnoUbmi6nNYUZbvUd7mzCT9iG5tfcHMvjDzOwFybYhsTmQe1PVGygPClOGzsl+F3P4UOl0jrGyfiWFRljXCBjptKlnqtbfGA3hNsixLfwyZsf4N3bO6zCDgCrTkP6FTpAbdQyBYA0JUgQbcUXvoiEsFaU26hHvwUvJgbK84ihHHF9sU6RvWDlszpgjPEgr/biNYI19jM3FJ0kRgY4dJoGVo+rxMj3ElnzasDai/flBkZ3xeZoDJyXpBCv6sQj9XZ4TBjbswUhWC/uEWP/qeqyWgmFylm0KTkRIUBWUKnTKj180AIfOl6KjmtiHVYnRB6gg8l3Cn0Pz/lO7CtFNfwtzoT2HtdRMwIvom6KtOo8/h+TafSYnZKnT6h2a/5rCvR+wcfUm7sciK66tgoVMG87PfBfCslJ3WHLZeTByEl1Pux8byA3iw+GObKsVsGD0U1Q2fpj8uuDOt0ySrsYmxt+Dj9DHCrxNPrMD/6n3p/sDHhO4PVhvbJKvU0O9bBxCLq6MFUhgX5LBWOlVwtqv5r5RhyEkcgE8v/4LME595LXQ6HUoPimniDWnsS6dz9uHFi4V1gtWb4wtNtL2rywtsTDCh+8Kop2UL8yJgNn4Hgl6eFpEqHz23Yez+qkNzruaUH7QdhSfjbxWmG8+eWuu10B1VTH3p2zOm4O6IDFw0XUW3Q6/jnKkCAyM64dv6ub8v+McUL8Oqcj0Tej0D/l2M2vfUbzNTUcPvBSFtfelEsWW9FfoX7bPwaMzNmHtuK2af3SKp0F9NHir46GkaXbwUn5cbhJ/bqMNwW/h1biF2CI7D22kjhHxTT67GqbpymzI/V57EadMVJvQWETqttDC3B8zm70FIpNvelDAD3YRpnGa0uVvwqFhHdDrnzoztbZNneFQ3pAfHClv0P1X9YfMZ9TOPiukhPFtYuhtmO2/JS2e+Qhlf3QSBBirBl06/KWj61ngYg+0OjHkCu/Fisctv83C4ptRtMTZ1cUuRxBn0ugdByHqJrYoyNytxAOamDGsQ+oTYvlicPlaUDVeZ6W7pSbtRlrrsVrUfj/ujujYU/eTyzxh/YrnoehsLvetvr+FQzQW3NpjQ3VIkcYb8nH8D/PMSWxVlzl7o9Oz1hLhbGmwkayIxPLobCCH4+NK+Ji6/RE2E4BKk6aOLe5t8PuvMJlw2VzXYS9VEYVPHSeipTROemQkPNacCE7qobvM6c/PO0WkzC3SZMBPbgyNeN9/7gvZCt7f0z6T7hKkNPedyz7GFTSoS4168MSQJX3V8Cu2CYwQ7b5zfgdSgKDwe21sSoYudurANI+9141lJQ3YfEO6HQLiN5ErodIe05MYXhYNVT5xYicWXf/JJ6COiumFth4m4aq7BpJOrsLJMD+sGixQjulihe9ZZ3uVS7s6olS+9LhEg+wPl1TGuhP5A1A3Y0GESKvla0ANajq6RiRnRqddnb+dpGFvyiXCbiKaWFPrB6nNYXe/lcSZnsYe6Hoq6Cd21KQrfGSWLgmA4Qu+V3uXdOCF9KWdCp/7tbzOexoCITlh2aT+y/ljhsHIxQqcGgjm1zcZUSwqdHQGQXk8Wi/qchSC85QRUgCRnQl/UdiQmx/cXFqF3HX0PuyqLJRG6vZGWEPro6B7opU2Dofo0lrs5Siv2rMuo6JvRW9sWBdVnmhxzCIQu9/9i1KB7CjyxvVkcAMgdCb3xhYi/nlqP+aXfOW2p2BE9EIQuhnaxQhdjuyXy+lfollAY2wMxAq/14oV18RSvDsPxG2YLdzgXXPge00+vc9kfTOgtIVfv6/Sf0C3b/T8H4i2jJ+P64d20RxCi0qCGN2FMyTKsu1KEx2J6CrudI4uXurwKR+lmQvdedC1R0j9CP7IgBFdL6Pd+v5YA5arO+anDMSPBEjKyzFyFGLVWuE73t7NbMO/8dtAtek8uP3QLScJH9aEq7jz6nkdlGrerJeboYvqCTV08YSs/m17HmeBJ1ubMMy6mFz5pP06ocvaZzZh3fhueib8d76Q9DI7jsPzyr5hz9mscqXV/bsTXdvsqdHo5e//1M4RmeOpHF9NmJnR3bOl100DI2+6yNffnnYPb4Jfrn0eEOgTvl+7G1FNrGppA/wDoOZcgTi08O1pTiiM1F3DWZASNk0JHeHq7nm7b09v99H4//Z+O/nQbX8OpoIZKKB/CqaFVBWFdeRHWXil0CtNTodPIBF1DE1HF16GSr0MVqQM9M5OXPAQT4/oJ4TKSi/6Bi+ZKSSllQndFJ339ixnfBOJbp3dkTBXiqNDNkt6H56PaLvxbL20q5iQNAT2xSEd3X9PQ3z/AV8ZDkgj9SvdXEKpyfHHEemHD1/bal2dCd8YoDXFRCxpTLSAj6/YMTRVu7tAYLs584xRatCoUPbSp6BqSiFi1FtHqUISpgqHmOGHUpiM4PSKg4jjQf87S9FNf4oqLC8WejujU/u5Of2lyRp1e1th85SDevLDTL3ERmdAd9ezpvDCcr9gFkJ5SjyxS2qMiLndwRlzKOjy1Ra/RxWvChdtF9pF67W3QIwR0Z7VxKjdX++0SNa2HXgAZG2O5DLai7FeUSjw18pQnqfL5/h1NW6LXLQch0h3mlgods8MYqGfAd6EbcmaC519jjDIGApkB34Sen3sfOPPm1hKgKJA7grXNvwx4L/SiWZ1gMu1jb5P2bwcx69Iw4J3QaegKk5G+uyhgI+ZKQw+zIhcGxAudEA56Hd1tscRaYIkx0AoYEC90vW4OCMlrBdhYExkDDQyIE7oQHZesDfSXcrH+ZQzYM+C50Atm3gBeiLLVrIGHWJcxBqRgwDOhH8+LQXnFPoB0lqJSZoMx0NwMuBc6yVPBULERhAxt7sax+hgDUjHgXuiG7LngMUuqCpkdxkBLMOBa6AW60TCTlS3RMFYnY0BKBpwLnUa9NZl3B/LLtqQkgtmSNwOOhX7whXjU1NKz5e4DdcubH4ZOJgw0Fbrl7c9fg5B7ZYKRwWAMOLgio89+CwTTGTeMATkxYDui63OyQPglcgLIsDAGKAPXhF6YfQvM3HeBENKZdQ1jQGoGLEIvmJ0EvnZ/c79ES2owzB5jwBkDHGhIZ/2R7QC5g9HEGJArAxzyde8D5Gm5AmS4GAO2c3TGB2OgFTLALR1KA6e5SByvUpEp7s+6tELwrMnKYcCl0DmYVOCyzOM3L2dCV44mZInUhdBrVFCPMmdt3MCmLrLsemWBcih0DlfVBMNNWVu2WdlgI7qydCE7tE2FzpVpVOqhdZkbaJSKhsSELruuVxYgG6FzOK+Bekjd+I16exaY0JWlC9mhbRA6h5PBCBpUM369w1jdTOiy63plAaoX+rEQNTewetzmEmfomdCVpQvZoeWWDi3UctrBlePXnHHpTZcdcgZIUQxErnk43vjI2ovuQP8faDGikjbF4FsAAAAASUVORK5CYII="},yxFR:
|
|
|
/*!********************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/graphic/shape/Line.js ***!
|
|
|
\********************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../Path */"y+Vt"),i=n(/*! ../helper/subPixelOptimize */"nPnh").subPixelOptimizeLine,a={},o=r.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(e,t){var n,r,o,s;this.subPixelOptimize?(i(a,t,this.style),n=a.x1,r=a.y1,o=a.x2,s=a.y2):(n=t.x1,r=t.y1,o=t.x2,s=t.y2);var l=t.percent;0!==l&&(e.moveTo(n,r),l<1&&(o=n*(1-l)+o*l,s=r*(1-l)+s*l),e.lineTo(o,s))},pointAt:function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]}});e.exports=o},zarK:
|
|
|
/*!******************************************************!*\
|
|
|
!*** ./node_modules/zrender/lib/dom/HandlerProxy.js ***!
|
|
|
\******************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,a=n(/*! ../core/event */"YH21"),o=a.addEventListener,s=a.removeEventListener,l=a.normalizeEvent,c=a.getNativeEvent,u=n(/*! ../core/util */"bYtY"),d=n(/*! ../mixin/Eventful */"H6uX"),h=n(/*! ../core/env */"ItGF"),f=h.domSupported,p=(i={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:r=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:u.map(r,(function(e){var t=e.replace("mouse","pointer");return i.hasOwnProperty(t)?t:e}))}),m=["mousemove","mouseup"],g=["pointermove","pointerup"];function v(e){return"mousewheel"===e&&h.browser.firefox?"DOMMouseScroll":e}function b(e){var t=e.pointerType;return"pen"===t||"touch"===t}function y(e){e&&(e.zrByTouch=!0)}function E(e,t){for(var n=t,r=!1;n&&9!==n.nodeType&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}function x(e,t){this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}var _=x.prototype;_.stopPropagation=_.stopImmediatePropagation=_.preventDefault=u.noop;var k={mousedown:function(e){e=l(this.dom,e),this._mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=l(this.dom,e);var t=this._mayPointerCapture;!t||e.zrX===t[0]&&e.zrY===t[1]||T(this,!0),this.trigger("mousemove",e)},mouseup:function(e){e=l(this.dom,e),T(this,!1),this.trigger("mouseup",e)},mouseout:function(e){e=l(this.dom,e),this._pointerCapturing&&(e.zrEventControl="no_globalout");var t=e.toElement||e.relatedTarget;e.zrIsToLocalDOM=E(this,t),this.trigger("mouseout",e)},touchstart:function(e){y(e=l(this.dom,e)),this._lastTouchMoment=new Date,this.handler.processGesture(e,"start"),k.mousemove.call(this,e),k.mousedown.call(this,e)},touchmove:function(e){y(e=l(this.dom,e)),this.handler.processGesture(e,"change"),k.mousemove.call(this,e)},touchend:function(e){y(e=l(this.dom,e)),this.handler.processGesture(e,"end"),k.mouseup.call(this,e),+new Date-this._lastTouchMoment<300&&k.click.call(this,e)},pointerdown:function(e){k.mousedown.call(this,e)},pointermove:function(e){b(e)||k.mousemove.call(this,e)},pointerup:function(e){k.mouseup.call(this,e)},pointerout:function(e){b(e)||k.mouseout.call(this,e)}};u.each(["click","mousewheel","dblclick","contextmenu"],(function(e){k[e]=function(t){t=l(this.dom,t),this.trigger(e,t)}}));var w={pointermove:function(e){b(e)||w.mousemove.call(this,e)},pointerup:function(e){w.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this._pointerCapturing;T(this,!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function C(e,t){var n=t.domHandlers;h.pointerEventsSupported?u.each(p.pointer,(function(r){O(t,r,(function(t){n[r].call(e,t)}))})):(h.touchEventsSupported&&u.each(p.touch,(function(r){O(t,r,(function(i){n[r].call(e,i),function(e){e.touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout((function(){e.touching=!1,e.touchTimer=null}),700)}(t)}))})),u.each(p.mouse,(function(r){O(t,r,(function(i){i=c(i),t.touching||n[r].call(e,i)}))})))}function S(e,t){function n(n){O(t,n,(function(r){r=c(r),E(e,r.target)||(r=function(e,t){return l(e.dom,new x(e,t),!0)}(e,r),t.domHandlers[n].call(e,r))}),{capture:!0})}h.pointerEventsSupported?u.each(g,n):h.touchEventsSupported||u.each(m,n)}function O(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,o(e.domTarget,v(t),n,r)}function A(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&s(e.domTarget,v(n),t[n],e.listenerOpts[n]);e.mounted={}}function T(e,t){if(e._mayPointerCapture=null,f&&e._pointerCapturing^t){e._pointerCapturing=t;var n=e._globalHandlerScope;t?S(e,n):A(n)}}function I(e,t){this.domTarget=e,this.domHandlers=t,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function D(e,t){d.call(this),this.dom=e,this.painterRoot=t,this._localHandlerScope=new I(e,k),f&&(this._globalHandlerScope=new I(document,w)),this._pointerCapturing=!1,this._mayPointerCapture=null,C(this,this._localHandlerScope)}var L=D.prototype;L.dispose=function(){A(this._localHandlerScope),f&&A(this._globalHandlerScope)},L.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},u.mixin(D,d);var R=D;e.exports=R}}]); |