(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-76dd6480","chunk-2d0e4caf"],{"09a1":function(e,t,n){},"156b":function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"json-editor"},[t("textarea",{ref:"textarea"})])},i=[],a=n("56b3"),o=n.n(a),l=(n("a7be"),n("b866"),n("4ba6"),{props:{value:{type:String,required:!0},height:{type:String,required:!0}},data:function(){return{editor:!1}},watch:{value:function(e){var t=this.editor.getValue();e!==t&&this.editor.setValue(this.value)},height:function(e){this.editor.setSize("auto",this.height)}},mounted:function(){this.editor=o.a.fromTextArea(this.$refs.textarea,{mode:"text/x-java",lineNumbers:!0,lint:!0,lineWrapping:!0,tabSize:2,cursorHeight:.9,theme:"idea",readOnly:!0}),this.editor.setSize("auto",this.height),this.editor.setValue(this.value)},methods:{getValue:function(){return this.editor.getValue()}}}),s=l,c=(n("c144"),n("2877")),u=Object(c["a"])(s,r,i,!1,null,"d27611cc",null);t["default"]=u.exports},"1a9a":function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"execution"},[t("basic-container",[t("avue-crud",{ref:"crud",attrs:{page:e.page,data:e.tableData,permission:e.permissionList,"table-loading":e.tableLoading,option:e.tableOption},on:{"update:page":function(t){e.page=t},"on-load":e.getList,"search-change":e.searchChange,"refresh-change":e.refreshChange,"size-change":e.sizeChange,"current-change":e.currentChange,"row-update":e.handleUpdate,"row-save":e.handleSave,"row-del":e.rowDel}})],1)],1)},i=[],a=(n("8e6e"),n("ac6a"),n("456d"),n("ade3")),o=n("b5c6");function l(e){return Object(o["a"])({url:"/nwphis/page",method:"get",params:e})}function s(e){return Object(o["a"])({url:"/nwphis",method:"post",data:e})}function c(e){return Object(o["a"])({url:"/nwphis/"+e,method:"delete"})}function u(e){return Object(o["a"])({url:"/nwphis",method:"put",data:e})}var p={border:!0,index:!0,indexLabel:"序号",stripe:!0,menuAlign:"center",align:"center",searchMenuSpan:6,title:"NWP历史数据 ",excelBtn:!0,menu:!1,addBtn:!1,editBtn:!1,delBtn:!1,column:[{type:"input",label:"所属场站",prop:"stationCode",dicUrl:"/electricfield/all"},{type:"input",label:"提前多久预测",prop:"forecastHowLongAgo"},{type:"date",label:"预测日期",format:"yyyy-MM-dd",valueFormat:"yyyy-MM-dd",prop:"preDate"},{type:"datetime",label:"预测时间",format:"yyyy-MM-dd HH:mm",valueFormat:"yyyy-MM-dd HH:mm:ss",prop:"preTime"},{type:"date",label:"生成日期",format:"yyyy-MM-dd",valueFormat:"yyyy-MM-dd",prop:"scDate"},{type:"datetime",label:"生成时间",format:"yyyy-MM-dd HH:mm",valueFormat:"yyyy-MM-dd HH:mm:ss",prop:"scTime"},{type:"input",label:"温度",prop:"t"},{type:"input",label:"湿度",prop:"rh"},{type:"input",label:"气压",prop:"pressure"},{type:"input",label:"短波辐射",prop:"swr"},{type:"input",label:"长波辐射",prop:"lwr"},{type:"input",label:"直辐射",prop:"directRadiation"},{type:"input",label:"散辐射",prop:"diffuseRadiation"},{type:"input",label:"热感通量",prop:"senf"},{type:"input",label:"10米风速",prop:"ws10"},{type:"input",label:"30米风速",prop:"ws30"},{type:"input",label:"50米风速",prop:"ws50"},{type:"input",label:"70米风速",prop:"ws70"},{type:"input",label:"80米风速",prop:"ws80"},{type:"input",label:"90米风速",prop:"ws90"},{type:"input",label:"100米风速",prop:"ws100"},{type:"input",label:"170米风速",prop:"ws170"},{type:"input",label:"10米风向",prop:"wd10"},{type:"input",label:"30米风向",prop:"wd30"},{type:"input",label:"50米风向",prop:"wd50"},{type:"input",label:"70米风向",prop:"wd70"},{type:"input",label:"80米风向",prop:"wd80"},{type:"input",label:"90米风向",prop:"wd90"},{type:"input",label:"100米风向",prop:"wd100"},{type:"input",label:"170米风向",prop:"wd170"}]},d=n("2f62");function h(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 f(e){for(var t=1;t|[*\]])\s*$|\*$/.test(e.string.slice(0,n))||(!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0))}function a(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function o(e){for(var t={},n=e.split(" "),r=0;r!?|\/]/,M=s.isIdentifierChar||/[\w\$_\xa1-\uffff]/,P=s.isReservedIdentifier||!1;function _(e,t){var n=e.next();if(w[n]){var r=w[n](e,t);if(!1!==r)return r}if('"'==n||"'"==n)return t.tokenize=z(n),t.tokenize(e,t);if(k.test(n)){if(e.backUp(1),e.match(D))return"number";e.next()}if(O.test(n))return c=n,null;if("/"==n){if(e.eat("*"))return t.tokenize=j,j(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(T.test(n)){while(!e.match(/^\/[\/*]/,!1)&&e.eat(T));return"operator"}if(e.eatWhile(M),L)while(e.match(L))e.eatWhile(M);var i=e.current();return l(f,i)?(l(v,i)&&(c="newstatement"),l(b,i)&&(u=!0),"keyword"):l(g,i)?"type":l(m,i)||P&&P(i)?(l(v,i)&&(c="newstatement"),"builtin"):l(y,i)?"atom":"variable"}function z(e){return function(t,n){var r,i=!1,a=!1;while(null!=(r=t.next())){if(r==e&&!i){a=!0;break}i=!i&&"\\"==r}return(a||!i&&!x)&&(n.tokenize=null),"string"}}function j(e,t){var n,r=!1;while(n=e.next()){if("/"==n&&r){t.tokenize=null;break}r="*"==n}return"comment"}function N(e,t){s.typeFirstDefinitions&&e.eol()&&a(t.context)&&(t.typeAtEndOfLine=i(e,t,e.pos))}return{startState:function(e){return{tokenize:null,context:new t((e||0)-p,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var o=t.context;if(e.sol()&&(null==o.align&&(o.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return N(e,t),null;c=u=null;var l=(t.tokenize||_)(e,t);if("comment"==l||"meta"==l)return l;if(null==o.align&&(o.align=!0),";"==c||":"==c||","==c&&e.match(/^\s*(?:\/\/.*)?$/,!1))while("statement"==t.context.type)r(t);else if("{"==c)n(t,e.column(),"}");else if("["==c)n(t,e.column(),"]");else if("("==c)n(t,e.column(),")");else if("}"==c){while("statement"==o.type)o=r(t);"}"==o.type&&(o=r(t));while("statement"==o.type)o=r(t)}else c==o.type?r(t):S&&(("}"==o.type||"top"==o.type)&&";"!=c||"statement"==o.type&&"newstatement"==c)&&n(t,e.column(),"statement",e.current());if("variable"==l&&("def"==t.prevToken||s.typeFirstDefinitions&&i(e,t,e.start)&&a(t.context)&&e.match(/^\s*\(/,!1))&&(l="def"),w.token){var p=w.token(e,t,l);void 0!==p&&(l=p)}return"def"==l&&!1===s.styleDefs&&(l="variable"),t.startOfLine=!1,t.prevToken=u?"def":l||c,N(e,t),l},indent:function(t,n){if(t.tokenize!=_&&null!=t.tokenize||t.typeAtEndOfLine)return e.Pass;var r=t.context,i=n&&n.charAt(0),a=i==r.type;if("statement"==r.type&&"}"==i&&(r=r.prev),s.dontIndentStatements)while("statement"==r.type&&s.dontIndentStatements.test(r.info))r=r.prev;if(w.indent){var o=w.indent(t,r,n,p);if("number"==typeof o)return o}var l=r.prev&&"switch"==r.prev.info;if(s.allmanIndentation&&/[{(]/.test(i)){while("top"!=r.type&&"}"!=r.type)r=r.prev;return r.indented}return"statement"==r.type?r.indented+("{"==i?0:d):!r.align||h&&")"==r.type?")"!=r.type||a?r.indented+(a?0:p)+(a||!l||/^(?:case|default)\b/.test(n)?0:p):r.indented+d:r.column+(a?0:1)},electricInput:C?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}}));var s="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile inline restrict asm fortran",c="alignas alignof and and_eq audit axiom bitand bitor catch class compl concept constexpr const_cast decltype delete dynamic_cast explicit export final friend import module mutable namespace new noexcept not not_eq operator or or_eq override private protected public reinterpret_cast requires static_assert static_cast template this thread_local throw try typeid typename using virtual xor xor_eq",u="bycopy byref in inout oneway out self super atomic nonatomic retain copy readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd @interface @implementation @end @protocol @encode @property @synthesize @dynamic @class @public @package @private @protected @required @optional @try @catch @finally @import @selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available",p="FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION NS_RETURNS_RETAINEDNS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT",d=o("int long char short double float unsigned signed void bool"),h=o("SEL instancetype id Class Protocol BOOL");function f(e){return l(d,e)||/.+_t$/.test(e)}function g(e){return f(e)||l(h,e)}var m="case do else for if switch while struct enum union",v="struct enum union";function b(e,t){if(!t.startOfLine)return!1;for(var n,r=null;n=e.peek();){if("\\"==n&&e.match(/^.$/)){r=b;break}if("/"==n&&e.match(/^\/[\/\*]/,!1))break;e.next()}return t.tokenize=r,"meta"}function y(e,t){return"type"==t.prevToken&&"type"}function w(e){return!(!e||e.length<2)&&("_"==e[0]&&("_"==e[1]||e[1]!==e[1].toLowerCase()))}function x(e){return e.eatWhile(/[\w\.']/),"number"}function S(e,t){if(e.backUp(1),e.match(/^(?:R|u8R|uR|UR|LR)/)){var n=e.match(/^"([^\s\\()]{0,16})\(/);return!!n&&(t.cpp11RawStringDelim=n[1],t.tokenize=O,O(e,t))}return e.match(/^(?:u8|u|U|L)/)?!!e.match(/^["']/,!1)&&"string":(e.next(),!1)}function C(e){var t=/(\w+)::~?(\w+)$/.exec(e);return t&&t[1]==t[2]}function L(e,t){var n;while(null!=(n=e.next()))if('"'==n&&!e.eat('"')){t.tokenize=null;break}return"string"}function O(e,t){var n=t.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&"),r=e.match(new RegExp(".*?\\)"+n+'"'));return r?t.tokenize=null:e.skipToEnd(),"string"}function k(t,n){"string"==typeof t&&(t=[t]);var r=[];function i(e){if(e)for(var t in e)e.hasOwnProperty(t)&&r.push(t)}i(n.keywords),i(n.types),i(n.builtin),i(n.atoms),r.length&&(n.helperType=t[0],e.registerHelper("hintWords",t[0],r));for(var a=0;a!?|\/#:@]/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return!!e.match('""')&&(t.tokenize=D,t.tokenize(e,t))},"'":function(e){return e.match(/^(\\[^'\s]+|[^\\'])'/)?"string-2":(e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom")},"=":function(e,n){var r=n.context;return!("}"!=r.type||!r.align||!e.eat(">"))&&(n.context=new t(r.indented,r.column,r.type,r.info,null,r.prev),"operator")},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=T(1),t.tokenize(e,t))}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}}),k("text/x-kotlin",{name:"clike",keywords:o("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam value"),types:o("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:o("catch class do else finally for if where try while enum"),defKeywords:o("class val var object interface fun"),atoms:o("true false null this"),hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},"*":function(e,t){return"."==t.prevToken?"variable":"operator"},'"':function(e,t){return t.tokenize=M(e.match('""')),t.tokenize(e,t)},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=T(1),t.tokenize(e,t))},indent:function(e,t,n,r){var i=n&&n.charAt(0);return"}"!=e.prevToken&&")"!=e.prevToken||""!=n?"operator"==e.prevToken&&"}"!=n&&"}"!=e.context.type||"variable"==e.prevToken&&"."==i||("}"==e.prevToken||")"==e.prevToken)&&"."==i?2*r+t.indented:t.align&&"}"==t.type?t.indented+(e.context.type==(n||"").charAt(0)?0:r):void 0:e.indented}},modeProps:{closeBrackets:{triples:'"'}}}),k(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:o("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:o("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:o("for while do if else struct"),builtin:o("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:o("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":b},modeProps:{fold:["brace","include"]}}),k("text/x-nesc",{name:"clike",keywords:o(s+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:f,blockKeywords:o(m),atoms:o("null true false"),hooks:{"#":b},modeProps:{fold:["brace","include"]}}),k("text/x-objectivec",{name:"clike",keywords:o(s+" "+u),types:g,builtin:o(p),blockKeywords:o(m+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:o(v+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:o("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:w,hooks:{"#":b,"*":y},modeProps:{fold:["brace","include"]}}),k("text/x-objectivec++",{name:"clike",keywords:o(s+" "+u+" "+c),types:g,builtin:o(p),blockKeywords:o(m+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:o(v+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:o("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:w,hooks:{"#":b,"*":y,u:S,U:S,L:S,R:S,0:x,1:x,2:x,3:x,4:x,5:x,6:x,7:x,8:x,9:x,token:function(e,t,n){if("variable"==n&&"("==e.peek()&&(";"==t.prevToken||null==t.prevToken||"}"==t.prevToken)&&C(e.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),k("text/x-squirrel",{name:"clike",keywords:o("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:f,blockKeywords:o("case catch class else for foreach if switch try while"),defKeywords:o("function local class"),typeFirstDefinitions:!0,atoms:o("true false null"),hooks:{"#":b},modeProps:{fold:["brace","include"]}});var P=null;function _(e){return function(t,n){var r,i=!1,a=!1;while(!t.eol()){if(!i&&t.match('"')&&("single"==e||t.match('""'))){a=!0;break}if(!i&&t.match("``")){P=_(e),a=!0;break}r=t.next(),i="single"==e&&!i&&"\\"==r}return a&&(n.tokenize=null),"string"}}k("text/x-ceylon",{name:"clike",keywords:o("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:o("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:o("class dynamic function interface module object package value"),builtin:o("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:o("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=_(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!(!P||!e.match("`"))&&(t.tokenize=P,P=null,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(e,t,n){if(("variable"==n||"type"==n)&&"."==t.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})}))},"516a":function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"execution"},[t("div",{staticStyle:{display:"inline-block"}},[t("span",{staticStyle:{"font-weight":"bold","font-size":"14px"}},[e._v(" 场站名称:")]),t("el-select",{staticStyle:{width:"250px"},attrs:{clearable:"",size:"small"},model:{value:e.stationCode,callback:function(t){e.stationCode=t},expression:"stationCode"}},e._l(e.stationList,(function(n){return t("el-option",{key:n.value,attrs:{label:n.label,value:n.value}},[t("span",{staticStyle:{float:"left"}},[e._v(e._s(n.label))]),t("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[e._v(e._s(n.value))])])})),1),e._v("\n  \n "),t("div",{staticClass:"timeQuery",staticStyle:{display:"inline-block"}},[t("el-button",{attrs:{size:"small",loading:e.loading},on:{click:e.dataQuery}},[e._v("查询")])],1)],1),t("basic-container",[t("avue-crud",{ref:"crud",attrs:{page:e.page,data:e.tableData,permission:e.permissionList,"table-loading":e.tableLoading,option:e.tableOption,"before-open":e.beforeOpen},on:{"update:page":function(t){e.page=t},"on-load":e.dataQuery,"search-change":e.searchChange,"refresh-change":e.refreshChange,"size-change":e.sizeChange,"current-change":e.currentChange,"row-update":e.handleUpdate,"row-save":e.handleSave,"row-del":e.rowDel},scopedSlots:e._u([{key:"menu",fn:function(n){var r=n.row,i=n.index;return[t("el-button",{staticClass:"myButton",attrs:{type:"primary",size:"small",icon:"el-icon-edit"},on:{click:function(t){return t.stopPropagation(),e.handleEdit(r,i)}}},[e._v("\n 编辑\n ")]),t("el-button",{staticClass:"myButton",attrs:{type:"danger",size:"small",icon:"el-icon-delete"},on:{click:function(t){return t.stopPropagation(),e.handleDel(r,i)}}},[e._v("\n 删除\n ")])]}}])})],1)],1)},i=[],a=(n("8e6e"),n("ac6a"),n("456d"),n("7f7f"),n("7514"),n("ade3")),o=n("b5c6");function l(e){return Object(o["a"])({url:"/windtowerinfo/findByStationCode",method:"post",data:e})}function s(){return Object(o["a"])({url:"/electricfield/all",method:"get"})}function c(e){return Object(o["a"])({url:"/windtowerinfo",method:"post",data:e})}function u(e){return Object(o["a"])({url:"/windtowerinfo/"+e,method:"delete"})}function p(e){return Object(o["a"])({url:"/windtowerinfo",method:"put",data:e})}var d={border:!0,index:!0,indexLabel:"序号",stripe:!0,menuAlign:"center",align:"center",searchMenuSpan:6,excelBtn:!0,title:"测风塔信息 ",editBtn:!1,delBtn:!1,column:[{type:"select",label:"所属场站",prop:"stationCode",rules:[{required:!0,message:"请填写场站编号",trigger:"blur"}],filterable:!0,dicUrl:"/electricfield/all"},{type:"input",label:"设备编号",prop:"equipmentNo",rules:[{required:!0,message:"请填写设备编号",trigger:"blur"}]},{type:"input",label:"名称",prop:"name",rules:[{required:!0,message:"请填写名称",trigger:"blur"}]},{type:"input",label:"制造商",prop:"manufacturer",rules:[{required:!0,message:"请填写制造商",trigger:"blur"}]},{type:"input",label:"型号",prop:"modelNumber",rules:[{required:!0,message:"请填写型号",trigger:"blur"}]},{type:"date",label:"安装时间",format:"yyyy-MM-dd",valueFormat:"yyyy-MM-dd",prop:"installationTime",rules:[{required:!0,message:"请选择安装时间",trigger:"blur"}]},{type:"select",label:"是否上报",prop:"report",rules:[{required:!0,message:"请选择是否上报",trigger:"blur"}],dicData:[{value:"1",label:"是"},{value:"0",label:"否"}]},{type:"select",label:"入库时间间隔",prop:"timeInterval",labelWidth:120,rules:[{required:!0,message:"请选择入库时间间隔",trigger:"blur"}],dicData:[{value:1,label:"一分钟"},{value:5,label:"五分钟"}]},{type:"select",label:"测风塔是否样板机",prop:"sample",labelWidth:140,rules:[{required:!0,message:"请选择是否样板机",trigger:"blur"}],dicData:[{value:1,label:"是"},{value:0,label:"否"}]},{type:"input",label:"绑定数据采集通道",prop:"bindTunnel",labelWidth:140,rules:[{required:!0,message:"请选择绑定通道",trigger:"blur"}]},{type:"select",label:"是否为模板机",prop:"analyticUse",value:"0",labelWidth:120,rules:[{required:!0,message:"请选择是否为模板机",trigger:"blur"}],dicData:[{value:"1",label:"是",disabled:!1},{value:"0",label:"否"}]}]},h=n("2f62");function f(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;t0&&(e.stationCode=e.stationList[0].value),e.getAllWindturbineInfo(),e.tableLoading=!1}))},getAllWindturbineInfo:function(){var e=this;this.windturbineInfoList=[],this.equipmentId="",this.tableLoading=!0;var t=new URLSearchParams;t.append("stationCode",this.stationCode),s(t).then((function(t){e.windturbineInfoList=t.data.data,e.windturbineInfoList.length>0&&(e.equipmentId=e.windturbineInfoList[0].value),e.tableLoading=!1}))},sizeChange:function(e){this.page.pageSize=e},currentChange:function(e){this.page.currentPage=e},searchChange:function(e,t){this.searchForm=e,this.page.currentPage=1,this.dateQuery(this.page,e),t()},refreshChange:function(){this.dateQuery()}}},g=f,m=n("2877"),v=Object(m["a"])(g,r,i,!1,null,null,null);t["default"]=v.exports},"56b3":function(e,t,n){(function(t,n){e.exports=n()})(0,(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,l=o&&(r?document.documentMode||6:+(a||i)[1]),s=!a&&/WebKit\//.test(e),c=s&&/Qt\/\d+\.\d+/.test(e),u=!a&&/Chrome\/(\d+)/.exec(e),p=u&&+u[1],d=/Opera\//.test(e),h=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),g=/PhantomJS/.test(e),m=h&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),v=/Android/.test(e),b=m||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=m||/Mac/.test(t),w=/\bCrOS\b/.test(e),x=/win/i.test(t),S=d&&e.match(/Version\/(\d*\.\d*)/);S&&(S=Number(S[1])),S&&S>=15&&(d=!1,s=!0);var C=y&&(c||d&&(null==S||S<12.11)),L=n||o&&l>=9;function O(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var k,D=function(e,t){var n=e.className,r=O(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 T(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function M(e,t){return T(e).appendChild(t)}function P(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)return o+(t-a);o+=l-a,o+=n-o%n,a=l+1}}m?I=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:o&&(I=function(e){try{e.select()}catch(t){}});var R=function(){this.id=null,this.f=null,this.time=0,this.handler=W(this.onTimeout,this)};function q(e,t){for(var n=0;n=t)return r+Math.min(o,t-i);if(i+=a-r,i+=n-i%n,r=a+1,i>=t)return r}}var X=[""];function Y(e){while(X.length<=e)X.push(Z(X)+" ");return X[e]}function Z(e){return e[e.length-1]}function J(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||re.test(e))}function ae(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ie(e))||t.test(e):ie(e)}function oe(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var le=/[\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 se(e){return e.charCodeAt(0)>=768&&le.test(e)}function ce(e,t,n){while((n<0?t>0:tn?-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}}function pe(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,a=0;at||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")}var de=null;function he(e,t,n){var r;de=null;for(var i=0;it)return i;a.to==t&&(a.from!=a.to&&"before"==n?r=i:de=i),a.from==t&&(a.from!=a.to&&"before"!=n?r=i:de=i)}return null!=r?r:de}var fe=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,a=/[LRr]/,o=/[Lb1n]/,l=/[1n]/;function s(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var c="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!r.test(e))return!1;for(var u=e.length,p=[],d=0;d-1&&(r[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function we(e,t){var n=be(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function Le(e){e.prototype.on=function(e,t){ve(this,e,t)},e.prototype.off=function(e,t){ye(this,e,t)}}function Oe(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ke(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function De(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Te(e){Oe(e),ke(e)}function Me(e){return e.target||e.srcElement}function Pe(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var _e,ze,je=function(){if(o&&l<9)return!1;var e=P("div");return"draggable"in e||"dragDrop"in e}();function Ne(e){if(null==_e){var t=P("span","​");M(e,P("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(_e=t.offsetWidth<=1&&t.offsetHeight>2&&!(o&&l<8))}var n=_e?P("span","​"):P("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Ae(e){if(null!=ze)return ze;var t=M(e,document.createTextNode("AخA")),n=k(t,0,1).getBoundingClientRect(),r=k(t,1,2).getBoundingClientRect();return T(e),!(!n||n.left==n.right)&&(ze=r.right-n.right<3)}var Ie=3!="\n\nb".split(/\n/).length?function(e){var t=0,n=[],r=e.length;while(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/)},Fe=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(n){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Be=function(){var e=P("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),We=null;function Ee(e){if(null!=We)return We;var t=M(e,P("span","x")),n=t.getBoundingClientRect(),r=k(t,0,1).getBoundingClientRect();return We=Math.abs(n.left-r.left)>1}var He={},Re={};function qe(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),He[e]=t}function Ue(e,t){Re[e]=t}function $e(e){if("string"==typeof e&&Re.hasOwnProperty(e))e=Re[e];else if(e&&"string"==typeof e.name&&Re.hasOwnProperty(e.name)){var t=Re[e.name];"string"==typeof t&&(t={name:t}),e=ne(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return $e("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return $e("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ge(e,t){t=$e(t);var n=He[t.name];if(!n)return Ge(e,"text/plain");var r=n(e,t);if(Ve.hasOwnProperty(t.name)){var i=Ve[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 Ve={};function Ke(e,t){var n=Ve.hasOwnProperty(e)?Ve[e]:Ve[e]={};E(t,n)}function Qe(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 Xe(e,t){var n;while(e.innerMode){if(n=e.innerMode(t),!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}}function Ye(e,t,n){return!e.startState||e.startState(t,n)}var Ze=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 Je(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");var n=e;while(!n.lines)for(var r=0;;++r){var i=n.children[r],a=i.chunkSize();if(t=e.first&&tn?lt(n,Je(e,n).text.length):gt(t,Je(e,t.line).text.length)}function gt(e,t){var n=e.ch;return null==n||n>t?lt(e.line,t):n<0?lt(e.line,0):e}function mt(e,t){for(var n=[],r=0;r=this.string.length},Ze.prototype.sol=function(){return this.pos==this.lineStart},Ze.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ze.prototype.next=function(){if(this.post},Ze.prototype.eatSpace=function(){var e=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos)))++this.pos;return this.pos>e},Ze.prototype.skipToEnd=function(){this.pos=this.string.length},Ze.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ze.prototype.backUp=function(e){this.pos-=e},Ze.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},a=this.string.substr(this.pos,e.length);if(i(a)==i(e))return!1!==t&&(this.pos+=e.length),!0},Ze.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ze.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ze.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ze.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var vt=function(e,t){this.state=e,this.lookAhead=t},bt=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 yt(e,t,n,r){var i=[e.state.modeGen],a={};Tt(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),a,r);for(var o=n.state,l=function(r){n.baseTokens=i;var l=e.state.overlays[r],s=1,c=0;n.state=!0,Tt(e,t.text,l.mode,n,(function(e,t){var n=s;while(ce&&i.splice(s,1,e,i[s+1],r),s+=2,c=Math.min(e,r)}if(t)if(l.opaque)i.splice(n,s-n,e,"overlay "+t),s=n+2;else for(;ne.options.maxHighlightLength&&Qe(e.doc.mode,r.state),a=yt(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 xt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new bt(r,!0,t);var a=Mt(e,t,n),o=a>r.first&&Je(r,a-1).stateAfter,l=o?bt.fromSaved(r,o,a):new bt(r,Ye(r.mode),a);return r.iter(a,t,(function(n){St(e,n.text,l);var r=l.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}bt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},bt.prototype.baseToken=function(e){if(!this.baseTokens)return null;while(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}},bt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},bt.fromSaved=function(e,t,n){return t instanceof vt?new bt(e,Qe(e.mode,t.state),n,t.lookAhead):new bt(e,Qe(e.mode,t),n)},bt.prototype.save=function(e){var t=!1!==e?Qe(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new vt(t,this.maxLookAhead):t};var Ot=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function kt(e,t,n,r){var i,a=e.doc,o=a.mode;t=ft(a,t);var l,s=Je(a,t.line),c=xt(e,t.line,n),u=new Ze(s.text,e.options.tabSize,c);r&&(l=[]);while((r||u.pose.options.maxHighlightLength?(l=!1,o&&St(e,t,r,p.pos),p.pos=t.length,s=null):s=Dt(Lt(n,p,r.state,d),a),d){var h=d[0].name;h&&(s="m-"+(s?h+" "+s:h))}if(!l||u!=s){while(co;--l){if(l<=a.first)return a.first;var s=Je(a,l-1),c=s.stateAfter;if(c&&(!n||l+(c instanceof vt?c.lookAhead:0)<=a.modeFrontier))return l;var u=H(s.text,null,e.options.tabSize);(null==i||r>u)&&(i=l-1,r=u)}return i}function Pt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=Je(e,r).stateAfter;if(i&&(!(i instanceof vt)||r+i.lookAhead=t:a.to>t);(r||(r=[])).push(new At(o,a.from,s?null:a.to))}}return r}function Et(e,t,n){var r;if(e)for(var i=0;i=t:a.to>t);if(l||a.from==t&&"bookmark"==o.type&&(!n||a.marker.insertLeft)){var s=null==a.from||(o.inclusiveLeft?a.from<=t:a.from0&&l)for(var w=0;w0)){var u=[s,1],p=st(c.from,l.from),d=st(c.to,l.to);(p<0||!o.inclusiveLeft&&!p)&&u.push({from:c.from,to:l.from}),(d>0||!o.inclusiveRight&&!d)&&u.push({from:l.to,to:c.to}),i.splice.apply(i,u),s+=u.length-3}}return i}function Ut(e){var t=e.markedSpans;if(t){for(var n=0;nt)&&(!n||Kt(n,a.marker)<0)&&(n=a.marker)}return n}function Jt(e,t,n,r,i){var a=Je(e,t),o=zt&&a.markedSpans;if(o)for(var l=0;l=0&&p<=0||u<=0&&p>=0)&&(u<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?st(c.to,n)>=0:st(c.to,n)>0)||u>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?st(c.from,r)<=0:st(c.from,r)<0)))return!0}}}function en(e){var t;while(t=Xt(e))e=t.find(-1,!0).line;return e}function tn(e){var t;while(t=Yt(e))e=t.find(1,!0).line;return e}function nn(e){var t,n;while(t=Yt(e))e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function rn(e,t){var n=Je(e,t),r=en(n);return n==r?t:rt(r)}function an(e,t){if(t>e.lastLine())return t;var n,r=Je(e,t);if(!on(e,r))return t;while(n=Yt(r))r=n.find(1,!0).line;return rt(r)+1}function on(e,t){var n=zt&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var pn=function(e,t,n){this.text=e,$t(this,t),this.height=n?n(this):1};function dn(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Ut(e),$t(e,n);var i=r?r(e):1;i!=e.height&&nt(e,i)}function hn(e){e.parent=null,Ut(e)}pn.prototype.lineNo=function(){return rt(this)},Le(pn);var fn={},gn={};function mn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?gn:fn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function vn(e,t){var n=_("span",null,null,s?"padding-right: .1px":null),r={pre:_("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=yn,Ae(e.display.measure)&&(o=ge(a,e.doc.direction))&&(r.addToken=xn(r.addToken,o)),r.map=[];var l=t!=e.display.externalMeasured&&rt(a);Cn(a,r,wt(e,a,l)),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=A(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=A(a.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ne(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(s){var c=r.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return we(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=A(r.pre.className,r.textClass||"")),r}function bn(e){var t=P("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function yn(e,t,n,r,i,a,s){if(t){var c,u=e.splitSpaces?wn(t,e.trailingSpace):t,p=e.cm.state.specialChars,d=!1;if(p.test(t)){c=document.createDocumentFragment();var h=0;while(1){p.lastIndex=h;var f=p.exec(t),g=f?f.index-h:t.length-h;if(g){var m=document.createTextNode(u.slice(h,h+g));o&&l<9?c.appendChild(P("span",[m])):c.appendChild(m),e.map.push(e.pos,e.pos+g,m),e.col+=g,e.pos+=g}if(!f)break;h+=g+1;var v=void 0;if("\t"==f[0]){var b=e.cm.options.tabSize,y=b-e.col%b;v=c.appendChild(P("span",Y(y),"cm-tab")),v.setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=y}else"\r"==f[0]||"\n"==f[0]?(v=c.appendChild(P("span","\r"==f[0]?"␍":"␤","cm-invalidchar")),v.setAttribute("cm-text",f[0]),e.col+=1):(v=e.cm.options.specialCharPlaceholder(f[0]),v.setAttribute("cm-text",f[0]),o&&l<9?c.appendChild(P("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&&l<9&&(d=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||r||i||d||a||s){var w=n||"";r&&(w+=r),i&&(w+=i);var x=P("span",[c],w,a);if(s)for(var S in s)s.hasOwnProperty(S)&&"style"!=S&&"class"!=S&&x.setAttribute(S,s[S]);return e.content.appendChild(x)}e.content.appendChild(c)}}function wn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;ic&&p.from<=c)break;if(p.to>=u)return e(n,r,i,a,o,l,s);e(n,r.slice(0,p.to-c),i,a,null,l,s),a=null,r=r.slice(p.to-c),c=p.to}}}function Sn(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 Cn(e,t,n){var r=e.markedSpans,i=e.text,a=0;if(r)for(var o,l,s,c,u,p,d,h=i.length,f=0,g=1,m="",v=0;;){if(v==f){s=c=u=l="",d=null,p=null,v=1/0;for(var b=[],y=void 0,w=0;wf||S.collapsed&&x.to==f&&x.from==f)){if(null!=x.to&&x.to!=f&&v>x.to&&(v=x.to,c=""),S.className&&(s+=" "+S.className),S.css&&(l=(l?l+";":"")+S.css),S.startStyle&&x.from==f&&(u+=" "+S.startStyle),S.endStyle&&x.to==v&&(y||(y=[])).push(S.endStyle,x.to),S.title&&((d||(d={})).title=S.title),S.attributes)for(var C in S.attributes)(d||(d={}))[C]=S.attributes[C];S.collapsed&&(!p||Kt(p.marker,S)<0)&&(p=x)}else x.from>f&&v>x.from&&(v=x.from)}if(y)for(var L=0;L=h)break;var k=Math.min(h,v);while(1){if(m){var D=f+m.length;if(!p){var T=D>k?m.slice(0,k-f):m;t.addToken(t,T,o?o+s:s,u,f+T.length==v?c:"",l,d)}if(D>=k){m=m.slice(k-f),f=k;break}f=D,u=""}m=i.slice(a,a=n[g++]),o=mn(n[g++],t.cm.options)}}else for(var M=1;M2&&a.push((s.bottom+c.top)/2-n.top)}}a.push(n.bottom-n.top)}}function er(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;rn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function tr(e,t){t=en(t);var n=rt(t),r=e.display.externalMeasured=new Ln(e.doc,t,n);r.lineN=n;var i=r.built=vn(e,r);return r.text=i.pre,M(e.display.lineMeasure,i.pre),r}function nr(e,t,n,r){return ar(e,ir(e,t),n,r)}function rr(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(a=s-l,i=a-1,t>=s&&(o="right")),null!=i){if(r=e[c+2],l==s&&n==(r.insertLeft?"left":"right")&&(o=n),"left"==n&&0==i)while(c&&e[c-2]==e[c-3]&&e[c-1].insertLeft)r=e[2+(c-=3)],o="left";if("right"==n&&i==s-l)while(c=0;i--)if((n=e[i]).left!=n.right)break;return n}function ur(e,t,n,r){var i,a=sr(t.map,n,r),s=a.node,c=a.start,u=a.end,p=a.collapse;if(3==s.nodeType){for(var d=0;d<4;d++){while(c&&se(t.line.text.charAt(a.coverStart+c)))--c;while(a.coverStart+u0&&(p=r="right"),i=e.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==r?h.length-1:0]:s.getBoundingClientRect()}if(o&&l<9&&!c&&(!i||!i.left&&!i.right)){var f=s.parentNode.getClientRects()[0];i=f?{left:f.left,right:f.left+zr(e.display),top:f.top,bottom:f.bottom}:lr}for(var g=i.top-t.rect.top,m=i.bottom-t.rect.top,v=(g+m)/2,b=t.view.measure.heights,y=0;y=r.text.length?(s=r.text.length,c="before"):s<=0&&(s=0,c="after"),!l)return o("before"==c?s-1:s,"before"==c);function u(e,t,n){var r=l[t],i=1==r.level;return o(n?e-1:e,i!=n)}var p=he(l,s,c),d=de,h=u(s,p,"before"==c);return null!=d&&(h.other=u(s,d,"before"!=c)),h}function Sr(e,t){var n=0;t=ft(e.doc,t),e.options.lineWrapping||(n=zr(e.display)*t.ch);var r=Je(e.doc,t.line),i=sn(r)+Vn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Cr(e,t,n,r,i){var a=lt(e,t,n);return a.xRel=i,r&&(a.outside=r),a}function Lr(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Cr(r.first,0,null,-1,-1);var i=it(r,n),a=r.first+r.size-1;if(i>a)return Cr(r.first+r.size-1,Je(r,a).text.length,null,1,1);t<0&&(t=0);for(var o=Je(r,i);;){var l=Tr(e,o,i,t,n),s=Zt(o,l.ch+(l.xRel>0||l.outside>0?1:0));if(!s)return l;var c=s.find(1);if(c.line==i)return c;o=Je(r,i=c.line)}}function Or(e,t,n,r){r-=vr(t);var i=t.text.length,a=ue((function(t){return ar(e,n,t-1).bottom<=r}),i,0);return i=ue((function(t){return ar(e,n,t).top>r}),a,i),{begin:a,end:i}}function kr(e,t,n,r){n||(n=ir(e,t));var i=br(e,t,ar(e,n,r),"line").top;return Or(e,t,n,i)}function Dr(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function Tr(e,t,n,r,i){i-=sn(t);var a=ir(e,t),o=vr(t),l=0,s=t.text.length,c=!0,u=ge(t,e.doc.direction);if(u){var p=(e.options.lineWrapping?Pr:Mr)(e,t,n,a,u,r,i);c=1!=p.level,l=c?p.from:p.to-1,s=c?p.to:p.from-1}var d,h,f=null,g=null,m=ue((function(t){var n=ar(e,a,t);return n.top+=o,n.bottom+=o,!!Dr(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(f=t,g=n),!0)}),l,s),v=!1;if(g){var b=r-g.left=w.bottom?1:0}return m=ce(t.text,m,1),Cr(n,m,h,v,r-d)}function Mr(e,t,n,r,i,a,o){var l=ue((function(l){var s=i[l],c=1!=s.level;return Dr(xr(e,lt(n,c?s.to:s.from,c?"before":"after"),"line",t,r),a,o,!0)}),0,i.length-1),s=i[l];if(l>0){var c=1!=s.level,u=xr(e,lt(n,c?s.from:s.to,c?"after":"before"),"line",t,r);Dr(u,a,o,!0)&&u.top>o&&(s=i[l-1])}return s}function Pr(e,t,n,r,i,a,o){var l=Or(e,t,r,o),s=l.begin,c=l.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,p=null,d=0;d=c||h.to<=s)){var f=1!=h.level,g=ar(e,r,f?Math.min(c,h.to)-1:Math.max(s,h.from)).right,m=gm)&&(u=h,p=m)}}return u||(u=i[i.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function _r(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==or){or=P("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)or.appendChild(document.createTextNode("x")),or.appendChild(P("br"));or.appendChild(document.createTextNode("x"))}M(e.measure,or);var n=or.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),T(e.measure),n||1}function zr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=P("span","xxxxxxxxxx"),n=P("pre",[t],"CodeMirror-line-like");M(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function jr(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,a=t.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var l=e.display.gutterSpecs[o].className;n[l]=a.offsetLeft+a.clientLeft+i,r[l]=a.clientWidth}return{fixedPos:Nr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Nr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Ar(e){var t=_r(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/zr(e.display)-3);return function(i){if(on(e.doc,i))return 0;var a=0;if(i.widgets)for(var o=0;o0&&(s=Je(e.doc,c.line).text).length==c.ch){var u=H(s,s.length,e.options.tabSize)-s.length;c=lt(c.line,Math.max(0,Math.round((a-Qn(e.display).left)/zr(e.display))-u))}return c}function Br(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)zt&&rn(e.doc,t)i.viewFrom?Hr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Hr(e);else if(t<=i.viewFrom){var a=Rr(e,n,n+r,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=r):Hr(e)}else if(n>=i.viewTo){var o=Rr(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Hr(e)}else{var l=Rr(e,t,t,-1),s=Rr(e,n,n+r,1);l&&s?(i.view=i.view.slice(0,l.index).concat(On(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):Hr(e)}var c=i.externalMeasured;c&&(n=i.lineN&&t=r.viewTo)){var a=r.view[Br(e,t)];if(null!=a.node){var o=a.changes||(a.changes=[]);-1==q(o,n)&&o.push(n)}}}function Hr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Rr(e,t,n,r){var i,a=Br(e,t),o=e.display.view;if(!zt||n==e.doc.first+e.doc.size)return{index:a,lineN:n};for(var l=e.display.viewFrom,s=0;s0){if(a==o.length-1)return null;i=l+o[a].size-t,a++}else i=l-t;t+=i,n+=i}while(rn(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 qr(e,t,n){var r=e.display,i=r.view;0==i.length||t>=r.viewTo||n<=r.viewFrom?(r.view=On(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=On(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Br(e,n)))),r.viewTo=n}function Ur(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||s.to().line0?o:e.defaultCharWidth())+"px"}if(r.other){var l=n.appendChild(P("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));l.style.display="",l.style.left=r.other.left+"px",l.style.top=r.other.top+"px",l.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function Kr(e,t){return e.top-t.top||e.left-t.left}function Qr(e,t,n){var r=e.display,i=e.doc,a=document.createDocumentFragment(),o=Qn(e.display),l=o.left,s=Math.max(r.sizerWidth,Yn(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(P("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?s-e:n)+"px;\n height: "+(r-t)+"px"))}function p(t,n,r){var a,o,p=Je(i,t),d=p.text.length;function h(n,r){return wr(e,lt(t,n),"div",p,r)}function f(t,n,r){var i=kr(e,p,null,t),a="ltr"==n==("after"==r)?"left":"right",o="after"==r?i.begin:i.end-(/\s/.test(p.text.charAt(i.end-1))?2:1);return h(o,a)[a]}var g=ge(p,i.direction);return pe(g,n||0,null==r?d:r,(function(e,t,i,p){var m="ltr"==i,v=h(e,m?"left":"right"),b=h(t-1,m?"right":"left"),y=null==n&&0==e,w=null==r&&t==d,x=0==p,S=!g||p==g.length-1;if(b.top-v.top<=3){var C=(c?y:w)&&x,L=(c?w:y)&&S,O=C?l:(m?v:b).left,k=L?s:(m?b:v).right;u(O,v.top,k-O,v.bottom)}else{var D,T,M,P;m?(D=c&&y&&x?l:v.left,T=c?s:f(e,i,"before"),M=c?l:f(t,i,"after"),P=c&&w&&S?s:b.right):(D=c?f(e,i,"before"):l,T=!c&&y&&x?s:v.right,M=!c&&w&&S?l:b.left,P=c?f(t,i,"after"):s),u(D,v.top,T-D,v.bottom),v.bottom0?t.blinker=setInterval((function(){e.hasFocus()||ei(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Yr(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Jr(e))}function Zr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&ei(e))}),100)}function Jr(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(we(e,"focus",e,t),e.state.focused=!0,N(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),s&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Xr(e))}function ei(e,t){e.state.delayingBlurEvent||(e.state.focused&&(we(e,"blur",e,t),e.state.focused=!1,D(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function ti(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,a=0,s=0;s.005||g<-.005)&&(ie.display.sizerWidth){var v=Math.ceil(d/zr(e.display));v>e.display.maxLineLength&&(e.display.maxLineLength=v,e.display.maxLine=c.line,e.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(t.scroller.scrollTop+=a)}function ni(e){if(e.widgets)for(var t=0;t=o&&(a=it(t,sn(Je(t,s))-e.wrapper.clientHeight),o=s)}return{from:a,to:Math.max(o,a+1)}}function ii(e,t){if(!xe(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,a=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(a.defaultView.innerHeight||a.documentElement.clientHeight)&&(i=!1),null!=i&&!g){var o=P("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Vn(e.display))+"px;\n height: "+(t.bottom-t.top+Xn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function ai(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==t.sticky?lt(t.line,t.ch+1,"before"):t,t=t.ch?lt(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var a=0;a<5;a++){var o=!1,l=xr(e,t),s=n&&n!=t?xr(e,n):l;i={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-r,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+r};var c=li(e,i),u=e.doc.scrollTop,p=e.doc.scrollLeft;if(null!=c.scrollTop&&(fi(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),null!=c.scrollLeft&&(mi(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-p)>1&&(o=!0)),!o)break}return i}function oi(e,t){var n=li(e,t);null!=n.scrollTop&&fi(e,n.scrollTop),null!=n.scrollLeft&&mi(e,n.scrollLeft)}function li(e,t){var n=e.display,r=_r(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,a=Zn(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var l=e.doc.height+Kn(n),s=t.topl-r;if(t.topi+a){var u=Math.min(t.top,(c?l:t.bottom)-a);u!=i&&(o.scrollTop=u)}var p=e.options.fixedGutter?0:n.gutters.offsetWidth,d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-p,h=Yn(e)-n.gutters.offsetWidth,f=t.right-t.left>h;return f&&(t.right=t.left+h),t.left<10?o.scrollLeft=0:t.lefth+d-3&&(o.scrollLeft=t.right+(f?0:10)-h),o}function si(e,t){null!=t&&(di(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function ci(e){di(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function ui(e,t,n){null==t&&null==n||di(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function pi(e,t){di(e),e.curOp.scrollToPos=t}function di(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=Sr(e,t.from),r=Sr(e,t.to);hi(e,n,r,t.margin)}}function hi(e,t,n,r){var i=li(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});ui(e,i.scrollLeft,i.scrollTop)}function fi(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||$i(e,{top:t}),gi(e,t,!0),n&&$i(e),Fi(e,100))}function gi(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 mi(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,Qi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function vi(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Kn(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+Xn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var bi=function(e,t,n){this.cm=n;var r=this.vert=P("div",[P("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=P("div",[P("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),ve(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),ve(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,o&&l<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};bi.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.scrollTop=0,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}},bi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},bi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},bi.prototype.zeroWidthHack=function(){var e=y&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new R,this.disableVert=new R},bi.prototype.enableZeroWidthBar=function(e,t,n){function r(){var i=e.getBoundingClientRect(),a="vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);a!=e?e.style.visibility="hidden":t.set(1e3,r)}e.style.visibility="",t.set(1e3,r)},bi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var yi=function(){};function wi(e,t){t||(t=vi(e));var n=e.display.barWidth,r=e.display.barHeight;xi(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&ti(e),xi(e,vi(e)),n=e.display.barWidth,r=e.display.barHeight}function xi(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=""}yi.prototype.update=function(){return{bottom:0,right:0}},yi.prototype.setScrollLeft=function(){},yi.prototype.setScrollTop=function(){},yi.prototype.clear=function(){};var Si={native:bi,null:yi};function Ci(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&D(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Si[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ve(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?mi(e,t):fi(e,t)}),e),e.display.scrollbars.addClass&&N(e.display.wrapper,e.display.scrollbars.addClass)}var Li=0;function Oi(e){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:++Li,markArrays:null},Dn(e.curOp)}function ki(e){var t=e.curOp;t&&Mn(t,(function(e){for(var t=0;t=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Wi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Mi(e){e.updatedDisplay=e.mustUpdate&&qi(e.cm,e.update)}function Pi(e){var t=e.cm,n=t.display;e.updatedDisplay&&ti(t),e.barMeasure=vi(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=nr(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+Xn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Yn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function _i(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var n=+new Date+e.options.workTime,r=xt(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,l=a.text.length>e.options.maxHighlightLength?Qe(t.mode,r.state):null,s=yt(e,a,r,!0);l&&(r.state=l),a.styles=s.styles;var c=a.styleClasses,u=s.classes;u?a.styleClasses=u:c&&(a.styleClasses=null);for(var p=!o||o.length!=a.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!p&&dn)return Fi(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&ji(e,(function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Ur(e))return!1;Xi(e)&&(Hr(e),t.dims=jr(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.viewFromo&&n.viewTo-o<20&&(o=Math.min(i,n.viewTo)),zt&&(a=rn(e.doc,a),o=an(e.doc,o));var l=a!=n.viewFrom||o!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;qr(e,a,o),n.viewOffset=sn(Je(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=Ur(e);if(!l&&0==s&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=Hi(e);return s>4&&(n.lineDiv.style.display="none"),Gi(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Ri(c),T(n.cursorDiv),T(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Fi(e,400)),n.updateLineNumbers=null,!0}function Ui(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Yn(e))r&&(t.visible=ri(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Kn(e.display)-Zn(e),n.top)}),t.visible=ri(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!qi(e,t))break;ti(e);var i=vi(e);$r(e),wi(e,i),Ki(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 $i(e,t){var n=new Wi(e,t);if(qi(e,n)){ti(e),Ui(e,n);var r=vi(e);$r(e),wi(e,r),Ki(e,r),n.finish()}}function Gi(e,t,n){var r=e.display,i=e.options.lineNumbers,a=r.lineDiv,o=a.firstChild;function l(t){var n=t.nextSibling;return s&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,p=0;p-1&&(h=!1),jn(e,d,u,n)),h&&(T(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(ot(e.options,u)))),o=d.node.nextSibling}else{var f=Hn(e,d,u,n);a.insertBefore(f,o)}u+=d.size}while(o)o=l(o)}function Vi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",_n(e,"gutterChanged",e)}function Ki(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+Xn(e)+"px"}function Qi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=Nr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=r+"px",o=0;o=105&&(a.wrapper.style.clipPath="inset(0px)"),a.wrapper.setAttribute("translate","no"),o&&l<8&&(a.gutters.style.zIndex=-1,a.scroller.style.paddingRight=0),s||n&&b||(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=Yi(i.gutters,i.lineNumbers),Zi(a),r.init(a)}Wi.prototype.signal=function(e,t){Ce(e,t)&&this.events.push(arguments)},Wi.prototype.finish=function(){for(var e=0;ec.clientWidth,f=c.scrollHeight>c.clientHeight;if(i&&h||a&&f){if(a&&y&&s)e:for(var g=t.target,m=l.view;g!=c;g=g.parentNode)for(var v=0;v=0&&st(e,r.to())<=0)return n}return-1};var la=function(e,t){this.anchor=e,this.head=t};function sa(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return st(e.from(),t.from())})),n=q(t,i);for(var a=1;a0:s>=0){var c=dt(l.from(),o.from()),u=pt(l.to(),o.to()),p=l.empty()?o.from()==o.head:l.from()==l.head;a<=n&&--n,t.splice(--a,2,new la(p?u:c,p?c:u))}}return new oa(t,n)}function ca(e,t){return new oa([new la(e,t||e)],0)}function ua(e){return e.text?lt(e.from.line+e.text.length-1,Z(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function pa(e,t){if(st(e,t.from)<0)return e;if(st(e,t.to)<=0)return ua(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+=ua(t).ch-t.to.ch),lt(n,r)}function da(e,t){for(var n=[],r=0;r1&&e.remove(l.line+1,f-1),e.insert(l.line+1,v)}_n(e,"change",e,t)}function ya(e,t,n){function r(e,i,a){if(e.linked)for(var o=0;o1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Z(e.done)):void 0}function Da(e,t,n,r){var i=e.history;i.undone.length=0;var a,o,l=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>l-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(a=ka(i,i.lastOp==r)))o=Z(a.changes),0==st(t.from,t.to)&&0==st(t.from,o.to)?o.to=ua(t):a.changes.push(La(e,t));else{var s=Z(i.done);s&&s.ranges||Pa(e.sel,i.done),a={changes:[La(e,t)],generation:i.generation},i.done.push(a);while(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=l,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,o||we(e,"historyAdded")}function Ta(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)}function Ma(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||Ta(e,a,Z(i.done),t))?i.done[i.done.length-1]=t:Pa(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=n,r&&!1!==r.clearRedo&&Oa(i.undone)}function Pa(e,t){var n=Z(t);n&&n.ranges&&n.equals(e)||t.push(e)}function _a(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 za(e){if(!e)return null;for(var t,n=0;n-1&&(Z(l)[p]=c[p],delete c[p])}}}return r}function Ia(e,t,n,r){if(r){var i=e.anchor;if(n){var a=st(t,i)<0;a!=st(n,i)<0?(i=t,t=n):a!=st(t,n)<0&&(t=n)}return new la(i,t)}return new la(n||t,t)}function Fa(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),qa(e,new oa([Ia(e.sel.primary(),t,n,i)],0),r)}function Ba(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),a=0;a=t.ch:l.to>t.ch))){if(i&&(we(s,"beforeCursorEnter"),s.explicitlyCleared)){if(a.markedSpans){--o;continue}break}if(!s.atomic)continue;if(n){var p=s.find(r<0?1:-1),d=void 0;if((r<0?u:c)&&(p=Xa(e,p,-r,p&&p.line==t.line?a:null)),p&&p.line==t.line&&(d=st(p,n))&&(r<0?d<0:d>0))return Ka(e,p,t,r,i)}var h=s.find(r<0?-1:1);return(r<0?c:u)&&(h=Xa(e,h,r,h.line==t.line?a:null)),h?Ka(e,h,t,r,i):null}}return t}function Qa(e,t,n,r,i){var a=r||1,o=Ka(e,t,n,a,i)||!i&&Ka(e,t,n,a,!0)||Ka(e,t,n,-a,i)||!i&&Ka(e,t,n,-a,!0);return o||(e.cantEdit=!0,lt(e.first,0))}function Xa(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?ft(e,lt(t.line-1)):null:n>0&&t.ch==(r||Je(e,t.line)).text.length?t.line=0;--i)eo(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else eo(e,t)}}function eo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=st(t.from,t.to)){var n=da(e,t);Da(e,t,n,e.cm?e.cm.curOp.id:NaN),ro(e,t,n,Ht(e,t));var r=[];ya(e,(function(e,n){n||-1!=q(r,e.history)||(so(e.history,t),r.push(e.history)),ro(e,t,null,Ht(e,t))}))}}function to(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,a=e.history,o=e.sel,l="undo"==t?a.done:a.undone,s="undo"==t?a.undone:a.done,c=0;c=0;--h){var f=d(h);if(f)return f.v}}}}function no(e,t){if(0!=t&&(e.first+=t,e.sel=new oa(J(e.sel.ranges,(function(e){return new la(lt(e.anchor.line+t,e.anchor.ch),lt(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){Wr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.linea&&(t={from:t.from,to:lt(a,Je(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=et(e,t.from,t.to),n||(n=da(e,t)),e.cm?io(e.cm,t,r):ba(e,t,r),Ua(e,n,G),e.cantEdit&&Qa(e,lt(e.firstLine(),0))&&(e.cantEdit=!1)}}function io(e,t,n){var r=e.doc,i=e.display,a=t.from,o=t.to,l=!1,s=a.line;e.options.lineWrapping||(s=rt(en(Je(r,a.line))),r.iter(s,o.line+1,(function(e){if(e==i.maxLine)return l=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&Se(e),ba(r,t,n,Ar(e)),e.options.lineWrapping||(r.iter(s,a.line+t.text.length,(function(e){var t=cn(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)})),l&&(e.curOp.updateMaxLine=!0)),Pt(r,a.line),Fi(e,400);var c=t.text.length-(o.line-a.line)-1;t.full?Wr(e):a.line!=o.line||1!=t.text.length||va(e.doc,t)?Wr(e,a.line,o.line+1,c):Er(e,a.line,"text");var u=Ce(e,"changes"),p=Ce(e,"change");if(p||u){var d={from:a,to:o,text:t.text,removed:t.removed,origin:t.origin};p&&_n(e,"change",e,d),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}function ao(e,t,n,r,i){var a;r||(r=n),st(r,n)<0&&(a=[r,n],n=a[0],r=a[1]),"string"==typeof t&&(t=e.splitLines(t)),Ja(e,{from:n,to:r,text:t,origin:i})}function oo(e,t,n,r){n1||!(this.children[0]instanceof uo))){var l=[];this.collapse(l),this.children=[new uo(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var o=i.lines.length%25+25,l=o;l10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==o&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=_("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Jt(e,t.line,t,n,a)||t.line!=n.line&&Jt(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Nt()}a.addToHistory&&Da(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var l,s=t.line,c=e.cm;if(e.iter(s,n.line+1,(function(r){c&&a.collapsed&&!c.options.lineWrapping&&en(r)==c.display.maxLine&&(l=!0),a.collapsed&&s!=t.line&&nt(r,0),Bt(r,new At(a,s==t.line?t.ch:null,s==n.line?n.ch:null),e.cm&&e.cm.curOp),++s})),a.collapsed&&e.iter(t.line,n.line+1,(function(t){on(e,t)&&nt(t,0)})),a.clearOnEnter&&ve(a,"beforeCursorEnter",(function(){return a.clear()})),a.readOnly&&(jt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++mo,a.atomic=!0),c){if(l&&(c.curOp.updateMaxLine=!0),a.collapsed)Wr(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++)Er(c,u,"text");a.atomic&&Ga(c.doc),_n(c,"markerAdded",c,a)}return a}vo.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Oi(e),Ce(this,"clear")){var n=this.find();n&&_n(this,"clear",n.from,n.to)}for(var r=null,i=null,a=0;ae.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Wr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ga(e.doc)),e&&_n(e,"markerCleared",e,this,r,i),t&&ki(e),this.parent&&this.parent.clear()}},vo.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;s--)Ja(this,r[s]);l?Ra(this,l):this.cm&&ci(this.cm)})),undo:Ii((function(){to(this,"undo")})),redo:Ii((function(){to(this,"redo")})),undoSelection:Ii((function(){to(this,"undo",!0)})),redoSelection:Ii((function(){to(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.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=ft(this,e),t=ft(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 l=0;l=s.to||null==s.from&&i!=e.line||null!=s.from&&i==t.line&&s.from>=t.ch||n&&!n(s.marker)||r.push(s.marker.parent||s.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=a,++n})),ft(this,lt(n,t))},indexFromPos:function(e){e=ft(this,e);var t=e.ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var p=e.dataTransfer.getData("Text");if(p){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),Ua(t.doc,ca(n,n)),d)for(var h=0;h=0;t--)ao(e.doc,"",r[t].from,r[t].to,"+delete");ci(e)}))}function Qo(e,t,n){var r=ce(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Xo(e,t,n){var r=Qo(e,t.ch,n);return null==r?null:new lt(t.line,r,n<0?"after":"before")}function Yo(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var a=ge(n,t.doc.direction);if(a){var o,l=i<0?Z(a):a[0],s=i<0==(1==l.level),c=s?"after":"before";if(l.level>0||"rtl"==t.doc.direction){var u=ir(t,n);o=i<0?n.text.length-1:0;var p=ar(t,u,o).top;o=ue((function(e){return ar(t,u,e).top==p}),i<0==(1==l.level)?l.from:l.to-1,o),"before"==c&&(o=Qo(n,o,1))}else o=i<0?l.to:l.from;return new lt(r,o,c)}}return new lt(r,i<0?n.text.length:0,i<0?"before":"after")}function Zo(e,t,n,r){var i=ge(t,e.doc.direction);if(!i)return Xo(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=he(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=o.from&&d>=u.begin)){var h=p?"before":"after";return new lt(n.line,d,h)}}var f=function(e,t,r){for(var a=function(e,t){return t?new lt(n.line,s(e,1),"before"):new lt(n.line,e,"after")};e>=0&&e0==(1!=o.level),c=l?r.begin:s(r.end,-1);if(o.from<=c&&c0?u.end:s(u.begin,-1);return null==m||r>0&&m==t.text.length||(g=f(r>0?0:i.length-1,r,c(m)),!g)?null:g}Eo.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"},Eo.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"},Eo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Eo.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"]},Eo["default"]=y?Eo.macDefault:Eo.pcDefault;var Jo={selectAll:Ya,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),G)},killLine:function(e){return Ko(e,(function(t){if(t.empty()){var n=Je(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new lt(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),lt(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var o=Je(e.doc,i.line-1).text;o&&(i=new lt(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),lt(i.line-1,o.length-1),i,"+transpose"))}n.push(new la(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return ji(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-1&&(st((i=l.ranges[i]).from(),t)<0||t.xRel>0)&&(st(i.to(),t)>0||t.xRel<0)?Ll(e,r,t,a):kl(e,r,t,a)}function Ll(e,t,n,r){var i=e.display,a=!1,c=Ni(e,(function(t){s&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Zr(e)),ye(i.wrapper.ownerDocument,"mouseup",c),ye(i.wrapper.ownerDocument,"mousemove",u),ye(i.scroller,"dragstart",p),ye(i.scroller,"drop",c),a||(Oe(t),r.addNew||Fa(e.doc,n,null,null,r.extend),s&&!h||o&&9==l?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},p=function(){return a=!0};s&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,ve(i.wrapper.ownerDocument,"mouseup",c),ve(i.wrapper.ownerDocument,"mousemove",u),ve(i.scroller,"dragstart",p),ve(i.scroller,"drop",c),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Ol(e,t,n){if("char"==n)return new la(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new la(lt(t.line,0),ft(e.doc,lt(t.line+1,0)));var r=n(e,t);return new la(r.from,r.to)}function kl(e,t,n,r){o&&Zr(e);var i=e.display,a=e.doc;Oe(t);var l,s,c=a.sel,u=c.ranges;if(r.addNew&&!r.extend?(s=a.sel.contains(n),l=s>-1?u[s]:new la(n,n)):(l=a.sel.primary(),s=a.sel.primIndex),"rectangle"==r.unit)r.addNew||(l=new la(n,n)),n=Fr(e,t,!0,!0),s=-1;else{var p=Ol(e,n,r.unit);l=r.extend?Ia(l,p.anchor,p.head,r.extend):p}r.addNew?-1==s?(s=u.length,qa(a,sa(e,u.concat([l]),s),{scroll:!1,origin:"*mouse"})):u.length>1&&u[s].empty()&&"char"==r.unit&&!r.extend?(qa(a,sa(e,u.slice(0,s).concat(u.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),c=a.sel):Wa(a,s,l,V):(s=0,qa(a,new oa([l],0),V),c=a.sel);var d=n;function h(t){if(0!=st(d,t))if(d=t,"rectangle"==r.unit){for(var i=[],o=e.options.tabSize,u=H(Je(a,n.line).text,n.ch,o),p=H(Je(a,t.line).text,t.ch,o),h=Math.min(u,p),f=Math.max(u,p),g=Math.min(n.line,t.line),m=Math.min(e.lastLine(),Math.max(n.line,t.line));g<=m;g++){var v=Je(a,g).text,b=Q(v,h,o);h==f?i.push(new la(lt(g,b),lt(g,b))):v.length>b&&i.push(new la(lt(g,b),lt(g,Q(v,f,o))))}i.length||i.push(new la(n,n)),qa(a,sa(e,c.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var y,w=l,x=Ol(e,t,r.unit),S=w.anchor;st(x.anchor,S)>0?(y=x.head,S=dt(w.from(),x.anchor)):(y=x.anchor,S=pt(w.to(),x.head));var C=c.ranges.slice(0);C[s]=Dl(e,new la(ft(a,S),y)),qa(a,sa(e,C,s),V)}}var f=i.wrapper.getBoundingClientRect(),g=0;function m(t){var n=++g,o=Fr(e,t,!0,"rectangle"==r.unit);if(o)if(0!=st(o,d)){e.curOp.focus=j(F(e)),h(o);var l=ri(i,a);(o.line>=l.to||o.linef.bottom?20:0;s&&setTimeout(Ni(e,(function(){g==n&&(i.scroller.scrollTop+=s,m(t))})),50)}}function v(t){e.state.selectingText=!1,g=1/0,t&&(Oe(t),i.input.focus()),ye(i.wrapper.ownerDocument,"mousemove",b),ye(i.wrapper.ownerDocument,"mouseup",y),a.history.lastSelOrigin=null}var b=Ni(e,(function(e){0!==e.buttons&&Pe(e)?m(e):v(e)})),y=Ni(e,v);e.state.selectingText=y,ve(i.wrapper.ownerDocument,"mousemove",b),ve(i.wrapper.ownerDocument,"mouseup",y)}function Dl(e,t){var n=t.anchor,r=t.head,i=Je(e.doc,n.line);if(0==st(n,r)&&n.sticky==r.sticky)return t;var a=ge(i);if(!a)return t;var o=he(a,n.ch,n.sticky),l=a[o];if(l.from!=n.ch&&l.to!=n.ch)return t;var s,c=o+(l.from==n.ch==(1!=l.level)?0:1);if(0==c||c==a.length)return t;if(r.line!=n.line)s=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=he(a,r.ch,r.sticky),p=u-o||(r.ch-n.ch)*(1==l.level?-1:1);s=u==c-1||u==c?p<0:p>0}var d=a[c+(s?-1:0)],h=s==(1==d.level),f=h?d.from:d.to,g=h?"after":"before";return n.ch==f&&n.sticky==g?t:new la(new lt(n.line,f,g),r)}function Tl(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(d){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Oe(t);var o=e.display,l=o.lineDiv.getBoundingClientRect();if(a>l.bottom||!Ce(e,n))return De(t);a-=l.top-o.viewOffset;for(var s=0;s=i){var u=it(e.doc,a),p=e.display.gutterSpecs[s];return we(e,n,e,u,p.className,t),De(t)}}}function Ml(e,t){return Tl(e,t,"gutterClick",!0)}function Pl(e,t){Gn(e.display,t)||_l(e,t)||xe(e,t,"contextmenu")||L||e.display.input.onContextMenu(t)}function _l(e,t){return!!Ce(e,"gutterContextMenu")&&Tl(e,t,"gutterContextMenu",!1)}function zl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),fr(e)}bl.prototype.compare=function(e,t,n){return this.time+vl>e&&0==st(t,this.pos)&&n==this.button};var jl={toString:function(){return"CodeMirror.Init"}},Nl={},Al={};function Il(e){var t=e.optionHandlers;function n(n,r,i,a){e.defaults[n]=r,i&&(t[n]=a?function(e,t,n){n!=jl&&i(e,t,n)}:i)}e.defineOption=n,e.Init=jl,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,ga(e)}),!0),n("indentUnit",2,ga,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){ma(e),fr(e),Wr(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(lt(r,a))}r++}));for(var i=n.length-1;i>=0;i--)ao(e.doc,t,n[i],lt(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=jl&&e.refresh()})),n("specialCharPlaceholder",bn,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",b?"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",!x),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){zl(e),Ji(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Vo(t),i=n!=jl&&Vo(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Bl,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=Yi(t,e.options.lineNumbers),Ji(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?Nr(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return wi(e)}),!0),n("scrollbarStyle","native",(function(e){Ci(e),wi(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=Yi(e.options.gutters,t),Ji(e)}),!0),n("firstLineNumber",1,Ji,!0),n("lineNumberFormatter",(function(e){return e}),Ji,!0),n("showCursorWhenSelecting",!1,$r,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(ei(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,Fl),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,$r,!0),n("singleCursorHeightPerLine",!0,$r,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,ma,!0),n("addModeClass",!1,ma,!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,ma,!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)}function Fl(e,t,n){var r=n&&n!=jl;if(!t!=!r){var i=e.display.dragFunctions,a=t?ve:ye;a(e.display.scroller,"dragstart",i.start),a(e.display.scroller,"dragenter",i.enter),a(e.display.scroller,"dragover",i.over),a(e.display.scroller,"dragleave",i.leave),a(e.display.scroller,"drop",i.drop)}}function Bl(e){e.options.lineWrapping?(N(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(D(e.display.wrapper,"CodeMirror-wrap"),un(e)),Ir(e),Wr(e),fr(e),setTimeout((function(){return wi(e)}),100)}function Wl(e,t){var n=this;if(!(this instanceof Wl))return new Wl(e,t);this.options=t=t?E(t):{},E(Nl,t,!1);var r=t.value;"string"==typeof r?r=new Oo(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Wl.inputStyles[t.inputStyle](this),a=this.display=new ea(e,r,i,t);for(var c in a.wrapper.CodeMirror=this,zl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ci(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 R,keySeq:null,specialChars:null},t.autofocus&&!b&&a.input.focus(),o&&l<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),El(this),jo(),Oi(this),this.curOp.forceUpdate=!0,wa(this,r),t.autofocus&&!b||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Jr(n)}),20):ei(this),Al)Al.hasOwnProperty(c)&&Al[c](this,t[c],jl);Xi(this),t.finishInit&&t.finishInit(this);for(var u=0;u400}ve(t.scroller,"touchstart",(function(i){if(!xe(e,i)&&!a(i)&&!Ml(e,i)){t.input.ensurePolled(),clearTimeout(n);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),ve(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),ve(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!Gn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,o=e.coordsChar(t.activeTouch,"page");a=!r.prev||s(r,r.prev)?new la(o,o):!r.prev.prev||s(r,r.prev.prev)?e.findWordAt(o):new la(lt(o.line,0),ft(e.doc,lt(o.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),Oe(n)}i()})),ve(t.scroller,"touchcancel",i),ve(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(fi(e,t.scroller.scrollTop),mi(e,t.scroller.scrollLeft,!0),we(e,"scroll",e))})),ve(t.scroller,"mousewheel",(function(t){return aa(e,t)})),ve(t.scroller,"DOMMouseScroll",(function(t){return aa(e,t)})),ve(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){xe(e,t)||Te(t)},over:function(t){xe(e,t)||(Mo(e,t),Te(t))},start:function(t){return To(e,t)},drop:Ni(e,Do),leave:function(t){xe(e,t)||Po(e)}};var c=t.input.getField();ve(c,"keyup",(function(t){return hl.call(e,t)})),ve(c,"keydown",Ni(e,pl)),ve(c,"keypress",Ni(e,fl)),ve(c,"focus",(function(t){return Jr(e,t)})),ve(c,"blur",(function(t){return ei(e,t)}))}Wl.defaults=Nl,Wl.optionHandlers=Al;var Hl=[];function Rl(e,t,n,r){var i,a=e.doc;null==n&&(n="add"),"smart"==n&&(a.mode.indent?i=xt(e,t).state:n="prev");var o=e.options.tabSize,l=Je(a,t),s=H(l.text,null,o);l.stateAfter&&(l.stateAfter=null);var c,u=l.text.match(/^\s*/)[0];if(r||/\S/.test(l.text)){if("smart"==n&&(c=a.mode.indent(i,l.text.slice(u.length),l.text),c==$||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>a.first?H(Je(a,t-1).text,null,o):0:"add"==n?c=s+e.options.indentUnit:"subtract"==n?c=s-e.options.indentUnit:"number"==typeof n&&(c=s+n),c=Math.max(0,c);var p="",d=0;if(e.options.indentWithTabs)for(var h=Math.floor(c/o);h;--h)d+=o,p+="\t";if(do,s=Ie(t),c=null;if(l&&r.ranges.length>1)if(ql&&ql.text.join("\n")==t){if(r.ranges.length%ql.text.length==0){c=[];for(var u=0;u=0;d--){var h=r.ranges[d],f=h.from(),g=h.to();h.empty()&&(n&&n>0?f=lt(f.line,f.ch-n):e.state.overwrite&&!l?g=lt(g.line,Math.min(Je(a,g.line).text.length,g.ch+Z(s).length)):l&&ql&&ql.lineWise&&ql.text.join("\n")==s.join("\n")&&(f=g=lt(f.line,0)));var m={from:f,to:g,text:c?c[d%c.length]:s,origin:i||(l?"paste":e.state.cutIncoming>o?"cut":"+input")};Ja(e.doc,m),_n(e,"inputRead",e,m)}t&&!l&&Vl(e,t),ci(e),e.curOp.updateInput<2&&(e.curOp.updateInput=p),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Gl(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||ji(t,(function(){return $l(t,n,0,null,"paste")})),!0}function Vl(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 l=0;l-1){o=Rl(e,i.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(Je(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=Rl(e,i.head.line,"smart"));o&&_n(e,"electricInput",e,i.head.line)}}}function Kl(e){for(var t=[],n=[],r=0;rn&&(Rl(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&ci(this));else{var a=i.from(),o=i.to(),l=Math.max(n,a.line);n=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var s=l;s0&&Wa(this.doc,r,new la(a,c[r].to()),G)}}})),getTokenAt:function(e,t){return kt(this,e,t)},getLineTokens:function(e,t){return kt(this,lt(e),t,!0)},getTokenTypeAt:function(e){e=ft(this.doc,e);var t,n=wt(this,Je(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&&(e=a,i=!0),r=Je(this.doc,e)}else r=e;return br(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-sn(r):0)},defaultTextHeight:function(){return _r(this.display)},defaultCharWidth:function(){return zr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var a=this.display;e=xr(this,ft(this.doc,e));var o=e.bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),a.sizer.appendChild(t),"over"==r)o=e.top;else if("above"==r||"near"==r){var s=Math.max(a.wrapper.clientHeight,this.doc.height),c=Math.max(a.sizer.clientWidth,a.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?o=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(o=e.bottom),l+t.offsetWidth>c&&(l=c-t.offsetWidth)}t.style.top=o+"px",t.style.left=t.style.right="","right"==i?(l=a.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(a.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),n&&oi(this,{left:l,top:o,right:l+t.offsetWidth,bottom:o+t.offsetHeight})},triggerOnKeyDown:Ai(pl),triggerOnKeyPress:Ai(fl),triggerOnKeyUp:hl,triggerOnMouseDown:Ai(wl),execCommand:function(e){if(Jo.hasOwnProperty(e))return Jo[e].call(null,this)},triggerElectric:Ai((function(e){Vl(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var a=ft(this.doc,e),o=0;o0&&l(n.charAt(r-1)))--r;while(i.5||this.options.lineWrapping)&&Ir(this),we(this,"refresh",this)})),swapDoc:Ai((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),wa(this,e),fr(this),this.display.input.reset(),ui(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,_n(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}},Le(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})}}function Zl(e,t,n,r,i){var a=t,o=n,l=Je(e,t.line),s=i&&"rtl"==e.direction?-n:n;function c(){var n=t.line+s;return!(n=e.first+e.size)&&(t=new lt(n,t.ch,t.sticky),l=Je(e,n))}function u(a){var o;if("codepoint"==r){var u=l.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(u))o=null;else{var p=n>0?u>=55296&&u<56320:u>=56320&&u<57343;o=new lt(t.line,Math.max(0,Math.min(l.text.length,t.ch+n*(p?2:1))),-n)}}else o=i?Zo(e.cm,l,t,n):Xo(l,t,n);if(null==o){if(a||!c())return!1;t=Yo(i,e.cm,l,t.line,s)}else t=o;return!0}if("char"==r||"codepoint"==r)u();else if("column"==r)u(!0);else if("word"==r||"group"==r)for(var p=null,d="group"==r,h=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;;f=!1){if(n<0&&!u(!f))break;var g=l.text.charAt(t.ch)||"\n",m=ae(g,h)?"w":d&&"\n"==g?"n":!d||/\s/.test(g)?null:"p";if(!d||f||m||(m="s"),p&&p!=m){n<0&&(n=1,u(),t.sticky="after");break}if(m&&(p=m),n>0&&!u(!f))break}var v=Qa(e,t,a,o,!0);return ct(a,v)&&(v.hitSide=!0),v}function Jl(e,t,n,r){var i,a,o=e.doc,l=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,B(e).innerHeight||o(e).documentElement.clientHeight),c=Math.max(s-.5*_r(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(;;){if(a=Lr(e,l,i),!a.outside)break;if(n<0?i<=0:i>=o.height){a.hitSide=!0;break}i+=5*n}return a}var es=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new R,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function ts(e,t){var n=rr(e,t.line);if(!n||n.hidden)return null;var r=Je(e.doc,t.line),i=er(n,r,t.line),a=ge(r,e.doc.direction),o="left";if(a){var l=he(a,t.ch);o=l%2?"right":"left"}var s=sr(i.map,t.ch,o);return s.offset="right"==s.collapse?s.end:s.start,s}function ns(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function rs(e,t){return t&&(e.bad=!0),e}function is(e,t,n,r,i){var a="",o=!1,l=e.doc.lineSeparator(),s=!1;function c(e){return function(t){return t.id==e}}function u(){o&&(a+=l,s&&(a+=l),o=s=!1)}function p(e){e&&(u(),a+=e)}function d(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void p(n);var a,h=t.getAttribute("cm-marker");if(h){var f=e.findMarks(lt(r,0),lt(i+1,0),c(+h));return void(f.length&&(a=f[0].find(0))&&p(et(e.doc,a.from,a.to).join(l)))}if("false"==t.getAttribute("contenteditable"))return;var g=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;g&&u();for(var m=0;m=t.display.viewTo||a.line=t.display.viewFrom&&ts(t,i)||{node:s[0].measure.map[2],offset:0},u=a.liner.firstLine()&&(o=lt(o.line-1,Je(r.doc,o.line-1).length)),l.ch==Je(r.doc,l.line).text.length&&l.linei.viewTo-1)return!1;o.line==i.viewFrom||0==(e=Br(r,o.line))?(t=rt(i.view[0].line),n=i.view[0].node):(t=rt(i.view[e].line),n=i.view[e-1].node.nextSibling);var s,c,u=Br(r,l.line);if(u==i.view.length-1?(s=i.viewTo-1,c=i.lineDiv.lastChild):(s=rt(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;var p=r.doc.splitLines(is(r,n,c,t,s)),d=et(r.doc,lt(t,0),lt(s,Je(r.doc,s).text.length));while(p.length>1&&d.length>1)if(Z(p)==Z(d))p.pop(),d.pop(),s--;else{if(p[0]!=d[0])break;p.shift(),d.shift(),t++}var h=0,f=0,g=p[0],m=d[0],v=Math.min(g.length,m.length);while(ho.ch&&b.charCodeAt(b.length-f-1)==y.charCodeAt(y.length-f-1))h--,f++;p[p.length-1]=b.slice(0,b.length-f).replace(/^\u200b+/,""),p[0]=p[0].slice(h).replace(/\u200b+$/,"");var x=lt(t,h),S=lt(s,d.length?Z(d).length-f:0);return p.length>1||p[0]||st(x,S)?(ao(r.doc,p,x,S,"+input"),!0):void 0},es.prototype.ensurePolled=function(){this.forceCompositionEnd()},es.prototype.reset=function(){this.forceCompositionEnd()},es.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},es.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))},es.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||ji(this.cm,(function(){return Wr(e.cm)}))},es.prototype.setUneditable=function(e){e.contentEditable="false"},es.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Ni(this.cm,$l)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},es.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},es.prototype.onContextMenu=function(){},es.prototype.resetPosition=function(){},es.prototype.needsContentAttribute=!0;var ls=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new R,this.hasSelection=!1,this.composing=null,this.resetting=!1};function ss(e,t){if(t=t?E(t):{},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=j(e.ownerDocument);t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=l.getValue()}var i;if(e.form&&(ve(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(s){}}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&&(ye(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var l=Wl((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return l}function cs(e){e.off=ye,e.on=ve,e.wheelEventPixels=ia,e.Doc=Oo,e.splitLines=Ie,e.countColumn=H,e.findColumn=Q,e.isWordChar=ie,e.Pass=$,e.signal=we,e.Line=pn,e.changeEnd=ua,e.scrollbarModel=Si,e.Pos=lt,e.cmpPos=st,e.modes=He,e.mimeModes=Re,e.resolveMode=$e,e.getMode=Ge,e.modeExtensions=Ve,e.extendMode=Ke,e.copyState=Qe,e.startState=Ye,e.innerMode=Xe,e.commands=Jo,e.keyMap=Eo,e.keyName=Go,e.isModifierKey=Uo,e.lookupKey=qo,e.normalizeKeyMap=Ro,e.StringStream=Ze,e.SharedTextMarker=yo,e.TextMarker=vo,e.LineWidget=ho,e.e_preventDefault=Oe,e.e_stopPropagation=ke,e.e_stop=Te,e.addClass=N,e.contains=z,e.rmClass=D,e.keyNames=Io}ls.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function a(e){if(!xe(r,e)){if(r.somethingSelected())Ul({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Kl(r);Ul({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,G):(n.prevInput="",i.value=t.text.join("\n"),I(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),ve(i,"input",(function(){o&&l>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),ve(i,"paste",(function(e){xe(r,e)||Gl(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),ve(i,"cut",a),ve(i,"copy",a),ve(e.scroller,"paste",(function(t){if(!Gn(e,t)&&!xe(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)}})),ve(e.lineSpace,"selectstart",(function(t){Gn(e,t)||Oe(t)})),ve(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"})}})),ve(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},ls.prototype.createField=function(e){this.wrapper=Xl(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Ql(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},ls.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ls.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Gr(e);if(e.options.moveInputWithCursor){var i=xr(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},ls.prototype.showSelection=function(e){var t=this.cm,n=t.display;M(n.cursorDiv,e.cursors),M(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ls.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&I(this.textarea),o&&l>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",o&&l>=9&&(this.hasSelection=null));this.resetting=!1}},ls.prototype.getField=function(){return this.textarea},ls.prototype.supportsTouch=function(){return!1},ls.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!b||j(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch(e){}},ls.prototype.blur=function(){this.textarea.blur()},ls.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ls.prototype.receivedFocus=function(){this.slowPoll()},ls.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},ls.prototype.fastPoll=function(){var e=!1,t=this;function n(){var r=t.poll();r||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}t.pollingFast=!0,t.polling.set(20,n)},ls.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Fe(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&&l>=9&&this.hasSelection===i||y&&/[\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")}var s=0,c=Math.min(r.length,i.length);while(s1e3||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},ls.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ls.prototype.onKeyPress=function(){o&&l>=9&&(this.hasSelection=null),this.fastPoll()},ls.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=Fr(n,e),c=r.scroller.scrollTop;if(a&&!d){var u=n.options.resetSelectionOnContextMenu;u&&-1==n.doc.sel.contains(a)&&Ni(n,qa)(n.doc,ca(a),G);var p,h=i.style.cssText,f=t.wrapper.style.cssText,g=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-g.top-5)+"px; left: "+(e.clientX-g.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);",s&&(p=i.ownerDocument.defaultView.scrollY),r.input.focus(),s&&i.ownerDocument.defaultView.scrollTo(null,p),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=b,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),o&&l>=9&&v(),L){Te(e);var m=function(){ye(window,"mouseup",m),setTimeout(b,20)};ve(window,"mouseup",m)}else setTimeout(b,50)}function v(){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 b(){if(t.contextMenuPending==b&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=h,o&&l<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!o||o&&l<9)&&v();var e=0,a=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?Ni(n,Ya)(n):e++<10?r.detectingSelectAll=setTimeout(a,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(a,200)}}},ls.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},ls.prototype.setUneditable=function(){},ls.prototype.needsContentAttribute=!1,Il(Wl),Yl(Wl);var us="iter insert remove copy getEditor constructor".split(" ");for(var ps in Oo.prototype)Oo.prototype.hasOwnProperty(ps)&&q(us,ps)<0&&(Wl.prototype[ps]=function(e){return function(){return e.apply(this.doc,arguments)}}(Oo.prototype[ps]));return Le(Oo),Wl.inputStyles={textarea:ls,contenteditable:es},Wl.defineMode=function(e){Wl.defaults.mode||"null"==e||(Wl.defaults.mode=e),qe.apply(this,arguments)},Wl.defineMIME=Ue,Wl.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Wl.defineMIME("text/plain","null"),Wl.defineExtension=function(e,t){Wl.prototype[e]=t},Wl.defineDocExtension=function(e,t){Oo.prototype[e]=t},Wl.fromTextArea=ss,cs(Wl),Wl.version="5.65.13",Wl}))},"57ff":function(e,t,n){"use strict";n("9dcc")},"590a":function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"execution"},[t("basic-container",[t("avue-crud",{ref:"crud",attrs:{page:e.page,data:e.tableData,"table-loading":e.tableLoading,option:e.tableOption},on:{"update:page":function(t){e.page=t},"on-load":e.getList,"search-change":e.searchChange,"refresh-change":e.refreshChange,"size-change":e.sizeChange,"current-change":e.currentChange,"row-update":e.handleUpdate,"row-save":e.handleSave,"row-del":e.rowDel}})],1)],1)},i=[],a=(n("8e6e"),n("ac6a"),n("456d"),n("ade3")),o=n("b5c6");function l(e){return Object(o["a"])({url:"/sysalarm/page",method:"get",params:e})}function s(e){return Object(o["a"])({url:"/sysalarm",method:"post",data:e})}function c(e){return Object(o["a"])({url:"/sysalarm/"+e,method:"delete"})}function u(e){return Object(o["a"])({url:"/sysalarm",method:"put",data:e})}var p={border:!0,index:!0,indexLabel:"序号",stripe:!0,menuAlign:"center",align:"center",searchMenuSpan:6,column:[{type:"input",label:"场站编号",prop:"stationCode"},{type:"input",label:"错误信息",prop:"errorInfo"},{type:"input",label:"问题类型",prop:"alarmTypeEnum"},{type:"input",label:"问题名称",prop:"name"},{type:"input",label:"问题描述",prop:"problemDescription"},{type:"input",label:"问题状态",prop:"alarmStatusEnum"},{type:"input",label:"处理办法",prop:"solution"},{type:"input",label:"问题优先级",prop:"pritority"}]},d=n("2f62");function h(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 f(e){for(var t=1;t3);var o=new Object;o.name=i,o.value=e[r],o.connectNulls=!0,o.itemStyle=this.itemStyle[n].itemStyle,o.areaStyle=this.itemStyle[n].areaStyle,t.series[0].data.push(o),n++}console.log(t),this.chart.setOption(t,!0);var l=this;window.addEventListener("resize",(function(){l.chart.resize()}))},wfDraw:function(e){this.charts=p["init"](document.getElementById("wfcharts"));var t={title:{top:20,text:"测风塔信息-风速频率图",textStyle:{fontWeight:"normal",fontSize:16,color:this.lineColor},left:"1%"},tooltip:{trigger:"axis"},grid:{top:100,left:"2%",right:"2%",bottom:"10%",containLabel:!0},legend:{top:20,width:"70%",icon:"rect",itemWidth:14,itemHeight:5,itemGap:13,data:[],right:"4%",textStyle:{fontSize:12,color:this.lineColor},selected:{}},calculable:!0,xAxis:[{type:"category",axisLine:{lineStyle:{color:this.lineColor}},data:["0-3m/s","3-6m/s","6-9m/s","9-12m/s","12-15m/s","15-18m/s","18-21m/s","21-24m/s","24-27m/s",">27m/s"]}],yAxis:[{type:"value",name:"%",axisTick:{show:!1},axisLine:{lineStyle:{color:this.lineColor}},axisLabel:{margin:10,textStyle:{fontSize:14,color:this.lineColor},formatter:"{value}"},splitLine:{lineStyle:{color:"#57617B"}}}],series:[]},n=0;for(var r in e){var i="";for(var a in this.thFormat)r==a&&(i=this.thFormat[a]);t.legend.data.push(i),t.legend.selected[i]=!(n>3);var o=new Object;o.name=i,o.type="bar",o.data=e[r],o.connectNulls=!0,o.itemStyle={normal:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:this.colorArr[n].start+"0.7)"},{offset:.5,color:this.colorArr[n].start+"0.3)"},{offset:1,color:this.colorArr[n].end}],globalCoord:!1}}},t.series[n]=o,n++}this.charts.setOption(t,!0);var l=this;window.addEventListener("resize",(function(){l.charts.resize()}))},wsDraw:function(e){this.wsChart=p["init"](document.getElementById("wscharts"));var t={backgroundColor:"transparent",title:{top:20,text:"测风塔信息-风速",textStyle:{fontWeight:"normal",fontSize:16,color:this.lineColor},left:"1%"},tooltip:{trigger:"axis",axisPointer:{lineStyle:{color:"#57617B"}}},legend:{top:20,width:"70%",icon:"rect",itemWidth:14,itemHeight:5,itemGap:13,data:[],right:"4%",textStyle:{fontSize:12,color:this.lineColor},selected:{}},dataZoom:[{show:!0,realtime:!0,start:0,end:100,left:"15%",right:"15%",textStyle:{color:this.lineColor}},{type:"inside"}],grid:{top:100,left:"2%",right:"2%",bottom:"10%",containLabel:!0},xAxis:[{type:"category",boundaryGap:!1,axisLine:{lineStyle:{color:this.lineColor}},data:[]}],yAxis:[{type:"value",name:"m/s",axisTick:{show:!1},axisLine:{lineStyle:{color:this.lineColor}},axisLabel:{margin:10,textStyle:{fontSize:14,color:this.lineColor},formatter:"{value}"},splitLine:{lineStyle:{color:"#57617B"}}}],series:[]};t.xAxis[0].data=e.times;var n=0;for(var r in e.wsCharts){var i="";for(var a in this.thFormat)r==a&&(i=this.thFormat[a]);t.legend.data.push(i),t.legend.selected[i]=!(n>3);var o={name:"",type:"line",smooth:!1,symbol:"circle",symbolSize:5,showSymbol:!1,lineStyle:{normal:{width:2}},itemStyle:{},data:[]};o.name=i,o.data=e.wsCharts[r],o.itemStyle=this.lineStyle[n].itemStyle,o.connectNulls=!0,t.series.push(o),n++}this.wsChart.setOption(t,!0);var l=this;window.addEventListener("resize",(function(){l.wsChart.resize()}))},queryWindTowerStatusDataForCharts:function(){var e=this,t=new URLSearchParams;if(t.append("stationCode",this.stationCode),t.append("startTime",this.startTime),t.append("endTime",this.endTime),t.append("equipmentId",this.equipmentId),""===this.equipmentId||null==this.equipmentId)return alert("请选择所属设备");o(t).then((function(t){console.log(t.data.data),e.drawData=t.data.data,e.wsData.wsCharts=e.drawData.ws,e.wsData.times=e.drawData.times,e.wdData=e.drawData.wd,e.thFormat=e.drawData.equipmentType,e.wfData=e.drawData.wf,e.tableHeader=e.drawData.tableHead,void 0!=e.drawData.wdInst50&&(e.wd50=e.drawData.wdInst50),void 0!=e.drawData.wdInst70&&(e.wd70=e.drawData.wdInst70),e.tableLoading||(e.loading=!1),e.handleClick()})).catch((function(t){e.tableLoading||(e.loading=!1),e.$message.error("测风塔设备查询风速echarts出错"+t)})),this.getWindtowerStatusData()},getWindtowerStatusData:function(){var e=this,t=new URLSearchParams;t.append("currentPage",this.page.currentPage),t.append("pageSize",this.page.pageSize),t.append("stationCode",this.stationCode),t.append("startTime",this.startTime),t.append("endTime",this.endTime),t.append("equipmentId",this.equipmentId),c(t).then((function(t){e.tableData=t.data.data.records,e.page.pageSize=t.data.data.size,e.page.total=t.data.data.total}))},getStationCode:function(){var e=this;this.tableLoading=!0,l().then((function(t){e.stationList=t.data.data,e.stationList.length>0&&(e.stationCode=e.stationList[0].value),e.getWindtowerinfoByStationCode(),e.tableLoading=!1}))},getWindtowerinfoByStationCode:function(){var e=this;this.windtowerinfoData=[],this.equipmentId="",this.tableLoading=!0;var t=new URLSearchParams;t.append("stationCode",this.stationCode),s(t).then((function(t){e.windtowerinfoData=t.data.data,e.windtowerinfoData.length>0&&(e.equipmentId=e.windtowerinfoData[0].value),e.tableLoading=!1}))},sizeChange:function(e){this.page.pageSize=e},currentChange:function(e){this.page.currentPage=e},searchChange:function(e,t){this.searchForm=e,this.page.currentPage=1,this.getList(this.page,e),t()},refreshChange:function(){this.getList(this.page)},handleClick:function(){var e=this;"first"===this.activeName?(this.chart=null,this.$nextTick((function(){e.wdDraw(e.wdData),e.chart.resize()}))):"second"===this.activeName?(this.wsChart=null,this.$nextTick((function(){e.wsDraw(e.wsData),e.wsChart.resize()}))):"Third"===this.activeName&&(this.charts=null,this.$nextTick((function(){e.wfDraw(e.wfData),e.charts.resize()})))}}},h=d,f=n("2877"),g=Object(f["a"])(h,r,i,!1,null,null,null);t["default"]=g.exports},9277:function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e._self._c;return t("router-view")},i=[],a=n("2877"),o={},l=Object(a["a"])(o,r,i,!1,null,null,null);t["default"]=l.exports},9813:function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"execution"},[t("basic-container",[t("avue-crud",{ref:"crud",attrs:{page:e.page,data:e.tableData,"table-loading":e.tableLoading,option:e.tableOption},on:{"update:page":function(t){e.page=t},"on-load":e.getList,"search-change":e.searchChange,"refresh-change":e.refreshChange,"size-change":e.sizeChange,"current-change":e.currentChange,"row-update":e.handleUpdate,"row-save":e.handleSave,"row-del":e.rowDel}})],1)],1)},i=[],a=(n("8e6e"),n("ac6a"),n("456d"),n("ade3")),o=n("b5c6");function l(e){return Object(o["a"])({url:"/quartz/page",method:"get",params:e})}function s(e){return Object(o["a"])({url:"/quartz",method:"post",data:e})}function c(e){return Object(o["a"])({url:"/quartz/"+e,method:"delete"})}function u(e){return Object(o["a"])({url:"/quartz",method:"put",data:e})}var p={border:!0,index:!0,indexLabel:"序号",stripe:!0,menuAlign:"center",align:"center",searchMenuSpan:6,column:[{type:"input",label:"场站标识",prop:"stationCode"},{type:"input",label:"任务名称",prop:"jobName"},{type:"input",label:"任务状态",prop:"jobState"},{type:"input",label:"执行类",prop:"executeClass"},{type:"input",label:"任务描述",prop:"description"},{type:"input",label:"cron时间表达式或轮询时间",prop:"cronExpression"},{type:"input",label:"类型",prop:"jobType"},{type:"datetime",label:"开始时间",format:"yyyy-MM-dd HH:mm",valueFormat:"yyyy-MM-dd HH:mm:ss",prop:"startTime"},{type:"datetime",label:"下次执行时间",format:"yyyy-MM-dd HH:mm",valueFormat:"yyyy-MM-dd HH:mm:ss",prop:"nextFireTime"},{type:"datetime",label:"上次执行时间",format:"yyyy-MM-dd HH:mm",valueFormat:"yyyy-MM-dd HH:mm:ss",prop:"prevFireTime"},{type:"datetime",label:"最后执行时间",format:"yyyy-MM-dd HH:mm",valueFormat:"yyyy-MM-dd HH:mm:ss",prop:"laetFireTime"}]},d=n("2f62");function h(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 f(e){for(var t=1;t0&&(e.stationCode=e.stationList[0].value),e.tableLoading=!1}))},getAllInverterInfo:function(){var e=this;this.inverterInfoList=[],this.equipmentId="",this.tableLoading=!0;var t=new URLSearchParams;t.append("stationCode",this.stationCode),s(t).then((function(t){e.inverterInfoList=t.data.data,e.inverterInfoList.length>0&&(e.equipmentId=e.inverterInfoList[0].value),e.tableLoading=!1}))},sizeChange:function(e){this.page.pageSize=e},currentChange:function(e){this.page.currentPage=e},searchChange:function(e,t){this.searchForm=e,this.page.currentPage=1,this.dateQuery(this.page,e),t()},refreshChange:function(){this.dateQuery()}}},g=f,m=n("2877"),v=Object(m["a"])(g,r,i,!1,null,null,null);t["default"]=v.exports},e1a3:function(e,t,n){},e1e0:function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"execution"},[t("div",{staticStyle:{display:"inline-block"}},[t("span",{staticStyle:{"font-weight":"bold","font-size":"14px"}},[e._v(" 场站名称:")]),t("el-select",{staticStyle:{width:"250px"},attrs:{clearable:"",size:"small"},model:{value:e.stationCode,callback:function(t){e.stationCode=t},expression:"stationCode"}},e._l(e.stationList,(function(n){return t("el-option",{key:n.value,attrs:{label:n.label,value:n.value}},[t("span",{staticStyle:{float:"left"}},[e._v(e._s(n.label))]),t("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[e._v(e._s(n.value))])])})),1),e._v("\n  \n "),t("div",{staticClass:"timeQuery",staticStyle:{display:"inline-block"}},[t("el-button",{attrs:{size:"small",loading:e.loading},on:{click:e.dataQuery}},[e._v("查询")])],1)],1),t("basic-container",[t("avue-crud",{ref:"crud",attrs:{page:e.page,data:e.tableData,permission:e.permissionList,"table-loading":e.tableLoading,option:e.tableOption,"before-open":e.beforeOpen},on:{"update:page":function(t){e.page=t},"on-load":e.dataQuery,"search-change":e.searchChange,"refresh-change":e.refreshChange,"size-change":e.sizeChange,"current-change":e.currentChange,"row-update":e.handleUpdate,"row-save":e.handleSave,"row-del":e.rowDel},scopedSlots:e._u([{key:"menu",fn:function(n){var r=n.row,i=n.index;return[t("el-button",{staticClass:"myButton",attrs:{type:"primary",size:"small",icon:"el-icon-edit"},on:{click:function(t){return t.stopPropagation(),e.handleEdit(r,i)}}},[e._v("\n 编辑\n ")]),t("el-button",{staticClass:"myButton",attrs:{type:"danger",size:"small",icon:"el-icon-delete"},on:{click:function(t){return t.stopPropagation(),e.handleDel(r,i)}}},[e._v("\n 删除\n ")])]}}])})],1)],1)},i=[],a=(n("8e6e"),n("ac6a"),n("456d"),n("7f7f"),n("ade3")),o=n("271d"),l={border:!0,index:!0,indexLabel:"序号",stripe:!0,menuAlign:"center",align:"center",searchMenuSpan:6,excelBtn:!0,editBtn:!1,delBtn:!1,title:"逆变器信息 ",column:[{type:"select",label:"所属场站",prop:"stationCode",rules:[{required:!0,message:"请选择场站编号",trigger:"blur"}],filterable:!0,dicUrl:"/electricfield/all"},{type:"input",label:"设备编号",prop:"equipmentNo",rules:[{required:!0,message:"请填写设备编号",trigger:"blur"}]},{type:"input",label:"名称",prop:"name",rules:[{required:!0,message:"请填写名称",trigger:"blur"}]},{type:"input",label:"制造商",prop:"manufacturer",rules:[{required:!0,message:"请填写制造商",trigger:"blur"}]},{type:"input",label:"型号",prop:"modelNumber",rules:[{required:!0,message:"请填写型号",trigger:"blur"}]},{type:"date",label:"安装时间",format:"yyyy-MM-dd",valueFormat:"yyyy-MM-dd",prop:"installationTime",rules:[{required:!0,message:"请选择安装时间",trigger:"blur"}]},{type:"select",label:"入库时间间隔",prop:"timeInterval",rules:[{required:!0,message:"请选择入库时间间隔",trigger:"blur"}],dicData:[{value:1,label:"一分钟"},{value:5,label:"五分钟"}]},{type:"select",label:"是否组串式",prop:"groupSeries",formatter:function(e,t,n,r){return 0==t?"不是":1==t?"是":void 0},dicData:[{value:1,label:"是"},{value:0,label:"否"}],rules:[{required:!0,message:"请选择是否组串",trigger:"blur"}]},{type:"input",label:"逆变器效率",prop:"efficiency",rules:[{required:!0,message:"请填写逆变器效率",trigger:"blur"}]},{type:"input",label:"额定功率",prop:"capacity",rules:[{required:!0,message:"请填写额定功率",trigger:"blur"}]},{type:"input",label:"集电线路",prop:"collectorCircuit",rules:[{required:!0,message:"请填写集电线路",trigger:"blur"}]},{type:"select",label:"逆变器是否样板机",prop:"sample",formatter:function(e,t,n,r){return 0==t?"不是":1==t?"是":void 0},dicData:[{value:1,label:"是"},{value:0,label:"否"}],rules:[{required:!0,message:"请选择是否样板机",trigger:"blur"}]}]},s=n("2f62");function c(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 u(e){for(var t=1;t0&&(e.equipmentId=e.weatherStationInfoData[0].value),e.tableLoading=!1}))},getWeatherStationStatusData:function(){var e=this,t=new URLSearchParams;t.append("currentPage",this.page.currentPage),t.append("pageSize",this.page.pageSize),t.append("stationCode",this.stationCode),t.append("startTime",this.startTime),t.append("endTime",this.endTime),t.append("equipmentId",this.equipmentId),u(t).then((function(t){e.tableData=t.data.data.records,e.page.pageSize=t.data.data.size,e.page.total=t.data.data.total}))},getStationCode:function(){var e=this;this.tableLoading=!0,s().then((function(t){e.stationList=t.data.data,e.stationList.length>0&&(e.stationCode=e.stationList[0].value),e.getWeatherstationinfoByStationCode(),e.tableLoading=!1}))},handleSizeChange:function(e){this.page.pageSize=e,this.page.currentPage=1},handleCurrentChange:function(e){this.page.currentPage=e},handleClick:function(){var e=this;"first"===this.activeName?(this.chart=null,this.$nextTick((function(){e.draw(e.radiationData.time,e.radiationData.data),e.chart.resize()}))):"second"===this.activeName?(this.wsChart=null,this.$nextTick((function(){e.wsDraw(e.otherData.time,e.otherData.data),e.wsChart.resize()}))):"Third"===this.activeName&&this.$nextTick((function(){e.getWeatherStationStatusData()}))}}},v=m,b=n("2877"),y=Object(b["a"])(v,r,i,!1,null,null,null);t["default"]=y.exports},f4fd:function(e,t,n){"use strict";n.r(t);n("7f7f");var r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"execution"},[t("div",{staticClass:"filter"},[t("div",{staticClass:"startTime",staticStyle:{display:"inline-block"}},[t("span",{staticClass:"timeText",staticStyle:{"font-weight":"bold","font-size":"14px"}},[e._v(" 预测起始时间:")]),t("el-date-picker",{attrs:{clearable:!1,type:"datetime","value-format":"timestamp",placeholder:"选择日期"},model:{value:e.startTime,callback:function(t){e.startTime=t},expression:"startTime"}})],1),t("div",{staticClass:"endTime",staticStyle:{display:"inline-block"}},[t("span",{staticClass:"timeText",staticStyle:{"font-weight":"bold","font-size":"14px"}},[e._v(" 预测截止时间:")]),t("el-date-picker",{attrs:{clearable:!1,type:"datetime","value-format":"timestamp",placeholder:"选择日期"},model:{value:e.endTime,callback:function(t){e.endTime=t},expression:"endTime"}})],1),t("div",{staticStyle:{display:"inline-block"}},[t("span",{staticStyle:{"font-weight":"bold","font-size":"14px"}},[e._v(" 场站名称:")]),t("el-select",{staticStyle:{width:"250px"},attrs:{size:"small"},on:{change:e.getManufactor},model:{value:e.stationCode,callback:function(t){e.stationCode=t},expression:"stationCode"}},e._l(e.stationList,(function(n){return t("el-option",{key:n.value,attrs:{label:n.label,value:n.value}},[t("span",{staticStyle:{float:"left"}},[e._v(e._s(n.label))]),t("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[e._v(e._s(n.value))])])})),1)],1),t("div",{staticStyle:{display:"inline-block"}},[t("span",{staticStyle:{"font-weight":"bold","font-size":"14px"}},[e._v(" 预测厂家:")]),t("el-select",{staticStyle:{width:"250px"},attrs:{size:"small"},model:{value:e.forecastManufactor,callback:function(t){e.forecastManufactor=t},expression:"forecastManufactor"}},e._l(e.forecastManufactorList,(function(n){return t("el-option",{key:n.sign,attrs:{label:n.name,value:n.sign}},[t("span",{staticStyle:{float:"left"}},[e._v(e._s(n.name))]),t("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[e._v(e._s(n.sign))])])})),1)],1),e._v("\n  \n "),t("div",{staticClass:"timeQuery",staticStyle:{display:"inline-block"}},[t("el-button",{attrs:{size:"small",loading:e.tableLoading},on:{click:e.queryNWPDataByStationCode}},[e._v("查询")])],1)]),t("basic-container",[t("avue-crud",{ref:"crud",attrs:{page:e.page,data:e.tableData,"table-loading":e.tableLoading,option:e.tableOption},on:{"update:page":function(t){e.page=t}}})],1)],1)},i=[],a=(n("8e6e"),n("ac6a"),n("456d"),n("6b54"),n("ade3")),o=n("b5c6");function l(e){return Object(o["a"])({url:"/nwp/queryTableData",method:"post",data:e})}function s(){return Object(o["a"])({url:"/electricfield/all",method:"get"})}function c(e){return Object(o["a"])({url:"/nwp/page",method:"get",params:e})}function u(e){return Object(o["a"])({url:"/nwp",method:"post",data:e})}function p(e){return Object(o["a"])({url:"/nwp/"+e,method:"delete"})}function d(e){return Object(o["a"])({url:"/nwp",method:"put",data:e})}var h={border:!0,index:!0,indexLabel:"序号",stripe:!0,menuAlign:"center",align:"center",searchMenuSpan:6,title:"NWP数据 ",excelBtn:!0,menu:!1,addBtn:!1,editBtn:!1,delBtn:!1,column:[{type:"input",label:"所属场站",prop:"stationCode",dicUrl:"/electricfield/all",width:150},{type:"input",label:"预测时间",prop:"preTime",width:150},{type:"input",label:"温度",prop:"t"},{type:"input",label:"湿度",prop:"rh"},{type:"input",label:"气压",prop:"pressure"},{type:"input",label:"短波辐射",prop:"swr"},{type:"input",label:"直辐射",prop:"directRadiation"},{type:"input",label:"散辐射",prop:"diffuseRadiation"},{type:"input",label:"10米风速",prop:"ws10"},{type:"input",label:"30米风速",prop:"ws30"},{type:"input",label:"50米风速",prop:"ws50"},{type:"input",label:"70米风速",prop:"ws70"},{type:"input",label:"80米风速",prop:"ws80"},{type:"input",label:"90米风速",prop:"ws90"},{type:"input",label:"100米风速",prop:"ws100"},{type:"input",label:"170米风速",prop:"ws170"},{type:"input",label:"10米风向",prop:"wd10"},{type:"input",label:"30米风向",prop:"wd30"},{type:"input",label:"50米风向",prop:"wd50"},{type:"input",label:"70米风向",prop:"wd70"},{type:"input",label:"80米风向",prop:"wd80"},{type:"input",label:"90米风向",prop:"wd90"},{type:"input",label:"100米风向",prop:"wd100"},{type:"input",label:"170米风向",prop:"wd170"}]},f=n("2f62"),g=n("d584");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 v(e){for(var t=1;t0&&(n.forecastManufactor=n.forecastManufactorList[0].sign)}))})),getStationCode:function(){var e=this;this.tableLoading=!0,s().then((function(t){e.stationList=t.data.data,e.stationList.length>0&&(e.stationCode=e.stationList[0].value,e.getManufactor(e.stationCode)),e.tableLoading=!1}))},getList:function(e,t){var n=this;this.tableLoading=!0,c(Object.assign({current:e.currentPage,size:e.pageSize},t,this.searchForm)).then((function(e){n.tableData=e.data.data.records,n.page.total=e.data.data.total,n.tableLoading=!1})).catch((function(){n.tableLoading=!1}))},rowDel:function(e,t){var n=this;this.$confirm("是否确认删除ID为"+e.id,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){return p(e.id)})).then((function(e){n.$message.success("删除成功"),n.getList(n.page)}))},handleUpdate:function(e,t,n,r){var i=this;d(e).then((function(e){i.$message.success("修改成功"),n(),i.getList(i.page)})).catch((function(){r()}))},handleSave:function(e,t,n){var r=this;u(e).then((function(e){r.$message.success("添加成功"),t(),r.getList(r.page)})).catch((function(){n()}))},sizeChange:function(e){this.page.pageSize=e},currentChange:function(e){this.page.currentPage=e},searchChange:function(e,t){this.searchForm=e,this.page.currentPage=1,this.getList(this.page,e),t()},refreshChange:function(){this.getList(this.page)}}},y=b,w=n("2877"),x=Object(w["a"])(y,r,i,!1,null,null,null);t["default"]=x.exports}}]);