webpackJsonp([0],{"++K3":function(t,e){var i,n,o,r,s,a,l,c,u,h,p,d,f,g,_,m=!1;function v(){if(!m){m=!0;var t=navigator.userAgent,e=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(t),v=/(Mac OS X)|(Windows)|(Linux)/.exec(t);if(d=/\b(iPhone|iP[ao]d)/.exec(t),f=/\b(iP[ao]d)/.exec(t),h=/Android/i.exec(t),g=/FBAN\/\w+;/i.exec(t),_=/Mobile/i.exec(t),p=!!/Win64/.exec(t),e){(i=e[1]?parseFloat(e[1]):e[5]?parseFloat(e[5]):NaN)&&document&&document.documentMode&&(i=document.documentMode);var y=/(?:Trident\/(\d+.\d+))/.exec(t);a=y?parseFloat(y[1])+4:i,n=e[2]?parseFloat(e[2]):NaN,o=e[3]?parseFloat(e[3]):NaN,(r=e[4]?parseFloat(e[4]):NaN)?(e=/(?:Chrome\/(\d+\.\d+))/.exec(t),s=e&&e[1]?parseFloat(e[1]):NaN):s=NaN}else i=n=o=s=r=NaN;if(v){if(v[1]){var b=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(t);l=!b||parseFloat(b[1].replace("_","."))}else l=!1;c=!!v[2],u=!!v[3]}else l=c=u=!1}}var y={ie:function(){return v()||i},ieCompatibilityMode:function(){return v()||a>i},ie64:function(){return y.ie()&&p},firefox:function(){return v()||n},opera:function(){return v()||o},webkit:function(){return v()||r},safari:function(){return y.webkit()},chrome:function(){return v()||s},windows:function(){return v()||c},osx:function(){return v()||l},linux:function(){return v()||u},iphone:function(){return v()||d},mobile:function(){return v()||d||f||h||_},nativeApp:function(){return v()||g},android:function(){return v()||h},ipad:function(){return v()||f}};t.exports=y},"+E39":function(t,e,i){t.exports=!i("S82l")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"+ZMJ":function(t,e,i){var n=i("lOnJ");t.exports=function(t,e,i){if(n(t),void 0===e)return t;switch(i){case 1:return function(i){return t.call(e,i)};case 2:return function(i,n){return t.call(e,i,n)};case 3:return function(i,n,o){return t.call(e,i,n,o)}}return function(){return t.apply(e,arguments)}}},"+tPU":function(t,e,i){i("xGkn");for(var n=i("7KvD"),o=i("hJx8"),r=i("/bQp"),s=i("dSzd")("toStringTag"),a="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;l<a.length;l++){var c=a[l],u=n[c],h=u&&u.prototype;h&&!h[s]&&o(h,s,c),r[c]=r.Array}},"//Fk":function(t,e,i){t.exports={default:i("U5ju"),__esModule:!0}},"/bQp":function(t,e){t.exports={}},"/dHd":function(t,e,i){var n,o,r,s;s=function(t){
/**
 * @license
 * Copyright 2020 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */
"use strict";return t},o=[i("GEkh")],void 0===(r="function"==typeof(n=s)?n.apply(e,o):n)||(t.exports=r)},"/n6Q":function(t,e,i){i("zQR9"),i("+tPU"),t.exports=i("Kh4W").f("iterator")},"/ocq":function(t,e,i){"use strict";
/*!
  * vue-router v3.5.2
  * (c) 2021 Evan You
  * @license MIT
  */function n(t,e){0}function o(t,e){for(var i in e)t[i]=e[i];return t}var r=/[!'()*]/g,s=function(t){return"%"+t.charCodeAt(0).toString(16)},a=/%2C/g,l=function(t){return encodeURIComponent(t).replace(r,s).replace(a,",")};function c(t){try{return decodeURIComponent(t)}catch(t){0}return t}var u=function(t){return null==t||"object"==typeof t?t:String(t)};function h(t){var e={};return(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach(function(t){var i=t.replace(/\+/g," ").split("="),n=c(i.shift()),o=i.length>0?c(i.join("=")):null;void 0===e[n]?e[n]=o:Array.isArray(e[n])?e[n].push(o):e[n]=[e[n],o]}),e):e}function p(t){var e=t?Object.keys(t).map(function(e){var i=t[e];if(void 0===i)return"";if(null===i)return l(e);if(Array.isArray(i)){var n=[];return i.forEach(function(t){void 0!==t&&(null===t?n.push(l(e)):n.push(l(e)+"="+l(t)))}),n.join("&")}return l(e)+"="+l(i)}).filter(function(t){return t.length>0}).join("&"):null;return e?"?"+e:""}var d=/\/?$/;function f(t,e,i,n){var o=n&&n.options.stringifyQuery,r=e.query||{};try{r=g(r)}catch(t){}var s={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:r,params:e.params||{},fullPath:m(e,o),matched:t?function(t){var e=[];for(;t;)e.unshift(t),t=t.parent;return e}(t):[]};return i&&(s.redirectedFrom=m(i,o)),Object.freeze(s)}function g(t){if(Array.isArray(t))return t.map(g);if(t&&"object"==typeof t){var e={};for(var i in t)e[i]=g(t[i]);return e}return t}var _=f(null,{path:"/"});function m(t,e){var i=t.path,n=t.query;void 0===n&&(n={});var o=t.hash;return void 0===o&&(o=""),(i||"/")+(e||p)(n)+o}function v(t,e,i){return e===_?t===e:!!e&&(t.path&&e.path?t.path.replace(d,"")===e.path.replace(d,"")&&(i||t.hash===e.hash&&y(t.query,e.query)):!(!t.name||!e.name)&&(t.name===e.name&&(i||t.hash===e.hash&&y(t.query,e.query)&&y(t.params,e.params))))}function y(t,e){if(void 0===t&&(t={}),void 0===e&&(e={}),!t||!e)return t===e;var i=Object.keys(t).sort(),n=Object.keys(e).sort();return i.length===n.length&&i.every(function(i,o){var r=t[i];if(n[o]!==i)return!1;var s=e[i];return null==r||null==s?r===s:"object"==typeof r&&"object"==typeof s?y(r,s):String(r)===String(s)})}function b(t){for(var e=0;e<t.matched.length;e++){var i=t.matched[e];for(var n in i.instances){var o=i.instances[n],r=i.enteredCbs[n];if(o&&r){delete i.enteredCbs[n];for(var s=0;s<r.length;s++)o._isBeingDestroyed||r[s](o)}}}}var T={name:"RouterView",functional:!0,props:{name:{type:String,default:"default"}},render:function(t,e){var i=e.props,n=e.children,r=e.parent,s=e.data;s.routerView=!0;for(var a=r.$createElement,l=i.name,c=r.$route,u=r._routerViewCache||(r._routerViewCache={}),h=0,p=!1;r&&r._routerRoot!==r;){var d=r.$vnode?r.$vnode.data:{};d.routerView&&h++,d.keepAlive&&r._directInactive&&r._inactive&&(p=!0),r=r.$parent}if(s.routerViewDepth=h,p){var f=u[l],g=f&&f.component;return g?(f.configProps&&E(g,s,f.route,f.configProps),a(g,s,n)):a()}var _=c.matched[h],m=_&&_.components[l];if(!_||!m)return u[l]=null,a();u[l]={component:m},s.registerRouteInstance=function(t,e){var i=_.instances[l];(e&&i!==t||!e&&i===t)&&(_.instances[l]=e)},(s.hook||(s.hook={})).prepatch=function(t,e){_.instances[l]=e.componentInstance},s.hook.init=function(t){t.data.keepAlive&&t.componentInstance&&t.componentInstance!==_.instances[l]&&(_.instances[l]=t.componentInstance),b(c)};var v=_.props&&_.props[l];return v&&(o(u[l],{route:c,configProps:v}),E(m,s,c,v)),a(m,s,n)}};function E(t,e,i,n){var r=e.props=function(t,e){switch(typeof e){case"undefined":return;case"object":return e;case"function":return e(t);case"boolean":return e?t.params:void 0;default:0}}(i,n);if(r){r=e.props=o({},r);var s=e.attrs=e.attrs||{};for(var a in r)t.props&&a in t.props||(s[a]=r[a],delete r[a])}}function C(t,e,i){var n=t.charAt(0);if("/"===n)return t;if("?"===n||"#"===n)return e+t;var o=e.split("/");i&&o[o.length-1]||o.pop();for(var r=t.replace(/^\//,"").split("/"),s=0;s<r.length;s++){var a=r[s];".."===a?o.pop():"."!==a&&o.push(a)}return""!==o[0]&&o.unshift(""),o.join("/")}function S(t){return t.replace(/\/\//g,"/")}var k=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},O=U,I=M,w=function(t,e){return N(M(t,e),e)},R=N,D=H,x=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function M(t,e){for(var i,n=[],o=0,r=0,s="",a=e&&e.delimiter||"/";null!=(i=x.exec(t));){var l=i[0],c=i[1],u=i.index;if(s+=t.slice(r,u),r=u+l.length,c)s+=c[1];else{var h=t[r],p=i[2],d=i[3],f=i[4],g=i[5],_=i[6],m=i[7];s&&(n.push(s),s="");var v=null!=p&&null!=h&&h!==p,y="+"===_||"*"===_,b="?"===_||"*"===_,T=i[2]||a,E=f||g;n.push({name:d||o++,prefix:p||"",delimiter:T,optional:b,repeat:y,partial:v,asterisk:!!m,pattern:E?P(E):m?".*":"[^"+L(T)+"]+?"})}}return r<t.length&&(s+=t.substr(r)),s&&n.push(s),n}function A(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function N(t,e){for(var i=new Array(t.length),n=0;n<t.length;n++)"object"==typeof t[n]&&(i[n]=new RegExp("^(?:"+t[n].pattern+")$",F(e)));return function(e,n){for(var o="",r=e||{},s=(n||{}).pretty?A:encodeURIComponent,a=0;a<t.length;a++){var l=t[a];if("string"!=typeof l){var c,u=r[l.name];if(null==u){if(l.optional){l.partial&&(o+=l.prefix);continue}throw new TypeError('Expected "'+l.name+'" to be defined')}if(k(u)){if(!l.repeat)throw new TypeError('Expected "'+l.name+'" to not repeat, but received `'+JSON.stringify(u)+"`");if(0===u.length){if(l.optional)continue;throw new TypeError('Expected "'+l.name+'" to not be empty')}for(var h=0;h<u.length;h++){if(c=s(u[h]),!i[a].test(c))throw new TypeError('Expected all "'+l.name+'" to match "'+l.pattern+'", but received `'+JSON.stringify(c)+"`");o+=(0===h?l.prefix:l.delimiter)+c}}else{if(c=l.asterisk?encodeURI(u).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}):s(u),!i[a].test(c))throw new TypeError('Expected "'+l.name+'" to match "'+l.pattern+'", but received "'+c+'"');o+=l.prefix+c}}else o+=l}return o}}function L(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function P(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function B(t,e){return t.keys=e,t}function F(t){return t&&t.sensitive?"":"i"}function H(t,e,i){k(e)||(i=e||i,e=[]);for(var n=(i=i||{}).strict,o=!1!==i.end,r="",s=0;s<t.length;s++){var a=t[s];if("string"==typeof a)r+=L(a);else{var l=L(a.prefix),c="(?:"+a.pattern+")";e.push(a),a.repeat&&(c+="(?:"+l+c+")*"),r+=c=a.optional?a.partial?l+"("+c+")?":"(?:"+l+"("+c+"))?":l+"("+c+")"}}var u=L(i.delimiter||"/"),h=r.slice(-u.length)===u;return n||(r=(h?r.slice(0,-u.length):r)+"(?:"+u+"(?=$))?"),r+=o?"$":n&&h?"":"(?="+u+"|$)",B(new RegExp("^"+r,F(i)),e)}function U(t,e,i){return k(e)||(i=e||i,e=[]),i=i||{},t instanceof RegExp?function(t,e){var i=t.source.match(/\((?!\?)/g);if(i)for(var n=0;n<i.length;n++)e.push({name:n,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return B(t,e)}(t,e):k(t)?function(t,e,i){for(var n=[],o=0;o<t.length;o++)n.push(U(t[o],e,i).source);return B(new RegExp("(?:"+n.join("|")+")",F(i)),e)}(t,e,i):function(t,e,i){return H(M(t,i),e,i)}(t,e,i)}O.parse=I,O.compile=w,O.tokensToFunction=R,O.tokensToRegExp=D;var V=Object.create(null);function G(t,e,i){e=e||{};try{var n=V[t]||(V[t]=O.compile(t));return"string"==typeof e.pathMatch&&(e[0]=e.pathMatch),n(e,{pretty:!0})}catch(t){return""}finally{delete e[0]}}function W(t,e,i,n){var r="string"==typeof t?{path:t}:t;if(r._normalized)return r;if(r.name){var s=(r=o({},t)).params;return s&&"object"==typeof s&&(r.params=o({},s)),r}if(!r.path&&r.params&&e){(r=o({},r))._normalized=!0;var a=o(o({},e.params),r.params);if(e.name)r.name=e.name,r.params=a;else if(e.matched.length){var l=e.matched[e.matched.length-1].path;r.path=G(l,a,e.path)}else 0;return r}var c=function(t){var e="",i="",n=t.indexOf("#");n>=0&&(e=t.slice(n),t=t.slice(0,n));var o=t.indexOf("?");return o>=0&&(i=t.slice(o+1),t=t.slice(0,o)),{path:t,query:i,hash:e}}(r.path||""),p=e&&e.path||"/",d=c.path?C(c.path,p,i||r.append):p,f=function(t,e,i){void 0===e&&(e={});var n,o=i||h;try{n=o(t||"")}catch(t){n={}}for(var r in e){var s=e[r];n[r]=Array.isArray(s)?s.map(u):u(s)}return n}(c.query,r.query,n&&n.options.parseQuery),g=r.hash||c.hash;return g&&"#"!==g.charAt(0)&&(g="#"+g),{_normalized:!0,path:d,query:f,hash:g}}var $,j=[String,Object],z=[String,Array],X=function(){},Y={name:"RouterLink",props:{to:{type:j,required:!0},tag:{type:String,default:"a"},custom:Boolean,exact:Boolean,exactPath:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:{type:String,default:"page"},event:{type:z,default:"click"}},render:function(t){var e=this,i=this.$router,n=this.$route,r=i.resolve(this.to,n,this.append),s=r.location,a=r.route,l=r.href,c={},u=i.options.linkActiveClass,h=i.options.linkExactActiveClass,p=null==u?"router-link-active":u,g=null==h?"router-link-exact-active":h,_=null==this.activeClass?p:this.activeClass,m=null==this.exactActiveClass?g:this.exactActiveClass,y=a.redirectedFrom?f(null,W(a.redirectedFrom),null,i):a;c[m]=v(n,y,this.exactPath),c[_]=this.exact||this.exactPath?c[m]:function(t,e){return 0===t.path.replace(d,"/").indexOf(e.path.replace(d,"/"))&&(!e.hash||t.hash===e.hash)&&function(t,e){for(var i in e)if(!(i in t))return!1;return!0}(t.query,e.query)}(n,y);var b=c[m]?this.ariaCurrentValue:null,T=function(t){K(t)&&(e.replace?i.replace(s,X):i.push(s,X))},E={click:K};Array.isArray(this.event)?this.event.forEach(function(t){E[t]=T}):E[this.event]=T;var C={class:c},S=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:l,route:a,navigate:T,isActive:c[_],isExactActive:c[m]});if(S){if(1===S.length)return S[0];if(S.length>1||!S.length)return 0===S.length?t():t("span",{},S)}if("a"===this.tag)C.on=E,C.attrs={href:l,"aria-current":b};else{var k=function t(e){if(e)for(var i,n=0;n<e.length;n++){if("a"===(i=e[n]).tag)return i;if(i.children&&(i=t(i.children)))return i}}(this.$slots.default);if(k){k.isStatic=!1;var O=k.data=o({},k.data);for(var I in O.on=O.on||{},O.on){var w=O.on[I];I in E&&(O.on[I]=Array.isArray(w)?w:[w])}for(var R in E)R in O.on?O.on[R].push(E[R]):O.on[R]=T;var D=k.data.attrs=o({},k.data.attrs);D.href=l,D["aria-current"]=b}else C.on=E}return t(this.tag,C,this.$slots.default)}};function K(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||void 0!==t.button&&0!==t.button)){if(t.currentTarget&&t.currentTarget.getAttribute){var e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function J(t){if(!J.installed||$!==t){J.installed=!0,$=t;var e=function(t){return void 0!==t},i=function(t,i){var n=t.$options._parentVnode;e(n)&&e(n=n.data)&&e(n=n.registerRouteInstance)&&n(t,i)};t.mixin({beforeCreate:function(){e(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),t.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,i(this,this)},destroyed:function(){i(this)}}),Object.defineProperty(t.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(t.prototype,"$route",{get:function(){return this._routerRoot._route}}),t.component("RouterView",T),t.component("RouterLink",Y);var n=t.config.optionMergeStrategies;n.beforeRouteEnter=n.beforeRouteLeave=n.beforeRouteUpdate=n.created}}var q="undefined"!=typeof window;function Z(t,e,i,n,o){var r=e||[],s=i||Object.create(null),a=n||Object.create(null);t.forEach(function(t){!function t(e,i,n,o,r,s){var a=o.path;var l=o.name;0;var c=o.pathToRegexpOptions||{};var u=function(t,e,i){i||(t=t.replace(/\/$/,""));if("/"===t[0])return t;if(null==e)return t;return S(e.path+"/"+t)}(a,r,c.strict);"boolean"==typeof o.caseSensitive&&(c.sensitive=o.caseSensitive);var h={path:u,regex:function(t,e){var i=O(t,[],e);return i}(u,c),components:o.components||{default:o.component},alias:o.alias?"string"==typeof o.alias?[o.alias]:o.alias:[],instances:{},enteredCbs:{},name:l,parent:r,matchAs:s,redirect:o.redirect,beforeEnter:o.beforeEnter,meta:o.meta||{},props:null==o.props?{}:o.components?o.props:{default:o.props}};o.children&&o.children.forEach(function(o){var r=s?S(s+"/"+o.path):void 0;t(e,i,n,o,h,r)});i[h.path]||(e.push(h.path),i[h.path]=h);if(void 0!==o.alias)for(var p=Array.isArray(o.alias)?o.alias:[o.alias],d=0;d<p.length;++d){var f=p[d];0;var g={path:f,children:o.children};t(e,i,n,g,r,h.path||"/")}l&&(n[l]||(n[l]=h))}(r,s,a,t,o)});for(var l=0,c=r.length;l<c;l++)"*"===r[l]&&(r.push(r.splice(l,1)[0]),c--,l--);return{pathList:r,pathMap:s,nameMap:a}}function Q(t,e){var i=Z(t),n=i.pathList,o=i.pathMap,r=i.nameMap;function s(t,i,s){var a=W(t,i,!1,e),c=a.name;if(c){var u=r[c];if(!u)return l(null,a);var h=u.regex.keys.filter(function(t){return!t.optional}).map(function(t){return t.name});if("object"!=typeof a.params&&(a.params={}),i&&"object"==typeof i.params)for(var p in i.params)!(p in a.params)&&h.indexOf(p)>-1&&(a.params[p]=i.params[p]);return a.path=G(u.path,a.params),l(u,a,s)}if(a.path){a.params={};for(var d=0;d<n.length;d++){var f=n[d],g=o[f];if(tt(g.regex,a.path,a.params))return l(g,a,s)}}return l(null,a)}function a(t,i){var n=t.redirect,o="function"==typeof n?n(f(t,i,null,e)):n;if("string"==typeof o&&(o={path:o}),!o||"object"!=typeof o)return l(null,i);var a=o,c=a.name,u=a.path,h=i.query,p=i.hash,d=i.params;if(h=a.hasOwnProperty("query")?a.query:h,p=a.hasOwnProperty("hash")?a.hash:p,d=a.hasOwnProperty("params")?a.params:d,c){r[c];return s({_normalized:!0,name:c,query:h,hash:p,params:d},void 0,i)}if(u){var g=function(t,e){return C(t,e.parent?e.parent.path:"/",!0)}(u,t);return s({_normalized:!0,path:G(g,d),query:h,hash:p},void 0,i)}return l(null,i)}function l(t,i,n){return t&&t.redirect?a(t,n||i):t&&t.matchAs?function(t,e,i){var n=s({_normalized:!0,path:G(i,e.params)});if(n){var o=n.matched,r=o[o.length-1];return e.params=n.params,l(r,e)}return l(null,e)}(0,i,t.matchAs):f(t,i,n,e)}return{match:s,addRoute:function(t,e){var i="object"!=typeof t?r[t]:void 0;Z([e||t],n,o,r,i),i&&i.alias.length&&Z(i.alias.map(function(t){return{path:t,children:[e]}}),n,o,r,i)},getRoutes:function(){return n.map(function(t){return o[t]})},addRoutes:function(t){Z(t,n,o,r)}}}function tt(t,e,i){var n=e.match(t);if(!n)return!1;if(!i)return!0;for(var o=1,r=n.length;o<r;++o){var s=t.keys[o-1];s&&(i[s.name||"pathMatch"]="string"==typeof n[o]?c(n[o]):n[o])}return!0}var et=q&&window.performance&&window.performance.now?window.performance:Date;function it(){return et.now().toFixed(3)}var nt=it();function ot(){return nt}function rt(t){return nt=t}var st=Object.create(null);function at(){"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual");var t=window.location.protocol+"//"+window.location.host,e=window.location.href.replace(t,""),i=o({},window.history.state);return i.key=ot(),window.history.replaceState(i,"",e),window.addEventListener("popstate",ut),function(){window.removeEventListener("popstate",ut)}}function lt(t,e,i,n){if(t.app){var o=t.options.scrollBehavior;o&&t.app.$nextTick(function(){var r=function(){var t=ot();if(t)return st[t]}(),s=o.call(t,e,i,n?r:null);s&&("function"==typeof s.then?s.then(function(t){gt(t,r)}).catch(function(t){0}):gt(s,r))})}}function ct(){var t=ot();t&&(st[t]={x:window.pageXOffset,y:window.pageYOffset})}function ut(t){ct(),t.state&&t.state.key&&rt(t.state.key)}function ht(t){return dt(t.x)||dt(t.y)}function pt(t){return{x:dt(t.x)?t.x:window.pageXOffset,y:dt(t.y)?t.y:window.pageYOffset}}function dt(t){return"number"==typeof t}var ft=/^#\d/;function gt(t,e){var i,n="object"==typeof t;if(n&&"string"==typeof t.selector){var o=ft.test(t.selector)?document.getElementById(t.selector.slice(1)):document.querySelector(t.selector);if(o){var r=t.offset&&"object"==typeof t.offset?t.offset:{};e=function(t,e){var i=document.documentElement.getBoundingClientRect(),n=t.getBoundingClientRect();return{x:n.left-i.left-e.x,y:n.top-i.top-e.y}}(o,r={x:dt((i=r).x)?i.x:0,y:dt(i.y)?i.y:0})}else ht(t)&&(e=pt(t))}else n&&ht(t)&&(e=pt(t));e&&("scrollBehavior"in document.documentElement.style?window.scrollTo({left:e.x,top:e.y,behavior:t.behavior}):window.scrollTo(e.x,e.y))}var _t,mt=q&&((-1===(_t=window.navigator.userAgent).indexOf("Android 2.")&&-1===_t.indexOf("Android 4.0")||-1===_t.indexOf("Mobile Safari")||-1!==_t.indexOf("Chrome")||-1!==_t.indexOf("Windows Phone"))&&window.history&&"function"==typeof window.history.pushState);function vt(t,e){ct();var i=window.history;try{if(e){var n=o({},i.state);n.key=ot(),i.replaceState(n,"",t)}else i.pushState({key:rt(it())},"",t)}catch(i){window.location[e?"replace":"assign"](t)}}function yt(t){vt(t,!0)}function bt(t,e,i){var n=function(o){o>=t.length?i():t[o]?e(t[o],function(){n(o+1)}):n(o+1)};n(0)}var Tt={redirected:2,aborted:4,cancelled:8,duplicated:16};function Et(t,e){return St(t,e,Tt.redirected,'Redirected when going from "'+t.fullPath+'" to "'+function(t){if("string"==typeof t)return t;if("path"in t)return t.path;var e={};return kt.forEach(function(i){i in t&&(e[i]=t[i])}),JSON.stringify(e,null,2)}(e)+'" via a navigation guard.')}function Ct(t,e){return St(t,e,Tt.cancelled,'Navigation cancelled from "'+t.fullPath+'" to "'+e.fullPath+'" with a new navigation.')}function St(t,e,i,n){var o=new Error(n);return o._isRouter=!0,o.from=t,o.to=e,o.type=i,o}var kt=["params","query","hash"];function Ot(t){return Object.prototype.toString.call(t).indexOf("Error")>-1}function It(t,e){return Ot(t)&&t._isRouter&&(null==e||t.type===e)}function wt(t){return function(e,i,n){var o=!1,r=0,s=null;Rt(t,function(t,e,i,a){if("function"==typeof t&&void 0===t.cid){o=!0,r++;var l,c=Mt(function(e){var o;((o=e).__esModule||xt&&"Module"===o[Symbol.toStringTag])&&(e=e.default),t.resolved="function"==typeof e?e:$.extend(e),i.components[a]=e,--r<=0&&n()}),u=Mt(function(t){var e="Failed to resolve async component "+a+": "+t;s||(s=Ot(t)?t:new Error(e),n(s))});try{l=t(c,u)}catch(t){u(t)}if(l)if("function"==typeof l.then)l.then(c,u);else{var h=l.component;h&&"function"==typeof h.then&&h.then(c,u)}}}),o||n()}}function Rt(t,e){return Dt(t.map(function(t){return Object.keys(t.components).map(function(i){return e(t.components[i],t.instances[i],t,i)})}))}function Dt(t){return Array.prototype.concat.apply([],t)}var xt="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function Mt(t){var e=!1;return function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];if(!e)return e=!0,t.apply(this,i)}}var At=function(t,e){this.router=t,this.base=function(t){if(!t)if(q){var e=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else t="/";"/"!==t.charAt(0)&&(t="/"+t);return t.replace(/\/$/,"")}(e),this.current=_,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function Nt(t,e,i,n){var o=Rt(t,function(t,n,o,r){var s=function(t,e){"function"!=typeof t&&(t=$.extend(t));return t.options[e]}(t,e);if(s)return Array.isArray(s)?s.map(function(t){return i(t,n,o,r)}):i(s,n,o,r)});return Dt(n?o.reverse():o)}function Lt(t,e){if(e)return function(){return t.apply(e,arguments)}}At.prototype.listen=function(t){this.cb=t},At.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},At.prototype.onError=function(t){this.errorCbs.push(t)},At.prototype.transitionTo=function(t,e,i){var n,o=this;try{n=this.router.match(t,this.current)}catch(t){throw this.errorCbs.forEach(function(e){e(t)}),t}var r=this.current;this.confirmTransition(n,function(){o.updateRoute(n),e&&e(n),o.ensureURL(),o.router.afterHooks.forEach(function(t){t&&t(n,r)}),o.ready||(o.ready=!0,o.readyCbs.forEach(function(t){t(n)}))},function(t){i&&i(t),t&&!o.ready&&(It(t,Tt.redirected)&&r===_||(o.ready=!0,o.readyErrorCbs.forEach(function(e){e(t)})))})},At.prototype.confirmTransition=function(t,e,i){var o=this,r=this.current;this.pending=t;var s,a,l=function(t){!It(t)&&Ot(t)&&(o.errorCbs.length?o.errorCbs.forEach(function(e){e(t)}):(n(),console.error(t))),i&&i(t)},c=t.matched.length-1,u=r.matched.length-1;if(v(t,r)&&c===u&&t.matched[c]===r.matched[u])return this.ensureURL(),l(((a=St(s=r,t,Tt.duplicated,'Avoided redundant navigation to current location: "'+s.fullPath+'".')).name="NavigationDuplicated",a));var h=function(t,e){var i,n=Math.max(t.length,e.length);for(i=0;i<n&&t[i]===e[i];i++);return{updated:e.slice(0,i),activated:e.slice(i),deactivated:t.slice(i)}}(this.current.matched,t.matched),p=h.updated,d=h.deactivated,f=h.activated,g=function(e,i){if(o.pending!==t)return l(Ct(r,t));try{e(t,r,function(e){!1===e?(o.ensureURL(!0),l(function(t,e){return St(t,e,Tt.aborted,'Navigation aborted from "'+t.fullPath+'" to "'+e.fullPath+'" via a navigation guard.')}(r,t))):Ot(e)?(o.ensureURL(!0),l(e)):"string"==typeof e||"object"==typeof e&&("string"==typeof e.path||"string"==typeof e.name)?(l(Et(r,t)),"object"==typeof e&&e.replace?o.replace(e):o.push(e)):i(e)})}catch(t){l(t)}};bt([].concat(function(t){return Nt(t,"beforeRouteLeave",Lt,!0)}(d),this.router.beforeHooks,function(t){return Nt(t,"beforeRouteUpdate",Lt)}(p),f.map(function(t){return t.beforeEnter}),wt(f)),g,function(){bt(function(t){return Nt(t,"beforeRouteEnter",function(t,e,i,n){return function(t,e,i){return function(n,o,r){return t(n,o,function(t){"function"==typeof t&&(e.enteredCbs[i]||(e.enteredCbs[i]=[]),e.enteredCbs[i].push(t)),r(t)})}}(t,i,n)})}(f).concat(o.router.resolveHooks),g,function(){if(o.pending!==t)return l(Ct(r,t));o.pending=null,e(t),o.router.app&&o.router.app.$nextTick(function(){b(t)})})})},At.prototype.updateRoute=function(t){this.current=t,this.cb&&this.cb(t)},At.prototype.setupListeners=function(){},At.prototype.teardown=function(){this.listeners.forEach(function(t){t()}),this.listeners=[],this.current=_,this.pending=null};var Pt=function(t){function e(e,i){t.call(this,e,i),this._startLocation=Bt(this.base)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;if(!(this.listeners.length>0)){var e=this.router,i=e.options.scrollBehavior,n=mt&&i;n&&this.listeners.push(at());var o=function(){var i=t.current,o=Bt(t.base);t.current===_&&o===t._startLocation||t.transitionTo(o,function(t){n&&lt(e,t,i,!0)})};window.addEventListener("popstate",o),this.listeners.push(function(){window.removeEventListener("popstate",o)})}},e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,i){var n=this,o=this.current;this.transitionTo(t,function(t){vt(S(n.base+t.fullPath)),lt(n.router,t,o,!1),e&&e(t)},i)},e.prototype.replace=function(t,e,i){var n=this,o=this.current;this.transitionTo(t,function(t){yt(S(n.base+t.fullPath)),lt(n.router,t,o,!1),e&&e(t)},i)},e.prototype.ensureURL=function(t){if(Bt(this.base)!==this.current.fullPath){var e=S(this.base+this.current.fullPath);t?vt(e):yt(e)}},e.prototype.getCurrentLocation=function(){return Bt(this.base)},e}(At);function Bt(t){var e=window.location.pathname,i=e.toLowerCase(),n=t.toLowerCase();return!t||i!==n&&0!==i.indexOf(S(n+"/"))||(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var Ft=function(t){function e(e,i,n){t.call(this,e,i),n&&function(t){var e=Bt(t);if(!/^\/#/.test(e))return window.location.replace(S(t+"/#"+e)),!0}(this.base)||Ht()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;if(!(this.listeners.length>0)){var e=this.router.options.scrollBehavior,i=mt&&e;i&&this.listeners.push(at());var n=function(){var e=t.current;Ht()&&t.transitionTo(Ut(),function(n){i&&lt(t.router,n,e,!0),mt||Wt(n.fullPath)})},o=mt?"popstate":"hashchange";window.addEventListener(o,n),this.listeners.push(function(){window.removeEventListener(o,n)})}},e.prototype.push=function(t,e,i){var n=this,o=this.current;this.transitionTo(t,function(t){Gt(t.fullPath),lt(n.router,t,o,!1),e&&e(t)},i)},e.prototype.replace=function(t,e,i){var n=this,o=this.current;this.transitionTo(t,function(t){Wt(t.fullPath),lt(n.router,t,o,!1),e&&e(t)},i)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;Ut()!==e&&(t?Gt(e):Wt(e))},e.prototype.getCurrentLocation=function(){return Ut()},e}(At);function Ht(){var t=Ut();return"/"===t.charAt(0)||(Wt("/"+t),!1)}function Ut(){var t=window.location.href,e=t.indexOf("#");return e<0?"":t=t.slice(e+1)}function Vt(t){var e=window.location.href,i=e.indexOf("#");return(i>=0?e.slice(0,i):e)+"#"+t}function Gt(t){mt?vt(Vt(t)):window.location.hash=t}function Wt(t){mt?yt(Vt(t)):window.location.replace(Vt(t))}var $t=function(t){function e(e,i){t.call(this,e,i),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,i){var n=this;this.transitionTo(t,function(t){n.stack=n.stack.slice(0,n.index+1).concat(t),n.index++,e&&e(t)},i)},e.prototype.replace=function(t,e,i){var n=this;this.transitionTo(t,function(t){n.stack=n.stack.slice(0,n.index).concat(t),e&&e(t)},i)},e.prototype.go=function(t){var e=this,i=this.index+t;if(!(i<0||i>=this.stack.length)){var n=this.stack[i];this.confirmTransition(n,function(){var t=e.current;e.index=i,e.updateRoute(n),e.router.afterHooks.forEach(function(e){e&&e(n,t)})},function(t){It(t,Tt.duplicated)&&(e.index=i)})}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(At),jt=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=Q(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!mt&&!1!==t.fallback,this.fallback&&(e="hash"),q||(e="abstract"),this.mode=e,e){case"history":this.history=new Pt(this,t.base);break;case"hash":this.history=new Ft(this,t.base,this.fallback);break;case"abstract":this.history=new $t(this,t.base);break;default:0}},zt={currentRoute:{configurable:!0}};function Xt(t,e){return t.push(e),function(){var i=t.indexOf(e);i>-1&&t.splice(i,1)}}jt.prototype.match=function(t,e,i){return this.matcher.match(t,e,i)},zt.currentRoute.get=function(){return this.history&&this.history.current},jt.prototype.init=function(t){var e=this;if(this.apps.push(t),t.$once("hook:destroyed",function(){var i=e.apps.indexOf(t);i>-1&&e.apps.splice(i,1),e.app===t&&(e.app=e.apps[0]||null),e.app||e.history.teardown()}),!this.app){this.app=t;var i=this.history;if(i instanceof Pt||i instanceof Ft){var n=function(t){i.setupListeners(),function(t){var n=i.current,o=e.options.scrollBehavior;mt&&o&&"fullPath"in t&&lt(e,t,n,!1)}(t)};i.transitionTo(i.getCurrentLocation(),n,n)}i.listen(function(t){e.apps.forEach(function(e){e._route=t})})}},jt.prototype.beforeEach=function(t){return Xt(this.beforeHooks,t)},jt.prototype.beforeResolve=function(t){return Xt(this.resolveHooks,t)},jt.prototype.afterEach=function(t){return Xt(this.afterHooks,t)},jt.prototype.onReady=function(t,e){this.history.onReady(t,e)},jt.prototype.onError=function(t){this.history.onError(t)},jt.prototype.push=function(t,e,i){var n=this;if(!e&&!i&&"undefined"!=typeof Promise)return new Promise(function(e,i){n.history.push(t,e,i)});this.history.push(t,e,i)},jt.prototype.replace=function(t,e,i){var n=this;if(!e&&!i&&"undefined"!=typeof Promise)return new Promise(function(e,i){n.history.replace(t,e,i)});this.history.replace(t,e,i)},jt.prototype.go=function(t){this.history.go(t)},jt.prototype.back=function(){this.go(-1)},jt.prototype.forward=function(){this.go(1)},jt.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map(function(t){return Object.keys(t.components).map(function(e){return t.components[e]})})):[]},jt.prototype.resolve=function(t,e,i){var n=W(t,e=e||this.history.current,i,this),o=this.match(n,e),r=o.redirectedFrom||o.fullPath;return{location:n,route:o,href:function(t,e,i){var n="hash"===i?"#"+e:e;return t?S(t+"/"+n):n}(this.history.base,r,this.mode),normalizedTo:n,resolved:o}},jt.prototype.getRoutes=function(){return this.matcher.getRoutes()},jt.prototype.addRoute=function(t,e){this.matcher.addRoute(t,e),this.history.current!==_&&this.history.transitionTo(this.history.getCurrentLocation())},jt.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==_&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(jt.prototype,zt),jt.install=J,jt.version="3.5.2",jt.isNavigationFailure=It,jt.NavigationFailureType=Tt,jt.START_LOCATION=_,q&&window.Vue&&window.Vue.use(jt),e.a=jt},"02w1":function(t,e,i){"use strict";e.__esModule=!0,e.removeResizeListener=e.addResizeListener=void 0;var n,o=i("z+gd"),r=(n=o)&&n.__esModule?n:{default:n};var s="undefined"==typeof window,a=function(t){var e=t,i=Array.isArray(e),n=0;for(e=i?e:e[Symbol.iterator]();;){var o;if(i){if(n>=e.length)break;o=e[n++]}else{if((n=e.next()).done)break;o=n.value}var r=o.target.__resizeListeners__||[];r.length&&r.forEach(function(t){t()})}};e.addResizeListener=function(t,e){s||(t.__resizeListeners__||(t.__resizeListeners__=[],t.__ro__=new r.default(a),t.__ro__.observe(t)),t.__resizeListeners__.push(e))},e.removeResizeListener=function(t,e){t&&t.__resizeListeners__&&(t.__resizeListeners__.splice(t.__resizeListeners__.indexOf(e),1),t.__resizeListeners__.length||t.__ro__.disconnect())}},"06OY":function(t,e,i){var n=i("3Eo+")("meta"),o=i("EqjI"),r=i("D2L2"),s=i("evD5").f,a=0,l=Object.isExtensible||function(){return!0},c=!i("S82l")(function(){return l(Object.preventExtensions({}))}),u=function(t){s(t,n,{value:{i:"O"+ ++a,w:{}}})},h=t.exports={KEY:n,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!r(t,n)){if(!l(t))return"F";if(!e)return"E";u(t)}return t[n].i},getWeak:function(t,e){if(!r(t,n)){if(!l(t))return!0;if(!e)return!1;u(t)}return t[n].w},onFreeze:function(t){return c&&h.NEED&&l(t)&&!r(t,n)&&u(t),t}}},"0kY3":function(t,e,i){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist/",i(i.s=102)}({0:function(t,e,i){"use strict";function n(t,e,i,n,o,r,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):o&&(l=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:t,options:c}}i.d(e,"a",function(){return n})},10:function(t,e){t.exports=i("HJMx")},102:function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:["el-input-number",t.inputNumberSize?"el-input-number--"+t.inputNumberSize:"",{"is-disabled":t.inputNumberDisabled},{"is-without-controls":!t.controls},{"is-controls-right":t.controlsAtRight}],on:{dragstart:function(t){t.preventDefault()}}},[t.controls?i("span",{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:t.decrease,expression:"decrease"}],staticClass:"el-input-number__decrease",class:{"is-disabled":t.minDisabled},attrs:{role:"button"},on:{keydown:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.decrease(e):null}}},[i("i",{class:"el-icon-"+(t.controlsAtRight?"arrow-down":"minus")})]):t._e(),t.controls?i("span",{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:t.increase,expression:"increase"}],staticClass:"el-input-number__increase",class:{"is-disabled":t.maxDisabled},attrs:{role:"button"},on:{keydown:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.increase(e):null}}},[i("i",{class:"el-icon-"+(t.controlsAtRight?"arrow-up":"plus")})]):t._e(),i("el-input",{ref:"input",attrs:{value:t.displayValue,placeholder:t.placeholder,disabled:t.inputNumberDisabled,size:t.inputNumberSize,max:t.max,min:t.min,name:t.name,label:t.label},on:{blur:t.handleBlur,focus:t.handleFocus,input:t.handleInput,change:t.handleInputChange},nativeOn:{keydown:[function(e){return"button"in e||!t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?(e.preventDefault(),t.increase(e)):null},function(e){return"button"in e||!t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?(e.preventDefault(),t.decrease(e)):null}]}})],1)};n._withStripped=!0;var o=i(10),r=i.n(o),s=i(22),a=i.n(s),l=i(30),c={name:"ElInputNumber",mixins:[a()("input")],inject:{elForm:{default:""},elFormItem:{default:""}},directives:{repeatClick:l.a},components:{ElInput:r.a},props:{step:{type:Number,default:1},stepStrictly:{type:Boolean,default:!1},max:{type:Number,default:1/0},min:{type:Number,default:-1/0},value:{},disabled:Boolean,size:String,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:""},name:String,label:String,placeholder:String,precision:{type:Number,validator:function(t){return t>=0&&t===parseInt(t,10)}}},data:function(){return{currentValue:0,userInput:null}},watch:{value:{immediate:!0,handler:function(t){var e=void 0===t?t:Number(t);if(void 0!==e){if(isNaN(e))return;if(this.stepStrictly){var i=this.getPrecision(this.step),n=Math.pow(10,i);e=Math.round(e/this.step)*n*this.step/n}void 0!==this.precision&&(e=this.toPrecision(e,this.precision))}e>=this.max&&(e=this.max),e<=this.min&&(e=this.min),this.currentValue=e,this.userInput=null,this.$emit("input",e)}}},computed:{minDisabled:function(){return this._decrease(this.value,this.step)<this.min},maxDisabled:function(){return this._increase(this.value,this.step)>this.max},numPrecision:function(){var t=this.value,e=this.step,i=this.getPrecision,n=this.precision,o=i(e);return void 0!==n?(o>n&&console.warn("[Element Warn][InputNumber]precision should not be less than the decimal places of step"),n):Math.max(i(t),o)},controlsAtRight:function(){return this.controls&&"right"===this.controlsPosition},_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},inputNumberSize:function(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size},inputNumberDisabled:function(){return this.disabled||!!(this.elForm||{}).disabled},displayValue:function(){if(null!==this.userInput)return this.userInput;var t=this.currentValue;if("number"==typeof t){if(this.stepStrictly){var e=this.getPrecision(this.step),i=Math.pow(10,e);t=Math.round(t/this.step)*i*this.step/i}void 0!==this.precision&&(t=t.toFixed(this.precision))}return t}},methods:{toPrecision:function(t,e){return void 0===e&&(e=this.numPrecision),parseFloat(Math.round(t*Math.pow(10,e))/Math.pow(10,e))},getPrecision:function(t){if(void 0===t)return 0;var e=t.toString(),i=e.indexOf("."),n=0;return-1!==i&&(n=e.length-i-1),n},_increase:function(t,e){if("number"!=typeof t&&void 0!==t)return this.currentValue;var i=Math.pow(10,this.numPrecision);return this.toPrecision((i*t+i*e)/i)},_decrease:function(t,e){if("number"!=typeof t&&void 0!==t)return this.currentValue;var i=Math.pow(10,this.numPrecision);return this.toPrecision((i*t-i*e)/i)},increase:function(){if(!this.inputNumberDisabled&&!this.maxDisabled){var t=this.value||0,e=this._increase(t,this.step);this.setCurrentValue(e)}},decrease:function(){if(!this.inputNumberDisabled&&!this.minDisabled){var t=this.value||0,e=this._decrease(t,this.step);this.setCurrentValue(e)}},handleBlur:function(t){this.$emit("blur",t)},handleFocus:function(t){this.$emit("focus",t)},setCurrentValue:function(t){var e=this.currentValue;"number"==typeof t&&void 0!==this.precision&&(t=this.toPrecision(t,this.precision)),t>=this.max&&(t=this.max),t<=this.min&&(t=this.min),e!==t&&(this.userInput=null,this.$emit("input",t),this.$emit("change",t,e),this.currentValue=t)},handleInput:function(t){this.userInput=t},handleInputChange:function(t){var e=""===t?void 0:Number(t);isNaN(e)&&""!==t||this.setCurrentValue(e),this.userInput=null},select:function(){this.$refs.input.select()}},mounted:function(){var t=this.$refs.input.$refs.input;t.setAttribute("role","spinbutton"),t.setAttribute("aria-valuemax",this.max),t.setAttribute("aria-valuemin",this.min),t.setAttribute("aria-valuenow",this.currentValue),t.setAttribute("aria-disabled",this.inputNumberDisabled)},updated:function(){this.$refs&&this.$refs.input&&this.$refs.input.$refs.input.setAttribute("aria-valuenow",this.currentValue)}},u=i(0),h=Object(u.a)(c,n,[],!1,null,null,null);h.options.__file="packages/input-number/src/input-number.vue";var p=h.exports;p.install=function(t){t.component(p.name,p)};e.default=p},2:function(t,e){t.exports=i("2kvA")},22:function(t,e){t.exports=i("1oZe")},30:function(t,e,i){"use strict";var n=i(2);e.a={bind:function(t,e,i){var o=null,r=void 0,s=function(){return i.context[e.expression].apply()},a=function(){Date.now()-r<100&&s(),clearInterval(o),o=null};Object(n.on)(t,"mousedown",function(t){0===t.button&&(r=Date.now(),Object(n.once)(document,"mouseup",a),clearInterval(o),o=setInterval(s,100))})}}}})},"1kS7":function(t,e){e.f=Object.getOwnPropertySymbols},"1oZe":function(t,e,i){"use strict";e.__esModule=!0,e.default=function(t){return{methods:{focus:function(){this.$refs[t].focus()}}}}},"21It":function(t,e,i){"use strict";var n=i("FtD3");t.exports=function(t,e,i){var o=i.config.validateStatus;i.status&&o&&!o(i.status)?e(n("Request failed with status code "+i.status,i.config,null,i.request,i)):t(i)}},"2KxR":function(t,e){t.exports=function(t,e,i,n){if(!(t instanceof e)||void 0!==n&&n in t)throw TypeError(i+": incorrect invocation!");return t}},"2kvA":function(t,e,i){"use strict";e.__esModule=!0,e.isInContainer=e.getScrollContainer=e.isScroll=e.getStyle=e.once=e.off=e.on=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.hasClass=f,e.addClass=function(t,e){if(!t)return;for(var i=t.className,n=(e||"").split(" "),o=0,r=n.length;o<r;o++){var s=n[o];s&&(t.classList?t.classList.add(s):f(t,s)||(i+=" "+s))}t.classList||t.setAttribute("class",i)},e.removeClass=function(t,e){if(!t||!e)return;for(var i=e.split(" "),n=" "+t.className+" ",o=0,r=i.length;o<r;o++){var s=i[o];s&&(t.classList?t.classList.remove(s):f(t,s)&&(n=n.replace(" "+s+" "," ")))}t.classList||t.setAttribute("class",u(n))},e.setStyle=function t(e,i,o){if(!e||!i)return;if("object"===(void 0===i?"undefined":n(i)))for(var r in i)i.hasOwnProperty(r)&&t(e,r,i[r]);else"opacity"===(i=h(i))&&c<9?e.style.filter=isNaN(o)?"":"alpha(opacity="+100*o+")":e.style[i]=o};var o,r=i("7+uW");var s=((o=r)&&o.__esModule?o:{default:o}).default.prototype.$isServer,a=/([\:\-\_]+(.))/g,l=/^moz([A-Z])/,c=s?0:Number(document.documentMode),u=function(t){return(t||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")},h=function(t){return t.replace(a,function(t,e,i,n){return n?i.toUpperCase():i}).replace(l,"Moz$1")},p=e.on=!s&&document.addEventListener?function(t,e,i){t&&e&&i&&t.addEventListener(e,i,!1)}:function(t,e,i){t&&e&&i&&t.attachEvent("on"+e,i)},d=e.off=!s&&document.removeEventListener?function(t,e,i){t&&e&&t.removeEventListener(e,i,!1)}:function(t,e,i){t&&e&&t.detachEvent("on"+e,i)};e.once=function(t,e,i){p(t,e,function n(){i&&i.apply(this,arguments),d(t,e,n)})};function f(t,e){if(!t||!e)return!1;if(-1!==e.indexOf(" "))throw new Error("className should not contain space.");return t.classList?t.classList.contains(e):(" "+t.className+" ").indexOf(" "+e+" ")>-1}var g=e.getStyle=c<9?function(t,e){if(!s){if(!t||!e)return null;"float"===(e=h(e))&&(e="styleFloat");try{switch(e){case"opacity":try{return t.filters.item("alpha").opacity/100}catch(t){return 1}default:return t.style[e]||t.currentStyle?t.currentStyle[e]:null}}catch(i){return t.style[e]}}}:function(t,e){if(!s){if(!t||!e)return null;"float"===(e=h(e))&&(e="cssFloat");try{var i=document.defaultView.getComputedStyle(t,"");return t.style[e]||i?i[e]:null}catch(i){return t.style[e]}}};var _=e.isScroll=function(t,e){if(!s)return g(t,null!==e&&void 0!==e?e?"overflow-y":"overflow-x":"overflow").match(/(scroll|auto)/)};e.getScrollContainer=function(t,e){if(!s){for(var i=t;i;){if([window,document,document.documentElement].includes(i))return window;if(_(i,e))return i;i=i.parentNode}return i}},e.isInContainer=function(t,e){if(s||!t||!e)return!1;var i=t.getBoundingClientRect(),n=void 0;return n=[window,document,document.documentElement,null,void 0].includes(e)?{top:0,right:window.innerWidth,bottom:window.innerHeight,left:0}:e.getBoundingClientRect(),i.top<n.bottom&&i.bottom>n.top&&i.right>n.left&&i.left<n.right}},"3Eo+":function(t,e){var i=0,n=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++i+n).toString(36))}},"3fo+":function(t,e,i){t.exports=i("YAhB")},"3fs2":function(t,e,i){var n=i("RY/4"),o=i("dSzd")("iterator"),r=i("/bQp");t.exports=i("FeBl").getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||r[n(t)]}},"4mcu":function(t,e){t.exports=function(){}},"52gC":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on  "+t);return t}},"5PlU":function(t,e,i){var n=i("RY/4"),o=i("dSzd")("iterator"),r=i("/bQp");t.exports=i("FeBl").isIterable=function(t){var e=Object(t);return void 0!==e[o]||"@@iterator"in e||r.hasOwnProperty(n(e))}},"5QVw":function(t,e,i){t.exports={default:i("BwfY"),__esModule:!0}},"5VQ+":function(t,e,i){"use strict";var n=i("cGG2");t.exports=function(t,e){n.forEach(t,function(i,n){n!==e&&n.toUpperCase()===e.toUpperCase()&&(t[e]=i,delete t[n])})}},"6Twh":function(t,e,i){"use strict";e.__esModule=!0,e.default=function(){if(r.default.prototype.$isServer)return 0;if(void 0!==s)return s;var t=document.createElement("div");t.className="el-scrollbar__wrap",t.style.visibility="hidden",t.style.width="100px",t.style.position="absolute",t.style.top="-9999px",document.body.appendChild(t);var e=t.offsetWidth;t.style.overflow="scroll";var i=document.createElement("div");i.style.width="100%",t.appendChild(i);var n=i.offsetWidth;return t.parentNode.removeChild(t),s=e-n};var n,o=i("7+uW"),r=(n=o)&&n.__esModule?n:{default:n};var s=void 0},"7+uW":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){
/*!
 * Vue.js v2.6.14
 * (c) 2014-2021 Evan You
 * Released under the MIT License.
 */
var i=Object.freeze({});function n(t){return void 0===t||null===t}function o(t){return void 0!==t&&null!==t}function r(t){return!0===t}function s(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function a(t){return null!==t&&"object"==typeof t}var l=Object.prototype.toString;function c(t){return"[object Object]"===l.call(t)}function u(t){return"[object RegExp]"===l.call(t)}function h(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function p(t){return o(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function d(t){return null==t?"":Array.isArray(t)||c(t)&&t.toString===l?JSON.stringify(t,null,2):String(t)}function f(t){var e=parseFloat(t);return isNaN(e)?t:e}function g(t,e){for(var i=Object.create(null),n=t.split(","),o=0;o<n.length;o++)i[n[o]]=!0;return e?function(t){return i[t.toLowerCase()]}:function(t){return i[t]}}var _=g("slot,component",!0),m=g("key,ref,slot,slot-scope,is");function v(t,e){if(t.length){var i=t.indexOf(e);if(i>-1)return t.splice(i,1)}}var y=Object.prototype.hasOwnProperty;function b(t,e){return y.call(t,e)}function T(t){var e=Object.create(null);return function(i){return e[i]||(e[i]=t(i))}}var E=/-(\w)/g,C=T(function(t){return t.replace(E,function(t,e){return e?e.toUpperCase():""})}),S=T(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}),k=/\B([A-Z])/g,O=T(function(t){return t.replace(k,"-$1").toLowerCase()});var I=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function i(i){var n=arguments.length;return n?n>1?t.apply(e,arguments):t.call(e,i):t.call(e)}return i._length=t.length,i};function w(t,e){e=e||0;for(var i=t.length-e,n=new Array(i);i--;)n[i]=t[i+e];return n}function R(t,e){for(var i in e)t[i]=e[i];return t}function D(t){for(var e={},i=0;i<t.length;i++)t[i]&&R(e,t[i]);return e}function x(t,e,i){}var M=function(t,e,i){return!1},A=function(t){return t};function N(t,e){if(t===e)return!0;var i=a(t),n=a(e);if(!i||!n)return!i&&!n&&String(t)===String(e);try{var o=Array.isArray(t),r=Array.isArray(e);if(o&&r)return t.length===e.length&&t.every(function(t,i){return N(t,e[i])});if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(o||r)return!1;var s=Object.keys(t),l=Object.keys(e);return s.length===l.length&&s.every(function(i){return N(t[i],e[i])})}catch(t){return!1}}function L(t,e){for(var i=0;i<t.length;i++)if(N(t[i],e))return i;return-1}function P(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}}var B="data-server-rendered",F=["component","directive","filter"],H=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch"],U={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:M,isReservedAttr:M,isUnknownElement:M,getTagNamespace:x,parsePlatformTagName:A,mustUseProp:M,async:!0,_lifecycleHooks:H},V=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function G(t){var e=(t+"").charCodeAt(0);return 36===e||95===e}function W(t,e,i,n){Object.defineProperty(t,e,{value:i,enumerable:!!n,writable:!0,configurable:!0})}var $=new RegExp("[^"+V.source+".$_\\d]");var j,z="__proto__"in{},X="undefined"!=typeof window,Y="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,K=Y&&WXEnvironment.platform.toLowerCase(),J=X&&window.navigator.userAgent.toLowerCase(),q=J&&/msie|trident/.test(J),Z=J&&J.indexOf("msie 9.0")>0,Q=J&&J.indexOf("edge/")>0,tt=(J&&J.indexOf("android"),J&&/iphone|ipad|ipod|ios/.test(J)||"ios"===K),et=(J&&/chrome\/\d+/.test(J),J&&/phantomjs/.test(J),J&&J.match(/firefox\/(\d+)/)),it={}.watch,nt=!1;if(X)try{var ot={};Object.defineProperty(ot,"passive",{get:function(){nt=!0}}),window.addEventListener("test-passive",null,ot)}catch(t){}var rt=function(){return void 0===j&&(j=!X&&!Y&&void 0!==t&&(t.process&&"server"===t.process.env.VUE_ENV)),j},st=X&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function at(t){return"function"==typeof t&&/native code/.test(t.toString())}var lt,ct="undefined"!=typeof Symbol&&at(Symbol)&&"undefined"!=typeof Reflect&&at(Reflect.ownKeys);lt="undefined"!=typeof Set&&at(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var ut=x,ht=0,pt=function(){this.id=ht++,this.subs=[]};pt.prototype.addSub=function(t){this.subs.push(t)},pt.prototype.removeSub=function(t){v(this.subs,t)},pt.prototype.depend=function(){pt.target&&pt.target.addDep(this)},pt.prototype.notify=function(){var t=this.subs.slice();for(var e=0,i=t.length;e<i;e++)t[e].update()},pt.target=null;var dt=[];function ft(t){dt.push(t),pt.target=t}function gt(){dt.pop(),pt.target=dt[dt.length-1]}var _t=function(t,e,i,n,o,r,s,a){this.tag=t,this.data=e,this.children=i,this.text=n,this.elm=o,this.ns=void 0,this.context=r,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=s,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=a,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},mt={child:{configurable:!0}};mt.child.get=function(){return this.componentInstance},Object.defineProperties(_t.prototype,mt);var vt=function(t){void 0===t&&(t="");var e=new _t;return e.text=t,e.isComment=!0,e};function yt(t){return new _t(void 0,void 0,void 0,String(t))}function bt(t){var e=new _t(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}var Tt=Array.prototype,Et=Object.create(Tt);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(t){var e=Tt[t];W(Et,t,function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];var o,r=e.apply(this,i),s=this.__ob__;switch(t){case"push":case"unshift":o=i;break;case"splice":o=i.slice(2)}return o&&s.observeArray(o),s.dep.notify(),r})});var Ct=Object.getOwnPropertyNames(Et),St=!0;function kt(t){St=t}var Ot=function(t){var e;this.value=t,this.dep=new pt,this.vmCount=0,W(t,"__ob__",this),Array.isArray(t)?(z?(e=Et,t.__proto__=e):function(t,e,i){for(var n=0,o=i.length;n<o;n++){var r=i[n];W(t,r,e[r])}}(t,Et,Ct),this.observeArray(t)):this.walk(t)};function It(t,e){var i;if(a(t)&&!(t instanceof _t))return b(t,"__ob__")&&t.__ob__ instanceof Ot?i=t.__ob__:St&&!rt()&&(Array.isArray(t)||c(t))&&Object.isExtensible(t)&&!t._isVue&&(i=new Ot(t)),e&&i&&i.vmCount++,i}function wt(t,e,i,n,o){var r=new pt,s=Object.getOwnPropertyDescriptor(t,e);if(!s||!1!==s.configurable){var a=s&&s.get,l=s&&s.set;a&&!l||2!==arguments.length||(i=t[e]);var c=!o&&It(i);Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){var e=a?a.call(t):i;return pt.target&&(r.depend(),c&&(c.dep.depend(),Array.isArray(e)&&function t(e){for(var i=void 0,n=0,o=e.length;n<o;n++)(i=e[n])&&i.__ob__&&i.__ob__.dep.depend(),Array.isArray(i)&&t(i)}(e))),e},set:function(e){var n=a?a.call(t):i;e===n||e!=e&&n!=n||a&&!l||(l?l.call(t,e):i=e,c=!o&&It(e),r.notify())}})}}function Rt(t,e,i){if(Array.isArray(t)&&h(e))return t.length=Math.max(t.length,e),t.splice(e,1,i),i;if(e in t&&!(e in Object.prototype))return t[e]=i,i;var n=t.__ob__;return t._isVue||n&&n.vmCount?i:n?(wt(n.value,e,i),n.dep.notify(),i):(t[e]=i,i)}function Dt(t,e){if(Array.isArray(t)&&h(e))t.splice(e,1);else{var i=t.__ob__;t._isVue||i&&i.vmCount||b(t,e)&&(delete t[e],i&&i.dep.notify())}}Ot.prototype.walk=function(t){for(var e=Object.keys(t),i=0;i<e.length;i++)wt(t,e[i])},Ot.prototype.observeArray=function(t){for(var e=0,i=t.length;e<i;e++)It(t[e])};var xt=U.optionMergeStrategies;function Mt(t,e){if(!e)return t;for(var i,n,o,r=ct?Reflect.ownKeys(e):Object.keys(e),s=0;s<r.length;s++)"__ob__"!==(i=r[s])&&(n=t[i],o=e[i],b(t,i)?n!==o&&c(n)&&c(o)&&Mt(n,o):Rt(t,i,o));return t}function At(t,e,i){return i?function(){var n="function"==typeof e?e.call(i,i):e,o="function"==typeof t?t.call(i,i):t;return n?Mt(n,o):o}:e?t?function(){return Mt("function"==typeof e?e.call(this,this):e,"function"==typeof t?t.call(this,this):t)}:e:t}function Nt(t,e){var i=e?t?t.concat(e):Array.isArray(e)?e:[e]:t;return i?function(t){for(var e=[],i=0;i<t.length;i++)-1===e.indexOf(t[i])&&e.push(t[i]);return e}(i):i}function Lt(t,e,i,n){var o=Object.create(t||null);return e?R(o,e):o}xt.data=function(t,e,i){return i?At(t,e,i):e&&"function"!=typeof e?t:At(t,e)},H.forEach(function(t){xt[t]=Nt}),F.forEach(function(t){xt[t+"s"]=Lt}),xt.watch=function(t,e,i,n){if(t===it&&(t=void 0),e===it&&(e=void 0),!e)return Object.create(t||null);if(!t)return e;var o={};for(var r in R(o,t),e){var s=o[r],a=e[r];s&&!Array.isArray(s)&&(s=[s]),o[r]=s?s.concat(a):Array.isArray(a)?a:[a]}return o},xt.props=xt.methods=xt.inject=xt.computed=function(t,e,i,n){if(!t)return e;var o=Object.create(null);return R(o,t),e&&R(o,e),o},xt.provide=At;var Pt=function(t,e){return void 0===e?t:e};function Bt(t,e,i){if("function"==typeof e&&(e=e.options),function(t,e){var i=t.props;if(i){var n,o,r={};if(Array.isArray(i))for(n=i.length;n--;)"string"==typeof(o=i[n])&&(r[C(o)]={type:null});else if(c(i))for(var s in i)o=i[s],r[C(s)]=c(o)?o:{type:o};t.props=r}}(e),function(t,e){var i=t.inject;if(i){var n=t.inject={};if(Array.isArray(i))for(var o=0;o<i.length;o++)n[i[o]]={from:i[o]};else if(c(i))for(var r in i){var s=i[r];n[r]=c(s)?R({from:r},s):{from:s}}}}(e),function(t){var e=t.directives;if(e)for(var i in e){var n=e[i];"function"==typeof n&&(e[i]={bind:n,update:n})}}(e),!e._base&&(e.extends&&(t=Bt(t,e.extends,i)),e.mixins))for(var n=0,o=e.mixins.length;n<o;n++)t=Bt(t,e.mixins[n],i);var r,s={};for(r in t)a(r);for(r in e)b(t,r)||a(r);function a(n){var o=xt[n]||Pt;s[n]=o(t[n],e[n],i,n)}return s}function Ft(t,e,i,n){if("string"==typeof i){var o=t[e];if(b(o,i))return o[i];var r=C(i);if(b(o,r))return o[r];var s=S(r);return b(o,s)?o[s]:o[i]||o[r]||o[s]}}function Ht(t,e,i,n){var o=e[t],r=!b(i,t),s=i[t],a=Wt(Boolean,o.type);if(a>-1)if(r&&!b(o,"default"))s=!1;else if(""===s||s===O(t)){var l=Wt(String,o.type);(l<0||a<l)&&(s=!0)}if(void 0===s){s=function(t,e,i){if(!b(e,"default"))return;var n=e.default;0;if(t&&t.$options.propsData&&void 0===t.$options.propsData[i]&&void 0!==t._props[i])return t._props[i];return"function"==typeof n&&"Function"!==Vt(e.type)?n.call(t):n}(n,o,t);var c=St;kt(!0),It(s),kt(c)}return s}var Ut=/^\s*function (\w+)/;function Vt(t){var e=t&&t.toString().match(Ut);return e?e[1]:""}function Gt(t,e){return Vt(t)===Vt(e)}function Wt(t,e){if(!Array.isArray(e))return Gt(e,t)?0:-1;for(var i=0,n=e.length;i<n;i++)if(Gt(e[i],t))return i;return-1}function $t(t,e,i){ft();try{if(e)for(var n=e;n=n.$parent;){var o=n.$options.errorCaptured;if(o)for(var r=0;r<o.length;r++)try{if(!1===o[r].call(n,t,e,i))return}catch(t){zt(t,n,"errorCaptured hook")}}zt(t,e,i)}finally{gt()}}function jt(t,e,i,n,o){var r;try{(r=i?t.apply(e,i):t.call(e))&&!r._isVue&&p(r)&&!r._handled&&(r.catch(function(t){return $t(t,n,o+" (Promise/async)")}),r._handled=!0)}catch(t){$t(t,n,o)}return r}function zt(t,e,i){if(U.errorHandler)try{return U.errorHandler.call(null,t,e,i)}catch(e){e!==t&&Xt(e,null,"config.errorHandler")}Xt(t,e,i)}function Xt(t,e,i){if(!X&&!Y||"undefined"==typeof console)throw t;console.error(t)}var Yt,Kt=!1,Jt=[],qt=!1;function Zt(){qt=!1;var t=Jt.slice(0);Jt.length=0;for(var e=0;e<t.length;e++)t[e]()}if("undefined"!=typeof Promise&&at(Promise)){var Qt=Promise.resolve();Yt=function(){Qt.then(Zt),tt&&setTimeout(x)},Kt=!0}else if(q||"undefined"==typeof MutationObserver||!at(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())Yt="undefined"!=typeof setImmediate&&at(setImmediate)?function(){setImmediate(Zt)}:function(){setTimeout(Zt,0)};else{var te=1,ee=new MutationObserver(Zt),ie=document.createTextNode(String(te));ee.observe(ie,{characterData:!0}),Yt=function(){te=(te+1)%2,ie.data=String(te)},Kt=!0}function ne(t,e){var i;if(Jt.push(function(){if(t)try{t.call(e)}catch(t){$t(t,e,"nextTick")}else i&&i(e)}),qt||(qt=!0,Yt()),!t&&"undefined"!=typeof Promise)return new Promise(function(t){i=t})}var oe=new lt;function re(t){!function t(e,i){var n,o;var r=Array.isArray(e);if(!r&&!a(e)||Object.isFrozen(e)||e instanceof _t)return;if(e.__ob__){var s=e.__ob__.dep.id;if(i.has(s))return;i.add(s)}if(r)for(n=e.length;n--;)t(e[n],i);else for(o=Object.keys(e),n=o.length;n--;)t(e[o[n]],i)}(t,oe),oe.clear()}var se=T(function(t){var e="&"===t.charAt(0),i="~"===(t=e?t.slice(1):t).charAt(0),n="!"===(t=i?t.slice(1):t).charAt(0);return{name:t=n?t.slice(1):t,once:i,capture:n,passive:e}});function ae(t,e){function i(){var t=arguments,n=i.fns;if(!Array.isArray(n))return jt(n,null,arguments,e,"v-on handler");for(var o=n.slice(),r=0;r<o.length;r++)jt(o[r],null,t,e,"v-on handler")}return i.fns=t,i}function le(t,e,i,o,s,a){var l,c,u,h;for(l in t)c=t[l],u=e[l],h=se(l),n(c)||(n(u)?(n(c.fns)&&(c=t[l]=ae(c,a)),r(h.once)&&(c=t[l]=s(h.name,c,h.capture)),i(h.name,c,h.capture,h.passive,h.params)):c!==u&&(u.fns=c,t[l]=u));for(l in e)n(t[l])&&o((h=se(l)).name,e[l],h.capture)}function ce(t,e,i){var s;t instanceof _t&&(t=t.data.hook||(t.data.hook={}));var a=t[e];function l(){i.apply(this,arguments),v(s.fns,l)}n(a)?s=ae([l]):o(a.fns)&&r(a.merged)?(s=a).fns.push(l):s=ae([a,l]),s.merged=!0,t[e]=s}function ue(t,e,i,n,r){if(o(e)){if(b(e,i))return t[i]=e[i],r||delete e[i],!0;if(b(e,n))return t[i]=e[n],r||delete e[n],!0}return!1}function he(t){return s(t)?[yt(t)]:Array.isArray(t)?function t(e,i){var a=[];var l,c,u,h;for(l=0;l<e.length;l++)n(c=e[l])||"boolean"==typeof c||(u=a.length-1,h=a[u],Array.isArray(c)?c.length>0&&(pe((c=t(c,(i||"")+"_"+l))[0])&&pe(h)&&(a[u]=yt(h.text+c[0].text),c.shift()),a.push.apply(a,c)):s(c)?pe(h)?a[u]=yt(h.text+c):""!==c&&a.push(yt(c)):pe(c)&&pe(h)?a[u]=yt(h.text+c.text):(r(e._isVList)&&o(c.tag)&&n(c.key)&&o(i)&&(c.key="__vlist"+i+"_"+l+"__"),a.push(c)));return a}(t):void 0}function pe(t){return o(t)&&o(t.text)&&!1===t.isComment}function de(t,e){if(t){for(var i=Object.create(null),n=ct?Reflect.ownKeys(t):Object.keys(t),o=0;o<n.length;o++){var r=n[o];if("__ob__"!==r){for(var s=t[r].from,a=e;a;){if(a._provided&&b(a._provided,s)){i[r]=a._provided[s];break}a=a.$parent}if(!a)if("default"in t[r]){var l=t[r].default;i[r]="function"==typeof l?l.call(e):l}else 0}}return i}}function fe(t,e){if(!t||!t.length)return{};for(var i={},n=0,o=t.length;n<o;n++){var r=t[n],s=r.data;if(s&&s.attrs&&s.attrs.slot&&delete s.attrs.slot,r.context!==e&&r.fnContext!==e||!s||null==s.slot)(i.default||(i.default=[])).push(r);else{var a=s.slot,l=i[a]||(i[a]=[]);"template"===r.tag?l.push.apply(l,r.children||[]):l.push(r)}}for(var c in i)i[c].every(ge)&&delete i[c];return i}function ge(t){return t.isComment&&!t.asyncFactory||" "===t.text}function _e(t){return t.isComment&&t.asyncFactory}function me(t,e,n){var o,r=Object.keys(e).length>0,s=t?!!t.$stable:!r,a=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(s&&n&&n!==i&&a===n.$key&&!r&&!n.$hasNormal)return n;for(var l in o={},t)t[l]&&"$"!==l[0]&&(o[l]=ve(e,l,t[l]))}else o={};for(var c in e)c in o||(o[c]=ye(e,c));return t&&Object.isExtensible(t)&&(t._normalized=o),W(o,"$stable",s),W(o,"$key",a),W(o,"$hasNormal",r),o}function ve(t,e,i){var n=function(){var t=arguments.length?i.apply(null,arguments):i({}),e=(t=t&&"object"==typeof t&&!Array.isArray(t)?[t]:he(t))&&t[0];return t&&(!e||1===t.length&&e.isComment&&!_e(e))?void 0:t};return i.proxy&&Object.defineProperty(t,e,{get:n,enumerable:!0,configurable:!0}),n}function ye(t,e){return function(){return t[e]}}function be(t,e){var i,n,r,s,l;if(Array.isArray(t)||"string"==typeof t)for(i=new Array(t.length),n=0,r=t.length;n<r;n++)i[n]=e(t[n],n);else if("number"==typeof t)for(i=new Array(t),n=0;n<t;n++)i[n]=e(n+1,n);else if(a(t))if(ct&&t[Symbol.iterator]){i=[];for(var c=t[Symbol.iterator](),u=c.next();!u.done;)i.push(e(u.value,i.length)),u=c.next()}else for(s=Object.keys(t),i=new Array(s.length),n=0,r=s.length;n<r;n++)l=s[n],i[n]=e(t[l],l,n);return o(i)||(i=[]),i._isVList=!0,i}function Te(t,e,i,n){var o,r=this.$scopedSlots[t];r?(i=i||{},n&&(i=R(R({},n),i)),o=r(i)||("function"==typeof e?e():e)):o=this.$slots[t]||("function"==typeof e?e():e);var s=i&&i.slot;return s?this.$createElement("template",{slot:s},o):o}function Ee(t){return Ft(this.$options,"filters",t)||A}function Ce(t,e){return Array.isArray(t)?-1===t.indexOf(e):t!==e}function Se(t,e,i,n,o){var r=U.keyCodes[e]||i;return o&&n&&!U.keyCodes[e]?Ce(o,n):r?Ce(r,t):n?O(n)!==e:void 0===t}function ke(t,e,i,n,o){if(i)if(a(i)){var r;Array.isArray(i)&&(i=D(i));var s=function(s){if("class"===s||"style"===s||m(s))r=t;else{var a=t.attrs&&t.attrs.type;r=n||U.mustUseProp(e,a,s)?t.domProps||(t.domProps={}):t.attrs||(t.attrs={})}var l=C(s),c=O(s);l in r||c in r||(r[s]=i[s],o&&((t.on||(t.on={}))["update:"+s]=function(t){i[s]=t}))};for(var l in i)s(l)}else;return t}function Oe(t,e){var i=this._staticTrees||(this._staticTrees=[]),n=i[t];return n&&!e?n:(we(n=i[t]=this.$options.staticRenderFns[t].call(this._renderProxy,null,this),"__static__"+t,!1),n)}function Ie(t,e,i){return we(t,"__once__"+e+(i?"_"+i:""),!0),t}function we(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)t[n]&&"string"!=typeof t[n]&&Re(t[n],e+"_"+n,i);else Re(t,e,i)}function Re(t,e,i){t.isStatic=!0,t.key=e,t.isOnce=i}function De(t,e){if(e)if(c(e)){var i=t.on=t.on?R({},t.on):{};for(var n in e){var o=i[n],r=e[n];i[n]=o?[].concat(o,r):r}}else;return t}function xe(t,e,i,n){e=e||{$stable:!i};for(var o=0;o<t.length;o++){var r=t[o];Array.isArray(r)?xe(r,e,i):r&&(r.proxy&&(r.fn.proxy=!0),e[r.key]=r.fn)}return n&&(e.$key=n),e}function Me(t,e){for(var i=0;i<e.length;i+=2){var n=e[i];"string"==typeof n&&n&&(t[e[i]]=e[i+1])}return t}function Ae(t,e){return"string"==typeof t?e+t:t}function Ne(t){t._o=Ie,t._n=f,t._s=d,t._l=be,t._t=Te,t._q=N,t._i=L,t._m=Oe,t._f=Ee,t._k=Se,t._b=ke,t._v=yt,t._e=vt,t._u=xe,t._g=De,t._d=Me,t._p=Ae}function Le(t,e,n,o,s){var a,l=this,c=s.options;b(o,"_uid")?(a=Object.create(o))._original=o:(a=o,o=o._original);var u=r(c._compiled),h=!u;this.data=t,this.props=e,this.children=n,this.parent=o,this.listeners=t.on||i,this.injections=de(c.inject,o),this.slots=function(){return l.$slots||me(t.scopedSlots,l.$slots=fe(n,o)),l.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return me(t.scopedSlots,this.slots())}}),u&&(this.$options=c,this.$slots=this.slots(),this.$scopedSlots=me(t.scopedSlots,this.$slots)),c._scopeId?this._c=function(t,e,i,n){var r=$e(a,t,e,i,n,h);return r&&!Array.isArray(r)&&(r.fnScopeId=c._scopeId,r.fnContext=o),r}:this._c=function(t,e,i,n){return $e(a,t,e,i,n,h)}}function Pe(t,e,i,n,o){var r=bt(t);return r.fnContext=i,r.fnOptions=n,e.slot&&((r.data||(r.data={})).slot=e.slot),r}function Be(t,e){for(var i in e)t[C(i)]=e[i]}Ne(Le.prototype);var Fe={init:function(t,e){if(t.componentInstance&&!t.componentInstance._isDestroyed&&t.data.keepAlive){var i=t;Fe.prepatch(i,i)}else{(t.componentInstance=function(t,e){var i={_isComponent:!0,_parentVnode:t,parent:e},n=t.data.inlineTemplate;o(n)&&(i.render=n.render,i.staticRenderFns=n.staticRenderFns);return new t.componentOptions.Ctor(i)}(t,Qe)).$mount(e?t.elm:void 0,e)}},prepatch:function(t,e){var n=e.componentOptions;!function(t,e,n,o,r){0;var s=o.data.scopedSlots,a=t.$scopedSlots,l=!!(s&&!s.$stable||a!==i&&!a.$stable||s&&t.$scopedSlots.$key!==s.$key||!s&&t.$scopedSlots.$key),c=!!(r||t.$options._renderChildren||l);t.$options._parentVnode=o,t.$vnode=o,t._vnode&&(t._vnode.parent=o);if(t.$options._renderChildren=r,t.$attrs=o.data.attrs||i,t.$listeners=n||i,e&&t.$options.props){kt(!1);for(var u=t._props,h=t.$options._propKeys||[],p=0;p<h.length;p++){var d=h[p],f=t.$options.props;u[d]=Ht(d,f,e,t)}kt(!0),t.$options.propsData=e}n=n||i;var g=t.$options._parentListeners;t.$options._parentListeners=n,Ze(t,n,g),c&&(t.$slots=fe(r,o.context),t.$forceUpdate());0}(e.componentInstance=t.componentInstance,n.propsData,n.listeners,e,n.children)},insert:function(t){var e,i=t.context,n=t.componentInstance;n._isMounted||(n._isMounted=!0,ni(n,"mounted")),t.data.keepAlive&&(i._isMounted?((e=n)._inactive=!1,ri.push(e)):ii(n,!0))},destroy:function(t){var e=t.componentInstance;e._isDestroyed||(t.data.keepAlive?function t(e,i){if(i&&(e._directInactive=!0,ei(e)))return;if(!e._inactive){e._inactive=!0;for(var n=0;n<e.$children.length;n++)t(e.$children[n]);ni(e,"deactivated")}}(e,!0):e.$destroy())}},He=Object.keys(Fe);function Ue(t,e,s,l,c){if(!n(t)){var u=s.$options._base;if(a(t)&&(t=u.extend(t)),"function"==typeof t){var h;if(n(t.cid)&&void 0===(t=function(t,e){if(r(t.error)&&o(t.errorComp))return t.errorComp;if(o(t.resolved))return t.resolved;var i=ze;i&&o(t.owners)&&-1===t.owners.indexOf(i)&&t.owners.push(i);if(r(t.loading)&&o(t.loadingComp))return t.loadingComp;if(i&&!o(t.owners)){var s=t.owners=[i],l=!0,c=null,u=null;i.$on("hook:destroyed",function(){return v(s,i)});var h=function(t){for(var e=0,i=s.length;e<i;e++)s[e].$forceUpdate();t&&(s.length=0,null!==c&&(clearTimeout(c),c=null),null!==u&&(clearTimeout(u),u=null))},d=P(function(i){t.resolved=Xe(i,e),l?s.length=0:h(!0)}),f=P(function(e){o(t.errorComp)&&(t.error=!0,h(!0))}),g=t(d,f);return a(g)&&(p(g)?n(t.resolved)&&g.then(d,f):p(g.component)&&(g.component.then(d,f),o(g.error)&&(t.errorComp=Xe(g.error,e)),o(g.loading)&&(t.loadingComp=Xe(g.loading,e),0===g.delay?t.loading=!0:c=setTimeout(function(){c=null,n(t.resolved)&&n(t.error)&&(t.loading=!0,h(!1))},g.delay||200)),o(g.timeout)&&(u=setTimeout(function(){u=null,n(t.resolved)&&f(null)},g.timeout)))),l=!1,t.loading?t.loadingComp:t.resolved}}(h=t,u)))return function(t,e,i,n,o){var r=vt();return r.asyncFactory=t,r.asyncMeta={data:e,context:i,children:n,tag:o},r}(h,e,s,l,c);e=e||{},ki(t),o(e.model)&&function(t,e){var i=t.model&&t.model.prop||"value",n=t.model&&t.model.event||"input";(e.attrs||(e.attrs={}))[i]=e.model.value;var r=e.on||(e.on={}),s=r[n],a=e.model.callback;o(s)?(Array.isArray(s)?-1===s.indexOf(a):s!==a)&&(r[n]=[a].concat(s)):r[n]=a}(t.options,e);var d=function(t,e,i){var r=e.options.props;if(!n(r)){var s={},a=t.attrs,l=t.props;if(o(a)||o(l))for(var c in r){var u=O(c);ue(s,l,c,u,!0)||ue(s,a,c,u,!1)}return s}}(e,t);if(r(t.options.functional))return function(t,e,n,r,s){var a=t.options,l={},c=a.props;if(o(c))for(var u in c)l[u]=Ht(u,c,e||i);else o(n.attrs)&&Be(l,n.attrs),o(n.props)&&Be(l,n.props);var h=new Le(n,l,s,r,t),p=a.render.call(null,h._c,h);if(p instanceof _t)return Pe(p,n,h.parent,a);if(Array.isArray(p)){for(var d=he(p)||[],f=new Array(d.length),g=0;g<d.length;g++)f[g]=Pe(d[g],n,h.parent,a);return f}}(t,d,e,s,l);var f=e.on;if(e.on=e.nativeOn,r(t.options.abstract)){var g=e.slot;e={},g&&(e.slot=g)}!function(t){for(var e=t.hook||(t.hook={}),i=0;i<He.length;i++){var n=He[i],o=e[n],r=Fe[n];o===r||o&&o._merged||(e[n]=o?Ve(r,o):r)}}(e);var _=t.options.name||c;return new _t("vue-component-"+t.cid+(_?"-"+_:""),e,void 0,void 0,void 0,s,{Ctor:t,propsData:d,listeners:f,tag:c,children:l},h)}}}function Ve(t,e){var i=function(i,n){t(i,n),e(i,n)};return i._merged=!0,i}var Ge=1,We=2;function $e(t,e,i,l,c,u){return(Array.isArray(i)||s(i))&&(c=l,l=i,i=void 0),r(u)&&(c=We),function(t,e,i,s,l){if(o(i)&&o(i.__ob__))return vt();o(i)&&o(i.is)&&(e=i.is);if(!e)return vt();0;Array.isArray(s)&&"function"==typeof s[0]&&((i=i||{}).scopedSlots={default:s[0]},s.length=0);l===We?s=he(s):l===Ge&&(s=function(t){for(var e=0;e<t.length;e++)if(Array.isArray(t[e]))return Array.prototype.concat.apply([],t);return t}(s));var c,u;if("string"==typeof e){var h;u=t.$vnode&&t.$vnode.ns||U.getTagNamespace(e),c=U.isReservedTag(e)?new _t(U.parsePlatformTagName(e),i,s,void 0,void 0,t):i&&i.pre||!o(h=Ft(t.$options,"components",e))?new _t(e,i,s,void 0,void 0,t):Ue(h,i,t,s,e)}else c=Ue(e,i,t,s);return Array.isArray(c)?c:o(c)?(o(u)&&function t(e,i,s){e.ns=i;"foreignObject"===e.tag&&(i=void 0,s=!0);if(o(e.children))for(var a=0,l=e.children.length;a<l;a++){var c=e.children[a];o(c.tag)&&(n(c.ns)||r(s)&&"svg"!==c.tag)&&t(c,i,s)}}(c,u),o(i)&&function(t){a(t.style)&&re(t.style);a(t.class)&&re(t.class)}(i),c):vt()}(t,e,i,l,c)}var je,ze=null;function Xe(t,e){return(t.__esModule||ct&&"Module"===t[Symbol.toStringTag])&&(t=t.default),a(t)?e.extend(t):t}function Ye(t){if(Array.isArray(t))for(var e=0;e<t.length;e++){var i=t[e];if(o(i)&&(o(i.componentOptions)||_e(i)))return i}}function Ke(t,e){je.$on(t,e)}function Je(t,e){je.$off(t,e)}function qe(t,e){var i=je;return function n(){null!==e.apply(null,arguments)&&i.$off(t,n)}}function Ze(t,e,i){je=t,le(e,i||{},Ke,Je,qe,t),je=void 0}var Qe=null;function ti(t){var e=Qe;return Qe=t,function(){Qe=e}}function ei(t){for(;t&&(t=t.$parent);)if(t._inactive)return!0;return!1}function ii(t,e){if(e){if(t._directInactive=!1,ei(t))return}else if(t._directInactive)return;if(t._inactive||null===t._inactive){t._inactive=!1;for(var i=0;i<t.$children.length;i++)ii(t.$children[i]);ni(t,"activated")}}function ni(t,e){ft();var i=t.$options[e],n=e+" hook";if(i)for(var o=0,r=i.length;o<r;o++)jt(i[o],t,null,t,n);t._hasHookEvent&&t.$emit("hook:"+e),gt()}var oi=[],ri=[],si={},ai=!1,li=!1,ci=0;var ui=0,hi=Date.now;if(X&&!q){var pi=window.performance;pi&&"function"==typeof pi.now&&hi()>document.createEvent("Event").timeStamp&&(hi=function(){return pi.now()})}function di(){var t,e;for(ui=hi(),li=!0,oi.sort(function(t,e){return t.id-e.id}),ci=0;ci<oi.length;ci++)(t=oi[ci]).before&&t.before(),e=t.id,si[e]=null,t.run();var i=ri.slice(),n=oi.slice();ci=oi.length=ri.length=0,si={},ai=li=!1,function(t){for(var e=0;e<t.length;e++)t[e]._inactive=!0,ii(t[e],!0)}(i),function(t){var e=t.length;for(;e--;){var i=t[e],n=i.vm;n._watcher===i&&n._isMounted&&!n._isDestroyed&&ni(n,"updated")}}(n),st&&U.devtools&&st.emit("flush")}var fi=0,gi=function(t,e,i,n,o){this.vm=t,o&&(t._watcher=this),t._watchers.push(this),n?(this.deep=!!n.deep,this.user=!!n.user,this.lazy=!!n.lazy,this.sync=!!n.sync,this.before=n.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=i,this.id=++fi,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new lt,this.newDepIds=new lt,this.expression="","function"==typeof e?this.getter=e:(this.getter=function(t){if(!$.test(t)){var e=t.split(".");return function(t){for(var i=0;i<e.length;i++){if(!t)return;t=t[e[i]]}return t}}}(e),this.getter||(this.getter=x)),this.value=this.lazy?void 0:this.get()};gi.prototype.get=function(){var t;ft(this);var e=this.vm;try{t=this.getter.call(e,e)}catch(t){if(!this.user)throw t;$t(t,e,'getter for watcher "'+this.expression+'"')}finally{this.deep&&re(t),gt(),this.cleanupDeps()}return t},gi.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},gi.prototype.cleanupDeps=function(){for(var t=this.deps.length;t--;){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var i=this.depIds;this.depIds=this.newDepIds,this.newDepIds=i,this.newDepIds.clear(),i=this.deps,this.deps=this.newDeps,this.newDeps=i,this.newDeps.length=0},gi.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():function(t){var e=t.id;if(null==si[e]){if(si[e]=!0,li){for(var i=oi.length-1;i>ci&&oi[i].id>t.id;)i--;oi.splice(i+1,0,t)}else oi.push(t);ai||(ai=!0,ne(di))}}(this)},gi.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||a(t)||this.deep){var e=this.value;if(this.value=t,this.user){var i='callback for watcher "'+this.expression+'"';jt(this.cb,this.vm,[t,e],this.vm,i)}else this.cb.call(this.vm,t,e)}}},gi.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},gi.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},gi.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||v(this.vm._watchers,this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1}};var _i={enumerable:!0,configurable:!0,get:x,set:x};function mi(t,e,i){_i.get=function(){return this[e][i]},_i.set=function(t){this[e][i]=t},Object.defineProperty(t,i,_i)}function vi(t){t._watchers=[];var e=t.$options;e.props&&function(t,e){var i=t.$options.propsData||{},n=t._props={},o=t.$options._propKeys=[],r=!t.$parent;r||kt(!1);var s=function(r){o.push(r);var s=Ht(r,e,i,t);wt(n,r,s),r in t||mi(t,"_props",r)};for(var a in e)s(a);kt(!0)}(t,e.props),e.methods&&function(t,e){t.$options.props;for(var i in e)t[i]="function"!=typeof e[i]?x:I(e[i],t)}(t,e.methods),e.data?function(t){var e=t.$options.data;c(e=t._data="function"==typeof e?function(t,e){ft();try{return t.call(e,e)}catch(t){return $t(t,e,"data()"),{}}finally{gt()}}(e,t):e||{})||(e={});var i=Object.keys(e),n=t.$options.props,o=(t.$options.methods,i.length);for(;o--;){var r=i[o];0,n&&b(n,r)||G(r)||mi(t,"_data",r)}It(e,!0)}(t):It(t._data={},!0),e.computed&&function(t,e){var i=t._computedWatchers=Object.create(null),n=rt();for(var o in e){var r=e[o],s="function"==typeof r?r:r.get;0,n||(i[o]=new gi(t,s||x,x,yi)),o in t||bi(t,o,r)}}(t,e.computed),e.watch&&e.watch!==it&&function(t,e){for(var i in e){var n=e[i];if(Array.isArray(n))for(var o=0;o<n.length;o++)Ci(t,i,n[o]);else Ci(t,i,n)}}(t,e.watch)}var yi={lazy:!0};function bi(t,e,i){var n=!rt();"function"==typeof i?(_i.get=n?Ti(e):Ei(i),_i.set=x):(_i.get=i.get?n&&!1!==i.cache?Ti(e):Ei(i.get):x,_i.set=i.set||x),Object.defineProperty(t,e,_i)}function Ti(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),pt.target&&e.depend(),e.value}}function Ei(t){return function(){return t.call(this,this)}}function Ci(t,e,i,n){return c(i)&&(n=i,i=i.handler),"string"==typeof i&&(i=t[i]),t.$watch(e,i,n)}var Si=0;function ki(t){var e=t.options;if(t.super){var i=ki(t.super);if(i!==t.superOptions){t.superOptions=i;var n=function(t){var e,i=t.options,n=t.sealedOptions;for(var o in i)i[o]!==n[o]&&(e||(e={}),e[o]=i[o]);return e}(t);n&&R(t.extendOptions,n),(e=t.options=Bt(i,t.extendOptions)).name&&(e.components[e.name]=t)}}return e}function Oi(t){this._init(t)}function Ii(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var i=this,n=i.cid,o=t._Ctor||(t._Ctor={});if(o[n])return o[n];var r=t.name||i.options.name;var s=function(t){this._init(t)};return(s.prototype=Object.create(i.prototype)).constructor=s,s.cid=e++,s.options=Bt(i.options,t),s.super=i,s.options.props&&function(t){var e=t.options.props;for(var i in e)mi(t.prototype,"_props",i)}(s),s.options.computed&&function(t){var e=t.options.computed;for(var i in e)bi(t.prototype,i,e[i])}(s),s.extend=i.extend,s.mixin=i.mixin,s.use=i.use,F.forEach(function(t){s[t]=i[t]}),r&&(s.options.components[r]=s),s.superOptions=i.options,s.extendOptions=t,s.sealedOptions=R({},s.options),o[n]=s,s}}function wi(t){return t&&(t.Ctor.options.name||t.tag)}function Ri(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"==typeof t?t.split(",").indexOf(e)>-1:!!u(t)&&t.test(e)}function Di(t,e){var i=t.cache,n=t.keys,o=t._vnode;for(var r in i){var s=i[r];if(s){var a=s.name;a&&!e(a)&&xi(i,r,n,o)}}}function xi(t,e,i,n){var o=t[e];!o||n&&o.tag===n.tag||o.componentInstance.$destroy(),t[e]=null,v(i,e)}!function(t){t.prototype._init=function(t){var e=this;e._uid=Si++,e._isVue=!0,t&&t._isComponent?function(t,e){var i=t.$options=Object.create(t.constructor.options),n=e._parentVnode;i.parent=e.parent,i._parentVnode=n;var o=n.componentOptions;i.propsData=o.propsData,i._parentListeners=o.listeners,i._renderChildren=o.children,i._componentTag=o.tag,e.render&&(i.render=e.render,i.staticRenderFns=e.staticRenderFns)}(e,t):e.$options=Bt(ki(e.constructor),t||{},e),e._renderProxy=e,e._self=e,function(t){var e=t.$options,i=e.parent;if(i&&!e.abstract){for(;i.$options.abstract&&i.$parent;)i=i.$parent;i.$children.push(t)}t.$parent=i,t.$root=i?i.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(e),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&Ze(t,e)}(e),function(t){t._vnode=null,t._staticTrees=null;var e=t.$options,n=t.$vnode=e._parentVnode,o=n&&n.context;t.$slots=fe(e._renderChildren,o),t.$scopedSlots=i,t._c=function(e,i,n,o){return $e(t,e,i,n,o,!1)},t.$createElement=function(e,i,n,o){return $e(t,e,i,n,o,!0)};var r=n&&n.data;wt(t,"$attrs",r&&r.attrs||i,null,!0),wt(t,"$listeners",e._parentListeners||i,null,!0)}(e),ni(e,"beforeCreate"),function(t){var e=de(t.$options.inject,t);e&&(kt(!1),Object.keys(e).forEach(function(i){wt(t,i,e[i])}),kt(!0))}(e),vi(e),function(t){var e=t.$options.provide;e&&(t._provided="function"==typeof e?e.call(t):e)}(e),ni(e,"created"),e.$options.el&&e.$mount(e.$options.el)}}(Oi),function(t){var e={get:function(){return this._data}},i={get:function(){return this._props}};Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",i),t.prototype.$set=Rt,t.prototype.$delete=Dt,t.prototype.$watch=function(t,e,i){if(c(e))return Ci(this,t,e,i);(i=i||{}).user=!0;var n=new gi(this,t,e,i);if(i.immediate){var o='callback for immediate watcher "'+n.expression+'"';ft(),jt(e,this,[n.value],this,o),gt()}return function(){n.teardown()}}}(Oi),function(t){var e=/^hook:/;t.prototype.$on=function(t,i){var n=this;if(Array.isArray(t))for(var o=0,r=t.length;o<r;o++)n.$on(t[o],i);else(n._events[t]||(n._events[t]=[])).push(i),e.test(t)&&(n._hasHookEvent=!0);return n},t.prototype.$once=function(t,e){var i=this;function n(){i.$off(t,n),e.apply(i,arguments)}return n.fn=e,i.$on(t,n),i},t.prototype.$off=function(t,e){var i=this;if(!arguments.length)return i._events=Object.create(null),i;if(Array.isArray(t)){for(var n=0,o=t.length;n<o;n++)i.$off(t[n],e);return i}var r,s=i._events[t];if(!s)return i;if(!e)return i._events[t]=null,i;for(var a=s.length;a--;)if((r=s[a])===e||r.fn===e){s.splice(a,1);break}return i},t.prototype.$emit=function(t){var e=this,i=e._events[t];if(i){i=i.length>1?w(i):i;for(var n=w(arguments,1),o='event handler for "'+t+'"',r=0,s=i.length;r<s;r++)jt(i[r],e,n,e,o)}return e}}(Oi),function(t){t.prototype._update=function(t,e){var i=this,n=i.$el,o=i._vnode,r=ti(i);i._vnode=t,i.$el=o?i.__patch__(o,t):i.__patch__(i.$el,t,e,!1),r(),n&&(n.__vue__=null),i.$el&&(i.$el.__vue__=i),i.$vnode&&i.$parent&&i.$vnode===i.$parent._vnode&&(i.$parent.$el=i.$el)},t.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},t.prototype.$destroy=function(){var t=this;if(!t._isBeingDestroyed){ni(t,"beforeDestroy"),t._isBeingDestroyed=!0;var e=t.$parent;!e||e._isBeingDestroyed||t.$options.abstract||v(e.$children,t),t._watcher&&t._watcher.teardown();for(var i=t._watchers.length;i--;)t._watchers[i].teardown();t._data.__ob__&&t._data.__ob__.vmCount--,t._isDestroyed=!0,t.__patch__(t._vnode,null),ni(t,"destroyed"),t.$off(),t.$el&&(t.$el.__vue__=null),t.$vnode&&(t.$vnode.parent=null)}}}(Oi),function(t){Ne(t.prototype),t.prototype.$nextTick=function(t){return ne(t,this)},t.prototype._render=function(){var t,e=this,i=e.$options,n=i.render,o=i._parentVnode;o&&(e.$scopedSlots=me(o.data.scopedSlots,e.$slots,e.$scopedSlots)),e.$vnode=o;try{ze=e,t=n.call(e._renderProxy,e.$createElement)}catch(i){$t(i,e,"render"),t=e._vnode}finally{ze=null}return Array.isArray(t)&&1===t.length&&(t=t[0]),t instanceof _t||(t=vt()),t.parent=o,t}}(Oi);var Mi=[String,RegExp,Array],Ai={KeepAlive:{name:"keep-alive",abstract:!0,props:{include:Mi,exclude:Mi,max:[String,Number]},methods:{cacheVNode:function(){var t=this.cache,e=this.keys,i=this.vnodeToCache,n=this.keyToCache;if(i){var o=i.tag,r=i.componentInstance,s=i.componentOptions;t[n]={name:wi(s),tag:o,componentInstance:r},e.push(n),this.max&&e.length>parseInt(this.max)&&xi(t,e[0],e,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)xi(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",function(e){Di(t,function(t){return Ri(e,t)})}),this.$watch("exclude",function(e){Di(t,function(t){return!Ri(e,t)})})},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,e=Ye(t),i=e&&e.componentOptions;if(i){var n=wi(i),o=this.include,r=this.exclude;if(o&&(!n||!Ri(o,n))||r&&n&&Ri(r,n))return e;var s=this.cache,a=this.keys,l=null==e.key?i.Ctor.cid+(i.tag?"::"+i.tag:""):e.key;s[l]?(e.componentInstance=s[l].componentInstance,v(a,l),a.push(l)):(this.vnodeToCache=e,this.keyToCache=l),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){var e={get:function(){return U}};Object.defineProperty(t,"config",e),t.util={warn:ut,extend:R,mergeOptions:Bt,defineReactive:wt},t.set=Rt,t.delete=Dt,t.nextTick=ne,t.observable=function(t){return It(t),t},t.options=Object.create(null),F.forEach(function(e){t.options[e+"s"]=Object.create(null)}),t.options._base=t,R(t.options.components,Ai),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var i=w(arguments,1);return i.unshift(this),"function"==typeof t.install?t.install.apply(t,i):"function"==typeof t&&t.apply(null,i),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=Bt(this.options,t),this}}(t),Ii(t),function(t){F.forEach(function(e){t[e]=function(t,i){return i?("component"===e&&c(i)&&(i.name=i.name||t,i=this.options._base.extend(i)),"directive"===e&&"function"==typeof i&&(i={bind:i,update:i}),this.options[e+"s"][t]=i,i):this.options[e+"s"][t]}})}(t)}(Oi),Object.defineProperty(Oi.prototype,"$isServer",{get:rt}),Object.defineProperty(Oi.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Oi,"FunctionalRenderContext",{value:Le}),Oi.version="2.6.14";var Ni=g("style,class"),Li=g("input,textarea,option,select,progress"),Pi=function(t,e,i){return"value"===i&&Li(t)&&"button"!==e||"selected"===i&&"option"===t||"checked"===i&&"input"===t||"muted"===i&&"video"===t},Bi=g("contenteditable,draggable,spellcheck"),Fi=g("events,caret,typing,plaintext-only"),Hi=function(t,e){return $i(e)||"false"===e?"false":"contenteditable"===t&&Fi(e)?e:"true"},Ui=g("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),Vi="http://www.w3.org/1999/xlink",Gi=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Wi=function(t){return Gi(t)?t.slice(6,t.length):""},$i=function(t){return null==t||!1===t};function ji(t){for(var e=t.data,i=t,n=t;o(n.componentInstance);)(n=n.componentInstance._vnode)&&n.data&&(e=zi(n.data,e));for(;o(i=i.parent);)i&&i.data&&(e=zi(e,i.data));return function(t,e){if(o(t)||o(e))return Xi(t,Yi(e));return""}(e.staticClass,e.class)}function zi(t,e){return{staticClass:Xi(t.staticClass,e.staticClass),class:o(t.class)?[t.class,e.class]:e.class}}function Xi(t,e){return t?e?t+" "+e:t:e||""}function Yi(t){return Array.isArray(t)?function(t){for(var e,i="",n=0,r=t.length;n<r;n++)o(e=Yi(t[n]))&&""!==e&&(i&&(i+=" "),i+=e);return i}(t):a(t)?function(t){var e="";for(var i in t)t[i]&&(e&&(e+=" "),e+=i);return e}(t):"string"==typeof t?t:""}var Ki={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Ji=g("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),qi=g("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),Zi=function(t){return Ji(t)||qi(t)};function Qi(t){return qi(t)?"svg":"math"===t?"math":void 0}var tn=Object.create(null);var en=g("text,number,password,search,email,tel,url");function nn(t){if("string"==typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}var on=Object.freeze({createElement:function(t,e){var i=document.createElement(t);return"select"!==t?i:(e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&i.setAttribute("multiple","multiple"),i)},createElementNS:function(t,e){return document.createElementNS(Ki[t],e)},createTextNode:function(t){return document.createTextNode(t)},createComment:function(t){return document.createComment(t)},insertBefore:function(t,e,i){t.insertBefore(e,i)},removeChild:function(t,e){t.removeChild(e)},appendChild:function(t,e){t.appendChild(e)},parentNode:function(t){return t.parentNode},nextSibling:function(t){return t.nextSibling},tagName:function(t){return t.tagName},setTextContent:function(t,e){t.textContent=e},setStyleScope:function(t,e){t.setAttribute(e,"")}}),rn={create:function(t,e){sn(e)},update:function(t,e){t.data.ref!==e.data.ref&&(sn(t,!0),sn(e))},destroy:function(t){sn(t,!0)}};function sn(t,e){var i=t.data.ref;if(o(i)){var n=t.context,r=t.componentInstance||t.elm,s=n.$refs;e?Array.isArray(s[i])?v(s[i],r):s[i]===r&&(s[i]=void 0):t.data.refInFor?Array.isArray(s[i])?s[i].indexOf(r)<0&&s[i].push(r):s[i]=[r]:s[i]=r}}var an=new _t("",{},[]),ln=["create","activate","update","remove","destroy"];function cn(t,e){return t.key===e.key&&t.asyncFactory===e.asyncFactory&&(t.tag===e.tag&&t.isComment===e.isComment&&o(t.data)===o(e.data)&&function(t,e){if("input"!==t.tag)return!0;var i,n=o(i=t.data)&&o(i=i.attrs)&&i.type,r=o(i=e.data)&&o(i=i.attrs)&&i.type;return n===r||en(n)&&en(r)}(t,e)||r(t.isAsyncPlaceholder)&&n(e.asyncFactory.error))}function un(t,e,i){var n,r,s={};for(n=e;n<=i;++n)o(r=t[n].key)&&(s[r]=n);return s}var hn={create:pn,update:pn,destroy:function(t){pn(t,an)}};function pn(t,e){(t.data.directives||e.data.directives)&&function(t,e){var i,n,o,r=t===an,s=e===an,a=fn(t.data.directives,t.context),l=fn(e.data.directives,e.context),c=[],u=[];for(i in l)n=a[i],o=l[i],n?(o.oldValue=n.value,o.oldArg=n.arg,_n(o,"update",e,t),o.def&&o.def.componentUpdated&&u.push(o)):(_n(o,"bind",e,t),o.def&&o.def.inserted&&c.push(o));if(c.length){var h=function(){for(var i=0;i<c.length;i++)_n(c[i],"inserted",e,t)};r?ce(e,"insert",h):h()}u.length&&ce(e,"postpatch",function(){for(var i=0;i<u.length;i++)_n(u[i],"componentUpdated",e,t)});if(!r)for(i in a)l[i]||_n(a[i],"unbind",t,t,s)}(t,e)}var dn=Object.create(null);function fn(t,e){var i,n,o=Object.create(null);if(!t)return o;for(i=0;i<t.length;i++)(n=t[i]).modifiers||(n.modifiers=dn),o[gn(n)]=n,n.def=Ft(e.$options,"directives",n.name);return o}function gn(t){return t.rawName||t.name+"."+Object.keys(t.modifiers||{}).join(".")}function _n(t,e,i,n,o){var r=t.def&&t.def[e];if(r)try{r(i.elm,t,i,n,o)}catch(n){$t(n,i.context,"directive "+t.name+" "+e+" hook")}}var mn=[rn,hn];function vn(t,e){var i=e.componentOptions;if(!(o(i)&&!1===i.Ctor.options.inheritAttrs||n(t.data.attrs)&&n(e.data.attrs))){var r,s,a=e.elm,l=t.data.attrs||{},c=e.data.attrs||{};for(r in o(c.__ob__)&&(c=e.data.attrs=R({},c)),c)s=c[r],l[r]!==s&&yn(a,r,s,e.data.pre);for(r in(q||Q)&&c.value!==l.value&&yn(a,"value",c.value),l)n(c[r])&&(Gi(r)?a.removeAttributeNS(Vi,Wi(r)):Bi(r)||a.removeAttribute(r))}}function yn(t,e,i,n){n||t.tagName.indexOf("-")>-1?bn(t,e,i):Ui(e)?$i(i)?t.removeAttribute(e):(i="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,i)):Bi(e)?t.setAttribute(e,Hi(e,i)):Gi(e)?$i(i)?t.removeAttributeNS(Vi,Wi(e)):t.setAttributeNS(Vi,e,i):bn(t,e,i)}function bn(t,e,i){if($i(i))t.removeAttribute(e);else{if(q&&!Z&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==i&&!t.__ieph){var n=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",n)};t.addEventListener("input",n),t.__ieph=!0}t.setAttribute(e,i)}}var Tn={create:vn,update:vn};function En(t,e){var i=e.elm,r=e.data,s=t.data;if(!(n(r.staticClass)&&n(r.class)&&(n(s)||n(s.staticClass)&&n(s.class)))){var a=ji(e),l=i._transitionClasses;o(l)&&(a=Xi(a,Yi(l))),a!==i._prevClass&&(i.setAttribute("class",a),i._prevClass=a)}}var Cn,Sn,kn,On,In,wn,Rn={create:En,update:En},Dn=/[\w).+\-_$\]]/;function xn(t){var e,i,n,o,r,s=!1,a=!1,l=!1,c=!1,u=0,h=0,p=0,d=0;for(n=0;n<t.length;n++)if(i=e,e=t.charCodeAt(n),s)39===e&&92!==i&&(s=!1);else if(a)34===e&&92!==i&&(a=!1);else if(l)96===e&&92!==i&&(l=!1);else if(c)47===e&&92!==i&&(c=!1);else if(124!==e||124===t.charCodeAt(n+1)||124===t.charCodeAt(n-1)||u||h||p){switch(e){case 34:a=!0;break;case 39:s=!0;break;case 96:l=!0;break;case 40:p++;break;case 41:p--;break;case 91:h++;break;case 93:h--;break;case 123:u++;break;case 125:u--}if(47===e){for(var f=n-1,g=void 0;f>=0&&" "===(g=t.charAt(f));f--);g&&Dn.test(g)||(c=!0)}}else void 0===o?(d=n+1,o=t.slice(0,n).trim()):_();function _(){(r||(r=[])).push(t.slice(d,n).trim()),d=n+1}if(void 0===o?o=t.slice(0,n).trim():0!==d&&_(),r)for(n=0;n<r.length;n++)o=Mn(o,r[n]);return o}function Mn(t,e){var i=e.indexOf("(");if(i<0)return'_f("'+e+'")('+t+")";var n=e.slice(0,i),o=e.slice(i+1);return'_f("'+n+'")('+t+(")"!==o?","+o:o)}function An(t,e){console.error("[Vue compiler]: "+t)}function Nn(t,e){return t?t.map(function(t){return t[e]}).filter(function(t){return t}):[]}function Ln(t,e,i,n,o){(t.props||(t.props=[])).push(jn({name:e,value:i,dynamic:o},n)),t.plain=!1}function Pn(t,e,i,n,o){(o?t.dynamicAttrs||(t.dynamicAttrs=[]):t.attrs||(t.attrs=[])).push(jn({name:e,value:i,dynamic:o},n)),t.plain=!1}function Bn(t,e,i,n){t.attrsMap[e]=i,t.attrsList.push(jn({name:e,value:i},n))}function Fn(t,e,i,n,o,r,s,a){(t.directives||(t.directives=[])).push(jn({name:e,rawName:i,value:n,arg:o,isDynamicArg:r,modifiers:s},a)),t.plain=!1}function Hn(t,e,i){return i?"_p("+e+',"'+t+'")':t+e}function Un(t,e,n,o,r,s,a,l){var c;(o=o||i).right?l?e="("+e+")==='click'?'contextmenu':("+e+")":"click"===e&&(e="contextmenu",delete o.right):o.middle&&(l?e="("+e+")==='click'?'mouseup':("+e+")":"click"===e&&(e="mouseup")),o.capture&&(delete o.capture,e=Hn("!",e,l)),o.once&&(delete o.once,e=Hn("~",e,l)),o.passive&&(delete o.passive,e=Hn("&",e,l)),o.native?(delete o.native,c=t.nativeEvents||(t.nativeEvents={})):c=t.events||(t.events={});var u=jn({value:n.trim(),dynamic:l},a);o!==i&&(u.modifiers=o);var h=c[e];Array.isArray(h)?r?h.unshift(u):h.push(u):c[e]=h?r?[u,h]:[h,u]:u,t.plain=!1}function Vn(t,e){return t.rawAttrsMap[":"+e]||t.rawAttrsMap["v-bind:"+e]||t.rawAttrsMap[e]}function Gn(t,e,i){var n=Wn(t,":"+e)||Wn(t,"v-bind:"+e);if(null!=n)return xn(n);if(!1!==i){var o=Wn(t,e);if(null!=o)return JSON.stringify(o)}}function Wn(t,e,i){var n;if(null!=(n=t.attrsMap[e]))for(var o=t.attrsList,r=0,s=o.length;r<s;r++)if(o[r].name===e){o.splice(r,1);break}return i&&delete t.attrsMap[e],n}function $n(t,e){for(var i=t.attrsList,n=0,o=i.length;n<o;n++){var r=i[n];if(e.test(r.name))return i.splice(n,1),r}}function jn(t,e){return e&&(null!=e.start&&(t.start=e.start),null!=e.end&&(t.end=e.end)),t}function zn(t,e,i){var n=i||{},o=n.number,r="$$v";n.trim&&(r="(typeof $$v === 'string'? $$v.trim(): $$v)"),o&&(r="_n("+r+")");var s=Xn(e,r);t.model={value:"("+e+")",expression:JSON.stringify(e),callback:"function ($$v) {"+s+"}"}}function Xn(t,e){var i=function(t){if(t=t.trim(),Cn=t.length,t.indexOf("[")<0||t.lastIndexOf("]")<Cn-1)return(On=t.lastIndexOf("."))>-1?{exp:t.slice(0,On),key:'"'+t.slice(On+1)+'"'}:{exp:t,key:null};Sn=t,On=In=wn=0;for(;!Kn();)Jn(kn=Yn())?Zn(kn):91===kn&&qn(kn);return{exp:t.slice(0,In),key:t.slice(In+1,wn)}}(t);return null===i.key?t+"="+e:"$set("+i.exp+", "+i.key+", "+e+")"}function Yn(){return Sn.charCodeAt(++On)}function Kn(){return On>=Cn}function Jn(t){return 34===t||39===t}function qn(t){var e=1;for(In=On;!Kn();)if(Jn(t=Yn()))Zn(t);else if(91===t&&e++,93===t&&e--,0===e){wn=On;break}}function Zn(t){for(var e=t;!Kn()&&(t=Yn())!==e;);}var Qn,to="__r",eo="__c";function io(t,e,i){var n=Qn;return function o(){null!==e.apply(null,arguments)&&ro(t,o,i,n)}}var no=Kt&&!(et&&Number(et[1])<=53);function oo(t,e,i,n){if(no){var o=ui,r=e;e=r._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return r.apply(this,arguments)}}Qn.addEventListener(t,e,nt?{capture:i,passive:n}:i)}function ro(t,e,i,n){(n||Qn).removeEventListener(t,e._wrapper||e,i)}function so(t,e){if(!n(t.data.on)||!n(e.data.on)){var i=e.data.on||{},r=t.data.on||{};Qn=e.elm,function(t){if(o(t[to])){var e=q?"change":"input";t[e]=[].concat(t[to],t[e]||[]),delete t[to]}o(t[eo])&&(t.change=[].concat(t[eo],t.change||[]),delete t[eo])}(i),le(i,r,oo,ro,io,e.context),Qn=void 0}}var ao,lo={create:so,update:so};function co(t,e){if(!n(t.data.domProps)||!n(e.data.domProps)){var i,r,s=e.elm,a=t.data.domProps||{},l=e.data.domProps||{};for(i in o(l.__ob__)&&(l=e.data.domProps=R({},l)),a)i in l||(s[i]="");for(i in l){if(r=l[i],"textContent"===i||"innerHTML"===i){if(e.children&&(e.children.length=0),r===a[i])continue;1===s.childNodes.length&&s.removeChild(s.childNodes[0])}if("value"===i&&"PROGRESS"!==s.tagName){s._value=r;var c=n(r)?"":String(r);uo(s,c)&&(s.value=c)}else if("innerHTML"===i&&qi(s.tagName)&&n(s.innerHTML)){(ao=ao||document.createElement("div")).innerHTML="<svg>"+r+"</svg>";for(var u=ao.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;u.firstChild;)s.appendChild(u.firstChild)}else if(r!==a[i])try{s[i]=r}catch(t){}}}}function uo(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var i=!0;try{i=document.activeElement!==t}catch(t){}return i&&t.value!==e}(t,e)||function(t,e){var i=t.value,n=t._vModifiers;if(o(n)){if(n.number)return f(i)!==f(e);if(n.trim)return i.trim()!==e.trim()}return i!==e}(t,e))}var ho={create:co,update:co},po=T(function(t){var e={},i=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach(function(t){if(t){var n=t.split(i);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e});function fo(t){var e=go(t.style);return t.staticStyle?R(t.staticStyle,e):e}function go(t){return Array.isArray(t)?D(t):"string"==typeof t?po(t):t}var _o,mo=/^--/,vo=/\s*!important$/,yo=function(t,e,i){if(mo.test(e))t.style.setProperty(e,i);else if(vo.test(i))t.style.setProperty(O(e),i.replace(vo,""),"important");else{var n=To(e);if(Array.isArray(i))for(var o=0,r=i.length;o<r;o++)t.style[n]=i[o];else t.style[n]=i}},bo=["Webkit","Moz","ms"],To=T(function(t){if(_o=_o||document.createElement("div").style,"filter"!==(t=C(t))&&t in _o)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),i=0;i<bo.length;i++){var n=bo[i]+e;if(n in _o)return n}});function Eo(t,e){var i=e.data,r=t.data;if(!(n(i.staticStyle)&&n(i.style)&&n(r.staticStyle)&&n(r.style))){var s,a,l=e.elm,c=r.staticStyle,u=r.normalizedStyle||r.style||{},h=c||u,p=go(e.data.style)||{};e.data.normalizedStyle=o(p.__ob__)?R({},p):p;var d=function(t,e){var i,n={};if(e)for(var o=t;o.componentInstance;)(o=o.componentInstance._vnode)&&o.data&&(i=fo(o.data))&&R(n,i);(i=fo(t.data))&&R(n,i);for(var r=t;r=r.parent;)r.data&&(i=fo(r.data))&&R(n,i);return n}(e,!0);for(a in h)n(d[a])&&yo(l,a,"");for(a in d)(s=d[a])!==h[a]&&yo(l,a,null==s?"":s)}}var Co={create:Eo,update:Eo},So=/\s+/;function ko(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(So).forEach(function(e){return t.classList.add(e)}):t.classList.add(e);else{var i=" "+(t.getAttribute("class")||"")+" ";i.indexOf(" "+e+" ")<0&&t.setAttribute("class",(i+e).trim())}}function Oo(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(So).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var i=" "+(t.getAttribute("class")||"")+" ",n=" "+e+" ";i.indexOf(n)>=0;)i=i.replace(n," ");(i=i.trim())?t.setAttribute("class",i):t.removeAttribute("class")}}function Io(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&R(e,wo(t.name||"v")),R(e,t),e}return"string"==typeof t?wo(t):void 0}}var wo=T(function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}}),Ro=X&&!Z,Do="transition",xo="animation",Mo="transition",Ao="transitionend",No="animation",Lo="animationend";Ro&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Mo="WebkitTransition",Ao="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(No="WebkitAnimation",Lo="webkitAnimationEnd"));var Po=X?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Bo(t){Po(function(){Po(t)})}function Fo(t,e){var i=t._transitionClasses||(t._transitionClasses=[]);i.indexOf(e)<0&&(i.push(e),ko(t,e))}function Ho(t,e){t._transitionClasses&&v(t._transitionClasses,e),Oo(t,e)}function Uo(t,e,i){var n=Go(t,e),o=n.type,r=n.timeout,s=n.propCount;if(!o)return i();var a=o===Do?Ao:Lo,l=0,c=function(){t.removeEventListener(a,u),i()},u=function(e){e.target===t&&++l>=s&&c()};setTimeout(function(){l<s&&c()},r+1),t.addEventListener(a,u)}var Vo=/\b(transform|all)(,|$)/;function Go(t,e){var i,n=window.getComputedStyle(t),o=(n[Mo+"Delay"]||"").split(", "),r=(n[Mo+"Duration"]||"").split(", "),s=Wo(o,r),a=(n[No+"Delay"]||"").split(", "),l=(n[No+"Duration"]||"").split(", "),c=Wo(a,l),u=0,h=0;return e===Do?s>0&&(i=Do,u=s,h=r.length):e===xo?c>0&&(i=xo,u=c,h=l.length):h=(i=(u=Math.max(s,c))>0?s>c?Do:xo:null)?i===Do?r.length:l.length:0,{type:i,timeout:u,propCount:h,hasTransform:i===Do&&Vo.test(n[Mo+"Property"])}}function Wo(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max.apply(null,e.map(function(e,i){return $o(e)+$o(t[i])}))}function $o(t){return 1e3*Number(t.slice(0,-1).replace(",","."))}function jo(t,e){var i=t.elm;o(i._leaveCb)&&(i._leaveCb.cancelled=!0,i._leaveCb());var r=Io(t.data.transition);if(!n(r)&&!o(i._enterCb)&&1===i.nodeType){for(var s=r.css,l=r.type,c=r.enterClass,u=r.enterToClass,h=r.enterActiveClass,p=r.appearClass,d=r.appearToClass,g=r.appearActiveClass,_=r.beforeEnter,m=r.enter,v=r.afterEnter,y=r.enterCancelled,b=r.beforeAppear,T=r.appear,E=r.afterAppear,C=r.appearCancelled,S=r.duration,k=Qe,O=Qe.$vnode;O&&O.parent;)k=O.context,O=O.parent;var I=!k._isMounted||!t.isRootInsert;if(!I||T||""===T){var w=I&&p?p:c,R=I&&g?g:h,D=I&&d?d:u,x=I&&b||_,M=I&&"function"==typeof T?T:m,A=I&&E||v,N=I&&C||y,L=f(a(S)?S.enter:S);0;var B=!1!==s&&!Z,F=Yo(M),H=i._enterCb=P(function(){B&&(Ho(i,D),Ho(i,R)),H.cancelled?(B&&Ho(i,w),N&&N(i)):A&&A(i),i._enterCb=null});t.data.show||ce(t,"insert",function(){var e=i.parentNode,n=e&&e._pending&&e._pending[t.key];n&&n.tag===t.tag&&n.elm._leaveCb&&n.elm._leaveCb(),M&&M(i,H)}),x&&x(i),B&&(Fo(i,w),Fo(i,R),Bo(function(){Ho(i,w),H.cancelled||(Fo(i,D),F||(Xo(L)?setTimeout(H,L):Uo(i,l,H)))})),t.data.show&&(e&&e(),M&&M(i,H)),B||F||H()}}}function zo(t,e){var i=t.elm;o(i._enterCb)&&(i._enterCb.cancelled=!0,i._enterCb());var r=Io(t.data.transition);if(n(r)||1!==i.nodeType)return e();if(!o(i._leaveCb)){var s=r.css,l=r.type,c=r.leaveClass,u=r.leaveToClass,h=r.leaveActiveClass,p=r.beforeLeave,d=r.leave,g=r.afterLeave,_=r.leaveCancelled,m=r.delayLeave,v=r.duration,y=!1!==s&&!Z,b=Yo(d),T=f(a(v)?v.leave:v);0;var E=i._leaveCb=P(function(){i.parentNode&&i.parentNode._pending&&(i.parentNode._pending[t.key]=null),y&&(Ho(i,u),Ho(i,h)),E.cancelled?(y&&Ho(i,c),_&&_(i)):(e(),g&&g(i)),i._leaveCb=null});m?m(C):C()}function C(){E.cancelled||(!t.data.show&&i.parentNode&&((i.parentNode._pending||(i.parentNode._pending={}))[t.key]=t),p&&p(i),y&&(Fo(i,c),Fo(i,h),Bo(function(){Ho(i,c),E.cancelled||(Fo(i,u),b||(Xo(T)?setTimeout(E,T):Uo(i,l,E)))})),d&&d(i,E),y||b||E())}}function Xo(t){return"number"==typeof t&&!isNaN(t)}function Yo(t){if(n(t))return!1;var e=t.fns;return o(e)?Yo(Array.isArray(e)?e[0]:e):(t._length||t.length)>1}function Ko(t,e){!0!==e.data.show&&jo(e)}var Jo=function(t){var e,i,a={},l=t.modules,c=t.nodeOps;for(e=0;e<ln.length;++e)for(a[ln[e]]=[],i=0;i<l.length;++i)o(l[i][ln[e]])&&a[ln[e]].push(l[i][ln[e]]);function u(t){var e=c.parentNode(t);o(e)&&c.removeChild(e,t)}function h(t,e,i,n,s,l,u){if(o(t.elm)&&o(l)&&(t=l[u]=bt(t)),t.isRootInsert=!s,!function(t,e,i,n){var s=t.data;if(o(s)){var l=o(t.componentInstance)&&s.keepAlive;if(o(s=s.hook)&&o(s=s.init)&&s(t,!1),o(t.componentInstance))return p(t,e),d(i,t.elm,n),r(l)&&function(t,e,i,n){for(var r,s=t;s.componentInstance;)if(s=s.componentInstance._vnode,o(r=s.data)&&o(r=r.transition)){for(r=0;r<a.activate.length;++r)a.activate[r](an,s);e.push(s);break}d(i,t.elm,n)}(t,e,i,n),!0}}(t,e,i,n)){var h=t.data,g=t.children,_=t.tag;o(_)?(t.elm=t.ns?c.createElementNS(t.ns,_):c.createElement(_,t),v(t),f(t,g,e),o(h)&&m(t,e),d(i,t.elm,n)):r(t.isComment)?(t.elm=c.createComment(t.text),d(i,t.elm,n)):(t.elm=c.createTextNode(t.text),d(i,t.elm,n))}}function p(t,e){o(t.data.pendingInsert)&&(e.push.apply(e,t.data.pendingInsert),t.data.pendingInsert=null),t.elm=t.componentInstance.$el,_(t)?(m(t,e),v(t)):(sn(t),e.push(t))}function d(t,e,i){o(t)&&(o(i)?c.parentNode(i)===t&&c.insertBefore(t,e,i):c.appendChild(t,e))}function f(t,e,i){if(Array.isArray(e))for(var n=0;n<e.length;++n)h(e[n],i,t.elm,null,!0,e,n);else s(t.text)&&c.appendChild(t.elm,c.createTextNode(String(t.text)))}function _(t){for(;t.componentInstance;)t=t.componentInstance._vnode;return o(t.tag)}function m(t,i){for(var n=0;n<a.create.length;++n)a.create[n](an,t);o(e=t.data.hook)&&(o(e.create)&&e.create(an,t),o(e.insert)&&i.push(t))}function v(t){var e;if(o(e=t.fnScopeId))c.setStyleScope(t.elm,e);else for(var i=t;i;)o(e=i.context)&&o(e=e.$options._scopeId)&&c.setStyleScope(t.elm,e),i=i.parent;o(e=Qe)&&e!==t.context&&e!==t.fnContext&&o(e=e.$options._scopeId)&&c.setStyleScope(t.elm,e)}function y(t,e,i,n,o,r){for(;n<=o;++n)h(i[n],r,t,e,!1,i,n)}function b(t){var e,i,n=t.data;if(o(n))for(o(e=n.hook)&&o(e=e.destroy)&&e(t),e=0;e<a.destroy.length;++e)a.destroy[e](t);if(o(e=t.children))for(i=0;i<t.children.length;++i)b(t.children[i])}function T(t,e,i){for(;e<=i;++e){var n=t[e];o(n)&&(o(n.tag)?(E(n),b(n)):u(n.elm))}}function E(t,e){if(o(e)||o(t.data)){var i,n=a.remove.length+1;for(o(e)?e.listeners+=n:e=function(t,e){function i(){0==--i.listeners&&u(t)}return i.listeners=e,i}(t.elm,n),o(i=t.componentInstance)&&o(i=i._vnode)&&o(i.data)&&E(i,e),i=0;i<a.remove.length;++i)a.remove[i](t,e);o(i=t.data.hook)&&o(i=i.remove)?i(t,e):e()}else u(t.elm)}function C(t,e,i,n){for(var r=i;r<n;r++){var s=e[r];if(o(s)&&cn(t,s))return r}}function S(t,e,i,s,l,u){if(t!==e){o(e.elm)&&o(s)&&(e=s[l]=bt(e));var p=e.elm=t.elm;if(r(t.isAsyncPlaceholder))o(e.asyncFactory.resolved)?I(t.elm,e,i):e.isAsyncPlaceholder=!0;else if(r(e.isStatic)&&r(t.isStatic)&&e.key===t.key&&(r(e.isCloned)||r(e.isOnce)))e.componentInstance=t.componentInstance;else{var d,f=e.data;o(f)&&o(d=f.hook)&&o(d=d.prepatch)&&d(t,e);var g=t.children,m=e.children;if(o(f)&&_(e)){for(d=0;d<a.update.length;++d)a.update[d](t,e);o(d=f.hook)&&o(d=d.update)&&d(t,e)}n(e.text)?o(g)&&o(m)?g!==m&&function(t,e,i,r,s){for(var a,l,u,p=0,d=0,f=e.length-1,g=e[0],_=e[f],m=i.length-1,v=i[0],b=i[m],E=!s;p<=f&&d<=m;)n(g)?g=e[++p]:n(_)?_=e[--f]:cn(g,v)?(S(g,v,r,i,d),g=e[++p],v=i[++d]):cn(_,b)?(S(_,b,r,i,m),_=e[--f],b=i[--m]):cn(g,b)?(S(g,b,r,i,m),E&&c.insertBefore(t,g.elm,c.nextSibling(_.elm)),g=e[++p],b=i[--m]):cn(_,v)?(S(_,v,r,i,d),E&&c.insertBefore(t,_.elm,g.elm),_=e[--f],v=i[++d]):(n(a)&&(a=un(e,p,f)),n(l=o(v.key)?a[v.key]:C(v,e,p,f))?h(v,r,t,g.elm,!1,i,d):cn(u=e[l],v)?(S(u,v,r,i,d),e[l]=void 0,E&&c.insertBefore(t,u.elm,g.elm)):h(v,r,t,g.elm,!1,i,d),v=i[++d]);p>f?y(t,n(i[m+1])?null:i[m+1].elm,i,d,m,r):d>m&&T(e,p,f)}(p,g,m,i,u):o(m)?(o(t.text)&&c.setTextContent(p,""),y(p,null,m,0,m.length-1,i)):o(g)?T(g,0,g.length-1):o(t.text)&&c.setTextContent(p,""):t.text!==e.text&&c.setTextContent(p,e.text),o(f)&&o(d=f.hook)&&o(d=d.postpatch)&&d(t,e)}}}function k(t,e,i){if(r(i)&&o(t.parent))t.parent.data.pendingInsert=e;else for(var n=0;n<e.length;++n)e[n].data.hook.insert(e[n])}var O=g("attrs,class,staticClass,staticStyle,key");function I(t,e,i,n){var s,a=e.tag,l=e.data,c=e.children;if(n=n||l&&l.pre,e.elm=t,r(e.isComment)&&o(e.asyncFactory))return e.isAsyncPlaceholder=!0,!0;if(o(l)&&(o(s=l.hook)&&o(s=s.init)&&s(e,!0),o(s=e.componentInstance)))return p(e,i),!0;if(o(a)){if(o(c))if(t.hasChildNodes())if(o(s=l)&&o(s=s.domProps)&&o(s=s.innerHTML)){if(s!==t.innerHTML)return!1}else{for(var u=!0,h=t.firstChild,d=0;d<c.length;d++){if(!h||!I(h,c[d],i,n)){u=!1;break}h=h.nextSibling}if(!u||h)return!1}else f(e,c,i);if(o(l)){var g=!1;for(var _ in l)if(!O(_)){g=!0,m(e,i);break}!g&&l.class&&re(l.class)}}else t.data!==e.text&&(t.data=e.text);return!0}return function(t,e,i,s){if(!n(e)){var l,u=!1,p=[];if(n(t))u=!0,h(e,p);else{var d=o(t.nodeType);if(!d&&cn(t,e))S(t,e,p,null,null,s);else{if(d){if(1===t.nodeType&&t.hasAttribute(B)&&(t.removeAttribute(B),i=!0),r(i)&&I(t,e,p))return k(e,p,!0),t;l=t,t=new _t(c.tagName(l).toLowerCase(),{},[],void 0,l)}var f=t.elm,g=c.parentNode(f);if(h(e,p,f._leaveCb?null:g,c.nextSibling(f)),o(e.parent))for(var m=e.parent,v=_(e);m;){for(var y=0;y<a.destroy.length;++y)a.destroy[y](m);if(m.elm=e.elm,v){for(var E=0;E<a.create.length;++E)a.create[E](an,m);var C=m.data.hook.insert;if(C.merged)for(var O=1;O<C.fns.length;O++)C.fns[O]()}else sn(m);m=m.parent}o(g)?T([t],0,0):o(t.tag)&&b(t)}}return k(e,p,u),e.elm}o(t)&&b(t)}}({nodeOps:on,modules:[Tn,Rn,lo,ho,Co,X?{create:Ko,activate:Ko,remove:function(t,e){!0!==t.data.show?zo(t,e):e()}}:{}].concat(mn)});Z&&document.addEventListener("selectionchange",function(){var t=document.activeElement;t&&t.vmodel&&or(t,"input")});var qo={inserted:function(t,e,i,n){"select"===i.tag?(n.elm&&!n.elm._vOptions?ce(i,"postpatch",function(){qo.componentUpdated(t,e,i)}):Zo(t,e,i.context),t._vOptions=[].map.call(t.options,er)):("textarea"===i.tag||en(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",ir),t.addEventListener("compositionend",nr),t.addEventListener("change",nr),Z&&(t.vmodel=!0)))},componentUpdated:function(t,e,i){if("select"===i.tag){Zo(t,e,i.context);var n=t._vOptions,o=t._vOptions=[].map.call(t.options,er);if(o.some(function(t,e){return!N(t,n[e])}))(t.multiple?e.value.some(function(t){return tr(t,o)}):e.value!==e.oldValue&&tr(e.value,o))&&or(t,"change")}}};function Zo(t,e,i){Qo(t,e,i),(q||Q)&&setTimeout(function(){Qo(t,e,i)},0)}function Qo(t,e,i){var n=e.value,o=t.multiple;if(!o||Array.isArray(n)){for(var r,s,a=0,l=t.options.length;a<l;a++)if(s=t.options[a],o)r=L(n,er(s))>-1,s.selected!==r&&(s.selected=r);else if(N(er(s),n))return void(t.selectedIndex!==a&&(t.selectedIndex=a));o||(t.selectedIndex=-1)}}function tr(t,e){return e.every(function(e){return!N(e,t)})}function er(t){return"_value"in t?t._value:t.value}function ir(t){t.target.composing=!0}function nr(t){t.target.composing&&(t.target.composing=!1,or(t.target,"input"))}function or(t,e){var i=document.createEvent("HTMLEvents");i.initEvent(e,!0,!0),t.dispatchEvent(i)}function rr(t){return!t.componentInstance||t.data&&t.data.transition?t:rr(t.componentInstance._vnode)}var sr={model:qo,show:{bind:function(t,e,i){var n=e.value,o=(i=rr(i)).data&&i.data.transition,r=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;n&&o?(i.data.show=!0,jo(i,function(){t.style.display=r})):t.style.display=n?r:"none"},update:function(t,e,i){var n=e.value;!n!=!e.oldValue&&((i=rr(i)).data&&i.data.transition?(i.data.show=!0,n?jo(i,function(){t.style.display=t.__vOriginalDisplay}):zo(i,function(){t.style.display="none"})):t.style.display=n?t.__vOriginalDisplay:"none")},unbind:function(t,e,i,n,o){o||(t.style.display=t.__vOriginalDisplay)}}},ar={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function lr(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?lr(Ye(e.children)):t}function cr(t){var e={},i=t.$options;for(var n in i.propsData)e[n]=t[n];var o=i._parentListeners;for(var r in o)e[C(r)]=o[r];return e}function ur(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var hr=function(t){return t.tag||_e(t)},pr=function(t){return"show"===t.name},dr={name:"transition",props:ar,abstract:!0,render:function(t){var e=this,i=this.$slots.default;if(i&&(i=i.filter(hr)).length){0;var n=this.mode;0;var o=i[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return o;var r=lr(o);if(!r)return o;if(this._leaving)return ur(t,o);var a="__transition-"+this._uid+"-";r.key=null==r.key?r.isComment?a+"comment":a+r.tag:s(r.key)?0===String(r.key).indexOf(a)?r.key:a+r.key:r.key;var l=(r.data||(r.data={})).transition=cr(this),c=this._vnode,u=lr(c);if(r.data.directives&&r.data.directives.some(pr)&&(r.data.show=!0),u&&u.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(r,u)&&!_e(u)&&(!u.componentInstance||!u.componentInstance._vnode.isComment)){var h=u.data.transition=R({},l);if("out-in"===n)return this._leaving=!0,ce(h,"afterLeave",function(){e._leaving=!1,e.$forceUpdate()}),ur(t,o);if("in-out"===n){if(_e(r))return c;var p,d=function(){p()};ce(l,"afterEnter",d),ce(l,"enterCancelled",d),ce(h,"delayLeave",function(t){p=t})}}return o}}},fr=R({tag:String,moveClass:String},ar);function gr(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function _r(t){t.data.newPos=t.elm.getBoundingClientRect()}function mr(t){var e=t.data.pos,i=t.data.newPos,n=e.left-i.left,o=e.top-i.top;if(n||o){t.data.moved=!0;var r=t.elm.style;r.transform=r.WebkitTransform="translate("+n+"px,"+o+"px)",r.transitionDuration="0s"}}delete fr.mode;var vr={Transition:dr,TransitionGroup:{props:fr,beforeMount:function(){var t=this,e=this._update;this._update=function(i,n){var o=ti(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,i,n)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",i=Object.create(null),n=this.prevChildren=this.children,o=this.$slots.default||[],r=this.children=[],s=cr(this),a=0;a<o.length;a++){var l=o[a];if(l.tag)if(null!=l.key&&0!==String(l.key).indexOf("__vlist"))r.push(l),i[l.key]=l,(l.data||(l.data={})).transition=s;else;}if(n){for(var c=[],u=[],h=0;h<n.length;h++){var p=n[h];p.data.transition=s,p.data.pos=p.elm.getBoundingClientRect(),i[p.key]?c.push(p):u.push(p)}this.kept=t(e,null,c),this.removed=u}return t(e,null,r)},updated:function(){var t=this.prevChildren,e=this.moveClass||(this.name||"v")+"-move";t.length&&this.hasMove(t[0].elm,e)&&(t.forEach(gr),t.forEach(_r),t.forEach(mr),this._reflow=document.body.offsetHeight,t.forEach(function(t){if(t.data.moved){var i=t.elm,n=i.style;Fo(i,e),n.transform=n.WebkitTransform=n.transitionDuration="",i.addEventListener(Ao,i._moveCb=function t(n){n&&n.target!==i||n&&!/transform$/.test(n.propertyName)||(i.removeEventListener(Ao,t),i._moveCb=null,Ho(i,e))})}}))},methods:{hasMove:function(t,e){if(!Ro)return!1;if(this._hasMove)return this._hasMove;var i=t.cloneNode();t._transitionClasses&&t._transitionClasses.forEach(function(t){Oo(i,t)}),ko(i,e),i.style.display="none",this.$el.appendChild(i);var n=Go(i);return this.$el.removeChild(i),this._hasMove=n.hasTransform}}}};Oi.config.mustUseProp=Pi,Oi.config.isReservedTag=Zi,Oi.config.isReservedAttr=Ni,Oi.config.getTagNamespace=Qi,Oi.config.isUnknownElement=function(t){if(!X)return!0;if(Zi(t))return!1;if(t=t.toLowerCase(),null!=tn[t])return tn[t];var e=document.createElement(t);return t.indexOf("-")>-1?tn[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:tn[t]=/HTMLUnknownElement/.test(e.toString())},R(Oi.options.directives,sr),R(Oi.options.components,vr),Oi.prototype.__patch__=X?Jo:x,Oi.prototype.$mount=function(t,e){return function(t,e,i){return t.$el=e,t.$options.render||(t.$options.render=vt),ni(t,"beforeMount"),new gi(t,function(){t._update(t._render(),i)},x,{before:function(){t._isMounted&&!t._isDestroyed&&ni(t,"beforeUpdate")}},!0),i=!1,null==t.$vnode&&(t._isMounted=!0,ni(t,"mounted")),t}(this,t=t&&X?nn(t):void 0,e)},X&&setTimeout(function(){U.devtools&&st&&st.emit("init",Oi)},0);var yr=/\{\{((?:.|\r?\n)+?)\}\}/g,br=/[-.*+?^${}()|[\]\/\\]/g,Tr=T(function(t){var e=t[0].replace(br,"\\$&"),i=t[1].replace(br,"\\$&");return new RegExp(e+"((?:.|\\n)+?)"+i,"g")});function Er(t,e){var i=e?Tr(e):yr;if(i.test(t)){for(var n,o,r,s=[],a=[],l=i.lastIndex=0;n=i.exec(t);){(o=n.index)>l&&(a.push(r=t.slice(l,o)),s.push(JSON.stringify(r)));var c=xn(n[1].trim());s.push("_s("+c+")"),a.push({"@binding":c}),l=o+n[0].length}return l<t.length&&(a.push(r=t.slice(l)),s.push(JSON.stringify(r))),{expression:s.join("+"),tokens:a}}}var Cr={staticKeys:["staticClass"],transformNode:function(t,e){e.warn;var i=Wn(t,"class");i&&(t.staticClass=JSON.stringify(i));var n=Gn(t,"class",!1);n&&(t.classBinding=n)},genData:function(t){var e="";return t.staticClass&&(e+="staticClass:"+t.staticClass+","),t.classBinding&&(e+="class:"+t.classBinding+","),e}};var Sr,kr={staticKeys:["staticStyle"],transformNode:function(t,e){e.warn;var i=Wn(t,"style");i&&(t.staticStyle=JSON.stringify(po(i)));var n=Gn(t,"style",!1);n&&(t.styleBinding=n)},genData:function(t){var e="";return t.staticStyle&&(e+="staticStyle:"+t.staticStyle+","),t.styleBinding&&(e+="style:("+t.styleBinding+"),"),e}},Or=function(t){return(Sr=Sr||document.createElement("div")).innerHTML=t,Sr.textContent},Ir=g("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),wr=g("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),Rr=g("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),Dr=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,xr=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Mr="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+V.source+"]*",Ar="((?:"+Mr+"\\:)?"+Mr+")",Nr=new RegExp("^<"+Ar),Lr=/^\s*(\/?)>/,Pr=new RegExp("^<\\/"+Ar+"[^>]*>"),Br=/^<!DOCTYPE [^>]+>/i,Fr=/^<!\--/,Hr=/^<!\[/,Ur=g("script,style,textarea",!0),Vr={},Gr={"&lt;":"<","&gt;":">","&quot;":'"',"&amp;":"&","&#10;":"\n","&#9;":"\t","&#39;":"'"},Wr=/&(?:lt|gt|quot|amp|#39);/g,$r=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,jr=g("pre,textarea",!0),zr=function(t,e){return t&&jr(t)&&"\n"===e[0]};function Xr(t,e){var i=e?$r:Wr;return t.replace(i,function(t){return Gr[t]})}var Yr,Kr,Jr,qr,Zr,Qr,ts,es,is=/^@|^v-on:/,ns=/^v-|^@|^:|^#/,os=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,rs=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,ss=/^\(|\)$/g,as=/^\[.*\]$/,ls=/:(.*)$/,cs=/^:|^\.|^v-bind:/,us=/\.[^.\]]+(?=[^\]]*$)/g,hs=/^v-slot(:|$)|^#/,ps=/[\r\n]/,ds=/[ \f\t\r\n]+/g,fs=T(Or),gs="_empty_";function _s(t,e,i){return{type:1,tag:t,attrsList:e,attrsMap:function(t){for(var e={},i=0,n=t.length;i<n;i++)e[t[i].name]=t[i].value;return e}(e),rawAttrsMap:{},parent:i,children:[]}}function ms(t,e){Yr=e.warn||An,Qr=e.isPreTag||M,ts=e.mustUseProp||M,es=e.getTagNamespace||M;var i=e.isReservedTag||M;(function(t){return!(!(t.component||t.attrsMap[":is"]||t.attrsMap["v-bind:is"])&&(t.attrsMap.is?i(t.attrsMap.is):i(t.tag)))}),Jr=Nn(e.modules,"transformNode"),qr=Nn(e.modules,"preTransformNode"),Zr=Nn(e.modules,"postTransformNode"),Kr=e.delimiters;var n,o,r=[],s=!1!==e.preserveWhitespace,a=e.whitespace,l=!1,c=!1;function u(t){if(h(t),l||t.processed||(t=vs(t,e)),r.length||t===n||n.if&&(t.elseif||t.else)&&bs(n,{exp:t.elseif,block:t}),o&&!t.forbidden)if(t.elseif||t.else)s=t,(a=function(t){var e=t.length;for(;e--;){if(1===t[e].type)return t[e];t.pop()}}(o.children))&&a.if&&bs(a,{exp:s.elseif,block:s});else{if(t.slotScope){var i=t.slotTarget||'"default"';(o.scopedSlots||(o.scopedSlots={}))[i]=t}o.children.push(t),t.parent=o}var s,a;t.children=t.children.filter(function(t){return!t.slotScope}),h(t),t.pre&&(l=!1),Qr(t.tag)&&(c=!1);for(var u=0;u<Zr.length;u++)Zr[u](t,e)}function h(t){if(!c)for(var e;(e=t.children[t.children.length-1])&&3===e.type&&" "===e.text;)t.children.pop()}return function(t,e){for(var i,n,o=[],r=e.expectHTML,s=e.isUnaryTag||M,a=e.canBeLeftOpenTag||M,l=0;t;){if(i=t,n&&Ur(n)){var c=0,u=n.toLowerCase(),h=Vr[u]||(Vr[u]=new RegExp("([\\s\\S]*?)(</"+u+"[^>]*>)","i")),p=t.replace(h,function(t,i,n){return c=n.length,Ur(u)||"noscript"===u||(i=i.replace(/<!\--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),zr(u,i)&&(i=i.slice(1)),e.chars&&e.chars(i),""});l+=t.length-p.length,t=p,O(u,l-c,l)}else{var d=t.indexOf("<");if(0===d){if(Fr.test(t)){var f=t.indexOf("--\x3e");if(f>=0){e.shouldKeepComment&&e.comment(t.substring(4,f),l,l+f+3),C(f+3);continue}}if(Hr.test(t)){var g=t.indexOf("]>");if(g>=0){C(g+2);continue}}var _=t.match(Br);if(_){C(_[0].length);continue}var m=t.match(Pr);if(m){var v=l;C(m[0].length),O(m[1],v,l);continue}var y=S();if(y){k(y),zr(y.tagName,t)&&C(1);continue}}var b=void 0,T=void 0,E=void 0;if(d>=0){for(T=t.slice(d);!(Pr.test(T)||Nr.test(T)||Fr.test(T)||Hr.test(T)||(E=T.indexOf("<",1))<0);)d+=E,T=t.slice(d);b=t.substring(0,d)}d<0&&(b=t),b&&C(b.length),e.chars&&b&&e.chars(b,l-b.length,l)}if(t===i){e.chars&&e.chars(t);break}}function C(e){l+=e,t=t.substring(e)}function S(){var e=t.match(Nr);if(e){var i,n,o={tagName:e[1],attrs:[],start:l};for(C(e[0].length);!(i=t.match(Lr))&&(n=t.match(xr)||t.match(Dr));)n.start=l,C(n[0].length),n.end=l,o.attrs.push(n);if(i)return o.unarySlash=i[1],C(i[0].length),o.end=l,o}}function k(t){var i=t.tagName,l=t.unarySlash;r&&("p"===n&&Rr(i)&&O(n),a(i)&&n===i&&O(i));for(var c=s(i)||!!l,u=t.attrs.length,h=new Array(u),p=0;p<u;p++){var d=t.attrs[p],f=d[3]||d[4]||d[5]||"",g="a"===i&&"href"===d[1]?e.shouldDecodeNewlinesForHref:e.shouldDecodeNewlines;h[p]={name:d[1],value:Xr(f,g)}}c||(o.push({tag:i,lowerCasedTag:i.toLowerCase(),attrs:h,start:t.start,end:t.end}),n=i),e.start&&e.start(i,h,c,t.start,t.end)}function O(t,i,r){var s,a;if(null==i&&(i=l),null==r&&(r=l),t)for(a=t.toLowerCase(),s=o.length-1;s>=0&&o[s].lowerCasedTag!==a;s--);else s=0;if(s>=0){for(var c=o.length-1;c>=s;c--)e.end&&e.end(o[c].tag,i,r);o.length=s,n=s&&o[s-1].tag}else"br"===a?e.start&&e.start(t,[],!0,i,r):"p"===a&&(e.start&&e.start(t,[],!1,i,r),e.end&&e.end(t,i,r))}O()}(t,{warn:Yr,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldDecodeNewlinesForHref:e.shouldDecodeNewlinesForHref,shouldKeepComment:e.comments,outputSourceRange:e.outputSourceRange,start:function(t,i,s,a,h){var p=o&&o.ns||es(t);q&&"svg"===p&&(i=function(t){for(var e=[],i=0;i<t.length;i++){var n=t[i];Cs.test(n.name)||(n.name=n.name.replace(Ss,""),e.push(n))}return e}(i));var d,f=_s(t,i,o);p&&(f.ns=p),"style"!==(d=f).tag&&("script"!==d.tag||d.attrsMap.type&&"text/javascript"!==d.attrsMap.type)||rt()||(f.forbidden=!0);for(var g=0;g<qr.length;g++)f=qr[g](f,e)||f;l||(!function(t){null!=Wn(t,"v-pre")&&(t.pre=!0)}(f),f.pre&&(l=!0)),Qr(f.tag)&&(c=!0),l?function(t){var e=t.attrsList,i=e.length;if(i)for(var n=t.attrs=new Array(i),o=0;o<i;o++)n[o]={name:e[o].name,value:JSON.stringify(e[o].value)},null!=e[o].start&&(n[o].start=e[o].start,n[o].end=e[o].end);else t.pre||(t.plain=!0)}(f):f.processed||(ys(f),function(t){var e=Wn(t,"v-if");if(e)t.if=e,bs(t,{exp:e,block:t});else{null!=Wn(t,"v-else")&&(t.else=!0);var i=Wn(t,"v-else-if");i&&(t.elseif=i)}}(f),function(t){null!=Wn(t,"v-once")&&(t.once=!0)}(f)),n||(n=f),s?u(f):(o=f,r.push(f))},end:function(t,e,i){var n=r[r.length-1];r.length-=1,o=r[r.length-1],u(n)},chars:function(t,e,i){if(o&&(!q||"textarea"!==o.tag||o.attrsMap.placeholder!==t)){var n,r,u,h=o.children;if(t=c||t.trim()?"script"===(n=o).tag||"style"===n.tag?t:fs(t):h.length?a?"condense"===a&&ps.test(t)?"":" ":s?" ":"":"")c||"condense"!==a||(t=t.replace(ds," ")),!l&&" "!==t&&(r=Er(t,Kr))?u={type:2,expression:r.expression,tokens:r.tokens,text:t}:" "===t&&h.length&&" "===h[h.length-1].text||(u={type:3,text:t}),u&&h.push(u)}},comment:function(t,e,i){if(o){var n={type:3,text:t,isComment:!0};0,o.children.push(n)}}}),n}function vs(t,e){var i,n;!function(t){var e=Gn(t,"key");if(e){t.key=e}}(t),t.plain=!t.key&&!t.scopedSlots&&!t.attrsList.length,(n=Gn(i=t,"ref"))&&(i.ref=n,i.refInFor=function(t){for(var e=t;e;){if(void 0!==e.for)return!0;e=e.parent}return!1}(i)),function(t){var e;"template"===t.tag?(e=Wn(t,"scope"),t.slotScope=e||Wn(t,"slot-scope")):(e=Wn(t,"slot-scope"))&&(t.slotScope=e);var i=Gn(t,"slot");i&&(t.slotTarget='""'===i?'"default"':i,t.slotTargetDynamic=!(!t.attrsMap[":slot"]&&!t.attrsMap["v-bind:slot"]),"template"===t.tag||t.slotScope||Pn(t,"slot",i,Vn(t,"slot")));if("template"===t.tag){var n=$n(t,hs);if(n){0;var o=Ts(n),r=o.name,s=o.dynamic;t.slotTarget=r,t.slotTargetDynamic=s,t.slotScope=n.value||gs}}else{var a=$n(t,hs);if(a){0;var l=t.scopedSlots||(t.scopedSlots={}),c=Ts(a),u=c.name,h=c.dynamic,p=l[u]=_s("template",[],t);p.slotTarget=u,p.slotTargetDynamic=h,p.children=t.children.filter(function(t){if(!t.slotScope)return t.parent=p,!0}),p.slotScope=a.value||gs,t.children=[],t.plain=!1}}}(t),function(t){"slot"===t.tag&&(t.slotName=Gn(t,"name"))}(t),function(t){var e;(e=Gn(t,"is"))&&(t.component=e);null!=Wn(t,"inline-template")&&(t.inlineTemplate=!0)}(t);for(var o=0;o<Jr.length;o++)t=Jr[o](t,e)||t;return function(t){var e,i,n,o,r,s,a,l,c=t.attrsList;for(e=0,i=c.length;e<i;e++){if(n=o=c[e].name,r=c[e].value,ns.test(n))if(t.hasBindings=!0,(s=Es(n.replace(ns,"")))&&(n=n.replace(us,"")),cs.test(n))n=n.replace(cs,""),r=xn(r),(l=as.test(n))&&(n=n.slice(1,-1)),s&&(s.prop&&!l&&"innerHtml"===(n=C(n))&&(n="innerHTML"),s.camel&&!l&&(n=C(n)),s.sync&&(a=Xn(r,"$event"),l?Un(t,'"update:"+('+n+")",a,null,!1,0,c[e],!0):(Un(t,"update:"+C(n),a,null,!1,0,c[e]),O(n)!==C(n)&&Un(t,"update:"+O(n),a,null,!1,0,c[e])))),s&&s.prop||!t.component&&ts(t.tag,t.attrsMap.type,n)?Ln(t,n,r,c[e],l):Pn(t,n,r,c[e],l);else if(is.test(n))n=n.replace(is,""),(l=as.test(n))&&(n=n.slice(1,-1)),Un(t,n,r,s,!1,0,c[e],l);else{var u=(n=n.replace(ns,"")).match(ls),h=u&&u[1];l=!1,h&&(n=n.slice(0,-(h.length+1)),as.test(h)&&(h=h.slice(1,-1),l=!0)),Fn(t,n,o,r,h,l,s,c[e])}else Pn(t,n,JSON.stringify(r),c[e]),!t.component&&"muted"===n&&ts(t.tag,t.attrsMap.type,n)&&Ln(t,n,"true",c[e])}}(t),t}function ys(t){var e;if(e=Wn(t,"v-for")){var i=function(t){var e=t.match(os);if(!e)return;var i={};i.for=e[2].trim();var n=e[1].trim().replace(ss,""),o=n.match(rs);o?(i.alias=n.replace(rs,"").trim(),i.iterator1=o[1].trim(),o[2]&&(i.iterator2=o[2].trim())):i.alias=n;return i}(e);i&&R(t,i)}}function bs(t,e){t.ifConditions||(t.ifConditions=[]),t.ifConditions.push(e)}function Ts(t){var e=t.name.replace(hs,"");return e||"#"!==t.name[0]&&(e="default"),as.test(e)?{name:e.slice(1,-1),dynamic:!0}:{name:'"'+e+'"',dynamic:!1}}function Es(t){var e=t.match(us);if(e){var i={};return e.forEach(function(t){i[t.slice(1)]=!0}),i}}var Cs=/^xmlns:NS\d+/,Ss=/^NS\d+:/;function ks(t){return _s(t.tag,t.attrsList.slice(),t.parent)}var Os=[Cr,kr,{preTransformNode:function(t,e){if("input"===t.tag){var i,n=t.attrsMap;if(!n["v-model"])return;if((n[":type"]||n["v-bind:type"])&&(i=Gn(t,"type")),n.type||i||!n["v-bind"]||(i="("+n["v-bind"]+").type"),i){var o=Wn(t,"v-if",!0),r=o?"&&("+o+")":"",s=null!=Wn(t,"v-else",!0),a=Wn(t,"v-else-if",!0),l=ks(t);ys(l),Bn(l,"type","checkbox"),vs(l,e),l.processed=!0,l.if="("+i+")==='checkbox'"+r,bs(l,{exp:l.if,block:l});var c=ks(t);Wn(c,"v-for",!0),Bn(c,"type","radio"),vs(c,e),bs(l,{exp:"("+i+")==='radio'"+r,block:c});var u=ks(t);return Wn(u,"v-for",!0),Bn(u,":type",i),vs(u,e),bs(l,{exp:o,block:u}),s?l.else=!0:a&&(l.elseif=a),l}}}}];var Is,ws,Rs={expectHTML:!0,modules:Os,directives:{model:function(t,e,i){i;var n=e.value,o=e.modifiers,r=t.tag,s=t.attrsMap.type;if(t.component)return zn(t,n,o),!1;if("select"===r)!function(t,e,i){var n='var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(i&&i.number?"_n(val)":"val")+"});";n=n+" "+Xn(e,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),Un(t,"change",n,null,!0)}(t,n,o);else if("input"===r&&"checkbox"===s)!function(t,e,i){var n=i&&i.number,o=Gn(t,"value")||"null",r=Gn(t,"true-value")||"true",s=Gn(t,"false-value")||"false";Ln(t,"checked","Array.isArray("+e+")?_i("+e+","+o+")>-1"+("true"===r?":("+e+")":":_q("+e+","+r+")")),Un(t,"change","var $$a="+e+",$$el=$event.target,$$c=$$el.checked?("+r+"):("+s+");if(Array.isArray($$a)){var $$v="+(n?"_n("+o+")":o)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Xn(e,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Xn(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Xn(e,"$$c")+"}",null,!0)}(t,n,o);else if("input"===r&&"radio"===s)!function(t,e,i){var n=i&&i.number,o=Gn(t,"value")||"null";Ln(t,"checked","_q("+e+","+(o=n?"_n("+o+")":o)+")"),Un(t,"change",Xn(e,o),null,!0)}(t,n,o);else if("input"===r||"textarea"===r)!function(t,e,i){var n=t.attrsMap.type,o=i||{},r=o.lazy,s=o.number,a=o.trim,l=!r&&"range"!==n,c=r?"change":"range"===n?to:"input",u="$event.target.value";a&&(u="$event.target.value.trim()"),s&&(u="_n("+u+")");var h=Xn(e,u);l&&(h="if($event.target.composing)return;"+h),Ln(t,"value","("+e+")"),Un(t,c,h,null,!0),(a||s)&&Un(t,"blur","$forceUpdate()")}(t,n,o);else if(!U.isReservedTag(r))return zn(t,n,o),!1;return!0},text:function(t,e){e.value&&Ln(t,"textContent","_s("+e.value+")",e)},html:function(t,e){e.value&&Ln(t,"innerHTML","_s("+e.value+")",e)}},isPreTag:function(t){return"pre"===t},isUnaryTag:Ir,mustUseProp:Pi,canBeLeftOpenTag:wr,isReservedTag:Zi,getTagNamespace:Qi,staticKeys:function(t){return t.reduce(function(t,e){return t.concat(e.staticKeys||[])},[]).join(",")}(Os)},Ds=T(function(t){return g("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(t?","+t:""))});function xs(t,e){t&&(Is=Ds(e.staticKeys||""),ws=e.isReservedTag||M,function t(e){e.static=function(t){if(2===t.type)return!1;if(3===t.type)return!0;return!(!t.pre&&(t.hasBindings||t.if||t.for||_(t.tag)||!ws(t.tag)||function(t){for(;t.parent;){if("template"!==(t=t.parent).tag)return!1;if(t.for)return!0}return!1}(t)||!Object.keys(t).every(Is)))}(e);if(1===e.type){if(!ws(e.tag)&&"slot"!==e.tag&&null==e.attrsMap["inline-template"])return;for(var i=0,n=e.children.length;i<n;i++){var o=e.children[i];t(o),o.static||(e.static=!1)}if(e.ifConditions)for(var r=1,s=e.ifConditions.length;r<s;r++){var a=e.ifConditions[r].block;t(a),a.static||(e.static=!1)}}}(t),function t(e,i){if(1===e.type){if((e.static||e.once)&&(e.staticInFor=i),e.static&&e.children.length&&(1!==e.children.length||3!==e.children[0].type))return void(e.staticRoot=!0);if(e.staticRoot=!1,e.children)for(var n=0,o=e.children.length;n<o;n++)t(e.children[n],i||!!e.for);if(e.ifConditions)for(var r=1,s=e.ifConditions.length;r<s;r++)t(e.ifConditions[r].block,i)}}(t,!1))}var Ms=/^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/,As=/\([^)]*?\);*$/,Ns=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Ls={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Ps={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Bs=function(t){return"if("+t+")return null;"},Fs={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Bs("$event.target !== $event.currentTarget"),ctrl:Bs("!$event.ctrlKey"),shift:Bs("!$event.shiftKey"),alt:Bs("!$event.altKey"),meta:Bs("!$event.metaKey"),left:Bs("'button' in $event && $event.button !== 0"),middle:Bs("'button' in $event && $event.button !== 1"),right:Bs("'button' in $event && $event.button !== 2")};function Hs(t,e){var i=e?"nativeOn:":"on:",n="",o="";for(var r in t){var s=Us(t[r]);t[r]&&t[r].dynamic?o+=r+","+s+",":n+='"'+r+'":'+s+","}return n="{"+n.slice(0,-1)+"}",o?i+"_d("+n+",["+o.slice(0,-1)+"])":i+n}function Us(t){if(!t)return"function(){}";if(Array.isArray(t))return"["+t.map(function(t){return Us(t)}).join(",")+"]";var e=Ns.test(t.value),i=Ms.test(t.value),n=Ns.test(t.value.replace(As,""));if(t.modifiers){var o="",r="",s=[];for(var a in t.modifiers)if(Fs[a])r+=Fs[a],Ls[a]&&s.push(a);else if("exact"===a){var l=t.modifiers;r+=Bs(["ctrl","shift","alt","meta"].filter(function(t){return!l[t]}).map(function(t){return"$event."+t+"Key"}).join("||"))}else s.push(a);return s.length&&(o+=function(t){return"if(!$event.type.indexOf('key')&&"+t.map(Vs).join("&&")+")return null;"}(s)),r&&(o+=r),"function($event){"+o+(e?"return "+t.value+".apply(null, arguments)":i?"return ("+t.value+").apply(null, arguments)":n?"return "+t.value:t.value)+"}"}return e||i?t.value:"function($event){"+(n?"return "+t.value:t.value)+"}"}function Vs(t){var e=parseInt(t,10);if(e)return"$event.keyCode!=="+e;var i=Ls[t],n=Ps[t];return"_k($event.keyCode,"+JSON.stringify(t)+","+JSON.stringify(i)+",$event.key,"+JSON.stringify(n)+")"}var Gs={on:function(t,e){t.wrapListeners=function(t){return"_g("+t+","+e.value+")"}},bind:function(t,e){t.wrapData=function(i){return"_b("+i+",'"+t.tag+"',"+e.value+","+(e.modifiers&&e.modifiers.prop?"true":"false")+(e.modifiers&&e.modifiers.sync?",true":"")+")"}},cloak:x},Ws=function(t){this.options=t,this.warn=t.warn||An,this.transforms=Nn(t.modules,"transformCode"),this.dataGenFns=Nn(t.modules,"genData"),this.directives=R(R({},Gs),t.directives);var e=t.isReservedTag||M;this.maybeComponent=function(t){return!!t.component||!e(t.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function $s(t,e){var i=new Ws(e);return{render:"with(this){return "+(t?"script"===t.tag?"null":js(t,i):'_c("div")')+"}",staticRenderFns:i.staticRenderFns}}function js(t,e){if(t.parent&&(t.pre=t.pre||t.parent.pre),t.staticRoot&&!t.staticProcessed)return zs(t,e);if(t.once&&!t.onceProcessed)return Xs(t,e);if(t.for&&!t.forProcessed)return Ks(t,e);if(t.if&&!t.ifProcessed)return Ys(t,e);if("template"!==t.tag||t.slotTarget||e.pre){if("slot"===t.tag)return function(t,e){var i=t.slotName||'"default"',n=Qs(t,e),o="_t("+i+(n?",function(){return "+n+"}":""),r=t.attrs||t.dynamicAttrs?ia((t.attrs||[]).concat(t.dynamicAttrs||[]).map(function(t){return{name:C(t.name),value:t.value,dynamic:t.dynamic}})):null,s=t.attrsMap["v-bind"];!r&&!s||n||(o+=",null");r&&(o+=","+r);s&&(o+=(r?"":",null")+","+s);return o+")"}(t,e);var i;if(t.component)i=function(t,e,i){var n=e.inlineTemplate?null:Qs(e,i,!0);return"_c("+t+","+Js(e,i)+(n?","+n:"")+")"}(t.component,t,e);else{var n;(!t.plain||t.pre&&e.maybeComponent(t))&&(n=Js(t,e));var o=t.inlineTemplate?null:Qs(t,e,!0);i="_c('"+t.tag+"'"+(n?","+n:"")+(o?","+o:"")+")"}for(var r=0;r<e.transforms.length;r++)i=e.transforms[r](t,i);return i}return Qs(t,e)||"void 0"}function zs(t,e){t.staticProcessed=!0;var i=e.pre;return t.pre&&(e.pre=t.pre),e.staticRenderFns.push("with(this){return "+js(t,e)+"}"),e.pre=i,"_m("+(e.staticRenderFns.length-1)+(t.staticInFor?",true":"")+")"}function Xs(t,e){if(t.onceProcessed=!0,t.if&&!t.ifProcessed)return Ys(t,e);if(t.staticInFor){for(var i="",n=t.parent;n;){if(n.for){i=n.key;break}n=n.parent}return i?"_o("+js(t,e)+","+e.onceId+++","+i+")":js(t,e)}return zs(t,e)}function Ys(t,e,i,n){return t.ifProcessed=!0,function t(e,i,n,o){if(!e.length)return o||"_e()";var r=e.shift();return r.exp?"("+r.exp+")?"+s(r.block)+":"+t(e,i,n,o):""+s(r.block);function s(t){return n?n(t,i):t.once?Xs(t,i):js(t,i)}}(t.ifConditions.slice(),e,i,n)}function Ks(t,e,i,n){var o=t.for,r=t.alias,s=t.iterator1?","+t.iterator1:"",a=t.iterator2?","+t.iterator2:"";return t.forProcessed=!0,(n||"_l")+"(("+o+"),function("+r+s+a+"){return "+(i||js)(t,e)+"})"}function Js(t,e){var i="{",n=function(t,e){var i=t.directives;if(!i)return;var n,o,r,s,a="directives:[",l=!1;for(n=0,o=i.length;n<o;n++){r=i[n],s=!0;var c=e.directives[r.name];c&&(s=!!c(t,r,e.warn)),s&&(l=!0,a+='{name:"'+r.name+'",rawName:"'+r.rawName+'"'+(r.value?",value:("+r.value+"),expression:"+JSON.stringify(r.value):"")+(r.arg?",arg:"+(r.isDynamicArg?r.arg:'"'+r.arg+'"'):"")+(r.modifiers?",modifiers:"+JSON.stringify(r.modifiers):"")+"},")}if(l)return a.slice(0,-1)+"]"}(t,e);n&&(i+=n+","),t.key&&(i+="key:"+t.key+","),t.ref&&(i+="ref:"+t.ref+","),t.refInFor&&(i+="refInFor:true,"),t.pre&&(i+="pre:true,"),t.component&&(i+='tag:"'+t.tag+'",');for(var o=0;o<e.dataGenFns.length;o++)i+=e.dataGenFns[o](t);if(t.attrs&&(i+="attrs:"+ia(t.attrs)+","),t.props&&(i+="domProps:"+ia(t.props)+","),t.events&&(i+=Hs(t.events,!1)+","),t.nativeEvents&&(i+=Hs(t.nativeEvents,!0)+","),t.slotTarget&&!t.slotScope&&(i+="slot:"+t.slotTarget+","),t.scopedSlots&&(i+=function(t,e,i){var n=t.for||Object.keys(e).some(function(t){var i=e[t];return i.slotTargetDynamic||i.if||i.for||qs(i)}),o=!!t.if;if(!n)for(var r=t.parent;r;){if(r.slotScope&&r.slotScope!==gs||r.for){n=!0;break}r.if&&(o=!0),r=r.parent}var s=Object.keys(e).map(function(t){return Zs(e[t],i)}).join(",");return"scopedSlots:_u(["+s+"]"+(n?",null,true":"")+(!n&&o?",null,false,"+function(t){var e=5381,i=t.length;for(;i;)e=33*e^t.charCodeAt(--i);return e>>>0}(s):"")+")"}(t,t.scopedSlots,e)+","),t.model&&(i+="model:{value:"+t.model.value+",callback:"+t.model.callback+",expression:"+t.model.expression+"},"),t.inlineTemplate){var r=function(t,e){var i=t.children[0];0;if(i&&1===i.type){var n=$s(i,e.options);return"inlineTemplate:{render:function(){"+n.render+"},staticRenderFns:["+n.staticRenderFns.map(function(t){return"function(){"+t+"}"}).join(",")+"]}"}}(t,e);r&&(i+=r+",")}return i=i.replace(/,$/,"")+"}",t.dynamicAttrs&&(i="_b("+i+',"'+t.tag+'",'+ia(t.dynamicAttrs)+")"),t.wrapData&&(i=t.wrapData(i)),t.wrapListeners&&(i=t.wrapListeners(i)),i}function qs(t){return 1===t.type&&("slot"===t.tag||t.children.some(qs))}function Zs(t,e){var i=t.attrsMap["slot-scope"];if(t.if&&!t.ifProcessed&&!i)return Ys(t,e,Zs,"null");if(t.for&&!t.forProcessed)return Ks(t,e,Zs);var n=t.slotScope===gs?"":String(t.slotScope),o="function("+n+"){return "+("template"===t.tag?t.if&&i?"("+t.if+")?"+(Qs(t,e)||"undefined")+":undefined":Qs(t,e)||"undefined":js(t,e))+"}",r=n?"":",proxy:true";return"{key:"+(t.slotTarget||'"default"')+",fn:"+o+r+"}"}function Qs(t,e,i,n,o){var r=t.children;if(r.length){var s=r[0];if(1===r.length&&s.for&&"template"!==s.tag&&"slot"!==s.tag){var a=i?e.maybeComponent(s)?",1":",0":"";return""+(n||js)(s,e)+a}var l=i?function(t,e){for(var i=0,n=0;n<t.length;n++){var o=t[n];if(1===o.type){if(ta(o)||o.ifConditions&&o.ifConditions.some(function(t){return ta(t.block)})){i=2;break}(e(o)||o.ifConditions&&o.ifConditions.some(function(t){return e(t.block)}))&&(i=1)}}return i}(r,e.maybeComponent):0,c=o||ea;return"["+r.map(function(t){return c(t,e)}).join(",")+"]"+(l?","+l:"")}}function ta(t){return void 0!==t.for||"template"===t.tag||"slot"===t.tag}function ea(t,e){return 1===t.type?js(t,e):3===t.type&&t.isComment?(n=t,"_e("+JSON.stringify(n.text)+")"):"_v("+(2===(i=t).type?i.expression:na(JSON.stringify(i.text)))+")";var i,n}function ia(t){for(var e="",i="",n=0;n<t.length;n++){var o=t[n],r=na(o.value);o.dynamic?i+=o.name+","+r+",":e+='"'+o.name+'":'+r+","}return e="{"+e.slice(0,-1)+"}",i?"_d("+e+",["+i.slice(0,-1)+"])":e}function na(t){return t.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b"),new RegExp("\\b"+"delete,typeof,void".split(",").join("\\s*\\([^\\)]*\\)|\\b")+"\\s*\\([^\\)]*\\)");function oa(t,e){try{return new Function(t)}catch(i){return e.push({err:i,code:t}),x}}function ra(t){var e=Object.create(null);return function(i,n,o){(n=R({},n)).warn;delete n.warn;var r=n.delimiters?String(n.delimiters)+i:i;if(e[r])return e[r];var s=t(i,n);var a={},l=[];return a.render=oa(s.render,l),a.staticRenderFns=s.staticRenderFns.map(function(t){return oa(t,l)}),e[r]=a}}var sa,aa,la=(sa=function(t,e){var i=ms(t.trim(),e);!1!==e.optimize&&xs(i,e);var n=$s(i,e);return{ast:i,render:n.render,staticRenderFns:n.staticRenderFns}},function(t){function e(e,i){var n=Object.create(t),o=[],r=[],s=function(t,e,i){(i?r:o).push(t)};if(i)for(var a in i.modules&&(n.modules=(t.modules||[]).concat(i.modules)),i.directives&&(n.directives=R(Object.create(t.directives||null),i.directives)),i)"modules"!==a&&"directives"!==a&&(n[a]=i[a]);n.warn=s;var l=sa(e.trim(),n);return l.errors=o,l.tips=r,l}return{compile:e,compileToFunctions:ra(e)}})(Rs),ca=(la.compile,la.compileToFunctions);function ua(t){return(aa=aa||document.createElement("div")).innerHTML=t?'<a href="\n"/>':'<div a="\n"/>',aa.innerHTML.indexOf("&#10;")>0}var ha=!!X&&ua(!1),pa=!!X&&ua(!0),da=T(function(t){var e=nn(t);return e&&e.innerHTML}),fa=Oi.prototype.$mount;Oi.prototype.$mount=function(t,e){if((t=t&&nn(t))===document.body||t===document.documentElement)return this;var i=this.$options;if(!i.render){var n=i.template;if(n)if("string"==typeof n)"#"===n.charAt(0)&&(n=da(n));else{if(!n.nodeType)return this;n=n.innerHTML}else t&&(n=function(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}(t));if(n){0;var o=ca(n,{outputSourceRange:!1,shouldDecodeNewlines:ha,shouldDecodeNewlinesForHref:pa,delimiters:i.delimiters,comments:i.comments},this),r=o.render,s=o.staticRenderFns;i.render=r,i.staticRenderFns=s}}return fa.call(this,t,e)},Oi.compile=ca,e.default=Oi}.call(e,i("DuR2"))},"77Pl":function(t,e,i){var n=i("EqjI");t.exports=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t}},"7GwW":function(t,e,i){"use strict";var n=i("cGG2"),o=i("21It"),r=i("p1b6"),s=i("DQCr"),a=i("Oi+a"),l=i("oJlt"),c=i("GHBc"),u=i("FtD3");t.exports=function(t){return new Promise(function(e,i){var h=t.data,p=t.headers;n.isFormData(h)&&delete p["Content-Type"];var d=new XMLHttpRequest;if(t.auth){var f=t.auth.username||"",g=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";p.Authorization="Basic "+btoa(f+":"+g)}var _=a(t.baseURL,t.url);if(d.open(t.method.toUpperCase(),s(_,t.params,t.paramsSerializer),!0),d.timeout=t.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in d?l(d.getAllResponseHeaders()):null,r={data:t.responseType&&"text"!==t.responseType?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:n,config:t,request:d};o(e,i,r),d=null}},d.onabort=function(){d&&(i(u("Request aborted",t,"ECONNABORTED",d)),d=null)},d.onerror=function(){i(u("Network Error",t,null,d)),d=null},d.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),i(u(e,t,"ECONNABORTED",d)),d=null},n.isStandardBrowserEnv()){var m=(t.withCredentials||c(_))&&t.xsrfCookieName?r.read(t.xsrfCookieName):void 0;m&&(p[t.xsrfHeaderName]=m)}if("setRequestHeader"in d&&n.forEach(p,function(t,e){void 0===h&&"content-type"===e.toLowerCase()?delete p[e]:d.setRequestHeader(e,t)}),n.isUndefined(t.withCredentials)||(d.withCredentials=!!t.withCredentials),t.responseType)try{d.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&d.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){d&&(d.abort(),i(t),d=null)}),h||(h=null),d.send(h)})}},"7J9s":function(t,e,i){"use strict";e.__esModule=!0,e.PopupManager=void 0;var n=l(i("7+uW")),o=l(i("jmaC")),r=l(i("OAzY")),s=l(i("6Twh")),a=i("2kvA");function l(t){return t&&t.__esModule?t:{default:t}}var c=1,u=void 0;e.default={props:{visible:{type:Boolean,default:!1},openDelay:{},closeDelay:{},zIndex:{},modal:{type:Boolean,default:!1},modalFade:{type:Boolean,default:!0},modalClass:{},modalAppendToBody:{type:Boolean,default:!1},lockScroll:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!1},closeOnClickModal:{type:Boolean,default:!1}},beforeMount:function(){this._popupId="popup-"+c++,r.default.register(this._popupId,this)},beforeDestroy:function(){r.default.deregister(this._popupId),r.default.closeModal(this._popupId),this.restoreBodyStyle()},data:function(){return{opened:!1,bodyPaddingRight:null,computedBodyPaddingRight:0,withoutHiddenClass:!0,rendered:!1}},watch:{visible:function(t){var e=this;if(t){if(this._opening)return;this.rendered?this.open():(this.rendered=!0,n.default.nextTick(function(){e.open()}))}else this.close()}},methods:{open:function(t){var e=this;this.rendered||(this.rendered=!0);var i=(0,o.default)({},this.$props||this,t);this._closeTimer&&(clearTimeout(this._closeTimer),this._closeTimer=null),clearTimeout(this._openTimer);var n=Number(i.openDelay);n>0?this._openTimer=setTimeout(function(){e._openTimer=null,e.doOpen(i)},n):this.doOpen(i)},doOpen:function(t){if(!this.$isServer&&(!this.willOpen||this.willOpen())&&!this.opened){this._opening=!0;var e=this.$el,i=t.modal,n=t.zIndex;if(n&&(r.default.zIndex=n),i&&(this._closing&&(r.default.closeModal(this._popupId),this._closing=!1),r.default.openModal(this._popupId,r.default.nextZIndex(),this.modalAppendToBody?void 0:e,t.modalClass,t.modalFade),t.lockScroll)){this.withoutHiddenClass=!(0,a.hasClass)(document.body,"el-popup-parent--hidden"),this.withoutHiddenClass&&(this.bodyPaddingRight=document.body.style.paddingRight,this.computedBodyPaddingRight=parseInt((0,a.getStyle)(document.body,"paddingRight"),10)),u=(0,s.default)();var o=document.documentElement.clientHeight<document.body.scrollHeight,l=(0,a.getStyle)(document.body,"overflowY");u>0&&(o||"scroll"===l)&&this.withoutHiddenClass&&(document.body.style.paddingRight=this.computedBodyPaddingRight+u+"px"),(0,a.addClass)(document.body,"el-popup-parent--hidden")}"static"===getComputedStyle(e).position&&(e.style.position="absolute"),e.style.zIndex=r.default.nextZIndex(),this.opened=!0,this.onOpen&&this.onOpen(),this.doAfterOpen()}},doAfterOpen:function(){this._opening=!1},close:function(){var t=this;if(!this.willClose||this.willClose()){null!==this._openTimer&&(clearTimeout(this._openTimer),this._openTimer=null),clearTimeout(this._closeTimer);var e=Number(this.closeDelay);e>0?this._closeTimer=setTimeout(function(){t._closeTimer=null,t.doClose()},e):this.doClose()}},doClose:function(){this._closing=!0,this.onClose&&this.onClose(),this.lockScroll&&setTimeout(this.restoreBodyStyle,200),this.opened=!1,this.doAfterClose()},doAfterClose:function(){r.default.closeModal(this._popupId),this._closing=!1},restoreBodyStyle:function(){this.modal&&this.withoutHiddenClass&&(document.body.style.paddingRight=this.bodyPaddingRight,(0,a.removeClass)(document.body,"el-popup-parent--hidden")),this.withoutHiddenClass=!0}}},e.PopupManager=r.default},"7KvD":function(t,e){var i=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},"7UMu":function(t,e,i){var n=i("R9M2");t.exports=Array.isArray||function(t){return"Array"==n(t)}},"82Mu":function(t,e,i){var n=i("7KvD"),o=i("L42u").set,r=n.MutationObserver||n.WebKitMutationObserver,s=n.process,a=n.Promise,l="process"==i("R9M2")(s);t.exports=function(){var t,e,i,c=function(){var n,o;for(l&&(n=s.domain)&&n.exit();t;){o=t.fn,t=t.next;try{o()}catch(n){throw t?i():e=void 0,n}}e=void 0,n&&n.enter()};if(l)i=function(){s.nextTick(c)};else if(!r||n.navigator&&n.navigator.standalone)if(a&&a.resolve){var u=a.resolve(void 0);i=function(){u.then(c)}}else i=function(){o.call(n,c)};else{var h=!0,p=document.createTextNode("");new r(c).observe(p,{characterData:!0}),i=function(){p.data=h=!h}}return function(n){var o={fn:n,next:void 0};e&&(e.next=o),t||(t=o,i()),e=o}}},"835U":function(t,e,i){"use strict";e.__esModule=!0,e.isDefined=e.isUndefined=e.isFunction=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.isString=function(t){return"[object String]"===Object.prototype.toString.call(t)},e.isObject=function(t){return"[object Object]"===Object.prototype.toString.call(t)},e.isHtmlElement=function(t){return t&&t.nodeType===Node.ELEMENT_NODE};var o,r=i("7+uW"),s=(o=r)&&o.__esModule?o:{default:o};var a=function(t){return t&&"[object Function]"==={}.toString.call(t)};"function"==typeof/./||"object"===("undefined"==typeof Int8Array?"undefined":n(Int8Array))||!s.default.prototype.$isServer&&"function"==typeof document.childNodes||(e.isFunction=a=function(t){return"function"==typeof t||!1}),e.isFunction=a;e.isUndefined=function(t){return void 0===t},e.isDefined=function(t){return void 0!==t&&null!==t}},"880/":function(t,e,i){t.exports=i("hJx8")},"94VQ":function(t,e,i){"use strict";var n=i("Yobk"),o=i("X8DO"),r=i("e6n0"),s={};i("hJx8")(s,i("dSzd")("iterator"),function(){return this}),t.exports=function(t,e,i){t.prototype=n(s,{next:o(1,i)}),r(t,e+" Iterator")}},AMCD:function(t,e,i){"use strict";e.__esModule=!0,e.validateRangeInOneMonth=e.extractTimeFormat=e.extractDateFormat=e.nextYear=e.prevYear=e.nextMonth=e.prevMonth=e.changeYearMonthAndClampDate=e.timeWithinRange=e.limitTimeRange=e.clearMilliseconds=e.clearTime=e.modifyWithTimeString=e.modifyTime=e.modifyDate=e.range=e.getRangeMinutes=e.getMonthDays=e.getPrevMonthLastDays=e.getRangeHours=e.getWeekNumber=e.getStartDateOfMonth=e.nextDate=e.prevDate=e.getFirstDayOfMonth=e.getDayCountOfYear=e.getDayCountOfMonth=e.parseDate=e.formatDate=e.isDateObject=e.isDate=e.toDate=e.getI18nSettings=void 0;var n,o=i("eNfa"),r=(n=o)&&n.__esModule?n:{default:n},s=i("urW8");var a=["sun","mon","tue","wed","thu","fri","sat"],l=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],c=e.getI18nSettings=function(){return{dayNamesShort:a.map(function(t){return(0,s.t)("el.datepicker.weeks."+t)}),dayNames:a.map(function(t){return(0,s.t)("el.datepicker.weeks."+t)}),monthNamesShort:l.map(function(t){return(0,s.t)("el.datepicker.months."+t)}),monthNames:l.map(function(t,e){return(0,s.t)("el.datepicker.month"+(e+1))}),amPm:["am","pm"]}},u=e.toDate=function(t){return h(t)?new Date(t):null},h=e.isDate=function(t){return null!==t&&void 0!==t&&(!isNaN(new Date(t).getTime())&&!Array.isArray(t))},p=(e.isDateObject=function(t){return t instanceof Date},e.formatDate=function(t,e){return(t=u(t))?r.default.format(t,e||"yyyy-MM-dd",c()):""},e.parseDate=function(t,e){return r.default.parse(t,e||"yyyy-MM-dd",c())}),d=e.getDayCountOfMonth=function(t,e){return 3===e||5===e||8===e||10===e?30:1===e?t%4==0&&t%100!=0||t%400==0?29:28:31},f=(e.getDayCountOfYear=function(t){return t%400==0||t%100!=0&&t%4==0?366:365},e.getFirstDayOfMonth=function(t){var e=new Date(t.getTime());return e.setDate(1),e.getDay()},e.prevDate=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return new Date(t.getFullYear(),t.getMonth(),t.getDate()-e)});e.nextDate=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return new Date(t.getFullYear(),t.getMonth(),t.getDate()+e)},e.getStartDateOfMonth=function(t,e){var i=new Date(t,e,1),n=i.getDay();return f(i,0===n?7:n)},e.getWeekNumber=function(t){if(!h(t))return null;var e=new Date(t.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var i=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-i.getTime())/864e5-3+(i.getDay()+6)%7)/7)},e.getRangeHours=function(t){var e=[],i=[];if((t||[]).forEach(function(t){var e=t.map(function(t){return t.getHours()});i=i.concat(function(t,e){for(var i=[],n=t;n<=e;n++)i.push(n);return i}(e[0],e[1]))}),i.length)for(var n=0;n<24;n++)e[n]=-1===i.indexOf(n);else for(var o=0;o<24;o++)e[o]=!1;return e},e.getPrevMonthLastDays=function(t,e){if(e<=0)return[];var i=new Date(t.getTime());i.setDate(0);var n=i.getDate();return _(e).map(function(t,i){return n-(e-i-1)})},e.getMonthDays=function(t){var e=new Date(t.getFullYear(),t.getMonth()+1,0).getDate();return _(e).map(function(t,e){return e+1})};function g(t,e,i,n){for(var o=e;o<i;o++)t[o]=n}e.getRangeMinutes=function(t,e){var i=new Array(60);return t.length>0?t.forEach(function(t){var n=t[0],o=t[1],r=n.getHours(),s=n.getMinutes(),a=o.getHours(),l=o.getMinutes();r===e&&a!==e?g(i,s,60,!0):r===e&&a===e?g(i,s,l+1,!0):r!==e&&a===e?g(i,0,l+1,!0):r<e&&a>e&&g(i,0,60,!0)}):g(i,0,60,!0),i};var _=e.range=function(t){return Array.apply(null,{length:t}).map(function(t,e){return e})},m=e.modifyDate=function(t,e,i,n){return new Date(e,i,n,t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())},v=e.modifyTime=function(t,e,i,n){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),e,i,n,t.getMilliseconds())},y=(e.modifyWithTimeString=function(t,e){return null!=t&&e?(e=p(e,"HH:mm:ss"),v(t,e.getHours(),e.getMinutes(),e.getSeconds())):t},e.clearTime=function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate())},e.clearMilliseconds=function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),0)},e.limitTimeRange=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"HH:mm:ss";if(0===e.length)return t;var n=function(t){return r.default.parse(r.default.format(t,i),i)},o=n(t),s=e.map(function(t){return t.map(n)});if(s.some(function(t){return o>=t[0]&&o<=t[1]}))return t;var a=s[0][0],l=s[0][0];return s.forEach(function(t){a=new Date(Math.min(t[0],a)),l=new Date(Math.max(t[1],a))}),m(o<a?a:l,t.getFullYear(),t.getMonth(),t.getDate())}),b=(e.timeWithinRange=function(t,e,i){return y(t,e,i).getTime()===t.getTime()},e.changeYearMonthAndClampDate=function(t,e,i){var n=Math.min(t.getDate(),d(e,i));return m(t,e,i,n)});e.prevMonth=function(t){var e=t.getFullYear(),i=t.getMonth();return 0===i?b(t,e-1,11):b(t,e,i-1)},e.nextMonth=function(t){var e=t.getFullYear(),i=t.getMonth();return 11===i?b(t,e+1,0):b(t,e,i+1)},e.prevYear=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=t.getFullYear(),n=t.getMonth();return b(t,i-e,n)},e.nextYear=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=t.getFullYear(),n=t.getMonth();return b(t,i+e,n)},e.extractDateFormat=function(t){return t.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim()},e.extractTimeFormat=function(t){return t.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?y{2,4}/g,"").trim()},e.validateRangeInOneMonth=function(t,e){return t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()}},BO1k:function(t,e,i){t.exports={default:i("fxRn"),__esModule:!0}},BwfY:function(t,e,i){i("fWfb"),i("M6a0"),i("OYls"),i("QWe/"),t.exports=i("FeBl").Symbol},CXw9:function(t,e,i){"use strict";var n,o,r,s,a=i("O4g8"),l=i("7KvD"),c=i("+ZMJ"),u=i("RY/4"),h=i("kM2E"),p=i("EqjI"),d=i("lOnJ"),f=i("2KxR"),g=i("NWt+"),_=i("t8x9"),m=i("L42u").set,v=i("82Mu")(),y=i("qARP"),b=i("dNDb"),T=i("iUbK"),E=i("fJUb"),C=l.TypeError,S=l.process,k=S&&S.versions,O=k&&k.v8||"",I=l.Promise,w="process"==u(S),R=function(){},D=o=y.f,x=!!function(){try{var t=I.resolve(1),e=(t.constructor={})[i("dSzd")("species")]=function(t){t(R,R)};return(w||"function"==typeof PromiseRejectionEvent)&&t.then(R)instanceof e&&0!==O.indexOf("6.6")&&-1===T.indexOf("Chrome/66")}catch(t){}}(),M=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},A=function(t,e){if(!t._n){t._n=!0;var i=t._c;v(function(){for(var n=t._v,o=1==t._s,r=0,s=function(e){var i,r,s,a=o?e.ok:e.fail,l=e.resolve,c=e.reject,u=e.domain;try{a?(o||(2==t._h&&P(t),t._h=1),!0===a?i=n:(u&&u.enter(),i=a(n),u&&(u.exit(),s=!0)),i===e.promise?c(C("Promise-chain cycle")):(r=M(i))?r.call(i,l,c):l(i)):c(n)}catch(t){u&&!s&&u.exit(),c(t)}};i.length>r;)s(i[r++]);t._c=[],t._n=!1,e&&!t._h&&N(t)})}},N=function(t){m.call(l,function(){var e,i,n,o=t._v,r=L(t);if(r&&(e=b(function(){w?S.emit("unhandledRejection",o,t):(i=l.onunhandledrejection)?i({promise:t,reason:o}):(n=l.console)&&n.error&&n.error("Unhandled promise rejection",o)}),t._h=w||L(t)?2:1),t._a=void 0,r&&e.e)throw e.v})},L=function(t){return 1!==t._h&&0===(t._a||t._c).length},P=function(t){m.call(l,function(){var e;w?S.emit("rejectionHandled",t):(e=l.onrejectionhandled)&&e({promise:t,reason:t._v})})},B=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),A(e,!0))},F=function(t){var e,i=this;if(!i._d){i._d=!0,i=i._w||i;try{if(i===t)throw C("Promise can't be resolved itself");(e=M(t))?v(function(){var n={_w:i,_d:!1};try{e.call(t,c(F,n,1),c(B,n,1))}catch(t){B.call(n,t)}}):(i._v=t,i._s=1,A(i,!1))}catch(t){B.call({_w:i,_d:!1},t)}}};x||(I=function(t){f(this,I,"Promise","_h"),d(t),n.call(this);try{t(c(F,this,1),c(B,this,1))}catch(t){B.call(this,t)}},(n=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=i("xH/j")(I.prototype,{then:function(t,e){var i=D(_(this,I));return i.ok="function"!=typeof t||t,i.fail="function"==typeof e&&e,i.domain=w?S.domain:void 0,this._c.push(i),this._a&&this._a.push(i),this._s&&A(this,!1),i.promise},catch:function(t){return this.then(void 0,t)}}),r=function(){var t=new n;this.promise=t,this.resolve=c(F,t,1),this.reject=c(B,t,1)},y.f=D=function(t){return t===I||t===s?new r(t):o(t)}),h(h.G+h.W+h.F*!x,{Promise:I}),i("e6n0")(I,"Promise"),i("bRrM")("Promise"),s=i("FeBl").Promise,h(h.S+h.F*!x,"Promise",{reject:function(t){var e=D(this);return(0,e.reject)(t),e.promise}}),h(h.S+h.F*(a||!x),"Promise",{resolve:function(t){return E(a&&this===s?I:this,t)}}),h(h.S+h.F*!(x&&i("dY0y")(function(t){I.all(t).catch(R)})),"Promise",{all:function(t){var e=this,i=D(e),n=i.resolve,o=i.reject,r=b(function(){var i=[],r=0,s=1;g(t,!1,function(t){var a=r++,l=!1;i.push(void 0),s++,e.resolve(t).then(function(t){l||(l=!0,i[a]=t,--s||n(i))},o)}),--s||n(i)});return r.e&&o(r.v),i.promise},race:function(t){var e=this,i=D(e),n=i.reject,o=b(function(){g(t,!1,function(t){e.resolve(t).then(i.resolve,n)})});return o.e&&n(o.v),i.promise}})},Cdx3:function(t,e,i){var n=i("sB3e"),o=i("lktj");i("uqUo")("keys",function(){return function(t){return o(n(t))}})},Cr6W:function(t,e,i){var n,o,r,s;s=function(t,e){
/**
 * @license
 * Copyright 2020 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */
"use strict";return t.JavaScript=e,e},o=[i("xnUL"),i("JMbB")],void 0===(r="function"==typeof(n=s)?n.apply(e,o):n)||(t.exports=r)},CwSZ:function(t,e,i){"use strict";var n=i("p8xL"),o=i("XgCd"),r=Object.prototype.hasOwnProperty,s={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},a=Array.isArray,l=Array.prototype.push,c=function(t,e){l.apply(t,a(e)?e:[e])},u=Date.prototype.toISOString,h={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,formatter:o.formatters[o.default],indices:!1,serializeDate:function(t){return u.call(t)},skipNulls:!1,strictNullHandling:!1},p=function t(e,i,o,r,s,l,u,p,d,f,g,_,m){var v=e;if("function"==typeof u?v=u(i,v):v instanceof Date?v=f(v):"comma"===o&&a(v)&&(v=v.join(",")),null===v){if(r)return l&&!_?l(i,h.encoder,m):i;v=""}if("string"==typeof v||"number"==typeof v||"boolean"==typeof v||n.isBuffer(v))return l?[g(_?i:l(i,h.encoder,m))+"="+g(l(v,h.encoder,m))]:[g(i)+"="+g(String(v))];var y,b=[];if(void 0===v)return b;if(a(u))y=u;else{var T=Object.keys(v);y=p?T.sort(p):T}for(var E=0;E<y.length;++E){var C=y[E];s&&null===v[C]||(a(v)?c(b,t(v[C],"function"==typeof o?o(i,C):i,o,r,s,l,u,p,d,f,g,_,m)):c(b,t(v[C],i+(d?"."+C:"["+C+"]"),o,r,s,l,u,p,d,f,g,_,m)))}return b};t.exports=function(t,e){var i,n=t,l=function(t){if(!t)return h;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||h.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var i=o.default;if(void 0!==t.format){if(!r.call(o.formatters,t.format))throw new TypeError("Unknown format option provided.");i=t.format}var n=o.formatters[i],s=h.filter;return("function"==typeof t.filter||a(t.filter))&&(s=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:h.addQueryPrefix,allowDots:void 0===t.allowDots?h.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:h.charsetSentinel,delimiter:void 0===t.delimiter?h.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:h.encode,encoder:"function"==typeof t.encoder?t.encoder:h.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:h.encodeValuesOnly,filter:s,formatter:n,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:h.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:h.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:h.strictNullHandling}}(e);"function"==typeof l.filter?n=(0,l.filter)("",n):a(l.filter)&&(i=l.filter);var u,d=[];if("object"!=typeof n||null===n)return"";u=e&&e.arrayFormat in s?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var f=s[u];i||(i=Object.keys(n)),l.sort&&i.sort(l.sort);for(var g=0;g<i.length;++g){var _=i[g];l.skipNulls&&null===n[_]||c(d,p(n[_],_,f,l.strictNullHandling,l.skipNulls,l.encode?l.encoder:null,l.filter,l.sort,l.allowDots,l.serializeDate,l.formatter,l.encodeValuesOnly,l.charset))}var m=d.join(l.delimiter),v=!0===l.addQueryPrefix?"?":"";return l.charsetSentinel&&("iso-8859-1"===l.charset?v+="utf8=%26%2310003%3B&":v+="utf8=%E2%9C%93&"),m.length>0?v+m:""}},D2L2:function(t,e){var i={}.hasOwnProperty;t.exports=function(t,e){return i.call(t,e)}},DDCP:function(t,e,i){"use strict";var n=i("p8xL"),o=Object.prototype.hasOwnProperty,r={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(t){return t.replace(/&#(\d+);/g,function(t,e){return String.fromCharCode(parseInt(e,10))})},a=function(t,e,i){if(t){var n=i.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,r=/(\[[^[\]]*])/g,s=/(\[[^[\]]*])/.exec(n),a=s?n.slice(0,s.index):n,l=[];if(a){if(!i.plainObjects&&o.call(Object.prototype,a)&&!i.allowPrototypes)return;l.push(a)}for(var c=0;null!==(s=r.exec(n))&&c<i.depth;){if(c+=1,!i.plainObjects&&o.call(Object.prototype,s[1].slice(1,-1))&&!i.allowPrototypes)return;l.push(s[1])}return s&&l.push("["+n.slice(s.index)+"]"),function(t,e,i){for(var n=e,o=t.length-1;o>=0;--o){var r,s=t[o];if("[]"===s&&i.parseArrays)r=[].concat(n);else{r=i.plainObjects?Object.create(null):{};var a="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(a,10);i.parseArrays||""!==a?!isNaN(l)&&s!==a&&String(l)===a&&l>=0&&i.parseArrays&&l<=i.arrayLimit?(r=[])[l]=n:r[a]=n:r={0:n}}n=r}return n}(l,e,i)}};t.exports=function(t,e){var i=function(t){if(!t)return r;if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");var e=void 0===t.charset?r.charset:t.charset;return{allowDots:void 0===t.allowDots?r.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:r.allowPrototypes,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:r.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:r.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:r.comma,decoder:"function"==typeof t.decoder?t.decoder:r.decoder,delimiter:"string"==typeof t.delimiter||n.isRegExp(t.delimiter)?t.delimiter:r.delimiter,depth:"number"==typeof t.depth?t.depth:r.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:r.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:r.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:r.strictNullHandling}}(e);if(""===t||null===t||void 0===t)return i.plainObjects?Object.create(null):{};for(var l="string"==typeof t?function(t,e){var i,a={},l=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,c=e.parameterLimit===1/0?void 0:e.parameterLimit,u=l.split(e.delimiter,c),h=-1,p=e.charset;if(e.charsetSentinel)for(i=0;i<u.length;++i)0===u[i].indexOf("utf8=")&&("utf8=%E2%9C%93"===u[i]?p="utf-8":"utf8=%26%2310003%3B"===u[i]&&(p="iso-8859-1"),h=i,i=u.length);for(i=0;i<u.length;++i)if(i!==h){var d,f,g=u[i],_=g.indexOf("]="),m=-1===_?g.indexOf("="):_+1;-1===m?(d=e.decoder(g,r.decoder,p),f=e.strictNullHandling?null:""):(d=e.decoder(g.slice(0,m),r.decoder,p),f=e.decoder(g.slice(m+1),r.decoder,p)),f&&e.interpretNumericEntities&&"iso-8859-1"===p&&(f=s(f)),f&&e.comma&&f.indexOf(",")>-1&&(f=f.split(",")),o.call(a,d)?a[d]=n.combine(a[d],f):a[d]=f}return a}(t,i):t,c=i.plainObjects?Object.create(null):{},u=Object.keys(l),h=0;h<u.length;++h){var p=u[h],d=a(p,l[p],i);c=n.merge(c,d,i)}return n.compact(c)}},DQCr:function(t,e,i){"use strict";var n=i("cGG2");function o(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,i){if(!e)return t;var r;if(i)r=i(e);else if(n.isURLSearchParams(e))r=e.toString();else{var s=[];n.forEach(e,function(t,e){null!==t&&void 0!==t&&(n.isArray(t)?e+="[]":t=[t],n.forEach(t,function(t){n.isDate(t)?t=t.toISOString():n.isObject(t)&&(t=JSON.stringify(t)),s.push(o(e)+"="+o(t))}))}),r=s.join("&")}if(r){var a=t.indexOf("#");-1!==a&&(t=t.slice(0,a)),t+=(-1===t.indexOf("?")?"?":"&")+r}return t}},DQJY:function(t,e,i){"use strict";e.__esModule=!0;var n,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=i("hyEB"),s=(n=r)&&n.__esModule?n:{default:n};var a,l=l||{};l.Dialog=function(t,e,i){var n=this;if(this.dialogNode=t,null===this.dialogNode||"dialog"!==this.dialogNode.getAttribute("role"))throw new Error("Dialog() requires a DOM element with ARIA role of dialog.");"string"==typeof e?this.focusAfterClosed=document.getElementById(e):"object"===(void 0===e?"undefined":o(e))?this.focusAfterClosed=e:this.focusAfterClosed=null,"string"==typeof i?this.focusFirst=document.getElementById(i):"object"===(void 0===i?"undefined":o(i))?this.focusFirst=i:this.focusFirst=null,this.focusFirst?this.focusFirst.focus():s.default.focusFirstDescendant(this.dialogNode),this.lastFocus=document.activeElement,a=function(t){n.trapFocus(t)},this.addListeners()},l.Dialog.prototype.addListeners=function(){document.addEventListener("focus",a,!0)},l.Dialog.prototype.removeListeners=function(){document.removeEventListener("focus",a,!0)},l.Dialog.prototype.closeDialog=function(){var t=this;this.removeListeners(),this.focusAfterClosed&&setTimeout(function(){t.focusAfterClosed.focus()})},l.Dialog.prototype.trapFocus=function(t){s.default.IgnoreUtilFocusChanges||(this.dialogNode.contains(t.target)?this.lastFocus=t.target:(s.default.focusFirstDescendant(this.dialogNode),this.lastFocus===document.activeElement&&s.default.focusLastDescendant(this.dialogNode),this.lastFocus=document.activeElement))},e.default=l.Dialog},DUeU:function(t,e,i){"use strict";var n=i("cGG2");t.exports=function(t,e){e=e||{};var i={},o=["url","method","data"],r=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function l(t,e){return n.isPlainObject(t)&&n.isPlainObject(e)?n.merge(t,e):n.isPlainObject(e)?n.merge({},e):n.isArray(e)?e.slice():e}function c(o){n.isUndefined(e[o])?n.isUndefined(t[o])||(i[o]=l(void 0,t[o])):i[o]=l(t[o],e[o])}n.forEach(o,function(t){n.isUndefined(e[t])||(i[t]=l(void 0,e[t]))}),n.forEach(r,c),n.forEach(s,function(o){n.isUndefined(e[o])?n.isUndefined(t[o])||(i[o]=l(void 0,t[o])):i[o]=l(void 0,e[o])}),n.forEach(a,function(n){n in e?i[n]=l(t[n],e[n]):n in t&&(i[n]=l(void 0,t[n]))});var u=o.concat(r).concat(s).concat(a),h=Object.keys(t).concat(Object.keys(e)).filter(function(t){return-1===u.indexOf(t)});return n.forEach(h,c),i}},Dd8w:function(t,e,i){"use strict";e.__esModule=!0;var n,o=i("woOf"),r=(n=o)&&n.__esModule?n:{default:n};e.default=r.default||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}},DuR2:function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},"E/in":function(t,e,i){"use strict";e.__esModule=!0,e.isDef=function(t){return void 0!==t&&null!==t},e.isKorean=function(t){return/([(\uAC00-\uD7AF)|(\u3130-\u318F)])+/gi.test(t)}},EGZi:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},EKTV:function(t,e,i){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist/",i(i.s=119)}({0:function(t,e,i){"use strict";function n(t,e,i,n,o,r,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):o&&(l=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:t,options:c}}i.d(e,"a",function(){return n})},119:function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("label",{staticClass:"el-checkbox",class:[t.border&&t.checkboxSize?"el-checkbox--"+t.checkboxSize:"",{"is-disabled":t.isDisabled},{"is-bordered":t.border},{"is-checked":t.isChecked}],attrs:{id:t.id}},[i("span",{staticClass:"el-checkbox__input",class:{"is-disabled":t.isDisabled,"is-checked":t.isChecked,"is-indeterminate":t.indeterminate,"is-focus":t.focus},attrs:{tabindex:!!t.indeterminate&&0,role:!!t.indeterminate&&"checkbox","aria-checked":!!t.indeterminate&&"mixed"}},[i("span",{staticClass:"el-checkbox__inner"}),t.trueLabel||t.falseLabel?i("input",{directives:[{name:"model",rawName:"v-model",value:t.model,expression:"model"}],staticClass:"el-checkbox__original",attrs:{type:"checkbox","aria-hidden":t.indeterminate?"true":"false",name:t.name,disabled:t.isDisabled,"true-value":t.trueLabel,"false-value":t.falseLabel},domProps:{checked:Array.isArray(t.model)?t._i(t.model,null)>-1:t._q(t.model,t.trueLabel)},on:{change:[function(e){var i=t.model,n=e.target,o=n.checked?t.trueLabel:t.falseLabel;if(Array.isArray(i)){var r=t._i(i,null);n.checked?r<0&&(t.model=i.concat([null])):r>-1&&(t.model=i.slice(0,r).concat(i.slice(r+1)))}else t.model=o},t.handleChange],focus:function(e){t.focus=!0},blur:function(e){t.focus=!1}}}):i("input",{directives:[{name:"model",rawName:"v-model",value:t.model,expression:"model"}],staticClass:"el-checkbox__original",attrs:{type:"checkbox","aria-hidden":t.indeterminate?"true":"false",disabled:t.isDisabled,name:t.name},domProps:{value:t.label,checked:Array.isArray(t.model)?t._i(t.model,t.label)>-1:t.model},on:{change:[function(e){var i=t.model,n=e.target,o=!!n.checked;if(Array.isArray(i)){var r=t.label,s=t._i(i,r);n.checked?s<0&&(t.model=i.concat([r])):s>-1&&(t.model=i.slice(0,s).concat(i.slice(s+1)))}else t.model=o},t.handleChange],focus:function(e){t.focus=!0},blur:function(e){t.focus=!1}}})]),t.$slots.default||t.label?i("span",{staticClass:"el-checkbox__label"},[t._t("default"),t.$slots.default?t._e():[t._v(t._s(t.label))]],2):t._e()])};n._withStripped=!0;var o=i(4),r={name:"ElCheckbox",mixins:[i.n(o).a],inject:{elForm:{default:""},elFormItem:{default:""}},componentName:"ElCheckbox",data:function(){return{selfModel:!1,focus:!1,isLimitExceeded:!1}},computed:{model:{get:function(){return this.isGroup?this.store:void 0!==this.value?this.value:this.selfModel},set:function(t){this.isGroup?(this.isLimitExceeded=!1,void 0!==this._checkboxGroup.min&&t.length<this._checkboxGroup.min&&(this.isLimitExceeded=!0),void 0!==this._checkboxGroup.max&&t.length>this._checkboxGroup.max&&(this.isLimitExceeded=!0),!1===this.isLimitExceeded&&this.dispatch("ElCheckboxGroup","input",[t])):(this.$emit("input",t),this.selfModel=t)}},isChecked:function(){return"[object Boolean]"==={}.toString.call(this.model)?this.model:Array.isArray(this.model)?this.model.indexOf(this.label)>-1:null!==this.model&&void 0!==this.model?this.model===this.trueLabel:void 0},isGroup:function(){for(var t=this.$parent;t;){if("ElCheckboxGroup"===t.$options.componentName)return this._checkboxGroup=t,!0;t=t.$parent}return!1},store:function(){return this._checkboxGroup?this._checkboxGroup.value:this.value},isLimitDisabled:function(){var t=this._checkboxGroup,e=t.max,i=t.min;return!(!e&&!i)&&this.model.length>=e&&!this.isChecked||this.model.length<=i&&this.isChecked},isDisabled:function(){return this.isGroup?this._checkboxGroup.disabled||this.disabled||(this.elForm||{}).disabled||this.isLimitDisabled:this.disabled||(this.elForm||{}).disabled},_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},checkboxSize:function(){var t=this.size||this._elFormItemSize||(this.$ELEMENT||{}).size;return this.isGroup&&this._checkboxGroup.checkboxGroupSize||t}},props:{value:{},label:{},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:String,trueLabel:[String,Number],falseLabel:[String,Number],id:String,controls:String,border:Boolean,size:String},methods:{addToStore:function(){Array.isArray(this.model)&&-1===this.model.indexOf(this.label)?this.model.push(this.label):this.model=this.trueLabel||!0},handleChange:function(t){var e=this;if(!this.isLimitExceeded){var i=void 0;i=t.target.checked?void 0===this.trueLabel||this.trueLabel:void 0!==this.falseLabel&&this.falseLabel,this.$emit("change",i,t),this.$nextTick(function(){e.isGroup&&e.dispatch("ElCheckboxGroup","change",[e._checkboxGroup.value])})}}},created:function(){this.checked&&this.addToStore()},mounted:function(){this.indeterminate&&this.$el.setAttribute("aria-controls",this.controls)},watch:{value:function(t){this.dispatch("ElFormItem","el.form.change",t)}}},s=i(0),a=Object(s.a)(r,n,[],!1,null,null,null);a.options.__file="packages/checkbox/src/checkbox.vue";var l=a.exports;l.install=function(t){t.component(l.name,l)};e.default=l},4:function(t,e){t.exports=i("fPll")}})},EqBC:function(t,e,i){"use strict";var n=i("kM2E"),o=i("FeBl"),r=i("7KvD"),s=i("t8x9"),a=i("fJUb");n(n.P+n.R,"Promise",{finally:function(t){var e=s(this,o.Promise||r.Promise),i="function"==typeof t;return this.then(i?function(i){return a(e,t()).then(function(){return i})}:t,i?function(i){return a(e,t()).then(function(){throw i})}:t)}})},EqjI:function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},Ew4t:function(t,e,i){var n,o,r,s;s=function(t,e,i,n){
/**
 * @license
 * Copyright 2019 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */
"use strict";return t.setLocale(e),t.Blocks=t.Blocks||{},Object.keys(i).forEach(function(e){t.Blocks[e]=i[e]}),t.JavaScript=n,t},o=[i("xnUL"),i("yUki"),i("wTUY"),i("Cr6W")],void 0===(r="function"==typeof(n=s)?n.apply(e,o):n)||(t.exports=r)},FeBl:function(t,e){var i=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=i)},FtD3:function(t,e,i){"use strict";var n=i("t8qj");t.exports=function(t,e,i,o,r){var s=new Error(t);return n(s,e,i,o,r)}},GEkh:function(t,e,i){(function(i){var n,o,r;o=[],void 0===(r="function"==typeof(n=function(){"use strict";var t={connectionTypes:{INPUT_VALUE:1,OUTPUT_VALUE:2,NEXT_STATEMENT:3,PREVIOUS_STATEMENT:4},constants:{},LINE_MODE_MULTIPLIER:40,PAGE_MODE_MULTIPLIER:125,DRAG_RADIUS:5,FLYOUT_DRAG_RADIUS:10,SNAP_RADIUS:28};return t.CONNECTING_SNAP_RADIUS=t.SNAP_RADIUS,t.CURRENT_CONNECTION_PREFERENCE=8,t.BUMP_DELAY=250,t.BUMP_RANDOMNESS=10,t.COLLAPSE_CHARS=30,t.LONGPRESS=750,t.SOUND_LIMIT=100,t.DRAG_STACK=!0,t.HSV_SATURATION=.45,t.HSV_VALUE=.65,t.SPRITE={width:96,height:124,url:"sprites.png"},t.constants.ALIGN={LEFT:-1,CENTRE:0,RIGHT:1},t.DRAG_NONE=0,t.DRAG_STICKY=1,t.DRAG_BEGIN=1,t.DRAG_FREE=2,t.OPPOSITE_TYPE=[],t.OPPOSITE_TYPE[t.connectionTypes.INPUT_VALUE]=t.connectionTypes.OUTPUT_VALUE,t.OPPOSITE_TYPE[t.connectionTypes.OUTPUT_VALUE]=t.connectionTypes.INPUT_VALUE,t.OPPOSITE_TYPE[t.connectionTypes.NEXT_STATEMENT]=t.connectionTypes.PREVIOUS_STATEMENT,t.OPPOSITE_TYPE[t.connectionTypes.PREVIOUS_STATEMENT]=t.connectionTypes.NEXT_STATEMENT,t.VARIABLE_CATEGORY_NAME="VARIABLE",t.VARIABLE_DYNAMIC_CATEGORY_NAME="VARIABLE_DYNAMIC",t.PROCEDURE_CATEGORY_NAME="PROCEDURE",t.RENAME_VARIABLE_ID="RENAME_VARIABLE_ID",t.DELETE_VARIABLE_ID="DELETE_VARIABLE_ID",t.constants.COLLAPSED_INPUT_NAME="_TEMP_COLLAPSED_INPUT",t.constants.COLLAPSED_FIELD_NAME="_TEMP_COLLAPSED_FIELD",t.utils={},t.utils.global=function(){return"object"==typeof self?self:"object"==typeof window?window:"object"==typeof i?i:this}(),t.Msg={},t.utils.global.Blockly||(t.utils.global.Blockly={}),t.utils.global.Blockly.Msg||(t.utils.global.Blockly.Msg=t.Msg),t.utils.colour={},t.utils.colour.parse=function(e){e=String(e).toLowerCase().trim();var i=t.utils.colour.names[e];if(i)return i;if(i="#"==(i="0x"==e.substring(0,2)?"#"+e.substring(2):e)[0]?i:"#"+i,/^#[0-9a-f]{6}$/.test(i))return i;if(/^#[0-9a-f]{3}$/.test(i))return["#",i[1],i[1],i[2],i[2],i[3],i[3]].join("");var n=e.match(/^(?:rgb)?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/);return n&&(e=Number(n[1]),i=Number(n[2]),n=Number(n[3]),0<=e&&256>e&&0<=i&&256>i&&0<=n&&256>n)?t.utils.colour.rgbToHex(e,i,n):null},t.utils.colour.rgbToHex=function(t,e,i){return e=t<<16|e<<8|i,16>t?"#"+(16777216|e).toString(16).substr(1):"#"+e.toString(16)},t.utils.colour.hexToRgb=function(e){return(e=t.utils.colour.parse(e))?[(e=parseInt(e.substr(1),16))>>16,e>>8&255,255&e]:[0,0,0]},t.utils.colour.hsvToHex=function(e,i,n){var o=0,r=0,s=0;if(0==i)s=r=o=n;else{var a=Math.floor(e/60),l=e/60-a;e=n*(1-i);var c=n*(1-i*l);switch(i=n*(1-i*(1-l)),a){case 1:o=c,r=n,s=e;break;case 2:o=e,r=n,s=i;break;case 3:o=e,r=c,s=n;break;case 4:o=i,r=e,s=n;break;case 5:o=n,r=e,s=c;break;case 6:case 0:o=n,r=i,s=e}}return t.utils.colour.rgbToHex(Math.floor(o),Math.floor(r),Math.floor(s))},t.utils.colour.blend=function(e,i,n){return(e=t.utils.colour.parse(e))&&(i=t.utils.colour.parse(i))?(e=t.utils.colour.hexToRgb(e),i=t.utils.colour.hexToRgb(i),t.utils.colour.rgbToHex(Math.round(i[0]+n*(e[0]-i[0])),Math.round(i[1]+n*(e[1]-i[1])),Math.round(i[2]+n*(e[2]-i[2])))):null},t.utils.colour.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00"},t.utils.Coordinate=function(t,e){this.x=t,this.y=e},t.utils.Coordinate.equals=function(t,e){return t==e||!(!t||!e)&&(t.x==e.x&&t.y==e.y)},t.utils.Coordinate.distance=function(t,e){var i=t.x-e.x;return t=t.y-e.y,Math.sqrt(i*i+t*t)},t.utils.Coordinate.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.utils.Coordinate.difference=function(e,i){return new t.utils.Coordinate(e.x-i.x,e.y-i.y)},t.utils.Coordinate.sum=function(e,i){return new t.utils.Coordinate(e.x+i.x,e.y+i.y)},t.utils.Coordinate.prototype.clone=function(){return new t.utils.Coordinate(this.x,this.y)},t.utils.Coordinate.prototype.scale=function(t){return this.x*=t,this.y*=t,this},t.utils.Coordinate.prototype.translate=function(t,e){return this.x+=t,this.y+=e,this},t.utils.Rect=function(t,e,i,n){this.top=t,this.bottom=e,this.left=i,this.right=n},t.utils.Rect.prototype.contains=function(t,e){return t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom},t.utils.Rect.prototype.intersects=function(t){return!(this.left>t.right||this.right<t.left||this.top>t.bottom||this.bottom<t.top)},t.utils.string={},t.utils.string.startsWith=function(t,e){return 0==t.lastIndexOf(e,0)},t.utils.string.shortestStringLength=function(t){return t.length?t.reduce(function(t,e){return t.length<e.length?t:e}).length:0},t.utils.string.commonWordPrefix=function(e,i){if(!e.length)return 0;if(1==e.length)return e[0].length;var n=0;i=i||t.utils.string.shortestStringLength(e);for(var o=0;o<i;o++){for(var r=e[0][o],s=1;s<e.length;s++)if(r!=e[s][o])return n;" "==r&&(n=o+1)}for(s=1;s<e.length;s++)if((r=e[s][o])&&" "!=r)return n;return i},t.utils.string.commonWordSuffix=function(e,i){if(!e.length)return 0;if(1==e.length)return e[0].length;var n=0;i=i||t.utils.string.shortestStringLength(e);for(var o=0;o<i;o++){for(var r=e[0].substr(-o-1,1),s=1;s<e.length;s++)if(r!=e[s].substr(-o-1,1))return n;" "==r&&(n=o+1)}for(s=1;s<e.length;s++)if((r=e[s].charAt(e[s].length-o-1))&&" "!=r)return n;return i},t.utils.string.wrap=function(e,i){e=e.split("\n");for(var n=0;n<e.length;n++)e[n]=t.utils.string.wrapLine_(e[n],i);return e.join("\n")},t.utils.string.wrapLine_=function(e,i){if(e.length<=i)return e;for(var n=e.trim().split(/\s+/),o=0;o<n.length;o++)n[o].length>i&&(i=n[o].length);o=-1/0;var r=1;do{var s=o,a=e;e=[];var l=n.length/r,c=1;for(o=0;o<n.length-1;o++)c<(o+1.5)/l?(c++,e[o]=!0):e[o]=!1;e=t.utils.string.wrapMutate_(n,e,i),o=t.utils.string.wrapScore_(n,e,i),e=t.utils.string.wrapToText_(n,e),r++}while(o>s);return a},t.utils.string.wrapScore_=function(t,e,i){for(var n=[0],o=[],r=0;r<t.length;r++)n[n.length-1]+=t[r].length,!0===e[r]?(n.push(0),o.push(t[r].charAt(t[r].length-1))):!1===e[r]&&n[n.length-1]++;for(t=Math.max.apply(Math,n),r=e=0;r<n.length;r++)e-=2*Math.pow(Math.abs(i-n[r]),1.5),e-=Math.pow(t-n[r],1.5),-1!=".?!".indexOf(o[r])?e+=i/3:-1!=",;)]}".indexOf(o[r])&&(e+=i/4);return 1<n.length&&n[n.length-1]<=n[n.length-2]&&(e+=.5),e},t.utils.string.wrapMutate_=function(e,i,n){for(var o,r=t.utils.string.wrapScore_(e,i,n),s=0;s<i.length-1;s++)if(i[s]!=i[s+1]){var a=[].concat(i);a[s]=!a[s],a[s+1]=!a[s+1];var l=t.utils.string.wrapScore_(e,a,n);l>r&&(r=l,o=a)}return o?t.utils.string.wrapMutate_(e,o,n):i},t.utils.string.wrapToText_=function(t,e){for(var i=[],n=0;n<t.length;n++)i.push(t[n]),void 0!==e[n]&&i.push(e[n]?"\n":" ");return i.join("")},t.utils.Size=function(t,e){this.width=t,this.height=e},t.utils.Size.equals=function(t,e){return t==e||!(!t||!e)&&(t.width==e.width&&t.height==e.height)},t.utils.style={},t.utils.style.getSize=function(e){if("none"!=t.utils.style.getStyle_(e,"display"))return t.utils.style.getSizeWithDisplay_(e);var i=e.style,n=i.display,o=i.visibility,r=i.position;i.visibility="hidden",i.position="absolute",i.display="inline";var s=e.offsetWidth;return e=e.offsetHeight,i.display=n,i.position=r,i.visibility=o,new t.utils.Size(s,e)},t.utils.style.getSizeWithDisplay_=function(e){return new t.utils.Size(e.offsetWidth,e.offsetHeight)},t.utils.style.getStyle_=function(e,i){return t.utils.style.getComputedStyle(e,i)||t.utils.style.getCascadedStyle(e,i)||e.style&&e.style[i]},t.utils.style.getComputedStyle=function(t,e){return document.defaultView&&document.defaultView.getComputedStyle&&(t=document.defaultView.getComputedStyle(t,null))&&(t[e]||t.getPropertyValue(e))||""},t.utils.style.getCascadedStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:null},t.utils.style.getPageOffset=function(e){var i=new t.utils.Coordinate(0,0);e=e.getBoundingClientRect();var n=document.documentElement;return n=new t.utils.Coordinate(window.pageXOffset||n.scrollLeft,window.pageYOffset||n.scrollTop),i.x=e.left+n.x,i.y=e.top+n.y,i},t.utils.style.getViewportPageOffset=function(){var e=document.body,i=document.documentElement;return new t.utils.Coordinate(e.scrollLeft||i.scrollLeft,e.scrollTop||i.scrollTop)},t.utils.style.setElementShown=function(t,e){t.style.display=e?"":"none"},t.utils.style.isRightToLeft=function(e){return"rtl"==t.utils.style.getStyle_(e,"direction")},t.utils.style.getBorderBox=function(e){var i=t.utils.style.getComputedStyle(e,"borderLeftWidth"),n=t.utils.style.getComputedStyle(e,"borderRightWidth"),o=t.utils.style.getComputedStyle(e,"borderTopWidth");return e=t.utils.style.getComputedStyle(e,"borderBottomWidth"),{top:parseFloat(o),right:parseFloat(n),bottom:parseFloat(e),left:parseFloat(i)}},t.utils.style.scrollIntoContainerView=function(e,i,n){e=t.utils.style.getContainerOffsetToScrollInto(e,i,n),i.scrollLeft=e.x,i.scrollTop=e.y},t.utils.style.getContainerOffsetToScrollInto=function(e,i,n){var o=t.utils.style.getPageOffset(e),r=t.utils.style.getPageOffset(i),s=t.utils.style.getBorderBox(i),a=o.x-r.x-s.left;return o=o.y-r.y-s.top,r=t.utils.style.getSizeWithDisplay_(e),e=i.clientWidth-r.width,r=i.clientHeight-r.height,s=i.scrollLeft,i=i.scrollTop,n?(s+=a-e/2,i+=o-r/2):(s+=Math.min(a,Math.max(a-e,0)),i+=Math.min(o,Math.max(o-r,0))),new t.utils.Coordinate(s,i)},t.utils.userAgent={},function(e){function i(t){return-1!=n.indexOf(t.toUpperCase())}t.utils.userAgent.raw=e;var n=t.utils.userAgent.raw.toUpperCase();t.utils.userAgent.IE=i("Trident")||i("MSIE"),t.utils.userAgent.EDGE=i("Edge"),t.utils.userAgent.JAVA_FX=i("JavaFX"),t.utils.userAgent.CHROME=(i("Chrome")||i("CriOS"))&&!t.utils.userAgent.EDGE,t.utils.userAgent.WEBKIT=i("WebKit")&&!t.utils.userAgent.EDGE,t.utils.userAgent.GECKO=i("Gecko")&&!t.utils.userAgent.WEBKIT&&!t.utils.userAgent.IE&&!t.utils.userAgent.EDGE,t.utils.userAgent.ANDROID=i("Android"),e=t.utils.global.navigator&&t.utils.global.navigator.maxTouchPoints,t.utils.userAgent.IPAD=i("iPad")||i("Macintosh")&&0<e,t.utils.userAgent.IPOD=i("iPod"),t.utils.userAgent.IPHONE=i("iPhone")&&!t.utils.userAgent.IPAD&&!t.utils.userAgent.IPOD,t.utils.userAgent.MAC=i("Macintosh"),t.utils.userAgent.TABLET=t.utils.userAgent.IPAD||t.utils.userAgent.ANDROID&&!i("Mobile")||i("Silk"),t.utils.userAgent.MOBILE=!t.utils.userAgent.TABLET&&(t.utils.userAgent.IPOD||t.utils.userAgent.IPHONE||t.utils.userAgent.ANDROID||i("IEMobile"))}(t.utils.global.navigator&&t.utils.global.navigator.userAgent||""),t.utils.noEvent=function(t){t.preventDefault(),t.stopPropagation()},t.utils.isTargetInput=function(t){return"textarea"==t.target.type||"text"==t.target.type||"number"==t.target.type||"email"==t.target.type||"password"==t.target.type||"search"==t.target.type||"tel"==t.target.type||"url"==t.target.type||t.target.isContentEditable||t.target.dataset&&"true"==t.target.dataset.isTextInput},t.utils.getRelativeXY=function(e){var i=new t.utils.Coordinate(0,0),n=e.getAttribute("x");return n&&(i.x=parseInt(n,10)),(n=e.getAttribute("y"))&&(i.y=parseInt(n,10)),(n=(n=e.getAttribute("transform"))&&n.match(t.utils.getRelativeXY.XY_REGEX_))&&(i.x+=Number(n[1]),n[3]&&(i.y+=Number(n[3]))),(e=e.getAttribute("style"))&&-1<e.indexOf("translate")&&(e=e.match(t.utils.getRelativeXY.XY_STYLE_REGEX_))&&(i.x+=Number(e[1]),e[3]&&(i.y+=Number(e[3]))),i},t.utils.getInjectionDivXY_=function(e){for(var i=0,n=0;e;){var o=t.utils.getRelativeXY(e);if(i+=o.x,n+=o.y,-1!=(" "+(e.getAttribute("class")||"")+" ").indexOf(" injectionDiv "))break;e=e.parentNode}return new t.utils.Coordinate(i,n)},t.utils.getRelativeXY.XY_REGEX_=/translate\(\s*([-+\d.e]+)([ ,]\s*([-+\d.e]+)\s*)?/,t.utils.getRelativeXY.XY_STYLE_REGEX_=/transform:\s*translate(?:3d)?\(\s*([-+\d.e]+)\s*px([ ,]\s*([-+\d.e]+)\s*px)?/,t.utils.isRightButton=function(e){return!(!e.ctrlKey||!t.utils.userAgent.MAC)||2==e.button},t.utils.mouseToSvg=function(t,e,i){var n=e.createSVGPoint();return n.x=t.clientX,n.y=t.clientY,i||(i=e.getScreenCTM().inverse()),n.matrixTransform(i)},t.utils.getScrollDeltaPixels=function(e){switch(e.deltaMode){default:return{x:e.deltaX,y:e.deltaY};case 1:return{x:e.deltaX*t.LINE_MODE_MULTIPLIER,y:e.deltaY*t.LINE_MODE_MULTIPLIER};case 2:return{x:e.deltaX*t.PAGE_MODE_MULTIPLIER,y:e.deltaY*t.PAGE_MODE_MULTIPLIER}}},t.utils.tokenizeInterpolation=function(e){return t.utils.tokenizeInterpolation_(e,!0)},t.utils.replaceMessageReferences=function(e){return"string"!=typeof e?e:(e=t.utils.tokenizeInterpolation_(e,!1)).length?String(e[0]):""},t.utils.checkMessageReferences=function(e){for(var i=!0,n=t.Msg,o=e.match(/%{BKY_[A-Z]\w*}/gi),r=0;r<o.length;r++){void 0==n[o[r].toUpperCase().slice(6,-1)]&&(console.warn("No message string for "+o[r]+" in "+e),i=!1)}return i},t.utils.tokenizeInterpolation_=function(e,i){var n=[],o=e.split("");o.push("");var r=0;e=[];for(var s=null,a=0;a<o.length;a++){var l=o[a];0==r?"%"==l?((l=e.join(""))&&n.push(l),e.length=0,r=1):e.push(l):1==r?"%"==l?(e.push(l),r=0):i&&"0"<=l&&"9">=l?(r=2,s=l,(l=e.join(""))&&n.push(l),e.length=0):"{"==l?r=3:(e.push("%",l),r=0):2==r?"0"<=l&&"9">=l?s+=l:(n.push(parseInt(s,10)),a--,r=0):3==r&&(""==l?(e.splice(0,0,"%{"),a--,r=0):"}"!=l?e.push(l):(r=e.join(""),/[A-Z]\w*/i.test(r)?(l=r.toUpperCase(),(l=t.utils.string.startsWith(l,"BKY_")?l.substring(4):null)&&l in t.Msg?"string"==typeof(r=t.Msg[l])?Array.prototype.push.apply(n,t.utils.tokenizeInterpolation_(r,i)):i?n.push(String(r)):n.push(r):n.push("%{"+r+"}")):n.push("%{"+r+"}"),r=e.length=0))}for((l=e.join(""))&&n.push(l),i=[],a=e.length=0;a<n.length;++a)"string"==typeof n[a]?e.push(n[a]):((l=e.join(""))&&i.push(l),e.length=0,i.push(n[a]));return(l=e.join(""))&&i.push(l),e.length=0,i},t.utils.genUid=function(){for(var e=t.utils.genUid.soup_.length,i=[],n=0;20>n;n++)i[n]=t.utils.genUid.soup_.charAt(Math.random()*e);return i.join("")},t.utils.genUid.soup_="!#$%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t.utils.is3dSupported=function(){if(void 0!==t.utils.is3dSupported.cached_)return t.utils.is3dSupported.cached_;if(!t.utils.global.getComputedStyle)return!1;var e=document.createElement("p"),i="none",n={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};for(var o in document.body.insertBefore(e,null),n)if(void 0!==e.style[o]){if(e.style[o]="translate3d(1px,1px,1px)",!(i=t.utils.global.getComputedStyle(e)))return document.body.removeChild(e),!1;i=i.getPropertyValue(n[o])}return document.body.removeChild(e),t.utils.is3dSupported.cached_="none"!==i,t.utils.is3dSupported.cached_},t.utils.runAfterPageLoad=function(t){if("object"!=typeof document)throw Error("Blockly.utils.runAfterPageLoad() requires browser document.");if("complete"==document.readyState)t();else var e=setInterval(function(){"complete"==document.readyState&&(clearInterval(e),t())},10)},t.utils.getViewportBBox=function(){var e=t.utils.style.getViewportPageOffset();return new t.utils.Rect(e.y,document.documentElement.clientHeight+e.y,e.x,document.documentElement.clientWidth+e.x)},t.utils.arrayRemove=function(t,e){return-1!=(e=t.indexOf(e))&&(t.splice(e,1),!0)},t.utils.getDocumentScroll=function(){var e=document.documentElement,i=window;return t.utils.userAgent.IE&&i.pageYOffset!=e.scrollTop?new t.utils.Coordinate(e.scrollLeft,e.scrollTop):new t.utils.Coordinate(i.pageXOffset||e.scrollLeft,i.pageYOffset||e.scrollTop)},t.utils.getBlockTypeCounts=function(t,e){var i=Object.create(null),n=t.getDescendants(!0);for(e&&(t=t.getNextBlock())&&(t=n.indexOf(t),n.splice(t,n.length-t)),t=0;e=n[t];t++)i[e.type]?i[e.type]++:i[e.type]=1;return i},t.utils.screenToWsCoordinates=function(e,i){var n=i.x;i=i.y;var o=e.getInjectionDiv().getBoundingClientRect();return n=new t.utils.Coordinate(n-o.left,i-o.top),i=e.getOriginOffsetInPixels(),t.utils.Coordinate.difference(n,i).scale(1/e.scale)},t.utils.parseBlockColour=function(e){var i="string"==typeof e?t.utils.replaceMessageReferences(e):e,n=Number(i);if(!isNaN(n)&&0<=n&&360>=n)return{hue:n,hex:t.utils.colour.hsvToHex(n,t.HSV_SATURATION,255*t.HSV_VALUE)};if(n=t.utils.colour.parse(i))return{hue:null,hex:n};throw n='Invalid colour: "'+i+'"',e!=i&&(n+=' (from "'+e+'")'),Error(n)},t.Touch={},t.Touch.TOUCH_ENABLED="ontouchstart"in t.utils.global||!!(t.utils.global.document&&document.documentElement&&"ontouchstart"in document.documentElement)||!(!t.utils.global.navigator||!t.utils.global.navigator.maxTouchPoints&&!t.utils.global.navigator.msMaxTouchPoints),t.Touch.touchIdentifier_=null,t.Touch.TOUCH_MAP={},t.utils.global.PointerEvent?t.Touch.TOUCH_MAP={mousedown:["pointerdown"],mouseenter:["pointerenter"],mouseleave:["pointerleave"],mousemove:["pointermove"],mouseout:["pointerout"],mouseover:["pointerover"],mouseup:["pointerup","pointercancel"],touchend:["pointerup"],touchcancel:["pointercancel"]}:t.Touch.TOUCH_ENABLED&&(t.Touch.TOUCH_MAP={mousedown:["touchstart"],mousemove:["touchmove"],mouseup:["touchend","touchcancel"]}),t.longPid_=0,t.longStart=function(e,i){t.longStop_(),e.changedTouches&&1!=e.changedTouches.length||(t.longPid_=setTimeout(function(){e.changedTouches&&(e.button=2,e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY),i&&i.handleRightClick(e)},t.LONGPRESS))},t.longStop_=function(){t.longPid_&&(clearTimeout(t.longPid_),t.longPid_=0)},t.Touch.clearTouchIdentifier=function(){t.Touch.touchIdentifier_=null},t.Touch.shouldHandleEvent=function(e){return!t.Touch.isMouseOrTouchEvent(e)||t.Touch.checkTouchIdentifier(e)},t.Touch.getTouchIdentifierFromEvent=function(t){return void 0!=t.pointerId?t.pointerId:t.changedTouches&&t.changedTouches[0]&&void 0!==t.changedTouches[0].identifier&&null!==t.changedTouches[0].identifier?t.changedTouches[0].identifier:"mouse"},t.Touch.checkTouchIdentifier=function(e){var i=t.Touch.getTouchIdentifierFromEvent(e);return void 0!==t.Touch.touchIdentifier_&&null!==t.Touch.touchIdentifier_?t.Touch.touchIdentifier_==i:("mousedown"==e.type||"touchstart"==e.type||"pointerdown"==e.type)&&(t.Touch.touchIdentifier_=i,!0)},t.Touch.setClientFromTouch=function(e){if(t.utils.string.startsWith(e.type,"touch")){var i=e.changedTouches[0];e.clientX=i.clientX,e.clientY=i.clientY}},t.Touch.isMouseOrTouchEvent=function(e){return t.utils.string.startsWith(e.type,"touch")||t.utils.string.startsWith(e.type,"mouse")||t.utils.string.startsWith(e.type,"pointer")},t.Touch.isTouchEvent=function(e){return t.utils.string.startsWith(e.type,"touch")||t.utils.string.startsWith(e.type,"pointer")},t.Touch.splitEventByTouches=function(t){var e=[];if(t.changedTouches)for(var i=0;i<t.changedTouches.length;i++)e[i]={type:t.type,changedTouches:[t.changedTouches[i]],target:t.target,stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()}};else e.push(t);return e},t.browserEvents={},t.browserEvents.conditionalBind=function(e,i,n,o,r,s){var a=!1,l=function(e){var i=!r;e=t.Touch.splitEventByTouches(e);for(var s,l=0;s=e[l];l++)i&&!t.Touch.shouldHandleEvent(s)||(t.Touch.setClientFromTouch(s),n?o.call(n,s):o(s),a=!0)},c=[];if(t.utils.global.PointerEvent&&i in t.Touch.TOUCH_MAP)for(var u,h=0;u=t.Touch.TOUCH_MAP[i][h];h++)e.addEventListener(u,l,!1),c.push([e,u,l]);else if(e.addEventListener(i,l,!1),c.push([e,i,l]),i in t.Touch.TOUCH_MAP){var p=function(t){l(t),a&&!s&&t.preventDefault()};for(h=0;u=t.Touch.TOUCH_MAP[i][h];h++)e.addEventListener(u,p,!1),c.push([e,u,p])}return c},t.browserEvents.bind=function(e,i,n,o){var r=function(t){n?o.call(n,t):o(t)},s=[];if(t.utils.global.PointerEvent&&i in t.Touch.TOUCH_MAP)for(var a,l=0;a=t.Touch.TOUCH_MAP[i][l];l++)e.addEventListener(a,r,!1),s.push([e,a,r]);else if(e.addEventListener(i,r,!1),s.push([e,i,r]),i in t.Touch.TOUCH_MAP){var c=function(t){if(t.changedTouches&&1==t.changedTouches.length){var e=t.changedTouches[0];t.clientX=e.clientX,t.clientY=e.clientY}r(t),t.preventDefault()};for(l=0;a=t.Touch.TOUCH_MAP[i][l];l++)e.addEventListener(a,c,!1),s.push([e,a,c])}return s},t.browserEvents.unbind=function(t){for(;t.length;){var e=t.pop(),i=e[2];e[0].removeEventListener(e[1],i,!1)}return i},t.ComponentManager=function(){this.componentData_=Object.create(null),this.capabilityToComponentIds_=Object.create(null)},t.ComponentManager.prototype.addComponent=function(t,e){var i=t.component.id;if(!e&&this.componentData_[i])throw Error('Plugin "'+i+'" with capabilities "'+this.componentData_[i].capabilities+'" already added.');this.componentData_[i]=t,e=[];for(var n=0;n<t.capabilities.length;n++){var o=String(t.capabilities[n]).toLowerCase();e.push(o),void 0===this.capabilityToComponentIds_[o]?this.capabilityToComponentIds_[o]=[i]:this.capabilityToComponentIds_[o].push(i)}this.componentData_[i].capabilities=e},t.ComponentManager.prototype.removeComponent=function(t){var e=this.componentData_[t];if(e){for(var i=0;i<e.capabilities.length;i++){var n=String(e.capabilities[i]).toLowerCase();this.capabilityToComponentIds_[n].splice(this.capabilityToComponentIds_[n].indexOf(t),1)}delete this.componentData_[t]}},t.ComponentManager.prototype.addCapability=function(t,e){if(!this.getComponent(t))throw Error('Cannot add capability, "'+e+'". Plugin "'+t+'" has not been added to the ComponentManager');this.hasCapability(t,e)?console.warn('Plugin "'+t+'already has capability "'+e+'"'):(e=String(e).toLowerCase(),this.componentData_[t].capabilities.push(e),this.capabilityToComponentIds_[e].push(t))},t.ComponentManager.prototype.removeCapability=function(t,e){if(!this.getComponent(t))throw Error('Cannot remove capability, "'+e+'". Plugin "'+t+'" has not been added to the ComponentManager');this.hasCapability(t,e)?(e=String(e).toLowerCase(),this.componentData_[t].capabilities.splice(this.componentData_[t].capabilities.indexOf(e),1),this.capabilityToComponentIds_[e].splice(this.capabilityToComponentIds_[e].indexOf(t),1)):console.warn('Plugin "'+t+"doesn't have capability \""+e+'" to remove')},t.ComponentManager.prototype.hasCapability=function(t,e){return e=String(e).toLowerCase(),-1!==this.componentData_[t].capabilities.indexOf(e)},t.ComponentManager.prototype.getComponent=function(t){return this.componentData_[t]&&this.componentData_[t].component},t.ComponentManager.prototype.getComponents=function(t,e){if(t=String(t).toLowerCase(),!(t=this.capabilityToComponentIds_[t]))return[];var i=[];if(e){var n=[],o=this.componentData_;t.forEach(function(t){n.push(o[t])}),n.sort(function(t,e){return t.weight-e.weight}),n.forEach(function(t){i.push(t.component)})}else o=this.componentData_,t.forEach(function(t){i.push(o[t].component)});return i},t.ComponentManager.Capability=function(t){this.name_=t},t.ComponentManager.Capability.prototype.toString=function(){return this.name_},t.ComponentManager.Capability.POSITIONABLE=new t.ComponentManager.Capability("positionable"),t.ComponentManager.Capability.DRAG_TARGET=new t.ComponentManager.Capability("drag_target"),t.ComponentManager.Capability.DELETE_AREA=new t.ComponentManager.Capability("delete_area"),t.ComponentManager.Capability.AUTOHIDEABLE=new t.ComponentManager.Capability("autohideable"),t.utils.Svg=function(t){this.tagName_=t},t.utils.Svg.prototype.toString=function(){return this.tagName_},t.utils.Svg.ANIMATE=new t.utils.Svg("animate"),t.utils.Svg.CIRCLE=new t.utils.Svg("circle"),t.utils.Svg.CLIPPATH=new t.utils.Svg("clipPath"),t.utils.Svg.DEFS=new t.utils.Svg("defs"),t.utils.Svg.FECOMPOSITE=new t.utils.Svg("feComposite"),t.utils.Svg.FECOMPONENTTRANSFER=new t.utils.Svg("feComponentTransfer"),t.utils.Svg.FEFLOOD=new t.utils.Svg("feFlood"),t.utils.Svg.FEFUNCA=new t.utils.Svg("feFuncA"),t.utils.Svg.FEGAUSSIANBLUR=new t.utils.Svg("feGaussianBlur"),t.utils.Svg.FEPOINTLIGHT=new t.utils.Svg("fePointLight"),t.utils.Svg.FESPECULARLIGHTING=new t.utils.Svg("feSpecularLighting"),t.utils.Svg.FILTER=new t.utils.Svg("filter"),t.utils.Svg.FOREIGNOBJECT=new t.utils.Svg("foreignObject"),t.utils.Svg.G=new t.utils.Svg("g"),t.utils.Svg.IMAGE=new t.utils.Svg("image"),t.utils.Svg.LINE=new t.utils.Svg("line"),t.utils.Svg.PATH=new t.utils.Svg("path"),t.utils.Svg.PATTERN=new t.utils.Svg("pattern"),t.utils.Svg.POLYGON=new t.utils.Svg("polygon"),t.utils.Svg.RECT=new t.utils.Svg("rect"),t.utils.Svg.SVG=new t.utils.Svg("svg"),t.utils.Svg.TEXT=new t.utils.Svg("text"),t.utils.Svg.TSPAN=new t.utils.Svg("tspan"),t.utils.dom={},t.utils.dom.SVG_NS="http://www.w3.org/2000/svg",t.utils.dom.HTML_NS="http://www.w3.org/1999/xhtml",t.utils.dom.XLINK_NS="http://www.w3.org/1999/xlink",t.utils.dom.NodeType={ELEMENT_NODE:1,TEXT_NODE:3,COMMENT_NODE:8,DOCUMENT_POSITION_CONTAINED_BY:16},t.utils.dom.cacheWidths_=null,t.utils.dom.cacheReference_=0,t.utils.dom.canvasContext_=null,t.utils.dom.createSvgElement=function(e,i,n){for(var o in e=document.createElementNS(t.utils.dom.SVG_NS,String(e)),i)e.setAttribute(o,i[o]);return document.body.runtimeStyle&&(e.runtimeStyle=e.currentStyle=e.style),n&&n.appendChild(e),e},t.utils.dom.addClass=function(t,e){var i=t.getAttribute("class")||"";return-1==(" "+i+" ").indexOf(" "+e+" ")&&(i&&(i+=" "),t.setAttribute("class",i+e),!0)},t.utils.dom.removeClasses=function(e,i){i=i.split(" ");for(var n=0;n<i.length;n++)t.utils.dom.removeClass(e,i[n])},t.utils.dom.removeClass=function(t,e){var i=t.getAttribute("class");if(-1==(" "+i+" ").indexOf(" "+e+" "))return!1;i=i.split(/\s+/);for(var n=0;n<i.length;n++)i[n]&&i[n]!=e||(i.splice(n,1),n--);return i.length?t.setAttribute("class",i.join(" ")):t.removeAttribute("class"),!0},t.utils.dom.hasClass=function(t,e){return-1!=(" "+t.getAttribute("class")+" ").indexOf(" "+e+" ")},t.utils.dom.removeNode=function(t){return t&&t.parentNode?t.parentNode.removeChild(t):null},t.utils.dom.insertAfter=function(t,e){var i=e.nextSibling;if(!(e=e.parentNode))throw Error("Reference node has no parent.");i?e.insertBefore(t,i):e.appendChild(t)},t.utils.dom.containsNode=function(e,i){return!!(e.compareDocumentPosition(i)&t.utils.dom.NodeType.DOCUMENT_POSITION_CONTAINED_BY)},t.utils.dom.setCssTransform=function(t,e){t.style.transform=e,t.style["-webkit-transform"]=e},t.utils.dom.startTextWidthCache=function(){t.utils.dom.cacheReference_++,t.utils.dom.cacheWidths_||(t.utils.dom.cacheWidths_=Object.create(null))},t.utils.dom.stopTextWidthCache=function(){t.utils.dom.cacheReference_--,t.utils.dom.cacheReference_||(t.utils.dom.cacheWidths_=null)},t.utils.dom.getTextWidth=function(e){var i,n=e.textContent+"\n"+e.className.baseVal;if(t.utils.dom.cacheWidths_&&(i=t.utils.dom.cacheWidths_[n]))return i;try{i=t.utils.userAgent.IE||t.utils.userAgent.EDGE?e.getBBox().width:e.getComputedTextLength()}catch(t){return 8*e.textContent.length}return t.utils.dom.cacheWidths_&&(t.utils.dom.cacheWidths_[n]=i),i},t.utils.dom.getFastTextWidth=function(e,i,n,o){return t.utils.dom.getFastTextWidthWithSizeString(e,i+"pt",n,o)},t.utils.dom.getFastTextWidthWithSizeString=function(e,i,n,o){var r,s=e.textContent;return e=s+"\n"+e.className.baseVal,t.utils.dom.cacheWidths_&&(r=t.utils.dom.cacheWidths_[e])?r:(t.utils.dom.canvasContext_||((r=document.createElement("canvas")).className="blocklyComputeCanvas",document.body.appendChild(r),t.utils.dom.canvasContext_=r.getContext("2d")),t.utils.dom.canvasContext_.font=n+" "+i+" "+o,r=t.utils.dom.canvasContext_.measureText(s).width,t.utils.dom.cacheWidths_&&(t.utils.dom.cacheWidths_[e]=r),r)},t.utils.dom.measureFontMetrics=function(t,e,i,n){var o=document.createElement("span");o.style.font=i+" "+e+" "+n,o.textContent=t,(t=document.createElement("div")).style.width="1px",t.style.height="0px",(e=document.createElement("div")).setAttribute("style","position: fixed; top: 0; left: 0; display: flex;"),e.appendChild(o),e.appendChild(t),document.body.appendChild(e);try{i={},e.style.alignItems="baseline",i.baseline=t.offsetTop-o.offsetTop,e.style.alignItems="flex-end",i.height=t.offsetTop-o.offsetTop}finally{document.body.removeChild(e)}return i},t.utils.math={},t.utils.math.toRadians=function(t){return t*Math.PI/180},t.utils.math.toDegrees=function(t){return 180*t/Math.PI},t.utils.math.clamp=function(t,e,i){if(i<t){var n=i;i=t,t=n}return Math.max(t,Math.min(e,i))},t.DropDownDiv=function(){},t.DropDownDiv.boundsElement_=null,t.DropDownDiv.owner_=null,t.DropDownDiv.positionToField_=null,t.DropDownDiv.ARROW_SIZE=16,t.DropDownDiv.BORDER_SIZE=1,t.DropDownDiv.ARROW_HORIZONTAL_PADDING=12,t.DropDownDiv.PADDING_Y=16,t.DropDownDiv.ANIMATION_TIME=.25,t.DropDownDiv.animateOutTimer_=null,t.DropDownDiv.onHide_=null,t.DropDownDiv.rendererClassName_="",t.DropDownDiv.themeClassName_="",t.DropDownDiv.createDom=function(){if(!t.DropDownDiv.DIV_){var e=document.createElement("div");e.className="blocklyDropDownDiv",(t.parentContainer||document.body).appendChild(e),t.DropDownDiv.DIV_=e;var i=document.createElement("div");i.className="blocklyDropDownContent",e.appendChild(i),t.DropDownDiv.content_=i,(i=document.createElement("div")).className="blocklyDropDownArrow",e.appendChild(i),t.DropDownDiv.arrow_=i,t.DropDownDiv.DIV_.style.opacity=0,t.DropDownDiv.DIV_.style.transition="transform "+t.DropDownDiv.ANIMATION_TIME+"s, opacity "+t.DropDownDiv.ANIMATION_TIME+"s",e.addEventListener("focusin",function(){t.utils.dom.addClass(e,"blocklyFocused")}),e.addEventListener("focusout",function(){t.utils.dom.removeClass(e,"blocklyFocused")})}},t.DropDownDiv.setBoundsElement=function(e){t.DropDownDiv.boundsElement_=e},t.DropDownDiv.getContentDiv=function(){return t.DropDownDiv.content_},t.DropDownDiv.clearContent=function(){t.DropDownDiv.content_.textContent="",t.DropDownDiv.content_.style.width=""},t.DropDownDiv.setColour=function(e,i){t.DropDownDiv.DIV_.style.backgroundColor=e,t.DropDownDiv.DIV_.style.borderColor=i},t.DropDownDiv.showPositionedByBlock=function(e,i,n,o){return t.DropDownDiv.showPositionedByRect_(t.DropDownDiv.getScaledBboxOfBlock_(i),e,n,o)},t.DropDownDiv.showPositionedByField=function(e,i,n){return t.DropDownDiv.positionToField_=!0,t.DropDownDiv.showPositionedByRect_(t.DropDownDiv.getScaledBboxOfField_(e),e,i,n)},t.DropDownDiv.getScaledBboxOfBlock_=function(e){var i=e.getSvgRoot(),n=i.getBBox(),o=e.workspace.scale;return e=n.height*o,n=n.width*o,i=t.utils.style.getPageOffset(i),new t.utils.Rect(i.y,i.y+e,i.x,i.x+n)},t.DropDownDiv.getScaledBboxOfField_=function(e){return e=e.getScaledBBox(),new t.utils.Rect(e.top,e.bottom,e.left,e.right)},t.DropDownDiv.showPositionedByRect_=function(e,i,n,o){var r=e.left+(e.right-e.left)/2,s=e.bottom;e=e.top,o&&(e+=o);for(var a=(o=i.getSourceBlock()).workspace;a.options.parentWorkspace;)a=a.options.parentWorkspace;return t.DropDownDiv.setBoundsElement(a.getParentSvg().parentNode),t.DropDownDiv.show(i,o.RTL,r,s,r,e,n)},t.DropDownDiv.show=function(e,i,n,o,r,s,a){return t.DropDownDiv.owner_=e,t.DropDownDiv.onHide_=a||null,(e=t.DropDownDiv.DIV_).style.direction=i?"rtl":"ltr",i=t.getMainWorkspace(),t.DropDownDiv.rendererClassName_=i.getRenderer().getClassName(),t.DropDownDiv.themeClassName_=i.getTheme().getClassName(),t.utils.dom.addClass(e,t.DropDownDiv.rendererClassName_),t.utils.dom.addClass(e,t.DropDownDiv.themeClassName_),t.DropDownDiv.positionInternal_(n,o,r,s)},t.DropDownDiv.getBoundsInfo_=function(){var e=t.utils.style.getPageOffset(t.DropDownDiv.boundsElement_),i=t.utils.style.getSize(t.DropDownDiv.boundsElement_);return{left:e.x,right:e.x+i.width,top:e.y,bottom:e.y+i.height,width:i.width,height:i.height}},t.DropDownDiv.getPositionMetrics_=function(e,i,n,o){var r=t.DropDownDiv.getBoundsInfo_(),s=t.utils.style.getSize(t.DropDownDiv.DIV_);return i+s.height<r.bottom?t.DropDownDiv.getPositionBelowMetrics_(e,i,r,s):o-s.height>r.top?t.DropDownDiv.getPositionAboveMetrics_(n,o,r,s):i+s.height<document.documentElement.clientHeight?t.DropDownDiv.getPositionBelowMetrics_(e,i,r,s):o-s.height>document.documentElement.clientTop?t.DropDownDiv.getPositionAboveMetrics_(n,o,r,s):t.DropDownDiv.getPositionTopOfPageMetrics_(e,r,s)},t.DropDownDiv.getPositionBelowMetrics_=function(e,i,n,o){return{initialX:(e=t.DropDownDiv.getPositionX(e,n.left,n.right,o.width)).divX,initialY:i,finalX:e.divX,finalY:i+t.DropDownDiv.PADDING_Y,arrowX:e.arrowX,arrowY:-(t.DropDownDiv.ARROW_SIZE/2+t.DropDownDiv.BORDER_SIZE),arrowAtTop:!0,arrowVisible:!0}},t.DropDownDiv.getPositionAboveMetrics_=function(e,i,n,o){return{initialX:(e=t.DropDownDiv.getPositionX(e,n.left,n.right,o.width)).divX,initialY:i-o.height,finalX:e.divX,finalY:i-o.height-t.DropDownDiv.PADDING_Y,arrowX:e.arrowX,arrowY:o.height-2*t.DropDownDiv.BORDER_SIZE-t.DropDownDiv.ARROW_SIZE/2,arrowAtTop:!1,arrowVisible:!0}},t.DropDownDiv.getPositionTopOfPageMetrics_=function(e,i,n){return{initialX:(e=t.DropDownDiv.getPositionX(e,i.left,i.right,n.width)).divX,initialY:0,finalX:e.divX,finalY:0,arrowAtTop:null,arrowX:null,arrowY:null,arrowVisible:!1}},t.DropDownDiv.getPositionX=function(e,i,n,o){var r=e;return e=t.utils.math.clamp(i,e-o/2,n-o),r-=t.DropDownDiv.ARROW_SIZE/2,i=t.DropDownDiv.ARROW_HORIZONTAL_PADDING,{arrowX:o=t.utils.math.clamp(i,r-e,o-i-t.DropDownDiv.ARROW_SIZE),divX:e}},t.DropDownDiv.isVisible=function(){return!!t.DropDownDiv.owner_},t.DropDownDiv.hideIfOwner=function(e,i){return t.DropDownDiv.owner_===e&&(i?t.DropDownDiv.hideWithoutAnimation():t.DropDownDiv.hide(),!0)},t.DropDownDiv.hide=function(){var e=t.DropDownDiv.DIV_;e.style.transform="translate(0, 0)",e.style.opacity=0,t.DropDownDiv.animateOutTimer_=setTimeout(function(){t.DropDownDiv.hideWithoutAnimation()},1e3*t.DropDownDiv.ANIMATION_TIME),t.DropDownDiv.onHide_&&(t.DropDownDiv.onHide_(),t.DropDownDiv.onHide_=null)},t.DropDownDiv.hideWithoutAnimation=function(){if(t.DropDownDiv.isVisible()){t.DropDownDiv.animateOutTimer_&&clearTimeout(t.DropDownDiv.animateOutTimer_);var e=t.DropDownDiv.DIV_;e.style.transform="",e.style.left="",e.style.top="",e.style.opacity=0,e.style.display="none",e.style.backgroundColor="",e.style.borderColor="",t.DropDownDiv.onHide_&&(t.DropDownDiv.onHide_(),t.DropDownDiv.onHide_=null),t.DropDownDiv.clearContent(),t.DropDownDiv.owner_=null,t.DropDownDiv.rendererClassName_&&(t.utils.dom.removeClass(e,t.DropDownDiv.rendererClassName_),t.DropDownDiv.rendererClassName_=""),t.DropDownDiv.themeClassName_&&(t.utils.dom.removeClass(e,t.DropDownDiv.themeClassName_),t.DropDownDiv.themeClassName_=""),t.getMainWorkspace().markFocused()}},t.DropDownDiv.positionInternal_=function(e,i,n,o){(e=t.DropDownDiv.getPositionMetrics_(e,i,n,o)).arrowVisible?(t.DropDownDiv.arrow_.style.display="",t.DropDownDiv.arrow_.style.transform="translate("+e.arrowX+"px,"+e.arrowY+"px) rotate(45deg)",t.DropDownDiv.arrow_.setAttribute("class",e.arrowAtTop?"blocklyDropDownArrow blocklyArrowTop":"blocklyDropDownArrow blocklyArrowBottom")):t.DropDownDiv.arrow_.style.display="none",i=Math.floor(e.initialX),n=Math.floor(e.initialY),o=Math.floor(e.finalX);var r=Math.floor(e.finalY),s=t.DropDownDiv.DIV_;return s.style.left=i+"px",s.style.top=n+"px",s.style.display="block",s.style.opacity=1,s.style.transform="translate("+(o-i)+"px,"+(r-n)+"px)",!!e.arrowAtTop},t.DropDownDiv.repositionForWindowResize=function(){if(t.DropDownDiv.owner_){var e=t.DropDownDiv.owner_,i=e.getSourceBlock();i=(e=t.DropDownDiv.positionToField_?t.DropDownDiv.getScaledBboxOfField_(e):t.DropDownDiv.getScaledBboxOfBlock_(i)).left+(e.right-e.left)/2,t.DropDownDiv.positionInternal_(i,e.bottom,i,e.top)}else t.DropDownDiv.hide()},t.registry={},t.registry.typeMap_=Object.create(null),t.registry.DEFAULT="default",t.registry.Type=function(t){this.name_=t},t.registry.Type.prototype.toString=function(){return this.name_},t.registry.Type.CONNECTION_CHECKER=new t.registry.Type("connectionChecker"),t.registry.Type.CURSOR=new t.registry.Type("cursor"),t.registry.Type.EVENT=new t.registry.Type("event"),t.registry.Type.FIELD=new t.registry.Type("field"),t.registry.Type.RENDERER=new t.registry.Type("renderer"),t.registry.Type.TOOLBOX=new t.registry.Type("toolbox"),t.registry.Type.THEME=new t.registry.Type("theme"),t.registry.Type.TOOLBOX_ITEM=new t.registry.Type("toolboxItem"),t.registry.Type.FLYOUTS_VERTICAL_TOOLBOX=new t.registry.Type("flyoutsVerticalToolbox"),t.registry.Type.FLYOUTS_HORIZONTAL_TOOLBOX=new t.registry.Type("flyoutsHorizontalToolbox"),t.registry.Type.METRICS_MANAGER=new t.registry.Type("metricsManager"),t.registry.Type.BLOCK_DRAGGER=new t.registry.Type("blockDragger"),t.registry.register=function(e,i,n,o){if(!(e instanceof t.registry.Type)&&"string"!=typeof e||""==String(e).trim())throw Error('Invalid type "'+e+'". The type must be a non-empty string or a Blockly.registry.Type.');if(e=String(e).toLowerCase(),"string"!=typeof i||""==i.trim())throw Error('Invalid name "'+i+'". The name must be a non-empty string.');if(i=i.toLowerCase(),!n)throw Error("Can not register a null value");var r=t.registry.typeMap_[e];if(r||(r=t.registry.typeMap_[e]=Object.create(null)),t.registry.validate_(e,n),!o&&r[i])throw Error('Name "'+i+'" with type "'+e+'" already registered.');r[i]=n},t.registry.validate_=function(e,i){switch(e){case String(t.registry.Type.FIELD):if("function"!=typeof i.fromJson)throw Error('Type "'+e+'" must have a fromJson function')}},t.registry.unregister=function(e,i){e=String(e).toLowerCase(),i=i.toLowerCase();var n=t.registry.typeMap_[e];n&&n[i]?delete t.registry.typeMap_[e][i]:console.warn("Unable to unregister ["+i+"]["+e+"] from the registry.")},t.registry.getItem_=function(e,i,n){e=String(e).toLowerCase(),i=i.toLowerCase();var o=t.registry.typeMap_[e];if(!o||!o[i]){if(i="Unable to find ["+i+"]["+e+"] in the registry.",n)throw Error(i+" You must require or register a "+e+" plugin.");return console.warn(i),null}return o[i]},t.registry.hasItem=function(e,i){return e=String(e).toLowerCase(),i=i.toLowerCase(),!!(e=t.registry.typeMap_[e])&&!!e[i]},t.registry.getClass=function(e,i,n){return t.registry.getItem_(e,i,n)},t.registry.getObject=function(e,i,n){return t.registry.getItem_(e,i,n)},t.registry.getClassFromOptions=function(e,i,n){return"function"==typeof(i=i.plugins[e.toString()]||t.registry.DEFAULT)?i:t.registry.getClass(e,i,n)},t.Events={},t.Events.group_="",t.Events.recordUndo=!0,t.Events.disabled_=0,t.Events.CREATE="create",t.Events.BLOCK_CREATE=t.Events.CREATE,t.Events.DELETE="delete",t.Events.BLOCK_DELETE=t.Events.DELETE,t.Events.CHANGE="change",t.Events.BLOCK_CHANGE=t.Events.CHANGE,t.Events.MOVE="move",t.Events.BLOCK_MOVE=t.Events.MOVE,t.Events.VAR_CREATE="var_create",t.Events.VAR_DELETE="var_delete",t.Events.VAR_RENAME="var_rename",t.Events.UI="ui",t.Events.BLOCK_DRAG="drag",t.Events.SELECTED="selected",t.Events.CLICK="click",t.Events.MARKER_MOVE="marker_move",t.Events.BUBBLE_OPEN="bubble_open",t.Events.TRASHCAN_OPEN="trashcan_open",t.Events.TOOLBOX_ITEM_SELECT="toolbox_item_select",t.Events.THEME_CHANGE="theme_change",t.Events.VIEWPORT_CHANGE="viewport_change",t.Events.COMMENT_CREATE="comment_create",t.Events.COMMENT_DELETE="comment_delete",t.Events.COMMENT_CHANGE="comment_change",t.Events.COMMENT_MOVE="comment_move",t.Events.FINISHED_LOADING="finished_loading",t.Events.BUMP_EVENTS=[t.Events.BLOCK_CREATE,t.Events.BLOCK_MOVE,t.Events.COMMENT_CREATE,t.Events.COMMENT_MOVE],t.Events.FIRE_QUEUE_=[],t.Events.fire=function(e){t.Events.isEnabled()&&(t.Events.FIRE_QUEUE_.length||setTimeout(t.Events.fireNow_,0),t.Events.FIRE_QUEUE_.push(e))},t.Events.fireNow_=function(){for(var e,i=t.Events.filter(t.Events.FIRE_QUEUE_,!0),n=t.Events.FIRE_QUEUE_.length=0;e=i[n];n++)if(e.workspaceId){var o=t.Workspace.getById(e.workspaceId);o&&o.fireChangeListener(e)}},t.Events.filter=function(e,i){e=e.slice(),i||e.reverse();for(var n,o=[],r=Object.create(null),s=0;n=e[s];s++)if(!n.isNull()){var a=[n.isUiEvent?t.Events.UI:n.type,n.blockId,n.workspaceId].join(" "),l=r[a],c=l?l.event:null;l?n.type==t.Events.MOVE&&l.index==s-1?(c.newParentId=n.newParentId,c.newInputName=n.newInputName,c.newCoordinate=n.newCoordinate,l.index=s):n.type==t.Events.CHANGE&&n.element==c.element&&n.name==c.name?c.newValue=n.newValue:n.type==t.Events.VIEWPORT_CHANGE?(c.viewTop=n.viewTop,c.viewLeft=n.viewLeft,c.scale=n.scale,c.oldScale=n.oldScale):n.type==t.Events.CLICK&&c.type==t.Events.BUBBLE_OPEN||(r[a]={event:n,index:s},o.push(n)):(r[a]={event:n,index:s},o.push(n))}for(e=o.filter(function(t){return!t.isNull()}),i||e.reverse(),s=1;n=e[s];s++)n.type==t.Events.CHANGE&&"mutation"==n.element&&e.unshift(e.splice(s,1)[0]);return e},t.Events.clearPendingUndo=function(){for(var e,i=0;e=t.Events.FIRE_QUEUE_[i];i++)e.recordUndo=!1},t.Events.disable=function(){t.Events.disabled_++},t.Events.enable=function(){t.Events.disabled_--},t.Events.isEnabled=function(){return 0==t.Events.disabled_},t.Events.getGroup=function(){return t.Events.group_},t.Events.setGroup=function(e){t.Events.group_="boolean"==typeof e?e?t.utils.genUid():"":e},t.Events.getDescendantIds=function(t){var e=[];t=t.getDescendants(!1);for(var i,n=0;i=t[n];n++)e[n]=i.id;return e},t.Events.fromJson=function(e,i){var n=t.Events.get(e.type);if(!n)throw Error("Unknown event type.");return(n=new n).fromJson(e),n.workspaceId=i.id,n},t.Events.get=function(e){return t.registry.getClass(t.registry.Type.EVENT,e)},t.Events.disableOrphans=function(e){if((e.type==t.Events.MOVE||e.type==t.Events.CREATE)&&e.workspaceId){var i=t.Workspace.getById(e.workspaceId),n=i.getBlockById(e.blockId);if(n){e=t.Events.recordUndo;try{t.Events.recordUndo=!1;var o=n.getParent();if(o&&o.isEnabled()){var r,s=n.getDescendants(!1);for(i=0;r=s[i];i++)r.setEnabled(!0)}else if((n.outputConnection||n.previousConnection)&&!i.isDragging())do{n.setEnabled(!1),n=n.getNextBlock()}while(n)}finally{t.Events.recordUndo=e}}}},t.Events.Abstract=function(){this.isBlank=null,this.workspaceId=void 0,this.group=t.Events.getGroup(),this.recordUndo=t.Events.recordUndo},t.Events.Abstract.prototype.isUiEvent=!1,t.Events.Abstract.prototype.toJson=function(){var t={type:this.type};return this.group&&(t.group=this.group),t},t.Events.Abstract.prototype.fromJson=function(t){this.isBlank=!1,this.group=t.group},t.Events.Abstract.prototype.isNull=function(){return!1},t.Events.Abstract.prototype.run=function(t){},t.Events.Abstract.prototype.getEventWorkspace_=function(){if(this.workspaceId)var e=t.Workspace.getById(this.workspaceId);if(!e)throw Error("Workspace is null. Event must have been generated from real Blockly events.");return e},t.utils.object={},t.utils.object.inherits=function(t,e){t.superClass_=e.prototype,t.prototype=Object.create(e.prototype),t.prototype.constructor=t},t.utils.object.mixin=function(t,e){for(var i in e)t[i]=e[i]},t.utils.object.deepMerge=function(e,i){for(var n in i)e[n]=null!=i[n]&&"object"==typeof i[n]?t.utils.object.deepMerge(e[n]||Object.create(null),i[n]):i[n];return e},t.utils.object.values=function(t){return Object.values?Object.values(t):Object.keys(t).map(function(e){return t[e]})},t.utils.xml={},t.utils.xml.NAME_SPACE="https://developers.google.com/blockly/xml",t.utils.xml.document=function(){return document},t.utils.xml.createElement=function(e){return t.utils.xml.document().createElementNS(t.utils.xml.NAME_SPACE,e)},t.utils.xml.createTextNode=function(e){return t.utils.xml.document().createTextNode(e)},t.utils.xml.textToDomDocument=function(t){return(new DOMParser).parseFromString(t,"text/xml")},t.utils.xml.domToText=function(t){return(new XMLSerializer).serializeToString(t)},t.inputTypes={VALUE:t.connectionTypes.INPUT_VALUE,STATEMENT:t.connectionTypes.NEXT_STATEMENT,DUMMY:5},t.Xml={},t.Xml.workspaceToDom=function(e,i){var n=t.utils.xml.createElement("xml"),o=t.Xml.variablesToDom(t.Variables.allUsedVarModels(e));o.hasChildNodes()&&n.appendChild(o);var r,s=e.getTopComments(!0);for(o=0;r=s[o];o++)n.appendChild(r.toXmlWithXY(i));for(e=e.getTopBlocks(!0),o=0;s=e[o];o++)n.appendChild(t.Xml.blockToDomWithXY(s,i));return n},t.Xml.variablesToDom=function(e){for(var i,n=t.utils.xml.createElement("variables"),o=0;i=e[o];o++){var r=t.utils.xml.createElement("variable");r.appendChild(t.utils.xml.createTextNode(i.name)),i.type&&r.setAttribute("type",i.type),r.id=i.getId(),n.appendChild(r)}return n},t.Xml.blockToDomWithXY=function(e,i){if(e.isInsertionMarker()&&!(e=e.getChildren(!1)[0]))return new DocumentFragment;var n;e.workspace.RTL&&(n=e.workspace.getWidth()),i=t.Xml.blockToDom(e,i);var o=e.getRelativeToSurfaceXY();return i.setAttribute("x",Math.round(e.workspace.RTL?n-o.x:o.x)),i.setAttribute("y",Math.round(o.y)),i},t.Xml.fieldToDom_=function(e){if(e.isSerializable()){var i=t.utils.xml.createElement("field");return i.setAttribute("name",e.name||""),e.toXml(i)}return null},t.Xml.allFieldsToDom_=function(e,i){for(var n,o=0;n=e.inputList[o];o++)for(var r,s=0;r=n.fieldRow[s];s++)(r=t.Xml.fieldToDom_(r))&&i.appendChild(r)},t.Xml.blockToDom=function(e,i){if(e.isInsertionMarker())return(e=e.getChildren(!1)[0])?t.Xml.blockToDom(e):new DocumentFragment;var n=t.utils.xml.createElement(e.isShadow()?"shadow":"block");if(n.setAttribute("type",e.type),i||n.setAttribute("id",e.id),e.mutationToDom){var o=e.mutationToDom();o&&(o.hasChildNodes()||o.hasAttributes())&&n.appendChild(o)}if(t.Xml.allFieldsToDom_(e,n),o=e.getCommentText()){var r=e.commentModel.size,s=e.commentModel.pinned,a=t.utils.xml.createElement("comment");a.appendChild(t.utils.xml.createTextNode(o)),a.setAttribute("pinned",s),a.setAttribute("h",r.height),a.setAttribute("w",r.width),n.appendChild(a)}for(e.data&&((o=t.utils.xml.createElement("data")).appendChild(t.utils.xml.createTextNode(e.data)),n.appendChild(o)),o=0;r=e.inputList[o];o++){var l;if(s=!0,r.type!=t.inputTypes.DUMMY){var c=r.connection.targetBlock();r.type==t.inputTypes.VALUE?l=t.utils.xml.createElement("value"):r.type==t.inputTypes.STATEMENT&&(l=t.utils.xml.createElement("statement")),!(a=r.connection.getShadowDom())||c&&c.isShadow()||l.appendChild(t.Xml.cloneShadow_(a,i)),c&&((a=t.Xml.blockToDom(c,i)).nodeType==t.utils.dom.NodeType.ELEMENT_NODE&&(l.appendChild(a),s=!1)),l.setAttribute("name",r.name),s||n.appendChild(l)}}return void 0!=e.inputsInline&&e.inputsInline!=e.inputsInlineDefault&&n.setAttribute("inline",e.inputsInline),e.isCollapsed()&&n.setAttribute("collapsed",!0),e.isEnabled()||n.setAttribute("disabled",!0),e.isDeletable()||e.isShadow()||n.setAttribute("deletable",!1),e.isMovable()||e.isShadow()||n.setAttribute("movable",!1),e.isEditable()||n.setAttribute("editable",!1),(o=e.getNextBlock())&&((a=t.Xml.blockToDom(o,i)).nodeType==t.utils.dom.NodeType.ELEMENT_NODE&&((l=t.utils.xml.createElement("next")).appendChild(a),n.appendChild(l))),!(a=e.nextConnection&&e.nextConnection.getShadowDom())||o&&o.isShadow()||l.appendChild(t.Xml.cloneShadow_(a,i)),n},t.Xml.cloneShadow_=function(e,i){for(var n,o=e=e.cloneNode(!0);o;)if(i&&"shadow"==o.nodeName&&o.removeAttribute("id"),o.firstChild)o=o.firstChild;else{for(;o&&!o.nextSibling;)n=o,o=o.parentNode,n.nodeType==t.utils.dom.NodeType.TEXT_NODE&&""==n.data.trim()&&o.firstChild!=n&&t.utils.dom.removeNode(n);o&&(n=o,o=o.nextSibling,n.nodeType==t.utils.dom.NodeType.TEXT_NODE&&""==n.data.trim()&&t.utils.dom.removeNode(n))}return e},t.Xml.domToText=function(e){return t.utils.xml.domToText(e).replace(/<(\w+)([^<]*)\/>/g,"<$1$2></$1>")},t.Xml.domToPrettyText=function(e){e=t.Xml.domToText(e).split("<");for(var i="",n=1;n<e.length;n++){var o=e[n];"/"==o[0]&&(i=i.substring(2)),e[n]=i+"<"+o,"/"!=o[0]&&"/>"!=o.slice(-2)&&(i+="  ")}return(e=(e=e.join("\n")).replace(/(<(\w+)\b[^>]*>[^\n]*)\n *<\/\2>/g,"$1</$2>")).replace(/^\n/,"")},t.Xml.textToDom=function(e){var i=t.utils.xml.textToDomDocument(e);if(!i||!i.documentElement||i.getElementsByTagName("parsererror").length)throw Error("textToDom was unable to parse: "+e);return i.documentElement},t.Xml.clearWorkspaceAndLoadFromXml=function(e,i){return i.setResizesEnabled(!1),i.clear(),e=t.Xml.domToWorkspace(e,i),i.setResizesEnabled(!0),e},t.Xml.domToWorkspace=function(e,i){if(e instanceof t.Workspace){var n=e;e=i,i=n,console.warn("Deprecated call to Blockly.Xml.domToWorkspace, swap the arguments.")}var o;i.RTL&&(o=i.getWidth()),n=[],t.utils.dom.startTextWidthCache();var r=t.Events.getGroup();r||t.Events.setGroup(!0),i.setResizesEnabled&&i.setResizesEnabled(!1);var s=!0;try{for(var a,l=0;a=e.childNodes[l];l++){var c=a.nodeName.toLowerCase(),u=a;if("block"==c||"shadow"==c&&!t.Events.recordUndo){var h=t.Xml.domToBlock(u,i);n.push(h.id);var p=u.hasAttribute("x")?parseInt(u.getAttribute("x"),10):10,d=u.hasAttribute("y")?parseInt(u.getAttribute("y"),10):10;isNaN(p)||isNaN(d)||h.moveBy(i.RTL?o-p:p,d),s=!1}else{if("shadow"==c)throw TypeError("Shadow block cannot be a top-level block.");if("comment"==c)i.rendered?t.WorkspaceCommentSvg?t.WorkspaceCommentSvg.fromXml(u,i,o):console.warn("Missing require for Blockly.WorkspaceCommentSvg, ignoring workspace comment."):t.WorkspaceComment?t.WorkspaceComment.fromXml(u,i):console.warn("Missing require for Blockly.WorkspaceComment, ignoring workspace comment.");else if("variables"==c){if(!s)throw Error("'variables' tag must exist once before block and shadow tag elements in the workspace XML, but it was found in another location.");t.Xml.domToVariables(u,i),s=!1}}}}finally{r||t.Events.setGroup(!1),t.utils.dom.stopTextWidthCache()}return i.setResizesEnabled&&i.setResizesEnabled(!0),t.Events.fire(new(t.Events.get(t.Events.FINISHED_LOADING))(i)),n},t.Xml.appendDomToWorkspace=function(e,i){var n;if(Object.prototype.hasOwnProperty.call(i,"scale")&&(n=i.getBlocksBoundingBox()),e=t.Xml.domToWorkspace(e,i),n&&n.top!=n.bottom){var o=n.bottom,r=i.RTL?n.right:n.left,s=1/0,a=-1/0,l=1/0;for(n=0;n<e.length;n++){var c=i.getBlockById(e[n]).getRelativeToSurfaceXY();c.y<l&&(l=c.y),c.x<s&&(s=c.x),c.x>a&&(a=c.x)}for(o=o-l+10,r=i.RTL?r-a:r-s,n=0;n<e.length;n++)i.getBlockById(e[n]).moveBy(r,o)}return e},t.Xml.domToBlock=function(e,i){if(e instanceof t.Workspace){var n=e;e=i,i=n,console.warn("Deprecated call to Blockly.Xml.domToBlock, swap the arguments.")}t.Events.disable(),n=i.getAllVariables();try{var o=t.Xml.domToBlockHeadless_(e,i),r=o.getDescendants(!1);if(i.rendered){o.setConnectionTracking(!1);for(var s=r.length-1;0<=s;s--)r[s].initSvg();for(s=r.length-1;0<=s;s--)r[s].render(!1);setTimeout(function(){o.disposed||o.setConnectionTracking(!0)},1),o.updateDisabled(),i.resizeContents()}else for(s=r.length-1;0<=s;s--)r[s].initModel()}finally{t.Events.enable()}if(t.Events.isEnabled()){for(e=t.Variables.getAddedVariables(i,n),s=0;s<e.length;s++)i=e[s],t.Events.fire(new(t.Events.get(t.Events.VAR_CREATE))(i));t.Events.fire(new(t.Events.get(t.Events.CREATE))(o))}return o},t.Xml.domToVariables=function(e,i){for(var n,o=0;n=e.childNodes[o];o++)if(n.nodeType==t.utils.dom.NodeType.ELEMENT_NODE){var r=n.getAttribute("type"),s=n.getAttribute("id");i.createVariable(n.textContent,r,s)}},t.Xml.mapSupportedXmlTags_=function(e){for(var i,n={mutation:[],comment:[],data:[],field:[],input:[],next:[]},o=0;i=e.childNodes[o];o++)if(i.nodeType!=t.utils.dom.NodeType.TEXT_NODE)switch(i.nodeName.toLowerCase()){case"mutation":n.mutation.push(i);break;case"comment":if(!t.Comment){console.warn("Missing require for Blockly.Comment, ignoring block comment.");break}n.comment.push(i);break;case"data":n.data.push(i);break;case"title":case"field":n.field.push(i);break;case"value":case"statement":n.input.push(i);break;case"next":n.next.push(i);break;default:console.warn("Ignoring unknown tag: "+i.nodeName)}return n},t.Xml.applyMutationTagNodes_=function(t,e){for(var i,n=!1,o=0;i=t[o];o++)e.domToMutation&&(e.domToMutation(i),e.initSvg&&(n=!0));return n},t.Xml.applyCommentTagNodes_=function(e,i){for(var n,o=0;n=e[o];o++){var r=n.textContent,s="true"==n.getAttribute("pinned"),a=parseInt(n.getAttribute("w"),10);n=parseInt(n.getAttribute("h"),10),i.setCommentText(r),i.commentModel.pinned=s,isNaN(a)||isNaN(n)||(i.commentModel.size=new t.utils.Size(a,n)),s&&i.getCommentIcon&&!i.isInFlyout&&setTimeout(function(){i.getCommentIcon().setVisible(!0)},1)}},t.Xml.applyDataTagNodes_=function(t,e){for(var i,n=0;i=t[n];n++)e.data=i.textContent},t.Xml.applyFieldTagNodes_=function(e,i){for(var n,o=0;n=e[o];o++){var r=n.getAttribute("name");t.Xml.domToField_(i,r,n)}},t.Xml.findChildBlocks_=function(e){for(var i,n={childBlockElement:null,childShadowElement:null},o=0;i=e.childNodes[o];o++)i.nodeType==t.utils.dom.NodeType.ELEMENT_NODE&&("block"==i.nodeName.toLowerCase()?n.childBlockElement=i:"shadow"==i.nodeName.toLowerCase()&&(n.childShadowElement=i));return n},t.Xml.applyInputTagNodes_=function(e,i,n,o){for(var r,s=0;r=e[s];s++){var a=r.getAttribute("name"),l=n.getInput(a);if(!l){console.warn("Ignoring non-existent input "+a+" in block "+o);break}if((r=t.Xml.findChildBlocks_(r)).childBlockElement){if(!l.connection)throw TypeError("Input connection does not exist.");t.Xml.domToBlockHeadless_(r.childBlockElement,i,l.connection,!1)}r.childShadowElement&&l.connection.setShadowDom(r.childShadowElement)}},t.Xml.applyNextTagNodes_=function(e,i,n){for(var o,r=0;o=e[r];r++){if((o=t.Xml.findChildBlocks_(o)).childBlockElement){if(!n.nextConnection)throw TypeError("Next statement does not exist.");if(n.nextConnection.isConnected())throw TypeError("Next statement is already connected.");t.Xml.domToBlockHeadless_(o.childBlockElement,i,n.nextConnection,!0)}o.childShadowElement&&n.nextConnection&&n.nextConnection.setShadowDom(o.childShadowElement)}},t.Xml.domToBlockHeadless_=function(e,i,n,o){var r=e.getAttribute("type");if(!r)throw TypeError("Block type unspecified: "+e.outerHTML);var s=e.getAttribute("id");s=i.newBlock(r,s);var a=t.Xml.mapSupportedXmlTags_(e),l=t.Xml.applyMutationTagNodes_(a.mutation,s);if(t.Xml.applyCommentTagNodes_(a.comment,s),t.Xml.applyDataTagNodes_(a.data,s),n)if(o){if(!s.previousConnection)throw TypeError("Next block does not have previous statement.");n.connect(s.previousConnection)}else if(s.outputConnection)n.connect(s.outputConnection);else{if(!s.previousConnection)throw TypeError("Child block does not have output or previous statement.");n.connect(s.previousConnection)}if(t.Xml.applyFieldTagNodes_(a.field,s),t.Xml.applyInputTagNodes_(a.input,i,s,r),t.Xml.applyNextTagNodes_(a.next,i,s),l&&s.initSvg(),(i=e.getAttribute("inline"))&&s.setInputsInline("true"==i),(i=e.getAttribute("disabled"))&&s.setEnabled("true"!=i&&"disabled"!=i),(i=e.getAttribute("deletable"))&&s.setDeletable("true"==i),(i=e.getAttribute("movable"))&&s.setMovable("true"==i),(i=e.getAttribute("editable"))&&s.setEditable("true"==i),(i=e.getAttribute("collapsed"))&&s.setCollapsed("true"==i),"shadow"==e.nodeName.toLowerCase()){for(e=s.getChildren(!1),i=0;n=e[i];i++)if(!n.isShadow())throw TypeError("Shadow block not allowed non-shadow child.");if(s.getVarModels().length)throw TypeError("Shadow blocks cannot have variable references.");s.setShadow(!0)}return s},t.Xml.domToField_=function(t,e,i){var n=t.getField(e);n?n.fromXml(i):console.warn("Ignoring non-existent field "+e+" in block "+t.type)},t.Xml.deleteNext=function(t){for(var e,i=0;e=t.childNodes[i];i++)if("next"==e.nodeName.toLowerCase()){t.removeChild(e);break}},t.Events.BlockBase=function(e){t.Events.BlockBase.superClass_.constructor.call(this),this.blockId=(this.isBlank=void 0===e)?"":e.id,this.workspaceId=this.isBlank?"":e.workspace.id},t.utils.object.inherits(t.Events.BlockBase,t.Events.Abstract),t.Events.BlockBase.prototype.toJson=function(){var e=t.Events.BlockBase.superClass_.toJson.call(this);return e.blockId=this.blockId,e},t.Events.BlockBase.prototype.fromJson=function(e){t.Events.BlockBase.superClass_.fromJson.call(this,e),this.blockId=e.blockId},t.Events.BlockChange=function(e,i,n,o,r){t.Events.Change.superClass_.constructor.call(this,e),e&&(this.element=void 0===i?"":i,this.name=void 0===n?"":n,this.oldValue=void 0===o?"":o,this.newValue=void 0===r?"":r)},t.utils.object.inherits(t.Events.BlockChange,t.Events.BlockBase),t.Events.Change=t.Events.BlockChange,t.Events.BlockChange.prototype.type=t.Events.CHANGE,t.Events.BlockChange.prototype.toJson=function(){var e=t.Events.BlockChange.superClass_.toJson.call(this);return e.element=this.element,this.name&&(e.name=this.name),e.oldValue=this.oldValue,e.newValue=this.newValue,e},t.Events.BlockChange.prototype.fromJson=function(e){t.Events.BlockChange.superClass_.fromJson.call(this,e),this.element=e.element,this.name=e.name,this.oldValue=e.oldValue,this.newValue=e.newValue},t.Events.BlockChange.prototype.isNull=function(){return this.oldValue==this.newValue},t.Events.BlockChange.prototype.run=function(e){var i=this.getEventWorkspace_().getBlockById(this.blockId);if(i)switch(i.mutator&&i.mutator.setVisible(!1),e=e?this.newValue:this.oldValue,this.element){case"field":(i=i.getField(this.name))?i.setValue(e):console.warn("Can't set non-existent field: "+this.name);break;case"comment":i.setCommentText(e||null);break;case"collapsed":i.setCollapsed(!!e);break;case"disabled":i.setEnabled(!e);break;case"inline":i.setInputsInline(!!e);break;case"mutation":var n="";if(i.mutationToDom&&(n=(n=i.mutationToDom())&&t.Xml.domToText(n)),i.domToMutation){var o=t.Xml.textToDom(e||"<mutation/>");i.domToMutation(o)}t.Events.fire(new t.Events.BlockChange(i,"mutation",null,n,e));break;default:console.warn("Unknown change type: "+this.element)}else console.warn("Can't change non-existent block: "+this.blockId)},t.Events.Create=function(e){t.Events.Create.superClass_.constructor.call(this,e),e&&(e.isShadow()&&(this.recordUndo=!1),this.xml=e.workspace.rendered?t.Xml.blockToDomWithXY(e):t.Xml.blockToDom(e),this.ids=t.Events.getDescendantIds(e))},t.utils.object.inherits(t.Events.Create,t.Events.BlockBase),t.Events.BlockCreate=t.Events.Create,t.Events.Create.prototype.type=t.Events.CREATE,t.Events.Create.prototype.toJson=function(){var e=t.Events.Create.superClass_.toJson.call(this);return e.xml=t.Xml.domToText(this.xml),e.ids=this.ids,this.recordUndo||(e.recordUndo=this.recordUndo),e},t.Events.Create.prototype.fromJson=function(e){t.Events.Create.superClass_.fromJson.call(this,e),this.xml=t.Xml.textToDom(e.xml),this.ids=e.ids,void 0!==e.recordUndo&&(this.recordUndo=e.recordUndo)},t.Events.Create.prototype.run=function(e){var i=this.getEventWorkspace_();if(e)(e=t.utils.xml.createElement("xml")).appendChild(this.xml),t.Xml.domToWorkspace(e,i);else{e=0;for(var n;n=this.ids[e];e++){var o=i.getBlockById(n);o?o.dispose(!1):n==this.blockId&&console.warn("Can't uncreate non-existent block: "+n)}}},t.Events.Delete=function(e){if(t.Events.Delete.superClass_.constructor.call(this,e),e){if(e.getParent())throw Error("Connected blocks cannot be deleted.");e.isShadow()&&(this.recordUndo=!1),this.oldXml=e.workspace.rendered?t.Xml.blockToDomWithXY(e):t.Xml.blockToDom(e),this.ids=t.Events.getDescendantIds(e)}},t.utils.object.inherits(t.Events.Delete,t.Events.BlockBase),t.Events.BlockDelete=t.Events.Delete,t.Events.Delete.prototype.type=t.Events.DELETE,t.Events.Delete.prototype.toJson=function(){var e=t.Events.Delete.superClass_.toJson.call(this);return e.oldXml=t.Xml.domToText(this.oldXml),e.ids=this.ids,this.recordUndo||(e.recordUndo=this.recordUndo),e},t.Events.Delete.prototype.fromJson=function(e){t.Events.Delete.superClass_.fromJson.call(this,e),this.oldXml=t.Xml.textToDom(e.oldXml),this.ids=e.ids,void 0!==e.recordUndo&&(this.recordUndo=e.recordUndo)},t.Events.Delete.prototype.run=function(e){var i=this.getEventWorkspace_();if(e){e=0;for(var n;n=this.ids[e];e++){var o=i.getBlockById(n);o?o.dispose(!1):n==this.blockId&&console.warn("Can't delete non-existent block: "+n)}}else(e=t.utils.xml.createElement("xml")).appendChild(this.oldXml),t.Xml.domToWorkspace(e,i)},t.Events.Move=function(e){t.Events.Move.superClass_.constructor.call(this,e),e&&(e.isShadow()&&(this.recordUndo=!1),e=this.currentLocation_(),this.oldParentId=e.parentId,this.oldInputName=e.inputName,this.oldCoordinate=e.coordinate)},t.utils.object.inherits(t.Events.Move,t.Events.BlockBase),t.Events.BlockMove=t.Events.Move,t.Events.Move.prototype.type=t.Events.MOVE,t.Events.Move.prototype.toJson=function(){var e=t.Events.Move.superClass_.toJson.call(this);return this.newParentId&&(e.newParentId=this.newParentId),this.newInputName&&(e.newInputName=this.newInputName),this.newCoordinate&&(e.newCoordinate=Math.round(this.newCoordinate.x)+","+Math.round(this.newCoordinate.y)),this.recordUndo||(e.recordUndo=this.recordUndo),e},t.Events.Move.prototype.fromJson=function(e){if(t.Events.Move.superClass_.fromJson.call(this,e),this.newParentId=e.newParentId,this.newInputName=e.newInputName,e.newCoordinate){var i=e.newCoordinate.split(",");this.newCoordinate=new t.utils.Coordinate(Number(i[0]),Number(i[1]))}void 0!==e.recordUndo&&(this.recordUndo=e.recordUndo)},t.Events.Move.prototype.recordNew=function(){var t=this.currentLocation_();this.newParentId=t.parentId,this.newInputName=t.inputName,this.newCoordinate=t.coordinate},t.Events.Move.prototype.currentLocation_=function(){var t=this.getEventWorkspace_().getBlockById(this.blockId),e={},i=t.getParent();return i?(e.parentId=i.id,(t=i.getInputWithBlock(t))&&(e.inputName=t.name)):e.coordinate=t.getRelativeToSurfaceXY(),e},t.Events.Move.prototype.isNull=function(){return this.oldParentId==this.newParentId&&this.oldInputName==this.newInputName&&t.utils.Coordinate.equals(this.oldCoordinate,this.newCoordinate)},t.Events.Move.prototype.run=function(e){var i=this.getEventWorkspace_(),n=i.getBlockById(this.blockId);if(n){var o=e?this.newParentId:this.oldParentId,r=e?this.newInputName:this.oldInputName,s=e?this.newCoordinate:this.oldCoordinate;if(e=null,o&&!(e=i.getBlockById(o)))return void console.warn("Can't connect to non-existent block: "+o);if(n.getParent()&&n.unplug(),s)r=n.getRelativeToSurfaceXY(),n.moveBy(s.x-r.x,s.y-r.y);else{if(i=(n=n.outputConnection||n.previousConnection).type,r){if(e=e.getInput(r))var a=e.connection}else i==t.connectionTypes.PREVIOUS_STATEMENT&&(a=e.nextConnection);a?n.connect(a):console.warn("Can't connect to non-existent input: "+r)}}else console.warn("Can't move non-existent block: "+this.blockId)},t.registry.register(t.registry.Type.EVENT,t.Events.CREATE,t.Events.Create),t.registry.register(t.registry.Type.EVENT,t.Events.DELETE,t.Events.Delete),t.registry.register(t.registry.Type.EVENT,t.Events.CHANGE,t.Events.BlockChange),t.registry.register(t.registry.Type.EVENT,t.Events.MOVE,t.Events.Move),t.Events.FinishedLoading=function(e){this.isBlank=void 0===e,this.workspaceId=e?e.id:"",this.group=t.Events.getGroup(),this.recordUndo=!1},t.utils.object.inherits(t.Events.FinishedLoading,t.Events.Abstract),t.Events.FinishedLoading.prototype.type=t.Events.FINISHED_LOADING,t.Events.FinishedLoading.prototype.toJson=function(){var t={type:this.type};return this.group&&(t.group=this.group),this.workspaceId&&(t.workspaceId=this.workspaceId),t},t.Events.FinishedLoading.prototype.fromJson=function(t){this.isBlank=!1,this.workspaceId=t.workspaceId,this.group=t.group},t.registry.register(t.registry.Type.EVENT,t.Events.FINISHED_LOADING,t.Events.FinishedLoading),t.Events.UiBase=function(e){t.Events.UiBase.superClass_.constructor.call(this),this.isBlank=void 0===e,this.workspaceId=e||"",this.recordUndo=!1},t.utils.object.inherits(t.Events.UiBase,t.Events.Abstract),t.Events.UiBase.prototype.isUiEvent=!0,t.Events.Ui=function(e,i,n,o){t.Events.Ui.superClass_.constructor.call(this,e?e.workspace.id:void 0),this.blockId=e?e.id:null,this.element=void 0===i?"":i,this.oldValue=void 0===n?"":n,this.newValue=void 0===o?"":o},t.utils.object.inherits(t.Events.Ui,t.Events.UiBase),t.Events.Ui.prototype.type=t.Events.UI,t.Events.Ui.prototype.toJson=function(){var e=t.Events.Ui.superClass_.toJson.call(this);return e.element=this.element,void 0!==this.newValue&&(e.newValue=this.newValue),this.blockId&&(e.blockId=this.blockId),e},t.Events.Ui.prototype.fromJson=function(e){t.Events.Ui.superClass_.fromJson.call(this,e),this.element=e.element,this.newValue=e.newValue,this.blockId=e.blockId},t.registry.register(t.registry.Type.EVENT,t.Events.UI,t.Events.Ui),t.Events.VarBase=function(e){t.Events.VarBase.superClass_.constructor.call(this),this.varId=(this.isBlank=void 0===e)?"":e.getId(),this.workspaceId=this.isBlank?"":e.workspace.id},t.utils.object.inherits(t.Events.VarBase,t.Events.Abstract),t.Events.VarBase.prototype.toJson=function(){var e=t.Events.VarBase.superClass_.toJson.call(this);return e.varId=this.varId,e},t.Events.VarBase.prototype.fromJson=function(e){t.Events.VarBase.superClass_.toJson.call(this),this.varId=e.varId},t.Events.VarCreate=function(e){t.Events.VarCreate.superClass_.constructor.call(this,e),e&&(this.varType=e.type,this.varName=e.name)},t.utils.object.inherits(t.Events.VarCreate,t.Events.VarBase),t.Events.VarCreate.prototype.type=t.Events.VAR_CREATE,t.Events.VarCreate.prototype.toJson=function(){var e=t.Events.VarCreate.superClass_.toJson.call(this);return e.varType=this.varType,e.varName=this.varName,e},t.Events.VarCreate.prototype.fromJson=function(e){t.Events.VarCreate.superClass_.fromJson.call(this,e),this.varType=e.varType,this.varName=e.varName},t.Events.VarCreate.prototype.run=function(t){var e=this.getEventWorkspace_();t?e.createVariable(this.varName,this.varType,this.varId):e.deleteVariableById(this.varId)},t.Events.VarDelete=function(e){t.Events.VarDelete.superClass_.constructor.call(this,e),e&&(this.varType=e.type,this.varName=e.name)},t.utils.object.inherits(t.Events.VarDelete,t.Events.VarBase),t.Events.VarDelete.prototype.type=t.Events.VAR_DELETE,t.Events.VarDelete.prototype.toJson=function(){var e=t.Events.VarDelete.superClass_.toJson.call(this);return e.varType=this.varType,e.varName=this.varName,e},t.Events.VarDelete.prototype.fromJson=function(e){t.Events.VarDelete.superClass_.fromJson.call(this,e),this.varType=e.varType,this.varName=e.varName},t.Events.VarDelete.prototype.run=function(t){var e=this.getEventWorkspace_();t?e.deleteVariableById(this.varId):e.createVariable(this.varName,this.varType,this.varId)},t.Events.VarRename=function(e,i){t.Events.VarRename.superClass_.constructor.call(this,e),e&&(this.oldName=e.name,this.newName=void 0===i?"":i)},t.utils.object.inherits(t.Events.VarRename,t.Events.VarBase),t.Events.VarRename.prototype.type=t.Events.VAR_RENAME,t.Events.VarRename.prototype.toJson=function(){var e=t.Events.VarRename.superClass_.toJson.call(this);return e.oldName=this.oldName,e.newName=this.newName,e},t.Events.VarRename.prototype.fromJson=function(e){t.Events.VarRename.superClass_.fromJson.call(this,e),this.oldName=e.oldName,this.newName=e.newName},t.Events.VarRename.prototype.run=function(t){var e=this.getEventWorkspace_();t?e.renameVariableById(this.varId,this.newName):e.renameVariableById(this.varId,this.oldName)},t.registry.register(t.registry.Type.EVENT,t.Events.VAR_CREATE,t.Events.VarCreate),t.registry.register(t.registry.Type.EVENT,t.Events.VAR_DELETE,t.Events.VarDelete),t.registry.register(t.registry.Type.EVENT,t.Events.VAR_RENAME,t.Events.VarRename),t.BlockDragSurfaceSvg=function(t){this.container_=t,this.createDom()},t.BlockDragSurfaceSvg.prototype.SVG_=null,t.BlockDragSurfaceSvg.prototype.dragGroup_=null,t.BlockDragSurfaceSvg.prototype.container_=null,t.BlockDragSurfaceSvg.prototype.scale_=1,t.BlockDragSurfaceSvg.prototype.surfaceXY_=null,t.BlockDragSurfaceSvg.prototype.childSurfaceXY_=new t.utils.Coordinate(0,0),t.BlockDragSurfaceSvg.prototype.createDom=function(){this.SVG_||(this.SVG_=t.utils.dom.createSvgElement(t.utils.Svg.SVG,{xmlns:t.utils.dom.SVG_NS,"xmlns:html":t.utils.dom.HTML_NS,"xmlns:xlink":t.utils.dom.XLINK_NS,version:"1.1",class:"blocklyBlockDragSurface"},this.container_),this.dragGroup_=t.utils.dom.createSvgElement(t.utils.Svg.G,{},this.SVG_))},t.BlockDragSurfaceSvg.prototype.setBlocksAndShow=function(e){if(this.dragGroup_.childNodes.length)throw Error("Already dragging a block.");this.dragGroup_.appendChild(e),this.SVG_.style.display="block",this.surfaceXY_=new t.utils.Coordinate(0,0)},t.BlockDragSurfaceSvg.prototype.translateAndScaleGroup=function(t,e,i){this.scale_=i,t=t.toFixed(0),e=e.toFixed(0),this.childSurfaceXY_.x=parseInt(t,10),this.childSurfaceXY_.y=parseInt(e,10),this.dragGroup_.setAttribute("transform","translate("+t+","+e+") scale("+i+")")},t.BlockDragSurfaceSvg.prototype.translateSurfaceInternal_=function(){var e=this.surfaceXY_.x,i=this.surfaceXY_.y;e=e.toFixed(0),i=i.toFixed(0),this.SVG_.style.display="block",t.utils.dom.setCssTransform(this.SVG_,"translate3d("+e+"px, "+i+"px, 0px)")},t.BlockDragSurfaceSvg.prototype.translateBy=function(e,i){this.surfaceXY_=new t.utils.Coordinate(this.surfaceXY_.x+e,this.surfaceXY_.y+i),this.translateSurfaceInternal_()},t.BlockDragSurfaceSvg.prototype.translateSurface=function(e,i){this.surfaceXY_=new t.utils.Coordinate(e*this.scale_,i*this.scale_),this.translateSurfaceInternal_()},t.BlockDragSurfaceSvg.prototype.getSurfaceTranslation=function(){var e=t.utils.getRelativeXY(this.SVG_);return new t.utils.Coordinate(e.x/this.scale_,e.y/this.scale_)},t.BlockDragSurfaceSvg.prototype.getGroup=function(){return this.dragGroup_},t.BlockDragSurfaceSvg.prototype.getSvgRoot=function(){return this.SVG_},t.BlockDragSurfaceSvg.prototype.getCurrentBlock=function(){return this.dragGroup_.firstChild},t.BlockDragSurfaceSvg.prototype.getWsTranslation=function(){return this.childSurfaceXY_.clone()},t.BlockDragSurfaceSvg.prototype.clearAndHide=function(t){if(t?t.appendChild(this.getCurrentBlock()):this.dragGroup_.removeChild(this.getCurrentBlock()),this.SVG_.style.display="none",this.dragGroup_.childNodes.length)throw Error("Drag group was not cleared.");this.surfaceXY_=null},t.Css={},t.Css.injected_=!1,t.Css.register=function(e){if(t.Css.injected_)throw Error("CSS already injected");Array.prototype.push.apply(t.Css.CONTENT,e),e.length=0},t.Css.inject=function(e,i){if(!t.Css.injected_){t.Css.injected_=!0;var n=t.Css.CONTENT.join("\n");t.Css.CONTENT.length=0,e&&(e=i.replace(/[\\/]$/,""),n=n.replace(/<<<PATH>>>/g,e),(e=document.createElement("style")).id="blockly-common-style",n=document.createTextNode(n),e.appendChild(n),document.head.insertBefore(e,document.head.firstChild))}},t.Css.CONTENT=[".blocklySvg {","background-color: #fff;","outline: none;","overflow: hidden;","position: absolute;","display: block;","}",".blocklyWidgetDiv {","display: none;","position: absolute;","z-index: 99999;","}",".injectionDiv {","height: 100%;","position: relative;","overflow: hidden;","touch-action: none;","}",".blocklyNonSelectable {","user-select: none;","-ms-user-select: none;","-webkit-user-select: none;","}",".blocklyWsDragSurface {","display: none;","position: absolute;","top: 0;","left: 0;","}",".blocklyWsDragSurface.blocklyOverflowVisible {","overflow: visible;","}",".blocklyBlockDragSurface {","display: none;","position: absolute;","top: 0;","left: 0;","right: 0;","bottom: 0;","overflow: visible !important;","z-index: 50;","}",".blocklyBlockCanvas.blocklyCanvasTransitioning,",".blocklyBubbleCanvas.blocklyCanvasTransitioning {","transition: transform .5s;","}",".blocklyTooltipDiv {","background-color: #ffffc7;","border: 1px solid #ddc;","box-shadow: 4px 4px 20px 1px rgba(0,0,0,.15);","color: #000;","display: none;","font: 9pt sans-serif;","opacity: .9;","padding: 2px;","position: absolute;","z-index: 100000;","}",".blocklyDropDownDiv {","position: absolute;","left: 0;","top: 0;","z-index: 1000;","display: none;","border: 1px solid;","border-color: #dadce0;","background-color: #fff;","border-radius: 2px;","padding: 4px;","box-shadow: 0 0 3px 1px rgba(0,0,0,.3);","}",".blocklyDropDownDiv.blocklyFocused {","box-shadow: 0 0 6px 1px rgba(0,0,0,.3);","}",".blocklyDropDownContent {","max-height: 300px;","overflow: auto;","overflow-x: hidden;","position: relative;","}",".blocklyDropDownArrow {","position: absolute;","left: 0;","top: 0;","width: 16px;","height: 16px;","z-index: -1;","background-color: inherit;","border-color: inherit;","}",".blocklyDropDownButton {","display: inline-block;","float: left;","padding: 0;","margin: 4px;","border-radius: 4px;","outline: none;","border: 1px solid;","transition: box-shadow .1s;","cursor: pointer;","}",".blocklyArrowTop {","border-top: 1px solid;","border-left: 1px solid;","border-top-left-radius: 4px;","border-color: inherit;","}",".blocklyArrowBottom {","border-bottom: 1px solid;","border-right: 1px solid;","border-bottom-right-radius: 4px;","border-color: inherit;","}",".blocklyResizeSE {","cursor: se-resize;","fill: #aaa;","}",".blocklyResizeSW {","cursor: sw-resize;","fill: #aaa;","}",".blocklyResizeLine {","stroke: #515A5A;","stroke-width: 1;","}",".blocklyHighlightedConnectionPath {","fill: none;","stroke: #fc3;","stroke-width: 4px;","}",".blocklyPathLight {","fill: none;","stroke-linecap: round;","stroke-width: 1;","}",".blocklySelected>.blocklyPathLight {","display: none;","}",".blocklyDraggable {",'cursor: url("<<<PATH>>>/handopen.cur"), auto;',"cursor: grab;","cursor: -webkit-grab;","}",".blocklyDragging {",'cursor: url("<<<PATH>>>/handclosed.cur"), auto;',"cursor: grabbing;","cursor: -webkit-grabbing;","}",".blocklyDraggable:active {",'cursor: url("<<<PATH>>>/handclosed.cur"), auto;',"cursor: grabbing;","cursor: -webkit-grabbing;","}",".blocklyBlockDragSurface .blocklyDraggable {",'cursor: url("<<<PATH>>>/handclosed.cur"), auto;',"cursor: grabbing;","cursor: -webkit-grabbing;","}",".blocklyDragging.blocklyDraggingDelete {",'cursor: url("<<<PATH>>>/handdelete.cur"), auto;',"}",".blocklyDragging>.blocklyPath,",".blocklyDragging>.blocklyPathLight {","fill-opacity: .8;","stroke-opacity: .8;","}",".blocklyDragging>.blocklyPathDark {","display: none;","}",".blocklyDisabled>.blocklyPath {","fill-opacity: .5;","stroke-opacity: .5;","}",".blocklyDisabled>.blocklyPathLight,",".blocklyDisabled>.blocklyPathDark {","display: none;","}",".blocklyInsertionMarker>.blocklyPath,",".blocklyInsertionMarker>.blocklyPathLight,",".blocklyInsertionMarker>.blocklyPathDark {","fill-opacity: .2;","stroke: none;","}",".blocklyMultilineText {","font-family: monospace;","}",".blocklyNonEditableText>text {","pointer-events: none;","}",".blocklyFlyout {","position: absolute;","z-index: 20;","}",".blocklyText text {","cursor: default;","}",".blocklySvg text,",".blocklyBlockDragSurface text {","user-select: none;","-ms-user-select: none;","-webkit-user-select: none;","cursor: inherit;","}",".blocklyHidden {","display: none;","}",".blocklyFieldDropdown:not(.blocklyHidden) {","display: block;","}",".blocklyIconGroup {","cursor: default;","}",".blocklyIconGroup:not(:hover),",".blocklyIconGroupReadonly {","opacity: .6;","}",".blocklyIconShape {","fill: #00f;","stroke: #fff;","stroke-width: 1px;","}",".blocklyIconSymbol {","fill: #fff;","}",".blocklyMinimalBody {","margin: 0;","padding: 0;","}",".blocklyHtmlInput {","border: none;","border-radius: 4px;","height: 100%;","margin: 0;","outline: none;","padding: 0;","width: 100%;","text-align: center;","display: block;","box-sizing: border-box;","}",".blocklyHtmlInput::-ms-clear {","display: none;","}",".blocklyMainBackground {","stroke-width: 1;","stroke: #c6c6c6;","}",".blocklyMutatorBackground {","fill: #fff;","stroke: #ddd;","stroke-width: 1;","}",".blocklyFlyoutBackground {","fill: #ddd;","fill-opacity: .8;","}",".blocklyMainWorkspaceScrollbar {","z-index: 20;","}",".blocklyFlyoutScrollbar {","z-index: 30;","}",".blocklyScrollbarHorizontal,",".blocklyScrollbarVertical {","position: absolute;","outline: none;","}",".blocklyScrollbarBackground {","opacity: 0;","}",".blocklyScrollbarHandle {","fill: #ccc;","}",".blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,",".blocklyScrollbarHandle:hover {","fill: #bbb;","}",".blocklyFlyout .blocklyScrollbarHandle {","fill: #bbb;","}",".blocklyFlyout .blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,",".blocklyFlyout .blocklyScrollbarHandle:hover {","fill: #aaa;","}",".blocklyInvalidInput {","background: #faa;","}",".blocklyVerticalMarker {","stroke-width: 3px;","fill: rgba(255,255,255,.5);","pointer-events: none;","}",".blocklyComputeCanvas {","position: absolute;","width: 0;","height: 0;","}",".blocklyNoPointerEvents {","pointer-events: none;","}",".blocklyContextMenu {","border-radius: 4px;","max-height: 100%;","}",".blocklyDropdownMenu {","border-radius: 2px;","padding: 0 !important;","}",".blocklyDropdownMenu .blocklyMenuItem {","padding-left: 28px;","}",".blocklyDropdownMenu .blocklyMenuItemRtl {","padding-left: 5px;","padding-right: 28px;","}",".blocklyWidgetDiv .blocklyMenu {","background: #fff;","border: 1px solid transparent;","box-shadow: 0 0 3px 1px rgba(0,0,0,.3);","font: normal 13px Arial, sans-serif;","margin: 0;","outline: none;","padding: 4px 0;","position: absolute;","overflow-y: auto;","overflow-x: hidden;","max-height: 100%;","z-index: 20000;","}",".blocklyWidgetDiv .blocklyMenu.blocklyFocused {","box-shadow: 0 0 6px 1px rgba(0,0,0,.3);","}",".blocklyDropDownDiv .blocklyMenu {","background: inherit;","border: inherit;",'font: normal 13px "Helvetica Neue", Helvetica, sans-serif;',"outline: none;","position: relative;","z-index: 20000;","}",".blocklyMenuItem {","border: none;","color: #000;","cursor: pointer;","list-style: none;","margin: 0;","min-width: 7em;","padding: 6px 15px;","white-space: nowrap;","}",".blocklyMenuItemDisabled {","color: #ccc;","cursor: inherit;","}",".blocklyMenuItemHighlight {","background-color: rgba(0,0,0,.1);","}",".blocklyMenuItemCheckbox {","height: 16px;","position: absolute;","width: 16px;","}",".blocklyMenuItemSelected .blocklyMenuItemCheckbox {","background: url(<<<PATH>>>/sprites.png) no-repeat -48px -16px;","float: left;","margin-left: -24px;","position: static;","}",".blocklyMenuItemRtl .blocklyMenuItemCheckbox {","float: right;","margin-right: -24px;","}"],t.Grid=function(t,e){this.gridPattern_=t,this.spacing_=e.spacing,this.length_=e.length,this.line2_=(this.line1_=t.firstChild)&&this.line1_.nextSibling,this.snapToGrid_=e.snap},t.Grid.prototype.scale_=1,t.Grid.prototype.dispose=function(){this.gridPattern_=null},t.Grid.prototype.shouldSnap=function(){return this.snapToGrid_},t.Grid.prototype.getSpacing=function(){return this.spacing_},t.Grid.prototype.getPatternId=function(){return this.gridPattern_.id},t.Grid.prototype.update=function(t){this.scale_=t;var e=this.spacing_*t||100;this.gridPattern_.setAttribute("width",e),this.gridPattern_.setAttribute("height",e);var i=(e=Math.floor(this.spacing_/2)+.5)-this.length_/2,n=e+this.length_/2;e*=t,i*=t,n*=t,this.setLineAttributes_(this.line1_,t,i,n,e,e),this.setLineAttributes_(this.line2_,t,e,e,i,n)},t.Grid.prototype.setLineAttributes_=function(t,e,i,n,o,r){t&&(t.setAttribute("stroke-width",e),t.setAttribute("x1",i),t.setAttribute("y1",o),t.setAttribute("x2",n),t.setAttribute("y2",r))},t.Grid.prototype.moveTo=function(e,i){this.gridPattern_.setAttribute("x",e),this.gridPattern_.setAttribute("y",i),(t.utils.userAgent.IE||t.utils.userAgent.EDGE)&&this.update(this.scale_)},t.Grid.createDom=function(e,i,n){return e=t.utils.dom.createSvgElement(t.utils.Svg.PATTERN,{id:"blocklyGridPattern"+e,patternUnits:"userSpaceOnUse"},n),0<i.length&&0<i.spacing?(t.utils.dom.createSvgElement(t.utils.Svg.LINE,{stroke:i.colour},e),1<i.length&&t.utils.dom.createSvgElement(t.utils.Svg.LINE,{stroke:i.colour},e)):t.utils.dom.createSvgElement(t.utils.Svg.LINE,{},e),e},t.Theme=function(e,i,n,o){this.name=e,this.blockStyles=i||Object.create(null),this.categoryStyles=n||Object.create(null),this.componentStyles=o||Object.create(null),this.fontStyle=Object.create(null),this.startHats=null,t.registry.register(t.registry.Type.THEME,e,this)},t.Theme.prototype.getClassName=function(){return this.name+"-theme"},t.Theme.prototype.setBlockStyle=function(t,e){this.blockStyles[t]=e},t.Theme.prototype.setCategoryStyle=function(t,e){this.categoryStyles[t]=e},t.Theme.prototype.getComponentStyle=function(t){return(t=this.componentStyles[t])&&"string"==typeof t&&this.getComponentStyle(t)?this.getComponentStyle(t):t?String(t):null},t.Theme.prototype.setComponentStyle=function(t,e){this.componentStyles[t]=e},t.Theme.prototype.setFontStyle=function(t){this.fontStyle=t},t.Theme.prototype.setStartHats=function(t){this.startHats=t},t.Theme.defineTheme=function(e,i){var n=new t.Theme(e),o=i.base;return o&&("string"==typeof o&&(o=t.registry.getObject(t.registry.Type.THEME,o)),o instanceof t.Theme&&(t.utils.object.deepMerge(n,o),n.name=e)),t.utils.object.deepMerge(n.blockStyles,i.blockStyles),t.utils.object.deepMerge(n.categoryStyles,i.categoryStyles),t.utils.object.deepMerge(n.componentStyles,i.componentStyles),t.utils.object.deepMerge(n.fontStyle,i.fontStyle),null!=i.startHats&&(n.startHats=i.startHats),n},t.Themes={},t.Themes.Classic={},t.Themes.Classic.defaultBlockStyles={colour_blocks:{colourPrimary:"20"},list_blocks:{colourPrimary:"260"},logic_blocks:{colourPrimary:"210"},loop_blocks:{colourPrimary:"120"},math_blocks:{colourPrimary:"230"},procedure_blocks:{colourPrimary:"290"},text_blocks:{colourPrimary:"160"},variable_blocks:{colourPrimary:"330"},variable_dynamic_blocks:{colourPrimary:"310"},hat_blocks:{colourPrimary:"330",hat:"cap"}},t.Themes.Classic.categoryStyles={colour_category:{colour:"20"},list_category:{colour:"260"},logic_category:{colour:"210"},loop_category:{colour:"120"},math_category:{colour:"230"},procedure_category:{colour:"290"},text_category:{colour:"160"},variable_category:{colour:"330"},variable_dynamic_category:{colour:"310"}},t.Themes.Classic=new t.Theme("classic",t.Themes.Classic.defaultBlockStyles,t.Themes.Classic.categoryStyles),t.utils.IdGenerator={},t.utils.IdGenerator.nextId_=0,t.utils.IdGenerator.getNextUniqueId=function(){return"blockly-"+(t.utils.IdGenerator.nextId_++).toString(36)},t.utils.Metrics=function(){},t.utils.toolbox={},t.utils.toolbox.CATEGORY_TOOLBOX_KIND="categoryToolbox",t.utils.toolbox.FLYOUT_TOOLBOX_KIND="flyoutToolbox",t.utils.toolbox.Position={TOP:0,BOTTOM:1,LEFT:2,RIGHT:3},t.utils.toolbox.convertToolboxDefToJson=function(e){return e?((e instanceof Element||"string"==typeof e)&&(e=t.utils.toolbox.parseToolboxTree(e),e=t.utils.toolbox.convertToToolboxJson_(e)),t.utils.toolbox.validateToolbox_(e),e):null},t.utils.toolbox.validateToolbox_=function(e){var i=e.kind;if(e=e.contents,i&&i!=t.utils.toolbox.FLYOUT_TOOLBOX_KIND&&i!=t.utils.toolbox.CATEGORY_TOOLBOX_KIND)throw Error("Invalid toolbox kind "+i+". Please supply either "+t.utils.toolbox.FLYOUT_TOOLBOX_KIND+" or "+t.utils.toolbox.CATEGORY_TOOLBOX_KIND);if(!e)throw Error("Toolbox must have a contents attribute.")},t.utils.toolbox.convertFlyoutDefToJsonArray=function(e){return e?e.contents?e.contents:Array.isArray(e)&&0<e.length&&!e[0].nodeType?e:t.utils.toolbox.xmlToJsonArray_(e):[]},t.utils.toolbox.hasCategories=function(e){if(!e)return!1;var i=e.kind;return i?i==t.utils.toolbox.CATEGORY_TOOLBOX_KIND:!!e.contents.filter(function(t){return"CATEGORY"==t.kind.toUpperCase()}).length},t.utils.toolbox.isCategoryCollapsible=function(t){return!(!t||!t.contents)&&!!t.contents.filter(function(t){return"CATEGORY"==t.kind.toUpperCase()}).length},t.utils.toolbox.convertToToolboxJson_=function(e){var i={contents:t.utils.toolbox.xmlToJsonArray_(e)};return e instanceof Node&&t.utils.toolbox.addAttributes_(e,i),i},t.utils.toolbox.xmlToJsonArray_=function(e){var i,n=[],o=e.childNodes;for(o||(o=e),e=0;i=o[e];e++)if(i.tagName){var r={},s=i.tagName.toUpperCase();r.kind=s,"BLOCK"==s?r.blockxml=i:i.childNodes&&0<i.childNodes.length&&(r.contents=t.utils.toolbox.xmlToJsonArray_(i)),t.utils.toolbox.addAttributes_(i,r),n.push(r)}return n},t.utils.toolbox.addAttributes_=function(t,e){for(var i=0;i<t.attributes.length;i++){var n=t.attributes[i];-1<n.nodeName.indexOf("css-")?(e.cssconfig=e.cssconfig||{},e.cssconfig[n.nodeName.replace("css-","")]=n.value):e[n.nodeName]=n.value}},t.utils.toolbox.parseToolboxTree=function(e){if(e){if("string"!=typeof e&&(t.utils.userAgent.IE&&e.outerHTML?e=e.outerHTML:e instanceof Element||(e=null)),"string"==typeof e&&"xml"!=(e=t.Xml.textToDom(e)).nodeName.toLowerCase())throw TypeError("Toolbox should be an <xml> document.")}else e=null;return e},t.Options=function(e){var i=!!e.readOnly;if(i)var n=null,o=!1,r=!1,s=!1,a=!1,l=!1,c=!1;else{n=t.utils.toolbox.convertToolboxDefToJson(e.toolbox),o=t.utils.toolbox.hasCategories(n),void 0===(r=e.trashcan)&&(r=o);var u=e.maxTrashcanContents;r?void 0===u&&(u=32):u=0,void 0===(s=e.collapse)&&(s=o),void 0===(a=e.comments)&&(a=o),void 0===(l=e.disable)&&(l=o),void 0===(c=e.sounds)&&(c=!0)}var h=!!e.rtl,p=e.horizontalLayout;void 0===p&&(p=!1);var d=e.toolboxPosition;d="end"!==d,d=p?d?t.utils.toolbox.Position.TOP:t.utils.toolbox.Position.BOTTOM:d==h?t.utils.toolbox.Position.RIGHT:t.utils.toolbox.Position.LEFT;var f=e.css;void 0===f&&(f=!0);var g="https://blockly-demo.appspot.com/static/media/";e.media?g=e.media:e.path&&(g=e.path+"media/");var _=void 0===e.oneBasedIndex||!!e.oneBasedIndex,m=e.renderer||"geras",v=e.plugins||{};this.RTL=h,this.oneBasedIndex=_,this.collapse=s,this.comments=a,this.disable=l,this.readOnly=i,this.maxBlocks=e.maxBlocks||1/0,this.maxInstances=e.maxInstances,this.pathToMedia=g,this.hasCategories=o,this.moveOptions=t.Options.parseMoveOptions_(e,o),this.hasScrollbars=!!this.moveOptions.scrollbars,this.hasTrashcan=r,this.maxTrashcanContents=u,this.hasSounds=c,this.hasCss=f,this.horizontalLayout=p,this.languageTree=n,this.gridOptions=t.Options.parseGridOptions_(e),this.zoomOptions=t.Options.parseZoomOptions_(e),this.toolboxPosition=d,this.theme=t.Options.parseThemeOptions_(e),this.renderer=m,this.rendererOverrides=e.rendererOverrides,this.gridPattern=null,this.parentWorkspace=e.parentWorkspace,this.plugins=v},t.BlocklyOptions=function(){},t.Options.parseMoveOptions_=function(t,e){var i=t.move||{},n={};return void 0===i.scrollbars&&void 0===t.scrollbars?n.scrollbars=e:"object"==typeof i.scrollbars?(n.scrollbars={},n.scrollbars.horizontal=!!i.scrollbars.horizontal,n.scrollbars.vertical=!!i.scrollbars.vertical,n.scrollbars.horizontal&&n.scrollbars.vertical?n.scrollbars=!0:n.scrollbars.horizontal||n.scrollbars.vertical||(n.scrollbars=!1)):n.scrollbars=!!i.scrollbars||!!t.scrollbars,n.wheel=n.scrollbars&&void 0!==i.wheel?!!i.wheel:"object"==typeof n.scrollbars,n.drag=!!n.scrollbars&&(void 0===i.drag||!!i.drag),n},t.Options.parseZoomOptions_=function(t){t=t.zoom||{};var e={};return e.controls=void 0!==t.controls&&!!t.controls,e.wheel=void 0!==t.wheel&&!!t.wheel,e.startScale=void 0===t.startScale?1:Number(t.startScale),e.maxScale=void 0===t.maxScale?3:Number(t.maxScale),e.minScale=void 0===t.minScale?.3:Number(t.minScale),e.scaleSpeed=void 0===t.scaleSpeed?1.2:Number(t.scaleSpeed),e.pinch=void 0===t.pinch?e.wheel||e.controls:!!t.pinch,e},t.Options.parseGridOptions_=function(t){t=t.grid||{};var e={};return e.spacing=Number(t.spacing)||0,e.colour=t.colour||"#888",e.length=void 0===t.length?1:Number(t.length),e.snap=0<e.spacing&&!!t.snap,e},t.Options.parseThemeOptions_=function(e){return"string"==typeof(e=e.theme||t.Themes.Classic)?t.registry.getObject(t.registry.Type.THEME,e):e instanceof t.Theme?e:t.Theme.defineTheme(e.name||"builtin"+t.utils.IdGenerator.getNextUniqueId(),e)},t.Options.parseToolboxTree=function(e){return t.utils.deprecation.warn("Blockly.Options.parseToolboxTree","September 2020","September 2021","Blockly.utils.toolbox.parseToolboxTree"),t.utils.toolbox.parseToolboxTree(e)},t.ScrollbarPair=function(e,i,n,o,r){this.workspace_=e,i=void 0===i||i,n=void 0===n||n;var s=i&&n;i&&(this.hScroll=new t.Scrollbar(e,!0,s,o,r)),n&&(this.vScroll=new t.Scrollbar(e,!1,s,o,r)),s&&(this.corner_=t.utils.dom.createSvgElement(t.utils.Svg.RECT,{height:t.Scrollbar.scrollbarThickness,width:t.Scrollbar.scrollbarThickness,class:"blocklyScrollbarBackground"},null),t.utils.dom.insertAfter(this.corner_,e.getBubbleCanvas())),this.oldHostMetrics_=null},t.ScrollbarPair.prototype.dispose=function(){t.utils.dom.removeNode(this.corner_),this.oldHostMetrics_=this.workspace_=this.corner_=null,this.hScroll&&(this.hScroll.dispose(),this.hScroll=null),this.vScroll&&(this.vScroll.dispose(),this.vScroll=null)},t.ScrollbarPair.prototype.resize=function(){var e=this.workspace_.getMetrics();if(e){var i=!1,n=!1;if(this.oldHostMetrics_&&this.oldHostMetrics_.viewWidth==e.viewWidth&&this.oldHostMetrics_.viewHeight==e.viewHeight&&this.oldHostMetrics_.absoluteTop==e.absoluteTop&&this.oldHostMetrics_.absoluteLeft==e.absoluteLeft?(this.oldHostMetrics_&&this.oldHostMetrics_.scrollWidth==e.scrollWidth&&this.oldHostMetrics_.viewLeft==e.viewLeft&&this.oldHostMetrics_.scrollLeft==e.scrollLeft||(i=!0),this.oldHostMetrics_&&this.oldHostMetrics_.scrollHeight==e.scrollHeight&&this.oldHostMetrics_.viewTop==e.viewTop&&this.oldHostMetrics_.scrollTop==e.scrollTop||(n=!0)):n=i=!0,i||n){try{t.Events.disable(),this.hScroll&&i&&this.hScroll.resize(e),this.vScroll&&n&&this.vScroll.resize(e)}finally{t.Events.enable()}this.workspace_.maybeFireViewportChangeEvent()}this.hScroll&&this.vScroll&&(this.oldHostMetrics_&&this.oldHostMetrics_.viewWidth==e.viewWidth&&this.oldHostMetrics_.absoluteLeft==e.absoluteLeft||this.corner_.setAttribute("x",this.vScroll.position.x),this.oldHostMetrics_&&this.oldHostMetrics_.viewHeight==e.viewHeight&&this.oldHostMetrics_.absoluteTop==e.absoluteTop||this.corner_.setAttribute("y",this.hScroll.position.y)),this.oldHostMetrics_=e}},t.ScrollbarPair.prototype.canScrollHorizontally=function(){return!!this.hScroll},t.ScrollbarPair.prototype.canScrollVertically=function(){return!!this.vScroll},t.ScrollbarPair.prototype.setOrigin=function(t,e){this.hScroll&&this.hScroll.setOrigin(t,e),this.vScroll&&this.vScroll.setOrigin(t,e)},t.ScrollbarPair.prototype.set=function(t,e,i){this.hScroll&&this.hScroll.set(t,!1),this.vScroll&&this.vScroll.set(e,!1),(i||void 0===i)&&(t={},this.hScroll&&(t.x=this.hScroll.getRatio_()),this.vScroll&&(t.y=this.vScroll.getRatio_()),this.workspace_.setMetrics(t))},t.ScrollbarPair.prototype.setX=function(t){this.hScroll&&this.hScroll.set(t,!0)},t.ScrollbarPair.prototype.setY=function(t){this.vScroll&&this.vScroll.set(t,!0)},t.ScrollbarPair.prototype.setContainerVisible=function(t){this.hScroll&&this.hScroll.setContainerVisible(t),this.vScroll&&this.vScroll.setContainerVisible(t)},t.ScrollbarPair.prototype.isVisible=function(){var t=!1;return this.hScroll&&(t=this.hScroll.isVisible()),this.vScroll&&(t=t||this.vScroll.isVisible()),t},t.ScrollbarPair.prototype.resizeContent=function(t){this.hScroll&&this.hScroll.resizeContentHorizontal(t),this.vScroll&&this.vScroll.resizeContentVertical(t)},t.ScrollbarPair.prototype.resizeView=function(t){this.hScroll&&this.hScroll.resizeViewHorizontal(t),this.vScroll&&this.vScroll.resizeViewVertical(t)},t.Scrollbar=function(e,i,n,o,r){this.workspace_=e,this.pair_=n||!1,this.horizontal_=i,this.margin_=void 0!==r?r:t.Scrollbar.DEFAULT_SCROLLBAR_MARGIN,this.ratio=this.oldHostMetrics_=null,this.createDom_(o),this.position=new t.utils.Coordinate(0,0),e=t.Scrollbar.scrollbarThickness,i?(this.svgBackground_.setAttribute("height",e),this.outerSvg_.setAttribute("height",e),this.svgHandle_.setAttribute("height",e-5),this.svgHandle_.setAttribute("y",2.5),this.lengthAttribute_="width",this.positionAttribute_="x"):(this.svgBackground_.setAttribute("width",e),this.outerSvg_.setAttribute("width",e),this.svgHandle_.setAttribute("width",e-5),this.svgHandle_.setAttribute("x",2.5),this.lengthAttribute_="height",this.positionAttribute_="y"),this.onMouseDownBarWrapper_=t.browserEvents.conditionalBind(this.svgBackground_,"mousedown",this,this.onMouseDownBar_),this.onMouseDownHandleWrapper_=t.browserEvents.conditionalBind(this.svgHandle_,"mousedown",this,this.onMouseDownHandle_)},t.Scrollbar.prototype.origin_=new t.utils.Coordinate(0,0),t.Scrollbar.prototype.startDragMouse_=0,t.Scrollbar.prototype.scrollbarLength_=0,t.Scrollbar.prototype.handleLength_=0,t.Scrollbar.prototype.handlePosition_=0,t.Scrollbar.prototype.isVisible_=!0,t.Scrollbar.prototype.containerVisible_=!0,t.Scrollbar.scrollbarThickness=15,t.Touch.TOUCH_ENABLED&&(t.Scrollbar.scrollbarThickness=25),t.Scrollbar.DEFAULT_SCROLLBAR_MARGIN=.5,t.Scrollbar.metricsAreEquivalent_=function(t,e){return t.viewWidth==e.viewWidth&&t.viewHeight==e.viewHeight&&t.viewLeft==e.viewLeft&&t.viewTop==e.viewTop&&t.absoluteTop==e.absoluteTop&&t.absoluteLeft==e.absoluteLeft&&t.scrollWidth==e.scrollWidth&&t.scrollHeight==e.scrollHeight&&t.scrollLeft==e.scrollLeft&&t.scrollTop==e.scrollTop},t.Scrollbar.prototype.dispose=function(){this.cleanUp_(),t.browserEvents.unbind(this.onMouseDownBarWrapper_),this.onMouseDownBarWrapper_=null,t.browserEvents.unbind(this.onMouseDownHandleWrapper_),this.onMouseDownHandleWrapper_=null,t.utils.dom.removeNode(this.outerSvg_),this.svgBackground_=this.svgGroup_=this.outerSvg_=null,this.svgHandle_&&(this.workspace_.getThemeManager().unsubscribe(this.svgHandle_),this.svgHandle_=null),this.workspace_=null},t.Scrollbar.prototype.constrainHandleLength_=function(t){return 0>=t||isNaN(t)?0:Math.min(t,this.scrollbarLength_)},t.Scrollbar.prototype.setHandleLength_=function(t){this.handleLength_=t,this.svgHandle_.setAttribute(this.lengthAttribute_,this.handleLength_)},t.Scrollbar.prototype.constrainHandlePosition_=function(t){return 0>=t||isNaN(t)?0:Math.min(t,this.scrollbarLength_-this.handleLength_)},t.Scrollbar.prototype.setHandlePosition=function(t){this.handlePosition_=t,this.svgHandle_.setAttribute(this.positionAttribute_,this.handlePosition_)},t.Scrollbar.prototype.setScrollbarLength_=function(t){this.scrollbarLength_=t,this.outerSvg_.setAttribute(this.lengthAttribute_,this.scrollbarLength_),this.svgBackground_.setAttribute(this.lengthAttribute_,this.scrollbarLength_)},t.Scrollbar.prototype.setPosition=function(e,i){this.position.x=e,this.position.y=i,t.utils.dom.setCssTransform(this.outerSvg_,"translate("+(this.position.x+this.origin_.x)+"px,"+(this.position.y+this.origin_.y)+"px)")},t.Scrollbar.prototype.resize=function(e){(e||(e=this.workspace_.getMetrics()))&&(this.oldHostMetrics_&&t.Scrollbar.metricsAreEquivalent_(e,this.oldHostMetrics_)||(this.horizontal_?this.resizeHorizontal_(e):this.resizeVertical_(e),this.oldHostMetrics_=e,this.updateMetrics_()))},t.Scrollbar.prototype.requiresViewResize_=function(t){return!this.oldHostMetrics_||(this.oldHostMetrics_.viewWidth!==t.viewWidth||this.oldHostMetrics_.viewHeight!==t.viewHeight||this.oldHostMetrics_.absoluteLeft!==t.absoluteLeft||this.oldHostMetrics_.absoluteTop!==t.absoluteTop)},t.Scrollbar.prototype.resizeHorizontal_=function(t){this.requiresViewResize_(t)?this.resizeViewHorizontal(t):this.resizeContentHorizontal(t)},t.Scrollbar.prototype.resizeViewHorizontal=function(e){var i=e.viewWidth-2*this.margin_;this.pair_&&(i-=t.Scrollbar.scrollbarThickness),this.setScrollbarLength_(Math.max(0,i)),i=e.absoluteLeft+this.margin_,this.pair_&&this.workspace_.RTL&&(i+=t.Scrollbar.scrollbarThickness),this.setPosition(i,e.absoluteTop+e.viewHeight-t.Scrollbar.scrollbarThickness-this.margin_),this.resizeContentHorizontal(e)},t.Scrollbar.prototype.resizeContentHorizontal=function(t){if(t.viewWidth>=t.scrollWidth)this.setHandleLength_(this.scrollbarLength_),this.setHandlePosition(0),this.pair_||this.setVisible(!1);else{this.pair_||this.setVisible(!0);var e=this.scrollbarLength_*t.viewWidth/t.scrollWidth;e=this.constrainHandleLength_(e),this.setHandleLength_(e),e=t.scrollWidth-t.viewWidth;var i=this.scrollbarLength_-this.handleLength_;t=(t.viewLeft-t.scrollLeft)/e*i,t=this.constrainHandlePosition_(t),this.setHandlePosition(t),this.ratio=i/e}},t.Scrollbar.prototype.resizeVertical_=function(t){this.requiresViewResize_(t)?this.resizeViewVertical(t):this.resizeContentVertical(t)},t.Scrollbar.prototype.resizeViewVertical=function(e){var i=e.viewHeight-2*this.margin_;this.pair_&&(i-=t.Scrollbar.scrollbarThickness),this.setScrollbarLength_(Math.max(0,i)),this.setPosition(this.workspace_.RTL?e.absoluteLeft+this.margin_:e.absoluteLeft+e.viewWidth-t.Scrollbar.scrollbarThickness-this.margin_,e.absoluteTop+this.margin_),this.resizeContentVertical(e)},t.Scrollbar.prototype.resizeContentVertical=function(t){if(t.viewHeight>=t.scrollHeight)this.setHandleLength_(this.scrollbarLength_),this.setHandlePosition(0),this.pair_||this.setVisible(!1);else{this.pair_||this.setVisible(!0);var e=this.scrollbarLength_*t.viewHeight/t.scrollHeight;e=this.constrainHandleLength_(e),this.setHandleLength_(e),e=t.scrollHeight-t.viewHeight;var i=this.scrollbarLength_-this.handleLength_;t=(t.viewTop-t.scrollTop)/e*i,t=this.constrainHandlePosition_(t),this.setHandlePosition(t),this.ratio=i/e}},t.Scrollbar.prototype.createDom_=function(e){var i="blocklyScrollbar"+(this.horizontal_?"Horizontal":"Vertical");e&&(i+=" "+e),this.outerSvg_=t.utils.dom.createSvgElement(t.utils.Svg.SVG,{class:i},null),this.svgGroup_=t.utils.dom.createSvgElement(t.utils.Svg.G,{},this.outerSvg_),this.svgBackground_=t.utils.dom.createSvgElement(t.utils.Svg.RECT,{class:"blocklyScrollbarBackground"},this.svgGroup_),e=Math.floor((t.Scrollbar.scrollbarThickness-5)/2),this.svgHandle_=t.utils.dom.createSvgElement(t.utils.Svg.RECT,{class:"blocklyScrollbarHandle",rx:e,ry:e},this.svgGroup_),this.workspace_.getThemeManager().subscribe(this.svgHandle_,"scrollbarColour","fill"),this.workspace_.getThemeManager().subscribe(this.svgHandle_,"scrollbarOpacity","fill-opacity"),t.utils.dom.insertAfter(this.outerSvg_,this.workspace_.getParentSvg())},t.Scrollbar.prototype.isVisible=function(){return this.isVisible_},t.Scrollbar.prototype.setContainerVisible=function(t){var e=t!=this.containerVisible_;this.containerVisible_=t,e&&this.updateDisplay_()},t.Scrollbar.prototype.setVisible=function(t){var e=t!=this.isVisible();if(this.pair_)throw Error("Unable to toggle visibility of paired scrollbars.");this.isVisible_=t,e&&this.updateDisplay_()},t.Scrollbar.prototype.updateDisplay_=function(){this.containerVisible_&&this.isVisible()?this.outerSvg_.setAttribute("display","block"):this.outerSvg_.setAttribute("display","none")},t.Scrollbar.prototype.onMouseDownBar_=function(e){if(this.workspace_.markFocused(),t.Touch.clearTouchIdentifier(),this.cleanUp_(),t.utils.isRightButton(e))e.stopPropagation();else{var i=t.utils.mouseToSvg(e,this.workspace_.getParentSvg(),this.workspace_.getInverseScreenCTM());i=this.horizontal_?i.x:i.y;var n=t.utils.getInjectionDivXY_(this.svgHandle_);n=this.horizontal_?n.x:n.y;var o=this.handlePosition_,r=.95*this.handleLength_;i<=n?o-=r:i>=n+this.handleLength_&&(o+=r),this.setHandlePosition(this.constrainHandlePosition_(o)),this.updateMetrics_(),e.stopPropagation(),e.preventDefault()}},t.Scrollbar.prototype.onMouseDownHandle_=function(e){this.workspace_.markFocused(),this.cleanUp_(),t.utils.isRightButton(e)?e.stopPropagation():(this.startDragHandle=this.handlePosition_,this.workspace_.setupDragSurface(),this.startDragMouse_=this.horizontal_?e.clientX:e.clientY,t.Scrollbar.onMouseUpWrapper_=t.browserEvents.conditionalBind(document,"mouseup",this,this.onMouseUpHandle_),t.Scrollbar.onMouseMoveWrapper_=t.browserEvents.conditionalBind(document,"mousemove",this,this.onMouseMoveHandle_),e.stopPropagation(),e.preventDefault())},t.Scrollbar.prototype.onMouseMoveHandle_=function(t){this.setHandlePosition(this.constrainHandlePosition_(this.startDragHandle+((this.horizontal_?t.clientX:t.clientY)-this.startDragMouse_))),this.updateMetrics_()},t.Scrollbar.prototype.onMouseUpHandle_=function(){this.workspace_.resetDragSurface(),t.Touch.clearTouchIdentifier(),this.cleanUp_()},t.Scrollbar.prototype.cleanUp_=function(){t.hideChaff(!0),t.Scrollbar.onMouseUpWrapper_&&(t.browserEvents.unbind(t.Scrollbar.onMouseUpWrapper_),t.Scrollbar.onMouseUpWrapper_=null),t.Scrollbar.onMouseMoveWrapper_&&(t.browserEvents.unbind(t.Scrollbar.onMouseMoveWrapper_),t.Scrollbar.onMouseMoveWrapper_=null)},t.Scrollbar.prototype.getRatio_=function(){var t=this.handlePosition_/(this.scrollbarLength_-this.handleLength_);return isNaN(t)&&(t=0),t},t.Scrollbar.prototype.updateMetrics_=function(){var t=this.getRatio_(),e={};this.horizontal_?e.x=t:e.y=t,this.workspace_.setMetrics(e)},t.Scrollbar.prototype.set=function(t,e){this.setHandlePosition(this.constrainHandlePosition_(t*this.ratio)),(e||void 0===e)&&this.updateMetrics_()},t.Scrollbar.prototype.setOrigin=function(e,i){this.origin_=new t.utils.Coordinate(e,i)},t.Tooltip={},t.Tooltip.visible=!1,t.Tooltip.blocked_=!1,t.Tooltip.LIMIT=50,t.Tooltip.mouseOutPid_=0,t.Tooltip.showPid_=0,t.Tooltip.lastX_=0,t.Tooltip.lastY_=0,t.Tooltip.element_=null,t.Tooltip.poisonedElement_=null,t.Tooltip.OFFSET_X=0,t.Tooltip.OFFSET_Y=10,t.Tooltip.RADIUS_OK=10,t.Tooltip.HOVER_MS=750,t.Tooltip.MARGINS=5,t.Tooltip.DIV=null,t.Tooltip.getTooltipOfObject=function(e){if(e=t.Tooltip.getTargetObject_(e)){for(e=e.tooltip;"function"==typeof e;)e=e();if("string"!=typeof e)throw Error("Tooltip function must return a string.");return e}return""},t.Tooltip.getTargetObject_=function(t){for(;t&&t.tooltip;){if("string"==typeof t.tooltip||"function"==typeof t.tooltip)return t;t=t.tooltip}return null},t.Tooltip.createDom=function(){t.Tooltip.DIV||(t.Tooltip.DIV=document.createElement("div"),t.Tooltip.DIV.className="blocklyTooltipDiv",(t.parentContainer||document.body).appendChild(t.Tooltip.DIV))},t.Tooltip.bindMouseEvents=function(e){e.mouseOverWrapper_=t.browserEvents.bind(e,"mouseover",null,t.Tooltip.onMouseOver_),e.mouseOutWrapper_=t.browserEvents.bind(e,"mouseout",null,t.Tooltip.onMouseOut_),e.addEventListener("mousemove",t.Tooltip.onMouseMove_,!1)},t.Tooltip.unbindMouseEvents=function(e){e&&(t.browserEvents.unbind(e.mouseOverWrapper_),t.browserEvents.unbind(e.mouseOutWrapper_),e.removeEventListener("mousemove",t.Tooltip.onMouseMove_))},t.Tooltip.onMouseOver_=function(e){t.Tooltip.blocked_||(e=t.Tooltip.getTargetObject_(e.currentTarget),t.Tooltip.element_!=e&&(t.Tooltip.hide(),t.Tooltip.poisonedElement_=null,t.Tooltip.element_=e),clearTimeout(t.Tooltip.mouseOutPid_))},t.Tooltip.onMouseOut_=function(e){t.Tooltip.blocked_||(t.Tooltip.mouseOutPid_=setTimeout(function(){t.Tooltip.element_=null,t.Tooltip.poisonedElement_=null,t.Tooltip.hide()},1),clearTimeout(t.Tooltip.showPid_))},t.Tooltip.onMouseMove_=function(e){if(t.Tooltip.element_&&t.Tooltip.element_.tooltip&&!t.Tooltip.blocked_)if(t.Tooltip.visible){var i=t.Tooltip.lastX_-e.pageX;e=t.Tooltip.lastY_-e.pageY,Math.sqrt(i*i+e*e)>t.Tooltip.RADIUS_OK&&t.Tooltip.hide()}else t.Tooltip.poisonedElement_!=t.Tooltip.element_&&(clearTimeout(t.Tooltip.showPid_),t.Tooltip.lastX_=e.pageX,t.Tooltip.lastY_=e.pageY,t.Tooltip.showPid_=setTimeout(t.Tooltip.show_,t.Tooltip.HOVER_MS))},t.Tooltip.dispose=function(){t.Tooltip.element_=null,t.Tooltip.poisonedElement_=null,t.Tooltip.hide()},t.Tooltip.hide=function(){t.Tooltip.visible&&(t.Tooltip.visible=!1,t.Tooltip.DIV&&(t.Tooltip.DIV.style.display="none")),t.Tooltip.showPid_&&clearTimeout(t.Tooltip.showPid_)},t.Tooltip.block=function(){t.Tooltip.hide(),t.Tooltip.blocked_=!0},t.Tooltip.unblock=function(){t.Tooltip.blocked_=!1},t.Tooltip.show_=function(){if(!t.Tooltip.blocked_&&(t.Tooltip.poisonedElement_=t.Tooltip.element_,t.Tooltip.DIV)){t.Tooltip.DIV.textContent="";var e=t.Tooltip.getTooltipOfObject(t.Tooltip.element_);e=(e=t.utils.string.wrap(e,t.Tooltip.LIMIT)).split("\n");for(var i=0;i<e.length;i++){var n=document.createElement("div");n.appendChild(document.createTextNode(e[i])),t.Tooltip.DIV.appendChild(n)}e=t.Tooltip.element_.RTL,i=document.documentElement.clientWidth,n=document.documentElement.clientHeight,t.Tooltip.DIV.style.direction=e?"rtl":"ltr",t.Tooltip.DIV.style.display="block",t.Tooltip.visible=!0;var o=t.Tooltip.lastX_;o=e?o-(t.Tooltip.OFFSET_X+t.Tooltip.DIV.offsetWidth):o+t.Tooltip.OFFSET_X;var r=t.Tooltip.lastY_+t.Tooltip.OFFSET_Y;r+t.Tooltip.DIV.offsetHeight>n+window.scrollY&&(r-=t.Tooltip.DIV.offsetHeight+2*t.Tooltip.OFFSET_Y),e?o=Math.max(t.Tooltip.MARGINS-window.scrollX,o):o+t.Tooltip.DIV.offsetWidth>i+window.scrollX-2*t.Tooltip.MARGINS&&(o=i-t.Tooltip.DIV.offsetWidth-2*t.Tooltip.MARGINS),t.Tooltip.DIV.style.top=r+"px",t.Tooltip.DIV.style.left=o+"px"}},t.utils.aria={},t.utils.aria.ARIA_PREFIX_="aria-",t.utils.aria.ROLE_ATTRIBUTE_="role",t.utils.aria.Role={GRID:"grid",GRIDCELL:"gridcell",GROUP:"group",LISTBOX:"listbox",MENU:"menu",MENUITEM:"menuitem",MENUITEMCHECKBOX:"menuitemcheckbox",OPTION:"option",PRESENTATION:"presentation",ROW:"row",TREE:"tree",TREEITEM:"treeitem"},t.utils.aria.State={ACTIVEDESCENDANT:"activedescendant",COLCOUNT:"colcount",DISABLED:"disabled",EXPANDED:"expanded",INVALID:"invalid",LABEL:"label",LABELLEDBY:"labelledby",LEVEL:"level",ORIENTATION:"orientation",POSINSET:"posinset",ROWCOUNT:"rowcount",SELECTED:"selected",SETSIZE:"setsize",VALUEMAX:"valuemax",VALUEMIN:"valuemin"},t.utils.aria.setRole=function(e,i){e.setAttribute(t.utils.aria.ROLE_ATTRIBUTE_,i)},t.utils.aria.setState=function(e,i,n){Array.isArray(n)&&(n=n.join(" ")),e.setAttribute(t.utils.aria.ARIA_PREFIX_+i,n)},t.IASTNodeLocation=function(){},t.IASTNodeLocationSvg=function(){},t.IASTNodeLocationWithBlock=function(){},t.IKeyboardAccessible=function(){},t.utils.deprecation={},t.utils.deprecation.warn=function(t,e,i,n){t=t+" was deprecated on "+e+" and will be deleted on "+i+".",n&&(t+="\nUse "+n+" instead."),console.warn(t)},t.Connection=function(t,e){this.sourceBlock_=t,this.type=e},t.Connection.CAN_CONNECT=0,t.Connection.REASON_SELF_CONNECTION=1,t.Connection.REASON_WRONG_TYPE=2,t.Connection.REASON_TARGET_NULL=3,t.Connection.REASON_CHECKS_FAILED=4,t.Connection.REASON_DIFFERENT_WORKSPACES=5,t.Connection.REASON_SHADOW_PARENT=6,t.Connection.REASON_DRAG_CHECKS_FAILED=7,t.Connection.prototype.targetConnection=null,t.Connection.prototype.disposed=!1,t.Connection.prototype.check_=null,t.Connection.prototype.shadowDom_=null,t.Connection.prototype.x=0,t.Connection.prototype.y=0,t.Connection.prototype.connect_=function(e){var i,n=t.connectionTypes.INPUT_VALUE,o=this.getSourceBlock(),r=e.getSourceBlock();if(e.isConnected()&&e.disconnect(),this.isConnected()){var s=this.getShadowDom(!0);this.shadowDom_=null;var a=this.targetBlock();if(a.isShadow())a.dispose(!1);else{this.disconnect();var l=a}this.shadowDom_=s}t.Events.isEnabled()&&(i=new(t.Events.get(t.Events.BLOCK_MOVE))(r)),t.Connection.connectReciprocally_(this,e),r.setParent(o),i&&(i.recordNew(),t.Events.fire(i)),l&&(e=this.type===n?l.outputConnection:l.previousConnection,(r=t.Connection.getConnectionForOrphanedConnection(r,e))?e.connect(r):e.onFailedConnect(this))},t.Connection.prototype.dispose=function(){if(this.isConnected()){this.setShadowDom(null);var t=this.targetBlock();t&&t.unplug()}this.disposed=!0},t.Connection.prototype.getSourceBlock=function(){return this.sourceBlock_},t.Connection.prototype.isSuperior=function(){return this.type==t.connectionTypes.INPUT_VALUE||this.type==t.connectionTypes.NEXT_STATEMENT},t.Connection.prototype.isConnected=function(){return!!this.targetConnection},t.Connection.prototype.canConnectWithReason=function(e){return t.utils.deprecation.warn("Connection.prototype.canConnectWithReason","July 2020","July 2021","the workspace's connection checker"),this.getConnectionChecker().canConnectWithReason(this,e,!1)},t.Connection.prototype.checkConnection=function(e){t.utils.deprecation.warn("Connection.prototype.checkConnection","July 2020","July 2021","the workspace's connection checker");var i=this.getConnectionChecker(),n=i.canConnectWithReason(this,e,!1);if(n!=t.Connection.CAN_CONNECT)throw Error(i.getErrorMessage(n,this,e))},t.Connection.prototype.getConnectionChecker=function(){return this.sourceBlock_.workspace.connectionChecker},t.Connection.prototype.isConnectionAllowed=function(e){return t.utils.deprecation.warn("Connection.prototype.isConnectionAllowed","July 2020","July 2021","the workspace's connection checker"),this.getConnectionChecker().canConnect(this,e,!0)},t.Connection.prototype.onFailedConnect=function(t){},t.Connection.prototype.connect=function(e){if(this.targetConnection!=e&&this.getConnectionChecker().canConnect(this,e,!1)){var i=t.Events.getGroup();i||t.Events.setGroup(!0),this.isSuperior()?this.connect_(e):e.connect_(this),i||t.Events.setGroup(!1)}},t.Connection.connectReciprocally_=function(t,e){if(!t||!e)throw Error("Cannot connect null connections.");t.targetConnection=e,e.targetConnection=t},t.Connection.getSingleConnection_=function(t,e){for(var i,n=null,o=(e=e.outputConnection).getConnectionChecker(),r=0;i=t.inputList[r];r++)if((i=i.connection)&&o.canConnect(e,i,!1)){if(n)return null;n=i}return n},t.Connection.getConnectionForOrphanedOutput_=function(e,i){for(var n;n=t.Connection.getSingleConnection_(e,i);)if(!(e=n.targetBlock())||e.isShadow())return n;return null},t.Connection.getConnectionForOrphanedConnection=function(e,i){if(i.type===t.connectionTypes.OUTPUT_VALUE)return t.Connection.getConnectionForOrphanedOutput_(e,i.getSourceBlock());e=e.lastConnectionInStack(!0);var n=i.getConnectionChecker();return e&&n.canConnect(i,e,!1)?e:null},t.Connection.prototype.disconnect=function(){var e=this.targetConnection;if(!e)throw Error("Source connection not connected.");if(e.targetConnection!=this)throw Error("Target connection not connected to source connection.");if(this.isSuperior()){var i=this.sourceBlock_,n=e.getSourceBlock();e=this}else i=e.getSourceBlock(),n=this.sourceBlock_;var o=t.Events.getGroup();o||t.Events.setGroup(!0),this.disconnectInternal_(i,n),n.isShadow()||e.respawnShadow_(),o||t.Events.setGroup(!1)},t.Connection.prototype.disconnectInternal_=function(e,i){var n;t.Events.isEnabled()&&(n=new(t.Events.get(t.Events.BLOCK_MOVE))(i)),this.targetConnection=this.targetConnection.targetConnection=null,i.setParent(null),n&&(n.recordNew(),t.Events.fire(n))},t.Connection.prototype.respawnShadow_=function(){var e=this.getSourceBlock(),i=this.getShadowDom();if(e.workspace&&i)if((e=t.Xml.domToBlock(i,e.workspace)).outputConnection)this.connect(e.outputConnection);else{if(!e.previousConnection)throw Error("Child block does not have output or previous statement.");this.connect(e.previousConnection)}},t.Connection.prototype.targetBlock=function(){return this.isConnected()?this.targetConnection.getSourceBlock():null},t.Connection.prototype.checkType=function(e){return t.utils.deprecation.warn("Connection.prototype.checkType","October 2019","January 2021","the workspace's connection checker"),this.getConnectionChecker().canConnect(this,e,!1)},t.Connection.prototype.checkType_=function(e){return t.utils.deprecation.warn("Connection.prototype.checkType_","October 2019","January 2021","the workspace's connection checker"),this.checkType(e)},t.Connection.prototype.onCheckChanged_=function(){!this.isConnected()||this.targetConnection&&this.getConnectionChecker().canConnect(this,this.targetConnection,!1)||(this.isSuperior()?this.targetBlock():this.sourceBlock_).unplug()},t.Connection.prototype.setCheck=function(t){return t?(Array.isArray(t)||(t=[t]),this.check_=t,this.onCheckChanged_()):this.check_=null,this},t.Connection.prototype.getCheck=function(){return this.check_},t.Connection.prototype.setShadowDom=function(t){this.shadowDom_=t,(t=this.targetBlock())?t.isShadow()&&(t.dispose(!1),this.respawnShadow_()):this.respawnShadow_()},t.Connection.prototype.getShadowDom=function(e){return e&&this.targetBlock().isShadow()?t.Xml.blockToDom(this.targetBlock()):this.shadowDom_},t.Connection.prototype.neighbours=function(t){return[]},t.Connection.prototype.getParentInput=function(){for(var t=null,e=this.sourceBlock_.inputList,i=0;i<e.length;i++)if(e[i].connection===this){t=e[i];break}return t},t.Connection.prototype.toString=function(){var t=this.sourceBlock_;if(!t)return"Orphan Connection";if(t.outputConnection==this)var e="Output Connection of ";else if(t.previousConnection==this)e="Previous Connection of ";else if(t.nextConnection==this)e="Next Connection of ";else{e=null;for(var i,n=0;i=t.inputList[n];n++)if(i.connection==this){e=i;break}if(!e)return console.warn("Connection not actually connected to sourceBlock_"),"Orphan Connection";e='Input "'+e.name+'" connection on '}return e+t.toDevString()},t.IConnectionChecker=function(){},t.ConnectionChecker=function(){},t.ConnectionChecker.prototype.canConnect=function(e,i,n,o){return this.canConnectWithReason(e,i,n,o)==t.Connection.CAN_CONNECT},t.ConnectionChecker.prototype.canConnectWithReason=function(e,i,n,o){var r=this.doSafetyChecks(e,i);return r!=t.Connection.CAN_CONNECT?r:this.doTypeChecks(e,i)?n&&!this.doDragChecks(e,i,o||0)?t.Connection.REASON_DRAG_CHECKS_FAILED:t.Connection.CAN_CONNECT:t.Connection.REASON_CHECKS_FAILED},t.ConnectionChecker.prototype.getErrorMessage=function(e,i,n){switch(e){case t.Connection.REASON_SELF_CONNECTION:return"Attempted to connect a block to itself.";case t.Connection.REASON_DIFFERENT_WORKSPACES:return"Blocks not on same workspace.";case t.Connection.REASON_WRONG_TYPE:return"Attempt to connect incompatible types.";case t.Connection.REASON_TARGET_NULL:return"Target connection is null.";case t.Connection.REASON_CHECKS_FAILED:return"Connection checks failed. "+i+" expected "+i.getCheck()+", found "+n.getCheck();case t.Connection.REASON_SHADOW_PARENT:return"Connecting non-shadow to shadow block.";case t.Connection.REASON_DRAG_CHECKS_FAILED:return"Drag checks failed.";default:return"Unknown connection failure: this should never happen!"}},t.ConnectionChecker.prototype.doSafetyChecks=function(e,i){if(!e||!i)return t.Connection.REASON_TARGET_NULL;if(e.isSuperior())var n=e.getSourceBlock(),o=i.getSourceBlock();else o=e.getSourceBlock(),n=i.getSourceBlock();return n==o?t.Connection.REASON_SELF_CONNECTION:i.type!=t.OPPOSITE_TYPE[e.type]?t.Connection.REASON_WRONG_TYPE:n.workspace!==o.workspace?t.Connection.REASON_DIFFERENT_WORKSPACES:n.isShadow()&&!o.isShadow()?t.Connection.REASON_SHADOW_PARENT:t.Connection.CAN_CONNECT},t.ConnectionChecker.prototype.doTypeChecks=function(t,e){if(t=t.getCheck(),e=e.getCheck(),!t||!e)return!0;for(var i=0;i<t.length;i++)if(-1!=e.indexOf(t[i]))return!0;return!1},t.ConnectionChecker.prototype.doDragChecks=function(e,i,n){if(e.distanceFrom(i)>n||i.getSourceBlock().isInsertionMarker())return!1;switch(i.type){case t.connectionTypes.PREVIOUS_STATEMENT:return this.canConnectToPrevious_(e,i);case t.connectionTypes.OUTPUT_VALUE:if(i.isConnected()&&!i.targetBlock().isInsertionMarker()||e.isConnected())return!1;break;case t.connectionTypes.INPUT_VALUE:if(i.isConnected()&&!i.targetBlock().isMovable()&&!i.targetBlock().isShadow())return!1;break;case t.connectionTypes.NEXT_STATEMENT:if(i.isConnected()&&!e.getSourceBlock().nextConnection&&!i.targetBlock().isShadow()&&i.targetBlock().nextConnection)return!1;break;default:return!1}return-1==t.draggingConnections.indexOf(i)},t.ConnectionChecker.prototype.canConnectToPrevious_=function(e,i){return!e.targetConnection&&-1==t.draggingConnections.indexOf(i)&&(!i.targetConnection||!!(e=i.targetBlock()).isInsertionMarker()&&!e.getPreviousBlock())},t.registry.register(t.registry.Type.CONNECTION_CHECKER,t.registry.DEFAULT,t.ConnectionChecker),t.VariableMap=function(t){this.variableMap_=Object.create(null),this.workspace=t},t.VariableMap.prototype.clear=function(){this.variableMap_=Object.create(null)},t.VariableMap.prototype.renameVariable=function(e,i){var n=this.getVariable(i,e.type),o=this.workspace.getAllBlocks(!1);t.Events.setGroup(!0);try{n&&n.getId()!=e.getId()?this.renameVariableWithConflict_(e,i,n,o):this.renameVariableAndUses_(e,i,o)}finally{t.Events.setGroup(!1)}},t.VariableMap.prototype.renameVariableById=function(t,e){var i=this.getVariableById(t);if(!i)throw Error("Tried to rename a variable that didn't exist. ID: "+t);this.renameVariable(i,e)},t.VariableMap.prototype.renameVariableAndUses_=function(e,i,n){for(t.Events.fire(new(t.Events.get(t.Events.VAR_RENAME))(e,i)),e.name=i,i=0;i<n.length;i++)n[i].updateVarName(e)},t.VariableMap.prototype.renameVariableWithConflict_=function(e,i,n,o){var r=e.type;for(i!=n.name&&this.renameVariableAndUses_(n,i,o),i=0;i<o.length;i++)o[i].renameVarById(e.getId(),n.getId());t.Events.fire(new(t.Events.get(t.Events.VAR_DELETE))(e)),e=this.getVariablesOfType(r).indexOf(e),this.variableMap_[r].splice(e,1)},t.VariableMap.prototype.createVariable=function(e,i,n){var o=this.getVariable(e,i);if(o){if(n&&o.getId()!=n)throw Error('Variable "'+e+'" is already in use and its id is "'+o.getId()+'" which conflicts with the passed in id, "'+n+'".');return o}if(n&&this.getVariableById(n))throw Error('Variable id, "'+n+'", is already in use.');return o=n||t.utils.genUid(),i=i||"",o=new t.VariableModel(this.workspace,e,i,o),(e=this.variableMap_[i]||[]).push(o),delete this.variableMap_[i],this.variableMap_[i]=e,o},t.VariableMap.prototype.deleteVariable=function(e){for(var i,n=this.variableMap_[e.type],o=0;i=n[o];o++)if(i.getId()==e.getId()){n.splice(o,1),t.Events.fire(new(t.Events.get(t.Events.VAR_DELETE))(e));break}},t.VariableMap.prototype.deleteVariableById=function(e){var i=this.getVariableById(e);if(i){var n,o=i.name,r=this.getVariableUsesById(e);for(e=0;n=r[e];e++)if("procedures_defnoreturn"==n.type||"procedures_defreturn"==n.type)return e=n.getFieldValue("NAME"),o=t.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE.replace("%1",o).replace("%2",e),void t.alert(o);var s=this;1<r.length?(o=t.Msg.DELETE_VARIABLE_CONFIRMATION.replace("%1",String(r.length)).replace("%2",o),t.confirm(o,function(t){t&&i&&s.deleteVariableInternal(i,r)})):s.deleteVariableInternal(i,r)}else console.warn("Can't delete non-existent variable: "+e)},t.VariableMap.prototype.deleteVariableInternal=function(e,i){var n=t.Events.getGroup();n||t.Events.setGroup(!0);try{for(var o=0;o<i.length;o++)i[o].dispose(!0);this.deleteVariable(e)}finally{n||t.Events.setGroup(!1)}},t.VariableMap.prototype.getVariable=function(e,i){if(i=this.variableMap_[i||""])for(var n,o=0;n=i[o];o++)if(t.Names.equals(n.name,e))return n;return null},t.VariableMap.prototype.getVariableById=function(t){for(var e=Object.keys(this.variableMap_),i=0;i<e.length;i++)for(var n,o=e[i],r=0;n=this.variableMap_[o][r];r++)if(n.getId()==t)return n;return null},t.VariableMap.prototype.getVariablesOfType=function(t){return(t=this.variableMap_[t||""])?t.slice():[]},t.VariableMap.prototype.getVariableTypes=function(e){var i={};t.utils.object.mixin(i,this.variableMap_),e&&e.getPotentialVariableMap()&&t.utils.object.mixin(i,e.getPotentialVariableMap().variableMap_),e=Object.keys(i),i=!1;for(var n=0;n<e.length;n++)""==e[n]&&(i=!0);return i||e.push(""),e},t.VariableMap.prototype.getAllVariables=function(){var t,e=[];for(t in this.variableMap_)e=e.concat(this.variableMap_[t]);return e},t.VariableMap.prototype.getAllVariableNames=function(){var t,e=[];for(t in this.variableMap_)for(var i,n=this.variableMap_[t],o=0;i=n[o];o++)e.push(i.name);return e},t.VariableMap.prototype.getVariableUsesById=function(t){for(var e=[],i=this.workspace.getAllBlocks(!1),n=0;n<i.length;n++){var o=i[n].getVarModels();if(o)for(var r=0;r<o.length;r++)o[r].getId()==t&&e.push(i[n])}return e},t.Workspace=function(e){this.id=t.utils.genUid(),t.Workspace.WorkspaceDB_[this.id]=this,this.options=e||new t.Options({}),this.RTL=!!this.options.RTL,this.horizontalLayout=!!this.options.horizontalLayout,this.toolboxPosition=this.options.toolboxPosition,this.connectionChecker=new(t.registry.getClassFromOptions(t.registry.Type.CONNECTION_CHECKER,this.options,!0))(this),this.topBlocks_=[],this.topComments_=[],this.commentDB_=Object.create(null),this.listeners_=[],this.undoStack_=[],this.redoStack_=[],this.blockDB_=Object.create(null),this.typedBlocksDB_=Object.create(null),this.variableMap_=new t.VariableMap(this),this.potentialVariableMap_=null},t.Workspace.prototype.rendered=!1,t.Workspace.prototype.isClearing=!1,t.Workspace.prototype.MAX_UNDO=1024,t.Workspace.prototype.connectionDBList=null,t.Workspace.prototype.dispose=function(){this.listeners_.length=0,this.clear(),delete t.Workspace.WorkspaceDB_[this.id]},t.Workspace.SCAN_ANGLE=3,t.Workspace.prototype.sortObjects_=function(e,i){return e=e.getRelativeToSurfaceXY(),i=i.getRelativeToSurfaceXY(),e.y+t.Workspace.prototype.sortObjects_.offset*e.x-(i.y+t.Workspace.prototype.sortObjects_.offset*i.x)},t.Workspace.prototype.addTopBlock=function(t){this.topBlocks_.push(t)},t.Workspace.prototype.removeTopBlock=function(e){if(!t.utils.arrayRemove(this.topBlocks_,e))throw Error("Block not present in workspace's list of top-most blocks.")},t.Workspace.prototype.getTopBlocks=function(e){var i=[].concat(this.topBlocks_);return e&&1<i.length&&(this.sortObjects_.offset=Math.sin(t.utils.math.toRadians(t.Workspace.SCAN_ANGLE)),this.RTL&&(this.sortObjects_.offset*=-1),i.sort(this.sortObjects_)),i},t.Workspace.prototype.addTypedBlock=function(t){this.typedBlocksDB_[t.type]||(this.typedBlocksDB_[t.type]=[]),this.typedBlocksDB_[t.type].push(t)},t.Workspace.prototype.removeTypedBlock=function(t){this.typedBlocksDB_[t.type].splice(this.typedBlocksDB_[t.type].indexOf(t),1),this.typedBlocksDB_[t.type].length||delete this.typedBlocksDB_[t.type]},t.Workspace.prototype.getBlocksByType=function(e,i){return this.typedBlocksDB_[e]?(e=this.typedBlocksDB_[e].slice(0),i&&1<e.length&&(this.sortObjects_.offset=Math.sin(t.utils.math.toRadians(t.Workspace.SCAN_ANGLE)),this.RTL&&(this.sortObjects_.offset*=-1),e.sort(this.sortObjects_)),e):[]},t.Workspace.prototype.addTopComment=function(t){this.topComments_.push(t),this.commentDB_[t.id]&&console.warn('Overriding an existing comment on this workspace, with id "'+t.id+'"'),this.commentDB_[t.id]=t},t.Workspace.prototype.removeTopComment=function(e){if(!t.utils.arrayRemove(this.topComments_,e))throw Error("Comment not present in workspace's list of top-most comments.");delete this.commentDB_[e.id]},t.Workspace.prototype.getTopComments=function(e){var i=[].concat(this.topComments_);return e&&1<i.length&&(this.sortObjects_.offset=Math.sin(t.utils.math.toRadians(t.Workspace.SCAN_ANGLE)),this.RTL&&(this.sortObjects_.offset*=-1),i.sort(this.sortObjects_)),i},t.Workspace.prototype.getAllBlocks=function(t){if(t){t=this.getTopBlocks(!0);for(var e=[],i=0;i<t.length;i++)e.push.apply(e,t[i].getDescendants(!0))}else for(e=this.getTopBlocks(!1),i=0;i<e.length;i++)e.push.apply(e,e[i].getChildren(!1));return e.filter(function(t){return!t.isInsertionMarker()})},t.Workspace.prototype.clear=function(){this.isClearing=!0;try{var e=t.Events.getGroup();for(e||t.Events.setGroup(!0);this.topBlocks_.length;)this.topBlocks_[0].dispose(!1);for(;this.topComments_.length;)this.topComments_[this.topComments_.length-1].dispose(!1);e||t.Events.setGroup(!1),this.variableMap_.clear(),this.potentialVariableMap_&&this.potentialVariableMap_.clear()}finally{this.isClearing=!1}},t.Workspace.prototype.renameVariableById=function(t,e){this.variableMap_.renameVariableById(t,e)},t.Workspace.prototype.createVariable=function(t,e,i){return this.variableMap_.createVariable(t,e,i)},t.Workspace.prototype.getVariableUsesById=function(t){return this.variableMap_.getVariableUsesById(t)},t.Workspace.prototype.deleteVariableById=function(t){this.variableMap_.deleteVariableById(t)},t.Workspace.prototype.getVariable=function(t,e){return this.variableMap_.getVariable(t,e)},t.Workspace.prototype.getVariableById=function(t){return this.variableMap_.getVariableById(t)},t.Workspace.prototype.getVariablesOfType=function(t){return this.variableMap_.getVariablesOfType(t)},t.Workspace.prototype.getVariableTypes=function(){return this.variableMap_.getVariableTypes(this)},t.Workspace.prototype.getAllVariables=function(){return this.variableMap_.getAllVariables()},t.Workspace.prototype.getAllVariableNames=function(){return this.variableMap_.getAllVariableNames()},t.Workspace.prototype.getWidth=function(){return 0},t.Workspace.prototype.newBlock=function(e,i){return new t.Block(this,e,i)},t.Workspace.prototype.remainingCapacity=function(){return isNaN(this.options.maxBlocks)?1/0:this.options.maxBlocks-this.getAllBlocks(!1).length},t.Workspace.prototype.remainingCapacityOfType=function(t){return this.options.maxInstances?(void 0!==this.options.maxInstances[t]?this.options.maxInstances[t]:1/0)-this.getBlocksByType(t,!1).length:1/0},t.Workspace.prototype.isCapacityAvailable=function(t){if(!this.hasBlockLimits())return!0;var e,i=0;for(e in t){if(t[e]>this.remainingCapacityOfType(e))return!1;i+=t[e]}return!(i>this.remainingCapacity())},t.Workspace.prototype.hasBlockLimits=function(){return 1/0!=this.options.maxBlocks||!!this.options.maxInstances},t.Workspace.prototype.getUndoStack=function(){return this.undoStack_},t.Workspace.prototype.getRedoStack=function(){return this.redoStack_},t.Workspace.prototype.undo=function(e){var i=e?this.redoStack_:this.undoStack_,n=e?this.undoStack_:this.redoStack_,o=i.pop();if(o){for(var r=[o];i.length&&o.group&&o.group==i[i.length-1].group;)r.push(i.pop());for(i=0;o=r[i];i++)n.push(o);r=t.Events.filter(r,e),t.Events.recordUndo=!1;try{for(i=0;o=r[i];i++)o.run(e)}finally{t.Events.recordUndo=!0}}},t.Workspace.prototype.clearUndo=function(){this.undoStack_.length=0,this.redoStack_.length=0,t.Events.clearPendingUndo()},t.Workspace.prototype.addChangeListener=function(t){return this.listeners_.push(t),t},t.Workspace.prototype.removeChangeListener=function(e){t.utils.arrayRemove(this.listeners_,e)},t.Workspace.prototype.fireChangeListener=function(t){if(t.recordUndo)for(this.undoStack_.push(t),this.redoStack_.length=0;this.undoStack_.length>this.MAX_UNDO&&0<=this.MAX_UNDO;)this.undoStack_.shift();for(var e,i=0;e=this.listeners_[i];i++)e(t)},t.Workspace.prototype.getBlockById=function(t){return this.blockDB_[t]||null},t.Workspace.prototype.setBlockById=function(t,e){this.blockDB_[t]=e},t.Workspace.prototype.removeBlockById=function(t){delete this.blockDB_[t]},t.Workspace.prototype.getCommentById=function(t){return this.commentDB_[t]||null},t.Workspace.prototype.allInputsFilled=function(t){for(var e,i=this.getTopBlocks(!1),n=0;e=i[n];n++)if(!e.allInputsFilled(t))return!1;return!0},t.Workspace.prototype.getPotentialVariableMap=function(){return this.potentialVariableMap_},t.Workspace.prototype.createPotentialVariableMap=function(){this.potentialVariableMap_=new t.VariableMap(this)},t.Workspace.prototype.getVariableMap=function(){return this.variableMap_},t.Workspace.prototype.setVariableMap=function(t){this.variableMap_=t},t.Workspace.WorkspaceDB_=Object.create(null),t.Workspace.getById=function(e){return t.Workspace.WorkspaceDB_[e]||null},t.Workspace.getAll=function(){var e,i=[];for(e in t.Workspace.WorkspaceDB_)i.push(t.Workspace.WorkspaceDB_[e]);return i},t.WorkspaceDragSurfaceSvg=function(t){this.container_=t,this.createDom()},t.WorkspaceDragSurfaceSvg.prototype.SVG_=null,t.WorkspaceDragSurfaceSvg.prototype.container_=null,t.WorkspaceDragSurfaceSvg.prototype.createDom=function(){this.SVG_||(this.SVG_=t.utils.dom.createSvgElement(t.utils.Svg.SVG,{xmlns:t.utils.dom.SVG_NS,"xmlns:html":t.utils.dom.HTML_NS,"xmlns:xlink":t.utils.dom.XLINK_NS,version:"1.1",class:"blocklyWsDragSurface blocklyOverflowVisible"},null),this.container_.appendChild(this.SVG_))},t.WorkspaceDragSurfaceSvg.prototype.translateSurface=function(e,i){e=e.toFixed(0),i=i.toFixed(0),this.SVG_.style.display="block",t.utils.dom.setCssTransform(this.SVG_,"translate3d("+e+"px, "+i+"px, 0px)")},t.WorkspaceDragSurfaceSvg.prototype.getSurfaceTranslation=function(){return t.utils.getRelativeXY(this.SVG_)},t.WorkspaceDragSurfaceSvg.prototype.clearAndHide=function(e){if(!e)throw Error("Couldn't clear and hide the drag surface: missing new surface.");var i=this.SVG_.childNodes[0],n=this.SVG_.childNodes[1];if(!(i&&n&&t.utils.dom.hasClass(i,"blocklyBlockCanvas")&&t.utils.dom.hasClass(n,"blocklyBubbleCanvas")))throw Error("Couldn't clear and hide the drag surface. A node was missing.");if(null!=this.previousSibling_?t.utils.dom.insertAfter(i,this.previousSibling_):e.insertBefore(i,e.firstChild),t.utils.dom.insertAfter(n,i),this.SVG_.style.display="none",this.SVG_.childNodes.length)throw Error("Drag surface was not cleared.");t.utils.dom.setCssTransform(this.SVG_,""),this.previousSibling_=null},t.WorkspaceDragSurfaceSvg.prototype.setContentsAndShow=function(t,e,i,n,o,r){if(this.SVG_.childNodes.length)throw Error("Already dragging a block.");this.previousSibling_=i,t.setAttribute("transform","translate(0, 0) scale("+r+")"),e.setAttribute("transform","translate(0, 0) scale("+r+")"),this.SVG_.setAttribute("width",n),this.SVG_.setAttribute("height",o),this.SVG_.appendChild(t),this.SVG_.appendChild(e),this.SVG_.style.display="block"},t.blockRendering={},t.blockRendering.useDebugger=!1,t.blockRendering.register=function(e,i){t.registry.register(t.registry.Type.RENDERER,e,i)},t.blockRendering.unregister=function(e){t.registry.unregister(t.registry.Type.RENDERER,e)},t.blockRendering.startDebugger=function(){t.blockRendering.useDebugger=!0},t.blockRendering.stopDebugger=function(){t.blockRendering.useDebugger=!1},t.blockRendering.init=function(e,i,n){return(e=new(t.registry.getClass(t.registry.Type.RENDERER,e))(e)).init(i,n),e},t.ASTNode=function(e,i,n){if(!i)throw Error("Cannot create a node without a location.");this.type_=e,this.isConnection_=t.ASTNode.isConnectionType_(e),this.location_=i,this.wsCoordinate_=null,this.processParams_(n||null)},t.ASTNode.types={FIELD:"field",BLOCK:"block",INPUT:"input",OUTPUT:"output",NEXT:"next",PREVIOUS:"previous",STACK:"stack",WORKSPACE:"workspace"},t.ASTNode.NAVIGATE_ALL_FIELDS=!1,t.ASTNode.DEFAULT_OFFSET_Y=-20,t.ASTNode.isConnectionType_=function(e){switch(e){case t.ASTNode.types.PREVIOUS:case t.ASTNode.types.NEXT:case t.ASTNode.types.INPUT:case t.ASTNode.types.OUTPUT:return!0}return!1},t.ASTNode.createFieldNode=function(e){return e?new t.ASTNode(t.ASTNode.types.FIELD,e):null},t.ASTNode.createConnectionNode=function(e){if(!e)return null;var i=e.type;return i==t.connectionTypes.INPUT_VALUE||i==t.connectionTypes.NEXT_STATEMENT&&e.getParentInput()?t.ASTNode.createInputNode(e.getParentInput()):i==t.connectionTypes.NEXT_STATEMENT?new t.ASTNode(t.ASTNode.types.NEXT,e):i==t.connectionTypes.OUTPUT_VALUE?new t.ASTNode(t.ASTNode.types.OUTPUT,e):i==t.connectionTypes.PREVIOUS_STATEMENT?new t.ASTNode(t.ASTNode.types.PREVIOUS,e):null},t.ASTNode.createInputNode=function(e){return e&&e.connection?new t.ASTNode(t.ASTNode.types.INPUT,e.connection):null},t.ASTNode.createBlockNode=function(e){return e?new t.ASTNode(t.ASTNode.types.BLOCK,e):null},t.ASTNode.createStackNode=function(e){return e?new t.ASTNode(t.ASTNode.types.STACK,e):null},t.ASTNode.createWorkspaceNode=function(e,i){return i&&e?new t.ASTNode(t.ASTNode.types.WORKSPACE,e,{wsCoordinate:i}):null},t.ASTNode.createTopNode=function(e){var i=e.previousConnection||e.outputConnection;return i?t.ASTNode.createConnectionNode(i):t.ASTNode.createBlockNode(e)},t.ASTNode.prototype.processParams_=function(t){t&&t.wsCoordinate&&(this.wsCoordinate_=t.wsCoordinate)},t.ASTNode.prototype.getLocation=function(){return this.location_},t.ASTNode.prototype.getType=function(){return this.type_},t.ASTNode.prototype.getWsCoordinate=function(){return this.wsCoordinate_},t.ASTNode.prototype.isConnection=function(){return this.isConnection_},t.ASTNode.prototype.findNextForInput_=function(){var e,i=this.location_.getParentInput(),n=i.getSourceBlock();for(i=n.inputList.indexOf(i)+1;e=n.inputList[i];i++){for(var o,r=e.fieldRow,s=0;o=r[s];s++)if(o.isClickable()||t.ASTNode.NAVIGATE_ALL_FIELDS)return t.ASTNode.createFieldNode(o);if(e.connection)return t.ASTNode.createInputNode(e)}return null},t.ASTNode.prototype.findNextForField_=function(){var e=this.location_,i=e.getParentInput(),n=e.getSourceBlock(),o=n.inputList.indexOf(i);for(e=i.fieldRow.indexOf(e)+1;i=n.inputList[o];o++){for(var r=i.fieldRow;e<r.length;){if(r[e].isClickable()||t.ASTNode.NAVIGATE_ALL_FIELDS)return t.ASTNode.createFieldNode(r[e]);e++}if(e=0,i.connection)return t.ASTNode.createInputNode(i)}return null},t.ASTNode.prototype.findPrevForInput_=function(){for(var e,i=this.location_.getParentInput(),n=i.getSourceBlock(),o=n.inputList.indexOf(i);e=n.inputList[o];o--){if(e.connection&&e!==i)return t.ASTNode.createInputNode(e);for(var r,s=(e=e.fieldRow).length-1;r=e[s];s--)if(r.isClickable()||t.ASTNode.NAVIGATE_ALL_FIELDS)return t.ASTNode.createFieldNode(r)}return null},t.ASTNode.prototype.findPrevForField_=function(){var e,i=this.location_,n=i.getParentInput(),o=i.getSourceBlock(),r=o.inputList.indexOf(n);for(i=n.fieldRow.indexOf(i)-1;e=o.inputList[r];r--){if(e.connection&&e!==n)return t.ASTNode.createInputNode(e);for(e=e.fieldRow;-1<i;){if(e[i].isClickable()||t.ASTNode.NAVIGATE_ALL_FIELDS)return t.ASTNode.createFieldNode(e[i]);i--}0<=r-1&&(i=o.inputList[r-1].fieldRow.length-1)}return null},t.ASTNode.prototype.navigateBetweenStacks_=function(e){var i=this.getLocation();if(i instanceof t.Block||(i=i.getSourceBlock()),!i||!i.workspace)return null;var n=i.getRootBlock();i=n.workspace.getTopBlocks(!0);for(var o,r=0;o=i[r];r++)if(n.id==o.id)return-1==(e=r+(e?1:-1))||e==i.length?null:t.ASTNode.createStackNode(i[e]);throw Error("Couldn't find "+(e?"next":"previous")+" stack?!")},t.ASTNode.prototype.findTopASTNodeForBlock_=function(e){var i=e.previousConnection||e.outputConnection;return i?t.ASTNode.createConnectionNode(i):t.ASTNode.createBlockNode(e)},t.ASTNode.prototype.getOutAstNodeForBlock_=function(e){if(!e)return null;var i=(e=e.getTopStackBlock()).previousConnection||e.outputConnection;return i&&i.targetConnection&&i.targetConnection.getParentInput()?t.ASTNode.createInputNode(i.targetConnection.getParentInput()):t.ASTNode.createStackNode(e)},t.ASTNode.prototype.findFirstFieldOrInput_=function(e){e=e.inputList;for(var i,n=0;i=e[n];n++){for(var o,r=i.fieldRow,s=0;o=r[s];s++)if(o.isClickable()||t.ASTNode.NAVIGATE_ALL_FIELDS)return t.ASTNode.createFieldNode(o);if(i.connection)return t.ASTNode.createInputNode(i)}return null},t.ASTNode.prototype.getSourceBlock=function(){return this.getType()===t.ASTNode.types.BLOCK?this.getLocation():this.getType()===t.ASTNode.types.STACK?this.getLocation():this.getType()===t.ASTNode.types.WORKSPACE?null:this.getLocation().getSourceBlock()},t.ASTNode.prototype.next=function(){switch(this.type_){case t.ASTNode.types.STACK:return this.navigateBetweenStacks_(!0);case t.ASTNode.types.OUTPUT:var e=this.location_;return t.ASTNode.createBlockNode(e.getSourceBlock());case t.ASTNode.types.FIELD:return this.findNextForField_();case t.ASTNode.types.INPUT:return this.findNextForInput_();case t.ASTNode.types.BLOCK:return t.ASTNode.createConnectionNode(this.location_.nextConnection);case t.ASTNode.types.PREVIOUS:return e=this.location_,t.ASTNode.createBlockNode(e.getSourceBlock());case t.ASTNode.types.NEXT:return e=this.location_,t.ASTNode.createConnectionNode(e.targetConnection)}return null},t.ASTNode.prototype.in=function(){switch(this.type_){case t.ASTNode.types.WORKSPACE:var e=this.location_.getTopBlocks(!0);if(0<e.length)return t.ASTNode.createStackNode(e[0]);break;case t.ASTNode.types.STACK:return e=this.location_,this.findTopASTNodeForBlock_(e);case t.ASTNode.types.BLOCK:return e=this.location_,this.findFirstFieldOrInput_(e);case t.ASTNode.types.INPUT:return t.ASTNode.createConnectionNode(this.location_.targetConnection)}return null},t.ASTNode.prototype.prev=function(){switch(this.type_){case t.ASTNode.types.STACK:return this.navigateBetweenStacks_(!1);case t.ASTNode.types.FIELD:return this.findPrevForField_();case t.ASTNode.types.INPUT:return this.findPrevForInput_();case t.ASTNode.types.BLOCK:var e=this.location_;return t.ASTNode.createConnectionNode(e.previousConnection||e.outputConnection);case t.ASTNode.types.PREVIOUS:if((e=(e=this.location_).targetConnection)&&!e.getParentInput())return t.ASTNode.createConnectionNode(e);break;case t.ASTNode.types.NEXT:return e=this.location_,t.ASTNode.createBlockNode(e.getSourceBlock())}return null},t.ASTNode.prototype.out=function(){switch(this.type_){case t.ASTNode.types.STACK:var e=this.location_,i=e.getRelativeToSurfaceXY();return i=new t.utils.Coordinate(i.x,i.y+t.ASTNode.DEFAULT_OFFSET_Y),t.ASTNode.createWorkspaceNode(e.workspace,i);case t.ASTNode.types.OUTPUT:return(i=(e=this.location_).targetConnection)?t.ASTNode.createConnectionNode(i):t.ASTNode.createStackNode(e.getSourceBlock());case t.ASTNode.types.FIELD:return t.ASTNode.createBlockNode(this.location_.getSourceBlock());case t.ASTNode.types.INPUT:return e=this.location_,t.ASTNode.createBlockNode(e.getSourceBlock());case t.ASTNode.types.BLOCK:return e=this.location_,this.getOutAstNodeForBlock_(e);case t.ASTNode.types.PREVIOUS:case t.ASTNode.types.NEXT:return e=this.location_,this.getOutAstNodeForBlock_(e.getSourceBlock())}return null},t.Blocks=Object.create(null),t.Extensions={},t.Extensions.ALL_=Object.create(null),t.Extensions.register=function(e,i){if("string"!=typeof e||""==e.trim())throw Error('Error: Invalid extension name "'+e+'"');if(t.Extensions.ALL_[e])throw Error('Error: Extension "'+e+'" is already registered.');if("function"!=typeof i)throw Error('Error: Extension "'+e+'" must be a function');t.Extensions.ALL_[e]=i},t.Extensions.registerMixin=function(e,i){if(!i||"object"!=typeof i)throw Error('Error: Mixin "'+e+'" must be a object');t.Extensions.register(e,function(){this.mixin(i)})},t.Extensions.registerMutator=function(e,i,n,o){var r='Error when registering mutator "'+e+'": ';t.Extensions.checkHasFunction_(r,i.domToMutation,"domToMutation"),t.Extensions.checkHasFunction_(r,i.mutationToDom,"mutationToDom");var s=t.Extensions.checkMutatorDialog_(i,r);if(n&&"function"!=typeof n)throw Error('Extension "'+e+'" is not a function');t.Extensions.register(e,function(){if(s){if(!t.Mutator)throw Error(r+"Missing require for Blockly.Mutator");this.setMutator(new t.Mutator(o||[]))}this.mixin(i),n&&n.apply(this)})},t.Extensions.unregister=function(e){t.Extensions.ALL_[e]?delete t.Extensions.ALL_[e]:console.warn('No extension mapping for name "'+e+'" found to unregister')},t.Extensions.apply=function(e,i,n){var o=t.Extensions.ALL_[e];if("function"!=typeof o)throw Error('Error: Extension "'+e+'" not found.');if(n)t.Extensions.checkNoMutatorProperties_(e,i);else var r=t.Extensions.getMutatorProperties_(i);if(o.apply(i),n)t.Extensions.checkBlockHasMutatorProperties_('Error after applying mutator "'+e+'": ',i);else if(!t.Extensions.mutatorPropertiesMatch_(r,i))throw Error('Error when applying extension "'+e+'": mutation properties changed when applying a non-mutator extension.')},t.Extensions.checkHasFunction_=function(t,e,i){if(!e)throw Error(t+'missing required property "'+i+'"');if("function"!=typeof e)throw Error(t+'" required property "'+i+'" must be a function')},t.Extensions.checkNoMutatorProperties_=function(e,i){if(t.Extensions.getMutatorProperties_(i).length)throw Error('Error: tried to apply mutation "'+e+'" to a block that already has mutator functions.  Block id: '+i.id)},t.Extensions.checkMutatorDialog_=function(t,e){var i=void 0!==t.compose,n=void 0!==t.decompose;if(i&&n){if("function"!=typeof t.compose)throw Error(e+"compose must be a function.");if("function"!=typeof t.decompose)throw Error(e+"decompose must be a function.");return!0}if(!i&&!n)return!1;throw Error(e+'Must have both or neither of "compose" and "decompose"')},t.Extensions.checkBlockHasMutatorProperties_=function(e,i){if("function"!=typeof i.domToMutation)throw Error(e+'Applying a mutator didn\'t add "domToMutation"');if("function"!=typeof i.mutationToDom)throw Error(e+'Applying a mutator didn\'t add "mutationToDom"');t.Extensions.checkMutatorDialog_(i,e)},t.Extensions.getMutatorProperties_=function(t){var e=[];return void 0!==t.domToMutation&&e.push(t.domToMutation),void 0!==t.mutationToDom&&e.push(t.mutationToDom),void 0!==t.compose&&e.push(t.compose),void 0!==t.decompose&&e.push(t.decompose),e},t.Extensions.mutatorPropertiesMatch_=function(e,i){if((i=t.Extensions.getMutatorProperties_(i)).length!=e.length)return!1;for(var n=0;n<i.length;n++)if(e[n]!=i[n])return!1;return!0},t.Extensions.buildTooltipForDropdown=function(e,i){var n=[];return"object"==typeof document&&t.utils.runAfterPageLoad(function(){for(var e in i)t.utils.checkMessageReferences(i[e])}),function(){this.type&&-1==n.indexOf(this.type)&&(t.Extensions.checkDropdownOptionsInTable_(this,e,i),n.push(this.type)),this.setTooltip(function(){var o=String(this.getFieldValue(e)),r=i[o];return null==r?-1==n.indexOf(this.type)&&(o="No tooltip mapping for value "+o+" of field "+e,null!=this.type&&(o+=" of block type "+this.type),console.warn(o+".")):r=t.utils.replaceMessageReferences(r),r}.bind(this))}},t.Extensions.checkDropdownOptionsInTable_=function(t,e,i){var n=t.getField(e);if(!n.isOptionListDynamic()){n=n.getOptions();for(var o=0;o<n.length;++o){var r=n[o][1];null==i[r]&&console.warn("No tooltip mapping for value "+r+" of field "+e+" of block type "+t.type)}}},t.Extensions.buildTooltipWithFieldText=function(e,i){return"object"==typeof document&&t.utils.runAfterPageLoad(function(){t.utils.checkMessageReferences(e)}),function(){this.setTooltip(function(){var n=this.getField(i);return t.utils.replaceMessageReferences(e).replace("%1",n?n.getText():"")}.bind(this))}},t.Extensions.extensionParentTooltip_=function(){this.tooltipWhenNotConnected_=this.tooltip,this.setTooltip(function(){var t=this.getParent();return t&&t.getInputsInline()&&t.tooltip||this.tooltipWhenNotConnected_}.bind(this))},t.Extensions.register("parent_tooltip_when_inline",t.Extensions.extensionParentTooltip_),t.fieldRegistry={},t.fieldRegistry.register=function(e,i){t.registry.register(t.registry.Type.FIELD,e,i)},t.fieldRegistry.unregister=function(e){t.registry.unregister(t.registry.Type.FIELD,e)},t.fieldRegistry.fromJson=function(e){var i=t.registry.getObject(t.registry.Type.FIELD,e.type);return i?i.fromJson(e):(console.warn("Blockly could not create a field of type "+e.type+". The field is probably not being registered. This could be because the file is not loaded, the field does not register itself (Issue #1584), or the registration is not being reached."),null)},t.IDeletable=function(){},t.blockAnimations={},t.blockAnimations.disconnectPid_=0,t.blockAnimations.disconnectGroup_=null,t.blockAnimations.disposeUiEffect=function(e){var i=e.workspace,n=e.getSvgRoot();i.getAudioManager().play("delete"),e=i.getSvgXY(n),(n=n.cloneNode(!0)).translateX_=e.x,n.translateY_=e.y,n.setAttribute("transform","translate("+e.x+","+e.y+")"),i.getParentSvg().appendChild(n),n.bBox_=n.getBBox(),t.blockAnimations.disposeUiStep_(n,i.RTL,new Date,i.scale)},t.blockAnimations.disposeUiStep_=function(e,i,n,o){var r=(new Date-n)/150;1<r?t.utils.dom.removeNode(e):(e.setAttribute("transform","translate("+(e.translateX_+(i?-1:1)*e.bBox_.width*o/2*r)+","+(e.translateY_+e.bBox_.height*o*r)+") scale("+(1-r)*o+")"),setTimeout(t.blockAnimations.disposeUiStep_,10,e,i,n,o))},t.blockAnimations.connectionUiEffect=function(e){var i=e.workspace,n=i.scale;if(i.getAudioManager().play("click"),!(1>n)){var o=i.getSvgXY(e.getSvgRoot());e.outputConnection?(o.x+=(e.RTL?3:-3)*n,o.y+=13*n):e.previousConnection&&(o.x+=(e.RTL?-23:23)*n,o.y+=3*n),e=t.utils.dom.createSvgElement(t.utils.Svg.CIRCLE,{cx:o.x,cy:o.y,r:0,fill:"none",stroke:"#888","stroke-width":10},i.getParentSvg()),t.blockAnimations.connectionUiStep_(e,new Date,n)}},t.blockAnimations.connectionUiStep_=function(e,i,n){var o=(new Date-i)/150;1<o?t.utils.dom.removeNode(e):(e.setAttribute("r",25*o*n),e.style.opacity=1-o,t.blockAnimations.disconnectPid_=setTimeout(t.blockAnimations.connectionUiStep_,10,e,i,n))},t.blockAnimations.disconnectUiEffect=function(e){if(e.workspace.getAudioManager().play("disconnect"),!(1>e.workspace.scale)){var i=e.getHeightWidth().height;i=Math.atan(10/i)/Math.PI*180,e.RTL||(i*=-1),t.blockAnimations.disconnectUiStep_(e.getSvgRoot(),i,new Date)}},t.blockAnimations.disconnectUiStep_=function(e,i,n){var o=(new Date-n)/200;1<o?e.skew_="":(e.skew_="skewX("+Math.round(Math.sin(o*Math.PI*3)*(1-o)*i)+")",t.blockAnimations.disconnectGroup_=e,t.blockAnimations.disconnectPid_=setTimeout(t.blockAnimations.disconnectUiStep_,10,e,i,n)),e.setAttribute("transform",e.translate_+e.skew_)},t.blockAnimations.disconnectUiStop=function(){if(t.blockAnimations.disconnectGroup_){clearTimeout(t.blockAnimations.disconnectPid_);var e=t.blockAnimations.disconnectGroup_;e.skew_="",e.setAttribute("transform",e.translate_),t.blockAnimations.disconnectGroup_=null}},t.Events.BlockDrag=function(e,i,n){t.Events.BlockDrag.superClass_.constructor.call(this,e?e.workspace.id:void 0),this.blockId=e?e.id:null,this.isStart=i,this.blocks=n},t.utils.object.inherits(t.Events.BlockDrag,t.Events.UiBase),t.Events.BlockDrag.prototype.type=t.Events.BLOCK_DRAG,t.Events.BlockDrag.prototype.toJson=function(){var e=t.Events.BlockDrag.superClass_.toJson.call(this);return e.isStart=this.isStart,e.blockId=this.blockId,e.blocks=this.blocks,e},t.Events.BlockDrag.prototype.fromJson=function(e){t.Events.BlockDrag.superClass_.fromJson.call(this,e),this.isStart=e.isStart,this.blockId=e.blockId,this.blocks=e.blocks},t.registry.register(t.registry.Type.EVENT,t.Events.BLOCK_DRAG,t.Events.BlockDrag),t.IBlockDragger=function(){},t.InsertionMarkerManager=function(e){this.topBlock_=t.selected=e,this.workspace_=e.workspace,this.lastMarker_=this.lastOnStack_=null,this.firstMarker_=this.createMarkerBlock_(this.topBlock_),this.localConnection_=this.closestConnection_=null,this.wouldDeleteBlock_=!1,this.fadedBlock_=this.highlightedBlock_=this.markerConnection_=null,this.availableConnections_=this.initAvailableConnections_()},t.InsertionMarkerManager.PREVIEW_TYPE={INSERTION_MARKER:0,INPUT_OUTLINE:1,REPLACEMENT_FADE:2},t.InsertionMarkerManager.DUPLICATE_BLOCK_ERROR="The insertion marker manager tried to create a marker but the result is missing %1. If you are using a mutator, make sure your domToMutation method is properly defined.",t.InsertionMarkerManager.prototype.dispose=function(){this.availableConnections_.length=0,t.Events.disable();try{this.firstMarker_&&this.firstMarker_.dispose(),this.lastMarker_&&this.lastMarker_.dispose()}finally{t.Events.enable()}},t.InsertionMarkerManager.prototype.updateAvailableConnections=function(){this.availableConnections_=this.initAvailableConnections_()},t.InsertionMarkerManager.prototype.wouldDeleteBlock=function(){return this.wouldDeleteBlock_},t.InsertionMarkerManager.prototype.wouldConnectBlock=function(){return!!this.closestConnection_},t.InsertionMarkerManager.prototype.applyConnections=function(){if(this.closestConnection_&&(t.Events.disable(),this.hidePreview_(),t.Events.enable(),this.localConnection_.connect(this.closestConnection_),this.topBlock_.rendered)){var e=this.localConnection_.isSuperior()?this.closestConnection_:this.localConnection_;t.blockAnimations.connectionUiEffect(e.getSourceBlock()),this.topBlock_.getRootBlock().bringToFront()}},t.InsertionMarkerManager.prototype.update=function(e,i){var n=this.getCandidate_(e);((this.wouldDeleteBlock_=this.shouldDelete_(n,i))||this.shouldUpdatePreviews_(n,e))&&(t.Events.disable(),this.maybeHidePreview_(n),this.maybeShowPreview_(n),t.Events.enable())},t.InsertionMarkerManager.prototype.createMarkerBlock_=function(e){var i=e.type;t.Events.disable();try{var n=this.workspace_.newBlock(i);if(n.setInsertionMarker(!0),e.mutationToDom){var o=e.mutationToDom();o&&n.domToMutation(o)}for(i=0;i<e.inputList.length;i++){var r=e.inputList[i];if(r.name!=t.constants.COLLAPSED_INPUT_NAME){var s=n.inputList[i];if(!s)throw Error(t.InsertionMarkerManager.DUPLICATE_BLOCK_ERROR.replace("%1","an input"));for(o=0;o<r.fieldRow.length;o++){var a=r.fieldRow[o],l=s.fieldRow[o];if(!l)throw Error(t.InsertionMarkerManager.DUPLICATE_BLOCK_ERROR.replace("%1","a field"));l.setValue(a.getValue())}}}n.setCollapsed(e.isCollapsed()),n.setInputsInline(e.getInputsInline()),n.initSvg(),n.getSvgRoot().setAttribute("visibility","hidden")}finally{t.Events.enable()}return n},t.InsertionMarkerManager.prototype.initAvailableConnections_=function(){var e=this.topBlock_.getConnections_(!1),i=this.topBlock_.lastConnectionInStack(!0);if(i&&i!=this.topBlock_.nextConnection){if(e.push(i),this.lastOnStack_=i,this.lastMarker_){t.Events.disable();try{this.lastMarker_.dispose()}finally{t.Events.enable()}}this.lastMarker_=this.createMarkerBlock_(i.getSourceBlock())}return e},t.InsertionMarkerManager.prototype.shouldUpdatePreviews_=function(e,i){var n=e.local,o=e.closest;return e=e.radius,n&&o?this.localConnection_&&this.closestConnection_?(this.closestConnection_!=o||this.localConnection_!=n)&&(n=this.localConnection_.x+i.x-this.closestConnection_.x,i=this.localConnection_.y+i.y-this.closestConnection_.y,i=Math.sqrt(n*n+i*i),!(o&&e>i-t.CURRENT_CONNECTION_PREFERENCE)):!this.localConnection_&&!this.closestConnection_||(console.error("Only one of localConnection_ and closestConnection_ was set."),console.error("Returning true from shouldUpdatePreviews, but it's not clear why."),!0):!(!this.localConnection_||!this.closestConnection_)},t.InsertionMarkerManager.prototype.getCandidate_=function(t){for(var e=this.getStartRadius_(),i=null,n=null,o=0;o<this.availableConnections_.length;o++){var r=this.availableConnections_[o],s=r.closest(e,t);s.connection&&(i=s.connection,n=r,e=s.radius)}return{closest:i,local:n,radius:e}},t.InsertionMarkerManager.prototype.getStartRadius_=function(){return this.closestConnection_&&this.localConnection_?t.CONNECTING_SNAP_RADIUS:t.SNAP_RADIUS},t.InsertionMarkerManager.prototype.shouldDelete_=function(e,i){return!(!i||!this.workspace_.getComponentManager().hasCapability(i.id,t.ComponentManager.Capability.DELETE_AREA))&&i.wouldDelete(this.topBlock_,e&&!!e.closest)},t.InsertionMarkerManager.prototype.maybeShowPreview_=function(t){if(!this.wouldDeleteBlock_){var e=t.closest;t=t.local,e&&(e==this.closestConnection_||e.getSourceBlock().isInsertionMarker()?console.log("Trying to connect to an insertion marker"):(this.closestConnection_=e,this.localConnection_=t,this.showPreview_()))}},t.InsertionMarkerManager.prototype.showPreview_=function(){var e=this.closestConnection_,i=this.workspace_.getRenderer();switch(i.getConnectionPreviewMethod(e,this.localConnection_,this.topBlock_)){case t.InsertionMarkerManager.PREVIEW_TYPE.INPUT_OUTLINE:this.showInsertionInputOutline_();break;case t.InsertionMarkerManager.PREVIEW_TYPE.INSERTION_MARKER:this.showInsertionMarker_();break;case t.InsertionMarkerManager.PREVIEW_TYPE.REPLACEMENT_FADE:this.showReplacementFade_()}e&&i.shouldHighlightConnection(e)&&e.highlight()},t.InsertionMarkerManager.prototype.maybeHidePreview_=function(t){if(t.closest){var e=this.closestConnection_!=t.closest;t=this.localConnection_!=t.local,this.closestConnection_&&this.localConnection_&&(e||t||this.wouldDeleteBlock_)&&this.hidePreview_()}else this.hidePreview_();this.localConnection_=this.closestConnection_=this.markerConnection_=null},t.InsertionMarkerManager.prototype.hidePreview_=function(){this.closestConnection_&&this.closestConnection_.targetBlock()&&this.workspace_.getRenderer().shouldHighlightConnection(this.closestConnection_)&&this.closestConnection_.unhighlight(),this.fadedBlock_?this.hideReplacementFade_():this.highlightedBlock_?this.hideInsertionInputOutline_():this.markerConnection_&&this.hideInsertionMarker_()},t.InsertionMarkerManager.prototype.showInsertionMarker_=function(){var t=this.localConnection_,e=this.closestConnection_,i=this.lastOnStack_&&t==this.lastOnStack_?this.lastMarker_:this.firstMarker_;if((t=i.getMatchingConnection(t.getSourceBlock(),t))==this.markerConnection_)throw Error("Made it to showInsertionMarker_ even though the marker isn't changing");i.render(),i.rendered=!0,i.getSvgRoot().setAttribute("visibility","visible"),t&&e&&i.positionNearConnection(t,e),e&&t.connect(e),this.markerConnection_=t},t.InsertionMarkerManager.prototype.hideInsertionMarker_=function(){if(this.markerConnection_){var e=this.markerConnection_,i=e.getSourceBlock(),n=i.nextConnection,o=i.previousConnection,r=i.outputConnection;if(r=e.type==t.connectionTypes.INPUT_VALUE&&!(r&&r.targetConnection),!(e!=n||o&&o.targetConnection)||r?e.targetBlock().unplug(!1):e.type==t.connectionTypes.NEXT_STATEMENT&&e!=n?((n=e.targetConnection).getSourceBlock().unplug(!1),o=o?o.targetConnection:null,i.unplug(!0),o&&o.connect(n)):i.unplug(!0),e.targetConnection)throw Error("markerConnection_ still connected at the end of disconnectInsertionMarker");this.markerConnection_=null,(e=i.getSvgRoot())&&e.setAttribute("visibility","hidden")}else console.log("No insertion marker connection to disconnect")},t.InsertionMarkerManager.prototype.showInsertionInputOutline_=function(){var t=this.closestConnection_;this.highlightedBlock_=t.getSourceBlock(),this.highlightedBlock_.highlightShapeForInput(t,!0)},t.InsertionMarkerManager.prototype.hideInsertionInputOutline_=function(){this.highlightedBlock_.highlightShapeForInput(this.closestConnection_,!1),this.highlightedBlock_=null},t.InsertionMarkerManager.prototype.showReplacementFade_=function(){this.fadedBlock_=this.closestConnection_.targetBlock(),this.fadedBlock_.fadeForReplacement(!0)},t.InsertionMarkerManager.prototype.hideReplacementFade_=function(){this.fadedBlock_.fadeForReplacement(!1),this.fadedBlock_=null},t.InsertionMarkerManager.prototype.getInsertionMarkers=function(){var t=[];return this.firstMarker_&&t.push(this.firstMarker_),this.lastMarker_&&t.push(this.lastMarker_),t},t.BlockDragger=function(e,i){this.draggingBlock_=e,this.workspace_=i,this.draggedConnectionManager_=new t.InsertionMarkerManager(this.draggingBlock_),this.dragTarget_=null,this.wouldDeleteBlock_=!1,this.startXY_=this.draggingBlock_.getRelativeToSurfaceXY(),this.dragIconData_=t.BlockDragger.initIconData_(e)},t.BlockDragger.prototype.dispose=function(){this.dragIconData_.length=0,this.draggedConnectionManager_&&this.draggedConnectionManager_.dispose()},t.BlockDragger.initIconData_=function(t){var e=[];t=t.getDescendants(!1);for(var i,n=0;i=t[n];n++){i=i.getIcons();for(var o=0;o<i.length;o++){var r={location:i[o].getIconLocation(),icon:i[o]};e.push(r)}}return e},t.BlockDragger.prototype.startDrag=function(e,i){t.Events.getGroup()||t.Events.setGroup(!0),this.fireDragStartEvent_(),this.workspace_.isMutator&&this.draggingBlock_.bringToFront(),t.utils.dom.startTextWidthCache(),this.workspace_.setResizesEnabled(!1),t.blockAnimations.disconnectUiStop(),this.shouldDisconnect_(i)&&this.disconnectBlock_(i,e),this.draggingBlock_.setDragging(!0),this.draggingBlock_.moveToDragSurface()},t.BlockDragger.prototype.shouldDisconnect_=function(t){return!!(this.draggingBlock_.getParent()||t&&this.draggingBlock_.nextConnection&&this.draggingBlock_.nextConnection.targetBlock())},t.BlockDragger.prototype.disconnectBlock_=function(e,i){this.draggingBlock_.unplug(e),e=this.pixelsToWorkspaceUnits_(i),e=t.utils.Coordinate.sum(this.startXY_,e),this.draggingBlock_.translate(e.x,e.y),t.blockAnimations.disconnectUiEffect(this.draggingBlock_),this.draggedConnectionManager_.updateAvailableConnections()},t.BlockDragger.prototype.fireDragStartEvent_=function(){var e=new(t.Events.get(t.Events.BLOCK_DRAG))(this.draggingBlock_,!0,this.draggingBlock_.getDescendants(!1));t.Events.fire(e)},t.BlockDragger.prototype.drag=function(e,i){i=this.pixelsToWorkspaceUnits_(i);var n=t.utils.Coordinate.sum(this.startXY_,i);this.draggingBlock_.moveDuringDrag(n),this.dragIcons_(i),n=this.dragTarget_,this.dragTarget_=this.workspace_.getDragTarget(e),this.draggedConnectionManager_.update(i,this.dragTarget_),e=this.wouldDeleteBlock_,this.wouldDeleteBlock_=this.draggedConnectionManager_.wouldDeleteBlock(),e!=this.wouldDeleteBlock_&&this.updateCursorDuringBlockDrag_(),this.dragTarget_!==n&&(n&&n.onDragExit(this.draggingBlock_),this.dragTarget_&&this.dragTarget_.onDragEnter(this.draggingBlock_)),this.dragTarget_&&this.dragTarget_.onDragOver(this.draggingBlock_)},t.BlockDragger.prototype.endDrag=function(e,i){if(this.drag(e,i),this.dragIconData_=[],this.fireDragEndEvent_(),t.utils.dom.stopTextWidthCache(),t.blockAnimations.disconnectUiStop(),this.dragTarget_&&this.dragTarget_.shouldPreventMove(this.draggingBlock_))e=this.startXY_;else{var n=(e=this.getNewLocationAfterDrag_(i)).delta;e=e.newLocation}this.draggingBlock_.moveOffDragSurface(e),this.dragTarget_&&this.dragTarget_.onDrop(this.draggingBlock_),this.maybeDeleteBlock_()||(this.draggingBlock_.setDragging(!1),n?this.updateBlockAfterMove_(n):t.bumpObjectIntoBounds_(this.draggingBlock_.workspace,this.workspace_.getMetricsManager().getScrollMetrics(!0),this.draggingBlock_)),this.workspace_.setResizesEnabled(!0),t.Events.setGroup(!1)},t.BlockDragger.prototype.getNewLocationAfterDrag_=function(e){var i={};return i.delta=this.pixelsToWorkspaceUnits_(e),i.newLocation=t.utils.Coordinate.sum(this.startXY_,i.delta),i},t.BlockDragger.prototype.maybeDeleteBlock_=function(){return!!this.wouldDeleteBlock_&&(this.fireMoveEvent_(),this.draggingBlock_.dispose(!1,!0),t.draggingConnections=[],!0)},t.BlockDragger.prototype.updateBlockAfterMove_=function(t){this.draggingBlock_.moveConnections(t.x,t.y),this.fireMoveEvent_(),this.draggedConnectionManager_.wouldConnectBlock()?this.draggedConnectionManager_.applyConnections():this.draggingBlock_.render(),this.draggingBlock_.scheduleSnapAndBump()},t.BlockDragger.prototype.fireDragEndEvent_=function(){var e=new(t.Events.get(t.Events.BLOCK_DRAG))(this.draggingBlock_,!1,this.draggingBlock_.getDescendants(!1));t.Events.fire(e)},t.BlockDragger.prototype.updateToolboxStyle_=function(t){var e=this.workspace_.getToolbox();if(e){var i=this.draggingBlock_.isDeletable()?"blocklyToolboxDelete":"blocklyToolboxGrab";t&&"function"==typeof e.removeStyle?e.removeStyle(i):t||"function"!=typeof e.addStyle||e.addStyle(i)}},t.BlockDragger.prototype.fireMoveEvent_=function(){var e=new(t.Events.get(t.Events.BLOCK_MOVE))(this.draggingBlock_);e.oldCoordinate=this.startXY_,e.recordNew(),t.Events.fire(e)},t.BlockDragger.prototype.updateCursorDuringBlockDrag_=function(){this.draggingBlock_.setDeleteStyle(this.wouldDeleteBlock_)},t.BlockDragger.prototype.pixelsToWorkspaceUnits_=function(e){return e=new t.utils.Coordinate(e.x/this.workspace_.scale,e.y/this.workspace_.scale),this.workspace_.isMutator&&e.scale(1/this.workspace_.options.parentWorkspace.scale),e},t.BlockDragger.prototype.dragIcons_=function(e){for(var i=0;i<this.dragIconData_.length;i++){var n=this.dragIconData_[i];n.icon.setIconLocation(t.utils.Coordinate.sum(n.location,e))}},t.BlockDragger.prototype.getInsertionMarkers=function(){return this.draggedConnectionManager_&&this.draggedConnectionManager_.getInsertionMarkers?this.draggedConnectionManager_.getInsertionMarkers():[]},t.registry.register(t.registry.Type.BLOCK_DRAGGER,t.registry.DEFAULT,t.BlockDragger),t.IContextMenu=function(){},t.IDraggable=function(){},t.IBubble=function(){},t.Bubble=function(e,i,n,o,r,s){this.workspace_=e,this.content_=i,this.shape_=n,this.onMouseDownResizeWrapper_=this.onMouseDownBubbleWrapper_=this.moveCallback_=this.resizeCallback_=null,this.disposed=!1,n=t.Bubble.ARROW_ANGLE,this.workspace_.RTL&&(n=-n),this.arrow_radians_=t.utils.math.toRadians(n),e.getBubbleCanvas().appendChild(this.createDom_(i,!(!r||!s))),this.setAnchorLocation(o),r&&s||(r=(e=this.content_.getBBox()).width+2*t.Bubble.BORDER_WIDTH,s=e.height+2*t.Bubble.BORDER_WIDTH),this.setBubbleSize(r,s),this.positionBubble_(),this.renderArrow_(),this.rendered_=!0},t.Bubble.BORDER_WIDTH=6,t.Bubble.ARROW_THICKNESS=5,t.Bubble.ARROW_ANGLE=20,t.Bubble.ARROW_BEND=4,t.Bubble.ANCHOR_RADIUS=8,t.Bubble.onMouseUpWrapper_=null,t.Bubble.onMouseMoveWrapper_=null,t.Bubble.unbindDragEvents_=function(){t.Bubble.onMouseUpWrapper_&&(t.browserEvents.unbind(t.Bubble.onMouseUpWrapper_),t.Bubble.onMouseUpWrapper_=null),t.Bubble.onMouseMoveWrapper_&&(t.browserEvents.unbind(t.Bubble.onMouseMoveWrapper_),t.Bubble.onMouseMoveWrapper_=null)},t.Bubble.bubbleMouseUp_=function(e){t.Touch.clearTouchIdentifier(),t.Bubble.unbindDragEvents_()},t.Bubble.prototype.rendered_=!1,t.Bubble.prototype.anchorXY_=null,t.Bubble.prototype.relativeLeft_=0,t.Bubble.prototype.relativeTop_=0,t.Bubble.prototype.width_=0,t.Bubble.prototype.height_=0,t.Bubble.prototype.autoLayout_=!0,t.Bubble.prototype.createDom_=function(e,i){this.bubbleGroup_=t.utils.dom.createSvgElement(t.utils.Svg.G,{},null);var n={filter:"url(#"+this.workspace_.getRenderer().getConstants().embossFilterId+")"};return t.utils.userAgent.JAVA_FX&&(n={}),n=t.utils.dom.createSvgElement(t.utils.Svg.G,n,this.bubbleGroup_),this.bubbleArrow_=t.utils.dom.createSvgElement(t.utils.Svg.PATH,{},n),this.bubbleBack_=t.utils.dom.createSvgElement(t.utils.Svg.RECT,{class:"blocklyDraggable",x:0,y:0,rx:t.Bubble.BORDER_WIDTH,ry:t.Bubble.BORDER_WIDTH},n),i?(this.resizeGroup_=t.utils.dom.createSvgElement(t.utils.Svg.G,{class:this.workspace_.RTL?"blocklyResizeSW":"blocklyResizeSE"},this.bubbleGroup_),i=2*t.Bubble.BORDER_WIDTH,t.utils.dom.createSvgElement(t.utils.Svg.POLYGON,{points:"0,x x,x x,0".replace(/x/g,i.toString())},this.resizeGroup_),t.utils.dom.createSvgElement(t.utils.Svg.LINE,{class:"blocklyResizeLine",x1:i/3,y1:i-1,x2:i-1,y2:i/3},this.resizeGroup_),t.utils.dom.createSvgElement(t.utils.Svg.LINE,{class:"blocklyResizeLine",x1:2*i/3,y1:i-1,x2:i-1,y2:2*i/3},this.resizeGroup_)):this.resizeGroup_=null,this.workspace_.options.readOnly||(this.onMouseDownBubbleWrapper_=t.browserEvents.conditionalBind(this.bubbleBack_,"mousedown",this,this.bubbleMouseDown_),this.resizeGroup_&&(this.onMouseDownResizeWrapper_=t.browserEvents.conditionalBind(this.resizeGroup_,"mousedown",this,this.resizeMouseDown_))),this.bubbleGroup_.appendChild(e),this.bubbleGroup_},t.Bubble.prototype.getSvgRoot=function(){return this.bubbleGroup_},t.Bubble.prototype.setSvgId=function(t){this.bubbleGroup_.dataset&&(this.bubbleGroup_.dataset.blockId=t)},t.Bubble.prototype.bubbleMouseDown_=function(t){var e=this.workspace_.getGesture(t);e&&e.handleBubbleStart(t,this)},t.Bubble.prototype.showContextMenu=function(t){},t.Bubble.prototype.isDeletable=function(){return!1},t.Bubble.prototype.setDeleteStyle=function(t){},t.Bubble.prototype.resizeMouseDown_=function(e){this.promote(),t.Bubble.unbindDragEvents_(),t.utils.isRightButton(e)||(this.workspace_.startDrag(e,new t.utils.Coordinate(this.workspace_.RTL?-this.width_:this.width_,this.height_)),t.Bubble.onMouseUpWrapper_=t.browserEvents.conditionalBind(document,"mouseup",this,t.Bubble.bubbleMouseUp_),t.Bubble.onMouseMoveWrapper_=t.browserEvents.conditionalBind(document,"mousemove",this,this.resizeMouseMove_),t.hideChaff()),e.stopPropagation()},t.Bubble.prototype.resizeMouseMove_=function(t){this.autoLayout_=!1,t=this.workspace_.moveDrag(t),this.setBubbleSize(this.workspace_.RTL?-t.x:t.x,t.y),this.workspace_.RTL&&this.positionBubble_()},t.Bubble.prototype.registerResizeEvent=function(t){this.resizeCallback_=t},t.Bubble.prototype.registerMoveEvent=function(t){this.moveCallback_=t},t.Bubble.prototype.promote=function(){var t=this.bubbleGroup_.parentNode;return t.lastChild!==this.bubbleGroup_&&(t.appendChild(this.bubbleGroup_),!0)},t.Bubble.prototype.setAnchorLocation=function(t){this.anchorXY_=t,this.rendered_&&this.positionBubble_()},t.Bubble.prototype.layoutBubble_=function(){var t=this.workspace_.getMetricsManager().getViewMetrics(!0),e=this.getOptimalRelativeLeft_(t),i=this.getOptimalRelativeTop_(t),n=this.shape_.getBBox(),o={x:e,y:-this.height_-this.workspace_.getRenderer().getConstants().MIN_BLOCK_HEIGHT},r={x:-this.width_-30,y:i};i={x:n.width,y:i};var s={x:e,y:n.height};e=n.width<n.height?i:s,n=n.width<n.height?s:i,i=this.getOverlap_(o,t),s=this.getOverlap_(r,t);var a=this.getOverlap_(e,t);t=this.getOverlap_(n,t),i==(t=Math.max(i,s,a,t))?(this.relativeLeft_=o.x,this.relativeTop_=o.y):s==t?(this.relativeLeft_=r.x,this.relativeTop_=r.y):a==t?(this.relativeLeft_=e.x,this.relativeTop_=e.y):(this.relativeLeft_=n.x,this.relativeTop_=n.y)},t.Bubble.prototype.getOverlap_=function(t,e){var i=this.workspace_.RTL?this.anchorXY_.x-t.x-this.width_:t.x+this.anchorXY_.x;return t=t.y+this.anchorXY_.y,Math.max(0,Math.min(1,(Math.min(i+this.width_,e.left+e.width)-Math.max(i,e.left))*(Math.min(t+this.height_,e.top+e.height)-Math.max(t,e.top))/(this.width_*this.height_)))},t.Bubble.prototype.getOptimalRelativeLeft_=function(e){var i=-this.width_/4;if(this.width_>e.width)return i;if(this.workspace_.RTL)var n=this.anchorXY_.x-i,o=n-this.width_,r=e.left+e.width,s=e.left+t.Scrollbar.scrollbarThickness/this.workspace_.scale;else n=(o=i+this.anchorXY_.x)+this.width_,s=e.left,r=e.left+e.width-t.Scrollbar.scrollbarThickness/this.workspace_.scale;return this.workspace_.RTL?o<s?i=-(s-this.anchorXY_.x+this.width_):n>r&&(i=-(r-this.anchorXY_.x)):o<s?i=s-this.anchorXY_.x:n>r&&(i=r-this.anchorXY_.x-this.width_),i},t.Bubble.prototype.getOptimalRelativeTop_=function(e){var i=-this.height_/4;if(this.height_>e.height)return i;var n=this.anchorXY_.y+i,o=n+this.height_,r=e.top;e=e.top+e.height-t.Scrollbar.scrollbarThickness/this.workspace_.scale;var s=this.anchorXY_.y;return n<r?i=r-s:o>e&&(i=e-s-this.height_),i},t.Bubble.prototype.positionBubble_=function(){var t=this.anchorXY_.x;t=this.workspace_.RTL?t-(this.relativeLeft_+this.width_):t+this.relativeLeft_,this.moveTo(t,this.relativeTop_+this.anchorXY_.y)},t.Bubble.prototype.moveTo=function(t,e){this.bubbleGroup_.setAttribute("transform","translate("+t+","+e+")")},t.Bubble.prototype.setDragging=function(t){!t&&this.moveCallback_&&this.moveCallback_()},t.Bubble.prototype.getBubbleSize=function(){return new t.utils.Size(this.width_,this.height_)},t.Bubble.prototype.setBubbleSize=function(e,i){var n=2*t.Bubble.BORDER_WIDTH;e=Math.max(e,n+45),i=Math.max(i,n+20),this.width_=e,this.height_=i,this.bubbleBack_.setAttribute("width",e),this.bubbleBack_.setAttribute("height",i),this.resizeGroup_&&(this.workspace_.RTL?this.resizeGroup_.setAttribute("transform","translate("+2*t.Bubble.BORDER_WIDTH+","+(i-n)+") scale(-1 1)"):this.resizeGroup_.setAttribute("transform","translate("+(e-n)+","+(i-n)+")")),this.autoLayout_&&this.layoutBubble_(),this.positionBubble_(),this.renderArrow_(),this.resizeCallback_&&this.resizeCallback_()},t.Bubble.prototype.renderArrow_=function(){var e=[],i=this.width_/2,n=this.height_/2,o=-this.relativeLeft_,r=-this.relativeTop_;if(i==o&&n==r)e.push("M "+i+","+n);else{r-=n,o-=i,this.workspace_.RTL&&(o*=-1);var s=Math.sqrt(r*r+o*o),a=Math.acos(o/s);0>r&&(a=2*Math.PI-a);var l=a+Math.PI/2;l>2*Math.PI&&(l-=2*Math.PI);var c=Math.sin(l),u=Math.cos(l),h=this.getBubbleSize();l=(h.width+h.height)/t.Bubble.ARROW_THICKNESS,l=Math.min(l,h.width,h.height)/4,o=i+(h=1-t.Bubble.ANCHOR_RADIUS/s)*o,r=n+h*r,h=i+l*u;var p=n+l*c;i-=l*u,n-=l*c,(c=a+this.arrow_radians_)>2*Math.PI&&(c-=2*Math.PI),a=Math.sin(c)*s/t.Bubble.ARROW_BEND,s=Math.cos(c)*s/t.Bubble.ARROW_BEND,e.push("M"+h+","+p),e.push("C"+(h+s)+","+(p+a)+" "+o+","+r+" "+o+","+r),e.push("C"+o+","+r+" "+(i+s)+","+(n+a)+" "+i+","+n)}e.push("z"),this.bubbleArrow_.setAttribute("d",e.join(" "))},t.Bubble.prototype.setColour=function(t){this.bubbleBack_.setAttribute("fill",t),this.bubbleArrow_.setAttribute("fill",t)},t.Bubble.prototype.dispose=function(){this.onMouseDownBubbleWrapper_&&t.browserEvents.unbind(this.onMouseDownBubbleWrapper_),this.onMouseDownResizeWrapper_&&t.browserEvents.unbind(this.onMouseDownResizeWrapper_),t.Bubble.unbindDragEvents_(),t.utils.dom.removeNode(this.bubbleGroup_),this.disposed=!0},t.Bubble.prototype.moveDuringDrag=function(t,e){t?t.translateSurface(e.x,e.y):this.moveTo(e.x,e.y),this.relativeLeft_=this.workspace_.RTL?this.anchorXY_.x-e.x-this.width_:e.x-this.anchorXY_.x,this.relativeTop_=e.y-this.anchorXY_.y,this.renderArrow_()},t.Bubble.prototype.getRelativeToSurfaceXY=function(){return new t.utils.Coordinate(this.workspace_.RTL?-this.relativeLeft_+this.anchorXY_.x-this.width_:this.anchorXY_.x+this.relativeLeft_,this.anchorXY_.y+this.relativeTop_)},t.Bubble.prototype.setAutoLayout=function(t){this.autoLayout_=t},t.Bubble.textToDom=function(e){var i=t.utils.dom.createSvgElement(t.utils.Svg.TEXT,{class:"blocklyText blocklyBubbleText blocklyNoPointerEvents",y:t.Bubble.BORDER_WIDTH},null);e=e.split("\n");for(var n=0;n<e.length;n++){var o=t.utils.dom.createSvgElement(t.utils.Svg.TSPAN,{dy:"1em",x:t.Bubble.BORDER_WIDTH},i),r=document.createTextNode(e[n]);o.appendChild(r)}return i},t.Bubble.createNonEditableBubble=function(e,i,n){if((n=new t.Bubble(i.workspace,e,i.pathObject.svgPath,n,null,null)).setSvgId(i.id),i.RTL){i=e.getBBox().width;for(var o,r=0;o=e.childNodes[r];r++)o.setAttribute("text-anchor","end"),o.setAttribute("x",i+t.Bubble.BORDER_WIDTH)}return n},t.Events.CommentBase=function(e){this.commentId=(this.isBlank=void 0===e)?"":e.id,this.workspaceId=this.isBlank?"":e.workspace.id,this.group=t.Events.getGroup(),this.recordUndo=t.Events.recordUndo},t.utils.object.inherits(t.Events.CommentBase,t.Events.Abstract),t.Events.CommentBase.prototype.toJson=function(){var e=t.Events.CommentBase.superClass_.toJson.call(this);return this.commentId&&(e.commentId=this.commentId),e},t.Events.CommentBase.prototype.fromJson=function(e){t.Events.CommentBase.superClass_.fromJson.call(this,e),this.commentId=e.commentId},t.Events.CommentChange=function(e,i,n){t.Events.CommentChange.superClass_.constructor.call(this,e),e&&(this.oldContents_=void 0===i?"":i,this.newContents_=void 0===n?"":n)},t.utils.object.inherits(t.Events.CommentChange,t.Events.CommentBase),t.Events.CommentChange.prototype.type=t.Events.COMMENT_CHANGE,t.Events.CommentChange.prototype.toJson=function(){var e=t.Events.CommentChange.superClass_.toJson.call(this);return e.oldContents=this.oldContents_,e.newContents=this.newContents_,e},t.Events.CommentChange.prototype.fromJson=function(e){t.Events.CommentChange.superClass_.fromJson.call(this,e),this.oldContents_=e.oldContents,this.newContents_=e.newContents},t.Events.CommentChange.prototype.isNull=function(){return this.oldContents_==this.newContents_},t.Events.CommentChange.prototype.run=function(t){var e=this.getEventWorkspace_().getCommentById(this.commentId);e?e.setContent(t?this.newContents_:this.oldContents_):console.warn("Can't change non-existent comment: "+this.commentId)},t.Events.CommentCreate=function(e){t.Events.CommentCreate.superClass_.constructor.call(this,e),e&&(this.xml=e.toXmlWithXY())},t.utils.object.inherits(t.Events.CommentCreate,t.Events.CommentBase),t.Events.CommentCreate.prototype.type=t.Events.COMMENT_CREATE,t.Events.CommentCreate.prototype.toJson=function(){var e=t.Events.CommentCreate.superClass_.toJson.call(this);return e.xml=t.Xml.domToText(this.xml),e},t.Events.CommentCreate.prototype.fromJson=function(e){t.Events.CommentCreate.superClass_.fromJson.call(this,e),this.xml=t.Xml.textToDom(e.xml)},t.Events.CommentCreate.prototype.run=function(e){t.Events.CommentCreateDeleteHelper(this,e)},t.Events.CommentCreateDeleteHelper=function(e,i){var n=e.getEventWorkspace_();i?((i=t.utils.xml.createElement("xml")).appendChild(e.xml),t.Xml.domToWorkspace(i,n)):(n=n.getCommentById(e.commentId))?n.dispose(!1,!1):console.warn("Can't uncreate non-existent comment: "+e.commentId)},t.Events.CommentDelete=function(e){t.Events.CommentDelete.superClass_.constructor.call(this,e),e&&(this.xml=e.toXmlWithXY())},t.utils.object.inherits(t.Events.CommentDelete,t.Events.CommentBase),t.Events.CommentDelete.prototype.type=t.Events.COMMENT_DELETE,t.Events.CommentDelete.prototype.toJson=function(){return t.Events.CommentDelete.superClass_.toJson.call(this)},t.Events.CommentDelete.prototype.fromJson=function(e){t.Events.CommentDelete.superClass_.fromJson.call(this,e)},t.Events.CommentDelete.prototype.run=function(e){t.Events.CommentCreateDeleteHelper(this,!e)},t.Events.CommentMove=function(e){t.Events.CommentMove.superClass_.constructor.call(this,e),e&&(this.comment_=e,this.oldCoordinate_=e.getXY(),this.newCoordinate_=null)},t.utils.object.inherits(t.Events.CommentMove,t.Events.CommentBase),t.Events.CommentMove.prototype.recordNew=function(){if(!this.comment_)throw Error("Tried to record the new position of a comment on the same event twice.");this.newCoordinate_=this.comment_.getXY(),this.comment_=null},t.Events.CommentMove.prototype.type=t.Events.COMMENT_MOVE,t.Events.CommentMove.prototype.setOldCoordinate=function(t){this.oldCoordinate_=t},t.Events.CommentMove.prototype.toJson=function(){var e=t.Events.CommentMove.superClass_.toJson.call(this);return this.oldCoordinate_&&(e.oldCoordinate=Math.round(this.oldCoordinate_.x)+","+Math.round(this.oldCoordinate_.y)),this.newCoordinate_&&(e.newCoordinate=Math.round(this.newCoordinate_.x)+","+Math.round(this.newCoordinate_.y)),e},t.Events.CommentMove.prototype.fromJson=function(e){if(t.Events.CommentMove.superClass_.fromJson.call(this,e),e.oldCoordinate){var i=e.oldCoordinate.split(",");this.oldCoordinate_=new t.utils.Coordinate(Number(i[0]),Number(i[1]))}e.newCoordinate&&(i=e.newCoordinate.split(","),this.newCoordinate_=new t.utils.Coordinate(Number(i[0]),Number(i[1])))},t.Events.CommentMove.prototype.isNull=function(){return t.utils.Coordinate.equals(this.oldCoordinate_,this.newCoordinate_)},t.Events.CommentMove.prototype.run=function(t){var e=this.getEventWorkspace_().getCommentById(this.commentId);if(e){t=t?this.newCoordinate_:this.oldCoordinate_;var i=e.getXY();e.moveBy(t.x-i.x,t.y-i.y)}else console.warn("Can't move non-existent comment: "+this.commentId)},t.registry.register(t.registry.Type.EVENT,t.Events.COMMENT_CREATE,t.Events.CommentCreate),t.registry.register(t.registry.Type.EVENT,t.Events.COMMENT_CHANGE,t.Events.CommentChange),t.registry.register(t.registry.Type.EVENT,t.Events.COMMENT_MOVE,t.Events.CommentMove),t.registry.register(t.registry.Type.EVENT,t.Events.COMMENT_DELETE,t.Events.CommentDelete),t.BubbleDragger=function(e,i){this.draggingBubble_=e,this.workspace_=i,this.dragTarget_=null,this.wouldDeleteBubble_=!1,this.startXY_=this.draggingBubble_.getRelativeToSurfaceXY(),this.dragSurface_=t.utils.is3dSupported()&&i.getBlockDragSurface()?i.getBlockDragSurface():null},t.BubbleDragger.prototype.dispose=function(){this.dragSurface_=this.workspace_=this.draggingBubble_=null},t.BubbleDragger.prototype.startBubbleDrag=function(){t.Events.getGroup()||t.Events.setGroup(!0),this.workspace_.setResizesEnabled(!1),this.draggingBubble_.setAutoLayout(!1),this.dragSurface_&&this.moveToDragSurface_(),this.draggingBubble_.setDragging&&this.draggingBubble_.setDragging(!0)},t.BubbleDragger.prototype.dragBubble=function(e,i){i=this.pixelsToWorkspaceUnits_(i),i=t.utils.Coordinate.sum(this.startXY_,i),this.draggingBubble_.moveDuringDrag(this.dragSurface_,i),i=this.dragTarget_,this.dragTarget_=this.workspace_.getDragTarget(e),e=this.wouldDeleteBubble_,this.wouldDeleteBubble_=this.shouldDelete_(this.dragTarget_),e!=this.wouldDeleteBubble_&&this.updateCursorDuringBubbleDrag_(),this.dragTarget_!==i&&(i&&i.onDragExit(this.draggingBubble_),this.dragTarget_&&this.dragTarget_.onDragEnter(this.draggingBubble_)),this.dragTarget_&&this.dragTarget_.onDragOver(this.draggingBubble_)},t.BubbleDragger.prototype.shouldDelete_=function(e){return!(!e||!this.workspace_.getComponentManager().hasCapability(e.id,t.ComponentManager.Capability.DELETE_AREA))&&e.wouldDelete(this.draggingBubble_,!1)},t.BubbleDragger.prototype.updateCursorDuringBubbleDrag_=function(){this.draggingBubble_.setDeleteStyle(this.wouldDeleteBubble_)},t.BubbleDragger.prototype.endBubbleDrag=function(e,i){this.dragBubble(e,i),this.dragTarget_&&this.dragTarget_.shouldPreventMove(this.draggingBubble_)?e=this.startXY_:(e=this.pixelsToWorkspaceUnits_(i),e=t.utils.Coordinate.sum(this.startXY_,e)),this.draggingBubble_.moveTo(e.x,e.y),this.dragTarget_&&this.dragTarget_.onDrop(this.draggingBubble_),this.wouldDeleteBubble_?(this.fireMoveEvent_(),this.draggingBubble_.dispose(!1,!0)):(this.dragSurface_&&this.dragSurface_.clearAndHide(this.workspace_.getBubbleCanvas()),this.draggingBubble_.setDragging&&this.draggingBubble_.setDragging(!1),this.fireMoveEvent_()),this.workspace_.setResizesEnabled(!0),t.Events.setGroup(!1)},t.BubbleDragger.prototype.fireMoveEvent_=function(){if(this.draggingBubble_.isComment){var e=new(t.Events.get(t.Events.COMMENT_MOVE))(this.draggingBubble_);e.setOldCoordinate(this.startXY_),e.recordNew(),t.Events.fire(e)}},t.BubbleDragger.prototype.pixelsToWorkspaceUnits_=function(e){return e=new t.utils.Coordinate(e.x/this.workspace_.scale,e.y/this.workspace_.scale),this.workspace_.isMutator&&e.scale(1/this.workspace_.options.parentWorkspace.scale),e},t.BubbleDragger.prototype.moveToDragSurface_=function(){this.draggingBubble_.moveTo(0,0),this.dragSurface_.translateSurface(this.startXY_.x,this.startXY_.y),this.dragSurface_.setBlocksAndShow(this.draggingBubble_.getSvgRoot())},t.Events.Click=function(e,i,n){t.Events.Click.superClass_.constructor.call(this,e?e.workspace.id:i),this.blockId=e?e.id:null,this.targetType=n},t.utils.object.inherits(t.Events.Click,t.Events.UiBase),t.Events.Click.prototype.type=t.Events.CLICK,t.Events.Click.prototype.toJson=function(){var e=t.Events.Click.superClass_.toJson.call(this);return e.targetType=this.targetType,this.blockId&&(e.blockId=this.blockId),e},t.Events.Click.prototype.fromJson=function(e){t.Events.Click.superClass_.fromJson.call(this,e),this.targetType=e.targetType,this.blockId=e.blockId},t.registry.register(t.registry.Type.EVENT,t.Events.CLICK,t.Events.Click),t.WorkspaceDragger=function(e){this.workspace_=e,this.horizontalScrollEnabled_=this.workspace_.isMovableHorizontally(),this.verticalScrollEnabled_=this.workspace_.isMovableVertically(),this.startScrollXY_=new t.utils.Coordinate(e.scrollX,e.scrollY)},t.WorkspaceDragger.prototype.dispose=function(){this.workspace_=null},t.WorkspaceDragger.prototype.startDrag=function(){t.selected&&t.selected.unselect(),this.workspace_.setupDragSurface()},t.WorkspaceDragger.prototype.endDrag=function(t){this.drag(t),this.workspace_.resetDragSurface()},t.WorkspaceDragger.prototype.drag=function(e){if(e=t.utils.Coordinate.sum(this.startScrollXY_,e),this.horizontalScrollEnabled_&&this.verticalScrollEnabled_)this.workspace_.scroll(e.x,e.y);else if(this.horizontalScrollEnabled_)this.workspace_.scroll(e.x,this.workspace_.scrollY);else{if(!this.verticalScrollEnabled_)throw new TypeError("Invalid state.");this.workspace_.scroll(this.workspace_.scrollX,e.y)}},t.Gesture=function(e,i){this.mouseDownXY_=null,this.currentDragDeltaXY_=new t.utils.Coordinate(0,0),this.startWorkspace_=this.targetBlock_=this.startBlock_=this.startField_=this.startBubble_=null,this.creatorWorkspace_=i,this.isDraggingBubble_=this.isDraggingBlock_=this.isDraggingWorkspace_=this.hasExceededDragRadius_=!1,this.mostRecentEvent_=e,this.flyout_=this.workspaceDragger_=this.blockDragger_=this.bubbleDragger_=this.onUpWrapper_=this.onMoveWrapper_=null,this.isEnding_=this.hasStarted_=this.calledUpdateIsDragging_=!1,this.healStack_=!t.DRAG_STACK},t.Gesture.prototype.dispose=function(){t.Touch.clearTouchIdentifier(),t.Tooltip.unblock(),this.creatorWorkspace_.clearGesture(),this.onMoveWrapper_&&t.browserEvents.unbind(this.onMoveWrapper_),this.onUpWrapper_&&t.browserEvents.unbind(this.onUpWrapper_),this.blockDragger_&&this.blockDragger_.dispose(),this.workspaceDragger_&&this.workspaceDragger_.dispose(),this.bubbleDragger_&&this.bubbleDragger_.dispose()},t.Gesture.prototype.updateFromEvent_=function(e){var i=new t.utils.Coordinate(e.clientX,e.clientY);this.updateDragDelta_(i)&&(this.updateIsDragging_(),t.longStop_()),this.mostRecentEvent_=e},t.Gesture.prototype.updateDragDelta_=function(e){return this.currentDragDeltaXY_=t.utils.Coordinate.difference(e,this.mouseDownXY_),!this.hasExceededDragRadius_&&(this.hasExceededDragRadius_=t.utils.Coordinate.magnitude(this.currentDragDeltaXY_)>(this.flyout_?t.FLYOUT_DRAG_RADIUS:t.DRAG_RADIUS))},t.Gesture.prototype.updateIsDraggingFromFlyout_=function(){return!(!this.targetBlock_||!this.flyout_.isBlockCreatable_(this.targetBlock_))&&(!(this.flyout_.isScrollable()&&!this.flyout_.isDragTowardWorkspace(this.currentDragDeltaXY_))&&(this.startWorkspace_=this.flyout_.targetWorkspace,this.startWorkspace_.updateScreenCalculationsIfScrolled(),t.Events.getGroup()||t.Events.setGroup(!0),this.startBlock_=null,this.targetBlock_=this.flyout_.createBlock(this.targetBlock_),this.targetBlock_.select(),!0))},t.Gesture.prototype.updateIsDraggingBubble_=function(){return!!this.startBubble_&&(this.isDraggingBubble_=!0,this.startDraggingBubble_(),!0)},t.Gesture.prototype.updateIsDraggingBlock_=function(){return!!this.targetBlock_&&(this.flyout_?this.isDraggingBlock_=this.updateIsDraggingFromFlyout_():this.targetBlock_.isMovable()&&(this.isDraggingBlock_=!0),!!this.isDraggingBlock_&&(this.startDraggingBlock_(),!0))},t.Gesture.prototype.updateIsDraggingWorkspace_=function(){(this.flyout_?this.flyout_.isScrollable():this.startWorkspace_&&this.startWorkspace_.isDraggable())&&(this.workspaceDragger_=new t.WorkspaceDragger(this.startWorkspace_),this.isDraggingWorkspace_=!0,this.workspaceDragger_.startDrag())},t.Gesture.prototype.updateIsDragging_=function(){if(this.calledUpdateIsDragging_)throw Error("updateIsDragging_ should only be called once per gesture.");this.calledUpdateIsDragging_=!0,this.updateIsDraggingBubble_()||this.updateIsDraggingBlock_()||this.updateIsDraggingWorkspace_()},t.Gesture.prototype.startDraggingBlock_=function(){this.blockDragger_=new(t.registry.getClassFromOptions(t.registry.Type.BLOCK_DRAGGER,this.creatorWorkspace_.options,!0))(this.targetBlock_,this.startWorkspace_),this.blockDragger_.startDrag(this.currentDragDeltaXY_,this.healStack_),this.blockDragger_.drag(this.mostRecentEvent_,this.currentDragDeltaXY_)},t.Gesture.prototype.startDraggingBubble_=function(){this.bubbleDragger_=new t.BubbleDragger(this.startBubble_,this.startWorkspace_),this.bubbleDragger_.startBubbleDrag(),this.bubbleDragger_.dragBubble(this.mostRecentEvent_,this.currentDragDeltaXY_)},t.Gesture.prototype.doStart=function(e){t.utils.isTargetInput(e)?this.cancel():(this.hasStarted_=!0,t.blockAnimations.disconnectUiStop(),this.startWorkspace_.updateScreenCalculationsIfScrolled(),this.startWorkspace_.isMutator&&this.startWorkspace_.resize(),t.hideChaff(!!this.flyout_),this.startWorkspace_.markFocused(),this.mostRecentEvent_=e,t.Tooltip.block(),this.targetBlock_&&this.targetBlock_.select(),t.utils.isRightButton(e)?this.handleRightClick(e):("touchstart"!=e.type.toLowerCase()&&"pointerdown"!=e.type.toLowerCase()||"mouse"==e.pointerType||t.longStart(e,this),this.mouseDownXY_=new t.utils.Coordinate(e.clientX,e.clientY),this.healStack_=e.altKey||e.ctrlKey||e.metaKey,this.bindMouseEvents(e)))},t.Gesture.prototype.bindMouseEvents=function(e){this.onMoveWrapper_=t.browserEvents.conditionalBind(document,"mousemove",null,this.handleMove.bind(this)),this.onUpWrapper_=t.browserEvents.conditionalBind(document,"mouseup",null,this.handleUp.bind(this)),e.preventDefault(),e.stopPropagation()},t.Gesture.prototype.handleMove=function(t){this.updateFromEvent_(t),this.isDraggingWorkspace_?this.workspaceDragger_.drag(this.currentDragDeltaXY_):this.isDraggingBlock_?this.blockDragger_.drag(this.mostRecentEvent_,this.currentDragDeltaXY_):this.isDraggingBubble_&&this.bubbleDragger_.dragBubble(this.mostRecentEvent_,this.currentDragDeltaXY_),t.preventDefault(),t.stopPropagation()},t.Gesture.prototype.handleUp=function(e){this.updateFromEvent_(e),t.longStop_(),this.isEnding_?console.log("Trying to end a gesture recursively."):(this.isEnding_=!0,this.isDraggingBubble_?this.bubbleDragger_.endBubbleDrag(e,this.currentDragDeltaXY_):this.isDraggingBlock_?this.blockDragger_.endDrag(e,this.currentDragDeltaXY_):this.isDraggingWorkspace_?this.workspaceDragger_.endDrag(this.currentDragDeltaXY_):this.isBubbleClick_()?this.doBubbleClick_():this.isFieldClick_()?this.doFieldClick_():this.isBlockClick_()?this.doBlockClick_():this.isWorkspaceClick_()&&this.doWorkspaceClick_(e),e.preventDefault(),e.stopPropagation(),this.dispose())},t.Gesture.prototype.cancel=function(){this.isEnding_||(t.longStop_(),this.isDraggingBubble_?this.bubbleDragger_.endBubbleDrag(this.mostRecentEvent_,this.currentDragDeltaXY_):this.isDraggingBlock_?this.blockDragger_.endDrag(this.mostRecentEvent_,this.currentDragDeltaXY_):this.isDraggingWorkspace_&&this.workspaceDragger_.endDrag(this.currentDragDeltaXY_),this.dispose())},t.Gesture.prototype.handleRightClick=function(e){this.targetBlock_?(this.bringBlockToFront_(),t.hideChaff(!!this.flyout_),this.targetBlock_.showContextMenu(e)):this.startBubble_?this.startBubble_.showContextMenu(e):this.startWorkspace_&&!this.flyout_&&(t.hideChaff(),this.startWorkspace_.showContextMenu(e)),e.preventDefault(),e.stopPropagation(),this.dispose()},t.Gesture.prototype.handleWsStart=function(t,e){if(this.hasStarted_)throw Error("Tried to call gesture.handleWsStart, but the gesture had already been started.");this.setStartWorkspace_(e),this.mostRecentEvent_=t,this.doStart(t)},t.Gesture.prototype.fireWorkspaceClick_=function(e){t.Events.fire(new(t.Events.get(t.Events.CLICK))(null,e.id,"workspace"))},t.Gesture.prototype.handleFlyoutStart=function(t,e){if(this.hasStarted_)throw Error("Tried to call gesture.handleFlyoutStart, but the gesture had already been started.");this.setStartFlyout_(e),this.handleWsStart(t,e.getWorkspace())},t.Gesture.prototype.handleBlockStart=function(t,e){if(this.hasStarted_)throw Error("Tried to call gesture.handleBlockStart, but the gesture had already been started.");this.setStartBlock(e),this.mostRecentEvent_=t},t.Gesture.prototype.handleBubbleStart=function(t,e){if(this.hasStarted_)throw Error("Tried to call gesture.handleBubbleStart, but the gesture had already been started.");this.setStartBubble(e),this.mostRecentEvent_=t},t.Gesture.prototype.doBubbleClick_=function(){this.startBubble_.setFocus&&this.startBubble_.setFocus(),this.startBubble_.select&&this.startBubble_.select()},t.Gesture.prototype.doFieldClick_=function(){this.startField_.showEditor(this.mostRecentEvent_),this.bringBlockToFront_()},t.Gesture.prototype.doBlockClick_=function(){if(this.flyout_&&this.flyout_.autoClose)this.targetBlock_.isEnabled()&&(t.Events.getGroup()||t.Events.setGroup(!0),this.flyout_.createBlock(this.targetBlock_).scheduleSnapAndBump());else{var e=new(t.Events.get(t.Events.CLICK))(this.startBlock_,this.startWorkspace_.id,"block");t.Events.fire(e)}this.bringBlockToFront_(),t.Events.setGroup(!1)},t.Gesture.prototype.doWorkspaceClick_=function(e){e=this.creatorWorkspace_,t.selected&&t.selected.unselect(),this.fireWorkspaceClick_(this.startWorkspace_||e)},t.Gesture.prototype.bringBlockToFront_=function(){this.targetBlock_&&!this.flyout_&&this.targetBlock_.bringToFront()},t.Gesture.prototype.setStartField=function(t){if(this.hasStarted_)throw Error("Tried to call gesture.setStartField, but the gesture had already been started.");this.startField_||(this.startField_=t)},t.Gesture.prototype.setStartBubble=function(t){this.startBubble_||(this.startBubble_=t)},t.Gesture.prototype.setStartBlock=function(t){this.startBlock_||this.startBubble_||(this.startBlock_=t,t.isInFlyout&&t!=t.getRootBlock()?this.setTargetBlock_(t.getRootBlock()):this.setTargetBlock_(t))},t.Gesture.prototype.setTargetBlock_=function(t){t.isShadow()?this.setTargetBlock_(t.getParent()):this.targetBlock_=t},t.Gesture.prototype.setStartWorkspace_=function(t){this.startWorkspace_||(this.startWorkspace_=t)},t.Gesture.prototype.setStartFlyout_=function(t){this.flyout_||(this.flyout_=t)},t.Gesture.prototype.isBubbleClick_=function(){return!!this.startBubble_&&!this.hasExceededDragRadius_},t.Gesture.prototype.isBlockClick_=function(){return!!this.startBlock_&&!this.hasExceededDragRadius_&&!this.isFieldClick_()},t.Gesture.prototype.isFieldClick_=function(){return!!this.startField_&&this.startField_.isClickable()&&!this.hasExceededDragRadius_&&(!this.flyout_||!this.flyout_.autoClose)},t.Gesture.prototype.isWorkspaceClick_=function(){return!(this.startBlock_||this.startBubble_||this.startField_||this.hasExceededDragRadius_)},t.Gesture.prototype.isDragging=function(){return this.isDraggingWorkspace_||this.isDraggingBlock_||this.isDraggingBubble_},t.Gesture.prototype.hasStarted=function(){return this.hasStarted_},t.Gesture.prototype.getInsertionMarkers=function(){return this.blockDragger_?this.blockDragger_.getInsertionMarkers():[]},t.Gesture.prototype.getCurrentDragger=function(){return this.isDraggingBlock_?this.blockDragger_:this.isDraggingWorkspace_?this.workspaceDragger_:this.isDraggingBubble_?this.bubbleDragger_:null},t.Gesture.inProgress=function(){for(var e,i=t.Workspace.getAll(),n=0;e=i[n];n++)if(e.currentGesture_)return!0;return!1},t.IRegistrable=function(){},t.Marker=function(){this.drawer_=this.curNode_=this.colour=null,this.type="marker"},t.Marker.prototype.setDrawer=function(t){this.drawer_=t},t.Marker.prototype.getDrawer=function(){return this.drawer_},t.Marker.prototype.getCurNode=function(){return this.curNode_},t.Marker.prototype.setCurNode=function(t){var e=this.curNode_;this.curNode_=t,this.drawer_&&this.drawer_.draw(e,this.curNode_)},t.Marker.prototype.draw=function(){this.drawer_&&this.drawer_.draw(this.curNode_,this.curNode_)},t.Marker.prototype.hide=function(){this.drawer_&&this.drawer_.hide()},t.Marker.prototype.dispose=function(){this.getDrawer()&&this.getDrawer().dispose()},t.Cursor=function(){t.Cursor.superClass_.constructor.call(this),this.type="cursor"},t.utils.object.inherits(t.Cursor,t.Marker),t.Cursor.prototype.next=function(){var e=this.getCurNode();if(!e)return null;for(e=e.next();e&&e.next()&&(e.getType()==t.ASTNode.types.NEXT||e.getType()==t.ASTNode.types.BLOCK);)e=e.next();return e&&this.setCurNode(e),e},t.Cursor.prototype.in=function(){var e=this.getCurNode();return e?(e.getType()!=t.ASTNode.types.PREVIOUS&&e.getType()!=t.ASTNode.types.OUTPUT||(e=e.next()),(e=e.in())&&this.setCurNode(e),e):null},t.Cursor.prototype.prev=function(){var e=this.getCurNode();if(!e)return null;for(e=e.prev();e&&e.prev()&&(e.getType()==t.ASTNode.types.NEXT||e.getType()==t.ASTNode.types.BLOCK);)e=e.prev();return e&&this.setCurNode(e),e},t.Cursor.prototype.out=function(){var e=this.getCurNode();return e?((e=e.out())&&e.getType()==t.ASTNode.types.BLOCK&&(e=e.prev()||e),e&&this.setCurNode(e),e):null},t.registry.register(t.registry.Type.CURSOR,t.registry.DEFAULT,t.Cursor),t.MarkerManager=function(t){this.cursorSvg_=this.cursor_=null,this.markers_=Object.create(null),this.workspace_=t},t.MarkerManager.LOCAL_MARKER="local_marker_1",t.MarkerManager.prototype.registerMarker=function(t,e){this.markers_[t]&&this.unregisterMarker(t),e.setDrawer(this.workspace_.getRenderer().makeMarkerDrawer(this.workspace_,e)),this.setMarkerSvg(e.getDrawer().createDom()),this.markers_[t]=e},t.MarkerManager.prototype.unregisterMarker=function(t){var e=this.markers_[t];if(!e)throw Error("Marker with ID "+t+" does not exist. Can only unregister markers that exist.");e.dispose(),delete this.markers_[t]},t.MarkerManager.prototype.getCursor=function(){return this.cursor_},t.MarkerManager.prototype.getMarker=function(t){return this.markers_[t]||null},t.MarkerManager.prototype.setCursor=function(t){this.cursor_&&this.cursor_.getDrawer()&&this.cursor_.getDrawer().dispose(),(this.cursor_=t)&&(t=this.workspace_.getRenderer().makeMarkerDrawer(this.workspace_,this.cursor_),this.cursor_.setDrawer(t),this.setCursorSvg(this.cursor_.getDrawer().createDom()))},t.MarkerManager.prototype.setCursorSvg=function(t){t?(this.workspace_.getBlockCanvas().appendChild(t),this.cursorSvg_=t):this.cursorSvg_=null},t.MarkerManager.prototype.setMarkerSvg=function(t){t?this.workspace_.getBlockCanvas()&&(this.cursorSvg_?this.workspace_.getBlockCanvas().insertBefore(t,this.cursorSvg_):this.workspace_.getBlockCanvas().appendChild(t)):this.markerSvg_=null},t.MarkerManager.prototype.updateMarkers=function(){this.workspace_.keyboardAccessibilityMode&&this.cursorSvg_&&this.workspace_.getCursor().draw()},t.MarkerManager.prototype.dispose=function(){for(var t,e=Object.keys(this.markers_),i=0;t=e[i];i++)this.unregisterMarker(t);this.markers_=null,this.cursor_&&(this.cursor_.dispose(),this.cursor_=null)},t.WidgetDiv={},t.WidgetDiv.owner_=null,t.WidgetDiv.dispose_=null,t.WidgetDiv.rendererClassName_="",t.WidgetDiv.themeClassName_="",t.WidgetDiv.createDom=function(){t.WidgetDiv.DIV||(t.WidgetDiv.DIV=document.createElement("div"),t.WidgetDiv.DIV.className="blocklyWidgetDiv",(t.parentContainer||document.body).appendChild(t.WidgetDiv.DIV))},t.WidgetDiv.show=function(e,i,n){t.WidgetDiv.hide(),t.WidgetDiv.owner_=e,t.WidgetDiv.dispose_=n,(e=t.WidgetDiv.DIV).style.direction=i?"rtl":"ltr",e.style.display="block",i=t.getMainWorkspace(),t.WidgetDiv.rendererClassName_=i.getRenderer().getClassName(),t.WidgetDiv.themeClassName_=i.getTheme().getClassName(),t.utils.dom.addClass(e,t.WidgetDiv.rendererClassName_),t.utils.dom.addClass(e,t.WidgetDiv.themeClassName_)},t.WidgetDiv.hide=function(){if(t.WidgetDiv.isVisible()){t.WidgetDiv.owner_=null;var e=t.WidgetDiv.DIV;e.style.display="none",e.style.left="",e.style.top="",t.WidgetDiv.dispose_&&t.WidgetDiv.dispose_(),t.WidgetDiv.dispose_=null,e.textContent="",t.WidgetDiv.rendererClassName_&&(t.utils.dom.removeClass(e,t.WidgetDiv.rendererClassName_),t.WidgetDiv.rendererClassName_=""),t.WidgetDiv.themeClassName_&&(t.utils.dom.removeClass(e,t.WidgetDiv.themeClassName_),t.WidgetDiv.themeClassName_=""),t.getMainWorkspace().markFocused()}},t.WidgetDiv.isVisible=function(){return!!t.WidgetDiv.owner_},t.WidgetDiv.hideIfOwner=function(e){t.WidgetDiv.owner_==e&&t.WidgetDiv.hide()},t.WidgetDiv.positionInternal_=function(e,i,n){t.WidgetDiv.DIV.style.left=e+"px",t.WidgetDiv.DIV.style.top=i+"px",t.WidgetDiv.DIV.style.height=n+"px"},t.WidgetDiv.positionWithAnchor=function(e,i,n,o){var r=t.WidgetDiv.calculateY_(e,i,n);e=t.WidgetDiv.calculateX_(e,i,n,o),0>r?t.WidgetDiv.positionInternal_(e,0,n.height+r):t.WidgetDiv.positionInternal_(e,r,n.height)},t.WidgetDiv.calculateX_=function(t,e,i,n){return n?(e=Math.max(e.right-i.width,t.left),Math.min(e,t.right-i.width)):(e=Math.min(e.left,t.right-i.width),Math.max(e,t.left))},t.WidgetDiv.calculateY_=function(t,e,i){return e.bottom+i.height>=t.bottom?e.top-i.height:e.bottom},t.Field=function(e,i,n){this.value_=this.DEFAULT_VALUE,this.tooltip_=this.validator_=null,this.size_=new t.utils.Size(0,0),this.constants_=this.mouseDownWrapper_=this.textContent_=this.textElement_=this.borderRect_=this.fieldGroup_=this.markerSvg_=this.cursorSvg_=null,n&&this.configure_(n),this.setValue(e),i&&this.setValidator(i)},t.Field.prototype.DEFAULT_VALUE=null,t.Field.prototype.name=void 0,t.Field.prototype.disposed=!1,t.Field.prototype.maxDisplayLength=50,t.Field.prototype.sourceBlock_=null,t.Field.prototype.isDirty_=!0,t.Field.prototype.visible_=!0,t.Field.prototype.clickTarget_=null,t.Field.NBSP=" ",t.Field.prototype.EDITABLE=!0,t.Field.prototype.SERIALIZABLE=!1,t.Field.prototype.configure_=function(e){var i=e.tooltip;"string"==typeof i&&(i=t.utils.replaceMessageReferences(e.tooltip)),i&&this.setTooltip(i)},t.Field.prototype.setSourceBlock=function(t){if(this.sourceBlock_)throw Error("Field already bound to a block.");this.sourceBlock_=t},t.Field.prototype.getConstants=function(){return!this.constants_&&this.sourceBlock_&&this.sourceBlock_.workspace&&this.sourceBlock_.workspace.rendered&&(this.constants_=this.sourceBlock_.workspace.getRenderer().getConstants()),this.constants_},t.Field.prototype.getSourceBlock=function(){return this.sourceBlock_},t.Field.prototype.init=function(){this.fieldGroup_||(this.fieldGroup_=t.utils.dom.createSvgElement(t.utils.Svg.G,{},null),this.isVisible()||(this.fieldGroup_.style.display="none"),this.sourceBlock_.getSvgRoot().appendChild(this.fieldGroup_),this.initView(),this.updateEditable(),this.setTooltip(this.tooltip_),this.bindEvents_(),this.initModel())},t.Field.prototype.initView=function(){this.createBorderRect_(),this.createTextElement_()},t.Field.prototype.initModel=function(){},t.Field.prototype.createBorderRect_=function(){this.borderRect_=t.utils.dom.createSvgElement(t.utils.Svg.RECT,{rx:this.getConstants().FIELD_BORDER_RECT_RADIUS,ry:this.getConstants().FIELD_BORDER_RECT_RADIUS,x:0,y:0,height:this.size_.height,width:this.size_.width,class:"blocklyFieldRect"},this.fieldGroup_)},t.Field.prototype.createTextElement_=function(){this.textElement_=t.utils.dom.createSvgElement(t.utils.Svg.TEXT,{class:"blocklyText"},this.fieldGroup_),this.getConstants().FIELD_TEXT_BASELINE_CENTER&&this.textElement_.setAttribute("dominant-baseline","central"),this.textContent_=document.createTextNode(""),this.textElement_.appendChild(this.textContent_)},t.Field.prototype.bindEvents_=function(){t.Tooltip.bindMouseEvents(this.getClickTarget_()),this.mouseDownWrapper_=t.browserEvents.conditionalBind(this.getClickTarget_(),"mousedown",this,this.onMouseDown_)},t.Field.prototype.fromXml=function(t){this.setValue(t.textContent)},t.Field.prototype.toXml=function(t){return t.textContent=this.getValue(),t},t.Field.prototype.dispose=function(){t.DropDownDiv.hideIfOwner(this),t.WidgetDiv.hideIfOwner(this),t.Tooltip.unbindMouseEvents(this.getClickTarget_()),this.mouseDownWrapper_&&t.browserEvents.unbind(this.mouseDownWrapper_),t.utils.dom.removeNode(this.fieldGroup_),this.disposed=!0},t.Field.prototype.updateEditable=function(){var e=this.fieldGroup_;this.EDITABLE&&e&&(this.sourceBlock_.isEditable()?(t.utils.dom.addClass(e,"blocklyEditableText"),t.utils.dom.removeClass(e,"blocklyNonEditableText"),e.style.cursor=this.CURSOR):(t.utils.dom.addClass(e,"blocklyNonEditableText"),t.utils.dom.removeClass(e,"blocklyEditableText"),e.style.cursor=""))},t.Field.prototype.isClickable=function(){return!!this.sourceBlock_&&this.sourceBlock_.isEditable()&&!!this.showEditor_&&"function"==typeof this.showEditor_},t.Field.prototype.isCurrentlyEditable=function(){return this.EDITABLE&&!!this.sourceBlock_&&this.sourceBlock_.isEditable()},t.Field.prototype.isSerializable=function(){var t=!1;return this.name&&(this.SERIALIZABLE?t=!0:this.EDITABLE&&(console.warn("Detected an editable field that was not serializable. Please define SERIALIZABLE property as true on all editable custom fields. Proceeding with serialization."),t=!0)),t},t.Field.prototype.isVisible=function(){return this.visible_},t.Field.prototype.setVisible=function(t){if(this.visible_!=t){this.visible_=t;var e=this.getSvgRoot();e&&(e.style.display=t?"block":"none")}},t.Field.prototype.setValidator=function(t){this.validator_=t},t.Field.prototype.getValidator=function(){return this.validator_},t.Field.prototype.getSvgRoot=function(){return this.fieldGroup_},t.Field.prototype.applyColour=function(){},t.Field.prototype.render_=function(){this.textContent_&&(this.textContent_.nodeValue=this.getDisplayText_()),this.updateSize_()},t.Field.prototype.showEditor=function(t){this.isClickable()&&this.showEditor_(t)},t.Field.prototype.updateSize_=function(e){var i=this.getConstants(),n=2*(e=void 0!=e?e:this.borderRect_?this.getConstants().FIELD_BORDER_RECT_X_PADDING:0),o=i.FIELD_TEXT_HEIGHT,r=0;this.textElement_&&(n+=r=t.utils.dom.getFastTextWidth(this.textElement_,i.FIELD_TEXT_FONTSIZE,i.FIELD_TEXT_FONTWEIGHT,i.FIELD_TEXT_FONTFAMILY)),this.borderRect_&&(o=Math.max(o,i.FIELD_BORDER_RECT_HEIGHT)),this.size_.height=o,this.size_.width=n,this.positionTextElement_(e,r),this.positionBorderRect_()},t.Field.prototype.positionTextElement_=function(t,e){if(this.textElement_){var i=this.getConstants(),n=this.size_.height/2;this.textElement_.setAttribute("x",this.sourceBlock_.RTL?this.size_.width-e-t:t),this.textElement_.setAttribute("y",i.FIELD_TEXT_BASELINE_CENTER?n:n-i.FIELD_TEXT_HEIGHT/2+i.FIELD_TEXT_BASELINE)}},t.Field.prototype.positionBorderRect_=function(){this.borderRect_&&(this.borderRect_.setAttribute("width",this.size_.width),this.borderRect_.setAttribute("height",this.size_.height),this.borderRect_.setAttribute("rx",this.getConstants().FIELD_BORDER_RECT_RADIUS),this.borderRect_.setAttribute("ry",this.getConstants().FIELD_BORDER_RECT_RADIUS))},t.Field.prototype.getSize=function(){return this.isVisible()?(this.isDirty_?(this.render_(),this.isDirty_=!1):this.visible_&&0==this.size_.width&&(console.warn("Deprecated use of setting size_.width to 0 to rerender a field. Set field.isDirty_ to true instead."),this.render_()),this.size_):new t.utils.Size(0,0)},t.Field.prototype.getScaledBBox=function(){if(this.borderRect_)e=this.borderRect_.getBoundingClientRect(),n=t.utils.style.getPageOffset(this.borderRect_),o=e.width,e=e.height;else{var e=this.sourceBlock_.getHeightWidth(),i=this.sourceBlock_.workspace.scale,n=this.getAbsoluteXY_(),o=e.width*i;e=e.height*i,t.utils.userAgent.GECKO?(n.x+=1.5*i,n.y+=1.5*i):t.utils.userAgent.EDGE||t.utils.userAgent.IE||(n.x-=.5*i,n.y-=.5*i),o+=1*i,e+=1*i}return new t.utils.Rect(n.y,n.y+e,n.x,n.x+o)},t.Field.prototype.getDisplayText_=function(){var e=this.getText();return e?(e.length>this.maxDisplayLength&&(e=e.substring(0,this.maxDisplayLength-2)+"…"),e=e.replace(/\s/g,t.Field.NBSP),this.sourceBlock_&&this.sourceBlock_.RTL&&(e+="‏"),e):t.Field.NBSP},t.Field.prototype.getText=function(){if(this.getText_){var t=this.getText_.call(this);if(null!==t)return String(t)}return String(this.getValue())},t.Field.prototype.markDirty=function(){this.isDirty_=!0,this.constants_=null},t.Field.prototype.forceRerender=function(){this.isDirty_=!0,this.sourceBlock_&&this.sourceBlock_.rendered&&(this.sourceBlock_.render(),this.sourceBlock_.bumpNeighbours(),this.updateMarkers_())},t.Field.prototype.setValue=function(e){if(null!==e){var i=this.doClassValidation_(e);if(!((e=this.processValidation_(e,i))instanceof Error)){if((i=this.getValidator())&&(i=i.call(this,e),(e=this.processValidation_(e,i))instanceof Error))return;if(!(i=this.sourceBlock_)||!i.disposed){var n=this.getValue();n===e?this.doValueUpdate_(e):(i&&t.Events.isEnabled()&&t.Events.fire(new(t.Events.get(t.Events.BLOCK_CHANGE))(i,"field",this.name||null,n,e)),this.doValueUpdate_(e),this.isDirty_&&this.forceRerender())}}}},t.Field.prototype.processValidation_=function(t,e){return null===e?(this.doValueInvalid_(t),this.isDirty_&&this.forceRerender(),Error()):(void 0!==e&&(t=e),t)},t.Field.prototype.getValue=function(){return this.value_},t.Field.prototype.doClassValidation_=function(t){return null===t||void 0===t?null:t},t.Field.prototype.doValueUpdate_=function(t){this.value_=t,this.isDirty_=!0},t.Field.prototype.doValueInvalid_=function(t){},t.Field.prototype.onMouseDown_=function(t){this.sourceBlock_&&this.sourceBlock_.workspace&&(t=this.sourceBlock_.workspace.getGesture(t))&&t.setStartField(this)},t.Field.prototype.setTooltip=function(t){t||""===t||(t=this.sourceBlock_);var e=this.getClickTarget_();e?e.tooltip=t:this.tooltip_=t},t.Field.prototype.getTooltip=function(){var e=this.getClickTarget_();return e?t.Tooltip.getTooltipOfObject(e):t.Tooltip.getTooltipOfObject({tooltip:this.tooltip_})},t.Field.prototype.getClickTarget_=function(){return this.clickTarget_||this.getSvgRoot()},t.Field.prototype.getAbsoluteXY_=function(){return t.utils.style.getPageOffset(this.getClickTarget_())},t.Field.prototype.referencesVariables=function(){return!1},t.Field.prototype.getParentInput=function(){for(var t=null,e=this.sourceBlock_,i=e.inputList,n=0;n<e.inputList.length;n++)for(var o=i[n],r=o.fieldRow,s=0;s<r.length;s++)if(r[s]===this){t=o;break}return t},t.Field.prototype.getFlipRtl=function(){return!1},t.Field.prototype.isTabNavigable=function(){return!1},t.Field.prototype.onShortcut=function(t){return!1},t.Field.prototype.setCursorSvg=function(t){t?(this.fieldGroup_.appendChild(t),this.cursorSvg_=t):this.cursorSvg_=null},t.Field.prototype.setMarkerSvg=function(t){t?(this.fieldGroup_.appendChild(t),this.markerSvg_=t):this.markerSvg_=null},t.Field.prototype.updateMarkers_=function(){var e=this.sourceBlock_.workspace;e.keyboardAccessibilityMode&&this.cursorSvg_&&e.getCursor().draw(),e.keyboardAccessibilityMode&&this.markerSvg_&&e.getMarker(t.MarkerManager.LOCAL_MARKER).draw()},t.FieldLabel=function(e,i,n){this.class_=null,t.FieldLabel.superClass_.constructor.call(this,e,null,n),n||(this.class_=i||null)},t.utils.object.inherits(t.FieldLabel,t.Field),t.FieldLabel.prototype.DEFAULT_VALUE="",t.FieldLabel.fromJson=function(e){var i=t.utils.replaceMessageReferences(e.text);return new t.FieldLabel(i,void 0,e)},t.FieldLabel.prototype.EDITABLE=!1,t.FieldLabel.prototype.configure_=function(e){t.FieldLabel.superClass_.configure_.call(this,e),this.class_=e.class},t.FieldLabel.prototype.initView=function(){this.createTextElement_(),this.class_&&t.utils.dom.addClass(this.textElement_,this.class_)},t.FieldLabel.prototype.doClassValidation_=function(t){return null===t||void 0===t?null:String(t)},t.FieldLabel.prototype.setClass=function(e){this.textElement_&&(this.class_&&t.utils.dom.removeClass(this.textElement_,this.class_),e&&t.utils.dom.addClass(this.textElement_,e)),this.class_=e},t.fieldRegistry.register("field_label",t.FieldLabel),t.Input=function(e,i,n,o){if(e!=t.inputTypes.DUMMY&&!i)throw Error("Value inputs and statement inputs must have non-empty name.");this.type=e,this.name=i,this.sourceBlock_=n,this.connection=o,this.fieldRow=[]},t.Input.prototype.align=t.constants.ALIGN.LEFT,t.Input.prototype.visible_=!0,t.Input.prototype.getSourceBlock=function(){return this.sourceBlock_},t.Input.prototype.appendField=function(t,e){return this.insertFieldAt(this.fieldRow.length,t,e),this},t.Input.prototype.insertFieldAt=function(e,i,n){if(0>e||e>this.fieldRow.length)throw Error("index "+e+" out of bounds.");return i||""==i&&n?("string"==typeof i&&(i=t.fieldRegistry.fromJson({type:"field_label",text:i})),i.setSourceBlock(this.sourceBlock_),this.sourceBlock_.rendered&&(i.init(),i.applyColour()),i.name=n,i.setVisible(this.isVisible()),i.prefixField&&(e=this.insertFieldAt(e,i.prefixField)),this.fieldRow.splice(e,0,i),++e,i.suffixField&&(e=this.insertFieldAt(e,i.suffixField)),this.sourceBlock_.rendered&&(this.sourceBlock_=this.sourceBlock_,this.sourceBlock_.render(),this.sourceBlock_.bumpNeighbours()),e):e},t.Input.prototype.removeField=function(t,e){for(var i,n=0;i=this.fieldRow[n];n++)if(i.name===t)return i.dispose(),this.fieldRow.splice(n,1),this.sourceBlock_.rendered&&(this.sourceBlock_=this.sourceBlock_,this.sourceBlock_.render(),this.sourceBlock_.bumpNeighbours()),!0;if(e)return!1;throw Error('Field "'+t+'" not found.')},t.Input.prototype.isVisible=function(){return this.visible_},t.Input.prototype.setVisible=function(t){var e=[];if(this.visible_==t)return e;this.visible_=t;for(var i,n=0;i=this.fieldRow[n];n++)i.setVisible(t);return this.connection&&(this.connection=this.connection,t?e=this.connection.startTrackingAll():this.connection.stopTrackingAll(),n=this.connection.targetBlock())&&(n.getSvgRoot().style.display=t?"block":"none"),e},t.Input.prototype.markDirty=function(){for(var t,e=0;t=this.fieldRow[e];e++)t.markDirty()},t.Input.prototype.setCheck=function(t){if(!this.connection)throw Error("This input does not have a connection.");return this.connection.setCheck(t),this},t.Input.prototype.setAlign=function(t){return this.align=t,this.sourceBlock_.rendered&&(this.sourceBlock_=this.sourceBlock_,this.sourceBlock_.render()),this},t.Input.prototype.setShadowDom=function(t){if(!this.connection)throw Error("This input does not have a connection.");return this.connection.setShadowDom(t),this},t.Input.prototype.getShadowDom=function(){if(!this.connection)throw Error("This input does not have a connection.");return this.connection.getShadowDom()},t.Input.prototype.init=function(){if(this.sourceBlock_.workspace.rendered)for(var t=0;t<this.fieldRow.length;t++)this.fieldRow[t].init()},t.Input.prototype.dispose=function(){for(var t,e=0;t=this.fieldRow[e];e++)t.dispose();this.connection&&this.connection.dispose(),this.sourceBlock_=null},t.Block=function(e,i,n){if(t.Generator&&void 0!==t.Generator.prototype[i])throw Error('Block prototypeName "'+i+'" conflicts with Blockly.Generator members.');if(this.id=n&&!e.getBlockById(n)?n:t.utils.genUid(),e.setBlockById(this.id,this),this.previousConnection=this.nextConnection=this.outputConnection=null,this.inputList=[],this.inputsInline=void 0,this.disabled=!1,this.tooltip="",this.contextMenu=!0,this.parentBlock_=null,this.childBlocks_=[],this.editable_=this.movable_=this.deletable_=!0,this.collapsed_=this.isShadow_=!1,this.comment=this.outputShape_=null,this.commentModel={text:null,pinned:!1,size:new t.utils.Size(160,80)},this.xy_=new t.utils.Coordinate(0,0),this.workspace=e,this.isInFlyout=e.isFlyout,this.isInMutator=e.isMutator,this.RTL=e.RTL,this.isInsertionMarker_=!1,this.hat=void 0,this.rendered=null,this.statementInputCount=0,i){if(this.type=i,!(n=t.Blocks[i])||"object"!=typeof n)throw TypeError("Unknown block type: "+i);t.utils.object.mixin(this,n)}e.addTopBlock(this),e.addTypedBlock(this),(e=t.Events.getGroup())||t.Events.setGroup(!0),i=t.Events.recordUndo;try{"function"==typeof this.init&&(t.Events.recordUndo=!1,this.init(),t.Events.recordUndo=i),t.Events.isEnabled()&&t.Events.fire(new(t.Events.get(t.Events.BLOCK_CREATE))(this))}finally{e||t.Events.setGroup(!1),t.Events.recordUndo=i}this.inputsInlineDefault=this.inputsInline,"function"==typeof this.onchange&&this.setOnChange(this.onchange)},t.Block.COLLAPSED_INPUT_NAME=t.constants.COLLAPSED_INPUT_NAME,t.Block.COLLAPSED_FIELD_NAME=t.constants.COLLAPSED_FIELD_NAME,t.Block.prototype.data=null,t.Block.prototype.disposed=!1,t.Block.prototype.hue_=null,t.Block.prototype.colour_="#000000",t.Block.prototype.styleName_="",t.Block.prototype.dispose=function(e){if(this.workspace){this.onchangeWrapper_&&this.workspace.removeChangeListener(this.onchangeWrapper_),this.unplug(e),t.Events.isEnabled()&&t.Events.fire(new(t.Events.get(t.Events.BLOCK_DELETE))(this)),t.Events.disable();try{this.workspace&&(this.workspace.removeTopBlock(this),this.workspace.removeTypedBlock(this),this.workspace.removeBlockById(this.id),this.workspace=null),t.selected==this&&(t.selected=null);for(var i=this.childBlocks_.length-1;0<=i;i--)this.childBlocks_[i].dispose(!1);i=0;for(var n;n=this.inputList[i];i++)n.dispose();this.inputList.length=0;var o,r=this.getConnections_(!0);for(i=0;o=r[i];i++)o.dispose()}finally{t.Events.enable(),this.disposed=!0}}},t.Block.prototype.initModel=function(){for(var t,e=0;t=this.inputList[e];e++)for(var i,n=0;i=t.fieldRow[n];n++)i.initModel&&i.initModel()},t.Block.prototype.unplug=function(t){this.outputConnection?this.unplugFromRow_(t):this.previousConnection&&this.unplugFromStack_(t)},t.Block.prototype.unplugFromRow_=function(t){var e=null;this.outputConnection.isConnected()&&(e=this.outputConnection.targetConnection,this.outputConnection.disconnect()),e&&t&&(t=this.getOnlyValueConnection_())&&t.isConnected()&&!t.targetBlock().isShadow()&&((t=t.targetConnection).disconnect(),this.workspace.connectionChecker.canConnect(t,e,!1)?e.connect(t):t.onFailedConnect(e))},t.Block.prototype.getOnlyValueConnection_=function(){for(var e=null,i=0;i<this.inputList.length;i++){var n=this.inputList[i].connection;if(n&&n.type==t.connectionTypes.INPUT_VALUE&&n.targetConnection){if(e)return null;e=n}}return e},t.Block.prototype.unplugFromStack_=function(t){var e=null;this.previousConnection.isConnected()&&(e=this.previousConnection.targetConnection,this.previousConnection.disconnect());var i=this.getNextBlock();t&&i&&!i.isShadow()&&((t=this.nextConnection.targetConnection).disconnect(),e&&this.workspace.connectionChecker.canConnect(e,t,!1)&&e.connect(t))},t.Block.prototype.getConnections_=function(t){t=[],this.outputConnection&&t.push(this.outputConnection),this.previousConnection&&t.push(this.previousConnection),this.nextConnection&&t.push(this.nextConnection);for(var e,i=0;e=this.inputList[i];i++)e.connection&&t.push(e.connection);return t},t.Block.prototype.lastConnectionInStack=function(t){for(var e=this.nextConnection;e;){var i=e.targetBlock();if(!i||t&&i.isShadow())return e;e=i.nextConnection}return null},t.Block.prototype.bumpNeighbours=function(){},t.Block.prototype.getParent=function(){return this.parentBlock_},t.Block.prototype.getInputWithBlock=function(t){for(var e,i=0;e=this.inputList[i];i++)if(e.connection&&e.connection.targetBlock()==t)return e;return null},t.Block.prototype.getSurroundParent=function(){var t=this;do{var e=t;if(!(t=t.getParent()))return null}while(t.getNextBlock()==e);return t},t.Block.prototype.getNextBlock=function(){return this.nextConnection&&this.nextConnection.targetBlock()},t.Block.prototype.getPreviousBlock=function(){return this.previousConnection&&this.previousConnection.targetBlock()},t.Block.prototype.getFirstStatementConnection=function(){for(var e,i=0;e=this.inputList[i];i++)if(e.connection&&e.connection.type==t.connectionTypes.NEXT_STATEMENT)return e.connection;return null},t.Block.prototype.getRootBlock=function(){var t=this;do{var e=t;t=e.parentBlock_}while(t);return e},t.Block.prototype.getTopStackBlock=function(){var t=this;do{var e=t.getPreviousBlock()}while(e&&e.getNextBlock()==t&&(t=e));return t},t.Block.prototype.getChildren=function(t){if(!t)return this.childBlocks_;t=[];for(var e,i=0;e=this.inputList[i];i++)e.connection&&(e=e.connection.targetBlock())&&t.push(e);return(i=this.getNextBlock())&&t.push(i),t},t.Block.prototype.setParent=function(e){if(e!=this.parentBlock_){if(this.parentBlock_){if(t.utils.arrayRemove(this.parentBlock_.childBlocks_,this),this.previousConnection&&this.previousConnection.isConnected())throw Error("Still connected to previous block.");if(this.outputConnection&&this.outputConnection.isConnected())throw Error("Still connected to parent block.");this.parentBlock_=null}else this.workspace.removeTopBlock(this);(this.parentBlock_=e)?e.childBlocks_.push(this):this.workspace.addTopBlock(this)}},t.Block.prototype.getDescendants=function(t){for(var e,i=[this],n=this.getChildren(t),o=0;e=n[o];o++)i.push.apply(i,e.getDescendants(t));return i},t.Block.prototype.isDeletable=function(){return this.deletable_&&!this.isShadow_&&!(this.workspace&&this.workspace.options.readOnly)},t.Block.prototype.setDeletable=function(t){this.deletable_=t},t.Block.prototype.isMovable=function(){return this.movable_&&!this.isShadow_&&!(this.workspace&&this.workspace.options.readOnly)},t.Block.prototype.setMovable=function(t){this.movable_=t},t.Block.prototype.isDuplicatable=function(){return!this.workspace.hasBlockLimits()||this.workspace.isCapacityAvailable(t.utils.getBlockTypeCounts(this,!0))},t.Block.prototype.isShadow=function(){return this.isShadow_},t.Block.prototype.setShadow=function(t){this.isShadow_=t},t.Block.prototype.isInsertionMarker=function(){return this.isInsertionMarker_},t.Block.prototype.setInsertionMarker=function(t){this.isInsertionMarker_=t},t.Block.prototype.isEditable=function(){return this.editable_&&!(this.workspace&&this.workspace.options.readOnly)},t.Block.prototype.setEditable=function(t){this.editable_=t,t=0;for(var e;e=this.inputList[t];t++)for(var i,n=0;i=e.fieldRow[n];n++)i.updateEditable()},t.Block.prototype.isDisposed=function(){return this.disposed},t.Block.prototype.getMatchingConnection=function(t,e){var i=this.getConnections_(!0);if(t=t.getConnections_(!0),i.length!=t.length)throw Error("Connection lists did not match in length.");for(var n=0;n<t.length;n++)if(t[n]==e)return i[n];return null},t.Block.prototype.setHelpUrl=function(t){this.helpUrl=t},t.Block.prototype.setTooltip=function(t){this.tooltip=t},t.Block.prototype.getTooltip=function(){return t.Tooltip.getTooltipOfObject(this)},t.Block.prototype.getColour=function(){return this.colour_},t.Block.prototype.getStyleName=function(){return this.styleName_},t.Block.prototype.getHue=function(){return this.hue_},t.Block.prototype.setColour=function(e){e=t.utils.parseBlockColour(e),this.hue_=e.hue,this.colour_=e.hex},t.Block.prototype.setStyle=function(t){this.styleName_=t},t.Block.prototype.setOnChange=function(t){if(t&&"function"!=typeof t)throw Error("onchange must be a function.");this.onchangeWrapper_&&this.workspace.removeChangeListener(this.onchangeWrapper_),(this.onchange=t)&&(this.onchangeWrapper_=t.bind(this),this.workspace.addChangeListener(this.onchangeWrapper_))},t.Block.prototype.getField=function(t){if("string"!=typeof t)throw TypeError("Blockly.Block.prototype.getField expects a string with the field name but received "+(void 0===t?"nothing":t+" of type "+typeof t)+" instead");for(var e,i=0;e=this.inputList[i];i++)for(var n,o=0;n=e.fieldRow[o];o++)if(n.name===t)return n;return null},t.Block.prototype.getVars=function(){for(var t,e=[],i=0;t=this.inputList[i];i++)for(var n,o=0;n=t.fieldRow[o];o++)n.referencesVariables()&&e.push(n.getValue());return e},t.Block.prototype.getVarModels=function(){for(var t,e=[],i=0;t=this.inputList[i];i++)for(var n,o=0;n=t.fieldRow[o];o++)n.referencesVariables()&&(n=this.workspace.getVariableById(n.getValue()))&&e.push(n);return e},t.Block.prototype.updateVarName=function(t){for(var e,i=0;e=this.inputList[i];i++)for(var n,o=0;n=e.fieldRow[o];o++)n.referencesVariables()&&t.getId()==n.getValue()&&n.refreshVariableName()},t.Block.prototype.renameVarById=function(t,e){for(var i,n=0;i=this.inputList[n];n++)for(var o,r=0;o=i.fieldRow[r];r++)o.referencesVariables()&&t==o.getValue()&&o.setValue(e)},t.Block.prototype.getFieldValue=function(t){return(t=this.getField(t))?t.getValue():null},t.Block.prototype.setFieldValue=function(t,e){var i=this.getField(e);if(!i)throw Error('Field "'+e+'" not found.');i.setValue(t)},t.Block.prototype.setPreviousStatement=function(e,i){if(e){if(void 0===i&&(i=null),!this.previousConnection){if(this.outputConnection)throw Error("Remove output connection prior to adding previous connection.");this.previousConnection=this.makeConnection_(t.connectionTypes.PREVIOUS_STATEMENT)}this.previousConnection.setCheck(i)}else if(this.previousConnection){if(this.previousConnection.isConnected())throw Error("Must disconnect previous statement before removing connection.");this.previousConnection.dispose(),this.previousConnection=null}},t.Block.prototype.setNextStatement=function(e,i){if(e)void 0===i&&(i=null),this.nextConnection||(this.nextConnection=this.makeConnection_(t.connectionTypes.NEXT_STATEMENT)),this.nextConnection.setCheck(i);else if(this.nextConnection){if(this.nextConnection.isConnected())throw Error("Must disconnect next statement before removing connection.");this.nextConnection.dispose(),this.nextConnection=null}},t.Block.prototype.setOutput=function(e,i){if(e){if(void 0===i&&(i=null),!this.outputConnection){if(this.previousConnection)throw Error("Remove previous connection prior to adding output connection.");this.outputConnection=this.makeConnection_(t.connectionTypes.OUTPUT_VALUE)}this.outputConnection.setCheck(i)}else if(this.outputConnection){if(this.outputConnection.isConnected())throw Error("Must disconnect output value before removing connection.");this.outputConnection.dispose(),this.outputConnection=null}},t.Block.prototype.setInputsInline=function(e){this.inputsInline!=e&&(t.Events.fire(new(t.Events.get(t.Events.BLOCK_CHANGE))(this,"inline",null,this.inputsInline,e)),this.inputsInline=e)},t.Block.prototype.getInputsInline=function(){if(void 0!=this.inputsInline)return this.inputsInline;for(var e=1;e<this.inputList.length;e++)if(this.inputList[e-1].type==t.inputTypes.DUMMY&&this.inputList[e].type==t.inputTypes.DUMMY)return!1;for(e=1;e<this.inputList.length;e++)if(this.inputList[e-1].type==t.inputTypes.VALUE&&this.inputList[e].type==t.inputTypes.DUMMY)return!0;return!1},t.Block.prototype.setOutputShape=function(t){this.outputShape_=t},t.Block.prototype.getOutputShape=function(){return this.outputShape_},t.Block.prototype.isEnabled=function(){return!this.disabled},t.Block.prototype.setEnabled=function(e){this.isEnabled()!=e&&(t.Events.fire(new(t.Events.get(t.Events.BLOCK_CHANGE))(this,"disabled",null,this.disabled,!e)),this.disabled=!e)},t.Block.prototype.getInheritedDisabled=function(){for(var t=this.getSurroundParent();t;){if(t.disabled)return!0;t=t.getSurroundParent()}return!1},t.Block.prototype.isCollapsed=function(){return this.collapsed_},t.Block.prototype.setCollapsed=function(e){this.collapsed_!=e&&(t.Events.fire(new(t.Events.get(t.Events.BLOCK_CHANGE))(this,"collapsed",null,this.collapsed_,e)),this.collapsed_=e)},t.Block.prototype.toString=function(e,i){function n(t){var e=t.getCheck();return!e&&t.targetConnection&&(e=t.targetConnection.getCheck()),!!e&&(-1!=e.indexOf("Boolean")||-1!=e.indexOf("Number"))}function o(){a&&a.getType()==l.getType()&&a.getLocation()==l.getLocation()&&(a=null)}var r=[];i=i||"?";var s=t.ASTNode.NAVIGATE_ALL_FIELDS;t.ASTNode.NAVIGATE_ALL_FIELDS=!0;for(var a=t.ASTNode.createBlockNode(this),l=a;a;){switch(a.getType()){case t.ASTNode.types.INPUT:var c=a.getLocation();a.in()?n(c)&&r.push("("):r.push(i);break;case t.ASTNode.types.FIELD:(c=a.getLocation()).name!=t.constants.COLLAPSED_FIELD_NAME&&r.push(c.getText())}if(!(a=(c=a).in()||c.next())){for(a=c.out(),o();a&&!a.next();)a=a.out(),o(),a&&a.getType()==t.ASTNode.types.INPUT&&n(a.getLocation())&&r.push(")");a&&(a=a.next())}}for(t.ASTNode.NAVIGATE_ALL_FIELDS=s,i=2;i<r.length;i++)"("==r[i-2]&&")"==r[i]&&(r[i-2]=r[i-1],r.splice(i-1,2));return r=(r=r.reduce(function(t,e){return t+("("==t.substr(-1)||")"==e?"":" ")+e},"")).trim()||"???",e&&r.length>e&&(r=r.substring(0,e-3)+"..."),r},t.Block.prototype.appendValueInput=function(e){return this.appendInput_(t.inputTypes.VALUE,e)},t.Block.prototype.appendStatementInput=function(e){return this.appendInput_(t.inputTypes.STATEMENT,e)},t.Block.prototype.appendDummyInput=function(e){return this.appendInput_(t.inputTypes.DUMMY,e||"")},t.Block.prototype.jsonInit=function(e){var i=e.type?'Block "'+e.type+'": ':"";if(e.output&&e.previousStatement)throw Error(i+"Must not have both an output and a previousStatement.");if(e.style&&e.style.hat&&(this.hat=e.style.hat,e.style=null),e.style&&e.colour)throw Error(i+"Must not have both a colour and a style.");e.style?this.jsonInitStyle_(e,i):this.jsonInitColour_(e,i);for(var n=0;void 0!==e["message"+n];)this.interpolate_(e["message"+n],e["args"+n]||[],e["lastDummyAlign"+n],i),n++;if(void 0!==e.inputsInline&&this.setInputsInline(e.inputsInline),void 0!==e.output&&this.setOutput(!0,e.output),void 0!==e.outputShape&&this.setOutputShape(e.outputShape),void 0!==e.previousStatement&&this.setPreviousStatement(!0,e.previousStatement),void 0!==e.nextStatement&&this.setNextStatement(!0,e.nextStatement),void 0!==e.tooltip&&(n=e.tooltip,n=t.utils.replaceMessageReferences(n),this.setTooltip(n)),void 0!==e.enableContextMenu&&(n=e.enableContextMenu,this.contextMenu=!!n),void 0!==e.helpUrl&&(n=e.helpUrl,n=t.utils.replaceMessageReferences(n),this.setHelpUrl(n)),"string"==typeof e.extensions&&(console.warn(i+"JSON attribute 'extensions' should be an array of strings. Found raw string in JSON for '"+e.type+"' block."),e.extensions=[e.extensions]),void 0!==e.mutator&&t.Extensions.apply(e.mutator,this,!0),e=e.extensions,Array.isArray(e))for(i=0;i<e.length;++i)t.Extensions.apply(e[i],this,!1)},t.Block.prototype.jsonInitColour_=function(t,e){if("colour"in t)if(void 0===t.colour)console.warn(e+"Undefined colour value.");else{t=t.colour;try{this.setColour(t)}catch(i){console.warn(e+"Illegal colour value: ",t)}}},t.Block.prototype.jsonInitStyle_=function(t,e){t=t.style;try{this.setStyle(t)}catch(i){console.warn(e+"Style does not exist: ",t)}},t.Block.prototype.mixin=function(e,i){if(void 0!==i&&"boolean"!=typeof i)throw Error("opt_disableCheck must be a boolean if provided");if(!i){for(var n in i=[],e)void 0!==this[n]&&i.push(n);if(i.length)throw Error("Mixin will overwrite block members: "+JSON.stringify(i))}t.utils.object.mixin(this,e)},t.Block.prototype.interpolate_=function(e,i,n,o){e=t.utils.tokenizeInterpolation(e),this.validateTokens_(e,i.length),i=this.interpolateArguments_(e,i,n),n=[],e=0;for(var r;r=i[e];e++)if(this.isInputKeyword_(r.type)){if(r=this.inputFromJson_(r,o)){for(var s,a=0;s=n[a];a++)r.appendField(s[0],s[1]);n.length=0}}else(a=this.fieldFromJson_(r))&&n.push([a,r.name])},t.Block.prototype.validateTokens_=function(t,e){for(var i=[],n=0,o=0;o<t.length;o++){var r=t[o];if("number"==typeof r){if(1>r||r>e)throw Error('Block "'+this.type+'": Message index %'+r+" out of range.");if(i[r])throw Error('Block "'+this.type+'": Message index %'+r+" duplicated.");i[r]=!0,n++}}if(n!=e)throw Error('Block "'+this.type+'": Message does not reference all '+e+" arg(s).")},t.Block.prototype.interpolateArguments_=function(t,e,i){for(var n=[],o=0;o<t.length;o++){var r=t[o];"number"==typeof r&&(r=e[r-1]),("string"!=typeof r||(r=this.stringToFieldJson_(r)))&&n.push(r)}return(t=n.length)&&!this.isInputKeyword_(n[t-1].type)&&(t={type:"input_dummy"},i&&(t.align=i),n.push(t)),n},t.Block.prototype.fieldFromJson_=function(e){var i=t.fieldRegistry.fromJson(e);return!i&&e.alt?"string"==typeof e.alt?(e=this.stringToFieldJson_(e.alt))?this.fieldFromJson_(e):null:this.fieldFromJson_(e.alt):i},t.Block.prototype.inputFromJson_=function(e,i){var n={LEFT:t.constants.ALIGN.LEFT,RIGHT:t.constants.ALIGN.RIGHT,CENTRE:t.constants.ALIGN.CENTRE,CENTER:t.constants.ALIGN.CENTRE},o=null;switch(e.type){case"input_value":o=this.appendValueInput(e.name);break;case"input_statement":o=this.appendStatementInput(e.name);break;case"input_dummy":o=this.appendDummyInput(e.name)}return o?(e.check&&o.setCheck(e.check),e.align&&(void 0===(n=n[e.align.toUpperCase()])?console.warn(i+"Illegal align value: ",e.align):o.setAlign(n)),o):null},t.Block.prototype.isInputKeyword_=function(t){return"input_value"==t||"input_statement"==t||"input_dummy"==t},t.Block.prototype.stringToFieldJson_=function(t){return(t=t.trim())?{type:"field_label",text:t}:null},t.Block.prototype.appendInput_=function(e,i){var n=null;return e!=t.inputTypes.VALUE&&e!=t.inputTypes.STATEMENT||(n=this.makeConnection_(e)),e==t.inputTypes.STATEMENT&&this.statementInputCount++,e=new t.Input(e,i,this,n),this.inputList.push(e),e},t.Block.prototype.moveInputBefore=function(t,e){if(t!=e){for(var i,n=-1,o=e?-1:this.inputList.length,r=0;i=this.inputList[r];r++)if(i.name==t){if(n=r,-1!=o)break}else if(e&&i.name==e&&(o=r,-1!=n))break;if(-1==n)throw Error('Named input "'+t+'" not found.');if(-1==o)throw Error('Reference input "'+e+'" not found.');this.moveNumberedInputBefore(n,o)}},t.Block.prototype.moveNumberedInputBefore=function(t,e){if(t==e)throw Error("Can't move input to itself.");if(t>=this.inputList.length)throw RangeError("Input index "+t+" out of bounds.");if(e>this.inputList.length)throw RangeError("Reference input "+e+" out of bounds.");var i=this.inputList[t];this.inputList.splice(t,1),t<e&&e--,this.inputList.splice(e,0,i)},t.Block.prototype.removeInput=function(e,i){for(var n,o=0;n=this.inputList[o];o++)if(n.name==e)return n.type==t.inputTypes.STATEMENT&&this.statementInputCount--,n.dispose(),this.inputList.splice(o,1),!0;if(i)return!1;throw Error("Input not found: "+e)},t.Block.prototype.getInput=function(t){for(var e,i=0;e=this.inputList[i];i++)if(e.name==t)return e;return null},t.Block.prototype.getInputTargetBlock=function(t){return(t=this.getInput(t))&&t.connection&&t.connection.targetBlock()},t.Block.prototype.getCommentText=function(){return this.commentModel.text},t.Block.prototype.setCommentText=function(e){this.commentModel.text!=e&&(t.Events.fire(new(t.Events.get(t.Events.BLOCK_CHANGE))(this,"comment",null,this.commentModel.text,e)),this.comment=this.commentModel.text=e)},t.Block.prototype.setWarningText=function(t,e){},t.Block.prototype.setMutator=function(t){},t.Block.prototype.getRelativeToSurfaceXY=function(){return this.xy_},t.Block.prototype.moveBy=function(e,i){if(this.parentBlock_)throw Error("Block has parent.");var n=new(t.Events.get(t.Events.BLOCK_MOVE))(this);this.xy_.translate(e,i),n.recordNew(),t.Events.fire(n)},t.Block.prototype.makeConnection_=function(e){return new t.Connection(this,e)},t.Block.prototype.allInputsFilled=function(t){if(void 0===t&&(t=!0),!t&&this.isShadow())return!1;for(var e,i=0;e=this.inputList[i];i++)if(e.connection&&(!(e=e.connection.targetBlock())||!e.allInputsFilled(t)))return!1;return!(i=this.getNextBlock())||i.allInputsFilled(t)},t.Block.prototype.toDevString=function(){var t=this.type?'"'+this.type+'" block':"Block";return this.id&&(t+=' (id="'+this.id+'")'),t},t.blockRendering.IPathObject=function(t,e){},t.utils.KeyCodes={WIN_KEY_FF_LINUX:0,MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PLUS_SIGN:43,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,FF_SEMICOLON:59,FF_EQUALS:61,FF_DASH:173,FF_HASH:163,QUESTION_MARK:63,AT_SIGN:64,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SCROLL_LOCK:145,FIRST_MEDIA_KEY:166,LAST_MEDIA_KEY:183,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,TILDE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,MAC_WK_CMD_LEFT:91,MAC_WK_CMD_RIGHT:93,WIN_IME:229,VK_NONAME:252,PHANTOM:255},t.Menu=function(){this.menuItems_=[],this.roleName_=this.element_=this.onKeyDownHandler_=this.mouseLeaveHandler_=this.mouseEnterHandler_=this.clickHandler_=this.mouseOverHandler_=this.highlightedItem_=this.openingCoords=null},t.Menu.prototype.addChild=function(t){this.menuItems_.push(t)},t.Menu.prototype.render=function(e){var i=document.createElement("div");i.className="blocklyMenu goog-menu blocklyNonSelectable",i.tabIndex=0,this.roleName_&&t.utils.aria.setRole(i,this.roleName_),this.element_=i;for(var n,o=0;n=this.menuItems_[o];o++)i.appendChild(n.createDom());this.mouseOverHandler_=t.browserEvents.conditionalBind(i,"mouseover",this,this.handleMouseOver_,!0),this.clickHandler_=t.browserEvents.conditionalBind(i,"click",this,this.handleClick_,!0),this.mouseEnterHandler_=t.browserEvents.conditionalBind(i,"mouseenter",this,this.handleMouseEnter_,!0),this.mouseLeaveHandler_=t.browserEvents.conditionalBind(i,"mouseleave",this,this.handleMouseLeave_,!0),this.onKeyDownHandler_=t.browserEvents.conditionalBind(i,"keydown",this,this.handleKeyEvent_),e.appendChild(i)},t.Menu.prototype.getElement=function(){return this.element_},t.Menu.prototype.focus=function(){var e=this.getElement();e&&(e.focus({preventScroll:!0}),t.utils.dom.addClass(e,"blocklyFocused"))},t.Menu.prototype.blur_=function(){var e=this.getElement();e&&(e.blur(),t.utils.dom.removeClass(e,"blocklyFocused"))},t.Menu.prototype.setRole=function(t){this.roleName_=t},t.Menu.prototype.dispose=function(){this.mouseOverHandler_&&(t.browserEvents.unbind(this.mouseOverHandler_),this.mouseOverHandler_=null),this.clickHandler_&&(t.browserEvents.unbind(this.clickHandler_),this.clickHandler_=null),this.mouseEnterHandler_&&(t.browserEvents.unbind(this.mouseEnterHandler_),this.mouseEnterHandler_=null),this.mouseLeaveHandler_&&(t.browserEvents.unbind(this.mouseLeaveHandler_),this.mouseLeaveHandler_=null),this.onKeyDownHandler_&&(t.browserEvents.unbind(this.onKeyDownHandler_),this.onKeyDownHandler_=null);for(var e,i=0;e=this.menuItems_[i];i++)e.dispose();this.element_=null},t.Menu.prototype.getMenuItem_=function(e){for(var i=this.getElement();e&&e!=i;){if(t.utils.dom.hasClass(e,"blocklyMenuItem"))for(var n,o=0;n=this.menuItems_[o];o++)if(n.getElement()==e)return n;e=e.parentElement}return null},t.Menu.prototype.setHighlighted=function(e){var i=this.highlightedItem_;i&&(i.setHighlighted(!1),this.highlightedItem_=null),e&&(e.setHighlighted(!0),this.highlightedItem_=e,i=this.getElement(),t.utils.style.scrollIntoContainerView(e.getElement(),i),t.utils.aria.setState(i,t.utils.aria.State.ACTIVEDESCENDANT,e.getId()))},t.Menu.prototype.highlightNext=function(){var t=this.menuItems_.indexOf(this.highlightedItem_);this.highlightHelper_(t,1)},t.Menu.prototype.highlightPrevious=function(){var t=this.menuItems_.indexOf(this.highlightedItem_);this.highlightHelper_(0>t?this.menuItems_.length:t,-1)},t.Menu.prototype.highlightFirst_=function(){this.highlightHelper_(-1,1)},t.Menu.prototype.highlightLast_=function(){this.highlightHelper_(this.menuItems_.length,-1)},t.Menu.prototype.highlightHelper_=function(t,e){t+=e;for(var i;i=this.menuItems_[t];){if(i.isEnabled()){this.setHighlighted(i);break}t+=e}},t.Menu.prototype.handleMouseOver_=function(t){(t=this.getMenuItem_(t.target))&&(t.isEnabled()?this.highlightedItem_!=t&&this.setHighlighted(t):this.setHighlighted(null))},t.Menu.prototype.handleClick_=function(e){var i=this.openingCoords;if(this.openingCoords=null,i&&"number"==typeof e.clientX){var n=new t.utils.Coordinate(e.clientX,e.clientY);if(1>t.utils.Coordinate.distance(i,n))return}(e=this.getMenuItem_(e.target))&&e.performAction()},t.Menu.prototype.handleMouseEnter_=function(t){this.focus()},t.Menu.prototype.handleMouseLeave_=function(t){this.getElement()&&(this.blur_(),this.setHighlighted(null))},t.Menu.prototype.handleKeyEvent_=function(e){if(this.menuItems_.length&&!(e.shiftKey||e.ctrlKey||e.metaKey||e.altKey)){var i=this.highlightedItem_;switch(e.keyCode){case t.utils.KeyCodes.ENTER:case t.utils.KeyCodes.SPACE:i&&i.performAction();break;case t.utils.KeyCodes.UP:this.highlightPrevious();break;case t.utils.KeyCodes.DOWN:this.highlightNext();break;case t.utils.KeyCodes.PAGE_UP:case t.utils.KeyCodes.HOME:this.highlightFirst_();break;case t.utils.KeyCodes.PAGE_DOWN:case t.utils.KeyCodes.END:this.highlightLast_();break;default:return}e.preventDefault(),e.stopPropagation()}},t.Menu.prototype.getSize=function(){var e=this.getElement(),i=t.utils.style.getSize(e);return i.height=e.scrollHeight,i},t.MenuItem=function(t,e){this.content_=t,this.value_=e,this.enabled_=!0,this.element_=null,this.rightToLeft_=!1,this.roleName_=null,this.highlight_=this.checked_=this.checkable_=!1,this.actionHandler_=null},t.MenuItem.prototype.createDom=function(){var e=document.createElement("div");e.id=t.utils.IdGenerator.getNextUniqueId(),this.element_=e,e.className="blocklyMenuItem goog-menuitem "+(this.enabled_?"":"blocklyMenuItemDisabled goog-menuitem-disabled ")+(this.checked_?"blocklyMenuItemSelected goog-option-selected ":"")+(this.highlight_?"blocklyMenuItemHighlight goog-menuitem-highlight ":"")+(this.rightToLeft_?"blocklyMenuItemRtl goog-menuitem-rtl ":"");var i=document.createElement("div");if(i.className="blocklyMenuItemContent goog-menuitem-content",this.checkable_){var n=document.createElement("div");n.className="blocklyMenuItemCheckbox goog-menuitem-checkbox",i.appendChild(n)}return n=this.content_,"string"==typeof this.content_&&(n=document.createTextNode(this.content_)),i.appendChild(n),e.appendChild(i),this.roleName_&&t.utils.aria.setRole(e,this.roleName_),t.utils.aria.setState(e,t.utils.aria.State.SELECTED,this.checkable_&&this.checked_||!1),t.utils.aria.setState(e,t.utils.aria.State.DISABLED,!this.enabled_),e},t.MenuItem.prototype.dispose=function(){this.element_=null},t.MenuItem.prototype.getElement=function(){return this.element_},t.MenuItem.prototype.getId=function(){return this.element_.id},t.MenuItem.prototype.getValue=function(){return this.value_},t.MenuItem.prototype.setRightToLeft=function(t){this.rightToLeft_=t},t.MenuItem.prototype.setRole=function(t){this.roleName_=t},t.MenuItem.prototype.setCheckable=function(t){this.checkable_=t},t.MenuItem.prototype.setChecked=function(t){this.checked_=t},t.MenuItem.prototype.setHighlighted=function(e){this.highlight_=e;var i=this.getElement();i&&this.isEnabled()&&(e?(t.utils.dom.addClass(i,"blocklyMenuItemHighlight"),t.utils.dom.addClass(i,"goog-menuitem-highlight")):(t.utils.dom.removeClass(i,"blocklyMenuItemHighlight"),t.utils.dom.removeClass(i,"goog-menuitem-highlight")))},t.MenuItem.prototype.isEnabled=function(){return this.enabled_},t.MenuItem.prototype.setEnabled=function(t){this.enabled_=t},t.MenuItem.prototype.performAction=function(){this.isEnabled()&&this.actionHandler_&&this.actionHandler_(this)},t.MenuItem.prototype.onAction=function(t,e){this.actionHandler_=t.bind(e)},t.ContextMenu={},t.ContextMenu.currentBlock=null,t.ContextMenu.menu_=null,t.ContextMenu.show=function(e,i,n){if(t.WidgetDiv.show(t.ContextMenu,n,t.ContextMenu.dispose),i.length){var o=t.ContextMenu.populate_(i,n);t.ContextMenu.menu_=o,t.ContextMenu.position_(o,e,n),setTimeout(function(){o.focus()},1),t.ContextMenu.currentBlock=null}else t.ContextMenu.hide()},t.ContextMenu.populate_=function(e,i){var n=new t.Menu;n.setRole(t.utils.aria.Role.MENU);for(var o,r=0;o=e[r];r++){var s=new t.MenuItem(o.text);s.setRightToLeft(i),s.setRole(t.utils.aria.Role.MENUITEM),n.addChild(s),s.setEnabled(o.enabled),o.enabled&&s.onAction(function(e){t.ContextMenu.hide(),this.callback(this.scope)},o)}return n},t.ContextMenu.position_=function(e,i,n){var o=t.utils.getViewportBBox();i=new t.utils.Rect(i.clientY+o.top,i.clientY+o.top,i.clientX+o.left,i.clientX+o.left),t.ContextMenu.createWidget_(e);var r=e.getSize();n&&(i.left+=r.width,i.right+=r.width,o.left+=r.width,o.right+=r.width),t.WidgetDiv.positionWithAnchor(o,i,r,n),e.focus()},t.ContextMenu.createWidget_=function(e){e.render(t.WidgetDiv.DIV);var i=e.getElement();t.utils.dom.addClass(i,"blocklyContextMenu"),t.browserEvents.conditionalBind(i,"contextmenu",null,t.utils.noEvent),e.focus()},t.ContextMenu.hide=function(){t.WidgetDiv.hideIfOwner(t.ContextMenu),t.ContextMenu.currentBlock=null},t.ContextMenu.dispose=function(){t.ContextMenu.menu_&&(t.ContextMenu.menu_.dispose(),t.ContextMenu.menu_=null)},t.ContextMenu.callbackFactory=function(e,i){return function(){t.Events.disable();try{var n=t.Xml.domToBlock(i,e.workspace),o=e.getRelativeToSurfaceXY();o.x=e.RTL?o.x-t.SNAP_RADIUS:o.x+t.SNAP_RADIUS,o.y+=2*t.SNAP_RADIUS,n.moveBy(o.x,o.y)}finally{t.Events.enable()}t.Events.isEnabled()&&!n.isShadow()&&t.Events.fire(new(t.Events.get(t.Events.BLOCK_CREATE))(n)),n.select()}},t.ContextMenu.commentDeleteOption=function(e){return{text:t.Msg.REMOVE_COMMENT,enabled:!0,callback:function(){t.Events.setGroup(!0),e.dispose(!0,!0),t.Events.setGroup(!1)}}},t.ContextMenu.commentDuplicateOption=function(e){return{text:t.Msg.DUPLICATE_COMMENT,enabled:!0,callback:function(){t.duplicate(e)}}},t.ContextMenu.workspaceCommentOption=function(e,i){if(!t.WorkspaceCommentSvg)throw Error("Missing require for Blockly.WorkspaceCommentSvg");var n={enabled:!t.utils.userAgent.IE};return n.text=t.Msg.ADD_COMMENT,n.callback=function(){var n=new t.WorkspaceCommentSvg(e,t.Msg.WORKSPACE_COMMENT_DEFAULT_TEXT,t.WorkspaceCommentSvg.DEFAULT_SIZE,t.WorkspaceCommentSvg.DEFAULT_SIZE),o=e.getInjectionDiv().getBoundingClientRect();o=new t.utils.Coordinate(i.clientX-o.left,i.clientY-o.top);var r=e.getOriginOffsetInPixels();(o=t.utils.Coordinate.difference(o,r)).scale(1/e.scale),n.moveBy(o.x,o.y),e.rendered&&(n.initSvg(),n.render(),n.select())},n},t.ContextMenuRegistry=function(){t.ContextMenuRegistry.registry=this,this.registry_=Object.create(null)},t.ContextMenuRegistry.ScopeType={BLOCK:"block",WORKSPACE:"workspace"},t.ContextMenuRegistry.registry=null,t.ContextMenuRegistry.prototype.register=function(t){if(this.registry_[t.id])throw Error('Menu item with ID "'+t.id+'" is already registered.');this.registry_[t.id]=t},t.ContextMenuRegistry.prototype.unregister=function(t){if(!this.registry_[t])throw Error('Menu item with ID "'+t+'" not found.');delete this.registry_[t]},t.ContextMenuRegistry.prototype.getItem=function(t){return this.registry_[t]||null},t.ContextMenuRegistry.prototype.getContextMenuOptions=function(t,e){var i=[],n=this.registry_;return Object.keys(n).forEach(function(o){if(o=n[o],t==o.scopeType){var r=o.preconditionFn(e);"hidden"!=r&&(o={text:"function"==typeof o.displayText?o.displayText(e):o.displayText,enabled:"enabled"==r,callback:o.callback,scope:e,weight:o.weight},i.push(o))}}),i.sort(function(t,e){return t.weight-e.weight}),i},new t.ContextMenuRegistry,t.Events.Selected=function(e,i,n){t.Events.Selected.superClass_.constructor.call(this,n),this.oldElementId=e,this.newElementId=i},t.utils.object.inherits(t.Events.Selected,t.Events.UiBase),t.Events.Selected.prototype.type=t.Events.SELECTED,t.Events.Selected.prototype.toJson=function(){var e=t.Events.Selected.superClass_.toJson.call(this);return e.oldElementId=this.oldElementId,e.newElementId=this.newElementId,e},t.Events.Selected.prototype.fromJson=function(e){t.Events.Selected.superClass_.fromJson.call(this,e),this.oldElementId=e.oldElementId,this.newElementId=e.newElementId},t.registry.register(t.registry.Type.EVENT,t.Events.SELECTED,t.Events.Selected),t.IBoundedElement=function(){},t.ICopyable=function(){},t.RenderedConnection=function(e,i){t.RenderedConnection.superClass_.constructor.call(this,e,i),this.db_=e.workspace.connectionDBList[i],this.dbOpposite_=e.workspace.connectionDBList[t.OPPOSITE_TYPE[i]],this.offsetInBlock_=new t.utils.Coordinate(0,0),this.trackedState_=t.RenderedConnection.TrackedState.WILL_TRACK,this.targetConnection=null},t.utils.object.inherits(t.RenderedConnection,t.Connection),t.RenderedConnection.TrackedState={WILL_TRACK:-1,UNTRACKED:0,TRACKED:1},t.RenderedConnection.prototype.dispose=function(){t.RenderedConnection.superClass_.dispose.call(this),this.trackedState_==t.RenderedConnection.TrackedState.TRACKED&&this.db_.removeConnection(this,this.y)},t.RenderedConnection.prototype.getSourceBlock=function(){return t.RenderedConnection.superClass_.getSourceBlock.call(this)},t.RenderedConnection.prototype.targetBlock=function(){return t.RenderedConnection.superClass_.targetBlock.call(this)},t.RenderedConnection.prototype.distanceFrom=function(t){var e=this.x-t.x;return t=this.y-t.y,Math.sqrt(e*e+t*t)},t.RenderedConnection.prototype.bumpAwayFrom=function(e){if(!this.sourceBlock_.workspace.isDragging()){var i=this.sourceBlock_.getRootBlock();if(!i.isInFlyout){var n=!1;if(!i.isMovable()){if(!(i=e.getSourceBlock().getRootBlock()).isMovable())return;e=this,n=!0}var o=t.selected==i;o||i.addSelect();var r=e.x+t.SNAP_RADIUS+Math.floor(Math.random()*t.BUMP_RANDOMNESS)-this.x,s=e.y+t.SNAP_RADIUS+Math.floor(Math.random()*t.BUMP_RANDOMNESS)-this.y;n&&(s=-s),i.RTL&&(r=e.x-t.SNAP_RADIUS-Math.floor(Math.random()*t.BUMP_RANDOMNESS)-this.x),i.moveBy(r,s),o||i.removeSelect()}}},t.RenderedConnection.prototype.moveTo=function(e,i){this.trackedState_==t.RenderedConnection.TrackedState.WILL_TRACK?(this.db_.addConnection(this,i),this.trackedState_=t.RenderedConnection.TrackedState.TRACKED):this.trackedState_==t.RenderedConnection.TrackedState.TRACKED&&(this.db_.removeConnection(this,this.y),this.db_.addConnection(this,i)),this.x=e,this.y=i},t.RenderedConnection.prototype.moveBy=function(t,e){this.moveTo(this.x+t,this.y+e)},t.RenderedConnection.prototype.moveToOffset=function(t){this.moveTo(t.x+this.offsetInBlock_.x,t.y+this.offsetInBlock_.y)},t.RenderedConnection.prototype.setOffsetInBlock=function(t,e){this.offsetInBlock_.x=t,this.offsetInBlock_.y=e},t.RenderedConnection.prototype.getOffsetInBlock=function(){return this.offsetInBlock_},t.RenderedConnection.prototype.tighten=function(){var e=this.targetConnection.x-this.x,i=this.targetConnection.y-this.y;if(0!=e||0!=i){var n=this.targetBlock(),o=n.getSvgRoot();if(!o)throw Error("block is not rendered.");o=t.utils.getRelativeXY(o),n.getSvgRoot().setAttribute("transform","translate("+(o.x-e)+","+(o.y-i)+")"),n.moveConnections(-e,-i)}},t.RenderedConnection.prototype.closest=function(t,e){return this.dbOpposite_.searchForClosest(this,t,e)},t.RenderedConnection.prototype.highlight=function(){var e=this.sourceBlock_.workspace.getRenderer().getConstants(),i=e.shapeFor(this);this.type==t.connectionTypes.INPUT_VALUE||this.type==t.connectionTypes.OUTPUT_VALUE?(e=e.TAB_OFFSET_FROM_TOP,i=t.utils.svgPaths.moveBy(0,-e)+t.utils.svgPaths.lineOnAxis("v",e)+i.pathDown+t.utils.svgPaths.lineOnAxis("v",e)):(e=e.NOTCH_OFFSET_LEFT-e.CORNER_RADIUS,i=t.utils.svgPaths.moveBy(-e,0)+t.utils.svgPaths.lineOnAxis("h",e)+i.pathLeft+t.utils.svgPaths.lineOnAxis("h",e)),e=this.sourceBlock_.getRelativeToSurfaceXY(),t.Connection.highlightedPath_=t.utils.dom.createSvgElement(t.utils.Svg.PATH,{class:"blocklyHighlightedConnectionPath",d:i,transform:"translate("+(this.x-e.x)+","+(this.y-e.y)+")"+(this.sourceBlock_.RTL?" scale(-1 1)":"")},this.sourceBlock_.getSvgRoot())},t.RenderedConnection.prototype.unhighlight=function(){t.utils.dom.removeNode(t.Connection.highlightedPath_),delete t.Connection.highlightedPath_},t.RenderedConnection.prototype.setTracking=function(e){e&&this.trackedState_==t.RenderedConnection.TrackedState.TRACKED||!e&&this.trackedState_==t.RenderedConnection.TrackedState.UNTRACKED||this.sourceBlock_.isInFlyout||(e?(this.db_.addConnection(this,this.y),this.trackedState_=t.RenderedConnection.TrackedState.TRACKED):(this.trackedState_==t.RenderedConnection.TrackedState.TRACKED&&this.db_.removeConnection(this,this.y),this.trackedState_=t.RenderedConnection.TrackedState.UNTRACKED))},t.RenderedConnection.prototype.stopTrackingAll=function(){if(this.setTracking(!1),this.targetConnection)for(var t=this.targetBlock().getDescendants(!1),e=0;e<t.length;e++){for(var i=t[e],n=i.getConnections_(!0),o=0;o<n.length;o++)n[o].setTracking(!1);for(i=i.getIcons(),o=0;o<i.length;o++)i[o].setVisible(!1)}},t.RenderedConnection.prototype.startTrackingAll=function(){this.setTracking(!0);var e=[];if(this.type!=t.connectionTypes.INPUT_VALUE&&this.type!=t.connectionTypes.NEXT_STATEMENT)return e;var i=this.targetBlock();if(i){if(i.isCollapsed()){var n=[];i.outputConnection&&n.push(i.outputConnection),i.nextConnection&&n.push(i.nextConnection),i.previousConnection&&n.push(i.previousConnection)}else n=i.getConnections_(!0);for(var o=0;o<n.length;o++)e.push.apply(e,n[o].startTrackingAll());e.length||(e[0]=i)}return e},t.RenderedConnection.prototype.isConnectionAllowed=function(e,i){return t.utils.deprecation.warn("RenderedConnection.prototype.isConnectionAllowed","July 2020","July 2021","Blockly.Workspace.prototype.getConnectionChecker().canConnect"),!(this.distanceFrom(e)>i)&&t.RenderedConnection.superClass_.isConnectionAllowed.call(this,e)},t.RenderedConnection.prototype.onFailedConnect=function(e){var i=this.getSourceBlock();if(t.Events.recordUndo){var n=t.Events.getGroup();setTimeout(function(){i.isDisposed()||i.getParent()||(t.Events.setGroup(n),this.bumpAwayFrom(e),t.Events.setGroup(!1))}.bind(this),t.BUMP_DELAY)}},t.RenderedConnection.prototype.disconnectInternal_=function(e,i){t.RenderedConnection.superClass_.disconnectInternal_.call(this,e,i),e.rendered&&e.render(),i.rendered&&(i.updateDisabled(),i.render(),i.getSvgRoot().style.display="block")},t.RenderedConnection.prototype.respawnShadow_=function(){t.RenderedConnection.superClass_.respawnShadow_.call(this);var e=this.targetBlock();e&&(e.initSvg(),e.render(!1),(e=this.getSourceBlock()).rendered&&e.render())},t.RenderedConnection.prototype.neighbours=function(t){return this.dbOpposite_.getNeighbours(this,t)},t.RenderedConnection.prototype.connect_=function(e){t.RenderedConnection.superClass_.connect_.call(this,e);var i=this.getSourceBlock();e=e.getSourceBlock();var n=i.rendered,o=e.rendered;n&&i.updateDisabled(),o&&e.updateDisabled(),n&&o&&(this.type==t.connectionTypes.NEXT_STATEMENT||this.type==t.connectionTypes.PREVIOUS_STATEMENT?e.render():i.render()),(i=i.getInputWithBlock(e))&&(i=i.isVisible(),e.getSvgRoot().style.display=i?"block":"none")},t.RenderedConnection.prototype.onCheckChanged_=function(){!this.isConnected()||this.targetConnection&&this.getConnectionChecker().canConnect(this,this.targetConnection,!1)||((this.isSuperior()?this.targetBlock():this.sourceBlock_).unplug(),this.sourceBlock_.bumpNeighbours())},t.BasicCursor=function(){t.BasicCursor.superClass_.constructor.call(this)},t.utils.object.inherits(t.BasicCursor,t.Cursor),t.BasicCursor.registrationName="basicCursor",t.BasicCursor.prototype.next=function(){var t=this.getCurNode();return t?((t=this.getNextNode_(t,this.validNode_))&&this.setCurNode(t),t):null},t.BasicCursor.prototype.in=function(){return this.next()},t.BasicCursor.prototype.prev=function(){var t=this.getCurNode();return t?((t=this.getPreviousNode_(t,this.validNode_))&&this.setCurNode(t),t):null},t.BasicCursor.prototype.out=function(){return this.prev()},t.BasicCursor.prototype.getNextNode_=function(t,e){if(!t)return null;var i=t.in()||t.next();return e(i)?i:i?this.getNextNode_(i,e):e(t=this.findSiblingOrParent_(t.out()))?t:t?this.getNextNode_(t,e):null},t.BasicCursor.prototype.getPreviousNode_=function(t,e){if(!t)return null;var i=t.prev();return e(i=i?this.getRightMostChild_(i):t.out())?i:i?this.getPreviousNode_(i,e):null},t.BasicCursor.prototype.validNode_=function(e){var i=!1;return(e=e&&e.getType())!=t.ASTNode.types.OUTPUT&&e!=t.ASTNode.types.INPUT&&e!=t.ASTNode.types.FIELD&&e!=t.ASTNode.types.NEXT&&e!=t.ASTNode.types.PREVIOUS&&e!=t.ASTNode.types.WORKSPACE||(i=!0),i},t.BasicCursor.prototype.findSiblingOrParent_=function(t){if(!t)return null;var e=t.next();return e||this.findSiblingOrParent_(t.out())},t.BasicCursor.prototype.getRightMostChild_=function(t){if(!t.in())return t;for(t=t.in();t.next();)t=t.next();return this.getRightMostChild_(t)},t.registry.register(t.registry.Type.CURSOR,t.BasicCursor.registrationName,t.BasicCursor),t.TabNavigateCursor=function(){t.TabNavigateCursor.superClass_.constructor.call(this)},t.utils.object.inherits(t.TabNavigateCursor,t.BasicCursor),t.TabNavigateCursor.prototype.validNode_=function(e){var i=!1,n=e&&e.getType();return e&&(e=e.getLocation(),n==t.ASTNode.types.FIELD&&e&&e.isTabNavigable()&&e.isClickable()&&(i=!0)),i},t.BlockSvg=function(e,i,n){this.svgGroup_=t.utils.dom.createSvgElement(t.utils.Svg.G,{},null),this.svgGroup_.translate_="",this.style=e.getRenderer().getConstants().getBlockStyle(null),this.pathObject=e.getRenderer().makePathObject(this.svgGroup_,this.style),this.renderIsInProgress_=this.rendered=!1,this.workspace=e,this.previousConnection=this.nextConnection=this.outputConnection=null,this.useDragSurface_=t.utils.is3dSupported()&&!!e.getBlockDragSurface();var o=this.pathObject.svgPath;o.tooltip=this,t.Tooltip.bindMouseEvents(o),t.BlockSvg.superClass_.constructor.call(this,e,i,n),this.svgGroup_.dataset?this.svgGroup_.dataset.id=this.id:t.utils.userAgent.IE&&this.svgGroup_.setAttribute("data-id",this.id)},t.utils.object.inherits(t.BlockSvg,t.Block),t.BlockSvg.prototype.height=0,t.BlockSvg.prototype.width=0,t.BlockSvg.prototype.warningTextDb_=null,t.BlockSvg.INLINE=-1,t.BlockSvg.COLLAPSED_WARNING_ID="TEMP_COLLAPSED_WARNING_",t.BlockSvg.prototype.initSvg=function(){if(!this.workspace.rendered)throw TypeError("Workspace is headless.");for(var e,i=0;e=this.inputList[i];i++)e.init();for(e=this.getIcons(),i=0;i<e.length;i++)e[i].createIcon();this.applyColour(),this.pathObject.updateMovable(this.isMovable()),i=this.getSvgRoot(),this.workspace.options.readOnly||this.eventsInit_||!i||t.browserEvents.conditionalBind(i,"mousedown",this,this.onMouseDown_),this.eventsInit_=!0,i.parentNode||this.workspace.getCanvas().appendChild(i)},t.BlockSvg.prototype.getColourSecondary=function(){return this.style.colourSecondary},t.BlockSvg.prototype.getColourTertiary=function(){return this.style.colourTertiary},t.BlockSvg.prototype.getColourShadow=function(){return t.utils.deprecation.warn("BlockSvg.prototype.getColourShadow","January 2020","January 2021","style.colourSecondary"),this.getColourSecondary()},t.BlockSvg.prototype.getColourBorder=function(){return t.utils.deprecation.warn("BlockSvg.prototype.getColourBorder","January 2020","January 2021","style.colourTertiary"),{colourBorder:this.getColourTertiary(),colourLight:null,colourDark:null}},t.BlockSvg.prototype.select=function(){if(this.isShadow()&&this.getParent())this.getParent().select();else if(t.selected!=this){var e=null;if(t.selected){e=t.selected.id,t.Events.disable();try{t.selected.unselect()}finally{t.Events.enable()}}e=new(t.Events.get(t.Events.SELECTED))(e,this.id,this.workspace.id),t.Events.fire(e),t.selected=this,this.addSelect()}},t.BlockSvg.prototype.unselect=function(){if(t.selected==this){var e=new(t.Events.get(t.Events.SELECTED))(this.id,null,this.workspace.id);e.workspaceId=this.workspace.id,t.Events.fire(e),t.selected=null,this.removeSelect()}},t.BlockSvg.prototype.mutator=null,t.BlockSvg.prototype.comment=null,t.BlockSvg.prototype.commentIcon_=null,t.BlockSvg.prototype.warning=null,t.BlockSvg.prototype.getIcons=function(){var t=[];return this.mutator&&t.push(this.mutator),this.commentIcon_&&t.push(this.commentIcon_),this.warning&&t.push(this.warning),t},t.BlockSvg.prototype.setParent=function(e){var i=this.parentBlock_;if(e!=i){t.utils.dom.startTextWidthCache(),t.BlockSvg.superClass_.setParent.call(this,e),t.utils.dom.stopTextWidthCache();var n=this.getSvgRoot();if(!this.workspace.isClearing&&n){var o=this.getRelativeToSurfaceXY();e?(e.getSvgRoot().appendChild(n),e=this.getRelativeToSurfaceXY(),this.moveConnections(e.x-o.x,e.y-o.y)):i&&(this.workspace.getCanvas().appendChild(n),this.translate(o.x,o.y)),this.applyColour()}}},t.BlockSvg.prototype.getRelativeToSurfaceXY=function(){var e=0,i=0,n=this.useDragSurface_?this.workspace.getBlockDragSurface().getGroup():null,o=this.getSvgRoot();if(o)do{var r=t.utils.getRelativeXY(o);e+=r.x,i+=r.y,this.useDragSurface_&&this.workspace.getBlockDragSurface().getCurrentBlock()==o&&(e+=(r=this.workspace.getBlockDragSurface().getSurfaceTranslation()).x,i+=r.y),o=o.parentNode}while(o&&o!=this.workspace.getCanvas()&&o!=n);return new t.utils.Coordinate(e,i)},t.BlockSvg.prototype.moveBy=function(e,i){if(this.parentBlock_)throw Error("Block has parent.");var n=t.Events.isEnabled();if(n)var o=new(t.Events.get(t.Events.BLOCK_MOVE))(this);var r=this.getRelativeToSurfaceXY();this.translate(r.x+e,r.y+i),this.moveConnections(e,i),n&&(o.recordNew(),t.Events.fire(o)),this.workspace.resizeContents()},t.BlockSvg.prototype.translate=function(t,e){this.getSvgRoot().setAttribute("transform","translate("+t+","+e+")")},t.BlockSvg.prototype.moveToDragSurface=function(){if(this.useDragSurface_){var t=this.getRelativeToSurfaceXY();this.clearTransformAttributes_(),this.workspace.getBlockDragSurface().translateSurface(t.x,t.y),(t=this.getSvgRoot())&&this.workspace.getBlockDragSurface().setBlocksAndShow(t)}},t.BlockSvg.prototype.moveTo=function(t){var e=this.getRelativeToSurfaceXY();this.moveBy(t.x-e.x,t.y-e.y)},t.BlockSvg.prototype.moveOffDragSurface=function(t){this.useDragSurface_&&(this.translate(t.x,t.y),this.workspace.getBlockDragSurface().clearAndHide(this.workspace.getCanvas()))},t.BlockSvg.prototype.moveDuringDrag=function(t){this.useDragSurface_?this.workspace.getBlockDragSurface().translateSurface(t.x,t.y):(this.svgGroup_.translate_="translate("+t.x+","+t.y+")",this.svgGroup_.setAttribute("transform",this.svgGroup_.translate_+this.svgGroup_.skew_))},t.BlockSvg.prototype.clearTransformAttributes_=function(){this.getSvgRoot().removeAttribute("transform")},t.BlockSvg.prototype.snapToGrid=function(){if(this.workspace&&!this.workspace.isDragging()&&!this.getParent()&&!this.isInFlyout){var t=this.workspace.getGrid();if(t&&t.shouldSnap()){var e=t.getSpacing(),i=e/2,n=this.getRelativeToSurfaceXY();t=Math.round((n.x-i)/e)*e+i-n.x,e=Math.round((n.y-i)/e)*e+i-n.y,t=Math.round(t),e=Math.round(e),0==t&&0==e||this.moveBy(t,e)}}},t.BlockSvg.prototype.getBoundingRectangle=function(){var e=this.getRelativeToSurfaceXY(),i=this.getHeightWidth();if(this.RTL)var n=e.x-i.width,o=e.x;else n=e.x,o=e.x+i.width;return new t.utils.Rect(e.y,e.y+i.height,n,o)},t.BlockSvg.prototype.markDirty=function(){this.pathObject.constants=this.workspace.getRenderer().getConstants();for(var t,e=0;t=this.inputList[e];e++)t.markDirty()},t.BlockSvg.prototype.setCollapsed=function(e){this.collapsed_!=e&&(t.BlockSvg.superClass_.setCollapsed.call(this,e),e?this.rendered&&this.render():this.updateCollapsed_())},t.BlockSvg.prototype.updateCollapsed_=function(){for(var e,i=this.isCollapsed(),n=t.constants.COLLAPSED_INPUT_NAME,o=t.constants.COLLAPSED_FIELD_NAME,r=0;e=this.inputList[r];r++)e.name!=n&&e.setVisible(!i);if(i){for(e=this.getIcons(),r=0;i=e[r];r++)i.setVisible(!1);r=this.toString(t.COLLAPSE_CHARS),(e=this.getField(o))?e.setValue(r):(e=this.getInput(n)||this.appendDummyInput(n)).appendField(new t.FieldLabel(r),o)}else this.updateDisabled(),this.removeInput(n)},t.BlockSvg.prototype.tab=function(e,i){var n=new t.TabNavigateCursor;n.setCurNode(t.ASTNode.createFieldNode(e)),e=n.getCurNode(),i?n.next():n.prev(),(i=n.getCurNode())&&i!==e&&(i.getLocation().showEditor(),this.workspace.keyboardAccessibilityMode&&this.workspace.getCursor().setCurNode(i))},t.BlockSvg.prototype.onMouseDown_=function(t){var e=this.workspace&&this.workspace.getGesture(t);e&&e.handleBlockStart(t,this)},t.BlockSvg.prototype.showHelp=function(){var t="function"==typeof this.helpUrl?this.helpUrl():this.helpUrl;t&&window.open(t)},t.BlockSvg.prototype.generateContextMenu=function(){if(this.workspace.options.readOnly||!this.contextMenu)return null;var e=t.ContextMenuRegistry.registry.getContextMenuOptions(t.ContextMenuRegistry.ScopeType.BLOCK,{block:this});return this.customContextMenu&&this.customContextMenu(e),e},t.BlockSvg.prototype.showContextMenu=function(e){var i=this.generateContextMenu();i&&i.length&&(t.ContextMenu.show(e,i,this.RTL),t.ContextMenu.currentBlock=this)},t.BlockSvg.prototype.moveConnections=function(t,e){if(this.rendered){for(var i=this.getConnections_(!1),n=0;n<i.length;n++)i[n].moveBy(t,e);for(i=this.getIcons(),n=0;n<i.length;n++)i[n].computeIconLocation();for(n=0;n<this.childBlocks_.length;n++)this.childBlocks_[n].moveConnections(t,e)}},t.BlockSvg.prototype.setDragging=function(e){if(e){var i=this.getSvgRoot();i.translate_="",i.skew_="",t.draggingConnections=t.draggingConnections.concat(this.getConnections_(!0)),t.utils.dom.addClass(this.svgGroup_,"blocklyDragging")}else t.draggingConnections=[],t.utils.dom.removeClass(this.svgGroup_,"blocklyDragging");for(i=0;i<this.childBlocks_.length;i++)this.childBlocks_[i].setDragging(e)},t.BlockSvg.prototype.setMovable=function(e){t.BlockSvg.superClass_.setMovable.call(this,e),this.pathObject.updateMovable(e)},t.BlockSvg.prototype.setEditable=function(e){t.BlockSvg.superClass_.setEditable.call(this,e),e=this.getIcons();for(var i=0;i<e.length;i++)e[i].updateEditable()},t.BlockSvg.prototype.setShadow=function(e){t.BlockSvg.superClass_.setShadow.call(this,e),this.applyColour()},t.BlockSvg.prototype.setInsertionMarker=function(t){this.isInsertionMarker_!=t&&(this.isInsertionMarker_=t)&&(this.setColour(this.workspace.getRenderer().getConstants().INSERTION_MARKER_COLOUR),this.pathObject.updateInsertionMarker(!0))},t.BlockSvg.prototype.getSvgRoot=function(){return this.svgGroup_},t.BlockSvg.prototype.dispose=function(e,i){if(this.workspace){t.Tooltip.dispose(),t.Tooltip.unbindMouseEvents(this.pathObject.svgPath),t.utils.dom.startTextWidthCache();var n=this.workspace;if(t.selected==this&&(this.unselect(),this.workspace.cancelCurrentGesture()),t.ContextMenu.currentBlock==this&&t.ContextMenu.hide(),i&&this.rendered&&(this.unplug(e),t.blockAnimations.disposeUiEffect(this)),this.rendered=!1,this.warningTextDb_){for(var o in this.warningTextDb_)clearTimeout(this.warningTextDb_[o]);this.warningTextDb_=null}for(i=this.getIcons(),o=0;o<i.length;o++)i[o].dispose();t.BlockSvg.superClass_.dispose.call(this,!!e),t.utils.dom.removeNode(this.svgGroup_),n.resizeContents(),this.svgGroup_=null,t.utils.dom.stopTextWidthCache()}},t.BlockSvg.prototype.toCopyData=function(){if(this.isInsertionMarker_)return null;var e=t.Xml.blockToDom(this,!0);t.Xml.deleteNext(e);var i=this.getRelativeToSurfaceXY();return e.setAttribute("x",this.RTL?-i.x:i.x),e.setAttribute("y",i.y),{xml:e,source:this.workspace,typeCounts:t.utils.getBlockTypeCounts(this,!0)}},t.BlockSvg.prototype.applyColour=function(){this.pathObject.applyColour(this);for(var t=this.getIcons(),e=0;e<t.length;e++)t[e].applyColour();for(t=0;e=this.inputList[t];t++)for(var i,n=0;i=e.fieldRow[n];n++)i.applyColour()},t.BlockSvg.prototype.updateDisabled=function(){var t=this.getChildren(!1);if(this.applyColour(),!this.isCollapsed())for(var e,i=0;e=t[i];i++)e.rendered&&e.updateDisabled()},t.BlockSvg.prototype.getCommentIcon=function(){return this.commentIcon_},t.BlockSvg.prototype.setCommentText=function(e){if(!t.Comment)throw Error("Missing require for Blockly.Comment");this.commentModel.text!=e&&(t.BlockSvg.superClass_.setCommentText.call(this,e),e=null!=e,!!this.commentIcon_==e?this.commentIcon_.updateText():(e?this.comment=this.commentIcon_=new t.Comment(this):(this.commentIcon_.dispose(),this.comment=this.commentIcon_=null),this.rendered&&(this.render(),this.bumpNeighbours())))},t.BlockSvg.prototype.setWarningText=function(e,i){if(!t.Warning)throw Error("Missing require for Blockly.Warning");this.warningTextDb_||(this.warningTextDb_=Object.create(null));var n=i||"";if(n)this.warningTextDb_[n]&&(clearTimeout(this.warningTextDb_[n]),delete this.warningTextDb_[n]);else for(var o in this.warningTextDb_)clearTimeout(this.warningTextDb_[o]),delete this.warningTextDb_[o];if(this.workspace.isDragging()){var r=this;this.warningTextDb_[n]=setTimeout(function(){r.workspace&&(delete r.warningTextDb_[n],r.setWarningText(e,n))},100)}else{if(this.isInFlyout&&(e=null),i=!1,"string"==typeof e){o=this.getSurroundParent();for(var s=null;o;)o.isCollapsed()&&(s=o),o=o.getSurroundParent();s&&s.setWarningText(t.Msg.COLLAPSED_WARNINGS_WARNING,t.BlockSvg.COLLAPSED_WARNING_ID),this.warning||(this.warning=new t.Warning(this),i=!0),this.warning.setText(e,n)}else this.warning&&!n?(this.warning.dispose(),i=!0):this.warning&&(i=this.warning.getText(),this.warning.setText("",n),(o=this.warning.getText())||this.warning.dispose(),i=i!=o);i&&this.rendered&&(this.render(),this.bumpNeighbours())}},t.BlockSvg.prototype.setMutator=function(t){this.mutator&&this.mutator!==t&&this.mutator.dispose(),t&&(t.setBlock(this),this.mutator=t,t.createIcon()),this.rendered&&(this.render(),this.bumpNeighbours())},t.BlockSvg.prototype.setEnabled=function(e){this.isEnabled()!=e&&(t.BlockSvg.superClass_.setEnabled.call(this,e),this.rendered&&!this.getInheritedDisabled()&&this.updateDisabled())},t.BlockSvg.prototype.setHighlighted=function(t){this.rendered&&this.pathObject.updateHighlighted(t)},t.BlockSvg.prototype.addSelect=function(){this.pathObject.updateSelected(!0)},t.BlockSvg.prototype.removeSelect=function(){this.pathObject.updateSelected(!1)},t.BlockSvg.prototype.setDeleteStyle=function(t){this.pathObject.updateDraggingDelete(t)},t.BlockSvg.prototype.getColour=function(){return this.style.colourPrimary},t.BlockSvg.prototype.setColour=function(e){t.BlockSvg.superClass_.setColour.call(this,e),e=this.workspace.getRenderer().getConstants().getBlockStyleForColour(this.colour_),this.pathObject.setStyle(e.style),this.style=e.style,this.styleName_=e.name,this.applyColour()},t.BlockSvg.prototype.setStyle=function(t){var e=this.workspace.getRenderer().getConstants().getBlockStyle(t);if(this.styleName_=t,!e)throw Error("Invalid style name: "+t);this.hat=e.hat,this.pathObject.setStyle(e),this.colour_=e.colourPrimary,this.style=e,this.applyColour()},t.BlockSvg.prototype.bringToFront=function(){var t=this;do{var e=t.getSvgRoot(),i=e.parentNode,n=i.childNodes;n[n.length-1]!==e&&i.appendChild(e),t=t.getParent()}while(t)},t.BlockSvg.prototype.setPreviousStatement=function(e,i){t.BlockSvg.superClass_.setPreviousStatement.call(this,e,i),this.rendered&&(this.render(),this.bumpNeighbours())},t.BlockSvg.prototype.setNextStatement=function(e,i){t.BlockSvg.superClass_.setNextStatement.call(this,e,i),this.rendered&&(this.render(),this.bumpNeighbours())},t.BlockSvg.prototype.setOutput=function(e,i){t.BlockSvg.superClass_.setOutput.call(this,e,i),this.rendered&&(this.render(),this.bumpNeighbours())},t.BlockSvg.prototype.setInputsInline=function(e){t.BlockSvg.superClass_.setInputsInline.call(this,e),this.rendered&&(this.render(),this.bumpNeighbours())},t.BlockSvg.prototype.removeInput=function(e,i){return e=t.BlockSvg.superClass_.removeInput.call(this,e,i),this.rendered&&(this.render(),this.bumpNeighbours()),e},t.BlockSvg.prototype.moveNumberedInputBefore=function(e,i){t.BlockSvg.superClass_.moveNumberedInputBefore.call(this,e,i),this.rendered&&(this.render(),this.bumpNeighbours())},t.BlockSvg.prototype.appendInput_=function(e,i){return e=t.BlockSvg.superClass_.appendInput_.call(this,e,i),this.rendered&&(this.render(),this.bumpNeighbours()),e},t.BlockSvg.prototype.setConnectionTracking=function(t){if(this.previousConnection&&this.previousConnection.setTracking(t),this.outputConnection&&this.outputConnection.setTracking(t),this.nextConnection){this.nextConnection.setTracking(t);var e=this.nextConnection.targetBlock();e&&e.setConnectionTracking(t)}if(!this.collapsed_)for(e=0;e<this.inputList.length;e++){var i=this.inputList[e].connection;i&&(i.setTracking(t),(i=i.targetBlock())&&i.setConnectionTracking(t))}},t.BlockSvg.prototype.getConnections_=function(t){var e=[];if((t||this.rendered)&&(this.outputConnection&&e.push(this.outputConnection),this.previousConnection&&e.push(this.previousConnection),this.nextConnection&&e.push(this.nextConnection),t||!this.collapsed_)){t=0;for(var i;i=this.inputList[t];t++)i.connection&&e.push(i.connection)}return e},t.BlockSvg.prototype.lastConnectionInStack=function(e){return t.BlockSvg.superClass_.lastConnectionInStack.call(this,e)},t.BlockSvg.prototype.getMatchingConnection=function(e,i){return t.BlockSvg.superClass_.getMatchingConnection.call(this,e,i)},t.BlockSvg.prototype.makeConnection_=function(e){return new t.RenderedConnection(this,e)},t.BlockSvg.prototype.bumpNeighbours=function(){if(this.workspace&&!this.workspace.isDragging()){var e=this.getRootBlock();if(!e.isInFlyout)for(var i,n=this.getConnections_(!1),o=0;i=n[o];o++){i.isConnected()&&i.isSuperior()&&i.targetBlock().bumpNeighbours();for(var r,s=i.neighbours(t.SNAP_RADIUS),a=0;r=s[a];a++)i.isConnected()&&r.isConnected()||r.getSourceBlock().getRootBlock()!=e&&(i.isSuperior()?r.bumpAwayFrom(i):i.bumpAwayFrom(r))}}},t.BlockSvg.prototype.scheduleSnapAndBump=function(){var e=this,i=t.Events.getGroup();setTimeout(function(){t.Events.setGroup(i),e.snapToGrid(),t.Events.setGroup(!1)},t.BUMP_DELAY/2),setTimeout(function(){t.Events.setGroup(i),e.bumpNeighbours(),t.Events.setGroup(!1)},t.BUMP_DELAY)},t.BlockSvg.prototype.positionNearConnection=function(e,i){e.type!=t.connectionTypes.NEXT_STATEMENT&&e.type!=t.connectionTypes.INPUT_VALUE||this.moveBy(i.x-e.x,i.y-e.y)},t.BlockSvg.prototype.getParent=function(){return t.BlockSvg.superClass_.getParent.call(this)},t.BlockSvg.prototype.getRootBlock=function(){return t.BlockSvg.superClass_.getRootBlock.call(this)},t.BlockSvg.prototype.render=function(e){if(!this.renderIsInProgress_){this.renderIsInProgress_=!0;try{if(this.rendered=!0,t.utils.dom.startTextWidthCache(),this.isCollapsed()&&this.updateCollapsed_(),this.workspace.getRenderer().render(this),this.updateConnectionLocations_(),!1!==e){var i=this.getParent();i?i.render(!0):this.workspace.resizeContents()}t.utils.dom.stopTextWidthCache(),this.updateMarkers_()}finally{this.renderIsInProgress_=!1}}},t.BlockSvg.prototype.updateMarkers_=function(){this.workspace.keyboardAccessibilityMode&&this.pathObject.cursorSvg&&this.workspace.getCursor().draw(),this.workspace.keyboardAccessibilityMode&&this.pathObject.markerSvg&&this.workspace.getMarker(t.MarkerManager.LOCAL_MARKER).draw()},t.BlockSvg.prototype.updateConnectionLocations_=function(){var t=this.getRelativeToSurfaceXY();this.previousConnection&&this.previousConnection.moveToOffset(t),this.outputConnection&&this.outputConnection.moveToOffset(t);for(var e=0;e<this.inputList.length;e++){var i=this.inputList[e].connection;i&&(i.moveToOffset(t),i.isConnected()&&i.tighten())}this.nextConnection&&(this.nextConnection.moveToOffset(t),this.nextConnection.isConnected()&&this.nextConnection.tighten())},t.BlockSvg.prototype.setCursorSvg=function(t){this.pathObject.setCursorSvg(t)},t.BlockSvg.prototype.setMarkerSvg=function(t){this.pathObject.setMarkerSvg(t)},t.BlockSvg.prototype.getHeightWidth=function(){var t=this.height,e=this.width,i=this.getNextBlock();if(i){i=i.getHeightWidth();var n=this.workspace.getRenderer().getConstants().NOTCH_HEIGHT;t+=i.height-n,e=Math.max(e,i.width)}return{height:t,width:e}},t.BlockSvg.prototype.fadeForReplacement=function(t){this.pathObject.updateReplacementFade(t)},t.BlockSvg.prototype.highlightShapeForInput=function(t,e){this.pathObject.updateShapeForInputHighlight(t,e)},t.ConnectionDB=function(t){this.connections_=[],this.connectionChecker_=t},t.ConnectionDB.prototype.addConnection=function(t,e){e=this.calculateIndexForYPos_(e),this.connections_.splice(e,0,t)},t.ConnectionDB.prototype.findIndexOfConnection_=function(t,e){if(!this.connections_.length)return-1;var i=this.calculateIndexForYPos_(e);if(i>=this.connections_.length)return-1;e=t.y;for(var n=i;0<=n&&this.connections_[n].y==e;){if(this.connections_[n]==t)return n;n--}for(n=i;n<this.connections_.length&&this.connections_[n].y==e;){if(this.connections_[n]==t)return n;n++}return-1},t.ConnectionDB.prototype.calculateIndexForYPos_=function(t){if(!this.connections_.length)return 0;for(var e=0,i=this.connections_.length;e<i;){var n=Math.floor((e+i)/2);if(this.connections_[n].y<t)e=n+1;else{if(!(this.connections_[n].y>t)){e=n;break}i=n}}return e},t.ConnectionDB.prototype.removeConnection=function(t,e){if(-1==(t=this.findIndexOfConnection_(t,e)))throw Error("Unable to find connection in connectionDB.");this.connections_.splice(t,1)},t.ConnectionDB.prototype.getNeighbours=function(t,e){function i(t){var i=o-n[t].x,s=r-n[t].y;return Math.sqrt(i*i+s*s)<=e&&l.push(n[t]),s<e}var n=this.connections_,o=t.x,r=t.y;t=0;for(var s=n.length-2,a=s;t<a;)n[a].y<r?t=a:s=a,a=Math.floor((t+s)/2);var l=[];if(s=t=a,n.length){for(;0<=t&&i(t);)t--;do{s++}while(s<n.length&&i(s))}return l},t.ConnectionDB.prototype.isInYRange_=function(t,e,i){return Math.abs(this.connections_[t].y-e)<=i},t.ConnectionDB.prototype.searchForClosest=function(t,e,i){if(!this.connections_.length)return{connection:null,radius:e};var n=t.y,o=t.x;t.x=o+i.x,t.y=n+i.y;var r=this.calculateIndexForYPos_(t.y);i=null;for(var s,a=e,l=r-1;0<=l&&this.isInYRange_(l,t.y,e);)s=this.connections_[l],this.connectionChecker_.canConnect(t,s,!0,a)&&(i=s,a=s.distanceFrom(t)),l--;for(;r<this.connections_.length&&this.isInYRange_(r,t.y,e);)s=this.connections_[r],this.connectionChecker_.canConnect(t,s,!0,a)&&(i=s,a=s.distanceFrom(t)),r++;return t.x=o,t.y=n,{connection:i,radius:a}},t.ConnectionDB.init=function(e){var i=[];return i[t.connectionTypes.INPUT_VALUE]=new t.ConnectionDB(e),i[t.connectionTypes.OUTPUT_VALUE]=new t.ConnectionDB(e),i[t.connectionTypes.NEXT_STATEMENT]=new t.ConnectionDB(e),i[t.connectionTypes.PREVIOUS_STATEMENT]=new t.ConnectionDB(e),i},t.Events.ThemeChange=function(e,i){t.Events.ThemeChange.superClass_.constructor.call(this,i),this.themeName=e},t.utils.object.inherits(t.Events.ThemeChange,t.Events.UiBase),t.Events.ThemeChange.prototype.type=t.Events.THEME_CHANGE,t.Events.ThemeChange.prototype.toJson=function(){var e=t.Events.ThemeChange.superClass_.toJson.call(this);return e.themeName=this.themeName,e},t.Events.ThemeChange.prototype.fromJson=function(e){t.Events.ThemeChange.superClass_.fromJson.call(this,e),this.themeName=e.themeName},t.registry.register(t.registry.Type.EVENT,t.Events.THEME_CHANGE,t.Events.ThemeChange),t.Events.ViewportChange=function(e,i,n,o,r){t.Events.ViewportChange.superClass_.constructor.call(this,o),this.viewTop=e,this.viewLeft=i,this.scale=n,this.oldScale=r},t.utils.object.inherits(t.Events.ViewportChange,t.Events.UiBase),t.Events.ViewportChange.prototype.type=t.Events.VIEWPORT_CHANGE,t.Events.ViewportChange.prototype.toJson=function(){var e=t.Events.ViewportChange.superClass_.toJson.call(this);return e.viewTop=this.viewTop,e.viewLeft=this.viewLeft,e.scale=this.scale,e.oldScale=this.oldScale,e},t.Events.ViewportChange.prototype.fromJson=function(e){t.Events.ViewportChange.superClass_.fromJson.call(this,e),this.viewTop=e.viewTop,this.viewLeft=e.viewLeft,this.scale=e.scale,this.oldScale=e.oldScale},t.registry.register(t.registry.Type.EVENT,t.Events.VIEWPORT_CHANGE,t.Events.ViewportChange),t.IMetricsManager=function(){},t.MetricsManager=function(t){this.workspace_=t},t.MetricsManager.prototype.getDimensionsPx_=function(e){var i=0,n=0;return e&&(i=e.getWidth(),n=e.getHeight()),new t.utils.Size(i,n)},t.MetricsManager.prototype.getFlyoutMetrics=function(t){return{width:(t=this.getDimensionsPx_(this.workspace_.getFlyout(t))).width,height:t.height,position:this.workspace_.toolboxPosition}},t.MetricsManager.prototype.getToolboxMetrics=function(){var t=this.getDimensionsPx_(this.workspace_.getToolbox());return{width:t.width,height:t.height,position:this.workspace_.toolboxPosition}},t.MetricsManager.prototype.getSvgMetrics=function(){return this.workspace_.getCachedParentSvgSize()},t.MetricsManager.prototype.getAbsoluteMetrics=function(){var e=0,i=this.getToolboxMetrics(),n=this.getFlyoutMetrics(!0),o=!!this.workspace_.getToolbox(),r=!!this.workspace_.getFlyout(!0),s=o?i.position:n.position,a=s==t.utils.toolbox.Position.LEFT;return s=s==t.utils.toolbox.Position.TOP,o&&a?e=i.width:r&&a&&(e=n.width),a=0,o&&s?a=i.height:r&&s&&(a=n.height),{top:a,left:e}},t.MetricsManager.prototype.getViewMetrics=function(e){e=e?this.workspace_.scale:1;var i=this.getSvgMetrics(),n=this.getToolboxMetrics(),o=this.getFlyoutMetrics(!0),r=this.workspace_.getToolbox()?n.position:o.position;return this.workspace_.getToolbox()?r==t.utils.toolbox.Position.TOP||r==t.utils.toolbox.Position.BOTTOM?i.height-=n.height:r!=t.utils.toolbox.Position.LEFT&&r!=t.utils.toolbox.Position.RIGHT||(i.width-=n.width):this.workspace_.getFlyout(!0)&&(r==t.utils.toolbox.Position.TOP||r==t.utils.toolbox.Position.BOTTOM?i.height-=o.height:r!=t.utils.toolbox.Position.LEFT&&r!=t.utils.toolbox.Position.RIGHT||(i.width-=o.width)),{height:i.height/e,width:i.width/e,top:-this.workspace_.scrollY/e,left:-this.workspace_.scrollX/e}},t.MetricsManager.prototype.getContentMetrics=function(t){t=t?1:this.workspace_.scale;var e=this.workspace_.getBlocksBoundingBox();return{height:(e.bottom-e.top)*t,width:(e.right-e.left)*t,top:e.top*t,left:e.left*t}},t.MetricsManager.prototype.hasFixedEdges=function(){return!this.workspace_.isMovableHorizontally()||!this.workspace_.isMovableVertically()},t.MetricsManager.prototype.getComputedFixedEdges_=function(t){if(!this.hasFixedEdges())return{};var e=this.workspace_.isMovableHorizontally(),i=this.workspace_.isMovableVertically();t=t||this.getViewMetrics(!1);var n={};return i||(n.top=t.top,n.bottom=t.top+t.height),e||(n.left=t.left,n.right=t.left+t.width),n},t.MetricsManager.prototype.getPaddedContent_=function(t,e){var i=e.top+e.height,n=e.left+e.width,o=t.width,r=o/2,s=(t=t.height)/2;return{top:Math.min(e.top-s,i-t),bottom:Math.max(i+s,e.top+t),left:Math.min(e.left-r,n-o),right:Math.max(n+r,e.left+o)}},t.MetricsManager.prototype.getScrollMetrics=function(t,e,i){t=t?this.workspace_.scale:1,e=e||this.getViewMetrics(!1);var n=i||this.getContentMetrics();i=this.getComputedFixedEdges_(e),e=this.getPaddedContent_(e,n),n=void 0!==i.top?i.top:e.top;var o=void 0!==i.left?i.left:e.left;return{top:n/t,left:o/t,width:((void 0!==i.right?i.right:e.right)-o)/t,height:((void 0!==i.bottom?i.bottom:e.bottom)-n)/t}},t.MetricsManager.prototype.getUiMetrics=function(){return{viewMetrics:this.getViewMetrics(),absoluteMetrics:this.getAbsoluteMetrics(),toolboxMetrics:this.getToolboxMetrics()}},t.MetricsManager.prototype.getMetrics=function(){var t=this.getToolboxMetrics(),e=this.getFlyoutMetrics(!0),i=this.getSvgMetrics(),n=this.getAbsoluteMetrics(),o=this.getViewMetrics(),r=this.getContentMetrics(),s=this.getScrollMetrics(!1,o,r);return{contentHeight:r.height,contentWidth:r.width,contentTop:r.top,contentLeft:r.left,scrollHeight:s.height,scrollWidth:s.width,scrollTop:s.top,scrollLeft:s.left,viewHeight:o.height,viewWidth:o.width,viewTop:o.top,viewLeft:o.left,absoluteTop:n.top,absoluteLeft:n.left,svgHeight:i.height,svgWidth:i.width,toolboxWidth:t.width,toolboxHeight:t.height,toolboxPosition:t.position,flyoutWidth:e.width,flyoutHeight:e.height}},t.registry.register(t.registry.Type.METRICS_MANAGER,t.registry.DEFAULT,t.MetricsManager),t.FlyoutMetricsManager=function(e,i){this.flyout_=i,t.FlyoutMetricsManager.superClass_.constructor.call(this,e)},t.utils.object.inherits(t.FlyoutMetricsManager,t.MetricsManager),t.FlyoutMetricsManager.prototype.getBoundingBox_=function(){try{var t=this.workspace_.getCanvas().getBBox()}catch(e){t={height:0,y:0,width:0,x:0}}return t},t.FlyoutMetricsManager.prototype.getContentMetrics=function(t){var e=this.getBoundingBox_();return t=t?1:this.workspace_.scale,{height:e.height*t,width:e.width*t,top:e.y*t,left:e.x*t}},t.FlyoutMetricsManager.prototype.getScrollMetrics=function(t,e,i){return e=i||this.getContentMetrics(),i=this.flyout_.MARGIN*this.workspace_.scale,t=t?this.workspace_.scale:1,{height:(e.height+2*i)/t,width:(e.width+e.left+i)/t,top:0,left:0}},t.ThemeManager=function(t,e){this.workspace_=t,this.theme_=e,this.subscribedWorkspaces_=[],this.componentDB_=Object.create(null)},t.ThemeManager.prototype.getTheme=function(){return this.theme_},t.ThemeManager.prototype.setTheme=function(e){var i,n=this.theme_;for(this.theme_=e,(e=this.workspace_.getInjectionDiv())&&(n&&t.utils.dom.removeClass(e,n.getClassName()),t.utils.dom.addClass(e,this.theme_.getClassName())),n=0;e=this.subscribedWorkspaces_[n];n++)e.refreshTheme();for(n=0,e=Object.keys(this.componentDB_);i=e[n];n++)for(var o,r=0;o=this.componentDB_[i][r];r++){var s=o.element;o=o.propertyName;var a=this.theme_&&this.theme_.getComponentStyle(i);s.style[o]=a||""}t.hideChaff()},t.ThemeManager.prototype.subscribeWorkspace=function(t){this.subscribedWorkspaces_.push(t)},t.ThemeManager.prototype.unsubscribeWorkspace=function(t){if(0>(t=this.subscribedWorkspaces_.indexOf(t)))throw Error("Cannot unsubscribe a workspace that hasn't been subscribed.");this.subscribedWorkspaces_.splice(t,1)},t.ThemeManager.prototype.subscribe=function(t,e,i){this.componentDB_[e]||(this.componentDB_[e]=[]),this.componentDB_[e].push({element:t,propertyName:i}),e=this.theme_&&this.theme_.getComponentStyle(e),t.style[i]=e||""},t.ThemeManager.prototype.unsubscribe=function(t){if(t)for(var e,i=Object.keys(this.componentDB_),n=0;e=i[n];n++){for(var o=this.componentDB_[e],r=o.length-1;0<=r;r--)o[r].element===t&&o.splice(r,1);this.componentDB_[e].length||delete this.componentDB_[e]}},t.ThemeManager.prototype.dispose=function(){this.componentDB_=this.subscribedWorkspaces_=this.theme_=this.owner_=null},t.TouchGesture=function(e,i){t.TouchGesture.superClass_.constructor.call(this,e,i),this.isMultiTouch_=!1,this.cachedPoints_=Object.create(null),this.startDistance_=this.previousScale_=0,this.isPinchZoomEnabled_=this.onStartWrapper_=null},t.utils.object.inherits(t.TouchGesture,t.Gesture),t.TouchGesture.ZOOM_IN_MULTIPLIER=5,t.TouchGesture.ZOOM_OUT_MULTIPLIER=6,t.TouchGesture.prototype.doStart=function(e){this.isPinchZoomEnabled_=this.startWorkspace_.options.zoomOptions&&this.startWorkspace_.options.zoomOptions.pinch,t.TouchGesture.superClass_.doStart.call(this,e),!this.isEnding_&&t.Touch.isTouchEvent(e)&&this.handleTouchStart(e)},t.TouchGesture.prototype.bindMouseEvents=function(e){this.onStartWrapper_=t.browserEvents.conditionalBind(document,"mousedown",null,this.handleStart.bind(this),!0),this.onMoveWrapper_=t.browserEvents.conditionalBind(document,"mousemove",null,this.handleMove.bind(this),!0),this.onUpWrapper_=t.browserEvents.conditionalBind(document,"mouseup",null,this.handleUp.bind(this),!0),e.preventDefault(),e.stopPropagation()},t.TouchGesture.prototype.handleStart=function(e){!this.isDragging()&&t.Touch.isTouchEvent(e)&&(this.handleTouchStart(e),this.isMultiTouch()&&t.longStop_())},t.TouchGesture.prototype.handleMove=function(e){this.isDragging()?t.Touch.shouldHandleEvent(e)&&t.TouchGesture.superClass_.handleMove.call(this,e):this.isMultiTouch()?(t.Touch.isTouchEvent(e)&&this.handleTouchMove(e),t.longStop_()):t.TouchGesture.superClass_.handleMove.call(this,e)},t.TouchGesture.prototype.handleUp=function(e){t.Touch.isTouchEvent(e)&&!this.isDragging()&&this.handleTouchEnd(e),!this.isMultiTouch()||this.isDragging()?t.Touch.shouldHandleEvent(e)&&t.TouchGesture.superClass_.handleUp.call(this,e):(e.preventDefault(),e.stopPropagation(),this.dispose())},t.TouchGesture.prototype.isMultiTouch=function(){return this.isMultiTouch_},t.TouchGesture.prototype.dispose=function(){t.TouchGesture.superClass_.dispose.call(this),this.onStartWrapper_&&t.browserEvents.unbind(this.onStartWrapper_)},t.TouchGesture.prototype.handleTouchStart=function(e){var i=t.Touch.getTouchIdentifierFromEvent(e);this.cachedPoints_[i]=this.getTouchPoint(e),2==(i=Object.keys(this.cachedPoints_)).length&&(this.startDistance_=t.utils.Coordinate.distance(this.cachedPoints_[i[0]],this.cachedPoints_[i[1]]),this.isMultiTouch_=!0,e.preventDefault())},t.TouchGesture.prototype.handleTouchMove=function(e){var i=t.Touch.getTouchIdentifierFromEvent(e);this.cachedPoints_[i]=this.getTouchPoint(e),i=Object.keys(this.cachedPoints_),this.isPinchZoomEnabled_&&2===i.length?this.handlePinch_(e):t.TouchGesture.superClass_.handleMove.call(this,e)},t.TouchGesture.prototype.handlePinch_=function(e){var i=Object.keys(this.cachedPoints_);if(i=t.utils.Coordinate.distance(this.cachedPoints_[i[0]],this.cachedPoints_[i[1]])/this.startDistance_,0<this.previousScale_&&1/0>this.previousScale_){var n=i-this.previousScale_;n=0<n?n*t.TouchGesture.ZOOM_IN_MULTIPLIER:n*t.TouchGesture.ZOOM_OUT_MULTIPLIER;var o=this.startWorkspace_,r=t.utils.mouseToSvg(e,o.getParentSvg(),o.getInverseScreenCTM());o.zoom(r.x,r.y,n)}this.previousScale_=i,e.preventDefault()},t.TouchGesture.prototype.handleTouchEnd=function(e){e=t.Touch.getTouchIdentifierFromEvent(e),this.cachedPoints_[e]&&delete this.cachedPoints_[e],2>Object.keys(this.cachedPoints_).length&&(this.cachedPoints_=Object.create(null),this.previousScale_=0)},t.TouchGesture.prototype.getTouchPoint=function(e){return this.startWorkspace_?new t.utils.Coordinate(e.pageX?e.pageX:e.changedTouches[0].pageX,e.pageY?e.pageY:e.changedTouches[0].pageY):null},t.WorkspaceAudio=function(t){this.parentWorkspace_=t,this.SOUNDS_=Object.create(null)},t.WorkspaceAudio.prototype.lastSound_=null,t.WorkspaceAudio.prototype.dispose=function(){this.SOUNDS_=this.parentWorkspace_=null},t.WorkspaceAudio.prototype.load=function(e,i){if(e.length){try{var n=new t.utils.global.Audio}catch(t){return}for(var o,r=0;r<e.length;r++){var s=e[r],a=s.match(/\.(\w+)$/);if(a&&n.canPlayType("audio/"+a[1])){o=new t.utils.global.Audio(s);break}}o&&o.play&&(this.SOUNDS_[i]=o)}},t.WorkspaceAudio.prototype.preload=function(){for(var e in this.SOUNDS_){var i=this.SOUNDS_[e];i.volume=.01;var n=i.play();if(void 0!==n?n.then(i.pause).catch(function(){}):i.pause(),t.utils.userAgent.IPAD||t.utils.userAgent.IPHONE)break}},t.WorkspaceAudio.prototype.play=function(e,i){var n=this.SOUNDS_[e];n?(e=new Date,null!=this.lastSound_&&e-this.lastSound_<t.SOUND_LIMIT||(this.lastSound_=e,(n=t.utils.userAgent.IPAD||t.utils.userAgent.ANDROID?n:n.cloneNode()).volume=void 0===i?1:i,n.play())):this.parentWorkspace_&&this.parentWorkspace_.getAudioManager().play(e,i)},t.WorkspaceSvg=function(e,i,n){t.WorkspaceSvg.superClass_.constructor.call(this,e),this.metricsManager_=new(t.registry.getClassFromOptions(t.registry.Type.METRICS_MANAGER,e,!0))(this),this.getMetrics=e.getMetrics||this.metricsManager_.getMetrics.bind(this.metricsManager_),this.setMetrics=e.setMetrics||t.WorkspaceSvg.setTopLevelWorkspaceMetrics_,this.componentManager_=new t.ComponentManager,this.connectionDBList=t.ConnectionDB.init(this.connectionChecker),i&&(this.blockDragSurface_=i),n&&(this.workspaceDragSurface_=n),this.useWorkspaceDragSurface_=!!this.workspaceDragSurface_&&t.utils.is3dSupported(),this.highlightedBlocks_=[],this.audioManager_=new t.WorkspaceAudio(e.parentWorkspace),this.grid_=this.options.gridPattern?new t.Grid(this.options.gridPattern,e.gridOptions):null,this.markerManager_=new t.MarkerManager(this),this.toolboxCategoryCallbacks_=Object.create(null),this.flyoutButtonCallbacks_=Object.create(null),t.Variables&&t.Variables.flyoutCategory&&this.registerToolboxCategoryCallback(t.VARIABLE_CATEGORY_NAME,t.Variables.flyoutCategory),t.VariablesDynamic&&t.VariablesDynamic.flyoutCategory&&this.registerToolboxCategoryCallback(t.VARIABLE_DYNAMIC_CATEGORY_NAME,t.VariablesDynamic.flyoutCategory),t.Procedures&&t.Procedures.flyoutCategory&&(this.registerToolboxCategoryCallback(t.PROCEDURE_CATEGORY_NAME,t.Procedures.flyoutCategory),this.addChangeListener(t.Procedures.mutatorOpenListener)),this.themeManager_=this.options.parentWorkspace?this.options.parentWorkspace.getThemeManager():new t.ThemeManager(this,this.options.theme||t.Themes.Classic),this.themeManager_.subscribeWorkspace(this),this.renderer_=t.blockRendering.init(this.options.renderer||"geras",this.getTheme(),this.options.rendererOverrides),this.cachedParentSvg_=null,this.keyboardAccessibilityMode=!1,this.topBoundedElements_=[],this.dragTargetAreas_=[],this.cachedParentSvgSize_=new t.utils.Size(0,0)},t.utils.object.inherits(t.WorkspaceSvg,t.Workspace),t.WorkspaceSvg.prototype.resizeHandlerWrapper_=null,t.WorkspaceSvg.prototype.rendered=!0,t.WorkspaceSvg.prototype.isVisible_=!0,t.WorkspaceSvg.prototype.isFlyout=!1,t.WorkspaceSvg.prototype.isMutator=!1,t.WorkspaceSvg.prototype.resizesEnabled_=!0,t.WorkspaceSvg.prototype.scrollX=0,t.WorkspaceSvg.prototype.scrollY=0,t.WorkspaceSvg.prototype.startScrollX=0,t.WorkspaceSvg.prototype.startScrollY=0,t.WorkspaceSvg.prototype.dragDeltaXY_=null,t.WorkspaceSvg.prototype.scale=1,t.WorkspaceSvg.prototype.oldScale_=1,t.WorkspaceSvg.prototype.oldTop_=0,t.WorkspaceSvg.prototype.oldLeft_=0,t.WorkspaceSvg.prototype.trashcan=null,t.WorkspaceSvg.prototype.scrollbar=null,t.WorkspaceSvg.prototype.flyout_=null,t.WorkspaceSvg.prototype.toolbox_=null,t.WorkspaceSvg.prototype.currentGesture_=null,t.WorkspaceSvg.prototype.blockDragSurface_=null,t.WorkspaceSvg.prototype.workspaceDragSurface_=null,t.WorkspaceSvg.prototype.useWorkspaceDragSurface_=!1,t.WorkspaceSvg.prototype.isDragSurfaceActive_=!1,t.WorkspaceSvg.prototype.injectionDiv_=null,t.WorkspaceSvg.prototype.lastRecordedPageScroll_=null,t.WorkspaceSvg.prototype.targetWorkspace=null,t.WorkspaceSvg.prototype.inverseScreenCTM_=null,t.WorkspaceSvg.prototype.inverseScreenCTMDirty_=!0,t.WorkspaceSvg.prototype.getMarkerManager=function(){return this.markerManager_},t.WorkspaceSvg.prototype.getMetricsManager=function(){return this.metricsManager_},t.WorkspaceSvg.prototype.setMetricsManager=function(t){this.metricsManager_=t,this.getMetrics=this.metricsManager_.getMetrics.bind(this.metricsManager_)},t.WorkspaceSvg.prototype.getComponentManager=function(){return this.componentManager_},t.WorkspaceSvg.prototype.setCursorSvg=function(t){this.markerManager_.setCursorSvg(t)},t.WorkspaceSvg.prototype.setMarkerSvg=function(t){this.markerManager_.setMarkerSvg(t)},t.WorkspaceSvg.prototype.getMarker=function(t){return this.markerManager_?this.markerManager_.getMarker(t):null},t.WorkspaceSvg.prototype.getCursor=function(){return this.markerManager_?this.markerManager_.getCursor():null},t.WorkspaceSvg.prototype.getRenderer=function(){return this.renderer_},t.WorkspaceSvg.prototype.getThemeManager=function(){return this.themeManager_},t.WorkspaceSvg.prototype.getTheme=function(){return this.themeManager_.getTheme()},t.WorkspaceSvg.prototype.setTheme=function(e){e||(e=t.Themes.Classic),this.themeManager_.setTheme(e)},t.WorkspaceSvg.prototype.refreshTheme=function(){this.svgGroup_&&this.renderer_.refreshDom(this.svgGroup_,this.getTheme()),this.updateBlockStyles_(this.getAllBlocks(!1).filter(function(t){return!!t.getStyleName()})),this.refreshToolboxSelection(),this.toolbox_&&this.toolbox_.refreshTheme(),this.isVisible()&&this.setVisible(!0);var e=new(t.Events.get(t.Events.THEME_CHANGE))(this.getTheme().name,this.id);t.Events.fire(e)},t.WorkspaceSvg.prototype.updateBlockStyles_=function(t){for(var e,i=0;e=t[i];i++){var n=e.getStyleName();n&&(e.setStyle(n),e.mutator&&e.mutator.updateBlockStyle())}},t.WorkspaceSvg.prototype.getInverseScreenCTM=function(){if(this.inverseScreenCTMDirty_){var t=this.getParentSvg().getScreenCTM();t&&(this.inverseScreenCTM_=t.inverse(),this.inverseScreenCTMDirty_=!1)}return this.inverseScreenCTM_},t.WorkspaceSvg.prototype.updateInverseScreenCTM=function(){this.inverseScreenCTMDirty_=!0},t.WorkspaceSvg.prototype.isVisible=function(){return this.isVisible_},t.WorkspaceSvg.prototype.getSvgXY=function(e){var i=0,n=0,o=1;(t.utils.dom.containsNode(this.getCanvas(),e)||t.utils.dom.containsNode(this.getBubbleCanvas(),e))&&(o=this.scale);do{var r=t.utils.getRelativeXY(e);e!=this.getCanvas()&&e!=this.getBubbleCanvas()||(o=1),i+=r.x*o,n+=r.y*o,e=e.parentNode}while(e&&e!=this.getParentSvg());return new t.utils.Coordinate(i,n)},t.WorkspaceSvg.prototype.getCachedParentSvgSize=function(){var e=this.cachedParentSvgSize_;return new t.utils.Size(e.width,e.height)},t.WorkspaceSvg.prototype.getOriginOffsetInPixels=function(){return t.utils.getInjectionDivXY_(this.getCanvas())},t.WorkspaceSvg.prototype.getInjectionDiv=function(){if(!this.injectionDiv_)for(var t=this.svgGroup_;t;){if(-1!=(" "+(t.getAttribute("class")||"")+" ").indexOf(" injectionDiv ")){this.injectionDiv_=t;break}t=t.parentNode}return this.injectionDiv_},t.WorkspaceSvg.prototype.getBlockCanvas=function(){return this.svgBlockCanvas_},t.WorkspaceSvg.prototype.setResizeHandlerWrapper=function(t){this.resizeHandlerWrapper_=t},t.WorkspaceSvg.prototype.createDom=function(e){return this.svgGroup_=t.utils.dom.createSvgElement(t.utils.Svg.G,{class:"blocklyWorkspace"},null),e&&(this.svgBackground_=t.utils.dom.createSvgElement(t.utils.Svg.RECT,{height:"100%",width:"100%",class:e},this.svgGroup_),"blocklyMainBackground"==e&&this.grid_?this.svgBackground_.style.fill="url(#"+this.grid_.getPatternId()+")":this.themeManager_.subscribe(this.svgBackground_,"workspaceBackgroundColour","fill")),this.svgBlockCanvas_=t.utils.dom.createSvgElement(t.utils.Svg.G,{class:"blocklyBlockCanvas"},this.svgGroup_),this.svgBubbleCanvas_=t.utils.dom.createSvgElement(t.utils.Svg.G,{class:"blocklyBubbleCanvas"},this.svgGroup_),this.isFlyout||(t.browserEvents.conditionalBind(this.svgGroup_,"mousedown",this,this.onMouseDown_,!1,!0),t.browserEvents.conditionalBind(this.svgGroup_,"wheel",this,this.onMouseWheel_)),this.options.hasCategories&&(this.toolbox_=new(t.registry.getClassFromOptions(t.registry.Type.TOOLBOX,this.options,!0))(this)),this.grid_&&this.grid_.update(this.scale),this.recordDragTargets(),(e=t.registry.getClassFromOptions(t.registry.Type.CURSOR,this.options))&&this.markerManager_.setCursor(new e),this.renderer_.createDom(this.svgGroup_,this.getTheme()),this.svgGroup_},t.WorkspaceSvg.prototype.dispose=function(){if(this.rendered=!1,this.currentGesture_&&this.currentGesture_.cancel(),this.svgGroup_&&(t.utils.dom.removeNode(this.svgGroup_),this.svgGroup_=null),this.svgBubbleCanvas_=this.svgBlockCanvas_=null,this.toolbox_&&(this.toolbox_.dispose(),this.toolbox_=null),this.flyout_&&(this.flyout_.dispose(),this.flyout_=null),this.trashcan&&(this.trashcan.dispose(),this.trashcan=null),this.scrollbar&&(this.scrollbar.dispose(),this.scrollbar=null),this.zoomControls_&&(this.zoomControls_.dispose(),this.zoomControls_=null),this.audioManager_&&(this.audioManager_.dispose(),this.audioManager_=null),this.grid_&&(this.grid_.dispose(),this.grid_=null),this.renderer_.dispose(),this.markerManager_&&(this.markerManager_.dispose(),this.markerManager_=null),t.WorkspaceSvg.superClass_.dispose.call(this),this.themeManager_&&(this.themeManager_.unsubscribeWorkspace(this),this.themeManager_.unsubscribe(this.svgBackground_),this.options.parentWorkspace||(this.themeManager_.dispose(),this.themeManager_=null)),this.flyoutButtonCallbacks_=this.toolboxCategoryCallbacks_=this.connectionDBList=null,!this.options.parentWorkspace){var e=this.getParentSvg();e&&e.parentNode&&t.utils.dom.removeNode(e.parentNode)}this.resizeHandlerWrapper_&&(t.browserEvents.unbind(this.resizeHandlerWrapper_),this.resizeHandlerWrapper_=null)},t.WorkspaceSvg.prototype.newBlock=function(e,i){return new t.BlockSvg(this,e,i)},t.WorkspaceSvg.prototype.addTrashcan=function(){if(!t.Trashcan)throw Error("Missing require for Blockly.Trashcan");this.trashcan=new t.Trashcan(this);var e=this.trashcan.createDom();this.svgGroup_.insertBefore(e,this.svgBlockCanvas_)},t.WorkspaceSvg.prototype.addZoomControls=function(){if(!t.ZoomControls)throw Error("Missing require for Blockly.ZoomControls");this.zoomControls_=new t.ZoomControls(this);var e=this.zoomControls_.createDom();this.svgGroup_.appendChild(e)},t.WorkspaceSvg.prototype.addFlyout=function(e){var i=new t.Options({parentWorkspace:this,rtl:this.RTL,oneBasedIndex:this.options.oneBasedIndex,horizontalLayout:this.horizontalLayout,renderer:this.options.renderer,rendererOverrides:this.options.rendererOverrides,move:{scrollbars:!0}});return i.toolboxPosition=this.options.toolboxPosition,this.flyout_=this.horizontalLayout?new(t.registry.getClassFromOptions(t.registry.Type.FLYOUTS_HORIZONTAL_TOOLBOX,this.options,!0))(i):new(t.registry.getClassFromOptions(t.registry.Type.FLYOUTS_VERTICAL_TOOLBOX,this.options,!0))(i),this.flyout_.autoClose=!1,this.flyout_.getWorkspace().setVisible(!0),this.flyout_.createDom(e)},t.WorkspaceSvg.prototype.getFlyout=function(t){return this.flyout_||t?this.flyout_:this.toolbox_?this.toolbox_.getFlyout():null},t.WorkspaceSvg.prototype.getToolbox=function(){return this.toolbox_},t.WorkspaceSvg.prototype.updateScreenCalculations_=function(){this.updateInverseScreenCTM(),this.recordDragTargets()},t.WorkspaceSvg.prototype.resizeContents=function(){this.resizesEnabled_&&this.rendered&&(this.scrollbar&&this.scrollbar.resize(),this.updateInverseScreenCTM())},t.WorkspaceSvg.prototype.resize=function(){this.toolbox_&&this.toolbox_.position(),this.flyout_&&this.flyout_.position();for(var e,i=this.componentManager_.getComponents(t.ComponentManager.Capability.POSITIONABLE,!0),n=this.getMetricsManager().getUiMetrics(),o=[],r=0;e=i[r];r++)e.position(n,o),(e=e.getBoundingRectangle())&&o.push(e);this.scrollbar&&this.scrollbar.resize(),this.updateScreenCalculations_()},t.WorkspaceSvg.prototype.updateScreenCalculationsIfScrolled=function(){var e=t.utils.getDocumentScroll();t.utils.Coordinate.equals(this.lastRecordedPageScroll_,e)||(this.lastRecordedPageScroll_=e,this.updateScreenCalculations_())},t.WorkspaceSvg.prototype.getCanvas=function(){return this.svgBlockCanvas_},t.WorkspaceSvg.prototype.setCachedParentSvgSize=function(t,e){var i=this.getParentSvg();t&&(this.cachedParentSvgSize_.width=t,i.cachedWidth_=t),e&&(this.cachedParentSvgSize_.height=e,i.cachedHeight_=e)},t.WorkspaceSvg.prototype.getBubbleCanvas=function(){return this.svgBubbleCanvas_},t.WorkspaceSvg.prototype.getParentSvg=function(){if(!this.cachedParentSvg_)for(var t=this.svgGroup_;t;){if("svg"==t.tagName){this.cachedParentSvg_=t;break}t=t.parentNode}return this.cachedParentSvg_},t.WorkspaceSvg.prototype.maybeFireViewportChangeEvent=function(){if(t.Events.isEnabled()){var e=this.scale,i=-this.scrollY,n=-this.scrollX;if(!(e==this.oldScale_&&1>Math.abs(i-this.oldTop_)&&1>Math.abs(n-this.oldLeft_))){var o=new(t.Events.get(t.Events.VIEWPORT_CHANGE))(i,n,e,this.id,this.oldScale_);this.oldScale_=e,this.oldTop_=i,this.oldLeft_=n,t.Events.fire(o)}}},t.WorkspaceSvg.prototype.translate=function(t,e){if(this.useWorkspaceDragSurface_&&this.isDragSurfaceActive_)this.workspaceDragSurface_.translateSurface(t,e);else{var i="translate("+t+","+e+") scale("+this.scale+")";this.svgBlockCanvas_.setAttribute("transform",i),this.svgBubbleCanvas_.setAttribute("transform",i)}this.blockDragSurface_&&this.blockDragSurface_.translateAndScaleGroup(t,e,this.scale),this.grid_&&this.grid_.moveTo(t,e),this.maybeFireViewportChangeEvent()},t.WorkspaceSvg.prototype.resetDragSurface=function(){if(this.useWorkspaceDragSurface_){this.isDragSurfaceActive_=!1;var t=this.workspaceDragSurface_.getSurfaceTranslation();this.workspaceDragSurface_.clearAndHide(this.svgGroup_),t="translate("+t.x+","+t.y+") scale("+this.scale+")",this.svgBlockCanvas_.setAttribute("transform",t),this.svgBubbleCanvas_.setAttribute("transform",t)}},t.WorkspaceSvg.prototype.setupDragSurface=function(){if(this.useWorkspaceDragSurface_&&!this.isDragSurfaceActive_){this.isDragSurfaceActive_=!0;var e=this.svgBlockCanvas_.previousSibling,i=parseInt(this.getParentSvg().getAttribute("width"),10),n=parseInt(this.getParentSvg().getAttribute("height"),10),o=t.utils.getRelativeXY(this.getCanvas());this.workspaceDragSurface_.setContentsAndShow(this.getCanvas(),this.getBubbleCanvas(),e,i,n,this.scale),this.workspaceDragSurface_.translateSurface(o.x,o.y)}},t.WorkspaceSvg.prototype.getBlockDragSurface=function(){return this.blockDragSurface_},t.WorkspaceSvg.prototype.getWidth=function(){var t=this.getMetrics();return t?t.viewWidth/this.scale:0},t.WorkspaceSvg.prototype.setVisible=function(e){if(this.isVisible_=e,this.svgGroup_)if(this.scrollbar&&this.scrollbar.setContainerVisible(e),this.getFlyout()&&this.getFlyout().setContainerVisible(e),this.getParentSvg().style.display=e?"block":"none",this.toolbox_&&this.toolbox_.setVisible(e),e){for(var i=(e=this.getAllBlocks(!1)).length-1;0<=i;i--)e[i].markDirty();this.render(),this.toolbox_&&this.toolbox_.position()}else t.hideChaff(!0)},t.WorkspaceSvg.prototype.render=function(){for(var t=this.getAllBlocks(!1),e=t.length-1;0<=e;e--)t[e].render(!1);if(this.currentGesture_)for(t=this.currentGesture_.getInsertionMarkers(),e=0;e<t.length;e++)t[e].render(!1);this.markerManager_.updateMarkers()},t.WorkspaceSvg.prototype.highlightBlock=function(e,i){if(void 0===i){for(var n,o=0;n=this.highlightedBlocks_[o];o++)n.setHighlighted(!1);this.highlightedBlocks_.length=0}(n=e?this.getBlockById(e):null)&&((e=void 0===i||i)?-1==this.highlightedBlocks_.indexOf(n)&&this.highlightedBlocks_.push(n):t.utils.arrayRemove(this.highlightedBlocks_,n),n.setHighlighted(e))},t.WorkspaceSvg.prototype.paste=function(t){!this.rendered||!t.tagName||t.getElementsByTagName("block").length>=this.remainingCapacity()||(this.currentGesture_&&this.currentGesture_.cancel(),"comment"==t.tagName.toLowerCase()?this.pasteWorkspaceComment_(t):this.pasteBlock_(t))},t.WorkspaceSvg.prototype.pasteBlock_=function(e){t.Events.disable();try{var i=t.Xml.domToBlock(e,this),n=parseInt(e.getAttribute("x"),10),o=parseInt(e.getAttribute("y"),10);if(!isNaN(n)&&!isNaN(o)){this.RTL&&(n=-n);do{e=!1;for(var r,s=this.getAllBlocks(!1),a=0;r=s[a];a++){var l=r.getRelativeToSurfaceXY();if(1>=Math.abs(n-l.x)&&1>=Math.abs(o-l.y)){e=!0;break}}if(!e){var c,u=i.getConnections_(!1);for(a=0;c=u[a];a++)if(c.closest(t.SNAP_RADIUS,new t.utils.Coordinate(n,o)).connection){e=!0;break}}e&&(n=this.RTL?n-t.SNAP_RADIUS:n+t.SNAP_RADIUS,o+=2*t.SNAP_RADIUS)}while(e);i.moveBy(n,o)}}finally{t.Events.enable()}t.Events.isEnabled()&&!i.isShadow()&&t.Events.fire(new(t.Events.get(t.Events.BLOCK_CREATE))(i)),i.select()},t.WorkspaceSvg.prototype.pasteWorkspaceComment_=function(e){t.Events.disable();try{var i=t.WorkspaceCommentSvg.fromXml(e,this),n=parseInt(e.getAttribute("x"),10),o=parseInt(e.getAttribute("y"),10);isNaN(n)||isNaN(o)||(this.RTL&&(n=-n),i.moveBy(n+50,o+50))}finally{t.Events.enable()}t.Events.isEnabled()&&t.WorkspaceComment.fireCreateEvent(i),i.select()},t.WorkspaceSvg.prototype.refreshToolboxSelection=function(){var t=this.isFlyout?this.targetWorkspace:this;t&&!t.currentGesture_&&t.toolbox_&&t.toolbox_.getFlyout()&&t.toolbox_.refreshSelection()},t.WorkspaceSvg.prototype.renameVariableById=function(e,i){t.WorkspaceSvg.superClass_.renameVariableById.call(this,e,i),this.refreshToolboxSelection()},t.WorkspaceSvg.prototype.deleteVariableById=function(e){t.WorkspaceSvg.superClass_.deleteVariableById.call(this,e),this.refreshToolboxSelection()},t.WorkspaceSvg.prototype.createVariable=function(e,i,n){return e=t.WorkspaceSvg.superClass_.createVariable.call(this,e,i,n),this.refreshToolboxSelection(),e},t.WorkspaceSvg.prototype.recordDeleteAreas=function(){t.utils.deprecation.warn("WorkspaceSvg.prototype.recordDeleteAreas","June 2021","June 2022","WorkspaceSvg.prototype.recordDragTargets"),this.recordDragTargets()},t.WorkspaceSvg.prototype.recordDragTargets=function(){var e=this.componentManager_.getComponents(t.ComponentManager.Capability.DRAG_TARGET,!0);this.dragTargetAreas_=[];for(var i,n=0;i=e[n];n++){var o=i.getClientRect();o&&this.dragTargetAreas_.push({component:i,clientRect:o})}},t.WorkspaceSvg.prototype.getDragTarget=function(t){for(var e,i=0;e=this.dragTargetAreas_[i];i++)if(e.clientRect.contains(t.clientX,t.clientY))return e.component;return null},t.WorkspaceSvg.prototype.onMouseDown_=function(t){var e=this.getGesture(t);e&&e.handleWsStart(t,this)},t.WorkspaceSvg.prototype.startDrag=function(e,i){(e=t.utils.mouseToSvg(e,this.getParentSvg(),this.getInverseScreenCTM())).x/=this.scale,e.y/=this.scale,this.dragDeltaXY_=t.utils.Coordinate.difference(i,e)},t.WorkspaceSvg.prototype.moveDrag=function(e){return(e=t.utils.mouseToSvg(e,this.getParentSvg(),this.getInverseScreenCTM())).x/=this.scale,e.y/=this.scale,t.utils.Coordinate.sum(this.dragDeltaXY_,e)},t.WorkspaceSvg.prototype.isDragging=function(){return null!=this.currentGesture_&&this.currentGesture_.isDragging()},t.WorkspaceSvg.prototype.isDraggable=function(){return this.options.moveOptions&&this.options.moveOptions.drag},t.WorkspaceSvg.prototype.isMovable=function(){return this.options.moveOptions&&!!this.options.moveOptions.scrollbars||this.options.moveOptions&&this.options.moveOptions.wheel||this.options.moveOptions&&this.options.moveOptions.drag||this.options.zoomOptions&&this.options.zoomOptions.wheel||this.options.zoomOptions&&this.options.zoomOptions.pinch},t.WorkspaceSvg.prototype.isMovableHorizontally=function(){var t=!!this.scrollbar;return this.isMovable()&&(!t||t&&this.scrollbar.canScrollHorizontally())},t.WorkspaceSvg.prototype.isMovableVertically=function(){var t=!!this.scrollbar;return this.isMovable()&&(!t||t&&this.scrollbar.canScrollVertically())},t.WorkspaceSvg.prototype.onMouseWheel_=function(e){if(t.Gesture.inProgress())e.preventDefault(),e.stopPropagation();else{var i=this.options.zoomOptions&&this.options.zoomOptions.wheel,n=this.options.moveOptions&&this.options.moveOptions.wheel;if(i||n){var o=t.utils.getScrollDeltaPixels(e);!i||!e.ctrlKey&&n?(i=this.scrollX-o.x,n=this.scrollY-o.y,e.shiftKey&&!o.x&&(i=this.scrollX-o.y,n=this.scrollY),this.scroll(i,n)):(o=-o.y/50,i=t.utils.mouseToSvg(e,this.getParentSvg(),this.getInverseScreenCTM()),this.zoom(i.x,i.y,o)),e.preventDefault()}}},t.WorkspaceSvg.prototype.getBlocksBoundingBox=function(){var e=this.getTopBoundedElements();if(!e.length)return new t.utils.Rect(0,0,0,0);for(var i=e[0].getBoundingRectangle(),n=1;n<e.length;n++){var o=e[n];o.isInsertionMarker&&o.isInsertionMarker()||((o=o.getBoundingRectangle()).top<i.top&&(i.top=o.top),o.bottom>i.bottom&&(i.bottom=o.bottom),o.left<i.left&&(i.left=o.left),o.right>i.right&&(i.right=o.right))}return i},t.WorkspaceSvg.prototype.cleanUp=function(){this.setResizesEnabled(!1),t.Events.setGroup(!0);for(var e,i=this.getTopBlocks(!0),n=0,o=0;e=i[o];o++)if(e.isMovable()){var r=e.getRelativeToSurfaceXY();e.moveBy(-r.x,n-r.y),e.snapToGrid(),n=e.getRelativeToSurfaceXY().y+e.getHeightWidth().height+this.renderer_.getConstants().MIN_BLOCK_HEIGHT}t.Events.setGroup(!1),this.setResizesEnabled(!0)},t.WorkspaceSvg.prototype.showContextMenu=function(e){if(!this.options.readOnly&&!this.isFlyout){var i=t.ContextMenuRegistry.registry.getContextMenuOptions(t.ContextMenuRegistry.ScopeType.WORKSPACE,{workspace:this});this.configureContextMenu&&this.configureContextMenu(i,e),t.ContextMenu.show(e,i,this.RTL)}},t.WorkspaceSvg.prototype.updateToolbox=function(e){if(e=t.utils.toolbox.convertToolboxDefToJson(e)){if(!this.options.languageTree)throw Error("Existing toolbox is null.  Can't create new toolbox.");if(t.utils.toolbox.hasCategories(e)){if(!this.toolbox_)throw Error("Existing toolbox has no categories.  Can't change mode.");this.options.languageTree=e,this.toolbox_.render(e)}else{if(!this.flyout_)throw Error("Existing toolbox has categories.  Can't change mode.");this.options.languageTree=e,this.flyout_.show(e)}}else if(this.options.languageTree)throw Error("Can't nullify an existing toolbox.")},t.WorkspaceSvg.prototype.markFocused=function(){this.options.parentWorkspace?this.options.parentWorkspace.markFocused():(t.mainWorkspace=this,this.setBrowserFocus())},t.WorkspaceSvg.prototype.setBrowserFocus=function(){document.activeElement&&document.activeElement.blur&&document.activeElement.blur();try{this.getParentSvg().focus({preventScroll:!0})}catch(t){try{this.getParentSvg().parentNode.setActive()}catch(t){this.getParentSvg().parentNode.focus({preventScroll:!0})}}},t.WorkspaceSvg.prototype.zoom=function(t,e,i){i=Math.pow(this.options.zoomOptions.scaleSpeed,i);var n=this.scale*i;if(this.scale!=n){n>this.options.zoomOptions.maxScale?i=this.options.zoomOptions.maxScale/this.scale:n<this.options.zoomOptions.minScale&&(i=this.options.zoomOptions.minScale/this.scale);var o=this.getCanvas().getCTM(),r=this.getParentSvg().createSVGPoint();r.x=t,r.y=e,t=(r=r.matrixTransform(o.inverse())).x,e=r.y,o=o.translate(t*(1-i),e*(1-i)).scale(i),this.scrollX=o.e,this.scrollY=o.f,this.setScale(n)}},t.WorkspaceSvg.prototype.zoomCenter=function(t){var e=this.getMetrics();if(this.flyout_){var i=e.svgWidth?e.svgWidth/2:0;e=e.svgHeight?e.svgHeight/2:0}else i=e.viewWidth/2+e.absoluteLeft,e=e.viewHeight/2+e.absoluteTop;this.zoom(i,e,t)},t.WorkspaceSvg.prototype.zoomToFit=function(){if(this.isMovable()){var e=this.getMetrics(),i=e.viewWidth;e=e.viewHeight;var n=this.getBlocksBoundingBox(),o=n.right-n.left;if(n=n.bottom-n.top,o){this.flyout_&&(this.horizontalLayout?(e+=this.flyout_.getHeight(),n+=this.flyout_.getHeight()/this.scale):(i+=this.flyout_.getWidth(),o+=this.flyout_.getWidth()/this.scale)),i/=o,e/=n,t.Events.disable();try{this.setScale(Math.min(i,e)),this.scrollCenter()}finally{t.Events.enable()}this.maybeFireViewportChangeEvent()}}else console.warn("Tried to move a non-movable workspace. This could result in blocks becoming inaccessible.")},t.WorkspaceSvg.prototype.beginCanvasTransition=function(){t.utils.dom.addClass(this.svgBlockCanvas_,"blocklyCanvasTransitioning"),t.utils.dom.addClass(this.svgBubbleCanvas_,"blocklyCanvasTransitioning")},t.WorkspaceSvg.prototype.endCanvasTransition=function(){t.utils.dom.removeClass(this.svgBlockCanvas_,"blocklyCanvasTransitioning"),t.utils.dom.removeClass(this.svgBubbleCanvas_,"blocklyCanvasTransitioning")},t.WorkspaceSvg.prototype.scrollCenter=function(){if(this.isMovable()){var t=this.getMetrics(),e=(t.scrollWidth-t.viewWidth)/2,i=(t.scrollHeight-t.viewHeight)/2;e=-e-t.scrollLeft,i=-i-t.scrollTop,this.scroll(e,i)}else console.warn("Tried to move a non-movable workspace. This could result in blocks becoming inaccessible.")},t.WorkspaceSvg.prototype.centerOnBlock=function(t){if(this.isMovable()){if(t=t?this.getBlockById(t):null){var e=t.getRelativeToSurfaceXY(),i=t.getHeightWidth(),n=this.scale;t=(e.x+(this.RTL?-1:1)*i.width/2)*n,e=(e.y+i.height/2)*n,i=this.getMetrics(),this.scroll(-(t-i.viewWidth/2),-(e-i.viewHeight/2))}}else console.warn("Tried to move a non-movable workspace. This could result in blocks becoming inaccessible.")},t.WorkspaceSvg.prototype.setScale=function(e){this.options.zoomOptions.maxScale&&e>this.options.zoomOptions.maxScale?e=this.options.zoomOptions.maxScale:this.options.zoomOptions.minScale&&e<this.options.zoomOptions.minScale&&(e=this.options.zoomOptions.minScale),this.scale=e,t.hideChaff(!1),this.flyout_&&(this.flyout_.reflow(),this.recordDragTargets()),this.grid_&&this.grid_.update(this.scale),e=this.getMetrics(),this.scrollX-=e.absoluteLeft,this.scrollY-=e.absoluteTop,e.viewLeft+=e.absoluteLeft,e.viewTop+=e.absoluteTop,this.scroll(this.scrollX,this.scrollY),this.scrollbar&&(this.flyout_?this.scrollbar.resizeView(e):this.scrollbar.resizeContent(e))},t.WorkspaceSvg.prototype.getScale=function(){return this.options.parentWorkspace?this.options.parentWorkspace.getScale():this.scale},t.WorkspaceSvg.prototype.scroll=function(e,i){t.hideChaff(!0);var n=this.getMetrics();e=Math.min(e,-n.scrollLeft),i=Math.min(i,-n.scrollTop);var o=n.scrollTop+Math.max(0,n.scrollHeight-n.viewHeight);e=Math.max(e,-(n.scrollLeft+Math.max(0,n.scrollWidth-n.viewWidth))),i=Math.max(i,-o),this.scrollX=e,this.scrollY=i,this.scrollbar&&this.scrollbar.set(-(e+n.scrollLeft),-(i+n.scrollTop),!1),e+=n.absoluteLeft,i+=n.absoluteTop,this.translate(e,i)},t.WorkspaceSvg.setTopLevelWorkspaceMetrics_=function(t){var e=this.getMetrics();"number"==typeof t.x&&(this.scrollX=-(e.scrollLeft+(e.scrollWidth-e.viewWidth)*t.x)),"number"==typeof t.y&&(this.scrollY=-(e.scrollTop+(e.scrollHeight-e.viewHeight)*t.y)),this.translate(this.scrollX+e.absoluteLeft,this.scrollY+e.absoluteTop)},t.WorkspaceSvg.prototype.getBlockById=function(e){return t.WorkspaceSvg.superClass_.getBlockById.call(this,e)},t.WorkspaceSvg.prototype.getTopBlocks=function(e){return t.WorkspaceSvg.superClass_.getTopBlocks.call(this,e)},t.WorkspaceSvg.prototype.addTopBlock=function(e){this.addTopBoundedElement(e),t.WorkspaceSvg.superClass_.addTopBlock.call(this,e)},t.WorkspaceSvg.prototype.removeTopBlock=function(e){this.removeTopBoundedElement(e),t.WorkspaceSvg.superClass_.removeTopBlock.call(this,e)},t.WorkspaceSvg.prototype.addTopComment=function(e){this.addTopBoundedElement(e),t.WorkspaceSvg.superClass_.addTopComment.call(this,e)},t.WorkspaceSvg.prototype.removeTopComment=function(e){this.removeTopBoundedElement(e),t.WorkspaceSvg.superClass_.removeTopComment.call(this,e)},t.WorkspaceSvg.prototype.addTopBoundedElement=function(t){this.topBoundedElements_.push(t)},t.WorkspaceSvg.prototype.removeTopBoundedElement=function(e){t.utils.arrayRemove(this.topBoundedElements_,e)},t.WorkspaceSvg.prototype.getTopBoundedElements=function(){return[].concat(this.topBoundedElements_)},t.WorkspaceSvg.prototype.setResizesEnabled=function(t){var e=!this.resizesEnabled_&&t;this.resizesEnabled_=t,e&&this.resizeContents()},t.WorkspaceSvg.prototype.clear=function(){this.setResizesEnabled(!1),t.WorkspaceSvg.superClass_.clear.call(this),this.topBoundedElements_=[],this.setResizesEnabled(!0)},t.WorkspaceSvg.prototype.registerButtonCallback=function(t,e){if("function"!=typeof e)throw TypeError("Button callbacks must be functions.");this.flyoutButtonCallbacks_[t]=e},t.WorkspaceSvg.prototype.getButtonCallback=function(t){return(t=this.flyoutButtonCallbacks_[t])?t:null},t.WorkspaceSvg.prototype.removeButtonCallback=function(t){this.flyoutButtonCallbacks_[t]=null},t.WorkspaceSvg.prototype.registerToolboxCategoryCallback=function(t,e){if("function"!=typeof e)throw TypeError("Toolbox category callbacks must be functions.");this.toolboxCategoryCallbacks_[t]=e},t.WorkspaceSvg.prototype.getToolboxCategoryCallback=function(t){return this.toolboxCategoryCallbacks_[t]||null},t.WorkspaceSvg.prototype.removeToolboxCategoryCallback=function(t){this.toolboxCategoryCallbacks_[t]=null},t.WorkspaceSvg.prototype.getGesture=function(e){var i="mousedown"==e.type||"touchstart"==e.type||"pointerdown"==e.type,n=this.currentGesture_;return n?i&&n.hasStarted()?(console.warn("Tried to start the same gesture twice."),n.cancel(),null):n:i?this.currentGesture_=new t.TouchGesture(e,this):null},t.WorkspaceSvg.prototype.clearGesture=function(){this.currentGesture_=null},t.WorkspaceSvg.prototype.cancelCurrentGesture=function(){this.currentGesture_&&this.currentGesture_.cancel()},t.WorkspaceSvg.prototype.getAudioManager=function(){return this.audioManager_},t.WorkspaceSvg.prototype.getGrid=function(){return this.grid_},t.inject=function(e,i){if(t.checkBlockColourConstants(),"string"==typeof e&&(e=document.getElementById(e)||document.querySelector(e)),!e||!t.utils.dom.containsNode(document,e))throw Error("Error: container is not in current document.");i=new t.Options(i||{});var n=document.createElement("div");n.className="injectionDiv",n.tabIndex=0,t.utils.aria.setState(n,t.utils.aria.State.LABEL,t.Msg.WORKSPACE_ARIA_LABEL),e.appendChild(n),e=t.createDom_(n,i);var o=new t.BlockDragSurfaceSvg(n),r=new t.WorkspaceDragSurfaceSvg(n),s=t.createMainWorkspace_(e,i,o,r);return t.init_(s),t.mainWorkspace=s,t.svgResize(s),n.addEventListener("focusin",function(){t.mainWorkspace=s}),s},t.createDom_=function(e,i){e.setAttribute("dir","LTR"),t.Css.inject(i.hasCss,i.pathToMedia),e=t.utils.dom.createSvgElement(t.utils.Svg.SVG,{xmlns:t.utils.dom.SVG_NS,"xmlns:html":t.utils.dom.HTML_NS,"xmlns:xlink":t.utils.dom.XLINK_NS,version:"1.1",class:"blocklySvg",tabindex:"0"},e);var n=t.utils.dom.createSvgElement(t.utils.Svg.DEFS,{},e),o=String(Math.random()).substring(2);return i.gridPattern=t.Grid.createDom(o,i.gridOptions,n),e},t.createMainWorkspace_=function(e,i,n,o){return i.parentWorkspace=null,n=(i=new t.WorkspaceSvg(i,n,o)).options,i.scale=n.zoomOptions.startScale,e.appendChild(i.createDom("blocklyMainBackground")),t.utils.dom.addClass(i.getInjectionDiv(),i.getRenderer().getClassName()),t.utils.dom.addClass(i.getInjectionDiv(),i.getTheme().getClassName()),!n.hasCategories&&n.languageTree&&(o=i.addFlyout(t.utils.Svg.SVG),t.utils.dom.insertAfter(o,e)),n.hasTrashcan&&i.addTrashcan(),n.zoomOptions&&n.zoomOptions.controls&&i.addZoomControls(),i.getThemeManager().subscribe(e,"workspaceBackgroundColour","background-color"),i.translate(0,0),i.addChangeListener(t.bumpIntoBoundsHandler_(i)),t.svgResize(i),t.WidgetDiv.createDom(),t.DropDownDiv.createDom(),t.Tooltip.createDom(),i},t.extractObjectFromEvent_=function(e,i){var n=null;switch(i.type){case t.Events.BLOCK_CREATE:case t.Events.BLOCK_MOVE:(n=e.getBlockById(i.blockId))&&(n=n.getRootBlock());break;case t.Events.COMMENT_CREATE:case t.Events.COMMENT_MOVE:n=e.getCommentById(i.commentId)}return n},t.bumpTopObjectsIntoBounds_=function(e){var i=e.getMetricsManager();if(i.hasFixedEdges()&&!e.isDragging()){i=i.getScrollMetrics(!0);for(var n,o=e.getTopBoundedElements(),r=0;n=o[r];r++)t.bumpObjectIntoBounds_(e,i,n)}},t.bumpIntoBoundsHandler_=function(e){return function(i){var n=e.getMetricsManager();if(n.hasFixedEdges()&&!e.isDragging())if(-1!==t.Events.BUMP_EVENTS.indexOf(i.type)){n=n.getScrollMetrics(!0);var o=t.extractObjectFromEvent_(e,i);if(o){var r=t.Events.getGroup();t.Events.setGroup(i.group),t.bumpObjectIntoBounds_(e,n,o)&&!i.group&&console.warn("Moved object in bounds but there was no event group. This may break undo."),null!==r&&t.Events.setGroup(r)}}else i.type===t.Events.VIEWPORT_CHANGE&&i.scale>i.oldScale&&t.bumpTopObjectsIntoBounds_(e)}},t.bumpObjectIntoBounds_=function(e,i,n){var o=n.getBoundingRectangle(),r=o.right-o.left,s=t.utils.math.clamp(i.top,o.top,i.top+i.height-(o.bottom-o.top))-o.top,a=i.left;return i=i.left+i.width-r,e.RTL?a=Math.min(i,a):i=Math.max(a,i),!(!(e=t.utils.math.clamp(a,o.left,i)-o.left)&&!s)&&(n.moveBy(e,s),!0)},t.init_=function(e){var i=e.options,n=e.getParentSvg();if(t.browserEvents.conditionalBind(n.parentNode,"contextmenu",null,function(e){t.utils.isTargetInput(e)||e.preventDefault()}),n=t.browserEvents.conditionalBind(window,"resize",null,function(){t.hideChaff(!0),t.svgResize(e),t.bumpTopObjectsIntoBounds_(e)}),e.setResizeHandlerWrapper(n),t.inject.bindDocumentEvents_(),i.languageTree){n=e.getToolbox();var o=e.getFlyout(!0);n?n.init():o&&(o.init(e),o.show(i.languageTree),"function"==typeof o.scrollToStart&&o.scrollToStart())}i.hasTrashcan&&e.trashcan.init(),i.zoomOptions&&i.zoomOptions.controls&&e.zoomControls_.init(),i.moveOptions&&i.moveOptions.scrollbars?(e.scrollbar=new t.ScrollbarPair(e,!0===i.moveOptions.scrollbars||!!i.moveOptions.scrollbars.horizontal,!0===i.moveOptions.scrollbars||!!i.moveOptions.scrollbars.vertical,"blocklyMainWorkspaceScrollbar"),e.scrollbar.resize()):e.setMetrics({x:.5,y:.5}),i.hasSounds&&t.inject.loadSounds_(i.pathToMedia,e)},t.inject.bindDocumentEvents_=function(){t.documentEventsBound_||(t.browserEvents.conditionalBind(document,"scroll",null,function(){for(var e,i=t.Workspace.getAll(),n=0;e=i[n];n++)e.updateInverseScreenCTM&&e.updateInverseScreenCTM()}),t.browserEvents.conditionalBind(document,"keydown",null,t.onKeyDown),t.browserEvents.bind(document,"touchend",null,t.longStop_),t.browserEvents.bind(document,"touchcancel",null,t.longStop_),t.utils.userAgent.IPAD&&t.browserEvents.conditionalBind(window,"orientationchange",document,function(){t.svgResize(t.getMainWorkspace())})),t.documentEventsBound_=!0},t.inject.loadSounds_=function(e,i){var n=i.getAudioManager();n.load([e+"click.mp3",e+"click.wav",e+"click.ogg"],"click"),n.load([e+"disconnect.wav",e+"disconnect.mp3",e+"disconnect.ogg"],"disconnect"),n.load([e+"delete.mp3",e+"delete.ogg",e+"delete.wav"],"delete");var o=[];e=function(){for(;o.length;)t.browserEvents.unbind(o.pop());n.preload()},o.push(t.browserEvents.conditionalBind(document,"mousemove",null,e,!0)),o.push(t.browserEvents.conditionalBind(document,"touchstart",null,e,!0))},t.Names=function(t,e){if(this.variablePrefix_=e||"",this.reservedDict_=Object.create(null),t)for(t=t.split(","),e=0;e<t.length;e++)this.reservedDict_[t[e]]=!0;this.reset()},t.Names.DEVELOPER_VARIABLE_TYPE="DEVELOPER_VARIABLE",t.Names.prototype.reset=function(){this.db_=Object.create(null),this.dbReverse_=Object.create(null),this.variableMap_=null},t.Names.prototype.setVariableMap=function(t){this.variableMap_=t},t.Names.prototype.getNameForUserVariable_=function(t){return this.variableMap_?(t=this.variableMap_.getVariableById(t))?t.name:null:(console.warn("Deprecated call to Blockly.Names.prototype.getName without defining a variable map. To fix, add the following code in your generator's init() function:\nBlockly.YourGeneratorName.nameDB_.setVariableMap(workspace.getVariableMap());"),null)},t.Names.prototype.populateVariables=function(e){e=t.Variables.allUsedVarModels(e);for(var i=0;i<e.length;i++)this.getName(e[i].getId(),t.VARIABLE_CATEGORY_NAME)},t.Names.prototype.populateProcedures=function(e){e=(e=t.Procedures.allProcedures(e))[0].concat(e[1]);for(var i=0;i<e.length;i++)this.getName(e[i][0],t.PROCEDURE_CATEGORY_NAME)},t.Names.prototype.getName=function(e,i){var n=e;i==t.VARIABLE_CATEGORY_NAME&&(e=this.getNameForUserVariable_(e))&&(n=e),e=n.toLowerCase();var o=i==t.VARIABLE_CATEGORY_NAME||i==t.Names.DEVELOPER_VARIABLE_TYPE?this.variablePrefix_:"";i in this.db_||(this.db_[i]=Object.create(null));var r=this.db_[i];return e in r?o+r[e]:(i=this.getDistinctName(n,i),r[e]=i.substr(o.length),i)},t.Names.prototype.getUserNames=function(t){return Object.keys(this.db_[t]||{})},t.Names.prototype.getDistinctName=function(e,i){e=this.safeName_(e);for(var n="";this.dbReverse_[e+n]||e+n in this.reservedDict_;)n=n?n+1:2;return e+=n,this.dbReverse_[e]=!0,(i==t.VARIABLE_CATEGORY_NAME||i==t.Names.DEVELOPER_VARIABLE_TYPE?this.variablePrefix_:"")+e},t.Names.prototype.safeName_=function(e){return e?(e=encodeURI(e.replace(/ /g,"_")).replace(/[^\w]/g,"_"),-1!="0123456789".indexOf(e[0])&&(e="my_"+e)):e=t.Msg.UNNAMED_KEY||"unnamed",e},t.Names.equals=function(t,e){return t.toLowerCase()==e.toLowerCase()},t.Procedures={},t.Procedures.NAME_TYPE=t.PROCEDURE_CATEGORY_NAME,t.Procedures.DEFAULT_ARG="x",t.Procedures.allProcedures=function(e){var i=e.getBlocksByType("procedures_defnoreturn",!1).map(function(t){return t.getProcedureDef()});return e=e.getBlocksByType("procedures_defreturn",!1).map(function(t){return t.getProcedureDef()}),i.sort(t.Procedures.procTupleComparator_),e.sort(t.Procedures.procTupleComparator_),[i,e]},t.Procedures.procTupleComparator_=function(t,e){return t[0].localeCompare(e[0],void 0,{sensitivity:"base"})},t.Procedures.findLegalName=function(e,i){if(i.isInFlyout)return e;for(e=e||t.Msg.UNNAMED_KEY||"unnamed";!t.Procedures.isLegalName_(e,i.workspace,i);){var n=e.match(/^(.*?)(\d+)$/);e=n?n[1]+(parseInt(n[2],10)+1):e+"2"}return e},t.Procedures.isLegalName_=function(e,i,n){return!t.Procedures.isNameUsed(e,i,n)},t.Procedures.isNameUsed=function(e,i,n){i=i.getAllBlocks(!1);for(var o=0;o<i.length;o++)if(i[o]!=n&&i[o].getProcedureDef){var r=i[o].getProcedureDef();if(t.Names.equals(r[0],e))return!0}return!1},t.Procedures.rename=function(e){e=e.trim();var i=t.Procedures.findLegalName(e,this.getSourceBlock()),n=this.getValue();if(n!=e&&n!=i){e=this.getSourceBlock().workspace.getAllBlocks(!1);for(var o=0;o<e.length;o++)e[o].renameProcedure&&e[o].renameProcedure(n,i)}return i},t.Procedures.flyoutCategory=function(e){function i(e,i){for(var o=0;o<e.length;o++){var r=e[o][0],s=e[o][1],a=t.utils.xml.createElement("block");a.setAttribute("type",i),a.setAttribute("gap",16);var l=t.utils.xml.createElement("mutation");for(l.setAttribute("name",r),a.appendChild(l),r=0;r<s.length;r++){var c=t.utils.xml.createElement("arg");c.setAttribute("name",s[r]),l.appendChild(c)}n.push(a)}}var n=[];if(t.Blocks.procedures_defnoreturn){var o=t.utils.xml.createElement("block");o.setAttribute("type","procedures_defnoreturn"),o.setAttribute("gap",16);var r=t.utils.xml.createElement("field");r.setAttribute("name","NAME"),r.appendChild(t.utils.xml.createTextNode(t.Msg.PROCEDURES_DEFNORETURN_PROCEDURE)),o.appendChild(r),n.push(o)}return t.Blocks.procedures_defreturn&&((o=t.utils.xml.createElement("block")).setAttribute("type","procedures_defreturn"),o.setAttribute("gap",16),(r=t.utils.xml.createElement("field")).setAttribute("name","NAME"),r.appendChild(t.utils.xml.createTextNode(t.Msg.PROCEDURES_DEFRETURN_PROCEDURE)),o.appendChild(r),n.push(o)),t.Blocks.procedures_ifreturn&&((o=t.utils.xml.createElement("block")).setAttribute("type","procedures_ifreturn"),o.setAttribute("gap",16),n.push(o)),n.length&&n[n.length-1].setAttribute("gap",24),i((e=t.Procedures.allProcedures(e))[0],"procedures_callnoreturn"),i(e[1],"procedures_callreturn"),n},t.Procedures.updateMutatorFlyout_=function(e){for(var i,n=[],o=e.getBlocksByType("procedures_mutatorarg",!1),r=0;i=o[r];r++)n.push(i.getFieldValue("NAME"));o=t.utils.xml.createElement("xml"),(r=t.utils.xml.createElement("block")).setAttribute("type","procedures_mutatorarg"),(i=t.utils.xml.createElement("field")).setAttribute("name","NAME"),n=t.Variables.generateUniqueNameFromOptions(t.Procedures.DEFAULT_ARG,n),n=t.utils.xml.createTextNode(n),i.appendChild(n),r.appendChild(i),o.appendChild(r),e.updateToolbox(o)},t.Procedures.mutatorOpenListener=function(e){if(e.type==t.Events.BUBBLE_OPEN&&"mutator"===e.bubbleType&&e.isOpen){var i=(e=t.Workspace.getById(e.workspaceId).getBlockById(e.blockId)).type;"procedures_defnoreturn"!=i&&"procedures_defreturn"!=i||(e=e.mutator.getWorkspace(),t.Procedures.updateMutatorFlyout_(e),e.addChangeListener(t.Procedures.mutatorChangeListener_))}},t.Procedures.mutatorChangeListener_=function(e){e.type!=t.Events.BLOCK_CREATE&&e.type!=t.Events.BLOCK_DELETE&&e.type!=t.Events.BLOCK_CHANGE||(e=t.Workspace.getById(e.workspaceId),t.Procedures.updateMutatorFlyout_(e))},t.Procedures.getCallers=function(e,i){var n=[];i=i.getAllBlocks(!1);for(var o=0;o<i.length;o++)if(i[o].getProcedureCall){var r=i[o].getProcedureCall();r&&t.Names.equals(r,e)&&n.push(i[o])}return n},t.Procedures.mutateCallers=function(e){var i,n=t.Events.recordUndo,o=e.getProcedureDef()[0],r=e.mutationToDom(!0);for(e=t.Procedures.getCallers(o,e.workspace),o=0;i=e[o];o++){var s=i.mutationToDom();s=s&&t.Xml.domToText(s),i.domToMutation(r);var a=i.mutationToDom();s!=(a=a&&t.Xml.domToText(a))&&(t.Events.recordUndo=!1,t.Events.fire(new(t.Events.get(t.Events.BLOCK_CHANGE))(i,"mutation",null,s,a)),t.Events.recordUndo=n)}},t.Procedures.getDefinition=function(e,i){i=i.getAllBlocks(!1);for(var n=0;n<i.length;n++)if(i[n].getProcedureDef){var o=i[n].getProcedureDef();if(o&&t.Names.equals(o[0],e))return i[n]}return null},t.ShortcutRegistry=function(){t.ShortcutRegistry.registry=this,this.registry_=Object.create(null),this.keyMap_=Object.create(null)},t.ShortcutRegistry.modifierKeys={Shift:t.utils.KeyCodes.SHIFT,Control:t.utils.KeyCodes.CTRL,Alt:t.utils.KeyCodes.ALT,Meta:t.utils.KeyCodes.META},t.ShortcutRegistry.prototype.register=function(t,e){if(this.registry_[t.name]&&!e)throw Error('Shortcut with name "'+t.name+'" already exists.');this.registry_[t.name]=t},t.ShortcutRegistry.prototype.unregister=function(t){return this.registry_[t]?(this.removeAllKeyMappings(t),delete this.registry_[t],!0):(console.warn('Keyboard shortcut with name "'+t+'" not found.'),!1)},t.ShortcutRegistry.prototype.addKeyMapping=function(t,e,i){t=String(t);var n=this.keyMap_[t];if(n&&!i)throw Error('Shortcut with name "'+e+'" collides with shortcuts '+n.toString());n&&i?n.unshift(e):this.keyMap_[t]=[e]},t.ShortcutRegistry.prototype.removeKeyMapping=function(t,e,i){var n=this.keyMap_[t];if(!n&&!i)return console.warn('No keyboard shortcut with name "'+e+'" registered with key code "'+t+'"'),!1;var o=n.indexOf(e);return-1<o?(n.splice(o,1),0==n.length&&delete this.keyMap_[t],!0):(i||console.warn('No keyboard shortcut with name "'+e+'" registered with key code "'+t+'"'),!1)},t.ShortcutRegistry.prototype.removeAllKeyMappings=function(t){for(var e in this.keyMap_)this.removeKeyMapping(e,t,!0)},t.ShortcutRegistry.prototype.setKeyMap=function(t){this.keyMap_=t},t.ShortcutRegistry.prototype.getKeyMap=function(){return t.utils.object.deepMerge(Object.create(null),this.keyMap_)},t.ShortcutRegistry.prototype.getRegistry=function(){return t.utils.object.deepMerge(Object.create(null),this.registry_)},t.ShortcutRegistry.prototype.onKeyDown=function(t,e){var i=this.serializeKeyEvent_(e);if(!(i=this.getShortcutNamesByKeyCode(i)))return!1;for(var n,o=0;n=i[o];o++)if((!(n=this.registry_[n]).preconditionFn||n.preconditionFn(t))&&n.callback&&n.callback(t,e,n))return!0;return!1},t.ShortcutRegistry.prototype.getShortcutNamesByKeyCode=function(t){return this.keyMap_[t]||[]},t.ShortcutRegistry.prototype.getKeyCodesByShortcutName=function(t){var e,i=[];for(e in this.keyMap_)-1<this.keyMap_[e].indexOf(t)&&i.push(e);return i},t.ShortcutRegistry.prototype.serializeKeyEvent_=function(e){var i,n="";for(i in t.ShortcutRegistry.modifierKeys)e.getModifierState(i)&&(""!=n&&(n+="+"),n+=i);return""!=n&&e.keyCode?n=n+"+"+e.keyCode:e.keyCode&&(n=e.keyCode.toString()),n},t.ShortcutRegistry.prototype.checkModifiers_=function(e){for(var i,n=t.utils.object.values(t.ShortcutRegistry.modifierKeys),o=0;i=e[o];o++)if(0>n.indexOf(i))throw Error(i+" is not a valid modifier key.")},t.ShortcutRegistry.prototype.createSerializedKey=function(e,i){var n="";if(i)for(var o in this.checkModifiers_(i),t.ShortcutRegistry.modifierKeys)-1<i.indexOf(t.ShortcutRegistry.modifierKeys[o])&&(""!=n&&(n+="+"),n+=o);return""!=n&&e?n=n+"+"+e:e&&(n=e.toString()),n},new t.ShortcutRegistry,t.VariableModel=function(e,i,n,o){this.workspace=e,this.name=i,this.type=n||"",this.id_=o||t.utils.genUid(),t.Events.fire(new(t.Events.get(t.Events.VAR_CREATE))(this))},t.VariableModel.prototype.getId=function(){return this.id_},t.VariableModel.compareByName=function(t,e){return t.name.localeCompare(e.name,void 0,{sensitivity:"base"})},t.Variables={},t.Variables.NAME_TYPE=t.VARIABLE_CATEGORY_NAME,t.Variables.allUsedVarModels=function(t){var e=t.getAllBlocks(!1);t=Object.create(null);for(var i=0;i<e.length;i++){var n=e[i].getVarModels();if(n)for(var o=0;o<n.length;o++){var r=n[o],s=r.getId();s&&(t[s]=r)}}for(s in e=[],t)e.push(t[s]);return e},t.Variables.ALL_DEVELOPER_VARS_WARNINGS_BY_BLOCK_TYPE_={},t.Variables.allDeveloperVariables=function(e){e=e.getAllBlocks(!1);for(var i,n=Object.create(null),o=0;i=e[o];o++){var r=i.getDeveloperVariables;if(!r&&i.getDeveloperVars&&(r=i.getDeveloperVars,t.Variables.ALL_DEVELOPER_VARS_WARNINGS_BY_BLOCK_TYPE_[i.type]||(console.warn("Function getDeveloperVars() deprecated. Use getDeveloperVariables() (block type '"+i.type+"')"),t.Variables.ALL_DEVELOPER_VARS_WARNINGS_BY_BLOCK_TYPE_[i.type]=!0)),r)for(i=r(),r=0;r<i.length;r++)n[i[r]]=!0}return Object.keys(n)},t.Variables.flyoutCategory=function(e){var i=[],n=document.createElement("button");return n.setAttribute("text","%{BKY_NEW_VARIABLE}"),n.setAttribute("callbackKey","CREATE_VARIABLE"),e.registerButtonCallback("CREATE_VARIABLE",function(e){t.Variables.createVariableButtonHandler(e.getTargetWorkspace())}),i.push(n),e=t.Variables.flyoutCategoryBlocks(e),i.concat(e)},t.Variables.flyoutCategoryBlocks=function(e){var i=[];if(0<(e=e.getVariablesOfType("")).length){var n=e[e.length-1];if(t.Blocks.variables_set){var o=t.utils.xml.createElement("block");o.setAttribute("type","variables_set"),o.setAttribute("gap",t.Blocks.math_change?8:24),o.appendChild(t.Variables.generateVariableFieldDom(n)),i.push(o)}if(t.Blocks.math_change&&((o=t.utils.xml.createElement("block")).setAttribute("type","math_change"),o.setAttribute("gap",t.Blocks.variables_get?20:8),o.appendChild(t.Variables.generateVariableFieldDom(n)),n=t.Xml.textToDom('<value name="DELTA"><shadow type="math_number"><field name="NUM">1</field></shadow></value>'),o.appendChild(n),i.push(o)),t.Blocks.variables_get){e.sort(t.VariableModel.compareByName),n=0;for(var r;r=e[n];n++)(o=t.utils.xml.createElement("block")).setAttribute("type","variables_get"),o.setAttribute("gap",8),o.appendChild(t.Variables.generateVariableFieldDom(r)),i.push(o)}}return i},t.Variables.VAR_LETTER_OPTIONS="ijkmnopqrstuvwxyzabcdefgh",t.Variables.generateUniqueName=function(e){return t.Variables.generateUniqueNameFromOptions(t.Variables.VAR_LETTER_OPTIONS.charAt(0),e.getAllVariableNames())},t.Variables.generateUniqueNameFromOptions=function(e,i){if(!i.length)return e;for(var n=t.Variables.VAR_LETTER_OPTIONS,o="",r=n.indexOf(e);;){for(var s=!1,a=0;a<i.length;a++)if(i[a].toLowerCase()==e){s=!0;break}if(!s)return e;++r==n.length&&(r=0,o=Number(o)+1),e=n.charAt(r)+o}},t.Variables.createVariableButtonHandler=function(e,i,n){var o=n||"",r=function(n){t.Variables.promptName(t.Msg.NEW_VARIABLE_TITLE,n,function(n){if(n){var s=t.Variables.nameUsedWithAnyType(n,e);if(s){if(s.type==o)var a=t.Msg.VARIABLE_ALREADY_EXISTS.replace("%1",s.name);else a=(a=t.Msg.VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE).replace("%1",s.name).replace("%2",s.type);t.alert(a,function(){r(n)})}else e.createVariable(n,o),i&&i(n)}else i&&i(null)})};r("")},t.Variables.createVariable=t.Variables.createVariableButtonHandler,t.Variables.renameVariable=function(e,i,n){var o=function(r){var s=t.Msg.RENAME_VARIABLE_TITLE.replace("%1",i.name);t.Variables.promptName(s,r,function(r){if(r){var s=t.Variables.nameUsedWithOtherType_(r,i.type,e);s?(s=t.Msg.VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE.replace("%1",s.name).replace("%2",s.type),t.alert(s,function(){o(r)})):(e.renameVariableById(i.getId(),r),n&&n(r))}else n&&n(null)})};o("")},t.Variables.promptName=function(e,i,n){t.prompt(e,i,function(e){e&&((e=e.replace(/[\s\xa0]+/g," ").trim())==t.Msg.RENAME_VARIABLE||e==t.Msg.NEW_VARIABLE)&&(e=null),n(e)})},t.Variables.nameUsedWithOtherType_=function(t,e,i){i=i.getVariableMap().getAllVariables(),t=t.toLowerCase();for(var n,o=0;n=i[o];o++)if(n.name.toLowerCase()==t&&n.type!=e)return n;return null},t.Variables.nameUsedWithAnyType=function(t,e){e=e.getVariableMap().getAllVariables(),t=t.toLowerCase();for(var i,n=0;i=e[n];n++)if(i.name.toLowerCase()==t)return i;return null},t.Variables.generateVariableFieldDom=function(e){var i=t.utils.xml.createElement("field");return i.setAttribute("name","VAR"),i.setAttribute("id",e.getId()),i.setAttribute("variabletype",e.type),e=t.utils.xml.createTextNode(e.name),i.appendChild(e),i},t.Variables.getOrCreateVariablePackage=function(e,i,n,o){var r=t.Variables.getVariable(e,i,n,o);return r||(r=t.Variables.createVariable_(e,i,n,o)),r},t.Variables.getVariable=function(t,e,i,n){var o=t.getPotentialVariableMap(),r=null;if(e&&(!(r=t.getVariableById(e))&&o&&(r=o.getVariableById(e)),r))return r;if(i){if(void 0==n)throw Error("Tried to look up a variable by name without a type");!(r=t.getVariable(i,n))&&o&&(r=o.getVariable(i,n))}return r},t.Variables.createVariable_=function(e,i,n,o){var r=e.getPotentialVariableMap();return n||(n=t.Variables.generateUniqueName(e.isFlyout?e.targetWorkspace:e)),r?r.createVariable(n,o,i):e.createVariable(n,o,i)},t.Variables.getAddedVariables=function(t,e){t=t.getAllVariables();var i=[];if(e.length!=t.length)for(var n=0;n<t.length;n++){var o=t[n];-1==e.indexOf(o)&&i.push(o)}return i},t.VERSION="6.20210701.0",t.mainWorkspace=null,t.selected=null,t.draggingConnections=[],t.clipboardXml_=null,t.clipboardSource_=null,t.clipboardTypeCounts_=null,t.cache3dSupported_=null,t.parentContainer=null,t.svgSize=function(e){return t.utils.deprecation.warn("Blockly.svgSize","March 2021","March 2022","workspace.getCachedParentSvgSize"),new t.utils.Size(e.cachedWidth_,e.cachedHeight_)},t.resizeSvgContents=function(t){t.resizeContents()},t.svgResize=function(t){for(;t.options.parentWorkspace;)t=t.options.parentWorkspace;var e=t.getParentSvg(),i=t.getCachedParentSvgSize(),n=e.parentNode;if(n){var o=n.offsetWidth;n=n.offsetHeight,i.width!=o&&(e.setAttribute("width",o+"px"),t.setCachedParentSvgSize(o,null)),i.height!=n&&(e.setAttribute("height",n+"px"),t.setCachedParentSvgSize(null,n)),t.resize()}},t.onKeyDown=function(e){var i=t.mainWorkspace;i&&!(t.utils.isTargetInput(e)||i.rendered&&!i.isVisible())&&t.ShortcutRegistry.registry.onKeyDown(i,e)},t.deleteBlock=function(e){e.workspace.isFlyout||(t.Events.setGroup(!0),t.hideChaff(),e.outputConnection?e.dispose(!1,!0):e.dispose(!0,!0),t.Events.setGroup(!1))},t.copy=function(e){(e=e.toCopyData())&&(t.clipboardXml_=e.xml,t.clipboardSource_=e.source,t.clipboardTypeCounts_=e.typeCounts)},t.paste=function(){if(!t.clipboardXml_)return!1;var e=t.clipboardSource_;return e.isFlyout&&(e=e.targetWorkspace),!(!t.clipboardTypeCounts_||!e.isCapacityAvailable(t.clipboardTypeCounts_))&&(t.Events.setGroup(!0),e.paste(t.clipboardXml_),t.Events.setGroup(!1),!0)},t.duplicate=function(e){var i=t.clipboardXml_,n=t.clipboardSource_;t.copy(e),e.workspace.paste(t.clipboardXml_),t.clipboardXml_=i,t.clipboardSource_=n},t.onContextMenu_=function(e){t.utils.isTargetInput(e)||e.preventDefault()},t.hideChaff=function(e){t.Tooltip.hide(),t.WidgetDiv.hide(),t.DropDownDiv.hideWithoutAnimation();var i=!!e;t.getMainWorkspace().getComponentManager().getComponents(t.ComponentManager.Capability.AUTOHIDEABLE,!0).forEach(function(t){t.autoHide(i)})},t.getMainWorkspace=function(){return t.mainWorkspace},t.alert=function(t,e){alert(t),e&&e()},t.confirm=function(t,e){e(confirm(t))},t.prompt=function(t,e,i){i(prompt(t,e))},t.jsonInitFactory_=function(t){return function(){this.jsonInit(t)}},t.defineBlocksWithJsonArray=function(e){for(var i=0;i<e.length;i++){var n=e[i];if(n){var o=n.type;null==o||""===o?console.warn("Block definition #"+i+" in JSON array is missing a type attribute. Skipping."):(t.Blocks[o]&&console.warn("Block definition #"+i+' in JSON array overwrites prior definition of "'+o+'".'),t.Blocks[o]={init:t.jsonInitFactory_(n)})}else console.warn("Block definition #"+i+" in JSON array is "+n+". Skipping.")}},t.isNumber=function(t){return/^\s*-?\d+(\.\d+)?\s*$/.test(t)},t.hueToHex=function(e){return t.utils.colour.hsvToHex(e,t.HSV_SATURATION,255*t.HSV_VALUE)},t.checkBlockColourConstants=function(){t.checkBlockColourConstant_("LOGIC_HUE",["Blocks","logic","HUE"],void 0),t.checkBlockColourConstant_("LOGIC_HUE",["Constants","Logic","HUE"],210),t.checkBlockColourConstant_("LOOPS_HUE",["Blocks","loops","HUE"],void 0),t.checkBlockColourConstant_("LOOPS_HUE",["Constants","Loops","HUE"],120),t.checkBlockColourConstant_("MATH_HUE",["Blocks","math","HUE"],void 0),t.checkBlockColourConstant_("MATH_HUE",["Constants","Math","HUE"],230),t.checkBlockColourConstant_("TEXTS_HUE",["Blocks","texts","HUE"],void 0),t.checkBlockColourConstant_("TEXTS_HUE",["Constants","Text","HUE"],160),t.checkBlockColourConstant_("LISTS_HUE",["Blocks","lists","HUE"],void 0),t.checkBlockColourConstant_("LISTS_HUE",["Constants","Lists","HUE"],260),t.checkBlockColourConstant_("COLOUR_HUE",["Blocks","colour","HUE"],void 0),t.checkBlockColourConstant_("COLOUR_HUE",["Constants","Colour","HUE"],20),t.checkBlockColourConstant_("VARIABLES_HUE",["Blocks","variables","HUE"],void 0),t.checkBlockColourConstant_("VARIABLES_HUE",["Constants","Variables","HUE"],330),t.checkBlockColourConstant_("VARIABLES_DYNAMIC_HUE",["Constants","VariablesDynamic","HUE"],310),t.checkBlockColourConstant_("PROCEDURES_HUE",["Blocks","procedures","HUE"],void 0)},t.checkBlockColourConstant_=function(e,i,n){for(var o="Blockly",r=t,s=0;s<i.length;++s)o+="."+i[s],r&&(r=r[i[s]]);r&&r!==n&&(e=(void 0===n?'%1 has been removed. Use Blockly.Msg["%2"].':'%1 is deprecated and unused. Override Blockly.Msg["%2"].').replace("%1",o).replace("%2",e),console.warn(e))},t.setParentContainer=function(e){t.parentContainer=e},t.bindEvent_=t.browserEvents.bind,t.unbindEvent_=t.browserEvents.unbind,t.bindEventWithChecks_=t.browserEvents.conditionalBind,t.ALIGN_LEFT=t.constants.ALIGN.LEFT,t.ALIGN_CENTRE=t.constants.ALIGN.CENTRE,t.ALIGN_RIGHT=t.constants.ALIGN.RIGHT,t.INPUT_VALUE=t.connectionTypes.INPUT_VALUE,t.OUTPUT_VALUE=t.connectionTypes.OUTPUT_VALUE,t.NEXT_STATEMENT=t.connectionTypes.NEXT_STATEMENT,t.PREVIOUS_STATEMENT=t.connectionTypes.PREVIOUS_STATEMENT,t.DUMMY_INPUT=t.inputTypes.DUMMY,t.TOOLBOX_AT_TOP=t.utils.toolbox.Position.TOP,t.TOOLBOX_AT_BOTTOM=t.utils.toolbox.Position.BOTTOM,t.TOOLBOX_AT_LEFT=t.utils.toolbox.Position.LEFT,t.TOOLBOX_AT_RIGHT=t.utils.toolbox.Position.RIGHT,t.Events.BubbleOpen=function(e,i,n){t.Events.BubbleOpen.superClass_.constructor.call(this,e?e.workspace.id:void 0),this.blockId=e?e.id:null,this.isOpen=i,this.bubbleType=n},t.utils.object.inherits(t.Events.BubbleOpen,t.Events.UiBase),t.Events.BubbleOpen.prototype.type=t.Events.BUBBLE_OPEN,t.Events.BubbleOpen.prototype.toJson=function(){var e=t.Events.BubbleOpen.superClass_.toJson.call(this);return e.isOpen=this.isOpen,e.bubbleType=this.bubbleType,e.blockId=this.blockId,e},t.Events.BubbleOpen.prototype.fromJson=function(e){t.Events.BubbleOpen.superClass_.fromJson.call(this,e),this.isOpen=e.isOpen,this.bubbleType=e.bubbleType,this.blockId=e.blockId},t.registry.register(t.registry.Type.EVENT,t.Events.BUBBLE_OPEN,t.Events.BubbleOpen),t.Icon=function(t){this.block_=t,this.iconGroup_=null},t.Icon.prototype.collapseHidden=!0,t.Icon.prototype.SIZE=17,t.Icon.prototype.bubble_=null,t.Icon.prototype.iconXY_=null,t.Icon.prototype.createIcon=function(){this.iconGroup_||(this.iconGroup_=t.utils.dom.createSvgElement(t.utils.Svg.G,{class:"blocklyIconGroup"},null),this.block_.isInFlyout&&t.utils.dom.addClass(this.iconGroup_,"blocklyIconGroupReadonly"),this.drawIcon_(this.iconGroup_),this.block_.getSvgRoot().appendChild(this.iconGroup_),t.browserEvents.conditionalBind(this.iconGroup_,"mouseup",this,this.iconClick_),this.updateEditable())},t.Icon.prototype.dispose=function(){t.utils.dom.removeNode(this.iconGroup_),this.iconGroup_=null,this.setVisible(!1),this.block_=null},t.Icon.prototype.updateEditable=function(){},t.Icon.prototype.isVisible=function(){return!!this.bubble_},t.Icon.prototype.iconClick_=function(e){this.block_.workspace.isDragging()||this.block_.isInFlyout||t.utils.isRightButton(e)||this.setVisible(!this.isVisible())},t.Icon.prototype.applyColour=function(){this.isVisible()&&this.bubble_.setColour(this.block_.style.colourPrimary)},t.Icon.prototype.setIconLocation=function(t){this.iconXY_=t,this.isVisible()&&this.bubble_.setAnchorLocation(t)},t.Icon.prototype.computeIconLocation=function(){var e=this.block_.getRelativeToSurfaceXY(),i=t.utils.getRelativeXY(this.iconGroup_);e=new t.utils.Coordinate(e.x+i.x+this.SIZE/2,e.y+i.y+this.SIZE/2),t.utils.Coordinate.equals(this.getIconLocation(),e)||this.setIconLocation(e)},t.Icon.prototype.getIconLocation=function(){return this.iconXY_},t.Icon.prototype.getCorrectedSize=function(){return new t.utils.Size(t.Icon.prototype.SIZE,t.Icon.prototype.SIZE-2)},t.Warning=function(e){t.Warning.superClass_.constructor.call(this,e),this.createIcon(),this.text_=Object.create(null)},t.utils.object.inherits(t.Warning,t.Icon),t.Warning.prototype.collapseHidden=!1,t.Warning.prototype.drawIcon_=function(e){t.utils.dom.createSvgElement(t.utils.Svg.PATH,{class:"blocklyIconShape",d:"M2,15Q-1,15 0.5,12L6.5,1.7Q8,-1 9.5,1.7L15.5,12Q17,15 14,15z"},e),t.utils.dom.createSvgElement(t.utils.Svg.PATH,{class:"blocklyIconSymbol",d:"m7,4.8v3.16l0.27,2.27h1.46l0.27,-2.27v-3.16z"},e),t.utils.dom.createSvgElement(t.utils.Svg.RECT,{class:"blocklyIconSymbol",x:"7",y:"11",height:"2",width:"2"},e)},t.Warning.prototype.setVisible=function(e){e!=this.isVisible()&&(t.Events.fire(new(t.Events.get(t.Events.BUBBLE_OPEN))(this.block_,e,"warning")),e?this.createBubble_():this.disposeBubble_())},t.Warning.prototype.createBubble_=function(){this.paragraphElement_=t.Bubble.textToDom(this.getText()),this.bubble_=t.Bubble.createNonEditableBubble(this.paragraphElement_,this.block_,this.iconXY_),this.applyColour()},t.Warning.prototype.disposeBubble_=function(){this.bubble_.dispose(),this.paragraphElement_=this.bubble_=null},t.Warning.prototype.setText=function(t,e){this.text_[e]!=t&&(t?this.text_[e]=t:delete this.text_[e],this.isVisible()&&(this.setVisible(!1),this.setVisible(!0)))},t.Warning.prototype.getText=function(){var t,e=[];for(t in this.text_)e.push(this.text_[t]);return e.join("\n")},t.Warning.prototype.dispose=function(){this.block_.warning=null,t.Icon.prototype.dispose.call(this)},t.Comment=function(e){t.Comment.superClass_.constructor.call(this,e),this.model_=e.commentModel,this.model_.text=this.model_.text||"",this.cachedText_="",this.onInputWrapper_=this.onChangeWrapper_=this.onWheelWrapper_=this.onMouseUpWrapper_=null,this.createIcon()},t.utils.object.inherits(t.Comment,t.Icon),t.Comment.prototype.drawIcon_=function(e){t.utils.dom.createSvgElement(t.utils.Svg.CIRCLE,{class:"blocklyIconShape",r:"8",cx:"8",cy:"8"},e),t.utils.dom.createSvgElement(t.utils.Svg.PATH,{class:"blocklyIconSymbol",d:"m6.8,10h2c0.003,-0.617 0.271,-0.962 0.633,-1.266 2.875,-2.4050.607,-5.534 -3.765,-3.874v1.7c3.12,-1.657 3.698,0.118 2.336,1.25-1.201,0.998 -1.201,1.528 -1.204,2.19z"},e),t.utils.dom.createSvgElement(t.utils.Svg.RECT,{class:"blocklyIconSymbol",x:"6.8",y:"10.78",height:"2",width:"2"},e)},t.Comment.prototype.createEditor_=function(){this.foreignObject_=t.utils.dom.createSvgElement(t.utils.Svg.FOREIGNOBJECT,{x:t.Bubble.BORDER_WIDTH,y:t.Bubble.BORDER_WIDTH},null);var e=document.createElementNS(t.utils.dom.HTML_NS,"body");e.setAttribute("xmlns",t.utils.dom.HTML_NS),e.className="blocklyMinimalBody";var i=this.textarea_=document.createElementNS(t.utils.dom.HTML_NS,"textarea");return i.className="blocklyCommentTextarea",i.setAttribute("dir",this.block_.RTL?"RTL":"LTR"),i.value=this.model_.text,this.resizeTextarea_(),e.appendChild(i),this.foreignObject_.appendChild(e),this.onMouseUpWrapper_=t.browserEvents.conditionalBind(i,"mouseup",this,this.startEdit_,!0,!0),this.onWheelWrapper_=t.browserEvents.conditionalBind(i,"wheel",this,function(t){t.stopPropagation()}),this.onChangeWrapper_=t.browserEvents.conditionalBind(i,"change",this,function(e){this.cachedText_!=this.model_.text&&t.Events.fire(new(t.Events.get(t.Events.BLOCK_CHANGE))(this.block_,"comment",null,this.cachedText_,this.model_.text))}),this.onInputWrapper_=t.browserEvents.conditionalBind(i,"input",this,function(t){this.model_.text=i.value}),setTimeout(i.focus.bind(i),0),this.foreignObject_},t.Comment.prototype.updateEditable=function(){t.Comment.superClass_.updateEditable.call(this),this.isVisible()&&(this.disposeBubble_(),this.createBubble_())},t.Comment.prototype.onBubbleResize_=function(){this.isVisible()&&(this.model_.size=this.bubble_.getBubbleSize(),this.resizeTextarea_())},t.Comment.prototype.resizeTextarea_=function(){var e=this.model_.size,i=2*t.Bubble.BORDER_WIDTH,n=e.width-i;e=e.height-i,this.foreignObject_.setAttribute("width",n),this.foreignObject_.setAttribute("height",e),this.textarea_.style.width=n-4+"px",this.textarea_.style.height=e-4+"px"},t.Comment.prototype.setVisible=function(e){e!=this.isVisible()&&(t.Events.fire(new(t.Events.get(t.Events.BUBBLE_OPEN))(this.block_,e,"comment")),(this.model_.pinned=e)?this.createBubble_():this.disposeBubble_())},t.Comment.prototype.createBubble_=function(){!this.block_.isEditable()||t.utils.userAgent.IE?this.createNonEditableBubble_():this.createEditableBubble_()},t.Comment.prototype.createEditableBubble_=function(){this.bubble_=new t.Bubble(this.block_.workspace,this.createEditor_(),this.block_.pathObject.svgPath,this.iconXY_,this.model_.size.width,this.model_.size.height),this.bubble_.setSvgId(this.block_.id),this.bubble_.registerResizeEvent(this.onBubbleResize_.bind(this)),this.applyColour()},t.Comment.prototype.createNonEditableBubble_=function(){this.paragraphElement_=t.Bubble.textToDom(this.block_.getCommentText()),this.bubble_=t.Bubble.createNonEditableBubble(this.paragraphElement_,this.block_,this.iconXY_),this.applyColour()},t.Comment.prototype.disposeBubble_=function(){this.onMouseUpWrapper_&&(t.browserEvents.unbind(this.onMouseUpWrapper_),this.onMouseUpWrapper_=null),this.onWheelWrapper_&&(t.browserEvents.unbind(this.onWheelWrapper_),this.onWheelWrapper_=null),this.onChangeWrapper_&&(t.browserEvents.unbind(this.onChangeWrapper_),this.onChangeWrapper_=null),this.onInputWrapper_&&(t.browserEvents.unbind(this.onInputWrapper_),this.onInputWrapper_=null),this.bubble_.dispose(),this.paragraphElement_=this.foreignObject_=this.textarea_=this.bubble_=null},t.Comment.prototype.startEdit_=function(t){this.bubble_.promote()&&this.textarea_.focus(),this.cachedText_=this.model_.text},t.Comment.prototype.getBubbleSize=function(){return this.model_.size},t.Comment.prototype.setBubbleSize=function(t,e){this.bubble_?this.bubble_.setBubbleSize(t,e):(this.model_.size.width=t,this.model_.size.height=e)},t.Comment.prototype.updateText=function(){this.textarea_?this.textarea_.value=this.model_.text:this.paragraphElement_&&(this.paragraphElement_.firstChild.textContent=this.model_.text)},t.Comment.prototype.dispose=function(){this.block_.comment=null,t.Icon.prototype.dispose.call(this)},t.Css.register(".blocklyCommentTextarea {,background-color: #fef49c;,border: 0;,outline: 0;,margin: 0;,padding: 3px;,resize: none;,display: block;,text-overflow: hidden;,}".split(",")),t.IComponent=function(){},t.IDragTarget=function(){},t.DragTarget=function(){},t.DragTarget.prototype.onDragEnter=function(t){},t.DragTarget.prototype.onDragOver=function(t){},t.DragTarget.prototype.onDragExit=function(t){},t.DragTarget.prototype.onDrop=function(t){},t.DragTarget.prototype.shouldPreventMove=function(t){return!1},t.IDeleteArea=function(){},t.DeleteArea=function(){t.DeleteArea.superClass_.constructor.call(this),this.wouldDelete_=!1},t.utils.object.inherits(t.DeleteArea,t.DragTarget),t.DeleteArea.prototype.wouldDelete=function(e,i){return e instanceof t.BlockSvg?(e=!e.getParent()&&e.isDeletable(),this.updateWouldDelete_(e&&!i)):this.updateWouldDelete_(e.isDeletable()),this.wouldDelete_},t.DeleteArea.prototype.updateWouldDelete_=function(t){this.wouldDelete_=t},t.IFlyout=function(){},t.Flyout=function(e){t.Flyout.superClass_.constructor.call(this),e.setMetrics=this.setMetrics_.bind(this),this.workspace_=new t.WorkspaceSvg(e),this.workspace_.setMetricsManager(new t.FlyoutMetricsManager(this.workspace_,this)),this.workspace_.isFlyout=!0,this.workspace_.setVisible(this.isVisible_),this.id=t.utils.genUid(),this.RTL=!!e.RTL,this.horizontalLayout=!1,this.toolboxPosition_=e.toolboxPosition,this.eventWrappers_=[],this.mats_=[],this.buttons_=[],this.listeners_=[],this.permanentlyDisabled_=[],this.tabWidth_=this.workspace_.getRenderer().getConstants().TAB_WIDTH,this.targetWorkspace=null},t.utils.object.inherits(t.Flyout,t.DeleteArea),t.Flyout.prototype.autoClose=!0,t.Flyout.prototype.isVisible_=!1,t.Flyout.prototype.containerVisible_=!0,t.Flyout.prototype.CORNER_RADIUS=8,t.Flyout.prototype.MARGIN=t.Flyout.prototype.CORNER_RADIUS,t.Flyout.prototype.GAP_X=3*t.Flyout.prototype.MARGIN,t.Flyout.prototype.GAP_Y=3*t.Flyout.prototype.MARGIN,t.Flyout.prototype.SCROLLBAR_MARGIN=2.5,t.Flyout.prototype.width_=0,t.Flyout.prototype.height_=0,t.Flyout.prototype.dragAngleRange_=70,t.Flyout.prototype.createDom=function(e){return this.svgGroup_=t.utils.dom.createSvgElement(e,{class:"blocklyFlyout",style:"display: none"},null),this.svgBackground_=t.utils.dom.createSvgElement(t.utils.Svg.PATH,{class:"blocklyFlyoutBackground"},this.svgGroup_),this.svgGroup_.appendChild(this.workspace_.createDom()),this.workspace_.getThemeManager().subscribe(this.svgBackground_,"flyoutBackgroundColour","fill"),this.workspace_.getThemeManager().subscribe(this.svgBackground_,"flyoutOpacity","fill-opacity"),this.svgGroup_},t.Flyout.prototype.init=function(e){this.targetWorkspace=e,this.workspace_.targetWorkspace=e,this.workspace_.scrollbar=new t.ScrollbarPair(this.workspace_,this.horizontalLayout,!this.horizontalLayout,"blocklyFlyoutScrollbar",this.SCROLLBAR_MARGIN),this.hide(),Array.prototype.push.apply(this.eventWrappers_,t.browserEvents.conditionalBind(this.svgGroup_,"wheel",this,this.wheel_)),this.autoClose||(this.filterWrapper_=this.filterForCapacity_.bind(this),this.targetWorkspace.addChangeListener(this.filterWrapper_)),Array.prototype.push.apply(this.eventWrappers_,t.browserEvents.conditionalBind(this.svgBackground_,"mousedown",this,this.onMouseDown_)),this.workspace_.getGesture=this.targetWorkspace.getGesture.bind(this.targetWorkspace),this.workspace_.setVariableMap(this.targetWorkspace.getVariableMap()),this.workspace_.createPotentialVariableMap(),e.getComponentManager().addComponent({component:this,weight:1,capabilities:[t.ComponentManager.Capability.DELETE_AREA,t.ComponentManager.Capability.DRAG_TARGET]})},t.Flyout.prototype.dispose=function(){this.hide(),this.workspace_.getComponentManager().removeComponent(this.id),t.browserEvents.unbind(this.eventWrappers_),this.filterWrapper_&&(this.targetWorkspace.removeChangeListener(this.filterWrapper_),this.filterWrapper_=null),this.workspace_&&(this.workspace_.getThemeManager().unsubscribe(this.svgBackground_),this.workspace_.targetWorkspace=null,this.workspace_.dispose(),this.workspace_=null),this.svgGroup_&&(t.utils.dom.removeNode(this.svgGroup_),this.svgGroup_=null),this.targetWorkspace=this.svgBackground_=null},t.Flyout.prototype.getWidth=function(){return this.width_},t.Flyout.prototype.getHeight=function(){return this.height_},t.Flyout.prototype.getFlyoutScale=function(){return this.targetWorkspace.scale},t.Flyout.prototype.getWorkspace=function(){return this.workspace_},t.Flyout.prototype.isVisible=function(){return this.isVisible_},t.Flyout.prototype.setVisible=function(t){var e=t!=this.isVisible();this.isVisible_=t,e&&(this.autoClose||this.workspace_.recordDragTargets(),this.updateDisplay_())},t.Flyout.prototype.setContainerVisible=function(t){var e=t!=this.containerVisible_;this.containerVisible_=t,e&&this.updateDisplay_()},t.Flyout.prototype.updateDisplay_=function(){var t=!!this.containerVisible_&&this.isVisible();this.svgGroup_.style.display=t?"block":"none",this.workspace_.scrollbar.setContainerVisible(t)},t.Flyout.prototype.positionAt_=function(e,i,n,o){this.svgGroup_.setAttribute("width",e),this.svgGroup_.setAttribute("height",i),this.workspace_.setCachedParentSvgSize(e,i),"svg"==this.svgGroup_.tagName?t.utils.dom.setCssTransform(this.svgGroup_,"translate("+n+"px,"+o+"px)"):this.svgGroup_.setAttribute("transform","translate("+n+","+o+")"),(e=this.workspace_.scrollbar)&&(e.setOrigin(n,o),e.resize(),e.hScroll&&e.hScroll.setPosition(e.hScroll.position.x,e.hScroll.position.y),e.vScroll&&e.vScroll.setPosition(e.vScroll.position.x,e.vScroll.position.y))},t.Flyout.prototype.hide=function(){if(this.isVisible()){this.setVisible(!1);for(var e,i=0;e=this.listeners_[i];i++)t.browserEvents.unbind(e);this.listeners_.length=0,this.reflowWrapper_&&(this.workspace_.removeChangeListener(this.reflowWrapper_),this.reflowWrapper_=null)}},t.Flyout.prototype.show=function(e){this.workspace_.setResizesEnabled(!1),this.hide(),this.clearOldBlocks_(),"string"==typeof e&&(e=this.getDynamicCategoryContents_(e)),this.setVisible(!0),e=t.utils.toolbox.convertFlyoutDefToJsonArray(e),e=this.createFlyoutInfo_(e),this.layout_(e.contents,e.gaps),this.listeners_.push(t.browserEvents.conditionalBind(this.svgBackground_,"mouseover",this,function(){for(var t,e=this.workspace_.getTopBlocks(!1),i=0;t=e[i];i++)t.removeSelect()})),this.horizontalLayout?this.height_=0:this.width_=0,this.workspace_.setResizesEnabled(!0),this.reflow(),this.filterForCapacity_(),this.position(),this.reflowWrapper_=this.reflow.bind(this),this.workspace_.addChangeListener(this.reflowWrapper_)},t.Flyout.prototype.createFlyoutInfo_=function(e){var i=[],n=[];this.permanentlyDisabled_.length=0;for(var o,r=this.horizontalLayout?this.GAP_X:this.GAP_Y,s=0;o=e[s];s++)switch(o.custom&&(o=this.getDynamicCategoryContents_(o.custom),o=t.utils.toolbox.convertFlyoutDefToJsonArray(o),e.splice.apply(e,[s,1].concat(o)),o=e[s]),o.kind.toUpperCase()){case"BLOCK":var a=o,l=this.getBlockXml_(a);o=this.createBlock_(l),a=parseInt(a.gap||l.getAttribute("gap"),10),n.push(isNaN(a)?r:a),i.push({type:"block",block:o});break;case"SEP":this.addSeparatorGap_(o,n,r);break;case"LABEL":o=this.createButton_(o,!0),i.push({type:"button",button:o}),n.push(r);break;case"BUTTON":o=this.createButton_(o,!1),i.push({type:"button",button:o}),n.push(r)}return{contents:i,gaps:n}},t.Flyout.prototype.getDynamicCategoryContents_=function(t){if("function"!=typeof(t=this.workspace_.targetWorkspace.getToolboxCategoryCallback(t)))throw TypeError("Couldn't find a callback function when opening a toolbox category.");if(t=t(this.workspace_.targetWorkspace),!Array.isArray(t))throw new TypeError("Result of toolbox category callback must be an array.");return t},t.Flyout.prototype.createButton_=function(e,i){if(!t.FlyoutButton)throw Error("Missing require for Blockly.FlyoutButton");return new t.FlyoutButton(this.workspace_,this.targetWorkspace,e,i)},t.Flyout.prototype.createBlock_=function(e){return(e=t.Xml.domToBlock(e,this.workspace_)).isEnabled()||this.permanentlyDisabled_.push(e),e},t.Flyout.prototype.getBlockXml_=function(e){var i=null,n=e.blockxml;if(n&&"string"!=typeof n?i=n:n&&"string"==typeof n?(i=t.Xml.textToDom(n),e.blockxml=i):e.type&&((i=t.utils.xml.createElement("xml")).setAttribute("type",e.type),i.setAttribute("disabled",e.disabled),e.blockxml=i),!i)throw Error("Error: Invalid block definition. Block definition must have blockxml or type.");return i},t.Flyout.prototype.addSeparatorGap_=function(t,e,i){t=parseInt(t.gap,10),!isNaN(t)&&0<e.length?e[e.length-1]=t:e.push(i)},t.Flyout.prototype.clearOldBlocks_=function(){for(var e,i=this.workspace_.getTopBlocks(!1),n=0;e=i[n];n++)e.workspace==this.workspace_&&e.dispose(!1,!1);for(n=0;n<this.mats_.length;n++)(i=this.mats_[n])&&(t.Tooltip.unbindMouseEvents(i),t.utils.dom.removeNode(i));for(n=this.mats_.length=0;i=this.buttons_[n];n++)i.dispose();this.buttons_.length=0,this.workspace_.getPotentialVariableMap().clear()},t.Flyout.prototype.addBlockListeners_=function(e,i,n){this.listeners_.push(t.browserEvents.conditionalBind(e,"mousedown",null,this.blockMouseDown_(i))),this.listeners_.push(t.browserEvents.conditionalBind(n,"mousedown",null,this.blockMouseDown_(i))),this.listeners_.push(t.browserEvents.bind(e,"mouseenter",i,i.addSelect)),this.listeners_.push(t.browserEvents.bind(e,"mouseleave",i,i.removeSelect)),this.listeners_.push(t.browserEvents.bind(n,"mouseenter",i,i.addSelect)),this.listeners_.push(t.browserEvents.bind(n,"mouseleave",i,i.removeSelect))},t.Flyout.prototype.blockMouseDown_=function(t){var e=this;return function(i){var n=e.targetWorkspace.getGesture(i);n&&(n.setStartBlock(t),n.handleFlyoutStart(i,e))}},t.Flyout.prototype.onMouseDown_=function(t){var e=this.targetWorkspace.getGesture(t);e&&e.handleFlyoutStart(t,this)},t.Flyout.prototype.isBlockCreatable_=function(t){return t.isEnabled()},t.Flyout.prototype.createBlock=function(e){var i=null;t.Events.disable();var n=this.targetWorkspace.getAllVariables();this.targetWorkspace.setResizesEnabled(!1);try{i=this.placeNewBlock_(e)}finally{t.Events.enable()}if(t.hideChaff(),e=t.Variables.getAddedVariables(this.targetWorkspace,n),t.Events.isEnabled()){for(t.Events.setGroup(!0),n=0;n<e.length;n++){var o=e[n];t.Events.fire(new(t.Events.get(t.Events.VAR_CREATE))(o))}t.Events.fire(new(t.Events.get(t.Events.BLOCK_CREATE))(i))}return this.autoClose?this.hide():this.filterForCapacity_(),i},t.Flyout.prototype.initFlyoutButton_=function(e,i,n){var o=e.createDom();e.moveTo(i,n),e.show(),this.listeners_.push(t.browserEvents.conditionalBind(o,"mousedown",this,this.onMouseDown_)),this.buttons_.push(e)},t.Flyout.prototype.createRect_=function(e,i,n,o,r){return(i=t.utils.dom.createSvgElement(t.utils.Svg.RECT,{"fill-opacity":0,x:i,y:n,height:o.height,width:o.width},null)).tooltip=e,t.Tooltip.bindMouseEvents(i),this.workspace_.getCanvas().insertBefore(i,e.getSvgRoot()),e.flyoutRect_=i,this.mats_[r]=i},t.Flyout.prototype.moveRectToBlock_=function(t,e){var i=e.getHeightWidth();t.setAttribute("width",i.width),t.setAttribute("height",i.height),e=e.getRelativeToSurfaceXY(),t.setAttribute("y",e.y),t.setAttribute("x",this.RTL?e.x-i.width:e.x)},t.Flyout.prototype.filterForCapacity_=function(){for(var e,i=this.workspace_.getTopBlocks(!1),n=0;e=i[n];n++)if(-1==this.permanentlyDisabled_.indexOf(e))for(var o=this.targetWorkspace.isCapacityAvailable(t.utils.getBlockTypeCounts(e));e;)e.setEnabled(o),e=e.getNextBlock()},t.Flyout.prototype.reflow=function(){this.reflowWrapper_&&this.workspace_.removeChangeListener(this.reflowWrapper_),this.reflowInternal_(),this.reflowWrapper_&&this.workspace_.addChangeListener(this.reflowWrapper_)},t.Flyout.prototype.isScrollable=function(){return!!this.workspace_.scrollbar&&this.workspace_.scrollbar.isVisible()},t.Flyout.prototype.placeNewBlock_=function(e){var i=this.targetWorkspace;if(!e.getSvgRoot())throw Error("oldBlock is not rendered.");var n=t.Xml.blockToDom(e,!0);if(i.setResizesEnabled(!1),!(n=t.Xml.domToBlock(n,i)).getSvgRoot())throw Error("block is not rendered.");var o=i.getOriginOffsetInPixels(),r=this.workspace_.getOriginOffsetInPixels();return(e=e.getRelativeToSurfaceXY()).scale(this.workspace_.scale),e=t.utils.Coordinate.sum(r,e),(o=t.utils.Coordinate.difference(e,o)).scale(1/i.scale),n.moveBy(o.x,o.y),n},t.HorizontalFlyout=function(e){t.HorizontalFlyout.superClass_.constructor.call(this,e),this.horizontalLayout=!0},t.utils.object.inherits(t.HorizontalFlyout,t.Flyout),t.HorizontalFlyout.prototype.setMetrics_=function(t){if(this.isVisible()){var e=this.workspace_.getMetricsManager(),i=e.getScrollMetrics(),n=e.getViewMetrics();e=e.getAbsoluteMetrics(),"number"==typeof t.x&&(this.workspace_.scrollX=-(i.left+(i.width-n.width)*t.x)),this.workspace_.translate(this.workspace_.scrollX+e.left,this.workspace_.scrollY+e.top)}},t.HorizontalFlyout.prototype.getX=function(){return 0},t.HorizontalFlyout.prototype.getY=function(){if(!this.isVisible())return 0;var e=this.targetWorkspace.getMetricsManager(),i=e.getAbsoluteMetrics(),n=e.getViewMetrics();e=e.getToolboxMetrics();var o=this.toolboxPosition_==t.utils.toolbox.Position.TOP;return this.targetWorkspace.toolboxPosition==this.toolboxPosition_?this.targetWorkspace.getToolbox()?o?e.height:n.height-this.height_:o?0:n.height:o?0:n.height+i.top-this.height_},t.HorizontalFlyout.prototype.position=function(){if(this.isVisible()&&this.targetWorkspace.isVisible()){var t=this.targetWorkspace.getMetricsManager().getViewMetrics();this.width_=t.width,this.setBackgroundPath_(t.width-2*this.CORNER_RADIUS,this.height_-this.CORNER_RADIUS),t=this.getX();var e=this.getY();this.positionAt_(this.width_,this.height_,t,e)}},t.HorizontalFlyout.prototype.setBackgroundPath_=function(e,i){var n=this.toolboxPosition_==t.utils.toolbox.Position.TOP,o=["M 0,"+(n?0:this.CORNER_RADIUS)];n?(o.push("h",e+2*this.CORNER_RADIUS),o.push("v",i),o.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,1,-this.CORNER_RADIUS,this.CORNER_RADIUS),o.push("h",-e),o.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,1,-this.CORNER_RADIUS,-this.CORNER_RADIUS)):(o.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,1,this.CORNER_RADIUS,-this.CORNER_RADIUS),o.push("h",e),o.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,1,this.CORNER_RADIUS,this.CORNER_RADIUS),o.push("v",i),o.push("h",-e-2*this.CORNER_RADIUS)),o.push("z"),this.svgBackground_.setAttribute("d",o.join(" "))},t.HorizontalFlyout.prototype.scrollToStart=function(){this.workspace_.scrollbar.setX(this.RTL?1/0:0)},t.HorizontalFlyout.prototype.wheel_=function(e){var i=t.utils.getScrollDeltaPixels(e);if(i=i.x||i.y){var n=this.workspace_.getMetricsManager(),o=n.getScrollMetrics();i=n.getViewMetrics().left-o.left+i,this.workspace_.scrollbar.setX(i),t.WidgetDiv.hide(),t.DropDownDiv.hideWithoutAnimation()}e.preventDefault(),e.stopPropagation()},t.HorizontalFlyout.prototype.layout_=function(t,e){this.workspace_.scale=this.targetWorkspace.scale;var i=this.MARGIN,n=i+this.tabWidth_;this.RTL&&(t=t.reverse());for(var o,r=0;o=t[r];r++)if("block"==o.type){for(var s,a=(o=o.block).getDescendants(!1),l=0;s=a[l];l++)s.isInFlyout=!0;o.render(),a=o.getSvgRoot(),l=o.getHeightWidth(),s=o.outputConnection?this.tabWidth_:0,s=this.RTL?n+l.width:n-s,o.moveBy(s,i),s=this.createRect_(o,s,i,l,r),n+=l.width+e[r],this.addBlockListeners_(a,o,s)}else"button"==o.type&&(this.initFlyoutButton_(o.button,n,i),n+=o.button.width+e[r])},t.HorizontalFlyout.prototype.isDragTowardWorkspace=function(t){t=Math.atan2(t.y,t.x)/Math.PI*180;var e=this.dragAngleRange_;return t<90+e&&t>90-e||t>-90-e&&t<-90+e},t.HorizontalFlyout.prototype.getClientRect=function(){if(!this.svgGroup_||this.autoClose||!this.isVisible())return null;var e=this.svgGroup_.getBoundingClientRect(),i=e.top;return this.toolboxPosition_==t.utils.toolbox.Position.TOP?new t.utils.Rect(-1e9,i+e.height,-1e9,1e9):new t.utils.Rect(i,1e9,-1e9,1e9)},t.HorizontalFlyout.prototype.reflowInternal_=function(){this.workspace_.scale=this.getFlyoutScale();for(var e,i=0,n=this.workspace_.getTopBlocks(!1),o=0;e=n[o];o++)i=Math.max(i,e.getHeightWidth().height);if(i+=1.5*this.MARGIN,i*=this.workspace_.scale,i+=t.Scrollbar.scrollbarThickness,this.height_!=i){for(o=0;e=n[o];o++)e.flyoutRect_&&this.moveRectToBlock_(e.flyoutRect_,e);this.targetWorkspace.toolboxPosition!=this.toolboxPosition_||this.toolboxPosition_!=t.utils.toolbox.Position.TOP||this.targetWorkspace.getToolbox()||this.targetWorkspace.translate(this.targetWorkspace.scrollX,this.targetWorkspace.scrollY+i),this.height_=i,this.position(),this.targetWorkspace.recordDragTargets()}},t.registry.register(t.registry.Type.FLYOUTS_HORIZONTAL_TOOLBOX,t.registry.DEFAULT,t.HorizontalFlyout),t.VerticalFlyout=function(e){t.VerticalFlyout.superClass_.constructor.call(this,e)},t.utils.object.inherits(t.VerticalFlyout,t.Flyout),t.VerticalFlyout.registryName="verticalFlyout",t.VerticalFlyout.prototype.setMetrics_=function(t){if(this.isVisible()){var e=this.workspace_.getMetricsManager(),i=e.getScrollMetrics(),n=e.getViewMetrics();e=e.getAbsoluteMetrics(),"number"==typeof t.y&&(this.workspace_.scrollY=-(i.top+(i.height-n.height)*t.y)),this.workspace_.translate(this.workspace_.scrollX+e.left,this.workspace_.scrollY+e.top)}},t.VerticalFlyout.prototype.getX=function(){if(!this.isVisible())return 0;var e=this.targetWorkspace.getMetricsManager(),i=e.getAbsoluteMetrics(),n=e.getViewMetrics();return e=e.getToolboxMetrics(),this.targetWorkspace.toolboxPosition==this.toolboxPosition_?this.targetWorkspace.getToolbox()?this.toolboxPosition_==t.utils.toolbox.Position.LEFT?e.width:n.width-this.width_:this.toolboxPosition_==t.utils.toolbox.Position.LEFT?0:n.width:this.toolboxPosition_==t.utils.toolbox.Position.LEFT?0:n.width+i.left-this.width_},t.VerticalFlyout.prototype.getY=function(){return 0},t.VerticalFlyout.prototype.position=function(){if(this.isVisible()&&this.targetWorkspace.isVisible()){var t=this.targetWorkspace.getMetricsManager().getViewMetrics();this.height_=t.height,this.setBackgroundPath_(this.width_-this.CORNER_RADIUS,t.height-2*this.CORNER_RADIUS),t=this.getX();var e=this.getY();this.positionAt_(this.width_,this.height_,t,e)}},t.VerticalFlyout.prototype.setBackgroundPath_=function(e,i){var n=this.toolboxPosition_==t.utils.toolbox.Position.RIGHT,o=e+this.CORNER_RADIUS;(o=["M "+(n?o:0)+",0"]).push("h",n?-e:e),o.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,n?0:1,n?-this.CORNER_RADIUS:this.CORNER_RADIUS,this.CORNER_RADIUS),o.push("v",Math.max(0,i)),o.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,n?0:1,n?this.CORNER_RADIUS:-this.CORNER_RADIUS,this.CORNER_RADIUS),o.push("h",n?e:-e),o.push("z"),this.svgBackground_.setAttribute("d",o.join(" "))},t.VerticalFlyout.prototype.scrollToStart=function(){this.workspace_.scrollbar.setY(0)},t.VerticalFlyout.prototype.wheel_=function(e){var i=t.utils.getScrollDeltaPixels(e);if(i.y){var n=this.workspace_.getMetricsManager(),o=n.getScrollMetrics();i=n.getViewMetrics().top-o.top+i.y,this.workspace_.scrollbar.setY(i),t.WidgetDiv.hide(),t.DropDownDiv.hideWithoutAnimation()}e.preventDefault(),e.stopPropagation()},t.VerticalFlyout.prototype.layout_=function(t,e){this.workspace_.scale=this.targetWorkspace.scale;for(var i,n=this.MARGIN,o=this.RTL?n:n+this.tabWidth_,r=0;i=t[r];r++)if("block"==i.type){for(var s,a=(i=i.block).getDescendants(!1),l=0;s=a[l];l++)s.isInFlyout=!0;i.render(),a=i.getSvgRoot(),l=i.getHeightWidth(),s=i.outputConnection?o-this.tabWidth_:o,i.moveBy(s,n),s=this.createRect_(i,this.RTL?s-l.width:s,n,l,r),this.addBlockListeners_(a,i,s),n+=l.height+e[r]}else"button"==i.type&&(this.initFlyoutButton_(i.button,o,n),n+=i.button.height+e[r])},t.VerticalFlyout.prototype.isDragTowardWorkspace=function(t){t=Math.atan2(t.y,t.x)/Math.PI*180;var e=this.dragAngleRange_;return t<e&&t>-e||t<-180+e||t>180-e},t.VerticalFlyout.prototype.getClientRect=function(){if(!this.svgGroup_||this.autoClose||!this.isVisible())return null;var e=this.svgGroup_.getBoundingClientRect(),i=e.left;return this.toolboxPosition_==t.utils.toolbox.Position.LEFT?new t.utils.Rect(-1e9,1e9,-1e9,i+e.width):new t.utils.Rect(-1e9,1e9,i,1e9)},t.VerticalFlyout.prototype.reflowInternal_=function(){this.workspace_.scale=this.getFlyoutScale();for(var e,i=0,n=this.workspace_.getTopBlocks(!1),o=0;e=n[o];o++){var r=e.getHeightWidth().width;e.outputConnection&&(r-=this.tabWidth_),i=Math.max(i,r)}for(o=0;e=this.buttons_[o];o++)i=Math.max(i,e.width);if(i+=1.5*this.MARGIN+this.tabWidth_,i*=this.workspace_.scale,i+=t.Scrollbar.scrollbarThickness,this.width_!=i){for(o=0;e=n[o];o++){if(this.RTL){r=e.getRelativeToSurfaceXY().x;var s=i/this.workspace_.scale-this.MARGIN;e.outputConnection||(s-=this.tabWidth_),e.moveBy(s-r,0)}e.flyoutRect_&&this.moveRectToBlock_(e.flyoutRect_,e)}if(this.RTL)for(o=0;e=this.buttons_[o];o++)n=e.getPosition().y,e.moveTo(i/this.workspace_.scale-e.width-this.MARGIN-this.tabWidth_,n);this.targetWorkspace.toolboxPosition!=this.toolboxPosition_||this.toolboxPosition_!=t.utils.toolbox.Position.LEFT||this.targetWorkspace.getToolbox()||this.targetWorkspace.translate(this.targetWorkspace.scrollX+i,this.targetWorkspace.scrollY),this.width_=i,this.position(),this.targetWorkspace.recordDragTargets()}},t.registry.register(t.registry.Type.FLYOUTS_VERTICAL_TOOLBOX,t.registry.DEFAULT,t.VerticalFlyout),t.FlyoutButton=function(e,i,n,o){this.workspace_=e,this.targetWorkspace_=i,this.text_=n.text,this.position_=new t.utils.Coordinate(0,0),this.isLabel_=o,this.callbackKey_=n.callbackKey||n.callbackkey,this.cssClass_=n["web-class"]||null,this.onMouseUpWrapper_=null,this.info=n},t.FlyoutButton.MARGIN_X=5,t.FlyoutButton.MARGIN_Y=2,t.FlyoutButton.prototype.width=0,t.FlyoutButton.prototype.height=0,t.FlyoutButton.prototype.createDom=function(){var e=this.isLabel_?"blocklyFlyoutLabel":"blocklyFlyoutButton";if(this.cssClass_&&(e+=" "+this.cssClass_),this.svgGroup_=t.utils.dom.createSvgElement(t.utils.Svg.G,{class:e},this.workspace_.getCanvas()),!this.isLabel_)var i=t.utils.dom.createSvgElement(t.utils.Svg.RECT,{class:"blocklyFlyoutButtonShadow",rx:4,ry:4,x:1,y:1},this.svgGroup_);e=t.utils.dom.createSvgElement(t.utils.Svg.RECT,{class:this.isLabel_?"blocklyFlyoutLabelBackground":"blocklyFlyoutButtonBackground",rx:4,ry:4},this.svgGroup_);var n=t.utils.dom.createSvgElement(t.utils.Svg.TEXT,{class:this.isLabel_?"blocklyFlyoutLabelText":"blocklyText",x:0,y:0,"text-anchor":"middle"},this.svgGroup_),o=t.utils.replaceMessageReferences(this.text_);this.workspace_.RTL&&(o+="‏"),n.textContent=o,this.isLabel_&&(this.svgText_=n,this.workspace_.getThemeManager().subscribe(this.svgText_,"flyoutForegroundColour","fill"));var r=t.utils.style.getComputedStyle(n,"fontSize"),s=t.utils.style.getComputedStyle(n,"fontWeight"),a=t.utils.style.getComputedStyle(n,"fontFamily");return this.width=t.utils.dom.getFastTextWidthWithSizeString(n,r,s,a),o=t.utils.dom.measureFontMetrics(o,r,s,a),this.height=o.height,this.isLabel_||(this.width+=2*t.FlyoutButton.MARGIN_X,this.height+=2*t.FlyoutButton.MARGIN_Y,i.setAttribute("width",this.width),i.setAttribute("height",this.height)),e.setAttribute("width",this.width),e.setAttribute("height",this.height),n.setAttribute("x",this.width/2),n.setAttribute("y",this.height/2-o.height/2+o.baseline),this.updateTransform_(),this.onMouseUpWrapper_=t.browserEvents.conditionalBind(this.svgGroup_,"mouseup",this,this.onMouseUp_),this.svgGroup_},t.FlyoutButton.prototype.show=function(){this.updateTransform_(),this.svgGroup_.setAttribute("display","block")},t.FlyoutButton.prototype.updateTransform_=function(){this.svgGroup_.setAttribute("transform","translate("+this.position_.x+","+this.position_.y+")")},t.FlyoutButton.prototype.moveTo=function(t,e){this.position_.x=t,this.position_.y=e,this.updateTransform_()},t.FlyoutButton.prototype.isLabel=function(){return this.isLabel_},t.FlyoutButton.prototype.getPosition=function(){return this.position_},t.FlyoutButton.prototype.getButtonText=function(){return this.text_},t.FlyoutButton.prototype.getTargetWorkspace=function(){return this.targetWorkspace_},t.FlyoutButton.prototype.dispose=function(){this.onMouseUpWrapper_&&t.browserEvents.unbind(this.onMouseUpWrapper_),this.svgGroup_&&t.utils.dom.removeNode(this.svgGroup_),this.svgText_&&this.workspace_.getThemeManager().unsubscribe(this.svgText_)},t.FlyoutButton.prototype.onMouseUp_=function(t){(t=this.targetWorkspace_.getGesture(t))&&t.cancel(),this.isLabel_&&this.callbackKey_?console.warn("Labels should not have callbacks. Label text: "+this.text_):this.isLabel_||this.callbackKey_&&this.targetWorkspace_.getButtonCallback(this.callbackKey_)?this.isLabel_||this.targetWorkspace_.getButtonCallback(this.callbackKey_)(this):console.warn("Buttons should have callbacks. Button text: "+this.text_)},t.Css.register(".blocklyFlyoutButton {,fill: #888;,cursor: default;,},.blocklyFlyoutButtonShadow {,fill: #666;,},.blocklyFlyoutButton:hover {,fill: #aaa;,},.blocklyFlyoutLabel {,cursor: default;,},.blocklyFlyoutLabelBackground {,opacity: 0;,}".split(",")),t.Generator=function(t){this.name_=t,this.FUNCTION_NAME_PLACEHOLDER_REGEXP_=new RegExp(this.FUNCTION_NAME_PLACEHOLDER_,"g")},t.Generator.prototype.INFINITE_LOOP_TRAP=null,t.Generator.prototype.STATEMENT_PREFIX=null,t.Generator.prototype.STATEMENT_SUFFIX=null,t.Generator.prototype.INDENT="  ",t.Generator.prototype.COMMENT_WRAP=60,t.Generator.prototype.ORDER_OVERRIDES=[],t.Generator.prototype.isInitialized=null,t.Generator.prototype.workspaceToCode=function(e){e||(console.warn("No workspace specified in workspaceToCode call.  Guessing."),e=t.getMainWorkspace());var i=[];this.init(e),e=e.getTopBlocks(!0);for(var n,o=0;n=e[o];o++){var r=this.blockToCode(n);Array.isArray(r)&&(r=r[0]),r&&(n.outputConnection&&(r=this.scrubNakedValue(r),this.STATEMENT_PREFIX&&!n.suppressPrefixSuffix&&(r=this.injectId(this.STATEMENT_PREFIX,n)+r),this.STATEMENT_SUFFIX&&!n.suppressPrefixSuffix&&(r+=this.injectId(this.STATEMENT_SUFFIX,n))),i.push(r))}return i=i.join("\n"),(i=(i=(i=this.finish(i)).replace(/^\s+\n/,"")).replace(/\n\s+$/,"\n")).replace(/[ \t]+\n/g,"\n")},t.Generator.prototype.prefixLines=function(t,e){return e+t.replace(/(?!\n$)\n/g,"\n"+e)},t.Generator.prototype.allNestedComments=function(t){var e=[];t=t.getDescendants(!0);for(var i=0;i<t.length;i++){var n=t[i].getCommentText();n&&e.push(n)}return e.length&&e.push(""),e.join("\n")},t.Generator.prototype.blockToCode=function(t,e){if(!1===this.isInitialized&&console.warn("Generator init was not called before blockToCode was called."),!t)return"";if(!t.isEnabled())return e?"":this.blockToCode(t.getNextBlock());if(t.isInsertionMarker())return e?"":this.blockToCode(t.getChildren(!1)[0]);var i=this[t.type];if("function"!=typeof i)throw Error('Language "'+this.name_+'" does not know how to generate code for block type "'+t.type+'".');if(i=i.call(t,t),Array.isArray(i)){if(!t.outputConnection)throw TypeError("Expecting string from statement block: "+t.type);return[this.scrub_(t,i[0],e),i[1]]}if("string"==typeof i)return this.STATEMENT_PREFIX&&!t.suppressPrefixSuffix&&(i=this.injectId(this.STATEMENT_PREFIX,t)+i),this.STATEMENT_SUFFIX&&!t.suppressPrefixSuffix&&(i+=this.injectId(this.STATEMENT_SUFFIX,t)),this.scrub_(t,i,e);if(null===i)return"";throw SyntaxError("Invalid code generated: "+i)},t.Generator.prototype.valueToCode=function(t,e,i){if(isNaN(i))throw TypeError("Expecting valid order from block: "+t.type);var n=t.getInputTargetBlock(e);if(!n)return"";if(""===(e=this.blockToCode(n)))return"";if(!Array.isArray(e))throw TypeError("Expecting tuple from value block: "+n.type);if(t=e[0],e=e[1],isNaN(e))throw TypeError("Expecting valid order from value block: "+n.type);if(!t)return"";n=!1;var o=Math.floor(i),r=Math.floor(e);if(o<=r&&(o!=r||0!=o&&99!=o))for(n=!0,o=0;o<this.ORDER_OVERRIDES.length;o++)if(this.ORDER_OVERRIDES[o][0]==i&&this.ORDER_OVERRIDES[o][1]==e){n=!1;break}return n&&(t="("+t+")"),t},t.Generator.prototype.statementToCode=function(t,e){if(t=t.getInputTargetBlock(e),"string"!=typeof(e=this.blockToCode(t)))throw TypeError("Expecting code from statement block: "+(t&&t.type));return e&&(e=this.prefixLines(e,this.INDENT)),e},t.Generator.prototype.addLoopTrap=function(t,e){return this.INFINITE_LOOP_TRAP&&(t=this.prefixLines(this.injectId(this.INFINITE_LOOP_TRAP,e),this.INDENT)+t),this.STATEMENT_SUFFIX&&!e.suppressPrefixSuffix&&(t=this.prefixLines(this.injectId(this.STATEMENT_SUFFIX,e),this.INDENT)+t),this.STATEMENT_PREFIX&&!e.suppressPrefixSuffix&&(t+=this.prefixLines(this.injectId(this.STATEMENT_PREFIX,e),this.INDENT)),t},t.Generator.prototype.injectId=function(t,e){return e=e.id.replace(/\$/g,"$$$$"),t.replace(/%1/g,"'"+e+"'")},t.Generator.prototype.RESERVED_WORDS_="",t.Generator.prototype.addReservedWords=function(t){this.RESERVED_WORDS_+=t+","},t.Generator.prototype.FUNCTION_NAME_PLACEHOLDER_="{leCUI8hutHZI4480Dc}",Object.defineProperty(t.Generator.prototype,"variableDB_",{get:function(){return t.utils.deprecation.warn("variableDB_","May 2021","May 2026","nameDB_"),this.nameDB_},set:function(e){t.utils.deprecation.warn("variableDB_","May 2021","May 2026","nameDB_"),this.nameDB_=e}}),t.Generator.prototype.provideFunction_=function(e,i){if(!this.definitions_[e]){var n,o=this.nameDB_.getDistinctName(e,t.PROCEDURE_CATEGORY_NAME);for(this.functionNames_[e]=o,i=i.join("\n").replace(this.FUNCTION_NAME_PLACEHOLDER_REGEXP_,o);n!=i;)n=i,i=i.replace(/^(( {2})*) {2}/gm,"$1\0");i=i.replace(/\0/g,this.INDENT),this.definitions_[e]=i}return this.functionNames_[e]},t.Generator.prototype.init=function(t){this.definitions_=Object.create(null),this.functionNames_=Object.create(null)},t.Generator.prototype.scrub_=function(t,e,i){return e},t.Generator.prototype.finish=function(t){return delete this.definitions_,delete this.functionNames_,t},t.Generator.prototype.scrubNakedValue=function(t){return t},t.IToolboxItem=function(){},t.ISelectableToolboxItem=function(){},t.ICollapsibleToolboxItem=function(){},t.ToolboxItem=function(e,i,n){this.id_=e.toolboxitemid||t.utils.IdGenerator.getNextUniqueId(),this.level_=(this.parent_=n||null)?this.parent_.getLevel()+1:0,this.toolboxItemDef_=e,this.parentToolbox_=i,this.workspace_=this.parentToolbox_.getWorkspace()},t.ToolboxItem.prototype.init=function(){},t.ToolboxItem.prototype.getDiv=function(){return null},t.ToolboxItem.prototype.getId=function(){return this.id_},t.ToolboxItem.prototype.getParent=function(){return null},t.ToolboxItem.prototype.getLevel=function(){return this.level_},t.ToolboxItem.prototype.isSelectable=function(){return!1},t.ToolboxItem.prototype.isCollapsible=function(){return!1},t.ToolboxItem.prototype.dispose=function(){},t.ToolboxCategory=function(e,i,n){t.ToolboxCategory.superClass_.constructor.call(this,e,i,n),this.name_=t.utils.replaceMessageReferences(e.name),this.colour_=this.getColour_(e),this.labelDom_=this.iconDom_=this.rowContents_=this.rowDiv_=this.htmlDiv_=null,this.cssConfig_=this.makeDefaultCssConfig_(),t.utils.object.mixin(this.cssConfig_,e.cssconfig||e.cssConfig),this.isDisabled_=this.isHidden_=!1,this.flyoutItems_=[],this.parseContents_(e)},t.utils.object.inherits(t.ToolboxCategory,t.ToolboxItem),t.ToolboxCategory.registrationName="category",t.ToolboxCategory.nestedPadding=19,t.ToolboxCategory.borderWidth=8,t.ToolboxCategory.defaultBackgroundColour="#57e",t.ToolboxCategory.prototype.makeDefaultCssConfig_=function(){return{container:"blocklyToolboxCategory",row:"blocklyTreeRow",rowcontentcontainer:"blocklyTreeRowContentContainer",icon:"blocklyTreeIcon",label:"blocklyTreeLabel",contents:"blocklyToolboxContents",selected:"blocklyTreeSelected",openicon:"blocklyTreeIconOpen",closedicon:"blocklyTreeIconClosed"}},t.ToolboxCategory.prototype.parseContents_=function(t){var e=t.contents;if(t.custom)this.flyoutItems_=t.custom;else if(e){t=0;for(var i;i=e[t];t++)this.flyoutItems_.push(i)}},t.ToolboxCategory.prototype.init=function(){this.createDom_(),"true"==this.toolboxItemDef_.hidden&&this.hide()},t.ToolboxCategory.prototype.createDom_=function(){return this.htmlDiv_=this.createContainer_(),t.utils.aria.setRole(this.htmlDiv_,t.utils.aria.Role.TREEITEM),t.utils.aria.setState(this.htmlDiv_,t.utils.aria.State.SELECTED,!1),t.utils.aria.setState(this.htmlDiv_,t.utils.aria.State.LEVEL,this.level_),this.rowDiv_=this.createRowContainer_(),this.rowDiv_.style.pointerEvents="auto",this.htmlDiv_.appendChild(this.rowDiv_),this.rowContents_=this.createRowContentsContainer_(),this.rowContents_.style.pointerEvents="none",this.rowDiv_.appendChild(this.rowContents_),this.iconDom_=this.createIconDom_(),t.utils.aria.setRole(this.iconDom_,t.utils.aria.Role.PRESENTATION),this.rowContents_.appendChild(this.iconDom_),this.labelDom_=this.createLabelDom_(this.name_),this.rowContents_.appendChild(this.labelDom_),t.utils.aria.setState(this.htmlDiv_,t.utils.aria.State.LABELLEDBY,this.labelDom_.getAttribute("id")),this.addColourBorder_(this.colour_),this.htmlDiv_},t.ToolboxCategory.prototype.createContainer_=function(){var e=document.createElement("div");return t.utils.dom.addClass(e,this.cssConfig_.container),e},t.ToolboxCategory.prototype.createRowContainer_=function(){var e=document.createElement("div");t.utils.dom.addClass(e,this.cssConfig_.row);var i=t.ToolboxCategory.nestedPadding*this.getLevel();return i=i.toString()+"px",this.workspace_.RTL?e.style.paddingRight=i:e.style.paddingLeft=i,e},t.ToolboxCategory.prototype.createRowContentsContainer_=function(){var e=document.createElement("div");return t.utils.dom.addClass(e,this.cssConfig_.rowcontentcontainer),e},t.ToolboxCategory.prototype.createIconDom_=function(){var e=document.createElement("span");return this.parentToolbox_.isHorizontal()||t.utils.dom.addClass(e,this.cssConfig_.icon),e.style.display="inline-block",e},t.ToolboxCategory.prototype.createLabelDom_=function(e){var i=document.createElement("span");return i.setAttribute("id",this.getId()+".label"),i.textContent=e,t.utils.dom.addClass(i,this.cssConfig_.label),i},t.ToolboxCategory.prototype.refreshTheme=function(){this.colour_=this.getColour_(this.toolboxItemDef_),this.addColourBorder_(this.colour_)},t.ToolboxCategory.prototype.addColourBorder_=function(e){e&&(e=t.ToolboxCategory.borderWidth+"px solid "+(e||"#ddd"),this.workspace_.RTL?this.rowDiv_.style.borderRight=e:this.rowDiv_.style.borderLeft=e)},t.ToolboxCategory.prototype.getColour_=function(t){var e=t.categorystyle||t.categoryStyle;return(t=t.colour)&&e?(console.warn('Toolbox category "'+this.name_+'" must not have both a style and a colour'),""):e?this.getColourfromStyle_(e):this.parseColour_(t)},t.ToolboxCategory.prototype.getColourfromStyle_=function(t){var e=this.workspace_.getTheme();if(t&&e){if((e=e.categoryStyles[t])&&e.colour)return this.parseColour_(e.colour);console.warn('Style "'+t+'" must exist and contain a colour value')}return""},t.ToolboxCategory.prototype.getClickTarget=function(){return this.rowDiv_},t.ToolboxCategory.prototype.parseColour_=function(e){if(null==(e=t.utils.replaceMessageReferences(e))||""===e)return"";var i=Number(e);return isNaN(i)?(i=t.utils.colour.parse(e))?i:(console.warn('Toolbox category "'+this.name_+'" has unrecognized colour attribute: '+e),""):t.hueToHex(i)},t.ToolboxCategory.prototype.openIcon_=function(e){e&&(t.utils.dom.removeClasses(e,this.cssConfig_.closedicon),t.utils.dom.addClass(e,this.cssConfig_.openicon))},t.ToolboxCategory.prototype.closeIcon_=function(e){e&&(t.utils.dom.removeClasses(e,this.cssConfig_.openicon),t.utils.dom.addClass(e,this.cssConfig_.closedicon))},t.ToolboxCategory.prototype.setVisible_=function(t){this.htmlDiv_.style.display=t?"block":"none",this.isHidden_=!t,this.parentToolbox_.getSelectedItem()==this&&this.parentToolbox_.clearSelection()},t.ToolboxCategory.prototype.hide=function(){this.setVisible_(!1)},t.ToolboxCategory.prototype.show=function(){this.setVisible_(!0)},t.ToolboxCategory.prototype.isVisible=function(){return!this.isHidden_&&this.allAncestorsExpanded_()},t.ToolboxCategory.prototype.allAncestorsExpanded_=function(){for(var t=this;t.getParent();)if(!(t=t.getParent()).isExpanded())return!1;return!0},t.ToolboxCategory.prototype.isSelectable=function(){return this.isVisible()&&!this.isDisabled_},t.ToolboxCategory.prototype.onClick=function(t){},t.ToolboxCategory.prototype.setSelected=function(e){if(e){var i=this.parseColour_(t.ToolboxCategory.defaultBackgroundColour);this.rowDiv_.style.backgroundColor=this.colour_||i,t.utils.dom.addClass(this.rowDiv_,this.cssConfig_.selected)}else this.rowDiv_.style.backgroundColor="",t.utils.dom.removeClass(this.rowDiv_,this.cssConfig_.selected);t.utils.aria.setState(this.htmlDiv_,t.utils.aria.State.SELECTED,e)},t.ToolboxCategory.prototype.setDisabled=function(t){this.isDisabled_=t,this.getDiv().setAttribute("disabled",t),t?this.getDiv().setAttribute("disabled","true"):this.getDiv().removeAttribute("disabled")},t.ToolboxCategory.prototype.getName=function(){return this.name_},t.ToolboxCategory.prototype.getParent=function(){return this.parent_},t.ToolboxCategory.prototype.getDiv=function(){return this.htmlDiv_},t.ToolboxCategory.prototype.getContents=function(){return this.flyoutItems_},t.ToolboxCategory.prototype.updateFlyoutContents=function(e){this.flyoutItems_=[],"string"==typeof e?this.toolboxItemDef_.custom=e:(delete this.toolboxItemDef_.custom,this.toolboxItemDef_.contents=t.utils.toolbox.convertFlyoutDefToJsonArray(e)),this.parseContents_(this.toolboxItemDef_)},t.ToolboxCategory.prototype.dispose=function(){t.utils.dom.removeNode(this.htmlDiv_)},t.Css.register([".blocklyTreeRow:not(.blocklyTreeSelected):hover {","background-color: rgba(255, 255, 255, 0.2);","}",'.blocklyToolboxDiv[layout="h"] .blocklyToolboxCategory {',"margin: 1px 5px 1px 0;","}",'.blocklyToolboxDiv[dir="RTL"][layout="h"] .blocklyToolboxCategory {',"margin: 1px 0 1px 5px;","}",".blocklyTreeRow {","height: 22px;","line-height: 22px;","margin-bottom: 3px;","padding-right: 8px;","white-space: nowrap;","}",'.blocklyToolboxDiv[dir="RTL"] .blocklyTreeRow {',"margin-left: 8px;","padding-right: 0px","}",".blocklyTreeIcon {","background-image: url(<<<PATH>>>/sprites.png);","height: 16px;","vertical-align: middle;","visibility: hidden;","width: 16px;","}",".blocklyTreeIconClosed {","background-position: -32px -1px;","}",'.blocklyToolboxDiv[dir="RTL"] .blocklyTreeIconClosed {',"background-position: 0 -1px;","}",".blocklyTreeSelected>.blocklyTreeIconClosed {","background-position: -32px -17px;","}",'.blocklyToolboxDiv[dir="RTL"] .blocklyTreeSelected>.blocklyTreeIconClosed {',"background-position: 0 -17px;","}",".blocklyTreeIconOpen {","background-position: -16px -1px;","}",".blocklyTreeSelected>.blocklyTreeIconOpen {","background-position: -16px -17px;","}",".blocklyTreeLabel {","cursor: default;","font: 16px sans-serif;","padding: 0 3px;","vertical-align: middle;","}",".blocklyToolboxDelete .blocklyTreeLabel {",'cursor: url("<<<PATH>>>/handdelete.cur"), auto;',"}",".blocklyTreeSelected .blocklyTreeLabel {","color: #fff;","}"]),t.registry.register(t.registry.Type.TOOLBOX_ITEM,t.ToolboxCategory.registrationName,t.ToolboxCategory),t.ToolboxSeparator=function(e,i){t.ToolboxSeparator.superClass_.constructor.call(this,e,i),this.cssConfig_={container:"blocklyTreeSeparator"},t.utils.object.mixin(this.cssConfig_,e.cssconfig||e.cssConfig)},t.utils.object.inherits(t.ToolboxSeparator,t.ToolboxItem),t.ToolboxSeparator.registrationName="sep",t.ToolboxSeparator.prototype.init=function(){this.createDom_()},t.ToolboxSeparator.prototype.createDom_=function(){var e=document.createElement("div");return t.utils.dom.addClass(e,this.cssConfig_.container),this.htmlDiv_=e},t.ToolboxSeparator.prototype.getDiv=function(){return this.htmlDiv_},t.ToolboxSeparator.prototype.dispose=function(){t.utils.dom.removeNode(this.htmlDiv_)},t.Css.register('.blocklyTreeSeparator {,border-bottom: solid #e5e5e5 1px;,height: 0;,margin: 5px 0;,},.blocklyToolboxDiv[layout="h"] .blocklyTreeSeparator {,border-right: solid #e5e5e5 1px;,border-bottom: none;,height: auto;,margin: 0 5px 0 5px;,padding: 5px 0;,width: 0;,}'.split(",")),t.registry.register(t.registry.Type.TOOLBOX_ITEM,t.ToolboxSeparator.registrationName,t.ToolboxSeparator),t.CollapsibleToolboxCategory=function(e,i,n){this.subcategoriesDiv_=null,this.expanded_=!1,this.toolboxItems_=[],t.CollapsibleToolboxCategory.superClass_.constructor.call(this,e,i,n)},t.utils.object.inherits(t.CollapsibleToolboxCategory,t.ToolboxCategory),t.CollapsibleToolboxCategory.registrationName="collapsibleCategory",t.CollapsibleToolboxCategory.prototype.makeDefaultCssConfig_=function(){var e=t.CollapsibleToolboxCategory.superClass_.makeDefaultCssConfig_.call(this);return e.contents="blocklyToolboxContents",e},t.CollapsibleToolboxCategory.prototype.parseContents_=function(e){var i=e.contents,n=!0;if(e.custom)this.flyoutItems_=e.custom;else if(i){e=0;for(var o;o=i[e];e++)!t.registry.hasItem(t.registry.Type.TOOLBOX_ITEM,o.kind)||o.kind.toLowerCase()==t.ToolboxSeparator.registrationName&&n?(this.flyoutItems_.push(o),n=!0):(this.createToolboxItem_(o),n=!1)}},t.CollapsibleToolboxCategory.prototype.createToolboxItem_=function(e){var i=e.kind;"CATEGORY"==i.toUpperCase()&&t.utils.toolbox.isCategoryCollapsible(e)&&(i=t.CollapsibleToolboxCategory.registrationName),e=new(t.registry.getClass(t.registry.Type.TOOLBOX_ITEM,i))(e,this.parentToolbox_,this),this.toolboxItems_.push(e)},t.CollapsibleToolboxCategory.prototype.init=function(){t.CollapsibleToolboxCategory.superClass_.init.call(this),this.setExpanded("true"==this.toolboxItemDef_.expanded||this.toolboxItemDef_.expanded)},t.CollapsibleToolboxCategory.prototype.createDom_=function(){t.CollapsibleToolboxCategory.superClass_.createDom_.call(this);var e=this.getChildToolboxItems();return this.subcategoriesDiv_=this.createSubCategoriesDom_(e),t.utils.aria.setRole(this.subcategoriesDiv_,t.utils.aria.Role.GROUP),this.htmlDiv_.appendChild(this.subcategoriesDiv_),this.htmlDiv_},t.CollapsibleToolboxCategory.prototype.createIconDom_=function(){var e=document.createElement("span");return this.parentToolbox_.isHorizontal()||(t.utils.dom.addClass(e,this.cssConfig_.icon),e.style.visibility="visible"),e.style.display="inline-block",e},t.CollapsibleToolboxCategory.prototype.createSubCategoriesDom_=function(e){var i=document.createElement("div");t.utils.dom.addClass(i,this.cssConfig_.contents);for(var n=0;n<e.length;n++){var o=e[n];o.init();var r=o.getDiv();i.appendChild(r),o.getClickTarget&&o.getClickTarget().setAttribute("id",o.getId())}return i},t.CollapsibleToolboxCategory.prototype.setExpanded=function(e){this.expanded_!=e&&((this.expanded_=e)?(this.subcategoriesDiv_.style.display="block",this.openIcon_(this.iconDom_)):(this.subcategoriesDiv_.style.display="none",this.closeIcon_(this.iconDom_)),t.utils.aria.setState(this.htmlDiv_,t.utils.aria.State.EXPANDED,e),this.parentToolbox_.handleToolboxItemResize())},t.CollapsibleToolboxCategory.prototype.setVisible_=function(t){this.htmlDiv_.style.display=t?"block":"none";for(var e,i=0;e=this.getChildToolboxItems()[i];i++)e.setVisible_(t);this.isHidden_=!t,this.parentToolbox_.getSelectedItem()==this&&this.parentToolbox_.clearSelection()},t.CollapsibleToolboxCategory.prototype.isExpanded=function(){return this.expanded_},t.CollapsibleToolboxCategory.prototype.isCollapsible=function(){return!0},t.CollapsibleToolboxCategory.prototype.onClick=function(t){this.toggleExpanded()},t.CollapsibleToolboxCategory.prototype.toggleExpanded=function(){this.setExpanded(!this.expanded_)},t.CollapsibleToolboxCategory.prototype.getDiv=function(){return this.htmlDiv_},t.CollapsibleToolboxCategory.prototype.getChildToolboxItems=function(){return this.toolboxItems_},t.registry.register(t.registry.Type.TOOLBOX_ITEM,t.CollapsibleToolboxCategory.registrationName,t.CollapsibleToolboxCategory),t.Events.ToolboxItemSelect=function(e,i,n){t.Events.ToolboxItemSelect.superClass_.constructor.call(this,n),this.oldItem=e,this.newItem=i},t.utils.object.inherits(t.Events.ToolboxItemSelect,t.Events.UiBase),t.Events.ToolboxItemSelect.prototype.type=t.Events.TOOLBOX_ITEM_SELECT,t.Events.ToolboxItemSelect.prototype.toJson=function(){var e=t.Events.ToolboxItemSelect.superClass_.toJson.call(this);return e.oldItem=this.oldItem,e.newItem=this.newItem,e},t.Events.ToolboxItemSelect.prototype.fromJson=function(e){t.Events.ToolboxItemSelect.superClass_.fromJson.call(this,e),this.oldItem=e.oldItem,this.newItem=e.newItem},t.registry.register(t.registry.Type.EVENT,t.Events.TOOLBOX_ITEM_SELECT,t.Events.ToolboxItemSelect),t.IAutoHideable=function(){},t.IStyleable=function(){},t.IToolbox=function(){},t.Toolbox=function(e){t.Toolbox.superClass_.constructor.call(this),this.workspace_=e,this.id="toolbox",this.toolboxDef_=e.options.languageTree||{contents:[]},this.horizontalLayout_=e.options.horizontalLayout,this.contentsDiv_=this.HtmlDiv=null,this.isVisible_=!1,this.contents_=[],this.height_=this.width_=0,this.RTL=e.options.RTL,this.flyout_=null,this.contentMap_=Object.create(null),this.toolboxPosition=e.options.toolboxPosition,this.previouslySelectedItem_=this.selectedItem_=null,this.boundEvents_=[]},t.utils.object.inherits(t.Toolbox,t.DeleteArea),t.Toolbox.prototype.onShortcut=function(t){return!1},t.Toolbox.prototype.init=function(){var e=this.workspace_,i=e.getParentSvg();this.flyout_=this.createFlyout_(),this.HtmlDiv=this.createDom_(this.workspace_),t.utils.dom.insertAfter(this.flyout_.createDom("svg"),i),this.setVisible(!0),this.flyout_.init(e),this.render(this.toolboxDef_),(e=e.getThemeManager()).subscribe(this.HtmlDiv,"toolboxBackgroundColour","background-color"),e.subscribe(this.HtmlDiv,"toolboxForegroundColour","color"),this.workspace_.getComponentManager().addComponent({component:this,weight:1,capabilities:[t.ComponentManager.Capability.AUTOHIDEABLE,t.ComponentManager.Capability.DELETE_AREA,t.ComponentManager.Capability.DRAG_TARGET]})},t.Toolbox.prototype.createDom_=function(e){e=e.getParentSvg();var i=this.createContainer_();return this.contentsDiv_=this.createContentsContainer_(),this.contentsDiv_.tabIndex=0,t.utils.aria.setRole(this.contentsDiv_,t.utils.aria.Role.TREE),i.appendChild(this.contentsDiv_),e.parentNode.insertBefore(i,e),this.attachEvents_(i,this.contentsDiv_),i},t.Toolbox.prototype.createContainer_=function(){var e=document.createElement("div");return e.setAttribute("layout",this.isHorizontal()?"h":"v"),t.utils.dom.addClass(e,"blocklyToolboxDiv"),t.utils.dom.addClass(e,"blocklyNonSelectable"),e.setAttribute("dir",this.RTL?"RTL":"LTR"),e},t.Toolbox.prototype.createContentsContainer_=function(){var e=document.createElement("div");return t.utils.dom.addClass(e,"blocklyToolboxContents"),this.isHorizontal()&&(e.style.flexDirection="row"),e},t.Toolbox.prototype.attachEvents_=function(e,i){e=t.browserEvents.conditionalBind(e,"click",this,this.onClick_,!1,!0),this.boundEvents_.push(e),i=t.browserEvents.conditionalBind(i,"keydown",this,this.onKeyDown_,!1,!0),this.boundEvents_.push(i)},t.Toolbox.prototype.onClick_=function(e){if(t.utils.isRightButton(e)||e.target==this.HtmlDiv)t.hideChaff(!1);else{var i=e.target.getAttribute("id");i&&((i=this.getToolboxItemById(i)).isSelectable()&&(this.setSelectedItem(i),i.onClick(e))),t.hideChaff(!0)}t.Touch.clearTouchIdentifier()},t.Toolbox.prototype.onKeyDown_=function(e){var i=!1;switch(e.keyCode){case t.utils.KeyCodes.DOWN:i=this.selectNext_();break;case t.utils.KeyCodes.UP:i=this.selectPrevious_();break;case t.utils.KeyCodes.LEFT:i=this.selectParent_();break;case t.utils.KeyCodes.RIGHT:i=this.selectChild_();break;case t.utils.KeyCodes.ENTER:case t.utils.KeyCodes.SPACE:this.selectedItem_&&this.selectedItem_.isCollapsible()&&(this.selectedItem_.toggleExpanded(),i=!0);break;default:i=!1}!i&&this.selectedItem_&&this.selectedItem_.onKeyDown&&(i=this.selectedItem_.onKeyDown(e)),i&&e.preventDefault()},t.Toolbox.prototype.createFlyout_=function(){var e=this.workspace_,i=new t.Options({parentWorkspace:e,rtl:e.RTL,oneBasedIndex:e.options.oneBasedIndex,horizontalLayout:e.horizontalLayout,renderer:e.options.renderer,rendererOverrides:e.options.rendererOverrides,move:{scrollbars:!0}});return i.toolboxPosition=e.options.toolboxPosition,new(e.horizontalLayout?t.registry.getClassFromOptions(t.registry.Type.FLYOUTS_HORIZONTAL_TOOLBOX,e.options,!0):t.registry.getClassFromOptions(t.registry.Type.FLYOUTS_VERTICAL_TOOLBOX,e.options,!0))(i)},t.Toolbox.prototype.render=function(t){this.toolboxDef_=t;for(var e=0;e<this.contents_.length;e++){var i=this.contents_[e];i&&i.dispose()}this.contents_=[],this.contentMap_=Object.create(null),this.renderContents_(t.contents),this.position(),this.handleToolboxItemResize()},t.Toolbox.prototype.renderContents_=function(t){for(var e,i=document.createDocumentFragment(),n=0;e=t[n];n++)this.createToolboxItem_(e,i);this.contentsDiv_.appendChild(i)},t.Toolbox.prototype.createToolboxItem_=function(e,i){var n=e.kind;"CATEGORY"==n.toUpperCase()&&t.utils.toolbox.isCategoryCollapsible(e)&&(n=t.CollapsibleToolboxCategory.registrationName),(n=t.registry.getClass(t.registry.Type.TOOLBOX_ITEM,n.toLowerCase()))&&(e=new n(e,this),this.addToolboxItem_(e),e.init(),(n=e.getDiv())&&i.appendChild(n),e.getClickTarget&&e.getClickTarget().setAttribute("id",e.getId()))},t.Toolbox.prototype.addToolboxItem_=function(t){if(this.contents_.push(t),this.contentMap_[t.getId()]=t,t.isCollapsible())for(var e,i=0;e=t.getChildToolboxItems()[i];i++)this.addToolboxItem_(e)},t.Toolbox.prototype.getToolboxItems=function(){return this.contents_},t.Toolbox.prototype.addStyle=function(e){t.utils.dom.addClass(this.HtmlDiv,e)},t.Toolbox.prototype.removeStyle=function(e){t.utils.dom.removeClass(this.HtmlDiv,e)},t.Toolbox.prototype.getClientRect=function(){if(!this.HtmlDiv||!this.isVisible_)return null;var e=this.HtmlDiv.getBoundingClientRect(),i=e.top,n=i+e.height,o=e.left;return e=o+e.width,this.toolboxPosition==t.utils.toolbox.Position.TOP?new t.utils.Rect(-1e7,n,-1e7,1e7):this.toolboxPosition==t.utils.toolbox.Position.BOTTOM?new t.utils.Rect(i,1e7,-1e7,1e7):this.toolboxPosition==t.utils.toolbox.Position.LEFT?new t.utils.Rect(-1e7,1e7,-1e7,e):new t.utils.Rect(-1e7,1e7,o,1e7)},t.Toolbox.prototype.wouldDelete=function(e,i){return e instanceof t.BlockSvg?this.updateWouldDelete_(!e.getParent()&&e.isDeletable()):this.updateWouldDelete_(e.isDeletable()),this.wouldDelete_},t.Toolbox.prototype.onDragEnter=function(t){this.updateCursorDeleteStyle_(!0)},t.Toolbox.prototype.onDragExit=function(t){this.updateCursorDeleteStyle_(!1)},t.Toolbox.prototype.onDrop=function(t){this.updateCursorDeleteStyle_(!1)},t.Toolbox.prototype.updateWouldDelete_=function(t){t!==this.wouldDelete_&&(this.updateCursorDeleteStyle_(!1),this.wouldDelete_=t,this.updateCursorDeleteStyle_(!0))},t.Toolbox.prototype.updateCursorDeleteStyle_=function(t){var e=this.wouldDelete_?"blocklyToolboxDelete":"blocklyToolboxGrab";t?this.addStyle(e):this.removeStyle(e)},t.Toolbox.prototype.getToolboxItemById=function(t){return this.contentMap_[t]||null},t.Toolbox.prototype.getWidth=function(){return this.width_},t.Toolbox.prototype.getHeight=function(){return this.height_},t.Toolbox.prototype.getFlyout=function(){return this.flyout_},t.Toolbox.prototype.getWorkspace=function(){return this.workspace_},t.Toolbox.prototype.getSelectedItem=function(){return this.selectedItem_},t.Toolbox.prototype.getPreviouslySelectedItem=function(){return this.previouslySelectedItem_},t.Toolbox.prototype.isHorizontal=function(){return this.horizontalLayout_},t.Toolbox.prototype.position=function(){var e=this.workspace_.getMetrics(),i=this.HtmlDiv;i&&(this.horizontalLayout_?(i.style.left="0",i.style.height="auto",i.style.width="100%",this.height_=i.offsetHeight,this.width_=e.viewWidth,this.toolboxPosition==t.utils.toolbox.Position.TOP?i.style.top="0":i.style.bottom="0"):(this.toolboxPosition==t.utils.toolbox.Position.RIGHT?i.style.right="0":i.style.left="0",i.style.height="100%",this.width_=i.offsetWidth,this.height_=e.viewHeight),this.flyout_.position())},t.Toolbox.prototype.handleToolboxItemResize=function(){var e=this.workspace_,i=this.HtmlDiv.getBoundingClientRect();e.translate(this.toolboxPosition==t.utils.toolbox.Position.LEFT?e.scrollX+i.width:e.scrollX,this.toolboxPosition==t.utils.toolbox.Position.TOP?e.scrollY+i.height:e.scrollY),t.svgResize(e)},t.Toolbox.prototype.clearSelection=function(){this.setSelectedItem(null)},t.Toolbox.prototype.refreshTheme=function(){for(var t=0;t<this.contents_.length;t++){var e=this.contents_[t];e.refreshTheme&&e.refreshTheme()}},t.Toolbox.prototype.refreshSelection=function(){this.selectedItem_&&this.selectedItem_.isSelectable()&&this.selectedItem_.getContents().length&&this.flyout_.show(this.selectedItem_.getContents())},t.Toolbox.prototype.setVisible=function(t){this.isVisible_!==t&&(this.HtmlDiv.style.display=t?"block":"none",this.isVisible_=t,this.workspace_.recordDragTargets())},t.Toolbox.prototype.autoHide=function(t){!t&&this.flyout_&&this.flyout_.autoClose&&this.clearSelection()},t.Toolbox.prototype.setSelectedItem=function(t){var e=this.selectedItem_;!t&&!e||t&&!t.isSelectable()||(this.shouldDeselectItem_(e,t)&&null!=e&&this.deselectItem_(e),this.shouldSelectItem_(e,t)&&null!=t&&this.selectItem_(e,t),this.updateFlyout_(e,t),this.fireSelectEvent_(e,t))},t.Toolbox.prototype.shouldDeselectItem_=function(t,e){return null!=t&&(!t.isCollapsible()||t!=e)},t.Toolbox.prototype.shouldSelectItem_=function(t,e){return null!=e&&e!=t},t.Toolbox.prototype.deselectItem_=function(e){this.selectedItem_=null,this.previouslySelectedItem_=e,e.setSelected(!1),t.utils.aria.setState(this.contentsDiv_,t.utils.aria.State.ACTIVEDESCENDANT,"")},t.Toolbox.prototype.selectItem_=function(e,i){this.selectedItem_=i,this.previouslySelectedItem_=e,i.setSelected(!0),t.utils.aria.setState(this.contentsDiv_,t.utils.aria.State.ACTIVEDESCENDANT,i.getId())},t.Toolbox.prototype.selectItemByPosition=function(t){-1<t&&t<this.contents_.length&&((t=this.contents_[t]).isSelectable()&&this.setSelectedItem(t))},t.Toolbox.prototype.updateFlyout_=function(t,e){(t!=e||e.isCollapsible())&&e&&e.getContents().length?(this.flyout_.show(e.getContents()),this.flyout_.scrollToStart()):this.flyout_.hide()},t.Toolbox.prototype.fireSelectEvent_=function(e,i){var n=e&&e.getName(),o=i&&i.getName();e==i&&(o=null),e=new(t.Events.get(t.Events.TOOLBOX_ITEM_SELECT))(n,o,this.workspace_.id),t.Events.fire(e)},t.Toolbox.prototype.selectParent_=function(){return!!this.selectedItem_&&(this.selectedItem_.isCollapsible()&&this.selectedItem_.isExpanded()?(this.selectedItem_.setExpanded(!1),!0):!(!this.selectedItem_.getParent()||!this.selectedItem_.getParent().isSelectable())&&(this.setSelectedItem(this.selectedItem_.getParent()),!0))},t.Toolbox.prototype.selectChild_=function(){if(!this.selectedItem_||!this.selectedItem_.isCollapsible())return!1;var t=this.selectedItem_;return t.isExpanded()?this.selectNext_():t.setExpanded(!0),!0},t.Toolbox.prototype.selectNext_=function(){if(!this.selectedItem_)return!1;var t=this.contents_.indexOf(this.selectedItem_)+1;if(-1<t&&t<this.contents_.length){for(var e=this.contents_[t];e&&!e.isSelectable();)e=this.contents_[++t];if(e&&e.isSelectable())return this.setSelectedItem(e),!0}return!1},t.Toolbox.prototype.selectPrevious_=function(){if(!this.selectedItem_)return!1;var t=this.contents_.indexOf(this.selectedItem_)-1;if(-1<t&&t<this.contents_.length){for(var e=this.contents_[t];e&&!e.isSelectable();)e=this.contents_[--t];if(e&&e.isSelectable())return this.setSelectedItem(e),!0}return!1},t.Toolbox.prototype.dispose=function(){this.workspace_.getComponentManager().removeComponent("toolbox"),this.flyout_.dispose();for(var e=0;e<this.contents_.length;e++)this.contents_[e].dispose();for(e=0;e<this.boundEvents_.length;e++)t.browserEvents.unbind(this.boundEvents_[e]);this.boundEvents_=[],this.contents_=[],this.workspace_.getThemeManager().unsubscribe(this.HtmlDiv),t.utils.dom.removeNode(this.HtmlDiv)},t.Css.register([".blocklyToolboxDelete {",'cursor: url("<<<PATH>>>/handdelete.cur"), auto;',"}",".blocklyToolboxGrab {",'cursor: url("<<<PATH>>>/handclosed.cur"), auto;',"cursor: grabbing;","cursor: -webkit-grabbing;","}",".blocklyToolboxDiv {","background-color: #ddd;","overflow-x: visible;","overflow-y: auto;","padding: 4px 0 4px 0;","position: absolute;","z-index: 70;","-webkit-tap-highlight-color: transparent;","}",".blocklyToolboxContents {","display: flex;","flex-wrap: wrap;","flex-direction: column;","}",".blocklyToolboxContents:focus {","outline: none;","}"]),t.registry.register(t.registry.Type.TOOLBOX,t.registry.DEFAULT,t.Toolbox),t.Events.TrashcanOpen=function(e,i){t.Events.TrashcanOpen.superClass_.constructor.call(this,i),this.isOpen=e},t.utils.object.inherits(t.Events.TrashcanOpen,t.Events.UiBase),t.Events.TrashcanOpen.prototype.type=t.Events.TRASHCAN_OPEN,t.Events.TrashcanOpen.prototype.toJson=function(){var e=t.Events.TrashcanOpen.superClass_.toJson.call(this);return e.isOpen=this.isOpen,e},t.Events.TrashcanOpen.prototype.fromJson=function(e){t.Events.TrashcanOpen.superClass_.fromJson.call(this,e),this.isOpen=e.isOpen},t.registry.register(t.registry.Type.EVENT,t.Events.TRASHCAN_OPEN,t.Events.TrashcanOpen),t.IPositionable=function(){},t.uiPosition={},t.uiPosition.verticalPosition={TOP:0,BOTTOM:1},t.uiPosition.horizontalPosition={LEFT:0,RIGHT:1},t.uiPosition.bumpDirection={UP:0,DOWN:1},t.uiPosition.getStartPositionRect=function(e,i,n,o,r,s){var a=s.scrollbar&&s.scrollbar.canScrollVertically();return e.horizontal===t.uiPosition.horizontalPosition.LEFT?(n=r.absoluteMetrics.left+n,a&&s.RTL&&(n+=t.Scrollbar.scrollbarThickness)):(n=r.absoluteMetrics.left+r.viewMetrics.width-i.width-n,a&&!s.RTL&&(n-=t.Scrollbar.scrollbarThickness)),e.vertical===t.uiPosition.verticalPosition.TOP?e=r.absoluteMetrics.top+o:(e=r.absoluteMetrics.top+r.viewMetrics.height-i.height-o,s.scrollbar&&s.scrollbar.canScrollHorizontally()&&(e-=t.Scrollbar.scrollbarThickness)),new t.utils.Rect(e,e+i.height,n,n+i.width)},t.uiPosition.getCornerOppositeToolbox=function(e,i){return{horizontal:i.toolboxMetrics.position===t.utils.toolbox.Position.LEFT||e.horizontalLayout&&!e.RTL?t.uiPosition.horizontalPosition.RIGHT:t.uiPosition.horizontalPosition.LEFT,vertical:i.toolboxMetrics.position===t.utils.toolbox.Position.BOTTOM?t.uiPosition.verticalPosition.TOP:t.uiPosition.verticalPosition.BOTTOM}},t.uiPosition.bumpPositionRect=function(e,i,n,o){for(var r,s=e.left,a=e.right-e.left,l=e.bottom-e.top,c=0;r=o[c];c++)e.intersects(r)&&(e=n===t.uiPosition.bumpDirection.UP?r.top-l-i:r.bottom+i,e=new t.utils.Rect(e,e+l,s,s+a),c=-1);return e},t.Trashcan=function(e){t.Trashcan.superClass_.constructor.call(this),this.workspace_=e,this.id="trashcan",this.contents_=[],this.flyout=null,0>=this.workspace_.options.maxTrashcanContents||(e=new t.Options({scrollbars:!0,parentWorkspace:this.workspace_,rtl:this.workspace_.RTL,oneBasedIndex:this.workspace_.options.oneBasedIndex,renderer:this.workspace_.options.renderer,rendererOverrides:this.workspace_.options.rendererOverrides,move:{scrollbars:!0}}),this.workspace_.horizontalLayout?(e.toolboxPosition=this.workspace_.toolboxPosition==t.utils.toolbox.Position.TOP?t.utils.toolbox.Position.BOTTOM:t.utils.toolbox.Position.TOP,this.flyout=new(t.registry.getClassFromOptions(t.registry.Type.FLYOUTS_HORIZONTAL_TOOLBOX,this.workspace_.options,!0))(e)):(e.toolboxPosition=this.workspace_.toolboxPosition==t.utils.toolbox.Position.RIGHT?t.utils.toolbox.Position.LEFT:t.utils.toolbox.Position.RIGHT,this.flyout=new(t.registry.getClassFromOptions(t.registry.Type.FLYOUTS_VERTICAL_TOOLBOX,this.workspace_.options,!0))(e)),this.workspace_.addChangeListener(this.onDelete_.bind(this)))},t.utils.object.inherits(t.Trashcan,t.DeleteArea),t.Trashcan.prototype.WIDTH_=47,t.Trashcan.prototype.BODY_HEIGHT_=44,t.Trashcan.prototype.LID_HEIGHT_=16,t.Trashcan.prototype.MARGIN_VERTICAL_=20,t.Trashcan.prototype.MARGIN_HORIZONTAL_=20,t.Trashcan.prototype.MARGIN_HOTSPOT_=10,t.Trashcan.prototype.SPRITE_LEFT_=0,t.Trashcan.prototype.SPRITE_TOP_=32,t.Trashcan.prototype.HAS_BLOCKS_LID_ANGLE_=.1,t.Trashcan.ANIMATION_LENGTH_=80,t.Trashcan.ANIMATION_FRAMES_=4,t.Trashcan.OPACITY_MIN_=.4,t.Trashcan.OPACITY_MAX_=.8,t.Trashcan.MAX_LID_ANGLE_=45,t.Trashcan.prototype.isLidOpen=!1,t.Trashcan.prototype.minOpenness_=0,t.Trashcan.prototype.svgGroup_=null,t.Trashcan.prototype.svgLid_=null,t.Trashcan.prototype.lidTask_=0,t.Trashcan.prototype.lidOpen_=0,t.Trashcan.prototype.left_=0,t.Trashcan.prototype.top_=0,t.Trashcan.prototype.initialized_=!1,t.Trashcan.prototype.createDom=function(){this.svgGroup_=t.utils.dom.createSvgElement(t.utils.Svg.G,{class:"blocklyTrash"},null);var e=String(Math.random()).substring(2),i=t.utils.dom.createSvgElement(t.utils.Svg.CLIPPATH,{id:"blocklyTrashBodyClipPath"+e},this.svgGroup_);t.utils.dom.createSvgElement(t.utils.Svg.RECT,{width:this.WIDTH_,height:this.BODY_HEIGHT_,y:this.LID_HEIGHT_},i);var n=t.utils.dom.createSvgElement(t.utils.Svg.IMAGE,{width:t.SPRITE.width,x:-this.SPRITE_LEFT_,height:t.SPRITE.height,y:-this.SPRITE_TOP_,"clip-path":"url(#blocklyTrashBodyClipPath"+e+")"},this.svgGroup_);return n.setAttributeNS(t.utils.dom.XLINK_NS,"xlink:href",this.workspace_.options.pathToMedia+t.SPRITE.url),i=t.utils.dom.createSvgElement(t.utils.Svg.CLIPPATH,{id:"blocklyTrashLidClipPath"+e},this.svgGroup_),t.utils.dom.createSvgElement(t.utils.Svg.RECT,{width:this.WIDTH_,height:this.LID_HEIGHT_},i),this.svgLid_=t.utils.dom.createSvgElement(t.utils.Svg.IMAGE,{width:t.SPRITE.width,x:-this.SPRITE_LEFT_,height:t.SPRITE.height,y:-this.SPRITE_TOP_,"clip-path":"url(#blocklyTrashLidClipPath"+e+")"},this.svgGroup_),this.svgLid_.setAttributeNS(t.utils.dom.XLINK_NS,"xlink:href",this.workspace_.options.pathToMedia+t.SPRITE.url),t.browserEvents.bind(this.svgGroup_,"mousedown",this,this.blockMouseDownWhenOpenable_),t.browserEvents.bind(this.svgGroup_,"mouseup",this,this.click),t.browserEvents.bind(n,"mouseover",this,this.mouseOver_),t.browserEvents.bind(n,"mouseout",this,this.mouseOut_),this.animateLid_(),this.svgGroup_},t.Trashcan.prototype.init=function(){0<this.workspace_.options.maxTrashcanContents&&(t.utils.dom.insertAfter(this.flyout.createDom(t.utils.Svg.SVG),this.workspace_.getParentSvg()),this.flyout.init(this.workspace_)),this.workspace_.getComponentManager().addComponent({component:this,weight:1,capabilities:[t.ComponentManager.Capability.AUTOHIDEABLE,t.ComponentManager.Capability.DELETE_AREA,t.ComponentManager.Capability.DRAG_TARGET,t.ComponentManager.Capability.POSITIONABLE]}),this.initialized_=!0,this.setLidOpen(!1)},t.Trashcan.prototype.dispose=function(){this.workspace_.getComponentManager().removeComponent("trashcan"),this.svgGroup_&&(t.utils.dom.removeNode(this.svgGroup_),this.svgGroup_=null),this.workspace_=this.svgLid_=null,clearTimeout(this.lidTask_)},t.Trashcan.prototype.hasContents_=function(){return!!this.contents_.length},t.Trashcan.prototype.contentsIsOpen=function(){return this.flyout.isVisible()},t.Trashcan.prototype.openFlyout=function(){if(!this.contentsIsOpen()){var e=this.contents_.map(t.Xml.textToDom);this.flyout.show(e),this.fireUiEvent_(!0)}},t.Trashcan.prototype.closeFlyout=function(){this.contentsIsOpen()&&(this.flyout.hide(),this.fireUiEvent_(!1))},t.Trashcan.prototype.autoHide=function(t){!t&&this.flyout&&this.closeFlyout()},t.Trashcan.prototype.emptyContents=function(){this.hasContents_()&&(this.contents_.length=0,this.setMinOpenness_(0),this.closeFlyout())},t.Trashcan.prototype.position=function(e,i){if(this.initialized_){var n=t.uiPosition.getCornerOppositeToolbox(this.workspace_,e);e=t.uiPosition.getStartPositionRect(n,new t.utils.Size(this.WIDTH_,this.BODY_HEIGHT_+this.LID_HEIGHT_),this.MARGIN_HORIZONTAL_,this.MARGIN_VERTICAL_,e,this.workspace_),i=t.uiPosition.bumpPositionRect(e,this.MARGIN_VERTICAL_,n.vertical===t.uiPosition.verticalPosition.TOP?t.uiPosition.bumpDirection.DOWN:t.uiPosition.bumpDirection.UP,i),this.top_=i.top,this.left_=i.left,this.svgGroup_.setAttribute("transform","translate("+this.left_+","+this.top_+")")}},t.Trashcan.prototype.getBoundingRectangle=function(){return new t.utils.Rect(this.top_,this.top_+this.BODY_HEIGHT_+this.LID_HEIGHT_,this.left_,this.left_+this.WIDTH_)},t.Trashcan.prototype.getClientRect=function(){if(!this.svgGroup_)return null;var e=this.svgGroup_.getBoundingClientRect(),i=e.top+this.SPRITE_TOP_-this.MARGIN_HOTSPOT_;return e=e.left+this.SPRITE_LEFT_-this.MARGIN_HOTSPOT_,new t.utils.Rect(i,i+this.LID_HEIGHT_+this.BODY_HEIGHT_+2*this.MARGIN_HOTSPOT_,e,e+this.WIDTH_+2*this.MARGIN_HOTSPOT_)},t.Trashcan.prototype.onDragOver=function(t){this.setLidOpen(this.wouldDelete_)},t.Trashcan.prototype.onDragExit=function(t){this.setLidOpen(!1)},t.Trashcan.prototype.onDrop=function(t){setTimeout(this.setLidOpen.bind(this,!1),100)},t.Trashcan.prototype.setLidOpen=function(t){this.isLidOpen!=t&&(clearTimeout(this.lidTask_),this.isLidOpen=t,this.animateLid_())},t.Trashcan.prototype.animateLid_=function(){var e=t.Trashcan.ANIMATION_FRAMES_,i=1/(e+1);this.lidOpen_+=this.isLidOpen?i:-i,this.lidOpen_=Math.min(Math.max(this.lidOpen_,this.minOpenness_),1),this.setLidAngle_(this.lidOpen_*t.Trashcan.MAX_LID_ANGLE_),i=t.Trashcan.OPACITY_MIN_,this.svgGroup_.style.opacity=i+this.lidOpen_*(t.Trashcan.OPACITY_MAX_-i),this.lidOpen_>this.minOpenness_&&1>this.lidOpen_&&(this.lidTask_=setTimeout(this.animateLid_.bind(this),t.Trashcan.ANIMATION_LENGTH_/e))},t.Trashcan.prototype.setLidAngle_=function(e){var i=this.workspace_.toolboxPosition==t.utils.toolbox.Position.RIGHT||this.workspace_.horizontalLayout&&this.workspace_.RTL;this.svgLid_.setAttribute("transform","rotate("+(i?-e:e)+","+(i?4:this.WIDTH_-4)+","+(this.LID_HEIGHT_-2)+")")},t.Trashcan.prototype.setMinOpenness_=function(e){this.minOpenness_=e,this.isLidOpen||this.setLidAngle_(e*t.Trashcan.MAX_LID_ANGLE_)},t.Trashcan.prototype.closeLid=function(){this.setLidOpen(!1)},t.Trashcan.prototype.click=function(){this.hasContents_()&&this.openFlyout()},t.Trashcan.prototype.fireUiEvent_=function(e){e=new(t.Events.get(t.Events.TRASHCAN_OPEN))(e,this.workspace_.id),t.Events.fire(e)},t.Trashcan.prototype.blockMouseDownWhenOpenable_=function(t){!this.contentsIsOpen()&&this.hasContents_()&&t.stopPropagation()},t.Trashcan.prototype.mouseOver_=function(){this.hasContents_()&&this.setLidOpen(!0)},t.Trashcan.prototype.mouseOut_=function(){this.setLidOpen(!1)},t.Trashcan.prototype.onDelete_=function(e){if(!(0>=this.workspace_.options.maxTrashcanContents)&&e.type==t.Events.BLOCK_DELETE&&e.oldXml.tagName&&"shadow"!=e.oldXml.tagName.toLowerCase()&&(e=this.cleanBlockXML_(e.oldXml),-1==this.contents_.indexOf(e))){for(this.contents_.unshift(e);this.contents_.length>this.workspace_.options.maxTrashcanContents;)this.contents_.pop();this.setMinOpenness_(this.HAS_BLOCKS_LID_ANGLE_)}},t.Trashcan.prototype.cleanBlockXML_=function(e){for(var i=e=e.cloneNode(!0);i;){i.removeAttribute&&(i.removeAttribute("x"),i.removeAttribute("y"),i.removeAttribute("id"),i.removeAttribute("disabled"),"comment"==i.nodeName&&(i.removeAttribute("h"),i.removeAttribute("w"),i.removeAttribute("pinned")));var n=i.firstChild||i.nextSibling;if(!n)for(n=i.parentNode;n;){if(n.nextSibling){n=n.nextSibling;break}n=n.parentNode}i=n}return t.Xml.domToText(e)},t.VariablesDynamic={},t.VariablesDynamic.onCreateVariableButtonClick_String=function(e){t.Variables.createVariableButtonHandler(e.getTargetWorkspace(),void 0,"String")},t.VariablesDynamic.onCreateVariableButtonClick_Number=function(e){t.Variables.createVariableButtonHandler(e.getTargetWorkspace(),void 0,"Number")},t.VariablesDynamic.onCreateVariableButtonClick_Colour=function(e){t.Variables.createVariableButtonHandler(e.getTargetWorkspace(),void 0,"Colour")},t.VariablesDynamic.flyoutCategory=function(e){var i=[],n=document.createElement("button");return n.setAttribute("text",t.Msg.NEW_STRING_VARIABLE),n.setAttribute("callbackKey","CREATE_VARIABLE_STRING"),i.push(n),(n=document.createElement("button")).setAttribute("text",t.Msg.NEW_NUMBER_VARIABLE),n.setAttribute("callbackKey","CREATE_VARIABLE_NUMBER"),i.push(n),(n=document.createElement("button")).setAttribute("text",t.Msg.NEW_COLOUR_VARIABLE),n.setAttribute("callbackKey","CREATE_VARIABLE_COLOUR"),i.push(n),e.registerButtonCallback("CREATE_VARIABLE_STRING",t.VariablesDynamic.onCreateVariableButtonClick_String),e.registerButtonCallback("CREATE_VARIABLE_NUMBER",t.VariablesDynamic.onCreateVariableButtonClick_Number),e.registerButtonCallback("CREATE_VARIABLE_COLOUR",t.VariablesDynamic.onCreateVariableButtonClick_Colour),e=t.VariablesDynamic.flyoutCategoryBlocks(e),i.concat(e)},t.VariablesDynamic.flyoutCategoryBlocks=function(e){var i=[];if(0<(e=e.getAllVariables()).length){if(t.Blocks.variables_set_dynamic){var n=e[e.length-1],o=t.utils.xml.createElement("block");o.setAttribute("type","variables_set_dynamic"),o.setAttribute("gap",24),o.appendChild(t.Variables.generateVariableFieldDom(n)),i.push(o)}if(t.Blocks.variables_get_dynamic){e.sort(t.VariableModel.compareByName),n=0;for(var r;r=e[n];n++)(o=t.utils.xml.createElement("block")).setAttribute("type","variables_get_dynamic"),o.setAttribute("gap",8),o.appendChild(t.Variables.generateVariableFieldDom(r)),i.push(o)}}return i},t.ZoomControls=function(t){this.workspace_=t,this.id="zoomControls",this.zoomResetGroup_=this.zoomOutGroup_=this.zoomInGroup_=this.onZoomOutWrapper_=this.onZoomInWrapper_=this.onZoomResetWrapper_=null},t.ZoomControls.prototype.WIDTH_=32,t.ZoomControls.prototype.HEIGHT_=32,t.ZoomControls.prototype.SMALL_SPACING_=2,t.ZoomControls.prototype.LARGE_SPACING_=11,t.ZoomControls.prototype.MARGIN_VERTICAL_=20,t.ZoomControls.prototype.MARGIN_HORIZONTAL_=20,t.ZoomControls.prototype.svgGroup_=null,t.ZoomControls.prototype.left_=0,t.ZoomControls.prototype.top_=0,t.ZoomControls.prototype.initialized_=!1,t.ZoomControls.prototype.createDom=function(){this.svgGroup_=t.utils.dom.createSvgElement(t.utils.Svg.G,{},null);var e=String(Math.random()).substring(2);return this.createZoomOutSvg_(e),this.createZoomInSvg_(e),this.workspace_.isMovable()&&this.createZoomResetSvg_(e),this.svgGroup_},t.ZoomControls.prototype.init=function(){this.workspace_.getComponentManager().addComponent({component:this,weight:2,capabilities:[t.ComponentManager.Capability.POSITIONABLE]}),this.initialized_=!0},t.ZoomControls.prototype.dispose=function(){this.workspace_.getComponentManager().removeComponent("zoomControls"),this.svgGroup_&&t.utils.dom.removeNode(this.svgGroup_),this.onZoomResetWrapper_&&t.browserEvents.unbind(this.onZoomResetWrapper_),this.onZoomInWrapper_&&t.browserEvents.unbind(this.onZoomInWrapper_),this.onZoomOutWrapper_&&t.browserEvents.unbind(this.onZoomOutWrapper_)},t.ZoomControls.prototype.getBoundingRectangle=function(){var e=this.SMALL_SPACING_+2*this.HEIGHT_;return this.zoomResetGroup_&&(e+=this.LARGE_SPACING_+this.HEIGHT_),new t.utils.Rect(this.top_,this.top_+e,this.left_,this.left_+this.WIDTH_)},t.ZoomControls.prototype.position=function(e,i){if(this.initialized_){var n=t.uiPosition.getCornerOppositeToolbox(this.workspace_,e),o=this.SMALL_SPACING_+2*this.HEIGHT_;this.zoomResetGroup_&&(o+=this.LARGE_SPACING_+this.HEIGHT_),e=t.uiPosition.getStartPositionRect(n,new t.utils.Size(this.WIDTH_,o),this.MARGIN_HORIZONTAL_,this.MARGIN_VERTICAL_,e,this.workspace_),n=n.vertical,i=t.uiPosition.bumpPositionRect(e,this.MARGIN_VERTICAL_,n===t.uiPosition.verticalPosition.TOP?t.uiPosition.bumpDirection.DOWN:t.uiPosition.bumpDirection.UP,i),n===t.uiPosition.verticalPosition.TOP?(n=this.SMALL_SPACING_+this.HEIGHT_,this.zoomInGroup_.setAttribute("transform","translate(0, "+n+")"),this.zoomResetGroup_&&this.zoomResetGroup_.setAttribute("transform","translate(0, "+(n+this.LARGE_SPACING_+this.HEIGHT_)+")")):(n=this.zoomResetGroup_?this.LARGE_SPACING_+this.HEIGHT_:0,this.zoomInGroup_.setAttribute("transform","translate(0, "+n+")"),this.zoomOutGroup_.setAttribute("transform","translate(0, "+(n+this.SMALL_SPACING_+this.HEIGHT_)+")")),this.top_=i.top,this.left_=i.left,this.svgGroup_.setAttribute("transform","translate("+this.left_+","+this.top_+")")}},t.ZoomControls.prototype.createZoomOutSvg_=function(e){this.zoomOutGroup_=t.utils.dom.createSvgElement(t.utils.Svg.G,{class:"blocklyZoom"},this.svgGroup_);var i=t.utils.dom.createSvgElement(t.utils.Svg.CLIPPATH,{id:"blocklyZoomoutClipPath"+e},this.zoomOutGroup_);t.utils.dom.createSvgElement(t.utils.Svg.RECT,{width:32,height:32},i),t.utils.dom.createSvgElement(t.utils.Svg.IMAGE,{width:t.SPRITE.width,height:t.SPRITE.height,x:-64,y:-92,"clip-path":"url(#blocklyZoomoutClipPath"+e+")"},this.zoomOutGroup_).setAttributeNS(t.utils.dom.XLINK_NS,"xlink:href",this.workspace_.options.pathToMedia+t.SPRITE.url),this.onZoomOutWrapper_=t.browserEvents.conditionalBind(this.zoomOutGroup_,"mousedown",null,this.zoom_.bind(this,-1))},t.ZoomControls.prototype.createZoomInSvg_=function(e){this.zoomInGroup_=t.utils.dom.createSvgElement(t.utils.Svg.G,{class:"blocklyZoom"},this.svgGroup_);var i=t.utils.dom.createSvgElement(t.utils.Svg.CLIPPATH,{id:"blocklyZoominClipPath"+e},this.zoomInGroup_);t.utils.dom.createSvgElement(t.utils.Svg.RECT,{width:32,height:32},i),t.utils.dom.createSvgElement(t.utils.Svg.IMAGE,{width:t.SPRITE.width,height:t.SPRITE.height,x:-32,y:-92,"clip-path":"url(#blocklyZoominClipPath"+e+")"},this.zoomInGroup_).setAttributeNS(t.utils.dom.XLINK_NS,"xlink:href",this.workspace_.options.pathToMedia+t.SPRITE.url),this.onZoomInWrapper_=t.browserEvents.conditionalBind(this.zoomInGroup_,"mousedown",null,this.zoom_.bind(this,1))},t.ZoomControls.prototype.zoom_=function(e,i){this.workspace_.markFocused(),this.workspace_.zoomCenter(e),this.fireZoomEvent_(),t.Touch.clearTouchIdentifier(),i.stopPropagation(),i.preventDefault()},t.ZoomControls.prototype.createZoomResetSvg_=function(e){this.zoomResetGroup_=t.utils.dom.createSvgElement(t.utils.Svg.G,{class:"blocklyZoom"},this.svgGroup_);var i=t.utils.dom.createSvgElement(t.utils.Svg.CLIPPATH,{id:"blocklyZoomresetClipPath"+e},this.zoomResetGroup_);t.utils.dom.createSvgElement(t.utils.Svg.RECT,{width:32,height:32},i),t.utils.dom.createSvgElement(t.utils.Svg.IMAGE,{width:t.SPRITE.width,height:t.SPRITE.height,y:-92,"clip-path":"url(#blocklyZoomresetClipPath"+e+")"},this.zoomResetGroup_).setAttributeNS(t.utils.dom.XLINK_NS,"xlink:href",this.workspace_.options.pathToMedia+t.SPRITE.url),this.onZoomResetWrapper_=t.browserEvents.conditionalBind(this.zoomResetGroup_,"mousedown",null,this.resetZoom_.bind(this))},t.ZoomControls.prototype.resetZoom_=function(e){this.workspace_.markFocused();var i=Math.log(this.workspace_.options.zoomOptions.startScale/this.workspace_.scale)/Math.log(this.workspace_.options.zoomOptions.scaleSpeed);this.workspace_.beginCanvasTransition(),this.workspace_.zoomCenter(i),this.workspace_.scrollCenter(),setTimeout(this.workspace_.endCanvasTransition.bind(this.workspace_),500),this.fireZoomEvent_(),t.Touch.clearTouchIdentifier(),e.stopPropagation(),e.preventDefault()},t.ZoomControls.prototype.fireZoomEvent_=function(){var e=new(t.Events.get(t.Events.CLICK))(null,this.workspace_.id,"zoom_controls");t.Events.fire(e)},t.Css.register([".blocklyZoom>image, .blocklyZoom>svg>image {","opacity: .4;","}",".blocklyZoom>image:hover, .blocklyZoom>svg>image:hover {","opacity: .6;","}",".blocklyZoom>image:active, .blocklyZoom>svg>image:active {","opacity: .8;","}"]),t.ShortcutItems={},t.ShortcutItems.names={ESCAPE:"escape",DELETE:"delete",COPY:"copy",CUT:"cut",PASTE:"paste",UNDO:"undo",REDO:"redo"},t.ShortcutItems.registerEscape=function(){var e={name:t.ShortcutItems.names.ESCAPE,preconditionFn:function(t){return!t.options.readOnly},callback:function(){return t.hideChaff(),!0}};t.ShortcutRegistry.registry.register(e),t.ShortcutRegistry.registry.addKeyMapping(t.utils.KeyCodes.ESC,e.name)},t.ShortcutItems.registerDelete=function(){var e={name:t.ShortcutItems.names.DELETE,preconditionFn:function(e){return!e.options.readOnly&&t.selected&&t.selected.isDeletable()},callback:function(e,i){return i.preventDefault(),!t.Gesture.inProgress()&&(t.deleteBlock(t.selected),!0)}};t.ShortcutRegistry.registry.register(e),t.ShortcutRegistry.registry.addKeyMapping(t.utils.KeyCodes.DELETE,e.name),t.ShortcutRegistry.registry.addKeyMapping(t.utils.KeyCodes.BACKSPACE,e.name)},t.ShortcutItems.registerCopy=function(){var e={name:t.ShortcutItems.names.COPY,preconditionFn:function(e){return!e.options.readOnly&&!t.Gesture.inProgress()&&t.selected&&t.selected.isDeletable()&&t.selected.isMovable()},callback:function(e,i){return i.preventDefault(),t.hideChaff(),t.copy(t.selected),!0}};t.ShortcutRegistry.registry.register(e);var i=t.ShortcutRegistry.registry.createSerializedKey(t.utils.KeyCodes.C,[t.utils.KeyCodes.CTRL]);t.ShortcutRegistry.registry.addKeyMapping(i,e.name),i=t.ShortcutRegistry.registry.createSerializedKey(t.utils.KeyCodes.C,[t.utils.KeyCodes.ALT]),t.ShortcutRegistry.registry.addKeyMapping(i,e.name),i=t.ShortcutRegistry.registry.createSerializedKey(t.utils.KeyCodes.C,[t.utils.KeyCodes.META]),t.ShortcutRegistry.registry.addKeyMapping(i,e.name)},t.ShortcutItems.registerCut=function(){var e={name:t.ShortcutItems.names.CUT,preconditionFn:function(e){return!e.options.readOnly&&!t.Gesture.inProgress()&&t.selected&&t.selected.isDeletable()&&t.selected.isMovable()&&!t.selected.workspace.isFlyout},callback:function(){return t.copy(t.selected),t.deleteBlock(t.selected),!0}};t.ShortcutRegistry.registry.register(e);var i=t.ShortcutRegistry.registry.createSerializedKey(t.utils.KeyCodes.X,[t.utils.KeyCodes.CTRL]);t.ShortcutRegistry.registry.addKeyMapping(i,e.name),i=t.ShortcutRegistry.registry.createSerializedKey(t.utils.KeyCodes.X,[t.utils.KeyCodes.ALT]),t.ShortcutRegistry.registry.addKeyMapping(i,e.name),i=t.ShortcutRegistry.registry.createSerializedKey(t.utils.KeyCodes.X,[t.utils.KeyCodes.META]),t.ShortcutRegistry.registry.addKeyMapping(i,e.name)},t.ShortcutItems.registerPaste=function(){var e={name:t.ShortcutItems.names.PASTE,preconditionFn:function(e){return!e.options.readOnly&&!t.Gesture.inProgress()},callback:function(){return t.paste()}};t.ShortcutRegistry.registry.register(e);var i=t.ShortcutRegistry.registry.createSerializedKey(t.utils.KeyCodes.V,[t.utils.KeyCodes.CTRL]);t.ShortcutRegistry.registry.addKeyMapping(i,e.name),i=t.ShortcutRegistry.registry.createSerializedKey(t.utils.KeyCodes.V,[t.utils.KeyCodes.ALT]),t.ShortcutRegistry.registry.addKeyMapping(i,e.name),i=t.ShortcutRegistry.registry.createSerializedKey(t.utils.KeyCodes.V,[t.utils.KeyCodes.META]),t.ShortcutRegistry.registry.addKeyMapping(i,e.name)},t.ShortcutItems.registerUndo=function(){var e={name:t.ShortcutItems.names.UNDO,preconditionFn:function(e){return!e.options.readOnly&&!t.Gesture.inProgress()},callback:function(e){return t.hideChaff(),e.undo(!1),!0}};t.ShortcutRegistry.registry.register(e);var i=t.ShortcutRegistry.registry.createSerializedKey(t.utils.KeyCodes.Z,[t.utils.KeyCodes.CTRL]);t.ShortcutRegistry.registry.addKeyMapping(i,e.name),i=t.ShortcutRegistry.registry.createSerializedKey(t.utils.KeyCodes.Z,[t.utils.KeyCodes.ALT]),t.ShortcutRegistry.registry.addKeyMapping(i,e.name),i=t.ShortcutRegistry.registry.createSerializedKey(t.utils.KeyCodes.Z,[t.utils.KeyCodes.META]),t.ShortcutRegistry.registry.addKeyMapping(i,e.name)},t.ShortcutItems.registerRedo=function(){var e={name:t.ShortcutItems.names.REDO,preconditionFn:function(e){return!t.Gesture.inProgress()&&!e.options.readOnly},callback:function(e){return t.hideChaff(),e.undo(!0),!0}};t.ShortcutRegistry.registry.register(e);var i=t.ShortcutRegistry.registry.createSerializedKey(t.utils.KeyCodes.Z,[t.utils.KeyCodes.SHIFT,t.utils.KeyCodes.CTRL]);t.ShortcutRegistry.registry.addKeyMapping(i,e.name),i=t.ShortcutRegistry.registry.createSerializedKey(t.utils.KeyCodes.Z,[t.utils.KeyCodes.SHIFT,t.utils.KeyCodes.ALT]),t.ShortcutRegistry.registry.addKeyMapping(i,e.name),i=t.ShortcutRegistry.registry.createSerializedKey(t.utils.KeyCodes.Z,[t.utils.KeyCodes.SHIFT,t.utils.KeyCodes.META]),t.ShortcutRegistry.registry.addKeyMapping(i,e.name),i=t.ShortcutRegistry.registry.createSerializedKey(t.utils.KeyCodes.Y,[t.utils.KeyCodes.CTRL]),t.ShortcutRegistry.registry.addKeyMapping(i,e.name)},t.ShortcutItems.registerDefaultShortcuts=function(){t.ShortcutItems.registerEscape(),t.ShortcutItems.registerDelete(),t.ShortcutItems.registerCopy(),t.ShortcutItems.registerCut(),t.ShortcutItems.registerPaste(),t.ShortcutItems.registerUndo(),t.ShortcutItems.registerRedo()},t.ShortcutItems.registerDefaultShortcuts(),t.ContextMenuItems={},t.ContextMenuItems.registerUndo=function(){t.ContextMenuRegistry.registry.register({displayText:function(){return t.Msg.UNDO},preconditionFn:function(t){return 0<t.workspace.getUndoStack().length?"enabled":"disabled"},callback:function(t){t.workspace.undo(!1)},scopeType:t.ContextMenuRegistry.ScopeType.WORKSPACE,id:"undoWorkspace",weight:1})},t.ContextMenuItems.registerRedo=function(){t.ContextMenuRegistry.registry.register({displayText:function(){return t.Msg.REDO},preconditionFn:function(t){return 0<t.workspace.getRedoStack().length?"enabled":"disabled"},callback:function(t){t.workspace.undo(!0)},scopeType:t.ContextMenuRegistry.ScopeType.WORKSPACE,id:"redoWorkspace",weight:2})},t.ContextMenuItems.registerCleanup=function(){t.ContextMenuRegistry.registry.register({displayText:function(){return t.Msg.CLEAN_UP},preconditionFn:function(t){return t.workspace.isMovable()?1<t.workspace.getTopBlocks(!1).length?"enabled":"disabled":"hidden"},callback:function(t){t.workspace.cleanUp()},scopeType:t.ContextMenuRegistry.ScopeType.WORKSPACE,id:"cleanWorkspace",weight:3})},t.ContextMenuItems.toggleOption_=function(t,e){for(var i=0,n=0;n<e.length;n++)for(var o=e[n];o;)setTimeout(o.setCollapsed.bind(o,t),i),o=o.getNextBlock(),i+=10},t.ContextMenuItems.registerCollapse=function(){t.ContextMenuRegistry.registry.register({displayText:function(){return t.Msg.COLLAPSE_ALL},preconditionFn:function(t){if(t.workspace.options.collapse){t=t.workspace.getTopBlocks(!1);for(var e=0;e<t.length;e++)for(var i=t[e];i;){if(!i.isCollapsed())return"enabled";i=i.getNextBlock()}return"disabled"}return"hidden"},callback:function(e){t.ContextMenuItems.toggleOption_(!0,e.workspace.getTopBlocks(!0))},scopeType:t.ContextMenuRegistry.ScopeType.WORKSPACE,id:"collapseWorkspace",weight:4})},t.ContextMenuItems.registerExpand=function(){t.ContextMenuRegistry.registry.register({displayText:function(){return t.Msg.EXPAND_ALL},preconditionFn:function(t){if(t.workspace.options.collapse){t=t.workspace.getTopBlocks(!1);for(var e=0;e<t.length;e++)for(var i=t[e];i;){if(i.isCollapsed())return"enabled";i=i.getNextBlock()}return"disabled"}return"hidden"},callback:function(e){t.ContextMenuItems.toggleOption_(!1,e.workspace.getTopBlocks(!0))},scopeType:t.ContextMenuRegistry.ScopeType.WORKSPACE,id:"expandWorkspace",weight:5})},t.ContextMenuItems.addDeletableBlocks_=function(e,i){if(e.isDeletable())Array.prototype.push.apply(i,e.getDescendants(!1));else{e=e.getChildren(!1);for(var n=0;n<e.length;n++)t.ContextMenuItems.addDeletableBlocks_(e[n],i)}},t.ContextMenuItems.getDeletableBlocks_=function(e){var i=[];e=e.getTopBlocks(!0);for(var n=0;n<e.length;n++)t.ContextMenuItems.addDeletableBlocks_(e[n],i);return i},t.ContextMenuItems.deleteNext_=function(e,i){t.Events.setGroup(i);var n=e.shift();n&&(n.workspace?(n.dispose(!1,!0),setTimeout(t.ContextMenuItems.deleteNext_,10,e,i)):t.ContextMenuItems.deleteNext_(e,i)),t.Events.setGroup(!1)},t.ContextMenuItems.registerDeleteAll=function(){t.ContextMenuRegistry.registry.register({displayText:function(e){if(e.workspace)return 1==(e=t.ContextMenuItems.getDeletableBlocks_(e.workspace).length)?t.Msg.DELETE_BLOCK:t.Msg.DELETE_X_BLOCKS.replace("%1",String(e))},preconditionFn:function(e){if(e.workspace)return 0<t.ContextMenuItems.getDeletableBlocks_(e.workspace).length?"enabled":"disabled"},callback:function(e){if(e.workspace){e.workspace.cancelCurrentGesture();var i=t.ContextMenuItems.getDeletableBlocks_(e.workspace),n=t.utils.genUid();2>i.length?t.ContextMenuItems.deleteNext_(i,n):t.confirm(t.Msg.DELETE_ALL_BLOCKS.replace("%1",i.length),function(e){e&&t.ContextMenuItems.deleteNext_(i,n)})}},scopeType:t.ContextMenuRegistry.ScopeType.WORKSPACE,id:"workspaceDelete",weight:6})},t.ContextMenuItems.registerWorkspaceOptions_=function(){t.ContextMenuItems.registerUndo(),t.ContextMenuItems.registerRedo(),t.ContextMenuItems.registerCleanup(),t.ContextMenuItems.registerCollapse(),t.ContextMenuItems.registerExpand(),t.ContextMenuItems.registerDeleteAll()},t.ContextMenuItems.registerDuplicate=function(){t.ContextMenuRegistry.registry.register({displayText:function(){return t.Msg.DUPLICATE_BLOCK},preconditionFn:function(t){return!(t=t.block).isInFlyout&&t.isDeletable()&&t.isMovable()?t.isDuplicatable()?"enabled":"disabled":"hidden"},callback:function(e){e.block&&t.duplicate(e.block)},scopeType:t.ContextMenuRegistry.ScopeType.BLOCK,id:"blockDuplicate",weight:1})},t.ContextMenuItems.registerComment=function(){t.ContextMenuRegistry.registry.register({displayText:function(e){return e.block.getCommentIcon()?t.Msg.REMOVE_COMMENT:t.Msg.ADD_COMMENT},preconditionFn:function(e){return e=e.block,t.utils.userAgent.IE||e.isInFlyout||!e.workspace.options.comments||e.isCollapsed()||!e.isEditable()?"hidden":"enabled"},callback:function(t){(t=t.block).getCommentIcon()?t.setCommentText(null):t.setCommentText("")},scopeType:t.ContextMenuRegistry.ScopeType.BLOCK,id:"blockComment",weight:2})},t.ContextMenuItems.registerInline=function(){t.ContextMenuRegistry.registry.register({displayText:function(e){return e.block.getInputsInline()?t.Msg.EXTERNAL_INPUTS:t.Msg.INLINE_INPUTS},preconditionFn:function(e){if(!(e=e.block).isInFlyout&&e.isMovable()&&!e.isCollapsed())for(var i=1;i<e.inputList.length;i++)if(e.inputList[i-1].type!=t.inputTypes.STATEMENT&&e.inputList[i].type!=t.inputTypes.STATEMENT)return"enabled";return"hidden"},callback:function(t){t.block.setInputsInline(!t.block.getInputsInline())},scopeType:t.ContextMenuRegistry.ScopeType.BLOCK,id:"blockInline",weight:3})},t.ContextMenuItems.registerCollapseExpandBlock=function(){t.ContextMenuRegistry.registry.register({displayText:function(e){return e.block.isCollapsed()?t.Msg.EXPAND_BLOCK:t.Msg.COLLAPSE_BLOCK},preconditionFn:function(t){return!(t=t.block).isInFlyout&&t.isMovable()&&t.workspace.options.collapse?"enabled":"hidden"},callback:function(t){t.block.setCollapsed(!t.block.isCollapsed())},scopeType:t.ContextMenuRegistry.ScopeType.BLOCK,id:"blockCollapseExpand",weight:4})},t.ContextMenuItems.registerDisable=function(){t.ContextMenuRegistry.registry.register({displayText:function(e){return e.block.isEnabled()?t.Msg.DISABLE_BLOCK:t.Msg.ENABLE_BLOCK},preconditionFn:function(t){return!(t=t.block).isInFlyout&&t.workspace.options.disable&&t.isEditable()?t.getInheritedDisabled()?"disabled":"enabled":"hidden"},callback:function(e){e=e.block;var i=t.Events.getGroup();i||t.Events.setGroup(!0),e.setEnabled(!e.isEnabled()),i||t.Events.setGroup(!1)},scopeType:t.ContextMenuRegistry.ScopeType.BLOCK,id:"blockDisable",weight:5})},t.ContextMenuItems.registerDelete=function(){t.ContextMenuRegistry.registry.register({displayText:function(e){var i=e.block;return e=i.getDescendants(!1).length,(i=i.getNextBlock())&&(e-=i.getDescendants(!1).length),1==e?t.Msg.DELETE_BLOCK:t.Msg.DELETE_X_BLOCKS.replace("%1",String(e))},preconditionFn:function(t){return!t.block.isInFlyout&&t.block.isDeletable()?"enabled":"hidden"},callback:function(e){t.Events.setGroup(!0),e.block&&t.deleteBlock(e.block),t.Events.setGroup(!1)},scopeType:t.ContextMenuRegistry.ScopeType.BLOCK,id:"blockDelete",weight:6})},t.ContextMenuItems.registerHelp=function(){t.ContextMenuRegistry.registry.register({displayText:function(){return t.Msg.HELP},preconditionFn:function(t){return("function"==typeof(t=t.block).helpUrl?t.helpUrl():t.helpUrl)?"enabled":"hidden"},callback:function(t){t.block.showHelp()},scopeType:t.ContextMenuRegistry.ScopeType.BLOCK,id:"blockHelp",weight:7})},t.ContextMenuItems.registerBlockOptions_=function(){t.ContextMenuItems.registerDuplicate(),t.ContextMenuItems.registerComment(),t.ContextMenuItems.registerInline(),t.ContextMenuItems.registerCollapseExpandBlock(),t.ContextMenuItems.registerDisable(),t.ContextMenuItems.registerDelete(),t.ContextMenuItems.registerHelp()},t.ContextMenuItems.registerDefaultOptions=function(){t.ContextMenuItems.registerWorkspaceOptions_(),t.ContextMenuItems.registerBlockOptions_()},t.ContextMenuItems.registerDefaultOptions(),t.Mutator=function(e){t.Mutator.superClass_.constructor.call(this,null),this.quarkNames_=e},t.utils.object.inherits(t.Mutator,t.Icon),t.Mutator.prototype.workspace_=null,t.Mutator.prototype.workspaceWidth_=0,t.Mutator.prototype.workspaceHeight_=0,t.Mutator.prototype.setBlock=function(t){this.block_=t},t.Mutator.prototype.getWorkspace=function(){return this.workspace_},t.Mutator.prototype.drawIcon_=function(e){t.utils.dom.createSvgElement(t.utils.Svg.RECT,{class:"blocklyIconShape",rx:"4",ry:"4",height:"16",width:"16"},e),t.utils.dom.createSvgElement(t.utils.Svg.PATH,{class:"blocklyIconSymbol",d:"m4.203,7.296 0,1.368 -0.92,0.677 -0.11,0.41 0.9,1.559 0.41,0.11 1.043,-0.457 1.187,0.683 0.127,1.134 0.3,0.3 1.8,0 0.3,-0.299 0.127,-1.138 1.185,-0.682 1.046,0.458 0.409,-0.11 0.9,-1.559 -0.11,-0.41 -0.92,-0.677 0,-1.366 0.92,-0.677 0.11,-0.41 -0.9,-1.559 -0.409,-0.109 -1.046,0.458 -1.185,-0.682 -0.127,-1.138 -0.3,-0.299 -1.8,0 -0.3,0.3 -0.126,1.135 -1.187,0.682 -1.043,-0.457 -0.41,0.11 -0.899,1.559 0.108,0.409z"},e),t.utils.dom.createSvgElement(t.utils.Svg.CIRCLE,{class:"blocklyIconShape",r:"2.7",cx:"8",cy:"8"},e)},t.Mutator.prototype.iconClick_=function(e){this.block_.isEditable()&&t.Icon.prototype.iconClick_.call(this,e)},t.Mutator.prototype.createEditor_=function(){if(this.svgDialog_=t.utils.dom.createSvgElement(t.utils.Svg.SVG,{x:t.Bubble.BORDER_WIDTH,y:t.Bubble.BORDER_WIDTH},null),this.quarkNames_.length)for(var e,i=t.utils.xml.createElement("xml"),n=0;e=this.quarkNames_[n];n++){var o=t.utils.xml.createElement("block");o.setAttribute("type",e),i.appendChild(o)}else i=null;return(n=new t.Options({disable:!1,parentWorkspace:this.block_.workspace,media:this.block_.workspace.options.pathToMedia,rtl:this.block_.RTL,horizontalLayout:!1,renderer:this.block_.workspace.options.renderer,rendererOverrides:this.block_.workspace.options.rendererOverrides})).toolboxPosition=this.block_.RTL?t.utils.toolbox.Position.RIGHT:t.utils.toolbox.Position.LEFT,(e=!!i)&&(n.languageTree=t.utils.toolbox.convertToolboxDefToJson(i)),this.workspace_=new t.WorkspaceSvg(n),this.workspace_.isMutator=!0,this.workspace_.addChangeListener(t.Events.disableOrphans),i=e?this.workspace_.addFlyout(t.utils.Svg.G):null,n=this.workspace_.createDom("blocklyMutatorBackground"),i&&n.insertBefore(i,this.workspace_.svgBlockCanvas_),this.svgDialog_.appendChild(n),this.svgDialog_},t.Mutator.prototype.updateEditable=function(){t.Mutator.superClass_.updateEditable.call(this),this.block_.isInFlyout||(this.block_.isEditable()?this.iconGroup_&&t.utils.dom.removeClass(this.iconGroup_,"blocklyIconGroupReadonly"):(this.setVisible(!1),this.iconGroup_&&t.utils.dom.addClass(this.iconGroup_,"blocklyIconGroupReadonly")))},t.Mutator.prototype.resizeBubble_=function(){var e=2*t.Bubble.BORDER_WIDTH,i=this.workspace_.getCanvas().getBBox(),n=i.width+i.x,o=i.height+3*e,r=this.workspace_.getFlyout();if(r){var s=r.getWorkspace().getMetricsManager().getScrollMetrics();o=Math.max(o,s.height+20),n+=r.getWidth()}this.block_.RTL&&(n=-i.x),n+=3*e,(Math.abs(this.workspaceWidth_-n)>e||Math.abs(this.workspaceHeight_-o)>e)&&(this.workspaceWidth_=n,this.workspaceHeight_=o,this.bubble_.setBubbleSize(n+e,o+e),this.svgDialog_.setAttribute("width",this.workspaceWidth_),this.svgDialog_.setAttribute("height",this.workspaceHeight_),this.workspace_.setCachedParentSvgSize(this.workspaceWidth_,this.workspaceHeight_)),this.block_.RTL&&(e="translate("+this.workspaceWidth_+",0)",this.workspace_.getCanvas().setAttribute("transform",e)),this.workspace_.resize()},t.Mutator.prototype.onBubbleMove_=function(){this.workspace_&&this.workspace_.recordDragTargets()},t.Mutator.prototype.setVisible=function(e){if(e!=this.isVisible())if(t.Events.fire(new(t.Events.get(t.Events.BUBBLE_OPEN))(this.block_,e,"mutator")),e){this.bubble_=new t.Bubble(this.block_.workspace,this.createEditor_(),this.block_.pathObject.svgPath,this.iconXY_,null,null),this.bubble_.setSvgId(this.block_.id),this.bubble_.registerMoveEvent(this.onBubbleMove_.bind(this));var i=this.workspace_.options.languageTree;e=this.workspace_.getFlyout(),i&&(e.init(this.workspace_),e.show(i)),this.rootBlock_=this.block_.decompose(this.workspace_),i=this.rootBlock_.getDescendants(!1);for(var n,o=0;n=i[o];o++)n.render();if(this.rootBlock_.setMovable(!1),this.rootBlock_.setDeletable(!1),e?(i=2*e.CORNER_RADIUS,e=this.rootBlock_.RTL?e.getWidth()+i:i):e=i=16,this.block_.RTL&&(e=-e),this.rootBlock_.moveBy(e,i),this.block_.saveConnections){var r=this,s=this.block_;s.saveConnections(this.rootBlock_),this.sourceListener_=function(){s.saveConnections(r.rootBlock_)},this.block_.workspace.addChangeListener(this.sourceListener_)}this.resizeBubble_(),this.workspace_.addChangeListener(this.workspaceChanged_.bind(this)),this.applyColour()}else this.svgDialog_=null,this.workspace_.dispose(),this.rootBlock_=this.workspace_=null,this.bubble_.dispose(),this.bubble_=null,this.workspaceHeight_=this.workspaceWidth_=0,this.sourceListener_&&(this.block_.workspace.removeChangeListener(this.sourceListener_),this.sourceListener_=null)},t.Mutator.prototype.workspaceChanged_=function(e){if(!(e.isUiEvent||e.type==t.Events.CHANGE&&"disabled"==e.element)){if(!this.workspace_.isDragging()){e=this.workspace_.getTopBlocks(!1);for(var i,n=0;i=e[n];n++){var o=i.getRelativeToSurfaceXY();if(20>o.y&&i.moveBy(0,20-o.y),i.RTL){var r=-20,s=this.workspace_.getFlyout();s&&(r-=s.getWidth()),o.x>r&&i.moveBy(r-o.x,0)}else 20>o.x&&i.moveBy(20-o.x,0)}}if(this.rootBlock_.workspace==this.workspace_){if(t.Events.setGroup(!0),e=(e=(i=this.block_).mutationToDom())&&t.Xml.domToText(e),n=i.rendered,i.rendered=!1,i.compose(this.rootBlock_),i.rendered=n,i.initSvg(),i.rendered&&i.render(),e!=(n=(n=i.mutationToDom())&&t.Xml.domToText(n))){t.Events.fire(new(t.Events.get(t.Events.BLOCK_CHANGE))(i,"mutation",null,e,n));var a=t.Events.getGroup();setTimeout(function(){t.Events.setGroup(a),i.bumpNeighbours(),t.Events.setGroup(!1)},t.BUMP_DELAY)}this.workspace_.isDragging()||this.resizeBubble_(),t.Events.setGroup(!1)}}},t.Mutator.prototype.dispose=function(){this.block_.mutator=null,t.Icon.prototype.dispose.call(this)},t.Mutator.prototype.updateBlockStyle=function(){var t=this.workspace_;if(t&&t.getAllBlocks(!1)){for(var e,i=t.getAllBlocks(!1),n=0;e=i[n];n++)e.setStyle(e.getStyleName());if(n=t.getFlyout())for(t=n.workspace_.getAllBlocks(!1),n=0;e=t[n];n++)e.setStyle(e.getStyleName())}},t.Mutator.reconnect=function(t,e,i){if(!t||!t.getSourceBlock().workspace)return!1;i=e.getInput(i).connection;var n=t.targetBlock();return!(n&&n!=e||i.targetConnection==t)&&(i.isConnected()&&i.disconnect(),i.connect(t),!0)},t.Mutator.findParentWs=function(t){var e=null;if(t&&t.options){var i=t.options.parentWorkspace;t.isFlyout?i&&i.options&&(e=i.options.parentWorkspace):i&&(e=i)}return e},t.FieldTextInput=function(e,i,n){this.spellcheck_=!0,t.FieldTextInput.superClass_.constructor.call(this,e,i,n),this.onKeyInputWrapper_=this.onKeyDownWrapper_=this.htmlInput_=null,this.fullBlockClickTarget_=!1,this.workspace_=null},t.utils.object.inherits(t.FieldTextInput,t.Field),t.FieldTextInput.prototype.DEFAULT_VALUE="",t.FieldTextInput.fromJson=function(e){var i=t.utils.replaceMessageReferences(e.text);return new t.FieldTextInput(i,void 0,e)},t.FieldTextInput.prototype.SERIALIZABLE=!0,t.FieldTextInput.BORDERRADIUS=4,t.FieldTextInput.prototype.CURSOR="text",t.FieldTextInput.prototype.configure_=function(e){t.FieldTextInput.superClass_.configure_.call(this,e),"boolean"==typeof e.spellcheck&&(this.spellcheck_=e.spellcheck)},t.FieldTextInput.prototype.initView=function(){if(this.getConstants().FULL_BLOCK_FIELDS){for(var t,e=0,i=0,n=0;t=this.sourceBlock_.inputList[n];n++){for(var o=0;t.fieldRow[o];o++)e++;t.connection&&i++}this.fullBlockClickTarget_=1>=e&&this.sourceBlock_.outputConnection&&!i}else this.fullBlockClickTarget_=!1;this.fullBlockClickTarget_?this.clickTarget_=this.sourceBlock_.getSvgRoot():this.createBorderRect_(),this.createTextElement_()},t.FieldTextInput.prototype.doClassValidation_=function(t){return null===t||void 0===t?null:String(t)},t.FieldTextInput.prototype.doValueInvalid_=function(e){this.isBeingEdited_&&(this.isTextValid_=!1,e=this.value_,this.value_=this.htmlInput_.untypedDefaultValue_,this.sourceBlock_&&t.Events.isEnabled()&&t.Events.fire(new(t.Events.get(t.Events.BLOCK_CHANGE))(this.sourceBlock_,"field",this.name||null,e,this.value_)))},t.FieldTextInput.prototype.doValueUpdate_=function(t){this.isTextValid_=!0,this.value_=t,this.isBeingEdited_||(this.isDirty_=!0)},t.FieldTextInput.prototype.applyColour=function(){this.sourceBlock_&&this.getConstants().FULL_BLOCK_FIELDS&&(this.borderRect_?this.borderRect_.setAttribute("stroke",this.sourceBlock_.style.colourTertiary):this.sourceBlock_.pathObject.svgPath.setAttribute("fill",this.getConstants().FIELD_BORDER_RECT_COLOUR))},t.FieldTextInput.prototype.render_=function(){if(t.FieldTextInput.superClass_.render_.call(this),this.isBeingEdited_){this.resizeEditor_();var e=this.htmlInput_;this.isTextValid_?(t.utils.dom.removeClass(e,"blocklyInvalidInput"),t.utils.aria.setState(e,t.utils.aria.State.INVALID,!1)):(t.utils.dom.addClass(e,"blocklyInvalidInput"),t.utils.aria.setState(e,t.utils.aria.State.INVALID,!0))}},t.FieldTextInput.prototype.setSpellcheck=function(t){t!=this.spellcheck_&&(this.spellcheck_=t,this.htmlInput_&&this.htmlInput_.setAttribute("spellcheck",this.spellcheck_))},t.FieldTextInput.prototype.showEditor_=function(e,i){this.workspace_=this.sourceBlock_.workspace,!(e=i||!1)&&(t.utils.userAgent.MOBILE||t.utils.userAgent.ANDROID||t.utils.userAgent.IPAD)?this.showPromptEditor_():this.showInlineEditor_(e)},t.FieldTextInput.prototype.showPromptEditor_=function(){t.prompt(t.Msg.CHANGE_VALUE_TITLE,this.getText(),function(t){this.setValue(this.getValueFromEditorText_(t))}.bind(this))},t.FieldTextInput.prototype.showInlineEditor_=function(e){t.WidgetDiv.show(this,this.sourceBlock_.RTL,this.widgetDispose_.bind(this)),this.htmlInput_=this.widgetCreate_(),this.isBeingEdited_=!0,e||(this.htmlInput_.focus({preventScroll:!0}),this.htmlInput_.select())},t.FieldTextInput.prototype.widgetCreate_=function(){var e=t.WidgetDiv.DIV;t.utils.dom.addClass(this.getClickTarget_(),"editing");var i=document.createElement("input");i.className="blocklyHtmlInput",i.setAttribute("spellcheck",this.spellcheck_);var n=this.workspace_.getScale(),o=this.getConstants().FIELD_TEXT_FONTSIZE*n+"pt";if(e.style.fontSize=o,i.style.fontSize=o,o=t.FieldTextInput.BORDERRADIUS*n+"px",this.fullBlockClickTarget_){o=((o=this.getScaledBBox()).bottom-o.top)/2+"px";var r=this.sourceBlock_.getParent()?this.sourceBlock_.getParent().style.colourTertiary:this.sourceBlock_.style.colourTertiary;i.style.border=1*n+"px solid "+r,e.style.borderRadius=o,e.style.transition="box-shadow 0.25s ease 0s",this.getConstants().FIELD_TEXTINPUT_BOX_SHADOW&&(e.style.boxShadow="rgba(255, 255, 255, 0.3) 0px 0px 0px "+4*n+"px")}return i.style.borderRadius=o,e.appendChild(i),i.value=i.defaultValue=this.getEditorText_(this.value_),i.untypedDefaultValue_=this.value_,i.oldValue_=null,this.resizeEditor_(),this.bindInputEvents_(i),i},t.FieldTextInput.prototype.widgetDispose_=function(){this.isBeingEdited_=!1,this.isTextValid_=!0,this.forceRerender(),this.onFinishEditing_&&this.onFinishEditing_(this.value_),this.unbindInputEvents_();var e=t.WidgetDiv.DIV.style;e.width="auto",e.height="auto",e.fontSize="",e.transition="",e.boxShadow="",this.htmlInput_=null,t.utils.dom.removeClass(this.getClickTarget_(),"editing")},t.FieldTextInput.prototype.bindInputEvents_=function(e){this.onKeyDownWrapper_=t.browserEvents.conditionalBind(e,"keydown",this,this.onHtmlInputKeyDown_),this.onKeyInputWrapper_=t.browserEvents.conditionalBind(e,"input",this,this.onHtmlInputChange_)},t.FieldTextInput.prototype.unbindInputEvents_=function(){this.onKeyDownWrapper_&&(t.browserEvents.unbind(this.onKeyDownWrapper_),this.onKeyDownWrapper_=null),this.onKeyInputWrapper_&&(t.browserEvents.unbind(this.onKeyInputWrapper_),this.onKeyInputWrapper_=null)},t.FieldTextInput.prototype.onHtmlInputKeyDown_=function(e){e.keyCode==t.utils.KeyCodes.ENTER?(t.WidgetDiv.hide(),t.DropDownDiv.hideWithoutAnimation()):e.keyCode==t.utils.KeyCodes.ESC?(this.setValue(this.htmlInput_.untypedDefaultValue_),t.WidgetDiv.hide(),t.DropDownDiv.hideWithoutAnimation()):e.keyCode==t.utils.KeyCodes.TAB&&(t.WidgetDiv.hide(),t.DropDownDiv.hideWithoutAnimation(),this.sourceBlock_.tab(this,!e.shiftKey),e.preventDefault())},t.FieldTextInput.prototype.onHtmlInputChange_=function(e){(e=this.htmlInput_.value)!==this.htmlInput_.oldValue_&&(this.htmlInput_.oldValue_=e,t.Events.setGroup(!0),e=this.getValueFromEditorText_(e),this.setValue(e),this.forceRerender(),this.resizeEditor_(),t.Events.setGroup(!1))},t.FieldTextInput.prototype.setEditorValue_=function(t){this.isDirty_=!0,this.isBeingEdited_&&(this.htmlInput_.value=this.getEditorText_(t)),this.setValue(t)},t.FieldTextInput.prototype.resizeEditor_=function(){var e=t.WidgetDiv.DIV,i=this.getScaledBBox();e.style.width=i.right-i.left+"px",e.style.height=i.bottom-i.top+"px",i=new t.utils.Coordinate(this.sourceBlock_.RTL?i.right-e.offsetWidth:i.left,i.top),e.style.left=i.x+"px",e.style.top=i.y+"px"},t.FieldTextInput.prototype.isTabNavigable=function(){return!0},t.FieldTextInput.prototype.getText_=function(){return this.isBeingEdited_&&this.htmlInput_?this.htmlInput_.value:null},t.FieldTextInput.prototype.getEditorText_=function(t){return String(t)},t.FieldTextInput.prototype.getValueFromEditorText_=function(t){return t},t.fieldRegistry.register("field_input",t.FieldTextInput),t.FieldAngle=function(e,i,n){this.clockwise_=t.FieldAngle.CLOCKWISE,this.offset_=t.FieldAngle.OFFSET,this.wrap_=t.FieldAngle.WRAP,this.round_=t.FieldAngle.ROUND,t.FieldAngle.superClass_.constructor.call(this,e,i,n),this.moveSurfaceWrapper_=this.clickSurfaceWrapper_=this.clickWrapper_=this.line_=this.gauge_=this.editor_=null},t.utils.object.inherits(t.FieldAngle,t.FieldTextInput),t.FieldAngle.prototype.DEFAULT_VALUE=0,t.FieldAngle.fromJson=function(e){return new t.FieldAngle(e.angle,void 0,e)},t.FieldAngle.prototype.SERIALIZABLE=!0,t.FieldAngle.ROUND=15,t.FieldAngle.HALF=50,t.FieldAngle.CLOCKWISE=!1,t.FieldAngle.OFFSET=0,t.FieldAngle.WRAP=360,t.FieldAngle.RADIUS=t.FieldAngle.HALF-1,t.FieldAngle.prototype.configure_=function(e){switch(t.FieldAngle.superClass_.configure_.call(this,e),e.mode){case"compass":this.clockwise_=!0,this.offset_=90;break;case"protractor":this.clockwise_=!1,this.offset_=0}var i=e.clockwise;"boolean"==typeof i&&(this.clockwise_=i),null!=(i=e.offset)&&(i=Number(i),isNaN(i)||(this.offset_=i)),null!=(i=e.wrap)&&(i=Number(i),isNaN(i)||(this.wrap_=i)),null!=(e=e.round)&&(e=Number(e),isNaN(e)||(this.round_=e))},t.FieldAngle.prototype.initView=function(){t.FieldAngle.superClass_.initView.call(this),this.symbol_=t.utils.dom.createSvgElement(t.utils.Svg.TSPAN,{},null),this.symbol_.appendChild(document.createTextNode("°")),this.textElement_.appendChild(this.symbol_)},t.FieldAngle.prototype.render_=function(){t.FieldAngle.superClass_.render_.call(this),this.updateGraph_()},t.FieldAngle.prototype.showEditor_=function(e){t.FieldAngle.superClass_.showEditor_.call(this,e,t.utils.userAgent.MOBILE||t.utils.userAgent.ANDROID||t.utils.userAgent.IPAD),this.dropdownCreate_(),t.DropDownDiv.getContentDiv().appendChild(this.editor_),t.DropDownDiv.setColour(this.sourceBlock_.style.colourPrimary,this.sourceBlock_.style.colourTertiary),t.DropDownDiv.showPositionedByField(this,this.dropdownDispose_.bind(this)),this.updateGraph_()},t.FieldAngle.prototype.dropdownCreate_=function(){var e=t.utils.dom.createSvgElement(t.utils.Svg.SVG,{xmlns:t.utils.dom.SVG_NS,"xmlns:html":t.utils.dom.HTML_NS,"xmlns:xlink":t.utils.dom.XLINK_NS,version:"1.1",height:2*t.FieldAngle.HALF+"px",width:2*t.FieldAngle.HALF+"px",style:"touch-action: none"},null),i=t.utils.dom.createSvgElement(t.utils.Svg.CIRCLE,{cx:t.FieldAngle.HALF,cy:t.FieldAngle.HALF,r:t.FieldAngle.RADIUS,class:"blocklyAngleCircle"},e);this.gauge_=t.utils.dom.createSvgElement(t.utils.Svg.PATH,{class:"blocklyAngleGauge"},e),this.line_=t.utils.dom.createSvgElement(t.utils.Svg.LINE,{x1:t.FieldAngle.HALF,y1:t.FieldAngle.HALF,class:"blocklyAngleLine"},e);for(var n=0;360>n;n+=15)t.utils.dom.createSvgElement(t.utils.Svg.LINE,{x1:t.FieldAngle.HALF+t.FieldAngle.RADIUS,y1:t.FieldAngle.HALF,x2:t.FieldAngle.HALF+t.FieldAngle.RADIUS-(0==n%45?10:5),y2:t.FieldAngle.HALF,class:"blocklyAngleMarks",transform:"rotate("+n+","+t.FieldAngle.HALF+","+t.FieldAngle.HALF+")"},e);this.clickWrapper_=t.browserEvents.conditionalBind(e,"click",this,this.hide_),this.clickSurfaceWrapper_=t.browserEvents.conditionalBind(i,"click",this,this.onMouseMove_,!0,!0),this.moveSurfaceWrapper_=t.browserEvents.conditionalBind(i,"mousemove",this,this.onMouseMove_,!0,!0),this.editor_=e},t.FieldAngle.prototype.dropdownDispose_=function(){this.clickWrapper_&&(t.browserEvents.unbind(this.clickWrapper_),this.clickWrapper_=null),this.clickSurfaceWrapper_&&(t.browserEvents.unbind(this.clickSurfaceWrapper_),this.clickSurfaceWrapper_=null),this.moveSurfaceWrapper_&&(t.browserEvents.unbind(this.moveSurfaceWrapper_),this.moveSurfaceWrapper_=null),this.line_=this.gauge_=null},t.FieldAngle.prototype.hide_=function(){t.DropDownDiv.hideIfOwner(this),t.WidgetDiv.hide()},t.FieldAngle.prototype.onMouseMove_=function(e){var i=this.gauge_.ownerSVGElement.getBoundingClientRect(),n=e.clientX-i.left-t.FieldAngle.HALF;e=e.clientY-i.top-t.FieldAngle.HALF,i=Math.atan(-e/n),isNaN(i)||(i=t.utils.math.toDegrees(i),0>n?i+=180:0<e&&(i+=360),i=this.clockwise_?this.offset_+360-i:360-(this.offset_-i),this.displayMouseOrKeyboardValue_(i))},t.FieldAngle.prototype.displayMouseOrKeyboardValue_=function(t){this.round_&&(t=Math.round(t/this.round_)*this.round_),(t=this.wrapValue_(t))!=this.value_&&this.setEditorValue_(t)},t.FieldAngle.prototype.updateGraph_=function(){if(this.gauge_){var e=Number(this.getText())+this.offset_,i=t.utils.math.toRadians(e%360);e=["M ",t.FieldAngle.HALF,",",t.FieldAngle.HALF];var n=t.FieldAngle.HALF,o=t.FieldAngle.HALF;if(!isNaN(i)){var r=Number(this.clockwise_),s=t.utils.math.toRadians(this.offset_),a=Math.cos(s)*t.FieldAngle.RADIUS,l=Math.sin(s)*-t.FieldAngle.RADIUS;r&&(i=2*s-i),n+=Math.cos(i)*t.FieldAngle.RADIUS,o-=Math.sin(i)*t.FieldAngle.RADIUS,i=Math.abs(Math.floor((i-s)/Math.PI)%2),r&&(i=1-i),e.push(" l ",a,",",l," A ",t.FieldAngle.RADIUS,",",t.FieldAngle.RADIUS," 0 ",i," ",r," ",n,",",o," z")}this.gauge_.setAttribute("d",e.join("")),this.line_.setAttribute("x2",n),this.line_.setAttribute("y2",o)}},t.FieldAngle.prototype.onHtmlInputKeyDown_=function(e){var i;if(t.FieldAngle.superClass_.onHtmlInputKeyDown_.call(this,e),e.keyCode===t.utils.KeyCodes.LEFT?i=this.sourceBlock_.RTL?1:-1:e.keyCode===t.utils.KeyCodes.RIGHT?i=this.sourceBlock_.RTL?-1:1:e.keyCode===t.utils.KeyCodes.DOWN?i=-1:e.keyCode===t.utils.KeyCodes.UP&&(i=1),i){var n=this.getValue();this.displayMouseOrKeyboardValue_(n+i*this.round_),e.preventDefault(),e.stopPropagation()}},t.FieldAngle.prototype.doClassValidation_=function(t){return t=Number(t),isNaN(t)||!isFinite(t)?null:this.wrapValue_(t)},t.FieldAngle.prototype.wrapValue_=function(t){return 0>(t%=360)&&(t+=360),t>this.wrap_&&(t-=360),t},t.Css.register(".blocklyAngleCircle {,stroke: #444;,stroke-width: 1;,fill: #ddd;,fill-opacity: .8;,},.blocklyAngleMarks {,stroke: #444;,stroke-width: 1;,},.blocklyAngleGauge {,fill: #f88;,fill-opacity: .8;,pointer-events: none;,},.blocklyAngleLine {,stroke: #f00;,stroke-width: 2;,stroke-linecap: round;,pointer-events: none;,}".split(",")),t.fieldRegistry.register("field_angle",t.FieldAngle),t.FieldCheckbox=function(e,i,n){this.checkChar_=null,t.FieldCheckbox.superClass_.constructor.call(this,e,i,n)},t.utils.object.inherits(t.FieldCheckbox,t.Field),t.FieldCheckbox.prototype.DEFAULT_VALUE=!1,t.FieldCheckbox.fromJson=function(e){return new t.FieldCheckbox(e.checked,void 0,e)},t.FieldCheckbox.CHECK_CHAR="✓",t.FieldCheckbox.prototype.SERIALIZABLE=!0,t.FieldCheckbox.prototype.CURSOR="default",t.FieldCheckbox.prototype.configure_=function(e){t.FieldCheckbox.superClass_.configure_.call(this,e),e.checkCharacter&&(this.checkChar_=e.checkCharacter)},t.FieldCheckbox.prototype.initView=function(){t.FieldCheckbox.superClass_.initView.call(this),t.utils.dom.addClass(this.textElement_,"blocklyCheckbox"),this.textElement_.style.display=this.value_?"block":"none"},t.FieldCheckbox.prototype.render_=function(){this.textContent_&&(this.textContent_.nodeValue=this.getDisplayText_()),this.updateSize_(this.getConstants().FIELD_CHECKBOX_X_OFFSET)},t.FieldCheckbox.prototype.getDisplayText_=function(){return this.checkChar_||t.FieldCheckbox.CHECK_CHAR},t.FieldCheckbox.prototype.setCheckCharacter=function(t){this.checkChar_=t,this.forceRerender()},t.FieldCheckbox.prototype.showEditor_=function(){this.setValue(!this.value_)},t.FieldCheckbox.prototype.doClassValidation_=function(t){return!0===t||"TRUE"===t?"TRUE":!1===t||"FALSE"===t?"FALSE":null},t.FieldCheckbox.prototype.doValueUpdate_=function(t){this.value_=this.convertValueToBool_(t),this.textElement_&&(this.textElement_.style.display=this.value_?"block":"none")},t.FieldCheckbox.prototype.getValue=function(){return this.value_?"TRUE":"FALSE"},t.FieldCheckbox.prototype.getValueBoolean=function(){return this.value_},t.FieldCheckbox.prototype.getText=function(){return String(this.convertValueToBool_(this.value_))},t.FieldCheckbox.prototype.convertValueToBool_=function(t){return"string"==typeof t?"TRUE"==t:!!t},t.fieldRegistry.register("field_checkbox",t.FieldCheckbox),t.FieldColour=function(e,i,n){t.FieldColour.superClass_.constructor.call(this,e,i,n),this.onKeyDownWrapper_=this.onMouseLeaveWrapper_=this.onMouseEnterWrapper_=this.onMouseMoveWrapper_=this.onClickWrapper_=this.highlightedIndex_=this.picker_=null},t.utils.object.inherits(t.FieldColour,t.Field),t.FieldColour.fromJson=function(e){return new t.FieldColour(e.colour,void 0,e)},t.FieldColour.prototype.SERIALIZABLE=!0,t.FieldColour.prototype.CURSOR="default",t.FieldColour.prototype.isDirty_=!1,t.FieldColour.prototype.colours_=null,t.FieldColour.prototype.titles_=null,t.FieldColour.prototype.columns_=0,t.FieldColour.prototype.configure_=function(e){t.FieldColour.superClass_.configure_.call(this,e),e.colourOptions&&(this.colours_=e.colourOptions,this.titles_=e.colourTitles),e.columns&&(this.columns_=e.columns)},t.FieldColour.prototype.initView=function(){this.size_=new t.utils.Size(this.getConstants().FIELD_COLOUR_DEFAULT_WIDTH,this.getConstants().FIELD_COLOUR_DEFAULT_HEIGHT),this.getConstants().FIELD_COLOUR_FULL_BLOCK?this.clickTarget_=this.sourceBlock_.getSvgRoot():(this.createBorderRect_(),this.borderRect_.style.fillOpacity="1")},t.FieldColour.prototype.applyColour=function(){this.getConstants().FIELD_COLOUR_FULL_BLOCK?(this.sourceBlock_.pathObject.svgPath.setAttribute("fill",this.getValue()),this.sourceBlock_.pathObject.svgPath.setAttribute("stroke","#fff")):this.borderRect_&&(this.borderRect_.style.fill=this.getValue())},t.FieldColour.prototype.doClassValidation_=function(e){return"string"!=typeof e?null:t.utils.colour.parse(e)},t.FieldColour.prototype.doValueUpdate_=function(t){this.value_=t,this.borderRect_?this.borderRect_.style.fill=t:this.sourceBlock_&&this.sourceBlock_.rendered&&(this.sourceBlock_.pathObject.svgPath.setAttribute("fill",t),this.sourceBlock_.pathObject.svgPath.setAttribute("stroke","#fff"))},t.FieldColour.prototype.getText=function(){var t=this.value_;return/^#(.)\1(.)\2(.)\3$/.test(t)&&(t="#"+t[1]+t[3]+t[5]),t},t.FieldColour.COLOURS="#ffffff #cccccc #c0c0c0 #999999 #666666 #333333 #000000 #ffcccc #ff6666 #ff0000 #cc0000 #990000 #660000 #330000 #ffcc99 #ff9966 #ff9900 #ff6600 #cc6600 #993300 #663300 #ffff99 #ffff66 #ffcc66 #ffcc33 #cc9933 #996633 #663333 #ffffcc #ffff33 #ffff00 #ffcc00 #999900 #666600 #333300 #99ff99 #66ff99 #33ff33 #33cc00 #009900 #006600 #003300 #99ffff #33ffff #66cccc #00cccc #339999 #336666 #003333 #ccffff #66ffff #33ccff #3366ff #3333ff #000099 #000066 #ccccff #9999ff #6666cc #6633ff #6600cc #333399 #330099 #ffccff #ff99ff #cc66cc #cc33cc #993399 #663366 #330033".split(" "),t.FieldColour.prototype.DEFAULT_VALUE=t.FieldColour.COLOURS[0],t.FieldColour.TITLES=[],t.FieldColour.COLUMNS=7,t.FieldColour.prototype.setColours=function(t,e){return this.colours_=t,e&&(this.titles_=e),this},t.FieldColour.prototype.setColumns=function(t){return this.columns_=t,this},t.FieldColour.prototype.showEditor_=function(){this.dropdownCreate_(),t.DropDownDiv.getContentDiv().appendChild(this.picker_),t.DropDownDiv.showPositionedByField(this,this.dropdownDispose_.bind(this)),this.picker_.focus({preventScroll:!0})},t.FieldColour.prototype.onClick_=function(e){null!==(e=(e=e.target)&&e.label)&&(this.setValue(e),t.DropDownDiv.hideIfOwner(this))},t.FieldColour.prototype.onKeyDown_=function(e){var i=!1;e.keyCode===t.utils.KeyCodes.UP?(this.moveHighlightBy_(0,-1),i=!0):e.keyCode===t.utils.KeyCodes.DOWN?(this.moveHighlightBy_(0,1),i=!0):e.keyCode===t.utils.KeyCodes.LEFT?(this.moveHighlightBy_(-1,0),i=!0):e.keyCode===t.utils.KeyCodes.RIGHT?(this.moveHighlightBy_(1,0),i=!0):e.keyCode===t.utils.KeyCodes.ENTER&&((i=this.getHighlighted_())&&(null!==(i=i&&i.label)&&this.setValue(i)),t.DropDownDiv.hideWithoutAnimation(),i=!0),i&&e.stopPropagation()},t.FieldColour.prototype.moveHighlightBy_=function(e,i){var n=this.colours_||t.FieldColour.COLOURS,o=this.columns_||t.FieldColour.COLUMNS,r=this.highlightedIndex_%o,s=Math.floor(this.highlightedIndex_/o);r+=e,s+=i,0>e?0>r&&0<s?(r=o-1,s--):0>r&&(r=0):0<e?r>o-1&&s<Math.floor(n.length/o)-1?(r=0,s++):r>o-1&&r--:0>i?0>s&&(s=0):0<i&&s>Math.floor(n.length/o)-1&&(s=Math.floor(n.length/o)-1),this.setHighlightedCell_(this.picker_.childNodes[s].childNodes[r],s*o+r)},t.FieldColour.prototype.onMouseMove_=function(t){var e=(t=t.target)&&Number(t.getAttribute("data-index"));null!==e&&e!==this.highlightedIndex_&&this.setHighlightedCell_(t,e)},t.FieldColour.prototype.onMouseEnter_=function(){this.picker_.focus({preventScroll:!0})},t.FieldColour.prototype.onMouseLeave_=function(){this.picker_.blur();var e=this.getHighlighted_();e&&t.utils.dom.removeClass(e,"blocklyColourHighlighted")},t.FieldColour.prototype.getHighlighted_=function(){var e=this.columns_||t.FieldColour.COLUMNS,i=this.picker_.childNodes[Math.floor(this.highlightedIndex_/e)];return i?i.childNodes[this.highlightedIndex_%e]:null},t.FieldColour.prototype.setHighlightedCell_=function(e,i){var n=this.getHighlighted_();n&&t.utils.dom.removeClass(n,"blocklyColourHighlighted"),t.utils.dom.addClass(e,"blocklyColourHighlighted"),this.highlightedIndex_=i,t.utils.aria.setState(this.picker_,t.utils.aria.State.ACTIVEDESCENDANT,e.getAttribute("id"))},t.FieldColour.prototype.dropdownCreate_=function(){var e=this.columns_||t.FieldColour.COLUMNS,i=this.colours_||t.FieldColour.COLOURS,n=this.titles_||t.FieldColour.TITLES,o=this.getValue(),r=document.createElement("table");r.className="blocklyColourTable",r.tabIndex=0,r.dir="ltr",t.utils.aria.setRole(r,t.utils.aria.Role.GRID),t.utils.aria.setState(r,t.utils.aria.State.EXPANDED,!0),t.utils.aria.setState(r,t.utils.aria.State.ROWCOUNT,Math.floor(i.length/e)),t.utils.aria.setState(r,t.utils.aria.State.COLCOUNT,e);for(var s,a=0;a<i.length;a++){0==a%e&&(s=document.createElement("tr"),t.utils.aria.setRole(s,t.utils.aria.Role.ROW),r.appendChild(s));var l=document.createElement("td");s.appendChild(l),l.label=i[a],l.title=n[a]||i[a],l.id=t.utils.IdGenerator.getNextUniqueId(),l.setAttribute("data-index",a),t.utils.aria.setRole(l,t.utils.aria.Role.GRIDCELL),t.utils.aria.setState(l,t.utils.aria.State.LABEL,i[a]),t.utils.aria.setState(l,t.utils.aria.State.SELECTED,i[a]==o),l.style.backgroundColor=i[a],i[a]==o&&(l.className="blocklyColourSelected",this.highlightedIndex_=a)}this.onClickWrapper_=t.browserEvents.conditionalBind(r,"click",this,this.onClick_,!0),this.onMouseMoveWrapper_=t.browserEvents.conditionalBind(r,"mousemove",this,this.onMouseMove_,!0),this.onMouseEnterWrapper_=t.browserEvents.conditionalBind(r,"mouseenter",this,this.onMouseEnter_,!0),this.onMouseLeaveWrapper_=t.browserEvents.conditionalBind(r,"mouseleave",this,this.onMouseLeave_,!0),this.onKeyDownWrapper_=t.browserEvents.conditionalBind(r,"keydown",this,this.onKeyDown_),this.picker_=r},t.FieldColour.prototype.dropdownDispose_=function(){this.onClickWrapper_&&(t.browserEvents.unbind(this.onClickWrapper_),this.onClickWrapper_=null),this.onMouseMoveWrapper_&&(t.browserEvents.unbind(this.onMouseMoveWrapper_),this.onMouseMoveWrapper_=null),this.onMouseEnterWrapper_&&(t.browserEvents.unbind(this.onMouseEnterWrapper_),this.onMouseEnterWrapper_=null),this.onMouseLeaveWrapper_&&(t.browserEvents.unbind(this.onMouseLeaveWrapper_),this.onMouseLeaveWrapper_=null),this.onKeyDownWrapper_&&(t.browserEvents.unbind(this.onKeyDownWrapper_),this.onKeyDownWrapper_=null),this.highlightedIndex_=this.picker_=null},t.Css.register([".blocklyColourTable {","border-collapse: collapse;","display: block;","outline: none;","padding: 1px;","}",".blocklyColourTable>tr>td {","border: .5px solid #888;","box-sizing: border-box;","cursor: pointer;","display: inline-block;","height: 20px;","padding: 0;","width: 20px;","}",".blocklyColourTable>tr>td.blocklyColourHighlighted {","border-color: #eee;","box-shadow: 2px 2px 7px 2px rgba(0,0,0,.3);","position: relative;","}",".blocklyColourSelected, .blocklyColourSelected:hover {","border-color: #eee !important;","outline: 1px solid #333;","position: relative;","}"]),t.fieldRegistry.register("field_colour",t.FieldColour),t.FieldDropdown=function(e,i,n){"function"!=typeof e&&t.FieldDropdown.validateOptions_(e),this.menuGenerator_=e,this.suffixField=this.prefixField=this.generatedOptions_=null,this.trimOptions_(),this.selectedOption_=this.getOptions(!1)[0],t.FieldDropdown.superClass_.constructor.call(this,this.selectedOption_[1],i,n),this.svgArrow_=this.arrow_=this.imageElement_=this.menu_=this.selectedMenuItem_=null},t.utils.object.inherits(t.FieldDropdown,t.Field),t.FieldDropdown.fromJson=function(e){return new t.FieldDropdown(e.options,void 0,e)},t.FieldDropdown.prototype.fromXml=function(t){this.isOptionListDynamic()&&this.getOptions(!1),this.setValue(t.textContent)},t.FieldDropdown.prototype.SERIALIZABLE=!0,t.FieldDropdown.CHECKMARK_OVERHANG=25,t.FieldDropdown.MAX_MENU_HEIGHT_VH=.45,t.FieldDropdown.IMAGE_Y_OFFSET=5,t.FieldDropdown.IMAGE_Y_PADDING=2*t.FieldDropdown.IMAGE_Y_OFFSET,t.FieldDropdown.ARROW_CHAR=t.utils.userAgent.ANDROID?"▼":"▾",t.FieldDropdown.prototype.CURSOR="default",t.FieldDropdown.prototype.initView=function(){this.shouldAddBorderRect_()?this.createBorderRect_():this.clickTarget_=this.sourceBlock_.getSvgRoot(),this.createTextElement_(),this.imageElement_=t.utils.dom.createSvgElement(t.utils.Svg.IMAGE,{},this.fieldGroup_),this.getConstants().FIELD_DROPDOWN_SVG_ARROW?this.createSVGArrow_():this.createTextArrow_(),this.borderRect_&&t.utils.dom.addClass(this.borderRect_,"blocklyDropdownRect")},t.FieldDropdown.prototype.shouldAddBorderRect_=function(){return!this.getConstants().FIELD_DROPDOWN_NO_BORDER_RECT_SHADOW||this.getConstants().FIELD_DROPDOWN_NO_BORDER_RECT_SHADOW&&!this.sourceBlock_.isShadow()},t.FieldDropdown.prototype.createTextArrow_=function(){this.arrow_=t.utils.dom.createSvgElement(t.utils.Svg.TSPAN,{},this.textElement_),this.arrow_.appendChild(document.createTextNode(this.sourceBlock_.RTL?t.FieldDropdown.ARROW_CHAR+" ":" "+t.FieldDropdown.ARROW_CHAR)),this.sourceBlock_.RTL?this.textElement_.insertBefore(this.arrow_,this.textContent_):this.textElement_.appendChild(this.arrow_)},t.FieldDropdown.prototype.createSVGArrow_=function(){this.svgArrow_=t.utils.dom.createSvgElement(t.utils.Svg.IMAGE,{height:this.getConstants().FIELD_DROPDOWN_SVG_ARROW_SIZE+"px",width:this.getConstants().FIELD_DROPDOWN_SVG_ARROW_SIZE+"px"},this.fieldGroup_),this.svgArrow_.setAttributeNS(t.utils.dom.XLINK_NS,"xlink:href",this.getConstants().FIELD_DROPDOWN_SVG_ARROW_DATAURI)},t.FieldDropdown.prototype.showEditor_=function(e){if(this.dropdownCreate_(),this.menu_.openingCoords=e&&"number"==typeof e.clientX?new t.utils.Coordinate(e.clientX,e.clientY):null,this.menu_.render(t.DropDownDiv.getContentDiv()),e=this.menu_.getElement(),t.utils.dom.addClass(e,"blocklyDropdownMenu"),this.getConstants().FIELD_DROPDOWN_COLOURED_DIV){e=this.sourceBlock_.isShadow()?this.sourceBlock_.getParent().getColour():this.sourceBlock_.getColour();var i=this.sourceBlock_.isShadow()?this.sourceBlock_.getParent().style.colourTertiary:this.sourceBlock_.style.colourTertiary;t.DropDownDiv.setColour(e,i)}t.DropDownDiv.showPositionedByField(this,this.dropdownDispose_.bind(this)),this.menu_.focus(),this.selectedMenuItem_&&this.menu_.setHighlighted(this.selectedMenuItem_),this.applyColour()},t.FieldDropdown.prototype.dropdownCreate_=function(){var e=new t.Menu;e.setRole(t.utils.aria.Role.LISTBOX),this.menu_=e;var i=this.getOptions(!1);this.selectedMenuItem_=null;for(var n=0;n<i.length;n++){var o=i[n][0],r=i[n][1];if("object"==typeof o){var s=new Image(o.width,o.height);s.src=o.src,s.alt=o.alt||"",o=s}(o=new t.MenuItem(o,r)).setRole(t.utils.aria.Role.OPTION),o.setRightToLeft(this.sourceBlock_.RTL),o.setCheckable(!0),e.addChild(o),o.setChecked(r==this.value_),r==this.value_&&(this.selectedMenuItem_=o),o.onAction(this.handleMenuActionEvent_,this)}},t.FieldDropdown.prototype.dropdownDispose_=function(){this.menu_&&this.menu_.dispose(),this.selectedMenuItem_=this.menu_=null,this.applyColour()},t.FieldDropdown.prototype.handleMenuActionEvent_=function(e){t.DropDownDiv.hideIfOwner(this,!0),this.onItemSelected_(this.menu_,e)},t.FieldDropdown.prototype.onItemSelected_=function(t,e){this.setValue(e.getValue())},t.FieldDropdown.prototype.trimOptions_=function(){var e=this.menuGenerator_;if(Array.isArray(e)){for(var i=!1,n=0;n<e.length;n++){var o=e[n][0];"string"==typeof o?e[n][0]=t.utils.replaceMessageReferences(o):(null!=o.alt&&(e[n][0].alt=t.utils.replaceMessageReferences(o.alt)),i=!0)}if(!(i||2>e.length)){for(i=[],n=0;n<e.length;n++)i.push(e[n][0]);n=t.utils.string.shortestStringLength(i),o=t.utils.string.commonWordPrefix(i,n);var r=t.utils.string.commonWordSuffix(i,n);!o&&!r||n<=o+r||(o&&(this.prefixField=i[0].substring(0,o-1)),r&&(this.suffixField=i[0].substr(1-r)),this.menuGenerator_=t.FieldDropdown.applyTrim_(e,o,r))}}},t.FieldDropdown.applyTrim_=function(t,e,i){for(var n=[],o=0;o<t.length;o++){var r=t[o][0],s=t[o][1];r=r.substring(e,r.length-i),n[o]=[r,s]}return n},t.FieldDropdown.prototype.isOptionListDynamic=function(){return"function"==typeof this.menuGenerator_},t.FieldDropdown.prototype.getOptions=function(e){return this.isOptionListDynamic()?(this.generatedOptions_&&e||(this.generatedOptions_=this.menuGenerator_.call(this),t.FieldDropdown.validateOptions_(this.generatedOptions_)),this.generatedOptions_):this.menuGenerator_},t.FieldDropdown.prototype.doClassValidation_=function(t){for(var e,i=!1,n=this.getOptions(!0),o=0;e=n[o];o++)if(e[1]==t){i=!0;break}return i?t:(this.sourceBlock_&&console.warn("Cannot set the dropdown's value to an unavailable option. Block type: "+this.sourceBlock_.type+", Field name: "+this.name+", Value: "+t),null)},t.FieldDropdown.prototype.doValueUpdate_=function(e){t.FieldDropdown.superClass_.doValueUpdate_.call(this,e),e=this.getOptions(!0);for(var i,n=0;i=e[n];n++)i[1]==this.value_&&(this.selectedOption_=i)},t.FieldDropdown.prototype.applyColour=function(){this.borderRect_&&(this.borderRect_.setAttribute("stroke",this.sourceBlock_.style.colourTertiary),this.menu_?this.borderRect_.setAttribute("fill",this.sourceBlock_.style.colourTertiary):this.borderRect_.setAttribute("fill","transparent")),this.sourceBlock_&&this.arrow_&&(this.sourceBlock_.isShadow()?this.arrow_.style.fill=this.sourceBlock_.style.colourSecondary:this.arrow_.style.fill=this.sourceBlock_.style.colourPrimary)},t.FieldDropdown.prototype.render_=function(){this.textContent_.nodeValue="",this.imageElement_.style.display="none";var t=this.selectedOption_&&this.selectedOption_[0];t&&"object"==typeof t?this.renderSelectedImage_(t):this.renderSelectedText_(),this.positionBorderRect_()},t.FieldDropdown.prototype.renderSelectedImage_=function(e){this.imageElement_.style.display="",this.imageElement_.setAttributeNS(t.utils.dom.XLINK_NS,"xlink:href",e.src),this.imageElement_.setAttribute("height",e.height),this.imageElement_.setAttribute("width",e.width);var i=Number(e.height);e=Number(e.width);var n=!!this.borderRect_,o=Math.max(n?this.getConstants().FIELD_DROPDOWN_BORDER_RECT_HEIGHT:0,i+t.FieldDropdown.IMAGE_Y_PADDING);n=n?this.getConstants().FIELD_BORDER_RECT_X_PADDING:0;var r=this.svgArrow_?this.positionSVGArrow_(e+n,o/2-this.getConstants().FIELD_DROPDOWN_SVG_ARROW_SIZE/2):t.utils.dom.getFastTextWidth(this.arrow_,this.getConstants().FIELD_TEXT_FONTSIZE,this.getConstants().FIELD_TEXT_FONTWEIGHT,this.getConstants().FIELD_TEXT_FONTFAMILY);this.size_.width=e+r+2*n,this.size_.height=o;var s=0;this.sourceBlock_.RTL?this.imageElement_.setAttribute("x",n+r):(s=e+r,this.textElement_.setAttribute("text-anchor","end"),this.imageElement_.setAttribute("x",n)),this.imageElement_.setAttribute("y",o/2-i/2),this.positionTextElement_(s+n,e+r)},t.FieldDropdown.prototype.renderSelectedText_=function(){this.textContent_.nodeValue=this.getDisplayText_(),t.utils.dom.addClass(this.textElement_,"blocklyDropdownText"),this.textElement_.setAttribute("text-anchor","start");var e=!!this.borderRect_,i=Math.max(e?this.getConstants().FIELD_DROPDOWN_BORDER_RECT_HEIGHT:0,this.getConstants().FIELD_TEXT_HEIGHT),n=t.utils.dom.getFastTextWidth(this.textElement_,this.getConstants().FIELD_TEXT_FONTSIZE,this.getConstants().FIELD_TEXT_FONTWEIGHT,this.getConstants().FIELD_TEXT_FONTFAMILY);e=e?this.getConstants().FIELD_BORDER_RECT_X_PADDING:0;var o=0;this.svgArrow_&&(o=this.positionSVGArrow_(n+e,i/2-this.getConstants().FIELD_DROPDOWN_SVG_ARROW_SIZE/2)),this.size_.width=n+o+2*e,this.size_.height=i,this.positionTextElement_(e,n)},t.FieldDropdown.prototype.positionSVGArrow_=function(t,e){if(!this.svgArrow_)return 0;var i=this.borderRect_?this.getConstants().FIELD_BORDER_RECT_X_PADDING:0,n=this.getConstants().FIELD_DROPDOWN_SVG_ARROW_PADDING,o=this.getConstants().FIELD_DROPDOWN_SVG_ARROW_SIZE;return this.svgArrow_.setAttribute("transform","translate("+(this.sourceBlock_.RTL?i:t+n)+","+e+")"),o+n},t.FieldDropdown.prototype.getText_=function(){if(!this.selectedOption_)return null;var t=this.selectedOption_[0];return"object"==typeof t?t.alt:t},t.FieldDropdown.validateOptions_=function(t){if(!Array.isArray(t))throw TypeError("FieldDropdown options must be an array.");if(!t.length)throw TypeError("FieldDropdown options must not be an empty array.");for(var e=!1,i=0;i<t.length;++i){var n=t[i];Array.isArray(n)?"string"!=typeof n[1]?(e=!0,console.error("Invalid option["+i+"]: Each FieldDropdown option id must be a string. Found "+n[1]+" in: ",n)):n[0]&&"string"!=typeof n[0]&&"string"!=typeof n[0].src&&(e=!0,console.error("Invalid option["+i+"]: Each FieldDropdown option must have a string label or image description. Found"+n[0]+" in: ",n)):(e=!0,console.error("Invalid option["+i+"]: Each FieldDropdown option must be an array. Found: ",n))}if(e)throw TypeError("Found invalid FieldDropdown options.")},t.fieldRegistry.register("field_dropdown",t.FieldDropdown),t.FieldLabelSerializable=function(e,i,n){t.FieldLabelSerializable.superClass_.constructor.call(this,e,i,n)},t.utils.object.inherits(t.FieldLabelSerializable,t.FieldLabel),t.FieldLabelSerializable.fromJson=function(e){var i=t.utils.replaceMessageReferences(e.text);return new t.FieldLabelSerializable(i,void 0,e)},t.FieldLabelSerializable.prototype.EDITABLE=!1,t.FieldLabelSerializable.prototype.SERIALIZABLE=!0,t.fieldRegistry.register("field_label_serializable",t.FieldLabelSerializable),t.FieldImage=function(e,i,n,o,r,s,a){if(!e)throw Error("Src value of an image field is required");if(e=t.utils.replaceMessageReferences(e),n=Number(t.utils.replaceMessageReferences(n)),i=Number(t.utils.replaceMessageReferences(i)),isNaN(n)||isNaN(i))throw Error("Height and width values of an image field must cast to numbers.");if(0>=n||0>=i)throw Error("Height and width values of an image field must be greater than 0.");this.flipRtl_=!1,this.altText_="",t.FieldImage.superClass_.constructor.call(this,e,null,a),a||(this.flipRtl_=!!s,this.altText_=t.utils.replaceMessageReferences(o)||""),this.size_=new t.utils.Size(i,n+t.FieldImage.Y_PADDING),this.imageHeight_=n,this.clickHandler_=null,"function"==typeof r&&(this.clickHandler_=r),this.imageElement_=null},t.utils.object.inherits(t.FieldImage,t.Field),t.FieldImage.prototype.DEFAULT_VALUE="",t.FieldImage.fromJson=function(e){return new t.FieldImage(e.src,e.width,e.height,void 0,void 0,void 0,e)},t.FieldImage.Y_PADDING=1,t.FieldImage.prototype.EDITABLE=!1,t.FieldImage.prototype.isDirty_=!1,t.FieldImage.prototype.configure_=function(e){t.FieldImage.superClass_.configure_.call(this,e),this.flipRtl_=!!e.flipRtl,this.altText_=t.utils.replaceMessageReferences(e.alt)||""},t.FieldImage.prototype.initView=function(){this.imageElement_=t.utils.dom.createSvgElement(t.utils.Svg.IMAGE,{height:this.imageHeight_+"px",width:this.size_.width+"px",alt:this.altText_},this.fieldGroup_),this.imageElement_.setAttributeNS(t.utils.dom.XLINK_NS,"xlink:href",this.value_),this.clickHandler_&&(this.imageElement_.style.cursor="pointer")},t.FieldImage.prototype.updateSize_=function(){},t.FieldImage.prototype.doClassValidation_=function(t){return"string"!=typeof t?null:t},t.FieldImage.prototype.doValueUpdate_=function(e){this.value_=e,this.imageElement_&&this.imageElement_.setAttributeNS(t.utils.dom.XLINK_NS,"xlink:href",String(this.value_))},t.FieldImage.prototype.getFlipRtl=function(){return this.flipRtl_},t.FieldImage.prototype.setAlt=function(t){t!=this.altText_&&(this.altText_=t||"",this.imageElement_&&this.imageElement_.setAttribute("alt",this.altText_))},t.FieldImage.prototype.showEditor_=function(){this.clickHandler_&&this.clickHandler_(this)},t.FieldImage.prototype.setOnClickHandler=function(t){this.clickHandler_=t},t.FieldImage.prototype.getText_=function(){return this.altText_},t.fieldRegistry.register("field_image",t.FieldImage),t.FieldMultilineInput=function(e,i,n){t.FieldMultilineInput.superClass_.constructor.call(this,e,i,n),this.textGroup_=null,this.maxLines_=1/0,this.isOverflowedY_=!1},t.utils.object.inherits(t.FieldMultilineInput,t.FieldTextInput),t.FieldMultilineInput.prototype.configure_=function(e){t.FieldMultilineInput.superClass_.configure_.call(this,e),e.maxLines&&this.setMaxLines(e.maxLines)},t.FieldMultilineInput.fromJson=function(e){var i=t.utils.replaceMessageReferences(e.text);return new t.FieldMultilineInput(i,void 0,e)},t.FieldMultilineInput.prototype.toXml=function(t){return t.textContent=this.getValue().replace(/\n/g,"&#10;"),t},t.FieldMultilineInput.prototype.fromXml=function(t){this.setValue(t.textContent.replace(/&#10;/g,"\n"))},t.FieldMultilineInput.prototype.initView=function(){this.createBorderRect_(),this.textGroup_=t.utils.dom.createSvgElement(t.utils.Svg.G,{class:"blocklyEditableText"},this.fieldGroup_)},t.FieldMultilineInput.prototype.getDisplayText_=function(){var e=this.getText();if(!e)return t.Field.NBSP;var i=e.split("\n");e="";for(var n=this.isOverflowedY_?this.maxLines_:i.length,o=0;o<n;o++){var r=i[o];r.length>this.maxDisplayLength?r=r.substring(0,this.maxDisplayLength-4)+"...":this.isOverflowedY_&&o===n-1&&(r=r.substring(0,r.length-3)+"..."),e+=r=r.replace(/\s/g,t.Field.NBSP),o!==n-1&&(e+="\n")}return this.sourceBlock_.RTL&&(e+="‏"),e},t.FieldMultilineInput.prototype.doValueUpdate_=function(e){t.FieldMultilineInput.superClass_.doValueUpdate_.call(this,e),this.isOverflowedY_=this.value_.split("\n").length>this.maxLines_},t.FieldMultilineInput.prototype.render_=function(){for(var e;e=this.textGroup_.firstChild;)this.textGroup_.removeChild(e);e=this.getDisplayText_().split("\n");for(var i=0,n=0;n<e.length;n++){var o=this.getConstants().FIELD_TEXT_HEIGHT+this.getConstants().FIELD_BORDER_RECT_Y_PADDING;t.utils.dom.createSvgElement(t.utils.Svg.TEXT,{class:"blocklyText blocklyMultilineText",x:this.getConstants().FIELD_BORDER_RECT_X_PADDING,y:i+this.getConstants().FIELD_BORDER_RECT_Y_PADDING,dy:this.getConstants().FIELD_TEXT_BASELINE},this.textGroup_).appendChild(document.createTextNode(e[n])),i+=o}this.isBeingEdited_&&(e=this.htmlInput_,this.isOverflowedY_?t.utils.dom.addClass(e,"blocklyHtmlTextAreaInputOverflowedY"):t.utils.dom.removeClass(e,"blocklyHtmlTextAreaInputOverflowedY")),this.updateSize_(),this.isBeingEdited_&&(this.sourceBlock_.RTL?setTimeout(this.resizeEditor_.bind(this),0):this.resizeEditor_(),e=this.htmlInput_,this.isTextValid_?(t.utils.dom.removeClass(e,"blocklyInvalidInput"),t.utils.aria.setState(e,t.utils.aria.State.INVALID,!1)):(t.utils.dom.addClass(e,"blocklyInvalidInput"),t.utils.aria.setState(e,t.utils.aria.State.INVALID,!0)))},t.FieldMultilineInput.prototype.updateSize_=function(){for(var e=this.textGroup_.childNodes,i=0,n=0,o=0;o<e.length;o++){var r=t.utils.dom.getTextWidth(e[o]);r>i&&(i=r),n+=this.getConstants().FIELD_TEXT_HEIGHT+(0<o?this.getConstants().FIELD_BORDER_RECT_Y_PADDING:0)}if(this.isBeingEdited_){e=this.value_.split("\n"),r=t.utils.dom.createSvgElement(t.utils.Svg.TEXT,{class:"blocklyText blocklyMultilineText"});var s=this.getConstants().FIELD_TEXT_FONTSIZE,a=this.getConstants().FIELD_TEXT_FONTWEIGHT,l=this.getConstants().FIELD_TEXT_FONTFAMILY;for(o=0;o<e.length;o++){e[o].length>this.maxDisplayLength&&(e[o]=e[o].substring(0,this.maxDisplayLength)),r.textContent=e[o];var c=t.utils.dom.getFastTextWidth(r,s,a,l);c>i&&(i=c)}i+=this.htmlInput_.offsetWidth-this.htmlInput_.clientWidth}this.borderRect_&&(n+=2*this.getConstants().FIELD_BORDER_RECT_Y_PADDING,i+=2*this.getConstants().FIELD_BORDER_RECT_X_PADDING,this.borderRect_.setAttribute("width",i),this.borderRect_.setAttribute("height",n)),this.size_.width=i,this.size_.height=n,this.positionBorderRect_()},t.FieldMultilineInput.prototype.showEditor_=function(e,i){t.FieldMultilineInput.superClass_.showEditor_.call(this,e,i),this.forceRerender()},t.FieldMultilineInput.prototype.widgetCreate_=function(){var e=t.WidgetDiv.DIV,i=this.workspace_.getScale(),n=document.createElement("textarea");n.className="blocklyHtmlInput blocklyHtmlTextAreaInput",n.setAttribute("spellcheck",this.spellcheck_);var o=this.getConstants().FIELD_TEXT_FONTSIZE*i+"pt";e.style.fontSize=o,n.style.fontSize=o,n.style.borderRadius=t.FieldTextInput.BORDERRADIUS*i+"px",o=this.getConstants().FIELD_BORDER_RECT_X_PADDING*i;var r=this.getConstants().FIELD_BORDER_RECT_Y_PADDING*i/2;return n.style.padding=r+"px "+o+"px "+r+"px "+o+"px",o=this.getConstants().FIELD_TEXT_HEIGHT+this.getConstants().FIELD_BORDER_RECT_Y_PADDING,n.style.lineHeight=o*i+"px",e.appendChild(n),n.value=n.defaultValue=this.getEditorText_(this.value_),n.untypedDefaultValue_=this.value_,n.oldValue_=null,t.utils.userAgent.GECKO?setTimeout(this.resizeEditor_.bind(this),0):this.resizeEditor_(),this.bindInputEvents_(n),n},t.FieldMultilineInput.prototype.setMaxLines=function(t){"number"==typeof t&&0<t&&t!==this.maxLines_&&(this.maxLines_=t,this.forceRerender())},t.FieldMultilineInput.prototype.getMaxLines=function(){return this.maxLines_},t.FieldMultilineInput.prototype.onHtmlInputKeyDown_=function(e){e.keyCode!==t.utils.KeyCodes.ENTER&&t.FieldMultilineInput.superClass_.onHtmlInputKeyDown_.call(this,e)},t.Css.register(".blocklyHtmlTextAreaInput {,font-family: monospace;,resize: none;,overflow: hidden;,height: 100%;,text-align: left;,},.blocklyHtmlTextAreaInputOverflowedY {,overflow-y: scroll;,}".split(",")),t.fieldRegistry.register("field_multilinetext",t.FieldMultilineInput),t.FieldNumber=function(e,i,n,o,r,s){this.min_=-1/0,this.max_=1/0,this.precision_=0,this.decimalPlaces_=null,t.FieldNumber.superClass_.constructor.call(this,e,r,s),s||this.setConstraints(i,n,o)},t.utils.object.inherits(t.FieldNumber,t.FieldTextInput),t.FieldNumber.prototype.DEFAULT_VALUE=0,t.FieldNumber.fromJson=function(e){return new t.FieldNumber(e.value,void 0,void 0,void 0,void 0,e)},t.FieldNumber.prototype.SERIALIZABLE=!0,t.FieldNumber.prototype.configure_=function(e){t.FieldNumber.superClass_.configure_.call(this,e),this.setMinInternal_(e.min),this.setMaxInternal_(e.max),this.setPrecisionInternal_(e.precision)},t.FieldNumber.prototype.setConstraints=function(t,e,i){this.setMinInternal_(t),this.setMaxInternal_(e),this.setPrecisionInternal_(i),this.setValue(this.getValue())},t.FieldNumber.prototype.setMin=function(t){this.setMinInternal_(t),this.setValue(this.getValue())},t.FieldNumber.prototype.setMinInternal_=function(t){null==t?this.min_=-1/0:(t=Number(t),isNaN(t)||(this.min_=t))},t.FieldNumber.prototype.getMin=function(){return this.min_},t.FieldNumber.prototype.setMax=function(t){this.setMaxInternal_(t),this.setValue(this.getValue())},t.FieldNumber.prototype.setMaxInternal_=function(t){null==t?this.max_=1/0:(t=Number(t),isNaN(t)||(this.max_=t))},t.FieldNumber.prototype.getMax=function(){return this.max_},t.FieldNumber.prototype.setPrecision=function(t){this.setPrecisionInternal_(t),this.setValue(this.getValue())},t.FieldNumber.prototype.setPrecisionInternal_=function(t){this.precision_=Number(t)||0;var e=String(this.precision_);-1!=e.indexOf("e")&&(e=this.precision_.toLocaleString("en-US",{maximumFractionDigits:20}));var i=e.indexOf(".");this.decimalPlaces_=-1==i?t?0:null:e.length-i-1},t.FieldNumber.prototype.getPrecision=function(){return this.precision_},t.FieldNumber.prototype.doClassValidation_=function(t){return null===t?null:(t=(t=(t=(t=String(t)).replace(/O/gi,"0")).replace(/,/g,"")).replace(/infinity/i,"Infinity"),t=Number(t||0),isNaN(t)?null:(t=Math.min(Math.max(t,this.min_),this.max_),this.precision_&&isFinite(t)&&(t=Math.round(t/this.precision_)*this.precision_),null!=this.decimalPlaces_&&(t=Number(t.toFixed(this.decimalPlaces_))),t))},t.FieldNumber.prototype.widgetCreate_=function(){var e=t.FieldNumber.superClass_.widgetCreate_.call(this);return-1/0<this.min_&&t.utils.aria.setState(e,t.utils.aria.State.VALUEMIN,this.min_),1/0>this.max_&&t.utils.aria.setState(e,t.utils.aria.State.VALUEMAX,this.max_),e},t.fieldRegistry.register("field_number",t.FieldNumber),t.FieldVariable=function(e,i,n,o,r){this.menuGenerator_=t.FieldVariable.dropdownCreate,this.defaultVariableName="string"==typeof e?e:"",this.size_=new t.utils.Size(0,0),r&&this.configure_(r),i&&this.setValidator(i),r||this.setTypes_(n,o)},t.utils.object.inherits(t.FieldVariable,t.FieldDropdown),t.FieldVariable.fromJson=function(e){var i=t.utils.replaceMessageReferences(e.variable);return new t.FieldVariable(i,void 0,void 0,void 0,e)},t.FieldVariable.prototype.SERIALIZABLE=!0,t.FieldVariable.prototype.configure_=function(e){t.FieldVariable.superClass_.configure_.call(this,e),this.setTypes_(e.variableTypes,e.defaultType)},t.FieldVariable.prototype.initModel=function(){if(!this.variable_){var e=t.Variables.getOrCreateVariablePackage(this.sourceBlock_.workspace,null,this.defaultVariableName,this.defaultType_);this.doValueUpdate_(e.getId())}},t.FieldVariable.prototype.shouldAddBorderRect_=function(){return t.FieldVariable.superClass_.shouldAddBorderRect_.call(this)&&(!this.getConstants().FIELD_DROPDOWN_NO_BORDER_RECT_SHADOW||"variables_get"!=this.sourceBlock_.type)},t.FieldVariable.prototype.fromXml=function(e){var i=e.getAttribute("id"),n=e.textContent,o=e.getAttribute("variabletype")||e.getAttribute("variableType")||"";if(i=t.Variables.getOrCreateVariablePackage(this.sourceBlock_.workspace,i,n,o),null!=o&&o!==i.type)throw Error("Serialized variable type with id '"+i.getId()+"' had type "+i.type+", and does not match variable field that references it: "+t.Xml.domToText(e)+".");this.setValue(i.getId())},t.FieldVariable.prototype.toXml=function(t){return this.initModel(),t.id=this.variable_.getId(),t.textContent=this.variable_.name,this.variable_.type&&t.setAttribute("variabletype",this.variable_.type),t},t.FieldVariable.prototype.setSourceBlock=function(e){if(e.isShadow())throw Error("Variable fields are not allowed to exist on shadow blocks.");t.FieldVariable.superClass_.setSourceBlock.call(this,e)},t.FieldVariable.prototype.getValue=function(){return this.variable_?this.variable_.getId():null},t.FieldVariable.prototype.getText=function(){return this.variable_?this.variable_.name:""},t.FieldVariable.prototype.getVariable=function(){return this.variable_},t.FieldVariable.prototype.getValidator=function(){return this.variable_?this.validator_:null},t.FieldVariable.prototype.doClassValidation_=function(e){if(null===e)return null;var i=t.Variables.getVariable(this.sourceBlock_.workspace,e);return i?(i=i.type,this.typeIsAllowed_(i)?e:(console.warn("Variable type doesn't match this field!  Type was "+i),null)):(console.warn("Variable id doesn't point to a real variable! ID was "+e),null)},t.FieldVariable.prototype.doValueUpdate_=function(e){this.variable_=t.Variables.getVariable(this.sourceBlock_.workspace,e),t.FieldVariable.superClass_.doValueUpdate_.call(this,e)},t.FieldVariable.prototype.typeIsAllowed_=function(t){var e=this.getVariableTypes_();if(!e)return!0;for(var i=0;i<e.length;i++)if(t==e[i])return!0;return!1},t.FieldVariable.prototype.getVariableTypes_=function(){var t=this.variableTypes;if(null===t&&this.sourceBlock_&&this.sourceBlock_.workspace)return this.sourceBlock_.workspace.getVariableTypes();if(0==(t=t||[""]).length)throw t=this.getText(),Error("'variableTypes' of field variable "+t+" was an empty list");return t},t.FieldVariable.prototype.setTypes_=function(t,e){if(e=e||"",null==t||void 0==t)t=null;else{if(!Array.isArray(t))throw Error("'variableTypes' was not an array in the definition of a FieldVariable");for(var i=!1,n=0;n<t.length;n++)t[n]==e&&(i=!0);if(!i)throw Error("Invalid default type '"+e+"' in the definition of a FieldVariable")}this.defaultType_=e,this.variableTypes=t},t.FieldVariable.prototype.refreshVariableName=function(){this.forceRerender()},t.FieldVariable.dropdownCreate=function(){if(!this.variable_)throw Error("Tried to call dropdownCreate on a variable field with no variable selected.");var e=this.getText(),i=[];if(this.sourceBlock_&&this.sourceBlock_.workspace)for(var n=this.getVariableTypes_(),o=0;o<n.length;o++){var r=this.sourceBlock_.workspace.getVariablesOfType(n[o]);i=i.concat(r)}for(i.sort(t.VariableModel.compareByName),n=[],o=0;o<i.length;o++)n[o]=[i[o].name,i[o].getId()];return n.push([t.Msg.RENAME_VARIABLE,t.RENAME_VARIABLE_ID]),t.Msg.DELETE_VARIABLE&&n.push([t.Msg.DELETE_VARIABLE.replace("%1",e),t.DELETE_VARIABLE_ID]),n},t.FieldVariable.prototype.onItemSelected_=function(e,i){if(e=i.getValue(),this.sourceBlock_&&this.sourceBlock_.workspace){if(e==t.RENAME_VARIABLE_ID)return void t.Variables.renameVariable(this.sourceBlock_.workspace,this.variable_);if(e==t.DELETE_VARIABLE_ID)return void this.sourceBlock_.workspace.deleteVariableById(this.variable_.getId())}this.setValue(e)},t.FieldVariable.prototype.referencesVariables=function(){return!0},t.fieldRegistry.register("field_variable",t.FieldVariable),t.utils.svgPaths={},t.utils.svgPaths.point=function(t,e){return" "+t+","+e+" "},t.utils.svgPaths.curve=function(t,e){return" "+t+e.join("")},t.utils.svgPaths.moveTo=function(t,e){return" M "+t+","+e+" "},t.utils.svgPaths.moveBy=function(t,e){return" m "+t+","+e+" "},t.utils.svgPaths.lineTo=function(t,e){return" l "+t+","+e+" "},t.utils.svgPaths.line=function(t){return" l"+t.join("")},t.utils.svgPaths.lineOnAxis=function(t,e){return" "+t+" "+e+" "},t.utils.svgPaths.arc=function(t,e,i,n){return t+" "+i+" "+i+" "+e+n},t.blockRendering.ConstantProvider=function(){this.NO_PADDING=0,this.SMALL_PADDING=3,this.MEDIUM_PADDING=5,this.MEDIUM_LARGE_PADDING=8,this.LARGE_PADDING=10,this.TALL_INPUT_FIELD_OFFSET_Y=this.MEDIUM_PADDING,this.TAB_HEIGHT=15,this.TAB_OFFSET_FROM_TOP=5,this.TAB_VERTICAL_OVERLAP=2.5,this.TAB_WIDTH=8,this.NOTCH_WIDTH=15,this.NOTCH_HEIGHT=4,this.MIN_BLOCK_WIDTH=12,this.EMPTY_BLOCK_SPACER_HEIGHT=16,this.DUMMY_INPUT_SHADOW_MIN_HEIGHT=this.DUMMY_INPUT_MIN_HEIGHT=this.TAB_HEIGHT,this.CORNER_RADIUS=8,this.STATEMENT_INPUT_NOTCH_OFFSET=this.NOTCH_OFFSET_LEFT=15,this.STATEMENT_BOTTOM_SPACER=0,this.STATEMENT_INPUT_PADDING_LEFT=20,this.BETWEEN_STATEMENT_PADDING_Y=4,this.TOP_ROW_MIN_HEIGHT=this.MEDIUM_PADDING,this.TOP_ROW_PRECEDES_STATEMENT_MIN_HEIGHT=this.LARGE_PADDING,this.BOTTOM_ROW_MIN_HEIGHT=this.MEDIUM_PADDING,this.BOTTOM_ROW_AFTER_STATEMENT_MIN_HEIGHT=this.LARGE_PADDING,this.ADD_START_HATS=!1,this.START_HAT_HEIGHT=15,this.START_HAT_WIDTH=100,this.SPACER_DEFAULT_HEIGHT=15,this.MIN_BLOCK_HEIGHT=24,this.EMPTY_INLINE_INPUT_PADDING=14.5,this.EMPTY_INLINE_INPUT_HEIGHT=this.TAB_HEIGHT+11,this.EXTERNAL_VALUE_INPUT_PADDING=2,this.EMPTY_STATEMENT_INPUT_HEIGHT=this.MIN_BLOCK_HEIGHT,this.START_POINT=t.utils.svgPaths.moveBy(0,0),this.JAGGED_TEETH_HEIGHT=12,this.JAGGED_TEETH_WIDTH=6,this.FIELD_TEXT_FONTSIZE=11,this.FIELD_TEXT_FONTWEIGHT="normal",this.FIELD_TEXT_FONTFAMILY="sans-serif",this.FIELD_TEXT_BASELINE=this.FIELD_TEXT_HEIGHT=-1,this.FIELD_BORDER_RECT_RADIUS=4,this.FIELD_BORDER_RECT_HEIGHT=16,this.FIELD_BORDER_RECT_X_PADDING=5,this.FIELD_BORDER_RECT_Y_PADDING=3,this.FIELD_BORDER_RECT_COLOUR="#fff",this.FIELD_TEXT_BASELINE_CENTER=!t.utils.userAgent.IE&&!t.utils.userAgent.EDGE,this.FIELD_DROPDOWN_BORDER_RECT_HEIGHT=this.FIELD_BORDER_RECT_HEIGHT,this.FIELD_DROPDOWN_SVG_ARROW=this.FIELD_DROPDOWN_COLOURED_DIV=this.FIELD_DROPDOWN_NO_BORDER_RECT_SHADOW=!1,this.FIELD_DROPDOWN_SVG_ARROW_PADDING=this.FIELD_BORDER_RECT_X_PADDING,this.FIELD_DROPDOWN_SVG_ARROW_SIZE=12,this.FIELD_DROPDOWN_SVG_ARROW_DATAURI="data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMi43MSIgaGVpZ2h0PSI4Ljc5IiB2aWV3Qm94PSIwIDAgMTIuNzEgOC43OSI+PHRpdGxlPmRyb3Bkb3duLWFycm93PC90aXRsZT48ZyBvcGFjaXR5PSIwLjEiPjxwYXRoIGQ9Ik0xMi43MSwyLjQ0QTIuNDEsMi40MSwwLDAsMSwxMiw0LjE2TDguMDgsOC4wOGEyLjQ1LDIuNDUsMCwwLDEtMy40NSwwTDAuNzIsNC4xNkEyLjQyLDIuNDIsMCwwLDEsMCwyLjQ0LDIuNDgsMi40OCwwLDAsMSwuNzEuNzFDMSwwLjQ3LDEuNDMsMCw2LjM2LDBTMTEuNzUsMC40NiwxMiwuNzFBMi40NCwyLjQ0LDAsMCwxLDEyLjcxLDIuNDRaIiBmaWxsPSIjMjMxZjIwIi8+PC9nPjxwYXRoIGQ9Ik02LjM2LDcuNzlhMS40MywxLjQzLDAsMCwxLTEtLjQyTDEuNDIsMy40NWExLjQ0LDEuNDQsMCwwLDEsMC0yYzAuNTYtLjU2LDkuMzEtMC41Niw5Ljg3LDBhMS40NCwxLjQ0LDAsMCwxLDAsMkw3LjM3LDcuMzdBMS40MywxLjQzLDAsMCwxLDYuMzYsNy43OVoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=",this.FIELD_COLOUR_FULL_BLOCK=this.FIELD_TEXTINPUT_BOX_SHADOW=!1,this.FIELD_COLOUR_DEFAULT_WIDTH=26,this.FIELD_COLOUR_DEFAULT_HEIGHT=this.FIELD_BORDER_RECT_HEIGHT,this.FIELD_CHECKBOX_X_OFFSET=this.FIELD_BORDER_RECT_X_PADDING-3,this.randomIdentifier=String(Math.random()).substring(2),this.embossFilterId="",this.embossFilter_=null,this.disabledPatternId="",this.disabledPattern_=null,this.debugFilterId="",this.cssNode_=this.debugFilter_=null,this.CURSOR_COLOUR="#cc0a0a",this.MARKER_COLOUR="#4286f4",this.CURSOR_WS_WIDTH=100,this.WS_CURSOR_HEIGHT=5,this.CURSOR_STACK_PADDING=10,this.CURSOR_BLOCK_PADDING=2,this.CURSOR_STROKE_WIDTH=4,this.FULL_BLOCK_FIELDS=!1,this.INSERTION_MARKER_COLOUR="#000000",this.INSERTION_MARKER_OPACITY=.2,this.SHAPES={PUZZLE:1,NOTCH:2}},t.blockRendering.ConstantProvider.prototype.init=function(){this.JAGGED_TEETH=this.makeJaggedTeeth(),this.NOTCH=this.makeNotch(),this.START_HAT=this.makeStartHat(),this.PUZZLE_TAB=this.makePuzzleTab(),this.INSIDE_CORNERS=this.makeInsideCorners(),this.OUTSIDE_CORNERS=this.makeOutsideCorners()},t.blockRendering.ConstantProvider.prototype.setTheme=function(t){this.blockStyles=Object.create(null);var e,i=t.blockStyles;for(e in i)this.blockStyles[e]=this.validatedBlockStyle_(i[e]);this.setDynamicProperties_(t)},t.blockRendering.ConstantProvider.prototype.setDynamicProperties_=function(t){this.setFontConstants_(t),this.setComponentConstants_(t),this.ADD_START_HATS=null!=t.startHats?t.startHats:this.ADD_START_HATS},t.blockRendering.ConstantProvider.prototype.setFontConstants_=function(e){this.FIELD_TEXT_FONTFAMILY=e.fontStyle&&void 0!=e.fontStyle.family?e.fontStyle.family:this.FIELD_TEXT_FONTFAMILY,this.FIELD_TEXT_FONTWEIGHT=e.fontStyle&&void 0!=e.fontStyle.weight?e.fontStyle.weight:this.FIELD_TEXT_FONTWEIGHT,this.FIELD_TEXT_FONTSIZE=e.fontStyle&&void 0!=e.fontStyle.size?e.fontStyle.size:this.FIELD_TEXT_FONTSIZE,e=t.utils.dom.measureFontMetrics("Hg",this.FIELD_TEXT_FONTSIZE+"pt",this.FIELD_TEXT_FONTWEIGHT,this.FIELD_TEXT_FONTFAMILY),this.FIELD_TEXT_HEIGHT=e.height,this.FIELD_TEXT_BASELINE=e.baseline},t.blockRendering.ConstantProvider.prototype.setComponentConstants_=function(t){this.CURSOR_COLOUR=t.getComponentStyle("cursorColour")||this.CURSOR_COLOUR,this.MARKER_COLOUR=t.getComponentStyle("markerColour")||this.MARKER_COLOUR,this.INSERTION_MARKER_COLOUR=t.getComponentStyle("insertionMarkerColour")||this.INSERTION_MARKER_COLOUR,this.INSERTION_MARKER_OPACITY=Number(t.getComponentStyle("insertionMarkerOpacity"))||this.INSERTION_MARKER_OPACITY},t.blockRendering.ConstantProvider.prototype.getBlockStyleForColour=function(t){var e="auto_"+t;return this.blockStyles[e]||(this.blockStyles[e]=this.createBlockStyle_(t)),{style:this.blockStyles[e],name:e}},t.blockRendering.ConstantProvider.prototype.getBlockStyle=function(t){return this.blockStyles[t||""]||(t&&0==t.indexOf("auto_")?this.getBlockStyleForColour(t.substring(5)).style:this.createBlockStyle_("#000000"))},t.blockRendering.ConstantProvider.prototype.createBlockStyle_=function(t){return this.validatedBlockStyle_({colourPrimary:t})},t.blockRendering.ConstantProvider.prototype.validatedBlockStyle_=function(e){var i={};return e&&t.utils.object.mixin(i,e),e=t.utils.parseBlockColour(i.colourPrimary||"#000"),i.colourPrimary=e.hex,i.colourSecondary=i.colourSecondary?t.utils.parseBlockColour(i.colourSecondary).hex:this.generateSecondaryColour_(i.colourPrimary),i.colourTertiary=i.colourTertiary?t.utils.parseBlockColour(i.colourTertiary).hex:this.generateTertiaryColour_(i.colourPrimary),i.hat=i.hat||"",i},t.blockRendering.ConstantProvider.prototype.generateSecondaryColour_=function(e){return t.utils.colour.blend("#fff",e,.6)||e},t.blockRendering.ConstantProvider.prototype.generateTertiaryColour_=function(e){return t.utils.colour.blend("#fff",e,.3)||e},t.blockRendering.ConstantProvider.prototype.dispose=function(){this.embossFilter_&&t.utils.dom.removeNode(this.embossFilter_),this.disabledPattern_&&t.utils.dom.removeNode(this.disabledPattern_),this.debugFilter_&&t.utils.dom.removeNode(this.debugFilter_),this.cssNode_=null},t.blockRendering.ConstantProvider.prototype.makeJaggedTeeth=function(){var e=this.JAGGED_TEETH_HEIGHT,i=this.JAGGED_TEETH_WIDTH;return{height:e,width:i,path:t.utils.svgPaths.line([t.utils.svgPaths.point(i,e/4),t.utils.svgPaths.point(2*-i,e/2),t.utils.svgPaths.point(i,e/4)])}},t.blockRendering.ConstantProvider.prototype.makeStartHat=function(){var e=this.START_HAT_HEIGHT,i=this.START_HAT_WIDTH;return{height:e,width:i,path:t.utils.svgPaths.curve("c",[t.utils.svgPaths.point(30,-e),t.utils.svgPaths.point(70,-e),t.utils.svgPaths.point(i,0)])}},t.blockRendering.ConstantProvider.prototype.makePuzzleTab=function(){function e(e){var o=-(e=e?-1:1),r=n/2,s=r+2.5,a=r+.5,l=t.utils.svgPaths.point(-i,e*r);return r=t.utils.svgPaths.point(i,e*r),t.utils.svgPaths.curve("c",[t.utils.svgPaths.point(0,e*s),t.utils.svgPaths.point(-i,o*a),l])+t.utils.svgPaths.curve("s",[t.utils.svgPaths.point(i,2.5*o),r])}var i=this.TAB_WIDTH,n=this.TAB_HEIGHT,o=e(!0),r=e(!1);return{type:this.SHAPES.PUZZLE,width:i,height:n,pathDown:r,pathUp:o}},t.blockRendering.ConstantProvider.prototype.makeNotch=function(){function e(e){return t.utils.svgPaths.line([t.utils.svgPaths.point(e*o,n),t.utils.svgPaths.point(3*e,0),t.utils.svgPaths.point(e*o,-n)])}var i=this.NOTCH_WIDTH,n=this.NOTCH_HEIGHT,o=(i-3)/2,r=e(1),s=e(-1);return{type:this.SHAPES.NOTCH,width:i,height:n,pathLeft:r,pathRight:s}},t.blockRendering.ConstantProvider.prototype.makeInsideCorners=function(){var e=this.CORNER_RADIUS;return{width:e,height:e,pathTop:t.utils.svgPaths.arc("a","0 0,0",e,t.utils.svgPaths.point(-e,e)),pathBottom:t.utils.svgPaths.arc("a","0 0,0",e,t.utils.svgPaths.point(e,e))}},t.blockRendering.ConstantProvider.prototype.makeOutsideCorners=function(){var e=this.CORNER_RADIUS,i=t.utils.svgPaths.moveBy(0,e)+t.utils.svgPaths.arc("a","0 0,1",e,t.utils.svgPaths.point(e,-e)),n=t.utils.svgPaths.arc("a","0 0,1",e,t.utils.svgPaths.point(e,e)),o=t.utils.svgPaths.arc("a","0 0,1",e,t.utils.svgPaths.point(-e,-e));return{topLeft:i,topRight:n,bottomRight:t.utils.svgPaths.arc("a","0 0,1",e,t.utils.svgPaths.point(-e,e)),bottomLeft:o,rightHeight:e}},t.blockRendering.ConstantProvider.prototype.shapeFor=function(e){switch(e.type){case t.connectionTypes.INPUT_VALUE:case t.connectionTypes.OUTPUT_VALUE:return this.PUZZLE_TAB;case t.connectionTypes.PREVIOUS_STATEMENT:case t.connectionTypes.NEXT_STATEMENT:return this.NOTCH;default:throw Error("Unknown connection type")}},t.blockRendering.ConstantProvider.prototype.createDom=function(e,i,n){this.injectCSS_(i,n),e=t.utils.dom.createSvgElement(t.utils.Svg.DEFS,{},e),i=t.utils.dom.createSvgElement(t.utils.Svg.FILTER,{id:"blocklyEmbossFilter"+this.randomIdentifier},e),t.utils.dom.createSvgElement(t.utils.Svg.FEGAUSSIANBLUR,{in:"SourceAlpha",stdDeviation:1,result:"blur"},i),n=t.utils.dom.createSvgElement(t.utils.Svg.FESPECULARLIGHTING,{in:"blur",surfaceScale:1,specularConstant:.5,specularExponent:10,"lighting-color":"white",result:"specOut"},i),t.utils.dom.createSvgElement(t.utils.Svg.FEPOINTLIGHT,{x:-5e3,y:-1e4,z:2e4},n),t.utils.dom.createSvgElement(t.utils.Svg.FECOMPOSITE,{in:"specOut",in2:"SourceAlpha",operator:"in",result:"specOut"},i),t.utils.dom.createSvgElement(t.utils.Svg.FECOMPOSITE,{in:"SourceGraphic",in2:"specOut",operator:"arithmetic",k1:0,k2:1,k3:1,k4:0},i),this.embossFilterId=i.id,this.embossFilter_=i,i=t.utils.dom.createSvgElement(t.utils.Svg.PATTERN,{id:"blocklyDisabledPattern"+this.randomIdentifier,patternUnits:"userSpaceOnUse",width:10,height:10},e),t.utils.dom.createSvgElement(t.utils.Svg.RECT,{width:10,height:10,fill:"#aaa"},i),t.utils.dom.createSvgElement(t.utils.Svg.PATH,{d:"M 0 0 L 10 10 M 10 0 L 0 10",stroke:"#cc0"},i),this.disabledPatternId=i.id,this.disabledPattern_=i,t.blockRendering.Debug&&(e=t.utils.dom.createSvgElement(t.utils.Svg.FILTER,{id:"blocklyDebugFilter"+this.randomIdentifier,height:"160%",width:"180%",y:"-30%",x:"-40%"},e),i=t.utils.dom.createSvgElement(t.utils.Svg.FECOMPONENTTRANSFER,{result:"outBlur"},e),t.utils.dom.createSvgElement(t.utils.Svg.FEFUNCA,{type:"table",tableValues:"0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1"},i),t.utils.dom.createSvgElement(t.utils.Svg.FEFLOOD,{"flood-color":"#ff0000","flood-opacity":.5,result:"outColor"},e),t.utils.dom.createSvgElement(t.utils.Svg.FECOMPOSITE,{in:"outColor",in2:"outBlur",operator:"in",result:"outGlow"},e),this.debugFilterId=e.id,this.debugFilter_=e)},t.blockRendering.ConstantProvider.prototype.injectCSS_=function(t,e){e=this.getCSS_(e),t="blockly-renderer-style-"+t,this.cssNode_=document.getElementById(t);var i=e.join("\n");this.cssNode_?this.cssNode_.firstChild.textContent=i:((e=document.createElement("style")).id=t,t=document.createTextNode(i),e.appendChild(t),document.head.insertBefore(e,document.head.firstChild),this.cssNode_=e)},t.blockRendering.ConstantProvider.prototype.getCSS_=function(t){return[t+" .blocklyText, ",t+" .blocklyFlyoutLabelText {","font: "+this.FIELD_TEXT_FONTWEIGHT+" "+this.FIELD_TEXT_FONTSIZE+"pt "+this.FIELD_TEXT_FONTFAMILY+";","}",t+" .blocklyText {","fill: #fff;","}",t+" .blocklyNonEditableText>rect,",t+" .blocklyEditableText>rect {","fill: "+this.FIELD_BORDER_RECT_COLOUR+";","fill-opacity: .6;","stroke: none;","}",t+" .blocklyNonEditableText>text,",t+" .blocklyEditableText>text {","fill: #000;","}",t+" .blocklyFlyoutLabelText {","fill: #000;","}",t+" .blocklyText.blocklyBubbleText {","fill: #000;","}",t+" .blocklyEditableText:not(.editing):hover>rect {","stroke: #fff;","stroke-width: 2;","}",t+" .blocklyHtmlInput {","font-family: "+this.FIELD_TEXT_FONTFAMILY+";","font-weight: "+this.FIELD_TEXT_FONTWEIGHT+";","}",t+" .blocklySelected>.blocklyPath {","stroke: #fc3;","stroke-width: 3px;","}",t+" .blocklyHighlightedConnectionPath {","stroke: #fc3;","}",t+" .blocklyReplaceable .blocklyPath {","fill-opacity: .5;","}",t+" .blocklyReplaceable .blocklyPathLight,",t+" .blocklyReplaceable .blocklyPathDark {","display: none;","}",t+" .blocklyInsertionMarker>.blocklyPath {","fill-opacity: "+this.INSERTION_MARKER_OPACITY+";","stroke: none;","}"]},t.blockRendering.Types={NONE:0,FIELD:1,HAT:2,ICON:4,SPACER:8,BETWEEN_ROW_SPACER:16,IN_ROW_SPACER:32,EXTERNAL_VALUE_INPUT:64,INPUT:128,INLINE_INPUT:256,STATEMENT_INPUT:512,CONNECTION:1024,PREVIOUS_CONNECTION:2048,NEXT_CONNECTION:4096,OUTPUT_CONNECTION:8192,CORNER:16384,LEFT_SQUARE_CORNER:32768,LEFT_ROUND_CORNER:65536,RIGHT_SQUARE_CORNER:131072,RIGHT_ROUND_CORNER:262144,JAGGED_EDGE:524288,ROW:1048576,TOP_ROW:2097152,BOTTOM_ROW:4194304,INPUT_ROW:8388608},t.blockRendering.Types.LEFT_CORNER=t.blockRendering.Types.LEFT_SQUARE_CORNER|t.blockRendering.Types.LEFT_ROUND_CORNER,t.blockRendering.Types.RIGHT_CORNER=t.blockRendering.Types.RIGHT_SQUARE_CORNER|t.blockRendering.Types.RIGHT_ROUND_CORNER,t.blockRendering.Types.nextTypeValue_=16777216,t.blockRendering.Types.getType=function(e){return Object.prototype.hasOwnProperty.call(t.blockRendering.Types,e)||(t.blockRendering.Types[e]=t.blockRendering.Types.nextTypeValue_,t.blockRendering.Types.nextTypeValue_<<=1),t.blockRendering.Types[e]},t.blockRendering.Types.isField=function(e){return e.type&t.blockRendering.Types.FIELD},t.blockRendering.Types.isHat=function(e){return e.type&t.blockRendering.Types.HAT},t.blockRendering.Types.isIcon=function(e){return e.type&t.blockRendering.Types.ICON},t.blockRendering.Types.isSpacer=function(e){return e.type&t.blockRendering.Types.SPACER},t.blockRendering.Types.isInRowSpacer=function(e){return e.type&t.blockRendering.Types.IN_ROW_SPACER},t.blockRendering.Types.isInput=function(e){return e.type&t.blockRendering.Types.INPUT},t.blockRendering.Types.isExternalInput=function(e){return e.type&t.blockRendering.Types.EXTERNAL_VALUE_INPUT},t.blockRendering.Types.isInlineInput=function(e){return e.type&t.blockRendering.Types.INLINE_INPUT},t.blockRendering.Types.isStatementInput=function(e){return e.type&t.blockRendering.Types.STATEMENT_INPUT},t.blockRendering.Types.isPreviousConnection=function(e){return e.type&t.blockRendering.Types.PREVIOUS_CONNECTION},t.blockRendering.Types.isNextConnection=function(e){return e.type&t.blockRendering.Types.NEXT_CONNECTION},t.blockRendering.Types.isPreviousOrNextConnection=function(e){return e.type&(t.blockRendering.Types.PREVIOUS_CONNECTION|t.blockRendering.Types.NEXT_CONNECTION)},t.blockRendering.Types.isLeftRoundedCorner=function(e){return e.type&t.blockRendering.Types.LEFT_ROUND_CORNER},t.blockRendering.Types.isRightRoundedCorner=function(e){return e.type&t.blockRendering.Types.RIGHT_ROUND_CORNER},t.blockRendering.Types.isLeftSquareCorner=function(e){return e.type&t.blockRendering.Types.LEFT_SQUARE_CORNER},t.blockRendering.Types.isRightSquareCorner=function(e){return e.type&t.blockRendering.Types.RIGHT_SQUARE_CORNER},t.blockRendering.Types.isCorner=function(e){return e.type&t.blockRendering.Types.CORNER},t.blockRendering.Types.isJaggedEdge=function(e){return e.type&t.blockRendering.Types.JAGGED_EDGE},t.blockRendering.Types.isRow=function(e){return e.type&t.blockRendering.Types.ROW},t.blockRendering.Types.isBetweenRowSpacer=function(e){return e.type&t.blockRendering.Types.BETWEEN_ROW_SPACER},t.blockRendering.Types.isTopRow=function(e){return e.type&t.blockRendering.Types.TOP_ROW},t.blockRendering.Types.isBottomRow=function(e){return e.type&t.blockRendering.Types.BOTTOM_ROW},t.blockRendering.Types.isTopOrBottomRow=function(e){return e.type&(t.blockRendering.Types.TOP_ROW|t.blockRendering.Types.BOTTOM_ROW)},t.blockRendering.Types.isInputRow=function(e){return e.type&t.blockRendering.Types.INPUT_ROW},t.blockRendering.Measurable=function(e){this.height=this.width=0,this.type=t.blockRendering.Types.NONE,this.centerline=this.xPos=0,this.constants_=e,this.notchOffset=this.constants_.NOTCH_OFFSET_LEFT},t.blockRendering.Connection=function(e,i){t.blockRendering.Connection.superClass_.constructor.call(this,e),this.connectionModel=i,this.shape=this.constants_.shapeFor(i),this.isDynamicShape=!!this.shape.isDynamic,this.type|=t.blockRendering.Types.CONNECTION},t.utils.object.inherits(t.blockRendering.Connection,t.blockRendering.Measurable),t.blockRendering.OutputConnection=function(e,i){t.blockRendering.OutputConnection.superClass_.constructor.call(this,e,i),this.type|=t.blockRendering.Types.OUTPUT_CONNECTION,this.height=this.isDynamicShape?0:this.shape.height,this.startX=this.width=this.isDynamicShape?0:this.shape.width,this.connectionOffsetY=this.constants_.TAB_OFFSET_FROM_TOP,this.connectionOffsetX=0},t.utils.object.inherits(t.blockRendering.OutputConnection,t.blockRendering.Connection),t.blockRendering.PreviousConnection=function(e,i){t.blockRendering.PreviousConnection.superClass_.constructor.call(this,e,i),this.type|=t.blockRendering.Types.PREVIOUS_CONNECTION,this.height=this.shape.height,this.width=this.shape.width},t.utils.object.inherits(t.blockRendering.PreviousConnection,t.blockRendering.Connection),t.blockRendering.NextConnection=function(e,i){t.blockRendering.NextConnection.superClass_.constructor.call(this,e,i),this.type|=t.blockRendering.Types.NEXT_CONNECTION,this.height=this.shape.height,this.width=this.shape.width},t.utils.object.inherits(t.blockRendering.NextConnection,t.blockRendering.Connection),t.blockRendering.InputConnection=function(e,i){t.blockRendering.InputConnection.superClass_.constructor.call(this,e,i.connection),this.type|=t.blockRendering.Types.INPUT,this.input=i,this.align=i.align,(this.connectedBlock=i.connection&&i.connection.targetBlock()?i.connection.targetBlock():null)?(e=this.connectedBlock.getHeightWidth(),this.connectedBlockWidth=e.width,this.connectedBlockHeight=e.height):this.connectedBlockHeight=this.connectedBlockWidth=0,this.connectionOffsetY=this.connectionOffsetX=0},t.utils.object.inherits(t.blockRendering.InputConnection,t.blockRendering.Connection),t.blockRendering.InlineInput=function(e,i){t.blockRendering.InlineInput.superClass_.constructor.call(this,e,i),this.type|=t.blockRendering.Types.INLINE_INPUT,this.connectedBlock?(this.width=this.connectedBlockWidth,this.height=this.connectedBlockHeight):(this.height=this.constants_.EMPTY_INLINE_INPUT_HEIGHT,this.width=this.constants_.EMPTY_INLINE_INPUT_PADDING),this.connectionHeight=this.isDynamicShape?this.shape.height(this.height):this.shape.height,this.connectionWidth=this.isDynamicShape?this.shape.width(this.height):this.shape.width,this.connectedBlock||(this.width+=this.connectionWidth*(this.isDynamicShape?2:1)),this.connectionOffsetY=this.isDynamicShape?this.shape.connectionOffsetY(this.connectionHeight):this.constants_.TAB_OFFSET_FROM_TOP,this.connectionOffsetX=this.isDynamicShape?this.shape.connectionOffsetX(this.connectionWidth):0},t.utils.object.inherits(t.blockRendering.InlineInput,t.blockRendering.InputConnection),t.blockRendering.StatementInput=function(e,i){t.blockRendering.StatementInput.superClass_.constructor.call(this,e,i),this.type|=t.blockRendering.Types.STATEMENT_INPUT,this.height=this.connectedBlock?this.connectedBlockHeight+this.constants_.STATEMENT_BOTTOM_SPACER:this.constants_.EMPTY_STATEMENT_INPUT_HEIGHT,this.width=this.constants_.STATEMENT_INPUT_NOTCH_OFFSET+this.shape.width},t.utils.object.inherits(t.blockRendering.StatementInput,t.blockRendering.InputConnection),t.blockRendering.ExternalValueInput=function(e,i){t.blockRendering.ExternalValueInput.superClass_.constructor.call(this,e,i),this.type|=t.blockRendering.Types.EXTERNAL_VALUE_INPUT,this.height=this.connectedBlock?this.connectedBlockHeight-this.constants_.TAB_OFFSET_FROM_TOP-this.constants_.MEDIUM_PADDING:this.shape.height,this.width=this.shape.width+this.constants_.EXTERNAL_VALUE_INPUT_PADDING,this.connectionOffsetY=this.constants_.TAB_OFFSET_FROM_TOP,this.connectionHeight=this.shape.height,this.connectionWidth=this.shape.width},t.utils.object.inherits(t.blockRendering.ExternalValueInput,t.blockRendering.InputConnection),t.blockRendering.Icon=function(e,i){t.blockRendering.Icon.superClass_.constructor.call(this,e),this.icon=i,this.isVisible=i.isVisible(),this.type|=t.blockRendering.Types.ICON,e=i.getCorrectedSize(),this.height=e.height,this.width=e.width},t.utils.object.inherits(t.blockRendering.Icon,t.blockRendering.Measurable),t.blockRendering.JaggedEdge=function(e){t.blockRendering.JaggedEdge.superClass_.constructor.call(this,e),this.type|=t.blockRendering.Types.JAGGED_EDGE,this.height=this.constants_.JAGGED_TEETH.height,this.width=this.constants_.JAGGED_TEETH.width},t.utils.object.inherits(t.blockRendering.JaggedEdge,t.blockRendering.Measurable),t.blockRendering.Field=function(e,i,n){t.blockRendering.Field.superClass_.constructor.call(this,e),this.field=i,this.isEditable=i.EDITABLE,this.flipRtl=i.getFlipRtl(),this.type|=t.blockRendering.Types.FIELD,e=this.field.getSize(),this.height=e.height,this.width=e.width,this.parentInput=n},t.utils.object.inherits(t.blockRendering.Field,t.blockRendering.Measurable),t.blockRendering.Hat=function(e){t.blockRendering.Hat.superClass_.constructor.call(this,e),this.type|=t.blockRendering.Types.HAT,this.height=this.constants_.START_HAT.height,this.width=this.constants_.START_HAT.width,this.ascenderHeight=this.height},t.utils.object.inherits(t.blockRendering.Hat,t.blockRendering.Measurable),t.blockRendering.SquareCorner=function(e,i){t.blockRendering.SquareCorner.superClass_.constructor.call(this,e),this.type=(i&&"left"!=i?t.blockRendering.Types.RIGHT_SQUARE_CORNER:t.blockRendering.Types.LEFT_SQUARE_CORNER)|t.blockRendering.Types.CORNER,this.width=this.height=this.constants_.NO_PADDING},t.utils.object.inherits(t.blockRendering.SquareCorner,t.blockRendering.Measurable),t.blockRendering.RoundCorner=function(e,i){t.blockRendering.RoundCorner.superClass_.constructor.call(this,e),this.type=(i&&"left"!=i?t.blockRendering.Types.RIGHT_ROUND_CORNER:t.blockRendering.Types.LEFT_ROUND_CORNER)|t.blockRendering.Types.CORNER,this.width=this.constants_.CORNER_RADIUS,this.height=this.constants_.CORNER_RADIUS/2},t.utils.object.inherits(t.blockRendering.RoundCorner,t.blockRendering.Measurable),t.blockRendering.InRowSpacer=function(e,i){t.blockRendering.InRowSpacer.superClass_.constructor.call(this,e),this.type=this.type|t.blockRendering.Types.SPACER|t.blockRendering.Types.IN_ROW_SPACER,this.width=i,this.height=this.constants_.SPACER_DEFAULT_HEIGHT},t.utils.object.inherits(t.blockRendering.InRowSpacer,t.blockRendering.Measurable),t.blockRendering.Row=function(e){this.type=t.blockRendering.Types.ROW,this.elements=[],this.xPos=this.yPos=this.widthWithConnectedBlocks=this.minWidth=this.minHeight=this.width=this.height=0,this.hasJaggedEdge=this.hasDummyInput=this.hasInlineInput=this.hasStatement=this.hasExternalInput=!1,this.constants_=e,this.notchOffset=this.constants_.NOTCH_OFFSET_LEFT,this.align=null},t.blockRendering.Row.prototype.measure=function(){throw Error("Unexpected attempt to measure a base Row.")},t.blockRendering.Row.prototype.getLastInput=function(){for(var e,i=this.elements.length-1;e=this.elements[i];i--)if(t.blockRendering.Types.isInput(e))return e;return null},t.blockRendering.Row.prototype.startsWithElemSpacer=function(){return!0},t.blockRendering.Row.prototype.endsWithElemSpacer=function(){return!0},t.blockRendering.Row.prototype.getFirstSpacer=function(){for(var e,i=0;e=this.elements[i];i++)if(t.blockRendering.Types.isSpacer(e))return e;return null},t.blockRendering.Row.prototype.getLastSpacer=function(){for(var e,i=this.elements.length-1;e=this.elements[i];i--)if(t.blockRendering.Types.isSpacer(e))return e;return null},t.blockRendering.TopRow=function(e){t.blockRendering.TopRow.superClass_.constructor.call(this,e),this.type|=t.blockRendering.Types.TOP_ROW,this.ascenderHeight=this.capline=0,this.hasPreviousConnection=!1,this.connection=null},t.utils.object.inherits(t.blockRendering.TopRow,t.blockRendering.Row),t.blockRendering.TopRow.prototype.hasLeftSquareCorner=function(t){var e=(t.hat?"cap"===t.hat:this.constants_.ADD_START_HATS)&&!t.outputConnection&&!t.previousConnection,i=t.getPreviousBlock();return!!t.outputConnection||e||!!i&&i.getNextBlock()==t},t.blockRendering.TopRow.prototype.hasRightSquareCorner=function(t){return!0},t.blockRendering.TopRow.prototype.measure=function(){for(var e,i=0,n=0,o=0,r=0;e=this.elements[r];r++)n+=e.width,t.blockRendering.Types.isSpacer(e)||(t.blockRendering.Types.isHat(e)?o=Math.max(o,e.ascenderHeight):i=Math.max(i,e.height));this.width=Math.max(this.minWidth,n),this.height=Math.max(this.minHeight,i)+o,this.capline=this.ascenderHeight=o,this.widthWithConnectedBlocks=this.width},t.blockRendering.TopRow.prototype.startsWithElemSpacer=function(){return!1},t.blockRendering.TopRow.prototype.endsWithElemSpacer=function(){return!1},t.blockRendering.BottomRow=function(e){t.blockRendering.BottomRow.superClass_.constructor.call(this,e),this.type|=t.blockRendering.Types.BOTTOM_ROW,this.hasNextConnection=!1,this.connection=null,this.baseline=this.descenderHeight=0},t.utils.object.inherits(t.blockRendering.BottomRow,t.blockRendering.Row),t.blockRendering.BottomRow.prototype.hasLeftSquareCorner=function(t){return!!t.outputConnection||!!t.getNextBlock()},t.blockRendering.BottomRow.prototype.hasRightSquareCorner=function(t){return!0},t.blockRendering.BottomRow.prototype.measure=function(){for(var e,i=0,n=0,o=0,r=0;e=this.elements[r];r++)n+=e.width,t.blockRendering.Types.isSpacer(e)||(t.blockRendering.Types.isNextConnection(e)?o=Math.max(o,e.height):i=Math.max(i,e.height));this.width=Math.max(this.minWidth,n),this.height=Math.max(this.minHeight,i)+o,this.descenderHeight=o,this.widthWithConnectedBlocks=this.width},t.blockRendering.BottomRow.prototype.startsWithElemSpacer=function(){return!1},t.blockRendering.BottomRow.prototype.endsWithElemSpacer=function(){return!1},t.blockRendering.SpacerRow=function(e,i,n){t.blockRendering.SpacerRow.superClass_.constructor.call(this,e),this.type=this.type|t.blockRendering.Types.SPACER|t.blockRendering.Types.BETWEEN_ROW_SPACER,this.width=n,this.height=i,this.followsStatement=!1,this.widthWithConnectedBlocks=0,this.elements=[new t.blockRendering.InRowSpacer(this.constants_,n)]},t.utils.object.inherits(t.blockRendering.SpacerRow,t.blockRendering.Row),t.blockRendering.SpacerRow.prototype.measure=function(){},t.blockRendering.InputRow=function(e){t.blockRendering.InputRow.superClass_.constructor.call(this,e),this.type|=t.blockRendering.Types.INPUT_ROW,this.connectedBlockWidths=0},t.utils.object.inherits(t.blockRendering.InputRow,t.blockRendering.Row),t.blockRendering.InputRow.prototype.measure=function(){this.width=this.minWidth,this.height=this.minHeight;for(var e,i=0,n=0;e=this.elements[n];n++)this.width+=e.width,t.blockRendering.Types.isInput(e)&&(t.blockRendering.Types.isStatementInput(e)?i+=e.connectedBlockWidth:t.blockRendering.Types.isExternalInput(e)&&0!=e.connectedBlockWidth&&(i+=e.connectedBlockWidth-e.connectionWidth)),t.blockRendering.Types.isSpacer(e)||(this.height=Math.max(this.height,e.height));this.connectedBlockWidths=i,this.widthWithConnectedBlocks=this.width+i},t.blockRendering.InputRow.prototype.endsWithElemSpacer=function(){return!this.hasExternalInput&&!this.hasStatement},t.blockRendering.RenderInfo=function(e,i){this.block_=i,this.renderer_=e,this.constants_=this.renderer_.getConstants(),this.outputConnection=i.outputConnection?new t.blockRendering.OutputConnection(this.constants_,i.outputConnection):null,this.isInline=i.getInputsInline()&&!i.isCollapsed(),this.isCollapsed=i.isCollapsed(),this.isInsertionMarker=i.isInsertionMarker(),this.RTL=i.RTL,this.statementEdge=this.width=this.widthWithChildren=this.height=0,this.rows=[],this.inputRows=[],this.hiddenIcons=[],this.topRow=new t.blockRendering.TopRow(this.constants_),this.bottomRow=new t.blockRendering.BottomRow(this.constants_),this.startY=this.startX=0},t.blockRendering.RenderInfo.prototype.getRenderer=function(){return this.renderer_},t.blockRendering.RenderInfo.prototype.measure=function(){this.createRows_(),this.addElemSpacing_(),this.addRowSpacing_(),this.computeBounds_(),this.alignRowElements_(),this.finalize_()},t.blockRendering.RenderInfo.prototype.createRows_=function(){this.populateTopRow_(),this.rows.push(this.topRow);var e=new t.blockRendering.InputRow(this.constants_);this.inputRows.push(e);for(var i,n=this.block_.getIcons(),o=0;i=n[o];o++){var r=new t.blockRendering.Icon(this.constants_,i);this.isCollapsed&&i.collapseHidden?this.hiddenIcons.push(r):e.elements.push(r)}for(i=null,o=0;n=this.block_.inputList[o];o++)if(n.isVisible()){for(this.shouldStartNewRow_(n,i)&&(this.rows.push(e),e=new t.blockRendering.InputRow(this.constants_),this.inputRows.push(e)),i=0;r=n.fieldRow[i];i++)e.elements.push(new t.blockRendering.Field(this.constants_,r,n));this.addInput_(n,e),i=n}this.isCollapsed&&(e.hasJaggedEdge=!0,e.elements.push(new t.blockRendering.JaggedEdge(this.constants_))),(e.elements.length||e.hasDummyInput)&&this.rows.push(e),this.populateBottomRow_(),this.rows.push(this.bottomRow)},t.blockRendering.RenderInfo.prototype.populateTopRow_=function(){var e=!!this.block_.previousConnection,i=(this.block_.hat?"cap"===this.block_.hat:this.constants_.ADD_START_HATS)&&!this.outputConnection&&!e,n=this.topRow.hasLeftSquareCorner(this.block_)?t.blockRendering.SquareCorner:t.blockRendering.RoundCorner;this.topRow.elements.push(new n(this.constants_)),i?(e=new t.blockRendering.Hat(this.constants_),this.topRow.elements.push(e),this.topRow.capline=e.ascenderHeight):e&&(this.topRow.hasPreviousConnection=!0,this.topRow.connection=new t.blockRendering.PreviousConnection(this.constants_,this.block_.previousConnection),this.topRow.elements.push(this.topRow.connection)),this.block_.inputList.length&&this.block_.inputList[0].type==t.inputTypes.STATEMENT&&!this.block_.isCollapsed()?this.topRow.minHeight=this.constants_.TOP_ROW_PRECEDES_STATEMENT_MIN_HEIGHT:this.topRow.minHeight=this.constants_.TOP_ROW_MIN_HEIGHT,n=this.topRow.hasRightSquareCorner(this.block_)?t.blockRendering.SquareCorner:t.blockRendering.RoundCorner,this.topRow.elements.push(new n(this.constants_,"right"))},t.blockRendering.RenderInfo.prototype.populateBottomRow_=function(){this.bottomRow.hasNextConnection=!!this.block_.nextConnection,this.bottomRow.minHeight=this.block_.inputList.length&&this.block_.inputList[this.block_.inputList.length-1].type==t.inputTypes.STATEMENT?this.constants_.BOTTOM_ROW_AFTER_STATEMENT_MIN_HEIGHT:this.constants_.BOTTOM_ROW_MIN_HEIGHT,this.bottomRow.hasLeftSquareCorner(this.block_)?this.bottomRow.elements.push(new t.blockRendering.SquareCorner(this.constants_)):this.bottomRow.elements.push(new t.blockRendering.RoundCorner(this.constants_)),this.bottomRow.hasNextConnection&&(this.bottomRow.connection=new t.blockRendering.NextConnection(this.constants_,this.block_.nextConnection),this.bottomRow.elements.push(this.bottomRow.connection)),this.bottomRow.hasRightSquareCorner(this.block_)?this.bottomRow.elements.push(new t.blockRendering.SquareCorner(this.constants_,"right")):this.bottomRow.elements.push(new t.blockRendering.RoundCorner(this.constants_,"right"))},t.blockRendering.RenderInfo.prototype.addInput_=function(e,i){this.isInline&&e.type==t.inputTypes.VALUE?(i.elements.push(new t.blockRendering.InlineInput(this.constants_,e)),i.hasInlineInput=!0):e.type==t.inputTypes.STATEMENT?(i.elements.push(new t.blockRendering.StatementInput(this.constants_,e)),i.hasStatement=!0):e.type==t.inputTypes.VALUE?(i.elements.push(new t.blockRendering.ExternalValueInput(this.constants_,e)),i.hasExternalInput=!0):e.type==t.inputTypes.DUMMY&&(i.minHeight=Math.max(i.minHeight,e.getSourceBlock()&&e.getSourceBlock().isShadow()?this.constants_.DUMMY_INPUT_SHADOW_MIN_HEIGHT:this.constants_.DUMMY_INPUT_MIN_HEIGHT),i.hasDummyInput=!0),null==i.align&&(i.align=e.align)},t.blockRendering.RenderInfo.prototype.shouldStartNewRow_=function(e,i){return!!i&&(e.type==t.inputTypes.STATEMENT||i.type==t.inputTypes.STATEMENT||(e.type==t.inputTypes.VALUE||e.type==t.inputTypes.DUMMY)&&!this.isInline)},t.blockRendering.RenderInfo.prototype.addElemSpacing_=function(){for(var e,i=0;e=this.rows[i];i++){var n=e.elements;if(e.elements=[],e.startsWithElemSpacer()&&e.elements.push(new t.blockRendering.InRowSpacer(this.constants_,this.getInRowSpacing_(null,n[0]))),n.length){for(var o=0;o<n.length-1;o++){e.elements.push(n[o]);var r=this.getInRowSpacing_(n[o],n[o+1]);e.elements.push(new t.blockRendering.InRowSpacer(this.constants_,r))}e.elements.push(n[n.length-1]),e.endsWithElemSpacer()&&e.elements.push(new t.blockRendering.InRowSpacer(this.constants_,this.getInRowSpacing_(n[n.length-1],null)))}}},t.blockRendering.RenderInfo.prototype.getInRowSpacing_=function(e,i){if(!e&&i&&t.blockRendering.Types.isStatementInput(i))return this.constants_.STATEMENT_INPUT_PADDING_LEFT;if(e&&t.blockRendering.Types.isInput(e)&&!i){if(t.blockRendering.Types.isExternalInput(e))return this.constants_.NO_PADDING;if(t.blockRendering.Types.isInlineInput(e))return this.constants_.LARGE_PADDING;if(t.blockRendering.Types.isStatementInput(e))return this.constants_.NO_PADDING}return e&&t.blockRendering.Types.isLeftSquareCorner(e)&&i&&(t.blockRendering.Types.isPreviousConnection(i)||t.blockRendering.Types.isNextConnection(i))?i.notchOffset:e&&t.blockRendering.Types.isLeftRoundedCorner(e)&&i&&(t.blockRendering.Types.isPreviousConnection(i)||t.blockRendering.Types.isNextConnection(i))?i.notchOffset-this.constants_.CORNER_RADIUS:this.constants_.MEDIUM_PADDING},t.blockRendering.RenderInfo.prototype.computeBounds_=function(){for(var t,e=0,i=0,n=0,o=0;t=this.rows[o];o++){if(t.measure(),i=Math.max(i,t.width),t.hasStatement){var r=t.getLastInput();e=Math.max(e,t.width-r.width)}n=Math.max(n,t.widthWithConnectedBlocks)}for(this.statementEdge=e,this.width=i,o=0;t=this.rows[o];o++)t.hasStatement&&(t.statementEdge=this.statementEdge);this.widthWithChildren=Math.max(i,n),this.outputConnection&&(this.startX=this.outputConnection.width,this.width+=this.outputConnection.width,this.widthWithChildren+=this.outputConnection.width)},t.blockRendering.RenderInfo.prototype.alignRowElements_=function(){for(var e,i=0;e=this.rows[i];i++)if(e.hasStatement)this.alignStatementRow_(e);else{var n=e.width;0<(n=this.getDesiredRowWidth_(e)-n)&&this.addAlignmentPadding_(e,n),t.blockRendering.Types.isTopOrBottomRow(e)&&(e.widthWithConnectedBlocks=e.width)}},t.blockRendering.RenderInfo.prototype.getDesiredRowWidth_=function(t){return this.width-this.startX},t.blockRendering.RenderInfo.prototype.addAlignmentPadding_=function(e,i){var n=e.getFirstSpacer(),o=e.getLastSpacer();(e.hasExternalInput||e.hasStatement)&&(e.widthWithConnectedBlocks+=i),e.align==t.constants.ALIGN.LEFT?o.width+=i:e.align==t.constants.ALIGN.CENTRE?(n.width+=i/2,o.width+=i/2):e.align==t.constants.ALIGN.RIGHT?n.width+=i:o.width+=i,e.width+=i},t.blockRendering.RenderInfo.prototype.alignStatementRow_=function(t){var e=t.getLastInput(),i=t.width-e.width,n=this.statementEdge;0<(i=n-i)&&this.addAlignmentPadding_(t,i),i=t.width,n=this.getDesiredRowWidth_(t),e.width+=n-i,e.height=Math.max(e.height,t.height),t.width+=n-i,t.widthWithConnectedBlocks=Math.max(t.width,this.statementEdge+t.connectedBlockWidths)},t.blockRendering.RenderInfo.prototype.addRowSpacing_=function(){var t=this.rows;this.rows=[];for(var e=0;e<t.length;e++)this.rows.push(t[e]),e!=t.length-1&&this.rows.push(this.makeSpacerRow_(t[e],t[e+1]))},t.blockRendering.RenderInfo.prototype.makeSpacerRow_=function(e,i){var n=this.getSpacerRowHeight_(e,i),o=this.getSpacerRowWidth_(e,i);return n=new t.blockRendering.SpacerRow(this.constants_,n,o),e.hasStatement&&(n.followsStatement=!0),i.hasStatement&&(n.precedesStatement=!0),n},t.blockRendering.RenderInfo.prototype.getSpacerRowWidth_=function(t,e){return this.width-this.startX},t.blockRendering.RenderInfo.prototype.getSpacerRowHeight_=function(t,e){return this.constants_.MEDIUM_PADDING},t.blockRendering.RenderInfo.prototype.getElemCenterline_=function(e,i){return t.blockRendering.Types.isSpacer(i)?e.yPos+i.height/2:t.blockRendering.Types.isBottomRow(e)?(e=e.yPos+e.height-e.descenderHeight,t.blockRendering.Types.isNextConnection(i)?e+i.height/2:e-i.height/2):t.blockRendering.Types.isTopRow(e)?t.blockRendering.Types.isHat(i)?e.capline-i.height/2:e.capline+i.height/2:e.yPos+e.height/2},t.blockRendering.RenderInfo.prototype.recordElemPositions_=function(e){for(var i,n=e.xPos,o=0;i=e.elements[o];o++)t.blockRendering.Types.isSpacer(i)&&(i.height=e.height),i.xPos=n,i.centerline=this.getElemCenterline_(e,i),n+=i.width},t.blockRendering.RenderInfo.prototype.finalize_=function(){for(var t,e=0,i=0,n=0;t=this.rows[n];n++)t.yPos=i,t.xPos=this.startX,i+=t.height,e=Math.max(e,t.widthWithConnectedBlocks),this.recordElemPositions_(t);this.outputConnection&&this.block_.nextConnection&&this.block_.nextConnection.isConnected()&&(e=Math.max(e,this.block_.nextConnection.targetBlock().getHeightWidth().width)),this.widthWithChildren=e+this.startX,this.height=i,this.startY=this.topRow.capline,this.bottomRow.baseline=i-this.bottomRow.descenderHeight},t.blockRendering.Debug=function(t){this.debugElements_=[],this.svgRoot_=null,this.constants_=t},t.blockRendering.Debug.config={rowSpacers:!0,elemSpacers:!0,rows:!0,elems:!0,connections:!0,blockBounds:!0,connectedBlockBounds:!0,render:!0},t.blockRendering.Debug.prototype.clearElems=function(){for(var e,i=0;e=this.debugElements_[i];i++)t.utils.dom.removeNode(e);this.debugElements_=[]},t.blockRendering.Debug.prototype.drawSpacerRow=function(e,i,n){if(t.blockRendering.Debug.config.rowSpacers){var o=Math.abs(e.height),r=0>e.height;r&&(i-=o),this.debugElements_.push(t.utils.dom.createSvgElement(t.utils.Svg.RECT,{class:"rowSpacerRect blockRenderDebug",x:n?-(e.xPos+e.width):e.xPos,y:i,width:e.width,height:o,stroke:r?"black":"blue",fill:"blue","fill-opacity":"0.5","stroke-width":"1px"},this.svgRoot_))}},t.blockRendering.Debug.prototype.drawSpacerElem=function(e,i,n){if(t.blockRendering.Debug.config.elemSpacers){i=Math.abs(e.width);var o=0>e.width,r=o?e.xPos-i:e.xPos;n&&(r=-(r+i)),this.debugElements_.push(t.utils.dom.createSvgElement(t.utils.Svg.RECT,{class:"elemSpacerRect blockRenderDebug",x:r,y:e.centerline-e.height/2,width:i,height:e.height,stroke:"pink",fill:o?"black":"pink","fill-opacity":"0.5","stroke-width":"1px"},this.svgRoot_))}},t.blockRendering.Debug.prototype.drawRenderedElem=function(e,i){if(t.blockRendering.Debug.config.elems){var n=e.xPos;i&&(n=-(n+e.width)),i=e.centerline-e.height/2,this.debugElements_.push(t.utils.dom.createSvgElement(t.utils.Svg.RECT,{class:"rowRenderingRect blockRenderDebug",x:n,y:i,width:e.width,height:e.height,stroke:"black",fill:"none","stroke-width":"1px"},this.svgRoot_)),t.blockRendering.Types.isField(e)&&e.field instanceof t.FieldLabel&&this.debugElements_.push(t.utils.dom.createSvgElement(t.utils.Svg.RECT,{class:"rowRenderingRect blockRenderDebug",x:n,y:i+this.constants_.FIELD_TEXT_BASELINE,width:e.width,height:"0.1px",stroke:"red",fill:"none","stroke-width":"0.5px"},this.svgRoot_))}t.blockRendering.Types.isInput(e)&&t.blockRendering.Debug.config.connections&&this.drawConnection(e.connectionModel)},t.blockRendering.Debug.prototype.drawConnection=function(e){if(t.blockRendering.Debug.config.connections){if(e.type==t.connectionTypes.INPUT_VALUE)var i=4,n="magenta",o="none";else e.type==t.connectionTypes.OUTPUT_VALUE?(i=2,o=n="magenta"):e.type==t.connectionTypes.NEXT_STATEMENT?(i=4,n="goldenrod",o="none"):e.type==t.connectionTypes.PREVIOUS_STATEMENT&&(i=2,o=n="goldenrod");this.debugElements_.push(t.utils.dom.createSvgElement(t.utils.Svg.CIRCLE,{class:"blockRenderDebug",cx:e.offsetInBlock_.x,cy:e.offsetInBlock_.y,r:i,fill:o,stroke:n},this.svgRoot_))}},t.blockRendering.Debug.prototype.drawRenderedRow=function(e,i,n){t.blockRendering.Debug.config.rows&&(this.debugElements_.push(t.utils.dom.createSvgElement(t.utils.Svg.RECT,{class:"elemRenderingRect blockRenderDebug",x:n?-(e.xPos+e.width):e.xPos,y:e.yPos,width:e.width,height:e.height,stroke:"red",fill:"none","stroke-width":"1px"},this.svgRoot_)),t.blockRendering.Types.isTopOrBottomRow(e)||t.blockRendering.Debug.config.connectedBlockBounds&&this.debugElements_.push(t.utils.dom.createSvgElement(t.utils.Svg.RECT,{class:"connectedBlockWidth blockRenderDebug",x:n?-(e.xPos+e.widthWithConnectedBlocks):e.xPos,y:e.yPos,width:e.widthWithConnectedBlocks,height:e.height,stroke:this.randomColour_,fill:"none","stroke-width":"1px","stroke-dasharray":"3,3"},this.svgRoot_)))},t.blockRendering.Debug.prototype.drawRowWithElements=function(e,i,n){for(var o=0,r=e.elements.length;o<r;o++){var s=e.elements[o];s?t.blockRendering.Types.isSpacer(s)?this.drawSpacerElem(s,e.height,n):this.drawRenderedElem(s,n):console.warn("A row has an undefined or null element.",e,s)}this.drawRenderedRow(e,i,n)},t.blockRendering.Debug.prototype.drawBoundingBox=function(e){if(t.blockRendering.Debug.config.blockBounds){var i=e.RTL?-e.width:0;this.debugElements_.push(t.utils.dom.createSvgElement(t.utils.Svg.RECT,{class:"blockBoundingBox blockRenderDebug",x:i,y:0,width:e.width,height:e.height,stroke:"black",fill:"none","stroke-width":"1px","stroke-dasharray":"5,5"},this.svgRoot_)),t.blockRendering.Debug.config.connectedBlockBounds&&(i=e.RTL?-e.widthWithChildren:0,this.debugElements_.push(t.utils.dom.createSvgElement(t.utils.Svg.RECT,{class:"blockRenderDebug",x:i,y:0,width:e.widthWithChildren,height:e.height,stroke:"#DF57BC",fill:"none","stroke-width":"1px","stroke-dasharray":"3,3"},this.svgRoot_)))}},t.blockRendering.Debug.prototype.drawDebug=function(e,i){this.clearElems(),this.svgRoot_=e.getSvgRoot(),this.randomColour_="#"+Math.floor(16777215*Math.random()).toString(16);for(var n,o=0,r=0;n=i.rows[r];r++)t.blockRendering.Types.isBetweenRowSpacer(n)?this.drawSpacerRow(n,o,i.RTL):this.drawRowWithElements(n,o,i.RTL),o+=n.height;e.previousConnection&&this.drawConnection(e.previousConnection),e.nextConnection&&this.drawConnection(e.nextConnection),e.outputConnection&&this.drawConnection(e.outputConnection),i.rightSide&&this.drawRenderedElem(i.rightSide,i.RTL),this.drawBoundingBox(i),this.drawRender(e.pathObject.svgPath)},t.blockRendering.Debug.prototype.drawRender=function(e){t.blockRendering.Debug.config.render&&(e.setAttribute("filter","url(#"+this.constants_.debugFilterId+")"),setTimeout(function(){e.setAttribute("filter","")},100))},t.blockRendering.Drawer=function(t,e){this.block_=t,this.info_=e,this.topLeft_=t.getRelativeToSurfaceXY(),this.inlinePath_=this.outlinePath_="",this.constants_=e.getRenderer().getConstants()},t.blockRendering.Drawer.prototype.draw=function(){this.hideHiddenIcons_(),this.drawOutline_(),this.drawInternals_(),this.block_.pathObject.setPath(this.outlinePath_+"\n"+this.inlinePath_),this.info_.RTL&&this.block_.pathObject.flipRTL(),t.blockRendering.useDebugger&&this.block_.renderingDebugger.drawDebug(this.block_,this.info_),this.recordSizeOnBlock_()},t.blockRendering.Drawer.prototype.recordSizeOnBlock_=function(){this.block_.height=this.info_.height,this.block_.width=this.info_.widthWithChildren},t.blockRendering.Drawer.prototype.hideHiddenIcons_=function(){for(var t,e=0;t=this.info_.hiddenIcons[e];e++)t.icon.iconGroup_.setAttribute("display","none")},t.blockRendering.Drawer.prototype.drawOutline_=function(){this.drawTop_();for(var t=1;t<this.info_.rows.length-1;t++){var e=this.info_.rows[t];e.hasJaggedEdge?this.drawJaggedEdge_(e):e.hasStatement?this.drawStatementInput_(e):e.hasExternalInput?this.drawValueInput_(e):this.drawRightSideRow_(e)}this.drawBottom_(),this.drawLeft_()},t.blockRendering.Drawer.prototype.drawTop_=function(){var e=this.info_.topRow,i=e.elements;this.positionPreviousConnection_(),this.outlinePath_+=t.utils.svgPaths.moveBy(e.xPos,this.info_.startY);for(var n,o=0;n=i[o];o++)t.blockRendering.Types.isLeftRoundedCorner(n)?this.outlinePath_+=this.constants_.OUTSIDE_CORNERS.topLeft:t.blockRendering.Types.isRightRoundedCorner(n)?this.outlinePath_+=this.constants_.OUTSIDE_CORNERS.topRight:t.blockRendering.Types.isPreviousConnection(n)?this.outlinePath_+=n.shape.pathLeft:t.blockRendering.Types.isHat(n)?this.outlinePath_+=this.constants_.START_HAT.path:t.blockRendering.Types.isSpacer(n)&&(this.outlinePath_+=t.utils.svgPaths.lineOnAxis("h",n.width));this.outlinePath_+=t.utils.svgPaths.lineOnAxis("v",e.height)},t.blockRendering.Drawer.prototype.drawJaggedEdge_=function(e){this.outlinePath_+=this.constants_.JAGGED_TEETH.path+t.utils.svgPaths.lineOnAxis("v",e.height-this.constants_.JAGGED_TEETH.height)},t.blockRendering.Drawer.prototype.drawValueInput_=function(e){var i=e.getLastInput();this.positionExternalValueConnection_(e);var n="function"==typeof i.shape.pathDown?i.shape.pathDown(i.height):i.shape.pathDown;this.outlinePath_+=t.utils.svgPaths.lineOnAxis("H",i.xPos+i.width)+n+t.utils.svgPaths.lineOnAxis("v",e.height-i.connectionHeight)},t.blockRendering.Drawer.prototype.drawStatementInput_=function(e){var i=e.getLastInput(),n=i.xPos+i.notchOffset+i.shape.width;i=i.shape.pathRight+t.utils.svgPaths.lineOnAxis("h",-(i.notchOffset-this.constants_.INSIDE_CORNERS.width))+this.constants_.INSIDE_CORNERS.pathTop;var o=e.height-2*this.constants_.INSIDE_CORNERS.height;this.outlinePath_+=t.utils.svgPaths.lineOnAxis("H",n)+i+t.utils.svgPaths.lineOnAxis("v",o)+this.constants_.INSIDE_CORNERS.pathBottom+t.utils.svgPaths.lineOnAxis("H",e.xPos+e.width),this.positionStatementInputConnection_(e)},t.blockRendering.Drawer.prototype.drawRightSideRow_=function(e){this.outlinePath_+=t.utils.svgPaths.lineOnAxis("V",e.yPos+e.height)},t.blockRendering.Drawer.prototype.drawBottom_=function(){var e=this.info_.bottomRow,i=e.elements;this.positionNextConnection_();for(var n,o=0,r="",s=i.length-1;n=i[s];s--)t.blockRendering.Types.isNextConnection(n)?r+=n.shape.pathRight:t.blockRendering.Types.isLeftSquareCorner(n)?r+=t.utils.svgPaths.lineOnAxis("H",e.xPos):t.blockRendering.Types.isLeftRoundedCorner(n)?r+=this.constants_.OUTSIDE_CORNERS.bottomLeft:t.blockRendering.Types.isRightRoundedCorner(n)?(r+=this.constants_.OUTSIDE_CORNERS.bottomRight,o=this.constants_.OUTSIDE_CORNERS.rightHeight):t.blockRendering.Types.isSpacer(n)&&(r+=t.utils.svgPaths.lineOnAxis("h",-1*n.width));this.outlinePath_+=t.utils.svgPaths.lineOnAxis("V",e.baseline-o),this.outlinePath_+=r},t.blockRendering.Drawer.prototype.drawLeft_=function(){var e=this.info_.outputConnection;if(this.positionOutputConnection_(),e){var i=e.connectionOffsetY+e.height;e="function"==typeof e.shape.pathUp?e.shape.pathUp(e.height):e.shape.pathUp,this.outlinePath_+=t.utils.svgPaths.lineOnAxis("V",i)+e}this.outlinePath_+="z"},t.blockRendering.Drawer.prototype.drawInternals_=function(){for(var e,i=0;e=this.info_.rows[i];i++)for(var n,o=0;n=e.elements[o];o++)t.blockRendering.Types.isInlineInput(n)?this.drawInlineInput_(n):(t.blockRendering.Types.isIcon(n)||t.blockRendering.Types.isField(n))&&this.layoutField_(n)},t.blockRendering.Drawer.prototype.layoutField_=function(e){if(t.blockRendering.Types.isField(e))var i=e.field.getSvgRoot();else t.blockRendering.Types.isIcon(e)&&(i=e.icon.iconGroup_);var n=e.centerline-e.height/2,o=e.xPos,r="";this.info_.RTL&&(o=-(o+e.width),e.flipRtl&&(o+=e.width,r="scale(-1 1)")),t.blockRendering.Types.isIcon(e)?(i.setAttribute("display","block"),i.setAttribute("transform","translate("+o+","+n+")"),e.icon.computeIconLocation()):i.setAttribute("transform","translate("+o+","+n+")"+r),this.info_.isInsertionMarker&&i.setAttribute("display","none")},t.blockRendering.Drawer.prototype.drawInlineInput_=function(e){var i=e.width,n=e.height,o=e.connectionOffsetY,r=e.connectionHeight+o;this.inlinePath_+=t.utils.svgPaths.moveTo(e.xPos+e.connectionWidth,e.centerline-n/2)+t.utils.svgPaths.lineOnAxis("v",o)+e.shape.pathDown+t.utils.svgPaths.lineOnAxis("v",n-r)+t.utils.svgPaths.lineOnAxis("h",i-e.connectionWidth)+t.utils.svgPaths.lineOnAxis("v",-n)+"z",this.positionInlineInputConnection_(e)},t.blockRendering.Drawer.prototype.positionInlineInputConnection_=function(t){var e=t.centerline-t.height/2;if(t.connectionModel){var i=t.xPos+t.connectionWidth+t.connectionOffsetX;this.info_.RTL&&(i*=-1),t.connectionModel.setOffsetInBlock(i,e+t.connectionOffsetY)}},t.blockRendering.Drawer.prototype.positionStatementInputConnection_=function(t){var e=t.getLastInput();if(e.connectionModel){var i=t.xPos+t.statementEdge+e.notchOffset;this.info_.RTL&&(i*=-1),e.connectionModel.setOffsetInBlock(i,t.yPos)}},t.blockRendering.Drawer.prototype.positionExternalValueConnection_=function(t){var e=t.getLastInput();if(e.connectionModel){var i=t.xPos+t.width;this.info_.RTL&&(i*=-1),e.connectionModel.setOffsetInBlock(i,t.yPos)}},t.blockRendering.Drawer.prototype.positionPreviousConnection_=function(){var t=this.info_.topRow;if(t.connection){var e=t.xPos+t.notchOffset;t.connection.connectionModel.setOffsetInBlock(this.info_.RTL?-e:e,0)}},t.blockRendering.Drawer.prototype.positionNextConnection_=function(){var t=this.info_.bottomRow;if(t.connection){var e=t.connection,i=e.xPos;e.connectionModel.setOffsetInBlock(this.info_.RTL?-i:i,t.baseline)}},t.blockRendering.Drawer.prototype.positionOutputConnection_=function(){if(this.info_.outputConnection){var t=this.info_.startX+this.info_.outputConnection.connectionOffsetX;this.block_.outputConnection.setOffsetInBlock(this.info_.RTL?-t:t,this.info_.outputConnection.connectionOffsetY)}},t.Events.MarkerMove=function(e,i,n,o){var r=e?e.workspace.id:void 0;o&&o.getType()==t.ASTNode.types.WORKSPACE&&(r=o.getLocation().id),t.Events.MarkerMove.superClass_.constructor.call(this,r),this.blockId=e?e.id:null,this.oldNode=n,this.newNode=o,this.isCursor=i},t.utils.object.inherits(t.Events.MarkerMove,t.Events.UiBase),t.Events.MarkerMove.prototype.type=t.Events.MARKER_MOVE,t.Events.MarkerMove.prototype.toJson=function(){var e=t.Events.MarkerMove.superClass_.toJson.call(this);return e.isCursor=this.isCursor,e.blockId=this.blockId,e.oldNode=this.oldNode,e.newNode=this.newNode,e},t.Events.MarkerMove.prototype.fromJson=function(e){t.Events.MarkerMove.superClass_.fromJson.call(this,e),this.isCursor=e.isCursor,this.blockId=e.blockId,this.oldNode=e.oldNode,this.newNode=e.newNode},t.registry.register(t.registry.Type.EVENT,t.Events.MARKER_MOVE,t.Events.MarkerMove),t.blockRendering.MarkerSvg=function(t,e,i){this.workspace_=t,this.marker_=i,this.parent_=null,this.constants_=e,this.currentMarkerSvg=null,t=this.isCursor()?this.constants_.CURSOR_COLOUR:this.constants_.MARKER_COLOUR,this.colour_=i.colour||t},t.blockRendering.MarkerSvg.CURSOR_CLASS="blocklyCursor",t.blockRendering.MarkerSvg.MARKER_CLASS="blocklyMarker",t.blockRendering.MarkerSvg.HEIGHT_MULTIPLIER=.75,t.blockRendering.MarkerSvg.prototype.getSvgRoot=function(){return this.svgGroup_},t.blockRendering.MarkerSvg.prototype.getMarker=function(){return this.marker_},t.blockRendering.MarkerSvg.prototype.isCursor=function(){return"cursor"==this.marker_.type},t.blockRendering.MarkerSvg.prototype.createDom=function(){var e=this.isCursor()?t.blockRendering.MarkerSvg.CURSOR_CLASS:t.blockRendering.MarkerSvg.MARKER_CLASS;return this.svgGroup_=t.utils.dom.createSvgElement(t.utils.Svg.G,{class:e},null),this.createDomInternal_(),this.svgGroup_},t.blockRendering.MarkerSvg.prototype.setParent_=function(t){this.isCursor()?(this.parent_&&this.parent_.setCursorSvg(null),t.setCursorSvg(this.getSvgRoot())):(this.parent_&&this.parent_.setMarkerSvg(null),t.setMarkerSvg(this.getSvgRoot())),this.parent_=t},t.blockRendering.MarkerSvg.prototype.draw=function(t,e){if(e){this.constants_=this.workspace_.getRenderer().getConstants();var i=this.isCursor()?this.constants_.CURSOR_COLOUR:this.constants_.MARKER_COLOUR;this.colour_=this.marker_.colour||i,this.applyColour_(e),this.showAtLocation_(e),this.fireMarkerEvent_(t,e),void 0!==(t=this.currentMarkerSvg.childNodes[0])&&t.beginElement&&t.beginElement()}else this.hide()},t.blockRendering.MarkerSvg.prototype.showAtLocation_=function(e){var i=e.getLocation().type;e.getType()==t.ASTNode.types.BLOCK?this.showWithBlock_(e):e.getType()==t.ASTNode.types.OUTPUT?this.showWithOutput_(e):i==t.connectionTypes.INPUT_VALUE?this.showWithInput_(e):i==t.connectionTypes.NEXT_STATEMENT?this.showWithNext_(e):e.getType()==t.ASTNode.types.PREVIOUS?this.showWithPrevious_(e):e.getType()==t.ASTNode.types.FIELD?this.showWithField_(e):e.getType()==t.ASTNode.types.WORKSPACE?this.showWithCoordinates_(e):e.getType()==t.ASTNode.types.STACK&&this.showWithStack_(e)},t.blockRendering.MarkerSvg.prototype.showWithBlockPrevOutput_=function(e){var i=(e=e.getSourceBlock()).width,n=e.height,o=n*t.blockRendering.MarkerSvg.HEIGHT_MULTIPLIER,r=this.constants_.CURSOR_BLOCK_PADDING;if(e.previousConnection){var s=this.constants_.shapeFor(e.previousConnection);this.positionPrevious_(i,r,o,s)}else e.outputConnection?(s=this.constants_.shapeFor(e.outputConnection),this.positionOutput_(i,n,s)):this.positionBlock_(i,r,o);this.setParent_(e),this.showCurrent_()},t.blockRendering.MarkerSvg.prototype.showWithBlock_=function(t){this.showWithBlockPrevOutput_(t)},t.blockRendering.MarkerSvg.prototype.showWithPrevious_=function(t){this.showWithBlockPrevOutput_(t)},t.blockRendering.MarkerSvg.prototype.showWithOutput_=function(t){this.showWithBlockPrevOutput_(t)},t.blockRendering.MarkerSvg.prototype.showWithCoordinates_=function(t){var e=t.getWsCoordinate();t=e.x,e=e.y,this.workspace_.RTL&&(t-=this.constants_.CURSOR_WS_WIDTH),this.positionLine_(t,e,this.constants_.CURSOR_WS_WIDTH),this.setParent_(this.workspace_),this.showCurrent_()},t.blockRendering.MarkerSvg.prototype.showWithField_=function(t){var e=(t=t.getLocation()).getSize().width,i=t.getSize().height;this.positionRect_(0,0,e,i),this.setParent_(t),this.showCurrent_()},t.blockRendering.MarkerSvg.prototype.showWithInput_=function(t){var e=(t=t.getLocation()).getSourceBlock();this.positionInput_(t),this.setParent_(e),this.showCurrent_()},t.blockRendering.MarkerSvg.prototype.showWithNext_=function(t){var e=t.getLocation();t=e.getSourceBlock();var i=0;e=e.getOffsetInBlock().y;var n=t.getHeightWidth().width;this.workspace_.RTL&&(i=-n),this.positionLine_(i,e,n),this.setParent_(t),this.showCurrent_()},t.blockRendering.MarkerSvg.prototype.showWithStack_=function(t){var e=(t=t.getLocation()).getHeightWidth(),i=e.width+this.constants_.CURSOR_STACK_PADDING;e=e.height+this.constants_.CURSOR_STACK_PADDING;var n=-this.constants_.CURSOR_STACK_PADDING/2,o=-this.constants_.CURSOR_STACK_PADDING/2,r=n;this.workspace_.RTL&&(r=-(i+n)),this.positionRect_(r,o,i,e),this.setParent_(t),this.showCurrent_()},t.blockRendering.MarkerSvg.prototype.showCurrent_=function(){this.hide(),this.currentMarkerSvg.style.display=""},t.blockRendering.MarkerSvg.prototype.positionBlock_=function(e,i,n){e=t.utils.svgPaths.moveBy(-i,n)+t.utils.svgPaths.lineOnAxis("V",-i)+t.utils.svgPaths.lineOnAxis("H",e+2*i)+t.utils.svgPaths.lineOnAxis("V",n),this.markerBlock_.setAttribute("d",e),this.workspace_.RTL&&this.flipRtl_(this.markerBlock_),this.currentMarkerSvg=this.markerBlock_},t.blockRendering.MarkerSvg.prototype.positionInput_=function(e){var i=e.getOffsetInBlock().x,n=e.getOffsetInBlock().y;e=t.utils.svgPaths.moveTo(0,0)+this.constants_.shapeFor(e).pathDown,this.markerInput_.setAttribute("d",e),this.markerInput_.setAttribute("transform","translate("+i+","+n+")"+(this.workspace_.RTL?" scale(-1 1)":"")),this.currentMarkerSvg=this.markerInput_},t.blockRendering.MarkerSvg.prototype.positionLine_=function(t,e,i){this.markerSvgLine_.setAttribute("x",t),this.markerSvgLine_.setAttribute("y",e),this.markerSvgLine_.setAttribute("width",i),this.currentMarkerSvg=this.markerSvgLine_},t.blockRendering.MarkerSvg.prototype.positionOutput_=function(e,i,n){e=t.utils.svgPaths.moveBy(e,0)+t.utils.svgPaths.lineOnAxis("h",-(e-n.width))+t.utils.svgPaths.lineOnAxis("v",this.constants_.TAB_OFFSET_FROM_TOP)+n.pathDown+t.utils.svgPaths.lineOnAxis("V",i)+t.utils.svgPaths.lineOnAxis("H",e),this.markerBlock_.setAttribute("d",e),this.workspace_.RTL&&this.flipRtl_(this.markerBlock_),this.currentMarkerSvg=this.markerBlock_},t.blockRendering.MarkerSvg.prototype.positionPrevious_=function(e,i,n,o){e=t.utils.svgPaths.moveBy(-i,n)+t.utils.svgPaths.lineOnAxis("V",-i)+t.utils.svgPaths.lineOnAxis("H",this.constants_.NOTCH_OFFSET_LEFT)+o.pathLeft+t.utils.svgPaths.lineOnAxis("H",e+2*i)+t.utils.svgPaths.lineOnAxis("V",n),this.markerBlock_.setAttribute("d",e),this.workspace_.RTL&&this.flipRtl_(this.markerBlock_),this.currentMarkerSvg=this.markerBlock_},t.blockRendering.MarkerSvg.prototype.positionRect_=function(t,e,i,n){this.markerSvgRect_.setAttribute("x",t),this.markerSvgRect_.setAttribute("y",e),this.markerSvgRect_.setAttribute("width",i),this.markerSvgRect_.setAttribute("height",n),this.currentMarkerSvg=this.markerSvgRect_},t.blockRendering.MarkerSvg.prototype.flipRtl_=function(t){t.setAttribute("transform","scale(-1 1)")},t.blockRendering.MarkerSvg.prototype.hide=function(){this.markerSvgLine_.style.display="none",this.markerSvgRect_.style.display="none",this.markerInput_.style.display="none",this.markerBlock_.style.display="none"},t.blockRendering.MarkerSvg.prototype.fireMarkerEvent_=function(e,i){var n=i.getSourceBlock();e=new(t.Events.get(t.Events.MARKER_MOVE))(n,this.isCursor(),e,i),t.Events.fire(e)},t.blockRendering.MarkerSvg.prototype.getBlinkProperties_=function(){return{attributeType:"XML",attributeName:"fill",dur:"1s",values:this.colour_+";transparent;transparent;",repeatCount:"indefinite"}},t.blockRendering.MarkerSvg.prototype.createDomInternal_=function(){if(this.markerSvg_=t.utils.dom.createSvgElement(t.utils.Svg.G,{width:this.constants_.CURSOR_WS_WIDTH,height:this.constants_.WS_CURSOR_HEIGHT},this.svgGroup_),this.markerSvgLine_=t.utils.dom.createSvgElement(t.utils.Svg.RECT,{width:this.constants_.CURSOR_WS_WIDTH,height:this.constants_.WS_CURSOR_HEIGHT,style:"display: none"},this.markerSvg_),this.markerSvgRect_=t.utils.dom.createSvgElement(t.utils.Svg.RECT,{class:"blocklyVerticalMarker",rx:10,ry:10,style:"display: none"},this.markerSvg_),this.markerInput_=t.utils.dom.createSvgElement(t.utils.Svg.PATH,{transform:"",style:"display: none"},this.markerSvg_),this.markerBlock_=t.utils.dom.createSvgElement(t.utils.Svg.PATH,{transform:"",style:"display: none",fill:"none","stroke-width":this.constants_.CURSOR_STROKE_WIDTH},this.markerSvg_),this.isCursor()){var e=this.getBlinkProperties_();t.utils.dom.createSvgElement(t.utils.Svg.ANIMATE,e,this.markerSvgLine_),t.utils.dom.createSvgElement(t.utils.Svg.ANIMATE,e,this.markerInput_),e.attributeName="stroke",t.utils.dom.createSvgElement(t.utils.Svg.ANIMATE,e,this.markerBlock_)}return this.markerSvg_},t.blockRendering.MarkerSvg.prototype.applyColour_=function(t){this.markerSvgLine_.setAttribute("fill",this.colour_),this.markerSvgRect_.setAttribute("stroke",this.colour_),this.markerInput_.setAttribute("fill",this.colour_),this.markerBlock_.setAttribute("stroke",this.colour_),this.isCursor()&&(t=this.colour_+";transparent;transparent;",this.markerSvgLine_.firstChild.setAttribute("values",t),this.markerInput_.firstChild.setAttribute("values",t),this.markerBlock_.firstChild.setAttribute("values",t))},t.blockRendering.MarkerSvg.prototype.dispose=function(){this.svgGroup_&&t.utils.dom.removeNode(this.svgGroup_)},t.blockRendering.PathObject=function(e,i,n){this.constants=n,this.svgRoot=e,this.svgPath=t.utils.dom.createSvgElement(t.utils.Svg.PATH,{class:"blocklyPath"},this.svgRoot),this.style=i,this.markerSvg=this.cursorSvg=null},t.blockRendering.PathObject.prototype.setPath=function(t){this.svgPath.setAttribute("d",t)},t.blockRendering.PathObject.prototype.flipRTL=function(){this.svgPath.setAttribute("transform","scale(-1 1)")},t.blockRendering.PathObject.prototype.setCursorSvg=function(t){t?(this.svgRoot.appendChild(t),this.cursorSvg=t):this.cursorSvg=null},t.blockRendering.PathObject.prototype.setMarkerSvg=function(t){t?(this.cursorSvg?this.svgRoot.insertBefore(t,this.cursorSvg):this.svgRoot.appendChild(t),this.markerSvg=t):this.markerSvg=null},t.blockRendering.PathObject.prototype.applyColour=function(t){this.svgPath.setAttribute("stroke",this.style.colourTertiary),this.svgPath.setAttribute("fill",this.style.colourPrimary),this.updateShadow_(t.isShadow()),this.updateDisabled_(!t.isEnabled()||t.getInheritedDisabled())},t.blockRendering.PathObject.prototype.setStyle=function(t){this.style=t},t.blockRendering.PathObject.prototype.setClass_=function(e,i){i?t.utils.dom.addClass(this.svgRoot,e):t.utils.dom.removeClass(this.svgRoot,e)},t.blockRendering.PathObject.prototype.updateHighlighted=function(t){t?this.svgPath.setAttribute("filter","url(#"+this.constants.embossFilterId+")"):this.svgPath.setAttribute("filter","none")},t.blockRendering.PathObject.prototype.updateShadow_=function(t){t&&(this.svgPath.setAttribute("stroke","none"),this.svgPath.setAttribute("fill",this.style.colourSecondary))},t.blockRendering.PathObject.prototype.updateDisabled_=function(t){this.setClass_("blocklyDisabled",t),t&&this.svgPath.setAttribute("fill","url(#"+this.constants.disabledPatternId+")")},t.blockRendering.PathObject.prototype.updateSelected=function(t){this.setClass_("blocklySelected",t)},t.blockRendering.PathObject.prototype.updateDraggingDelete=function(t){this.setClass_("blocklyDraggingDelete",t)},t.blockRendering.PathObject.prototype.updateInsertionMarker=function(t){this.setClass_("blocklyInsertionMarker",t)},t.blockRendering.PathObject.prototype.updateMovable=function(t){this.setClass_("blocklyDraggable",t)},t.blockRendering.PathObject.prototype.updateReplacementFade=function(t){this.setClass_("blocklyReplaceable",t)},t.blockRendering.PathObject.prototype.updateShapeForInputHighlight=function(t,e){},t.blockRendering.Renderer=function(t){this.name=t,this.overrides=this.constants_=null},t.blockRendering.Renderer.prototype.getClassName=function(){return this.name+"-renderer"},t.blockRendering.Renderer.prototype.init=function(e,i){this.constants_=this.makeConstants_(),i&&(this.overrides=i,t.utils.object.mixin(this.constants_,i)),this.constants_.setTheme(e),this.constants_.init()},t.blockRendering.Renderer.prototype.createDom=function(t,e){this.constants_.createDom(t,this.name+"-"+e.name,"."+this.getClassName()+"."+e.getClassName())},t.blockRendering.Renderer.prototype.refreshDom=function(e,i){var n=this.getConstants();n.dispose(),this.constants_=this.makeConstants_(),this.overrides&&t.utils.object.mixin(this.constants_,this.overrides),this.constants_.randomIdentifier=n.randomIdentifier,this.constants_.setTheme(i),this.constants_.init(),this.createDom(e,i)},t.blockRendering.Renderer.prototype.dispose=function(){this.constants_&&this.constants_.dispose()},t.blockRendering.Renderer.prototype.makeConstants_=function(){return new t.blockRendering.ConstantProvider},t.blockRendering.Renderer.prototype.makeRenderInfo_=function(e){return new t.blockRendering.RenderInfo(this,e)},t.blockRendering.Renderer.prototype.makeDrawer_=function(e,i){return new t.blockRendering.Drawer(e,i)},t.blockRendering.Renderer.prototype.makeDebugger_=function(){if(!t.blockRendering.Debug)throw Error("Missing require for Blockly.blockRendering.Debug");return new t.blockRendering.Debug(this.getConstants())},t.blockRendering.Renderer.prototype.makeMarkerDrawer=function(e,i){return new t.blockRendering.MarkerSvg(e,this.getConstants(),i)},t.blockRendering.Renderer.prototype.makePathObject=function(e,i){return new t.blockRendering.PathObject(e,i,this.constants_)},t.blockRendering.Renderer.prototype.getConstants=function(){return this.constants_},t.blockRendering.Renderer.prototype.shouldHighlightConnection=function(t){return!0},t.blockRendering.Renderer.prototype.orphanCanConnectAtEnd=function(e,i,n){return!!t.Connection.getConnectionForOrphanedConnection(e,n===t.connectionTypes.OUTPUT_VALUE?i.outputConnection:i.previousConnection)},t.blockRendering.Renderer.prototype.getConnectionPreviewMethod=function(e,i,n){return i.type==t.connectionTypes.OUTPUT_VALUE||i.type==t.connectionTypes.PREVIOUS_STATEMENT?!e.isConnected()||this.orphanCanConnectAtEnd(n,e.targetBlock(),i.type)?t.InsertionMarkerManager.PREVIEW_TYPE.INSERTION_MARKER:t.InsertionMarkerManager.PREVIEW_TYPE.REPLACEMENT_FADE:t.InsertionMarkerManager.PREVIEW_TYPE.INSERTION_MARKER},t.blockRendering.Renderer.prototype.render=function(e){t.blockRendering.useDebugger&&!e.renderingDebugger&&(e.renderingDebugger=this.makeDebugger_());var i=this.makeRenderInfo_(e);i.measure(),this.makeDrawer_(e,i).draw()},t.geras={},t.geras.ConstantProvider=function(){t.geras.ConstantProvider.superClass_.constructor.call(this),this.FIELD_TEXT_BASELINE_CENTER=!1,this.DARK_PATH_OFFSET=1,this.MAX_BOTTOM_WIDTH=30,this.STATEMENT_BOTTOM_SPACER=-this.NOTCH_HEIGHT/2},t.utils.object.inherits(t.geras.ConstantProvider,t.blockRendering.ConstantProvider),t.geras.ConstantProvider.prototype.getCSS_=function(e){return t.geras.ConstantProvider.superClass_.getCSS_.call(this,e).concat([e+" .blocklyInsertionMarker>.blocklyPathLight,",e+" .blocklyInsertionMarker>.blocklyPathDark {","fill-opacity: "+this.INSERTION_MARKER_OPACITY+";","stroke: none;","}"])},t.geras.Highlighter=function(t){this.info_=t,this.inlineSteps_=this.steps_="",this.RTL_=this.info_.RTL,t=t.getRenderer(),this.constants_=t.getConstants(),this.highlightConstants_=t.getHighlightConstants(),this.highlightOffset_=this.highlightConstants_.OFFSET,this.outsideCornerPaths_=this.highlightConstants_.OUTSIDE_CORNER,this.insideCornerPaths_=this.highlightConstants_.INSIDE_CORNER,this.puzzleTabPaths_=this.highlightConstants_.PUZZLE_TAB,this.notchPaths_=this.highlightConstants_.NOTCH,this.startPaths_=this.highlightConstants_.START_HAT,this.jaggedTeethPaths_=this.highlightConstants_.JAGGED_TEETH},t.geras.Highlighter.prototype.getPath=function(){return this.steps_+"\n"+this.inlineSteps_},t.geras.Highlighter.prototype.drawTopCorner=function(e){this.steps_+=t.utils.svgPaths.moveBy(e.xPos,this.info_.startY);for(var i,n=0;i=e.elements[n];n++)t.blockRendering.Types.isLeftSquareCorner(i)?this.steps_+=this.highlightConstants_.START_POINT:t.blockRendering.Types.isLeftRoundedCorner(i)?this.steps_+=this.outsideCornerPaths_.topLeft(this.RTL_):t.blockRendering.Types.isPreviousConnection(i)?this.steps_+=this.notchPaths_.pathLeft:t.blockRendering.Types.isHat(i)?this.steps_+=this.startPaths_.path(this.RTL_):t.blockRendering.Types.isSpacer(i)&&0!=i.width&&(this.steps_+=t.utils.svgPaths.lineOnAxis("H",i.xPos+i.width-this.highlightOffset_));this.steps_+=t.utils.svgPaths.lineOnAxis("H",e.xPos+e.width-this.highlightOffset_)},t.geras.Highlighter.prototype.drawJaggedEdge_=function(e){this.info_.RTL&&(this.steps_+=this.jaggedTeethPaths_.pathLeft+t.utils.svgPaths.lineOnAxis("v",e.height-this.jaggedTeethPaths_.height-this.highlightOffset_))},t.geras.Highlighter.prototype.drawValueInput=function(e){var i=e.getLastInput();if(this.RTL_){var n=e.height-i.connectionHeight;this.steps_+=t.utils.svgPaths.moveTo(i.xPos+i.width-this.highlightOffset_,e.yPos)+this.puzzleTabPaths_.pathDown(this.RTL_)+t.utils.svgPaths.lineOnAxis("v",n)}else this.steps_+=t.utils.svgPaths.moveTo(i.xPos+i.width,e.yPos)+this.puzzleTabPaths_.pathDown(this.RTL_)},t.geras.Highlighter.prototype.drawStatementInput=function(e){var i=e.getLastInput();if(this.RTL_){var n=e.height-2*this.insideCornerPaths_.height;this.steps_+=t.utils.svgPaths.moveTo(i.xPos,e.yPos)+this.insideCornerPaths_.pathTop(this.RTL_)+t.utils.svgPaths.lineOnAxis("v",n)+this.insideCornerPaths_.pathBottom(this.RTL_)+t.utils.svgPaths.lineTo(e.width-i.xPos-this.insideCornerPaths_.width,0)}else this.steps_+=t.utils.svgPaths.moveTo(i.xPos,e.yPos+e.height)+this.insideCornerPaths_.pathBottom(this.RTL_)+t.utils.svgPaths.lineTo(e.width-i.xPos-this.insideCornerPaths_.width,0)},t.geras.Highlighter.prototype.drawRightSideRow=function(e){var i=e.xPos+e.width-this.highlightOffset_;e.followsStatement&&(this.steps_+=t.utils.svgPaths.lineOnAxis("H",i)),this.RTL_&&(this.steps_+=t.utils.svgPaths.lineOnAxis("H",i),e.height>this.highlightOffset_&&(this.steps_+=t.utils.svgPaths.lineOnAxis("V",e.yPos+e.height-this.highlightOffset_)))},t.geras.Highlighter.prototype.drawBottomRow=function(e){if(this.RTL_)this.steps_+=t.utils.svgPaths.lineOnAxis("V",e.baseline-this.highlightOffset_);else{var i=this.info_.bottomRow.elements[0];t.blockRendering.Types.isLeftSquareCorner(i)?this.steps_+=t.utils.svgPaths.moveTo(e.xPos+this.highlightOffset_,e.baseline-this.highlightOffset_):t.blockRendering.Types.isLeftRoundedCorner(i)&&(this.steps_+=t.utils.svgPaths.moveTo(e.xPos,e.baseline),this.steps_+=this.outsideCornerPaths_.bottomLeft())}},t.geras.Highlighter.prototype.drawLeft=function(){var e=this.info_.outputConnection;e&&(e=e.connectionOffsetY+e.height,this.RTL_?this.steps_+=t.utils.svgPaths.moveTo(this.info_.startX,e):(this.steps_+=t.utils.svgPaths.moveTo(this.info_.startX+this.highlightOffset_,this.info_.bottomRow.baseline-this.highlightOffset_),this.steps_+=t.utils.svgPaths.lineOnAxis("V",e)),this.steps_+=this.puzzleTabPaths_.pathUp(this.RTL_)),this.RTL_||(e=this.info_.topRow,t.blockRendering.Types.isLeftRoundedCorner(e.elements[0])?this.steps_+=t.utils.svgPaths.lineOnAxis("V",this.outsideCornerPaths_.height):this.steps_+=t.utils.svgPaths.lineOnAxis("V",e.capline+this.highlightOffset_))},t.geras.Highlighter.prototype.drawInlineInput=function(e){var i=this.highlightOffset_,n=e.xPos+e.connectionWidth,o=e.centerline-e.height/2,r=e.width-e.connectionWidth,s=o+i;this.RTL_?(o=e.connectionOffsetY-i,e=e.height-(e.connectionOffsetY+e.connectionHeight)+i,this.inlineSteps_+=t.utils.svgPaths.moveTo(n-i,s)+t.utils.svgPaths.lineOnAxis("v",o)+this.puzzleTabPaths_.pathDown(this.RTL_)+t.utils.svgPaths.lineOnAxis("v",e)+t.utils.svgPaths.lineOnAxis("h",r)):this.inlineSteps_+=t.utils.svgPaths.moveTo(e.xPos+e.width+i,s)+t.utils.svgPaths.lineOnAxis("v",e.height)+t.utils.svgPaths.lineOnAxis("h",-r)+t.utils.svgPaths.moveTo(n,o+e.connectionOffsetY)+this.puzzleTabPaths_.pathDown(this.RTL_)},t.geras.InlineInput=function(e,i){t.geras.InlineInput.superClass_.constructor.call(this,e,i),this.connectedBlock&&(this.width+=this.constants_.DARK_PATH_OFFSET,this.height+=this.constants_.DARK_PATH_OFFSET)},t.utils.object.inherits(t.geras.InlineInput,t.blockRendering.InlineInput),t.geras.StatementInput=function(e,i){t.geras.StatementInput.superClass_.constructor.call(this,e,i),this.connectedBlock&&(this.height+=this.constants_.DARK_PATH_OFFSET)},t.utils.object.inherits(t.geras.StatementInput,t.blockRendering.StatementInput),t.geras.RenderInfo=function(e,i){t.geras.RenderInfo.superClass_.constructor.call(this,e,i)},t.utils.object.inherits(t.geras.RenderInfo,t.blockRendering.RenderInfo),t.geras.RenderInfo.prototype.getRenderer=function(){return this.renderer_},t.geras.RenderInfo.prototype.populateBottomRow_=function(){t.geras.RenderInfo.superClass_.populateBottomRow_.call(this),this.block_.inputList.length&&this.block_.inputList[this.block_.inputList.length-1].type==t.inputTypes.STATEMENT||(this.bottomRow.minHeight=this.constants_.MEDIUM_PADDING-this.constants_.DARK_PATH_OFFSET)},t.geras.RenderInfo.prototype.addInput_=function(e,i){this.isInline&&e.type==t.inputTypes.VALUE?(i.elements.push(new t.geras.InlineInput(this.constants_,e)),i.hasInlineInput=!0):e.type==t.inputTypes.STATEMENT?(i.elements.push(new t.geras.StatementInput(this.constants_,e)),i.hasStatement=!0):e.type==t.inputTypes.VALUE?(i.elements.push(new t.blockRendering.ExternalValueInput(this.constants_,e)),i.hasExternalInput=!0):e.type==t.inputTypes.DUMMY&&(i.minHeight=Math.max(i.minHeight,this.constants_.DUMMY_INPUT_MIN_HEIGHT),i.hasDummyInput=!0),this.isInline||null!=i.align||(i.align=e.align)},t.geras.RenderInfo.prototype.addElemSpacing_=function(){for(var e,i=!1,n=0;e=this.rows[n];n++)e.hasExternalInput&&(i=!0);for(n=0;e=this.rows[n];n++){var o=e.elements;if(e.elements=[],e.startsWithElemSpacer()&&e.elements.push(new t.blockRendering.InRowSpacer(this.constants_,this.getInRowSpacing_(null,o[0]))),o.length){for(var r=0;r<o.length-1;r++){e.elements.push(o[r]);var s=this.getInRowSpacing_(o[r],o[r+1]);e.elements.push(new t.blockRendering.InRowSpacer(this.constants_,s))}e.elements.push(o[o.length-1]),e.endsWithElemSpacer()&&(s=this.getInRowSpacing_(o[o.length-1],null),i&&e.hasDummyInput&&(s+=this.constants_.TAB_WIDTH),e.elements.push(new t.blockRendering.InRowSpacer(this.constants_,s)))}}},t.geras.RenderInfo.prototype.getInRowSpacing_=function(e,i){if(!e)return i&&t.blockRendering.Types.isField(i)&&i.isEditable?this.constants_.MEDIUM_PADDING:i&&t.blockRendering.Types.isInlineInput(i)?this.constants_.MEDIUM_LARGE_PADDING:i&&t.blockRendering.Types.isStatementInput(i)?this.constants_.STATEMENT_INPUT_PADDING_LEFT:this.constants_.LARGE_PADDING;if(!t.blockRendering.Types.isInput(e)&&(!i||t.blockRendering.Types.isStatementInput(i)))return t.blockRendering.Types.isField(e)&&e.isEditable?this.constants_.MEDIUM_PADDING:t.blockRendering.Types.isIcon(e)?2*this.constants_.LARGE_PADDING+1:t.blockRendering.Types.isHat(e)?this.constants_.NO_PADDING:t.blockRendering.Types.isPreviousOrNextConnection(e)?this.constants_.LARGE_PADDING:t.blockRendering.Types.isLeftRoundedCorner(e)?this.constants_.MIN_BLOCK_WIDTH:t.blockRendering.Types.isJaggedEdge(e)?this.constants_.NO_PADDING:this.constants_.LARGE_PADDING;if(t.blockRendering.Types.isInput(e)&&!i){if(t.blockRendering.Types.isExternalInput(e))return this.constants_.NO_PADDING;if(t.blockRendering.Types.isInlineInput(e))return this.constants_.LARGE_PADDING;if(t.blockRendering.Types.isStatementInput(e))return this.constants_.NO_PADDING}if(!t.blockRendering.Types.isInput(e)&&i&&t.blockRendering.Types.isInput(i)){if(t.blockRendering.Types.isField(e)&&e.isEditable){if(t.blockRendering.Types.isInlineInput(i)||t.blockRendering.Types.isExternalInput(i))return this.constants_.SMALL_PADDING}else{if(t.blockRendering.Types.isInlineInput(i)||t.blockRendering.Types.isExternalInput(i))return this.constants_.MEDIUM_LARGE_PADDING;if(t.blockRendering.Types.isStatementInput(i))return this.constants_.LARGE_PADDING}return this.constants_.LARGE_PADDING-1}if(t.blockRendering.Types.isIcon(e)&&i&&!t.blockRendering.Types.isInput(i))return this.constants_.LARGE_PADDING;if(t.blockRendering.Types.isInlineInput(e)&&i&&t.blockRendering.Types.isField(i))return i.isEditable?this.constants_.MEDIUM_PADDING:this.constants_.LARGE_PADDING;if(t.blockRendering.Types.isLeftSquareCorner(e)&&i){if(t.blockRendering.Types.isHat(i))return this.constants_.NO_PADDING;if(t.blockRendering.Types.isPreviousConnection(i))return i.notchOffset;if(t.blockRendering.Types.isNextConnection(i))return e=(this.RTL?1:-1)*this.constants_.DARK_PATH_OFFSET/2,i.notchOffset+e}if(t.blockRendering.Types.isLeftRoundedCorner(e)&&i){if(t.blockRendering.Types.isPreviousConnection(i))return i.notchOffset-this.constants_.CORNER_RADIUS;if(t.blockRendering.Types.isNextConnection(i))return e=(this.RTL?1:-1)*this.constants_.DARK_PATH_OFFSET/2,i.notchOffset-this.constants_.CORNER_RADIUS+e}return t.blockRendering.Types.isField(e)&&i&&t.blockRendering.Types.isField(i)&&e.isEditable==i.isEditable||i&&t.blockRendering.Types.isJaggedEdge(i)?this.constants_.LARGE_PADDING:this.constants_.MEDIUM_PADDING},t.geras.RenderInfo.prototype.getSpacerRowHeight_=function(e,i){return t.blockRendering.Types.isTopRow(e)&&t.blockRendering.Types.isBottomRow(i)?this.constants_.EMPTY_BLOCK_SPACER_HEIGHT:t.blockRendering.Types.isTopRow(e)||t.blockRendering.Types.isBottomRow(i)?this.constants_.NO_PADDING:e.hasExternalInput&&i.hasExternalInput?this.constants_.LARGE_PADDING:!e.hasStatement&&i.hasStatement?this.constants_.BETWEEN_STATEMENT_PADDING_Y:e.hasStatement&&i.hasStatement||!e.hasStatement&&i.hasDummyInput||e.hasDummyInput?this.constants_.LARGE_PADDING:this.constants_.MEDIUM_PADDING},t.geras.RenderInfo.prototype.getElemCenterline_=function(e,i){if(t.blockRendering.Types.isSpacer(i))return e.yPos+i.height/2;if(t.blockRendering.Types.isBottomRow(e))return e=e.yPos+e.height-e.descenderHeight,t.blockRendering.Types.isNextConnection(i)?e+i.height/2:e-i.height/2;if(t.blockRendering.Types.isTopRow(e))return t.blockRendering.Types.isHat(i)?e.capline-i.height/2:e.capline+i.height/2;var n=e.yPos;return t.blockRendering.Types.isField(i)||t.blockRendering.Types.isIcon(i)?(n+=i.height/2,(e.hasInlineInput||e.hasStatement)&&i.height+this.constants_.TALL_INPUT_FIELD_OFFSET_Y<=e.height&&(n+=this.constants_.TALL_INPUT_FIELD_OFFSET_Y)):n=t.blockRendering.Types.isInlineInput(i)?n+i.height/2:n+e.height/2,n},t.geras.RenderInfo.prototype.alignRowElements_=function(){if(this.isInline){for(var e,i=0,n=null,o=this.rows.length-1;e=this.rows[o];o--)e.nextRightEdge=i,t.blockRendering.Types.isInputRow(e)&&(e.hasStatement&&this.alignStatementRow_(e),n&&n.hasStatement&&e.width<n.width?e.nextRightEdge=n.width:i=e.width,n=e);for(o=i=0;e=this.rows[o];o++)e.hasStatement?i=this.getDesiredRowWidth_(e):t.blockRendering.Types.isSpacer(e)?e.width=Math.max(i,e.nextRightEdge):(0<(i=Math.max(i,e.nextRightEdge)-e.width)&&this.addAlignmentPadding_(e,i),i=e.width)}else t.geras.RenderInfo.superClass_.alignRowElements_.call(this)},t.geras.RenderInfo.prototype.getDesiredRowWidth_=function(e){return this.isInline&&e.hasStatement?this.statementEdge+this.constants_.MAX_BOTTOM_WIDTH+this.startX:t.geras.RenderInfo.superClass_.getDesiredRowWidth_.call(this,e)},t.geras.RenderInfo.prototype.finalize_=function(){for(var t,e=0,i=0,n=0;t=this.rows[n];n++){t.yPos=i,t.xPos=this.startX,i+=t.height,e=Math.max(e,t.widthWithConnectedBlocks);var o=i-this.topRow.ascenderHeight;t==this.bottomRow&&o<this.constants_.MIN_BLOCK_HEIGHT&&(o=this.constants_.MIN_BLOCK_HEIGHT-o,this.bottomRow.height+=o,i+=o),this.recordElemPositions_(t)}this.outputConnection&&this.block_.nextConnection&&this.block_.nextConnection.isConnected()&&(e=Math.max(e,this.block_.nextConnection.targetBlock().getHeightWidth().width-this.constants_.DARK_PATH_OFFSET)),this.bottomRow.baseline=i-this.bottomRow.descenderHeight,this.widthWithChildren=e+this.startX+this.constants_.DARK_PATH_OFFSET,this.width+=this.constants_.DARK_PATH_OFFSET,this.height=i+this.constants_.DARK_PATH_OFFSET,this.startY=this.topRow.capline},t.geras.Drawer=function(e,i){t.geras.Drawer.superClass_.constructor.call(this,e,i),this.highlighter_=new t.geras.Highlighter(i)},t.utils.object.inherits(t.geras.Drawer,t.blockRendering.Drawer),t.geras.Drawer.prototype.draw=function(){this.hideHiddenIcons_(),this.drawOutline_(),this.drawInternals_();var e=this.block_.pathObject;e.setPath(this.outlinePath_+"\n"+this.inlinePath_),e.setHighlightPath(this.highlighter_.getPath()),this.info_.RTL&&e.flipRTL(),t.blockRendering.useDebugger&&this.block_.renderingDebugger.drawDebug(this.block_,this.info_),this.recordSizeOnBlock_()},t.geras.Drawer.prototype.drawTop_=function(){this.highlighter_.drawTopCorner(this.info_.topRow),this.highlighter_.drawRightSideRow(this.info_.topRow),t.geras.Drawer.superClass_.drawTop_.call(this)},t.geras.Drawer.prototype.drawJaggedEdge_=function(e){this.highlighter_.drawJaggedEdge_(e),t.geras.Drawer.superClass_.drawJaggedEdge_.call(this,e)},t.geras.Drawer.prototype.drawValueInput_=function(e){this.highlighter_.drawValueInput(e),t.geras.Drawer.superClass_.drawValueInput_.call(this,e)},t.geras.Drawer.prototype.drawStatementInput_=function(e){this.highlighter_.drawStatementInput(e),t.geras.Drawer.superClass_.drawStatementInput_.call(this,e)},t.geras.Drawer.prototype.drawRightSideRow_=function(e){this.highlighter_.drawRightSideRow(e),this.outlinePath_+=t.utils.svgPaths.lineOnAxis("H",e.xPos+e.width)+t.utils.svgPaths.lineOnAxis("V",e.yPos+e.height)},t.geras.Drawer.prototype.drawBottom_=function(){this.highlighter_.drawBottomRow(this.info_.bottomRow),t.geras.Drawer.superClass_.drawBottom_.call(this)},t.geras.Drawer.prototype.drawLeft_=function(){this.highlighter_.drawLeft(),t.geras.Drawer.superClass_.drawLeft_.call(this)},t.geras.Drawer.prototype.drawInlineInput_=function(e){this.highlighter_.drawInlineInput(e),t.geras.Drawer.superClass_.drawInlineInput_.call(this,e)},t.geras.Drawer.prototype.positionInlineInputConnection_=function(t){var e=t.centerline-t.height/2;if(t.connectionModel){var i=t.xPos+t.connectionWidth+this.constants_.DARK_PATH_OFFSET;this.info_.RTL&&(i*=-1),t.connectionModel.setOffsetInBlock(i,e+t.connectionOffsetY+this.constants_.DARK_PATH_OFFSET)}},t.geras.Drawer.prototype.positionStatementInputConnection_=function(t){var e=t.getLastInput();if(e.connectionModel){var i=t.xPos+t.statementEdge+e.notchOffset;i=this.info_.RTL?-1*i:i+this.constants_.DARK_PATH_OFFSET,e.connectionModel.setOffsetInBlock(i,t.yPos+this.constants_.DARK_PATH_OFFSET)}},t.geras.Drawer.prototype.positionExternalValueConnection_=function(t){var e=t.getLastInput();if(e.connectionModel){var i=t.xPos+t.width+this.constants_.DARK_PATH_OFFSET;this.info_.RTL&&(i*=-1),e.connectionModel.setOffsetInBlock(i,t.yPos)}},t.geras.Drawer.prototype.positionNextConnection_=function(){var t=this.info_.bottomRow;if(t.connection){var e=t.connection,i=e.xPos;e.connectionModel.setOffsetInBlock((this.info_.RTL?-i:i)+this.constants_.DARK_PATH_OFFSET/2,t.baseline+this.constants_.DARK_PATH_OFFSET)}},t.geras.HighlightConstantProvider=function(e){this.constantProvider=e,this.OFFSET=.5,this.START_POINT=t.utils.svgPaths.moveBy(this.OFFSET,this.OFFSET)},t.geras.HighlightConstantProvider.prototype.init=function(){this.INSIDE_CORNER=this.makeInsideCorner(),this.OUTSIDE_CORNER=this.makeOutsideCorner(),this.PUZZLE_TAB=this.makePuzzleTab(),this.NOTCH=this.makeNotch(),this.JAGGED_TEETH=this.makeJaggedTeeth(),this.START_HAT=this.makeStartHat()},t.geras.HighlightConstantProvider.prototype.makeInsideCorner=function(){var e=this.constantProvider.CORNER_RADIUS,i=this.OFFSET,n=(1-Math.SQRT1_2)*(e+i)-i,o=t.utils.svgPaths.moveBy(n,n)+t.utils.svgPaths.arc("a","0 0,0",e,t.utils.svgPaths.point(-n-i,e-n)),r=t.utils.svgPaths.arc("a","0 0,0",e+i,t.utils.svgPaths.point(e+i,e+i)),s=t.utils.svgPaths.moveBy(n,-n)+t.utils.svgPaths.arc("a","0 0,0",e+i,t.utils.svgPaths.point(e-n,n+i));return{width:e+i,height:e,pathTop:function(t){return t?o:""},pathBottom:function(t){return t?r:s}}},t.geras.HighlightConstantProvider.prototype.makeOutsideCorner=function(){var e=this.constantProvider.CORNER_RADIUS,i=this.OFFSET,n=(1-Math.SQRT1_2)*(e-i)+i,o=t.utils.svgPaths.moveBy(n,n)+t.utils.svgPaths.arc("a","0 0,1",e-i,t.utils.svgPaths.point(e-n,-n+i)),r=t.utils.svgPaths.moveBy(i,e)+t.utils.svgPaths.arc("a","0 0,1",e-i,t.utils.svgPaths.point(e,-e+i)),s=-n,a=t.utils.svgPaths.moveBy(n,s)+t.utils.svgPaths.arc("a","0 0,1",e-i,t.utils.svgPaths.point(-n+i,-s-e));return{height:e,topLeft:function(t){return t?o:r},bottomLeft:function(){return a}}},t.geras.HighlightConstantProvider.prototype.makePuzzleTab=function(){var e=this.constantProvider.TAB_WIDTH,i=this.constantProvider.TAB_HEIGHT,n=t.utils.svgPaths.moveBy(-2,3.4-i)+t.utils.svgPaths.lineTo(-.45*e,-2.1),o=t.utils.svgPaths.lineOnAxis("v",2.5)+t.utils.svgPaths.moveBy(.97*-e,2.5)+t.utils.svgPaths.curve("q",[t.utils.svgPaths.point(.05*-e,10),t.utils.svgPaths.point(.3*e,9.5)])+t.utils.svgPaths.moveBy(.67*e,-1.9)+t.utils.svgPaths.lineOnAxis("v",2.5),r=t.utils.svgPaths.lineOnAxis("v",-1.5)+t.utils.svgPaths.moveBy(-.92*e,-.5)+t.utils.svgPaths.curve("q",[t.utils.svgPaths.point(-.19*e,-5.5),t.utils.svgPaths.point(0,-11)])+t.utils.svgPaths.moveBy(.92*e,1),s=t.utils.svgPaths.moveBy(-5,i-.7)+t.utils.svgPaths.lineTo(.46*e,-2.1);return{width:e,height:i,pathUp:function(t){return t?n:r},pathDown:function(t){return t?o:s}}},t.geras.HighlightConstantProvider.prototype.makeNotch=function(){return{pathLeft:t.utils.svgPaths.lineOnAxis("h",this.OFFSET)+this.constantProvider.NOTCH.pathLeft}},t.geras.HighlightConstantProvider.prototype.makeJaggedTeeth=function(){return{pathLeft:t.utils.svgPaths.lineTo(5.1,2.6)+t.utils.svgPaths.moveBy(-10.2,6.8)+t.utils.svgPaths.lineTo(5.1,2.6),height:12,width:10.2}},t.geras.HighlightConstantProvider.prototype.makeStartHat=function(){var e=this.constantProvider.START_HAT.height,i=t.utils.svgPaths.moveBy(25,-8.7)+t.utils.svgPaths.curve("c",[t.utils.svgPaths.point(29.7,-6.2),t.utils.svgPaths.point(57.2,-.5),t.utils.svgPaths.point(75,8.7)]),n=t.utils.svgPaths.curve("c",[t.utils.svgPaths.point(17.8,-9.2),t.utils.svgPaths.point(45.3,-14.9),t.utils.svgPaths.point(75,-8.7)])+t.utils.svgPaths.moveTo(100.5,e+.5);return{path:function(t){return t?i:n}}},t.geras.PathObject=function(e,i,n){this.constants=n,this.svgRoot=e,this.svgPathDark=t.utils.dom.createSvgElement(t.utils.Svg.PATH,{class:"blocklyPathDark",transform:"translate(1,1)"},this.svgRoot),this.svgPath=t.utils.dom.createSvgElement(t.utils.Svg.PATH,{class:"blocklyPath"},this.svgRoot),this.svgPathLight=t.utils.dom.createSvgElement(t.utils.Svg.PATH,{class:"blocklyPathLight"},this.svgRoot),this.colourDark="#000000",this.style=i},t.utils.object.inherits(t.geras.PathObject,t.blockRendering.PathObject),t.geras.PathObject.prototype.setPath=function(t){this.svgPath.setAttribute("d",t),this.svgPathDark.setAttribute("d",t)},t.geras.PathObject.prototype.setHighlightPath=function(t){this.svgPathLight.setAttribute("d",t)},t.geras.PathObject.prototype.flipRTL=function(){this.svgPath.setAttribute("transform","scale(-1 1)"),this.svgPathLight.setAttribute("transform","scale(-1 1)"),this.svgPathDark.setAttribute("transform","translate(1,1) scale(-1 1)")},t.geras.PathObject.prototype.applyColour=function(e){this.svgPathLight.style.display="",this.svgPathDark.style.display="",this.svgPathLight.setAttribute("stroke",this.style.colourTertiary),this.svgPathDark.setAttribute("fill",this.colourDark),t.geras.PathObject.superClass_.applyColour.call(this,e),this.svgPath.setAttribute("stroke","none")},t.geras.PathObject.prototype.setStyle=function(e){this.style=e,this.colourDark=t.utils.colour.blend("#000",this.style.colourPrimary,.2)||this.colourDark},t.geras.PathObject.prototype.updateHighlighted=function(t){t?(this.svgPath.setAttribute("filter","url(#"+this.constants.embossFilterId+")"),this.svgPathLight.style.display="none"):(this.svgPath.setAttribute("filter","none"),this.svgPathLight.style.display="inline")},t.geras.PathObject.prototype.updateShadow_=function(t){t&&(this.svgPathLight.style.display="none",this.svgPathDark.setAttribute("fill",this.style.colourSecondary),this.svgPath.setAttribute("stroke","none"),this.svgPath.setAttribute("fill",this.style.colourSecondary))},t.geras.PathObject.prototype.updateDisabled_=function(e){t.geras.PathObject.superClass_.updateDisabled_.call(this,e),e&&this.svgPath.setAttribute("stroke","none")},t.geras.Renderer=function(e){t.geras.Renderer.superClass_.constructor.call(this,e),this.highlightConstants_=null},t.utils.object.inherits(t.geras.Renderer,t.blockRendering.Renderer),t.geras.Renderer.prototype.init=function(e,i){t.geras.Renderer.superClass_.init.call(this,e,i),this.highlightConstants_=this.makeHighlightConstants_(),this.highlightConstants_.init()},t.geras.Renderer.prototype.refreshDom=function(e,i){t.geras.Renderer.superClass_.refreshDom.call(this,e,i),this.getHighlightConstants().init()},t.geras.Renderer.prototype.makeConstants_=function(){return new t.geras.ConstantProvider},t.geras.Renderer.prototype.makeRenderInfo_=function(e){return new t.geras.RenderInfo(this,e)},t.geras.Renderer.prototype.makeDrawer_=function(e,i){return new t.geras.Drawer(e,i)},t.geras.Renderer.prototype.makePathObject=function(e,i){return new t.geras.PathObject(e,i,this.getConstants())},t.geras.Renderer.prototype.makeHighlightConstants_=function(){return new t.geras.HighlightConstantProvider(this.getConstants())},t.geras.Renderer.prototype.getHighlightConstants=function(){return this.highlightConstants_},t.blockRendering.register("geras",t.geras.Renderer),t.thrasos={},t.thrasos.RenderInfo=function(e,i){t.thrasos.RenderInfo.superClass_.constructor.call(this,e,i)},t.utils.object.inherits(t.thrasos.RenderInfo,t.blockRendering.RenderInfo),t.thrasos.RenderInfo.prototype.getRenderer=function(){return this.renderer_},t.thrasos.RenderInfo.prototype.addElemSpacing_=function(){for(var e,i=!1,n=0;e=this.rows[n];n++)e.hasExternalInput&&(i=!0);for(n=0;e=this.rows[n];n++){var o=e.elements;e.elements=[],e.startsWithElemSpacer()&&e.elements.push(new t.blockRendering.InRowSpacer(this.constants_,this.getInRowSpacing_(null,o[0])));for(var r=0;r<o.length-1;r++){e.elements.push(o[r]);var s=this.getInRowSpacing_(o[r],o[r+1]);e.elements.push(new t.blockRendering.InRowSpacer(this.constants_,s))}e.elements.push(o[o.length-1]),e.endsWithElemSpacer()&&(s=this.getInRowSpacing_(o[o.length-1],null),i&&e.hasDummyInput&&(s+=this.constants_.TAB_WIDTH),e.elements.push(new t.blockRendering.InRowSpacer(this.constants_,s)))}},t.thrasos.RenderInfo.prototype.getInRowSpacing_=function(e,i){if(!e)return i&&t.blockRendering.Types.isField(i)&&i.isEditable?this.constants_.MEDIUM_PADDING:i&&t.blockRendering.Types.isInlineInput(i)?this.constants_.MEDIUM_LARGE_PADDING:i&&t.blockRendering.Types.isStatementInput(i)?this.constants_.STATEMENT_INPUT_PADDING_LEFT:this.constants_.LARGE_PADDING;if(!t.blockRendering.Types.isInput(e)&&!i)return t.blockRendering.Types.isField(e)&&e.isEditable?this.constants_.MEDIUM_PADDING:t.blockRendering.Types.isIcon(e)?2*this.constants_.LARGE_PADDING+1:t.blockRendering.Types.isHat(e)?this.constants_.NO_PADDING:t.blockRendering.Types.isPreviousOrNextConnection(e)?this.constants_.LARGE_PADDING:t.blockRendering.Types.isLeftRoundedCorner(e)?this.constants_.MIN_BLOCK_WIDTH:t.blockRendering.Types.isJaggedEdge(e)?this.constants_.NO_PADDING:this.constants_.LARGE_PADDING;if(t.blockRendering.Types.isInput(e)&&!i){if(t.blockRendering.Types.isExternalInput(e))return this.constants_.NO_PADDING;if(t.blockRendering.Types.isInlineInput(e))return this.constants_.LARGE_PADDING;if(t.blockRendering.Types.isStatementInput(e))return this.constants_.NO_PADDING}if(!t.blockRendering.Types.isInput(e)&&i&&t.blockRendering.Types.isInput(i)){if(t.blockRendering.Types.isField(e)&&e.isEditable){if(t.blockRendering.Types.isInlineInput(i)||t.blockRendering.Types.isExternalInput(i))return this.constants_.SMALL_PADDING}else{if(t.blockRendering.Types.isInlineInput(i)||t.blockRendering.Types.isExternalInput(i))return this.constants_.MEDIUM_LARGE_PADDING;if(t.blockRendering.Types.isStatementInput(i))return this.constants_.LARGE_PADDING}return this.constants_.LARGE_PADDING-1}if(t.blockRendering.Types.isIcon(e)&&i&&!t.blockRendering.Types.isInput(i))return this.constants_.LARGE_PADDING;if(t.blockRendering.Types.isInlineInput(e)&&i&&t.blockRendering.Types.isField(i))return i.isEditable?this.constants_.MEDIUM_PADDING:this.constants_.LARGE_PADDING;if(t.blockRendering.Types.isLeftSquareCorner(e)&&i){if(t.blockRendering.Types.isHat(i))return this.constants_.NO_PADDING;if(t.blockRendering.Types.isPreviousConnection(i)||t.blockRendering.Types.isNextConnection(i))return i.notchOffset}return t.blockRendering.Types.isLeftRoundedCorner(e)&&i?i.notchOffset-this.constants_.CORNER_RADIUS:t.blockRendering.Types.isField(e)&&i&&t.blockRendering.Types.isField(i)&&e.isEditable==i.isEditable||i&&t.blockRendering.Types.isJaggedEdge(i)?this.constants_.LARGE_PADDING:this.constants_.MEDIUM_PADDING},t.thrasos.RenderInfo.prototype.getSpacerRowHeight_=function(e,i){return t.blockRendering.Types.isTopRow(e)&&t.blockRendering.Types.isBottomRow(i)?this.constants_.EMPTY_BLOCK_SPACER_HEIGHT:t.blockRendering.Types.isTopRow(e)||t.blockRendering.Types.isBottomRow(i)?this.constants_.NO_PADDING:e.hasExternalInput&&i.hasExternalInput?this.constants_.LARGE_PADDING:!e.hasStatement&&i.hasStatement?this.constants_.BETWEEN_STATEMENT_PADDING_Y:e.hasStatement&&i.hasStatement||e.hasDummyInput||i.hasDummyInput?this.constants_.LARGE_PADDING:this.constants_.MEDIUM_PADDING},t.thrasos.RenderInfo.prototype.getElemCenterline_=function(e,i){if(t.blockRendering.Types.isSpacer(i))return e.yPos+i.height/2;if(t.blockRendering.Types.isBottomRow(e))return e=e.yPos+e.height-e.descenderHeight,t.blockRendering.Types.isNextConnection(i)?e+i.height/2:e-i.height/2;if(t.blockRendering.Types.isTopRow(e))return t.blockRendering.Types.isHat(i)?e.capline-i.height/2:e.capline+i.height/2;var n=e.yPos;return t.blockRendering.Types.isField(i)&&e.hasStatement?n+(this.constants_.TALL_INPUT_FIELD_OFFSET_Y+i.height/2):n+e.height/2},t.thrasos.RenderInfo.prototype.finalize_=function(){for(var t,e=0,i=0,n=0;t=this.rows[n];n++){t.yPos=i,t.xPos=this.startX,i+=t.height,e=Math.max(e,t.widthWithConnectedBlocks);var o=i-this.topRow.ascenderHeight;t==this.bottomRow&&o<this.constants_.MIN_BLOCK_HEIGHT&&(o=this.constants_.MIN_BLOCK_HEIGHT-o,this.bottomRow.height+=o,i+=o),this.recordElemPositions_(t)}this.outputConnection&&this.block_.nextConnection&&this.block_.nextConnection.isConnected()&&(e=Math.max(e,this.block_.nextConnection.targetBlock().getHeightWidth().width)),this.bottomRow.baseline=i-this.bottomRow.descenderHeight,this.widthWithChildren=e+this.startX,this.height=i,this.startY=this.topRow.capline},t.thrasos.Renderer=function(e){t.thrasos.Renderer.superClass_.constructor.call(this,e)},t.utils.object.inherits(t.thrasos.Renderer,t.blockRendering.Renderer),t.thrasos.Renderer.prototype.makeRenderInfo_=function(e){return new t.thrasos.RenderInfo(this,e)},t.blockRendering.register("thrasos",t.thrasos.Renderer),t.zelos={},t.zelos.ConstantProvider=function(){t.zelos.ConstantProvider.superClass_.constructor.call(this),this.SMALL_PADDING=this.GRID_UNIT=4,this.MEDIUM_PADDING=2*this.GRID_UNIT,this.MEDIUM_LARGE_PADDING=3*this.GRID_UNIT,this.LARGE_PADDING=4*this.GRID_UNIT,this.CORNER_RADIUS=1*this.GRID_UNIT,this.NOTCH_WIDTH=9*this.GRID_UNIT,this.NOTCH_HEIGHT=2*this.GRID_UNIT,this.STATEMENT_INPUT_NOTCH_OFFSET=this.NOTCH_OFFSET_LEFT=3*this.GRID_UNIT,this.MIN_BLOCK_WIDTH=2*this.GRID_UNIT,this.MIN_BLOCK_HEIGHT=12*this.GRID_UNIT,this.EMPTY_STATEMENT_INPUT_HEIGHT=6*this.GRID_UNIT,this.TAB_OFFSET_FROM_TOP=0,this.TOP_ROW_MIN_HEIGHT=this.CORNER_RADIUS,this.TOP_ROW_PRECEDES_STATEMENT_MIN_HEIGHT=this.LARGE_PADDING,this.BOTTOM_ROW_MIN_HEIGHT=this.CORNER_RADIUS,this.BOTTOM_ROW_AFTER_STATEMENT_MIN_HEIGHT=6*this.GRID_UNIT,this.STATEMENT_BOTTOM_SPACER=-this.NOTCH_HEIGHT,this.STATEMENT_INPUT_SPACER_MIN_WIDTH=40*this.GRID_UNIT,this.STATEMENT_INPUT_PADDING_LEFT=4*this.GRID_UNIT,this.EMPTY_INLINE_INPUT_PADDING=4*this.GRID_UNIT,this.EMPTY_INLINE_INPUT_HEIGHT=8*this.GRID_UNIT,this.DUMMY_INPUT_MIN_HEIGHT=8*this.GRID_UNIT,this.DUMMY_INPUT_SHADOW_MIN_HEIGHT=6*this.GRID_UNIT,this.CURSOR_WS_WIDTH=20*this.GRID_UNIT,this.CURSOR_COLOUR="#ffa200",this.CURSOR_RADIUS=5,this.JAGGED_TEETH_WIDTH=this.JAGGED_TEETH_HEIGHT=0,this.START_HAT_HEIGHT=22,this.START_HAT_WIDTH=96,this.SHAPES={HEXAGONAL:1,ROUND:2,SQUARE:3,PUZZLE:4,NOTCH:5},this.SHAPE_IN_SHAPE_PADDING={1:{0:5*this.GRID_UNIT,1:2*this.GRID_UNIT,2:5*this.GRID_UNIT,3:5*this.GRID_UNIT},2:{0:3*this.GRID_UNIT,1:3*this.GRID_UNIT,2:1*this.GRID_UNIT,3:2*this.GRID_UNIT},3:{0:2*this.GRID_UNIT,1:2*this.GRID_UNIT,2:2*this.GRID_UNIT,3:2*this.GRID_UNIT}},this.FULL_BLOCK_FIELDS=!0,this.FIELD_TEXT_FONTSIZE=3*this.GRID_UNIT,this.FIELD_TEXT_FONTWEIGHT="bold",this.FIELD_TEXT_FONTFAMILY='"Helvetica Neue", "Segoe UI", Helvetica, sans-serif',this.FIELD_BORDER_RECT_RADIUS=this.CORNER_RADIUS,this.FIELD_BORDER_RECT_X_PADDING=2*this.GRID_UNIT,this.FIELD_BORDER_RECT_Y_PADDING=1.625*this.GRID_UNIT,this.FIELD_BORDER_RECT_HEIGHT=8*this.GRID_UNIT,this.FIELD_DROPDOWN_BORDER_RECT_HEIGHT=8*this.GRID_UNIT,this.FIELD_DROPDOWN_SVG_ARROW=this.FIELD_DROPDOWN_COLOURED_DIV=this.FIELD_DROPDOWN_NO_BORDER_RECT_SHADOW=!0,this.FIELD_DROPDOWN_SVG_ARROW_PADDING=this.FIELD_BORDER_RECT_X_PADDING,this.FIELD_COLOUR_FULL_BLOCK=this.FIELD_TEXTINPUT_BOX_SHADOW=!0,this.FIELD_COLOUR_DEFAULT_WIDTH=2*this.GRID_UNIT,this.FIELD_COLOUR_DEFAULT_HEIGHT=4*this.GRID_UNIT,this.FIELD_CHECKBOX_X_OFFSET=1*this.GRID_UNIT,this.MAX_DYNAMIC_CONNECTION_SHAPE_WIDTH=12*this.GRID_UNIT,this.SELECTED_GLOW_COLOUR="#fff200",this.SELECTED_GLOW_SIZE=.5,this.REPLACEMENT_GLOW_COLOUR="#fff200",this.REPLACEMENT_GLOW_SIZE=2,this.selectedGlowFilterId="",this.selectedGlowFilter_=null,this.replacementGlowFilterId="",this.replacementGlowFilter_=null},t.utils.object.inherits(t.zelos.ConstantProvider,t.blockRendering.ConstantProvider),t.zelos.ConstantProvider.prototype.setFontConstants_=function(e){t.zelos.ConstantProvider.superClass_.setFontConstants_.call(this,e),this.FIELD_DROPDOWN_BORDER_RECT_HEIGHT=this.FIELD_BORDER_RECT_HEIGHT=this.FIELD_TEXT_HEIGHT+2*this.FIELD_BORDER_RECT_Y_PADDING},t.zelos.ConstantProvider.prototype.init=function(){t.zelos.ConstantProvider.superClass_.init.call(this),this.HEXAGONAL=this.makeHexagonal(),this.ROUNDED=this.makeRounded(),this.SQUARED=this.makeSquared(),this.STATEMENT_INPUT_NOTCH_OFFSET=this.NOTCH_OFFSET_LEFT+this.INSIDE_CORNERS.rightWidth},t.zelos.ConstantProvider.prototype.setDynamicProperties_=function(e){t.zelos.ConstantProvider.superClass_.setDynamicProperties_.call(this,e),this.SELECTED_GLOW_COLOUR=e.getComponentStyle("selectedGlowColour")||this.SELECTED_GLOW_COLOUR;var i=Number(e.getComponentStyle("selectedGlowSize"));this.SELECTED_GLOW_SIZE=i&&!isNaN(i)?i:this.SELECTED_GLOW_SIZE,this.REPLACEMENT_GLOW_COLOUR=e.getComponentStyle("replacementGlowColour")||this.REPLACEMENT_GLOW_COLOUR,this.REPLACEMENT_GLOW_SIZE=(e=Number(e.getComponentStyle("replacementGlowSize")))&&!isNaN(e)?e:this.REPLACEMENT_GLOW_SIZE},t.zelos.ConstantProvider.prototype.dispose=function(){t.zelos.ConstantProvider.superClass_.dispose.call(this),this.selectedGlowFilter_&&t.utils.dom.removeNode(this.selectedGlowFilter_),this.replacementGlowFilter_&&t.utils.dom.removeNode(this.replacementGlowFilter_)},t.zelos.ConstantProvider.prototype.makeStartHat=function(){var e=this.START_HAT_HEIGHT,i=this.START_HAT_WIDTH;return{height:e,width:i,path:t.utils.svgPaths.curve("c",[t.utils.svgPaths.point(25,-e),t.utils.svgPaths.point(71,-e),t.utils.svgPaths.point(i,0)])}},t.zelos.ConstantProvider.prototype.makeHexagonal=function(){function e(e,n,o){var r=e/2;return r=r>i?i:r,o=o?-1:1,e=(n?-1:1)*e/2,t.utils.svgPaths.lineTo(-o*r,e)+t.utils.svgPaths.lineTo(o*r,e)}var i=this.MAX_DYNAMIC_CONNECTION_SHAPE_WIDTH;return{type:this.SHAPES.HEXAGONAL,isDynamic:!0,width:function(t){return(t/=2)>i?i:t},height:function(t){return t},connectionOffsetY:function(t){return t/2},connectionOffsetX:function(t){return-t},pathDown:function(t){return e(t,!1,!1)},pathUp:function(t){return e(t,!0,!1)},pathRightDown:function(t){return e(t,!1,!0)},pathRightUp:function(t){return e(t,!1,!0)}}},t.zelos.ConstantProvider.prototype.makeRounded=function(){function e(e,i,o){var r=e>n?e-n:0;return e=(e>n?n:e)/2,t.utils.svgPaths.arc("a","0 0,1",e,t.utils.svgPaths.point((i?-1:1)*e,(i?-1:1)*e))+t.utils.svgPaths.lineOnAxis("v",(o?1:-1)*r)+t.utils.svgPaths.arc("a","0 0,1",e,t.utils.svgPaths.point((i?1:-1)*e,(i?-1:1)*e))}var i=this.MAX_DYNAMIC_CONNECTION_SHAPE_WIDTH,n=2*i;return{type:this.SHAPES.ROUND,isDynamic:!0,width:function(t){return(t/=2)>i?i:t},height:function(t){return t},connectionOffsetY:function(t){return t/2},connectionOffsetX:function(t){return-t},pathDown:function(t){return e(t,!1,!1)},pathUp:function(t){return e(t,!0,!1)},pathRightDown:function(t){return e(t,!1,!0)},pathRightUp:function(t){return e(t,!1,!0)}}},t.zelos.ConstantProvider.prototype.makeSquared=function(){function e(e,n,o){return e-=2*i,t.utils.svgPaths.arc("a","0 0,1",i,t.utils.svgPaths.point((n?-1:1)*i,(n?-1:1)*i))+t.utils.svgPaths.lineOnAxis("v",(o?1:-1)*e)+t.utils.svgPaths.arc("a","0 0,1",i,t.utils.svgPaths.point((n?1:-1)*i,(n?-1:1)*i))}var i=this.CORNER_RADIUS;return{type:this.SHAPES.SQUARE,isDynamic:!0,width:function(t){return i},height:function(t){return t},connectionOffsetY:function(t){return t/2},connectionOffsetX:function(t){return-t},pathDown:function(t){return e(t,!1,!1)},pathUp:function(t){return e(t,!0,!1)},pathRightDown:function(t){return e(t,!1,!0)},pathRightUp:function(t){return e(t,!1,!0)}}},t.zelos.ConstantProvider.prototype.shapeFor=function(e){var i=e.getCheck();switch(!i&&e.targetConnection&&(i=e.targetConnection.getCheck()),e.type){case t.connectionTypes.INPUT_VALUE:case t.connectionTypes.OUTPUT_VALUE:if(null!=(e=e.getSourceBlock().getOutputShape()))switch(e){case this.SHAPES.HEXAGONAL:return this.HEXAGONAL;case this.SHAPES.ROUND:return this.ROUNDED;case this.SHAPES.SQUARE:return this.SQUARED}return i&&-1!=i.indexOf("Boolean")?this.HEXAGONAL:i&&-1!=i.indexOf("Number")?this.ROUNDED:(i&&i.indexOf("String"),this.ROUNDED);case t.connectionTypes.PREVIOUS_STATEMENT:case t.connectionTypes.NEXT_STATEMENT:return this.NOTCH;default:throw Error("Unknown type")}},t.zelos.ConstantProvider.prototype.makeNotch=function(){function e(e){return t.utils.svgPaths.curve("c",[t.utils.svgPaths.point(e*r/2,0),t.utils.svgPaths.point(e*r*3/4,a/2),t.utils.svgPaths.point(e*r,a)])+t.utils.svgPaths.line([t.utils.svgPaths.point(e*r,s)])+t.utils.svgPaths.curve("c",[t.utils.svgPaths.point(e*r/4,a/2),t.utils.svgPaths.point(e*r/2,a),t.utils.svgPaths.point(e*r,a)])+t.utils.svgPaths.lineOnAxis("h",e*o)+t.utils.svgPaths.curve("c",[t.utils.svgPaths.point(e*r/2,0),t.utils.svgPaths.point(e*r*3/4,-a/2),t.utils.svgPaths.point(e*r,-a)])+t.utils.svgPaths.line([t.utils.svgPaths.point(e*r,-s)])+t.utils.svgPaths.curve("c",[t.utils.svgPaths.point(e*r/4,-a/2),t.utils.svgPaths.point(e*r/2,-a),t.utils.svgPaths.point(e*r,-a)])}var i=this.NOTCH_WIDTH,n=this.NOTCH_HEIGHT,o=i/3,r=o/3,s=n/2,a=s/2,l=e(1),c=e(-1);return{type:this.SHAPES.NOTCH,width:i,height:n,pathLeft:l,pathRight:c}},t.zelos.ConstantProvider.prototype.makeInsideCorners=function(){var e=this.CORNER_RADIUS,i=t.utils.svgPaths.arc("a","0 0,0",e,t.utils.svgPaths.point(-e,e)),n=t.utils.svgPaths.arc("a","0 0,1",e,t.utils.svgPaths.point(-e,e));return{width:e,height:e,pathTop:i,pathBottom:t.utils.svgPaths.arc("a","0 0,0",e,t.utils.svgPaths.point(e,e)),rightWidth:e,rightHeight:e,pathTopRight:n,pathBottomRight:t.utils.svgPaths.arc("a","0 0,1",e,t.utils.svgPaths.point(e,e))}},t.zelos.ConstantProvider.prototype.generateSecondaryColour_=function(e){return t.utils.colour.blend("#000",e,.15)||e},t.zelos.ConstantProvider.prototype.generateTertiaryColour_=function(e){return t.utils.colour.blend("#000",e,.25)||e},t.zelos.ConstantProvider.prototype.createDom=function(e,i,n){t.zelos.ConstantProvider.superClass_.createDom.call(this,e,i,n),e=t.utils.dom.createSvgElement(t.utils.Svg.DEFS,{},e),i=t.utils.dom.createSvgElement(t.utils.Svg.FILTER,{id:"blocklySelectedGlowFilter"+this.randomIdentifier,height:"160%",width:"180%",y:"-30%",x:"-40%"},e),t.utils.dom.createSvgElement(t.utils.Svg.FEGAUSSIANBLUR,{in:"SourceGraphic",stdDeviation:this.SELECTED_GLOW_SIZE},i),n=t.utils.dom.createSvgElement(t.utils.Svg.FECOMPONENTTRANSFER,{result:"outBlur"},i),t.utils.dom.createSvgElement(t.utils.Svg.FEFUNCA,{type:"table",tableValues:"0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1"},n),t.utils.dom.createSvgElement(t.utils.Svg.FEFLOOD,{"flood-color":this.SELECTED_GLOW_COLOUR,"flood-opacity":1,result:"outColor"},i),t.utils.dom.createSvgElement(t.utils.Svg.FECOMPOSITE,{in:"outColor",in2:"outBlur",operator:"in",result:"outGlow"},i),this.selectedGlowFilterId=i.id,this.selectedGlowFilter_=i,e=t.utils.dom.createSvgElement(t.utils.Svg.FILTER,{id:"blocklyReplacementGlowFilter"+this.randomIdentifier,height:"160%",width:"180%",y:"-30%",x:"-40%"},e),t.utils.dom.createSvgElement(t.utils.Svg.FEGAUSSIANBLUR,{in:"SourceGraphic",stdDeviation:this.REPLACEMENT_GLOW_SIZE},e),i=t.utils.dom.createSvgElement(t.utils.Svg.FECOMPONENTTRANSFER,{result:"outBlur"},e),t.utils.dom.createSvgElement(t.utils.Svg.FEFUNCA,{type:"table",tableValues:"0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1"},i),t.utils.dom.createSvgElement(t.utils.Svg.FEFLOOD,{"flood-color":this.REPLACEMENT_GLOW_COLOUR,"flood-opacity":1,result:"outColor"},e),t.utils.dom.createSvgElement(t.utils.Svg.FECOMPOSITE,{in:"outColor",in2:"outBlur",operator:"in",result:"outGlow"},e),t.utils.dom.createSvgElement(t.utils.Svg.FECOMPOSITE,{in:"SourceGraphic",in2:"outGlow",operator:"over"},e),this.replacementGlowFilterId=e.id,this.replacementGlowFilter_=e},t.zelos.ConstantProvider.prototype.getCSS_=function(t){return[t+" .blocklyText,",t+" .blocklyFlyoutLabelText {","font: "+this.FIELD_TEXT_FONTWEIGHT+" "+this.FIELD_TEXT_FONTSIZE+"pt "+this.FIELD_TEXT_FONTFAMILY+";","}",t+" .blocklyText {","fill: #fff;","}",t+" .blocklyNonEditableText>rect:not(.blocklyDropdownRect),",t+" .blocklyEditableText>rect:not(.blocklyDropdownRect) {","fill: "+this.FIELD_BORDER_RECT_COLOUR+";","}",t+" .blocklyNonEditableText>text,",t+" .blocklyEditableText>text,",t+" .blocklyNonEditableText>g>text,",t+" .blocklyEditableText>g>text {","fill: #575E75;","}",t+" .blocklyFlyoutLabelText {","fill: #575E75;","}",t+" .blocklyText.blocklyBubbleText {","fill: #575E75;","}",t+" .blocklyDraggable:not(.blocklyDisabled)"," .blocklyEditableText:not(.editing):hover>rect,",t+" .blocklyDraggable:not(.blocklyDisabled)"," .blocklyEditableText:not(.editing):hover>.blocklyPath {","stroke: #fff;","stroke-width: 2;","}",t+" .blocklyHtmlInput {","font-family: "+this.FIELD_TEXT_FONTFAMILY+";","font-weight: "+this.FIELD_TEXT_FONTWEIGHT+";","color: #575E75;","}",t+" .blocklyDropdownText {","fill: #fff !important;","}",t+".blocklyWidgetDiv .goog-menuitem,",t+".blocklyDropDownDiv .goog-menuitem {","font-family: "+this.FIELD_TEXT_FONTFAMILY+";","}",t+".blocklyDropDownDiv .goog-menuitem-content {","color: #fff;","}",t+" .blocklyHighlightedConnectionPath {","stroke: "+this.SELECTED_GLOW_COLOUR+";","}",t+" .blocklyDisabled > .blocklyOutlinePath {","fill: url(#blocklyDisabledPattern"+this.randomIdentifier+")","}",t+" .blocklyInsertionMarker>.blocklyPath {","fill-opacity: "+this.INSERTION_MARKER_OPACITY+";","stroke: none;","}"]},t.zelos.TopRow=function(e){t.zelos.TopRow.superClass_.constructor.call(this,e)},t.utils.object.inherits(t.zelos.TopRow,t.blockRendering.TopRow),t.zelos.TopRow.prototype.endsWithElemSpacer=function(){return!1},t.zelos.TopRow.prototype.hasLeftSquareCorner=function(t){var e=(t.hat?"cap"===t.hat:this.constants_.ADD_START_HATS)&&!t.outputConnection&&!t.previousConnection;return!!t.outputConnection||e},t.zelos.TopRow.prototype.hasRightSquareCorner=function(t){return!!t.outputConnection&&!t.statementInputCount&&!t.nextConnection},t.zelos.BottomRow=function(e){t.zelos.BottomRow.superClass_.constructor.call(this,e)},t.utils.object.inherits(t.zelos.BottomRow,t.blockRendering.BottomRow),t.zelos.BottomRow.prototype.endsWithElemSpacer=function(){return!1},t.zelos.BottomRow.prototype.hasLeftSquareCorner=function(t){return!!t.outputConnection},t.zelos.BottomRow.prototype.hasRightSquareCorner=function(t){return!!t.outputConnection&&!t.statementInputCount&&!t.nextConnection},t.zelos.RightConnectionShape=function(e){t.zelos.RightConnectionShape.superClass_.constructor.call(this,e),this.type|=t.blockRendering.Types.getType("RIGHT_CONNECTION"),this.width=this.height=0},t.utils.object.inherits(t.zelos.RightConnectionShape,t.blockRendering.Measurable),t.zelos.RenderInfo=function(e,i){t.zelos.RenderInfo.superClass_.constructor.call(this,e,i),this.topRow=new t.zelos.TopRow(this.constants_),this.bottomRow=new t.zelos.BottomRow(this.constants_),this.isInline=!0,this.isMultiRow=!i.getInputsInline()||i.isCollapsed(),this.hasStatementInput=0<i.statementInputCount,this.rightSide=this.outputConnection?new t.zelos.RightConnectionShape(this.constants_):null},t.utils.object.inherits(t.zelos.RenderInfo,t.blockRendering.RenderInfo),t.zelos.RenderInfo.prototype.getRenderer=function(){return this.renderer_},t.zelos.RenderInfo.prototype.measure=function(){this.createRows_(),this.addElemSpacing_(),this.addRowSpacing_(),this.adjustXPosition_(),this.computeBounds_(),this.alignRowElements_(),this.finalize_()},t.zelos.RenderInfo.prototype.shouldStartNewRow_=function(e,i){return!!i&&(e.type==t.inputTypes.STATEMENT||i.type==t.inputTypes.STATEMENT||(e.type==t.inputTypes.VALUE||e.type==t.inputTypes.DUMMY)&&(!this.isInline||this.isMultiRow))},t.zelos.RenderInfo.prototype.getDesiredRowWidth_=function(e){return e.hasStatement?this.width-this.startX-(this.constants_.INSIDE_CORNERS.rightWidth||0):t.zelos.RenderInfo.superClass_.getDesiredRowWidth_.call(this,e)},t.zelos.RenderInfo.prototype.getInRowSpacing_=function(e,i){return e&&i||!this.outputConnection||!this.outputConnection.isDynamicShape||this.hasStatementInput||this.bottomRow.hasNextConnection?!e&&i&&t.blockRendering.Types.isStatementInput(i)?this.constants_.STATEMENT_INPUT_PADDING_LEFT:e&&t.blockRendering.Types.isLeftRoundedCorner(e)&&i&&(t.blockRendering.Types.isPreviousConnection(i)||t.blockRendering.Types.isNextConnection(i))?i.notchOffset-this.constants_.CORNER_RADIUS:e&&t.blockRendering.Types.isLeftSquareCorner(e)&&i&&t.blockRendering.Types.isHat(i)?this.constants_.NO_PADDING:this.constants_.MEDIUM_PADDING:this.constants_.NO_PADDING},t.zelos.RenderInfo.prototype.getSpacerRowHeight_=function(e,i){if(t.blockRendering.Types.isTopRow(e)&&t.blockRendering.Types.isBottomRow(i))return this.constants_.EMPTY_BLOCK_SPACER_HEIGHT;var n=t.blockRendering.Types.isInputRow(e)&&e.hasStatement,o=t.blockRendering.Types.isInputRow(i)&&i.hasStatement;return o||n?(e=Math.max(this.constants_.NOTCH_HEIGHT,this.constants_.INSIDE_CORNERS.rightHeight||0),o&&n?Math.max(e,this.constants_.DUMMY_INPUT_MIN_HEIGHT):e):t.blockRendering.Types.isTopRow(e)?e.hasPreviousConnection||this.outputConnection&&!this.hasStatementInput?this.constants_.NO_PADDING:Math.abs(this.constants_.NOTCH_HEIGHT-this.constants_.CORNER_RADIUS):t.blockRendering.Types.isBottomRow(i)?this.outputConnection?!i.hasNextConnection&&this.hasStatementInput?Math.abs(this.constants_.NOTCH_HEIGHT-this.constants_.CORNER_RADIUS):this.constants_.NO_PADDING:Math.max(this.topRow.minHeight,Math.max(this.constants_.NOTCH_HEIGHT,this.constants_.CORNER_RADIUS))-this.constants_.CORNER_RADIUS:this.constants_.MEDIUM_PADDING},t.zelos.RenderInfo.prototype.getSpacerRowWidth_=function(e,i){var n=this.width-this.startX;return t.blockRendering.Types.isInputRow(e)&&e.hasStatement||t.blockRendering.Types.isInputRow(i)&&i.hasStatement?Math.max(n,this.constants_.STATEMENT_INPUT_SPACER_MIN_WIDTH):n},t.zelos.RenderInfo.prototype.getElemCenterline_=function(e,i){if(e.hasStatement&&!t.blockRendering.Types.isSpacer(i)&&!t.blockRendering.Types.isStatementInput(i))return e.yPos+this.constants_.EMPTY_STATEMENT_INPUT_HEIGHT/2;if(t.blockRendering.Types.isInlineInput(i)){var n=i.connectedBlock;if(n&&n.outputConnection&&n.nextConnection)return e.yPos+n.height/2}return t.zelos.RenderInfo.superClass_.getElemCenterline_.call(this,e,i)},t.zelos.RenderInfo.prototype.addInput_=function(e,i){e.type==t.inputTypes.DUMMY&&i.hasDummyInput&&i.align==t.constants.ALIGN.LEFT&&e.align==t.constants.ALIGN.RIGHT&&(i.rightAlignedDummyInput=e),t.zelos.RenderInfo.superClass_.addInput_.call(this,e,i)},t.zelos.RenderInfo.prototype.addAlignmentPadding_=function(e,i){if(e.rightAlignedDummyInput){for(var n,o,r=0;(o=e.elements[r])&&(t.blockRendering.Types.isSpacer(o)&&(n=o),!t.blockRendering.Types.isField(o)||o.parentInput!=e.rightAlignedDummyInput);r++);if(n)return n.width+=i,void(e.width+=i)}t.zelos.RenderInfo.superClass_.addAlignmentPadding_.call(this,e,i)},t.zelos.RenderInfo.prototype.adjustXPosition_=function(){for(var e=this.constants_.NOTCH_OFFSET_LEFT+this.constants_.NOTCH_WIDTH,i=e,n=2;n<this.rows.length-1;n+=2){var o=this.rows[n-1],r=this.rows[n],s=this.rows[n+1];if(o=2==n?!!this.topRow.hasPreviousConnection:!!o.followsStatement,s=n+2>=this.rows.length-1?!!this.bottomRow.hasNextConnection:!!s.precedesStatement,t.blockRendering.Types.isInputRow(r)&&r.hasStatement)r.measure(),i=r.width-r.getLastInput().width+e;else if(o&&(2==n||s)&&t.blockRendering.Types.isInputRow(r)&&!r.hasStatement){s=r.xPos,o=null;for(var a,l=0;a=r.elements[l];l++)t.blockRendering.Types.isSpacer(a)&&(o=a),!(o&&(t.blockRendering.Types.isField(a)||t.blockRendering.Types.isInput(a))&&s<i)||t.blockRendering.Types.isField(a)&&(a.field instanceof t.FieldLabel||a.field instanceof t.FieldImage)||(o.width+=i-s),s+=a.width}}},t.zelos.RenderInfo.prototype.finalizeOutputConnection_=function(){if(this.outputConnection&&this.outputConnection.isDynamicShape){for(var t,e=0,i=0;t=this.rows[i];i++)t.yPos=e,e+=t.height;this.height=e,i=this.bottomRow.hasNextConnection?this.height-this.bottomRow.descenderHeight:this.height,e=this.outputConnection.shape.height(i),i=this.outputConnection.shape.width(i),this.outputConnection.height=e,this.outputConnection.width=i,this.outputConnection.startX=i,this.outputConnection.connectionOffsetY=this.outputConnection.shape.connectionOffsetY(e),this.outputConnection.connectionOffsetX=this.outputConnection.shape.connectionOffsetX(i),t=0,this.hasStatementInput||this.bottomRow.hasNextConnection||(t=i,this.rightSide.height=e,this.rightSide.width=t,this.rightSide.centerline=e/2,this.rightSide.xPos=this.width+t),this.startX=i,this.width+=i+t,this.widthWithChildren+=i+t}},t.zelos.RenderInfo.prototype.finalizeHorizontalAlignment_=function(){if(this.outputConnection&&!this.hasStatementInput&&!this.bottomRow.hasNextConnection){for(var e,i=0,n=0;e=this.rows[n];n++)if(t.blockRendering.Types.isInputRow(e)){i=e.elements[e.elements.length-2];var o=this.getNegativeSpacing_(e.elements[1]),r=this.getNegativeSpacing_(i);i=o+r;var s=this.constants_.MIN_BLOCK_WIDTH+2*this.outputConnection.width;this.width-i<s&&(o=(i=this.width-s)/2,r=i/2),e.elements.unshift(new t.blockRendering.InRowSpacer(this.constants_,-o)),e.elements.push(new t.blockRendering.InRowSpacer(this.constants_,-r))}if(i)for(this.width-=i,this.widthWithChildren-=i,this.rightSide.xPos-=i,n=0;e=this.rows[n];n++)t.blockRendering.Types.isTopOrBottomRow(e)&&(e.elements[1].width-=i,e.elements[1].widthWithConnectedBlocks-=i),e.width-=i,e.widthWithConnectedBlocks-=i}},t.zelos.RenderInfo.prototype.getNegativeSpacing_=function(e){if(!e)return 0;var i=this.outputConnection.width,n=this.outputConnection.shape.type,o=this.constants_;if(this.isMultiRow&&1<this.inputRows.length)switch(n){case o.SHAPES.ROUND:return n=this.constants_.MAX_DYNAMIC_CONNECTION_SHAPE_WIDTH,i-(n=this.height/2>n?n:this.height/2)*(1-Math.sin(Math.acos((n-this.constants_.SMALL_PADDING)/n)));default:return 0}if(t.blockRendering.Types.isInlineInput(e)){var r=e.connectedBlock;return e=r?r.pathObject.outputShapeType:e.shape.type,r&&r.outputConnection&&(r.statementInputCount||r.nextConnection)||n==o.SHAPES.HEXAGONAL&&n!=e?0:i-this.constants_.SHAPE_IN_SHAPE_PADDING[n][e]}return t.blockRendering.Types.isField(e)?n==o.SHAPES.ROUND&&e.field instanceof t.FieldTextInput?i-2.75*o.GRID_UNIT:i-this.constants_.SHAPE_IN_SHAPE_PADDING[n][0]:t.blockRendering.Types.isIcon(e)?this.constants_.SMALL_PADDING:0},t.zelos.RenderInfo.prototype.finalizeVerticalAlignment_=function(){if(!this.outputConnection)for(var e=2;e<this.rows.length-1;e+=2){var i=this.rows[e-1],n=this.rows[e],o=this.rows[e+1],r=2==e,s=e+2>=this.rows.length-1?!!this.bottomRow.hasNextConnection:!!o.precedesStatement;if(r?this.topRow.hasPreviousConnection:i.followsStatement){var a=3==n.elements.length&&(n.elements[1].field instanceof t.FieldLabel||n.elements[1].field instanceof t.FieldImage);if(!r&&a)i.height-=this.constants_.SMALL_PADDING,o.height-=this.constants_.SMALL_PADDING,n.height-=this.constants_.MEDIUM_PADDING;else if(r||s){if(s){for(r=!1,s=0;a=n.elements[s];s++)if(t.blockRendering.Types.isInlineInput(a)&&a.connectedBlock&&!a.connectedBlock.isShadow()&&40<=a.connectedBlock.getHeightWidth().height){r=!0;break}r&&(i.height-=this.constants_.SMALL_PADDING,o.height-=this.constants_.SMALL_PADDING)}}else i.height+=this.constants_.SMALL_PADDING}}},t.zelos.RenderInfo.prototype.finalize_=function(){this.finalizeOutputConnection_(),this.finalizeHorizontalAlignment_(),this.finalizeVerticalAlignment_(),t.zelos.RenderInfo.superClass_.finalize_.call(this),this.rightSide&&(this.widthWithChildren+=this.rightSide.width)},t.zelos.Drawer=function(e,i){t.zelos.Drawer.superClass_.constructor.call(this,e,i)},t.utils.object.inherits(t.zelos.Drawer,t.blockRendering.Drawer),t.zelos.Drawer.prototype.draw=function(){var e=this.block_.pathObject;e.beginDrawing(),this.hideHiddenIcons_(),this.drawOutline_(),this.drawInternals_(),e.setPath(this.outlinePath_+"\n"+this.inlinePath_),this.info_.RTL&&e.flipRTL(),t.blockRendering.useDebugger&&this.block_.renderingDebugger.drawDebug(this.block_,this.info_),this.recordSizeOnBlock_(),this.info_.outputConnection&&(e.outputShapeType=this.info_.outputConnection.shape.type),e.endDrawing()},t.zelos.Drawer.prototype.drawOutline_=function(){this.info_.outputConnection&&this.info_.outputConnection.isDynamicShape&&!this.info_.hasStatementInput&&!this.info_.bottomRow.hasNextConnection?(this.drawFlatTop_(),this.drawRightDynamicConnection_(),this.drawFlatBottom_(),this.drawLeftDynamicConnection_()):t.zelos.Drawer.superClass_.drawOutline_.call(this)},t.zelos.Drawer.prototype.drawLeft_=function(){this.info_.outputConnection&&this.info_.outputConnection.isDynamicShape?this.drawLeftDynamicConnection_():t.zelos.Drawer.superClass_.drawLeft_.call(this)},t.zelos.Drawer.prototype.drawRightSideRow_=function(e){if(!(0>=e.height))if(e.precedesStatement||e.followsStatement){var i=this.constants_.INSIDE_CORNERS.rightHeight;i=e.height-(e.precedesStatement?i:0),this.outlinePath_+=(e.followsStatement?this.constants_.INSIDE_CORNERS.pathBottomRight:"")+(0<i?t.utils.svgPaths.lineOnAxis("V",e.yPos+i):"")+(e.precedesStatement?this.constants_.INSIDE_CORNERS.pathTopRight:"")}else this.outlinePath_+=t.utils.svgPaths.lineOnAxis("V",e.yPos+e.height)},t.zelos.Drawer.prototype.drawRightDynamicConnection_=function(){this.outlinePath_+=this.info_.outputConnection.shape.pathRightDown(this.info_.outputConnection.height)},t.zelos.Drawer.prototype.drawLeftDynamicConnection_=function(){this.positionOutputConnection_(),this.outlinePath_+=this.info_.outputConnection.shape.pathUp(this.info_.outputConnection.height),this.outlinePath_+="z"},t.zelos.Drawer.prototype.drawFlatTop_=function(){var e=this.info_.topRow;this.positionPreviousConnection_(),this.outlinePath_+=t.utils.svgPaths.moveBy(e.xPos,this.info_.startY),this.outlinePath_+=t.utils.svgPaths.lineOnAxis("h",e.width)},t.zelos.Drawer.prototype.drawFlatBottom_=function(){var e=this.info_.bottomRow;this.positionNextConnection_(),this.outlinePath_+=t.utils.svgPaths.lineOnAxis("V",e.baseline),this.outlinePath_+=t.utils.svgPaths.lineOnAxis("h",-e.width)},t.zelos.Drawer.prototype.drawInlineInput_=function(e){this.positionInlineInputConnection_(e);var i=e.input.name;if(!e.connectedBlock&&!this.info_.isInsertionMarker){var n=e.width-2*e.connectionWidth;e=t.utils.svgPaths.moveTo(e.xPos+e.connectionWidth,e.centerline-e.height/2)+t.utils.svgPaths.lineOnAxis("h",n)+e.shape.pathRightDown(e.height)+t.utils.svgPaths.lineOnAxis("h",-n)+e.shape.pathUp(e.height)+"z",this.block_.pathObject.setOutlinePath(i,e)}},t.zelos.Drawer.prototype.drawStatementInput_=function(e){var i=e.getLastInput(),n=i.xPos+i.notchOffset+i.shape.width,o=i.shape.pathRight+t.utils.svgPaths.lineOnAxis("h",-(i.notchOffset-this.constants_.INSIDE_CORNERS.width))+this.constants_.INSIDE_CORNERS.pathTop,r=e.height-2*this.constants_.INSIDE_CORNERS.height;i=this.constants_.INSIDE_CORNERS.pathBottom+t.utils.svgPaths.lineOnAxis("h",i.notchOffset-this.constants_.INSIDE_CORNERS.width)+(i.connectedBottomNextConnection?"":i.shape.pathLeft),this.outlinePath_+=t.utils.svgPaths.lineOnAxis("H",n)+o+t.utils.svgPaths.lineOnAxis("v",r)+i+t.utils.svgPaths.lineOnAxis("H",e.xPos+e.width),this.positionStatementInputConnection_(e)},t.zelos.MarkerSvg=function(e,i,n){t.zelos.MarkerSvg.superClass_.constructor.call(this,e,i,n)},t.utils.object.inherits(t.zelos.MarkerSvg,t.blockRendering.MarkerSvg),t.zelos.MarkerSvg.prototype.showWithInputOutput_=function(t){var e=t.getSourceBlock();t=t.getLocation().getOffsetInBlock(),this.positionCircle_(t.x,t.y),this.setParent_(e),this.showCurrent_()},t.zelos.MarkerSvg.prototype.showWithOutput_=function(t){this.showWithInputOutput_(t)},t.zelos.MarkerSvg.prototype.showWithInput_=function(t){this.showWithInputOutput_(t)},t.zelos.MarkerSvg.prototype.showWithBlock_=function(t){var e=(t=t.getLocation()).getHeightWidth();this.positionRect_(0,0,e.width,e.height),this.setParent_(t),this.showCurrent_()},t.zelos.MarkerSvg.prototype.positionCircle_=function(t,e){this.markerCircle_.setAttribute("cx",t),this.markerCircle_.setAttribute("cy",e),this.currentMarkerSvg=this.markerCircle_},t.zelos.MarkerSvg.prototype.hide=function(){t.zelos.MarkerSvg.superClass_.hide.call(this),this.markerCircle_.style.display="none"},t.zelos.MarkerSvg.prototype.createDomInternal_=function(){if(t.zelos.MarkerSvg.superClass_.createDomInternal_.call(this),this.markerCircle_=t.utils.dom.createSvgElement(t.utils.Svg.CIRCLE,{r:this.constants_.CURSOR_RADIUS,style:"display: none","stroke-width":this.constants_.CURSOR_STROKE_WIDTH},this.markerSvg_),this.isCursor()){var e=this.getBlinkProperties_();t.utils.dom.createSvgElement(t.utils.Svg.ANIMATE,e,this.markerCircle_)}return this.markerSvg_},t.zelos.MarkerSvg.prototype.applyColour_=function(e){t.zelos.MarkerSvg.superClass_.applyColour_.call(this,e),this.markerCircle_.setAttribute("fill",this.colour_),this.markerCircle_.setAttribute("stroke",this.colour_),this.isCursor()&&this.markerCircle_.firstChild.setAttribute("values",this.colour_+";transparent;transparent;")},t.zelos.PathObject=function(e,i,n){t.zelos.PathObject.superClass_.constructor.call(this,e,i,n),this.constants=n,this.svgPathSelected_=null,this.outlines_=Object.create(null),this.outputShapeType=this.remainingOutlines_=null},t.utils.object.inherits(t.zelos.PathObject,t.blockRendering.PathObject),t.zelos.PathObject.prototype.setPath=function(e){t.zelos.PathObject.superClass_.setPath.call(this,e),this.svgPathSelected_&&this.svgPathSelected_.setAttribute("d",e)},t.zelos.PathObject.prototype.applyColour=function(e){for(var i in t.zelos.PathObject.superClass_.applyColour.call(this,e),e.isShadow()&&e.getParent()&&this.svgPath.setAttribute("stroke",e.getParent().style.colourTertiary),this.outlines_)this.outlines_[i].setAttribute("fill",this.style.colourTertiary)},t.zelos.PathObject.prototype.flipRTL=function(){for(var e in t.zelos.PathObject.superClass_.flipRTL.call(this),this.outlines_)this.outlines_[e].setAttribute("transform","scale(-1 1)")},t.zelos.PathObject.prototype.updateSelected=function(t){this.setClass_("blocklySelected",t),t?this.svgPathSelected_||(this.svgPathSelected_=this.svgPath.cloneNode(!0),this.svgPathSelected_.setAttribute("fill","none"),this.svgPathSelected_.setAttribute("filter","url(#"+this.constants.selectedGlowFilterId+")"),this.svgRoot.appendChild(this.svgPathSelected_)):this.svgPathSelected_&&(this.svgRoot.removeChild(this.svgPathSelected_),this.svgPathSelected_=null)},t.zelos.PathObject.prototype.updateReplacementFade=function(t){this.setClass_("blocklyReplaceable",t),t?this.svgPath.setAttribute("filter","url(#"+this.constants.replacementGlowFilterId+")"):this.svgPath.removeAttribute("filter")},t.zelos.PathObject.prototype.updateShapeForInputHighlight=function(t,e){t=t.getParentInput().name,(t=this.getOutlinePath_(t))&&(e?t.setAttribute("filter","url(#"+this.constants.replacementGlowFilterId+")"):t.removeAttribute("filter"))},t.zelos.PathObject.prototype.beginDrawing=function(){for(var t in this.remainingOutlines_=Object.create(null),this.outlines_)this.remainingOutlines_[t]=1},t.zelos.PathObject.prototype.endDrawing=function(){if(this.remainingOutlines_)for(var t in this.remainingOutlines_)this.removeOutlinePath_(t);this.remainingOutlines_=null},t.zelos.PathObject.prototype.setOutlinePath=function(t,e){(t=this.getOutlinePath_(t)).setAttribute("d",e),t.setAttribute("fill",this.style.colourTertiary)},t.zelos.PathObject.prototype.getOutlinePath_=function(e){return this.outlines_[e]||(this.outlines_[e]=t.utils.dom.createSvgElement(t.utils.Svg.PATH,{class:"blocklyOutlinePath",d:""},this.svgRoot)),this.remainingOutlines_&&delete this.remainingOutlines_[e],this.outlines_[e]},t.zelos.PathObject.prototype.removeOutlinePath_=function(t){this.outlines_[t].parentNode.removeChild(this.outlines_[t]),delete this.outlines_[t]},t.zelos.Renderer=function(e){t.zelos.Renderer.superClass_.constructor.call(this,e)},t.utils.object.inherits(t.zelos.Renderer,t.blockRendering.Renderer),t.zelos.Renderer.prototype.makeConstants_=function(){return new t.zelos.ConstantProvider},t.zelos.Renderer.prototype.makeRenderInfo_=function(e){return new t.zelos.RenderInfo(this,e)},t.zelos.Renderer.prototype.makeDrawer_=function(e,i){return new t.zelos.Drawer(e,i)},t.zelos.Renderer.prototype.makeMarkerDrawer=function(e,i){return new t.zelos.MarkerSvg(e,this.getConstants(),i)},t.zelos.Renderer.prototype.makePathObject=function(e,i){return new t.zelos.PathObject(e,i,this.getConstants())},t.zelos.Renderer.prototype.shouldHighlightConnection=function(e){return e.type!=t.connectionTypes.INPUT_VALUE&&e.type!==t.connectionTypes.OUTPUT_VALUE},t.zelos.Renderer.prototype.getConnectionPreviewMethod=function(e,i,n){return i.type==t.connectionTypes.OUTPUT_VALUE?e.isConnected()?t.InsertionMarkerManager.PREVIEW_TYPE.REPLACEMENT_FADE:t.InsertionMarkerManager.PREVIEW_TYPE.INPUT_OUTLINE:t.zelos.Renderer.superClass_.getConnectionPreviewMethod(e,i,n)},t.blockRendering.register("zelos",t.zelos.Renderer),t.Themes.Dark=t.Theme.defineTheme("dark",{base:t.Themes.Classic,componentStyles:{workspaceBackgroundColour:"#1e1e1e",toolboxBackgroundColour:"blackBackground",toolboxForegroundColour:"#fff",flyoutBackgroundColour:"#252526",flyoutForegroundColour:"#ccc",flyoutOpacity:1,scrollbarColour:"#797979",insertionMarkerColour:"#fff",insertionMarkerOpacity:.3,scrollbarOpacity:.4,cursorColour:"#d0d0d0",blackBackground:"#333"}}),t.Themes.Deuteranopia={},t.Themes.Deuteranopia.defaultBlockStyles={colour_blocks:{colourPrimary:"#f2a72c",colourSecondary:"#f1c172",colourTertiary:"#da921c"},list_blocks:{colourPrimary:"#7d65ab",colourSecondary:"#a88be0",colourTertiary:"#66518e"},logic_blocks:{colourPrimary:"#9fd2f1",colourSecondary:"#c0e0f4",colourTertiary:"#74bae5"},loop_blocks:{colourPrimary:"#795a07",colourSecondary:"#ac8726",colourTertiary:"#c4a03f"},math_blocks:{colourPrimary:"#e6da39",colourSecondary:"#f3ec8e",colourTertiary:"#f2eeb7"},procedure_blocks:{colourPrimary:"#590721",colourSecondary:"#8c475d",colourTertiary:"#885464"},text_blocks:{colourPrimary:"#058863",colourSecondary:"#5ecfaf",colourTertiary:"#04684c"},variable_blocks:{colourPrimary:"#47025a",colourSecondary:"#820fa1",colourTertiary:"#8e579d"},variable_dynamic_blocks:{colourPrimary:"#47025a",colourSecondary:"#820fa1",colourTertiary:"#8e579d"}},t.Themes.Deuteranopia.categoryStyles={colour_category:{colour:"#f2a72c"},list_category:{colour:"#7d65ab"},logic_category:{colour:"#9fd2f1"},loop_category:{colour:"#795a07"},math_category:{colour:"#e6da39"},procedure_category:{colour:"#590721"},text_category:{colour:"#058863"},variable_category:{colour:"#47025a"},variable_dynamic_category:{colour:"#47025a"}},t.Themes.Deuteranopia=new t.Theme("deuteranopia",t.Themes.Deuteranopia.defaultBlockStyles,t.Themes.Deuteranopia.categoryStyles),t.Themes.HighContrast={},t.Themes.HighContrast.defaultBlockStyles={colour_blocks:{colourPrimary:"#a52714",colourSecondary:"#FB9B8C",colourTertiary:"#FBE1DD"},list_blocks:{colourPrimary:"#4a148c",colourSecondary:"#AD7BE9",colourTertiary:"#CDB6E9"},logic_blocks:{colourPrimary:"#01579b",colourSecondary:"#64C7FF",colourTertiary:"#C5EAFF"},loop_blocks:{colourPrimary:"#33691e",colourSecondary:"#9AFF78",colourTertiary:"#E1FFD7"},math_blocks:{colourPrimary:"#1a237e",colourSecondary:"#8A9EFF",colourTertiary:"#DCE2FF"},procedure_blocks:{colourPrimary:"#006064",colourSecondary:"#77E6EE",colourTertiary:"#CFECEE"},text_blocks:{colourPrimary:"#004d40",colourSecondary:"#5ae27c",colourTertiary:"#D2FFDD"},variable_blocks:{colourPrimary:"#880e4f",colourSecondary:"#FF73BE",colourTertiary:"#FFD4EB"},variable_dynamic_blocks:{colourPrimary:"#880e4f",colourSecondary:"#FF73BE",colourTertiary:"#FFD4EB"},hat_blocks:{colourPrimary:"#880e4f",colourSecondary:"#FF73BE",colourTertiary:"#FFD4EB",hat:"cap"}},t.Themes.HighContrast.categoryStyles={colour_category:{colour:"#a52714"},list_category:{colour:"#4a148c"},logic_category:{colour:"#01579b"},loop_category:{colour:"#33691e"},math_category:{colour:"#1a237e"},procedure_category:{colour:"#006064"},text_category:{colour:"#004d40"},variable_category:{colour:"#880e4f"},variable_dynamic_category:{colour:"#880e4f"}},t.Themes.HighContrast=new t.Theme("highcontrast",t.Themes.HighContrast.defaultBlockStyles,t.Themes.HighContrast.categoryStyles),t.Themes.HighContrast.setComponentStyle("selectedGlowColour","#000000"),t.Themes.HighContrast.setComponentStyle("selectedGlowSize",1),t.Themes.HighContrast.setComponentStyle("replacementGlowColour","#000000"),t.Themes.HighContrast.setFontStyle({family:null,weight:null,size:16}),t.Themes.Tritanopia={},t.Themes.Tritanopia.defaultBlockStyles={colour_blocks:{colourPrimary:"#05427f",colourSecondary:"#2974c0",colourTertiary:"#2d74bb"},list_blocks:{colourPrimary:"#b69ce8",colourSecondary:"#ccbaef",colourTertiary:"#9176c5"},logic_blocks:{colourPrimary:"#9fd2f1",colourSecondary:"#c0e0f4",colourTertiary:"#74bae5"},loop_blocks:{colourPrimary:"#aa1846",colourSecondary:"#d36185",colourTertiary:"#7c1636"},math_blocks:{colourPrimary:"#e6da39",colourSecondary:"#f3ec8e",colourTertiary:"#f2eeb7"},procedure_blocks:{colourPrimary:"#590721",colourSecondary:"#8c475d",colourTertiary:"#885464"},text_blocks:{colourPrimary:"#058863",colourSecondary:"#5ecfaf",colourTertiary:"#04684c"},variable_blocks:{colourPrimary:"#4b2d84",colourSecondary:"#816ea7",colourTertiary:"#83759e"},variable_dynamic_blocks:{colourPrimary:"#4b2d84",colourSecondary:"#816ea7",colourTertiary:"#83759e"}},t.Themes.Tritanopia.categoryStyles={colour_category:{colour:"#05427f"},list_category:{colour:"#b69ce8"},logic_category:{colour:"#9fd2f1"},loop_category:{colour:"#aa1846"},math_category:{colour:"#e6da39"},procedure_category:{colour:"#590721"},text_category:{colour:"#058863"},variable_category:{colour:"#4b2d84"},variable_dynamic_category:{colour:"#4b2d84"}},t.Themes.Tritanopia=new t.Theme("tritanopia",t.Themes.Tritanopia.defaultBlockStyles,t.Themes.Tritanopia.categoryStyles),t.requires={},t})?n.apply(e,o):n)||(t.exports=r)}).call(e,i("DuR2"))},GHBc:function(t,e,i){"use strict";var n=i("cGG2");t.exports=n.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");function o(t){var n=t;return e&&(i.setAttribute("href",n),n=i.href),i.setAttribute("href",n),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}return t=o(window.location.href),function(e){var i=n.isString(e)?o(e):e;return i.protocol===t.protocol&&i.host===t.host}}():function(){return!0}},GegP:function(t,e){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist/",i(i.s=117)}({0:function(t,e,i){"use strict";function n(t,e,i,n,o,r,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):o&&(l=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:t,options:c}}i.d(e,"a",function(){return n})},117:function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"el-progress",class:["el-progress--"+t.type,t.status?"is-"+t.status:"",{"el-progress--without-text":!t.showText,"el-progress--text-inside":t.textInside}],attrs:{role:"progressbar","aria-valuenow":t.percentage,"aria-valuemin":"0","aria-valuemax":"100"}},["line"===t.type?i("div",{staticClass:"el-progress-bar"},[i("div",{staticClass:"el-progress-bar__outer",style:{height:t.strokeWidth+"px"}},[i("div",{staticClass:"el-progress-bar__inner",style:t.barStyle},[t.showText&&t.textInside?i("div",{staticClass:"el-progress-bar__innerText"},[t._v(t._s(t.content))]):t._e()])])]):i("div",{staticClass:"el-progress-circle",style:{height:t.width+"px",width:t.width+"px"}},[i("svg",{attrs:{viewBox:"0 0 100 100"}},[i("path",{staticClass:"el-progress-circle__track",style:t.trailPathStyle,attrs:{d:t.trackPath,stroke:"#e5e9f2","stroke-width":t.relativeStrokeWidth,fill:"none"}}),i("path",{staticClass:"el-progress-circle__path",style:t.circlePathStyle,attrs:{d:t.trackPath,stroke:t.stroke,fill:"none","stroke-linecap":t.strokeLinecap,"stroke-width":t.percentage?t.relativeStrokeWidth:0}})])]),t.showText&&!t.textInside?i("div",{staticClass:"el-progress__text",style:{fontSize:t.progressTextSize+"px"}},[t.status?i("i",{class:t.iconClass}):[t._v(t._s(t.content))]],2):t._e()])};n._withStripped=!0;var o={name:"ElProgress",props:{type:{type:String,default:"line",validator:function(t){return["line","circle","dashboard"].indexOf(t)>-1}},percentage:{type:Number,default:0,required:!0,validator:function(t){return t>=0&&t<=100}},status:{type:String,validator:function(t){return["success","exception","warning"].indexOf(t)>-1}},strokeWidth:{type:Number,default:6},strokeLinecap:{type:String,default:"round"},textInside:{type:Boolean,default:!1},width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:[String,Array,Function],default:""},format:Function},computed:{barStyle:function(){var t={};return t.width=this.percentage+"%",t.backgroundColor=this.getCurrentColor(this.percentage),t},relativeStrokeWidth:function(){return(this.strokeWidth/this.width*100).toFixed(1)},radius:function(){return"circle"===this.type||"dashboard"===this.type?parseInt(50-parseFloat(this.relativeStrokeWidth)/2,10):0},trackPath:function(){var t=this.radius,e="dashboard"===this.type;return"\n        M 50 50\n        m 0 "+(e?"":"-")+t+"\n        a "+t+" "+t+" 0 1 1 0 "+(e?"-":"")+2*t+"\n        a "+t+" "+t+" 0 1 1 0 "+(e?"":"-")+2*t+"\n        "},perimeter:function(){return 2*Math.PI*this.radius},rate:function(){return"dashboard"===this.type?.75:1},strokeDashoffset:function(){return-1*this.perimeter*(1-this.rate)/2+"px"},trailPathStyle:function(){return{strokeDasharray:this.perimeter*this.rate+"px, "+this.perimeter+"px",strokeDashoffset:this.strokeDashoffset}},circlePathStyle:function(){return{strokeDasharray:this.perimeter*this.rate*(this.percentage/100)+"px, "+this.perimeter+"px",strokeDashoffset:this.strokeDashoffset,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease"}},stroke:function(){var t=void 0;if(this.color)t=this.getCurrentColor(this.percentage);else switch(this.status){case"success":t="#13ce66";break;case"exception":t="#ff4949";break;case"warning":t="#e6a23c";break;default:t="#20a0ff"}return t},iconClass:function(){return"warning"===this.status?"el-icon-warning":"line"===this.type?"success"===this.status?"el-icon-circle-check":"el-icon-circle-close":"success"===this.status?"el-icon-check":"el-icon-close"},progressTextSize:function(){return"line"===this.type?12+.4*this.strokeWidth:.111111*this.width+2},content:function(){return"function"==typeof this.format?this.format(this.percentage)||"":this.percentage+"%"}},methods:{getCurrentColor:function(t){return"function"==typeof this.color?this.color(t):"string"==typeof this.color?this.color:this.getLevelColor(t)},getLevelColor:function(t){for(var e=this.getColorArray().sort(function(t,e){return t.percentage-e.percentage}),i=0;i<e.length;i++)if(e[i].percentage>t)return e[i].color;return e[e.length-1].color},getColorArray:function(){var t=this.color,e=100/t.length;return t.map(function(t,i){return"string"==typeof t?{color:t,percentage:(i+1)*e}:t})}}},r=i(0),s=Object(r.a)(o,n,[],!1,null,null,null);s.options.__file="packages/progress/src/progress.vue";var a=s.exports;a.install=function(t){t.component(a.name,a)};e.default=a}})},H8dH:function(t,e,i){"use strict";e.__esModule=!0,e.default=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!t||!e)throw new Error("instance & callback is required");var o=!1,r=function(){o||(o=!0,e&&e.apply(null,arguments))};n?t.$once("after-leave",r):t.$on("after-leave",r),setTimeout(function(){r()},i+100)}},HJMx:function(t,e,i){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist/",i(i.s=79)}({0:function(t,e,i){"use strict";function n(t,e,i,n,o,r,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):o&&(l=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:t,options:c}}i.d(e,"a",function(){return n})},11:function(t,e){t.exports=i("aW5l")},21:function(t,e){t.exports=i("E/in")},4:function(t,e){t.exports=i("fPll")},79:function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:["textarea"===t.type?"el-textarea":"el-input",t.inputSize?"el-input--"+t.inputSize:"",{"is-disabled":t.inputDisabled,"is-exceed":t.inputExceed,"el-input-group":t.$slots.prepend||t.$slots.append,"el-input-group--append":t.$slots.append,"el-input-group--prepend":t.$slots.prepend,"el-input--prefix":t.$slots.prefix||t.prefixIcon,"el-input--suffix":t.$slots.suffix||t.suffixIcon||t.clearable||t.showPassword}],on:{mouseenter:function(e){t.hovering=!0},mouseleave:function(e){t.hovering=!1}}},["textarea"!==t.type?[t.$slots.prepend?i("div",{staticClass:"el-input-group__prepend"},[t._t("prepend")],2):t._e(),"textarea"!==t.type?i("input",t._b({ref:"input",staticClass:"el-input__inner",attrs:{tabindex:t.tabindex,type:t.showPassword?t.passwordVisible?"text":"password":t.type,disabled:t.inputDisabled,readonly:t.readonly,autocomplete:t.autoComplete||t.autocomplete,"aria-label":t.label},on:{compositionstart:t.handleCompositionStart,compositionupdate:t.handleCompositionUpdate,compositionend:t.handleCompositionEnd,input:t.handleInput,focus:t.handleFocus,blur:t.handleBlur,change:t.handleChange}},"input",t.$attrs,!1)):t._e(),t.$slots.prefix||t.prefixIcon?i("span",{staticClass:"el-input__prefix"},[t._t("prefix"),t.prefixIcon?i("i",{staticClass:"el-input__icon",class:t.prefixIcon}):t._e()],2):t._e(),t.getSuffixVisible()?i("span",{staticClass:"el-input__suffix"},[i("span",{staticClass:"el-input__suffix-inner"},[t.showClear&&t.showPwdVisible&&t.isWordLimitVisible?t._e():[t._t("suffix"),t.suffixIcon?i("i",{staticClass:"el-input__icon",class:t.suffixIcon}):t._e()],t.showClear?i("i",{staticClass:"el-input__icon el-icon-circle-close el-input__clear",on:{mousedown:function(t){t.preventDefault()},click:t.clear}}):t._e(),t.showPwdVisible?i("i",{staticClass:"el-input__icon el-icon-view el-input__clear",on:{click:t.handlePasswordVisible}}):t._e(),t.isWordLimitVisible?i("span",{staticClass:"el-input__count"},[i("span",{staticClass:"el-input__count-inner"},[t._v("\n            "+t._s(t.textLength)+"/"+t._s(t.upperLimit)+"\n          ")])]):t._e()],2),t.validateState?i("i",{staticClass:"el-input__icon",class:["el-input__validateIcon",t.validateIcon]}):t._e()]):t._e(),t.$slots.append?i("div",{staticClass:"el-input-group__append"},[t._t("append")],2):t._e()]:i("textarea",t._b({ref:"textarea",staticClass:"el-textarea__inner",style:t.textareaStyle,attrs:{tabindex:t.tabindex,disabled:t.inputDisabled,readonly:t.readonly,autocomplete:t.autoComplete||t.autocomplete,"aria-label":t.label},on:{compositionstart:t.handleCompositionStart,compositionupdate:t.handleCompositionUpdate,compositionend:t.handleCompositionEnd,input:t.handleInput,focus:t.handleFocus,blur:t.handleBlur,change:t.handleChange}},"textarea",t.$attrs,!1)),t.isWordLimitVisible&&"textarea"===t.type?i("span",{staticClass:"el-input__count"},[t._v(t._s(t.textLength)+"/"+t._s(t.upperLimit))]):t._e()],2)};n._withStripped=!0;var o=i(4),r=i.n(o),s=i(11),a=i.n(s),l=void 0,c="\n  height:0 !important;\n  visibility:hidden !important;\n  overflow:hidden !important;\n  position:absolute !important;\n  z-index:-1000 !important;\n  top:0 !important;\n  right:0 !important\n",u=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function h(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;l||(l=document.createElement("textarea"),document.body.appendChild(l));var n=function(t){var e=window.getComputedStyle(t),i=e.getPropertyValue("box-sizing"),n=parseFloat(e.getPropertyValue("padding-bottom"))+parseFloat(e.getPropertyValue("padding-top")),o=parseFloat(e.getPropertyValue("border-bottom-width"))+parseFloat(e.getPropertyValue("border-top-width"));return{contextStyle:u.map(function(t){return t+":"+e.getPropertyValue(t)}).join(";"),paddingSize:n,borderSize:o,boxSizing:i}}(t),o=n.paddingSize,r=n.borderSize,s=n.boxSizing,a=n.contextStyle;l.setAttribute("style",a+";"+c),l.value=t.value||t.placeholder||"";var h=l.scrollHeight,p={};"border-box"===s?h+=r:"content-box"===s&&(h-=o),l.value="";var d=l.scrollHeight-o;if(null!==e){var f=d*e;"border-box"===s&&(f=f+o+r),h=Math.max(f,h),p.minHeight=f+"px"}if(null!==i){var g=d*i;"border-box"===s&&(g=g+o+r),h=Math.min(g,h)}return p.height=h+"px",l.parentNode&&l.parentNode.removeChild(l),l=null,p}var p=i(9),d=i.n(p),f=i(21),g={name:"ElInput",componentName:"ElInput",mixins:[r.a,a.a],inheritAttrs:!1,inject:{elForm:{default:""},elFormItem:{default:""}},data:function(){return{textareaCalcStyle:{},hovering:!1,focused:!1,isComposing:!1,passwordVisible:!1}},props:{value:[String,Number],size:String,resize:String,form:String,disabled:Boolean,readonly:Boolean,type:{type:String,default:"text"},autosize:{type:[Boolean,Object],default:!1},autocomplete:{type:String,default:"off"},autoComplete:{type:String,validator:function(t){return!0}},validateEvent:{type:Boolean,default:!0},suffixIcon:String,prefixIcon:String,label:String,clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},showWordLimit:{type:Boolean,default:!1},tabindex:String},computed:{_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},validateState:function(){return this.elFormItem?this.elFormItem.validateState:""},needStatusIcon:function(){return!!this.elForm&&this.elForm.statusIcon},validateIcon:function(){return{validating:"el-icon-loading",success:"el-icon-circle-check",error:"el-icon-circle-close"}[this.validateState]},textareaStyle:function(){return d()({},this.textareaCalcStyle,{resize:this.resize})},inputSize:function(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size},inputDisabled:function(){return this.disabled||(this.elForm||{}).disabled},nativeInputValue:function(){return null===this.value||void 0===this.value?"":String(this.value)},showClear:function(){return this.clearable&&!this.inputDisabled&&!this.readonly&&this.nativeInputValue&&(this.focused||this.hovering)},showPwdVisible:function(){return this.showPassword&&!this.inputDisabled&&!this.readonly&&(!!this.nativeInputValue||this.focused)},isWordLimitVisible:function(){return this.showWordLimit&&this.$attrs.maxlength&&("text"===this.type||"textarea"===this.type)&&!this.inputDisabled&&!this.readonly&&!this.showPassword},upperLimit:function(){return this.$attrs.maxlength},textLength:function(){return"number"==typeof this.value?String(this.value).length:(this.value||"").length},inputExceed:function(){return this.isWordLimitVisible&&this.textLength>this.upperLimit}},watch:{value:function(t){this.$nextTick(this.resizeTextarea),this.validateEvent&&this.dispatch("ElFormItem","el.form.change",[t])},nativeInputValue:function(){this.setNativeInputValue()},type:function(){var t=this;this.$nextTick(function(){t.setNativeInputValue(),t.resizeTextarea(),t.updateIconOffset()})}},methods:{focus:function(){this.getInput().focus()},blur:function(){this.getInput().blur()},getMigratingConfig:function(){return{props:{icon:"icon is removed, use suffix-icon / prefix-icon instead.","on-icon-click":"on-icon-click is removed."},events:{click:"click is removed."}}},handleBlur:function(t){this.focused=!1,this.$emit("blur",t),this.validateEvent&&this.dispatch("ElFormItem","el.form.blur",[this.value])},select:function(){this.getInput().select()},resizeTextarea:function(){if(!this.$isServer){var t=this.autosize;if("textarea"===this.type)if(t){var e=t.minRows,i=t.maxRows;this.textareaCalcStyle=h(this.$refs.textarea,e,i)}else this.textareaCalcStyle={minHeight:h(this.$refs.textarea).minHeight}}},setNativeInputValue:function(){var t=this.getInput();t&&t.value!==this.nativeInputValue&&(t.value=this.nativeInputValue)},handleFocus:function(t){this.focused=!0,this.$emit("focus",t)},handleCompositionStart:function(){this.isComposing=!0},handleCompositionUpdate:function(t){var e=t.target.value,i=e[e.length-1]||"";this.isComposing=!Object(f.isKorean)(i)},handleCompositionEnd:function(t){this.isComposing&&(this.isComposing=!1,this.handleInput(t))},handleInput:function(t){this.isComposing||t.target.value!==this.nativeInputValue&&(this.$emit("input",t.target.value),this.$nextTick(this.setNativeInputValue))},handleChange:function(t){this.$emit("change",t.target.value)},calcIconOffset:function(t){var e=[].slice.call(this.$el.querySelectorAll(".el-input__"+t)||[]);if(e.length){for(var i=null,n=0;n<e.length;n++)if(e[n].parentNode===this.$el){i=e[n];break}if(i){var o={suffix:"append",prefix:"prepend"}[t];this.$slots[o]?i.style.transform="translateX("+("suffix"===t?"-":"")+this.$el.querySelector(".el-input-group__"+o).offsetWidth+"px)":i.removeAttribute("style")}}},updateIconOffset:function(){this.calcIconOffset("prefix"),this.calcIconOffset("suffix")},clear:function(){this.$emit("input",""),this.$emit("change",""),this.$emit("clear")},handlePasswordVisible:function(){var t=this;this.passwordVisible=!this.passwordVisible,this.$nextTick(function(){t.focus()})},getInput:function(){return this.$refs.input||this.$refs.textarea},getSuffixVisible:function(){return this.$slots.suffix||this.suffixIcon||this.showClear||this.showPassword||this.isWordLimitVisible||this.validateState&&this.needStatusIcon}},created:function(){this.$on("inputSelect",this.select)},mounted:function(){this.setNativeInputValue(),this.resizeTextarea(),this.updateIconOffset()},updated:function(){this.$nextTick(this.updateIconOffset)}},_=i(0),m=Object(_.a)(g,n,[],!1,null,null,null);m.options.__file="packages/input/src/input.vue";var v=m.exports;v.install=function(t){t.component(v.name,v)};e.default=v},9:function(t,e){t.exports=i("jmaC")}})},HzcN:function(t,e,i){var n=i("uY1a"),o=i("ON3O");t.exports={throttle:n,debounce:o}},IDSB:function(t,e,i){var n,o,r,s;s=function(t){return(t={Msg:{}}).Msg.ADD_COMMENT="添加注释",t.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE="不能删除变量“%1”，因为它是函数“%2”定义的一部分",t.Msg.CHANGE_VALUE_TITLE="更改值：",t.Msg.CLEAN_UP="整理块",t.Msg.COLLAPSED_WARNINGS_WARNING="已收起的信息块内包含警告。",t.Msg.COLLAPSE_ALL="折叠块",t.Msg.COLLAPSE_BLOCK="折叠块",t.Msg.COLOUR_BLEND_COLOUR1="颜色1",t.Msg.COLOUR_BLEND_COLOUR2="颜色2",t.Msg.COLOUR_BLEND_HELPURL="https://meyerweb.com/eric/tools/color-blend/#:::rgbp",t.Msg.COLOUR_BLEND_RATIO="比例",t.Msg.COLOUR_BLEND_TITLE="混合",t.Msg.COLOUR_BLEND_TOOLTIP="把两种颜色以一个给定的比例(0.0-1.0)进行混合。",t.Msg.COLOUR_PICKER_HELPURL="https://zh.wikipedia.org/wiki/颜色",t.Msg.COLOUR_PICKER_TOOLTIP="从调色板中选择一种颜色。",t.Msg.COLOUR_RANDOM_HELPURL="http://randomcolour.com",t.Msg.COLOUR_RANDOM_TITLE="随机颜色",t.Msg.COLOUR_RANDOM_TOOLTIP="随机选择一种颜色。",t.Msg.COLOUR_RGB_BLUE="蓝色",t.Msg.COLOUR_RGB_GREEN="绿色",t.Msg.COLOUR_RGB_HELPURL="https://www.december.com/html/spec/colorpercompact.html",t.Msg.COLOUR_RGB_RED="红色",t.Msg.COLOUR_RGB_TITLE="颜色",t.Msg.COLOUR_RGB_TOOLTIP="通过指定红色、绿色和蓝色的量创建一种颜色。所有的值必须在0和100之间。",t.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL="https://github.com/google/blockly/wiki/Loops#loop-termination-blocks",t.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK="跳出循环",t.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE="继续下一轮循环",t.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK="跳出包含它的循环。",t.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE="跳过本轮循环的剩余部分，并继进行续下一轮循环。",t.Msg.CONTROLS_FLOW_STATEMENTS_WARNING="警告：这个块只能在循环内使用。",t.Msg.CONTROLS_FOREACH_HELPURL="https://github.com/google/blockly/wiki/Loops#for-each",t.Msg.CONTROLS_FOREACH_TITLE="遍历列表 %2 里的每一项 %1",t.Msg.CONTROLS_FOREACH_TOOLTIP="遍历列表中的每一项，将变量“%1”设为所选项，并执行一些语句。",t.Msg.CONTROLS_FOR_HELPURL="https://github.com/google/blockly/wiki/Loops#count-with",t.Msg.CONTROLS_FOR_TITLE="变量 %1 从 %2 数到 %3 每次增加 %4",t.Msg.CONTROLS_FOR_TOOLTIP="用变量%1记录从开始数值到终止数值之间的数值，数值按指定间隔增加，并执行指定的块。",t.Msg.CONTROLS_IF_ELSEIF_TOOLTIP="在这个if语句块中增加一个条件。",t.Msg.CONTROLS_IF_ELSE_TOOLTIP="在这个if语句块中添加一个最终的，包括所有其余情况的条件。",t.Msg.CONTROLS_IF_HELPURL="https://github.com/google/blockly/wiki/IfElse",t.Msg.CONTROLS_IF_IF_TOOLTIP="增加、删除或重新排列各节来重新配置这个if语句块。",t.Msg.CONTROLS_IF_MSG_ELSE="否则",t.Msg.CONTROLS_IF_MSG_ELSEIF="否则如果",t.Msg.CONTROLS_IF_MSG_IF="如果",t.Msg.CONTROLS_IF_TOOLTIP_1="如果值为真，执行一些语句。",t.Msg.CONTROLS_IF_TOOLTIP_2="如果值为真，则执行第一块语句。否则，则执行第二块语句。",t.Msg.CONTROLS_IF_TOOLTIP_3="如果第一个值为真，则执行第一块的语句。否则，如果第二个值为真，则执行第二块的语句。",t.Msg.CONTROLS_IF_TOOLTIP_4="如果第一个值为真，则执行第一块对语句。否则，如果第二个值为真，则执行语句的第二块。如果没有值为真，则执行最后一块的语句。",t.Msg.CONTROLS_REPEAT_HELPURL="https://zh.wikipedia.org/wiki/For循环",t.Msg.CONTROLS_REPEAT_INPUT_DO="执行",t.Msg.CONTROLS_REPEAT_TITLE="重复 %1 次",t.Msg.CONTROLS_REPEAT_TOOLTIP="多次执行一些语句。",t.Msg.CONTROLS_WHILEUNTIL_HELPURL="https://github.com/google/blockly/wiki/Loops#repeat",t.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL="重复直到条件满足",t.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE="当条件满足时重复",t.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL="只要值为假，就一直循环执行一些语句。",t.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE="只要值为真，就一直循环执行一些语句。",t.Msg.DELETE_ALL_BLOCKS="删除所有 %1 个块吗？",t.Msg.DELETE_BLOCK="删除块",t.Msg.DELETE_VARIABLE="删除变量“%1”",t.Msg.DELETE_VARIABLE_CONFIRMATION="要删除对变量“%2”的%1个引用吗？",t.Msg.DELETE_X_BLOCKS="删除 %1 个块",t.Msg.DISABLE_BLOCK="禁用块",t.Msg.DUPLICATE_BLOCK="复制",t.Msg.DUPLICATE_COMMENT="复制注释",t.Msg.ENABLE_BLOCK="启用块",t.Msg.EXPAND_ALL="展开块",t.Msg.EXPAND_BLOCK="展开块",t.Msg.EXTERNAL_INPUTS="外部输入",t.Msg.HELP="帮助",t.Msg.INLINE_INPUTS="单行输入",t.Msg.IOS_CANCEL="取消",t.Msg.IOS_ERROR="错误",t.Msg.IOS_OK="确定",t.Msg.IOS_PROCEDURES_ADD_INPUT="+ 添加输入",t.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS="允许的语句",t.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR="这个函数有多个输入。",t.Msg.IOS_PROCEDURES_INPUTS="输入",t.Msg.IOS_VARIABLES_ADD_BUTTON="添加",t.Msg.IOS_VARIABLES_ADD_VARIABLE="+ 添加变量",t.Msg.IOS_VARIABLES_DELETE_BUTTON="删除",t.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR="你不能使用空白的变量名。",t.Msg.IOS_VARIABLES_RENAME_BUTTON="重命名",t.Msg.IOS_VARIABLES_VARIABLE_NAME="变量名",t.Msg.LISTS_CREATE_EMPTY_HELPURL="https://github.com/google/blockly/wiki/Lists#create-empty-list",t.Msg.LISTS_CREATE_EMPTY_TITLE="创建空列表",t.Msg.LISTS_CREATE_EMPTY_TOOLTIP="返回一个列表，长度为 0，不包含任何数据记录",t.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD="列表",t.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP="增加、删除或重新排列各部分以此重新配置这个列表块。",t.Msg.LISTS_CREATE_WITH_HELPURL="https://github.com/google/blockly/wiki/Lists#create-list-with",t.Msg.LISTS_CREATE_WITH_INPUT_WITH="创建列表，内容：",t.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP="将一个项添加到列表中。",t.Msg.LISTS_CREATE_WITH_TOOLTIP="建立一个具有任意数量项目的列表。",t.Msg.LISTS_GET_INDEX_FIRST="第一项",t.Msg.LISTS_GET_INDEX_FROM_END="倒数第#项",t.Msg.LISTS_GET_INDEX_FROM_START="#",t.Msg.LISTS_GET_INDEX_GET="取得",t.Msg.LISTS_GET_INDEX_GET_REMOVE="取得并移除",t.Msg.LISTS_GET_INDEX_LAST="最后一项",t.Msg.LISTS_GET_INDEX_RANDOM="随机的一项",t.Msg.LISTS_GET_INDEX_REMOVE="移除",t.Msg.LISTS_GET_INDEX_TAIL="-",t.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FIRST="返回列表中的第一项。",t.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM="返回在列表中的指定位置的项。",t.Msg.LISTS_GET_INDEX_TOOLTIP_GET_LAST="返回列表中的最后一项。",t.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM="返回列表中的随机一项。",t.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST="移除并返回列表中的第一项。",t.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM="移除并返回列表中的指定位置的项。",t.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST="移除并返回列表中的最后一项。",t.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM="移除并返回列表中的随机一项。",t.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST="移除列表中的第一项",t.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM="移除在列表中的指定位置的项。",t.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST="移除列表中的最后一项",t.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM="删除列表中的随机一项。",t.Msg.LISTS_GET_SUBLIST_END_FROM_END="到倒数第#项",t.Msg.LISTS_GET_SUBLIST_END_FROM_START="到第#项",t.Msg.LISTS_GET_SUBLIST_END_LAST="到最后一项",t.Msg.LISTS_GET_SUBLIST_HELPURL="https://github.com/google/blockly/wiki/Lists#getting-a-sublist",t.Msg.LISTS_GET_SUBLIST_START_FIRST="获取子列表，从第一项",t.Msg.LISTS_GET_SUBLIST_START_FROM_END="获取子列表，从倒数第#项",t.Msg.LISTS_GET_SUBLIST_START_FROM_START="获取子列表，从第#项",t.Msg.LISTS_GET_SUBLIST_TAIL="-",t.Msg.LISTS_GET_SUBLIST_TOOLTIP="复制列表中指定的部分。",t.Msg.LISTS_INDEX_FROM_END_TOOLTIP="%1是最后一项。",t.Msg.LISTS_INDEX_FROM_START_TOOLTIP="%1是第一项。",t.Msg.LISTS_INDEX_OF_FIRST="寻找第一次出现的项",t.Msg.LISTS_INDEX_OF_HELPURL="https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list",t.Msg.LISTS_INDEX_OF_LAST="寻找最后一次出现的项",t.Msg.LISTS_INDEX_OF_TOOLTIP="返回在列表中的第一/最后一个匹配项的索引值。如果找不到项目则返回%1。",t.Msg.LISTS_INLIST="在列表中",t.Msg.LISTS_ISEMPTY_HELPURL="https://github.com/google/blockly/wiki/Lists#is-empty",t.Msg.LISTS_ISEMPTY_TITLE="%1是空的",t.Msg.LISTS_ISEMPTY_TOOLTIP="如果改列表为空，则返回真。",t.Msg.LISTS_LENGTH_HELPURL="https://github.com/google/blockly/wiki/Lists#length-of",t.Msg.LISTS_LENGTH_TITLE="%1的长度",t.Msg.LISTS_LENGTH_TOOLTIP="返回列表的长度。",t.Msg.LISTS_REPEAT_HELPURL="https://github.com/google/blockly/wiki/Lists#create-list-with",t.Msg.LISTS_REPEAT_TITLE="建立列表使用项 %1 重复 %2 次",t.Msg.LISTS_REPEAT_TOOLTIP="建立包含指定重复次数的值的列表。",t.Msg.LISTS_REVERSE_HELPURL="https://github.com/google/blockly/wiki/Lists#reversing-a-list",t.Msg.LISTS_REVERSE_MESSAGE0="倒转%1",t.Msg.LISTS_REVERSE_TOOLTIP="倒转一个列表，返回副本。",t.Msg.LISTS_SET_INDEX_HELPURL="https://github.com/google/blockly/wiki/Lists#in-list--set",t.Msg.LISTS_SET_INDEX_INPUT_TO="值为",t.Msg.LISTS_SET_INDEX_INSERT="插入在",t.Msg.LISTS_SET_INDEX_SET="设置",t.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST="在列表的起始处添加该项。",t.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM="在列表中指定位置插入项。",t.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST="在列表的末尾处添加该项。",t.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM="在列表的随机位置插入该项。",t.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST="设置列表中的第一项。",t.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM="设置在列表中指定位置的项。",t.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST="设置列表中的最后一项。",t.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM="设置列表中的随机一项。",t.Msg.LISTS_SORT_HELPURL="https://github.com/google/blockly/wiki/Lists#sorting-a-list",t.Msg.LISTS_SORT_ORDER_ASCENDING="升序",t.Msg.LISTS_SORT_ORDER_DESCENDING="降序",t.Msg.LISTS_SORT_TITLE="排序%1 %2 %3",t.Msg.LISTS_SORT_TOOLTIP="排序一个列表，返回副本。",t.Msg.LISTS_SORT_TYPE_IGNORECASE="按字母（忽略大小写）",t.Msg.LISTS_SORT_TYPE_NUMERIC="按数字",t.Msg.LISTS_SORT_TYPE_TEXT="按字母",t.Msg.LISTS_SPLIT_HELPURL="https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists",t.Msg.LISTS_SPLIT_LIST_FROM_TEXT="从文本制作列表",t.Msg.LISTS_SPLIT_TEXT_FROM_LIST="将列表合并为文本",t.Msg.LISTS_SPLIT_TOOLTIP_JOIN="加入文本列表至一个文本，由分隔符分隔。",t.Msg.LISTS_SPLIT_TOOLTIP_SPLIT="将文本按指定的分隔符拆分为文本组成的列表。",t.Msg.LISTS_SPLIT_WITH_DELIMITER="分隔符：",t.Msg.LOGIC_BOOLEAN_FALSE="假",t.Msg.LOGIC_BOOLEAN_HELPURL="https://github.com/google/blockly/wiki/Logic#values",t.Msg.LOGIC_BOOLEAN_TOOLTIP="返回真或假。",t.Msg.LOGIC_BOOLEAN_TRUE="真",t.Msg.LOGIC_COMPARE_HELPURL="https://zh.wikipedia.org/wiki/不等",t.Msg.LOGIC_COMPARE_TOOLTIP_EQ="如果两个输入结果相等，则返回真。",t.Msg.LOGIC_COMPARE_TOOLTIP_GT="如果第一个输入结果比第二个大，则返回真。",t.Msg.LOGIC_COMPARE_TOOLTIP_GTE="如果第一个输入结果大于或等于第二个输入结果，则返回真。",t.Msg.LOGIC_COMPARE_TOOLTIP_LT="如果第一个输入结果比第二个小，则返回真。",t.Msg.LOGIC_COMPARE_TOOLTIP_LTE="如果第一个输入结果小于或等于第二个输入结果，则返回真。",t.Msg.LOGIC_COMPARE_TOOLTIP_NEQ="如果两个输入结果不相等，则返回真。",t.Msg.LOGIC_NEGATE_HELPURL="https://github.com/google/blockly/wiki/Logic#not",t.Msg.LOGIC_NEGATE_TITLE="%1不成立",t.Msg.LOGIC_NEGATE_TOOLTIP="如果输入结果为假，则返回真；如果输入结果为真，则返回假。",t.Msg.LOGIC_NULL="空",t.Msg.LOGIC_NULL_HELPURL="https://en.wikipedia.org/wiki/Nullable_type",t.Msg.LOGIC_NULL_TOOLTIP="返回空值。",t.Msg.LOGIC_OPERATION_AND="并且",t.Msg.LOGIC_OPERATION_HELPURL="https://github.com/google/blockly/wiki/Logic#logical-operations",t.Msg.LOGIC_OPERATION_OR="或",t.Msg.LOGIC_OPERATION_TOOLTIP_AND="如果两个输入结果都为真，则返回真。",t.Msg.LOGIC_OPERATION_TOOLTIP_OR="如果至少有一个输入结果为真，则返回真。",t.Msg.LOGIC_TERNARY_CONDITION="断言",t.Msg.LOGIC_TERNARY_HELPURL="https://zh.wikipedia.org/wiki/条件运算符",t.Msg.LOGIC_TERNARY_IF_FALSE="如果为假",t.Msg.LOGIC_TERNARY_IF_TRUE="如果为真",t.Msg.LOGIC_TERNARY_TOOLTIP="检查“断言”里的条件语句。如果条件为真，则返回“如果为真”的值，否则，则返回“如果为假”的值。",t.Msg.MATH_ADDITION_SYMBOL="+",t.Msg.MATH_ARITHMETIC_HELPURL="https://zh.wikipedia.org/wiki/算术",t.Msg.MATH_ARITHMETIC_TOOLTIP_ADD="返回两个数值的和。",t.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE="返回两个数值的商。",t.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS="返回两个数值的差。",t.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY="返回两个数值的乘积。",t.Msg.MATH_ARITHMETIC_TOOLTIP_POWER="返回以第一个数值为底数，以第二个数值为幂的结果。",t.Msg.MATH_ATAN2_HELPURL="https://zh.wikipedia.org/wiki/反正切2",t.Msg.MATH_ATAN2_TITLE="点(x:%1,y:%2)的方位角",t.Msg.MATH_ATAN2_TOOLTIP="返回点（X，Y）的反正切值，范围为-180到180度。",t.Msg.MATH_CHANGE_HELPURL="https://zh.wikipedia.org/wiki/加法",t.Msg.MATH_CHANGE_TITLE="将 %1 增加 %2",t.Msg.MATH_CHANGE_TOOLTIP="为变量“%1”增加一个数值。",t.Msg.MATH_CONSTANT_HELPURL="https://zh.wikipedia.org/wiki/数学常数",t.Msg.MATH_CONSTANT_TOOLTIP="返回一个常见常量：π (3.141…)、e (2.718…)、φ (1.618…)、根号2 (1.414…)、根号二分之一 (0.707…)或∞ (无穷大)。",t.Msg.MATH_CONSTRAIN_HELPURL="https://en.wikipedia.org/wiki/Clamping_(graphics)",t.Msg.MATH_CONSTRAIN_TITLE="将 %1 限制在 最低 %2 到最高 %3 之间",t.Msg.MATH_CONSTRAIN_TOOLTIP="将一个数值限制在两个指定的数值范围（含边界）之间。",t.Msg.MATH_DIVISION_SYMBOL="÷",t.Msg.MATH_IS_DIVISIBLE_BY="可被整除",t.Msg.MATH_IS_EVEN="是偶数",t.Msg.MATH_IS_NEGATIVE="是负数",t.Msg.MATH_IS_ODD="是奇数",t.Msg.MATH_IS_POSITIVE="是正数",t.Msg.MATH_IS_PRIME="是质数",t.Msg.MATH_IS_TOOLTIP="检查一个数值是否是偶数、奇数、质数、自然数、正数、负数或者是否能被某数整除。返回真或假。",t.Msg.MATH_IS_WHOLE="是整数",t.Msg.MATH_MODULO_HELPURL="https://zh.wikipedia.org/wiki/模除",t.Msg.MATH_MODULO_TITLE="取 %1 ÷ %2 的余数",t.Msg.MATH_MODULO_TOOLTIP="返回这两个数字相除后的余数。",t.Msg.MATH_MULTIPLICATION_SYMBOL="×",t.Msg.MATH_NUMBER_HELPURL="https://zh.wikipedia.org/wiki/数",t.Msg.MATH_NUMBER_TOOLTIP="一个数值。",t.Msg.MATH_ONLIST_HELPURL="",t.Msg.MATH_ONLIST_OPERATOR_AVERAGE="列表平均值",t.Msg.MATH_ONLIST_OPERATOR_MAX="列表最大值",t.Msg.MATH_ONLIST_OPERATOR_MEDIAN="列表中位数",t.Msg.MATH_ONLIST_OPERATOR_MIN="列表最小值",t.Msg.MATH_ONLIST_OPERATOR_MODE="列表中的众数",t.Msg.MATH_ONLIST_OPERATOR_RANDOM="列表中的随机一项",t.Msg.MATH_ONLIST_OPERATOR_STD_DEV="列表的标准差",t.Msg.MATH_ONLIST_OPERATOR_SUM="列表中数值的和",t.Msg.MATH_ONLIST_TOOLTIP_AVERAGE="返回列表中的数值的平均值。",t.Msg.MATH_ONLIST_TOOLTIP_MAX="返回列表中最大值。",t.Msg.MATH_ONLIST_TOOLTIP_MEDIAN="返回列表中数值的中位数。",t.Msg.MATH_ONLIST_TOOLTIP_MIN="返回列表中最小值。",t.Msg.MATH_ONLIST_TOOLTIP_MODE="返回列表中的出现次数最多的项的列表。",t.Msg.MATH_ONLIST_TOOLTIP_RANDOM="从列表中返回一个随机的元素。",t.Msg.MATH_ONLIST_TOOLTIP_STD_DEV="返回列表的标准差。",t.Msg.MATH_ONLIST_TOOLTIP_SUM="返回列表中的所有数值的和。",t.Msg.MATH_POWER_SYMBOL="^",t.Msg.MATH_RANDOM_FLOAT_HELPURL="https://zh.wikipedia.org/wiki/随机数生成器",t.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM="随机小数",t.Msg.MATH_RANDOM_FLOAT_TOOLTIP="返回一个从0.0（含）到1.0（不含）之间的随机数。",t.Msg.MATH_RANDOM_INT_HELPURL="https://zh.wikipedia.org/wiki/随机数生成器",t.Msg.MATH_RANDOM_INT_TITLE="从 %1 到 %2 范围内的随机整数",t.Msg.MATH_RANDOM_INT_TOOLTIP="返回一个限制在两个指定数值的范围（含边界）之间的随机整数。",t.Msg.MATH_ROUND_HELPURL="https://zh.wikipedia.org/wiki/数值修约",t.Msg.MATH_ROUND_OPERATOR_ROUND="四舍五入",t.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN="向下舍入",t.Msg.MATH_ROUND_OPERATOR_ROUNDUP="向上舍入",t.Msg.MATH_ROUND_TOOLTIP="数字向上或向下舍入。",t.Msg.MATH_SINGLE_HELPURL="https://zh.wikipedia.org/wiki/平方根",t.Msg.MATH_SINGLE_OP_ABSOLUTE="绝对值",t.Msg.MATH_SINGLE_OP_ROOT="平方根",t.Msg.MATH_SINGLE_TOOLTIP_ABS="返回一个数值的绝对值。",t.Msg.MATH_SINGLE_TOOLTIP_EXP="返回一个数值的e次幂。",t.Msg.MATH_SINGLE_TOOLTIP_LN="返回一个数值的自然对数。",t.Msg.MATH_SINGLE_TOOLTIP_LOG10="返回一个数值的以10为底的对数。",t.Msg.MATH_SINGLE_TOOLTIP_NEG="返回一个数值的相反数。",t.Msg.MATH_SINGLE_TOOLTIP_POW10="返回一个数值的10次幂。",t.Msg.MATH_SINGLE_TOOLTIP_ROOT="返回一个数的平方根。",t.Msg.MATH_SUBTRACTION_SYMBOL="-",t.Msg.MATH_TRIG_ACOS="acos",t.Msg.MATH_TRIG_ASIN="asin",t.Msg.MATH_TRIG_ATAN="atan",t.Msg.MATH_TRIG_COS="cos",t.Msg.MATH_TRIG_HELPURL="https://zh.wikipedia.org/wiki/三角函数",t.Msg.MATH_TRIG_SIN="sin",t.Msg.MATH_TRIG_TAN="tan",t.Msg.MATH_TRIG_TOOLTIP_ACOS="返回一个数值的反余弦值。",t.Msg.MATH_TRIG_TOOLTIP_ASIN="返回一个数值的反正弦值。",t.Msg.MATH_TRIG_TOOLTIP_ATAN="返回一个数值的反正切值。",t.Msg.MATH_TRIG_TOOLTIP_COS="返回指定角度的余弦值（非弧度）。",t.Msg.MATH_TRIG_TOOLTIP_SIN="返回指定角度的正弦值（非弧度）。",t.Msg.MATH_TRIG_TOOLTIP_TAN="返回指定角度的正切值（非弧度）。",t.Msg.NEW_COLOUR_VARIABLE="创建颜色变量...",t.Msg.NEW_NUMBER_VARIABLE="创建数字变量...",t.Msg.NEW_STRING_VARIABLE="创建字符串变量...",t.Msg.NEW_VARIABLE="创建变量...",t.Msg.NEW_VARIABLE_TITLE="新变量的名称：",t.Msg.NEW_VARIABLE_TYPE_TITLE="新变量的类型：",t.Msg.ORDINAL_NUMBER_SUFFIX="-",t.Msg.PROCEDURES_ALLOW_STATEMENTS="允许声明",t.Msg.PROCEDURES_BEFORE_PARAMS="与：",t.Msg.PROCEDURES_CALLNORETURN_HELPURL="https://zh.wikipedia.org/wiki/子程序",t.Msg.PROCEDURES_CALLNORETURN_TOOLTIP="运行用户定义的函数“%1”。",t.Msg.PROCEDURES_CALLRETURN_HELPURL="https://zh.wikipedia.org/wiki/子程序",t.Msg.PROCEDURES_CALLRETURN_TOOLTIP="运行用户定义的函数“%1”，并使用它的输出值。",t.Msg.PROCEDURES_CALL_BEFORE_PARAMS="与：",t.Msg.PROCEDURES_CREATE_DO="创建“%1”",t.Msg.PROCEDURES_DEFNORETURN_COMMENT="描述该功能...",t.Msg.PROCEDURES_DEFNORETURN_DO="-",t.Msg.PROCEDURES_DEFNORETURN_HELPURL="https://zh.wikipedia.org/wiki/子程序",t.Msg.PROCEDURES_DEFNORETURN_PROCEDURE="做点什么",t.Msg.PROCEDURES_DEFNORETURN_TITLE="至",t.Msg.PROCEDURES_DEFNORETURN_TOOLTIP="创建一个不带输出值的函数。",t.Msg.PROCEDURES_DEFRETURN_HELPURL="https://zh.wikipedia.org/wiki/子程序",t.Msg.PROCEDURES_DEFRETURN_RETURN="返回",t.Msg.PROCEDURES_DEFRETURN_TOOLTIP="创建一个有输出值的函数。",t.Msg.PROCEDURES_DEF_DUPLICATE_WARNING="警告：此函数具有重复参数。",t.Msg.PROCEDURES_HIGHLIGHT_DEF="突出显示函数定义",t.Msg.PROCEDURES_IFRETURN_HELPURL="http://c2.com/cgi/wiki?GuardClause",t.Msg.PROCEDURES_IFRETURN_TOOLTIP="如果值为真，则返回第二个值。",t.Msg.PROCEDURES_IFRETURN_WARNING="警告：这个块只能在函数内部使用。",t.Msg.PROCEDURES_MUTATORARG_TITLE="输入名称：",t.Msg.PROCEDURES_MUTATORARG_TOOLTIP="添加函数输入。",t.Msg.PROCEDURES_MUTATORCONTAINER_TITLE="输入",t.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP="添加、移除或重新排此函数的输入。",t.Msg.REDO="重做",t.Msg.REMOVE_COMMENT="删除注释",t.Msg.RENAME_VARIABLE="重命名变量...",t.Msg.RENAME_VARIABLE_TITLE="将所有“%1”变量重命名为:",t.Msg.TEXT_APPEND_HELPURL="https://github.com/google/blockly/wiki/Text#text-modification",t.Msg.TEXT_APPEND_TITLE="在%1之后加上文本%2",t.Msg.TEXT_APPEND_TOOLTIP="将一些文本追加到变量“%1”里。",t.Msg.TEXT_CHANGECASE_HELPURL="https://github.com/google/blockly/wiki/Text#adjusting-text-case",t.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE="转为小写",t.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE="转为首字母大写",t.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE="转为大写",t.Msg.TEXT_CHANGECASE_TOOLTIP="用不同的大小写模式复制并返回这段文字。",t.Msg.TEXT_CHARAT_FIRST="获取第一个字符",t.Msg.TEXT_CHARAT_FROM_END="获取倒数第#个字符",t.Msg.TEXT_CHARAT_FROM_START="获取第#个字符",t.Msg.TEXT_CHARAT_HELPURL="https://github.com/google/blockly/wiki/Text#extracting-text",t.Msg.TEXT_CHARAT_LAST="获取最后一个字符",t.Msg.TEXT_CHARAT_RANDOM="获取随机一个字符",t.Msg.TEXT_CHARAT_TAIL="-",t.Msg.TEXT_CHARAT_TITLE="在文本%1 里 %2",t.Msg.TEXT_CHARAT_TOOLTIP="返回位于指定位置的字符。",t.Msg.TEXT_COUNT_HELPURL="https://github.com/google/blockly/wiki/Text#counting-substrings",t.Msg.TEXT_COUNT_MESSAGE0="计算%1在%2里出现的次数",t.Msg.TEXT_COUNT_TOOLTIP="计算在一段文本中，某个部分文本重复出现了多少次。",t.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP="将一个项添加到文本中。",t.Msg.TEXT_CREATE_JOIN_TITLE_JOIN="拼接",t.Msg.TEXT_CREATE_JOIN_TOOLTIP="添加、移除或重新排列各节来重新配置这个文本块。",t.Msg.TEXT_GET_SUBSTRING_END_FROM_END="到倒数第#个字符",t.Msg.TEXT_GET_SUBSTRING_END_FROM_START="到第#个字符",t.Msg.TEXT_GET_SUBSTRING_END_LAST="到最后一个字符",t.Msg.TEXT_GET_SUBSTRING_HELPURL="https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text",t.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT="从文本",t.Msg.TEXT_GET_SUBSTRING_START_FIRST="获取子串，从第一个字符",t.Msg.TEXT_GET_SUBSTRING_START_FROM_END="获取子串，从倒数第#个字符",t.Msg.TEXT_GET_SUBSTRING_START_FROM_START="获取子串，从第#个字符",t.Msg.TEXT_GET_SUBSTRING_TAIL="-",t.Msg.TEXT_GET_SUBSTRING_TOOLTIP="返回文本中指定的一部分。",t.Msg.TEXT_INDEXOF_HELPURL="https://github.com/google/blockly/wiki/Text#finding-text",t.Msg.TEXT_INDEXOF_OPERATOR_FIRST="寻找第一次出现的文本",t.Msg.TEXT_INDEXOF_OPERATOR_LAST="寻找最后一次出现的文本",t.Msg.TEXT_INDEXOF_TITLE="在文本 %1 里 %2  %3",t.Msg.TEXT_INDEXOF_TOOLTIP="返回第一个文本段在第二个文本段中的第一/最后一个匹配项的起始位置。如果未找到，则返回%1。",t.Msg.TEXT_ISEMPTY_HELPURL="https://github.com/google/blockly/wiki/Text#checking-for-empty-text",t.Msg.TEXT_ISEMPTY_TITLE="%1是空的",t.Msg.TEXT_ISEMPTY_TOOLTIP="如果给定的文本为空，则返回真。",t.Msg.TEXT_JOIN_HELPURL="https://github.com/google/blockly/wiki/Text#text-creation",t.Msg.TEXT_JOIN_TITLE_CREATEWITH="创建文本，内容：",t.Msg.TEXT_JOIN_TOOLTIP="通过串起任意数量的项以建立一段文本。",t.Msg.TEXT_LENGTH_HELPURL="https://github.com/google/blockly/wiki/Text#text-modification",t.Msg.TEXT_LENGTH_TITLE="%1的长度",t.Msg.TEXT_LENGTH_TOOLTIP="返回给定文本的字母数（包括空格）。",t.Msg.TEXT_PRINT_HELPURL="https://github.com/google/blockly/wiki/Text#printing-text",t.Msg.TEXT_PRINT_TITLE="输出%1",t.Msg.TEXT_PRINT_TOOLTIP="输出指定的文字、数字或其他值。",t.Msg.TEXT_PROMPT_HELPURL="https://github.com/google/blockly/wiki/Text#getting-input-from-the-user",t.Msg.TEXT_PROMPT_TOOLTIP_NUMBER="要求用户输入数字。",t.Msg.TEXT_PROMPT_TOOLTIP_TEXT="要求用户输入一些文本。",t.Msg.TEXT_PROMPT_TYPE_NUMBER="要求输入数字，并显示提示消息",t.Msg.TEXT_PROMPT_TYPE_TEXT="要求输入文本，并显示提示消息",t.Msg.TEXT_REPLACE_HELPURL="https://github.com/google/blockly/wiki/Text#replacing-substrings",t.Msg.TEXT_REPLACE_MESSAGE0="把%3中的%1替换为%2",t.Msg.TEXT_REPLACE_TOOLTIP="在一段文本中，将出现过的某部分文本都替换掉。",t.Msg.TEXT_REVERSE_HELPURL="https://github.com/google/blockly/wiki/Text#reversing-text",t.Msg.TEXT_REVERSE_MESSAGE0="倒转文本%1",t.Msg.TEXT_REVERSE_TOOLTIP="将文本中各个字符的顺序倒转。",t.Msg.TEXT_TEXT_HELPURL="https://zh.wikipedia.org/wiki/字符串",t.Msg.TEXT_TEXT_TOOLTIP="一个字、词语或一行文本。",t.Msg.TEXT_TRIM_HELPURL="https://github.com/google/blockly/wiki/Text#trimming-removing-spaces",t.Msg.TEXT_TRIM_OPERATOR_BOTH="消除其两侧的空白",t.Msg.TEXT_TRIM_OPERATOR_LEFT="消除其左侧的空白",t.Msg.TEXT_TRIM_OPERATOR_RIGHT="消除其右侧的空白",t.Msg.TEXT_TRIM_TOOLTIP="从某一端或同时从两端删除多余的空白，并返回这段文字的一个副本。",t.Msg.TODAY="今天",t.Msg.UNDO="撤销",t.Msg.UNNAMED_KEY="匿名",t.Msg.VARIABLES_DEFAULT_NAME="项目",t.Msg.VARIABLES_GET_CREATE_SET="创建“设定%1”",t.Msg.VARIABLES_GET_HELPURL="https://github.com/google/blockly/wiki/Variables#get",t.Msg.VARIABLES_GET_TOOLTIP="返回此变量的值。",t.Msg.VARIABLES_SET="赋值 %1 为 %2",t.Msg.VARIABLES_SET_CREATE_GET="创建“获得%1”",t.Msg.VARIABLES_SET_HELPURL="https://github.com/google/blockly/wiki/Variables#set",t.Msg.VARIABLES_SET_TOOLTIP="设置此变量，以使它和输入值相等。",t.Msg.VARIABLE_ALREADY_EXISTS="名字叫“%1”的变量已经存在了。",t.Msg.VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE="名字叫“%1”的变量已经有了另一个类型：“%2”。",t.Msg.WORKSPACE_ARIA_LABEL="Blockly工作区",t.Msg.WORKSPACE_COMMENT_DEFAULT_TEXT="说点什么...",t.Msg.CONTROLS_FOREACH_INPUT_DO=t.Msg.CONTROLS_REPEAT_INPUT_DO,t.Msg.CONTROLS_FOR_INPUT_DO=t.Msg.CONTROLS_REPEAT_INPUT_DO,t.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF=t.Msg.CONTROLS_IF_MSG_ELSEIF,t.Msg.CONTROLS_IF_ELSE_TITLE_ELSE=t.Msg.CONTROLS_IF_MSG_ELSE,t.Msg.CONTROLS_IF_IF_TITLE_IF=t.Msg.CONTROLS_IF_MSG_IF,t.Msg.CONTROLS_IF_MSG_THEN=t.Msg.CONTROLS_REPEAT_INPUT_DO,t.Msg.CONTROLS_WHILEUNTIL_INPUT_DO=t.Msg.CONTROLS_REPEAT_INPUT_DO,t.Msg.LISTS_CREATE_WITH_ITEM_TITLE=t.Msg.VARIABLES_DEFAULT_NAME,t.Msg.LISTS_GET_INDEX_HELPURL=t.Msg.LISTS_INDEX_OF_HELPURL,t.Msg.LISTS_GET_INDEX_INPUT_IN_LIST=t.Msg.LISTS_INLIST,t.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST=t.Msg.LISTS_INLIST,t.Msg.LISTS_INDEX_OF_INPUT_IN_LIST=t.Msg.LISTS_INLIST,t.Msg.LISTS_SET_INDEX_INPUT_IN_LIST=t.Msg.LISTS_INLIST,t.Msg.MATH_CHANGE_TITLE_ITEM=t.Msg.VARIABLES_DEFAULT_NAME,t.Msg.PROCEDURES_DEFRETURN_COMMENT=t.Msg.PROCEDURES_DEFNORETURN_COMMENT,t.Msg.PROCEDURES_DEFRETURN_DO=t.Msg.PROCEDURES_DEFNORETURN_DO,t.Msg.PROCEDURES_DEFRETURN_PROCEDURE=t.Msg.PROCEDURES_DEFNORETURN_PROCEDURE,t.Msg.PROCEDURES_DEFRETURN_TITLE=t.Msg.PROCEDURES_DEFNORETURN_TITLE,t.Msg.TEXT_APPEND_VARIABLE=t.Msg.VARIABLES_DEFAULT_NAME,t.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM=t.Msg.VARIABLES_DEFAULT_NAME,t.Msg.MATH_HUE="230",t.Msg.LOOPS_HUE="120",t.Msg.LISTS_HUE="260",t.Msg.LOGIC_HUE="210",t.Msg.VARIABLES_HUE="330",t.Msg.TEXTS_HUE="160",t.Msg.PROCEDURES_HUE="290",t.Msg.COLOUR_HUE="20",t.Msg.VARIABLES_DYNAMIC_HUE="310",t.Msg},o=[i("xnUL")],void 0===(r="function"==typeof(n=s)?n.apply(e,o):n)||(t.exports=r)},ISYW:function(t,e,i){"use strict";e.__esModule=!0;var n,o=i("7+uW"),r=(n=o)&&n.__esModule?n:{default:n},s=i("2kvA");var a=[],l="@@clickoutsideContext",c=void 0,u=0;function h(t,e,i){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!(i&&i.context&&n.target&&o.target)||t.contains(n.target)||t.contains(o.target)||t===n.target||i.context.popperElm&&(i.context.popperElm.contains(n.target)||i.context.popperElm.contains(o.target))||(e.expression&&t[l].methodName&&i.context[t[l].methodName]?i.context[t[l].methodName]():t[l].bindingFn&&t[l].bindingFn())}}!r.default.prototype.$isServer&&(0,s.on)(document,"mousedown",function(t){return c=t}),!r.default.prototype.$isServer&&(0,s.on)(document,"mouseup",function(t){a.forEach(function(e){return e[l].documentHandler(t,c)})}),e.default={bind:function(t,e,i){a.push(t);var n=u++;t[l]={id:n,documentHandler:h(t,e,i),methodName:e.expression,bindingFn:e.value}},update:function(t,e,i){t[l].documentHandler=h(t,e,i),t[l].methodName=e.expression,t[l].bindingFn=e.value},unbind:function(t){for(var e=a.length,i=0;i<e;i++)if(a[i][l].id===t[l].id){a.splice(i,1);break}delete t[l]}}},Ibhu:function(t,e,i){var n=i("D2L2"),o=i("TcQ7"),r=i("vFc/")(!1),s=i("ax3d")("IE_PROTO");t.exports=function(t,e){var i,a=o(t),l=0,c=[];for(i in a)i!=s&&n(a,i)&&c.push(i);for(;e.length>l;)n(a,i=e[l++])&&(~r(c,i)||c.push(i));return c}},JMbB:function(t,e,i){var n,o,r,s;s=function(t){"use strict";return t.JavaScript=new t.Generator("JavaScript"),t.JavaScript.addReservedWords("break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,in,instanceof,new,return,super,switch,this,throw,try,typeof,var,void,while,with,yield,enum,implements,interface,let,package,private,protected,public,static,await,null,true,false,arguments,"+Object.getOwnPropertyNames(t.utils.global).join(",")),t.JavaScript.ORDER_ATOMIC=0,t.JavaScript.ORDER_NEW=1.1,t.JavaScript.ORDER_MEMBER=1.2,t.JavaScript.ORDER_FUNCTION_CALL=2,t.JavaScript.ORDER_INCREMENT=3,t.JavaScript.ORDER_DECREMENT=3,t.JavaScript.ORDER_BITWISE_NOT=4.1,t.JavaScript.ORDER_UNARY_PLUS=4.2,t.JavaScript.ORDER_UNARY_NEGATION=4.3,t.JavaScript.ORDER_LOGICAL_NOT=4.4,t.JavaScript.ORDER_TYPEOF=4.5,t.JavaScript.ORDER_VOID=4.6,t.JavaScript.ORDER_DELETE=4.7,t.JavaScript.ORDER_AWAIT=4.8,t.JavaScript.ORDER_EXPONENTIATION=5,t.JavaScript.ORDER_MULTIPLICATION=5.1,t.JavaScript.ORDER_DIVISION=5.2,t.JavaScript.ORDER_MODULUS=5.3,t.JavaScript.ORDER_SUBTRACTION=6.1,t.JavaScript.ORDER_ADDITION=6.2,t.JavaScript.ORDER_BITWISE_SHIFT=7,t.JavaScript.ORDER_RELATIONAL=8,t.JavaScript.ORDER_IN=8,t.JavaScript.ORDER_INSTANCEOF=8,t.JavaScript.ORDER_EQUALITY=9,t.JavaScript.ORDER_BITWISE_AND=10,t.JavaScript.ORDER_BITWISE_XOR=11,t.JavaScript.ORDER_BITWISE_OR=12,t.JavaScript.ORDER_LOGICAL_AND=13,t.JavaScript.ORDER_LOGICAL_OR=14,t.JavaScript.ORDER_CONDITIONAL=15,t.JavaScript.ORDER_ASSIGNMENT=16,t.JavaScript.ORDER_YIELD=17,t.JavaScript.ORDER_COMMA=18,t.JavaScript.ORDER_NONE=99,t.JavaScript.ORDER_OVERRIDES=[[t.JavaScript.ORDER_FUNCTION_CALL,t.JavaScript.ORDER_MEMBER],[t.JavaScript.ORDER_FUNCTION_CALL,t.JavaScript.ORDER_FUNCTION_CALL],[t.JavaScript.ORDER_MEMBER,t.JavaScript.ORDER_MEMBER],[t.JavaScript.ORDER_MEMBER,t.JavaScript.ORDER_FUNCTION_CALL],[t.JavaScript.ORDER_LOGICAL_NOT,t.JavaScript.ORDER_LOGICAL_NOT],[t.JavaScript.ORDER_MULTIPLICATION,t.JavaScript.ORDER_MULTIPLICATION],[t.JavaScript.ORDER_ADDITION,t.JavaScript.ORDER_ADDITION],[t.JavaScript.ORDER_LOGICAL_AND,t.JavaScript.ORDER_LOGICAL_AND],[t.JavaScript.ORDER_LOGICAL_OR,t.JavaScript.ORDER_LOGICAL_OR]],t.JavaScript.isInitialized=!1,t.JavaScript.init=function(e){Object.getPrototypeOf(this).init.call(this),this.nameDB_?this.nameDB_.reset():this.nameDB_=new t.Names(this.RESERVED_WORDS_),this.nameDB_.setVariableMap(e.getVariableMap()),this.nameDB_.populateVariables(e),this.nameDB_.populateProcedures(e);for(var i=[],n=t.Variables.allDeveloperVariables(e),o=0;o<n.length;o++)i.push(this.nameDB_.getName(n[o],t.Names.DEVELOPER_VARIABLE_TYPE));for(e=t.Variables.allUsedVarModels(e),o=0;o<e.length;o++)i.push(this.nameDB_.getName(e[o].getId(),t.VARIABLE_CATEGORY_NAME));i.length&&(this.definitions_.variables="var "+i.join(", ")+";"),this.isInitialized=!0},t.JavaScript.finish=function(e){var i=t.utils.object.values(this.definitions_);return e=Object.getPrototypeOf(this).finish.call(this,e),this.isInitialized=!1,this.nameDB_.reset(),i.join("\n\n")+"\n\n\n"+e},t.JavaScript.scrubNakedValue=function(t){return t+";\n"},t.JavaScript.quote_=function(t){return"'"+(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n").replace(/'/g,"\\'"))+"'"},t.JavaScript.multiline_quote_=function(t){return t.split(/\n/g).map(this.quote_).join(" + '\\n' +\n")},t.JavaScript.scrub_=function(e,i,n){var o="";if(!e.outputConnection||!e.outputConnection.targetConnection){var r=e.getCommentText();r&&(r=t.utils.string.wrap(r,this.COMMENT_WRAP-3),o+=this.prefixLines(r+"\n","// "));for(var s=0;s<e.inputList.length;s++)e.inputList[s].type==t.inputTypes.VALUE&&(r=e.inputList[s].connection.targetBlock())&&(r=this.allNestedComments(r))&&(o+=this.prefixLines(r,"// "))}return e=e.nextConnection&&e.nextConnection.targetBlock(),o+i+(n=n?"":this.blockToCode(e))},t.JavaScript.getAdjusted=function(e,i,n,o,r){n=n||0,r=r||this.ORDER_NONE,e.workspace.options.oneBasedIndex&&n--;var s=e.workspace.options.oneBasedIndex?"1":"0";if(e=0<n?this.valueToCode(e,i,this.ORDER_ADDITION)||s:0>n?this.valueToCode(e,i,this.ORDER_SUBTRACTION)||s:o?this.valueToCode(e,i,this.ORDER_UNARY_NEGATION)||s:this.valueToCode(e,i,r)||s,t.isNumber(e))e=Number(e)+n,o&&(e=-e);else{if(0<n){e=e+" + "+n;var a=this.ORDER_ADDITION}else 0>n&&(e=e+" - "+-n,a=this.ORDER_SUBTRACTION);o&&(e=n?"-("+e+")":"-"+e,a=this.ORDER_UNARY_NEGATION),a=Math.floor(a),r=Math.floor(r),a&&r>=a&&(e="("+e+")")}return e},t.JavaScript.colour={},t.JavaScript.colour_picker=function(e){return[t.JavaScript.quote_(e.getFieldValue("COLOUR")),t.JavaScript.ORDER_ATOMIC]},t.JavaScript.colour_random=function(e){return[t.JavaScript.provideFunction_("colourRandom",["function "+t.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"() {","  var num = Math.floor(Math.random() * Math.pow(2, 24));","  return '#' + ('00000' + num.toString(16)).substr(-6);","}"])+"()",t.JavaScript.ORDER_FUNCTION_CALL]},t.JavaScript.colour_rgb=function(e){var i=t.JavaScript.valueToCode(e,"RED",t.JavaScript.ORDER_NONE)||0,n=t.JavaScript.valueToCode(e,"GREEN",t.JavaScript.ORDER_NONE)||0;return e=t.JavaScript.valueToCode(e,"BLUE",t.JavaScript.ORDER_NONE)||0,[t.JavaScript.provideFunction_("colourRgb",["function "+t.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(r, g, b) {","  r = Math.max(Math.min(Number(r), 100), 0) * 2.55;","  g = Math.max(Math.min(Number(g), 100), 0) * 2.55;","  b = Math.max(Math.min(Number(b), 100), 0) * 2.55;","  r = ('0' + (Math.round(r) || 0).toString(16)).slice(-2);","  g = ('0' + (Math.round(g) || 0).toString(16)).slice(-2);","  b = ('0' + (Math.round(b) || 0).toString(16)).slice(-2);","  return '#' + r + g + b;","}"])+"("+i+", "+n+", "+e+")",t.JavaScript.ORDER_FUNCTION_CALL]},t.JavaScript.colour_blend=function(e){var i=t.JavaScript.valueToCode(e,"COLOUR1",t.JavaScript.ORDER_NONE)||"'#000000'",n=t.JavaScript.valueToCode(e,"COLOUR2",t.JavaScript.ORDER_NONE)||"'#000000'";return e=t.JavaScript.valueToCode(e,"RATIO",t.JavaScript.ORDER_NONE)||.5,[t.JavaScript.provideFunction_("colourBlend",["function "+t.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(c1, c2, ratio) {","  ratio = Math.max(Math.min(Number(ratio), 1), 0);","  var r1 = parseInt(c1.substring(1, 3), 16);","  var g1 = parseInt(c1.substring(3, 5), 16);","  var b1 = parseInt(c1.substring(5, 7), 16);","  var r2 = parseInt(c2.substring(1, 3), 16);","  var g2 = parseInt(c2.substring(3, 5), 16);","  var b2 = parseInt(c2.substring(5, 7), 16);","  var r = Math.round(r1 * (1 - ratio) + r2 * ratio);","  var g = Math.round(g1 * (1 - ratio) + g2 * ratio);","  var b = Math.round(b1 * (1 - ratio) + b2 * ratio);","  r = ('0' + (r || 0).toString(16)).slice(-2);","  g = ('0' + (g || 0).toString(16)).slice(-2);","  b = ('0' + (b || 0).toString(16)).slice(-2);","  return '#' + r + g + b;","}"])+"("+i+", "+n+", "+e+")",t.JavaScript.ORDER_FUNCTION_CALL]},t.JavaScript.lists={},t.JavaScript.lists_create_empty=function(e){return["[]",t.JavaScript.ORDER_ATOMIC]},t.JavaScript.lists_create_with=function(e){for(var i=Array(e.itemCount_),n=0;n<e.itemCount_;n++)i[n]=t.JavaScript.valueToCode(e,"ADD"+n,t.JavaScript.ORDER_NONE)||"null";return["["+i.join(", ")+"]",t.JavaScript.ORDER_ATOMIC]},t.JavaScript.lists_repeat=function(e){return[t.JavaScript.provideFunction_("listsRepeat",["function "+t.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(value, n) {","  var array = [];","  for (var i = 0; i < n; i++) {","    array[i] = value;","  }","  return array;","}"])+"("+(t.JavaScript.valueToCode(e,"ITEM",t.JavaScript.ORDER_NONE)||"null")+", "+(e=t.JavaScript.valueToCode(e,"NUM",t.JavaScript.ORDER_NONE)||"0")+")",t.JavaScript.ORDER_FUNCTION_CALL]},t.JavaScript.lists_length=function(e){return[(t.JavaScript.valueToCode(e,"VALUE",t.JavaScript.ORDER_MEMBER)||"[]")+".length",t.JavaScript.ORDER_MEMBER]},t.JavaScript.lists_isEmpty=function(e){return["!"+(t.JavaScript.valueToCode(e,"VALUE",t.JavaScript.ORDER_MEMBER)||"[]")+".length",t.JavaScript.ORDER_LOGICAL_NOT]},t.JavaScript.lists_indexOf=function(e){var i="FIRST"==e.getFieldValue("END")?"indexOf":"lastIndexOf",n=t.JavaScript.valueToCode(e,"FIND",t.JavaScript.ORDER_NONE)||"''";return i=(t.JavaScript.valueToCode(e,"VALUE",t.JavaScript.ORDER_MEMBER)||"[]")+"."+i+"("+n+")",e.workspace.options.oneBasedIndex?[i+" + 1",t.JavaScript.ORDER_ADDITION]:[i,t.JavaScript.ORDER_FUNCTION_CALL]},t.JavaScript.lists_getIndex=function(e){var i=e.getFieldValue("MODE")||"GET",n=e.getFieldValue("WHERE")||"FROM_START",o=t.JavaScript.valueToCode(e,"VALUE","RANDOM"==n?t.JavaScript.ORDER_NONE:t.JavaScript.ORDER_MEMBER)||"[]";switch(n){case"FIRST":if("GET"==i)return[o+"[0]",t.JavaScript.ORDER_MEMBER];if("GET_REMOVE"==i)return[o+".shift()",t.JavaScript.ORDER_MEMBER];if("REMOVE"==i)return o+".shift();\n";break;case"LAST":if("GET"==i)return[o+".slice(-1)[0]",t.JavaScript.ORDER_MEMBER];if("GET_REMOVE"==i)return[o+".pop()",t.JavaScript.ORDER_MEMBER];if("REMOVE"==i)return o+".pop();\n";break;case"FROM_START":if(e=t.JavaScript.getAdjusted(e,"AT"),"GET"==i)return[o+"["+e+"]",t.JavaScript.ORDER_MEMBER];if("GET_REMOVE"==i)return[o+".splice("+e+", 1)[0]",t.JavaScript.ORDER_FUNCTION_CALL];if("REMOVE"==i)return o+".splice("+e+", 1);\n";break;case"FROM_END":if(e=t.JavaScript.getAdjusted(e,"AT",1,!0),"GET"==i)return[o+".slice("+e+")[0]",t.JavaScript.ORDER_FUNCTION_CALL];if("GET_REMOVE"==i)return[o+".splice("+e+", 1)[0]",t.JavaScript.ORDER_FUNCTION_CALL];if("REMOVE"==i)return o+".splice("+e+", 1);";break;case"RANDOM":if(o=t.JavaScript.provideFunction_("listsGetRandomItem",["function "+t.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(list, remove) {","  var x = Math.floor(Math.random() * list.length);","  if (remove) {","    return list.splice(x, 1)[0];","  } else {","    return list[x];","  }","}"])+"("+o+", "+("GET"!=i)+")","GET"==i||"GET_REMOVE"==i)return[o,t.JavaScript.ORDER_FUNCTION_CALL];if("REMOVE"==i)return o+";\n"}throw Error("Unhandled combination (lists_getIndex).")},t.JavaScript.lists_setIndex=function(e){function i(){if(n.match(/^\w+$/))return"";var e=t.JavaScript.nameDB_.getDistinctName("tmpList",t.VARIABLE_CATEGORY_NAME),i="var "+e+" = "+n+";\n";return n=e,i}var n=t.JavaScript.valueToCode(e,"LIST",t.JavaScript.ORDER_MEMBER)||"[]",o=e.getFieldValue("MODE")||"GET",r=e.getFieldValue("WHERE")||"FROM_START",s=t.JavaScript.valueToCode(e,"TO",t.JavaScript.ORDER_ASSIGNMENT)||"null";switch(r){case"FIRST":if("SET"==o)return n+"[0] = "+s+";\n";if("INSERT"==o)return n+".unshift("+s+");\n";break;case"LAST":if("SET"==o)return(e=i())+(n+"[")+n+".length - 1] = "+s+";\n";if("INSERT"==o)return n+".push("+s+");\n";break;case"FROM_START":if(r=t.JavaScript.getAdjusted(e,"AT"),"SET"==o)return n+"["+r+"] = "+s+";\n";if("INSERT"==o)return n+".splice("+r+", 0, "+s+");\n";break;case"FROM_END":if(r=t.JavaScript.getAdjusted(e,"AT",1,!1,t.JavaScript.ORDER_SUBTRACTION),e=i(),"SET"==o)return e+(n+"[")+n+".length - "+r+"] = "+s+";\n";if("INSERT"==o)return e+(n+".splice(")+n+".length - "+r+", 0, "+s+");\n";break;case"RANDOM":if(e=i(),e+="var "+(r=t.JavaScript.nameDB_.getDistinctName("tmpX",t.VARIABLE_CATEGORY_NAME))+" = Math.floor(Math.random() * "+n+".length);\n","SET"==o)return e+(n+"[")+r+"] = "+s+";\n";if("INSERT"==o)return e+(n+".splice(")+r+", 0, "+s+");\n"}throw Error("Unhandled combination (lists_setIndex).")},t.JavaScript.lists.getIndex_=function(t,e,i){return"FIRST"==e?"0":"FROM_END"==e?t+".length - 1 - "+i:"LAST"==e?t+".length - 1":i},t.JavaScript.lists_getSublist=function(e){var i=t.JavaScript.valueToCode(e,"LIST",t.JavaScript.ORDER_MEMBER)||"[]",n=e.getFieldValue("WHERE1"),o=e.getFieldValue("WHERE2");if("FIRST"==n&&"LAST"==o)i+=".slice(0)";else if(i.match(/^\w+$/)||"FROM_END"!=n&&"FROM_START"==o){switch(n){case"FROM_START":var r=t.JavaScript.getAdjusted(e,"AT1");break;case"FROM_END":r=i+".length - "+(r=t.JavaScript.getAdjusted(e,"AT1",1,!1,t.JavaScript.ORDER_SUBTRACTION));break;case"FIRST":r="0";break;default:throw Error("Unhandled option (lists_getSublist).")}switch(o){case"FROM_START":e=t.JavaScript.getAdjusted(e,"AT2",1);break;case"FROM_END":e=i+".length - "+(e=t.JavaScript.getAdjusted(e,"AT2",0,!1,t.JavaScript.ORDER_SUBTRACTION));break;case"LAST":e=i+".length";break;default:throw Error("Unhandled option (lists_getSublist).")}i=i+".slice("+r+", "+e+")"}else{r=t.JavaScript.getAdjusted(e,"AT1"),e=t.JavaScript.getAdjusted(e,"AT2");var s=t.JavaScript.lists.getIndex_,a={FIRST:"First",LAST:"Last",FROM_START:"FromStart",FROM_END:"FromEnd"};i=t.JavaScript.provideFunction_("subsequence"+a[n]+a[o],["function "+t.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(sequence"+("FROM_END"==n||"FROM_START"==n?", at1":"")+("FROM_END"==o||"FROM_START"==o?", at2":"")+") {","  var start = "+s("sequence",n,"at1")+";","  var end = "+s("sequence",o,"at2")+" + 1;","  return sequence.slice(start, end);","}"])+"("+i+("FROM_END"==n||"FROM_START"==n?", "+r:"")+("FROM_END"==o||"FROM_START"==o?", "+e:"")+")"}return[i,t.JavaScript.ORDER_FUNCTION_CALL]},t.JavaScript.lists_sort=function(e){var i=t.JavaScript.valueToCode(e,"LIST",t.JavaScript.ORDER_FUNCTION_CALL)||"[]",n="1"===e.getFieldValue("DIRECTION")?1:-1;return e=e.getFieldValue("TYPE"),[i+".slice().sort("+t.JavaScript.provideFunction_("listsGetSortCompare",["function "+t.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(type, direction) {","  var compareFuncs = {",'    "NUMERIC": function(a, b) {',"        return Number(a) - Number(b); },",'    "TEXT": function(a, b) {',"        return a.toString() > b.toString() ? 1 : -1; },",'    "IGNORE_CASE": function(a, b) {',"        return a.toString().toLowerCase() > b.toString().toLowerCase() ? 1 : -1; },","  };","  var compare = compareFuncs[type];","  return function(a, b) { return compare(a, b) * direction; }","}"])+'("'+e+'", '+n+"))",t.JavaScript.ORDER_FUNCTION_CALL]},t.JavaScript.lists_split=function(e){var i=t.JavaScript.valueToCode(e,"INPUT",t.JavaScript.ORDER_MEMBER),n=t.JavaScript.valueToCode(e,"DELIM",t.JavaScript.ORDER_NONE)||"''";if("SPLIT"==(e=e.getFieldValue("MODE")))i||(i="''"),e="split";else{if("JOIN"!=e)throw Error("Unknown mode: "+e);i||(i="[]"),e="join"}return[i+"."+e+"("+n+")",t.JavaScript.ORDER_FUNCTION_CALL]},t.JavaScript.lists_reverse=function(e){return[(t.JavaScript.valueToCode(e,"LIST",t.JavaScript.ORDER_FUNCTION_CALL)||"[]")+".slice().reverse()",t.JavaScript.ORDER_FUNCTION_CALL]},t.JavaScript.logic={},t.JavaScript.controls_if=function(e){var i=0,n="";t.JavaScript.STATEMENT_PREFIX&&(n+=t.JavaScript.injectId(t.JavaScript.STATEMENT_PREFIX,e));do{var o=t.JavaScript.valueToCode(e,"IF"+i,t.JavaScript.ORDER_NONE)||"false",r=t.JavaScript.statementToCode(e,"DO"+i);t.JavaScript.STATEMENT_SUFFIX&&(r=t.JavaScript.prefixLines(t.JavaScript.injectId(t.JavaScript.STATEMENT_SUFFIX,e),t.JavaScript.INDENT)+r),n+=(0<i?" else ":"")+"if ("+o+") {\n"+r+"}",++i}while(e.getInput("IF"+i));return(e.getInput("ELSE")||t.JavaScript.STATEMENT_SUFFIX)&&(r=t.JavaScript.statementToCode(e,"ELSE"),t.JavaScript.STATEMENT_SUFFIX&&(r=t.JavaScript.prefixLines(t.JavaScript.injectId(t.JavaScript.STATEMENT_SUFFIX,e),t.JavaScript.INDENT)+r),n+=" else {\n"+r+"}"),n+"\n"},t.JavaScript.controls_ifelse=t.JavaScript.controls_if,t.JavaScript.logic_compare=function(e){var i={EQ:"==",NEQ:"!=",LT:"<",LTE:"<=",GT:">",GTE:">="}[e.getFieldValue("OP")],n="=="==i||"!="==i?t.JavaScript.ORDER_EQUALITY:t.JavaScript.ORDER_RELATIONAL;return[(t.JavaScript.valueToCode(e,"A",n)||"0")+" "+i+" "+(e=t.JavaScript.valueToCode(e,"B",n)||"0"),n]},t.JavaScript.logic_operation=function(e){var i="AND"==e.getFieldValue("OP")?"&&":"||",n="&&"==i?t.JavaScript.ORDER_LOGICAL_AND:t.JavaScript.ORDER_LOGICAL_OR,o=t.JavaScript.valueToCode(e,"A",n);if(e=t.JavaScript.valueToCode(e,"B",n),o||e){var r="&&"==i?"true":"false";o||(o=r),e||(e=r)}else e=o="false";return[o+" "+i+" "+e,n]},t.JavaScript.logic_negate=function(e){var i=t.JavaScript.ORDER_LOGICAL_NOT;return["!"+(t.JavaScript.valueToCode(e,"BOOL",i)||"true"),i]},t.JavaScript.logic_boolean=function(e){return["TRUE"==e.getFieldValue("BOOL")?"true":"false",t.JavaScript.ORDER_ATOMIC]},t.JavaScript.logic_null=function(e){return["null",t.JavaScript.ORDER_ATOMIC]},t.JavaScript.logic_ternary=function(e){return[(t.JavaScript.valueToCode(e,"IF",t.JavaScript.ORDER_CONDITIONAL)||"false")+" ? "+(t.JavaScript.valueToCode(e,"THEN",t.JavaScript.ORDER_CONDITIONAL)||"null")+" : "+(e=t.JavaScript.valueToCode(e,"ELSE",t.JavaScript.ORDER_CONDITIONAL)||"null"),t.JavaScript.ORDER_CONDITIONAL]},t.JavaScript.loops={},t.JavaScript.controls_repeat_ext=function(e){var i=e.getField("TIMES")?String(Number(e.getFieldValue("TIMES"))):t.JavaScript.valueToCode(e,"TIMES",t.JavaScript.ORDER_ASSIGNMENT)||"0",n=t.JavaScript.statementToCode(e,"DO");n=t.JavaScript.addLoopTrap(n,e),e="";var o=t.JavaScript.nameDB_.getDistinctName("count",t.VARIABLE_CATEGORY_NAME),r=i;return i.match(/^\w+$/)||t.isNumber(i)||(e+="var "+(r=t.JavaScript.nameDB_.getDistinctName("repeat_end",t.VARIABLE_CATEGORY_NAME))+" = "+i+";\n"),e+"for (var "+o+" = 0; "+o+" < "+r+"; "+o+"++) {\n"+n+"}\n"},t.JavaScript.controls_repeat=t.JavaScript.controls_repeat_ext,t.JavaScript.controls_whileUntil=function(e){var i="UNTIL"==e.getFieldValue("MODE"),n=t.JavaScript.valueToCode(e,"BOOL",i?t.JavaScript.ORDER_LOGICAL_NOT:t.JavaScript.ORDER_NONE)||"false",o=t.JavaScript.statementToCode(e,"DO");return o=t.JavaScript.addLoopTrap(o,e),i&&(n="!"+n),"while ("+n+") {\n"+o+"}\n"},t.JavaScript.controls_for=function(e){var i=t.JavaScript.nameDB_.getName(e.getFieldValue("VAR"),t.VARIABLE_CATEGORY_NAME),n=t.JavaScript.valueToCode(e,"FROM",t.JavaScript.ORDER_ASSIGNMENT)||"0",o=t.JavaScript.valueToCode(e,"TO",t.JavaScript.ORDER_ASSIGNMENT)||"0",r=t.JavaScript.valueToCode(e,"BY",t.JavaScript.ORDER_ASSIGNMENT)||"1",s=t.JavaScript.statementToCode(e,"DO");if(s=t.JavaScript.addLoopTrap(s,e),t.isNumber(n)&&t.isNumber(o)&&t.isNumber(r)){var a=Number(n)<=Number(o);e="for ("+i+" = "+n+"; "+i+(a?" <= ":" >= ")+o+"; "+i,e=(1==(i=Math.abs(Number(r)))?e+(a?"++":"--"):e+(a?" += ":" -= ")+i)+") {\n"+s+"}\n"}else e="",a=n,n.match(/^\w+$/)||t.isNumber(n)||(e+="var "+(a=t.JavaScript.nameDB_.getDistinctName(i+"_start",t.VARIABLE_CATEGORY_NAME))+" = "+n+";\n"),n=o,o.match(/^\w+$/)||t.isNumber(o)||(e+="var "+(n=t.JavaScript.nameDB_.getDistinctName(i+"_end",t.VARIABLE_CATEGORY_NAME))+" = "+o+";\n"),e+="var "+(o=t.JavaScript.nameDB_.getDistinctName(i+"_inc",t.VARIABLE_CATEGORY_NAME))+" = ",e=(e=t.isNumber(r)?e+(Math.abs(r)+";\n"):e+"Math.abs("+r+");\n")+"if ("+a+" > "+n+") {\n"+(t.JavaScript.INDENT+o)+" = -"+o+";\n",e+="}\n",e+="for ("+i+" = "+a+"; "+o+" >= 0 ? "+i+" <= "+n+" : "+i+" >= "+n+"; "+i+" += "+o+") {\n"+s+"}\n";return e},t.JavaScript.controls_forEach=function(e){var i=t.JavaScript.nameDB_.getName(e.getFieldValue("VAR"),t.VARIABLE_CATEGORY_NAME),n=t.JavaScript.valueToCode(e,"LIST",t.JavaScript.ORDER_ASSIGNMENT)||"[]",o=t.JavaScript.statementToCode(e,"DO");o=t.JavaScript.addLoopTrap(o,e),e="";var r=n;return n.match(/^\w+$/)||(e+="var "+(r=t.JavaScript.nameDB_.getDistinctName(i+"_list",t.VARIABLE_CATEGORY_NAME))+" = "+n+";\n"),e+"for (var "+(n=t.JavaScript.nameDB_.getDistinctName(i+"_index",t.VARIABLE_CATEGORY_NAME))+" in "+r+") {\n"+(o=t.JavaScript.INDENT+i+" = "+r+"["+n+"];\n"+o)+"}\n"},t.JavaScript.controls_flow_statements=function(e){var i="";if(t.JavaScript.STATEMENT_PREFIX&&(i+=t.JavaScript.injectId(t.JavaScript.STATEMENT_PREFIX,e)),t.JavaScript.STATEMENT_SUFFIX&&(i+=t.JavaScript.injectId(t.JavaScript.STATEMENT_SUFFIX,e)),t.JavaScript.STATEMENT_PREFIX){var n=t.Constants.Loops.CONTROL_FLOW_IN_LOOP_CHECK_MIXIN.getSurroundLoop(e);n&&!n.suppressPrefixSuffix&&(i+=t.JavaScript.injectId(t.JavaScript.STATEMENT_PREFIX,n))}switch(e.getFieldValue("FLOW")){case"BREAK":return i+"break;\n";case"CONTINUE":return i+"continue;\n"}throw Error("Unknown flow statement.")},t.JavaScript.math={},t.JavaScript.math_number=function(e){return[e=Number(e.getFieldValue("NUM")),0<=e?t.JavaScript.ORDER_ATOMIC:t.JavaScript.ORDER_UNARY_NEGATION]},t.JavaScript.math_arithmetic=function(e){var i={ADD:[" + ",t.JavaScript.ORDER_ADDITION],MINUS:[" - ",t.JavaScript.ORDER_SUBTRACTION],MULTIPLY:[" * ",t.JavaScript.ORDER_MULTIPLICATION],DIVIDE:[" / ",t.JavaScript.ORDER_DIVISION],POWER:[null,t.JavaScript.ORDER_NONE]}[e.getFieldValue("OP")],n=i[0];i=i[1];var o=t.JavaScript.valueToCode(e,"A",i)||"0";return e=t.JavaScript.valueToCode(e,"B",i)||"0",n?[o+n+e,i]:["Math.pow("+o+", "+e+")",t.JavaScript.ORDER_FUNCTION_CALL]},t.JavaScript.math_single=function(e){var i=e.getFieldValue("OP");if("NEG"==i)return"-"==(e=t.JavaScript.valueToCode(e,"NUM",t.JavaScript.ORDER_UNARY_NEGATION)||"0")[0]&&(e=" "+e),["-"+e,t.JavaScript.ORDER_UNARY_NEGATION];switch(e="SIN"==i||"COS"==i||"TAN"==i?t.JavaScript.valueToCode(e,"NUM",t.JavaScript.ORDER_DIVISION)||"0":t.JavaScript.valueToCode(e,"NUM",t.JavaScript.ORDER_NONE)||"0",i){case"ABS":var n="Math.abs("+e+")";break;case"ROOT":n="Math.sqrt("+e+")";break;case"LN":n="Math.log("+e+")";break;case"EXP":n="Math.exp("+e+")";break;case"POW10":n="Math.pow(10,"+e+")";break;case"ROUND":n="Math.round("+e+")";break;case"ROUNDUP":n="Math.ceil("+e+")";break;case"ROUNDDOWN":n="Math.floor("+e+")";break;case"SIN":n="Math.sin("+e+" / 180 * Math.PI)";break;case"COS":n="Math.cos("+e+" / 180 * Math.PI)";break;case"TAN":n="Math.tan("+e+" / 180 * Math.PI)"}if(n)return[n,t.JavaScript.ORDER_FUNCTION_CALL];switch(i){case"LOG10":n="Math.log("+e+") / Math.log(10)";break;case"ASIN":n="Math.asin("+e+") / Math.PI * 180";break;case"ACOS":n="Math.acos("+e+") / Math.PI * 180";break;case"ATAN":n="Math.atan("+e+") / Math.PI * 180";break;default:throw Error("Unknown math operator: "+i)}return[n,t.JavaScript.ORDER_DIVISION]},t.JavaScript.math_constant=function(e){return{PI:["Math.PI",t.JavaScript.ORDER_MEMBER],E:["Math.E",t.JavaScript.ORDER_MEMBER],GOLDEN_RATIO:["(1 + Math.sqrt(5)) / 2",t.JavaScript.ORDER_DIVISION],SQRT2:["Math.SQRT2",t.JavaScript.ORDER_MEMBER],SQRT1_2:["Math.SQRT1_2",t.JavaScript.ORDER_MEMBER],INFINITY:["Infinity",t.JavaScript.ORDER_ATOMIC]}[e.getFieldValue("CONSTANT")]},t.JavaScript.math_number_property=function(e){var i=t.JavaScript.valueToCode(e,"NUMBER_TO_CHECK",t.JavaScript.ORDER_MODULUS)||"0",n=e.getFieldValue("PROPERTY");if("PRIME"==n)return[t.JavaScript.provideFunction_("mathIsPrime",["function "+t.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(n) {","  // https://en.wikipedia.org/wiki/Primality_test#Naive_methods","  if (n == 2 || n == 3) {","    return true;","  }","  // False if n is NaN, negative, is 1, or not whole.","  // And false if n is divisible by 2 or 3.","  if (isNaN(n) || n <= 1 || n % 1 != 0 || n % 2 == 0 || n % 3 == 0) {","    return false;","  }","  // Check all the numbers of form 6k +/- 1, up to sqrt(n).","  for (var x = 6; x <= Math.sqrt(n) + 1; x += 6) {","    if (n % (x - 1) == 0 || n % (x + 1) == 0) {","      return false;","    }","  }","  return true;","}"])+"("+i+")",t.JavaScript.ORDER_FUNCTION_CALL];switch(n){case"EVEN":var o=i+" % 2 == 0";break;case"ODD":o=i+" % 2 == 1";break;case"WHOLE":o=i+" % 1 == 0";break;case"POSITIVE":o=i+" > 0";break;case"NEGATIVE":o=i+" < 0";break;case"DIVISIBLE_BY":o=i+" % "+(e=t.JavaScript.valueToCode(e,"DIVISOR",t.JavaScript.ORDER_MODULUS)||"0")+" == 0"}return[o,t.JavaScript.ORDER_EQUALITY]},t.JavaScript.math_change=function(e){var i=t.JavaScript.valueToCode(e,"DELTA",t.JavaScript.ORDER_ADDITION)||"0";return(e=t.JavaScript.nameDB_.getName(e.getFieldValue("VAR"),t.VARIABLE_CATEGORY_NAME))+" = (typeof "+e+" == 'number' ? "+e+" : 0) + "+i+";\n"},t.JavaScript.math_round=t.JavaScript.math_single,t.JavaScript.math_trig=t.JavaScript.math_single,t.JavaScript.math_on_list=function(e){var i=e.getFieldValue("OP");switch(i){case"SUM":e=t.JavaScript.valueToCode(e,"LIST",t.JavaScript.ORDER_MEMBER)||"[]",e+=".reduce(function(x, y) {return x + y;})";break;case"MIN":e="Math.min.apply(null, "+(e=t.JavaScript.valueToCode(e,"LIST",t.JavaScript.ORDER_NONE)||"[]")+")";break;case"MAX":e="Math.max.apply(null, "+(e=t.JavaScript.valueToCode(e,"LIST",t.JavaScript.ORDER_NONE)||"[]")+")";break;case"AVERAGE":e=(i=t.JavaScript.provideFunction_("mathMean",["function "+t.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(myList) {","  return myList.reduce(function(x, y) {return x + y;}) / myList.length;","}"]))+"("+(e=t.JavaScript.valueToCode(e,"LIST",t.JavaScript.ORDER_NONE)||"[]")+")";break;case"MEDIAN":e=(i=t.JavaScript.provideFunction_("mathMedian",["function "+t.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(myList) {","  var localList = myList.filter(function (x) {return typeof x == 'number';});","  if (!localList.length) return null;","  localList.sort(function(a, b) {return b - a;});","  if (localList.length % 2 == 0) {","    return (localList[localList.length / 2 - 1] + localList[localList.length / 2]) / 2;","  } else {","    return localList[(localList.length - 1) / 2];","  }","}"]))+"("+(e=t.JavaScript.valueToCode(e,"LIST",t.JavaScript.ORDER_NONE)||"[]")+")";break;case"MODE":e=(i=t.JavaScript.provideFunction_("mathModes",["function "+t.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(values) {","  var modes = [];","  var counts = [];","  var maxCount = 0;","  for (var i = 0; i < values.length; i++) {","    var value = values[i];","    var found = false;","    var thisCount;","    for (var j = 0; j < counts.length; j++) {","      if (counts[j][0] === value) {","        thisCount = ++counts[j][1];","        found = true;","        break;","      }","    }","    if (!found) {","      counts.push([value, 1]);","      thisCount = 1;","    }","    maxCount = Math.max(thisCount, maxCount);","  }","  for (var j = 0; j < counts.length; j++) {","    if (counts[j][1] == maxCount) {","        modes.push(counts[j][0]);","    }","  }","  return modes;","}"]))+"("+(e=t.JavaScript.valueToCode(e,"LIST",t.JavaScript.ORDER_NONE)||"[]")+")";break;case"STD_DEV":e=(i=t.JavaScript.provideFunction_("mathStandardDeviation",["function "+t.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(numbers) {","  var n = numbers.length;","  if (!n) return null;","  var mean = numbers.reduce(function(x, y) {return x + y;}) / n;","  var variance = 0;","  for (var j = 0; j < n; j++) {","    variance += Math.pow(numbers[j] - mean, 2);","  }","  variance = variance / n;","  return Math.sqrt(variance);","}"]))+"("+(e=t.JavaScript.valueToCode(e,"LIST",t.JavaScript.ORDER_NONE)||"[]")+")";break;case"RANDOM":e=(i=t.JavaScript.provideFunction_("mathRandomList",["function "+t.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(list) {","  var x = Math.floor(Math.random() * list.length);","  return list[x];","}"]))+"("+(e=t.JavaScript.valueToCode(e,"LIST",t.JavaScript.ORDER_NONE)||"[]")+")";break;default:throw Error("Unknown operator: "+i)}return[e,t.JavaScript.ORDER_FUNCTION_CALL]},t.JavaScript.math_modulo=function(e){return[(t.JavaScript.valueToCode(e,"DIVIDEND",t.JavaScript.ORDER_MODULUS)||"0")+" % "+(e=t.JavaScript.valueToCode(e,"DIVISOR",t.JavaScript.ORDER_MODULUS)||"0"),t.JavaScript.ORDER_MODULUS]},t.JavaScript.math_constrain=function(e){return["Math.min(Math.max("+(t.JavaScript.valueToCode(e,"VALUE",t.JavaScript.ORDER_NONE)||"0")+", "+(t.JavaScript.valueToCode(e,"LOW",t.JavaScript.ORDER_NONE)||"0")+"), "+(e=t.JavaScript.valueToCode(e,"HIGH",t.JavaScript.ORDER_NONE)||"Infinity")+")",t.JavaScript.ORDER_FUNCTION_CALL]},t.JavaScript.math_random_int=function(e){var i=t.JavaScript.valueToCode(e,"FROM",t.JavaScript.ORDER_NONE)||"0";return e=t.JavaScript.valueToCode(e,"TO",t.JavaScript.ORDER_NONE)||"0",[t.JavaScript.provideFunction_("mathRandomInt",["function "+t.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(a, b) {","  if (a > b) {","    // Swap a and b to ensure a is smaller.","    var c = a;","    a = b;","    b = c;","  }","  return Math.floor(Math.random() * (b - a + 1) + a);","}"])+"("+i+", "+e+")",t.JavaScript.ORDER_FUNCTION_CALL]},t.JavaScript.math_random_float=function(e){return["Math.random()",t.JavaScript.ORDER_FUNCTION_CALL]},t.JavaScript.math_atan2=function(e){var i=t.JavaScript.valueToCode(e,"X",t.JavaScript.ORDER_NONE)||"0";return["Math.atan2("+(t.JavaScript.valueToCode(e,"Y",t.JavaScript.ORDER_NONE)||"0")+", "+i+") / Math.PI * 180",t.JavaScript.ORDER_DIVISION]},t.JavaScript.procedures={},t.JavaScript.procedures_defreturn=function(e){var i=t.JavaScript.nameDB_.getName(e.getFieldValue("NAME"),t.PROCEDURE_CATEGORY_NAME),n="";t.JavaScript.STATEMENT_PREFIX&&(n+=t.JavaScript.injectId(t.JavaScript.STATEMENT_PREFIX,e)),t.JavaScript.STATEMENT_SUFFIX&&(n+=t.JavaScript.injectId(t.JavaScript.STATEMENT_SUFFIX,e)),n&&(n=t.JavaScript.prefixLines(n,t.JavaScript.INDENT));var o="";t.JavaScript.INFINITE_LOOP_TRAP&&(o=t.JavaScript.prefixLines(t.JavaScript.injectId(t.JavaScript.INFINITE_LOOP_TRAP,e),t.JavaScript.INDENT));var r=t.JavaScript.statementToCode(e,"STACK"),s=t.JavaScript.valueToCode(e,"RETURN",t.JavaScript.ORDER_NONE)||"",a="";r&&s&&(a=n),s&&(s=t.JavaScript.INDENT+"return "+s+";\n");for(var l=[],c=e.getVars(),u=0;u<c.length;u++)l[u]=t.JavaScript.nameDB_.getName(c[u],t.VARIABLE_CATEGORY_NAME);return n="function "+i+"("+l.join(", ")+") {\n"+n+o+r+a+s+"}",n=t.JavaScript.scrub_(e,n),t.JavaScript.definitions_["%"+i]=n,null},t.JavaScript.procedures_defnoreturn=t.JavaScript.procedures_defreturn,t.JavaScript.procedures_callreturn=function(e){for(var i=t.JavaScript.nameDB_.getName(e.getFieldValue("NAME"),t.PROCEDURE_CATEGORY_NAME),n=[],o=e.getVars(),r=0;r<o.length;r++)n[r]=t.JavaScript.valueToCode(e,"ARG"+r,t.JavaScript.ORDER_NONE)||"null";return[i+"("+n.join(", ")+")",t.JavaScript.ORDER_FUNCTION_CALL]},t.JavaScript.procedures_callnoreturn=function(e){return t.JavaScript.procedures_callreturn(e)[0]+";\n"},t.JavaScript.procedures_ifreturn=function(e){var i="if ("+(t.JavaScript.valueToCode(e,"CONDITION",t.JavaScript.ORDER_NONE)||"false")+") {\n";return t.JavaScript.STATEMENT_SUFFIX&&(i+=t.JavaScript.prefixLines(t.JavaScript.injectId(t.JavaScript.STATEMENT_SUFFIX,e),t.JavaScript.INDENT)),e.hasReturnValue_?(e=t.JavaScript.valueToCode(e,"VALUE",t.JavaScript.ORDER_NONE)||"null",i+=t.JavaScript.INDENT+"return "+e+";\n"):i+=t.JavaScript.INDENT+"return;\n",i+"}\n"},t.JavaScript.texts={},t.JavaScript.text=function(e){return[t.JavaScript.quote_(e.getFieldValue("TEXT")),t.JavaScript.ORDER_ATOMIC]},t.JavaScript.text_multiline=function(e){return[e=t.JavaScript.multiline_quote_(e.getFieldValue("TEXT")),-1!=e.indexOf("+")?t.JavaScript.ORDER_ADDITION:t.JavaScript.ORDER_ATOMIC]},t.JavaScript.text.forceString_=function(e){return t.JavaScript.text.forceString_.strRegExp.test(e)?[e,t.JavaScript.ORDER_ATOMIC]:["String("+e+")",t.JavaScript.ORDER_FUNCTION_CALL]},t.JavaScript.text.forceString_.strRegExp=/^\s*'([^']|\\')*'\s*$/,t.JavaScript.text_join=function(e){switch(e.itemCount_){case 0:return["''",t.JavaScript.ORDER_ATOMIC];case 1:return e=t.JavaScript.valueToCode(e,"ADD0",t.JavaScript.ORDER_NONE)||"''",t.JavaScript.text.forceString_(e);case 2:var i=t.JavaScript.valueToCode(e,"ADD0",t.JavaScript.ORDER_NONE)||"''";return e=t.JavaScript.valueToCode(e,"ADD1",t.JavaScript.ORDER_NONE)||"''",[e=t.JavaScript.text.forceString_(i)[0]+" + "+t.JavaScript.text.forceString_(e)[0],t.JavaScript.ORDER_ADDITION];default:i=Array(e.itemCount_);for(var n=0;n<e.itemCount_;n++)i[n]=t.JavaScript.valueToCode(e,"ADD"+n,t.JavaScript.ORDER_NONE)||"''";return[e="["+i.join(",")+"].join('')",t.JavaScript.ORDER_FUNCTION_CALL]}},t.JavaScript.text_append=function(e){var i=t.JavaScript.nameDB_.getName(e.getFieldValue("VAR"),t.VARIABLE_CATEGORY_NAME);return e=t.JavaScript.valueToCode(e,"TEXT",t.JavaScript.ORDER_NONE)||"''",i+" += "+t.JavaScript.text.forceString_(e)[0]+";\n"},t.JavaScript.text_length=function(e){return[(t.JavaScript.valueToCode(e,"VALUE",t.JavaScript.ORDER_MEMBER)||"''")+".length",t.JavaScript.ORDER_MEMBER]},t.JavaScript.text_isEmpty=function(e){return["!"+(t.JavaScript.valueToCode(e,"VALUE",t.JavaScript.ORDER_MEMBER)||"''")+".length",t.JavaScript.ORDER_LOGICAL_NOT]},t.JavaScript.text_indexOf=function(e){var i="FIRST"==e.getFieldValue("END")?"indexOf":"lastIndexOf",n=t.JavaScript.valueToCode(e,"FIND",t.JavaScript.ORDER_NONE)||"''";return i=(t.JavaScript.valueToCode(e,"VALUE",t.JavaScript.ORDER_MEMBER)||"''")+"."+i+"("+n+")",e.workspace.options.oneBasedIndex?[i+" + 1",t.JavaScript.ORDER_ADDITION]:[i,t.JavaScript.ORDER_FUNCTION_CALL]},t.JavaScript.text_charAt=function(e){var i=e.getFieldValue("WHERE")||"FROM_START",n=t.JavaScript.valueToCode(e,"VALUE","RANDOM"==i?t.JavaScript.ORDER_NONE:t.JavaScript.ORDER_MEMBER)||"''";switch(i){case"FIRST":return[n+".charAt(0)",t.JavaScript.ORDER_FUNCTION_CALL];case"LAST":return[n+".slice(-1)",t.JavaScript.ORDER_FUNCTION_CALL];case"FROM_START":return[n+".charAt("+(e=t.JavaScript.getAdjusted(e,"AT"))+")",t.JavaScript.ORDER_FUNCTION_CALL];case"FROM_END":return[n+".slice("+(e=t.JavaScript.getAdjusted(e,"AT",1,!0))+").charAt(0)",t.JavaScript.ORDER_FUNCTION_CALL];case"RANDOM":return[t.JavaScript.provideFunction_("textRandomLetter",["function "+t.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(text) {","  var x = Math.floor(Math.random() * text.length);","  return text[x];","}"])+"("+n+")",t.JavaScript.ORDER_FUNCTION_CALL]}throw Error("Unhandled option (text_charAt).")},t.JavaScript.text.getIndex_=function(t,e,i){return"FIRST"==e?"0":"FROM_END"==e?t+".length - 1 - "+i:"LAST"==e?t+".length - 1":i},t.JavaScript.text_getSubstring=function(e){var i=e.getFieldValue("WHERE1"),n=e.getFieldValue("WHERE2"),o="FROM_END"!=i&&"LAST"!=i&&"FROM_END"!=n&&"LAST"!=n,r=t.JavaScript.valueToCode(e,"STRING",o?t.JavaScript.ORDER_MEMBER:t.JavaScript.ORDER_NONE)||"''";if("FIRST"==i&&"LAST"==n)return[r,t.JavaScript.ORDER_NONE];if(r.match(/^'?\w+'?$/)||o){switch(i){case"FROM_START":o=t.JavaScript.getAdjusted(e,"AT1");break;case"FROM_END":o=r+".length - "+(o=t.JavaScript.getAdjusted(e,"AT1",1,!1,t.JavaScript.ORDER_SUBTRACTION));break;case"FIRST":o="0";break;default:throw Error("Unhandled option (text_getSubstring).")}switch(n){case"FROM_START":e=t.JavaScript.getAdjusted(e,"AT2",1);break;case"FROM_END":e=r+".length - "+(e=t.JavaScript.getAdjusted(e,"AT2",0,!1,t.JavaScript.ORDER_SUBTRACTION));break;case"LAST":e=r+".length";break;default:throw Error("Unhandled option (text_getSubstring).")}i=r+".slice("+o+", "+e+")"}else{o=t.JavaScript.getAdjusted(e,"AT1"),e=t.JavaScript.getAdjusted(e,"AT2");var s=t.JavaScript.text.getIndex_,a={FIRST:"First",LAST:"Last",FROM_START:"FromStart",FROM_END:"FromEnd"};i=t.JavaScript.provideFunction_("subsequence"+a[i]+a[n],["function "+t.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(sequence"+("FROM_END"==i||"FROM_START"==i?", at1":"")+("FROM_END"==n||"FROM_START"==n?", at2":"")+") {","  var start = "+s("sequence",i,"at1")+";","  var end = "+s("sequence",n,"at2")+" + 1;","  return sequence.slice(start, end);","}"])+"("+r+("FROM_END"==i||"FROM_START"==i?", "+o:"")+("FROM_END"==n||"FROM_START"==n?", "+e:"")+")"}return[i,t.JavaScript.ORDER_FUNCTION_CALL]},t.JavaScript.text_changeCase=function(e){var i={UPPERCASE:".toUpperCase()",LOWERCASE:".toLowerCase()",TITLECASE:null}[e.getFieldValue("CASE")];return e=t.JavaScript.valueToCode(e,"TEXT",i?t.JavaScript.ORDER_MEMBER:t.JavaScript.ORDER_NONE)||"''",[i?e+i:t.JavaScript.provideFunction_("textToTitleCase",["function "+t.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(str) {","  return str.replace(/\\S+/g,","      function(txt) {return txt[0].toUpperCase() + txt.substring(1).toLowerCase();});","}"])+"("+e+")",t.JavaScript.ORDER_FUNCTION_CALL]},t.JavaScript.text_trim=function(e){var i={LEFT:".replace(/^[\\s\\xa0]+/, '')",RIGHT:".replace(/[\\s\\xa0]+$/, '')",BOTH:".trim()"}[e.getFieldValue("MODE")];return[(t.JavaScript.valueToCode(e,"TEXT",t.JavaScript.ORDER_MEMBER)||"''")+i,t.JavaScript.ORDER_FUNCTION_CALL]},t.JavaScript.text_print=function(e){return"window.alert("+(t.JavaScript.valueToCode(e,"TEXT",t.JavaScript.ORDER_NONE)||"''")+");\n"},t.JavaScript.text_prompt_ext=function(e){var i="window.prompt("+(e.getField("TEXT")?t.JavaScript.quote_(e.getFieldValue("TEXT")):t.JavaScript.valueToCode(e,"TEXT",t.JavaScript.ORDER_NONE)||"''")+")";return"NUMBER"==e.getFieldValue("TYPE")&&(i="Number("+i+")"),[i,t.JavaScript.ORDER_FUNCTION_CALL]},t.JavaScript.text_prompt=t.JavaScript.text_prompt_ext,t.JavaScript.text_count=function(e){var i=t.JavaScript.valueToCode(e,"TEXT",t.JavaScript.ORDER_NONE)||"''";return e=t.JavaScript.valueToCode(e,"SUB",t.JavaScript.ORDER_NONE)||"''",[t.JavaScript.provideFunction_("textCount",["function "+t.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(haystack, needle) {","  if (needle.length === 0) {","    return haystack.length + 1;","  } else {","    return haystack.split(needle).length - 1;","  }","}"])+"("+i+", "+e+")",t.JavaScript.ORDER_FUNCTION_CALL]},t.JavaScript.text_replace=function(e){var i=t.JavaScript.valueToCode(e,"TEXT",t.JavaScript.ORDER_NONE)||"''",n=t.JavaScript.valueToCode(e,"FROM",t.JavaScript.ORDER_NONE)||"''";return e=t.JavaScript.valueToCode(e,"TO",t.JavaScript.ORDER_NONE)||"''",[t.JavaScript.provideFunction_("textReplace",["function "+t.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(haystack, needle, replacement) {",'  needle = needle.replace(/([-()\\[\\]{}+?*.$\\^|,:#<!\\\\])/g,"\\\\$1")','                 .replace(/\\x08/g,"\\\\x08");',"  return haystack.replace(new RegExp(needle, 'g'), replacement);","}"])+"("+i+", "+n+", "+e+")",t.JavaScript.ORDER_FUNCTION_CALL]},t.JavaScript.text_reverse=function(e){return[(t.JavaScript.valueToCode(e,"TEXT",t.JavaScript.ORDER_MEMBER)||"''")+".split('').reverse().join('')",t.JavaScript.ORDER_FUNCTION_CALL]},t.JavaScript.variables={},t.JavaScript.variables_get=function(e){return[t.JavaScript.nameDB_.getName(e.getFieldValue("VAR"),t.VARIABLE_CATEGORY_NAME),t.JavaScript.ORDER_ATOMIC]},t.JavaScript.variables_set=function(e){var i=t.JavaScript.valueToCode(e,"VALUE",t.JavaScript.ORDER_ASSIGNMENT)||"0";return t.JavaScript.nameDB_.getName(e.getFieldValue("VAR"),t.VARIABLE_CATEGORY_NAME)+" = "+i+";\n"},t.JavaScript.variablesDynamic={},t.JavaScript.variables_get_dynamic=t.JavaScript.variables_get,t.JavaScript.variables_set_dynamic=t.JavaScript.variables_set,t.JavaScript},o=[i("GEkh")],void 0===(r="function"==typeof(n=s)?n.apply(e,o):n)||(t.exports=r)},"JP+z":function(t,e,i){"use strict";t.exports=function(t,e){return function(){for(var i=new Array(arguments.length),n=0;n<i.length;n++)i[n]=arguments[n];return t.apply(e,i)}}},KCLY:function(t,e,i){"use strict";(function(e){var n=i("cGG2"),o=i("5VQ+"),r={"Content-Type":"application/x-www-form-urlencoded"};function s(t,e){!n.isUndefined(t)&&n.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var a,l={adapter:("undefined"!=typeof XMLHttpRequest?a=i("7GwW"):void 0!==e&&"[object process]"===Object.prototype.toString.call(e)&&(a=i("7GwW")),a),transformRequest:[function(t,e){return o(e,"Accept"),o(e,"Content-Type"),n.isFormData(t)||n.isArrayBuffer(t)||n.isBuffer(t)||n.isStream(t)||n.isFile(t)||n.isBlob(t)?t:n.isArrayBufferView(t)?t.buffer:n.isURLSearchParams(t)?(s(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):n.isObject(t)?(s(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300}};l.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],function(t){l.headers[t]={}}),n.forEach(["post","put","patch"],function(t){l.headers[t]=n.merge(r)}),t.exports=l}).call(e,i("W2nU"))},Kh4W:function(t,e,i){e.f=i("dSzd")},L42u:function(t,e,i){var n,o,r,s=i("+ZMJ"),a=i("knuC"),l=i("RPLV"),c=i("ON07"),u=i("7KvD"),h=u.process,p=u.setImmediate,d=u.clearImmediate,f=u.MessageChannel,g=u.Dispatch,_=0,m={},v=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},y=function(t){v.call(t.data)};p&&d||(p=function(t){for(var e=[],i=1;arguments.length>i;)e.push(arguments[i++]);return m[++_]=function(){a("function"==typeof t?t:Function(t),e)},n(_),_},d=function(t){delete m[t]},"process"==i("R9M2")(h)?n=function(t){h.nextTick(s(v,t,1))}:g&&g.now?n=function(t){g.now(s(v,t,1))}:f?(r=(o=new f).port2,o.port1.onmessage=y,n=s(r.postMessage,r,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(n=function(t){u.postMessage(t+"","*")},u.addEventListener("message",y,!1)):n="onreadystatechange"in c("script")?function(t){l.appendChild(c("script")).onreadystatechange=function(){l.removeChild(this),v.call(t)}}:function(t){setTimeout(s(v,t,1),0)}),t.exports={set:p,clear:d}},LKZe:function(t,e,i){var n=i("NpIQ"),o=i("X8DO"),r=i("TcQ7"),s=i("MmMw"),a=i("D2L2"),l=i("SfB7"),c=Object.getOwnPropertyDescriptor;e.f=i("+E39")?c:function(t,e){if(t=r(t),e=s(e,!0),l)try{return c(t,e)}catch(t){}if(a(t,e))return o(!n.f.call(t,e),t[e])}},M6a0:function(t,e){},MU5D:function(t,e,i){var n=i("R9M2");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==n(t)?t.split(""):Object(t)}},Mhyx:function(t,e,i){var n=i("/bQp"),o=i("dSzd")("iterator"),r=Array.prototype;t.exports=function(t){return void 0!==t&&(n.Array===t||r[o]===t)}},MmMw:function(t,e,i){var n=i("EqjI");t.exports=function(t,e){if(!n(t))return t;var i,o;if(e&&"function"==typeof(i=t.toString)&&!n(o=i.call(t)))return o;if("function"==typeof(i=t.valueOf)&&!n(o=i.call(t)))return o;if(!e&&"function"==typeof(i=t.toString)&&!n(o=i.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},NMof:function(t,e,i){"use strict";var n,o;"function"==typeof Symbol&&Symbol.iterator;void 0===(o="function"==typeof(n=function(){var t=window,e={placement:"bottom",gpuAcceleration:!0,offset:0,boundariesElement:"viewport",boundariesPadding:5,preventOverflowOrder:["left","right","top","bottom"],flipBehavior:"flip",arrowElement:"[x-arrow]",arrowOffset:0,modifiers:["shift","offset","preventOverflow","keepTogether","arrow","flip","applyStyle"],modifiersIgnored:[],forceAbsolute:!1};function i(t,i,n){this._reference=t.jquery?t[0]:t,this.state={};var o=void 0===i||null===i,r=i&&"[object Object]"===Object.prototype.toString.call(i);return this._popper=o||r?this.parse(r?i:{}):i.jquery?i[0]:i,this._options=Object.assign({},e,n),this._options.modifiers=this._options.modifiers.map(function(t){if(-1===this._options.modifiersIgnored.indexOf(t))return"applyStyle"===t&&this._popper.setAttribute("x-placement",this._options.placement),this.modifiers[t]||t}.bind(this)),this.state.position=this._getPosition(this._popper,this._reference),u(this._popper,{position:this.state.position,top:0}),this.update(),this._setupEventListeners(),this}function n(e){var i=e.style.display,n=e.style.visibility;e.style.display="block",e.style.visibility="hidden";e.offsetWidth;var o=t.getComputedStyle(e),r=parseFloat(o.marginTop)+parseFloat(o.marginBottom),s=parseFloat(o.marginLeft)+parseFloat(o.marginRight),a={width:e.offsetWidth+s,height:e.offsetHeight+r};return e.style.display=i,e.style.visibility=n,a}function o(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,function(t){return e[t]})}function r(t){var e=Object.assign({},t);return e.right=e.left+e.width,e.bottom=e.top+e.height,e}function s(t,e){var i,n=0;for(i in t){if(t[i]===e)return n;n++}return null}function a(e,i){return t.getComputedStyle(e,null)[i]}function l(e){var i=e.offsetParent;return i!==t.document.body&&i?i:t.document.documentElement}function c(e){var i=e.parentNode;return i?i===t.document?t.document.body.scrollTop||t.document.body.scrollLeft?t.document.body:t.document.documentElement:-1!==["scroll","auto"].indexOf(a(i,"overflow"))||-1!==["scroll","auto"].indexOf(a(i,"overflow-x"))||-1!==["scroll","auto"].indexOf(a(i,"overflow-y"))?i:c(e.parentNode):e}function u(t,e){Object.keys(e).forEach(function(i){var n,o="";-1!==["width","height","top","right","bottom","left"].indexOf(i)&&(""!==(n=e[i])&&!isNaN(parseFloat(n))&&isFinite(n))&&(o="px"),t.style[i]=e[i]+o})}function h(t){var e={width:t.offsetWidth,height:t.offsetHeight,left:t.offsetLeft,top:t.offsetTop};return e.right=e.left+e.width,e.bottom=e.top+e.height,e}function p(t){var e=t.getBoundingClientRect(),i=-1!=navigator.userAgent.indexOf("MSIE")&&"HTML"===t.tagName?-t.scrollTop:e.top;return{left:e.left,top:i,right:e.right,bottom:e.bottom,width:e.right-e.left,height:e.bottom-i}}function d(e){for(var i=["","ms","webkit","moz","o"],n=0;n<i.length;n++){var o=i[n]?i[n]+e.charAt(0).toUpperCase()+e.slice(1):e;if(void 0!==t.document.body.style[o])return o}return null}return i.prototype.destroy=function(){return this._popper.removeAttribute("x-placement"),this._popper.style.left="",this._popper.style.position="",this._popper.style.top="",this._popper.style[d("transform")]="",this._removeEventListeners(),this._options.removeOnDestroy&&this._popper.remove(),this},i.prototype.update=function(){var t={instance:this,styles:{}};t.placement=this._options.placement,t._originalPlacement=this._options.placement,t.offsets=this._getOffsets(this._popper,this._reference,t.placement),t.boundaries=this._getBoundaries(t,this._options.boundariesPadding,this._options.boundariesElement),t=this.runModifiers(t,this._options.modifiers),"function"==typeof this.state.updateCallback&&this.state.updateCallback(t)},i.prototype.onCreate=function(t){return t(this),this},i.prototype.onUpdate=function(t){return this.state.updateCallback=t,this},i.prototype.parse=function(e){var i={tagName:"div",classNames:["popper"],attributes:[],parent:t.document.body,content:"",contentType:"text",arrowTagName:"div",arrowClassNames:["popper__arrow"],arrowAttributes:["x-arrow"]};e=Object.assign({},i,e);var n=t.document,o=n.createElement(e.tagName);if(a(o,e.classNames),l(o,e.attributes),"node"===e.contentType?o.appendChild(e.content.jquery?e.content[0]:e.content):"html"===e.contentType?o.innerHTML=e.content:o.textContent=e.content,e.arrowTagName){var r=n.createElement(e.arrowTagName);a(r,e.arrowClassNames),l(r,e.arrowAttributes),o.appendChild(r)}var s=e.parent.jquery?e.parent[0]:e.parent;if("string"==typeof s){if((s=n.querySelectorAll(e.parent)).length>1&&console.warn("WARNING: the given `parent` query("+e.parent+") matched more than one element, the first one will be used"),0===s.length)throw"ERROR: the given `parent` doesn't exists!";s=s[0]}return s.length>1&&s instanceof Element==!1&&(console.warn("WARNING: you have passed as parent a list of elements, the first one will be used"),s=s[0]),s.appendChild(o),o;function a(t,e){e.forEach(function(e){t.classList.add(e)})}function l(t,e){e.forEach(function(e){t.setAttribute(e.split(":")[0],e.split(":")[1]||"")})}},i.prototype._getPosition=function(e,i){l(i);return this._options.forceAbsolute?"absolute":function e(i){if(i===t.document.body)return!1;if("fixed"===a(i,"position"))return!0;return i.parentNode?e(i.parentNode):i}(i)?"fixed":"absolute"},i.prototype._getOffsets=function(t,e,i){i=i.split("-")[0];var o={};o.position=this.state.position;var r="fixed"===o.position,s=function(t,e,i){var n=p(t),o=p(e);if(i){var r=c(e);o.top+=r.scrollTop,o.bottom+=r.scrollTop,o.left+=r.scrollLeft,o.right+=r.scrollLeft}return{top:n.top-o.top,left:n.left-o.left,bottom:n.top-o.top+n.height,right:n.left-o.left+n.width,width:n.width,height:n.height}}(e,l(t),r),a=n(t);return-1!==["right","left"].indexOf(i)?(o.top=s.top+s.height/2-a.height/2,o.left="left"===i?s.left-a.width:s.right):(o.left=s.left+s.width/2-a.width/2,o.top="top"===i?s.top-a.height:s.bottom),o.width=a.width,o.height=a.height,{popper:o,reference:s}},i.prototype._setupEventListeners=function(){if(this.state.updateBound=this.update.bind(this),t.addEventListener("resize",this.state.updateBound),"window"!==this._options.boundariesElement){var e=c(this._reference);e!==t.document.body&&e!==t.document.documentElement||(e=t),e.addEventListener("scroll",this.state.updateBound),this.state.scrollTarget=e}},i.prototype._removeEventListeners=function(){t.removeEventListener("resize",this.state.updateBound),"window"!==this._options.boundariesElement&&this.state.scrollTarget&&(this.state.scrollTarget.removeEventListener("scroll",this.state.updateBound),this.state.scrollTarget=null),this.state.updateBound=null},i.prototype._getBoundaries=function(e,i,n){var o,r,s={};if("window"===n){var a=t.document.body,u=t.document.documentElement;o=Math.max(a.scrollHeight,a.offsetHeight,u.clientHeight,u.scrollHeight,u.offsetHeight),s={top:0,right:Math.max(a.scrollWidth,a.offsetWidth,u.clientWidth,u.scrollWidth,u.offsetWidth),bottom:o,left:0}}else if("viewport"===n){var p=l(this._popper),d=c(this._popper),f=h(p),g="fixed"===e.offsets.popper.position?0:(r=d)==document.body?Math.max(document.documentElement.scrollTop,document.body.scrollTop):r.scrollTop,_="fixed"===e.offsets.popper.position?0:function(t){return t==document.body?Math.max(document.documentElement.scrollLeft,document.body.scrollLeft):t.scrollLeft}(d);s={top:0-(f.top-g),right:t.document.documentElement.clientWidth-(f.left-_),bottom:t.document.documentElement.clientHeight-(f.top-g),left:0-(f.left-_)}}else s=l(this._popper)===n?{top:0,left:0,right:n.clientWidth,bottom:n.clientHeight}:h(n);return s.left+=i,s.right-=i,s.top=s.top+i,s.bottom=s.bottom-i,s},i.prototype.runModifiers=function(t,e,i){var n=e.slice();return void 0!==i&&(n=this._options.modifiers.slice(0,s(this._options.modifiers,i))),n.forEach(function(e){var i;(i=e)&&"[object Function]"==={}.toString.call(i)&&(t=e.call(this,t))}.bind(this)),t},i.prototype.isModifierRequired=function(t,e){var i=s(this._options.modifiers,t);return!!this._options.modifiers.slice(0,i).filter(function(t){return t===e}).length},i.prototype.modifiers={},i.prototype.modifiers.applyStyle=function(t){var e,i={position:t.offsets.popper.position},n=Math.round(t.offsets.popper.left),o=Math.round(t.offsets.popper.top);return this._options.gpuAcceleration&&(e=d("transform"))?(i[e]="translate3d("+n+"px, "+o+"px, 0)",i.top=0,i.left=0):(i.left=n,i.top=o),Object.assign(i,t.styles),u(this._popper,i),this._popper.setAttribute("x-placement",t.placement),this.isModifierRequired(this.modifiers.applyStyle,this.modifiers.arrow)&&t.offsets.arrow&&u(t.arrowElement,t.offsets.arrow),t},i.prototype.modifiers.shift=function(t){var e=t.placement,i=e.split("-")[0],n=e.split("-")[1];if(n){var o=t.offsets.reference,s=r(t.offsets.popper),a={y:{start:{top:o.top},end:{top:o.top+o.height-s.height}},x:{start:{left:o.left},end:{left:o.left+o.width-s.width}}},l=-1!==["bottom","top"].indexOf(i)?"x":"y";t.offsets.popper=Object.assign(s,a[l][n])}return t},i.prototype.modifiers.preventOverflow=function(t){var e=this._options.preventOverflowOrder,i=r(t.offsets.popper),n={left:function(){var e=i.left;return i.left<t.boundaries.left&&(e=Math.max(i.left,t.boundaries.left)),{left:e}},right:function(){var e=i.left;return i.right>t.boundaries.right&&(e=Math.min(i.left,t.boundaries.right-i.width)),{left:e}},top:function(){var e=i.top;return i.top<t.boundaries.top&&(e=Math.max(i.top,t.boundaries.top)),{top:e}},bottom:function(){var e=i.top;return i.bottom>t.boundaries.bottom&&(e=Math.min(i.top,t.boundaries.bottom-i.height)),{top:e}}};return e.forEach(function(e){t.offsets.popper=Object.assign(i,n[e]())}),t},i.prototype.modifiers.keepTogether=function(t){var e=r(t.offsets.popper),i=t.offsets.reference,n=Math.floor;return e.right<n(i.left)&&(t.offsets.popper.left=n(i.left)-e.width),e.left>n(i.right)&&(t.offsets.popper.left=n(i.right)),e.bottom<n(i.top)&&(t.offsets.popper.top=n(i.top)-e.height),e.top>n(i.bottom)&&(t.offsets.popper.top=n(i.bottom)),t},i.prototype.modifiers.flip=function(t){if(!this.isModifierRequired(this.modifiers.flip,this.modifiers.preventOverflow))return console.warn("WARNING: preventOverflow modifier is required by flip modifier in order to work, be sure to include it before flip!"),t;if(t.flipped&&t.placement===t._originalPlacement)return t;var e=t.placement.split("-")[0],i=o(e),n=t.placement.split("-")[1]||"",s=[];return(s="flip"===this._options.flipBehavior?[e,i]:this._options.flipBehavior).forEach(function(a,l){if(e===a&&s.length!==l+1){e=t.placement.split("-")[0],i=o(e);var c=r(t.offsets.popper),u=-1!==["right","bottom"].indexOf(e);(u&&Math.floor(t.offsets.reference[e])>Math.floor(c[i])||!u&&Math.floor(t.offsets.reference[e])<Math.floor(c[i]))&&(t.flipped=!0,t.placement=s[l+1],n&&(t.placement+="-"+n),t.offsets.popper=this._getOffsets(this._popper,this._reference,t.placement).popper,t=this.runModifiers(t,this._options.modifiers,this._flip))}}.bind(this)),t},i.prototype.modifiers.offset=function(t){var e=this._options.offset,i=t.offsets.popper;return-1!==t.placement.indexOf("left")?i.top-=e:-1!==t.placement.indexOf("right")?i.top+=e:-1!==t.placement.indexOf("top")?i.left-=e:-1!==t.placement.indexOf("bottom")&&(i.left+=e),t},i.prototype.modifiers.arrow=function(t){var e=this._options.arrowElement,i=this._options.arrowOffset;if("string"==typeof e&&(e=this._popper.querySelector(e)),!e)return t;if(!this._popper.contains(e))return console.warn("WARNING: `arrowElement` must be child of its popper element!"),t;if(!this.isModifierRequired(this.modifiers.arrow,this.modifiers.keepTogether))return console.warn("WARNING: keepTogether modifier is required by arrow modifier in order to work, be sure to include it before arrow!"),t;var o={},s=t.placement.split("-")[0],a=r(t.offsets.popper),l=t.offsets.reference,c=-1!==["left","right"].indexOf(s),u=c?"height":"width",h=c?"top":"left",p=c?"left":"top",d=c?"bottom":"right",f=n(e)[u];l[d]-f<a[h]&&(t.offsets.popper[h]-=a[h]-(l[d]-f)),l[h]+f>a[d]&&(t.offsets.popper[h]+=l[h]+f-a[d]);var g=l[h]+(i||l[u]/2-f/2)-a[h];return g=Math.max(Math.min(a[u]-f-8,g),8),o[h]=g,o[p]="",t.offsets.arrow=o,t.arrowElement=e,t},Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert first argument to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(void 0!==n&&null!==n){n=Object(n);for(var o=Object.keys(n),r=0,s=o.length;r<s;r++){var a=o[r],l=Object.getOwnPropertyDescriptor(n,a);void 0!==l&&l.enumerable&&(e[a]=n[a])}}}return e}}),i})?n.call(e,i,e,t):n)||(t.exports=o)},"NWt+":function(t,e,i){var n=i("+ZMJ"),o=i("msXi"),r=i("Mhyx"),s=i("77Pl"),a=i("QRG4"),l=i("3fs2"),c={},u={};(e=t.exports=function(t,e,i,h,p){var d,f,g,_,m=p?function(){return t}:l(t),v=n(i,h,e?2:1),y=0;if("function"!=typeof m)throw TypeError(t+" is not iterable!");if(r(m)){for(d=a(t.length);d>y;y++)if((_=e?v(s(f=t[y])[0],f[1]):v(t[y]))===c||_===u)return _}else for(g=m.call(t);!(f=g.next()).done;)if((_=o(g,v,f.value,e))===c||_===u)return _}).BREAK=c,e.RETURN=u},NYxO:function(t,e,i){"use strict";(function(t){var i=("undefined"!=typeof window?window:void 0!==t?t:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function n(t,e){if(void 0===e&&(e=[]),null===t||"object"!=typeof t)return t;var i,o=(i=function(e){return e.original===t},e.filter(i)[0]);if(o)return o.copy;var r=Array.isArray(t)?[]:{};return e.push({original:t,copy:r}),Object.keys(t).forEach(function(i){r[i]=n(t[i],e)}),r}function o(t,e){Object.keys(t).forEach(function(i){return e(t[i],i)})}function r(t){return null!==t&&"object"==typeof t}var s=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var i=t.state;this.state=("function"==typeof i?i():i)||{}},a={namespaced:{configurable:!0}};a.namespaced.get=function(){return!!this._rawModule.namespaced},s.prototype.addChild=function(t,e){this._children[t]=e},s.prototype.removeChild=function(t){delete this._children[t]},s.prototype.getChild=function(t){return this._children[t]},s.prototype.hasChild=function(t){return t in this._children},s.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},s.prototype.forEachChild=function(t){o(this._children,t)},s.prototype.forEachGetter=function(t){this._rawModule.getters&&o(this._rawModule.getters,t)},s.prototype.forEachAction=function(t){this._rawModule.actions&&o(this._rawModule.actions,t)},s.prototype.forEachMutation=function(t){this._rawModule.mutations&&o(this._rawModule.mutations,t)},Object.defineProperties(s.prototype,a);var l=function(t){this.register([],t,!1)};l.prototype.get=function(t){return t.reduce(function(t,e){return t.getChild(e)},this.root)},l.prototype.getNamespace=function(t){var e=this.root;return t.reduce(function(t,i){return t+((e=e.getChild(i)).namespaced?i+"/":"")},"")},l.prototype.update=function(t){!function t(e,i,n){0;i.update(n);if(n.modules)for(var o in n.modules){if(!i.getChild(o))return void 0;t(e.concat(o),i.getChild(o),n.modules[o])}}([],this.root,t)},l.prototype.register=function(t,e,i){var n=this;void 0===i&&(i=!0);var r=new s(e,i);0===t.length?this.root=r:this.get(t.slice(0,-1)).addChild(t[t.length-1],r);e.modules&&o(e.modules,function(e,o){n.register(t.concat(o),e,i)})},l.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),i=t[t.length-1],n=e.getChild(i);n&&n.runtime&&e.removeChild(i)},l.prototype.isRegistered=function(t){var e=this.get(t.slice(0,-1)),i=t[t.length-1];return!!e&&e.hasChild(i)};var c;var u=function(t){var e=this;void 0===t&&(t={}),!c&&"undefined"!=typeof window&&window.Vue&&v(window.Vue);var n=t.plugins;void 0===n&&(n=[]);var o=t.strict;void 0===o&&(o=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new l(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new c,this._makeLocalGettersCache=Object.create(null);var r=this,s=this.dispatch,a=this.commit;this.dispatch=function(t,e){return s.call(r,t,e)},this.commit=function(t,e,i){return a.call(r,t,e,i)},this.strict=o;var u=this._modules.root.state;g(this,u,[],this._modules.root),f(this,u),n.forEach(function(t){return t(e)}),(void 0!==t.devtools?t.devtools:c.config.devtools)&&function(t){i&&(t._devtoolHook=i,i.emit("vuex:init",t),i.on("vuex:travel-to-state",function(e){t.replaceState(e)}),t.subscribe(function(t,e){i.emit("vuex:mutation",t,e)},{prepend:!0}),t.subscribeAction(function(t,e){i.emit("vuex:action",t,e)},{prepend:!0}))}(this)},h={state:{configurable:!0}};function p(t,e,i){return e.indexOf(t)<0&&(i&&i.prepend?e.unshift(t):e.push(t)),function(){var i=e.indexOf(t);i>-1&&e.splice(i,1)}}function d(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var i=t.state;g(t,i,[],t._modules.root,!0),f(t,i,e)}function f(t,e,i){var n=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);var r={};o(t._wrappedGetters,function(e,i){r[i]=function(t,e){return function(){return t(e)}}(e,t),Object.defineProperty(t.getters,i,{get:function(){return t._vm[i]},enumerable:!0})});var s=c.config.silent;c.config.silent=!0,t._vm=new c({data:{$$state:e},computed:r}),c.config.silent=s,t.strict&&function(t){t._vm.$watch(function(){return this._data.$$state},function(){0},{deep:!0,sync:!0})}(t),n&&(i&&t._withCommit(function(){n._data.$$state=null}),c.nextTick(function(){return n.$destroy()}))}function g(t,e,i,n,o){var r=!i.length,s=t._modules.getNamespace(i);if(n.namespaced&&(t._modulesNamespaceMap[s],t._modulesNamespaceMap[s]=n),!r&&!o){var a=_(e,i.slice(0,-1)),l=i[i.length-1];t._withCommit(function(){c.set(a,l,n.state)})}var u=n.context=function(t,e,i){var n=""===e,o={dispatch:n?t.dispatch:function(i,n,o){var r=m(i,n,o),s=r.payload,a=r.options,l=r.type;return a&&a.root||(l=e+l),t.dispatch(l,s)},commit:n?t.commit:function(i,n,o){var r=m(i,n,o),s=r.payload,a=r.options,l=r.type;a&&a.root||(l=e+l),t.commit(l,s,a)}};return Object.defineProperties(o,{getters:{get:n?function(){return t.getters}:function(){return function(t,e){if(!t._makeLocalGettersCache[e]){var i={},n=e.length;Object.keys(t.getters).forEach(function(o){if(o.slice(0,n)===e){var r=o.slice(n);Object.defineProperty(i,r,{get:function(){return t.getters[o]},enumerable:!0})}}),t._makeLocalGettersCache[e]=i}return t._makeLocalGettersCache[e]}(t,e)}},state:{get:function(){return _(t.state,i)}}}),o}(t,s,i);n.forEachMutation(function(e,i){!function(t,e,i,n){(t._mutations[e]||(t._mutations[e]=[])).push(function(e){i.call(t,n.state,e)})}(t,s+i,e,u)}),n.forEachAction(function(e,i){var n=e.root?i:s+i,o=e.handler||e;!function(t,e,i,n){(t._actions[e]||(t._actions[e]=[])).push(function(e){var o,r=i.call(t,{dispatch:n.dispatch,commit:n.commit,getters:n.getters,state:n.state,rootGetters:t.getters,rootState:t.state},e);return(o=r)&&"function"==typeof o.then||(r=Promise.resolve(r)),t._devtoolHook?r.catch(function(e){throw t._devtoolHook.emit("vuex:error",e),e}):r})}(t,n,o,u)}),n.forEachGetter(function(e,i){!function(t,e,i,n){if(t._wrappedGetters[e])return void 0;t._wrappedGetters[e]=function(t){return i(n.state,n.getters,t.state,t.getters)}}(t,s+i,e,u)}),n.forEachChild(function(n,r){g(t,e,i.concat(r),n,o)})}function _(t,e){return e.reduce(function(t,e){return t[e]},t)}function m(t,e,i){return r(t)&&t.type&&(i=e,e=t,t=t.type),{type:t,payload:e,options:i}}function v(t){c&&t===c||
/*!
 * vuex v3.6.2
 * (c) 2021 Evan You
 * @license MIT
 */
function(t){if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:i});else{var e=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[i].concat(t.init):i,e.call(this,t)}}function i(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(c=t)}h.state.get=function(){return this._vm._data.$$state},h.state.set=function(t){0},u.prototype.commit=function(t,e,i){var n=this,o=m(t,e,i),r=o.type,s=o.payload,a=(o.options,{type:r,payload:s}),l=this._mutations[r];l&&(this._withCommit(function(){l.forEach(function(t){t(s)})}),this._subscribers.slice().forEach(function(t){return t(a,n.state)}))},u.prototype.dispatch=function(t,e){var i=this,n=m(t,e),o=n.type,r=n.payload,s={type:o,payload:r},a=this._actions[o];if(a){try{this._actionSubscribers.slice().filter(function(t){return t.before}).forEach(function(t){return t.before(s,i.state)})}catch(t){0}var l=a.length>1?Promise.all(a.map(function(t){return t(r)})):a[0](r);return new Promise(function(t,e){l.then(function(e){try{i._actionSubscribers.filter(function(t){return t.after}).forEach(function(t){return t.after(s,i.state)})}catch(t){0}t(e)},function(t){try{i._actionSubscribers.filter(function(t){return t.error}).forEach(function(e){return e.error(s,i.state,t)})}catch(t){0}e(t)})})}},u.prototype.subscribe=function(t,e){return p(t,this._subscribers,e)},u.prototype.subscribeAction=function(t,e){return p("function"==typeof t?{before:t}:t,this._actionSubscribers,e)},u.prototype.watch=function(t,e,i){var n=this;return this._watcherVM.$watch(function(){return t(n.state,n.getters)},e,i)},u.prototype.replaceState=function(t){var e=this;this._withCommit(function(){e._vm._data.$$state=t})},u.prototype.registerModule=function(t,e,i){void 0===i&&(i={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),g(this,this.state,t,this._modules.get(t),i.preserveState),f(this,this.state)},u.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var i=_(e.state,t.slice(0,-1));c.delete(i,t[t.length-1])}),d(this)},u.prototype.hasModule=function(t){return"string"==typeof t&&(t=[t]),this._modules.isRegistered(t)},u.prototype.hotUpdate=function(t){this._modules.update(t),d(this,!0)},u.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(u.prototype,h);var y=S(function(t,e){var i={};return C(e).forEach(function(e){var n=e.key,o=e.val;i[n]=function(){var e=this.$store.state,i=this.$store.getters;if(t){var n=k(this.$store,"mapState",t);if(!n)return;e=n.context.state,i=n.context.getters}return"function"==typeof o?o.call(this,e,i):e[o]},i[n].vuex=!0}),i}),b=S(function(t,e){var i={};return C(e).forEach(function(e){var n=e.key,o=e.val;i[n]=function(){for(var e=[],i=arguments.length;i--;)e[i]=arguments[i];var n=this.$store.commit;if(t){var r=k(this.$store,"mapMutations",t);if(!r)return;n=r.context.commit}return"function"==typeof o?o.apply(this,[n].concat(e)):n.apply(this.$store,[o].concat(e))}}),i}),T=S(function(t,e){var i={};return C(e).forEach(function(e){var n=e.key,o=e.val;o=t+o,i[n]=function(){if(!t||k(this.$store,"mapGetters",t))return this.$store.getters[o]},i[n].vuex=!0}),i}),E=S(function(t,e){var i={};return C(e).forEach(function(e){var n=e.key,o=e.val;i[n]=function(){for(var e=[],i=arguments.length;i--;)e[i]=arguments[i];var n=this.$store.dispatch;if(t){var r=k(this.$store,"mapActions",t);if(!r)return;n=r.context.dispatch}return"function"==typeof o?o.apply(this,[n].concat(e)):n.apply(this.$store,[o].concat(e))}}),i});function C(t){return function(t){return Array.isArray(t)||r(t)}(t)?Array.isArray(t)?t.map(function(t){return{key:t,val:t}}):Object.keys(t).map(function(e){return{key:e,val:t[e]}}):[]}function S(t){return function(e,i){return"string"!=typeof e?(i=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,i)}}function k(t,e,i){return t._modulesNamespaceMap[i]}function O(t,e,i){var n=i?t.groupCollapsed:t.group;try{n.call(t,e)}catch(i){t.log(e)}}function I(t){try{t.groupEnd()}catch(e){t.log("—— log end ——")}}function w(){var t=new Date;return" @ "+R(t.getHours(),2)+":"+R(t.getMinutes(),2)+":"+R(t.getSeconds(),2)+"."+R(t.getMilliseconds(),3)}function R(t,e){return i="0",n=e-t.toString().length,new Array(n+1).join(i)+t;var i,n}var D={Store:u,install:v,version:"3.6.2",mapState:y,mapMutations:b,mapGetters:T,mapActions:E,createNamespacedHelpers:function(t){return{mapState:y.bind(null,t),mapGetters:T.bind(null,t),mapMutations:b.bind(null,t),mapActions:E.bind(null,t)}},createLogger:function(t){void 0===t&&(t={});var e=t.collapsed;void 0===e&&(e=!0);var i=t.filter;void 0===i&&(i=function(t,e,i){return!0});var o=t.transformer;void 0===o&&(o=function(t){return t});var r=t.mutationTransformer;void 0===r&&(r=function(t){return t});var s=t.actionFilter;void 0===s&&(s=function(t,e){return!0});var a=t.actionTransformer;void 0===a&&(a=function(t){return t});var l=t.logMutations;void 0===l&&(l=!0);var c=t.logActions;void 0===c&&(c=!0);var u=t.logger;return void 0===u&&(u=console),function(t){var h=n(t.state);void 0!==u&&(l&&t.subscribe(function(t,s){var a=n(s);if(i(t,h,a)){var l=w(),c=r(t),p="mutation "+t.type+l;O(u,p,e),u.log("%c prev state","color: #9E9E9E; font-weight: bold",o(h)),u.log("%c mutation","color: #03A9F4; font-weight: bold",c),u.log("%c next state","color: #4CAF50; font-weight: bold",o(a)),I(u)}h=a}),c&&t.subscribeAction(function(t,i){if(s(t,i)){var n=w(),o=a(t),r="action "+t.type+n;O(u,r,e),u.log("%c action","color: #03A9F4; font-weight: bold",o),I(u)}}))}}};e.a=D}).call(e,i("DuR2"))},NpIQ:function(t,e){e.f={}.propertyIsEnumerable},O4g8:function(t,e){t.exports=!0},OAzY:function(t,e,i){"use strict";e.__esModule=!0;var n,o=i("7+uW"),r=(n=o)&&n.__esModule?n:{default:n},s=i("2kvA");var a=!1,l=!1,c=void 0,u=function(){if(!r.default.prototype.$isServer){var t=p.modalDom;return t?a=!0:(a=!1,t=document.createElement("div"),p.modalDom=t,t.addEventListener("touchmove",function(t){t.preventDefault(),t.stopPropagation()}),t.addEventListener("click",function(){p.doOnModalClick&&p.doOnModalClick()})),t}},h={},p={modalFade:!0,getInstance:function(t){return h[t]},register:function(t,e){t&&e&&(h[t]=e)},deregister:function(t){t&&(h[t]=null,delete h[t])},nextZIndex:function(){return p.zIndex++},modalStack:[],doOnModalClick:function(){var t=p.modalStack[p.modalStack.length-1];if(t){var e=p.getInstance(t.id);e&&e.closeOnClickModal&&e.close()}},openModal:function(t,e,i,n,o){if(!r.default.prototype.$isServer&&t&&void 0!==e){this.modalFade=o;for(var l=this.modalStack,c=0,h=l.length;c<h;c++){if(l[c].id===t)return}var p=u();if((0,s.addClass)(p,"v-modal"),this.modalFade&&!a&&(0,s.addClass)(p,"v-modal-enter"),n)n.trim().split(/\s+/).forEach(function(t){return(0,s.addClass)(p,t)});setTimeout(function(){(0,s.removeClass)(p,"v-modal-enter")},200),i&&i.parentNode&&11!==i.parentNode.nodeType?i.parentNode.appendChild(p):document.body.appendChild(p),e&&(p.style.zIndex=e),p.tabIndex=0,p.style.display="",this.modalStack.push({id:t,zIndex:e,modalClass:n})}},closeModal:function(t){var e=this.modalStack,i=u();if(e.length>0){var n=e[e.length-1];if(n.id===t){if(n.modalClass)n.modalClass.trim().split(/\s+/).forEach(function(t){return(0,s.removeClass)(i,t)});e.pop(),e.length>0&&(i.style.zIndex=e[e.length-1].zIndex)}else for(var o=e.length-1;o>=0;o--)if(e[o].id===t){e.splice(o,1);break}}0===e.length&&(this.modalFade&&(0,s.addClass)(i,"v-modal-leave"),setTimeout(function(){0===e.length&&(i.parentNode&&i.parentNode.removeChild(i),i.style.display="none",p.modalDom=void 0),(0,s.removeClass)(i,"v-modal-leave")},200))}};Object.defineProperty(p,"zIndex",{configurable:!0,get:function(){return l||(c=c||(r.default.prototype.$ELEMENT||{}).zIndex||2e3,l=!0),c},set:function(t){c=t}});r.default.prototype.$isServer||window.addEventListener("keydown",function(t){if(27===t.keyCode){var e=function(){if(!r.default.prototype.$isServer&&p.modalStack.length>0){var t=p.modalStack[p.modalStack.length-1];if(!t)return;return p.getInstance(t.id)}}();e&&e.closeOnPressEscape&&(e.handleClose?e.handleClose():e.handleAction?e.handleAction("cancel"):e.close())}}),e.default=p},ON07:function(t,e,i){var n=i("EqjI"),o=i("7KvD").document,r=n(o)&&n(o.createElement);t.exports=function(t){return r?o.createElement(t):{}}},ON3O:function(t,e,i){var n=i("uY1a");t.exports=function(t,e,i){return void 0===i?n(t,e,!1):n(t,i,!1!==e)}},OYls:function(t,e,i){i("crlp")("asyncIterator")},"Oi+a":function(t,e,i){"use strict";var n=i("dIwP"),o=i("qRfI");t.exports=function(t,e){return t&&!n(e)?o(t,e):e}},PzxK:function(t,e,i){var n=i("D2L2"),o=i("sB3e"),r=i("ax3d")("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),n(t,r)?t[r]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},QRG4:function(t,e,i){var n=i("UuGF"),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},QUGb:function(t,e,i){var n,o,r,s;s=function(t){"use strict";return t.Blocks.colour={},t.Constants={},t.Constants.Colour={},t.Constants.Colour.HUE=20,t.defineBlocksWithJsonArray([{type:"colour_picker",message0:"%1",args0:[{type:"field_colour",name:"COLOUR",colour:"#ff0000"}],output:"Colour",helpUrl:"%{BKY_COLOUR_PICKER_HELPURL}",style:"colour_blocks",tooltip:"%{BKY_COLOUR_PICKER_TOOLTIP}",extensions:["parent_tooltip_when_inline"]},{type:"colour_random",message0:"%{BKY_COLOUR_RANDOM_TITLE}",output:"Colour",helpUrl:"%{BKY_COLOUR_RANDOM_HELPURL}",style:"colour_blocks",tooltip:"%{BKY_COLOUR_RANDOM_TOOLTIP}"},{type:"colour_rgb",message0:"%{BKY_COLOUR_RGB_TITLE} %{BKY_COLOUR_RGB_RED} %1 %{BKY_COLOUR_RGB_GREEN} %2 %{BKY_COLOUR_RGB_BLUE} %3",args0:[{type:"input_value",name:"RED",check:"Number",align:"RIGHT"},{type:"input_value",name:"GREEN",check:"Number",align:"RIGHT"},{type:"input_value",name:"BLUE",check:"Number",align:"RIGHT"}],output:"Colour",helpUrl:"%{BKY_COLOUR_RGB_HELPURL}",style:"colour_blocks",tooltip:"%{BKY_COLOUR_RGB_TOOLTIP}"},{type:"colour_blend",message0:"%{BKY_COLOUR_BLEND_TITLE} %{BKY_COLOUR_BLEND_COLOUR1} %1 %{BKY_COLOUR_BLEND_COLOUR2} %2 %{BKY_COLOUR_BLEND_RATIO} %3",args0:[{type:"input_value",name:"COLOUR1",check:"Colour",align:"RIGHT"},{type:"input_value",name:"COLOUR2",check:"Colour",align:"RIGHT"},{type:"input_value",name:"RATIO",check:"Number",align:"RIGHT"}],output:"Colour",helpUrl:"%{BKY_COLOUR_BLEND_HELPURL}",style:"colour_blocks",tooltip:"%{BKY_COLOUR_BLEND_TOOLTIP}"}]),t.Constants.Lists={},t.Constants.Lists.HUE=260,t.defineBlocksWithJsonArray([{type:"lists_create_empty",message0:"%{BKY_LISTS_CREATE_EMPTY_TITLE}",output:"Array",style:"list_blocks",tooltip:"%{BKY_LISTS_CREATE_EMPTY_TOOLTIP}",helpUrl:"%{BKY_LISTS_CREATE_EMPTY_HELPURL}"},{type:"lists_repeat",message0:"%{BKY_LISTS_REPEAT_TITLE}",args0:[{type:"input_value",name:"ITEM"},{type:"input_value",name:"NUM",check:"Number"}],output:"Array",style:"list_blocks",tooltip:"%{BKY_LISTS_REPEAT_TOOLTIP}",helpUrl:"%{BKY_LISTS_REPEAT_HELPURL}"},{type:"lists_reverse",message0:"%{BKY_LISTS_REVERSE_MESSAGE0}",args0:[{type:"input_value",name:"LIST",check:"Array"}],output:"Array",inputsInline:!0,style:"list_blocks",tooltip:"%{BKY_LISTS_REVERSE_TOOLTIP}",helpUrl:"%{BKY_LISTS_REVERSE_HELPURL}"},{type:"lists_isEmpty",message0:"%{BKY_LISTS_ISEMPTY_TITLE}",args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Boolean",style:"list_blocks",tooltip:"%{BKY_LISTS_ISEMPTY_TOOLTIP}",helpUrl:"%{BKY_LISTS_ISEMPTY_HELPURL}"},{type:"lists_length",message0:"%{BKY_LISTS_LENGTH_TITLE}",args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Number",style:"list_blocks",tooltip:"%{BKY_LISTS_LENGTH_TOOLTIP}",helpUrl:"%{BKY_LISTS_LENGTH_HELPURL}"}]),t.Blocks.lists_create_with={init:function(){this.setHelpUrl(t.Msg.LISTS_CREATE_WITH_HELPURL),this.setStyle("list_blocks"),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Array"),this.setMutator(new t.Mutator(["lists_create_with_item"])),this.setTooltip(t.Msg.LISTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var e=t.utils.xml.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n<this.itemCount_;n++){var o=t.newBlock("lists_create_with_item");o.initSvg(),i.connect(o.previousConnection),i=o.nextConnection}return e},compose:function(e){var i=e.getInputTargetBlock("STACK");for(e=[];i&&!i.isInsertionMarker();)e.push(i.valueConnection_),i=i.nextConnection&&i.nextConnection.targetBlock();for(i=0;i<this.itemCount_;i++){var n=this.getInput("ADD"+i).connection.targetConnection;n&&-1==e.indexOf(n)&&n.disconnect()}for(this.itemCount_=e.length,this.updateShape_(),i=0;i<this.itemCount_;i++)t.Mutator.reconnect(e[i],this,"ADD"+i)},saveConnections:function(t){t=t.getInputTargetBlock("STACK");for(var e=0;t;){var i=this.getInput("ADD"+e);t.valueConnection_=i&&i.connection.targetConnection,e++,t=t.nextConnection&&t.nextConnection.targetBlock()}},updateShape_:function(){this.itemCount_&&this.getInput("EMPTY")?this.removeInput("EMPTY"):this.itemCount_||this.getInput("EMPTY")||this.appendDummyInput("EMPTY").appendField(t.Msg.LISTS_CREATE_EMPTY_TITLE);for(var e=0;e<this.itemCount_;e++)if(!this.getInput("ADD"+e)){var i=this.appendValueInput("ADD"+e).setAlign(t.ALIGN_RIGHT);0==e&&i.appendField(t.Msg.LISTS_CREATE_WITH_INPUT_WITH)}for(;this.getInput("ADD"+e);)this.removeInput("ADD"+e),e++}},t.Blocks.lists_create_with_container={init:function(){this.setStyle("list_blocks"),this.appendDummyInput().appendField(t.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD),this.appendStatementInput("STACK"),this.setTooltip(t.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},t.Blocks.lists_create_with_item={init:function(){this.setStyle("list_blocks"),this.appendDummyInput().appendField(t.Msg.LISTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(t.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},t.Blocks.lists_indexOf={init:function(){var e=[[t.Msg.LISTS_INDEX_OF_FIRST,"FIRST"],[t.Msg.LISTS_INDEX_OF_LAST,"LAST"]];this.setHelpUrl(t.Msg.LISTS_INDEX_OF_HELPURL),this.setStyle("list_blocks"),this.setOutput(!0,"Number"),this.appendValueInput("VALUE").setCheck("Array").appendField(t.Msg.LISTS_INDEX_OF_INPUT_IN_LIST),this.appendValueInput("FIND").appendField(new t.FieldDropdown(e),"END"),this.setInputsInline(!0);var i=this;this.setTooltip(function(){return t.Msg.LISTS_INDEX_OF_TOOLTIP.replace("%1",i.workspace.options.oneBasedIndex?"0":"-1")})}},t.Blocks.lists_getIndex={init:function(){var e=[[t.Msg.LISTS_GET_INDEX_GET,"GET"],[t.Msg.LISTS_GET_INDEX_GET_REMOVE,"GET_REMOVE"],[t.Msg.LISTS_GET_INDEX_REMOVE,"REMOVE"]];this.WHERE_OPTIONS=[[t.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[t.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[t.Msg.LISTS_GET_INDEX_FIRST,"FIRST"],[t.Msg.LISTS_GET_INDEX_LAST,"LAST"],[t.Msg.LISTS_GET_INDEX_RANDOM,"RANDOM"]],this.setHelpUrl(t.Msg.LISTS_GET_INDEX_HELPURL),this.setStyle("list_blocks"),e=new t.FieldDropdown(e,function(t){t="REMOVE"==t,this.getSourceBlock().updateStatement_(t)}),this.appendValueInput("VALUE").setCheck("Array").appendField(t.Msg.LISTS_GET_INDEX_INPUT_IN_LIST),this.appendDummyInput().appendField(e,"MODE").appendField("","SPACE"),this.appendDummyInput("AT"),t.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(t.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var i=this;this.setTooltip(function(){var e=i.getFieldValue("MODE"),n=i.getFieldValue("WHERE"),o="";switch(e+" "+n){case"GET FROM_START":case"GET FROM_END":o=t.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET FIRST":o=t.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FIRST;break;case"GET LAST":o=t.Msg.LISTS_GET_INDEX_TOOLTIP_GET_LAST;break;case"GET RANDOM":o=t.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":o=t.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE FIRST":o=t.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST;break;case"GET_REMOVE LAST":o=t.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST;break;case"GET_REMOVE RANDOM":o=t.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM;break;case"REMOVE FROM_START":case"REMOVE FROM_END":o=t.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM;break;case"REMOVE FIRST":o=t.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST;break;case"REMOVE LAST":o=t.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST;break;case"REMOVE RANDOM":o=t.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM}return"FROM_START"!=n&&"FROM_END"!=n||(o+="  "+("FROM_START"==n?t.Msg.LISTS_INDEX_FROM_START_TOOLTIP:t.Msg.LISTS_INDEX_FROM_END_TOOLTIP).replace("%1",i.workspace.options.oneBasedIndex?"#1":"#0")),o})},mutationToDom:function(){var e=t.utils.xml.createElement("mutation");e.setAttribute("statement",!this.outputConnection);var i=this.getInput("AT").type==t.INPUT_VALUE;return e.setAttribute("at",i),e},domToMutation:function(t){var e="true"==t.getAttribute("statement");this.updateStatement_(e),t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateStatement_:function(t){t!=!this.outputConnection&&(this.unplug(!0,!0),t?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(e){this.removeInput("AT"),this.removeInput("ORDINAL",!0),e?(this.appendValueInput("AT").setCheck("Number"),t.Msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL").appendField(t.Msg.ORDINAL_NUMBER_SUFFIX)):this.appendDummyInput("AT");var i=new t.FieldDropdown(this.WHERE_OPTIONS,function(t){var i="FROM_START"==t||"FROM_END"==t;if(i!=e){var n=this.getSourceBlock();return n.updateAt_(i),n.setFieldValue(t,"WHERE"),null}});this.getInput("AT").appendField(i,"WHERE"),t.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},t.Blocks.lists_setIndex={init:function(){var e=[[t.Msg.LISTS_SET_INDEX_SET,"SET"],[t.Msg.LISTS_SET_INDEX_INSERT,"INSERT"]];this.WHERE_OPTIONS=[[t.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[t.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[t.Msg.LISTS_GET_INDEX_FIRST,"FIRST"],[t.Msg.LISTS_GET_INDEX_LAST,"LAST"],[t.Msg.LISTS_GET_INDEX_RANDOM,"RANDOM"]],this.setHelpUrl(t.Msg.LISTS_SET_INDEX_HELPURL),this.setStyle("list_blocks"),this.appendValueInput("LIST").setCheck("Array").appendField(t.Msg.LISTS_SET_INDEX_INPUT_IN_LIST),this.appendDummyInput().appendField(new t.FieldDropdown(e),"MODE").appendField("","SPACE"),this.appendDummyInput("AT"),this.appendValueInput("TO").appendField(t.Msg.LISTS_SET_INDEX_INPUT_TO),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(t.Msg.LISTS_SET_INDEX_TOOLTIP),this.updateAt_(!0);var i=this;this.setTooltip(function(){var e=i.getFieldValue("MODE"),n=i.getFieldValue("WHERE"),o="";switch(e+" "+n){case"SET FROM_START":case"SET FROM_END":o=t.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM;break;case"SET FIRST":o=t.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST;break;case"SET LAST":o=t.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST;break;case"SET RANDOM":o=t.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM;break;case"INSERT FROM_START":case"INSERT FROM_END":o=t.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM;break;case"INSERT FIRST":o=t.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST;break;case"INSERT LAST":o=t.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST;break;case"INSERT RANDOM":o=t.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM}return"FROM_START"!=n&&"FROM_END"!=n||(o+="  "+t.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",i.workspace.options.oneBasedIndex?"#1":"#0")),o})},mutationToDom:function(){var e=t.utils.xml.createElement("mutation"),i=this.getInput("AT").type==t.INPUT_VALUE;return e.setAttribute("at",i),e},domToMutation:function(t){t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateAt_:function(e){this.removeInput("AT"),this.removeInput("ORDINAL",!0),e?(this.appendValueInput("AT").setCheck("Number"),t.Msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL").appendField(t.Msg.ORDINAL_NUMBER_SUFFIX)):this.appendDummyInput("AT");var i=new t.FieldDropdown(this.WHERE_OPTIONS,function(t){var i="FROM_START"==t||"FROM_END"==t;if(i!=e){var n=this.getSourceBlock();return n.updateAt_(i),n.setFieldValue(t,"WHERE"),null}});this.moveInputBefore("AT","TO"),this.getInput("ORDINAL")&&this.moveInputBefore("ORDINAL","TO"),this.getInput("AT").appendField(i,"WHERE")}},t.Blocks.lists_getSublist={init:function(){this.WHERE_OPTIONS_1=[[t.Msg.LISTS_GET_SUBLIST_START_FROM_START,"FROM_START"],[t.Msg.LISTS_GET_SUBLIST_START_FROM_END,"FROM_END"],[t.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[t.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[t.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[t.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(t.Msg.LISTS_GET_SUBLIST_HELPURL),this.setStyle("list_blocks"),this.appendValueInput("LIST").setCheck("Array").appendField(t.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),t.Msg.LISTS_GET_SUBLIST_TAIL&&this.appendDummyInput("TAIL").appendField(t.Msg.LISTS_GET_SUBLIST_TAIL),this.setInputsInline(!0),this.setOutput(!0,"Array"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(t.Msg.LISTS_GET_SUBLIST_TOOLTIP)},mutationToDom:function(){var e=t.utils.xml.createElement("mutation"),i=this.getInput("AT1").type==t.INPUT_VALUE;return e.setAttribute("at1",i),i=this.getInput("AT2").type==t.INPUT_VALUE,e.setAttribute("at2",i),e},domToMutation:function(t){var e="true"==t.getAttribute("at1");t="true"==t.getAttribute("at2"),this.updateAt_(1,e),this.updateAt_(2,t)},updateAt_:function(e,i){this.removeInput("AT"+e),this.removeInput("ORDINAL"+e,!0),i?(this.appendValueInput("AT"+e).setCheck("Number"),t.Msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL"+e).appendField(t.Msg.ORDINAL_NUMBER_SUFFIX)):this.appendDummyInput("AT"+e);var n=new t.FieldDropdown(this["WHERE_OPTIONS_"+e],function(t){var n="FROM_START"==t||"FROM_END"==t;if(n!=i){var o=this.getSourceBlock();return o.updateAt_(e,n),o.setFieldValue(t,"WHERE"+e),null}});this.getInput("AT"+e).appendField(n,"WHERE"+e),1==e&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2")),t.Msg.LISTS_GET_SUBLIST_TAIL&&this.moveInputBefore("TAIL",null)}},t.Blocks.lists_sort={init:function(){this.jsonInit({message0:t.Msg.LISTS_SORT_TITLE,args0:[{type:"field_dropdown",name:"TYPE",options:[[t.Msg.LISTS_SORT_TYPE_NUMERIC,"NUMERIC"],[t.Msg.LISTS_SORT_TYPE_TEXT,"TEXT"],[t.Msg.LISTS_SORT_TYPE_IGNORECASE,"IGNORE_CASE"]]},{type:"field_dropdown",name:"DIRECTION",options:[[t.Msg.LISTS_SORT_ORDER_ASCENDING,"1"],[t.Msg.LISTS_SORT_ORDER_DESCENDING,"-1"]]},{type:"input_value",name:"LIST",check:"Array"}],output:"Array",style:"list_blocks",tooltip:t.Msg.LISTS_SORT_TOOLTIP,helpUrl:t.Msg.LISTS_SORT_HELPURL})}},t.Blocks.lists_split={init:function(){var e=this,i=new t.FieldDropdown([[t.Msg.LISTS_SPLIT_LIST_FROM_TEXT,"SPLIT"],[t.Msg.LISTS_SPLIT_TEXT_FROM_LIST,"JOIN"]],function(t){e.updateType_(t)});this.setHelpUrl(t.Msg.LISTS_SPLIT_HELPURL),this.setStyle("list_blocks"),this.appendValueInput("INPUT").setCheck("String").appendField(i,"MODE"),this.appendValueInput("DELIM").setCheck("String").appendField(t.Msg.LISTS_SPLIT_WITH_DELIMITER),this.setInputsInline(!0),this.setOutput(!0,"Array"),this.setTooltip(function(){var i=e.getFieldValue("MODE");if("SPLIT"==i)return t.Msg.LISTS_SPLIT_TOOLTIP_SPLIT;if("JOIN"==i)return t.Msg.LISTS_SPLIT_TOOLTIP_JOIN;throw Error("Unknown mode: "+i)})},updateType_:function(t){if(this.getFieldValue("MODE")!=t){var e=this.getInput("INPUT").connection;e.setShadowDom(null);var i=e.targetBlock();i&&(e.disconnect(),i.isShadow()?i.dispose():this.bumpNeighbours())}"SPLIT"==t?(this.outputConnection.setCheck("Array"),this.getInput("INPUT").setCheck("String")):(this.outputConnection.setCheck("String"),this.getInput("INPUT").setCheck("Array"))},mutationToDom:function(){var e=t.utils.xml.createElement("mutation");return e.setAttribute("mode",this.getFieldValue("MODE")),e},domToMutation:function(t){this.updateType_(t.getAttribute("mode"))}},t.Blocks.logic={},t.Constants.Logic={},t.Constants.Logic.HUE=210,t.defineBlocksWithJsonArray([{type:"logic_boolean",message0:"%1",args0:[{type:"field_dropdown",name:"BOOL",options:[["%{BKY_LOGIC_BOOLEAN_TRUE}","TRUE"],["%{BKY_LOGIC_BOOLEAN_FALSE}","FALSE"]]}],output:"Boolean",style:"logic_blocks",tooltip:"%{BKY_LOGIC_BOOLEAN_TOOLTIP}",helpUrl:"%{BKY_LOGIC_BOOLEAN_HELPURL}"},{type:"controls_if",message0:"%{BKY_CONTROLS_IF_MSG_IF} %1",args0:[{type:"input_value",name:"IF0",check:"Boolean"}],message1:"%{BKY_CONTROLS_IF_MSG_THEN} %1",args1:[{type:"input_statement",name:"DO0"}],previousStatement:null,nextStatement:null,style:"logic_blocks",helpUrl:"%{BKY_CONTROLS_IF_HELPURL}",mutator:"controls_if_mutator",extensions:["controls_if_tooltip"]},{type:"controls_ifelse",message0:"%{BKY_CONTROLS_IF_MSG_IF} %1",args0:[{type:"input_value",name:"IF0",check:"Boolean"}],message1:"%{BKY_CONTROLS_IF_MSG_THEN} %1",args1:[{type:"input_statement",name:"DO0"}],message2:"%{BKY_CONTROLS_IF_MSG_ELSE} %1",args2:[{type:"input_statement",name:"ELSE"}],previousStatement:null,nextStatement:null,style:"logic_blocks",tooltip:"%{BKYCONTROLS_IF_TOOLTIP_2}",helpUrl:"%{BKY_CONTROLS_IF_HELPURL}",extensions:["controls_if_tooltip"]},{type:"logic_compare",message0:"%1 %2 %3",args0:[{type:"input_value",name:"A"},{type:"field_dropdown",name:"OP",options:[["=","EQ"],["≠","NEQ"],["‏<","LT"],["‏≤","LTE"],["‏>","GT"],["‏≥","GTE"]]},{type:"input_value",name:"B"}],inputsInline:!0,output:"Boolean",style:"logic_blocks",helpUrl:"%{BKY_LOGIC_COMPARE_HELPURL}",extensions:["logic_compare","logic_op_tooltip"]},{type:"logic_operation",message0:"%1 %2 %3",args0:[{type:"input_value",name:"A",check:"Boolean"},{type:"field_dropdown",name:"OP",options:[["%{BKY_LOGIC_OPERATION_AND}","AND"],["%{BKY_LOGIC_OPERATION_OR}","OR"]]},{type:"input_value",name:"B",check:"Boolean"}],inputsInline:!0,output:"Boolean",style:"logic_blocks",helpUrl:"%{BKY_LOGIC_OPERATION_HELPURL}",extensions:["logic_op_tooltip"]},{type:"logic_negate",message0:"%{BKY_LOGIC_NEGATE_TITLE}",args0:[{type:"input_value",name:"BOOL",check:"Boolean"}],output:"Boolean",style:"logic_blocks",tooltip:"%{BKY_LOGIC_NEGATE_TOOLTIP}",helpUrl:"%{BKY_LOGIC_NEGATE_HELPURL}"},{type:"logic_null",message0:"%{BKY_LOGIC_NULL}",output:null,style:"logic_blocks",tooltip:"%{BKY_LOGIC_NULL_TOOLTIP}",helpUrl:"%{BKY_LOGIC_NULL_HELPURL}"},{type:"logic_ternary",message0:"%{BKY_LOGIC_TERNARY_CONDITION} %1",args0:[{type:"input_value",name:"IF",check:"Boolean"}],message1:"%{BKY_LOGIC_TERNARY_IF_TRUE} %1",args1:[{type:"input_value",name:"THEN"}],message2:"%{BKY_LOGIC_TERNARY_IF_FALSE} %1",args2:[{type:"input_value",name:"ELSE"}],output:null,style:"logic_blocks",tooltip:"%{BKY_LOGIC_TERNARY_TOOLTIP}",helpUrl:"%{BKY_LOGIC_TERNARY_HELPURL}",extensions:["logic_ternary"]}]),t.defineBlocksWithJsonArray([{type:"controls_if_if",message0:"%{BKY_CONTROLS_IF_IF_TITLE_IF}",nextStatement:null,enableContextMenu:!1,style:"logic_blocks",tooltip:"%{BKY_CONTROLS_IF_IF_TOOLTIP}"},{type:"controls_if_elseif",message0:"%{BKY_CONTROLS_IF_ELSEIF_TITLE_ELSEIF}",previousStatement:null,nextStatement:null,enableContextMenu:!1,style:"logic_blocks",tooltip:"%{BKY_CONTROLS_IF_ELSEIF_TOOLTIP}"},{type:"controls_if_else",message0:"%{BKY_CONTROLS_IF_ELSE_TITLE_ELSE}",previousStatement:null,enableContextMenu:!1,style:"logic_blocks",tooltip:"%{BKY_CONTROLS_IF_ELSE_TOOLTIP}"}]),t.Constants.Logic.TOOLTIPS_BY_OP={EQ:"%{BKY_LOGIC_COMPARE_TOOLTIP_EQ}",NEQ:"%{BKY_LOGIC_COMPARE_TOOLTIP_NEQ}",LT:"%{BKY_LOGIC_COMPARE_TOOLTIP_LT}",LTE:"%{BKY_LOGIC_COMPARE_TOOLTIP_LTE}",GT:"%{BKY_LOGIC_COMPARE_TOOLTIP_GT}",GTE:"%{BKY_LOGIC_COMPARE_TOOLTIP_GTE}",AND:"%{BKY_LOGIC_OPERATION_TOOLTIP_AND}",OR:"%{BKY_LOGIC_OPERATION_TOOLTIP_OR}"},t.Extensions.register("logic_op_tooltip",t.Extensions.buildTooltipForDropdown("OP",t.Constants.Logic.TOOLTIPS_BY_OP)),t.Constants.Logic.CONTROLS_IF_MUTATOR_MIXIN={elseifCount_:0,elseCount_:0,suppressPrefixSuffix:!0,mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var e=t.utils.xml.createElement("mutation");return this.elseifCount_&&e.setAttribute("elseif",this.elseifCount_),this.elseCount_&&e.setAttribute("else",1),e},domToMutation:function(t){this.elseifCount_=parseInt(t.getAttribute("elseif"),10)||0,this.elseCount_=parseInt(t.getAttribute("else"),10)||0,this.rebuildShape_()},decompose:function(t){var e=t.newBlock("controls_if_if");e.initSvg();for(var i=e.nextConnection,n=1;n<=this.elseifCount_;n++){var o=t.newBlock("controls_if_elseif");o.initSvg(),i.connect(o.previousConnection),i=o.nextConnection}return this.elseCount_&&((t=t.newBlock("controls_if_else")).initSvg(),i.connect(t.previousConnection)),e},compose:function(t){t=t.nextConnection.targetBlock(),this.elseCount_=this.elseifCount_=0;for(var e=[null],i=[null],n=null;t&&!t.isInsertionMarker();){switch(t.type){case"controls_if_elseif":this.elseifCount_++,e.push(t.valueConnection_),i.push(t.statementConnection_);break;case"controls_if_else":this.elseCount_++,n=t.statementConnection_;break;default:throw TypeError("Unknown block type: "+t.type)}t=t.nextConnection&&t.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(e,i,n)},saveConnections:function(t){t=t.nextConnection.targetBlock();for(var e=1;t;){switch(t.type){case"controls_if_elseif":var i=this.getInput("IF"+e),n=this.getInput("DO"+e);t.valueConnection_=i&&i.connection.targetConnection,t.statementConnection_=n&&n.connection.targetConnection,e++;break;case"controls_if_else":n=this.getInput("ELSE"),t.statementConnection_=n&&n.connection.targetConnection;break;default:throw TypeError("Unknown block type: "+t.type)}t=t.nextConnection&&t.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var o=this.getInput("IF"+n),r=this.getInput("DO"+n);t.push(o.connection.targetConnection),e.push(r.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var e=1;this.getInput("IF"+e);)this.removeInput("IF"+e),this.removeInput("DO"+e),e++;for(e=1;e<=this.elseifCount_;e++)this.appendValueInput("IF"+e).setCheck("Boolean").appendField(t.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+e).appendField(t.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(t.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(e,i,n){for(var o=1;o<=this.elseifCount_;o++)t.Mutator.reconnect(e[o],this,"IF"+o),t.Mutator.reconnect(i[o],this,"DO"+o);t.Mutator.reconnect(n,this,"ELSE")}},t.Extensions.registerMutator("controls_if_mutator",t.Constants.Logic.CONTROLS_IF_MUTATOR_MIXIN,null,["controls_if_elseif","controls_if_else"]),t.Constants.Logic.CONTROLS_IF_TOOLTIP_EXTENSION=function(){this.setTooltip(function(){return this.elseifCount_||this.elseCount_?!this.elseifCount_&&this.elseCount_?t.Msg.CONTROLS_IF_TOOLTIP_2:this.elseifCount_&&!this.elseCount_?t.Msg.CONTROLS_IF_TOOLTIP_3:this.elseifCount_&&this.elseCount_?t.Msg.CONTROLS_IF_TOOLTIP_4:"":t.Msg.CONTROLS_IF_TOOLTIP_1}.bind(this))},t.Extensions.register("controls_if_tooltip",t.Constants.Logic.CONTROLS_IF_TOOLTIP_EXTENSION),t.Constants.Logic.LOGIC_COMPARE_ONCHANGE_MIXIN={onchange:function(e){this.prevBlocks_||(this.prevBlocks_=[null,null]);var i=this.getInputTargetBlock("A"),n=this.getInputTargetBlock("B");i&&n&&!this.workspace.connectionChecker.doTypeChecks(i.outputConnection,n.outputConnection)&&(t.Events.setGroup(e.group),(e=this.prevBlocks_[0])!==i&&(i.unplug(),!e||e.isDisposed()||e.isShadow()||this.getInput("A").connection.connect(e.outputConnection)),(i=this.prevBlocks_[1])!==n&&(n.unplug(),!i||i.isDisposed()||i.isShadow()||this.getInput("B").connection.connect(i.outputConnection)),this.bumpNeighbours(),t.Events.setGroup(!1)),this.prevBlocks_[0]=this.getInputTargetBlock("A"),this.prevBlocks_[1]=this.getInputTargetBlock("B")}},t.Constants.Logic.LOGIC_COMPARE_EXTENSION=function(){this.mixin(t.Constants.Logic.LOGIC_COMPARE_ONCHANGE_MIXIN)},t.Extensions.register("logic_compare",t.Constants.Logic.LOGIC_COMPARE_EXTENSION),t.Constants.Logic.LOGIC_TERNARY_ONCHANGE_MIXIN={prevParentConnection_:null,onchange:function(e){var i=this.getInputTargetBlock("THEN"),n=this.getInputTargetBlock("ELSE"),o=this.outputConnection.targetConnection;if((i||n)&&o)for(var r=0;2>r;r++){var s=1==r?i:n;s&&!s.workspace.connectionChecker.doTypeChecks(s.outputConnection,o)&&(t.Events.setGroup(e.group),o===this.prevParentConnection_?(this.unplug(),o.getSourceBlock().bumpNeighbours()):(s.unplug(),s.bumpNeighbours()),t.Events.setGroup(!1))}this.prevParentConnection_=o}},t.Extensions.registerMixin("logic_ternary",t.Constants.Logic.LOGIC_TERNARY_ONCHANGE_MIXIN),t.Blocks.loops={},t.Constants.Loops={},t.Constants.Loops.HUE=120,t.defineBlocksWithJsonArray([{type:"controls_repeat_ext",message0:"%{BKY_CONTROLS_REPEAT_TITLE}",args0:[{type:"input_value",name:"TIMES",check:"Number"}],message1:"%{BKY_CONTROLS_REPEAT_INPUT_DO} %1",args1:[{type:"input_statement",name:"DO"}],previousStatement:null,nextStatement:null,style:"loop_blocks",tooltip:"%{BKY_CONTROLS_REPEAT_TOOLTIP}",helpUrl:"%{BKY_CONTROLS_REPEAT_HELPURL}"},{type:"controls_repeat",message0:"%{BKY_CONTROLS_REPEAT_TITLE}",args0:[{type:"field_number",name:"TIMES",value:10,min:0,precision:1}],message1:"%{BKY_CONTROLS_REPEAT_INPUT_DO} %1",args1:[{type:"input_statement",name:"DO"}],previousStatement:null,nextStatement:null,style:"loop_blocks",tooltip:"%{BKY_CONTROLS_REPEAT_TOOLTIP}",helpUrl:"%{BKY_CONTROLS_REPEAT_HELPURL}"},{type:"controls_whileUntil",message0:"%1 %2",args0:[{type:"field_dropdown",name:"MODE",options:[["%{BKY_CONTROLS_WHILEUNTIL_OPERATOR_WHILE}","WHILE"],["%{BKY_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL}","UNTIL"]]},{type:"input_value",name:"BOOL",check:"Boolean"}],message1:"%{BKY_CONTROLS_REPEAT_INPUT_DO} %1",args1:[{type:"input_statement",name:"DO"}],previousStatement:null,nextStatement:null,style:"loop_blocks",helpUrl:"%{BKY_CONTROLS_WHILEUNTIL_HELPURL}",extensions:["controls_whileUntil_tooltip"]},{type:"controls_for",message0:"%{BKY_CONTROLS_FOR_TITLE}",args0:[{type:"field_variable",name:"VAR",variable:null},{type:"input_value",name:"FROM",check:"Number",align:"RIGHT"},{type:"input_value",name:"TO",check:"Number",align:"RIGHT"},{type:"input_value",name:"BY",check:"Number",align:"RIGHT"}],message1:"%{BKY_CONTROLS_REPEAT_INPUT_DO} %1",args1:[{type:"input_statement",name:"DO"}],inputsInline:!0,previousStatement:null,nextStatement:null,style:"loop_blocks",helpUrl:"%{BKY_CONTROLS_FOR_HELPURL}",extensions:["contextMenu_newGetVariableBlock","controls_for_tooltip"]},{type:"controls_forEach",message0:"%{BKY_CONTROLS_FOREACH_TITLE}",args0:[{type:"field_variable",name:"VAR",variable:null},{type:"input_value",name:"LIST",check:"Array"}],message1:"%{BKY_CONTROLS_REPEAT_INPUT_DO} %1",args1:[{type:"input_statement",name:"DO"}],previousStatement:null,nextStatement:null,style:"loop_blocks",helpUrl:"%{BKY_CONTROLS_FOREACH_HELPURL}",extensions:["contextMenu_newGetVariableBlock","controls_forEach_tooltip"]},{type:"controls_flow_statements",message0:"%1",args0:[{type:"field_dropdown",name:"FLOW",options:[["%{BKY_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK}","BREAK"],["%{BKY_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE}","CONTINUE"]]}],previousStatement:null,style:"loop_blocks",helpUrl:"%{BKY_CONTROLS_FLOW_STATEMENTS_HELPURL}",extensions:["controls_flow_tooltip","controls_flow_in_loop_check"]}]),t.Constants.Loops.WHILE_UNTIL_TOOLTIPS={WHILE:"%{BKY_CONTROLS_WHILEUNTIL_TOOLTIP_WHILE}",UNTIL:"%{BKY_CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}"},t.Extensions.register("controls_whileUntil_tooltip",t.Extensions.buildTooltipForDropdown("MODE",t.Constants.Loops.WHILE_UNTIL_TOOLTIPS)),t.Constants.Loops.BREAK_CONTINUE_TOOLTIPS={BREAK:"%{BKY_CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK}",CONTINUE:"%{BKY_CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}"},t.Extensions.register("controls_flow_tooltip",t.Extensions.buildTooltipForDropdown("FLOW",t.Constants.Loops.BREAK_CONTINUE_TOOLTIPS)),t.Constants.Loops.CUSTOM_CONTEXT_MENU_CREATE_VARIABLES_GET_MIXIN={customContextMenu:function(e){if(!this.isInFlyout){var i=this.getField("VAR").getVariable(),n=i.name;if(!this.isCollapsed()&&null!=n){var o={enabled:!0};o.text=t.Msg.VARIABLES_SET_CREATE_GET.replace("%1",n),i=t.Variables.generateVariableFieldDom(i),(n=t.utils.xml.createElement("block")).setAttribute("type","variables_get"),n.appendChild(i),o.callback=t.ContextMenu.callbackFactory(this,n),e.push(o)}}}},t.Extensions.registerMixin("contextMenu_newGetVariableBlock",t.Constants.Loops.CUSTOM_CONTEXT_MENU_CREATE_VARIABLES_GET_MIXIN),t.Extensions.register("controls_for_tooltip",t.Extensions.buildTooltipWithFieldText("%{BKY_CONTROLS_FOR_TOOLTIP}","VAR")),t.Extensions.register("controls_forEach_tooltip",t.Extensions.buildTooltipWithFieldText("%{BKY_CONTROLS_FOREACH_TOOLTIP}","VAR")),t.Constants.Loops.CONTROL_FLOW_IN_LOOP_CHECK_MIXIN={LOOP_TYPES:["controls_repeat","controls_repeat_ext","controls_forEach","controls_for","controls_whileUntil"],suppressPrefixSuffix:!0,getSurroundLoop:function(e){do{if(-1!=t.Constants.Loops.CONTROL_FLOW_IN_LOOP_CHECK_MIXIN.LOOP_TYPES.indexOf(e.type))return e;e=e.getSurroundParent()}while(e);return null},onchange:function(e){if(this.workspace.isDragging&&!this.workspace.isDragging()&&e.type==t.Events.BLOCK_MOVE){var i=t.Constants.Loops.CONTROL_FLOW_IN_LOOP_CHECK_MIXIN.getSurroundLoop(this);if(this.setWarningText(i?null:t.Msg.CONTROLS_FLOW_STATEMENTS_WARNING),!this.isInFlyout){var n=t.Events.getGroup();t.Events.setGroup(e.group),this.setEnabled(i),t.Events.setGroup(n)}}}},t.Extensions.registerMixin("controls_flow_in_loop_check",t.Constants.Loops.CONTROL_FLOW_IN_LOOP_CHECK_MIXIN),t.Blocks.math={},t.Constants.Math={},t.Constants.Math.HUE=230,t.defineBlocksWithJsonArray([{type:"math_number",message0:"%1",args0:[{type:"field_number",name:"NUM",value:0}],output:"Number",helpUrl:"%{BKY_MATH_NUMBER_HELPURL}",style:"math_blocks",tooltip:"%{BKY_MATH_NUMBER_TOOLTIP}",extensions:["parent_tooltip_when_inline"]},{type:"math_arithmetic",message0:"%1 %2 %3",args0:[{type:"input_value",name:"A",check:"Number"},{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_ADDITION_SYMBOL}","ADD"],["%{BKY_MATH_SUBTRACTION_SYMBOL}","MINUS"],["%{BKY_MATH_MULTIPLICATION_SYMBOL}","MULTIPLY"],["%{BKY_MATH_DIVISION_SYMBOL}","DIVIDE"],["%{BKY_MATH_POWER_SYMBOL}","POWER"]]},{type:"input_value",name:"B",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_ARITHMETIC_HELPURL}",extensions:["math_op_tooltip"]},{type:"math_single",message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_SINGLE_OP_ROOT}","ROOT"],["%{BKY_MATH_SINGLE_OP_ABSOLUTE}","ABS"],["-","NEG"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]},{type:"input_value",name:"NUM",check:"Number"}],output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_SINGLE_HELPURL}",extensions:["math_op_tooltip"]},{type:"math_trig",message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_TRIG_SIN}","SIN"],["%{BKY_MATH_TRIG_COS}","COS"],["%{BKY_MATH_TRIG_TAN}","TAN"],["%{BKY_MATH_TRIG_ASIN}","ASIN"],["%{BKY_MATH_TRIG_ACOS}","ACOS"],["%{BKY_MATH_TRIG_ATAN}","ATAN"]]},{type:"input_value",name:"NUM",check:"Number"}],output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_TRIG_HELPURL}",extensions:["math_op_tooltip"]},{type:"math_constant",message0:"%1",args0:[{type:"field_dropdown",name:"CONSTANT",options:[["π","PI"],["e","E"],["φ","GOLDEN_RATIO"],["sqrt(2)","SQRT2"],["sqrt(½)","SQRT1_2"],["∞","INFINITY"]]}],output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_CONSTANT_TOOLTIP}",helpUrl:"%{BKY_MATH_CONSTANT_HELPURL}"},{type:"math_number_property",message0:"%1 %2",args0:[{type:"input_value",name:"NUMBER_TO_CHECK",check:"Number"},{type:"field_dropdown",name:"PROPERTY",options:[["%{BKY_MATH_IS_EVEN}","EVEN"],["%{BKY_MATH_IS_ODD}","ODD"],["%{BKY_MATH_IS_PRIME}","PRIME"],["%{BKY_MATH_IS_WHOLE}","WHOLE"],["%{BKY_MATH_IS_POSITIVE}","POSITIVE"],["%{BKY_MATH_IS_NEGATIVE}","NEGATIVE"],["%{BKY_MATH_IS_DIVISIBLE_BY}","DIVISIBLE_BY"]]}],inputsInline:!0,output:"Boolean",style:"math_blocks",tooltip:"%{BKY_MATH_IS_TOOLTIP}",mutator:"math_is_divisibleby_mutator"},{type:"math_change",message0:"%{BKY_MATH_CHANGE_TITLE}",args0:[{type:"field_variable",name:"VAR",variable:"%{BKY_MATH_CHANGE_TITLE_ITEM}"},{type:"input_value",name:"DELTA",check:"Number"}],previousStatement:null,nextStatement:null,style:"variable_blocks",helpUrl:"%{BKY_MATH_CHANGE_HELPURL}",extensions:["math_change_tooltip"]},{type:"math_round",message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_ROUND_OPERATOR_ROUND}","ROUND"],["%{BKY_MATH_ROUND_OPERATOR_ROUNDUP}","ROUNDUP"],["%{BKY_MATH_ROUND_OPERATOR_ROUNDDOWN}","ROUNDDOWN"]]},{type:"input_value",name:"NUM",check:"Number"}],output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_ROUND_HELPURL}",tooltip:"%{BKY_MATH_ROUND_TOOLTIP}"},{type:"math_on_list",message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_ONLIST_OPERATOR_SUM}","SUM"],["%{BKY_MATH_ONLIST_OPERATOR_MIN}","MIN"],["%{BKY_MATH_ONLIST_OPERATOR_MAX}","MAX"],["%{BKY_MATH_ONLIST_OPERATOR_AVERAGE}","AVERAGE"],["%{BKY_MATH_ONLIST_OPERATOR_MEDIAN}","MEDIAN"],["%{BKY_MATH_ONLIST_OPERATOR_MODE}","MODE"],["%{BKY_MATH_ONLIST_OPERATOR_STD_DEV}","STD_DEV"],["%{BKY_MATH_ONLIST_OPERATOR_RANDOM}","RANDOM"]]},{type:"input_value",name:"LIST",check:"Array"}],output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_ONLIST_HELPURL}",mutator:"math_modes_of_list_mutator",extensions:["math_op_tooltip"]},{type:"math_modulo",message0:"%{BKY_MATH_MODULO_TITLE}",args0:[{type:"input_value",name:"DIVIDEND",check:"Number"},{type:"input_value",name:"DIVISOR",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_MODULO_TOOLTIP}",helpUrl:"%{BKY_MATH_MODULO_HELPURL}"},{type:"math_constrain",message0:"%{BKY_MATH_CONSTRAIN_TITLE}",args0:[{type:"input_value",name:"VALUE",check:"Number"},{type:"input_value",name:"LOW",check:"Number"},{type:"input_value",name:"HIGH",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_CONSTRAIN_TOOLTIP}",helpUrl:"%{BKY_MATH_CONSTRAIN_HELPURL}"},{type:"math_random_int",message0:"%{BKY_MATH_RANDOM_INT_TITLE}",args0:[{type:"input_value",name:"FROM",check:"Number"},{type:"input_value",name:"TO",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_RANDOM_INT_TOOLTIP}",helpUrl:"%{BKY_MATH_RANDOM_INT_HELPURL}"},{type:"math_random_float",message0:"%{BKY_MATH_RANDOM_FLOAT_TITLE_RANDOM}",output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_RANDOM_FLOAT_TOOLTIP}",helpUrl:"%{BKY_MATH_RANDOM_FLOAT_HELPURL}"},{type:"math_atan2",message0:"%{BKY_MATH_ATAN2_TITLE}",args0:[{type:"input_value",name:"X",check:"Number"},{type:"input_value",name:"Y",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_ATAN2_TOOLTIP}",helpUrl:"%{BKY_MATH_ATAN2_HELPURL}"}]),t.Constants.Math.TOOLTIPS_BY_OP={ADD:"%{BKY_MATH_ARITHMETIC_TOOLTIP_ADD}",MINUS:"%{BKY_MATH_ARITHMETIC_TOOLTIP_MINUS}",MULTIPLY:"%{BKY_MATH_ARITHMETIC_TOOLTIP_MULTIPLY}",DIVIDE:"%{BKY_MATH_ARITHMETIC_TOOLTIP_DIVIDE}",POWER:"%{BKY_MATH_ARITHMETIC_TOOLTIP_POWER}",ROOT:"%{BKY_MATH_SINGLE_TOOLTIP_ROOT}",ABS:"%{BKY_MATH_SINGLE_TOOLTIP_ABS}",NEG:"%{BKY_MATH_SINGLE_TOOLTIP_NEG}",LN:"%{BKY_MATH_SINGLE_TOOLTIP_LN}",LOG10:"%{BKY_MATH_SINGLE_TOOLTIP_LOG10}",EXP:"%{BKY_MATH_SINGLE_TOOLTIP_EXP}",POW10:"%{BKY_MATH_SINGLE_TOOLTIP_POW10}",SIN:"%{BKY_MATH_TRIG_TOOLTIP_SIN}",COS:"%{BKY_MATH_TRIG_TOOLTIP_COS}",TAN:"%{BKY_MATH_TRIG_TOOLTIP_TAN}",ASIN:"%{BKY_MATH_TRIG_TOOLTIP_ASIN}",ACOS:"%{BKY_MATH_TRIG_TOOLTIP_ACOS}",ATAN:"%{BKY_MATH_TRIG_TOOLTIP_ATAN}",SUM:"%{BKY_MATH_ONLIST_TOOLTIP_SUM}",MIN:"%{BKY_MATH_ONLIST_TOOLTIP_MIN}",MAX:"%{BKY_MATH_ONLIST_TOOLTIP_MAX}",AVERAGE:"%{BKY_MATH_ONLIST_TOOLTIP_AVERAGE}",MEDIAN:"%{BKY_MATH_ONLIST_TOOLTIP_MEDIAN}",MODE:"%{BKY_MATH_ONLIST_TOOLTIP_MODE}",STD_DEV:"%{BKY_MATH_ONLIST_TOOLTIP_STD_DEV}",RANDOM:"%{BKY_MATH_ONLIST_TOOLTIP_RANDOM}"},t.Extensions.register("math_op_tooltip",t.Extensions.buildTooltipForDropdown("OP",t.Constants.Math.TOOLTIPS_BY_OP)),t.Constants.Math.IS_DIVISIBLEBY_MUTATOR_MIXIN={mutationToDom:function(){var e=t.utils.xml.createElement("mutation"),i="DIVISIBLE_BY"==this.getFieldValue("PROPERTY");return e.setAttribute("divisor_input",i),e},domToMutation:function(t){t="true"==t.getAttribute("divisor_input"),this.updateShape_(t)},updateShape_:function(t){var e=this.getInput("DIVISOR");t?e||this.appendValueInput("DIVISOR").setCheck("Number"):e&&this.removeInput("DIVISOR")}},t.Constants.Math.IS_DIVISIBLE_MUTATOR_EXTENSION=function(){this.getField("PROPERTY").setValidator(function(t){t="DIVISIBLE_BY"==t,this.getSourceBlock().updateShape_(t)})},t.Extensions.registerMutator("math_is_divisibleby_mutator",t.Constants.Math.IS_DIVISIBLEBY_MUTATOR_MIXIN,t.Constants.Math.IS_DIVISIBLE_MUTATOR_EXTENSION),t.Extensions.register("math_change_tooltip",t.Extensions.buildTooltipWithFieldText("%{BKY_MATH_CHANGE_TOOLTIP}","VAR")),t.Constants.Math.LIST_MODES_MUTATOR_MIXIN={updateType_:function(t){"MODE"==t?this.outputConnection.setCheck("Array"):this.outputConnection.setCheck("Number")},mutationToDom:function(){var e=t.utils.xml.createElement("mutation");return e.setAttribute("op",this.getFieldValue("OP")),e},domToMutation:function(t){this.updateType_(t.getAttribute("op"))}},t.Constants.Math.LIST_MODES_MUTATOR_EXTENSION=function(){this.getField("OP").setValidator(function(t){this.updateType_(t)}.bind(this))},t.Extensions.registerMutator("math_modes_of_list_mutator",t.Constants.Math.LIST_MODES_MUTATOR_MIXIN,t.Constants.Math.LIST_MODES_MUTATOR_EXTENSION),t.Blocks.procedures={},t.Blocks.procedures_defnoreturn={init:function(){var e=t.Procedures.findLegalName("",this);(e=new t.FieldTextInput(e,t.Procedures.rename)).setSpellcheck(!1),this.appendDummyInput().appendField(t.Msg.PROCEDURES_DEFNORETURN_TITLE).appendField(e,"NAME").appendField("","PARAMS"),this.setMutator(new t.Mutator(["procedures_mutatorarg"])),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&t.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(t.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(t.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(t.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(e){this.hasStatements_!==e&&(e?(this.appendStatementInput("STACK").appendField(t.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=e)},updateParams_:function(){var e="";this.arguments_.length&&(e=t.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),t.Events.disable();try{this.setFieldValue(e,"PARAMS")}finally{t.Events.enable()}},mutationToDom:function(e){var i=t.utils.xml.createElement("mutation");e&&i.setAttribute("name",this.getFieldValue("NAME"));for(var n=0;n<this.argumentVarModels_.length;n++){var o=t.utils.xml.createElement("arg"),r=this.argumentVarModels_[n];o.setAttribute("name",r.name),o.setAttribute("varid",r.getId()),e&&this.paramIds_&&o.setAttribute("paramId",this.paramIds_[n]),i.appendChild(o)}return this.hasStatements_||i.setAttribute("statements","false"),i},domToMutation:function(e){this.arguments_=[],this.argumentVarModels_=[];for(var i,n=0;i=e.childNodes[n];n++)if("arg"==i.nodeName.toLowerCase()){var o=i.getAttribute("name");i=i.getAttribute("varid")||i.getAttribute("varId"),this.arguments_.push(o),null!=(i=t.Variables.getOrCreateVariablePackage(this.workspace,i,o,""))?this.argumentVarModels_.push(i):console.log("Failed to create a variable with name "+o+", ignoring.")}this.updateParams_(),t.Procedures.mutateCallers(this),this.setStatements_("false"!==e.getAttribute("statements"))},decompose:function(e){var i=t.utils.xml.createElement("block");i.setAttribute("type","procedures_mutatorcontainer");var n=t.utils.xml.createElement("statement");n.setAttribute("name","STACK"),i.appendChild(n);for(var o=0;o<this.arguments_.length;o++){var r=t.utils.xml.createElement("block");r.setAttribute("type","procedures_mutatorarg");var s=t.utils.xml.createElement("field");s.setAttribute("name","NAME");var a=t.utils.xml.createTextNode(this.arguments_[o]);s.appendChild(a),r.appendChild(s),s=t.utils.xml.createElement("next"),r.appendChild(s),n.appendChild(r),n=s}return e=t.Xml.domToBlock(i,e),"procedures_defreturn"==this.type?e.setFieldValue(this.hasStatements_,"STATEMENTS"):e.removeInput("STATEMENT_INPUT"),t.Procedures.mutateCallers(this),e},compose:function(e){this.arguments_=[],this.paramIds_=[],this.argumentVarModels_=[];for(var i=e.getInputTargetBlock("STACK");i&&!i.isInsertionMarker();){var n=i.getFieldValue("NAME");this.arguments_.push(n),n=this.workspace.getVariable(n,""),this.argumentVarModels_.push(n),this.paramIds_.push(i.id),i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateParams_(),t.Procedures.mutateCallers(this),null!==(e=e.getFieldValue("STATEMENTS"))&&(e="TRUE"==e,this.hasStatements_!=e)&&(e?(this.setStatements_(!0),t.Mutator.reconnect(this.statementConnection_,this,"STACK"),this.statementConnection_=null):(e=this.getInput("STACK").connection,(this.statementConnection_=e.targetConnection)&&((e=e.targetBlock()).unplug(),e.bumpNeighbours()),this.setStatements_(!1)))},getProcedureDef:function(){return[this.getFieldValue("NAME"),this.arguments_,!1]},getVars:function(){return this.arguments_},getVarModels:function(){return this.argumentVarModels_},renameVarById:function(e,i){var n=this.workspace.getVariableById(e);if(""==n.type){n=n.name,i=this.workspace.getVariableById(i);for(var o=!1,r=0;r<this.argumentVarModels_.length;r++)this.argumentVarModels_[r].getId()==e&&(this.arguments_[r]=i.name,this.argumentVarModels_[r]=i,o=!0);o&&(this.displayRenamedVar_(n,i.name),t.Procedures.mutateCallers(this))}},updateVarName:function(e){for(var i=e.name,n=!1,o=0;o<this.argumentVarModels_.length;o++)if(this.argumentVarModels_[o].getId()==e.getId()){var r=this.arguments_[o];this.arguments_[o]=i,n=!0}n&&(this.displayRenamedVar_(r,i),t.Procedures.mutateCallers(this))},displayRenamedVar_:function(e,i){if(this.updateParams_(),this.mutator&&this.mutator.isVisible())for(var n,o=this.mutator.workspace_.getAllBlocks(!1),r=0;n=o[r];r++)"procedures_mutatorarg"==n.type&&t.Names.equals(e,n.getFieldValue("NAME"))&&n.setFieldValue(i,"NAME")},customContextMenu:function(e){if(!this.isInFlyout){var i={enabled:!0},n=this.getFieldValue("NAME");i.text=t.Msg.PROCEDURES_CREATE_DO.replace("%1",n);var o=t.utils.xml.createElement("mutation");for(o.setAttribute("name",n),n=0;n<this.arguments_.length;n++){var r=t.utils.xml.createElement("arg");r.setAttribute("name",this.arguments_[n]),o.appendChild(r)}if((n=t.utils.xml.createElement("block")).setAttribute("type",this.callType_),n.appendChild(o),i.callback=t.ContextMenu.callbackFactory(this,n),e.push(i),!this.isCollapsed())for(n=0;n<this.argumentVarModels_.length;n++)i={enabled:!0},o=this.argumentVarModels_[n],i.text=t.Msg.VARIABLES_SET_CREATE_GET.replace("%1",o.name),o=t.Variables.generateVariableFieldDom(o),(r=t.utils.xml.createElement("block")).setAttribute("type","variables_get"),r.appendChild(o),i.callback=t.ContextMenu.callbackFactory(this,r),e.push(i)}},callType_:"procedures_callnoreturn"},t.Blocks.procedures_defreturn={init:function(){var e=t.Procedures.findLegalName("",this);(e=new t.FieldTextInput(e,t.Procedures.rename)).setSpellcheck(!1),this.appendDummyInput().appendField(t.Msg.PROCEDURES_DEFRETURN_TITLE).appendField(e,"NAME").appendField("","PARAMS"),this.appendValueInput("RETURN").setAlign(t.ALIGN_RIGHT).appendField(t.Msg.PROCEDURES_DEFRETURN_RETURN),this.setMutator(new t.Mutator(["procedures_mutatorarg"])),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&t.Msg.PROCEDURES_DEFRETURN_COMMENT&&this.setCommentText(t.Msg.PROCEDURES_DEFRETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(t.Msg.PROCEDURES_DEFRETURN_TOOLTIP),this.setHelpUrl(t.Msg.PROCEDURES_DEFRETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:t.Blocks.procedures_defnoreturn.setStatements_,updateParams_:t.Blocks.procedures_defnoreturn.updateParams_,mutationToDom:t.Blocks.procedures_defnoreturn.mutationToDom,domToMutation:t.Blocks.procedures_defnoreturn.domToMutation,decompose:t.Blocks.procedures_defnoreturn.decompose,compose:t.Blocks.procedures_defnoreturn.compose,getProcedureDef:function(){return[this.getFieldValue("NAME"),this.arguments_,!0]},getVars:t.Blocks.procedures_defnoreturn.getVars,getVarModels:t.Blocks.procedures_defnoreturn.getVarModels,renameVarById:t.Blocks.procedures_defnoreturn.renameVarById,updateVarName:t.Blocks.procedures_defnoreturn.updateVarName,displayRenamedVar_:t.Blocks.procedures_defnoreturn.displayRenamedVar_,customContextMenu:t.Blocks.procedures_defnoreturn.customContextMenu,callType_:"procedures_callreturn"},t.Blocks.procedures_mutatorcontainer={init:function(){this.appendDummyInput().appendField(t.Msg.PROCEDURES_MUTATORCONTAINER_TITLE),this.appendStatementInput("STACK"),this.appendDummyInput("STATEMENT_INPUT").appendField(t.Msg.PROCEDURES_ALLOW_STATEMENTS).appendField(new t.FieldCheckbox("TRUE"),"STATEMENTS"),this.setStyle("procedure_blocks"),this.setTooltip(t.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP),this.contextMenu=!1}},t.Blocks.procedures_mutatorarg={init:function(){var e=new t.FieldTextInput(t.Procedures.DEFAULT_ARG,this.validator_);e.oldShowEditorFn_=e.showEditor_,e.showEditor_=function(){this.createdVariables_=[],this.oldShowEditorFn_()},this.appendDummyInput().appendField(t.Msg.PROCEDURES_MUTATORARG_TITLE).appendField(e,"NAME"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setStyle("procedure_blocks"),this.setTooltip(t.Msg.PROCEDURES_MUTATORARG_TOOLTIP),this.contextMenu=!1,e.onFinishEditing_=this.deleteIntermediateVars_,e.createdVariables_=[],e.onFinishEditing_("x")},validator_:function(e){var i=this.getSourceBlock(),n=t.Mutator.findParentWs(i.workspace);if(!(e=e.replace(/[\s\xa0]+/g," ").replace(/^ | $/g,"")))return null;for(var o=(i.workspace.targetWorkspace||i.workspace).getAllBlocks(!1),r=e.toLowerCase(),s=0;s<o.length;s++)if(o[s].id!=this.getSourceBlock().id){var a=o[s].getFieldValue("NAME");if(a&&a.toLowerCase()==r)return null}return i.isInFlyout?e:((i=n.getVariable(e,""))&&i.name!=e&&n.renameVariableById(i.getId(),e),i||(i=n.createVariable(e,""))&&this.createdVariables_&&this.createdVariables_.push(i),e)},deleteIntermediateVars_:function(e){var i=t.Mutator.findParentWs(this.getSourceBlock().workspace);if(i)for(var n=0;n<this.createdVariables_.length;n++){var o=this.createdVariables_[n];o.name!=e&&i.deleteVariableById(o.getId())}}},t.Blocks.procedures_callnoreturn={init:function(){this.appendDummyInput("TOPROW").appendField("","NAME"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setStyle("procedure_blocks"),this.setHelpUrl(t.Msg.PROCEDURES_CALLNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.quarkConnections_={},this.quarkIds_=null,this.previousEnabledState_=!0},getProcedureCall:function(){return this.getFieldValue("NAME")},renameProcedure:function(e,i){t.Names.equals(e,this.getProcedureCall())&&(this.setFieldValue(i,"NAME"),this.setTooltip((this.outputConnection?t.Msg.PROCEDURES_CALLRETURN_TOOLTIP:t.Msg.PROCEDURES_CALLNORETURN_TOOLTIP).replace("%1",i)))},setProcedureParameters_:function(e,i){var n=t.Procedures.getDefinition(this.getProcedureCall(),this.workspace),o=n&&n.mutator&&n.mutator.isVisible();if(o||(this.quarkConnections_={},this.quarkIds_=null),i)if(e.join("\n")==this.arguments_.join("\n"))this.quarkIds_=i;else{if(i.length!=e.length)throw RangeError("paramNames and paramIds must be the same length.");this.setCollapsed(!1),this.quarkIds_||(this.quarkConnections_={},this.quarkIds_=[]),n=this.rendered,this.rendered=!1;for(var r=0;r<this.arguments_.length;r++){var s=this.getInput("ARG"+r);s&&(s=s.connection.targetConnection,this.quarkConnections_[this.quarkIds_[r]]=s,o&&s&&-1==i.indexOf(this.quarkIds_[r])&&(s.disconnect(),s.getSourceBlock().bumpNeighbours()))}for(this.arguments_=[].concat(e),this.argumentVarModels_=[],r=0;r<this.arguments_.length;r++)e=t.Variables.getOrCreateVariablePackage(this.workspace,null,this.arguments_[r],""),this.argumentVarModels_.push(e);if(this.updateShape_(),this.quarkIds_=i)for(r=0;r<this.arguments_.length;r++)(i=this.quarkIds_[r])in this.quarkConnections_&&(s=this.quarkConnections_[i],t.Mutator.reconnect(s,this,"ARG"+r)||delete this.quarkConnections_[i]);(this.rendered=n)&&this.render()}},updateShape_:function(){for(var e=0;e<this.arguments_.length;e++){var i=this.getField("ARGNAME"+e);if(i){t.Events.disable();try{i.setValue(this.arguments_[e])}finally{t.Events.enable()}}else i=new t.FieldLabel(this.arguments_[e]),this.appendValueInput("ARG"+e).setAlign(t.ALIGN_RIGHT).appendField(i,"ARGNAME"+e).init()}for(;this.getInput("ARG"+e);)this.removeInput("ARG"+e),e++;(e=this.getInput("TOPROW"))&&(this.arguments_.length?this.getField("WITH")||(e.appendField(t.Msg.PROCEDURES_CALL_BEFORE_PARAMS,"WITH"),e.init()):this.getField("WITH")&&e.removeField("WITH"))},mutationToDom:function(){var e=t.utils.xml.createElement("mutation");e.setAttribute("name",this.getProcedureCall());for(var i=0;i<this.arguments_.length;i++){var n=t.utils.xml.createElement("arg");n.setAttribute("name",this.arguments_[i]),e.appendChild(n)}return e},domToMutation:function(t){var e=t.getAttribute("name");this.renameProcedure(this.getProcedureCall(),e),e=[];for(var i,n=[],o=0;i=t.childNodes[o];o++)"arg"==i.nodeName.toLowerCase()&&(e.push(i.getAttribute("name")),n.push(i.getAttribute("paramId")));this.setProcedureParameters_(e,n)},getVars:function(){return this.arguments_},getVarModels:function(){return this.argumentVarModels_},onchange:function(e){if(this.workspace&&!this.workspace.isFlyout&&e.recordUndo)if(e.type==t.Events.BLOCK_CREATE&&-1!=e.ids.indexOf(this.id)){var i=this.getProcedureCall();if(!(i=t.Procedures.getDefinition(i,this.workspace))||i.type==this.defType_&&JSON.stringify(i.getVars())==JSON.stringify(this.arguments_)||(i=null),!i){t.Events.setGroup(e.group),e=t.utils.xml.createElement("xml"),(i=t.utils.xml.createElement("block")).setAttribute("type",this.defType_);var n=this.getRelativeToSurfaceXY(),o=n.y+2*t.SNAP_RADIUS;i.setAttribute("x",n.x+t.SNAP_RADIUS*(this.RTL?-1:1)),i.setAttribute("y",o),n=this.mutationToDom(),i.appendChild(n),(n=t.utils.xml.createElement("field")).setAttribute("name","NAME"),(o=this.getProcedureCall())||(o=t.Procedures.findLegalName("",this),this.renameProcedure("",o)),n.appendChild(t.utils.xml.createTextNode(o)),i.appendChild(n),e.appendChild(i),t.Xml.domToWorkspace(e,this.workspace),t.Events.setGroup(!1)}}else e.type==t.Events.BLOCK_DELETE?(i=this.getProcedureCall(),(i=t.Procedures.getDefinition(i,this.workspace))||(t.Events.setGroup(e.group),this.dispose(!0),t.Events.setGroup(!1))):e.type==t.Events.CHANGE&&"disabled"==e.element&&(i=this.getProcedureCall(),(i=t.Procedures.getDefinition(i,this.workspace))&&i.id==e.blockId&&((i=t.Events.getGroup())&&console.log("Saw an existing group while responding to a definition change"),t.Events.setGroup(e.group),e.newValue?(this.previousEnabledState_=this.isEnabled(),this.setEnabled(!1)):this.setEnabled(this.previousEnabledState_),t.Events.setGroup(i)))},customContextMenu:function(e){if(this.workspace.isMovable()){var i={enabled:!0};i.text=t.Msg.PROCEDURES_HIGHLIGHT_DEF;var n=this.getProcedureCall(),o=this.workspace;i.callback=function(){var e=t.Procedures.getDefinition(n,o);e&&(o.centerOnBlock(e.id),e.select())},e.push(i)}},defType_:"procedures_defnoreturn"},t.Blocks.procedures_callreturn={init:function(){this.appendDummyInput("TOPROW").appendField("","NAME"),this.setOutput(!0),this.setStyle("procedure_blocks"),this.setHelpUrl(t.Msg.PROCEDURES_CALLRETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.quarkConnections_={},this.quarkIds_=null,this.previousEnabledState_=!0},getProcedureCall:t.Blocks.procedures_callnoreturn.getProcedureCall,renameProcedure:t.Blocks.procedures_callnoreturn.renameProcedure,setProcedureParameters_:t.Blocks.procedures_callnoreturn.setProcedureParameters_,updateShape_:t.Blocks.procedures_callnoreturn.updateShape_,mutationToDom:t.Blocks.procedures_callnoreturn.mutationToDom,domToMutation:t.Blocks.procedures_callnoreturn.domToMutation,getVars:t.Blocks.procedures_callnoreturn.getVars,getVarModels:t.Blocks.procedures_callnoreturn.getVarModels,onchange:t.Blocks.procedures_callnoreturn.onchange,customContextMenu:t.Blocks.procedures_callnoreturn.customContextMenu,defType_:"procedures_defreturn"},t.Blocks.procedures_ifreturn={init:function(){this.appendValueInput("CONDITION").setCheck("Boolean").appendField(t.Msg.CONTROLS_IF_MSG_IF),this.appendValueInput("VALUE").appendField(t.Msg.PROCEDURES_DEFRETURN_RETURN),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setStyle("procedure_blocks"),this.setTooltip(t.Msg.PROCEDURES_IFRETURN_TOOLTIP),this.setHelpUrl(t.Msg.PROCEDURES_IFRETURN_HELPURL),this.hasReturnValue_=!0},mutationToDom:function(){var e=t.utils.xml.createElement("mutation");return e.setAttribute("value",Number(this.hasReturnValue_)),e},domToMutation:function(e){this.hasReturnValue_=1==e.getAttribute("value"),this.hasReturnValue_||(this.removeInput("VALUE"),this.appendDummyInput("VALUE").appendField(t.Msg.PROCEDURES_DEFRETURN_RETURN))},onchange:function(e){if(this.workspace.isDragging&&!this.workspace.isDragging()){e=!1;var i=this;do{if(-1!=this.FUNCTION_TYPES.indexOf(i.type)){e=!0;break}i=i.getSurroundParent()}while(i);e?("procedures_defnoreturn"==i.type&&this.hasReturnValue_?(this.removeInput("VALUE"),this.appendDummyInput("VALUE").appendField(t.Msg.PROCEDURES_DEFRETURN_RETURN),this.hasReturnValue_=!1):"procedures_defreturn"!=i.type||this.hasReturnValue_||(this.removeInput("VALUE"),this.appendValueInput("VALUE").appendField(t.Msg.PROCEDURES_DEFRETURN_RETURN),this.hasReturnValue_=!0),this.setWarningText(null),this.isInFlyout||this.setEnabled(!0)):(this.setWarningText(t.Msg.PROCEDURES_IFRETURN_WARNING),this.isInFlyout||this.getInheritedDisabled()||this.setEnabled(!1))}},FUNCTION_TYPES:["procedures_defnoreturn","procedures_defreturn"]},t.Blocks.texts={},t.Constants.Text={},t.Constants.Text.HUE=160,t.defineBlocksWithJsonArray([{type:"text",message0:"%1",args0:[{type:"field_input",name:"TEXT",text:""}],output:"String",style:"text_blocks",helpUrl:"%{BKY_TEXT_TEXT_HELPURL}",tooltip:"%{BKY_TEXT_TEXT_TOOLTIP}",extensions:["text_quotes","parent_tooltip_when_inline"]},{type:"text_multiline",message0:"%1 %2",args0:[{type:"field_image",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAARCAYAAADpPU2iAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAdhgAAHYYBXaITgQAAABh0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMS42/U4J6AAAAP1JREFUOE+Vks0KQUEYhjmRIja4ABtZ2dm5A3t3Ia6AUm7CylYuQRaUhZSlLZJiQbFAyRnPN33y01HOW08z8873zpwzM4F3GWOCruvGIE4/rLaV+Nq1hVGMBqzhqlxgCys4wJA65xnogMHsQ5lujnYHTejBBCK2mE4abjCgMGhNxHgDFWjDSG07kdfVa2pZMf4ZyMAdWmpZMfYOsLiDMYMjlMB+K613QISRhTnITnsYg5yUd0DETmEoMlkFOeIT/A58iyK5E18BuTBfgYXfwNJv4P9/oEBerLylOnRhygmGdPpTTBZAPkde61lbQe4moWUvYUZYLfUNftIY4zwA5X2Z9AYnQrEAAAAASUVORK5CYII=",width:12,height:17,alt:"¶"},{type:"field_multilinetext",name:"TEXT",text:""}],output:"String",style:"text_blocks",helpUrl:"%{BKY_TEXT_TEXT_HELPURL}",tooltip:"%{BKY_TEXT_TEXT_TOOLTIP}",extensions:["parent_tooltip_when_inline"]},{type:"text_join",message0:"",output:"String",style:"text_blocks",helpUrl:"%{BKY_TEXT_JOIN_HELPURL}",tooltip:"%{BKY_TEXT_JOIN_TOOLTIP}",mutator:"text_join_mutator"},{type:"text_create_join_container",message0:"%{BKY_TEXT_CREATE_JOIN_TITLE_JOIN} %1 %2",args0:[{type:"input_dummy"},{type:"input_statement",name:"STACK"}],style:"text_blocks",tooltip:"%{BKY_TEXT_CREATE_JOIN_TOOLTIP}",enableContextMenu:!1},{type:"text_create_join_item",message0:"%{BKY_TEXT_CREATE_JOIN_ITEM_TITLE_ITEM}",previousStatement:null,nextStatement:null,style:"text_blocks",tooltip:"%{BKY_TEXT_CREATE_JOIN_ITEM_TOOLTIP}",enableContextMenu:!1},{type:"text_append",message0:"%{BKY_TEXT_APPEND_TITLE}",args0:[{type:"field_variable",name:"VAR",variable:"%{BKY_TEXT_APPEND_VARIABLE}"},{type:"input_value",name:"TEXT"}],previousStatement:null,nextStatement:null,style:"text_blocks",extensions:["text_append_tooltip"]},{type:"text_length",message0:"%{BKY_TEXT_LENGTH_TITLE}",args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Number",style:"text_blocks",tooltip:"%{BKY_TEXT_LENGTH_TOOLTIP}",helpUrl:"%{BKY_TEXT_LENGTH_HELPURL}"},{type:"text_isEmpty",message0:"%{BKY_TEXT_ISEMPTY_TITLE}",args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Boolean",style:"text_blocks",tooltip:"%{BKY_TEXT_ISEMPTY_TOOLTIP}",helpUrl:"%{BKY_TEXT_ISEMPTY_HELPURL}"},{type:"text_indexOf",message0:"%{BKY_TEXT_INDEXOF_TITLE}",args0:[{type:"input_value",name:"VALUE",check:"String"},{type:"field_dropdown",name:"END",options:[["%{BKY_TEXT_INDEXOF_OPERATOR_FIRST}","FIRST"],["%{BKY_TEXT_INDEXOF_OPERATOR_LAST}","LAST"]]},{type:"input_value",name:"FIND",check:"String"}],output:"Number",style:"text_blocks",helpUrl:"%{BKY_TEXT_INDEXOF_HELPURL}",inputsInline:!0,extensions:["text_indexOf_tooltip"]},{type:"text_charAt",message0:"%{BKY_TEXT_CHARAT_TITLE}",args0:[{type:"input_value",name:"VALUE",check:"String"},{type:"field_dropdown",name:"WHERE",options:[["%{BKY_TEXT_CHARAT_FROM_START}","FROM_START"],["%{BKY_TEXT_CHARAT_FROM_END}","FROM_END"],["%{BKY_TEXT_CHARAT_FIRST}","FIRST"],["%{BKY_TEXT_CHARAT_LAST}","LAST"],["%{BKY_TEXT_CHARAT_RANDOM}","RANDOM"]]}],output:"String",style:"text_blocks",helpUrl:"%{BKY_TEXT_CHARAT_HELPURL}",inputsInline:!0,mutator:"text_charAt_mutator"}]),t.Blocks.text_getSubstring={init:function(){this.WHERE_OPTIONS_1=[[t.Msg.TEXT_GET_SUBSTRING_START_FROM_START,"FROM_START"],[t.Msg.TEXT_GET_SUBSTRING_START_FROM_END,"FROM_END"],[t.Msg.TEXT_GET_SUBSTRING_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[t.Msg.TEXT_GET_SUBSTRING_END_FROM_START,"FROM_START"],[t.Msg.TEXT_GET_SUBSTRING_END_FROM_END,"FROM_END"],[t.Msg.TEXT_GET_SUBSTRING_END_LAST,"LAST"]],this.setHelpUrl(t.Msg.TEXT_GET_SUBSTRING_HELPURL),this.setStyle("text_blocks"),this.appendValueInput("STRING").setCheck("String").appendField(t.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),t.Msg.TEXT_GET_SUBSTRING_TAIL&&this.appendDummyInput("TAIL").appendField(t.Msg.TEXT_GET_SUBSTRING_TAIL),this.setInputsInline(!0),this.setOutput(!0,"String"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(t.Msg.TEXT_GET_SUBSTRING_TOOLTIP)},mutationToDom:function(){var e=t.utils.xml.createElement("mutation"),i=this.getInput("AT1").type==t.INPUT_VALUE;return e.setAttribute("at1",i),i=this.getInput("AT2").type==t.INPUT_VALUE,e.setAttribute("at2",i),e},domToMutation:function(t){var e="true"==t.getAttribute("at1");t="true"==t.getAttribute("at2"),this.updateAt_(1,e),this.updateAt_(2,t)},updateAt_:function(e,i){this.removeInput("AT"+e),this.removeInput("ORDINAL"+e,!0),i?(this.appendValueInput("AT"+e).setCheck("Number"),t.Msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL"+e).appendField(t.Msg.ORDINAL_NUMBER_SUFFIX)):this.appendDummyInput("AT"+e),2==e&&t.Msg.TEXT_GET_SUBSTRING_TAIL&&(this.removeInput("TAIL",!0),this.appendDummyInput("TAIL").appendField(t.Msg.TEXT_GET_SUBSTRING_TAIL));var n=new t.FieldDropdown(this["WHERE_OPTIONS_"+e],function(t){var n="FROM_START"==t||"FROM_END"==t;if(n!=i){var o=this.getSourceBlock();return o.updateAt_(e,n),o.setFieldValue(t,"WHERE"+e),null}});this.getInput("AT"+e).appendField(n,"WHERE"+e),1==e&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},t.Blocks.text_changeCase={init:function(){var e=[[t.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE,"UPPERCASE"],[t.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE,"LOWERCASE"],[t.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE,"TITLECASE"]];this.setHelpUrl(t.Msg.TEXT_CHANGECASE_HELPURL),this.setStyle("text_blocks"),this.appendValueInput("TEXT").setCheck("String").appendField(new t.FieldDropdown(e),"CASE"),this.setOutput(!0,"String"),this.setTooltip(t.Msg.TEXT_CHANGECASE_TOOLTIP)}},t.Blocks.text_trim={init:function(){var e=[[t.Msg.TEXT_TRIM_OPERATOR_BOTH,"BOTH"],[t.Msg.TEXT_TRIM_OPERATOR_LEFT,"LEFT"],[t.Msg.TEXT_TRIM_OPERATOR_RIGHT,"RIGHT"]];this.setHelpUrl(t.Msg.TEXT_TRIM_HELPURL),this.setStyle("text_blocks"),this.appendValueInput("TEXT").setCheck("String").appendField(new t.FieldDropdown(e),"MODE"),this.setOutput(!0,"String"),this.setTooltip(t.Msg.TEXT_TRIM_TOOLTIP)}},t.Blocks.text_print={init:function(){this.jsonInit({message0:t.Msg.TEXT_PRINT_TITLE,args0:[{type:"input_value",name:"TEXT"}],previousStatement:null,nextStatement:null,style:"text_blocks",tooltip:t.Msg.TEXT_PRINT_TOOLTIP,helpUrl:t.Msg.TEXT_PRINT_HELPURL})}},t.Blocks.text_prompt_ext={init:function(){var e=[[t.Msg.TEXT_PROMPT_TYPE_TEXT,"TEXT"],[t.Msg.TEXT_PROMPT_TYPE_NUMBER,"NUMBER"]];this.setHelpUrl(t.Msg.TEXT_PROMPT_HELPURL),this.setStyle("text_blocks");var i=this;e=new t.FieldDropdown(e,function(t){i.updateType_(t)}),this.appendValueInput("TEXT").appendField(e,"TYPE"),this.setOutput(!0,"String"),this.setTooltip(function(){return"TEXT"==i.getFieldValue("TYPE")?t.Msg.TEXT_PROMPT_TOOLTIP_TEXT:t.Msg.TEXT_PROMPT_TOOLTIP_NUMBER})},updateType_:function(t){this.outputConnection.setCheck("NUMBER"==t?"Number":"String")},mutationToDom:function(){var e=t.utils.xml.createElement("mutation");return e.setAttribute("type",this.getFieldValue("TYPE")),e},domToMutation:function(t){this.updateType_(t.getAttribute("type"))}},t.Blocks.text_prompt={init:function(){this.mixin(t.Constants.Text.QUOTE_IMAGE_MIXIN);var e=[[t.Msg.TEXT_PROMPT_TYPE_TEXT,"TEXT"],[t.Msg.TEXT_PROMPT_TYPE_NUMBER,"NUMBER"]],i=this;this.setHelpUrl(t.Msg.TEXT_PROMPT_HELPURL),this.setStyle("text_blocks"),e=new t.FieldDropdown(e,function(t){i.updateType_(t)}),this.appendDummyInput().appendField(e,"TYPE").appendField(this.newQuote_(!0)).appendField(new t.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,"String"),this.setTooltip(function(){return"TEXT"==i.getFieldValue("TYPE")?t.Msg.TEXT_PROMPT_TOOLTIP_TEXT:t.Msg.TEXT_PROMPT_TOOLTIP_NUMBER})},updateType_:t.Blocks.text_prompt_ext.updateType_,mutationToDom:t.Blocks.text_prompt_ext.mutationToDom,domToMutation:t.Blocks.text_prompt_ext.domToMutation},t.Blocks.text_count={init:function(){this.jsonInit({message0:t.Msg.TEXT_COUNT_MESSAGE0,args0:[{type:"input_value",name:"SUB",check:"String"},{type:"input_value",name:"TEXT",check:"String"}],output:"Number",inputsInline:!0,style:"text_blocks",tooltip:t.Msg.TEXT_COUNT_TOOLTIP,helpUrl:t.Msg.TEXT_COUNT_HELPURL})}},t.Blocks.text_replace={init:function(){this.jsonInit({message0:t.Msg.TEXT_REPLACE_MESSAGE0,args0:[{type:"input_value",name:"FROM",check:"String"},{type:"input_value",name:"TO",check:"String"},{type:"input_value",name:"TEXT",check:"String"}],output:"String",inputsInline:!0,style:"text_blocks",tooltip:t.Msg.TEXT_REPLACE_TOOLTIP,helpUrl:t.Msg.TEXT_REPLACE_HELPURL})}},t.Blocks.text_reverse={init:function(){this.jsonInit({message0:t.Msg.TEXT_REVERSE_MESSAGE0,args0:[{type:"input_value",name:"TEXT",check:"String"}],output:"String",inputsInline:!0,style:"text_blocks",tooltip:t.Msg.TEXT_REVERSE_TOOLTIP,helpUrl:t.Msg.TEXT_REVERSE_HELPURL})}},t.Constants.Text.QUOTE_IMAGE_MIXIN={QUOTE_IMAGE_LEFT_DATAURI:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAKCAQAAAAqJXdxAAAAn0lEQVQI1z3OMa5BURSF4f/cQhAKjUQhuQmFNwGJEUi0RKN5rU7FHKhpjEH3TEMtkdBSCY1EIv8r7nFX9e29V7EBAOvu7RPjwmWGH/VuF8CyN9/OAdvqIXYLvtRaNjx9mMTDyo+NjAN1HNcl9ZQ5oQMM3dgDUqDo1l8DzvwmtZN7mnD+PkmLa+4mhrxVA9fRowBWmVBhFy5gYEjKMfz9AylsaRRgGzvZAAAAAElFTkSuQmCC",QUOTE_IMAGE_RIGHT_DATAURI:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAKCAQAAAAqJXdxAAAAqUlEQVQI1z3KvUpCcRiA8ef9E4JNHhI0aFEacm1o0BsI0Slx8wa8gLauoDnoBhq7DcfWhggONDmJJgqCPA7neJ7p934EOOKOnM8Q7PDElo/4x4lFb2DmuUjcUzS3URnGib9qaPNbuXvBO3sGPHJDRG6fGVdMSeWDP2q99FQdFrz26Gu5Tq7dFMzUvbXy8KXeAj57cOklgA+u1B5AoslLtGIHQMaCVnwDnADZIFIrXsoXrgAAAABJRU5ErkJggg==",QUOTE_IMAGE_WIDTH:12,QUOTE_IMAGE_HEIGHT:12,quoteField_:function(t){for(var e,i=0;e=this.inputList[i];i++)for(var n,o=0;n=e.fieldRow[o];o++)if(t==n.name)return e.insertFieldAt(o,this.newQuote_(!0)),void e.insertFieldAt(o+2,this.newQuote_(!1));console.warn('field named "'+t+'" not found in '+this.toDevString())},newQuote_:function(e){return e=this.RTL?!e:e,new t.FieldImage(e?this.QUOTE_IMAGE_LEFT_DATAURI:this.QUOTE_IMAGE_RIGHT_DATAURI,this.QUOTE_IMAGE_WIDTH,this.QUOTE_IMAGE_HEIGHT,e?"“":"”")}},t.Constants.Text.TEXT_QUOTES_EXTENSION=function(){this.mixin(t.Constants.Text.QUOTE_IMAGE_MIXIN),this.quoteField_("TEXT")},t.Constants.Text.TEXT_JOIN_MUTATOR_MIXIN={mutationToDom:function(){var e=t.utils.xml.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("text_create_join_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n<this.itemCount_;n++){var o=t.newBlock("text_create_join_item");o.initSvg(),i.connect(o.previousConnection),i=o.nextConnection}return e},compose:function(e){var i=e.getInputTargetBlock("STACK");for(e=[];i&&!i.isInsertionMarker();)e.push(i.valueConnection_),i=i.nextConnection&&i.nextConnection.targetBlock();for(i=0;i<this.itemCount_;i++){var n=this.getInput("ADD"+i).connection.targetConnection;n&&-1==e.indexOf(n)&&n.disconnect()}for(this.itemCount_=e.length,this.updateShape_(),i=0;i<this.itemCount_;i++)t.Mutator.reconnect(e[i],this,"ADD"+i)},saveConnections:function(t){t=t.getInputTargetBlock("STACK");for(var e=0;t;){var i=this.getInput("ADD"+e);t.valueConnection_=i&&i.connection.targetConnection,e++,t=t.nextConnection&&t.nextConnection.targetBlock()}},updateShape_:function(){this.itemCount_&&this.getInput("EMPTY")?this.removeInput("EMPTY"):this.itemCount_||this.getInput("EMPTY")||this.appendDummyInput("EMPTY").appendField(this.newQuote_(!0)).appendField(this.newQuote_(!1));for(var e=0;e<this.itemCount_;e++)if(!this.getInput("ADD"+e)){var i=this.appendValueInput("ADD"+e).setAlign(t.ALIGN_RIGHT);0==e&&i.appendField(t.Msg.TEXT_JOIN_TITLE_CREATEWITH)}for(;this.getInput("ADD"+e);)this.removeInput("ADD"+e),e++}},t.Constants.Text.TEXT_JOIN_EXTENSION=function(){this.mixin(t.Constants.Text.QUOTE_IMAGE_MIXIN),this.itemCount_=2,this.updateShape_(),this.setMutator(new t.Mutator(["text_create_join_item"]))},t.Extensions.register("text_append_tooltip",t.Extensions.buildTooltipWithFieldText("%{BKY_TEXT_APPEND_TOOLTIP}","VAR")),t.Constants.Text.TEXT_INDEXOF_TOOLTIP_EXTENSION=function(){var e=this;this.setTooltip(function(){return t.Msg.TEXT_INDEXOF_TOOLTIP.replace("%1",e.workspace.options.oneBasedIndex?"0":"-1")})},t.Constants.Text.TEXT_CHARAT_MUTATOR_MIXIN={mutationToDom:function(){var e=t.utils.xml.createElement("mutation");return e.setAttribute("at",!!this.isAt_),e},domToMutation:function(t){t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateAt_:function(e){this.removeInput("AT",!0),this.removeInput("ORDINAL",!0),e&&(this.appendValueInput("AT").setCheck("Number"),t.Msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL").appendField(t.Msg.ORDINAL_NUMBER_SUFFIX)),t.Msg.TEXT_CHARAT_TAIL&&(this.removeInput("TAIL",!0),this.appendDummyInput("TAIL").appendField(t.Msg.TEXT_CHARAT_TAIL)),this.isAt_=e}},t.Constants.Text.TEXT_CHARAT_EXTENSION=function(){this.getField("WHERE").setValidator(function(t){(t="FROM_START"==t||"FROM_END"==t)!=this.isAt_&&this.getSourceBlock().updateAt_(t)}),this.updateAt_(!0);var e=this;this.setTooltip(function(){var i=e.getFieldValue("WHERE"),n=t.Msg.TEXT_CHARAT_TOOLTIP;return("FROM_START"==i||"FROM_END"==i)&&(i="FROM_START"==i?t.Msg.LISTS_INDEX_FROM_START_TOOLTIP:t.Msg.LISTS_INDEX_FROM_END_TOOLTIP)&&(n+="  "+i.replace("%1",e.workspace.options.oneBasedIndex?"#1":"#0")),n})},t.Extensions.register("text_indexOf_tooltip",t.Constants.Text.TEXT_INDEXOF_TOOLTIP_EXTENSION),t.Extensions.register("text_quotes",t.Constants.Text.TEXT_QUOTES_EXTENSION),t.Extensions.registerMutator("text_join_mutator",t.Constants.Text.TEXT_JOIN_MUTATOR_MIXIN,t.Constants.Text.TEXT_JOIN_EXTENSION),t.Extensions.registerMutator("text_charAt_mutator",t.Constants.Text.TEXT_CHARAT_MUTATOR_MIXIN,t.Constants.Text.TEXT_CHARAT_EXTENSION),t.Blocks.variables={},t.Constants.Variables={},t.Constants.Variables.HUE=330,t.defineBlocksWithJsonArray([{type:"variables_get",message0:"%1",args0:[{type:"field_variable",name:"VAR",variable:"%{BKY_VARIABLES_DEFAULT_NAME}"}],output:null,style:"variable_blocks",helpUrl:"%{BKY_VARIABLES_GET_HELPURL}",tooltip:"%{BKY_VARIABLES_GET_TOOLTIP}",extensions:["contextMenu_variableSetterGetter"]},{type:"variables_set",message0:"%{BKY_VARIABLES_SET}",args0:[{type:"field_variable",name:"VAR",variable:"%{BKY_VARIABLES_DEFAULT_NAME}"},{type:"input_value",name:"VALUE"}],previousStatement:null,nextStatement:null,style:"variable_blocks",tooltip:"%{BKY_VARIABLES_SET_TOOLTIP}",helpUrl:"%{BKY_VARIABLES_SET_HELPURL}",extensions:["contextMenu_variableSetterGetter"]}]),t.Constants.Variables.CUSTOM_CONTEXT_MENU_VARIABLE_GETTER_SETTER_MIXIN={customContextMenu:function(e){if(this.isInFlyout)"variables_get"!=this.type&&"variables_get_reporter"!=this.type||(i={text:t.Msg.RENAME_VARIABLE,enabled:!0,callback:t.Constants.Variables.RENAME_OPTION_CALLBACK_FACTORY(this)},r=this.getField("VAR").getText(),o={text:t.Msg.DELETE_VARIABLE.replace("%1",r),enabled:!0,callback:t.Constants.Variables.DELETE_OPTION_CALLBACK_FACTORY(this)},e.unshift(i),e.unshift(o));else{if("variables_get"==this.type)var i="variables_set",n=t.Msg.VARIABLES_GET_CREATE_SET;else i="variables_get",n=t.Msg.VARIABLES_SET_CREATE_GET;var o={enabled:0<this.workspace.remainingCapacity()},r=this.getField("VAR").getText();o.text=n.replace("%1",r),(n=t.utils.xml.createElement("field")).setAttribute("name","VAR"),n.appendChild(t.utils.xml.createTextNode(r)),(r=t.utils.xml.createElement("block")).setAttribute("type",i),r.appendChild(n),o.callback=t.ContextMenu.callbackFactory(this,r),e.push(o)}}},t.Constants.Variables.RENAME_OPTION_CALLBACK_FACTORY=function(e){return function(){var i=e.workspace,n=e.getField("VAR").getVariable();t.Variables.renameVariable(i,n)}},t.Constants.Variables.DELETE_OPTION_CALLBACK_FACTORY=function(t){return function(){var e=t.workspace,i=t.getField("VAR").getVariable();e.deleteVariableById(i.getId()),e.refreshToolboxSelection()}},t.Extensions.registerMixin("contextMenu_variableSetterGetter",t.Constants.Variables.CUSTOM_CONTEXT_MENU_VARIABLE_GETTER_SETTER_MIXIN),t.Constants.VariablesDynamic={},t.Constants.VariablesDynamic.HUE=310,t.defineBlocksWithJsonArray([{type:"variables_get_dynamic",message0:"%1",args0:[{type:"field_variable",name:"VAR",variable:"%{BKY_VARIABLES_DEFAULT_NAME}"}],output:null,style:"variable_dynamic_blocks",helpUrl:"%{BKY_VARIABLES_GET_HELPURL}",tooltip:"%{BKY_VARIABLES_GET_TOOLTIP}",extensions:["contextMenu_variableDynamicSetterGetter"]},{type:"variables_set_dynamic",message0:"%{BKY_VARIABLES_SET}",args0:[{type:"field_variable",name:"VAR",variable:"%{BKY_VARIABLES_DEFAULT_NAME}"},{type:"input_value",name:"VALUE"}],previousStatement:null,nextStatement:null,style:"variable_dynamic_blocks",tooltip:"%{BKY_VARIABLES_SET_TOOLTIP}",helpUrl:"%{BKY_VARIABLES_SET_HELPURL}",extensions:["contextMenu_variableDynamicSetterGetter"]}]),t.Constants.VariablesDynamic.CUSTOM_CONTEXT_MENU_VARIABLE_GETTER_SETTER_MIXIN={customContextMenu:function(e){if(this.isInFlyout)"variables_get_dynamic"!=this.type&&"variables_get_reporter_dynamic"!=this.type||(i={text:t.Msg.RENAME_VARIABLE,enabled:!0,callback:t.Constants.Variables.RENAME_OPTION_CALLBACK_FACTORY(this)},s=this.getField("VAR").getText(),r={text:t.Msg.DELETE_VARIABLE.replace("%1",s),enabled:!0,callback:t.Constants.Variables.DELETE_OPTION_CALLBACK_FACTORY(this)},e.unshift(i),e.unshift(r));else{var i=this.getFieldValue("VAR"),n=this.workspace.getVariableById(i).type;if("variables_get_dynamic"==this.type){i="variables_set_dynamic";var o=t.Msg.VARIABLES_GET_CREATE_SET}else i="variables_get_dynamic",o=t.Msg.VARIABLES_SET_CREATE_GET;var r={enabled:0<this.workspace.remainingCapacity()},s=this.getField("VAR").getText();r.text=o.replace("%1",s),(o=t.utils.xml.createElement("field")).setAttribute("name","VAR"),o.setAttribute("variabletype",n),o.appendChild(t.utils.xml.createTextNode(s)),(s=t.utils.xml.createElement("block")).setAttribute("type",i),s.appendChild(o),r.callback=t.ContextMenu.callbackFactory(this,s),e.push(r)}},onchange:function(e){e=this.getFieldValue("VAR"),e=t.Variables.getVariable(this.workspace,e),"variables_get_dynamic"==this.type?this.outputConnection.setCheck(e.type):this.getInput("VALUE").connection.setCheck(e.type)}},t.Constants.VariablesDynamic.RENAME_OPTION_CALLBACK_FACTORY=function(e){return function(){var i=e.workspace,n=e.getField("VAR").getVariable();t.Variables.renameVariable(i,n)}},t.Constants.VariablesDynamic.DELETE_OPTION_CALLBACK_FACTORY=function(t){return function(){var e=t.workspace,i=t.getField("VAR").getVariable();e.deleteVariableById(i.getId()),e.refreshToolboxSelection()}},t.Extensions.registerMixin("contextMenu_variableDynamicSetterGetter",t.Constants.VariablesDynamic.CUSTOM_CONTEXT_MENU_VARIABLE_GETTER_SETTER_MIXIN),t.Blocks},o=[i("GEkh")],void 0===(r="function"==typeof(n=s)?n.apply(e,o):n)||(t.exports=r)},"QWe/":function(t,e,i){i("crlp")("observable")},R4wc:function(t,e,i){var n=i("kM2E");n(n.S+n.F,"Object",{assign:i("To3L")})},R9M2:function(t,e){var i={}.toString;t.exports=function(t){return i.call(t).slice(8,-1)}},RDoK:function(t,e,i){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist/",i(i.s=107)}({0:function(t,e,i){"use strict";function n(t,e,i,n,o,r,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):o&&(l=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:t,options:c}}i.d(e,"a",function(){return n})},107:function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("label",{staticClass:"el-radio",class:[t.border&&t.radioSize?"el-radio--"+t.radioSize:"",{"is-disabled":t.isDisabled},{"is-focus":t.focus},{"is-bordered":t.border},{"is-checked":t.model===t.label}],attrs:{role:"radio","aria-checked":t.model===t.label,"aria-disabled":t.isDisabled,tabindex:t.tabIndex},on:{keydown:function(e){if(!("button"in e)&&t._k(e.keyCode,"space",32,e.key,[" ","Spacebar"]))return null;e.stopPropagation(),e.preventDefault(),t.model=t.isDisabled?t.model:t.label}}},[i("span",{staticClass:"el-radio__input",class:{"is-disabled":t.isDisabled,"is-checked":t.model===t.label}},[i("span",{staticClass:"el-radio__inner"}),i("input",{directives:[{name:"model",rawName:"v-model",value:t.model,expression:"model"}],ref:"radio",staticClass:"el-radio__original",attrs:{type:"radio","aria-hidden":"true",name:t.name,disabled:t.isDisabled,tabindex:"-1"},domProps:{value:t.label,checked:t._q(t.model,t.label)},on:{focus:function(e){t.focus=!0},blur:function(e){t.focus=!1},change:[function(e){t.model=t.label},t.handleChange]}})]),i("span",{staticClass:"el-radio__label",on:{keydown:function(t){t.stopPropagation()}}},[t._t("default"),t.$slots.default?t._e():[t._v(t._s(t.label))]],2)])};n._withStripped=!0;var o=i(4),r={name:"ElRadio",mixins:[i.n(o).a],inject:{elForm:{default:""},elFormItem:{default:""}},componentName:"ElRadio",props:{value:{},label:{},disabled:Boolean,name:String,border:Boolean,size:String},data:function(){return{focus:!1}},computed:{isGroup:function(){for(var t=this.$parent;t;){if("ElRadioGroup"===t.$options.componentName)return this._radioGroup=t,!0;t=t.$parent}return!1},model:{get:function(){return this.isGroup?this._radioGroup.value:this.value},set:function(t){this.isGroup?this.dispatch("ElRadioGroup","input",[t]):this.$emit("input",t),this.$refs.radio&&(this.$refs.radio.checked=this.model===this.label)}},_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},radioSize:function(){var t=this.size||this._elFormItemSize||(this.$ELEMENT||{}).size;return this.isGroup&&this._radioGroup.radioGroupSize||t},isDisabled:function(){return this.isGroup?this._radioGroup.disabled||this.disabled||(this.elForm||{}).disabled:this.disabled||(this.elForm||{}).disabled},tabIndex:function(){return this.isDisabled||this.isGroup&&this.model!==this.label?-1:0}},methods:{handleChange:function(){var t=this;this.$nextTick(function(){t.$emit("change",t.model),t.isGroup&&t.dispatch("ElRadioGroup","handleChange",t.model)})}}},s=i(0),a=Object(s.a)(r,n,[],!1,null,null,null);a.options.__file="packages/radio/src/radio.vue";var l=a.exports;l.install=function(t){t.component(l.name,l)};e.default=l},4:function(t,e){t.exports=i("fPll")}})},RPLV:function(t,e,i){var n=i("7KvD").document;t.exports=n&&n.documentElement},"RY/4":function(t,e,i){var n=i("R9M2"),o=i("dSzd")("toStringTag"),r="Arguments"==n(function(){return arguments}());t.exports=function(t){var e,i,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?i:r?n(e):"Object"==(s=n(e))&&"function"==typeof e.callee?"Arguments":s}},Rrel:function(t,e,i){var n=i("TcQ7"),o=i("n0T6").f,r={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"[object Window]"==r.call(t)?function(t){try{return o(t)}catch(t){return s.slice()}}(t):o(n(t))}},S82l:function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},SLDG:function(t,e,i){"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},STLj:function(t,e,i){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist/",i(i.s=53)}({0:function(t,e,i){"use strict";function n(t,e,i,n,o,r,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):o&&(l=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:t,options:c}}i.d(e,"a",function(){return n})},3:function(t,e){t.exports=i("ylDJ")},33:function(t,e,i){"use strict";var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("li",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"el-select-dropdown__item",class:{selected:t.itemSelected,"is-disabled":t.disabled||t.groupDisabled||t.limitReached,hover:t.hover},on:{mouseenter:t.hoverItem,click:function(e){return e.stopPropagation(),t.selectOptionClick(e)}}},[t._t("default",[i("span",[t._v(t._s(t.currentLabel))])])],2)};n._withStripped=!0;var o=i(4),r=i.n(o),s=i(3),a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l={mixins:[r.a],name:"ElOption",componentName:"ElOption",inject:["select"],props:{value:{required:!0},label:[String,Number],created:Boolean,disabled:{type:Boolean,default:!1}},data:function(){return{index:-1,groupDisabled:!1,visible:!0,hitState:!1,hover:!1}},computed:{isObject:function(){return"[object object]"===Object.prototype.toString.call(this.value).toLowerCase()},currentLabel:function(){return this.label||(this.isObject?"":this.value)},currentValue:function(){return this.value||this.label||""},itemSelected:function(){return this.select.multiple?this.contains(this.select.value,this.value):this.isEqual(this.value,this.select.value)},limitReached:function(){return!!this.select.multiple&&(!this.itemSelected&&(this.select.value||[]).length>=this.select.multipleLimit&&this.select.multipleLimit>0)}},watch:{currentLabel:function(){this.created||this.select.remote||this.dispatch("ElSelect","setSelected")},value:function(t,e){var i=this.select,n=i.remote,o=i.valueKey;if(!this.created&&!n){if(o&&"object"===(void 0===t?"undefined":a(t))&&"object"===(void 0===e?"undefined":a(e))&&t[o]===e[o])return;this.dispatch("ElSelect","setSelected")}}},methods:{isEqual:function(t,e){if(this.isObject){var i=this.select.valueKey;return Object(s.getValueByPath)(t,i)===Object(s.getValueByPath)(e,i)}return t===e},contains:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments[1];if(this.isObject){var i=this.select.valueKey;return t&&t.some(function(t){return Object(s.getValueByPath)(t,i)===Object(s.getValueByPath)(e,i)})}return t&&t.indexOf(e)>-1},handleGroupDisabled:function(t){this.groupDisabled=t},hoverItem:function(){this.disabled||this.groupDisabled||(this.select.hoverIndex=this.select.options.indexOf(this))},selectOptionClick:function(){!0!==this.disabled&&!0!==this.groupDisabled&&this.dispatch("ElSelect","handleOptionClick",[this,!0])},queryChange:function(t){this.visible=new RegExp(Object(s.escapeRegexpString)(t),"i").test(this.currentLabel)||this.created,this.visible||this.select.filteredOptionsCount--}},created:function(){this.select.options.push(this),this.select.cachedOptions.push(this),this.select.optionsCount++,this.select.filteredOptionsCount++,this.$on("queryChange",this.queryChange),this.$on("handleGroupDisabled",this.handleGroupDisabled)},beforeDestroy:function(){var t=this.select,e=t.selected,i=t.multiple?e:[e],n=this.select.cachedOptions.indexOf(this),o=i.indexOf(this);n>-1&&o<0&&this.select.cachedOptions.splice(n,1),this.select.onOptionDestroy(this.select.options.indexOf(this))}},c=i(0),u=Object(c.a)(l,n,[],!1,null,null,null);u.options.__file="packages/select/src/option.vue";e.a=u.exports},4:function(t,e){t.exports=i("fPll")},53:function(t,e,i){"use strict";i.r(e);var n=i(33);n.a.install=function(t){t.component(n.a.name,n.a)},e.default=n.a}})},SXzR:function(t,e,i){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist/",i(i.s=73)}({0:function(t,e,i){"use strict";function n(t,e,i,n,o,r,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):o&&(l=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:t,options:c}}i.d(e,"a",function(){return n})},2:function(t,e){t.exports=i("2kvA")},3:function(t,e){t.exports=i("ylDJ")},5:function(t,e){t.exports=i("fKx3")},7:function(t,e){t.exports=i("7+uW")},73:function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("span",[i("transition",{attrs:{name:t.transition},on:{"after-enter":t.handleAfterEnter,"after-leave":t.handleAfterLeave}},[i("div",{directives:[{name:"show",rawName:"v-show",value:!t.disabled&&t.showPopper,expression:"!disabled && showPopper"}],ref:"popper",staticClass:"el-popover el-popper",class:[t.popperClass,t.content&&"el-popover--plain"],style:{width:t.width+"px"},attrs:{role:"tooltip",id:t.tooltipId,"aria-hidden":t.disabled||!t.showPopper?"true":"false"}},[t.title?i("div",{staticClass:"el-popover__title",domProps:{textContent:t._s(t.title)}}):t._e(),t._t("default",[t._v(t._s(t.content))])],2)]),i("span",{ref:"wrapper",staticClass:"el-popover__reference-wrapper"},[t._t("reference")],2)],1)};n._withStripped=!0;var o=i(5),r=i.n(o),s=i(2),a=i(3),l={name:"ElPopover",mixins:[r.a],props:{trigger:{type:String,default:"click",validator:function(t){return["click","focus","hover","manual"].indexOf(t)>-1}},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:200},title:String,disabled:Boolean,content:String,reference:{},popperClass:String,width:{},visibleArrow:{default:!0},arrowOffset:{type:Number,default:0},transition:{type:String,default:"fade-in-linear"},tabindex:{type:Number,default:0}},computed:{tooltipId:function(){return"el-popover-"+Object(a.generateId)()}},watch:{showPopper:function(t){this.disabled||(t?this.$emit("show"):this.$emit("hide"))}},mounted:function(){var t=this,e=this.referenceElm=this.reference||this.$refs.reference,i=this.popper||this.$refs.popper;!e&&this.$refs.wrapper.children&&(e=this.referenceElm=this.$refs.wrapper.children[0]),e&&(Object(s.addClass)(e,"el-popover__reference"),e.setAttribute("aria-describedby",this.tooltipId),e.setAttribute("tabindex",this.tabindex),i.setAttribute("tabindex",0),"click"!==this.trigger&&(Object(s.on)(e,"focusin",function(){t.handleFocus();var i=e.__vue__;i&&"function"==typeof i.focus&&i.focus()}),Object(s.on)(i,"focusin",this.handleFocus),Object(s.on)(e,"focusout",this.handleBlur),Object(s.on)(i,"focusout",this.handleBlur)),Object(s.on)(e,"keydown",this.handleKeydown),Object(s.on)(e,"click",this.handleClick)),"click"===this.trigger?(Object(s.on)(e,"click",this.doToggle),Object(s.on)(document,"click",this.handleDocumentClick)):"hover"===this.trigger?(Object(s.on)(e,"mouseenter",this.handleMouseEnter),Object(s.on)(i,"mouseenter",this.handleMouseEnter),Object(s.on)(e,"mouseleave",this.handleMouseLeave),Object(s.on)(i,"mouseleave",this.handleMouseLeave)):"focus"===this.trigger&&(this.tabindex<0&&console.warn("[Element Warn][Popover]a negative taindex means that the element cannot be focused by tab key"),e.querySelector("input, textarea")?(Object(s.on)(e,"focusin",this.doShow),Object(s.on)(e,"focusout",this.doClose)):(Object(s.on)(e,"mousedown",this.doShow),Object(s.on)(e,"mouseup",this.doClose)))},beforeDestroy:function(){this.cleanup()},deactivated:function(){this.cleanup()},methods:{doToggle:function(){this.showPopper=!this.showPopper},doShow:function(){this.showPopper=!0},doClose:function(){this.showPopper=!1},handleFocus:function(){Object(s.addClass)(this.referenceElm,"focusing"),"click"!==this.trigger&&"focus"!==this.trigger||(this.showPopper=!0)},handleClick:function(){Object(s.removeClass)(this.referenceElm,"focusing")},handleBlur:function(){Object(s.removeClass)(this.referenceElm,"focusing"),"click"!==this.trigger&&"focus"!==this.trigger||(this.showPopper=!1)},handleMouseEnter:function(){var t=this;clearTimeout(this._timer),this.openDelay?this._timer=setTimeout(function(){t.showPopper=!0},this.openDelay):this.showPopper=!0},handleKeydown:function(t){27===t.keyCode&&"manual"!==this.trigger&&this.doClose()},handleMouseLeave:function(){var t=this;clearTimeout(this._timer),this.closeDelay?this._timer=setTimeout(function(){t.showPopper=!1},this.closeDelay):this.showPopper=!1},handleDocumentClick:function(t){var e=this.reference||this.$refs.reference,i=this.popper||this.$refs.popper;!e&&this.$refs.wrapper.children&&(e=this.referenceElm=this.$refs.wrapper.children[0]),this.$el&&e&&!this.$el.contains(t.target)&&!e.contains(t.target)&&i&&!i.contains(t.target)&&(this.showPopper=!1)},handleAfterEnter:function(){this.$emit("after-enter")},handleAfterLeave:function(){this.$emit("after-leave"),this.doDestroy()},cleanup:function(){(this.openDelay||this.closeDelay)&&clearTimeout(this._timer)}},destroyed:function(){var t=this.reference;Object(s.off)(t,"click",this.doToggle),Object(s.off)(t,"mouseup",this.doClose),Object(s.off)(t,"mousedown",this.doShow),Object(s.off)(t,"focusin",this.doShow),Object(s.off)(t,"focusout",this.doClose),Object(s.off)(t,"mousedown",this.doShow),Object(s.off)(t,"mouseup",this.doClose),Object(s.off)(t,"mouseleave",this.handleMouseLeave),Object(s.off)(t,"mouseenter",this.handleMouseEnter),Object(s.off)(document,"click",this.handleDocumentClick)}},c=i(0),u=Object(c.a)(l,n,[],!1,null,null,null);u.options.__file="packages/popover/src/main.vue";var h=u.exports,p=function(t,e,i){var n=e.expression?e.value:e.arg,o=i.context.$refs[n];o&&(Array.isArray(o)?o[0].$refs.reference=t:o.$refs.reference=t)},d={bind:function(t,e,i){p(t,e,i)},inserted:function(t,e,i){p(t,e,i)}},f=i(7);i.n(f).a.directive("popover",d),h.install=function(t){t.directive("popover",d),t.component(h.name,h)},h.directive=d;e.default=h}})},SfB7:function(t,e,i){t.exports=!i("+E39")&&!i("S82l")(function(){return 7!=Object.defineProperty(i("ON07")("div"),"a",{get:function(){return 7}}).a})},SldL:function(t,e){!function(e){"use strict";var i,n=Object.prototype,o=n.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},s=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",l=r.toStringTag||"@@toStringTag",c="object"==typeof t,u=e.regeneratorRuntime;if(u)c&&(t.exports=u);else{(u=e.regeneratorRuntime=c?t.exports:{}).wrap=b;var h="suspendedStart",p="suspendedYield",d="executing",f="completed",g={},_={};_[s]=function(){return this};var m=Object.getPrototypeOf,v=m&&m(m(x([])));v&&v!==n&&o.call(v,s)&&(_=v);var y=S.prototype=E.prototype=Object.create(_);C.prototype=y.constructor=S,S.constructor=C,S[l]=C.displayName="GeneratorFunction",u.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===C||"GeneratorFunction"===(e.displayName||e.name))},u.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,S):(t.__proto__=S,l in t||(t[l]="GeneratorFunction")),t.prototype=Object.create(y),t},u.awrap=function(t){return{__await:t}},k(O.prototype),O.prototype[a]=function(){return this},u.AsyncIterator=O,u.async=function(t,e,i,n){var o=new O(b(t,e,i,n));return u.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},k(y),y[l]="Generator",y[s]=function(){return this},y.toString=function(){return"[object Generator]"},u.keys=function(t){var e=[];for(var i in t)e.push(i);return e.reverse(),function i(){for(;e.length;){var n=e.pop();if(n in t)return i.value=n,i.done=!1,i}return i.done=!0,i}},u.values=x,D.prototype={constructor:D,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=i,this.done=!1,this.delegate=null,this.method="next",this.arg=i,this.tryEntries.forEach(R),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=i)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,o){return a.type="throw",a.arg=t,e.next=n,o&&(e.method="next",e.arg=i),!!o}for(var r=this.tryEntries.length-1;r>=0;--r){var s=this.tryEntries[r],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var l=o.call(s,"catchLoc"),c=o.call(s,"finallyLoc");if(l&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(l){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(t,e){for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var r=n;break}}r&&("break"===t||"continue"===t)&&r.tryLoc<=e&&e<=r.finallyLoc&&(r=null);var s=r?r.completion:{};return s.type=t,s.arg=e,r?(this.method="next",this.next=r.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),R(i),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var o=n.arg;R(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:x(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=i),g}}}function b(t,e,i,n){var o=e&&e.prototype instanceof E?e:E,r=Object.create(o.prototype),s=new D(n||[]);return r._invoke=function(t,e,i){var n=h;return function(o,r){if(n===d)throw new Error("Generator is already running");if(n===f){if("throw"===o)throw r;return M()}for(i.method=o,i.arg=r;;){var s=i.delegate;if(s){var a=I(s,i);if(a){if(a===g)continue;return a}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(n===h)throw n=f,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n=d;var l=T(t,e,i);if("normal"===l.type){if(n=i.done?f:p,l.arg===g)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(n=f,i.method="throw",i.arg=l.arg)}}}(t,i,s),r}function T(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(t){return{type:"throw",arg:t}}}function E(){}function C(){}function S(){}function k(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function O(t){var e;this._invoke=function(i,n){function r(){return new Promise(function(e,r){!function e(i,n,r,s){var a=T(t[i],t,n);if("throw"!==a.type){var l=a.arg,c=l.value;return c&&"object"==typeof c&&o.call(c,"__await")?Promise.resolve(c.__await).then(function(t){e("next",t,r,s)},function(t){e("throw",t,r,s)}):Promise.resolve(c).then(function(t){l.value=t,r(l)},s)}s(a.arg)}(i,n,e,r)})}return e=e?e.then(r,r):r()}}function I(t,e){var n=t.iterator[e.method];if(n===i){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=i,I(t,e),"throw"===e.method))return g;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var o=T(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,g;var r=o.arg;return r?r.done?(e[t.resultName]=r.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=i),e.delegate=null,g):r:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function R(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function x(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(o.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=i,e.done=!0,e};return r.next=r}}return{next:M}}function M(){return{value:i,done:!0}}}(function(){return this}()||Function("return this")())},SvnF:function(t,e,i){"use strict";e.__esModule=!0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.default=function(t){return function(t){for(var e=arguments.length,i=Array(e>1?e-1:0),s=1;s<e;s++)i[s-1]=arguments[s];return 1===i.length&&"object"===n(i[0])&&(i=i[0]),i&&i.hasOwnProperty||(i={}),t.replace(r,function(e,n,r,s){var a=void 0;return"{"===t[s-1]&&"}"===t[s+e.length]?r:null===(a=(0,o.hasOwn)(i,r)?i[r]:null)||void 0===a?"":a})}};var o=i("ylDJ"),r=/(%|)\{([0-9a-zA-Z_]+)\}/g},TNV1:function(t,e,i){"use strict";var n=i("cGG2");t.exports=function(t,e,i){return n.forEach(i,function(i){t=i(t,e)}),t}},TcQ7:function(t,e,i){var n=i("MU5D"),o=i("52gC");t.exports=function(t){return n(o(t))}},To3L:function(t,e,i){"use strict";var n=i("+E39"),o=i("lktj"),r=i("1kS7"),s=i("NpIQ"),a=i("sB3e"),l=i("MU5D"),c=Object.assign;t.exports=!c||i("S82l")(function(){var t={},e={},i=Symbol(),n="abcdefghijklmnopqrst";return t[i]=7,n.split("").forEach(function(t){e[t]=t}),7!=c({},t)[i]||Object.keys(c({},e)).join("")!=n})?function(t,e){for(var i=a(t),c=arguments.length,u=1,h=r.f,p=s.f;c>u;)for(var d,f=l(arguments[u++]),g=h?o(f).concat(h(f)):o(f),_=g.length,m=0;_>m;)d=g[m++],n&&!p.call(f,d)||(i[d]=f[d]);return i}:c},U5ju:function(t,e,i){i("M6a0"),i("zQR9"),i("+tPU"),i("CXw9"),i("EqBC"),i("jKW+"),t.exports=i("FeBl").Promise},UuGF:function(t,e){var i=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:i)(t)}},V3tA:function(t,e,i){i("R4wc"),t.exports=i("FeBl").Object.assign},"VU/8":function(t,e){t.exports=function(t,e,i,n,o,r){var s,a=t=t||{},l=typeof t.default;"object"!==l&&"function"!==l||(s=t,a=t.default);var c,u="function"==typeof a?a.options:a;if(e&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0),i&&(u.functional=!0),o&&(u._scopeId=o),r?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},u._ssrRegister=c):n&&(c=n),c){var h=u.functional,p=h?u.render:u.beforeCreate;h?(u._injectStyles=c,u.render=function(t,e){return c.call(e),p(t,e)}):u.beforeCreate=p?[].concat(p,c):[c]}return{esModule:s,exports:a,options:u}}},Vi3T:function(t,e,i){"use strict";e.__esModule=!0,e.default={el:{colorpicker:{confirm:"确定",clear:"清空"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},empty:{description:"暂无数据"}}}},W2nU:function(t,e){var i,n,o=t.exports={};function r(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(i===setTimeout)return setTimeout(t,0);if((i===r||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:r}catch(t){i=r}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var l,c=[],u=!1,h=-1;function p(){u&&l&&(u=!1,l.length?c=l.concat(c):h=-1,c.length&&d())}function d(){if(!u){var t=a(p);u=!0;for(var e=c.length;e;){for(l=c,c=[];++h<e;)l&&l[h].run();h=-1,e=c.length}l=null,u=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function g(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];c.push(new f(t,e)),1!==c.length||u||a(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},X8DO:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},Xc4G:function(t,e,i){var n=i("lktj"),o=i("1kS7"),r=i("NpIQ");t.exports=function(t){var e=n(t),i=o.f;if(i)for(var s,a=i(t),l=r.f,c=0;a.length>c;)l.call(t,s=a[c++])&&e.push(s);return e}},Xd32:function(t,e,i){i("+tPU"),i("zQR9"),t.exports=i("5PlU")},XgCd:function(t,e,i){"use strict";var n=String.prototype.replace,o=/%20/g;t.exports={default:"RFC3986",formatters:{RFC1738:function(t){return n.call(t,o,"+")},RFC3986:function(t){return t}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},XmWM:function(t,e,i){"use strict";var n=i("cGG2"),o=i("DQCr"),r=i("fuGk"),s=i("xLtR"),a=i("DUeU");function l(t){this.defaults=t,this.interceptors={request:new r,response:new r}}l.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=a(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[s,void 0],i=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)i=i.then(e.shift(),e.shift());return i},l.prototype.getUri=function(t){return t=a(this.defaults,t),o(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],function(t){l.prototype[t]=function(e,i){return this.request(a(i||{},{method:t,url:e,data:(i||{}).data}))}}),n.forEach(["post","put","patch"],function(t){l.prototype[t]=function(e,i,n){return this.request(a(n||{},{method:t,url:e,data:i}))}}),t.exports=l},Xxa5:function(t,e,i){t.exports=i("jyFz")},Y5mS:function(t,e,i){"use strict";var n,o=i("lFkc");o.canUseDOM&&(n=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""))
/**
 * Checks if an event is supported in the current execution environment.
 *
 * NOTE: This will not work correctly for non-generic events such as `change`,
 * `reset`, `load`, `error`, and `select`.
 *
 * Borrows from Modernizr.
 *
 * @param {string} eventNameSuffix Event name, e.g. "click".
 * @param {?boolean} capture Check if the capture phase is supported.
 * @return {boolean} True if the event is supported.
 * @internal
 * @license Modernizr 3.0.0pre (Custom Build) | MIT
 */,t.exports=function(t,e){if(!o.canUseDOM||e&&!("addEventListener"in document))return!1;var i="on"+t,r=i in document;if(!r){var s=document.createElement("div");s.setAttribute(i,"return;"),r="function"==typeof s[i]}return!r&&n&&"wheel"===t&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}},YAhB:function(t,e,i){"use strict";var n=i("++K3"),o=i("Y5mS"),r=10,s=40,a=800;function l(t){var e=0,i=0,n=0,o=0;return"detail"in t&&(i=t.detail),"wheelDelta"in t&&(i=-t.wheelDelta/120),"wheelDeltaY"in t&&(i=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=i,i=0),n=e*r,o=i*r,"deltaY"in t&&(o=t.deltaY),"deltaX"in t&&(n=t.deltaX),(n||o)&&t.deltaMode&&(1==t.deltaMode?(n*=s,o*=s):(n*=a,o*=a)),n&&!e&&(e=n<1?-1:1),o&&!i&&(i=o<1?-1:1),{spinX:e,spinY:i,pixelX:n,pixelY:o}}l.getEventType=function(){return n.firefox()?"DOMMouseScroll":o("wheel")?"wheel":"mousewheel"},t.exports=l},Yobk:function(t,e,i){var n=i("77Pl"),o=i("qio6"),r=i("xnc9"),s=i("ax3d")("IE_PROTO"),a=function(){},l=function(){var t,e=i("ON07")("iframe"),n=r.length;for(e.style.display="none",i("RPLV").appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),l=t.F;n--;)delete l.prototype[r[n]];return l()};t.exports=Object.create||function(t,e){var i;return null!==t?(a.prototype=n(t),i=new a,a.prototype=null,i[s]=t):i=l(),void 0===e?i:o(i,e)}},Zcwg:function(t,e,i){"use strict";e.__esModule=!0;var n=i("2kvA");var o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.prototype.beforeEnter=function(t){(0,n.addClass)(t,"collapse-transition"),t.dataset||(t.dataset={}),t.dataset.oldPaddingTop=t.style.paddingTop,t.dataset.oldPaddingBottom=t.style.paddingBottom,t.style.height="0",t.style.paddingTop=0,t.style.paddingBottom=0},t.prototype.enter=function(t){t.dataset.oldOverflow=t.style.overflow,0!==t.scrollHeight?(t.style.height=t.scrollHeight+"px",t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom):(t.style.height="",t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom),t.style.overflow="hidden"},t.prototype.afterEnter=function(t){(0,n.removeClass)(t,"collapse-transition"),t.style.height="",t.style.overflow=t.dataset.oldOverflow},t.prototype.beforeLeave=function(t){t.dataset||(t.dataset={}),t.dataset.oldPaddingTop=t.style.paddingTop,t.dataset.oldPaddingBottom=t.style.paddingBottom,t.dataset.oldOverflow=t.style.overflow,t.style.height=t.scrollHeight+"px",t.style.overflow="hidden"},t.prototype.leave=function(t){0!==t.scrollHeight&&((0,n.addClass)(t,"collapse-transition"),t.style.height=0,t.style.paddingTop=0,t.style.paddingBottom=0)},t.prototype.afterLeave=function(t){(0,n.removeClass)(t,"collapse-transition"),t.style.height="",t.style.overflow=t.dataset.oldOverflow,t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom},t}();e.default={name:"ElCollapseTransition",functional:!0,render:function(t,e){var i=e.children;return t("transition",{on:new o},i)}}},Zzip:function(t,e,i){t.exports={default:i("/n6Q"),__esModule:!0}},aMwW:function(t,e,i){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist/",i(i.s=135)}({135:function(t,e,i){"use strict";i.r(e);var n=i(5),o=i.n(n),r=i(17),s=i.n(r),a=i(2),l=i(3),c=i(7),u=i.n(c),h={name:"ElTooltip",mixins:[o.a],props:{openDelay:{type:Number,default:0},disabled:Boolean,manual:Boolean,effect:{type:String,default:"dark"},arrowOffset:{type:Number,default:0},popperClass:String,content:String,visibleArrow:{default:!0},transition:{type:String,default:"el-fade-in-linear"},popperOptions:{default:function(){return{boundariesPadding:10,gpuAcceleration:!1}}},enterable:{type:Boolean,default:!0},hideAfter:{type:Number,default:0},tabindex:{type:Number,default:0}},data:function(){return{tooltipId:"el-tooltip-"+Object(l.generateId)(),timeoutPending:null,focusing:!1}},beforeCreate:function(){var t=this;this.$isServer||(this.popperVM=new u.a({data:{node:""},render:function(t){return this.node}}).$mount(),this.debounceClose=s()(200,function(){return t.handleClosePopper()}))},render:function(t){var e=this;this.popperVM&&(this.popperVM.node=t("transition",{attrs:{name:this.transition},on:{afterLeave:this.doDestroy}},[t("div",{on:{mouseleave:function(){e.setExpectedState(!1),e.debounceClose()},mouseenter:function(){e.setExpectedState(!0)}},ref:"popper",attrs:{role:"tooltip",id:this.tooltipId,"aria-hidden":this.disabled||!this.showPopper?"true":"false"},directives:[{name:"show",value:!this.disabled&&this.showPopper}],class:["el-tooltip__popper","is-"+this.effect,this.popperClass]},[this.$slots.content||this.content])]));var i=this.getFirstElement();if(!i)return null;var n=i.data=i.data||{};return n.staticClass=this.addTooltipClass(n.staticClass),i},mounted:function(){var t=this;this.referenceElm=this.$el,1===this.$el.nodeType&&(this.$el.setAttribute("aria-describedby",this.tooltipId),this.$el.setAttribute("tabindex",this.tabindex),Object(a.on)(this.referenceElm,"mouseenter",this.show),Object(a.on)(this.referenceElm,"mouseleave",this.hide),Object(a.on)(this.referenceElm,"focus",function(){if(t.$slots.default&&t.$slots.default.length){var e=t.$slots.default[0].componentInstance;e&&e.focus?e.focus():t.handleFocus()}else t.handleFocus()}),Object(a.on)(this.referenceElm,"blur",this.handleBlur),Object(a.on)(this.referenceElm,"click",this.removeFocusing)),this.value&&this.popperVM&&this.popperVM.$nextTick(function(){t.value&&t.updatePopper()})},watch:{focusing:function(t){t?Object(a.addClass)(this.referenceElm,"focusing"):Object(a.removeClass)(this.referenceElm,"focusing")}},methods:{show:function(){this.setExpectedState(!0),this.handleShowPopper()},hide:function(){this.setExpectedState(!1),this.debounceClose()},handleFocus:function(){this.focusing=!0,this.show()},handleBlur:function(){this.focusing=!1,this.hide()},removeFocusing:function(){this.focusing=!1},addTooltipClass:function(t){return t?"el-tooltip "+t.replace("el-tooltip",""):"el-tooltip"},handleShowPopper:function(){var t=this;this.expectedState&&!this.manual&&(clearTimeout(this.timeout),this.timeout=setTimeout(function(){t.showPopper=!0},this.openDelay),this.hideAfter>0&&(this.timeoutPending=setTimeout(function(){t.showPopper=!1},this.hideAfter)))},handleClosePopper:function(){this.enterable&&this.expectedState||this.manual||(clearTimeout(this.timeout),this.timeoutPending&&clearTimeout(this.timeoutPending),this.showPopper=!1,this.disabled&&this.doDestroy())},setExpectedState:function(t){!1===t&&clearTimeout(this.timeoutPending),this.expectedState=t},getFirstElement:function(){var t=this.$slots.default;if(!Array.isArray(t))return null;for(var e=null,i=0;i<t.length;i++)t[i]&&t[i].tag&&(e=t[i]);return e}},beforeDestroy:function(){this.popperVM&&this.popperVM.$destroy()},destroyed:function(){var t=this.referenceElm;1===t.nodeType&&(Object(a.off)(t,"mouseenter",this.show),Object(a.off)(t,"mouseleave",this.hide),Object(a.off)(t,"focus",this.handleFocus),Object(a.off)(t,"blur",this.handleBlur),Object(a.off)(t,"click",this.removeFocusing))},install:function(t){t.component(h.name,h)}};e.default=h},17:function(t,e){t.exports=i("ON3O")},2:function(t,e){t.exports=i("2kvA")},3:function(t,e){t.exports=i("ylDJ")},5:function(t,e){t.exports=i("fKx3")},7:function(t,e){t.exports=i("7+uW")}})},aW5l:function(t,e,i){"use strict";e.__esModule=!0;i("ylDJ");e.default={mounted:function(){},methods:{getMigratingConfig:function(){return{props:{},events:{}}}}}},ax3d:function(t,e,i){var n=i("e8AB")("keys"),o=i("3Eo+");t.exports=function(t){return n[t]||(n[t]=o(t))}},bRrM:function(t,e,i){"use strict";var n=i("7KvD"),o=i("FeBl"),r=i("evD5"),s=i("+E39"),a=i("dSzd")("species");t.exports=function(t){var e="function"==typeof o[t]?o[t]:n[t];s&&e&&!e[a]&&r.f(e,a,{configurable:!0,get:function(){return this}})}},cGG2:function(t,e,i){"use strict";var n=i("JP+z"),o=Object.prototype.toString;function r(t){return"[object Array]"===o.call(t)}function s(t){return void 0===t}function a(t){return null!==t&&"object"==typeof t}function l(t){if("[object Object]"!==o.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t){return"[object Function]"===o.call(t)}function u(t,e){if(null!==t&&void 0!==t)if("object"!=typeof t&&(t=[t]),r(t))for(var i=0,n=t.length;i<n;i++)e.call(null,t[i],i,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}t.exports={isArray:r,isArrayBuffer:function(t){return"[object ArrayBuffer]"===o.call(t)},isBuffer:function(t){return null!==t&&!s(t)&&null!==t.constructor&&!s(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:a,isPlainObject:l,isUndefined:s,isDate:function(t){return"[object Date]"===o.call(t)},isFile:function(t){return"[object File]"===o.call(t)},isBlob:function(t){return"[object Blob]"===o.call(t)},isFunction:c,isStream:function(t){return a(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:u,merge:function t(){var e={};function i(i,n){l(e[n])&&l(i)?e[n]=t(e[n],i):l(i)?e[n]=t({},i):r(i)?e[n]=i.slice():e[n]=i}for(var n=0,o=arguments.length;n<o;n++)u(arguments[n],i);return e},extend:function(t,e,i){return u(e,function(e,o){t[o]=i&&"function"==typeof e?n(e,i):e}),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},cWxy:function(t,e,i){"use strict";var n=i("dVOP");function o(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var i=this;t(function(t){i.reason||(i.reason=new n(t),e(i.reason))})}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var t;return{token:new o(function(e){t=e}),cancel:t}},t.exports=o},crlp:function(t,e,i){var n=i("7KvD"),o=i("FeBl"),r=i("O4g8"),s=i("Kh4W"),a=i("evD5").f;t.exports=function(t){var e=o.Symbol||(o.Symbol=r?{}:n.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:s.f(t)})}},d7EF:function(t,e,i){"use strict";e.__esModule=!0;var n=r(i("us/S")),o=r(i("BO1k"));function r(t){return t&&t.__esModule?t:{default:t}}e.default=function(){return function(t,e){if(Array.isArray(t))return t;if((0,n.default)(Object(t)))return function(t,e){var i=[],n=!0,r=!1,s=void 0;try{for(var a,l=(0,o.default)(t);!(n=(a=l.next()).done)&&(i.push(a.value),!e||i.length!==e);n=!0);}catch(t){r=!0,s=t}finally{try{!n&&l.return&&l.return()}finally{if(r)throw s}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},dIwP:function(t,e,i){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},dNDb:function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},dSzd:function(t,e,i){var n=i("e8AB")("wks"),o=i("3Eo+"),r=i("7KvD").Symbol,s="function"==typeof r;(t.exports=function(t){return n[t]||(n[t]=s&&r[t]||(s?r:o)("Symbol."+t))}).store=n},dVOP:function(t,e,i){"use strict";function n(t){this.message=t}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,t.exports=n},dY0y:function(t,e,i){var n=i("dSzd")("iterator"),o=!1;try{var r=[7][n]();r.return=function(){o=!0},Array.from(r,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var i=!1;try{var r=[7],s=r[n]();s.next=function(){return{done:i=!0}},r[n]=function(){return s},t(r)}catch(t){}return i}},e0Bm:function(t,e,i){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist/",i(i.s=60)}({0:function(t,e,i){"use strict";function n(t,e,i,n,o,r,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):o&&(l=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:t,options:c}}i.d(e,"a",function(){return n})},10:function(t,e){t.exports=i("HJMx")},12:function(t,e){t.exports=i("ISYW")},15:function(t,e){t.exports=i("fEB+")},16:function(t,e){t.exports=i("02w1")},17:function(t,e){t.exports=i("ON3O")},21:function(t,e){t.exports=i("E/in")},22:function(t,e){t.exports=i("1oZe")},3:function(t,e){t.exports=i("ylDJ")},31:function(t,e){t.exports=i("zTCi")},33:function(t,e,i){"use strict";var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("li",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"el-select-dropdown__item",class:{selected:t.itemSelected,"is-disabled":t.disabled||t.groupDisabled||t.limitReached,hover:t.hover},on:{mouseenter:t.hoverItem,click:function(e){return e.stopPropagation(),t.selectOptionClick(e)}}},[t._t("default",[i("span",[t._v(t._s(t.currentLabel))])])],2)};n._withStripped=!0;var o=i(4),r=i.n(o),s=i(3),a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l={mixins:[r.a],name:"ElOption",componentName:"ElOption",inject:["select"],props:{value:{required:!0},label:[String,Number],created:Boolean,disabled:{type:Boolean,default:!1}},data:function(){return{index:-1,groupDisabled:!1,visible:!0,hitState:!1,hover:!1}},computed:{isObject:function(){return"[object object]"===Object.prototype.toString.call(this.value).toLowerCase()},currentLabel:function(){return this.label||(this.isObject?"":this.value)},currentValue:function(){return this.value||this.label||""},itemSelected:function(){return this.select.multiple?this.contains(this.select.value,this.value):this.isEqual(this.value,this.select.value)},limitReached:function(){return!!this.select.multiple&&(!this.itemSelected&&(this.select.value||[]).length>=this.select.multipleLimit&&this.select.multipleLimit>0)}},watch:{currentLabel:function(){this.created||this.select.remote||this.dispatch("ElSelect","setSelected")},value:function(t,e){var i=this.select,n=i.remote,o=i.valueKey;if(!this.created&&!n){if(o&&"object"===(void 0===t?"undefined":a(t))&&"object"===(void 0===e?"undefined":a(e))&&t[o]===e[o])return;this.dispatch("ElSelect","setSelected")}}},methods:{isEqual:function(t,e){if(this.isObject){var i=this.select.valueKey;return Object(s.getValueByPath)(t,i)===Object(s.getValueByPath)(e,i)}return t===e},contains:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments[1];if(this.isObject){var i=this.select.valueKey;return t&&t.some(function(t){return Object(s.getValueByPath)(t,i)===Object(s.getValueByPath)(e,i)})}return t&&t.indexOf(e)>-1},handleGroupDisabled:function(t){this.groupDisabled=t},hoverItem:function(){this.disabled||this.groupDisabled||(this.select.hoverIndex=this.select.options.indexOf(this))},selectOptionClick:function(){!0!==this.disabled&&!0!==this.groupDisabled&&this.dispatch("ElSelect","handleOptionClick",[this,!0])},queryChange:function(t){this.visible=new RegExp(Object(s.escapeRegexpString)(t),"i").test(this.currentLabel)||this.created,this.visible||this.select.filteredOptionsCount--}},created:function(){this.select.options.push(this),this.select.cachedOptions.push(this),this.select.optionsCount++,this.select.filteredOptionsCount++,this.$on("queryChange",this.queryChange),this.$on("handleGroupDisabled",this.handleGroupDisabled)},beforeDestroy:function(){var t=this.select,e=t.selected,i=t.multiple?e:[e],n=this.select.cachedOptions.indexOf(this),o=i.indexOf(this);n>-1&&o<0&&this.select.cachedOptions.splice(n,1),this.select.onOptionDestroy(this.select.options.indexOf(this))}},c=i(0),u=Object(c.a)(l,n,[],!1,null,null,null);u.options.__file="packages/select/src/option.vue";e.a=u.exports},37:function(t,e){t.exports=i("orbS")},4:function(t,e){t.exports=i("fPll")},5:function(t,e){t.exports=i("fKx3")},6:function(t,e){t.exports=i("y+7x")},60:function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:t.handleClose,expression:"handleClose"}],staticClass:"el-select",class:[t.selectSize?"el-select--"+t.selectSize:""],on:{click:function(e){return e.stopPropagation(),t.toggleMenu(e)}}},[t.multiple?i("div",{ref:"tags",staticClass:"el-select__tags",style:{"max-width":t.inputWidth-32+"px",width:"100%"}},[t.collapseTags&&t.selected.length?i("span",[i("el-tag",{attrs:{closable:!t.selectDisabled,size:t.collapseTagSize,hit:t.selected[0].hitState,type:"info","disable-transitions":""},on:{close:function(e){t.deleteTag(e,t.selected[0])}}},[i("span",{staticClass:"el-select__tags-text"},[t._v(t._s(t.selected[0].currentLabel))])]),t.selected.length>1?i("el-tag",{attrs:{closable:!1,size:t.collapseTagSize,type:"info","disable-transitions":""}},[i("span",{staticClass:"el-select__tags-text"},[t._v("+ "+t._s(t.selected.length-1))])]):t._e()],1):t._e(),t.collapseTags?t._e():i("transition-group",{on:{"after-leave":t.resetInputHeight}},t._l(t.selected,function(e){return i("el-tag",{key:t.getValueKey(e),attrs:{closable:!t.selectDisabled,size:t.collapseTagSize,hit:e.hitState,type:"info","disable-transitions":""},on:{close:function(i){t.deleteTag(i,e)}}},[i("span",{staticClass:"el-select__tags-text"},[t._v(t._s(e.currentLabel))])])}),1),t.filterable?i("input",{directives:[{name:"model",rawName:"v-model",value:t.query,expression:"query"}],ref:"input",staticClass:"el-select__input",class:[t.selectSize?"is-"+t.selectSize:""],style:{"flex-grow":"1",width:t.inputLength/(t.inputWidth-32)+"%","max-width":t.inputWidth-42+"px"},attrs:{type:"text",disabled:t.selectDisabled,autocomplete:t.autoComplete||t.autocomplete},domProps:{value:t.query},on:{focus:t.handleFocus,blur:function(e){t.softFocus=!1},keyup:t.managePlaceholder,keydown:[t.resetInputState,function(e){if(!("button"in e)&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"]))return null;e.preventDefault(),t.navigateOptions("next")},function(e){if(!("button"in e)&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"]))return null;e.preventDefault(),t.navigateOptions("prev")},function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?(e.preventDefault(),t.selectOption(e)):null},function(e){if(!("button"in e)&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"]))return null;e.stopPropagation(),e.preventDefault(),t.visible=!1},function(e){return"button"in e||!t._k(e.keyCode,"delete",[8,46],e.key,["Backspace","Delete","Del"])?t.deletePrevTag(e):null},function(e){if(!("button"in e)&&t._k(e.keyCode,"tab",9,e.key,"Tab"))return null;t.visible=!1}],compositionstart:t.handleComposition,compositionupdate:t.handleComposition,compositionend:t.handleComposition,input:[function(e){e.target.composing||(t.query=e.target.value)},t.debouncedQueryChange]}}):t._e()],1):t._e(),i("el-input",{ref:"reference",class:{"is-focus":t.visible},attrs:{type:"text",placeholder:t.currentPlaceholder,name:t.name,id:t.id,autocomplete:t.autoComplete||t.autocomplete,size:t.selectSize,disabled:t.selectDisabled,readonly:t.readonly,"validate-event":!1,tabindex:t.multiple&&t.filterable?"-1":null},on:{focus:t.handleFocus,blur:t.handleBlur},nativeOn:{keyup:function(e){return t.debouncedOnInputChange(e)},keydown:[function(e){if(!("button"in e)&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"]))return null;e.stopPropagation(),e.preventDefault(),t.navigateOptions("next")},function(e){if(!("button"in e)&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"]))return null;e.stopPropagation(),e.preventDefault(),t.navigateOptions("prev")},function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?(e.preventDefault(),t.selectOption(e)):null},function(e){if(!("button"in e)&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"]))return null;e.stopPropagation(),e.preventDefault(),t.visible=!1},function(e){if(!("button"in e)&&t._k(e.keyCode,"tab",9,e.key,"Tab"))return null;t.visible=!1}],paste:function(e){return t.debouncedOnInputChange(e)},mouseenter:function(e){t.inputHovering=!0},mouseleave:function(e){t.inputHovering=!1}},model:{value:t.selectedLabel,callback:function(e){t.selectedLabel=e},expression:"selectedLabel"}},[t.$slots.prefix?i("template",{slot:"prefix"},[t._t("prefix")],2):t._e(),i("template",{slot:"suffix"},[i("i",{directives:[{name:"show",rawName:"v-show",value:!t.showClose,expression:"!showClose"}],class:["el-select__caret","el-input__icon","el-icon-"+t.iconClass]}),t.showClose?i("i",{staticClass:"el-select__caret el-input__icon el-icon-circle-close",on:{click:t.handleClearClick}}):t._e()])],2),i("transition",{attrs:{name:"el-zoom-in-top"},on:{"before-enter":t.handleMenuEnter,"after-leave":t.doDestroy}},[i("el-select-menu",{directives:[{name:"show",rawName:"v-show",value:t.visible&&!1!==t.emptyText,expression:"visible && emptyText !== false"}],ref:"popper",attrs:{"append-to-body":t.popperAppendToBody}},[i("el-scrollbar",{directives:[{name:"show",rawName:"v-show",value:t.options.length>0&&!t.loading,expression:"options.length > 0 && !loading"}],ref:"scrollbar",class:{"is-empty":!t.allowCreate&&t.query&&0===t.filteredOptionsCount},attrs:{tag:"ul","wrap-class":"el-select-dropdown__wrap","view-class":"el-select-dropdown__list"}},[t.showNewOption?i("el-option",{attrs:{value:t.query,created:""}}):t._e(),t._t("default")],2),t.emptyText&&(!t.allowCreate||t.loading||t.allowCreate&&0===t.options.length)?[t.$slots.empty?t._t("empty"):i("p",{staticClass:"el-select-dropdown__empty"},[t._v("\n          "+t._s(t.emptyText)+"\n        ")])]:t._e()],2)],1)],1)};n._withStripped=!0;var o=i(4),r=i.n(o),s=i(22),a=i.n(s),l=i(6),c=i.n(l),u=i(10),h=i.n(u),p=function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"el-select-dropdown el-popper",class:[{"is-multiple":this.$parent.multiple},this.popperClass],style:{minWidth:this.minWidth}},[this._t("default")],2)};p._withStripped=!0;var d=i(5),f={name:"ElSelectDropdown",componentName:"ElSelectDropdown",mixins:[i.n(d).a],props:{placement:{default:"bottom-start"},boundariesPadding:{default:0},popperOptions:{default:function(){return{gpuAcceleration:!1}}},visibleArrow:{default:!0},appendToBody:{type:Boolean,default:!0}},data:function(){return{minWidth:""}},computed:{popperClass:function(){return this.$parent.popperClass}},watch:{"$parent.inputWidth":function(){this.minWidth=this.$parent.$el.getBoundingClientRect().width+"px"}},mounted:function(){var t=this;this.referenceElm=this.$parent.$refs.reference.$el,this.$parent.popperElm=this.popperElm=this.$el,this.$on("updatePopper",function(){t.$parent.visible&&t.updatePopper()}),this.$on("destroyPopper",this.destroyPopper)}},g=i(0),_=Object(g.a)(f,p,[],!1,null,null,null);_.options.__file="packages/select/src/select-dropdown.vue";var m=_.exports,v=i(33),y=i(37),b=i.n(y),T=i(15),E=i.n(T),C=i(17),S=i.n(C),k=i(12),O=i.n(k),I=i(16),w=i(31),R=i.n(w),D=i(3),x=i(21),M={mixins:[r.a,c.a,a()("reference"),{data:function(){return{hoverOption:-1}},computed:{optionsAllDisabled:function(){return this.options.filter(function(t){return t.visible}).every(function(t){return t.disabled})}},watch:{hoverIndex:function(t){var e=this;"number"==typeof t&&t>-1&&(this.hoverOption=this.options[t]||{}),this.options.forEach(function(t){t.hover=e.hoverOption===t})}},methods:{navigateOptions:function(t){var e=this;if(this.visible){if(0!==this.options.length&&0!==this.filteredOptionsCount&&!this.optionsAllDisabled){"next"===t?(this.hoverIndex++,this.hoverIndex===this.options.length&&(this.hoverIndex=0)):"prev"===t&&(this.hoverIndex--,this.hoverIndex<0&&(this.hoverIndex=this.options.length-1));var i=this.options[this.hoverIndex];!0!==i.disabled&&!0!==i.groupDisabled&&i.visible||this.navigateOptions(t),this.$nextTick(function(){return e.scrollToOption(e.hoverOption)})}}else this.visible=!0}}}],name:"ElSelect",componentName:"ElSelect",inject:{elForm:{default:""},elFormItem:{default:""}},provide:function(){return{select:this}},computed:{_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},readonly:function(){return!this.filterable||this.multiple||!Object(D.isIE)()&&!Object(D.isEdge)()&&!this.visible},showClose:function(){var t=this.multiple?Array.isArray(this.value)&&this.value.length>0:void 0!==this.value&&null!==this.value&&""!==this.value;return this.clearable&&!this.selectDisabled&&this.inputHovering&&t},iconClass:function(){return this.remote&&this.filterable?"":this.visible?"arrow-up is-reverse":"arrow-up"},debounce:function(){return this.remote?300:0},emptyText:function(){return this.loading?this.loadingText||this.t("el.select.loading"):(!this.remote||""!==this.query||0!==this.options.length)&&(this.filterable&&this.query&&this.options.length>0&&0===this.filteredOptionsCount?this.noMatchText||this.t("el.select.noMatch"):0===this.options.length?this.noDataText||this.t("el.select.noData"):null)},showNewOption:function(){var t=this,e=this.options.filter(function(t){return!t.created}).some(function(e){return e.currentLabel===t.query});return this.filterable&&this.allowCreate&&""!==this.query&&!e},selectSize:function(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size},selectDisabled:function(){return this.disabled||(this.elForm||{}).disabled},collapseTagSize:function(){return["small","mini"].indexOf(this.selectSize)>-1?"mini":"small"},propPlaceholder:function(){return void 0!==this.placeholder?this.placeholder:this.t("el.select.placeholder")}},components:{ElInput:h.a,ElSelectMenu:m,ElOption:v.a,ElTag:b.a,ElScrollbar:E.a},directives:{Clickoutside:O.a},props:{name:String,id:String,value:{required:!0},autocomplete:{type:String,default:"off"},autoComplete:{type:String,validator:function(t){return!0}},automaticDropdown:Boolean,size:String,disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:String,remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String,required:!1},defaultFirstOption:Boolean,reserveKeyword:Boolean,valueKey:{type:String,default:"value"},collapseTags:Boolean,popperAppendToBody:{type:Boolean,default:!0}},data:function(){return{options:[],cachedOptions:[],createdLabel:null,createdSelected:!1,selected:this.multiple?[]:{},inputLength:20,inputWidth:0,initialInputHeight:0,cachedPlaceHolder:"",optionsCount:0,filteredOptionsCount:0,visible:!1,softFocus:!1,selectedLabel:"",hoverIndex:-1,query:"",previousQuery:null,inputHovering:!1,currentPlaceholder:"",menuVisibleOnFocus:!1,isOnComposition:!1,isSilentBlur:!1}},watch:{selectDisabled:function(){var t=this;this.$nextTick(function(){t.resetInputHeight()})},propPlaceholder:function(t){this.cachedPlaceHolder=this.currentPlaceholder=t},value:function(t,e){this.multiple&&(this.resetInputHeight(),t&&t.length>0||this.$refs.input&&""!==this.query?this.currentPlaceholder="":this.currentPlaceholder=this.cachedPlaceHolder,this.filterable&&!this.reserveKeyword&&(this.query="",this.handleQueryChange(this.query))),this.setSelected(),this.filterable&&!this.multiple&&(this.inputLength=20),Object(D.valueEquals)(t,e)||this.dispatch("ElFormItem","el.form.change",t)},visible:function(t){var e=this;t?(this.broadcast("ElSelectDropdown","updatePopper"),this.filterable&&(this.query=this.remote?"":this.selectedLabel,this.handleQueryChange(this.query),this.multiple?this.$refs.input.focus():(this.remote||(this.broadcast("ElOption","queryChange",""),this.broadcast("ElOptionGroup","queryChange")),this.selectedLabel&&(this.currentPlaceholder=this.selectedLabel,this.selectedLabel="")))):(this.broadcast("ElSelectDropdown","destroyPopper"),this.$refs.input&&this.$refs.input.blur(),this.query="",this.previousQuery=null,this.selectedLabel="",this.inputLength=20,this.menuVisibleOnFocus=!1,this.resetHoverIndex(),this.$nextTick(function(){e.$refs.input&&""===e.$refs.input.value&&0===e.selected.length&&(e.currentPlaceholder=e.cachedPlaceHolder)}),this.multiple||(this.selected&&(this.filterable&&this.allowCreate&&this.createdSelected&&this.createdLabel?this.selectedLabel=this.createdLabel:this.selectedLabel=this.selected.currentLabel,this.filterable&&(this.query=this.selectedLabel)),this.filterable&&(this.currentPlaceholder=this.cachedPlaceHolder))),this.$emit("visible-change",t)},options:function(){var t=this;if(!this.$isServer){this.$nextTick(function(){t.broadcast("ElSelectDropdown","updatePopper")}),this.multiple&&this.resetInputHeight();var e=this.$el.querySelectorAll("input");-1===[].indexOf.call(e,document.activeElement)&&this.setSelected(),this.defaultFirstOption&&(this.filterable||this.remote)&&this.filteredOptionsCount&&this.checkDefaultFirstOption()}}},methods:{handleComposition:function(t){var e=this,i=t.target.value;if("compositionend"===t.type)this.isOnComposition=!1,this.$nextTick(function(t){return e.handleQueryChange(i)});else{var n=i[i.length-1]||"";this.isOnComposition=!Object(x.isKorean)(n)}},handleQueryChange:function(t){var e=this;this.previousQuery===t||this.isOnComposition||(null!==this.previousQuery||"function"!=typeof this.filterMethod&&"function"!=typeof this.remoteMethod?(this.previousQuery=t,this.$nextTick(function(){e.visible&&e.broadcast("ElSelectDropdown","updatePopper")}),this.hoverIndex=-1,this.multiple&&this.filterable&&this.$nextTick(function(){var t=15*e.$refs.input.value.length+20;e.inputLength=e.collapseTags?Math.min(50,t):t,e.managePlaceholder(),e.resetInputHeight()}),this.remote&&"function"==typeof this.remoteMethod?(this.hoverIndex=-1,this.remoteMethod(t)):"function"==typeof this.filterMethod?(this.filterMethod(t),this.broadcast("ElOptionGroup","queryChange")):(this.filteredOptionsCount=this.optionsCount,this.broadcast("ElOption","queryChange",t),this.broadcast("ElOptionGroup","queryChange")),this.defaultFirstOption&&(this.filterable||this.remote)&&this.filteredOptionsCount&&this.checkDefaultFirstOption()):this.previousQuery=t)},scrollToOption:function(t){var e=Array.isArray(t)&&t[0]?t[0].$el:t.$el;if(this.$refs.popper&&e){var i=this.$refs.popper.$el.querySelector(".el-select-dropdown__wrap");R()(i,e)}this.$refs.scrollbar&&this.$refs.scrollbar.handleScroll()},handleMenuEnter:function(){var t=this;this.$nextTick(function(){return t.scrollToOption(t.selected)})},emitChange:function(t){Object(D.valueEquals)(this.value,t)||this.$emit("change",t)},getOption:function(t){for(var e=void 0,i="[object object]"===Object.prototype.toString.call(t).toLowerCase(),n="[object null]"===Object.prototype.toString.call(t).toLowerCase(),o="[object undefined]"===Object.prototype.toString.call(t).toLowerCase(),r=this.cachedOptions.length-1;r>=0;r--){var s=this.cachedOptions[r];if(i?Object(D.getValueByPath)(s.value,this.valueKey)===Object(D.getValueByPath)(t,this.valueKey):s.value===t){e=s;break}}if(e)return e;var a={value:t,currentLabel:i||n||o?"":String(t)};return this.multiple&&(a.hitState=!1),a},setSelected:function(){var t=this;if(!this.multiple){var e=this.getOption(this.value);return e.created?(this.createdLabel=e.currentLabel,this.createdSelected=!0):this.createdSelected=!1,this.selectedLabel=e.currentLabel,this.selected=e,void(this.filterable&&(this.query=this.selectedLabel))}var i=[];Array.isArray(this.value)&&this.value.forEach(function(e){i.push(t.getOption(e))}),this.selected=i,this.$nextTick(function(){t.resetInputHeight()})},handleFocus:function(t){this.softFocus?this.softFocus=!1:((this.automaticDropdown||this.filterable)&&(this.visible=!0,this.filterable&&(this.menuVisibleOnFocus=!0)),this.$emit("focus",t))},blur:function(){this.visible=!1,this.$refs.reference.blur()},handleBlur:function(t){var e=this;setTimeout(function(){e.isSilentBlur?e.isSilentBlur=!1:e.$emit("blur",t)},50),this.softFocus=!1},handleClearClick:function(t){this.deleteSelected(t)},doDestroy:function(){this.$refs.popper&&this.$refs.popper.doDestroy()},handleClose:function(){this.visible=!1},toggleLastOptionHitState:function(t){if(Array.isArray(this.selected)){var e=this.selected[this.selected.length-1];if(e)return!0===t||!1===t?(e.hitState=t,t):(e.hitState=!e.hitState,e.hitState)}},deletePrevTag:function(t){if(t.target.value.length<=0&&!this.toggleLastOptionHitState()){var e=this.value.slice();e.pop(),this.$emit("input",e),this.emitChange(e)}},managePlaceholder:function(){""!==this.currentPlaceholder&&(this.currentPlaceholder=this.$refs.input.value?"":this.cachedPlaceHolder)},resetInputState:function(t){8!==t.keyCode&&this.toggleLastOptionHitState(!1),this.inputLength=15*this.$refs.input.value.length+20,this.resetInputHeight()},resetInputHeight:function(){var t=this;this.collapseTags&&!this.filterable||this.$nextTick(function(){if(t.$refs.reference){var e=t.$refs.reference.$el.childNodes,i=[].filter.call(e,function(t){return"INPUT"===t.tagName})[0],n=t.$refs.tags,o=t.initialInputHeight||40;i.style.height=0===t.selected.length?o+"px":Math.max(n?n.clientHeight+(n.clientHeight>o?6:0):0,o)+"px",t.visible&&!1!==t.emptyText&&t.broadcast("ElSelectDropdown","updatePopper")}})},resetHoverIndex:function(){var t=this;setTimeout(function(){t.multiple?t.selected.length>0?t.hoverIndex=Math.min.apply(null,t.selected.map(function(e){return t.options.indexOf(e)})):t.hoverIndex=-1:t.hoverIndex=t.options.indexOf(t.selected)},300)},handleOptionSelect:function(t,e){var i=this;if(this.multiple){var n=(this.value||[]).slice(),o=this.getValueIndex(n,t.value);o>-1?n.splice(o,1):(this.multipleLimit<=0||n.length<this.multipleLimit)&&n.push(t.value),this.$emit("input",n),this.emitChange(n),t.created&&(this.query="",this.handleQueryChange(""),this.inputLength=20),this.filterable&&this.$refs.input.focus()}else this.$emit("input",t.value),this.emitChange(t.value),this.visible=!1;this.isSilentBlur=e,this.setSoftFocus(),this.visible||this.$nextTick(function(){i.scrollToOption(t)})},setSoftFocus:function(){this.softFocus=!0;var t=this.$refs.input||this.$refs.reference;t&&t.focus()},getValueIndex:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments[1];if("[object object]"===Object.prototype.toString.call(e).toLowerCase()){var i=this.valueKey,n=-1;return t.some(function(t,o){return Object(D.getValueByPath)(t,i)===Object(D.getValueByPath)(e,i)&&(n=o,!0)}),n}return t.indexOf(e)},toggleMenu:function(){this.selectDisabled||(this.menuVisibleOnFocus?this.menuVisibleOnFocus=!1:this.visible=!this.visible,this.visible&&(this.$refs.input||this.$refs.reference).focus())},selectOption:function(){this.visible?this.options[this.hoverIndex]&&this.handleOptionSelect(this.options[this.hoverIndex]):this.toggleMenu()},deleteSelected:function(t){t.stopPropagation();var e=this.multiple?[]:"";this.$emit("input",e),this.emitChange(e),this.visible=!1,this.$emit("clear")},deleteTag:function(t,e){var i=this.selected.indexOf(e);if(i>-1&&!this.selectDisabled){var n=this.value.slice();n.splice(i,1),this.$emit("input",n),this.emitChange(n),this.$emit("remove-tag",e.value)}t.stopPropagation()},onInputChange:function(){this.filterable&&this.query!==this.selectedLabel&&(this.query=this.selectedLabel,this.handleQueryChange(this.query))},onOptionDestroy:function(t){t>-1&&(this.optionsCount--,this.filteredOptionsCount--,this.options.splice(t,1))},resetInputWidth:function(){this.inputWidth=this.$refs.reference.$el.getBoundingClientRect().width},handleResize:function(){this.resetInputWidth(),this.multiple&&this.resetInputHeight()},checkDefaultFirstOption:function(){this.hoverIndex=-1;for(var t=!1,e=this.options.length-1;e>=0;e--)if(this.options[e].created){t=!0,this.hoverIndex=e;break}if(!t)for(var i=0;i!==this.options.length;++i){var n=this.options[i];if(this.query){if(!n.disabled&&!n.groupDisabled&&n.visible){this.hoverIndex=i;break}}else if(n.itemSelected){this.hoverIndex=i;break}}},getValueKey:function(t){return"[object object]"!==Object.prototype.toString.call(t.value).toLowerCase()?t.value:Object(D.getValueByPath)(t.value,this.valueKey)}},created:function(){var t=this;this.cachedPlaceHolder=this.currentPlaceholder=this.propPlaceholder,this.multiple&&!Array.isArray(this.value)&&this.$emit("input",[]),!this.multiple&&Array.isArray(this.value)&&this.$emit("input",""),this.debouncedOnInputChange=S()(this.debounce,function(){t.onInputChange()}),this.debouncedQueryChange=S()(this.debounce,function(e){t.handleQueryChange(e.target.value)}),this.$on("handleOptionClick",this.handleOptionSelect),this.$on("setSelected",this.setSelected)},mounted:function(){var t=this;this.multiple&&Array.isArray(this.value)&&this.value.length>0&&(this.currentPlaceholder=""),Object(I.addResizeListener)(this.$el,this.handleResize);var e=this.$refs.reference;if(e&&e.$el){var i=e.$el.querySelector("input");this.initialInputHeight=i.getBoundingClientRect().height||{medium:36,small:32,mini:28}[this.selectSize]}this.remote&&this.multiple&&this.resetInputHeight(),this.$nextTick(function(){e&&e.$el&&(t.inputWidth=e.$el.getBoundingClientRect().width)}),this.setSelected()},beforeDestroy:function(){this.$el&&this.handleResize&&Object(I.removeResizeListener)(this.$el,this.handleResize)}},A=Object(g.a)(M,n,[],!1,null,null,null);A.options.__file="packages/select/src/select.vue";var N=A.exports;N.install=function(t){t.component(N.name,N)};e.default=N}})},e6n0:function(t,e,i){var n=i("evD5").f,o=i("D2L2"),r=i("dSzd")("toStringTag");t.exports=function(t,e,i){t&&!o(t=i?t:t.prototype,r)&&n(t,r,{configurable:!0,value:e})}},e8AB:function(t,e,i){var n=i("FeBl"),o=i("7KvD"),r=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:n.version,mode:i("O4g8")?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},eNfa:function(t,e,i){"use strict";var n;!function(o){var r={},s=/d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,a="[^\\s]+",l=/\[([^]*?)\]/gm,c=function(){};function u(t,e){for(var i=[],n=0,o=t.length;n<o;n++)i.push(t[n].substr(0,e));return i}function h(t){return function(e,i,n){var o=n[t].indexOf(i.charAt(0).toUpperCase()+i.substr(1).toLowerCase());~o&&(e.month=o)}}function p(t,e){for(t=String(t),e=e||2;t.length<e;)t="0"+t;return t}var d=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],f=["January","February","March","April","May","June","July","August","September","October","November","December"],g=u(f,3),_=u(d,3);r.i18n={dayNamesShort:_,dayNames:d,monthNamesShort:g,monthNames:f,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!=10)*t%10]}};var m={D:function(t){return t.getDay()},DD:function(t){return p(t.getDay())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return t.getDate()},dd:function(t){return p(t.getDate())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return t.getMonth()+1},MM:function(t){return p(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},yy:function(t){return p(String(t.getFullYear()),4).substr(2)},yyyy:function(t){return p(t.getFullYear(),4)},h:function(t){return t.getHours()%12||12},hh:function(t){return p(t.getHours()%12||12)},H:function(t){return t.getHours()},HH:function(t){return p(t.getHours())},m:function(t){return t.getMinutes()},mm:function(t){return p(t.getMinutes())},s:function(t){return t.getSeconds()},ss:function(t){return p(t.getSeconds())},S:function(t){return Math.round(t.getMilliseconds()/100)},SS:function(t){return p(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return p(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return t.getHours()<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+p(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)}},v={d:["\\d\\d?",function(t,e){t.day=e}],Do:["\\d\\d?"+a,function(t,e){t.day=parseInt(e,10)}],M:["\\d\\d?",function(t,e){t.month=e-1}],yy:["\\d\\d?",function(t,e){var i=+(""+(new Date).getFullYear()).substr(0,2);t.year=""+(e>68?i-1:i)+e}],h:["\\d\\d?",function(t,e){t.hour=e}],m:["\\d\\d?",function(t,e){t.minute=e}],s:["\\d\\d?",function(t,e){t.second=e}],yyyy:["\\d{4}",function(t,e){t.year=e}],S:["\\d",function(t,e){t.millisecond=100*e}],SS:["\\d{2}",function(t,e){t.millisecond=10*e}],SSS:["\\d{3}",function(t,e){t.millisecond=e}],D:["\\d\\d?",c],ddd:[a,c],MMM:[a,h("monthNamesShort")],MMMM:[a,h("monthNames")],a:[a,function(t,e,i){var n=e.toLowerCase();n===i.amPm[0]?t.isPm=!1:n===i.amPm[1]&&(t.isPm=!0)}],ZZ:["[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z",function(t,e){var i,n=(e+"").match(/([+-]|\d\d)/gi);n&&(i=60*n[1]+parseInt(n[2],10),t.timezoneOffset="+"===n[0]?i:-i)}]};v.dd=v.d,v.dddd=v.ddd,v.DD=v.D,v.mm=v.m,v.hh=v.H=v.HH=v.h,v.MM=v.M,v.ss=v.s,v.A=v.a,r.masks={default:"ddd MMM dd yyyy HH:mm:ss",shortDate:"M/D/yy",mediumDate:"MMM d, yyyy",longDate:"MMMM d, yyyy",fullDate:"dddd, MMMM d, yyyy",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},r.format=function(t,e,i){var n=i||r.i18n;if("number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date in fecha.format");var o=[];return(e=(e=(e=r.masks[e]||e||r.masks.default).replace(l,function(t,e){return o.push(e),"@@@"})).replace(s,function(e){return e in m?m[e](t,n):e.slice(1,e.length-1)})).replace(/@@@/g,function(){return o.shift()})},r.parse=function(t,e,i){var n=i||r.i18n;if("string"!=typeof e)throw new Error("Invalid format in fecha.parse");if(e=r.masks[e]||e,t.length>1e3)return null;var o={},a=[],c=[];e=e.replace(l,function(t,e){return c.push(e),"@@@"});var u,h=(u=e,u.replace(/[|\\{()[^$+*?.-]/g,"\\$&")).replace(s,function(t){if(v[t]){var e=v[t];return a.push(e[1]),"("+e[0]+")"}return t});h=h.replace(/@@@/g,function(){return c.shift()});var p=t.match(new RegExp(h,"i"));if(!p)return null;for(var d=1;d<p.length;d++)a[d-1](o,p[d],n);var f,g=new Date;return!0===o.isPm&&null!=o.hour&&12!=+o.hour?o.hour=+o.hour+12:!1===o.isPm&&12==+o.hour&&(o.hour=0),null!=o.timezoneOffset?(o.minute=+(o.minute||0)-+o.timezoneOffset,f=new Date(Date.UTC(o.year||g.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0))):f=new Date(o.year||g.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0),f},void 0!==t&&t.exports?t.exports=r:void 0===(n=function(){return r}.call(e,i,e,t))||(t.exports=n)}()},evD5:function(t,e,i){var n=i("77Pl"),o=i("SfB7"),r=i("MmMw"),s=Object.defineProperty;e.f=i("+E39")?Object.defineProperty:function(t,e,i){if(n(t),e=r(e,!0),n(i),o)try{return s(t,e,i)}catch(t){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(t[e]=i.value),t}},exGp:function(t,e,i){"use strict";e.__esModule=!0;var n,o=i("//Fk"),r=(n=o)&&n.__esModule?n:{default:n};e.default=function(t){return function(){var e=t.apply(this,arguments);return new r.default(function(t,i){return function n(o,s){try{var a=e[o](s),l=a.value}catch(t){return void i(t)}if(!a.done)return r.default.resolve(l).then(function(t){n("next",t)},function(t){n("throw",t)});t(l)}("next")})}}},"fEB+":function(t,e,i){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist/",i(i.s=131)}({131:function(t,e,i){"use strict";i.r(e);var n=i(16),o=i(38),r=i.n(o),s=i(3),a=i(2),l={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}};var c={name:"Bar",props:{vertical:Boolean,size:String,move:Number},computed:{bar:function(){return l[this.vertical?"vertical":"horizontal"]},wrap:function(){return this.$parent.wrap}},render:function(t){var e=this.size,i=this.move,n=this.bar;return t("div",{class:["el-scrollbar__bar","is-"+n.key],on:{mousedown:this.clickTrackHandler}},[t("div",{ref:"thumb",class:"el-scrollbar__thumb",on:{mousedown:this.clickThumbHandler},style:function(t){var e=t.move,i=t.size,n=t.bar,o={},r="translate"+n.axis+"("+e+"%)";return o[n.size]=i,o.transform=r,o.msTransform=r,o.webkitTransform=r,o}({size:e,move:i,bar:n})})])},methods:{clickThumbHandler:function(t){t.ctrlKey||2===t.button||(this.startDrag(t),this[this.bar.axis]=t.currentTarget[this.bar.offset]-(t[this.bar.client]-t.currentTarget.getBoundingClientRect()[this.bar.direction]))},clickTrackHandler:function(t){var e=100*(Math.abs(t.target.getBoundingClientRect()[this.bar.direction]-t[this.bar.client])-this.$refs.thumb[this.bar.offset]/2)/this.$el[this.bar.offset];this.wrap[this.bar.scroll]=e*this.wrap[this.bar.scrollSize]/100},startDrag:function(t){t.stopImmediatePropagation(),this.cursorDown=!0,Object(a.on)(document,"mousemove",this.mouseMoveDocumentHandler),Object(a.on)(document,"mouseup",this.mouseUpDocumentHandler),document.onselectstart=function(){return!1}},mouseMoveDocumentHandler:function(t){if(!1!==this.cursorDown){var e=this[this.bar.axis];if(e){var i=100*(-1*(this.$el.getBoundingClientRect()[this.bar.direction]-t[this.bar.client])-(this.$refs.thumb[this.bar.offset]-e))/this.$el[this.bar.offset];this.wrap[this.bar.scroll]=i*this.wrap[this.bar.scrollSize]/100}}},mouseUpDocumentHandler:function(t){this.cursorDown=!1,this[this.bar.axis]=0,Object(a.off)(document,"mousemove",this.mouseMoveDocumentHandler),document.onselectstart=null}},destroyed:function(){Object(a.off)(document,"mouseup",this.mouseUpDocumentHandler)}},u={name:"ElScrollbar",components:{Bar:c},props:{native:Boolean,wrapStyle:{},wrapClass:{},viewClass:{},viewStyle:{},noresize:Boolean,tag:{type:String,default:"div"}},data:function(){return{sizeWidth:"0",sizeHeight:"0",moveX:0,moveY:0}},computed:{wrap:function(){return this.$refs.wrap}},render:function(t){var e=r()(),i=this.wrapStyle;if(e){var n="-"+e+"px",o="margin-bottom: "+n+"; margin-right: "+n+";";Array.isArray(this.wrapStyle)?(i=Object(s.toObject)(this.wrapStyle)).marginRight=i.marginBottom=n:"string"==typeof this.wrapStyle?i+=o:i=o}var a=t(this.tag,{class:["el-scrollbar__view",this.viewClass],style:this.viewStyle,ref:"resize"},this.$slots.default),l=t("div",{ref:"wrap",style:i,on:{scroll:this.handleScroll},class:[this.wrapClass,"el-scrollbar__wrap",e?"":"el-scrollbar__wrap--hidden-default"]},[[a]]);return t("div",{class:"el-scrollbar"},this.native?[t("div",{ref:"wrap",class:[this.wrapClass,"el-scrollbar__wrap"],style:i},[[a]])]:[l,t(c,{attrs:{move:this.moveX,size:this.sizeWidth}}),t(c,{attrs:{vertical:!0,move:this.moveY,size:this.sizeHeight}})])},methods:{handleScroll:function(){var t=this.wrap;this.moveY=100*t.scrollTop/t.clientHeight,this.moveX=100*t.scrollLeft/t.clientWidth},update:function(){var t,e,i=this.wrap;i&&(t=100*i.clientHeight/i.scrollHeight,e=100*i.clientWidth/i.scrollWidth,this.sizeHeight=t<100?t+"%":"",this.sizeWidth=e<100?e+"%":"")}},mounted:function(){this.native||(this.$nextTick(this.update),!this.noresize&&Object(n.addResizeListener)(this.$refs.resize,this.update))},beforeDestroy:function(){this.native||!this.noresize&&Object(n.removeResizeListener)(this.$refs.resize,this.update)},install:function(t){t.component(u.name,u)}};e.default=u},16:function(t,e){t.exports=i("02w1")},2:function(t,e){t.exports=i("2kvA")},3:function(t,e){t.exports=i("ylDJ")},38:function(t,e){t.exports=i("6Twh")}})},fJUb:function(t,e,i){var n=i("77Pl"),o=i("EqjI"),r=i("qARP");t.exports=function(t,e){if(n(t),o(e)&&e.constructor===t)return e;var i=r.f(t);return(0,i.resolve)(e),i.promise}},fKx3:function(t,e,i){"use strict";e.__esModule=!0;var n,o=i("7+uW"),r=(n=o)&&n.__esModule?n:{default:n},s=i("7J9s");var a=r.default.prototype.$isServer?function(){}:i("NMof"),l=function(t){return t.stopPropagation()};e.default={props:{transformOrigin:{type:[Boolean,String],default:!0},placement:{type:String,default:"bottom"},boundariesPadding:{type:Number,default:5},reference:{},popper:{},offset:{default:0},value:Boolean,visibleArrow:Boolean,arrowOffset:{type:Number,default:35},appendToBody:{type:Boolean,default:!0},popperOptions:{type:Object,default:function(){return{gpuAcceleration:!1}}}},data:function(){return{showPopper:!1,currentPlacement:""}},watch:{value:{immediate:!0,handler:function(t){this.showPopper=t,this.$emit("input",t)}},showPopper:function(t){this.disabled||(t?this.updatePopper():this.destroyPopper(),this.$emit("input",t))}},methods:{createPopper:function(){var t=this;if(!this.$isServer&&(this.currentPlacement=this.currentPlacement||this.placement,/^(top|bottom|left|right)(-start|-end)?$/g.test(this.currentPlacement))){var e=this.popperOptions,i=this.popperElm=this.popperElm||this.popper||this.$refs.popper,n=this.referenceElm=this.referenceElm||this.reference||this.$refs.reference;!n&&this.$slots.reference&&this.$slots.reference[0]&&(n=this.referenceElm=this.$slots.reference[0].elm),i&&n&&(this.visibleArrow&&this.appendArrow(i),this.appendToBody&&document.body.appendChild(this.popperElm),this.popperJS&&this.popperJS.destroy&&this.popperJS.destroy(),e.placement=this.currentPlacement,e.offset=this.offset,e.arrowOffset=this.arrowOffset,this.popperJS=new a(n,i,e),this.popperJS.onCreate(function(e){t.$emit("created",t),t.resetTransformOrigin(),t.$nextTick(t.updatePopper)}),"function"==typeof e.onUpdate&&this.popperJS.onUpdate(e.onUpdate),this.popperJS._popper.style.zIndex=s.PopupManager.nextZIndex(),this.popperElm.addEventListener("click",l))}},updatePopper:function(){var t=this.popperJS;t?(t.update(),t._popper&&(t._popper.style.zIndex=s.PopupManager.nextZIndex())):this.createPopper()},doDestroy:function(t){!this.popperJS||this.showPopper&&!t||(this.popperJS.destroy(),this.popperJS=null)},destroyPopper:function(){this.popperJS&&this.resetTransformOrigin()},resetTransformOrigin:function(){if(this.transformOrigin){var t=this.popperJS._popper.getAttribute("x-placement").split("-")[0],e={top:"bottom",bottom:"top",left:"right",right:"left"}[t];this.popperJS._popper.style.transformOrigin="string"==typeof this.transformOrigin?this.transformOrigin:["top","bottom"].indexOf(t)>-1?"center "+e:e+" center"}},appendArrow:function(t){var e=void 0;if(!this.appended){for(var i in this.appended=!0,t.attributes)if(/^_v-/.test(t.attributes[i].name)){e=t.attributes[i].name;break}var n=document.createElement("div");e&&n.setAttribute(e,""),n.setAttribute("x-arrow",""),n.className="popper__arrow",t.appendChild(n)}}},beforeDestroy:function(){this.doDestroy(!0),this.popperElm&&this.popperElm.parentNode===document.body&&(this.popperElm.removeEventListener("click",l),document.body.removeChild(this.popperElm))},deactivated:function(){this.$options.beforeDestroy[0].call(this)}}},fPll:function(t,e,i){"use strict";e.__esModule=!0,e.default={methods:{dispatch:function(t,e,i){for(var n=this.$parent||this.$root,o=n.$options.componentName;n&&(!o||o!==t);)(n=n.$parent)&&(o=n.$options.componentName);n&&n.$emit.apply(n,[e].concat(i))},broadcast:function(t,e,i){(function t(e,i,n){this.$children.forEach(function(o){o.$options.componentName===e?o.$emit.apply(o,[i].concat(n)):t.apply(o,[e,i].concat([n]))})}).call(this,t,e,i)}}}},fUqW:function(t,e,i){"use strict";e.__esModule=!0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.isVNode=function(t){return null!==t&&"object"===(void 0===t?"undefined":n(t))&&(0,o.hasOwn)(t,"componentOptions")};var o=i("ylDJ")},fWfb:function(t,e,i){"use strict";var n=i("7KvD"),o=i("D2L2"),r=i("+E39"),s=i("kM2E"),a=i("880/"),l=i("06OY").KEY,c=i("S82l"),u=i("e8AB"),h=i("e6n0"),p=i("3Eo+"),d=i("dSzd"),f=i("Kh4W"),g=i("crlp"),_=i("Xc4G"),m=i("7UMu"),v=i("77Pl"),y=i("EqjI"),b=i("sB3e"),T=i("TcQ7"),E=i("MmMw"),C=i("X8DO"),S=i("Yobk"),k=i("Rrel"),O=i("LKZe"),I=i("1kS7"),w=i("evD5"),R=i("lktj"),D=O.f,x=w.f,M=k.f,A=n.Symbol,N=n.JSON,L=N&&N.stringify,P=d("_hidden"),B=d("toPrimitive"),F={}.propertyIsEnumerable,H=u("symbol-registry"),U=u("symbols"),V=u("op-symbols"),G=Object.prototype,W="function"==typeof A&&!!I.f,$=n.QObject,j=!$||!$.prototype||!$.prototype.findChild,z=r&&c(function(){return 7!=S(x({},"a",{get:function(){return x(this,"a",{value:7}).a}})).a})?function(t,e,i){var n=D(G,e);n&&delete G[e],x(t,e,i),n&&t!==G&&x(G,e,n)}:x,X=function(t){var e=U[t]=S(A.prototype);return e._k=t,e},Y=W&&"symbol"==typeof A.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof A},K=function(t,e,i){return t===G&&K(V,e,i),v(t),e=E(e,!0),v(i),o(U,e)?(i.enumerable?(o(t,P)&&t[P][e]&&(t[P][e]=!1),i=S(i,{enumerable:C(0,!1)})):(o(t,P)||x(t,P,C(1,{})),t[P][e]=!0),z(t,e,i)):x(t,e,i)},J=function(t,e){v(t);for(var i,n=_(e=T(e)),o=0,r=n.length;r>o;)K(t,i=n[o++],e[i]);return t},q=function(t){var e=F.call(this,t=E(t,!0));return!(this===G&&o(U,t)&&!o(V,t))&&(!(e||!o(this,t)||!o(U,t)||o(this,P)&&this[P][t])||e)},Z=function(t,e){if(t=T(t),e=E(e,!0),t!==G||!o(U,e)||o(V,e)){var i=D(t,e);return!i||!o(U,e)||o(t,P)&&t[P][e]||(i.enumerable=!0),i}},Q=function(t){for(var e,i=M(T(t)),n=[],r=0;i.length>r;)o(U,e=i[r++])||e==P||e==l||n.push(e);return n},tt=function(t){for(var e,i=t===G,n=M(i?V:T(t)),r=[],s=0;n.length>s;)!o(U,e=n[s++])||i&&!o(G,e)||r.push(U[e]);return r};W||(a((A=function(){if(this instanceof A)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(i){this===G&&e.call(V,i),o(this,P)&&o(this[P],t)&&(this[P][t]=!1),z(this,t,C(1,i))};return r&&j&&z(G,t,{configurable:!0,set:e}),X(t)}).prototype,"toString",function(){return this._k}),O.f=Z,w.f=K,i("n0T6").f=k.f=Q,i("NpIQ").f=q,I.f=tt,r&&!i("O4g8")&&a(G,"propertyIsEnumerable",q,!0),f.f=function(t){return X(d(t))}),s(s.G+s.W+s.F*!W,{Symbol:A});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),it=0;et.length>it;)d(et[it++]);for(var nt=R(d.store),ot=0;nt.length>ot;)g(nt[ot++]);s(s.S+s.F*!W,"Symbol",{for:function(t){return o(H,t+="")?H[t]:H[t]=A(t)},keyFor:function(t){if(!Y(t))throw TypeError(t+" is not a symbol!");for(var e in H)if(H[e]===t)return e},useSetter:function(){j=!0},useSimple:function(){j=!1}}),s(s.S+s.F*!W,"Object",{create:function(t,e){return void 0===e?S(t):J(S(t),e)},defineProperty:K,defineProperties:J,getOwnPropertyDescriptor:Z,getOwnPropertyNames:Q,getOwnPropertySymbols:tt});var rt=c(function(){I.f(1)});s(s.S+s.F*rt,"Object",{getOwnPropertySymbols:function(t){return I.f(b(t))}}),N&&s(s.S+s.F*(!W||c(function(){var t=A();return"[null]"!=L([t])||"{}"!=L({a:t})||"{}"!=L(Object(t))})),"JSON",{stringify:function(t){for(var e,i,n=[t],o=1;arguments.length>o;)n.push(arguments[o++]);if(i=e=n[1],(y(e)||void 0!==t)&&!Y(t))return m(e)||(e=function(t,e){if("function"==typeof i&&(e=i.call(this,t,e)),!Y(e))return e}),n[1]=e,L.apply(N,n)}}),A.prototype[B]||i("hJx8")(A.prototype,B,A.prototype.valueOf),h(A,"Symbol"),h(Math,"Math",!0),h(n.JSON,"JSON",!0)},fZjL:function(t,e,i){t.exports={default:i("jFbC"),__esModule:!0}},fkB2:function(t,e,i){var n=i("UuGF"),o=Math.max,r=Math.min;t.exports=function(t,e){return(t=n(t))<0?o(t+e,0):r(t,e)}},fuGk:function(t,e,i){"use strict";var n=i("cGG2");function o(){this.handlers=[]}o.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},o.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},o.prototype.forEach=function(t){n.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=o},fxRn:function(t,e,i){i("+tPU"),i("zQR9"),t.exports=i("g8Ux")},g8Ux:function(t,e,i){var n=i("77Pl"),o=i("3fs2");t.exports=i("FeBl").getIterator=function(t){var e=o(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return n(e.call(t))}},h65t:function(t,e,i){var n=i("UuGF"),o=i("52gC");t.exports=function(t){return function(e,i){var r,s,a=String(o(e)),l=n(i),c=a.length;return l<0||l>=c?t?"":void 0:(r=a.charCodeAt(l))<55296||r>56319||l+1===c||(s=a.charCodeAt(l+1))<56320||s>57343?t?a.charAt(l):r:t?a.slice(l,l+2):s-56320+(r-55296<<10)+65536}}},hJx8:function(t,e,i){var n=i("evD5"),o=i("X8DO");t.exports=i("+E39")?function(t,e,i){return n.f(t,e,o(1,i))}:function(t,e,i){return t[e]=i,t}},hyEB:function(t,e,i){"use strict";e.__esModule=!0;var n=n||{};n.Utils=n.Utils||{},n.Utils.focusFirstDescendant=function(t){for(var e=0;e<t.childNodes.length;e++){var i=t.childNodes[e];if(n.Utils.attemptFocus(i)||n.Utils.focusFirstDescendant(i))return!0}return!1},n.Utils.focusLastDescendant=function(t){for(var e=t.childNodes.length-1;e>=0;e--){var i=t.childNodes[e];if(n.Utils.attemptFocus(i)||n.Utils.focusLastDescendant(i))return!0}return!1},n.Utils.attemptFocus=function(t){if(!n.Utils.isFocusable(t))return!1;n.Utils.IgnoreUtilFocusChanges=!0;try{t.focus()}catch(t){}return n.Utils.IgnoreUtilFocusChanges=!1,document.activeElement===t},n.Utils.isFocusable=function(t){if(t.tabIndex>0||0===t.tabIndex&&null!==t.getAttribute("tabIndex"))return!0;if(t.disabled)return!1;switch(t.nodeName){case"A":return!!t.href&&"ignore"!==t.rel;case"INPUT":return"hidden"!==t.type&&"file"!==t.type;case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},n.Utils.triggerEvent=function(t,e){var i=void 0;i=/^mouse|click/.test(e)?"MouseEvents":/^key/.test(e)?"KeyboardEvent":"HTMLEvents";for(var n=document.createEvent(i),o=arguments.length,r=Array(o>2?o-2:0),s=2;s<o;s++)r[s-2]=arguments[s];return n.initEvent.apply(n,[e].concat(r)),t.dispatchEvent?t.dispatchEvent(n):t.fireEvent("on"+e,n),t},n.Utils.keys={tab:9,enter:13,space:32,left:37,up:38,right:39,down:40,esc:27},e.default=n.Utils},i3rX:function(t,e,i){"use strict";var n=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||function(t){return t.$$typeof===o}(t)}(t)};var o="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(t,e){var i;return e&&!0===e.clone&&n(t)?a((i=t,Array.isArray(i)?[]:{}),t,e):t}function s(t,e,i){var o=t.slice();return e.forEach(function(e,s){void 0===o[s]?o[s]=r(e,i):n(e)?o[s]=a(t[s],e,i):-1===t.indexOf(e)&&o.push(r(e,i))}),o}function a(t,e,i){var o=Array.isArray(e);return o===Array.isArray(t)?o?((i||{arrayMerge:s}).arrayMerge||s)(t,e,i):function(t,e,i){var o={};return n(t)&&Object.keys(t).forEach(function(e){o[e]=r(t[e],i)}),Object.keys(e).forEach(function(s){n(e[s])&&t[s]?o[s]=a(t[s],e[s],i):o[s]=r(e[s],i)}),o}(t,e,i):r(e,i)}a.all=function(t,e){if(!Array.isArray(t)||t.length<2)throw new Error("first argument should be an array with at least two elements");return t.reduce(function(t,i){return a(t,i,e)})};var l=a;t.exports=l},iUbK:function(t,e,i){var n=i("7KvD").navigator;t.exports=n&&n.userAgent||""},jFbC:function(t,e,i){i("Cdx3"),t.exports=i("FeBl").Object.keys},"jKW+":function(t,e,i){"use strict";var n=i("kM2E"),o=i("qARP"),r=i("dNDb");n(n.S,"Promise",{try:function(t){var e=o.f(this),i=r(t);return(i.e?e.reject:e.resolve)(i.v),e.promise}})},jmaC:function(t,e,i){"use strict";e.__esModule=!0,e.default=function(t){for(var e=1,i=arguments.length;e<i;e++){var n=arguments[e]||{};for(var o in n)if(n.hasOwnProperty(o)){var r=n[o];void 0!==r&&(t[o]=r)}}return t}},jwfv:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("Dd8w"),o=i.n(n),r=i("pFYg"),s=i.n(r),a=/%[sdj%]/g,l=function(){};function c(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];var n=1,o=e[0],r=e.length;if("function"==typeof o)return o.apply(null,e.slice(1));if("string"==typeof o){for(var s=String(o).replace(a,function(t){if("%%"===t)return"%";if(n>=r)return t;switch(t){case"%s":return String(e[n++]);case"%d":return Number(e[n++]);case"%j":try{return JSON.stringify(e[n++])}catch(t){return"[Circular]"}break;default:return t}}),l=e[n];n<r;l=e[++n])s+=" "+l;return s}return o}function u(t,e){return void 0===t||null===t||(!("array"!==e||!Array.isArray(t)||t.length)||!(!function(t){return"string"===t||"url"===t||"hex"===t||"email"===t||"pattern"===t}(e)||"string"!=typeof t||t))}function h(t,e,i){var n=0,o=t.length;!function r(s){if(s&&s.length)i(s);else{var a=n;n+=1,a<o?e(t[a],r):i([])}}([])}function p(t,e,i,n){if(e.first)return h(function(t){var e=[];return Object.keys(t).forEach(function(i){e.push.apply(e,t[i])}),e}(t),i,n);var o=e.firstFields||[];!0===o&&(o=Object.keys(t));var r=Object.keys(t),s=r.length,a=0,l=[],c=function(t){l.push.apply(l,t),++a===s&&n(l)};r.forEach(function(e){var n=t[e];-1!==o.indexOf(e)?h(n,i,c):function(t,e,i){var n=[],o=0,r=t.length;function s(t){n.push.apply(n,t),++o===r&&i(n)}t.forEach(function(t){e(t,s)})}(n,i,c)})}function d(t){return function(e){return e&&e.message?(e.field=e.field||t.fullField,e):{message:e,field:e.field||t.fullField}}}function f(t,e){if(e)for(var i in e)if(e.hasOwnProperty(i)){var n=e[i];"object"===(void 0===n?"undefined":s()(n))&&"object"===s()(t[i])?t[i]=o()({},t[i],n):t[i]=n}return t}var g=function(t,e,i,n,o,r){!t.required||i.hasOwnProperty(t.field)&&!u(e,r||t.type)||n.push(c(o.messages.required,t.fullField))};var _=function(t,e,i,n,o){(/^\s+$/.test(e)||""===e)&&n.push(c(o.messages.whitespace,t.fullField))},m={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},v={integer:function(t){return v.number(t)&&parseInt(t,10)===t},float:function(t){return v.number(t)&&!v.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch(t){return!1}},date:function(t){return"function"==typeof t.getTime&&"function"==typeof t.getMonth&&"function"==typeof t.getYear},number:function(t){return!isNaN(t)&&"number"==typeof t},object:function(t){return"object"===(void 0===t?"undefined":s()(t))&&!v.array(t)},method:function(t){return"function"==typeof t},email:function(t){return"string"==typeof t&&!!t.match(m.email)&&t.length<255},url:function(t){return"string"==typeof t&&!!t.match(m.url)},hex:function(t){return"string"==typeof t&&!!t.match(m.hex)}};var y="enum";var b={required:g,whitespace:_,type:function(t,e,i,n,o){if(t.required&&void 0===e)g(t,e,i,n,o);else{var r=t.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(r)>-1?v[r](e)||n.push(c(o.messages.types[r],t.fullField,t.type)):r&&(void 0===e?"undefined":s()(e))!==t.type&&n.push(c(o.messages.types[r],t.fullField,t.type))}},range:function(t,e,i,n,o){var r="number"==typeof t.len,s="number"==typeof t.min,a="number"==typeof t.max,l=e,u=null,h="number"==typeof e,p="string"==typeof e,d=Array.isArray(e);if(h?u="number":p?u="string":d&&(u="array"),!u)return!1;d&&(l=e.length),p&&(l=e.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),r?l!==t.len&&n.push(c(o.messages[u].len,t.fullField,t.len)):s&&!a&&l<t.min?n.push(c(o.messages[u].min,t.fullField,t.min)):a&&!s&&l>t.max?n.push(c(o.messages[u].max,t.fullField,t.max)):s&&a&&(l<t.min||l>t.max)&&n.push(c(o.messages[u].range,t.fullField,t.min,t.max))},enum:function(t,e,i,n,o){t[y]=Array.isArray(t[y])?t[y]:[],-1===t[y].indexOf(e)&&n.push(c(o.messages[y],t.fullField,t[y].join(", ")))},pattern:function(t,e,i,n,o){t.pattern&&(t.pattern instanceof RegExp?(t.pattern.lastIndex=0,t.pattern.test(e)||n.push(c(o.messages.pattern.mismatch,t.fullField,e,t.pattern))):"string"==typeof t.pattern&&(new RegExp(t.pattern).test(e)||n.push(c(o.messages.pattern.mismatch,t.fullField,e,t.pattern))))}};var T="enum";var E=function(t,e,i,n,o){var r=t.type,s=[];if(t.required||!t.required&&n.hasOwnProperty(t.field)){if(u(e,r)&&!t.required)return i();b.required(t,e,n,s,o,r),u(e,r)||b.type(t,e,n,s,o)}i(s)},C={string:function(t,e,i,n,o){var r=[];if(t.required||!t.required&&n.hasOwnProperty(t.field)){if(u(e,"string")&&!t.required)return i();b.required(t,e,n,r,o,"string"),u(e,"string")||(b.type(t,e,n,r,o),b.range(t,e,n,r,o),b.pattern(t,e,n,r,o),!0===t.whitespace&&b.whitespace(t,e,n,r,o))}i(r)},method:function(t,e,i,n,o){var r=[];if(t.required||!t.required&&n.hasOwnProperty(t.field)){if(u(e)&&!t.required)return i();b.required(t,e,n,r,o),void 0!==e&&b.type(t,e,n,r,o)}i(r)},number:function(t,e,i,n,o){var r=[];if(t.required||!t.required&&n.hasOwnProperty(t.field)){if(u(e)&&!t.required)return i();b.required(t,e,n,r,o),void 0!==e&&(b.type(t,e,n,r,o),b.range(t,e,n,r,o))}i(r)},boolean:function(t,e,i,n,o){var r=[];if(t.required||!t.required&&n.hasOwnProperty(t.field)){if(u(e)&&!t.required)return i();b.required(t,e,n,r,o),void 0!==e&&b.type(t,e,n,r,o)}i(r)},regexp:function(t,e,i,n,o){var r=[];if(t.required||!t.required&&n.hasOwnProperty(t.field)){if(u(e)&&!t.required)return i();b.required(t,e,n,r,o),u(e)||b.type(t,e,n,r,o)}i(r)},integer:function(t,e,i,n,o){var r=[];if(t.required||!t.required&&n.hasOwnProperty(t.field)){if(u(e)&&!t.required)return i();b.required(t,e,n,r,o),void 0!==e&&(b.type(t,e,n,r,o),b.range(t,e,n,r,o))}i(r)},float:function(t,e,i,n,o){var r=[];if(t.required||!t.required&&n.hasOwnProperty(t.field)){if(u(e)&&!t.required)return i();b.required(t,e,n,r,o),void 0!==e&&(b.type(t,e,n,r,o),b.range(t,e,n,r,o))}i(r)},array:function(t,e,i,n,o){var r=[];if(t.required||!t.required&&n.hasOwnProperty(t.field)){if(u(e,"array")&&!t.required)return i();b.required(t,e,n,r,o,"array"),u(e,"array")||(b.type(t,e,n,r,o),b.range(t,e,n,r,o))}i(r)},object:function(t,e,i,n,o){var r=[];if(t.required||!t.required&&n.hasOwnProperty(t.field)){if(u(e)&&!t.required)return i();b.required(t,e,n,r,o),void 0!==e&&b.type(t,e,n,r,o)}i(r)},enum:function(t,e,i,n,o){var r=[];if(t.required||!t.required&&n.hasOwnProperty(t.field)){if(u(e)&&!t.required)return i();b.required(t,e,n,r,o),e&&b[T](t,e,n,r,o)}i(r)},pattern:function(t,e,i,n,o){var r=[];if(t.required||!t.required&&n.hasOwnProperty(t.field)){if(u(e,"string")&&!t.required)return i();b.required(t,e,n,r,o),u(e,"string")||b.pattern(t,e,n,r,o)}i(r)},date:function(t,e,i,n,o){var r=[];if(t.required||!t.required&&n.hasOwnProperty(t.field)){if(u(e)&&!t.required)return i();if(b.required(t,e,n,r,o),!u(e)){var s=void 0;s="number"==typeof e?new Date(e):e,b.type(t,s,n,r,o),s&&b.range(t,s.getTime(),n,r,o)}}i(r)},url:E,hex:E,email:E,required:function(t,e,i,n,o){var r=[],a=Array.isArray(e)?"array":void 0===e?"undefined":s()(e);b.required(t,e,n,r,o,a),i(r)}};function S(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var k=S();function O(t){this.rules=null,this._messages=k,this.define(t)}O.prototype={messages:function(t){return t&&(this._messages=f(S(),t)),this._messages},define:function(t){if(!t)throw new Error("Cannot configure a schema with no rules");if("object"!==(void 0===t?"undefined":s()(t))||Array.isArray(t))throw new Error("Rules must be an object");this.rules={};var e=void 0,i=void 0;for(e in t)t.hasOwnProperty(e)&&(i=t[e],this.rules[e]=Array.isArray(i)?i:[i])},validate:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2],r=t,a=i,u=n;if("function"==typeof a&&(u=a,a={}),this.rules&&0!==Object.keys(this.rules).length){if(a.messages){var h=this.messages();h===k&&(h=S()),f(h,a.messages),a.messages=h}else a.messages=this.messages();var g=void 0,_=void 0,m={};(a.keys||Object.keys(this.rules)).forEach(function(i){g=e.rules[i],_=r[i],g.forEach(function(n){var s=n;"function"==typeof s.transform&&(r===t&&(r=o()({},r)),_=r[i]=s.transform(_)),(s="function"==typeof s?{validator:s}:o()({},s)).validator=e.getValidationMethod(s),s.field=i,s.fullField=s.fullField||i,s.type=e.getType(s),s.validator&&(m[i]=m[i]||[],m[i].push({rule:s,value:_,source:r,field:i}))})});var v={};p(m,a,function(t,e){var i=t.rule,n=!("object"!==i.type&&"array"!==i.type||"object"!==s()(i.fields)&&"object"!==s()(i.defaultField));function r(t,e){return o()({},e,{fullField:i.fullField+"."+t})}function u(){var s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(Array.isArray(s)||(s=[s]),s.length&&l("async-validator:",s),s.length&&i.message&&(s=[].concat(i.message)),s=s.map(d(i)),a.first&&s.length)return v[i.field]=1,e(s);if(n){if(i.required&&!t.value)return s=i.message?[].concat(i.message).map(d(i)):a.error?[a.error(i,c(a.messages.required,i.field))]:[],e(s);var u={};if(i.defaultField)for(var h in t.value)t.value.hasOwnProperty(h)&&(u[h]=i.defaultField);for(var p in u=o()({},u,t.rule.fields))if(u.hasOwnProperty(p)){var f=Array.isArray(u[p])?u[p]:[u[p]];u[p]=f.map(r.bind(null,p))}var g=new O(u);g.messages(a.messages),t.rule.options&&(t.rule.options.messages=a.messages,t.rule.options.error=a.error),g.validate(t.value,t.rule.options||a,function(t){e(t&&t.length?s.concat(t):t)})}else e(s)}n=n&&(i.required||!i.required&&t.value),i.field=t.field;var h=i.validator(i,t.value,u,t.source,a);h&&h.then&&h.then(function(){return u()},function(t){return u(t)})},function(t){!function(t){var e,i=void 0,n=void 0,o=[],r={};for(i=0;i<t.length;i++)e=t[i],Array.isArray(e)?o=o.concat.apply(o,e):o.push(e);if(o.length)for(i=0;i<o.length;i++)r[n=o[i].field]=r[n]||[],r[n].push(o[i]);else o=null,r=null;u(o,r)}(t)})}else u&&u()},getType:function(t){if(void 0===t.type&&t.pattern instanceof RegExp&&(t.type="pattern"),"function"!=typeof t.validator&&t.type&&!C.hasOwnProperty(t.type))throw new Error(c("Unknown rule type %s",t.type));return t.type||"string"},getValidationMethod:function(t){if("function"==typeof t.validator)return t.validator;var e=Object.keys(t),i=e.indexOf("message");return-1!==i&&e.splice(i,1),1===e.length&&"required"===e[0]?C.required:C[this.getType(t)]||!1}},O.register=function(t,e){if("function"!=typeof e)throw new Error("Cannot register a validator by type, validator is not a function");C[t]=e},O.messages=k;e.default=O},jyFz:function(t,e,i){var n=function(){return this}()||Function("return this")(),o=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,r=o&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=i("SldL"),o)n.regeneratorRuntime=r;else try{delete n.regeneratorRuntime}catch(t){n.regeneratorRuntime=void 0}},kM2E:function(t,e,i){var n=i("7KvD"),o=i("FeBl"),r=i("+ZMJ"),s=i("hJx8"),a=i("D2L2"),l=function(t,e,i){var c,u,h,p=t&l.F,d=t&l.G,f=t&l.S,g=t&l.P,_=t&l.B,m=t&l.W,v=d?o:o[e]||(o[e]={}),y=v.prototype,b=d?n:f?n[e]:(n[e]||{}).prototype;for(c in d&&(i=e),i)(u=!p&&b&&void 0!==b[c])&&a(v,c)||(h=u?b[c]:i[c],v[c]=d&&"function"!=typeof b[c]?i[c]:_&&u?r(h,n):m&&b[c]==h?function(t){var e=function(e,i,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,i)}return new t(e,i,n)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(h):g&&"function"==typeof h?r(Function.call,h):h,g&&((v.virtual||(v.virtual={}))[c]=h,t&l.R&&y&&!y[c]&&s(y,c,h)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,t.exports=l},kNJA:function(t,e,i){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist/",i(i.s=58)}({0:function(t,e,i){"use strict";function n(t,e,i,n,o,r,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):o&&(l=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:t,options:c}}i.d(e,"a",function(){return n})},15:function(t,e){t.exports=i("fEB+")},18:function(t,e){t.exports=i("EKTV")},21:function(t,e){t.exports=i("E/in")},26:function(t,e){t.exports=i("nvbp")},3:function(t,e){t.exports=i("ylDJ")},31:function(t,e){t.exports=i("zTCi")},40:function(t,e){t.exports=i("hyEB")},51:function(t,e){t.exports=i("RDoK")},58:function(t,e,i){"use strict";i.r(e);var n=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{class:["el-cascader-panel",this.border&&"is-bordered"],on:{keydown:this.handleKeyDown}},this._l(this.menus,function(t,i){return e("cascader-menu",{key:i,ref:"menu",refInFor:!0,attrs:{index:i,nodes:t}})}),1)};n._withStripped=!0;var o=i(26),r=i.n(o),s=i(15),a=i.n(s),l=i(18),c=i.n(l),u=i(51),h=i.n(u),p=i(3),d=function(t){return t.stopPropagation()},f={inject:["panel"],components:{ElCheckbox:c.a,ElRadio:h.a},props:{node:{required:!0},nodeId:String},computed:{config:function(){return this.panel.config},isLeaf:function(){return this.node.isLeaf},isDisabled:function(){return this.node.isDisabled},checkedValue:function(){return this.panel.checkedValue},isChecked:function(){return this.node.isSameNode(this.checkedValue)},inActivePath:function(){return this.isInPath(this.panel.activePath)},inCheckedPath:function(){var t=this;return!!this.config.checkStrictly&&this.panel.checkedNodePaths.some(function(e){return t.isInPath(e)})},value:function(){return this.node.getValueByOption()}},methods:{handleExpand:function(){var t=this,e=this.panel,i=this.node,n=this.isDisabled,o=this.config,r=o.multiple;!o.checkStrictly&&n||i.loading||(o.lazy&&!i.loaded?e.lazyLoad(i,function(){var e=t.isLeaf;if(e||t.handleExpand(),r){var n=!!e&&i.checked;t.handleMultiCheckChange(n)}}):e.handleExpand(i))},handleCheckChange:function(){var t=this.panel,e=this.value,i=this.node;t.handleCheckChange(e),t.handleExpand(i)},handleMultiCheckChange:function(t){this.node.doCheck(t),this.panel.calculateMultiCheckedValue()},isInPath:function(t){var e=this.node;return(t[e.level-1]||{}).uid===e.uid},renderPrefix:function(t){var e=this.isLeaf,i=this.isChecked,n=this.config,o=n.checkStrictly;return n.multiple?this.renderCheckbox(t):o?this.renderRadio(t):e&&i?this.renderCheckIcon(t):null},renderPostfix:function(t){var e=this.node,i=this.isLeaf;return e.loading?this.renderLoadingIcon(t):i?null:this.renderExpandIcon(t)},renderCheckbox:function(t){var e=this.node,i=this.config,n=this.isDisabled,o={on:{change:this.handleMultiCheckChange},nativeOn:{}};return i.checkStrictly&&(o.nativeOn.click=d),t("el-checkbox",r()([{attrs:{value:e.checked,indeterminate:e.indeterminate,disabled:n}},o]))},renderRadio:function(t){var e=this.checkedValue,i=this.value,n=this.isDisabled;return Object(p.isEqual)(i,e)&&(i=e),t("el-radio",{attrs:{value:e,label:i,disabled:n},on:{change:this.handleCheckChange},nativeOn:{click:d}},[t("span")])},renderCheckIcon:function(t){return t("i",{class:"el-icon-check el-cascader-node__prefix"})},renderLoadingIcon:function(t){return t("i",{class:"el-icon-loading el-cascader-node__postfix"})},renderExpandIcon:function(t){return t("i",{class:"el-icon-arrow-right el-cascader-node__postfix"})},renderContent:function(t){var e=this.panel,i=this.node,n=e.renderLabelFn;return t("span",{class:"el-cascader-node__label"},[(n?n({node:i,data:i.data}):null)||i.label])}},render:function(t){var e=this,i=this.inActivePath,n=this.inCheckedPath,o=this.isChecked,s=this.isLeaf,a=this.isDisabled,l=this.config,c=this.nodeId,u=l.expandTrigger,h=l.checkStrictly,p=l.multiple,d=!h&&a,f={on:{}};return"click"===u?f.on.click=this.handleExpand:(f.on.mouseenter=function(t){e.handleExpand(),e.$emit("expand",t)},f.on.focus=function(t){e.handleExpand(),e.$emit("expand",t)}),!s||a||h||p||(f.on.click=this.handleCheckChange),t("li",r()([{attrs:{role:"menuitem",id:c,"aria-expanded":i,tabindex:d?null:-1},class:{"el-cascader-node":!0,"is-selectable":h,"in-active-path":i,"in-checked-path":n,"is-active":o,"is-disabled":d}},f]),[this.renderPrefix(t),this.renderContent(t),this.renderPostfix(t)])}},g=i(0),_=Object(g.a)(f,void 0,void 0,!1,null,null,null);_.options.__file="packages/cascader-panel/src/cascader-node.vue";var m=_.exports,v=i(6),y={name:"ElCascaderMenu",mixins:[i.n(v).a],inject:["panel"],components:{ElScrollbar:a.a,CascaderNode:m},props:{nodes:{type:Array,required:!0},index:Number},data:function(){return{activeNode:null,hoverTimer:null,id:Object(p.generateId)()}},computed:{isEmpty:function(){return!this.nodes.length},menuId:function(){return"cascader-menu-"+this.id+"-"+this.index}},methods:{handleExpand:function(t){this.activeNode=t.target},handleMouseMove:function(t){var e=this.activeNode,i=this.hoverTimer,n=this.$refs.hoverZone;if(e&&n)if(e.contains(t.target)){clearTimeout(i);var o=this.$el.getBoundingClientRect().left,r=t.clientX-o,s=this.$el,a=s.offsetWidth,l=s.offsetHeight,c=e.offsetTop,u=c+e.offsetHeight;n.innerHTML='\n          <path style="pointer-events: auto;" fill="transparent" d="M'+r+" "+c+" L"+a+" 0 V"+c+' Z" />\n          <path style="pointer-events: auto;" fill="transparent" d="M'+r+" "+u+" L"+a+" "+l+" V"+u+' Z" />\n        '}else i||(this.hoverTimer=setTimeout(this.clearHoverZone,this.panel.config.hoverThreshold))},clearHoverZone:function(){var t=this.$refs.hoverZone;t&&(t.innerHTML="")},renderEmptyText:function(t){return t("div",{class:"el-cascader-menu__empty-text"},[this.t("el.cascader.noData")])},renderNodeList:function(t){var e=this.menuId,i=this.panel.isHoverMenu,n={on:{}};i&&(n.on.expand=this.handleExpand);var o=this.nodes.map(function(i,o){var s=i.hasChildren;return t("cascader-node",r()([{key:i.uid,attrs:{node:i,"node-id":e+"-"+o,"aria-haspopup":s,"aria-owns":s?e:null}},n]))});return[].concat(o,[i?t("svg",{ref:"hoverZone",class:"el-cascader-menu__hover-zone"}):null])}},render:function(t){var e=this.isEmpty,i=this.menuId,n={nativeOn:{}};return this.panel.isHoverMenu&&(n.nativeOn.mousemove=this.handleMouseMove),t("el-scrollbar",r()([{attrs:{tag:"ul",role:"menu",id:i,"wrap-class":"el-cascader-menu__wrap","view-class":{"el-cascader-menu__list":!0,"is-empty":e}},class:"el-cascader-menu"},n]),[e?this.renderEmptyText(t):this.renderNodeList(t)])}},b=Object(g.a)(y,void 0,void 0,!1,null,null,null);b.options.__file="packages/cascader-panel/src/cascader-menu.vue";var T=b.exports,E=i(21),C=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}();var S=0,k=function(){function t(e,i,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.data=e,this.config=i,this.parent=n||null,this.level=this.parent?this.parent.level+1:1,this.uid=S++,this.initState(),this.initChildren()}return t.prototype.initState=function(){var t=this.config,e=t.value,i=t.label;this.value=this.data[e],this.label=this.data[i],this.pathNodes=this.calculatePathNodes(),this.path=this.pathNodes.map(function(t){return t.value}),this.pathLabels=this.pathNodes.map(function(t){return t.label}),this.loading=!1,this.loaded=!1},t.prototype.initChildren=function(){var e=this,i=this.config,n=i.children,o=this.data[n];this.hasChildren=Array.isArray(o),this.children=(o||[]).map(function(n){return new t(n,i,e)})},t.prototype.calculatePathNodes=function(){for(var t=[this],e=this.parent;e;)t.unshift(e),e=e.parent;return t},t.prototype.getPath=function(){return this.path},t.prototype.getValue=function(){return this.value},t.prototype.getValueByOption=function(){return this.config.emitPath?this.getPath():this.getValue()},t.prototype.getText=function(t,e){return t?this.pathLabels.join(e):this.label},t.prototype.isSameNode=function(t){var e=this.getValueByOption();return this.config.multiple&&Array.isArray(t)?t.some(function(t){return Object(p.isEqual)(t,e)}):Object(p.isEqual)(t,e)},t.prototype.broadcast=function(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];var o="onParent"+Object(p.capitalize)(t);this.children.forEach(function(e){e&&(e.broadcast.apply(e,[t].concat(i)),e[o]&&e[o].apply(e,i))})},t.prototype.emit=function(t){var e=this.parent,i="onChild"+Object(p.capitalize)(t);if(e){for(var n=arguments.length,o=Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];e[i]&&e[i].apply(e,o),e.emit.apply(e,[t].concat(o))}},t.prototype.onParentCheck=function(t){this.isDisabled||this.setCheckState(t)},t.prototype.onChildCheck=function(){var t=this.children.filter(function(t){return!t.isDisabled}),e=!!t.length&&t.every(function(t){return t.checked});this.setCheckState(e)},t.prototype.setCheckState=function(t){var e=this.children.length,i=this.children.reduce(function(t,e){return t+(e.checked?1:e.indeterminate?.5:0)},0);this.checked=t,this.indeterminate=i!==e&&i>0},t.prototype.syncCheckState=function(t){var e=this.getValueByOption(),i=this.isSameNode(t,e);this.doCheck(i)},t.prototype.doCheck=function(t){this.checked!==t&&(this.config.checkStrictly?this.checked=t:(this.broadcast("check",t),this.setCheckState(t),this.emit("check")))},C(t,[{key:"isDisabled",get:function(){var t=this.data,e=this.parent,i=this.config,n=i.disabled,o=i.checkStrictly;return t[n]||!o&&e&&e.isDisabled}},{key:"isLeaf",get:function(){var t=this.data,e=this.loaded,i=this.hasChildren,n=this.children,o=this.config,r=o.lazy,s=o.leaf;if(r){var a=Object(E.isDef)(t[s])?t[s]:!!e&&!n.length;return this.hasChildren=!a,a}return!i}}]),t}();var O=function(){function t(e,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.config=i,this.initNodes(e)}return t.prototype.initNodes=function(t){var e=this;t=Object(p.coerceTruthyValueToArray)(t),this.nodes=t.map(function(t){return new k(t,e.config)}),this.flattedNodes=this.getFlattedNodes(!1,!1),this.leafNodes=this.getFlattedNodes(!0,!1)},t.prototype.appendNode=function(t,e){var i=new k(t,this.config,e);(e?e.children:this.nodes).push(i)},t.prototype.appendNodes=function(t,e){var i=this;(t=Object(p.coerceTruthyValueToArray)(t)).forEach(function(t){return i.appendNode(t,e)})},t.prototype.getNodes=function(){return this.nodes},t.prototype.getFlattedNodes=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=t?this.leafNodes:this.flattedNodes;return e?i:function t(e,i){return e.reduce(function(e,n){return n.isLeaf?e.push(n):(!i&&e.push(n),e=e.concat(t(n.children,i))),e},[])}(this.nodes,t)},t.prototype.getNodeByValue=function(t){if(t){var e=this.getFlattedNodes(!1,!this.config.lazy).filter(function(e){return Object(p.valueEquals)(e.path,t)||e.value===t});return e&&e.length?e[0]:null}return null},t}(),I=i(9),w=i.n(I),R=i(40),D=i.n(R),x=i(31),M=i.n(x),A=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},N=D.a.keys,L={expandTrigger:"click",multiple:!1,checkStrictly:!1,emitPath:!0,lazy:!1,lazyLoad:p.noop,value:"value",label:"label",children:"children",leaf:"leaf",disabled:"disabled",hoverThreshold:500},P=function(t){return!t.getAttribute("aria-owns")},B=function(t,e){var i=t.parentNode;if(i){var n=i.querySelectorAll('.el-cascader-node[tabindex="-1"]');return n[Array.prototype.indexOf.call(n,t)+e]||null}return null},F=function(t,e){if(t){var i=t.id.split("-");return Number(i[i.length-2])}},H=function(t){t&&(t.focus(),!P(t)&&t.click())},U={name:"ElCascaderPanel",components:{CascaderMenu:T},props:{value:{},options:Array,props:Object,border:{type:Boolean,default:!0},renderLabel:Function},provide:function(){return{panel:this}},data:function(){return{checkedValue:null,checkedNodePaths:[],store:[],menus:[],activePath:[],loadCount:0}},computed:{config:function(){return w()(A({},L),this.props||{})},multiple:function(){return this.config.multiple},checkStrictly:function(){return this.config.checkStrictly},leafOnly:function(){return!this.checkStrictly},isHoverMenu:function(){return"hover"===this.config.expandTrigger},renderLabelFn:function(){return this.renderLabel||this.$scopedSlots.default}},watch:{options:{handler:function(){this.initStore()},immediate:!0,deep:!0},value:function(){this.syncCheckedValue(),this.checkStrictly&&this.calculateCheckedNodePaths()},checkedValue:function(t){Object(p.isEqual)(t,this.value)||(this.checkStrictly&&this.calculateCheckedNodePaths(),this.$emit("input",t),this.$emit("change",t))}},mounted:function(){Object(p.isEmpty)(this.value)||this.syncCheckedValue()},methods:{initStore:function(){var t=this.config,e=this.options;t.lazy&&Object(p.isEmpty)(e)?this.lazyLoad():(this.store=new O(e,t),this.menus=[this.store.getNodes()],this.syncMenuState())},syncCheckedValue:function(){var t=this.value,e=this.checkedValue;Object(p.isEqual)(t,e)||(this.activePath=[],this.checkedValue=t,this.syncMenuState())},syncMenuState:function(){var t=this.multiple,e=this.checkStrictly;this.syncActivePath(),t&&this.syncMultiCheckState(),e&&this.calculateCheckedNodePaths(),this.$nextTick(this.scrollIntoView)},syncMultiCheckState:function(){var t=this;this.getFlattedNodes(this.leafOnly).forEach(function(e){e.syncCheckState(t.checkedValue)})},syncActivePath:function(){var t=this,e=this.store,i=this.multiple,n=this.activePath,o=this.checkedValue;if(Object(p.isEmpty)(n))if(Object(p.isEmpty)(o))this.activePath=[],this.menus=[e.getNodes()];else{var r=i?o[0]:o,s=((this.getNodeByValue(r)||{}).pathNodes||[]).slice(0,-1);this.expandNodes(s)}else{var a=n.map(function(e){return t.getNodeByValue(e.getValue())});this.expandNodes(a)}},expandNodes:function(t){var e=this;t.forEach(function(t){return e.handleExpand(t,!0)})},calculateCheckedNodePaths:function(){var t=this,e=this.checkedValue,i=this.multiple?Object(p.coerceTruthyValueToArray)(e):[e];this.checkedNodePaths=i.map(function(e){var i=t.getNodeByValue(e);return i?i.pathNodes:[]})},handleKeyDown:function(t){var e=t.target;switch(t.keyCode){case N.up:var i=B(e,-1);H(i);break;case N.down:var n=B(e,1);H(n);break;case N.left:var o=this.$refs.menu[F(e)-1];if(o){var r=o.$el.querySelector('.el-cascader-node[aria-expanded="true"]');H(r)}break;case N.right:var s=this.$refs.menu[F(e)+1];if(s){var a=s.$el.querySelector('.el-cascader-node[tabindex="-1"]');H(a)}break;case N.enter:!function(t){if(t){var e=t.querySelector("input");e?e.click():P(t)&&t.click()}}(e);break;case N.esc:case N.tab:this.$emit("close");break;default:return}},handleExpand:function(t,e){var i=this.activePath,n=t.level,o=i.slice(0,n-1),r=this.menus.slice(0,n);if(t.isLeaf||(o.push(t),r.push(t.children)),this.activePath=o,this.menus=r,!e){var s=o.map(function(t){return t.getValue()}),a=i.map(function(t){return t.getValue()});Object(p.valueEquals)(s,a)||(this.$emit("active-item-change",s),this.$emit("expand-change",s))}},handleCheckChange:function(t){this.checkedValue=t},lazyLoad:function(t,e){var i=this,n=this.config;t||(t=t||{root:!0,level:0},this.store=new O([],n),this.menus=[this.store.getNodes()]),t.loading=!0;n.lazyLoad(t,function(n){var o=t.root?null:t;if(n&&n.length&&i.store.appendNodes(n,o),t.loading=!1,t.loaded=!0,Array.isArray(i.checkedValue)){var r=i.checkedValue[i.loadCount++],s=i.config.value,a=i.config.leaf;if(Array.isArray(n)&&n.filter(function(t){return t[s]===r}).length>0){var l=i.store.getNodeByValue(r);l.data[a]||i.lazyLoad(l,function(){i.handleExpand(l)}),i.loadCount===i.checkedValue.length&&i.$parent.computePresentText()}}e&&e(n)})},calculateMultiCheckedValue:function(){this.checkedValue=this.getCheckedNodes(this.leafOnly).map(function(t){return t.getValueByOption()})},scrollIntoView:function(){this.$isServer||(this.$refs.menu||[]).forEach(function(t){var e=t.$el;if(e){var i=e.querySelector(".el-scrollbar__wrap"),n=e.querySelector(".el-cascader-node.is-active")||e.querySelector(".el-cascader-node.in-active-path");M()(i,n)}})},getNodeByValue:function(t){return this.store.getNodeByValue(t)},getFlattedNodes:function(t){var e=!this.config.lazy;return this.store.getFlattedNodes(t,e)},getCheckedNodes:function(t){var e=this.checkedValue;return this.multiple?this.getFlattedNodes(t).filter(function(t){return t.checked}):Object(p.isEmpty)(e)?[]:[this.getNodeByValue(e)]},clearCheckedNodes:function(){var t=this.config,e=this.leafOnly,i=t.multiple,n=t.emitPath;i?(this.getCheckedNodes(e).filter(function(t){return!t.isDisabled}).forEach(function(t){return t.doCheck(!1)}),this.calculateMultiCheckedValue()):this.checkedValue=n?[]:null}}},V=Object(g.a)(U,n,[],!1,null,null,null);V.options.__file="packages/cascader-panel/src/cascader-panel.vue";var G=V.exports;G.install=function(t){t.component(G.name,G)};e.default=G},6:function(t,e){t.exports=i("y+7x")},9:function(t,e){t.exports=i("jmaC")}})},knuC:function(t,e){t.exports=function(t,e,i){var n=void 0===i;switch(e.length){case 0:return n?t():t.call(i);case 1:return n?t(e[0]):t.call(i,e[0]);case 2:return n?t(e[0],e[1]):t.call(i,e[0],e[1]);case 3:return n?t(e[0],e[1],e[2]):t.call(i,e[0],e[1],e[2]);case 4:return n?t(e[0],e[1],e[2],e[3]):t.call(i,e[0],e[1],e[2],e[3])}return t.apply(i,e)}},lFkc:function(t,e,i){"use strict";var n=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:n,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:n&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n};t.exports=o},lOnJ:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},lktj:function(t,e,i){var n=i("Ibhu"),o=i("xnc9");t.exports=Object.keys||function(t){return n(t,o)}},msXi:function(t,e,i){var n=i("77Pl");t.exports=function(t,e,i,o){try{return o?e(n(i)[0],i[1]):e(i)}catch(e){var r=t.return;throw void 0!==r&&n(r.call(t)),e}}},mtWM:function(t,e,i){t.exports=i("tIFN")},mtrD:function(t,e){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist/",i(i.s=86)}({0:function(t,e,i){"use strict";function n(t,e,i,n,o,r,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):o&&(l=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:t,options:c}}i.d(e,"a",function(){return n})},86:function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("button",{staticClass:"el-button",class:[t.type?"el-button--"+t.type:"",t.buttonSize?"el-button--"+t.buttonSize:"",{"is-disabled":t.buttonDisabled,"is-loading":t.loading,"is-plain":t.plain,"is-round":t.round,"is-circle":t.circle}],attrs:{disabled:t.buttonDisabled||t.loading,autofocus:t.autofocus,type:t.nativeType},on:{click:t.handleClick}},[t.loading?i("i",{staticClass:"el-icon-loading"}):t._e(),t.icon&&!t.loading?i("i",{class:t.icon}):t._e(),t.$slots.default?i("span",[t._t("default")],2):t._e()])};n._withStripped=!0;var o={name:"ElButton",inject:{elForm:{default:""},elFormItem:{default:""}},props:{type:{type:String,default:"default"},size:String,icon:{type:String,default:""},nativeType:{type:String,default:"button"},loading:Boolean,disabled:Boolean,plain:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean},computed:{_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},buttonSize:function(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size},buttonDisabled:function(){return this.disabled||(this.elForm||{}).disabled}},methods:{handleClick:function(t){this.$emit("click",t)}}},r=i(0),s=Object(r.a)(o,n,[],!1,null,null,null);s.options.__file="packages/button/src/button.vue";var a=s.exports;a.install=function(t){t.component(a.name,a)};e.default=a}})},mvHQ:function(t,e,i){t.exports={default:i("qkKv"),__esModule:!0}},mw3O:function(t,e,i){"use strict";var n=i("CwSZ"),o=i("DDCP"),r=i("XgCd");t.exports={formats:r,parse:o,stringify:n}},n0T6:function(t,e,i){var n=i("Ibhu"),o=i("xnc9").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},nvbp:function(t,e){var i=/^(attrs|props|on|nativeOn|class|style|hook)$/;function n(t,e){return function(){t&&t.apply(this,arguments),e&&e.apply(this,arguments)}}t.exports=function(t){return t.reduce(function(t,e){var o,r,s,a,l;for(s in e)if(o=t[s],r=e[s],o&&i.test(s))if("class"===s&&("string"==typeof o&&(l=o,t[s]=o={},o[l]=!0),"string"==typeof r&&(l=r,e[s]=r={},r[l]=!0)),"on"===s||"nativeOn"===s||"hook"===s)for(a in r)o[a]=n(o[a],r[a]);else if(Array.isArray(o))t[s]=o.concat(r);else if(Array.isArray(r))t[s]=[o].concat(r);else for(a in r)o[a]=r[a];else t[s]=e[s];return t},{})}},oJlt:function(t,e,i){"use strict";var n=i("cGG2"),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,i,r,s={};return t?(n.forEach(t.split("\n"),function(t){if(r=t.indexOf(":"),e=n.trim(t.substr(0,r)).toLowerCase(),i=n.trim(t.substr(r+1)),e){if(s[e]&&o.indexOf(e)>=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([i]):s[e]?s[e]+", "+i:i}}),s):s}},orbS:function(t,e){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist/",i(i.s=127)}({0:function(t,e,i){"use strict";function n(t,e,i,n,o,r,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):o&&(l=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:t,options:c}}i.d(e,"a",function(){return n})},127:function(t,e,i){"use strict";i.r(e);var n={name:"ElTag",props:{text:String,closable:Boolean,type:String,hit:Boolean,disableTransitions:Boolean,color:String,size:String,effect:{type:String,default:"light",validator:function(t){return-1!==["dark","light","plain"].indexOf(t)}}},methods:{handleClose:function(t){t.stopPropagation(),this.$emit("close",t)},handleClick:function(t){this.$emit("click",t)}},computed:{tagSize:function(){return this.size||(this.$ELEMENT||{}).size}},render:function(t){var e=this.type,i=this.tagSize,n=this.hit,o=this.effect,r=t("span",{class:["el-tag",e?"el-tag--"+e:"",i?"el-tag--"+i:"",o?"el-tag--"+o:"",n&&"is-hit"],style:{backgroundColor:this.color},on:{click:this.handleClick}},[this.$slots.default,this.closable&&t("i",{class:"el-tag__close el-icon-close",on:{click:this.handleClose}})]);return this.disableTransitions?r:t("transition",{attrs:{name:"el-zoom-in-center"}},[r])}},o=i(0),r=Object(o.a)(n,void 0,void 0,!1,null,null,null);r.options.__file="packages/tag/src/tag.vue";var s=r.exports;s.install=function(t){t.component(s.name,s)};e.default=s}})},p1b6:function(t,e,i){"use strict";var n=i("cGG2");t.exports=n.isStandardBrowserEnv()?{write:function(t,e,i,o,r,s){var a=[];a.push(t+"="+encodeURIComponent(e)),n.isNumber(i)&&a.push("expires="+new Date(i).toGMTString()),n.isString(o)&&a.push("path="+o),n.isString(r)&&a.push("domain="+r),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},p8xL:function(t,e,i){"use strict";var n=Object.prototype.hasOwnProperty,o=Array.isArray,r=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),s=function(t,e){for(var i=e&&e.plainObjects?Object.create(null):{},n=0;n<t.length;++n)void 0!==t[n]&&(i[n]=t[n]);return i};t.exports={arrayToObject:s,assign:function(t,e){return Object.keys(e).reduce(function(t,i){return t[i]=e[i],t},t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],i=[],n=0;n<e.length;++n)for(var r=e[n],s=r.obj[r.prop],a=Object.keys(s),l=0;l<a.length;++l){var c=a[l],u=s[c];"object"==typeof u&&null!==u&&-1===i.indexOf(u)&&(e.push({obj:s,prop:c}),i.push(u))}return function(t){for(;t.length>1;){var e=t.pop(),i=e.obj[e.prop];if(o(i)){for(var n=[],r=0;r<i.length;++r)void 0!==i[r]&&n.push(i[r]);e.obj[e.prop]=n}}}(e),t},decode:function(t,e,i){var n=t.replace(/\+/g," ");if("iso-8859-1"===i)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(t){return n}},encode:function(t,e,i){if(0===t.length)return t;var n="string"==typeof t?t:String(t);if("iso-8859-1"===i)return escape(n).replace(/%u[0-9a-f]{4}/gi,function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"});for(var o="",s=0;s<n.length;++s){var a=n.charCodeAt(s);45===a||46===a||95===a||126===a||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?o+=n.charAt(s):a<128?o+=r[a]:a<2048?o+=r[192|a>>6]+r[128|63&a]:a<55296||a>=57344?o+=r[224|a>>12]+r[128|a>>6&63]+r[128|63&a]:(s+=1,a=65536+((1023&a)<<10|1023&n.charCodeAt(s)),o+=r[240|a>>18]+r[128|a>>12&63]+r[128|a>>6&63]+r[128|63&a])}return o},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},merge:function t(e,i,r){if(!i)return e;if("object"!=typeof i){if(o(e))e.push(i);else{if(!e||"object"!=typeof e)return[e,i];(r&&(r.plainObjects||r.allowPrototypes)||!n.call(Object.prototype,i))&&(e[i]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(i);var a=e;return o(e)&&!o(i)&&(a=s(e,r)),o(e)&&o(i)?(i.forEach(function(i,o){if(n.call(e,o)){var s=e[o];s&&"object"==typeof s&&i&&"object"==typeof i?e[o]=t(s,i,r):e.push(i)}else e[o]=i}),e):Object.keys(i).reduce(function(e,o){var s=i[o];return n.call(e,o)?e[o]=t(e[o],s,r):e[o]=s,e},a)}}},pBtG:function(t,e,i){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},pFYg:function(t,e,i){"use strict";e.__esModule=!0;var n=s(i("Zzip")),o=s(i("5QVw")),r="function"==typeof o.default&&"symbol"==typeof n.default?function(t){return typeof t}:function(t){return t&&"function"==typeof o.default&&t.constructor===o.default&&t!==o.default.prototype?"symbol":typeof t};function s(t){return t&&t.__esModule?t:{default:t}}e.default="function"==typeof o.default&&"symbol"===r(n.default)?function(t){return void 0===t?"undefined":r(t)}:function(t){return t&&"function"==typeof o.default&&t.constructor===o.default&&t!==o.default.prototype?"symbol":void 0===t?"undefined":r(t)}},pxG4:function(t,e,i){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},qARP:function(t,e,i){"use strict";var n=i("lOnJ");t.exports.f=function(t){return new function(t){var e,i;this.promise=new t(function(t,n){if(void 0!==e||void 0!==i)throw TypeError("Bad Promise constructor");e=t,i=n}),this.resolve=n(e),this.reject=n(i)}(t)}},qRfI:function(t,e,i){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},qio6:function(t,e,i){var n=i("evD5"),o=i("77Pl"),r=i("lktj");t.exports=i("+E39")?Object.defineProperties:function(t,e){o(t);for(var i,s=r(e),a=s.length,l=0;a>l;)n.f(t,i=s[l++],e[i]);return t}},qkKv:function(t,e,i){var n=i("FeBl"),o=n.JSON||(n.JSON={stringify:JSON.stringify});t.exports=function(t){return o.stringify.apply(o,arguments)}},s3ue:function(t,e,i){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist/",i(i.s=126)}({0:function(t,e,i){"use strict";function n(t,e,i,n,o,r,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):o&&(l=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:t,options:c}}i.d(e,"a",function(){return n})},126:function(t,e,i){"use strict";i.r(e);var n=function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"el-checkbox-group",attrs:{role:"group","aria-label":"checkbox-group"}},[this._t("default")],2)};n._withStripped=!0;var o=i(4),r={name:"ElCheckboxGroup",componentName:"ElCheckboxGroup",mixins:[i.n(o).a],inject:{elFormItem:{default:""}},props:{value:{},disabled:Boolean,min:Number,max:Number,size:String,fill:String,textColor:String},computed:{_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},checkboxGroupSize:function(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size}},watch:{value:function(t){this.dispatch("ElFormItem","el.form.change",[t])}}},s=i(0),a=Object(s.a)(r,n,[],!1,null,null,null);a.options.__file="packages/checkbox/src/checkbox-group.vue";var l=a.exports;l.install=function(t){t.component(l.name,l)};e.default=l},4:function(t,e){t.exports=i("fPll")}})},sB3e:function(t,e,i){var n=i("52gC");t.exports=function(t){return Object(n(t))}},t8qj:function(t,e,i){"use strict";t.exports=function(t,e,i,n,o){return t.config=e,i&&(t.code=i),t.request=n,t.response=o,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},t8x9:function(t,e,i){var n=i("77Pl"),o=i("lOnJ"),r=i("dSzd")("species");t.exports=function(t,e){var i,s=n(t).constructor;return void 0===s||void 0==(i=n(s)[r])?e:o(i)}},tIFN:function(t,e,i){"use strict";var n=i("cGG2"),o=i("JP+z"),r=i("XmWM"),s=i("DUeU");function a(t){var e=new r(t),i=o(r.prototype.request,e);return n.extend(i,r.prototype,e),n.extend(i,e),i}var l=a(i("KCLY"));l.Axios=r,l.create=function(t){return a(s(l.defaults,t))},l.Cancel=i("dVOP"),l.CancelToken=i("cWxy"),l.isCancel=i("pBtG"),l.all=function(t){return Promise.all(t)},l.spread=i("pxG4"),l.isAxiosError=i("SLDG"),t.exports=l,t.exports.default=l},tk3E:function(t,e,i){var n,o,r,s;s=function(t){
/**
 * @license
 * Copyright 2019 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */
"use strict";return t},o=[i("Ew4t")],void 0===(r="function"==typeof(n=s)?n.apply(e,o):n)||(t.exports=r)},uY1a:function(t,e){t.exports=function(t,e,i,n){var o,r=0;return"boolean"!=typeof e&&(n=i,i=e,e=void 0),function(){var s=this,a=Number(new Date)-r,l=arguments;function c(){r=Number(new Date),i.apply(s,l)}n&&!o&&c(),o&&clearTimeout(o),void 0===n&&a>t?c():!0!==e&&(o=setTimeout(n?function(){o=void 0}:c,void 0===n?t-a:t))}}},uqUo:function(t,e,i){var n=i("kM2E"),o=i("FeBl"),r=i("S82l");t.exports=function(t,e){var i=(o.Object||{})[t]||Object[t],s={};s[t]=e(i),n(n.S+n.F*r(function(){i(1)}),"Object",s)}},urW8:function(t,e,i){"use strict";e.__esModule=!0,e.i18n=e.use=e.t=void 0;var n=s(i("Vi3T")),o=s(i("7+uW")),r=s(i("i3rX"));function s(t){return t&&t.__esModule?t:{default:t}}var a=(0,s(i("SvnF")).default)(o.default),l=n.default,c=!1,u=function(){var t=Object.getPrototypeOf(this||o.default).$t;if("function"==typeof t&&o.default.locale)return c||(c=!0,o.default.locale(o.default.config.lang,(0,r.default)(l,o.default.locale(o.default.config.lang)||{},{clone:!0}))),t.apply(this,arguments)},h=e.t=function(t,e){var i=u.apply(this,arguments);if(null!==i&&void 0!==i)return i;for(var n=t.split("."),o=l,r=0,s=n.length;r<s;r++){if(i=o[n[r]],r===s-1)return a(i,e);if(!i)return"";o=i}return""},p=e.use=function(t){l=t||l},d=e.i18n=function(t){u=t||u};e.default={use:p,t:h,i18n:d}},"us/S":function(t,e,i){t.exports={default:i("Xd32"),__esModule:!0}},"vFc/":function(t,e,i){var n=i("TcQ7"),o=i("QRG4"),r=i("fkB2");t.exports=function(t){return function(e,i,s){var a,l=n(e),c=o(l.length),u=r(s,c);if(t&&i!=i){for(;c>u;)if((a=l[u++])!=a)return!0}else for(;c>u;u++)if((t||u in l)&&l[u]===i)return t||u||0;return!t&&-1}}},"vIB/":function(t,e,i){"use strict";var n=i("O4g8"),o=i("kM2E"),r=i("880/"),s=i("hJx8"),a=i("/bQp"),l=i("94VQ"),c=i("e6n0"),u=i("PzxK"),h=i("dSzd")("iterator"),p=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,e,i,f,g,_,m){l(i,e,f);var v,y,b,T=function(t){if(!p&&t in k)return k[t];switch(t){case"keys":case"values":return function(){return new i(this,t)}}return function(){return new i(this,t)}},E=e+" Iterator",C="values"==g,S=!1,k=t.prototype,O=k[h]||k["@@iterator"]||g&&k[g],I=O||T(g),w=g?C?T("entries"):I:void 0,R="Array"==e&&k.entries||O;if(R&&(b=u(R.call(new t)))!==Object.prototype&&b.next&&(c(b,E,!0),n||"function"==typeof b[h]||s(b,h,d)),C&&O&&"values"!==O.name&&(S=!0,I=function(){return O.call(this)}),n&&!m||!p&&!S&&k[h]||s(k,h,I),a[e]=I,a[E]=d,g)if(v={values:C?I:T("values"),keys:_?I:T("keys"),entries:w},m)for(y in v)y in k||r(k,y,v[y]);else o(o.P+o.F*(p||S),e,v);return v}},wTUY:function(t,e,i){var n,o,r,s;s=function(t){
/**
 * @license
 * Copyright 2020 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */
"use strict";return t.Blocks={},t.Blocks},o=[i("QUGb")],void 0===(r="function"==typeof(n=s)?n.apply(e,o):n)||(t.exports=r)},woOf:function(t,e,i){t.exports={default:i("V3tA"),__esModule:!0}},xGkn:function(t,e,i){"use strict";var n=i("4mcu"),o=i("EGZi"),r=i("/bQp"),s=i("TcQ7");t.exports=i("vIB/")(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,i=this._i++;return!t||i>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?i:"values"==e?t[i]:[i,t[i]])},"values"),r.Arguments=r.Array,n("keys"),n("values"),n("entries")},"xH/j":function(t,e,i){var n=i("hJx8");t.exports=function(t,e,i){for(var o in e)i&&t[o]?t[o]=e[o]:n(t,o,e[o]);return t}},xLtR:function(t,e,i){"use strict";var n=i("cGG2"),o=i("TNV1"),r=i("pBtG"),s=i("KCLY");function a(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return a(t),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=n.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),n.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||s.adapter)(t).then(function(e){return a(t),e.data=o(e.data,e.headers,t.transformResponse),e},function(e){return r(e)||(a(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},xnUL:function(t,e,i){var n,o,r,s;s=function(t){
/**
 * @license
 * Copyright 2019 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */
"use strict";return t.setLocale=function(e){t.Msg=t.Msg||{},Object.keys(e).forEach(function(i){t.Msg[i]=e[i]})},t},o=[i("/dHd")],void 0===(r="function"==typeof(n=s)?n.apply(e,o):n)||(t.exports=r)},xnc9:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"y+7x":function(t,e,i){"use strict";e.__esModule=!0;var n=i("urW8");e.default={methods:{t:function(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];return n.t.apply(this,e)}}}},yUki:function(t,e,i){var n,o,r,s;s=function(t){return(t={Msg:{}}).Msg.ADD_COMMENT="Add Comment",t.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE="Can't delete the variable '%1' because it's part of the definition of the function '%2'",t.Msg.CHANGE_VALUE_TITLE="Change value:",t.Msg.CLEAN_UP="Clean up Blocks",t.Msg.COLLAPSED_WARNINGS_WARNING="Collapsed blocks contain warnings.",t.Msg.COLLAPSE_ALL="Collapse Blocks",t.Msg.COLLAPSE_BLOCK="Collapse Block",t.Msg.COLOUR_BLEND_COLOUR1="colour 1",t.Msg.COLOUR_BLEND_COLOUR2="colour 2",t.Msg.COLOUR_BLEND_HELPURL="https://meyerweb.com/eric/tools/color-blend/#:::rgbp",t.Msg.COLOUR_BLEND_RATIO="ratio",t.Msg.COLOUR_BLEND_TITLE="blend",t.Msg.COLOUR_BLEND_TOOLTIP="Blends two colours together with a given ratio (0.0 - 1.0).",t.Msg.COLOUR_PICKER_HELPURL="https://en.wikipedia.org/wiki/Color",t.Msg.COLOUR_PICKER_TOOLTIP="Choose a colour from the palette.",t.Msg.COLOUR_RANDOM_HELPURL="http://randomcolour.com",t.Msg.COLOUR_RANDOM_TITLE="random colour",t.Msg.COLOUR_RANDOM_TOOLTIP="Choose a colour at random.",t.Msg.COLOUR_RGB_BLUE="blue",t.Msg.COLOUR_RGB_GREEN="green",t.Msg.COLOUR_RGB_HELPURL="https://www.december.com/html/spec/colorpercompact.html",t.Msg.COLOUR_RGB_RED="red",t.Msg.COLOUR_RGB_TITLE="colour with",t.Msg.COLOUR_RGB_TOOLTIP="Create a colour with the specified amount of red, green, and blue. All values must be between 0 and 100.",t.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL="https://github.com/google/blockly/wiki/Loops#loop-termination-blocks",t.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK="break out of loop",t.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE="continue with next iteration of loop",t.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK="Break out of the containing loop.",t.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE="Skip the rest of this loop, and continue with the next iteration.",t.Msg.CONTROLS_FLOW_STATEMENTS_WARNING="Warning: This block may only be used within a loop.",t.Msg.CONTROLS_FOREACH_HELPURL="https://github.com/google/blockly/wiki/Loops#for-each",t.Msg.CONTROLS_FOREACH_TITLE="for each item %1 in list %2",t.Msg.CONTROLS_FOREACH_TOOLTIP="For each item in a list, set the variable '%1' to the item, and then do some statements.",t.Msg.CONTROLS_FOR_HELPURL="https://github.com/google/blockly/wiki/Loops#count-with",t.Msg.CONTROLS_FOR_TITLE="count with %1 from %2 to %3 by %4",t.Msg.CONTROLS_FOR_TOOLTIP="Have the variable '%1' take on the values from the start number to the end number, counting by the specified interval, and do the specified blocks.",t.Msg.CONTROLS_IF_ELSEIF_TOOLTIP="Add a condition to the if block.",t.Msg.CONTROLS_IF_ELSE_TOOLTIP="Add a final, catch-all condition to the if block.",t.Msg.CONTROLS_IF_HELPURL="https://github.com/google/blockly/wiki/IfElse",t.Msg.CONTROLS_IF_IF_TOOLTIP="Add, remove, or reorder sections to reconfigure this if block.",t.Msg.CONTROLS_IF_MSG_ELSE="else",t.Msg.CONTROLS_IF_MSG_ELSEIF="else if",t.Msg.CONTROLS_IF_MSG_IF="if",t.Msg.CONTROLS_IF_TOOLTIP_1="If a value is true, then do some statements.",t.Msg.CONTROLS_IF_TOOLTIP_2="If a value is true, then do the first block of statements. Otherwise, do the second block of statements.",t.Msg.CONTROLS_IF_TOOLTIP_3="If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements.",t.Msg.CONTROLS_IF_TOOLTIP_4="If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements. If none of the values are true, do the last block of statements.",t.Msg.CONTROLS_REPEAT_HELPURL="https://en.wikipedia.org/wiki/For_loop",t.Msg.CONTROLS_REPEAT_INPUT_DO="do",t.Msg.CONTROLS_REPEAT_TITLE="repeat %1 times",t.Msg.CONTROLS_REPEAT_TOOLTIP="Do some statements several times.",t.Msg.CONTROLS_WHILEUNTIL_HELPURL="https://github.com/google/blockly/wiki/Loops#repeat",t.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL="repeat until",t.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE="repeat while",t.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL="While a value is false, then do some statements.",t.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE="While a value is true, then do some statements.",t.Msg.DELETE_ALL_BLOCKS="Delete all %1 blocks?",t.Msg.DELETE_BLOCK="Delete Block",t.Msg.DELETE_VARIABLE="Delete the '%1' variable",t.Msg.DELETE_VARIABLE_CONFIRMATION="Delete %1 uses of the '%2' variable?",t.Msg.DELETE_X_BLOCKS="Delete %1 Blocks",t.Msg.DISABLE_BLOCK="Disable Block",t.Msg.DUPLICATE_BLOCK="Duplicate",t.Msg.DUPLICATE_COMMENT="Duplicate Comment",t.Msg.ENABLE_BLOCK="Enable Block",t.Msg.EXPAND_ALL="Expand Blocks",t.Msg.EXPAND_BLOCK="Expand Block",t.Msg.EXTERNAL_INPUTS="External Inputs",t.Msg.HELP="Help",t.Msg.INLINE_INPUTS="Inline Inputs",t.Msg.IOS_CANCEL="Cancel",t.Msg.IOS_ERROR="Error",t.Msg.IOS_OK="OK",t.Msg.IOS_PROCEDURES_ADD_INPUT="+ Add Input",t.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS="Allow statements",t.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR="This function has duplicate inputs.",t.Msg.IOS_PROCEDURES_INPUTS="INPUTS",t.Msg.IOS_VARIABLES_ADD_BUTTON="Add",t.Msg.IOS_VARIABLES_ADD_VARIABLE="+ Add Variable",t.Msg.IOS_VARIABLES_DELETE_BUTTON="Delete",t.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR="You can't use an empty variable name.",t.Msg.IOS_VARIABLES_RENAME_BUTTON="Rename",t.Msg.IOS_VARIABLES_VARIABLE_NAME="Variable name",t.Msg.LISTS_CREATE_EMPTY_HELPURL="https://github.com/google/blockly/wiki/Lists#create-empty-list",t.Msg.LISTS_CREATE_EMPTY_TITLE="create empty list",t.Msg.LISTS_CREATE_EMPTY_TOOLTIP="Returns a list, of length 0, containing no data records",t.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD="list",t.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP="Add, remove, or reorder sections to reconfigure this list block.",t.Msg.LISTS_CREATE_WITH_HELPURL="https://github.com/google/blockly/wiki/Lists#create-list-with",t.Msg.LISTS_CREATE_WITH_INPUT_WITH="create list with",t.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP="Add an item to the list.",t.Msg.LISTS_CREATE_WITH_TOOLTIP="Create a list with any number of items.",t.Msg.LISTS_GET_INDEX_FIRST="first",t.Msg.LISTS_GET_INDEX_FROM_END="# from end",t.Msg.LISTS_GET_INDEX_FROM_START="#",t.Msg.LISTS_GET_INDEX_GET="get",t.Msg.LISTS_GET_INDEX_GET_REMOVE="get and remove",t.Msg.LISTS_GET_INDEX_LAST="last",t.Msg.LISTS_GET_INDEX_RANDOM="random",t.Msg.LISTS_GET_INDEX_REMOVE="remove",t.Msg.LISTS_GET_INDEX_TAIL="",t.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FIRST="Returns the first item in a list.",t.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM="Returns the item at the specified position in a list.",t.Msg.LISTS_GET_INDEX_TOOLTIP_GET_LAST="Returns the last item in a list.",t.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM="Returns a random item in a list.",t.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST="Removes and returns the first item in a list.",t.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM="Removes and returns the item at the specified position in a list.",t.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST="Removes and returns the last item in a list.",t.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM="Removes and returns a random item in a list.",t.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST="Removes the first item in a list.",t.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM="Removes the item at the specified position in a list.",t.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST="Removes the last item in a list.",t.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM="Removes a random item in a list.",t.Msg.LISTS_GET_SUBLIST_END_FROM_END="to # from end",t.Msg.LISTS_GET_SUBLIST_END_FROM_START="to #",t.Msg.LISTS_GET_SUBLIST_END_LAST="to last",t.Msg.LISTS_GET_SUBLIST_HELPURL="https://github.com/google/blockly/wiki/Lists#getting-a-sublist",t.Msg.LISTS_GET_SUBLIST_START_FIRST="get sub-list from first",t.Msg.LISTS_GET_SUBLIST_START_FROM_END="get sub-list from # from end",t.Msg.LISTS_GET_SUBLIST_START_FROM_START="get sub-list from #",t.Msg.LISTS_GET_SUBLIST_TAIL="",t.Msg.LISTS_GET_SUBLIST_TOOLTIP="Creates a copy of the specified portion of a list.",t.Msg.LISTS_INDEX_FROM_END_TOOLTIP="%1 is the last item.",t.Msg.LISTS_INDEX_FROM_START_TOOLTIP="%1 is the first item.",t.Msg.LISTS_INDEX_OF_FIRST="find first occurrence of item",t.Msg.LISTS_INDEX_OF_HELPURL="https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list",t.Msg.LISTS_INDEX_OF_LAST="find last occurrence of item",t.Msg.LISTS_INDEX_OF_TOOLTIP="Returns the index of the first/last occurrence of the item in the list. Returns %1 if item is not found.",t.Msg.LISTS_INLIST="in list",t.Msg.LISTS_ISEMPTY_HELPURL="https://github.com/google/blockly/wiki/Lists#is-empty",t.Msg.LISTS_ISEMPTY_TITLE="%1 is empty",t.Msg.LISTS_ISEMPTY_TOOLTIP="Returns true if the list is empty.",t.Msg.LISTS_LENGTH_HELPURL="https://github.com/google/blockly/wiki/Lists#length-of",t.Msg.LISTS_LENGTH_TITLE="length of %1",t.Msg.LISTS_LENGTH_TOOLTIP="Returns the length of a list.",t.Msg.LISTS_REPEAT_HELPURL="https://github.com/google/blockly/wiki/Lists#create-list-with",t.Msg.LISTS_REPEAT_TITLE="create list with item %1 repeated %2 times",t.Msg.LISTS_REPEAT_TOOLTIP="Creates a list consisting of the given value repeated the specified number of times.",t.Msg.LISTS_REVERSE_HELPURL="https://github.com/google/blockly/wiki/Lists#reversing-a-list",t.Msg.LISTS_REVERSE_MESSAGE0="reverse %1",t.Msg.LISTS_REVERSE_TOOLTIP="Reverse a copy of a list.",t.Msg.LISTS_SET_INDEX_HELPURL="https://github.com/google/blockly/wiki/Lists#in-list--set",t.Msg.LISTS_SET_INDEX_INPUT_TO="as",t.Msg.LISTS_SET_INDEX_INSERT="insert at",t.Msg.LISTS_SET_INDEX_SET="set",t.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST="Inserts the item at the start of a list.",t.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM="Inserts the item at the specified position in a list.",t.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST="Append the item to the end of a list.",t.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM="Inserts the item randomly in a list.",t.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST="Sets the first item in a list.",t.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM="Sets the item at the specified position in a list.",t.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST="Sets the last item in a list.",t.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM="Sets a random item in a list.",t.Msg.LISTS_SORT_HELPURL="https://github.com/google/blockly/wiki/Lists#sorting-a-list",t.Msg.LISTS_SORT_ORDER_ASCENDING="ascending",t.Msg.LISTS_SORT_ORDER_DESCENDING="descending",t.Msg.LISTS_SORT_TITLE="sort %1 %2 %3",t.Msg.LISTS_SORT_TOOLTIP="Sort a copy of a list.",t.Msg.LISTS_SORT_TYPE_IGNORECASE="alphabetic, ignore case",t.Msg.LISTS_SORT_TYPE_NUMERIC="numeric",t.Msg.LISTS_SORT_TYPE_TEXT="alphabetic",t.Msg.LISTS_SPLIT_HELPURL="https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists",t.Msg.LISTS_SPLIT_LIST_FROM_TEXT="make list from text",t.Msg.LISTS_SPLIT_TEXT_FROM_LIST="make text from list",t.Msg.LISTS_SPLIT_TOOLTIP_JOIN="Join a list of texts into one text, separated by a delimiter.",t.Msg.LISTS_SPLIT_TOOLTIP_SPLIT="Split text into a list of texts, breaking at each delimiter.",t.Msg.LISTS_SPLIT_WITH_DELIMITER="with delimiter",t.Msg.LOGIC_BOOLEAN_FALSE="false",t.Msg.LOGIC_BOOLEAN_HELPURL="https://github.com/google/blockly/wiki/Logic#values",t.Msg.LOGIC_BOOLEAN_TOOLTIP="Returns either true or false.",t.Msg.LOGIC_BOOLEAN_TRUE="true",t.Msg.LOGIC_COMPARE_HELPURL="https://en.wikipedia.org/wiki/Inequality_(mathematics)",t.Msg.LOGIC_COMPARE_TOOLTIP_EQ="Return true if both inputs equal each other.",t.Msg.LOGIC_COMPARE_TOOLTIP_GT="Return true if the first input is greater than the second input.",t.Msg.LOGIC_COMPARE_TOOLTIP_GTE="Return true if the first input is greater than or equal to the second input.",t.Msg.LOGIC_COMPARE_TOOLTIP_LT="Return true if the first input is smaller than the second input.",t.Msg.LOGIC_COMPARE_TOOLTIP_LTE="Return true if the first input is smaller than or equal to the second input.",t.Msg.LOGIC_COMPARE_TOOLTIP_NEQ="Return true if both inputs are not equal to each other.",t.Msg.LOGIC_NEGATE_HELPURL="https://github.com/google/blockly/wiki/Logic#not",t.Msg.LOGIC_NEGATE_TITLE="not %1",t.Msg.LOGIC_NEGATE_TOOLTIP="Returns true if the input is false. Returns false if the input is true.",t.Msg.LOGIC_NULL="null",t.Msg.LOGIC_NULL_HELPURL="https://en.wikipedia.org/wiki/Nullable_type",t.Msg.LOGIC_NULL_TOOLTIP="Returns null.",t.Msg.LOGIC_OPERATION_AND="and",t.Msg.LOGIC_OPERATION_HELPURL="https://github.com/google/blockly/wiki/Logic#logical-operations",t.Msg.LOGIC_OPERATION_OR="or",t.Msg.LOGIC_OPERATION_TOOLTIP_AND="Return true if both inputs are true.",t.Msg.LOGIC_OPERATION_TOOLTIP_OR="Return true if at least one of the inputs is true.",t.Msg.LOGIC_TERNARY_CONDITION="test",t.Msg.LOGIC_TERNARY_HELPURL="https://en.wikipedia.org/wiki/%3F:",t.Msg.LOGIC_TERNARY_IF_FALSE="if false",t.Msg.LOGIC_TERNARY_IF_TRUE="if true",t.Msg.LOGIC_TERNARY_TOOLTIP="Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value.",t.Msg.MATH_ADDITION_SYMBOL="+",t.Msg.MATH_ARITHMETIC_HELPURL="https://en.wikipedia.org/wiki/Arithmetic",t.Msg.MATH_ARITHMETIC_TOOLTIP_ADD="Return the sum of the two numbers.",t.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE="Return the quotient of the two numbers.",t.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS="Return the difference of the two numbers.",t.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY="Return the product of the two numbers.",t.Msg.MATH_ARITHMETIC_TOOLTIP_POWER="Return the first number raised to the power of the second number.",t.Msg.MATH_ATAN2_HELPURL="https://en.wikipedia.org/wiki/Atan2",t.Msg.MATH_ATAN2_TITLE="atan2 of X:%1 Y:%2",t.Msg.MATH_ATAN2_TOOLTIP="Return the arctangent of point (X, Y) in degrees from -180 to 180.",t.Msg.MATH_CHANGE_HELPURL="https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter",t.Msg.MATH_CHANGE_TITLE="change %1 by %2",t.Msg.MATH_CHANGE_TOOLTIP="Add a number to variable '%1'.",t.Msg.MATH_CONSTANT_HELPURL="https://en.wikipedia.org/wiki/Mathematical_constant",t.Msg.MATH_CONSTANT_TOOLTIP="Return one of the common constants: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (infinity).",t.Msg.MATH_CONSTRAIN_HELPURL="https://en.wikipedia.org/wiki/Clamping_(graphics)",t.Msg.MATH_CONSTRAIN_TITLE="constrain %1 low %2 high %3",t.Msg.MATH_CONSTRAIN_TOOLTIP="Constrain a number to be between the specified limits (inclusive).",t.Msg.MATH_DIVISION_SYMBOL="÷",t.Msg.MATH_IS_DIVISIBLE_BY="is divisible by",t.Msg.MATH_IS_EVEN="is even",t.Msg.MATH_IS_NEGATIVE="is negative",t.Msg.MATH_IS_ODD="is odd",t.Msg.MATH_IS_POSITIVE="is positive",t.Msg.MATH_IS_PRIME="is prime",t.Msg.MATH_IS_TOOLTIP="Check if a number is an even, odd, prime, whole, positive, negative, or if it is divisible by certain number. Returns true or false.",t.Msg.MATH_IS_WHOLE="is whole",t.Msg.MATH_MODULO_HELPURL="https://en.wikipedia.org/wiki/Modulo_operation",t.Msg.MATH_MODULO_TITLE="remainder of %1 ÷ %2",t.Msg.MATH_MODULO_TOOLTIP="Return the remainder from dividing the two numbers.",t.Msg.MATH_MULTIPLICATION_SYMBOL="×",t.Msg.MATH_NUMBER_HELPURL="https://en.wikipedia.org/wiki/Number",t.Msg.MATH_NUMBER_TOOLTIP="A number.",t.Msg.MATH_ONLIST_HELPURL="",t.Msg.MATH_ONLIST_OPERATOR_AVERAGE="average of list",t.Msg.MATH_ONLIST_OPERATOR_MAX="max of list",t.Msg.MATH_ONLIST_OPERATOR_MEDIAN="median of list",t.Msg.MATH_ONLIST_OPERATOR_MIN="min of list",t.Msg.MATH_ONLIST_OPERATOR_MODE="modes of list",t.Msg.MATH_ONLIST_OPERATOR_RANDOM="random item of list",t.Msg.MATH_ONLIST_OPERATOR_STD_DEV="standard deviation of list",t.Msg.MATH_ONLIST_OPERATOR_SUM="sum of list",t.Msg.MATH_ONLIST_TOOLTIP_AVERAGE="Return the average (arithmetic mean) of the numeric values in the list.",t.Msg.MATH_ONLIST_TOOLTIP_MAX="Return the largest number in the list.",t.Msg.MATH_ONLIST_TOOLTIP_MEDIAN="Return the median number in the list.",t.Msg.MATH_ONLIST_TOOLTIP_MIN="Return the smallest number in the list.",t.Msg.MATH_ONLIST_TOOLTIP_MODE="Return a list of the most common item(s) in the list.",t.Msg.MATH_ONLIST_TOOLTIP_RANDOM="Return a random element from the list.",t.Msg.MATH_ONLIST_TOOLTIP_STD_DEV="Return the standard deviation of the list.",t.Msg.MATH_ONLIST_TOOLTIP_SUM="Return the sum of all the numbers in the list.",t.Msg.MATH_POWER_SYMBOL="^",t.Msg.MATH_RANDOM_FLOAT_HELPURL="https://en.wikipedia.org/wiki/Random_number_generation",t.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM="random fraction",t.Msg.MATH_RANDOM_FLOAT_TOOLTIP="Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive).",t.Msg.MATH_RANDOM_INT_HELPURL="https://en.wikipedia.org/wiki/Random_number_generation",t.Msg.MATH_RANDOM_INT_TITLE="random integer from %1 to %2",t.Msg.MATH_RANDOM_INT_TOOLTIP="Return a random integer between the two specified limits, inclusive.",t.Msg.MATH_ROUND_HELPURL="https://en.wikipedia.org/wiki/Rounding",t.Msg.MATH_ROUND_OPERATOR_ROUND="round",t.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN="round down",t.Msg.MATH_ROUND_OPERATOR_ROUNDUP="round up",t.Msg.MATH_ROUND_TOOLTIP="Round a number up or down.",t.Msg.MATH_SINGLE_HELPURL="https://en.wikipedia.org/wiki/Square_root",t.Msg.MATH_SINGLE_OP_ABSOLUTE="absolute",t.Msg.MATH_SINGLE_OP_ROOT="square root",t.Msg.MATH_SINGLE_TOOLTIP_ABS="Return the absolute value of a number.",t.Msg.MATH_SINGLE_TOOLTIP_EXP="Return e to the power of a number.",t.Msg.MATH_SINGLE_TOOLTIP_LN="Return the natural logarithm of a number.",t.Msg.MATH_SINGLE_TOOLTIP_LOG10="Return the base 10 logarithm of a number.",t.Msg.MATH_SINGLE_TOOLTIP_NEG="Return the negation of a number.",t.Msg.MATH_SINGLE_TOOLTIP_POW10="Return 10 to the power of a number.",t.Msg.MATH_SINGLE_TOOLTIP_ROOT="Return the square root of a number.",t.Msg.MATH_SUBTRACTION_SYMBOL="-",t.Msg.MATH_TRIG_ACOS="acos",t.Msg.MATH_TRIG_ASIN="asin",t.Msg.MATH_TRIG_ATAN="atan",t.Msg.MATH_TRIG_COS="cos",t.Msg.MATH_TRIG_HELPURL="https://en.wikipedia.org/wiki/Trigonometric_functions",t.Msg.MATH_TRIG_SIN="sin",t.Msg.MATH_TRIG_TAN="tan",t.Msg.MATH_TRIG_TOOLTIP_ACOS="Return the arccosine of a number.",t.Msg.MATH_TRIG_TOOLTIP_ASIN="Return the arcsine of a number.",t.Msg.MATH_TRIG_TOOLTIP_ATAN="Return the arctangent of a number.",t.Msg.MATH_TRIG_TOOLTIP_COS="Return the cosine of a degree (not radian).",t.Msg.MATH_TRIG_TOOLTIP_SIN="Return the sine of a degree (not radian).",t.Msg.MATH_TRIG_TOOLTIP_TAN="Return the tangent of a degree (not radian).",t.Msg.NEW_COLOUR_VARIABLE="Create colour variable...",t.Msg.NEW_NUMBER_VARIABLE="Create number variable...",t.Msg.NEW_STRING_VARIABLE="Create string variable...",t.Msg.NEW_VARIABLE="Create variable...",t.Msg.NEW_VARIABLE_TITLE="New variable name:",t.Msg.NEW_VARIABLE_TYPE_TITLE="New variable type:",t.Msg.ORDINAL_NUMBER_SUFFIX="",t.Msg.PROCEDURES_ALLOW_STATEMENTS="allow statements",t.Msg.PROCEDURES_BEFORE_PARAMS="with:",t.Msg.PROCEDURES_CALLNORETURN_HELPURL="https://en.wikipedia.org/wiki/Subroutine",t.Msg.PROCEDURES_CALLNORETURN_TOOLTIP="Run the user-defined function '%1'.",t.Msg.PROCEDURES_CALLRETURN_HELPURL="https://en.wikipedia.org/wiki/Subroutine",t.Msg.PROCEDURES_CALLRETURN_TOOLTIP="Run the user-defined function '%1' and use its output.",t.Msg.PROCEDURES_CALL_BEFORE_PARAMS="with:",t.Msg.PROCEDURES_CREATE_DO="Create '%1'",t.Msg.PROCEDURES_DEFNORETURN_COMMENT="Describe this function...",t.Msg.PROCEDURES_DEFNORETURN_DO="",t.Msg.PROCEDURES_DEFNORETURN_HELPURL="https://en.wikipedia.org/wiki/Subroutine",t.Msg.PROCEDURES_DEFNORETURN_PROCEDURE="do something",t.Msg.PROCEDURES_DEFNORETURN_TITLE="to",t.Msg.PROCEDURES_DEFNORETURN_TOOLTIP="Creates a function with no output.",t.Msg.PROCEDURES_DEFRETURN_HELPURL="https://en.wikipedia.org/wiki/Subroutine",t.Msg.PROCEDURES_DEFRETURN_RETURN="return",t.Msg.PROCEDURES_DEFRETURN_TOOLTIP="Creates a function with an output.",t.Msg.PROCEDURES_DEF_DUPLICATE_WARNING="Warning: This function has duplicate parameters.",t.Msg.PROCEDURES_HIGHLIGHT_DEF="Highlight function definition",t.Msg.PROCEDURES_IFRETURN_HELPURL="http://c2.com/cgi/wiki?GuardClause",t.Msg.PROCEDURES_IFRETURN_TOOLTIP="If a value is true, then return a second value.",t.Msg.PROCEDURES_IFRETURN_WARNING="Warning: This block may be used only within a function definition.",t.Msg.PROCEDURES_MUTATORARG_TITLE="input name:",t.Msg.PROCEDURES_MUTATORARG_TOOLTIP="Add an input to the function.",t.Msg.PROCEDURES_MUTATORCONTAINER_TITLE="inputs",t.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP="Add, remove, or reorder inputs to this function.",t.Msg.REDO="Redo",t.Msg.REMOVE_COMMENT="Remove Comment",t.Msg.RENAME_VARIABLE="Rename variable...",t.Msg.RENAME_VARIABLE_TITLE="Rename all '%1' variables to:",t.Msg.TEXT_APPEND_HELPURL="https://github.com/google/blockly/wiki/Text#text-modification",t.Msg.TEXT_APPEND_TITLE="to %1 append text %2",t.Msg.TEXT_APPEND_TOOLTIP="Append some text to variable '%1'.",t.Msg.TEXT_CHANGECASE_HELPURL="https://github.com/google/blockly/wiki/Text#adjusting-text-case",t.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE="to lower case",t.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE="to Title Case",t.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE="to UPPER CASE",t.Msg.TEXT_CHANGECASE_TOOLTIP="Return a copy of the text in a different case.",t.Msg.TEXT_CHARAT_FIRST="get first letter",t.Msg.TEXT_CHARAT_FROM_END="get letter # from end",t.Msg.TEXT_CHARAT_FROM_START="get letter #",t.Msg.TEXT_CHARAT_HELPURL="https://github.com/google/blockly/wiki/Text#extracting-text",t.Msg.TEXT_CHARAT_LAST="get last letter",t.Msg.TEXT_CHARAT_RANDOM="get random letter",t.Msg.TEXT_CHARAT_TAIL="",t.Msg.TEXT_CHARAT_TITLE="in text %1 %2",t.Msg.TEXT_CHARAT_TOOLTIP="Returns the letter at the specified position.",t.Msg.TEXT_COUNT_HELPURL="https://github.com/google/blockly/wiki/Text#counting-substrings",t.Msg.TEXT_COUNT_MESSAGE0="count %1 in %2",t.Msg.TEXT_COUNT_TOOLTIP="Count how many times some text occurs within some other text.",t.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP="Add an item to the text.",t.Msg.TEXT_CREATE_JOIN_TITLE_JOIN="join",t.Msg.TEXT_CREATE_JOIN_TOOLTIP="Add, remove, or reorder sections to reconfigure this text block.",t.Msg.TEXT_GET_SUBSTRING_END_FROM_END="to letter # from end",t.Msg.TEXT_GET_SUBSTRING_END_FROM_START="to letter #",t.Msg.TEXT_GET_SUBSTRING_END_LAST="to last letter",t.Msg.TEXT_GET_SUBSTRING_HELPURL="https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text",t.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT="in text",t.Msg.TEXT_GET_SUBSTRING_START_FIRST="get substring from first letter",t.Msg.TEXT_GET_SUBSTRING_START_FROM_END="get substring from letter # from end",t.Msg.TEXT_GET_SUBSTRING_START_FROM_START="get substring from letter #",t.Msg.TEXT_GET_SUBSTRING_TAIL="",t.Msg.TEXT_GET_SUBSTRING_TOOLTIP="Returns a specified portion of the text.",t.Msg.TEXT_INDEXOF_HELPURL="https://github.com/google/blockly/wiki/Text#finding-text",t.Msg.TEXT_INDEXOF_OPERATOR_FIRST="find first occurrence of text",t.Msg.TEXT_INDEXOF_OPERATOR_LAST="find last occurrence of text",t.Msg.TEXT_INDEXOF_TITLE="in text %1 %2 %3",t.Msg.TEXT_INDEXOF_TOOLTIP="Returns the index of the first/last occurrence of the first text in the second text. Returns %1 if text is not found.",t.Msg.TEXT_ISEMPTY_HELPURL="https://github.com/google/blockly/wiki/Text#checking-for-empty-text",t.Msg.TEXT_ISEMPTY_TITLE="%1 is empty",t.Msg.TEXT_ISEMPTY_TOOLTIP="Returns true if the provided text is empty.",t.Msg.TEXT_JOIN_HELPURL="https://github.com/google/blockly/wiki/Text#text-creation",t.Msg.TEXT_JOIN_TITLE_CREATEWITH="create text with",t.Msg.TEXT_JOIN_TOOLTIP="Create a piece of text by joining together any number of items.",t.Msg.TEXT_LENGTH_HELPURL="https://github.com/google/blockly/wiki/Text#text-modification",t.Msg.TEXT_LENGTH_TITLE="length of %1",t.Msg.TEXT_LENGTH_TOOLTIP="Returns the number of letters (including spaces) in the provided text.",t.Msg.TEXT_PRINT_HELPURL="https://github.com/google/blockly/wiki/Text#printing-text",t.Msg.TEXT_PRINT_TITLE="print %1",t.Msg.TEXT_PRINT_TOOLTIP="Print the specified text, number or other value.",t.Msg.TEXT_PROMPT_HELPURL="https://github.com/google/blockly/wiki/Text#getting-input-from-the-user",t.Msg.TEXT_PROMPT_TOOLTIP_NUMBER="Prompt for user for a number.",t.Msg.TEXT_PROMPT_TOOLTIP_TEXT="Prompt for user for some text.",t.Msg.TEXT_PROMPT_TYPE_NUMBER="prompt for number with message",t.Msg.TEXT_PROMPT_TYPE_TEXT="prompt for text with message",t.Msg.TEXT_REPLACE_HELPURL="https://github.com/google/blockly/wiki/Text#replacing-substrings",t.Msg.TEXT_REPLACE_MESSAGE0="replace %1 with %2 in %3",t.Msg.TEXT_REPLACE_TOOLTIP="Replace all occurances of some text within some other text.",t.Msg.TEXT_REVERSE_HELPURL="https://github.com/google/blockly/wiki/Text#reversing-text",t.Msg.TEXT_REVERSE_MESSAGE0="reverse %1",t.Msg.TEXT_REVERSE_TOOLTIP="Reverses the order of the characters in the text.",t.Msg.TEXT_TEXT_HELPURL="https://en.wikipedia.org/wiki/String_(computer_science)",t.Msg.TEXT_TEXT_TOOLTIP="A letter, word, or line of text.",t.Msg.TEXT_TRIM_HELPURL="https://github.com/google/blockly/wiki/Text#trimming-removing-spaces",t.Msg.TEXT_TRIM_OPERATOR_BOTH="trim spaces from both sides of",t.Msg.TEXT_TRIM_OPERATOR_LEFT="trim spaces from left side of",t.Msg.TEXT_TRIM_OPERATOR_RIGHT="trim spaces from right side of",t.Msg.TEXT_TRIM_TOOLTIP="Return a copy of the text with spaces removed from one or both ends.",t.Msg.TODAY="Today",t.Msg.UNDO="Undo",t.Msg.UNNAMED_KEY="unnamed",t.Msg.VARIABLES_DEFAULT_NAME="item",t.Msg.VARIABLES_GET_CREATE_SET="Create 'set %1'",t.Msg.VARIABLES_GET_HELPURL="https://github.com/google/blockly/wiki/Variables#get",t.Msg.VARIABLES_GET_TOOLTIP="Returns the value of this variable.",t.Msg.VARIABLES_SET="set %1 to %2",t.Msg.VARIABLES_SET_CREATE_GET="Create 'get %1'",t.Msg.VARIABLES_SET_HELPURL="https://github.com/google/blockly/wiki/Variables#set",t.Msg.VARIABLES_SET_TOOLTIP="Sets this variable to be equal to the input.",t.Msg.VARIABLE_ALREADY_EXISTS="A variable named '%1' already exists.",t.Msg.VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE="A variable named '%1' already exists for another type: '%2'.",t.Msg.WORKSPACE_ARIA_LABEL="Blockly Workspace",t.Msg.WORKSPACE_COMMENT_DEFAULT_TEXT="Say something...",t.Msg.CONTROLS_FOREACH_INPUT_DO=t.Msg.CONTROLS_REPEAT_INPUT_DO,t.Msg.CONTROLS_FOR_INPUT_DO=t.Msg.CONTROLS_REPEAT_INPUT_DO,t.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF=t.Msg.CONTROLS_IF_MSG_ELSEIF,t.Msg.CONTROLS_IF_ELSE_TITLE_ELSE=t.Msg.CONTROLS_IF_MSG_ELSE,t.Msg.CONTROLS_IF_IF_TITLE_IF=t.Msg.CONTROLS_IF_MSG_IF,t.Msg.CONTROLS_IF_MSG_THEN=t.Msg.CONTROLS_REPEAT_INPUT_DO,t.Msg.CONTROLS_WHILEUNTIL_INPUT_DO=t.Msg.CONTROLS_REPEAT_INPUT_DO,t.Msg.LISTS_CREATE_WITH_ITEM_TITLE=t.Msg.VARIABLES_DEFAULT_NAME,t.Msg.LISTS_GET_INDEX_HELPURL=t.Msg.LISTS_INDEX_OF_HELPURL,t.Msg.LISTS_GET_INDEX_INPUT_IN_LIST=t.Msg.LISTS_INLIST,t.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST=t.Msg.LISTS_INLIST,t.Msg.LISTS_INDEX_OF_INPUT_IN_LIST=t.Msg.LISTS_INLIST,t.Msg.LISTS_SET_INDEX_INPUT_IN_LIST=t.Msg.LISTS_INLIST,t.Msg.MATH_CHANGE_TITLE_ITEM=t.Msg.VARIABLES_DEFAULT_NAME,t.Msg.PROCEDURES_DEFRETURN_COMMENT=t.Msg.PROCEDURES_DEFNORETURN_COMMENT,t.Msg.PROCEDURES_DEFRETURN_DO=t.Msg.PROCEDURES_DEFNORETURN_DO,t.Msg.PROCEDURES_DEFRETURN_PROCEDURE=t.Msg.PROCEDURES_DEFNORETURN_PROCEDURE,t.Msg.PROCEDURES_DEFRETURN_TITLE=t.Msg.PROCEDURES_DEFNORETURN_TITLE,t.Msg.TEXT_APPEND_VARIABLE=t.Msg.VARIABLES_DEFAULT_NAME,t.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM=t.Msg.VARIABLES_DEFAULT_NAME,t.Msg.MATH_HUE="230",t.Msg.LOOPS_HUE="120",t.Msg.LISTS_HUE="260",t.Msg.LOGIC_HUE="210",t.Msg.VARIABLES_HUE="330",t.Msg.TEXTS_HUE="160",t.Msg.PROCEDURES_HUE="290",t.Msg.COLOUR_HUE="20",t.Msg.VARIABLES_DYNAMIC_HUE="310",t.Msg},o=[i("xnUL")],void 0===(r="function"==typeof(n=s)?n.apply(e,o):n)||(t.exports=r)},ylDJ:function(t,e,i){"use strict";e.__esModule=!0,e.isEmpty=e.isEqual=e.arrayEquals=e.looseEqual=e.capitalize=e.kebabCase=e.autoprefixer=e.isFirefox=e.isEdge=e.isIE=e.coerceTruthyValueToArray=e.arrayFind=e.arrayFindIndex=e.escapeRegexpString=e.valueEquals=e.generateId=e.getValueByPath=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.noop=function(){},e.hasOwn=function(t,e){return l.call(t,e)},e.toObject=function(t){for(var e={},i=0;i<t.length;i++)t[i]&&c(e,t[i]);return e},e.getPropByPath=function(t,e,i){for(var n=t,o=(e=(e=e.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split("."),r=0,s=o.length;r<s-1&&(n||i);++r){var a=o[r];if(!(a in n)){if(i)throw new Error("please transfer a valid prop path to form item!");break}n=n[a]}return{o:n,k:o[r],v:n?n[o[r]]:null}},e.rafThrottle=function(t){var e=!1;return function(){for(var i=this,n=arguments.length,o=Array(n),r=0;r<n;r++)o[r]=arguments[r];e||(e=!0,window.requestAnimationFrame(function(n){t.apply(i,o),e=!1}))}},e.objToArray=function(t){if(Array.isArray(t))return t;return d(t)?[]:[t]};var o,r=i("7+uW"),s=(o=r)&&o.__esModule?o:{default:o},a=i("835U");var l=Object.prototype.hasOwnProperty;function c(t,e){for(var i in e)t[i]=e[i];return t}e.getValueByPath=function(t,e){for(var i=(e=e||"").split("."),n=t,o=null,r=0,s=i.length;r<s;r++){var a=i[r];if(!n)break;if(r===s-1){o=n[a];break}n=n[a]}return o};e.generateId=function(){return Math.floor(1e4*Math.random())},e.valueEquals=function(t,e){if(t===e)return!0;if(!(t instanceof Array))return!1;if(!(e instanceof Array))return!1;if(t.length!==e.length)return!1;for(var i=0;i!==t.length;++i)if(t[i]!==e[i])return!1;return!0},e.escapeRegexpString=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return String(t).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")};var u=e.arrayFindIndex=function(t,e){for(var i=0;i!==t.length;++i)if(e(t[i]))return i;return-1},h=(e.arrayFind=function(t,e){var i=u(t,e);return-1!==i?t[i]:void 0},e.coerceTruthyValueToArray=function(t){return Array.isArray(t)?t:t?[t]:[]},e.isIE=function(){return!s.default.prototype.$isServer&&!isNaN(Number(document.documentMode))},e.isEdge=function(){return!s.default.prototype.$isServer&&navigator.userAgent.indexOf("Edge")>-1},e.isFirefox=function(){return!s.default.prototype.$isServer&&!!window.navigator.userAgent.match(/firefox/i)},e.autoprefixer=function(t){if("object"!==(void 0===t?"undefined":n(t)))return t;var e=["ms-","webkit-"];return["transform","transition","animation"].forEach(function(i){var n=t[i];i&&n&&e.forEach(function(e){t[e+i]=n})}),t},e.kebabCase=function(t){var e=/([^-])([A-Z])/g;return t.replace(e,"$1-$2").replace(e,"$1-$2").toLowerCase()},e.capitalize=function(t){return(0,a.isString)(t)?t.charAt(0).toUpperCase()+t.slice(1):t},e.looseEqual=function(t,e){var i=(0,a.isObject)(t),n=(0,a.isObject)(e);return i&&n?JSON.stringify(t)===JSON.stringify(e):!i&&!n&&String(t)===String(e)}),p=e.arrayEquals=function(t,e){if(t=t||[],e=e||[],t.length!==e.length)return!1;for(var i=0;i<t.length;i++)if(!h(t[i],e[i]))return!1;return!0},d=(e.isEqual=function(t,e){return Array.isArray(t)&&Array.isArray(e)?p(t,e):h(t,e)},e.isEmpty=function(t){if(null==t)return!0;if("boolean"==typeof t)return!1;if("number"==typeof t)return!t;if(t instanceof Error)return""===t.message;switch(Object.prototype.toString.call(t)){case"[object String]":case"[object Array]":return!t.length;case"[object File]":case"[object Map]":case"[object Set]":return!t.size;case"[object Object]":return!Object.keys(t).length}return!1})},"z+gd":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){var i=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var i=-1;return t.some(function(t,n){return t[0]===e&&(i=n,!0)}),i}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var i=t(this.__entries__,e),n=this.__entries__[i];return n&&n[1]},e.prototype.set=function(e,i){var n=t(this.__entries__,e);~n?this.__entries__[n][1]=i:this.__entries__.push([e,i])},e.prototype.delete=function(e){var i=this.__entries__,n=t(i,e);~n&&i.splice(n,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var i=0,n=this.__entries__;i<n.length;i++){var o=n[i];t.call(e,o[1],o[0])}},e}()}(),n="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,o=void 0!==t&&t.Math===Math?t:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),r="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(o):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)},s=2;var a=20,l=["top","right","bottom","left","width","height","size","weight"],c="undefined"!=typeof MutationObserver,u=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var i=!1,n=!1,o=0;function a(){i&&(i=!1,t()),n&&c()}function l(){r(a)}function c(){var t=Date.now();if(i){if(t-o<s)return;n=!0}else i=!0,n=!1,setTimeout(l,e);o=t}return c}(this.refresh.bind(this),a)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,i=e.indexOf(t);~i&&e.splice(i,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter(function(t){return t.gatherActive(),t.hasActive()});return t.forEach(function(t){return t.broadcastActive()}),t.length>0},t.prototype.connect_=function(){n&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),c?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){n&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,i=void 0===e?"":e;l.some(function(t){return!!~i.indexOf(t)})&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),h=function(t,e){for(var i=0,n=Object.keys(e);i<n.length;i++){var o=n[i];Object.defineProperty(t,o,{value:e[o],enumerable:!1,writable:!1,configurable:!0})}return t},p=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||o},d=y(0,0,0,0);function f(t){return parseFloat(t)||0}function g(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return e.reduce(function(e,i){return e+f(t["border-"+i+"-width"])},0)}function _(t){var e=t.clientWidth,i=t.clientHeight;if(!e&&!i)return d;var n=p(t).getComputedStyle(t),o=function(t){for(var e={},i=0,n=["top","right","bottom","left"];i<n.length;i++){var o=n[i],r=t["padding-"+o];e[o]=f(r)}return e}(n),r=o.left+o.right,s=o.top+o.bottom,a=f(n.width),l=f(n.height);if("border-box"===n.boxSizing&&(Math.round(a+r)!==e&&(a-=g(n,"left","right")+r),Math.round(l+s)!==i&&(l-=g(n,"top","bottom")+s)),!function(t){return t===p(t).document.documentElement}(t)){var c=Math.round(a+r)-e,u=Math.round(l+s)-i;1!==Math.abs(c)&&(a-=c),1!==Math.abs(u)&&(l-=u)}return y(o.left,o.top,a,l)}var m="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof p(t).SVGGraphicsElement}:function(t){return t instanceof p(t).SVGElement&&"function"==typeof t.getBBox};function v(t){return n?m(t)?function(t){var e=t.getBBox();return y(0,0,e.width,e.height)}(t):_(t):d}function y(t,e,i,n){return{x:t,y:e,width:i,height:n}}var b=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=y(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=v(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),T=function(){return function(t,e){var i,n,o,r,s,a,l,c=(n=(i=e).x,o=i.y,r=i.width,s=i.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(a.prototype),h(l,{x:n,y:o,width:r,height:s,top:o,right:n+r,bottom:s+o,left:n}),l);h(this,{target:t,contentRect:c})}}(),E=function(){function t(t,e,n){if(this.activeObservations_=[],this.observations_=new i,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof p(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new b(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof p(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(e){e.isActive()&&t.activeObservations_.push(e)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map(function(t){return new T(t.target,t.broadcastRect())});this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),C="undefined"!=typeof WeakMap?new WeakMap:new i,S=function(){return function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var i=u.getInstance(),n=new E(e,i,this);C.set(this,n)}}();["observe","unobserve","disconnect"].forEach(function(t){S.prototype[t]=function(){var e;return(e=C.get(this))[t].apply(e,arguments)}});var k=void 0!==o.ResizeObserver?o.ResizeObserver:S;e.default=k}.call(e,i("DuR2"))},"zAL+":function(t,e){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist/",i(i.s=95)}({0:function(t,e,i){"use strict";function n(t,e,i,n,o,r,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):o&&(l=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:t,options:c}}i.d(e,"a",function(){return n})},95:function(t,e,i){"use strict";i.r(e);var n=function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"el-button-group"},[this._t("default")],2)};n._withStripped=!0;var o={name:"ElButtonGroup"},r=i(0),s=Object(r.a)(o,n,[],!1,null,null,null);s.options.__file="packages/button/src/button-group.vue";var a=s.exports;a.install=function(t){t.component(a.name,a)};e.default=a}})},zL8q:function(t,e,i){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist/",i(i.s=45)}([function(t,e){t.exports=i("AMCD")},function(t,e){t.exports=i("2kvA")},function(t,e){t.exports=i("ylDJ")},function(t,e){t.exports=i("fPll")},function(t,e){t.exports=i("y+7x")},function(t,e){t.exports=i("fKx3")},function(t,e){t.exports=i("7+uW")},function(t,e){t.exports=i("jmaC")},function(t,e){t.exports=i("HJMx")},function(t,e){t.exports=i("aW5l")},function(t,e){t.exports=i("ISYW")},function(t,e){t.exports=i("7J9s")},function(t,e){t.exports=i("urW8")},function(t,e){t.exports=i("mtrD")},function(t,e){t.exports=i("02w1")},function(t,e){t.exports=i("ON3O")},function(t,e){t.exports=i("EKTV")},function(t,e){t.exports=i("fEB+")},function(t,e){t.exports=i("835U")},function(t,e){t.exports=i("E/in")},function(t,e){t.exports=i("eNfa")},function(t,e){t.exports=i("Zcwg")},function(t,e){t.exports=i("1oZe")},function(t,e){t.exports=i("fUqW")},function(t,e){t.exports=i("nvbp")},function(t,e){t.exports=i("uY1a")},function(t,e){t.exports=i("aMwW")},function(t,e){t.exports=i("zTCi")},function(t,e){t.exports=i("zAL+")},function(t,e){t.exports=i("orbS")},function(t,e){t.exports=i("6Twh")},function(t,e){t.exports=i("s3ue")},function(t,e){t.exports=i("H8dH")},function(t,e){t.exports=i("GegP")},function(t,e){t.exports=i("hyEB")},function(t,e){t.exports=i("HzcN")},function(t,e){t.exports=i("e0Bm")},function(t,e){t.exports=i("STLj")},function(t,e){t.exports=i("3fo+")},function(t,e){t.exports=i("DQJY")},function(t,e){t.exports=i("jwfv")},function(t,e){t.exports=i("0kY3")},function(t,e){t.exports=i("kNJA")},function(t,e){t.exports=i("RDoK")},function(t,e){t.exports=i("SXzR")},function(t,e,i){t.exports=i(46)},function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("ul",{staticClass:"el-pager",on:{click:t.onPagerClick}},[t.pageCount>0?i("li",{staticClass:"number",class:{active:1===t.currentPage,disabled:t.disabled}},[t._v("1")]):t._e(),t.showPrevMore?i("li",{staticClass:"el-icon more btn-quickprev",class:[t.quickprevIconClass,{disabled:t.disabled}],on:{mouseenter:function(e){t.onMouseenter("left")},mouseleave:function(e){t.quickprevIconClass="el-icon-more"}}}):t._e(),t._l(t.pagers,function(e){return i("li",{key:e,staticClass:"number",class:{active:t.currentPage===e,disabled:t.disabled}},[t._v(t._s(e))])}),t.showNextMore?i("li",{staticClass:"el-icon more btn-quicknext",class:[t.quicknextIconClass,{disabled:t.disabled}],on:{mouseenter:function(e){t.onMouseenter("right")},mouseleave:function(e){t.quicknextIconClass="el-icon-more"}}}):t._e(),t.pageCount>1?i("li",{staticClass:"number",class:{active:t.currentPage===t.pageCount,disabled:t.disabled}},[t._v(t._s(t.pageCount))]):t._e()],2)};function o(t,e,i,n,o,r,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):o&&(l=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:t,options:c}}n._withStripped=!0;var r=o({name:"ElPager",props:{currentPage:Number,pageCount:Number,pagerCount:Number,disabled:Boolean},watch:{showPrevMore:function(t){t||(this.quickprevIconClass="el-icon-more")},showNextMore:function(t){t||(this.quicknextIconClass="el-icon-more")}},methods:{onPagerClick:function(t){var e=t.target;if("UL"!==e.tagName&&!this.disabled){var i=Number(t.target.textContent),n=this.pageCount,o=this.currentPage,r=this.pagerCount-2;-1!==e.className.indexOf("more")&&(-1!==e.className.indexOf("quickprev")?i=o-r:-1!==e.className.indexOf("quicknext")&&(i=o+r)),isNaN(i)||(i<1&&(i=1),i>n&&(i=n)),i!==o&&this.$emit("change",i)}},onMouseenter:function(t){this.disabled||("left"===t?this.quickprevIconClass="el-icon-d-arrow-left":this.quicknextIconClass="el-icon-d-arrow-right")}},computed:{pagers:function(){var t=this.pagerCount,e=(t-1)/2,i=Number(this.currentPage),n=Number(this.pageCount),o=!1,r=!1;n>t&&(i>t-e&&(o=!0),i<n-e&&(r=!0));var s=[];if(o&&!r)for(var a=n-(t-2);a<n;a++)s.push(a);else if(!o&&r)for(var l=2;l<t;l++)s.push(l);else if(o&&r)for(var c=Math.floor(t/2)-1,u=i-c;u<=i+c;u++)s.push(u);else for(var h=2;h<n;h++)s.push(h);return this.showPrevMore=o,this.showNextMore=r,s}},data:function(){return{current:null,showPrevMore:!1,showNextMore:!1,quicknextIconClass:"el-icon-more",quickprevIconClass:"el-icon-more"}}},n,[],!1,null,null,null);r.options.__file="packages/pagination/src/pager.vue";var s=r.exports,a=i(36),l=i.n(a),c=i(37),u=i.n(c),h=i(8),p=i.n(h),d=i(4),f=i.n(d),g=i(2),_={name:"ElPagination",props:{pageSize:{type:Number,default:10},small:Boolean,total:Number,pageCount:Number,pagerCount:{type:Number,validator:function(t){return(0|t)===t&&t>4&&t<22&&t%2==1},default:7},currentPage:{type:Number,default:1},layout:{default:"prev, pager, next, jumper, ->, total"},pageSizes:{type:Array,default:function(){return[10,20,30,40,50,100]}},popperClass:String,prevText:String,nextText:String,background:Boolean,disabled:Boolean,hideOnSinglePage:Boolean},data:function(){return{internalCurrentPage:1,internalPageSize:0,lastEmittedPage:-1,userChangePageSize:!1}},render:function(t){var e=this.layout;if(!e)return null;if(this.hideOnSinglePage&&(!this.internalPageCount||1===this.internalPageCount))return null;var i=t("div",{class:["el-pagination",{"is-background":this.background,"el-pagination--small":this.small}]}),n={prev:t("prev"),jumper:t("jumper"),pager:t("pager",{attrs:{currentPage:this.internalCurrentPage,pageCount:this.internalPageCount,pagerCount:this.pagerCount,disabled:this.disabled},on:{change:this.handleCurrentChange}}),next:t("next"),sizes:t("sizes",{attrs:{pageSizes:this.pageSizes}}),slot:t("slot",[this.$slots.default?this.$slots.default:""]),total:t("total")},o=e.split(",").map(function(t){return t.trim()}),r=t("div",{class:"el-pagination__rightwrapper"}),s=!1;return i.children=i.children||[],r.children=r.children||[],o.forEach(function(t){"->"!==t?s?r.children.push(n[t]):i.children.push(n[t]):s=!0}),s&&i.children.unshift(r),i},components:{Prev:{render:function(t){return t("button",{attrs:{type:"button",disabled:this.$parent.disabled||this.$parent.internalCurrentPage<=1},class:"btn-prev",on:{click:this.$parent.prev}},[this.$parent.prevText?t("span",[this.$parent.prevText]):t("i",{class:"el-icon el-icon-arrow-left"})])}},Next:{render:function(t){return t("button",{attrs:{type:"button",disabled:this.$parent.disabled||this.$parent.internalCurrentPage===this.$parent.internalPageCount||0===this.$parent.internalPageCount},class:"btn-next",on:{click:this.$parent.next}},[this.$parent.nextText?t("span",[this.$parent.nextText]):t("i",{class:"el-icon el-icon-arrow-right"})])}},Sizes:{mixins:[f.a],props:{pageSizes:Array},watch:{pageSizes:{immediate:!0,handler:function(t,e){Object(g.valueEquals)(t,e)||Array.isArray(t)&&(this.$parent.internalPageSize=t.indexOf(this.$parent.pageSize)>-1?this.$parent.pageSize:this.pageSizes[0])}}},render:function(t){var e=this;return t("span",{class:"el-pagination__sizes"},[t("el-select",{attrs:{value:this.$parent.internalPageSize,popperClass:this.$parent.popperClass||"",size:"mini",disabled:this.$parent.disabled},on:{input:this.handleChange}},[this.pageSizes.map(function(i){return t("el-option",{attrs:{value:i,label:i+e.t("el.pagination.pagesize")}})})])])},components:{ElSelect:l.a,ElOption:u.a},methods:{handleChange:function(t){t!==this.$parent.internalPageSize&&(this.$parent.internalPageSize=t=parseInt(t,10),this.$parent.userChangePageSize=!0,this.$parent.$emit("update:pageSize",t),this.$parent.$emit("size-change",t))}}},Jumper:{mixins:[f.a],components:{ElInput:p.a},data:function(){return{userInput:null}},watch:{"$parent.internalCurrentPage":function(){this.userInput=null}},methods:{handleKeyup:function(t){var e=t.keyCode,i=t.target;13===e&&this.handleChange(i.value)},handleInput:function(t){this.userInput=t},handleChange:function(t){this.$parent.internalCurrentPage=this.$parent.getValidCurrentPage(t),this.$parent.emitChange(),this.userInput=null}},render:function(t){return t("span",{class:"el-pagination__jump"},[this.t("el.pagination.goto"),t("el-input",{class:"el-pagination__editor is-in-pagination",attrs:{min:1,max:this.$parent.internalPageCount,value:null!==this.userInput?this.userInput:this.$parent.internalCurrentPage,type:"number",disabled:this.$parent.disabled},nativeOn:{keyup:this.handleKeyup},on:{input:this.handleInput,change:this.handleChange}}),this.t("el.pagination.pageClassifier")])}},Total:{mixins:[f.a],render:function(t){return"number"==typeof this.$parent.total?t("span",{class:"el-pagination__total"},[this.t("el.pagination.total",{total:this.$parent.total})]):""}},Pager:s},methods:{handleCurrentChange:function(t){this.internalCurrentPage=this.getValidCurrentPage(t),this.userChangePageSize=!0,this.emitChange()},prev:function(){if(!this.disabled){var t=this.internalCurrentPage-1;this.internalCurrentPage=this.getValidCurrentPage(t),this.$emit("prev-click",this.internalCurrentPage),this.emitChange()}},next:function(){if(!this.disabled){var t=this.internalCurrentPage+1;this.internalCurrentPage=this.getValidCurrentPage(t),this.$emit("next-click",this.internalCurrentPage),this.emitChange()}},getValidCurrentPage:function(t){t=parseInt(t,10);var e=void 0;return"number"==typeof this.internalPageCount?t<1?e=1:t>this.internalPageCount&&(e=this.internalPageCount):(isNaN(t)||t<1)&&(e=1),void 0===e&&isNaN(t)?e=1:0===e&&(e=1),void 0===e?t:e},emitChange:function(){var t=this;this.$nextTick(function(){(t.internalCurrentPage!==t.lastEmittedPage||t.userChangePageSize)&&(t.$emit("current-change",t.internalCurrentPage),t.lastEmittedPage=t.internalCurrentPage,t.userChangePageSize=!1)})}},computed:{internalPageCount:function(){return"number"==typeof this.total?Math.max(1,Math.ceil(this.total/this.internalPageSize)):"number"==typeof this.pageCount?Math.max(1,this.pageCount):null}},watch:{currentPage:{immediate:!0,handler:function(t){this.internalCurrentPage=this.getValidCurrentPage(t)}},pageSize:{immediate:!0,handler:function(t){this.internalPageSize=isNaN(t)?10:t}},internalCurrentPage:{immediate:!0,handler:function(t){this.$emit("update:currentPage",t),this.lastEmittedPage=-1}},internalPageCount:function(t){var e=this.internalCurrentPage;t>0&&0===e?this.internalCurrentPage=1:e>t&&(this.internalCurrentPage=0===t?1:t,this.userChangePageSize&&this.emitChange()),this.userChangePageSize=!1}},install:function(t){t.component(_.name,_)}},m=_,v=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"dialog-fade"},on:{"after-enter":t.afterEnter,"after-leave":t.afterLeave}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"el-dialog__wrapper",on:{click:function(e){return e.target!==e.currentTarget?null:t.handleWrapperClick(e)}}},[i("div",{key:t.key,ref:"dialog",class:["el-dialog",{"is-fullscreen":t.fullscreen,"el-dialog--center":t.center},t.customClass],style:t.style,attrs:{role:"dialog","aria-modal":"true","aria-label":t.title||"dialog"}},[i("div",{staticClass:"el-dialog__header"},[t._t("title",[i("span",{staticClass:"el-dialog__title"},[t._v(t._s(t.title))])]),t.showClose?i("button",{staticClass:"el-dialog__headerbtn",attrs:{type:"button","aria-label":"Close"},on:{click:t.handleClose}},[i("i",{staticClass:"el-dialog__close el-icon el-icon-close"})]):t._e()],2),t.rendered?i("div",{staticClass:"el-dialog__body"},[t._t("default")],2):t._e(),t.$slots.footer?i("div",{staticClass:"el-dialog__footer"},[t._t("footer")],2):t._e()])])])};v._withStripped=!0;var y=i(11),b=i.n(y),T=i(9),E=i.n(T),C=i(3),S=i.n(C),k=o({name:"ElDialog",mixins:[b.a,S.a,E.a],props:{title:{type:String,default:""},modal:{type:Boolean,default:!0},modalAppendToBody:{type:Boolean,default:!0},appendToBody:{type:Boolean,default:!1},lockScroll:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},width:String,fullscreen:Boolean,customClass:{type:String,default:""},top:{type:String,default:"15vh"},beforeClose:Function,center:{type:Boolean,default:!1},destroyOnClose:Boolean},data:function(){return{closed:!1,key:0}},watch:{visible:function(t){var e=this;t?(this.closed=!1,this.$emit("open"),this.$el.addEventListener("scroll",this.updatePopper),this.$nextTick(function(){e.$refs.dialog.scrollTop=0}),this.appendToBody&&document.body.appendChild(this.$el)):(this.$el.removeEventListener("scroll",this.updatePopper),this.closed||this.$emit("close"),this.destroyOnClose&&this.$nextTick(function(){e.key++}))}},computed:{style:function(){var t={};return this.fullscreen||(t.marginTop=this.top,this.width&&(t.width=this.width)),t}},methods:{getMigratingConfig:function(){return{props:{size:"size is removed."}}},handleWrapperClick:function(){this.closeOnClickModal&&this.handleClose()},handleClose:function(){"function"==typeof this.beforeClose?this.beforeClose(this.hide):this.hide()},hide:function(t){!1!==t&&(this.$emit("update:visible",!1),this.$emit("close"),this.closed=!0)},updatePopper:function(){this.broadcast("ElSelectDropdown","updatePopper"),this.broadcast("ElDropdownMenu","updatePopper")},afterEnter:function(){this.$emit("opened")},afterLeave:function(){this.$emit("closed")}},mounted:function(){this.visible&&(this.rendered=!0,this.open(),this.appendToBody&&document.body.appendChild(this.$el))},destroyed:function(){this.appendToBody&&this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)}},v,[],!1,null,null,null);k.options.__file="packages/dialog/src/component.vue";var O=k.exports;O.install=function(t){t.component(O.name,O)};var I=O,w=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:t.close,expression:"close"}],staticClass:"el-autocomplete",attrs:{"aria-haspopup":"listbox",role:"combobox","aria-expanded":t.suggestionVisible,"aria-owns":t.id}},[i("el-input",t._b({ref:"input",on:{input:t.handleInput,change:t.handleChange,focus:t.handleFocus,blur:t.handleBlur,clear:t.handleClear},nativeOn:{keydown:[function(e){if(!("button"in e)&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"]))return null;e.preventDefault(),t.highlight(t.highlightedIndex-1)},function(e){if(!("button"in e)&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"]))return null;e.preventDefault(),t.highlight(t.highlightedIndex+1)},function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.handleKeyEnter(e):null},function(e){return"button"in e||!t._k(e.keyCode,"tab",9,e.key,"Tab")?t.close(e):null}]}},"el-input",[t.$props,t.$attrs],!1),[t.$slots.prepend?i("template",{slot:"prepend"},[t._t("prepend")],2):t._e(),t.$slots.append?i("template",{slot:"append"},[t._t("append")],2):t._e(),t.$slots.prefix?i("template",{slot:"prefix"},[t._t("prefix")],2):t._e(),t.$slots.suffix?i("template",{slot:"suffix"},[t._t("suffix")],2):t._e()],2),i("el-autocomplete-suggestions",{ref:"suggestions",class:[t.popperClass?t.popperClass:""],attrs:{"visible-arrow":"","popper-options":t.popperOptions,"append-to-body":t.popperAppendToBody,placement:t.placement,id:t.id}},t._l(t.suggestions,function(e,n){return i("li",{key:n,class:{highlighted:t.highlightedIndex===n},attrs:{id:t.id+"-item-"+n,role:"option","aria-selected":t.highlightedIndex===n},on:{click:function(i){t.select(e)}}},[t._t("default",[t._v("\n        "+t._s(e[t.valueKey])+"\n      ")],{item:e})],2)}),0)],1)};w._withStripped=!0;var R=i(15),D=i.n(R),x=i(10),M=i.n(x),A=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"el-zoom-in-top"},on:{"after-leave":t.doDestroy}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.showPopper,expression:"showPopper"}],staticClass:"el-autocomplete-suggestion el-popper",class:{"is-loading":!t.parent.hideLoading&&t.parent.loading},style:{width:t.dropdownWidth},attrs:{role:"region"}},[i("el-scrollbar",{attrs:{tag:"ul","wrap-class":"el-autocomplete-suggestion__wrap","view-class":"el-autocomplete-suggestion__list"}},[!t.parent.hideLoading&&t.parent.loading?i("li",[i("i",{staticClass:"el-icon-loading"})]):t._t("default")],2)],1)])};A._withStripped=!0;var N=i(5),L=i.n(N),P=i(17),B=i.n(P),F=o({components:{ElScrollbar:B.a},mixins:[L.a,S.a],componentName:"ElAutocompleteSuggestions",data:function(){return{parent:this.$parent,dropdownWidth:""}},props:{options:{default:function(){return{gpuAcceleration:!1}}},id:String},methods:{select:function(t){this.dispatch("ElAutocomplete","item-click",t)}},updated:function(){var t=this;this.$nextTick(function(e){t.popperJS&&t.updatePopper()})},mounted:function(){this.$parent.popperElm=this.popperElm=this.$el,this.referenceElm=this.$parent.$refs.input.$refs.input||this.$parent.$refs.input.$refs.textarea,this.referenceList=this.$el.querySelector(".el-autocomplete-suggestion__list"),this.referenceList.setAttribute("role","listbox"),this.referenceList.setAttribute("id",this.id)},created:function(){var t=this;this.$on("visible",function(e,i){t.dropdownWidth=i+"px",t.showPopper=e})}},A,[],!1,null,null,null);F.options.__file="packages/autocomplete/src/autocomplete-suggestions.vue";var H=F.exports,U=i(22),V=i.n(U),G=o({name:"ElAutocomplete",mixins:[S.a,V()("input"),E.a],inheritAttrs:!1,componentName:"ElAutocomplete",components:{ElInput:p.a,ElAutocompleteSuggestions:H},directives:{Clickoutside:M.a},props:{valueKey:{type:String,default:"value"},popperClass:String,popperOptions:Object,placeholder:String,clearable:{type:Boolean,default:!1},disabled:Boolean,name:String,size:String,value:String,maxlength:Number,minlength:Number,autofocus:Boolean,fetchSuggestions:Function,triggerOnFocus:{type:Boolean,default:!0},customItem:String,selectWhenUnmatched:{type:Boolean,default:!1},prefixIcon:String,suffixIcon:String,label:String,debounce:{type:Number,default:300},placement:{type:String,default:"bottom-start"},hideLoading:Boolean,popperAppendToBody:{type:Boolean,default:!0},highlightFirstItem:{type:Boolean,default:!1}},data:function(){return{activated:!1,suggestions:[],loading:!1,highlightedIndex:-1,suggestionDisabled:!1}},computed:{suggestionVisible:function(){var t=this.suggestions;return(Array.isArray(t)&&t.length>0||this.loading)&&this.activated},id:function(){return"el-autocomplete-"+Object(g.generateId)()}},watch:{suggestionVisible:function(t){var e=this.getInput();e&&this.broadcast("ElAutocompleteSuggestions","visible",[t,e.offsetWidth])}},methods:{getMigratingConfig:function(){return{props:{"custom-item":"custom-item is removed, use scoped slot instead.",props:"props is removed, use value-key instead."}}},getData:function(t){var e=this;this.suggestionDisabled||(this.loading=!0,this.fetchSuggestions(t,function(t){e.loading=!1,e.suggestionDisabled||(Array.isArray(t)?(e.suggestions=t,e.highlightedIndex=e.highlightFirstItem?0:-1):console.error("[Element Error][Autocomplete]autocomplete suggestions must be an array"))}))},handleInput:function(t){if(this.$emit("input",t),this.suggestionDisabled=!1,!this.triggerOnFocus&&!t)return this.suggestionDisabled=!0,void(this.suggestions=[]);this.debouncedGetData(t)},handleChange:function(t){this.$emit("change",t)},handleFocus:function(t){this.activated=!0,this.$emit("focus",t),this.triggerOnFocus&&this.debouncedGetData(this.value)},handleBlur:function(t){this.$emit("blur",t)},handleClear:function(){this.activated=!1,this.$emit("clear")},close:function(t){this.activated=!1},handleKeyEnter:function(t){var e=this;this.suggestionVisible&&this.highlightedIndex>=0&&this.highlightedIndex<this.suggestions.length?(t.preventDefault(),this.select(this.suggestions[this.highlightedIndex])):this.selectWhenUnmatched&&(this.$emit("select",{value:this.value}),this.$nextTick(function(t){e.suggestions=[],e.highlightedIndex=-1}))},select:function(t){var e=this;this.$emit("input",t[this.valueKey]),this.$emit("select",t),this.$nextTick(function(t){e.suggestions=[],e.highlightedIndex=-1})},highlight:function(t){if(this.suggestionVisible&&!this.loading)if(t<0)this.highlightedIndex=-1;else{t>=this.suggestions.length&&(t=this.suggestions.length-1);var e=this.$refs.suggestions.$el.querySelector(".el-autocomplete-suggestion__wrap"),i=e.querySelectorAll(".el-autocomplete-suggestion__list li")[t],n=e.scrollTop,o=i.offsetTop;o+i.scrollHeight>n+e.clientHeight&&(e.scrollTop+=i.scrollHeight),o<n&&(e.scrollTop-=i.scrollHeight),this.highlightedIndex=t,this.getInput().setAttribute("aria-activedescendant",this.id+"-item-"+this.highlightedIndex)}},getInput:function(){return this.$refs.input.getInput()}},mounted:function(){var t=this;this.debouncedGetData=D()(this.debounce,this.getData),this.$on("item-click",function(e){t.select(e)});var e=this.getInput();e.setAttribute("role","textbox"),e.setAttribute("aria-autocomplete","list"),e.setAttribute("aria-controls","id"),e.setAttribute("aria-activedescendant",this.id+"-item-"+this.highlightedIndex)},beforeDestroy:function(){this.$refs.suggestions.$destroy()}},w,[],!1,null,null,null);G.options.__file="packages/autocomplete/src/autocomplete.vue";var W=G.exports;W.install=function(t){t.component(W.name,W)};var $=W,j=i(13),z=i.n(j),X=i(28),Y=i.n(X),K=o({name:"ElDropdown",componentName:"ElDropdown",mixins:[S.a,E.a],directives:{Clickoutside:M.a},components:{ElButton:z.a,ElButtonGroup:Y.a},provide:function(){return{dropdown:this}},props:{trigger:{type:String,default:"hover"},type:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},placement:{type:String,default:"bottom-end"},visibleArrow:{default:!0},showTimeout:{type:Number,default:250},hideTimeout:{type:Number,default:150},tabindex:{type:Number,default:0}},data:function(){return{timeout:null,visible:!1,triggerElm:null,menuItems:null,menuItemsArray:null,dropdownElm:null,focusing:!1,listId:"dropdown-menu-"+Object(g.generateId)()}},computed:{dropdownSize:function(){return this.size||(this.$ELEMENT||{}).size}},mounted:function(){this.$on("menu-item-click",this.handleMenuItemClick)},watch:{visible:function(t){this.broadcast("ElDropdownMenu","visible",t),this.$emit("visible-change",t)},focusing:function(t){var e=this.$el.querySelector(".el-dropdown-selfdefine");e&&(t?e.className+=" focusing":e.className=e.className.replace("focusing",""))}},methods:{getMigratingConfig:function(){return{props:{"menu-align":"menu-align is renamed to placement."}}},show:function(){var t=this;this.triggerElm.disabled||(clearTimeout(this.timeout),this.timeout=setTimeout(function(){t.visible=!0},"click"===this.trigger?0:this.showTimeout))},hide:function(){var t=this;this.triggerElm.disabled||(this.removeTabindex(),this.tabindex>=0&&this.resetTabindex(this.triggerElm),clearTimeout(this.timeout),this.timeout=setTimeout(function(){t.visible=!1},"click"===this.trigger?0:this.hideTimeout))},handleClick:function(){this.triggerElm.disabled||(this.visible?this.hide():this.show())},handleTriggerKeyDown:function(t){var e=t.keyCode;[38,40].indexOf(e)>-1?(this.removeTabindex(),this.resetTabindex(this.menuItems[0]),this.menuItems[0].focus(),t.preventDefault(),t.stopPropagation()):13===e?this.handleClick():[9,27].indexOf(e)>-1&&this.hide()},handleItemKeyDown:function(t){var e=t.keyCode,i=t.target,n=this.menuItemsArray.indexOf(i),o=this.menuItemsArray.length-1,r=void 0;[38,40].indexOf(e)>-1?(r=38===e?0!==n?n-1:0:n<o?n+1:o,this.removeTabindex(),this.resetTabindex(this.menuItems[r]),this.menuItems[r].focus(),t.preventDefault(),t.stopPropagation()):13===e?(this.triggerElmFocus(),i.click(),this.hideOnClick&&(this.visible=!1)):[9,27].indexOf(e)>-1&&(this.hide(),this.triggerElmFocus())},resetTabindex:function(t){this.removeTabindex(),t.setAttribute("tabindex","0")},removeTabindex:function(){this.triggerElm.setAttribute("tabindex","-1"),this.menuItemsArray.forEach(function(t){t.setAttribute("tabindex","-1")})},initAria:function(){this.dropdownElm.setAttribute("id",this.listId),this.triggerElm.setAttribute("aria-haspopup","list"),this.triggerElm.setAttribute("aria-controls",this.listId),this.splitButton||(this.triggerElm.setAttribute("role","button"),this.triggerElm.setAttribute("tabindex",this.tabindex),this.triggerElm.setAttribute("class",(this.triggerElm.getAttribute("class")||"")+" el-dropdown-selfdefine"))},initEvent:function(){var t=this,e=this.trigger,i=this.show,n=this.hide,o=this.handleClick,r=this.splitButton,s=this.handleTriggerKeyDown,a=this.handleItemKeyDown;this.triggerElm=r?this.$refs.trigger.$el:this.$slots.default[0].elm;var l=this.dropdownElm;this.triggerElm.addEventListener("keydown",s),l.addEventListener("keydown",a,!0),r||(this.triggerElm.addEventListener("focus",function(){t.focusing=!0}),this.triggerElm.addEventListener("blur",function(){t.focusing=!1}),this.triggerElm.addEventListener("click",function(){t.focusing=!1})),"hover"===e?(this.triggerElm.addEventListener("mouseenter",i),this.triggerElm.addEventListener("mouseleave",n),l.addEventListener("mouseenter",i),l.addEventListener("mouseleave",n)):"click"===e&&this.triggerElm.addEventListener("click",o)},handleMenuItemClick:function(t,e){this.hideOnClick&&(this.visible=!1),this.$emit("command",t,e)},triggerElmFocus:function(){this.triggerElm.focus&&this.triggerElm.focus()},initDomOperation:function(){this.dropdownElm=this.popperElm,this.menuItems=this.dropdownElm.querySelectorAll("[tabindex='-1']"),this.menuItemsArray=[].slice.call(this.menuItems),this.initEvent(),this.initAria()}},render:function(t){var e=this,i=this.hide,n=this.splitButton,o=this.type,r=this.dropdownSize,s=n?t("el-button-group",[t("el-button",{attrs:{type:o,size:r},nativeOn:{click:function(t){e.$emit("click",t),i()}}},[this.$slots.default]),t("el-button",{ref:"trigger",attrs:{type:o,size:r},class:"el-dropdown__caret-button"},[t("i",{class:"el-dropdown__icon el-icon-arrow-down"})])]):this.$slots.default;return t("div",{class:"el-dropdown",directives:[{name:"clickoutside",value:i}]},[s,this.$slots.dropdown])}},void 0,void 0,!1,null,null,null);K.options.__file="packages/dropdown/src/dropdown.vue";var J=K.exports;J.install=function(t){t.component(J.name,J)};var q=J,Z=function(){var t=this.$createElement,e=this._self._c||t;return e("transition",{attrs:{name:"el-zoom-in-top"},on:{"after-leave":this.doDestroy}},[e("ul",{directives:[{name:"show",rawName:"v-show",value:this.showPopper,expression:"showPopper"}],staticClass:"el-dropdown-menu el-popper",class:[this.size&&"el-dropdown-menu--"+this.size]},[this._t("default")],2)])};Z._withStripped=!0;var Q=o({name:"ElDropdownMenu",componentName:"ElDropdownMenu",mixins:[L.a],props:{visibleArrow:{type:Boolean,default:!0},arrowOffset:{type:Number,default:0}},data:function(){return{size:this.dropdown.dropdownSize}},inject:["dropdown"],created:function(){var t=this;this.$on("updatePopper",function(){t.showPopper&&t.updatePopper()}),this.$on("visible",function(e){t.showPopper=e})},mounted:function(){this.dropdown.popperElm=this.popperElm=this.$el,this.referenceElm=this.dropdown.$el,this.dropdown.initDomOperation()},watch:{"dropdown.placement":{immediate:!0,handler:function(t){this.currentPlacement=t}}}},Z,[],!1,null,null,null);Q.options.__file="packages/dropdown/src/dropdown-menu.vue";var tt=Q.exports;tt.install=function(t){t.component(tt.name,tt)};var et=tt,it=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("li",{staticClass:"el-dropdown-menu__item",class:{"is-disabled":t.disabled,"el-dropdown-menu__item--divided":t.divided},attrs:{"aria-disabled":t.disabled,tabindex:t.disabled?null:-1},on:{click:t.handleClick}},[t.icon?i("i",{class:t.icon}):t._e(),t._t("default")],2)};it._withStripped=!0;var nt=o({name:"ElDropdownItem",mixins:[S.a],props:{command:{},disabled:Boolean,divided:Boolean,icon:String},methods:{handleClick:function(t){this.dispatch("ElDropdown","menu-item-click",[this.command,this])}}},it,[],!1,null,null,null);nt.options.__file="packages/dropdown/src/dropdown-item.vue";var ot=nt.exports;ot.install=function(t){t.component(ot.name,ot)};var rt=ot,st=st||{};st.Utils=st.Utils||{},st.Utils.focusFirstDescendant=function(t){for(var e=0;e<t.childNodes.length;e++){var i=t.childNodes[e];if(st.Utils.attemptFocus(i)||st.Utils.focusFirstDescendant(i))return!0}return!1},st.Utils.focusLastDescendant=function(t){for(var e=t.childNodes.length-1;e>=0;e--){var i=t.childNodes[e];if(st.Utils.attemptFocus(i)||st.Utils.focusLastDescendant(i))return!0}return!1},st.Utils.attemptFocus=function(t){if(!st.Utils.isFocusable(t))return!1;st.Utils.IgnoreUtilFocusChanges=!0;try{t.focus()}catch(t){}return st.Utils.IgnoreUtilFocusChanges=!1,document.activeElement===t},st.Utils.isFocusable=function(t){if(t.tabIndex>0||0===t.tabIndex&&null!==t.getAttribute("tabIndex"))return!0;if(t.disabled)return!1;switch(t.nodeName){case"A":return!!t.href&&"ignore"!==t.rel;case"INPUT":return"hidden"!==t.type&&"file"!==t.type;case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},st.Utils.triggerEvent=function(t,e){var i=void 0;i=/^mouse|click/.test(e)?"MouseEvents":/^key/.test(e)?"KeyboardEvent":"HTMLEvents";for(var n=document.createEvent(i),o=arguments.length,r=Array(o>2?o-2:0),s=2;s<o;s++)r[s-2]=arguments[s];return n.initEvent.apply(n,[e].concat(r)),t.dispatchEvent?t.dispatchEvent(n):t.fireEvent("on"+e,n),t},st.Utils.keys={tab:9,enter:13,space:32,left:37,up:38,right:39,down:40,esc:27};var at=st.Utils,lt=function(t,e){this.domNode=e,this.parent=t,this.subMenuItems=[],this.subIndex=0,this.init()};lt.prototype.init=function(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()},lt.prototype.gotoSubIndex=function(t){t===this.subMenuItems.length?t=0:t<0&&(t=this.subMenuItems.length-1),this.subMenuItems[t].focus(),this.subIndex=t},lt.prototype.addListeners=function(){var t=this,e=at.keys,i=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,function(n){n.addEventListener("keydown",function(n){var o=!1;switch(n.keyCode){case e.down:t.gotoSubIndex(t.subIndex+1),o=!0;break;case e.up:t.gotoSubIndex(t.subIndex-1),o=!0;break;case e.tab:at.triggerEvent(i,"mouseleave");break;case e.enter:case e.space:o=!0,n.currentTarget.click()}return o&&(n.preventDefault(),n.stopPropagation()),!1})})};var ct=lt,ut=function(t){this.domNode=t,this.submenu=null,this.init()};ut.prototype.init=function(){this.domNode.setAttribute("tabindex","0");var t=this.domNode.querySelector(".el-menu");t&&(this.submenu=new ct(this,t)),this.addListeners()},ut.prototype.addListeners=function(){var t=this,e=at.keys;this.domNode.addEventListener("keydown",function(i){var n=!1;switch(i.keyCode){case e.down:at.triggerEvent(i.currentTarget,"mouseenter"),t.submenu&&t.submenu.gotoSubIndex(0),n=!0;break;case e.up:at.triggerEvent(i.currentTarget,"mouseenter"),t.submenu&&t.submenu.gotoSubIndex(t.submenu.subMenuItems.length-1),n=!0;break;case e.tab:at.triggerEvent(i.currentTarget,"mouseleave");break;case e.enter:case e.space:n=!0,i.currentTarget.click()}n&&i.preventDefault()})};var ht=ut,pt=function(t){this.domNode=t,this.init()};pt.prototype.init=function(){var t=this.domNode.childNodes;[].filter.call(t,function(t){return 1===t.nodeType}).forEach(function(t){new ht(t)})};var dt=pt,ft=i(1),gt=o({name:"ElMenu",render:function(t){var e=t("ul",{attrs:{role:"menubar"},key:+this.collapse,style:{backgroundColor:this.backgroundColor||""},class:{"el-menu--horizontal":"horizontal"===this.mode,"el-menu--collapse":this.collapse,"el-menu":!0}},[this.$slots.default]);return this.collapseTransition?t("el-menu-collapse-transition",[e]):e},componentName:"ElMenu",mixins:[S.a,E.a],provide:function(){return{rootMenu:this}},components:{"el-menu-collapse-transition":{functional:!0,render:function(t,e){return t("transition",{props:{mode:"out-in"},on:{beforeEnter:function(t){t.style.opacity=.2},enter:function(t){Object(ft.addClass)(t,"el-opacity-transition"),t.style.opacity=1},afterEnter:function(t){Object(ft.removeClass)(t,"el-opacity-transition"),t.style.opacity=""},beforeLeave:function(t){t.dataset||(t.dataset={}),Object(ft.hasClass)(t,"el-menu--collapse")?(Object(ft.removeClass)(t,"el-menu--collapse"),t.dataset.oldOverflow=t.style.overflow,t.dataset.scrollWidth=t.clientWidth,Object(ft.addClass)(t,"el-menu--collapse")):(Object(ft.addClass)(t,"el-menu--collapse"),t.dataset.oldOverflow=t.style.overflow,t.dataset.scrollWidth=t.clientWidth,Object(ft.removeClass)(t,"el-menu--collapse")),t.style.width=t.scrollWidth+"px",t.style.overflow="hidden"},leave:function(t){Object(ft.addClass)(t,"horizontal-collapse-transition"),t.style.width=t.dataset.scrollWidth+"px"}}},e.children)}}},props:{mode:{type:String,default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:Array,uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,collapseTransition:{type:Boolean,default:!0}},data:function(){return{activeIndex:this.defaultActive,openedMenus:this.defaultOpeneds&&!this.collapse?this.defaultOpeneds.slice(0):[],items:{},submenus:{}}},computed:{hoverBackground:function(){return this.backgroundColor?this.mixColor(this.backgroundColor,.2):""},isMenuPopup:function(){return"horizontal"===this.mode||"vertical"===this.mode&&this.collapse}},watch:{defaultActive:function(t){this.items[t]||(this.activeIndex=null),this.updateActiveIndex(t)},defaultOpeneds:function(t){this.collapse||(this.openedMenus=t)},collapse:function(t){t&&(this.openedMenus=[]),this.broadcast("ElSubmenu","toggle-collapse",t)}},methods:{updateActiveIndex:function(t){var e=this.items[t]||this.items[this.activeIndex]||this.items[this.defaultActive];e?(this.activeIndex=e.index,this.initOpenedMenu()):this.activeIndex=null},getMigratingConfig:function(){return{props:{theme:"theme is removed."}}},getColorChannels:function(t){if(t=t.replace("#",""),/^[0-9a-fA-F]{3}$/.test(t)){t=t.split("");for(var e=2;e>=0;e--)t.splice(e,0,t[e]);t=t.join("")}return/^[0-9a-fA-F]{6}$/.test(t)?{red:parseInt(t.slice(0,2),16),green:parseInt(t.slice(2,4),16),blue:parseInt(t.slice(4,6),16)}:{red:255,green:255,blue:255}},mixColor:function(t,e){var i=this.getColorChannels(t),n=i.red,o=i.green,r=i.blue;return e>0?(n*=1-e,o*=1-e,r*=1-e):(n+=(255-n)*e,o+=(255-o)*e,r+=(255-r)*e),"rgb("+Math.round(n)+", "+Math.round(o)+", "+Math.round(r)+")"},addItem:function(t){this.$set(this.items,t.index,t)},removeItem:function(t){delete this.items[t.index]},addSubmenu:function(t){this.$set(this.submenus,t.index,t)},removeSubmenu:function(t){delete this.submenus[t.index]},openMenu:function(t,e){var i=this.openedMenus;-1===i.indexOf(t)&&(this.uniqueOpened&&(this.openedMenus=i.filter(function(t){return-1!==e.indexOf(t)})),this.openedMenus.push(t))},closeMenu:function(t){var e=this.openedMenus.indexOf(t);-1!==e&&this.openedMenus.splice(e,1)},handleSubmenuClick:function(t){var e=t.index,i=t.indexPath;-1!==this.openedMenus.indexOf(e)?(this.closeMenu(e),this.$emit("close",e,i)):(this.openMenu(e,i),this.$emit("open",e,i))},handleItemClick:function(t){var e=this,i=t.index,n=t.indexPath,o=this.activeIndex,r=null!==t.index;r&&(this.activeIndex=t.index),this.$emit("select",i,n,t),("horizontal"===this.mode||this.collapse)&&(this.openedMenus=[]),this.router&&r&&this.routeToItem(t,function(t){if(e.activeIndex=o,t){if("NavigationDuplicated"===t.name)return;console.error(t)}})},initOpenedMenu:function(){var t=this,e=this.activeIndex,i=this.items[e];i&&"horizontal"!==this.mode&&!this.collapse&&i.indexPath.forEach(function(e){var i=t.submenus[e];i&&t.openMenu(e,i.indexPath)})},routeToItem:function(t,e){var i=t.route||t.index;try{this.$router.push(i,function(){},e)}catch(t){console.error(t)}},open:function(t){var e=this,i=this.submenus[t.toString()].indexPath;i.forEach(function(t){return e.openMenu(t,i)})},close:function(t){this.closeMenu(t)}},mounted:function(){this.initOpenedMenu(),this.$on("item-click",this.handleItemClick),this.$on("submenu-click",this.handleSubmenuClick),"horizontal"===this.mode&&new dt(this.$el),this.$watch("items",this.updateActiveIndex)}},void 0,void 0,!1,null,null,null);gt.options.__file="packages/menu/src/menu.vue";var _t=gt.exports;_t.install=function(t){t.component(_t.name,_t)};var mt=_t,vt=i(21),yt=i.n(vt),bt={inject:["rootMenu"],computed:{indexPath:function(){for(var t=[this.index],e=this.$parent;"ElMenu"!==e.$options.componentName;)e.index&&t.unshift(e.index),e=e.$parent;return t},parentMenu:function(){for(var t=this.$parent;t&&-1===["ElMenu","ElSubmenu"].indexOf(t.$options.componentName);)t=t.$parent;return t},paddingStyle:function(){if("vertical"!==this.rootMenu.mode)return{};var t=20,e=this.$parent;if(this.rootMenu.collapse)t=20;else for(;e&&"ElMenu"!==e.$options.componentName;)"ElSubmenu"===e.$options.componentName&&(t+=20),e=e.$parent;return{paddingLeft:t+"px"}}}},Tt={props:{transformOrigin:{type:[Boolean,String],default:!1},offset:L.a.props.offset,boundariesPadding:L.a.props.boundariesPadding,popperOptions:L.a.props.popperOptions},data:L.a.data,methods:L.a.methods,beforeDestroy:L.a.beforeDestroy,deactivated:L.a.deactivated},Et=o({name:"ElSubmenu",componentName:"ElSubmenu",mixins:[bt,S.a,Tt],components:{ElCollapseTransition:yt.a},props:{index:{type:String,required:!0},showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300},popperClass:String,disabled:Boolean,popperAppendToBody:{type:Boolean,default:void 0}},data:function(){return{popperJS:null,timeout:null,items:{},submenus:{},mouseInChild:!1}},watch:{opened:function(t){var e=this;this.isMenuPopup&&this.$nextTick(function(t){e.updatePopper()})}},computed:{appendToBody:function(){return void 0===this.popperAppendToBody?this.isFirstLevel:this.popperAppendToBody},menuTransitionName:function(){return this.rootMenu.collapse?"el-zoom-in-left":"el-zoom-in-top"},opened:function(){return this.rootMenu.openedMenus.indexOf(this.index)>-1},active:function(){var t=!1,e=this.submenus,i=this.items;return Object.keys(i).forEach(function(e){i[e].active&&(t=!0)}),Object.keys(e).forEach(function(i){e[i].active&&(t=!0)}),t},hoverBackground:function(){return this.rootMenu.hoverBackground},backgroundColor:function(){return this.rootMenu.backgroundColor||""},activeTextColor:function(){return this.rootMenu.activeTextColor||""},textColor:function(){return this.rootMenu.textColor||""},mode:function(){return this.rootMenu.mode},isMenuPopup:function(){return this.rootMenu.isMenuPopup},titleStyle:function(){return"horizontal"!==this.mode?{color:this.textColor}:{borderBottomColor:this.active?this.rootMenu.activeTextColor?this.activeTextColor:"":"transparent",color:this.active?this.activeTextColor:this.textColor}},isFirstLevel:function(){for(var t=!0,e=this.$parent;e&&e!==this.rootMenu;){if(["ElSubmenu","ElMenuItemGroup"].indexOf(e.$options.componentName)>-1){t=!1;break}e=e.$parent}return t}},methods:{handleCollapseToggle:function(t){t?this.initPopper():this.doDestroy()},addItem:function(t){this.$set(this.items,t.index,t)},removeItem:function(t){delete this.items[t.index]},addSubmenu:function(t){this.$set(this.submenus,t.index,t)},removeSubmenu:function(t){delete this.submenus[t.index]},handleClick:function(){var t=this.rootMenu,e=this.disabled;"hover"===t.menuTrigger&&"horizontal"===t.mode||t.collapse&&"vertical"===t.mode||e||this.dispatch("ElMenu","submenu-click",this)},handleMouseenter:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.showTimeout;if("ActiveXObject"in window||"focus"!==t.type||t.relatedTarget){var n=this.rootMenu,o=this.disabled;"click"===n.menuTrigger&&"horizontal"===n.mode||!n.collapse&&"vertical"===n.mode||o||(this.dispatch("ElSubmenu","mouse-enter-child"),clearTimeout(this.timeout),this.timeout=setTimeout(function(){e.rootMenu.openMenu(e.index,e.indexPath)},i),this.appendToBody&&this.$parent.$el.dispatchEvent(new MouseEvent("mouseenter")))}},handleMouseleave:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.rootMenu;"click"===i.menuTrigger&&"horizontal"===i.mode||!i.collapse&&"vertical"===i.mode||(this.dispatch("ElSubmenu","mouse-leave-child"),clearTimeout(this.timeout),this.timeout=setTimeout(function(){!t.mouseInChild&&t.rootMenu.closeMenu(t.index)},this.hideTimeout),this.appendToBody&&e&&"ElSubmenu"===this.$parent.$options.name&&this.$parent.handleMouseleave(!0))},handleTitleMouseenter:function(){if("horizontal"!==this.mode||this.rootMenu.backgroundColor){var t=this.$refs["submenu-title"];t&&(t.style.backgroundColor=this.rootMenu.hoverBackground)}},handleTitleMouseleave:function(){if("horizontal"!==this.mode||this.rootMenu.backgroundColor){var t=this.$refs["submenu-title"];t&&(t.style.backgroundColor=this.rootMenu.backgroundColor||"")}},updatePlacement:function(){this.currentPlacement="horizontal"===this.mode&&this.isFirstLevel?"bottom-start":"right-start"},initPopper:function(){this.referenceElm=this.$el,this.popperElm=this.$refs.menu,this.updatePlacement()}},created:function(){var t=this;this.$on("toggle-collapse",this.handleCollapseToggle),this.$on("mouse-enter-child",function(){t.mouseInChild=!0,clearTimeout(t.timeout)}),this.$on("mouse-leave-child",function(){t.mouseInChild=!1,clearTimeout(t.timeout)})},mounted:function(){this.parentMenu.addSubmenu(this),this.rootMenu.addSubmenu(this),this.initPopper()},beforeDestroy:function(){this.parentMenu.removeSubmenu(this),this.rootMenu.removeSubmenu(this)},render:function(t){var e=this,i=this.active,n=this.opened,o=this.paddingStyle,r=this.titleStyle,s=this.backgroundColor,a=this.rootMenu,l=this.currentPlacement,c=this.menuTransitionName,u=this.mode,h=this.disabled,p=this.popperClass,d=this.$slots,f=this.isFirstLevel,g=t("transition",{attrs:{name:c}},[t("div",{ref:"menu",directives:[{name:"show",value:n}],class:["el-menu--"+u,p],on:{mouseenter:function(t){return e.handleMouseenter(t,100)},mouseleave:function(){return e.handleMouseleave(!0)},focus:function(t){return e.handleMouseenter(t,100)}}},[t("ul",{attrs:{role:"menu"},class:["el-menu el-menu--popup","el-menu--popup-"+l],style:{backgroundColor:a.backgroundColor||""}},[d.default])])]),_=t("el-collapse-transition",[t("ul",{attrs:{role:"menu"},class:"el-menu el-menu--inline",directives:[{name:"show",value:n}],style:{backgroundColor:a.backgroundColor||""}},[d.default])]),m="horizontal"===a.mode&&f||"vertical"===a.mode&&!a.collapse?"el-icon-arrow-down":"el-icon-arrow-right";return t("li",{class:{"el-submenu":!0,"is-active":i,"is-opened":n,"is-disabled":h},attrs:{role:"menuitem","aria-haspopup":"true","aria-expanded":n},on:{mouseenter:this.handleMouseenter,mouseleave:function(){return e.handleMouseleave(!1)},focus:this.handleMouseenter}},[t("div",{class:"el-submenu__title",ref:"submenu-title",on:{click:this.handleClick,mouseenter:this.handleTitleMouseenter,mouseleave:this.handleTitleMouseleave},style:[o,r,{backgroundColor:s}]},[d.title,t("i",{class:["el-submenu__icon-arrow",m]})]),this.isMenuPopup?g:_])}},void 0,void 0,!1,null,null,null);Et.options.__file="packages/menu/src/submenu.vue";var Ct=Et.exports;Ct.install=function(t){t.component(Ct.name,Ct)};var St=Ct,kt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("li",{staticClass:"el-menu-item",class:{"is-active":t.active,"is-disabled":t.disabled},style:[t.paddingStyle,t.itemStyle,{backgroundColor:t.backgroundColor}],attrs:{role:"menuitem",tabindex:"-1"},on:{click:t.handleClick,mouseenter:t.onMouseEnter,focus:t.onMouseEnter,blur:t.onMouseLeave,mouseleave:t.onMouseLeave}},["ElMenu"===t.parentMenu.$options.componentName&&t.rootMenu.collapse&&t.$slots.title?i("el-tooltip",{attrs:{effect:"dark",placement:"right"}},[i("div",{attrs:{slot:"content"},slot:"content"},[t._t("title")],2),i("div",{staticStyle:{position:"absolute",left:"0",top:"0",height:"100%",width:"100%",display:"inline-block","box-sizing":"border-box",padding:"0 20px"}},[t._t("default")],2)]):[t._t("default"),t._t("title")]],2)};kt._withStripped=!0;var Ot=i(26),It=i.n(Ot),wt=o({name:"ElMenuItem",componentName:"ElMenuItem",mixins:[bt,S.a],components:{ElTooltip:It.a},props:{index:{default:null,validator:function(t){return"string"==typeof t||null===t}},route:[String,Object],disabled:Boolean},computed:{active:function(){return this.index===this.rootMenu.activeIndex},hoverBackground:function(){return this.rootMenu.hoverBackground},backgroundColor:function(){return this.rootMenu.backgroundColor||""},activeTextColor:function(){return this.rootMenu.activeTextColor||""},textColor:function(){return this.rootMenu.textColor||""},mode:function(){return this.rootMenu.mode},itemStyle:function(){var t={color:this.active?this.activeTextColor:this.textColor};return"horizontal"!==this.mode||this.isNested||(t.borderBottomColor=this.active?this.rootMenu.activeTextColor?this.activeTextColor:"":"transparent"),t},isNested:function(){return this.parentMenu!==this.rootMenu}},methods:{onMouseEnter:function(){("horizontal"!==this.mode||this.rootMenu.backgroundColor)&&(this.$el.style.backgroundColor=this.hoverBackground)},onMouseLeave:function(){("horizontal"!==this.mode||this.rootMenu.backgroundColor)&&(this.$el.style.backgroundColor=this.backgroundColor)},handleClick:function(){this.disabled||(this.dispatch("ElMenu","item-click",this),this.$emit("click",this))}},mounted:function(){this.parentMenu.addItem(this),this.rootMenu.addItem(this)},beforeDestroy:function(){this.parentMenu.removeItem(this),this.rootMenu.removeItem(this)}},kt,[],!1,null,null,null);wt.options.__file="packages/menu/src/menu-item.vue";var Rt=wt.exports;Rt.install=function(t){t.component(Rt.name,Rt)};var Dt=Rt,xt=function(){var t=this.$createElement,e=this._self._c||t;return e("li",{staticClass:"el-menu-item-group"},[e("div",{staticClass:"el-menu-item-group__title",style:{paddingLeft:this.levelPadding+"px"}},[this.$slots.title?this._t("title"):[this._v(this._s(this.title))]],2),e("ul",[this._t("default")],2)])};xt._withStripped=!0;var Mt=o({name:"ElMenuItemGroup",componentName:"ElMenuItemGroup",inject:["rootMenu"],props:{title:{type:String}},data:function(){return{paddingLeft:20}},computed:{levelPadding:function(){var t=20,e=this.$parent;if(this.rootMenu.collapse)return 20;for(;e&&"ElMenu"!==e.$options.componentName;)"ElSubmenu"===e.$options.componentName&&(t+=20),e=e.$parent;return t}}},xt,[],!1,null,null,null);Mt.options.__file="packages/menu/src/menu-item-group.vue";var At=Mt.exports;At.install=function(t){t.component(At.name,At)};var Nt=At,Lt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:["textarea"===t.type?"el-textarea":"el-input",t.inputSize?"el-input--"+t.inputSize:"",{"is-disabled":t.inputDisabled,"is-exceed":t.inputExceed,"el-input-group":t.$slots.prepend||t.$slots.append,"el-input-group--append":t.$slots.append,"el-input-group--prepend":t.$slots.prepend,"el-input--prefix":t.$slots.prefix||t.prefixIcon,"el-input--suffix":t.$slots.suffix||t.suffixIcon||t.clearable||t.showPassword}],on:{mouseenter:function(e){t.hovering=!0},mouseleave:function(e){t.hovering=!1}}},["textarea"!==t.type?[t.$slots.prepend?i("div",{staticClass:"el-input-group__prepend"},[t._t("prepend")],2):t._e(),"textarea"!==t.type?i("input",t._b({ref:"input",staticClass:"el-input__inner",attrs:{tabindex:t.tabindex,type:t.showPassword?t.passwordVisible?"text":"password":t.type,disabled:t.inputDisabled,readonly:t.readonly,autocomplete:t.autoComplete||t.autocomplete,"aria-label":t.label},on:{compositionstart:t.handleCompositionStart,compositionupdate:t.handleCompositionUpdate,compositionend:t.handleCompositionEnd,input:t.handleInput,focus:t.handleFocus,blur:t.handleBlur,change:t.handleChange}},"input",t.$attrs,!1)):t._e(),t.$slots.prefix||t.prefixIcon?i("span",{staticClass:"el-input__prefix"},[t._t("prefix"),t.prefixIcon?i("i",{staticClass:"el-input__icon",class:t.prefixIcon}):t._e()],2):t._e(),t.getSuffixVisible()?i("span",{staticClass:"el-input__suffix"},[i("span",{staticClass:"el-input__suffix-inner"},[t.showClear&&t.showPwdVisible&&t.isWordLimitVisible?t._e():[t._t("suffix"),t.suffixIcon?i("i",{staticClass:"el-input__icon",class:t.suffixIcon}):t._e()],t.showClear?i("i",{staticClass:"el-input__icon el-icon-circle-close el-input__clear",on:{mousedown:function(t){t.preventDefault()},click:t.clear}}):t._e(),t.showPwdVisible?i("i",{staticClass:"el-input__icon el-icon-view el-input__clear",on:{click:t.handlePasswordVisible}}):t._e(),t.isWordLimitVisible?i("span",{staticClass:"el-input__count"},[i("span",{staticClass:"el-input__count-inner"},[t._v("\n            "+t._s(t.textLength)+"/"+t._s(t.upperLimit)+"\n          ")])]):t._e()],2),t.validateState?i("i",{staticClass:"el-input__icon",class:["el-input__validateIcon",t.validateIcon]}):t._e()]):t._e(),t.$slots.append?i("div",{staticClass:"el-input-group__append"},[t._t("append")],2):t._e()]:i("textarea",t._b({ref:"textarea",staticClass:"el-textarea__inner",style:t.textareaStyle,attrs:{tabindex:t.tabindex,disabled:t.inputDisabled,readonly:t.readonly,autocomplete:t.autoComplete||t.autocomplete,"aria-label":t.label},on:{compositionstart:t.handleCompositionStart,compositionupdate:t.handleCompositionUpdate,compositionend:t.handleCompositionEnd,input:t.handleInput,focus:t.handleFocus,blur:t.handleBlur,change:t.handleChange}},"textarea",t.$attrs,!1)),t.isWordLimitVisible&&"textarea"===t.type?i("span",{staticClass:"el-input__count"},[t._v(t._s(t.textLength)+"/"+t._s(t.upperLimit))]):t._e()],2)};Lt._withStripped=!0;var Pt=void 0,Bt="\n  height:0 !important;\n  visibility:hidden !important;\n  overflow:hidden !important;\n  position:absolute !important;\n  z-index:-1000 !important;\n  top:0 !important;\n  right:0 !important\n",Ft=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function Ht(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Pt||(Pt=document.createElement("textarea"),document.body.appendChild(Pt));var n=function(t){var e=window.getComputedStyle(t),i=e.getPropertyValue("box-sizing"),n=parseFloat(e.getPropertyValue("padding-bottom"))+parseFloat(e.getPropertyValue("padding-top")),o=parseFloat(e.getPropertyValue("border-bottom-width"))+parseFloat(e.getPropertyValue("border-top-width"));return{contextStyle:Ft.map(function(t){return t+":"+e.getPropertyValue(t)}).join(";"),paddingSize:n,borderSize:o,boxSizing:i}}(t),o=n.paddingSize,r=n.borderSize,s=n.boxSizing,a=n.contextStyle;Pt.setAttribute("style",a+";"+Bt),Pt.value=t.value||t.placeholder||"";var l=Pt.scrollHeight,c={};"border-box"===s?l+=r:"content-box"===s&&(l-=o),Pt.value="";var u=Pt.scrollHeight-o;if(null!==e){var h=u*e;"border-box"===s&&(h=h+o+r),l=Math.max(h,l),c.minHeight=h+"px"}if(null!==i){var p=u*i;"border-box"===s&&(p=p+o+r),l=Math.min(p,l)}return c.height=l+"px",Pt.parentNode&&Pt.parentNode.removeChild(Pt),Pt=null,c}var Ut=i(7),Vt=i.n(Ut),Gt=i(19),Wt=o({name:"ElInput",componentName:"ElInput",mixins:[S.a,E.a],inheritAttrs:!1,inject:{elForm:{default:""},elFormItem:{default:""}},data:function(){return{textareaCalcStyle:{},hovering:!1,focused:!1,isComposing:!1,passwordVisible:!1}},props:{value:[String,Number],size:String,resize:String,form:String,disabled:Boolean,readonly:Boolean,type:{type:String,default:"text"},autosize:{type:[Boolean,Object],default:!1},autocomplete:{type:String,default:"off"},autoComplete:{type:String,validator:function(t){return!0}},validateEvent:{type:Boolean,default:!0},suffixIcon:String,prefixIcon:String,label:String,clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},showWordLimit:{type:Boolean,default:!1},tabindex:String},computed:{_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},validateState:function(){return this.elFormItem?this.elFormItem.validateState:""},needStatusIcon:function(){return!!this.elForm&&this.elForm.statusIcon},validateIcon:function(){return{validating:"el-icon-loading",success:"el-icon-circle-check",error:"el-icon-circle-close"}[this.validateState]},textareaStyle:function(){return Vt()({},this.textareaCalcStyle,{resize:this.resize})},inputSize:function(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size},inputDisabled:function(){return this.disabled||(this.elForm||{}).disabled},nativeInputValue:function(){return null===this.value||void 0===this.value?"":String(this.value)},showClear:function(){return this.clearable&&!this.inputDisabled&&!this.readonly&&this.nativeInputValue&&(this.focused||this.hovering)},showPwdVisible:function(){return this.showPassword&&!this.inputDisabled&&!this.readonly&&(!!this.nativeInputValue||this.focused)},isWordLimitVisible:function(){return this.showWordLimit&&this.$attrs.maxlength&&("text"===this.type||"textarea"===this.type)&&!this.inputDisabled&&!this.readonly&&!this.showPassword},upperLimit:function(){return this.$attrs.maxlength},textLength:function(){return"number"==typeof this.value?String(this.value).length:(this.value||"").length},inputExceed:function(){return this.isWordLimitVisible&&this.textLength>this.upperLimit}},watch:{value:function(t){this.$nextTick(this.resizeTextarea),this.validateEvent&&this.dispatch("ElFormItem","el.form.change",[t])},nativeInputValue:function(){this.setNativeInputValue()},type:function(){var t=this;this.$nextTick(function(){t.setNativeInputValue(),t.resizeTextarea(),t.updateIconOffset()})}},methods:{focus:function(){this.getInput().focus()},blur:function(){this.getInput().blur()},getMigratingConfig:function(){return{props:{icon:"icon is removed, use suffix-icon / prefix-icon instead.","on-icon-click":"on-icon-click is removed."},events:{click:"click is removed."}}},handleBlur:function(t){this.focused=!1,this.$emit("blur",t),this.validateEvent&&this.dispatch("ElFormItem","el.form.blur",[this.value])},select:function(){this.getInput().select()},resizeTextarea:function(){if(!this.$isServer){var t=this.autosize;if("textarea"===this.type)if(t){var e=t.minRows,i=t.maxRows;this.textareaCalcStyle=Ht(this.$refs.textarea,e,i)}else this.textareaCalcStyle={minHeight:Ht(this.$refs.textarea).minHeight}}},setNativeInputValue:function(){var t=this.getInput();t&&t.value!==this.nativeInputValue&&(t.value=this.nativeInputValue)},handleFocus:function(t){this.focused=!0,this.$emit("focus",t)},handleCompositionStart:function(){this.isComposing=!0},handleCompositionUpdate:function(t){var e=t.target.value,i=e[e.length-1]||"";this.isComposing=!Object(Gt.isKorean)(i)},handleCompositionEnd:function(t){this.isComposing&&(this.isComposing=!1,this.handleInput(t))},handleInput:function(t){this.isComposing||t.target.value!==this.nativeInputValue&&(this.$emit("input",t.target.value),this.$nextTick(this.setNativeInputValue))},handleChange:function(t){this.$emit("change",t.target.value)},calcIconOffset:function(t){var e=[].slice.call(this.$el.querySelectorAll(".el-input__"+t)||[]);if(e.length){for(var i=null,n=0;n<e.length;n++)if(e[n].parentNode===this.$el){i=e[n];break}if(i){var o={suffix:"append",prefix:"prepend"}[t];this.$slots[o]?i.style.transform="translateX("+("suffix"===t?"-":"")+this.$el.querySelector(".el-input-group__"+o).offsetWidth+"px)":i.removeAttribute("style")}}},updateIconOffset:function(){this.calcIconOffset("prefix"),this.calcIconOffset("suffix")},clear:function(){this.$emit("input",""),this.$emit("change",""),this.$emit("clear")},handlePasswordVisible:function(){var t=this;this.passwordVisible=!this.passwordVisible,this.$nextTick(function(){t.focus()})},getInput:function(){return this.$refs.input||this.$refs.textarea},getSuffixVisible:function(){return this.$slots.suffix||this.suffixIcon||this.showClear||this.showPassword||this.isWordLimitVisible||this.validateState&&this.needStatusIcon}},created:function(){this.$on("inputSelect",this.select)},mounted:function(){this.setNativeInputValue(),this.resizeTextarea(),this.updateIconOffset()},updated:function(){this.$nextTick(this.updateIconOffset)}},Lt,[],!1,null,null,null);Wt.options.__file="packages/input/src/input.vue";var $t=Wt.exports;$t.install=function(t){t.component($t.name,$t)};var jt=$t,zt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:["el-input-number",t.inputNumberSize?"el-input-number--"+t.inputNumberSize:"",{"is-disabled":t.inputNumberDisabled},{"is-without-controls":!t.controls},{"is-controls-right":t.controlsAtRight}],on:{dragstart:function(t){t.preventDefault()}}},[t.controls?i("span",{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:t.decrease,expression:"decrease"}],staticClass:"el-input-number__decrease",class:{"is-disabled":t.minDisabled},attrs:{role:"button"},on:{keydown:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.decrease(e):null}}},[i("i",{class:"el-icon-"+(t.controlsAtRight?"arrow-down":"minus")})]):t._e(),t.controls?i("span",{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:t.increase,expression:"increase"}],staticClass:"el-input-number__increase",class:{"is-disabled":t.maxDisabled},attrs:{role:"button"},on:{keydown:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.increase(e):null}}},[i("i",{class:"el-icon-"+(t.controlsAtRight?"arrow-up":"plus")})]):t._e(),i("el-input",{ref:"input",attrs:{value:t.displayValue,placeholder:t.placeholder,disabled:t.inputNumberDisabled,size:t.inputNumberSize,max:t.max,min:t.min,name:t.name,label:t.label},on:{blur:t.handleBlur,focus:t.handleFocus,input:t.handleInput,change:t.handleInputChange},nativeOn:{keydown:[function(e){return"button"in e||!t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?(e.preventDefault(),t.increase(e)):null},function(e){return"button"in e||!t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?(e.preventDefault(),t.decrease(e)):null}]}})],1)};zt._withStripped=!0;var Xt={bind:function(t,e,i){var n=null,o=void 0,r=function(){return i.context[e.expression].apply()},s=function(){Date.now()-o<100&&r(),clearInterval(n),n=null};Object(ft.on)(t,"mousedown",function(t){0===t.button&&(o=Date.now(),Object(ft.once)(document,"mouseup",s),clearInterval(n),n=setInterval(r,100))})}},Yt=o({name:"ElInputNumber",mixins:[V()("input")],inject:{elForm:{default:""},elFormItem:{default:""}},directives:{repeatClick:Xt},components:{ElInput:p.a},props:{step:{type:Number,default:1},stepStrictly:{type:Boolean,default:!1},max:{type:Number,default:1/0},min:{type:Number,default:-1/0},value:{},disabled:Boolean,size:String,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:""},name:String,label:String,placeholder:String,precision:{type:Number,validator:function(t){return t>=0&&t===parseInt(t,10)}}},data:function(){return{currentValue:0,userInput:null}},watch:{value:{immediate:!0,handler:function(t){var e=void 0===t?t:Number(t);if(void 0!==e){if(isNaN(e))return;if(this.stepStrictly){var i=this.getPrecision(this.step),n=Math.pow(10,i);e=Math.round(e/this.step)*n*this.step/n}void 0!==this.precision&&(e=this.toPrecision(e,this.precision))}e>=this.max&&(e=this.max),e<=this.min&&(e=this.min),this.currentValue=e,this.userInput=null,this.$emit("input",e)}}},computed:{minDisabled:function(){return this._decrease(this.value,this.step)<this.min},maxDisabled:function(){return this._increase(this.value,this.step)>this.max},numPrecision:function(){var t=this.value,e=this.step,i=this.getPrecision,n=this.precision,o=i(e);return void 0!==n?(o>n&&console.warn("[Element Warn][InputNumber]precision should not be less than the decimal places of step"),n):Math.max(i(t),o)},controlsAtRight:function(){return this.controls&&"right"===this.controlsPosition},_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},inputNumberSize:function(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size},inputNumberDisabled:function(){return this.disabled||!!(this.elForm||{}).disabled},displayValue:function(){if(null!==this.userInput)return this.userInput;var t=this.currentValue;if("number"==typeof t){if(this.stepStrictly){var e=this.getPrecision(this.step),i=Math.pow(10,e);t=Math.round(t/this.step)*i*this.step/i}void 0!==this.precision&&(t=t.toFixed(this.precision))}return t}},methods:{toPrecision:function(t,e){return void 0===e&&(e=this.numPrecision),parseFloat(Math.round(t*Math.pow(10,e))/Math.pow(10,e))},getPrecision:function(t){if(void 0===t)return 0;var e=t.toString(),i=e.indexOf("."),n=0;return-1!==i&&(n=e.length-i-1),n},_increase:function(t,e){if("number"!=typeof t&&void 0!==t)return this.currentValue;var i=Math.pow(10,this.numPrecision);return this.toPrecision((i*t+i*e)/i)},_decrease:function(t,e){if("number"!=typeof t&&void 0!==t)return this.currentValue;var i=Math.pow(10,this.numPrecision);return this.toPrecision((i*t-i*e)/i)},increase:function(){if(!this.inputNumberDisabled&&!this.maxDisabled){var t=this.value||0,e=this._increase(t,this.step);this.setCurrentValue(e)}},decrease:function(){if(!this.inputNumberDisabled&&!this.minDisabled){var t=this.value||0,e=this._decrease(t,this.step);this.setCurrentValue(e)}},handleBlur:function(t){this.$emit("blur",t)},handleFocus:function(t){this.$emit("focus",t)},setCurrentValue:function(t){var e=this.currentValue;"number"==typeof t&&void 0!==this.precision&&(t=this.toPrecision(t,this.precision)),t>=this.max&&(t=this.max),t<=this.min&&(t=this.min),e!==t&&(this.userInput=null,this.$emit("input",t),this.$emit("change",t,e),this.currentValue=t)},handleInput:function(t){this.userInput=t},handleInputChange:function(t){var e=""===t?void 0:Number(t);isNaN(e)&&""!==t||this.setCurrentValue(e),this.userInput=null},select:function(){this.$refs.input.select()}},mounted:function(){var t=this.$refs.input.$refs.input;t.setAttribute("role","spinbutton"),t.setAttribute("aria-valuemax",this.max),t.setAttribute("aria-valuemin",this.min),t.setAttribute("aria-valuenow",this.currentValue),t.setAttribute("aria-disabled",this.inputNumberDisabled)},updated:function(){this.$refs&&this.$refs.input&&this.$refs.input.$refs.input.setAttribute("aria-valuenow",this.currentValue)}},zt,[],!1,null,null,null);Yt.options.__file="packages/input-number/src/input-number.vue";var Kt=Yt.exports;Kt.install=function(t){t.component(Kt.name,Kt)};var Jt=Kt,qt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("label",{staticClass:"el-radio",class:[t.border&&t.radioSize?"el-radio--"+t.radioSize:"",{"is-disabled":t.isDisabled},{"is-focus":t.focus},{"is-bordered":t.border},{"is-checked":t.model===t.label}],attrs:{role:"radio","aria-checked":t.model===t.label,"aria-disabled":t.isDisabled,tabindex:t.tabIndex},on:{keydown:function(e){if(!("button"in e)&&t._k(e.keyCode,"space",32,e.key,[" ","Spacebar"]))return null;e.stopPropagation(),e.preventDefault(),t.model=t.isDisabled?t.model:t.label}}},[i("span",{staticClass:"el-radio__input",class:{"is-disabled":t.isDisabled,"is-checked":t.model===t.label}},[i("span",{staticClass:"el-radio__inner"}),i("input",{directives:[{name:"model",rawName:"v-model",value:t.model,expression:"model"}],ref:"radio",staticClass:"el-radio__original",attrs:{type:"radio","aria-hidden":"true",name:t.name,disabled:t.isDisabled,tabindex:"-1"},domProps:{value:t.label,checked:t._q(t.model,t.label)},on:{focus:function(e){t.focus=!0},blur:function(e){t.focus=!1},change:[function(e){t.model=t.label},t.handleChange]}})]),i("span",{staticClass:"el-radio__label",on:{keydown:function(t){t.stopPropagation()}}},[t._t("default"),t.$slots.default?t._e():[t._v(t._s(t.label))]],2)])};qt._withStripped=!0;var Zt=o({name:"ElRadio",mixins:[S.a],inject:{elForm:{default:""},elFormItem:{default:""}},componentName:"ElRadio",props:{value:{},label:{},disabled:Boolean,name:String,border:Boolean,size:String},data:function(){return{focus:!1}},computed:{isGroup:function(){for(var t=this.$parent;t;){if("ElRadioGroup"===t.$options.componentName)return this._radioGroup=t,!0;t=t.$parent}return!1},model:{get:function(){return this.isGroup?this._radioGroup.value:this.value},set:function(t){this.isGroup?this.dispatch("ElRadioGroup","input",[t]):this.$emit("input",t),this.$refs.radio&&(this.$refs.radio.checked=this.model===this.label)}},_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},radioSize:function(){var t=this.size||this._elFormItemSize||(this.$ELEMENT||{}).size;return this.isGroup&&this._radioGroup.radioGroupSize||t},isDisabled:function(){return this.isGroup?this._radioGroup.disabled||this.disabled||(this.elForm||{}).disabled:this.disabled||(this.elForm||{}).disabled},tabIndex:function(){return this.isDisabled||this.isGroup&&this.model!==this.label?-1:0}},methods:{handleChange:function(){var t=this;this.$nextTick(function(){t.$emit("change",t.model),t.isGroup&&t.dispatch("ElRadioGroup","handleChange",t.model)})}}},qt,[],!1,null,null,null);Zt.options.__file="packages/radio/src/radio.vue";var Qt=Zt.exports;Qt.install=function(t){t.component(Qt.name,Qt)};var te=Qt,ee=function(){var t=this.$createElement;return(this._self._c||t)(this._elTag,{tag:"component",staticClass:"el-radio-group",attrs:{role:"radiogroup"},on:{keydown:this.handleKeydown}},[this._t("default")],2)};ee._withStripped=!0;var ie=Object.freeze({LEFT:37,UP:38,RIGHT:39,DOWN:40}),ne=o({name:"ElRadioGroup",componentName:"ElRadioGroup",inject:{elFormItem:{default:""}},mixins:[S.a],props:{value:{},size:String,fill:String,textColor:String,disabled:Boolean},computed:{_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},_elTag:function(){return(this.$vnode.data||{}).tag||"div"},radioGroupSize:function(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size}},created:function(){var t=this;this.$on("handleChange",function(e){t.$emit("change",e)})},mounted:function(){var t=this.$el.querySelectorAll("[type=radio]"),e=this.$el.querySelectorAll("[role=radio]")[0];![].some.call(t,function(t){return t.checked})&&e&&(e.tabIndex=0)},methods:{handleKeydown:function(t){var e=t.target,i="INPUT"===e.nodeName?"[type=radio]":"[role=radio]",n=this.$el.querySelectorAll(i),o=n.length,r=[].indexOf.call(n,e),s=this.$el.querySelectorAll("[role=radio]");switch(t.keyCode){case ie.LEFT:case ie.UP:t.stopPropagation(),t.preventDefault(),0===r?(s[o-1].click(),s[o-1].focus()):(s[r-1].click(),s[r-1].focus());break;case ie.RIGHT:case ie.DOWN:r===o-1?(t.stopPropagation(),t.preventDefault(),s[0].click(),s[0].focus()):(s[r+1].click(),s[r+1].focus())}}},watch:{value:function(t){this.dispatch("ElFormItem","el.form.change",[this.value])}}},ee,[],!1,null,null,null);ne.options.__file="packages/radio/src/radio-group.vue";var oe=ne.exports;oe.install=function(t){t.component(oe.name,oe)};var re=oe,se=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("label",{staticClass:"el-radio-button",class:[t.size?"el-radio-button--"+t.size:"",{"is-active":t.value===t.label},{"is-disabled":t.isDisabled},{"is-focus":t.focus}],attrs:{role:"radio","aria-checked":t.value===t.label,"aria-disabled":t.isDisabled,tabindex:t.tabIndex},on:{keydown:function(e){if(!("button"in e)&&t._k(e.keyCode,"space",32,e.key,[" ","Spacebar"]))return null;e.stopPropagation(),e.preventDefault(),t.value=t.isDisabled?t.value:t.label}}},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.value,expression:"value"}],staticClass:"el-radio-button__orig-radio",attrs:{type:"radio",name:t.name,disabled:t.isDisabled,tabindex:"-1"},domProps:{value:t.label,checked:t._q(t.value,t.label)},on:{change:[function(e){t.value=t.label},t.handleChange],focus:function(e){t.focus=!0},blur:function(e){t.focus=!1}}}),i("span",{staticClass:"el-radio-button__inner",style:t.value===t.label?t.activeStyle:null,on:{keydown:function(t){t.stopPropagation()}}},[t._t("default"),t.$slots.default?t._e():[t._v(t._s(t.label))]],2)])};se._withStripped=!0;var ae=o({name:"ElRadioButton",mixins:[S.a],inject:{elForm:{default:""},elFormItem:{default:""}},props:{label:{},disabled:Boolean,name:String},data:function(){return{focus:!1}},computed:{value:{get:function(){return this._radioGroup.value},set:function(t){this._radioGroup.$emit("input",t)}},_radioGroup:function(){for(var t=this.$parent;t;){if("ElRadioGroup"===t.$options.componentName)return t;t=t.$parent}return!1},activeStyle:function(){return{backgroundColor:this._radioGroup.fill||"",borderColor:this._radioGroup.fill||"",boxShadow:this._radioGroup.fill?"-1px 0 0 0 "+this._radioGroup.fill:"",color:this._radioGroup.textColor||""}},_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},size:function(){return this._radioGroup.radioGroupSize||this._elFormItemSize||(this.$ELEMENT||{}).size},isDisabled:function(){return this.disabled||this._radioGroup.disabled||(this.elForm||{}).disabled},tabIndex:function(){return this.isDisabled||this._radioGroup&&this.value!==this.label?-1:0}},methods:{handleChange:function(){var t=this;this.$nextTick(function(){t.dispatch("ElRadioGroup","handleChange",t.value)})}}},se,[],!1,null,null,null);ae.options.__file="packages/radio/src/radio-button.vue";var le=ae.exports;le.install=function(t){t.component(le.name,le)};var ce=le,ue=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("label",{staticClass:"el-checkbox",class:[t.border&&t.checkboxSize?"el-checkbox--"+t.checkboxSize:"",{"is-disabled":t.isDisabled},{"is-bordered":t.border},{"is-checked":t.isChecked}],attrs:{id:t.id}},[i("span",{staticClass:"el-checkbox__input",class:{"is-disabled":t.isDisabled,"is-checked":t.isChecked,"is-indeterminate":t.indeterminate,"is-focus":t.focus},attrs:{tabindex:!!t.indeterminate&&0,role:!!t.indeterminate&&"checkbox","aria-checked":!!t.indeterminate&&"mixed"}},[i("span",{staticClass:"el-checkbox__inner"}),t.trueLabel||t.falseLabel?i("input",{directives:[{name:"model",rawName:"v-model",value:t.model,expression:"model"}],staticClass:"el-checkbox__original",attrs:{type:"checkbox","aria-hidden":t.indeterminate?"true":"false",name:t.name,disabled:t.isDisabled,"true-value":t.trueLabel,"false-value":t.falseLabel},domProps:{checked:Array.isArray(t.model)?t._i(t.model,null)>-1:t._q(t.model,t.trueLabel)},on:{change:[function(e){var i=t.model,n=e.target,o=n.checked?t.trueLabel:t.falseLabel;if(Array.isArray(i)){var r=t._i(i,null);n.checked?r<0&&(t.model=i.concat([null])):r>-1&&(t.model=i.slice(0,r).concat(i.slice(r+1)))}else t.model=o},t.handleChange],focus:function(e){t.focus=!0},blur:function(e){t.focus=!1}}}):i("input",{directives:[{name:"model",rawName:"v-model",value:t.model,expression:"model"}],staticClass:"el-checkbox__original",attrs:{type:"checkbox","aria-hidden":t.indeterminate?"true":"false",disabled:t.isDisabled,name:t.name},domProps:{value:t.label,checked:Array.isArray(t.model)?t._i(t.model,t.label)>-1:t.model},on:{change:[function(e){var i=t.model,n=e.target,o=!!n.checked;if(Array.isArray(i)){var r=t.label,s=t._i(i,r);n.checked?s<0&&(t.model=i.concat([r])):s>-1&&(t.model=i.slice(0,s).concat(i.slice(s+1)))}else t.model=o},t.handleChange],focus:function(e){t.focus=!0},blur:function(e){t.focus=!1}}})]),t.$slots.default||t.label?i("span",{staticClass:"el-checkbox__label"},[t._t("default"),t.$slots.default?t._e():[t._v(t._s(t.label))]],2):t._e()])};ue._withStripped=!0;var he=o({name:"ElCheckbox",mixins:[S.a],inject:{elForm:{default:""},elFormItem:{default:""}},componentName:"ElCheckbox",data:function(){return{selfModel:!1,focus:!1,isLimitExceeded:!1}},computed:{model:{get:function(){return this.isGroup?this.store:void 0!==this.value?this.value:this.selfModel},set:function(t){this.isGroup?(this.isLimitExceeded=!1,void 0!==this._checkboxGroup.min&&t.length<this._checkboxGroup.min&&(this.isLimitExceeded=!0),void 0!==this._checkboxGroup.max&&t.length>this._checkboxGroup.max&&(this.isLimitExceeded=!0),!1===this.isLimitExceeded&&this.dispatch("ElCheckboxGroup","input",[t])):(this.$emit("input",t),this.selfModel=t)}},isChecked:function(){return"[object Boolean]"==={}.toString.call(this.model)?this.model:Array.isArray(this.model)?this.model.indexOf(this.label)>-1:null!==this.model&&void 0!==this.model?this.model===this.trueLabel:void 0},isGroup:function(){for(var t=this.$parent;t;){if("ElCheckboxGroup"===t.$options.componentName)return this._checkboxGroup=t,!0;t=t.$parent}return!1},store:function(){return this._checkboxGroup?this._checkboxGroup.value:this.value},isLimitDisabled:function(){var t=this._checkboxGroup,e=t.max,i=t.min;return!(!e&&!i)&&this.model.length>=e&&!this.isChecked||this.model.length<=i&&this.isChecked},isDisabled:function(){return this.isGroup?this._checkboxGroup.disabled||this.disabled||(this.elForm||{}).disabled||this.isLimitDisabled:this.disabled||(this.elForm||{}).disabled},_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},checkboxSize:function(){var t=this.size||this._elFormItemSize||(this.$ELEMENT||{}).size;return this.isGroup&&this._checkboxGroup.checkboxGroupSize||t}},props:{value:{},label:{},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:String,trueLabel:[String,Number],falseLabel:[String,Number],id:String,controls:String,border:Boolean,size:String},methods:{addToStore:function(){Array.isArray(this.model)&&-1===this.model.indexOf(this.label)?this.model.push(this.label):this.model=this.trueLabel||!0},handleChange:function(t){var e=this;if(!this.isLimitExceeded){var i=void 0;i=t.target.checked?void 0===this.trueLabel||this.trueLabel:void 0!==this.falseLabel&&this.falseLabel,this.$emit("change",i,t),this.$nextTick(function(){e.isGroup&&e.dispatch("ElCheckboxGroup","change",[e._checkboxGroup.value])})}}},created:function(){this.checked&&this.addToStore()},mounted:function(){this.indeterminate&&this.$el.setAttribute("aria-controls",this.controls)},watch:{value:function(t){this.dispatch("ElFormItem","el.form.change",t)}}},ue,[],!1,null,null,null);he.options.__file="packages/checkbox/src/checkbox.vue";var pe=he.exports;pe.install=function(t){t.component(pe.name,pe)};var de=pe,fe=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("label",{staticClass:"el-checkbox-button",class:[t.size?"el-checkbox-button--"+t.size:"",{"is-disabled":t.isDisabled},{"is-checked":t.isChecked},{"is-focus":t.focus}],attrs:{role:"checkbox","aria-checked":t.isChecked,"aria-disabled":t.isDisabled}},[t.trueLabel||t.falseLabel?i("input",{directives:[{name:"model",rawName:"v-model",value:t.model,expression:"model"}],staticClass:"el-checkbox-button__original",attrs:{type:"checkbox",name:t.name,disabled:t.isDisabled,"true-value":t.trueLabel,"false-value":t.falseLabel},domProps:{checked:Array.isArray(t.model)?t._i(t.model,null)>-1:t._q(t.model,t.trueLabel)},on:{change:[function(e){var i=t.model,n=e.target,o=n.checked?t.trueLabel:t.falseLabel;if(Array.isArray(i)){var r=t._i(i,null);n.checked?r<0&&(t.model=i.concat([null])):r>-1&&(t.model=i.slice(0,r).concat(i.slice(r+1)))}else t.model=o},t.handleChange],focus:function(e){t.focus=!0},blur:function(e){t.focus=!1}}}):i("input",{directives:[{name:"model",rawName:"v-model",value:t.model,expression:"model"}],staticClass:"el-checkbox-button__original",attrs:{type:"checkbox",name:t.name,disabled:t.isDisabled},domProps:{value:t.label,checked:Array.isArray(t.model)?t._i(t.model,t.label)>-1:t.model},on:{change:[function(e){var i=t.model,n=e.target,o=!!n.checked;if(Array.isArray(i)){var r=t.label,s=t._i(i,r);n.checked?s<0&&(t.model=i.concat([r])):s>-1&&(t.model=i.slice(0,s).concat(i.slice(s+1)))}else t.model=o},t.handleChange],focus:function(e){t.focus=!0},blur:function(e){t.focus=!1}}}),t.$slots.default||t.label?i("span",{staticClass:"el-checkbox-button__inner",style:t.isChecked?t.activeStyle:null},[t._t("default",[t._v(t._s(t.label))])],2):t._e()])};fe._withStripped=!0;var ge=o({name:"ElCheckboxButton",mixins:[S.a],inject:{elForm:{default:""},elFormItem:{default:""}},data:function(){return{selfModel:!1,focus:!1,isLimitExceeded:!1}},props:{value:{},label:{},disabled:Boolean,checked:Boolean,name:String,trueLabel:[String,Number],falseLabel:[String,Number]},computed:{model:{get:function(){return this._checkboxGroup?this.store:void 0!==this.value?this.value:this.selfModel},set:function(t){this._checkboxGroup?(this.isLimitExceeded=!1,void 0!==this._checkboxGroup.min&&t.length<this._checkboxGroup.min&&(this.isLimitExceeded=!0),void 0!==this._checkboxGroup.max&&t.length>this._checkboxGroup.max&&(this.isLimitExceeded=!0),!1===this.isLimitExceeded&&this.dispatch("ElCheckboxGroup","input",[t])):void 0!==this.value?this.$emit("input",t):this.selfModel=t}},isChecked:function(){return"[object Boolean]"==={}.toString.call(this.model)?this.model:Array.isArray(this.model)?this.model.indexOf(this.label)>-1:null!==this.model&&void 0!==this.model?this.model===this.trueLabel:void 0},_checkboxGroup:function(){for(var t=this.$parent;t;){if("ElCheckboxGroup"===t.$options.componentName)return t;t=t.$parent}return!1},store:function(){return this._checkboxGroup?this._checkboxGroup.value:this.value},activeStyle:function(){return{backgroundColor:this._checkboxGroup.fill||"",borderColor:this._checkboxGroup.fill||"",color:this._checkboxGroup.textColor||"","box-shadow":"-1px 0 0 0 "+this._checkboxGroup.fill}},_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},size:function(){return this._checkboxGroup.checkboxGroupSize||this._elFormItemSize||(this.$ELEMENT||{}).size},isLimitDisabled:function(){var t=this._checkboxGroup,e=t.max,i=t.min;return!(!e&&!i)&&this.model.length>=e&&!this.isChecked||this.model.length<=i&&this.isChecked},isDisabled:function(){return this._checkboxGroup?this._checkboxGroup.disabled||this.disabled||(this.elForm||{}).disabled||this.isLimitDisabled:this.disabled||(this.elForm||{}).disabled}},methods:{addToStore:function(){Array.isArray(this.model)&&-1===this.model.indexOf(this.label)?this.model.push(this.label):this.model=this.trueLabel||!0},handleChange:function(t){var e=this;if(!this.isLimitExceeded){var i=void 0;i=t.target.checked?void 0===this.trueLabel||this.trueLabel:void 0!==this.falseLabel&&this.falseLabel,this.$emit("change",i,t),this.$nextTick(function(){e._checkboxGroup&&e.dispatch("ElCheckboxGroup","change",[e._checkboxGroup.value])})}}},created:function(){this.checked&&this.addToStore()}},fe,[],!1,null,null,null);ge.options.__file="packages/checkbox/src/checkbox-button.vue";var _e=ge.exports;_e.install=function(t){t.component(_e.name,_e)};var me=_e,ve=function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"el-checkbox-group",attrs:{role:"group","aria-label":"checkbox-group"}},[this._t("default")],2)};ve._withStripped=!0;var ye=o({name:"ElCheckboxGroup",componentName:"ElCheckboxGroup",mixins:[S.a],inject:{elFormItem:{default:""}},props:{value:{},disabled:Boolean,min:Number,max:Number,size:String,fill:String,textColor:String},computed:{_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},checkboxGroupSize:function(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size}},watch:{value:function(t){this.dispatch("ElFormItem","el.form.change",[t])}}},ve,[],!1,null,null,null);ye.options.__file="packages/checkbox/src/checkbox-group.vue";var be=ye.exports;be.install=function(t){t.component(be.name,be)};var Te=be,Ee=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"el-switch",class:{"is-disabled":t.switchDisabled,"is-checked":t.checked},attrs:{role:"switch","aria-checked":t.checked,"aria-disabled":t.switchDisabled},on:{click:function(e){return e.preventDefault(),t.switchValue(e)}}},[i("input",{ref:"input",staticClass:"el-switch__input",attrs:{type:"checkbox",id:t.id,name:t.name,"true-value":t.activeValue,"false-value":t.inactiveValue,disabled:t.switchDisabled},on:{change:t.handleChange,keydown:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.switchValue(e):null}}}),t.inactiveIconClass||t.inactiveText?i("span",{class:["el-switch__label","el-switch__label--left",t.checked?"":"is-active"]},[t.inactiveIconClass?i("i",{class:[t.inactiveIconClass]}):t._e(),!t.inactiveIconClass&&t.inactiveText?i("span",{attrs:{"aria-hidden":t.checked}},[t._v(t._s(t.inactiveText))]):t._e()]):t._e(),i("span",{ref:"core",staticClass:"el-switch__core",style:{width:t.coreWidth+"px"}}),t.activeIconClass||t.activeText?i("span",{class:["el-switch__label","el-switch__label--right",t.checked?"is-active":""]},[t.activeIconClass?i("i",{class:[t.activeIconClass]}):t._e(),!t.activeIconClass&&t.activeText?i("span",{attrs:{"aria-hidden":!t.checked}},[t._v(t._s(t.activeText))]):t._e()]):t._e()])};Ee._withStripped=!0;var Ce=o({name:"ElSwitch",mixins:[V()("input"),E.a,S.a],inject:{elForm:{default:""}},props:{value:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:!1},width:{type:Number,default:40},activeIconClass:{type:String,default:""},inactiveIconClass:{type:String,default:""},activeText:String,inactiveText:String,activeColor:{type:String,default:""},inactiveColor:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},id:String},data:function(){return{coreWidth:this.width}},created:function(){~[this.activeValue,this.inactiveValue].indexOf(this.value)||this.$emit("input",this.inactiveValue)},computed:{checked:function(){return this.value===this.activeValue},switchDisabled:function(){return this.disabled||(this.elForm||{}).disabled}},watch:{checked:function(){this.$refs.input.checked=this.checked,(this.activeColor||this.inactiveColor)&&this.setBackgroundColor(),this.validateEvent&&this.dispatch("ElFormItem","el.form.change",[this.value])}},methods:{handleChange:function(t){var e=this,i=this.checked?this.inactiveValue:this.activeValue;this.$emit("input",i),this.$emit("change",i),this.$nextTick(function(){e.$refs.input.checked=e.checked})},setBackgroundColor:function(){var t=this.checked?this.activeColor:this.inactiveColor;this.$refs.core.style.borderColor=t,this.$refs.core.style.backgroundColor=t},switchValue:function(){!this.switchDisabled&&this.handleChange()},getMigratingConfig:function(){return{props:{"on-color":"on-color is renamed to active-color.","off-color":"off-color is renamed to inactive-color.","on-text":"on-text is renamed to active-text.","off-text":"off-text is renamed to inactive-text.","on-value":"on-value is renamed to active-value.","off-value":"off-value is renamed to inactive-value.","on-icon-class":"on-icon-class is renamed to active-icon-class.","off-icon-class":"off-icon-class is renamed to inactive-icon-class."}}}},mounted:function(){this.coreWidth=this.width||40,(this.activeColor||this.inactiveColor)&&this.setBackgroundColor(),this.$refs.input.checked=this.checked}},Ee,[],!1,null,null,null);Ce.options.__file="packages/switch/src/component.vue";var Se=Ce.exports;Se.install=function(t){t.component(Se.name,Se)};var ke=Se,Oe=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:t.handleClose,expression:"handleClose"}],staticClass:"el-select",class:[t.selectSize?"el-select--"+t.selectSize:""],on:{click:function(e){return e.stopPropagation(),t.toggleMenu(e)}}},[t.multiple?i("div",{ref:"tags",staticClass:"el-select__tags",style:{"max-width":t.inputWidth-32+"px",width:"100%"}},[t.collapseTags&&t.selected.length?i("span",[i("el-tag",{attrs:{closable:!t.selectDisabled,size:t.collapseTagSize,hit:t.selected[0].hitState,type:"info","disable-transitions":""},on:{close:function(e){t.deleteTag(e,t.selected[0])}}},[i("span",{staticClass:"el-select__tags-text"},[t._v(t._s(t.selected[0].currentLabel))])]),t.selected.length>1?i("el-tag",{attrs:{closable:!1,size:t.collapseTagSize,type:"info","disable-transitions":""}},[i("span",{staticClass:"el-select__tags-text"},[t._v("+ "+t._s(t.selected.length-1))])]):t._e()],1):t._e(),t.collapseTags?t._e():i("transition-group",{on:{"after-leave":t.resetInputHeight}},t._l(t.selected,function(e){return i("el-tag",{key:t.getValueKey(e),attrs:{closable:!t.selectDisabled,size:t.collapseTagSize,hit:e.hitState,type:"info","disable-transitions":""},on:{close:function(i){t.deleteTag(i,e)}}},[i("span",{staticClass:"el-select__tags-text"},[t._v(t._s(e.currentLabel))])])}),1),t.filterable?i("input",{directives:[{name:"model",rawName:"v-model",value:t.query,expression:"query"}],ref:"input",staticClass:"el-select__input",class:[t.selectSize?"is-"+t.selectSize:""],style:{"flex-grow":"1",width:t.inputLength/(t.inputWidth-32)+"%","max-width":t.inputWidth-42+"px"},attrs:{type:"text",disabled:t.selectDisabled,autocomplete:t.autoComplete||t.autocomplete},domProps:{value:t.query},on:{focus:t.handleFocus,blur:function(e){t.softFocus=!1},keyup:t.managePlaceholder,keydown:[t.resetInputState,function(e){if(!("button"in e)&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"]))return null;e.preventDefault(),t.navigateOptions("next")},function(e){if(!("button"in e)&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"]))return null;e.preventDefault(),t.navigateOptions("prev")},function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?(e.preventDefault(),t.selectOption(e)):null},function(e){if(!("button"in e)&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"]))return null;e.stopPropagation(),e.preventDefault(),t.visible=!1},function(e){return"button"in e||!t._k(e.keyCode,"delete",[8,46],e.key,["Backspace","Delete","Del"])?t.deletePrevTag(e):null},function(e){if(!("button"in e)&&t._k(e.keyCode,"tab",9,e.key,"Tab"))return null;t.visible=!1}],compositionstart:t.handleComposition,compositionupdate:t.handleComposition,compositionend:t.handleComposition,input:[function(e){e.target.composing||(t.query=e.target.value)},t.debouncedQueryChange]}}):t._e()],1):t._e(),i("el-input",{ref:"reference",class:{"is-focus":t.visible},attrs:{type:"text",placeholder:t.currentPlaceholder,name:t.name,id:t.id,autocomplete:t.autoComplete||t.autocomplete,size:t.selectSize,disabled:t.selectDisabled,readonly:t.readonly,"validate-event":!1,tabindex:t.multiple&&t.filterable?"-1":null},on:{focus:t.handleFocus,blur:t.handleBlur},nativeOn:{keyup:function(e){return t.debouncedOnInputChange(e)},keydown:[function(e){if(!("button"in e)&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"]))return null;e.stopPropagation(),e.preventDefault(),t.navigateOptions("next")},function(e){if(!("button"in e)&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"]))return null;e.stopPropagation(),e.preventDefault(),t.navigateOptions("prev")},function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?(e.preventDefault(),t.selectOption(e)):null},function(e){if(!("button"in e)&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"]))return null;e.stopPropagation(),e.preventDefault(),t.visible=!1},function(e){if(!("button"in e)&&t._k(e.keyCode,"tab",9,e.key,"Tab"))return null;t.visible=!1}],paste:function(e){return t.debouncedOnInputChange(e)},mouseenter:function(e){t.inputHovering=!0},mouseleave:function(e){t.inputHovering=!1}},model:{value:t.selectedLabel,callback:function(e){t.selectedLabel=e},expression:"selectedLabel"}},[t.$slots.prefix?i("template",{slot:"prefix"},[t._t("prefix")],2):t._e(),i("template",{slot:"suffix"},[i("i",{directives:[{name:"show",rawName:"v-show",value:!t.showClose,expression:"!showClose"}],class:["el-select__caret","el-input__icon","el-icon-"+t.iconClass]}),t.showClose?i("i",{staticClass:"el-select__caret el-input__icon el-icon-circle-close",on:{click:t.handleClearClick}}):t._e()])],2),i("transition",{attrs:{name:"el-zoom-in-top"},on:{"before-enter":t.handleMenuEnter,"after-leave":t.doDestroy}},[i("el-select-menu",{directives:[{name:"show",rawName:"v-show",value:t.visible&&!1!==t.emptyText,expression:"visible && emptyText !== false"}],ref:"popper",attrs:{"append-to-body":t.popperAppendToBody}},[i("el-scrollbar",{directives:[{name:"show",rawName:"v-show",value:t.options.length>0&&!t.loading,expression:"options.length > 0 && !loading"}],ref:"scrollbar",class:{"is-empty":!t.allowCreate&&t.query&&0===t.filteredOptionsCount},attrs:{tag:"ul","wrap-class":"el-select-dropdown__wrap","view-class":"el-select-dropdown__list"}},[t.showNewOption?i("el-option",{attrs:{value:t.query,created:""}}):t._e(),t._t("default")],2),t.emptyText&&(!t.allowCreate||t.loading||t.allowCreate&&0===t.options.length)?[t.$slots.empty?t._t("empty"):i("p",{staticClass:"el-select-dropdown__empty"},[t._v("\n          "+t._s(t.emptyText)+"\n        ")])]:t._e()],2)],1)],1)};Oe._withStripped=!0;var Ie=function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"el-select-dropdown el-popper",class:[{"is-multiple":this.$parent.multiple},this.popperClass],style:{minWidth:this.minWidth}},[this._t("default")],2)};Ie._withStripped=!0;var we=o({name:"ElSelectDropdown",componentName:"ElSelectDropdown",mixins:[L.a],props:{placement:{default:"bottom-start"},boundariesPadding:{default:0},popperOptions:{default:function(){return{gpuAcceleration:!1}}},visibleArrow:{default:!0},appendToBody:{type:Boolean,default:!0}},data:function(){return{minWidth:""}},computed:{popperClass:function(){return this.$parent.popperClass}},watch:{"$parent.inputWidth":function(){this.minWidth=this.$parent.$el.getBoundingClientRect().width+"px"}},mounted:function(){var t=this;this.referenceElm=this.$parent.$refs.reference.$el,this.$parent.popperElm=this.popperElm=this.$el,this.$on("updatePopper",function(){t.$parent.visible&&t.updatePopper()}),this.$on("destroyPopper",this.destroyPopper)}},Ie,[],!1,null,null,null);we.options.__file="packages/select/src/select-dropdown.vue";var Re=we.exports,De=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("li",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"el-select-dropdown__item",class:{selected:t.itemSelected,"is-disabled":t.disabled||t.groupDisabled||t.limitReached,hover:t.hover},on:{mouseenter:t.hoverItem,click:function(e){return e.stopPropagation(),t.selectOptionClick(e)}}},[t._t("default",[i("span",[t._v(t._s(t.currentLabel))])])],2)};De._withStripped=!0;var xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Me=o({mixins:[S.a],name:"ElOption",componentName:"ElOption",inject:["select"],props:{value:{required:!0},label:[String,Number],created:Boolean,disabled:{type:Boolean,default:!1}},data:function(){return{index:-1,groupDisabled:!1,visible:!0,hitState:!1,hover:!1}},computed:{isObject:function(){return"[object object]"===Object.prototype.toString.call(this.value).toLowerCase()},currentLabel:function(){return this.label||(this.isObject?"":this.value)},currentValue:function(){return this.value||this.label||""},itemSelected:function(){return this.select.multiple?this.contains(this.select.value,this.value):this.isEqual(this.value,this.select.value)},limitReached:function(){return!!this.select.multiple&&(!this.itemSelected&&(this.select.value||[]).length>=this.select.multipleLimit&&this.select.multipleLimit>0)}},watch:{currentLabel:function(){this.created||this.select.remote||this.dispatch("ElSelect","setSelected")},value:function(t,e){var i=this.select,n=i.remote,o=i.valueKey;if(!this.created&&!n){if(o&&"object"===(void 0===t?"undefined":xe(t))&&"object"===(void 0===e?"undefined":xe(e))&&t[o]===e[o])return;this.dispatch("ElSelect","setSelected")}}},methods:{isEqual:function(t,e){if(this.isObject){var i=this.select.valueKey;return Object(g.getValueByPath)(t,i)===Object(g.getValueByPath)(e,i)}return t===e},contains:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments[1];if(this.isObject){var i=this.select.valueKey;return t&&t.some(function(t){return Object(g.getValueByPath)(t,i)===Object(g.getValueByPath)(e,i)})}return t&&t.indexOf(e)>-1},handleGroupDisabled:function(t){this.groupDisabled=t},hoverItem:function(){this.disabled||this.groupDisabled||(this.select.hoverIndex=this.select.options.indexOf(this))},selectOptionClick:function(){!0!==this.disabled&&!0!==this.groupDisabled&&this.dispatch("ElSelect","handleOptionClick",[this,!0])},queryChange:function(t){this.visible=new RegExp(Object(g.escapeRegexpString)(t),"i").test(this.currentLabel)||this.created,this.visible||this.select.filteredOptionsCount--}},created:function(){this.select.options.push(this),this.select.cachedOptions.push(this),this.select.optionsCount++,this.select.filteredOptionsCount++,this.$on("queryChange",this.queryChange),this.$on("handleGroupDisabled",this.handleGroupDisabled)},beforeDestroy:function(){var t=this.select,e=t.selected,i=t.multiple?e:[e],n=this.select.cachedOptions.indexOf(this),o=i.indexOf(this);n>-1&&o<0&&this.select.cachedOptions.splice(n,1),this.select.onOptionDestroy(this.select.options.indexOf(this))}},De,[],!1,null,null,null);Me.options.__file="packages/select/src/option.vue";var Ae=Me.exports,Ne=i(29),Le=i.n(Ne),Pe=i(14),Be=i(27),Fe=i.n(Be),He=o({mixins:[S.a,f.a,V()("reference"),{data:function(){return{hoverOption:-1}},computed:{optionsAllDisabled:function(){return this.options.filter(function(t){return t.visible}).every(function(t){return t.disabled})}},watch:{hoverIndex:function(t){var e=this;"number"==typeof t&&t>-1&&(this.hoverOption=this.options[t]||{}),this.options.forEach(function(t){t.hover=e.hoverOption===t})}},methods:{navigateOptions:function(t){var e=this;if(this.visible){if(0!==this.options.length&&0!==this.filteredOptionsCount&&!this.optionsAllDisabled){"next"===t?(this.hoverIndex++,this.hoverIndex===this.options.length&&(this.hoverIndex=0)):"prev"===t&&(this.hoverIndex--,this.hoverIndex<0&&(this.hoverIndex=this.options.length-1));var i=this.options[this.hoverIndex];!0!==i.disabled&&!0!==i.groupDisabled&&i.visible||this.navigateOptions(t),this.$nextTick(function(){return e.scrollToOption(e.hoverOption)})}}else this.visible=!0}}}],name:"ElSelect",componentName:"ElSelect",inject:{elForm:{default:""},elFormItem:{default:""}},provide:function(){return{select:this}},computed:{_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},readonly:function(){return!this.filterable||this.multiple||!Object(g.isIE)()&&!Object(g.isEdge)()&&!this.visible},showClose:function(){var t=this.multiple?Array.isArray(this.value)&&this.value.length>0:void 0!==this.value&&null!==this.value&&""!==this.value;return this.clearable&&!this.selectDisabled&&this.inputHovering&&t},iconClass:function(){return this.remote&&this.filterable?"":this.visible?"arrow-up is-reverse":"arrow-up"},debounce:function(){return this.remote?300:0},emptyText:function(){return this.loading?this.loadingText||this.t("el.select.loading"):(!this.remote||""!==this.query||0!==this.options.length)&&(this.filterable&&this.query&&this.options.length>0&&0===this.filteredOptionsCount?this.noMatchText||this.t("el.select.noMatch"):0===this.options.length?this.noDataText||this.t("el.select.noData"):null)},showNewOption:function(){var t=this,e=this.options.filter(function(t){return!t.created}).some(function(e){return e.currentLabel===t.query});return this.filterable&&this.allowCreate&&""!==this.query&&!e},selectSize:function(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size},selectDisabled:function(){return this.disabled||(this.elForm||{}).disabled},collapseTagSize:function(){return["small","mini"].indexOf(this.selectSize)>-1?"mini":"small"},propPlaceholder:function(){return void 0!==this.placeholder?this.placeholder:this.t("el.select.placeholder")}},components:{ElInput:p.a,ElSelectMenu:Re,ElOption:Ae,ElTag:Le.a,ElScrollbar:B.a},directives:{Clickoutside:M.a},props:{name:String,id:String,value:{required:!0},autocomplete:{type:String,default:"off"},autoComplete:{type:String,validator:function(t){return!0}},automaticDropdown:Boolean,size:String,disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:String,remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String,required:!1},defaultFirstOption:Boolean,reserveKeyword:Boolean,valueKey:{type:String,default:"value"},collapseTags:Boolean,popperAppendToBody:{type:Boolean,default:!0}},data:function(){return{options:[],cachedOptions:[],createdLabel:null,createdSelected:!1,selected:this.multiple?[]:{},inputLength:20,inputWidth:0,initialInputHeight:0,cachedPlaceHolder:"",optionsCount:0,filteredOptionsCount:0,visible:!1,softFocus:!1,selectedLabel:"",hoverIndex:-1,query:"",previousQuery:null,inputHovering:!1,currentPlaceholder:"",menuVisibleOnFocus:!1,isOnComposition:!1,isSilentBlur:!1}},watch:{selectDisabled:function(){var t=this;this.$nextTick(function(){t.resetInputHeight()})},propPlaceholder:function(t){this.cachedPlaceHolder=this.currentPlaceholder=t},value:function(t,e){this.multiple&&(this.resetInputHeight(),t&&t.length>0||this.$refs.input&&""!==this.query?this.currentPlaceholder="":this.currentPlaceholder=this.cachedPlaceHolder,this.filterable&&!this.reserveKeyword&&(this.query="",this.handleQueryChange(this.query))),this.setSelected(),this.filterable&&!this.multiple&&(this.inputLength=20),Object(g.valueEquals)(t,e)||this.dispatch("ElFormItem","el.form.change",t)},visible:function(t){var e=this;t?(this.broadcast("ElSelectDropdown","updatePopper"),this.filterable&&(this.query=this.remote?"":this.selectedLabel,this.handleQueryChange(this.query),this.multiple?this.$refs.input.focus():(this.remote||(this.broadcast("ElOption","queryChange",""),this.broadcast("ElOptionGroup","queryChange")),this.selectedLabel&&(this.currentPlaceholder=this.selectedLabel,this.selectedLabel="")))):(this.broadcast("ElSelectDropdown","destroyPopper"),this.$refs.input&&this.$refs.input.blur(),this.query="",this.previousQuery=null,this.selectedLabel="",this.inputLength=20,this.menuVisibleOnFocus=!1,this.resetHoverIndex(),this.$nextTick(function(){e.$refs.input&&""===e.$refs.input.value&&0===e.selected.length&&(e.currentPlaceholder=e.cachedPlaceHolder)}),this.multiple||(this.selected&&(this.filterable&&this.allowCreate&&this.createdSelected&&this.createdLabel?this.selectedLabel=this.createdLabel:this.selectedLabel=this.selected.currentLabel,this.filterable&&(this.query=this.selectedLabel)),this.filterable&&(this.currentPlaceholder=this.cachedPlaceHolder))),this.$emit("visible-change",t)},options:function(){var t=this;if(!this.$isServer){this.$nextTick(function(){t.broadcast("ElSelectDropdown","updatePopper")}),this.multiple&&this.resetInputHeight();var e=this.$el.querySelectorAll("input");-1===[].indexOf.call(e,document.activeElement)&&this.setSelected(),this.defaultFirstOption&&(this.filterable||this.remote)&&this.filteredOptionsCount&&this.checkDefaultFirstOption()}}},methods:{handleComposition:function(t){var e=this,i=t.target.value;if("compositionend"===t.type)this.isOnComposition=!1,this.$nextTick(function(t){return e.handleQueryChange(i)});else{var n=i[i.length-1]||"";this.isOnComposition=!Object(Gt.isKorean)(n)}},handleQueryChange:function(t){var e=this;this.previousQuery===t||this.isOnComposition||(null!==this.previousQuery||"function"!=typeof this.filterMethod&&"function"!=typeof this.remoteMethod?(this.previousQuery=t,this.$nextTick(function(){e.visible&&e.broadcast("ElSelectDropdown","updatePopper")}),this.hoverIndex=-1,this.multiple&&this.filterable&&this.$nextTick(function(){var t=15*e.$refs.input.value.length+20;e.inputLength=e.collapseTags?Math.min(50,t):t,e.managePlaceholder(),e.resetInputHeight()}),this.remote&&"function"==typeof this.remoteMethod?(this.hoverIndex=-1,this.remoteMethod(t)):"function"==typeof this.filterMethod?(this.filterMethod(t),this.broadcast("ElOptionGroup","queryChange")):(this.filteredOptionsCount=this.optionsCount,this.broadcast("ElOption","queryChange",t),this.broadcast("ElOptionGroup","queryChange")),this.defaultFirstOption&&(this.filterable||this.remote)&&this.filteredOptionsCount&&this.checkDefaultFirstOption()):this.previousQuery=t)},scrollToOption:function(t){var e=Array.isArray(t)&&t[0]?t[0].$el:t.$el;if(this.$refs.popper&&e){var i=this.$refs.popper.$el.querySelector(".el-select-dropdown__wrap");Fe()(i,e)}this.$refs.scrollbar&&this.$refs.scrollbar.handleScroll()},handleMenuEnter:function(){var t=this;this.$nextTick(function(){return t.scrollToOption(t.selected)})},emitChange:function(t){Object(g.valueEquals)(this.value,t)||this.$emit("change",t)},getOption:function(t){for(var e=void 0,i="[object object]"===Object.prototype.toString.call(t).toLowerCase(),n="[object null]"===Object.prototype.toString.call(t).toLowerCase(),o="[object undefined]"===Object.prototype.toString.call(t).toLowerCase(),r=this.cachedOptions.length-1;r>=0;r--){var s=this.cachedOptions[r];if(i?Object(g.getValueByPath)(s.value,this.valueKey)===Object(g.getValueByPath)(t,this.valueKey):s.value===t){e=s;break}}if(e)return e;var a={value:t,currentLabel:i||n||o?"":String(t)};return this.multiple&&(a.hitState=!1),a},setSelected:function(){var t=this;if(!this.multiple){var e=this.getOption(this.value);return e.created?(this.createdLabel=e.currentLabel,this.createdSelected=!0):this.createdSelected=!1,this.selectedLabel=e.currentLabel,this.selected=e,void(this.filterable&&(this.query=this.selectedLabel))}var i=[];Array.isArray(this.value)&&this.value.forEach(function(e){i.push(t.getOption(e))}),this.selected=i,this.$nextTick(function(){t.resetInputHeight()})},handleFocus:function(t){this.softFocus?this.softFocus=!1:((this.automaticDropdown||this.filterable)&&(this.visible=!0,this.filterable&&(this.menuVisibleOnFocus=!0)),this.$emit("focus",t))},blur:function(){this.visible=!1,this.$refs.reference.blur()},handleBlur:function(t){var e=this;setTimeout(function(){e.isSilentBlur?e.isSilentBlur=!1:e.$emit("blur",t)},50),this.softFocus=!1},handleClearClick:function(t){this.deleteSelected(t)},doDestroy:function(){this.$refs.popper&&this.$refs.popper.doDestroy()},handleClose:function(){this.visible=!1},toggleLastOptionHitState:function(t){if(Array.isArray(this.selected)){var e=this.selected[this.selected.length-1];if(e)return!0===t||!1===t?(e.hitState=t,t):(e.hitState=!e.hitState,e.hitState)}},deletePrevTag:function(t){if(t.target.value.length<=0&&!this.toggleLastOptionHitState()){var e=this.value.slice();e.pop(),this.$emit("input",e),this.emitChange(e)}},managePlaceholder:function(){""!==this.currentPlaceholder&&(this.currentPlaceholder=this.$refs.input.value?"":this.cachedPlaceHolder)},resetInputState:function(t){8!==t.keyCode&&this.toggleLastOptionHitState(!1),this.inputLength=15*this.$refs.input.value.length+20,this.resetInputHeight()},resetInputHeight:function(){var t=this;this.collapseTags&&!this.filterable||this.$nextTick(function(){if(t.$refs.reference){var e=t.$refs.reference.$el.childNodes,i=[].filter.call(e,function(t){return"INPUT"===t.tagName})[0],n=t.$refs.tags,o=t.initialInputHeight||40;i.style.height=0===t.selected.length?o+"px":Math.max(n?n.clientHeight+(n.clientHeight>o?6:0):0,o)+"px",t.visible&&!1!==t.emptyText&&t.broadcast("ElSelectDropdown","updatePopper")}})},resetHoverIndex:function(){var t=this;setTimeout(function(){t.multiple?t.selected.length>0?t.hoverIndex=Math.min.apply(null,t.selected.map(function(e){return t.options.indexOf(e)})):t.hoverIndex=-1:t.hoverIndex=t.options.indexOf(t.selected)},300)},handleOptionSelect:function(t,e){var i=this;if(this.multiple){var n=(this.value||[]).slice(),o=this.getValueIndex(n,t.value);o>-1?n.splice(o,1):(this.multipleLimit<=0||n.length<this.multipleLimit)&&n.push(t.value),this.$emit("input",n),this.emitChange(n),t.created&&(this.query="",this.handleQueryChange(""),this.inputLength=20),this.filterable&&this.$refs.input.focus()}else this.$emit("input",t.value),this.emitChange(t.value),this.visible=!1;this.isSilentBlur=e,this.setSoftFocus(),this.visible||this.$nextTick(function(){i.scrollToOption(t)})},setSoftFocus:function(){this.softFocus=!0;var t=this.$refs.input||this.$refs.reference;t&&t.focus()},getValueIndex:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments[1];if("[object object]"===Object.prototype.toString.call(e).toLowerCase()){var i=this.valueKey,n=-1;return t.some(function(t,o){return Object(g.getValueByPath)(t,i)===Object(g.getValueByPath)(e,i)&&(n=o,!0)}),n}return t.indexOf(e)},toggleMenu:function(){this.selectDisabled||(this.menuVisibleOnFocus?this.menuVisibleOnFocus=!1:this.visible=!this.visible,this.visible&&(this.$refs.input||this.$refs.reference).focus())},selectOption:function(){this.visible?this.options[this.hoverIndex]&&this.handleOptionSelect(this.options[this.hoverIndex]):this.toggleMenu()},deleteSelected:function(t){t.stopPropagation();var e=this.multiple?[]:"";this.$emit("input",e),this.emitChange(e),this.visible=!1,this.$emit("clear")},deleteTag:function(t,e){var i=this.selected.indexOf(e);if(i>-1&&!this.selectDisabled){var n=this.value.slice();n.splice(i,1),this.$emit("input",n),this.emitChange(n),this.$emit("remove-tag",e.value)}t.stopPropagation()},onInputChange:function(){this.filterable&&this.query!==this.selectedLabel&&(this.query=this.selectedLabel,this.handleQueryChange(this.query))},onOptionDestroy:function(t){t>-1&&(this.optionsCount--,this.filteredOptionsCount--,this.options.splice(t,1))},resetInputWidth:function(){this.inputWidth=this.$refs.reference.$el.getBoundingClientRect().width},handleResize:function(){this.resetInputWidth(),this.multiple&&this.resetInputHeight()},checkDefaultFirstOption:function(){this.hoverIndex=-1;for(var t=!1,e=this.options.length-1;e>=0;e--)if(this.options[e].created){t=!0,this.hoverIndex=e;break}if(!t)for(var i=0;i!==this.options.length;++i){var n=this.options[i];if(this.query){if(!n.disabled&&!n.groupDisabled&&n.visible){this.hoverIndex=i;break}}else if(n.itemSelected){this.hoverIndex=i;break}}},getValueKey:function(t){return"[object object]"!==Object.prototype.toString.call(t.value).toLowerCase()?t.value:Object(g.getValueByPath)(t.value,this.valueKey)}},created:function(){var t=this;this.cachedPlaceHolder=this.currentPlaceholder=this.propPlaceholder,this.multiple&&!Array.isArray(this.value)&&this.$emit("input",[]),!this.multiple&&Array.isArray(this.value)&&this.$emit("input",""),this.debouncedOnInputChange=D()(this.debounce,function(){t.onInputChange()}),this.debouncedQueryChange=D()(this.debounce,function(e){t.handleQueryChange(e.target.value)}),this.$on("handleOptionClick",this.handleOptionSelect),this.$on("setSelected",this.setSelected)},mounted:function(){var t=this;this.multiple&&Array.isArray(this.value)&&this.value.length>0&&(this.currentPlaceholder=""),Object(Pe.addResizeListener)(this.$el,this.handleResize);var e=this.$refs.reference;if(e&&e.$el){var i=e.$el.querySelector("input");this.initialInputHeight=i.getBoundingClientRect().height||{medium:36,small:32,mini:28}[this.selectSize]}this.remote&&this.multiple&&this.resetInputHeight(),this.$nextTick(function(){e&&e.$el&&(t.inputWidth=e.$el.getBoundingClientRect().width)}),this.setSelected()},beforeDestroy:function(){this.$el&&this.handleResize&&Object(Pe.removeResizeListener)(this.$el,this.handleResize)}},Oe,[],!1,null,null,null);He.options.__file="packages/select/src/select.vue";var Ue=He.exports;Ue.install=function(t){t.component(Ue.name,Ue)};var Ve=Ue;Ae.install=function(t){t.component(Ae.name,Ae)};var Ge=Ae,We=function(){var t=this.$createElement,e=this._self._c||t;return e("ul",{directives:[{name:"show",rawName:"v-show",value:this.visible,expression:"visible"}],staticClass:"el-select-group__wrap"},[e("li",{staticClass:"el-select-group__title"},[this._v(this._s(this.label))]),e("li",[e("ul",{staticClass:"el-select-group"},[this._t("default")],2)])])};We._withStripped=!0;var $e=o({mixins:[S.a],name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:{type:Boolean,default:!1}},data:function(){return{visible:!0}},watch:{disabled:function(t){this.broadcast("ElOption","handleGroupDisabled",t)}},methods:{queryChange:function(){this.visible=this.$children&&Array.isArray(this.$children)&&this.$children.some(function(t){return!0===t.visible})}},created:function(){this.$on("queryChange",this.queryChange)},mounted:function(){this.disabled&&this.broadcast("ElOption","handleGroupDisabled",this.disabled)}},We,[],!1,null,null,null);$e.options.__file="packages/select/src/option-group.vue";var je=$e.exports;je.install=function(t){t.component(je.name,je)};var ze=je,Xe=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("button",{staticClass:"el-button",class:[t.type?"el-button--"+t.type:"",t.buttonSize?"el-button--"+t.buttonSize:"",{"is-disabled":t.buttonDisabled,"is-loading":t.loading,"is-plain":t.plain,"is-round":t.round,"is-circle":t.circle}],attrs:{disabled:t.buttonDisabled||t.loading,autofocus:t.autofocus,type:t.nativeType},on:{click:t.handleClick}},[t.loading?i("i",{staticClass:"el-icon-loading"}):t._e(),t.icon&&!t.loading?i("i",{class:t.icon}):t._e(),t.$slots.default?i("span",[t._t("default")],2):t._e()])};Xe._withStripped=!0;var Ye=o({name:"ElButton",inject:{elForm:{default:""},elFormItem:{default:""}},props:{type:{type:String,default:"default"},size:String,icon:{type:String,default:""},nativeType:{type:String,default:"button"},loading:Boolean,disabled:Boolean,plain:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean},computed:{_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},buttonSize:function(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size},buttonDisabled:function(){return this.disabled||(this.elForm||{}).disabled}},methods:{handleClick:function(t){this.$emit("click",t)}}},Xe,[],!1,null,null,null);Ye.options.__file="packages/button/src/button.vue";var Ke=Ye.exports;Ke.install=function(t){t.component(Ke.name,Ke)};var Je=Ke,qe=function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"el-button-group"},[this._t("default")],2)};qe._withStripped=!0;var Ze=o({name:"ElButtonGroup"},qe,[],!1,null,null,null);Ze.options.__file="packages/button/src/button-group.vue";var Qe=Ze.exports;Qe.install=function(t){t.component(Qe.name,Qe)};var ti=Qe,ei=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"el-table",class:[{"el-table--fit":t.fit,"el-table--striped":t.stripe,"el-table--border":t.border||t.isGroup,"el-table--hidden":t.isHidden,"el-table--group":t.isGroup,"el-table--fluid-height":t.maxHeight,"el-table--scrollable-x":t.layout.scrollX,"el-table--scrollable-y":t.layout.scrollY,"el-table--enable-row-hover":!t.store.states.isComplex,"el-table--enable-row-transition":0!==(t.store.states.data||[]).length&&(t.store.states.data||[]).length<100},t.tableSize?"el-table--"+t.tableSize:""],on:{mouseleave:function(e){t.handleMouseLeave(e)}}},[i("div",{ref:"hiddenColumns",staticClass:"hidden-columns"},[t._t("default")],2),t.showHeader?i("div",{directives:[{name:"mousewheel",rawName:"v-mousewheel",value:t.handleHeaderFooterMousewheel,expression:"handleHeaderFooterMousewheel"}],ref:"headerWrapper",staticClass:"el-table__header-wrapper"},[i("table-header",{ref:"tableHeader",style:{width:t.layout.bodyWidth?t.layout.bodyWidth+"px":""},attrs:{store:t.store,border:t.border,"default-sort":t.defaultSort}})],1):t._e(),i("div",{ref:"bodyWrapper",staticClass:"el-table__body-wrapper",class:[t.layout.scrollX?"is-scrolling-"+t.scrollPosition:"is-scrolling-none"],style:[t.bodyHeight]},[i("table-body",{style:{width:t.bodyWidth},attrs:{context:t.context,store:t.store,stripe:t.stripe,"row-class-name":t.rowClassName,"row-style":t.rowStyle,highlight:t.highlightCurrentRow}}),t.data&&0!==t.data.length?t._e():i("div",{ref:"emptyBlock",staticClass:"el-table__empty-block",style:t.emptyBlockStyle},[i("span",{staticClass:"el-table__empty-text"},[t._t("empty",[t._v(t._s(t.emptyText||t.t("el.table.emptyText")))])],2)]),t.$slots.append?i("div",{ref:"appendWrapper",staticClass:"el-table__append-wrapper"},[t._t("append")],2):t._e()],1),t.showSummary?i("div",{directives:[{name:"show",rawName:"v-show",value:t.data&&t.data.length>0,expression:"data && data.length > 0"},{name:"mousewheel",rawName:"v-mousewheel",value:t.handleHeaderFooterMousewheel,expression:"handleHeaderFooterMousewheel"}],ref:"footerWrapper",staticClass:"el-table__footer-wrapper"},[i("table-footer",{style:{width:t.layout.bodyWidth?t.layout.bodyWidth+"px":""},attrs:{store:t.store,border:t.border,"sum-text":t.sumText||t.t("el.table.sumText"),"summary-method":t.summaryMethod,"default-sort":t.defaultSort}})],1):t._e(),t.fixedColumns.length>0?i("div",{directives:[{name:"mousewheel",rawName:"v-mousewheel",value:t.handleFixedMousewheel,expression:"handleFixedMousewheel"}],ref:"fixedWrapper",staticClass:"el-table__fixed",style:[{width:t.layout.fixedWidth?t.layout.fixedWidth+"px":""},t.fixedHeight]},[t.showHeader?i("div",{ref:"fixedHeaderWrapper",staticClass:"el-table__fixed-header-wrapper"},[i("table-header",{ref:"fixedTableHeader",style:{width:t.bodyWidth},attrs:{fixed:"left",border:t.border,store:t.store}})],1):t._e(),i("div",{ref:"fixedBodyWrapper",staticClass:"el-table__fixed-body-wrapper",style:[{top:t.layout.headerHeight+"px"},t.fixedBodyHeight]},[i("table-body",{style:{width:t.bodyWidth},attrs:{fixed:"left",store:t.store,stripe:t.stripe,highlight:t.highlightCurrentRow,"row-class-name":t.rowClassName,"row-style":t.rowStyle}}),t.$slots.append?i("div",{staticClass:"el-table__append-gutter",style:{height:t.layout.appendHeight+"px"}}):t._e()],1),t.showSummary?i("div",{directives:[{name:"show",rawName:"v-show",value:t.data&&t.data.length>0,expression:"data && data.length > 0"}],ref:"fixedFooterWrapper",staticClass:"el-table__fixed-footer-wrapper"},[i("table-footer",{style:{width:t.bodyWidth},attrs:{fixed:"left",border:t.border,"sum-text":t.sumText||t.t("el.table.sumText"),"summary-method":t.summaryMethod,store:t.store}})],1):t._e()]):t._e(),t.rightFixedColumns.length>0?i("div",{directives:[{name:"mousewheel",rawName:"v-mousewheel",value:t.handleFixedMousewheel,expression:"handleFixedMousewheel"}],ref:"rightFixedWrapper",staticClass:"el-table__fixed-right",style:[{width:t.layout.rightFixedWidth?t.layout.rightFixedWidth+"px":"",right:t.layout.scrollY?(t.border?t.layout.gutterWidth:t.layout.gutterWidth||0)+"px":""},t.fixedHeight]},[t.showHeader?i("div",{ref:"rightFixedHeaderWrapper",staticClass:"el-table__fixed-header-wrapper"},[i("table-header",{ref:"rightFixedTableHeader",style:{width:t.bodyWidth},attrs:{fixed:"right",border:t.border,store:t.store}})],1):t._e(),i("div",{ref:"rightFixedBodyWrapper",staticClass:"el-table__fixed-body-wrapper",style:[{top:t.layout.headerHeight+"px"},t.fixedBodyHeight]},[i("table-body",{style:{width:t.bodyWidth},attrs:{fixed:"right",store:t.store,stripe:t.stripe,"row-class-name":t.rowClassName,"row-style":t.rowStyle,highlight:t.highlightCurrentRow}}),t.$slots.append?i("div",{staticClass:"el-table__append-gutter",style:{height:t.layout.appendHeight+"px"}}):t._e()],1),t.showSummary?i("div",{directives:[{name:"show",rawName:"v-show",value:t.data&&t.data.length>0,expression:"data && data.length > 0"}],ref:"rightFixedFooterWrapper",staticClass:"el-table__fixed-footer-wrapper"},[i("table-footer",{style:{width:t.bodyWidth},attrs:{fixed:"right",border:t.border,"sum-text":t.sumText||t.t("el.table.sumText"),"summary-method":t.summaryMethod,store:t.store}})],1):t._e()]):t._e(),t.rightFixedColumns.length>0?i("div",{ref:"rightFixedPatch",staticClass:"el-table__fixed-right-patch",style:{width:t.layout.scrollY?t.layout.gutterWidth+"px":"0",height:t.layout.headerHeight+"px"}}):t._e(),i("div",{directives:[{name:"show",rawName:"v-show",value:t.resizeProxyVisible,expression:"resizeProxyVisible"}],ref:"resizeProxy",staticClass:"el-table__column-resize-proxy"})])};ei._withStripped=!0;var ii=i(16),ni=i.n(ii),oi=i(35),ri=i(38),si=i.n(ri),ai="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>-1,li={bind:function(t,e){var i,n;i=t,n=e.value,i&&i.addEventListener&&i.addEventListener(ai?"DOMMouseScroll":"mousewheel",function(t){var e=si()(t);n&&n.apply(this,[t,e])})}},ci=i(6),ui=i.n(ci),hi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pi=function(t){for(var e=t.target;e&&"HTML"!==e.tagName.toUpperCase();){if("TD"===e.tagName.toUpperCase())return e;e=e.parentNode}return null},di=function(t){return null!==t&&"object"===(void 0===t?"undefined":hi(t))},fi=function(t,e,i,n,o){if(!e&&!n&&(!o||Array.isArray(o)&&!o.length))return t;i="string"==typeof i?"descending"===i?-1:1:i&&i<0?-1:1;var r=n?null:function(i,n){return o?(Array.isArray(o)||(o=[o]),o.map(function(e){return"string"==typeof e?Object(g.getValueByPath)(i,e):e(i,n,t)})):("$key"!==e&&di(i)&&"$value"in i&&(i=i.$value),[di(i)?Object(g.getValueByPath)(i,e):i])};return t.map(function(t,e){return{value:t,index:e,key:r?r(t,e):null}}).sort(function(t,e){var o=function(t,e){if(n)return n(t.value,e.value);for(var i=0,o=t.key.length;i<o;i++){if(t.key[i]<e.key[i])return-1;if(t.key[i]>e.key[i])return 1}return 0}(t,e);return o||(o=t.index-e.index),o*i}).map(function(t){return t.value})},gi=function(t,e){var i=null;return t.columns.forEach(function(t){t.id===e&&(i=t)}),i},_i=function(t,e){var i=(e.className||"").match(/el-table_[^\s]+/gm);return i?gi(t,i[0]):null},mi=function(t,e){if(!t)throw new Error("row is required when get row identity");if("string"==typeof e){if(e.indexOf(".")<0)return t[e];for(var i=e.split("."),n=t,o=0;o<i.length;o++)n=n[i[o]];return n}if("function"==typeof e)return e.call(null,t)},vi=function(t,e){var i={};return(t||[]).forEach(function(t,n){i[mi(t,e)]={row:t,index:n}}),i};function yi(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function bi(t){return void 0!==t&&(t=parseInt(t,10),isNaN(t)&&(t=null)),t}function Ti(t){return"number"==typeof t?t:"string"==typeof t?/^\d+(?:px)?$/.test(t)?parseInt(t,10):t:null}function Ei(t,e,i){var n=!1,o=t.indexOf(e),r=-1!==o,s=function(){t.push(e),n=!0},a=function(){t.splice(o,1),n=!0};return"boolean"==typeof i?i&&!r?s():!i&&r&&a():r?a():s(),n}function Ci(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"children",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"hasChildren",o=function(t){return!(Array.isArray(t)&&t.length)};t.forEach(function(t){if(t[n])e(t,null,0);else{var r=t[i];o(r)||function t(r,s,a){e(r,s,a),s.forEach(function(r){if(r[n])e(r,null,a+1);else{var s=r[i];o(s)||t(r,s,a+1)}})}(t,r,0)}})}var Si={data:function(){return{states:{defaultExpandAll:!1,expandRows:[]}}},methods:{updateExpandRows:function(){var t=this.states,e=t.data,i=void 0===e?[]:e,n=t.rowKey,o=t.defaultExpandAll,r=t.expandRows;if(o)this.states.expandRows=i.slice();else if(n){var s=vi(r,n);this.states.expandRows=i.reduce(function(t,e){var i=mi(e,n);return s[i]&&t.push(e),t},[])}else this.states.expandRows=[]},toggleRowExpansion:function(t,e){Ei(this.states.expandRows,t,e)&&(this.table.$emit("expand-change",t,this.states.expandRows.slice()),this.scheduleLayout())},setExpandRowKeys:function(t){this.assertRowKey();var e=this.states,i=e.data,n=e.rowKey,o=vi(i,n);this.states.expandRows=t.reduce(function(t,e){var i=o[e];return i&&t.push(i.row),t},[])},isRowExpanded:function(t){var e=this.states,i=e.expandRows,n=void 0===i?[]:i,o=e.rowKey;return o?!!vi(n,o)[mi(t,o)]:-1!==n.indexOf(t)}}},ki={data:function(){return{states:{_currentRowKey:null,currentRow:null}}},methods:{setCurrentRowKey:function(t){this.assertRowKey(),this.states._currentRowKey=t,this.setCurrentRowByKey(t)},restoreCurrentRowKey:function(){this.states._currentRowKey=null},setCurrentRowByKey:function(t){var e=this.states,i=e.data,n=void 0===i?[]:i,o=e.rowKey,r=null;o&&(r=Object(g.arrayFind)(n,function(e){return mi(e,o)===t})),e.currentRow=r},updateCurrentRow:function(t){var e=this.states,i=this.table,n=e.currentRow;if(t&&t!==n)return e.currentRow=t,void i.$emit("current-change",t,n);!t&&n&&(e.currentRow=null,i.$emit("current-change",null,n))},updateCurrentRowData:function(){var t=this.states,e=this.table,i=t.rowKey,n=t._currentRowKey,o=t.data||[],r=t.currentRow;if(-1===o.indexOf(r)&&r){if(i){var s=mi(r,i);this.setCurrentRowByKey(s)}else t.currentRow=null;null===t.currentRow&&e.$emit("current-change",null,r)}else n&&(this.setCurrentRowByKey(n),this.restoreCurrentRowKey())}}},Oi=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},Ii={data:function(){return{states:{expandRowKeys:[],treeData:{},indent:16,lazy:!1,lazyTreeNodeMap:{},lazyColumnIdentifier:"hasChildren",childrenColumnName:"children"}}},computed:{normalizedData:function(){if(!this.states.rowKey)return{};var t=this.states.data||[];return this.normalize(t)},normalizedLazyNode:function(){var t=this.states,e=t.rowKey,i=t.lazyTreeNodeMap,n=t.lazyColumnIdentifier,o=Object.keys(i),r={};return o.length?(o.forEach(function(t){if(i[t].length){var o={children:[]};i[t].forEach(function(t){var i=mi(t,e);o.children.push(i),t[n]&&!r[i]&&(r[i]={children:[]})}),r[t]=o}}),r):r}},watch:{normalizedData:"updateTreeData",normalizedLazyNode:"updateTreeData"},methods:{normalize:function(t){var e=this.states,i=e.childrenColumnName,n=e.lazyColumnIdentifier,o=e.rowKey,r=e.lazy,s={};return Ci(t,function(t,e,i){var n=mi(t,o);Array.isArray(e)?s[n]={children:e.map(function(t){return mi(t,o)}),level:i}:r&&(s[n]={children:[],lazy:!0,level:i})},i,n),s},updateTreeData:function(){var t=this.normalizedData,e=this.normalizedLazyNode,i=Object.keys(t),n={};if(i.length){var o=this.states,r=o.treeData,s=o.defaultExpandAll,a=o.expandRowKeys,l=o.lazy,c=[],u=function(t,e){var i=s||a&&-1!==a.indexOf(e);return!!(t&&t.expanded||i)};i.forEach(function(e){var i=r[e],o=Oi({},t[e]);if(o.expanded=u(i,e),o.lazy){var s=i||{},a=s.loaded,l=void 0!==a&&a,h=s.loading,p=void 0!==h&&h;o.loaded=!!l,o.loading=!!p,c.push(e)}n[e]=o});var h=Object.keys(e);l&&h.length&&c.length&&h.forEach(function(t){var i=r[t],o=e[t].children;if(-1!==c.indexOf(t)){if(0!==n[t].children.length)throw new Error("[ElTable]children must be an empty array.");n[t].children=o}else{var s=i||{},a=s.loaded,l=void 0!==a&&a,h=s.loading,p=void 0!==h&&h;n[t]={lazy:!0,loaded:!!l,loading:!!p,expanded:u(i,t),children:o,level:""}}})}this.states.treeData=n,this.updateTableScrollY()},updateTreeExpandKeys:function(t){this.states.expandRowKeys=t,this.updateTreeData()},toggleTreeExpansion:function(t,e){this.assertRowKey();var i=this.states,n=i.rowKey,o=i.treeData,r=mi(t,n),s=r&&o[r];if(r&&s&&"expanded"in s){var a=s.expanded;e=void 0===e?!s.expanded:e,o[r].expanded=e,a!==e&&this.table.$emit("expand-change",t,e),this.updateTableScrollY()}},loadOrToggle:function(t){this.assertRowKey();var e=this.states,i=e.lazy,n=e.treeData,o=e.rowKey,r=mi(t,o),s=n[r];i&&s&&"loaded"in s&&!s.loaded?this.loadData(t,r,s):this.toggleTreeExpansion(t)},loadData:function(t,e,i){var n=this,o=this.table.load,r=this.states.treeData;o&&!r[e].loaded&&(r[e].loading=!0,o(t,i,function(i){if(!Array.isArray(i))throw new Error("[ElTable] data must be an array");var o=n.states,r=o.lazyTreeNodeMap,s=o.treeData;s[e].loading=!1,s[e].loaded=!0,s[e].expanded=!0,i.length&&n.$set(r,e,i),n.table.$emit("expand-change",t,!0)}))}}},wi=function t(e){var i=[];return e.forEach(function(e){e.children?i.push.apply(i,t(e.children)):i.push(e)}),i},Ri=ui.a.extend({data:function(){return{states:{rowKey:null,data:[],isComplex:!1,_columns:[],originColumns:[],columns:[],fixedColumns:[],rightFixedColumns:[],leafColumns:[],fixedLeafColumns:[],rightFixedLeafColumns:[],leafColumnsLength:0,fixedLeafColumnsLength:0,rightFixedLeafColumnsLength:0,isAllSelected:!1,selection:[],reserveSelection:!1,selectOnIndeterminate:!1,selectable:null,filters:{},filteredData:null,sortingColumn:null,sortProp:null,sortOrder:null,hoverRow:null}}},mixins:[Si,ki,Ii],methods:{assertRowKey:function(){if(!this.states.rowKey)throw new Error("[ElTable] prop row-key is required")},updateColumns:function(){var t=this.states,e=t._columns||[];t.fixedColumns=e.filter(function(t){return!0===t.fixed||"left"===t.fixed}),t.rightFixedColumns=e.filter(function(t){return"right"===t.fixed}),t.fixedColumns.length>0&&e[0]&&"selection"===e[0].type&&!e[0].fixed&&(e[0].fixed=!0,t.fixedColumns.unshift(e[0]));var i=e.filter(function(t){return!t.fixed});t.originColumns=[].concat(t.fixedColumns).concat(i).concat(t.rightFixedColumns);var n=wi(i),o=wi(t.fixedColumns),r=wi(t.rightFixedColumns);t.leafColumnsLength=n.length,t.fixedLeafColumnsLength=o.length,t.rightFixedLeafColumnsLength=r.length,t.columns=[].concat(o).concat(n).concat(r),t.isComplex=t.fixedColumns.length>0||t.rightFixedColumns.length>0},scheduleLayout:function(t){t&&this.updateColumns(),this.table.debouncedUpdateLayout()},isSelected:function(t){var e=this.states.selection;return(void 0===e?[]:e).indexOf(t)>-1},clearSelection:function(){var t=this.states;t.isAllSelected=!1,t.selection.length&&(t.selection=[],this.table.$emit("selection-change",[]))},cleanSelection:function(){var t=this.states,e=t.data,i=t.rowKey,n=t.selection,o=void 0;if(i){o=[];var r=vi(n,i),s=vi(e,i);for(var a in r)r.hasOwnProperty(a)&&!s[a]&&o.push(r[a].row)}else o=n.filter(function(t){return-1===e.indexOf(t)});if(o.length){var l=n.filter(function(t){return-1===o.indexOf(t)});t.selection=l,this.table.$emit("selection-change",l.slice())}},toggleRowSelection:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(Ei(this.states.selection,t,e)){var n=(this.states.selection||[]).slice();i&&this.table.$emit("select",n,t),this.table.$emit("selection-change",n)}},_toggleAllSelection:function(){var t=this.states,e=t.data,i=void 0===e?[]:e,n=t.selection,o=t.selectOnIndeterminate?!t.isAllSelected:!(t.isAllSelected||n.length);t.isAllSelected=o;var r=!1;i.forEach(function(e,i){t.selectable?t.selectable.call(null,e,i)&&Ei(n,e,o)&&(r=!0):Ei(n,e,o)&&(r=!0)}),r&&this.table.$emit("selection-change",n?n.slice():[]),this.table.$emit("select-all",n)},updateSelectionByRowKey:function(){var t=this.states,e=t.selection,i=t.rowKey,n=t.data,o=vi(e,i);n.forEach(function(t){var n=mi(t,i),r=o[n];r&&(e[r.index]=t)})},updateAllSelected:function(){var t=this.states,e=t.selection,i=t.rowKey,n=t.selectable,o=t.data||[];if(0!==o.length){var r=void 0;i&&(r=vi(e,i));for(var s,a=!0,l=0,c=0,u=o.length;c<u;c++){var h=o[c],p=n&&n.call(null,h,c);if(s=h,r?r[mi(s,i)]:-1!==e.indexOf(s))l++;else if(!n||p){a=!1;break}}0===l&&(a=!1),t.isAllSelected=a}else t.isAllSelected=!1},updateFilters:function(t,e){Array.isArray(t)||(t=[t]);var i=this.states,n={};return t.forEach(function(t){i.filters[t.id]=e,n[t.columnKey||t.id]=e}),n},updateSort:function(t,e,i){this.states.sortingColumn&&this.states.sortingColumn!==t&&(this.states.sortingColumn.order=null),this.states.sortingColumn=t,this.states.sortProp=e,this.states.sortOrder=i},execFilter:function(){var t=this,e=this.states,i=e._data,n=e.filters,o=i;Object.keys(n).forEach(function(i){var n=e.filters[i];if(n&&0!==n.length){var r=gi(t.states,i);r&&r.filterMethod&&(o=o.filter(function(t){return n.some(function(e){return r.filterMethod.call(null,e,t,r)})}))}}),e.filteredData=o},execSort:function(){var t=this.states;t.data=function(t,e){var i=e.sortingColumn;return i&&"string"!=typeof i.sortable?fi(t,e.sortProp,e.sortOrder,i.sortMethod,i.sortBy):t}(t.filteredData,t)},execQuery:function(t){t&&t.filter||this.execFilter(),this.execSort()},clearFilter:function(t){var e=this.states,i=this.table.$refs,n=i.tableHeader,o=i.fixedTableHeader,r=i.rightFixedTableHeader,s={};n&&(s=Vt()(s,n.filterPanels)),o&&(s=Vt()(s,o.filterPanels)),r&&(s=Vt()(s,r.filterPanels));var a=Object.keys(s);if(a.length)if("string"==typeof t&&(t=[t]),Array.isArray(t)){var l=t.map(function(t){return function(t,e){for(var i=null,n=0;n<t.columns.length;n++){var o=t.columns[n];if(o.columnKey===e){i=o;break}}return i}(e,t)});a.forEach(function(t){l.find(function(e){return e.id===t})&&(s[t].filteredValue=[])}),this.commit("filterChange",{column:l,values:[],silent:!0,multi:!0})}else a.forEach(function(t){s[t].filteredValue=[]}),e.filters={},this.commit("filterChange",{column:{},values:[],silent:!0})},clearSort:function(){this.states.sortingColumn&&(this.updateSort(null,null,null),this.commit("changeSortCondition",{silent:!0}))},setExpandRowKeysAdapter:function(t){this.setExpandRowKeys(t),this.updateTreeExpandKeys(t)},toggleRowExpansionAdapter:function(t,e){this.states.columns.some(function(t){return"expand"===t.type})?this.toggleRowExpansion(t,e):this.toggleTreeExpansion(t,e)}}});Ri.prototype.mutations={setData:function(t,e){var i=t._data!==e;t._data=e,this.execQuery(),this.updateCurrentRowData(),this.updateExpandRows(),t.reserveSelection?(this.assertRowKey(),this.updateSelectionByRowKey()):i?this.clearSelection():this.cleanSelection(),this.updateAllSelected(),this.updateTableScrollY()},insertColumn:function(t,e,i,n){var o=t._columns;n&&((o=n.children)||(o=n.children=[])),void 0!==i?o.splice(i,0,e):o.push(e),"selection"===e.type&&(t.selectable=e.selectable,t.reserveSelection=e.reserveSelection),this.table.$ready&&(this.updateColumns(),this.scheduleLayout())},removeColumn:function(t,e,i){var n=t._columns;i&&((n=i.children)||(n=i.children=[])),n&&n.splice(n.indexOf(e),1),this.table.$ready&&(this.updateColumns(),this.scheduleLayout())},sort:function(t,e){var i=e.prop,n=e.order,o=e.init;if(i){var r=Object(g.arrayFind)(t.columns,function(t){return t.property===i});r&&(r.order=n,this.updateSort(r,i,n),this.commit("changeSortCondition",{init:o}))}},changeSortCondition:function(t,e){var i=t.sortingColumn,n=t.sortProp,o=t.sortOrder;null===o&&(t.sortingColumn=null,t.sortProp=null);this.execQuery({filter:!0}),e&&(e.silent||e.init)||this.table.$emit("sort-change",{column:i,prop:n,order:o}),this.updateTableScrollY()},filterChange:function(t,e){var i=e.column,n=e.values,o=e.silent,r=this.updateFilters(i,n);this.execQuery(),o||this.table.$emit("filter-change",r),this.updateTableScrollY()},toggleAllSelection:function(){this.toggleAllSelection()},rowSelectedChanged:function(t,e){this.toggleRowSelection(e),this.updateAllSelected()},setHoverRow:function(t,e){t.hoverRow=e},setCurrentRow:function(t,e){this.updateCurrentRow(e)}},Ri.prototype.commit=function(t){var e=this.mutations;if(!e[t])throw new Error("Action not found: "+t);for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];e[t].apply(this,[this.states].concat(n))},Ri.prototype.updateTableScrollY=function(){ui.a.nextTick(this.table.updateScrollY)};var Di=Ri;function xi(t){var e={};return Object.keys(t).forEach(function(i){var n=t[i],o=void 0;"string"==typeof n?o=function(){return this.store.states[n]}:"function"==typeof n?o=function(){return n.call(this,this.store.states)}:console.error("invalid value type"),o&&(e[i]=o)}),e}var Mi=i(30),Ai=i.n(Mi);var Ni=function(){function t(e){for(var i in function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.observers=[],this.table=null,this.store=null,this.columns=null,this.fit=!0,this.showHeader=!0,this.height=null,this.scrollX=!1,this.scrollY=!1,this.bodyWidth=null,this.fixedWidth=null,this.rightFixedWidth=null,this.tableHeight=null,this.headerHeight=44,this.appendHeight=0,this.footerHeight=44,this.viewportHeight=null,this.bodyHeight=null,this.fixedBodyHeight=null,this.gutterWidth=Ai()(),e)e.hasOwnProperty(i)&&(this[i]=e[i]);if(!this.table)throw new Error("table is required for Table Layout");if(!this.store)throw new Error("store is required for Table Layout")}return t.prototype.updateScrollY=function(){if(null===this.height)return!1;var t=this.table.bodyWrapper;if(this.table.$el&&t){var e=t.querySelector(".el-table__body"),i=this.scrollY,n=e.offsetHeight>this.bodyHeight;return this.scrollY=n,i!==n}return!1},t.prototype.setHeight=function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"height";if(!ui.a.prototype.$isServer){var n=this.table.$el;if(t=Ti(t),this.height=t,!n&&(t||0===t))return ui.a.nextTick(function(){return e.setHeight(t,i)});"number"==typeof t?(n.style[i]=t+"px",this.updateElsHeight()):"string"==typeof t&&(n.style[i]=t,this.updateElsHeight())}},t.prototype.setMaxHeight=function(t){this.setHeight(t,"max-height")},t.prototype.getFlattenColumns=function(){var t=[];return this.table.columns.forEach(function(e){e.isColumnGroup?t.push.apply(t,e.columns):t.push(e)}),t},t.prototype.updateElsHeight=function(){var t=this;if(!this.table.$ready)return ui.a.nextTick(function(){return t.updateElsHeight()});var e=this.table.$refs,i=e.headerWrapper,n=e.appendWrapper,o=e.footerWrapper;if(this.appendHeight=n?n.offsetHeight:0,!this.showHeader||i){var r=i?i.querySelector(".el-table__header tr"):null,s=this.headerDisplayNone(r),a=this.headerHeight=this.showHeader?i.offsetHeight:0;if(this.showHeader&&!s&&i.offsetWidth>0&&(this.table.columns||[]).length>0&&a<2)return ui.a.nextTick(function(){return t.updateElsHeight()});var l=this.tableHeight=this.table.$el.clientHeight,c=this.footerHeight=o?o.offsetHeight:0;null!==this.height&&(this.bodyHeight=l-a-c+(o?1:0)),this.fixedBodyHeight=this.scrollX?this.bodyHeight-this.gutterWidth:this.bodyHeight;var u=!(this.store.states.data&&this.store.states.data.length);this.viewportHeight=this.scrollX?l-(u?0:this.gutterWidth):l,this.updateScrollY(),this.notifyObservers("scrollable")}},t.prototype.headerDisplayNone=function(t){if(!t)return!0;for(var e=t;"DIV"!==e.tagName;){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1},t.prototype.updateColumnsWidth=function(){if(!ui.a.prototype.$isServer){var t=this.fit,e=this.table.$el.clientWidth,i=0,n=this.getFlattenColumns(),o=n.filter(function(t){return"number"!=typeof t.width});if(n.forEach(function(t){"number"==typeof t.width&&t.realWidth&&(t.realWidth=null)}),o.length>0&&t){n.forEach(function(t){i+=t.width||t.minWidth||80});var r=this.scrollY?this.gutterWidth:0;if(i<=e-r){this.scrollX=!1;var s=e-r-i;if(1===o.length)o[0].realWidth=(o[0].minWidth||80)+s;else{var a=s/o.reduce(function(t,e){return t+(e.minWidth||80)},0),l=0;o.forEach(function(t,e){if(0!==e){var i=Math.floor((t.minWidth||80)*a);l+=i,t.realWidth=(t.minWidth||80)+i}}),o[0].realWidth=(o[0].minWidth||80)+s-l}}else this.scrollX=!0,o.forEach(function(t){t.realWidth=t.minWidth});this.bodyWidth=Math.max(i,e),this.table.resizeState.width=this.bodyWidth}else n.forEach(function(t){t.width||t.minWidth?t.realWidth=t.width||t.minWidth:t.realWidth=80,i+=t.realWidth}),this.scrollX=i>e,this.bodyWidth=i;var c=this.store.states.fixedColumns;if(c.length>0){var u=0;c.forEach(function(t){u+=t.realWidth||t.width}),this.fixedWidth=u}var h=this.store.states.rightFixedColumns;if(h.length>0){var p=0;h.forEach(function(t){p+=t.realWidth||t.width}),this.rightFixedWidth=p}this.notifyObservers("columns")}},t.prototype.addObserver=function(t){this.observers.push(t)},t.prototype.removeObserver=function(t){var e=this.observers.indexOf(t);-1!==e&&this.observers.splice(e,1)},t.prototype.notifyObservers=function(t){var e=this;this.observers.forEach(function(i){switch(t){case"columns":i.onColumnsChange(e);break;case"scrollable":i.onScrollableChange(e);break;default:throw new Error("Table Layout don't have event "+t+".")}})},t}(),Li={created:function(){this.tableLayout.addObserver(this)},destroyed:function(){this.tableLayout.removeObserver(this)},computed:{tableLayout:function(){var t=this.layout;if(!t&&this.table&&(t=this.table.layout),!t)throw new Error("Can not find table layout.");return t}},mounted:function(){this.onColumnsChange(this.tableLayout),this.onScrollableChange(this.tableLayout)},updated:function(){this.__updated__||(this.onColumnsChange(this.tableLayout),this.onScrollableChange(this.tableLayout),this.__updated__=!0)},methods:{onColumnsChange:function(t){var e=this.$el.querySelectorAll("colgroup > col");if(e.length){var i={};t.getFlattenColumns().forEach(function(t){i[t.id]=t});for(var n=0,o=e.length;n<o;n++){var r=e[n],s=r.getAttribute("name"),a=i[s];a&&r.setAttribute("width",a.realWidth||a.width)}}},onScrollableChange:function(t){for(var e=this.$el.querySelectorAll("colgroup > col[name=gutter]"),i=0,n=e.length;i<n;i++){e[i].setAttribute("width",t.scrollY?t.gutterWidth:"0")}for(var o=this.$el.querySelectorAll("th.gutter"),r=0,s=o.length;r<s;r++){var a=o[r];a.style.width=t.scrollY?t.gutterWidth+"px":"0",a.style.display=t.scrollY?"":"none"}}}},Pi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bi=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},Fi={name:"ElTableBody",mixins:[Li],components:{ElCheckbox:ni.a,ElTooltip:It.a},props:{store:{required:!0},stripe:Boolean,context:{},rowClassName:[String,Function],rowStyle:[Object,Function],fixed:String,highlight:Boolean},render:function(t){var e=this,i=this.data||[];return t("table",{class:"el-table__body",attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[t("colgroup",[this.columns.map(function(e){return t("col",{attrs:{name:e.id},key:e.id})})]),t("tbody",[i.reduce(function(t,i){return t.concat(e.wrappedRowRender(i,t.length))},[]),t("el-tooltip",{attrs:{effect:this.table.tooltipEffect,placement:"top",content:this.tooltipContent},ref:"tooltip"})])])},computed:Bi({table:function(){return this.$parent}},xi({data:"data",columns:"columns",treeIndent:"indent",leftFixedLeafCount:"fixedLeafColumnsLength",rightFixedLeafCount:"rightFixedLeafColumnsLength",columnsCount:function(t){return t.columns.length},leftFixedCount:function(t){return t.fixedColumns.length},rightFixedCount:function(t){return t.rightFixedColumns.length},hasExpandColumn:function(t){return t.columns.some(function(t){return"expand"===t.type})}}),{firstDefaultColumnIndex:function(){return Object(g.arrayFindIndex)(this.columns,function(t){return"default"===t.type})}}),watch:{"store.states.hoverRow":function(t,e){var i=this;if(this.store.states.isComplex&&!this.$isServer){var n=window.requestAnimationFrame;n||(n=function(t){return setTimeout(t,16)}),n(function(){var n=i.$el.querySelectorAll(".el-table__row"),o=n[e],r=n[t];o&&Object(ft.removeClass)(o,"hover-row"),r&&Object(ft.addClass)(r,"hover-row")})}}},data:function(){return{tooltipContent:""}},created:function(){this.activateTooltip=D()(50,function(t){return t.handleShowPopper()})},methods:{getKeyOfRow:function(t,e){var i=this.table.rowKey;return i?mi(t,i):e},isColumnHidden:function(t){return!0===this.fixed||"left"===this.fixed?t>=this.leftFixedLeafCount:"right"===this.fixed?t<this.columnsCount-this.rightFixedLeafCount:t<this.leftFixedLeafCount||t>=this.columnsCount-this.rightFixedLeafCount},getSpan:function(t,e,i,n){var o=1,r=1,s=this.table.spanMethod;if("function"==typeof s){var a=s({row:t,column:e,rowIndex:i,columnIndex:n});Array.isArray(a)?(o=a[0],r=a[1]):"object"===(void 0===a?"undefined":Pi(a))&&(o=a.rowspan,r=a.colspan)}return{rowspan:o,colspan:r}},getRowStyle:function(t,e){var i=this.table.rowStyle;return"function"==typeof i?i.call(null,{row:t,rowIndex:e}):i||null},getRowClass:function(t,e){var i=["el-table__row"];this.table.highlightCurrentRow&&t===this.store.states.currentRow&&i.push("current-row"),this.stripe&&e%2==1&&i.push("el-table__row--striped");var n=this.table.rowClassName;return"string"==typeof n?i.push(n):"function"==typeof n&&i.push(n.call(null,{row:t,rowIndex:e})),this.store.states.expandRows.indexOf(t)>-1&&i.push("expanded"),i},getCellStyle:function(t,e,i,n){var o=this.table.cellStyle;return"function"==typeof o?o.call(null,{rowIndex:t,columnIndex:e,row:i,column:n}):o},getCellClass:function(t,e,i,n){var o=[n.id,n.align,n.className];this.isColumnHidden(e)&&o.push("is-hidden");var r=this.table.cellClassName;return"string"==typeof r?o.push(r):"function"==typeof r&&o.push(r.call(null,{rowIndex:t,columnIndex:e,row:i,column:n})),o.join(" ")},getColspanRealWidth:function(t,e,i){return e<1?t[i].realWidth:t.map(function(t){return t.realWidth}).slice(i,i+e).reduce(function(t,e){return t+e},-1)},handleCellMouseEnter:function(t,e){var i=this.table,n=pi(t);if(n){var o=_i(i,n),r=i.hoverState={cell:n,column:o,row:e};i.$emit("cell-mouse-enter",r.row,r.column,r.cell,t)}var s=t.target.querySelector(".cell");if(Object(ft.hasClass)(s,"el-tooltip")&&s.childNodes.length){var a=document.createRange();if(a.setStart(s,0),a.setEnd(s,s.childNodes.length),(a.getBoundingClientRect().width+((parseInt(Object(ft.getStyle)(s,"paddingLeft"),10)||0)+(parseInt(Object(ft.getStyle)(s,"paddingRight"),10)||0))>s.offsetWidth||s.scrollWidth>s.offsetWidth)&&this.$refs.tooltip){var l=this.$refs.tooltip;this.tooltipContent=n.innerText||n.textContent,l.referenceElm=n,l.$refs.popper&&(l.$refs.popper.style.display="none"),l.doDestroy(),l.setExpectedState(!0),this.activateTooltip(l)}}},handleCellMouseLeave:function(t){var e=this.$refs.tooltip;if(e&&(e.setExpectedState(!1),e.handleClosePopper()),pi(t)){var i=this.table.hoverState||{};this.table.$emit("cell-mouse-leave",i.row,i.column,i.cell,t)}},handleMouseEnter:D()(30,function(t){this.store.commit("setHoverRow",t)}),handleMouseLeave:D()(30,function(){this.store.commit("setHoverRow",null)}),handleContextMenu:function(t,e){this.handleEvent(t,e,"contextmenu")},handleDoubleClick:function(t,e){this.handleEvent(t,e,"dblclick")},handleClick:function(t,e){this.store.commit("setCurrentRow",e),this.handleEvent(t,e,"click")},handleEvent:function(t,e,i){var n=this.table,o=pi(t),r=void 0;o&&(r=_i(n,o))&&n.$emit("cell-"+i,e,r,o,t),n.$emit("row-"+i,e,r,t)},rowRender:function(t,e,i){var n=this,o=this.$createElement,r=this.treeIndent,s=this.columns,a=this.firstDefaultColumnIndex,l=s.map(function(t,e){return n.isColumnHidden(e)}),c=this.getRowClass(t,e),u=!0;return i&&(c.push("el-table__row--level-"+i.level),u=i.display),o("tr",{style:[u?null:{display:"none"},this.getRowStyle(t,e)],class:c,key:this.getKeyOfRow(t,e),on:{dblclick:function(e){return n.handleDoubleClick(e,t)},click:function(e){return n.handleClick(e,t)},contextmenu:function(e){return n.handleContextMenu(e,t)},mouseenter:function(t){return n.handleMouseEnter(e)},mouseleave:this.handleMouseLeave}},[s.map(function(c,u){var h=n.getSpan(t,c,e,u),p=h.rowspan,d=h.colspan;if(!p||!d)return null;var f=Bi({},c);f.realWidth=n.getColspanRealWidth(s,d,u);var g={store:n.store,_self:n.context||n.table.$vnode.context,column:f,row:t,$index:e};return u===a&&i&&(g.treeNode={indent:i.level*r,level:i.level},"boolean"==typeof i.expanded&&(g.treeNode.expanded=i.expanded,"loading"in i&&(g.treeNode.loading=i.loading),"noLazyChildren"in i&&(g.treeNode.noLazyChildren=i.noLazyChildren))),o("td",{style:n.getCellStyle(e,u,t,c),class:n.getCellClass(e,u,t,c),attrs:{rowspan:p,colspan:d},on:{mouseenter:function(e){return n.handleCellMouseEnter(e,t)},mouseleave:n.handleCellMouseLeave}},[c.renderCell.call(n._renderProxy,n.$createElement,g,l[u])])})])},wrappedRowRender:function(t,e){var i=this,n=this.$createElement,o=this.store,r=o.isRowExpanded,s=o.assertRowKey,a=o.states,l=a.treeData,c=a.lazyTreeNodeMap,u=a.childrenColumnName,h=a.rowKey;if(this.hasExpandColumn&&r(t)){var p=this.table.renderExpanded,d=this.rowRender(t,e);return p?[[d,n("tr",{key:"expanded-row__"+d.key},[n("td",{attrs:{colspan:this.columnsCount},class:"el-table__expanded-cell"},[p(this.$createElement,{row:t,$index:e,store:this.store})])])]]:(console.error("[Element Error]renderExpanded is required."),d)}if(Object.keys(l).length){s();var f=mi(t,h),g=l[f],_=null;g&&(_={expanded:g.expanded,level:g.level,display:!0},"boolean"==typeof g.lazy&&("boolean"==typeof g.loaded&&g.loaded&&(_.noLazyChildren=!(g.children&&g.children.length)),_.loading=g.loading));var m=[this.rowRender(t,e,_)];if(g){var v=0;g.display=!0,function t(n,o){n&&n.length&&o&&n.forEach(function(n){var r={display:o.display&&o.expanded,level:o.level+1},s=mi(n,h);if(void 0===s||null===s)throw new Error("for nested data item, row-key is required.");if((g=Bi({},l[s]))&&(r.expanded=g.expanded,g.level=g.level||r.level,g.display=!(!g.expanded||!r.display),"boolean"==typeof g.lazy&&("boolean"==typeof g.loaded&&g.loaded&&(r.noLazyChildren=!(g.children&&g.children.length)),r.loading=g.loading)),v++,m.push(i.rowRender(n,e+v,r)),g){var a=c[s]||n[u];t(a,g)}})}(c[f]||t[u],g)}return m}return this.rowRender(t,e)}}},Hi=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"el-zoom-in-top"}},[t.multiple?i("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:t.handleOutsideClick,expression:"handleOutsideClick"},{name:"show",rawName:"v-show",value:t.showPopper,expression:"showPopper"}],staticClass:"el-table-filter"},[i("div",{staticClass:"el-table-filter__content"},[i("el-scrollbar",{attrs:{"wrap-class":"el-table-filter__wrap"}},[i("el-checkbox-group",{staticClass:"el-table-filter__checkbox-group",model:{value:t.filteredValue,callback:function(e){t.filteredValue=e},expression:"filteredValue"}},t._l(t.filters,function(e){return i("el-checkbox",{key:e.value,attrs:{label:e.value}},[t._v(t._s(e.text))])}),1)],1)],1),i("div",{staticClass:"el-table-filter__bottom"},[i("button",{class:{"is-disabled":0===t.filteredValue.length},attrs:{disabled:0===t.filteredValue.length},on:{click:t.handleConfirm}},[t._v(t._s(t.t("el.table.confirmFilter")))]),i("button",{on:{click:t.handleReset}},[t._v(t._s(t.t("el.table.resetFilter")))])])]):i("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:t.handleOutsideClick,expression:"handleOutsideClick"},{name:"show",rawName:"v-show",value:t.showPopper,expression:"showPopper"}],staticClass:"el-table-filter"},[i("ul",{staticClass:"el-table-filter__list"},[i("li",{staticClass:"el-table-filter__list-item",class:{"is-active":void 0===t.filterValue||null===t.filterValue},on:{click:function(e){t.handleSelect(null)}}},[t._v(t._s(t.t("el.table.clearFilter")))]),t._l(t.filters,function(e){return i("li",{key:e.value,staticClass:"el-table-filter__list-item",class:{"is-active":t.isActive(e)},attrs:{label:e.value},on:{click:function(i){t.handleSelect(e.value)}}},[t._v(t._s(e.text))])})],2)])])};Hi._withStripped=!0;var Ui=[];!ui.a.prototype.$isServer&&document.addEventListener("click",function(t){Ui.forEach(function(e){var i=t.target;e&&e.$el&&(i===e.$el||e.$el.contains(i)||e.handleOutsideClick&&e.handleOutsideClick(t))})});var Vi=function(t){t&&Ui.push(t)},Gi=function(t){-1!==Ui.indexOf(t)&&Ui.splice(t,1)},Wi=i(31),$i=i.n(Wi),ji=o({name:"ElTableFilterPanel",mixins:[L.a,f.a],directives:{Clickoutside:M.a},components:{ElCheckbox:ni.a,ElCheckboxGroup:$i.a,ElScrollbar:B.a},props:{placement:{type:String,default:"bottom-end"}},methods:{isActive:function(t){return t.value===this.filterValue},handleOutsideClick:function(){var t=this;setTimeout(function(){t.showPopper=!1},16)},handleConfirm:function(){this.confirmFilter(this.filteredValue),this.handleOutsideClick()},handleReset:function(){this.filteredValue=[],this.confirmFilter(this.filteredValue),this.handleOutsideClick()},handleSelect:function(t){this.filterValue=t,void 0!==t&&null!==t?this.confirmFilter(this.filteredValue):this.confirmFilter([]),this.handleOutsideClick()},confirmFilter:function(t){this.table.store.commit("filterChange",{column:this.column,values:t}),this.table.store.updateAllSelected()}},data:function(){return{table:null,cell:null,column:null}},computed:{filters:function(){return this.column&&this.column.filters},filterValue:{get:function(){return(this.column.filteredValue||[])[0]},set:function(t){this.filteredValue&&(void 0!==t&&null!==t?this.filteredValue.splice(0,1,t):this.filteredValue.splice(0,1))}},filteredValue:{get:function(){return this.column&&this.column.filteredValue||[]},set:function(t){this.column&&(this.column.filteredValue=t)}},multiple:function(){return!this.column||this.column.filterMultiple}},mounted:function(){var t=this;this.popperElm=this.$el,this.referenceElm=this.cell,this.table.bodyWrapper.addEventListener("scroll",function(){t.updatePopper()}),this.$watch("showPopper",function(e){t.column&&(t.column.filterOpened=e),e?Vi(t):Gi(t)})},watch:{showPopper:function(t){!0===t&&parseInt(this.popperJS._popper.style.zIndex,10)<y.PopupManager.zIndex&&(this.popperJS._popper.style.zIndex=y.PopupManager.nextZIndex())}}},Hi,[],!1,null,null,null);ji.options.__file="packages/table/src/filter-panel.vue";var zi=ji.exports,Xi=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},Yi=function(t){var e=1;t.forEach(function(t){t.level=1,function t(i,n){if(n&&(i.level=n.level+1,e<i.level&&(e=i.level)),i.children){var o=0;i.children.forEach(function(e){t(e,i),o+=e.colSpan}),i.colSpan=o}else i.colSpan=1}(t)});for(var i=[],n=0;n<e;n++)i.push([]);return function t(e){var i=[];return e.forEach(function(e){e.children?(i.push(e),i.push.apply(i,t(e.children))):i.push(e)}),i}(t).forEach(function(t){t.children?t.rowSpan=1:t.rowSpan=e-t.level+1,i[t.level-1].push(t)}),i},Ki={name:"ElTableHeader",mixins:[Li],render:function(t){var e=this,i=this.store.states.originColumns,n=Yi(i,this.columns),o=n.length>1;return o&&(this.$parent.isGroup=!0),t("table",{class:"el-table__header",attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[t("colgroup",[this.columns.map(function(e){return t("col",{attrs:{name:e.id},key:e.id})}),this.hasGutter?t("col",{attrs:{name:"gutter"}}):""]),t("thead",{class:[{"is-group":o,"has-gutter":this.hasGutter}]},[this._l(n,function(i,n){return t("tr",{style:e.getHeaderRowStyle(n),class:e.getHeaderRowClass(n)},[i.map(function(o,r){return t("th",{attrs:{colspan:o.colSpan,rowspan:o.rowSpan},on:{mousemove:function(t){return e.handleMouseMove(t,o)},mouseout:e.handleMouseOut,mousedown:function(t){return e.handleMouseDown(t,o)},click:function(t){return e.handleHeaderClick(t,o)},contextmenu:function(t){return e.handleHeaderContextMenu(t,o)}},style:e.getHeaderCellStyle(n,r,i,o),class:e.getHeaderCellClass(n,r,i,o),key:o.id},[t("div",{class:["cell",o.filteredValue&&o.filteredValue.length>0?"highlight":"",o.labelClassName]},[o.renderHeader?o.renderHeader.call(e._renderProxy,t,{column:o,$index:r,store:e.store,_self:e.$parent.$vnode.context}):o.label,o.sortable?t("span",{class:"caret-wrapper",on:{click:function(t){return e.handleSortClick(t,o)}}},[t("i",{class:"sort-caret ascending",on:{click:function(t){return e.handleSortClick(t,o,"ascending")}}}),t("i",{class:"sort-caret descending",on:{click:function(t){return e.handleSortClick(t,o,"descending")}}})]):"",o.filterable?t("span",{class:"el-table__column-filter-trigger",on:{click:function(t){return e.handleFilterClick(t,o)}}},[t("i",{class:["el-icon-arrow-down",o.filterOpened?"el-icon-arrow-up":""]})]):""])])}),e.hasGutter?t("th",{class:"gutter"}):""])})])])},props:{fixed:String,store:{required:!0},border:Boolean,defaultSort:{type:Object,default:function(){return{prop:"",order:""}}}},components:{ElCheckbox:ni.a},computed:Xi({table:function(){return this.$parent},hasGutter:function(){return!this.fixed&&this.tableLayout.gutterWidth}},xi({columns:"columns",isAllSelected:"isAllSelected",leftFixedLeafCount:"fixedLeafColumnsLength",rightFixedLeafCount:"rightFixedLeafColumnsLength",columnsCount:function(t){return t.columns.length},leftFixedCount:function(t){return t.fixedColumns.length},rightFixedCount:function(t){return t.rightFixedColumns.length}})),created:function(){this.filterPanels={}},mounted:function(){var t=this;this.$nextTick(function(){var e=t.defaultSort,i=e.prop,n=e.order;t.store.commit("sort",{prop:i,order:n,init:!0})})},beforeDestroy:function(){var t=this.filterPanels;for(var e in t)t.hasOwnProperty(e)&&t[e]&&t[e].$destroy(!0)},methods:{isCellHidden:function(t,e){for(var i=0,n=0;n<t;n++)i+=e[n].colSpan;var o=i+e[t].colSpan-1;return!0===this.fixed||"left"===this.fixed?o>=this.leftFixedLeafCount:"right"===this.fixed?i<this.columnsCount-this.rightFixedLeafCount:o<this.leftFixedLeafCount||i>=this.columnsCount-this.rightFixedLeafCount},getHeaderRowStyle:function(t){var e=this.table.headerRowStyle;return"function"==typeof e?e.call(null,{rowIndex:t}):e},getHeaderRowClass:function(t){var e=[],i=this.table.headerRowClassName;return"string"==typeof i?e.push(i):"function"==typeof i&&e.push(i.call(null,{rowIndex:t})),e.join(" ")},getHeaderCellStyle:function(t,e,i,n){var o=this.table.headerCellStyle;return"function"==typeof o?o.call(null,{rowIndex:t,columnIndex:e,row:i,column:n}):o},getHeaderCellClass:function(t,e,i,n){var o=[n.id,n.order,n.headerAlign,n.className,n.labelClassName];0===t&&this.isCellHidden(e,i)&&o.push("is-hidden"),n.children||o.push("is-leaf"),n.sortable&&o.push("is-sortable");var r=this.table.headerCellClassName;return"string"==typeof r?o.push(r):"function"==typeof r&&o.push(r.call(null,{rowIndex:t,columnIndex:e,row:i,column:n})),o.join(" ")},toggleAllSelection:function(t){t.stopPropagation(),this.store.commit("toggleAllSelection")},handleFilterClick:function(t,e){t.stopPropagation();var i=t.target,n="TH"===i.tagName?i:i.parentNode;if(!Object(ft.hasClass)(n,"noclick")){n=n.querySelector(".el-table__column-filter-trigger")||n;var o=this.$parent,r=this.filterPanels[e.id];r&&e.filterOpened?r.showPopper=!1:(r||(r=new ui.a(zi),this.filterPanels[e.id]=r,e.filterPlacement&&(r.placement=e.filterPlacement),r.table=o,r.cell=n,r.column=e,!this.$isServer&&r.$mount(document.createElement("div"))),setTimeout(function(){r.showPopper=!0},16))}},handleHeaderClick:function(t,e){!e.filters&&e.sortable?this.handleSortClick(t,e):e.filterable&&!e.sortable&&this.handleFilterClick(t,e),this.$parent.$emit("header-click",e,t)},handleHeaderContextMenu:function(t,e){this.$parent.$emit("header-contextmenu",e,t)},handleMouseDown:function(t,e){var i=this;if(!this.$isServer&&!(e.children&&e.children.length>0)&&this.draggingColumn&&this.border){this.dragging=!0,this.$parent.resizeProxyVisible=!0;var n=this.$parent,o=n.$el.getBoundingClientRect().left,r=this.$el.querySelector("th."+e.id),s=r.getBoundingClientRect(),a=s.left-o+30;Object(ft.addClass)(r,"noclick"),this.dragState={startMouseLeft:t.clientX,startLeft:s.right-o,startColumnLeft:s.left-o,tableLeft:o};var l=n.$refs.resizeProxy;l.style.left=this.dragState.startLeft+"px",document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};var c=function(t){var e=t.clientX-i.dragState.startMouseLeft,n=i.dragState.startLeft+e;l.style.left=Math.max(a,n)+"px"};document.addEventListener("mousemove",c),document.addEventListener("mouseup",function o(){if(i.dragging){var s=i.dragState,a=s.startColumnLeft,u=s.startLeft,h=parseInt(l.style.left,10)-a;e.width=e.realWidth=h,n.$emit("header-dragend",e.width,u-a,e,t),i.store.scheduleLayout(),document.body.style.cursor="",i.dragging=!1,i.draggingColumn=null,i.dragState={},n.resizeProxyVisible=!1}document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",o),document.onselectstart=null,document.ondragstart=null,setTimeout(function(){Object(ft.removeClass)(r,"noclick")},0)})}},handleMouseMove:function(t,e){if(!(e.children&&e.children.length>0)){for(var i=t.target;i&&"TH"!==i.tagName;)i=i.parentNode;if(e&&e.resizable&&!this.dragging&&this.border){var n=i.getBoundingClientRect(),o=document.body.style;n.width>12&&n.right-t.pageX<8?(o.cursor="col-resize",Object(ft.hasClass)(i,"is-sortable")&&(i.style.cursor="col-resize"),this.draggingColumn=e):this.dragging||(o.cursor="",Object(ft.hasClass)(i,"is-sortable")&&(i.style.cursor="pointer"),this.draggingColumn=null)}}},handleMouseOut:function(){this.$isServer||(document.body.style.cursor="")},toggleOrder:function(t){var e=t.order,i=t.sortOrders;if(""===e)return i[0];var n=i.indexOf(e||null);return i[n>i.length-2?0:n+1]},handleSortClick:function(t,e,i){t.stopPropagation();for(var n=e.order===i?null:i||this.toggleOrder(e),o=t.target;o&&"TH"!==o.tagName;)o=o.parentNode;if(o&&"TH"===o.tagName&&Object(ft.hasClass)(o,"noclick"))Object(ft.removeClass)(o,"noclick");else if(e.sortable){var r=this.store.states,s=r.sortProp,a=void 0,l=r.sortingColumn;(l!==e||l===e&&null===l.order)&&(l&&(l.order=null),r.sortingColumn=e,s=e.property),a=e.order=n||null,r.sortProp=s,r.sortOrder=a,this.store.commit("changeSortCondition")}}},data:function(){return{draggingColumn:null,dragging:!1,dragState:{}}}},Ji=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},qi={name:"ElTableFooter",mixins:[Li],render:function(t){var e=this,i=[];return this.summaryMethod?i=this.summaryMethod({columns:this.columns,data:this.store.states.data}):this.columns.forEach(function(t,n){if(0!==n){var o=e.store.states.data.map(function(e){return Number(e[t.property])}),r=[],s=!0;o.forEach(function(t){if(!isNaN(t)){s=!1;var e=(""+t).split(".")[1];r.push(e?e.length:0)}});var a=Math.max.apply(null,r);i[n]=s?"":o.reduce(function(t,e){var i=Number(e);return isNaN(i)?t:parseFloat((t+e).toFixed(Math.min(a,20)))},0)}else i[n]=e.sumText}),t("table",{class:"el-table__footer",attrs:{cellspacing:"0",cellpadding:"0",border:"0"}},[t("colgroup",[this.columns.map(function(e){return t("col",{attrs:{name:e.id},key:e.id})}),this.hasGutter?t("col",{attrs:{name:"gutter"}}):""]),t("tbody",{class:[{"has-gutter":this.hasGutter}]},[t("tr",[this.columns.map(function(n,o){return t("td",{key:o,attrs:{colspan:n.colSpan,rowspan:n.rowSpan},class:e.getRowClasses(n,o)},[t("div",{class:["cell",n.labelClassName]},[i[o]])])}),this.hasGutter?t("th",{class:"gutter"}):""])])])},props:{fixed:String,store:{required:!0},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:function(){return{prop:"",order:""}}}},computed:Ji({table:function(){return this.$parent},hasGutter:function(){return!this.fixed&&this.tableLayout.gutterWidth}},xi({columns:"columns",isAllSelected:"isAllSelected",leftFixedLeafCount:"fixedLeafColumnsLength",rightFixedLeafCount:"rightFixedLeafColumnsLength",columnsCount:function(t){return t.columns.length},leftFixedCount:function(t){return t.fixedColumns.length},rightFixedCount:function(t){return t.rightFixedColumns.length}})),methods:{isCellHidden:function(t,e,i){if(!0===this.fixed||"left"===this.fixed)return t>=this.leftFixedLeafCount;if("right"===this.fixed){for(var n=0,o=0;o<t;o++)n+=e[o].colSpan;return n<this.columnsCount-this.rightFixedLeafCount}return!(this.fixed||!i.fixed)||(t<this.leftFixedCount||t>=this.columnsCount-this.rightFixedCount)},getRowClasses:function(t,e){var i=[t.id,t.align,t.labelClassName];return t.className&&i.push(t.className),this.isCellHidden(e,this.columns,t)&&i.push("is-hidden"),t.children||i.push("is-leaf"),i}}},Zi=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},Qi=1,tn=o({name:"ElTable",mixins:[f.a,E.a],directives:{Mousewheel:li},props:{data:{type:Array,default:function(){return[]}},size:String,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:!0},stripe:Boolean,border:Boolean,rowKey:[String,Function],context:{},showHeader:{type:Boolean,default:!0},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,defaultSort:Object,tooltipEffect:String,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},treeProps:{type:Object,default:function(){return{hasChildren:"hasChildren",children:"children"}}},lazy:Boolean,load:Function},components:{TableHeader:Ki,TableFooter:qi,TableBody:Fi,ElCheckbox:ni.a},methods:{getMigratingConfig:function(){return{events:{expand:"expand is renamed to expand-change"}}},setCurrentRow:function(t){this.store.commit("setCurrentRow",t)},toggleRowSelection:function(t,e){this.store.toggleRowSelection(t,e,!1),this.store.updateAllSelected()},toggleRowExpansion:function(t,e){this.store.toggleRowExpansionAdapter(t,e)},clearSelection:function(){this.store.clearSelection()},clearFilter:function(t){this.store.clearFilter(t)},clearSort:function(){this.store.clearSort()},handleMouseLeave:function(){this.store.commit("setHoverRow",null),this.hoverState&&(this.hoverState=null)},updateScrollY:function(){this.layout.updateScrollY()&&(this.layout.notifyObservers("scrollable"),this.layout.updateColumnsWidth())},handleFixedMousewheel:function(t,e){var i=this.bodyWrapper;if(Math.abs(e.spinY)>0){var n=i.scrollTop;e.pixelY<0&&0!==n&&t.preventDefault(),e.pixelY>0&&i.scrollHeight-i.clientHeight>n&&t.preventDefault(),i.scrollTop+=Math.ceil(e.pixelY/5)}else i.scrollLeft+=Math.ceil(e.pixelX/5)},handleHeaderFooterMousewheel:function(t,e){var i=e.pixelX,n=e.pixelY;Math.abs(i)>=Math.abs(n)&&(this.bodyWrapper.scrollLeft+=e.pixelX/5)},syncPostion:Object(oi.throttle)(20,function(){var t=this.bodyWrapper,e=t.scrollLeft,i=t.scrollTop,n=t.offsetWidth,o=t.scrollWidth,r=this.$refs,s=r.headerWrapper,a=r.footerWrapper,l=r.fixedBodyWrapper,c=r.rightFixedBodyWrapper;s&&(s.scrollLeft=e),a&&(a.scrollLeft=e),l&&(l.scrollTop=i),c&&(c.scrollTop=i);var u=o-n-1;this.scrollPosition=e>=u?"right":0===e?"left":"middle"}),bindEvents:function(){this.bodyWrapper.addEventListener("scroll",this.syncPostion,{passive:!0}),this.fit&&Object(Pe.addResizeListener)(this.$el,this.resizeListener)},unbindEvents:function(){this.bodyWrapper.removeEventListener("scroll",this.syncPostion,{passive:!0}),this.fit&&Object(Pe.removeResizeListener)(this.$el,this.resizeListener)},resizeListener:function(){if(this.$ready){var t=!1,e=this.$el,i=this.resizeState,n=i.width,o=i.height,r=e.offsetWidth;n!==r&&(t=!0);var s=e.offsetHeight;(this.height||this.shouldUpdateHeight)&&o!==s&&(t=!0),t&&(this.resizeState.width=r,this.resizeState.height=s,this.doLayout())}},doLayout:function(){this.shouldUpdateHeight&&this.layout.updateElsHeight(),this.layout.updateColumnsWidth()},sort:function(t,e){this.store.commit("sort",{prop:t,order:e})},toggleAllSelection:function(){this.store.commit("toggleAllSelection")}},computed:Zi({tableSize:function(){return this.size||(this.$ELEMENT||{}).size},bodyWrapper:function(){return this.$refs.bodyWrapper},shouldUpdateHeight:function(){return this.height||this.maxHeight||this.fixedColumns.length>0||this.rightFixedColumns.length>0},bodyWidth:function(){var t=this.layout,e=t.bodyWidth,i=t.scrollY,n=t.gutterWidth;return e?e-(i?n:0)+"px":""},bodyHeight:function(){var t=this.layout,e=t.headerHeight,i=void 0===e?0:e,n=t.bodyHeight,o=t.footerHeight,r=void 0===o?0:o;if(this.height)return{height:n?n+"px":""};if(this.maxHeight){var s=Ti(this.maxHeight);if("number"==typeof s)return{"max-height":s-r-(this.showHeader?i:0)+"px"}}return{}},fixedBodyHeight:function(){if(this.height)return{height:this.layout.fixedBodyHeight?this.layout.fixedBodyHeight+"px":""};if(this.maxHeight){var t=Ti(this.maxHeight);if("number"==typeof t)return t=this.layout.scrollX?t-this.layout.gutterWidth:t,this.showHeader&&(t-=this.layout.headerHeight),{"max-height":(t-=this.layout.footerHeight)+"px"}}return{}},fixedHeight:function(){return this.maxHeight?this.showSummary?{bottom:0}:{bottom:this.layout.scrollX&&this.data.length?this.layout.gutterWidth+"px":""}:this.showSummary?{height:this.layout.tableHeight?this.layout.tableHeight+"px":""}:{height:this.layout.viewportHeight?this.layout.viewportHeight+"px":""}},emptyBlockStyle:function(){if(this.data&&this.data.length)return null;var t="100%";return this.layout.appendHeight&&(t="calc(100% - "+this.layout.appendHeight+"px)"),{width:this.bodyWidth,height:t}}},xi({selection:"selection",columns:"columns",tableData:"data",fixedColumns:"fixedColumns",rightFixedColumns:"rightFixedColumns"})),watch:{height:{immediate:!0,handler:function(t){this.layout.setHeight(t)}},maxHeight:{immediate:!0,handler:function(t){this.layout.setMaxHeight(t)}},currentRowKey:{immediate:!0,handler:function(t){this.rowKey&&this.store.setCurrentRowKey(t)}},data:{immediate:!0,handler:function(t){this.store.commit("setData",t)}},expandRowKeys:{immediate:!0,handler:function(t){t&&this.store.setExpandRowKeysAdapter(t)}}},created:function(){var t=this;this.tableId="el-table_"+Qi++,this.debouncedUpdateLayout=Object(oi.debounce)(50,function(){return t.doLayout()})},mounted:function(){var t=this;this.bindEvents(),this.store.updateColumns(),this.doLayout(),this.resizeState={width:this.$el.offsetWidth,height:this.$el.offsetHeight},this.store.states.columns.forEach(function(e){e.filteredValue&&e.filteredValue.length&&t.store.commit("filterChange",{column:e,values:e.filteredValue,silent:!0})}),this.$ready=!0},destroyed:function(){this.unbindEvents()},data:function(){var t=this.treeProps,e=t.hasChildren,i=void 0===e?"hasChildren":e,n=t.children,o=void 0===n?"children":n;return this.store=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t)throw new Error("Table is required.");var i=new Di;return i.table=t,i.toggleAllSelection=D()(10,i._toggleAllSelection),Object.keys(e).forEach(function(t){i.states[t]=e[t]}),i}(this,{rowKey:this.rowKey,defaultExpandAll:this.defaultExpandAll,selectOnIndeterminate:this.selectOnIndeterminate,indent:this.indent,lazy:this.lazy,lazyColumnIdentifier:i,childrenColumnName:o}),{layout:new Ni({store:this.store,table:this,fit:this.fit,showHeader:this.showHeader}),isHidden:!1,renderExpanded:null,resizeProxyVisible:!1,resizeState:{width:null,height:null},isGroup:!1,scrollPosition:"left"}}},ei,[],!1,null,null,null);tn.options.__file="packages/table/src/table.vue";var en=tn.exports;en.install=function(t){t.component(en.name,en)};var nn=en,on={default:{order:""},selection:{width:48,minWidth:48,realWidth:48,order:"",className:"el-table-column--selection"},expand:{width:48,minWidth:48,realWidth:48,order:""},index:{width:48,minWidth:48,realWidth:48,order:""}},rn={selection:{renderHeader:function(t,e){var i=e.store;return t("el-checkbox",{attrs:{disabled:i.states.data&&0===i.states.data.length,indeterminate:i.states.selection.length>0&&!this.isAllSelected,value:this.isAllSelected},nativeOn:{click:this.toggleAllSelection}})},renderCell:function(t,e){var i=e.row,n=e.column,o=e.store,r=e.$index;return t("el-checkbox",{nativeOn:{click:function(t){return t.stopPropagation()}},attrs:{value:o.isSelected(i),disabled:!!n.selectable&&!n.selectable.call(null,i,r)},on:{input:function(){o.commit("rowSelectedChanged",i)}}})},sortable:!1,resizable:!1},index:{renderHeader:function(t,e){return e.column.label||"#"},renderCell:function(t,e){var i=e.$index,n=i+1,o=e.column.index;return"number"==typeof o?n=i+o:"function"==typeof o&&(n=o(i)),t("div",[n])},sortable:!1},expand:{renderHeader:function(t,e){return e.column.label||""},renderCell:function(t,e){var i=e.row,n=e.store,o=["el-table__expand-icon"];n.states.expandRows.indexOf(i)>-1&&o.push("el-table__expand-icon--expanded");return t("div",{class:o,on:{click:function(t){t.stopPropagation(),n.toggleRowExpansion(i)}}},[t("i",{class:"el-icon el-icon-arrow-right"})])},sortable:!1,resizable:!1,className:"el-table__expand-column"}};function sn(t,e){var i=e.row,n=e.column,o=e.$index,r=n.property,s=r&&Object(g.getPropByPath)(i,r).v;return n&&n.formatter?n.formatter(i,n,s,o):s}var an=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},ln=1,cn={name:"ElTableColumn",props:{type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{},minWidth:{},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showTooltipWhenOverflow:Boolean,showOverflowTooltip:Boolean,fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},index:[Number,Function],sortOrders:{type:Array,default:function(){return["ascending","descending",null]},validator:function(t){return t.every(function(t){return["ascending","descending",null].indexOf(t)>-1})}}},data:function(){return{isSubColumn:!1,columns:[]}},computed:{owner:function(){for(var t=this.$parent;t&&!t.tableId;)t=t.$parent;return t},columnOrTableParent:function(){for(var t=this.$parent;t&&!t.tableId&&!t.columnId;)t=t.$parent;return t},realWidth:function(){return bi(this.width)},realMinWidth:function(){return void 0!==(t=this.minWidth)&&(t=bi(t),isNaN(t)&&(t=80)),t;var t},realAlign:function(){return this.align?"is-"+this.align:null},realHeaderAlign:function(){return this.headerAlign?"is-"+this.headerAlign:this.realAlign}},methods:{getPropsData:function(){for(var t=this,e=arguments.length,i=Array(e),n=0;n<e;n++)i[n]=arguments[n];return i.reduce(function(e,i){return Array.isArray(i)&&i.forEach(function(i){e[i]=t[i]}),e},{})},getColumnElIndex:function(t,e){return[].indexOf.call(t,e)},setColumnWidth:function(t){return this.realWidth&&(t.width=this.realWidth),this.realMinWidth&&(t.minWidth=this.realMinWidth),t.minWidth||(t.minWidth=80),t.realWidth=void 0===t.width?t.minWidth:t.width,t},setColumnForcedProps:function(t){var e=t.type,i=rn[e]||{};return Object.keys(i).forEach(function(e){var n=i[e];void 0!==n&&(t[e]="className"===e?t[e]+" "+n:n)}),t},setColumnRenders:function(t){var e=this;this.$createElement;this.renderHeader?console.warn("[Element Warn][TableColumn]Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header."):"selection"!==t.type&&(t.renderHeader=function(i,n){var o=e.$scopedSlots.header;return o?o(n):t.label});var i=t.renderCell;return"expand"===t.type?(t.renderCell=function(t,e){return t("div",{class:"cell"},[i(t,e)])},this.owner.renderExpanded=function(t,i){return e.$scopedSlots.default?e.$scopedSlots.default(i):e.$slots.default}):(i=i||sn,t.renderCell=function(n,o){var r=null;r=e.$scopedSlots.default?e.$scopedSlots.default(o):i(n,o);var s=function(t,e){var i=e.row,n=e.treeNode,o=e.store;if(!n)return null;var r=[];if(n.indent&&r.push(t("span",{class:"el-table__indent",style:{"padding-left":n.indent+"px"}})),"boolean"!=typeof n.expanded||n.noLazyChildren)r.push(t("span",{class:"el-table__placeholder"}));else{var s=["el-table__expand-icon",n.expanded?"el-table__expand-icon--expanded":""],a=["el-icon-arrow-right"];n.loading&&(a=["el-icon-loading"]),r.push(t("div",{class:s,on:{click:function(t){t.stopPropagation(),o.loadOrToggle(i)}}},[t("i",{class:a})]))}return r}(n,o),a={class:"cell",style:{}};return t.showOverflowTooltip&&(a.class+=" el-tooltip",a.style={width:(o.column.realWidth||o.column.width)-1+"px"}),n("div",a,[s,r])}),t},registerNormalWatchers:function(){var t=this,e={prop:"property",realAlign:"align",realHeaderAlign:"headerAlign",realWidth:"width"},i=["label","property","filters","filterMultiple","sortable","index","formatter","className","labelClassName","showOverflowTooltip"].reduce(function(t,e){return t[e]=e,t},e);Object.keys(i).forEach(function(i){var n=e[i];t.$watch(i,function(e){t.columnConfig[n]=e})})},registerComplexWatchers:function(){var t=this,e={realWidth:"width",realMinWidth:"minWidth"},i=["fixed"].reduce(function(t,e){return t[e]=e,t},e);Object.keys(i).forEach(function(i){var n=e[i];t.$watch(i,function(e){t.columnConfig[n]=e;var i="fixed"===n;t.owner.store.scheduleLayout(i)})})}},components:{ElCheckbox:ni.a},beforeCreate:function(){this.row={},this.column={},this.$index=0,this.columnId=""},created:function(){var t=this.columnOrTableParent;this.isSubColumn=this.owner!==t,this.columnId=(t.tableId||t.columnId)+"_column_"+ln++;var e=this.type||"default",i=""===this.sortable||this.sortable,n=an({},on[e],{id:this.columnId,type:e,property:this.prop||this.property,align:this.realAlign,headerAlign:this.realHeaderAlign,showOverflowTooltip:this.showOverflowTooltip||this.showTooltipWhenOverflow,filterable:this.filters||this.filterMethod,filteredValue:[],filterPlacement:"",isColumnGroup:!1,filterOpened:!1,sortable:i,index:this.index}),o=this.getPropsData(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement"]);o=function(t,e){var i={},n=void 0;for(n in t)i[n]=t[n];for(n in e)if(yi(e,n)){var o=e[n];void 0!==o&&(i[n]=o)}return i}(n,o),o=function(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce(function(t,e){return function(){return t(e.apply(void 0,arguments))}})}(this.setColumnRenders,this.setColumnWidth,this.setColumnForcedProps)(o),this.columnConfig=o,this.registerNormalWatchers(),this.registerComplexWatchers()},mounted:function(){var t=this.owner,e=this.columnOrTableParent,i=this.isSubColumn?e.$el.children:e.$refs.hiddenColumns.children,n=this.getColumnElIndex(i,this.$el);t.store.commit("insertColumn",this.columnConfig,n,this.isSubColumn?e.columnConfig:null)},destroyed:function(){if(this.$parent){var t=this.$parent;this.owner.store.commit("removeColumn",this.columnConfig,this.isSubColumn?t.columnConfig:null)}},render:function(t){return t("div",this.$slots.default)},install:function(t){t.component(cn.name,cn)}},un=cn,hn=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.ranged?i("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:t.handleClose,expression:"handleClose"}],ref:"reference",staticClass:"el-date-editor el-range-editor el-input__inner",class:["el-date-editor--"+t.type,t.pickerSize?"el-range-editor--"+t.pickerSize:"",t.pickerDisabled?"is-disabled":"",t.pickerVisible?"is-active":""],on:{click:t.handleRangeClick,mouseenter:t.handleMouseEnter,mouseleave:function(e){t.showClose=!1},keydown:t.handleKeydown}},[i("i",{class:["el-input__icon","el-range__icon",t.triggerClass]}),i("input",t._b({staticClass:"el-range-input",attrs:{autocomplete:"off",placeholder:t.startPlaceholder,disabled:t.pickerDisabled,readonly:!t.editable||t.readonly,name:t.name&&t.name[0]},domProps:{value:t.displayValue&&t.displayValue[0]},on:{input:t.handleStartInput,change:t.handleStartChange,focus:t.handleFocus}},"input",t.firstInputId,!1)),t._t("range-separator",[i("span",{staticClass:"el-range-separator"},[t._v(t._s(t.rangeSeparator))])]),i("input",t._b({staticClass:"el-range-input",attrs:{autocomplete:"off",placeholder:t.endPlaceholder,disabled:t.pickerDisabled,readonly:!t.editable||t.readonly,name:t.name&&t.name[1]},domProps:{value:t.displayValue&&t.displayValue[1]},on:{input:t.handleEndInput,change:t.handleEndChange,focus:t.handleFocus}},"input",t.secondInputId,!1)),t.haveTrigger?i("i",{staticClass:"el-input__icon el-range__close-icon",class:[t.showClose?""+t.clearIcon:""],on:{click:t.handleClickIcon}}):t._e()],2):i("el-input",t._b({directives:[{name:"clickoutside",rawName:"v-clickoutside",value:t.handleClose,expression:"handleClose"}],ref:"reference",staticClass:"el-date-editor",class:"el-date-editor--"+t.type,attrs:{readonly:!t.editable||t.readonly||"dates"===t.type||"week"===t.type,disabled:t.pickerDisabled,size:t.pickerSize,name:t.name,placeholder:t.placeholder,value:t.displayValue,validateEvent:!1},on:{focus:t.handleFocus,input:function(e){return t.userInput=e},change:t.handleChange},nativeOn:{keydown:function(e){return t.handleKeydown(e)},mouseenter:function(e){return t.handleMouseEnter(e)},mouseleave:function(e){t.showClose=!1}}},"el-input",t.firstInputId,!1),[i("i",{staticClass:"el-input__icon",class:t.triggerClass,attrs:{slot:"prefix"},on:{click:t.handleFocus},slot:"prefix"}),t.haveTrigger?i("i",{staticClass:"el-input__icon",class:[t.showClose?""+t.clearIcon:""],attrs:{slot:"suffix"},on:{click:t.handleClickIcon},slot:"suffix"}):t._e()])};hn._withStripped=!0;var pn=i(0),dn={props:{appendToBody:L.a.props.appendToBody,offset:L.a.props.offset,boundariesPadding:L.a.props.boundariesPadding,arrowOffset:L.a.props.arrowOffset},methods:L.a.methods,data:function(){return Vt()({visibleArrow:!0},L.a.data)},beforeDestroy:L.a.beforeDestroy},fn={date:"yyyy-MM-dd",month:"yyyy-MM",datetime:"yyyy-MM-dd HH:mm:ss",time:"HH:mm:ss",week:"yyyywWW",timerange:"HH:mm:ss",daterange:"yyyy-MM-dd",monthrange:"yyyy-MM",datetimerange:"yyyy-MM-dd HH:mm:ss",year:"yyyy"},gn=["date","datetime","time","time-select","week","month","year","daterange","monthrange","timerange","datetimerange","dates"],_n=function(t,e){return"timestamp"===e?t.getTime():Object(pn.formatDate)(t,e)},mn=function(t,e){return"timestamp"===e?new Date(Number(t)):Object(pn.parseDate)(t,e)},vn=function(t,e){if(Array.isArray(t)&&2===t.length){var i=t[0],n=t[1];if(i&&n)return[_n(i,e),_n(n,e)]}return""},yn=function(t,e,i){if(Array.isArray(t)||(t=t.split(i)),2===t.length){var n=t[0],o=t[1];return[mn(n,e),mn(o,e)]}return[]},bn={default:{formatter:function(t){return t?""+t:""},parser:function(t){return void 0===t||""===t?null:t}},week:{formatter:function(t,e){var i=Object(pn.getWeekNumber)(t),n=t.getMonth(),o=new Date(t);1===i&&11===n&&(o.setHours(0,0,0,0),o.setDate(o.getDate()+3-(o.getDay()+6)%7));var r=Object(pn.formatDate)(o,e);return r=/WW/.test(r)?r.replace(/WW/,i<10?"0"+i:i):r.replace(/W/,i)},parser:function(t,e){return bn.date.parser(t,e)}},date:{formatter:_n,parser:mn},datetime:{formatter:_n,parser:mn},daterange:{formatter:vn,parser:yn},monthrange:{formatter:vn,parser:yn},datetimerange:{formatter:vn,parser:yn},timerange:{formatter:vn,parser:yn},time:{formatter:_n,parser:mn},month:{formatter:_n,parser:mn},year:{formatter:_n,parser:mn},number:{formatter:function(t){return t?""+t:""},parser:function(t){var e=Number(t);return isNaN(t)?null:e}},dates:{formatter:function(t,e){return t.map(function(t){return _n(t,e)})},parser:function(t,e){return("string"==typeof t?t.split(", "):t).map(function(t){return t instanceof Date?t:mn(t,e)})}}},Tn={left:"bottom-start",center:"bottom",right:"bottom-end"},En=function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"-";return t?(0,(bn[i]||bn.default).parser)(t,e||fn[i],n):null},Cn=function(t,e,i){return t?(0,(bn[i]||bn.default).formatter)(t,e||fn[i]):null},Sn=function(t,e){var i=function(t,e){var i=t instanceof Date,n=e instanceof Date;return i&&n?t.getTime()===e.getTime():!i&&!n&&t===e},n=t instanceof Array,o=e instanceof Array;return n&&o?t.length===e.length&&t.every(function(t,n){return i(t,e[n])}):!n&&!o&&i(t,e)},kn=function(t){return"string"==typeof t||t instanceof String},On=function(t){return null===t||void 0===t||kn(t)||Array.isArray(t)&&2===t.length&&t.every(kn)},In=o({mixins:[S.a,dn],inject:{elForm:{default:""},elFormItem:{default:""}},props:{size:String,format:String,valueFormat:String,readonly:Boolean,placeholder:String,startPlaceholder:String,endPlaceholder:String,prefixIcon:String,clearIcon:{type:String,default:"el-icon-circle-close"},name:{default:"",validator:On},disabled:Boolean,clearable:{type:Boolean,default:!0},id:{default:"",validator:On},popperClass:String,editable:{type:Boolean,default:!0},align:{type:String,default:"left"},value:{},defaultValue:{},defaultTime:{},rangeSeparator:{default:"-"},pickerOptions:{},unlinkPanels:Boolean,validateEvent:{type:Boolean,default:!0}},components:{ElInput:p.a},directives:{Clickoutside:M.a},data:function(){return{pickerVisible:!1,showClose:!1,userInput:null,valueOnOpen:null,unwatchPickerOptions:null}},watch:{pickerVisible:function(t){this.readonly||this.pickerDisabled||(t?(this.showPicker(),this.valueOnOpen=Array.isArray(this.value)?[].concat(this.value):this.value):(this.hidePicker(),this.emitChange(this.value),this.userInput=null,this.validateEvent&&this.dispatch("ElFormItem","el.form.blur"),this.$emit("blur",this),this.blur()))},parsedValue:{immediate:!0,handler:function(t){this.picker&&(this.picker.value=t)}},defaultValue:function(t){this.picker&&(this.picker.defaultValue=t)},value:function(t,e){Sn(t,e)||this.pickerVisible||!this.validateEvent||this.dispatch("ElFormItem","el.form.change",t)}},computed:{ranged:function(){return this.type.indexOf("range")>-1},reference:function(){var t=this.$refs.reference;return t.$el||t},refInput:function(){return this.reference?[].slice.call(this.reference.querySelectorAll("input")):[]},valueIsEmpty:function(){var t=this.value;if(Array.isArray(t)){for(var e=0,i=t.length;e<i;e++)if(t[e])return!1}else if(t)return!1;return!0},triggerClass:function(){return this.prefixIcon||(-1!==this.type.indexOf("time")?"el-icon-time":"el-icon-date")},selectionMode:function(){return"week"===this.type?"week":"month"===this.type?"month":"year"===this.type?"year":"dates"===this.type?"dates":"day"},haveTrigger:function(){return void 0!==this.showTrigger?this.showTrigger:-1!==gn.indexOf(this.type)},displayValue:function(){var t=Cn(this.parsedValue,this.format,this.type,this.rangeSeparator);return Array.isArray(this.userInput)?[this.userInput[0]||t&&t[0]||"",this.userInput[1]||t&&t[1]||""]:null!==this.userInput?this.userInput:t?"dates"===this.type?t.join(", "):t:""},parsedValue:function(){return this.value?"time-select"===this.type?this.value:Object(pn.isDateObject)(this.value)||Array.isArray(this.value)&&this.value.every(pn.isDateObject)?this.value:this.valueFormat?En(this.value,this.valueFormat,this.type,this.rangeSeparator)||this.value:Array.isArray(this.value)?this.value.map(function(t){return new Date(t)}):new Date(this.value):this.value},_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},pickerSize:function(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size},pickerDisabled:function(){return this.disabled||(this.elForm||{}).disabled},firstInputId:function(){var t={},e=void 0;return(e=this.ranged?this.id&&this.id[0]:this.id)&&(t.id=e),t},secondInputId:function(){var t={},e=void 0;return this.ranged&&(e=this.id&&this.id[1]),e&&(t.id=e),t}},created:function(){this.popperOptions={boundariesPadding:0,gpuAcceleration:!1},this.placement=Tn[this.align]||Tn.left,this.$on("fieldReset",this.handleFieldReset)},methods:{focus:function(){this.ranged?this.handleFocus():this.$refs.reference.focus()},blur:function(){this.refInput.forEach(function(t){return t.blur()})},parseValue:function(t){var e=Object(pn.isDateObject)(t)||Array.isArray(t)&&t.every(pn.isDateObject);return this.valueFormat&&!e&&En(t,this.valueFormat,this.type,this.rangeSeparator)||t},formatToValue:function(t){var e=Object(pn.isDateObject)(t)||Array.isArray(t)&&t.every(pn.isDateObject);return this.valueFormat&&e?Cn(t,this.valueFormat,this.type,this.rangeSeparator):t},parseString:function(t){var e=Array.isArray(t)?this.type:this.type.replace("range","");return En(t,this.format,e)},formatToString:function(t){var e=Array.isArray(t)?this.type:this.type.replace("range","");return Cn(t,this.format,e)},handleMouseEnter:function(){this.readonly||this.pickerDisabled||!this.valueIsEmpty&&this.clearable&&(this.showClose=!0)},handleChange:function(){if(this.userInput){var t=this.parseString(this.displayValue);t&&(this.picker.value=t,this.isValidValue(t)&&(this.emitInput(t),this.userInput=null))}""===this.userInput&&(this.emitInput(null),this.emitChange(null),this.userInput=null)},handleStartInput:function(t){this.userInput?this.userInput=[t.target.value,this.userInput[1]]:this.userInput=[t.target.value,null]},handleEndInput:function(t){this.userInput?this.userInput=[this.userInput[0],t.target.value]:this.userInput=[null,t.target.value]},handleStartChange:function(t){var e=this.parseString(this.userInput&&this.userInput[0]);if(e){this.userInput=[this.formatToString(e),this.displayValue[1]];var i=[e,this.picker.value&&this.picker.value[1]];this.picker.value=i,this.isValidValue(i)&&(this.emitInput(i),this.userInput=null)}},handleEndChange:function(t){var e=this.parseString(this.userInput&&this.userInput[1]);if(e){this.userInput=[this.displayValue[0],this.formatToString(e)];var i=[this.picker.value&&this.picker.value[0],e];this.picker.value=i,this.isValidValue(i)&&(this.emitInput(i),this.userInput=null)}},handleClickIcon:function(t){this.readonly||this.pickerDisabled||(this.showClose?(this.valueOnOpen=this.value,t.stopPropagation(),this.emitInput(null),this.emitChange(null),this.showClose=!1,this.picker&&"function"==typeof this.picker.handleClear&&this.picker.handleClear()):this.pickerVisible=!this.pickerVisible)},handleClose:function(){if(this.pickerVisible&&(this.pickerVisible=!1,"dates"===this.type)){var t=En(this.valueOnOpen,this.valueFormat,this.type,this.rangeSeparator)||this.valueOnOpen;this.emitInput(t)}},handleFieldReset:function(t){this.userInput=""===t?null:t},handleFocus:function(){var t=this.type;-1===gn.indexOf(t)||this.pickerVisible||(this.pickerVisible=!0),this.$emit("focus",this)},handleKeydown:function(t){var e=this,i=t.keyCode;return 27===i?(this.pickerVisible=!1,void t.stopPropagation()):9!==i?13===i?((""===this.userInput||this.isValidValue(this.parseString(this.displayValue)))&&(this.handleChange(),this.pickerVisible=this.picker.visible=!1,this.blur()),void t.stopPropagation()):void(this.userInput?t.stopPropagation():this.picker&&this.picker.handleKeydown&&this.picker.handleKeydown(t)):void(this.ranged?setTimeout(function(){-1===e.refInput.indexOf(document.activeElement)&&(e.pickerVisible=!1,e.blur(),t.stopPropagation())},0):(this.handleChange(),this.pickerVisible=this.picker.visible=!1,this.blur(),t.stopPropagation()))},handleRangeClick:function(){var t=this.type;-1===gn.indexOf(t)||this.pickerVisible||(this.pickerVisible=!0),this.$emit("focus",this)},hidePicker:function(){this.picker&&(this.picker.resetView&&this.picker.resetView(),this.pickerVisible=this.picker.visible=!1,this.destroyPopper())},showPicker:function(){var t=this;this.$isServer||(this.picker||this.mountPicker(),this.pickerVisible=this.picker.visible=!0,this.updatePopper(),this.picker.value=this.parsedValue,this.picker.resetView&&this.picker.resetView(),this.$nextTick(function(){t.picker.adjustSpinners&&t.picker.adjustSpinners()}))},mountPicker:function(){var t=this;this.picker=new ui.a(this.panel).$mount(),this.picker.defaultValue=this.defaultValue,this.picker.defaultTime=this.defaultTime,this.picker.popperClass=this.popperClass,this.popperElm=this.picker.$el,this.picker.width=this.reference.getBoundingClientRect().width,this.picker.showTime="datetime"===this.type||"datetimerange"===this.type,this.picker.selectionMode=this.selectionMode,this.picker.unlinkPanels=this.unlinkPanels,this.picker.arrowControl=this.arrowControl||this.timeArrowControl||!1,this.$watch("format",function(e){t.picker.format=e});var e=function(){var e=t.pickerOptions;if(e&&e.selectableRange){var i=e.selectableRange,n=bn.datetimerange.parser,o=fn.timerange;i=Array.isArray(i)?i:[i],t.picker.selectableRange=i.map(function(e){return n(e,o,t.rangeSeparator)})}for(var r in e)e.hasOwnProperty(r)&&"selectableRange"!==r&&(t.picker[r]=e[r]);t.format&&(t.picker.format=t.format)};e(),this.unwatchPickerOptions=this.$watch("pickerOptions",function(){return e()},{deep:!0}),this.$el.appendChild(this.picker.$el),this.picker.resetView&&this.picker.resetView(),this.picker.$on("dodestroy",this.doDestroy),this.picker.$on("pick",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t.userInput=null,t.pickerVisible=t.picker.visible=i,t.emitInput(e),t.picker.resetView&&t.picker.resetView()}),this.picker.$on("select-range",function(e,i,n){0!==t.refInput.length&&(n&&"min"!==n?"max"===n&&(t.refInput[1].setSelectionRange(e,i),t.refInput[1].focus()):(t.refInput[0].setSelectionRange(e,i),t.refInput[0].focus()))})},unmountPicker:function(){this.picker&&(this.picker.$destroy(),this.picker.$off(),"function"==typeof this.unwatchPickerOptions&&this.unwatchPickerOptions(),this.picker.$el.parentNode.removeChild(this.picker.$el))},emitChange:function(t){Sn(t,this.valueOnOpen)||(this.$emit("change",t),this.valueOnOpen=t,this.validateEvent&&this.dispatch("ElFormItem","el.form.change",t))},emitInput:function(t){var e=this.formatToValue(t);Sn(this.value,e)||this.$emit("input",e)},isValidValue:function(t){return this.picker||this.mountPicker(),!this.picker.isValidValue||t&&this.picker.isValidValue(t)}}},hn,[],!1,null,null,null);In.options.__file="packages/date-picker/src/picker.vue";var wn=In.exports,Rn=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"el-zoom-in-top"},on:{"after-enter":t.handleEnter,"after-leave":t.handleLeave}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"el-picker-panel el-date-picker el-popper",class:[{"has-sidebar":t.$slots.sidebar||t.shortcuts,"has-time":t.showTime},t.popperClass]},[i("div",{staticClass:"el-picker-panel__body-wrapper"},[t._t("sidebar"),t.shortcuts?i("div",{staticClass:"el-picker-panel__sidebar"},t._l(t.shortcuts,function(e,n){return i("button",{key:n,staticClass:"el-picker-panel__shortcut",attrs:{type:"button"},on:{click:function(i){t.handleShortcutClick(e)}}},[t._v(t._s(e.text))])}),0):t._e(),i("div",{staticClass:"el-picker-panel__body"},[t.showTime?i("div",{staticClass:"el-date-picker__time-header"},[i("span",{staticClass:"el-date-picker__editor-wrap"},[i("el-input",{attrs:{placeholder:t.t("el.datepicker.selectDate"),value:t.visibleDate,size:"small"},on:{input:function(e){return t.userInputDate=e},change:t.handleVisibleDateChange}})],1),i("span",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:t.handleTimePickClose,expression:"handleTimePickClose"}],staticClass:"el-date-picker__editor-wrap"},[i("el-input",{ref:"input",attrs:{placeholder:t.t("el.datepicker.selectTime"),value:t.visibleTime,size:"small"},on:{focus:function(e){t.timePickerVisible=!0},input:function(e){return t.userInputTime=e},change:t.handleVisibleTimeChange}}),i("time-picker",{ref:"timepicker",attrs:{"time-arrow-control":t.arrowControl,visible:t.timePickerVisible},on:{pick:t.handleTimePick,mounted:t.proxyTimePickerDataProperties}})],1)]):t._e(),i("div",{directives:[{name:"show",rawName:"v-show",value:"time"!==t.currentView,expression:"currentView !== 'time'"}],staticClass:"el-date-picker__header",class:{"el-date-picker__header--bordered":"year"===t.currentView||"month"===t.currentView}},[i("button",{staticClass:"el-picker-panel__icon-btn el-date-picker__prev-btn el-icon-d-arrow-left",attrs:{type:"button","aria-label":t.t("el.datepicker.prevYear")},on:{click:t.prevYear}}),i("button",{directives:[{name:"show",rawName:"v-show",value:"date"===t.currentView,expression:"currentView === 'date'"}],staticClass:"el-picker-panel__icon-btn el-date-picker__prev-btn el-icon-arrow-left",attrs:{type:"button","aria-label":t.t("el.datepicker.prevMonth")},on:{click:t.prevMonth}}),i("span",{staticClass:"el-date-picker__header-label",attrs:{role:"button"},on:{click:t.showYearPicker}},[t._v(t._s(t.yearLabel))]),i("span",{directives:[{name:"show",rawName:"v-show",value:"date"===t.currentView,expression:"currentView === 'date'"}],staticClass:"el-date-picker__header-label",class:{active:"month"===t.currentView},attrs:{role:"button"},on:{click:t.showMonthPicker}},[t._v(t._s(t.t("el.datepicker.month"+(t.month+1))))]),i("button",{staticClass:"el-picker-panel__icon-btn el-date-picker__next-btn el-icon-d-arrow-right",attrs:{type:"button","aria-label":t.t("el.datepicker.nextYear")},on:{click:t.nextYear}}),i("button",{directives:[{name:"show",rawName:"v-show",value:"date"===t.currentView,expression:"currentView === 'date'"}],staticClass:"el-picker-panel__icon-btn el-date-picker__next-btn el-icon-arrow-right",attrs:{type:"button","aria-label":t.t("el.datepicker.nextMonth")},on:{click:t.nextMonth}})]),i("div",{staticClass:"el-picker-panel__content"},[i("date-table",{directives:[{name:"show",rawName:"v-show",value:"date"===t.currentView,expression:"currentView === 'date'"}],attrs:{"selection-mode":t.selectionMode,"first-day-of-week":t.firstDayOfWeek,value:t.value,"default-value":t.defaultValue?new Date(t.defaultValue):null,date:t.date,"cell-class-name":t.cellClassName,"disabled-date":t.disabledDate},on:{pick:t.handleDatePick}}),i("year-table",{directives:[{name:"show",rawName:"v-show",value:"year"===t.currentView,expression:"currentView === 'year'"}],attrs:{value:t.value,"default-value":t.defaultValue?new Date(t.defaultValue):null,date:t.date,"disabled-date":t.disabledDate},on:{pick:t.handleYearPick}}),i("month-table",{directives:[{name:"show",rawName:"v-show",value:"month"===t.currentView,expression:"currentView === 'month'"}],attrs:{value:t.value,"default-value":t.defaultValue?new Date(t.defaultValue):null,date:t.date,"disabled-date":t.disabledDate},on:{pick:t.handleMonthPick}})],1)])],2),i("div",{directives:[{name:"show",rawName:"v-show",value:t.footerVisible&&"date"===t.currentView,expression:"footerVisible && currentView === 'date'"}],staticClass:"el-picker-panel__footer"},[i("el-button",{directives:[{name:"show",rawName:"v-show",value:"dates"!==t.selectionMode,expression:"selectionMode !== 'dates'"}],staticClass:"el-picker-panel__link-btn",attrs:{size:"mini",type:"text"},on:{click:t.changeToNow}},[t._v("\n        "+t._s(t.t("el.datepicker.now"))+"\n      ")]),i("el-button",{staticClass:"el-picker-panel__link-btn",attrs:{plain:"",size:"mini"},on:{click:t.confirm}},[t._v("\n        "+t._s(t.t("el.datepicker.confirm"))+"\n      ")])],1)])])};Rn._withStripped=!0;var Dn=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"el-zoom-in-top"},on:{"after-leave":function(e){t.$emit("dodestroy")}}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"el-time-panel el-popper",class:t.popperClass},[i("div",{staticClass:"el-time-panel__content",class:{"has-seconds":t.showSeconds}},[i("time-spinner",{ref:"spinner",attrs:{"arrow-control":t.useArrow,"show-seconds":t.showSeconds,"am-pm-mode":t.amPmMode,date:t.date},on:{change:t.handleChange,"select-range":t.setSelectionRange}})],1),i("div",{staticClass:"el-time-panel__footer"},[i("button",{staticClass:"el-time-panel__btn cancel",attrs:{type:"button"},on:{click:t.handleCancel}},[t._v(t._s(t.t("el.datepicker.cancel")))]),i("button",{staticClass:"el-time-panel__btn",class:{confirm:!t.disabled},attrs:{type:"button"},on:{click:function(e){t.handleConfirm()}}},[t._v(t._s(t.t("el.datepicker.confirm")))])])])])};Dn._withStripped=!0;var xn=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"el-time-spinner",class:{"has-seconds":t.showSeconds}},[t.arrowControl?t._e():[i("el-scrollbar",{ref:"hours",staticClass:"el-time-spinner__wrapper",attrs:{"wrap-style":"max-height: inherit;","view-class":"el-time-spinner__list",noresize:"",tag:"ul"},nativeOn:{mouseenter:function(e){t.emitSelectRange("hours")},mousemove:function(e){t.adjustCurrentSpinner("hours")}}},t._l(t.hoursList,function(e,n){return i("li",{key:n,staticClass:"el-time-spinner__item",class:{active:n===t.hours,disabled:e},on:{click:function(i){t.handleClick("hours",{value:n,disabled:e})}}},[t._v(t._s(("0"+(t.amPmMode?n%12||12:n)).slice(-2))+t._s(t.amPm(n)))])}),0),i("el-scrollbar",{ref:"minutes",staticClass:"el-time-spinner__wrapper",attrs:{"wrap-style":"max-height: inherit;","view-class":"el-time-spinner__list",noresize:"",tag:"ul"},nativeOn:{mouseenter:function(e){t.emitSelectRange("minutes")},mousemove:function(e){t.adjustCurrentSpinner("minutes")}}},t._l(t.minutesList,function(e,n){return i("li",{key:n,staticClass:"el-time-spinner__item",class:{active:n===t.minutes,disabled:!e},on:{click:function(e){t.handleClick("minutes",{value:n,disabled:!1})}}},[t._v(t._s(("0"+n).slice(-2)))])}),0),i("el-scrollbar",{directives:[{name:"show",rawName:"v-show",value:t.showSeconds,expression:"showSeconds"}],ref:"seconds",staticClass:"el-time-spinner__wrapper",attrs:{"wrap-style":"max-height: inherit;","view-class":"el-time-spinner__list",noresize:"",tag:"ul"},nativeOn:{mouseenter:function(e){t.emitSelectRange("seconds")},mousemove:function(e){t.adjustCurrentSpinner("seconds")}}},t._l(60,function(e,n){return i("li",{key:n,staticClass:"el-time-spinner__item",class:{active:n===t.seconds},on:{click:function(e){t.handleClick("seconds",{value:n,disabled:!1})}}},[t._v(t._s(("0"+n).slice(-2)))])}),0)],t.arrowControl?[i("div",{staticClass:"el-time-spinner__wrapper is-arrow",on:{mouseenter:function(e){t.emitSelectRange("hours")}}},[i("i",{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:t.decrease,expression:"decrease"}],staticClass:"el-time-spinner__arrow el-icon-arrow-up"}),i("i",{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:t.increase,expression:"increase"}],staticClass:"el-time-spinner__arrow el-icon-arrow-down"}),i("ul",{ref:"hours",staticClass:"el-time-spinner__list"},t._l(t.arrowHourList,function(e,n){return i("li",{key:n,staticClass:"el-time-spinner__item",class:{active:e===t.hours,disabled:t.hoursList[e]}},[t._v(t._s(void 0===e?"":("0"+(t.amPmMode?e%12||12:e)).slice(-2)+t.amPm(e)))])}),0)]),i("div",{staticClass:"el-time-spinner__wrapper is-arrow",on:{mouseenter:function(e){t.emitSelectRange("minutes")}}},[i("i",{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:t.decrease,expression:"decrease"}],staticClass:"el-time-spinner__arrow el-icon-arrow-up"}),i("i",{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:t.increase,expression:"increase"}],staticClass:"el-time-spinner__arrow el-icon-arrow-down"}),i("ul",{ref:"minutes",staticClass:"el-time-spinner__list"},t._l(t.arrowMinuteList,function(e,n){return i("li",{key:n,staticClass:"el-time-spinner__item",class:{active:e===t.minutes}},[t._v("\n          "+t._s(void 0===e?"":("0"+e).slice(-2))+"\n        ")])}),0)]),t.showSeconds?i("div",{staticClass:"el-time-spinner__wrapper is-arrow",on:{mouseenter:function(e){t.emitSelectRange("seconds")}}},[i("i",{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:t.decrease,expression:"decrease"}],staticClass:"el-time-spinner__arrow el-icon-arrow-up"}),i("i",{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:t.increase,expression:"increase"}],staticClass:"el-time-spinner__arrow el-icon-arrow-down"}),i("ul",{ref:"seconds",staticClass:"el-time-spinner__list"},t._l(t.arrowSecondList,function(e,n){return i("li",{key:n,staticClass:"el-time-spinner__item",class:{active:e===t.seconds}},[t._v("\n          "+t._s(void 0===e?"":("0"+e).slice(-2))+"\n        ")])}),0)]):t._e()]:t._e()],2)};xn._withStripped=!0;var Mn=o({components:{ElScrollbar:B.a},directives:{repeatClick:Xt},props:{date:{},defaultValue:{},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:String,default:""}},computed:{hours:function(){return this.date.getHours()},minutes:function(){return this.date.getMinutes()},seconds:function(){return this.date.getSeconds()},hoursList:function(){return Object(pn.getRangeHours)(this.selectableRange)},minutesList:function(){return Object(pn.getRangeMinutes)(this.selectableRange,this.hours)},arrowHourList:function(){var t=this.hours;return[t>0?t-1:void 0,t,t<23?t+1:void 0]},arrowMinuteList:function(){var t=this.minutes;return[t>0?t-1:void 0,t,t<59?t+1:void 0]},arrowSecondList:function(){var t=this.seconds;return[t>0?t-1:void 0,t,t<59?t+1:void 0]}},data:function(){return{selectableRange:[],currentScrollbar:null}},mounted:function(){var t=this;this.$nextTick(function(){!t.arrowControl&&t.bindScrollEvent()})},methods:{increase:function(){this.scrollDown(1)},decrease:function(){this.scrollDown(-1)},modifyDateField:function(t,e){switch(t){case"hours":this.$emit("change",Object(pn.modifyTime)(this.date,e,this.minutes,this.seconds));break;case"minutes":this.$emit("change",Object(pn.modifyTime)(this.date,this.hours,e,this.seconds));break;case"seconds":this.$emit("change",Object(pn.modifyTime)(this.date,this.hours,this.minutes,e))}},handleClick:function(t,e){var i=e.value;e.disabled||(this.modifyDateField(t,i),this.emitSelectRange(t),this.adjustSpinner(t,i))},emitSelectRange:function(t){"hours"===t?this.$emit("select-range",0,2):"minutes"===t?this.$emit("select-range",3,5):"seconds"===t&&this.$emit("select-range",6,8),this.currentScrollbar=t},bindScrollEvent:function(){var t=this,e=function(e){t.$refs[e].wrap.onscroll=function(i){t.handleScroll(e,i)}};e("hours"),e("minutes"),e("seconds")},handleScroll:function(t){var e=Math.min(Math.round((this.$refs[t].wrap.scrollTop-(.5*this.scrollBarHeight(t)-10)/this.typeItemHeight(t)+3)/this.typeItemHeight(t)),"hours"===t?23:59);this.modifyDateField(t,e)},adjustSpinners:function(){this.adjustSpinner("hours",this.hours),this.adjustSpinner("minutes",this.minutes),this.adjustSpinner("seconds",this.seconds)},adjustCurrentSpinner:function(t){this.adjustSpinner(t,this[t])},adjustSpinner:function(t,e){if(!this.arrowControl){var i=this.$refs[t].wrap;i&&(i.scrollTop=Math.max(0,e*this.typeItemHeight(t)))}},scrollDown:function(t){var e=this;this.currentScrollbar||this.emitSelectRange("hours");var i=this.currentScrollbar,n=this.hoursList,o=this[i];if("hours"===this.currentScrollbar){var r=Math.abs(t);t=t>0?1:-1;for(var s=n.length;s--&&r;)n[o=(o+t+n.length)%n.length]||r--;if(n[o])return}else o=(o+t+60)%60;this.modifyDateField(i,o),this.adjustSpinner(i,o),this.$nextTick(function(){return e.emitSelectRange(e.currentScrollbar)})},amPm:function(t){if(!("a"===this.amPmMode.toLowerCase()))return"";var e="A"===this.amPmMode,i=t<12?" am":" pm";return e&&(i=i.toUpperCase()),i},typeItemHeight:function(t){return this.$refs[t].$el.querySelector("li").offsetHeight},scrollBarHeight:function(t){return this.$refs[t].$el.offsetHeight}}},xn,[],!1,null,null,null);Mn.options.__file="packages/date-picker/src/basic/time-spinner.vue";var An=Mn.exports,Nn=o({mixins:[f.a],components:{TimeSpinner:An},props:{visible:Boolean,timeArrowControl:Boolean},watch:{visible:function(t){var e=this;t?(this.oldValue=this.value,this.$nextTick(function(){return e.$refs.spinner.emitSelectRange("hours")})):this.needInitAdjust=!0},value:function(t){var e=this,i=void 0;t instanceof Date?i=Object(pn.limitTimeRange)(t,this.selectableRange,this.format):t||(i=this.defaultValue?new Date(this.defaultValue):new Date),this.date=i,this.visible&&this.needInitAdjust&&(this.$nextTick(function(t){return e.adjustSpinners()}),this.needInitAdjust=!1)},selectableRange:function(t){this.$refs.spinner.selectableRange=t},defaultValue:function(t){Object(pn.isDate)(this.value)||(this.date=t?new Date(t):new Date)}},data:function(){return{popperClass:"",format:"HH:mm:ss",value:"",defaultValue:null,date:new Date,oldValue:new Date,selectableRange:[],selectionRange:[0,2],disabled:!1,arrowControl:!1,needInitAdjust:!0}},computed:{showSeconds:function(){return-1!==(this.format||"").indexOf("ss")},useArrow:function(){return this.arrowControl||this.timeArrowControl||!1},amPmMode:function(){return-1!==(this.format||"").indexOf("A")?"A":-1!==(this.format||"").indexOf("a")?"a":""}},methods:{handleCancel:function(){this.$emit("pick",this.oldValue,!1)},handleChange:function(t){this.visible&&(this.date=Object(pn.clearMilliseconds)(t),this.isValidValue(this.date)&&this.$emit("pick",this.date,!0))},setSelectionRange:function(t,e){this.$emit("select-range",t,e),this.selectionRange=[t,e]},handleConfirm:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments[1];if(!e){var i=Object(pn.clearMilliseconds)(Object(pn.limitTimeRange)(this.date,this.selectableRange,this.format));this.$emit("pick",i,t,e)}},handleKeydown:function(t){var e=t.keyCode,i={38:-1,40:1,37:-1,39:1};if(37===e||39===e){var n=i[e];return this.changeSelectionRange(n),void t.preventDefault()}if(38===e||40===e){var o=i[e];return this.$refs.spinner.scrollDown(o),void t.preventDefault()}},isValidValue:function(t){return Object(pn.timeWithinRange)(t,this.selectableRange,this.format)},adjustSpinners:function(){return this.$refs.spinner.adjustSpinners()},changeSelectionRange:function(t){var e=[0,3].concat(this.showSeconds?[6]:[]),i=["hours","minutes"].concat(this.showSeconds?["seconds"]:[]),n=(e.indexOf(this.selectionRange[0])+t+e.length)%e.length;this.$refs.spinner.emitSelectRange(i[n])}},mounted:function(){var t=this;this.$nextTick(function(){return t.handleConfirm(!0,!0)}),this.$emit("mounted")}},Dn,[],!1,null,null,null);Nn.options.__file="packages/date-picker/src/panel/time.vue";var Ln=Nn.exports,Pn=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("table",{staticClass:"el-year-table",on:{click:t.handleYearTableClick}},[i("tbody",[i("tr",[i("td",{staticClass:"available",class:t.getCellStyle(t.startYear+0)},[i("a",{staticClass:"cell"},[t._v(t._s(t.startYear))])]),i("td",{staticClass:"available",class:t.getCellStyle(t.startYear+1)},[i("a",{staticClass:"cell"},[t._v(t._s(t.startYear+1))])]),i("td",{staticClass:"available",class:t.getCellStyle(t.startYear+2)},[i("a",{staticClass:"cell"},[t._v(t._s(t.startYear+2))])]),i("td",{staticClass:"available",class:t.getCellStyle(t.startYear+3)},[i("a",{staticClass:"cell"},[t._v(t._s(t.startYear+3))])])]),i("tr",[i("td",{staticClass:"available",class:t.getCellStyle(t.startYear+4)},[i("a",{staticClass:"cell"},[t._v(t._s(t.startYear+4))])]),i("td",{staticClass:"available",class:t.getCellStyle(t.startYear+5)},[i("a",{staticClass:"cell"},[t._v(t._s(t.startYear+5))])]),i("td",{staticClass:"available",class:t.getCellStyle(t.startYear+6)},[i("a",{staticClass:"cell"},[t._v(t._s(t.startYear+6))])]),i("td",{staticClass:"available",class:t.getCellStyle(t.startYear+7)},[i("a",{staticClass:"cell"},[t._v(t._s(t.startYear+7))])])]),i("tr",[i("td",{staticClass:"available",class:t.getCellStyle(t.startYear+8)},[i("a",{staticClass:"cell"},[t._v(t._s(t.startYear+8))])]),i("td",{staticClass:"available",class:t.getCellStyle(t.startYear+9)},[i("a",{staticClass:"cell"},[t._v(t._s(t.startYear+9))])]),i("td"),i("td")])])])};Pn._withStripped=!0;var Bn=o({props:{disabledDate:{},value:{},defaultValue:{validator:function(t){return null===t||t instanceof Date&&Object(pn.isDate)(t)}},date:{}},computed:{startYear:function(){return 10*Math.floor(this.date.getFullYear()/10)}},methods:{getCellStyle:function(t){var e={},i=new Date;return e.disabled="function"==typeof this.disabledDate&&function(t){var e=Object(pn.getDayCountOfYear)(t),i=new Date(t,0,1);return Object(pn.range)(e).map(function(t){return Object(pn.nextDate)(i,t)})}(t).every(this.disabledDate),e.current=Object(g.arrayFindIndex)(Object(g.coerceTruthyValueToArray)(this.value),function(e){return e.getFullYear()===t})>=0,e.today=i.getFullYear()===t,e.default=this.defaultValue&&this.defaultValue.getFullYear()===t,e},handleYearTableClick:function(t){var e=t.target;if("A"===e.tagName){if(Object(ft.hasClass)(e.parentNode,"disabled"))return;var i=e.textContent||e.innerText;this.$emit("pick",Number(i))}}}},Pn,[],!1,null,null,null);Bn.options.__file="packages/date-picker/src/basic/year-table.vue";var Fn=Bn.exports,Hn=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("table",{staticClass:"el-month-table",on:{click:t.handleMonthTableClick,mousemove:t.handleMouseMove}},[i("tbody",t._l(t.rows,function(e,n){return i("tr",{key:n},t._l(e,function(e,n){return i("td",{key:n,class:t.getCellStyle(e)},[i("div",[i("a",{staticClass:"cell"},[t._v(t._s(t.t("el.datepicker.months."+t.months[e.text])))])])])}),0)}),0)])};Hn._withStripped=!0;var Un=function(t){return new Date(t.getFullYear(),t.getMonth())},Vn=function(t){return"number"==typeof t||"string"==typeof t?Un(new Date(t)).getTime():t instanceof Date?Un(t).getTime():NaN},Gn=o({props:{disabledDate:{},value:{},selectionMode:{default:"month"},minDate:{},maxDate:{},defaultValue:{validator:function(t){return null===t||Object(pn.isDate)(t)||Array.isArray(t)&&t.every(pn.isDate)}},date:{},rangeState:{default:function(){return{endDate:null,selecting:!1}}}},mixins:[f.a],watch:{"rangeState.endDate":function(t){this.markRange(this.minDate,t)},minDate:function(t,e){Vn(t)!==Vn(e)&&this.markRange(this.minDate,this.maxDate)},maxDate:function(t,e){Vn(t)!==Vn(e)&&this.markRange(this.minDate,this.maxDate)}},data:function(){return{months:["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],tableRows:[[],[],[]],lastRow:null,lastColumn:null}},methods:{cellMatchesDate:function(t,e){var i=new Date(e);return this.date.getFullYear()===i.getFullYear()&&Number(t.text)===i.getMonth()},getCellStyle:function(t){var e=this,i={},n=this.date.getFullYear(),o=new Date,r=t.text,s=this.defaultValue?Array.isArray(this.defaultValue)?this.defaultValue:[this.defaultValue]:[];return i.disabled="function"==typeof this.disabledDate&&function(t,e){var i=Object(pn.getDayCountOfMonth)(t,e),n=new Date(t,e,1);return Object(pn.range)(i).map(function(t){return Object(pn.nextDate)(n,t)})}(n,r).every(this.disabledDate),i.current=Object(g.arrayFindIndex)(Object(g.coerceTruthyValueToArray)(this.value),function(t){return t.getFullYear()===n&&t.getMonth()===r})>=0,i.today=o.getFullYear()===n&&o.getMonth()===r,i.default=s.some(function(i){return e.cellMatchesDate(t,i)}),t.inRange&&(i["in-range"]=!0,t.start&&(i["start-date"]=!0),t.end&&(i["end-date"]=!0)),i},getMonthOfCell:function(t){var e=this.date.getFullYear();return new Date(e,t,1)},markRange:function(t,e){t=Vn(t),e=Vn(e)||t;var i=[Math.min(t,e),Math.max(t,e)];t=i[0],e=i[1];for(var n=this.rows,o=0,r=n.length;o<r;o++)for(var s=n[o],a=0,l=s.length;a<l;a++){var c=s[a],u=4*o+a,h=new Date(this.date.getFullYear(),u).getTime();c.inRange=t&&h>=t&&h<=e,c.start=t&&h===t,c.end=e&&h===e}},handleMouseMove:function(t){if(this.rangeState.selecting){var e=t.target;if("A"===e.tagName&&(e=e.parentNode.parentNode),"DIV"===e.tagName&&(e=e.parentNode),"TD"===e.tagName){var i=e.parentNode.rowIndex,n=e.cellIndex;this.rows[i][n].disabled||i===this.lastRow&&n===this.lastColumn||(this.lastRow=i,this.lastColumn=n,this.$emit("changerange",{minDate:this.minDate,maxDate:this.maxDate,rangeState:{selecting:!0,endDate:this.getMonthOfCell(4*i+n)}}))}}},handleMonthTableClick:function(t){var e=t.target;if("A"===e.tagName&&(e=e.parentNode.parentNode),"DIV"===e.tagName&&(e=e.parentNode),"TD"===e.tagName&&!Object(ft.hasClass)(e,"disabled")){var i=e.cellIndex,n=4*e.parentNode.rowIndex+i,o=this.getMonthOfCell(n);"range"===this.selectionMode?this.rangeState.selecting?(o>=this.minDate?this.$emit("pick",{minDate:this.minDate,maxDate:o}):this.$emit("pick",{minDate:o,maxDate:this.minDate}),this.rangeState.selecting=!1):(this.$emit("pick",{minDate:o,maxDate:null}),this.rangeState.selecting=!0):this.$emit("pick",n)}}},computed:{rows:function(){for(var t=this,e=this.tableRows,i=this.disabledDate,n=[],o=Vn(new Date),r=0;r<3;r++)for(var s=e[r],a=function(e){var a=s[e];a||(a={row:r,column:e,type:"normal",inRange:!1,start:!1,end:!1}),a.type="normal";var l=4*r+e,c=new Date(t.date.getFullYear(),l).getTime();a.inRange=c>=Vn(t.minDate)&&c<=Vn(t.maxDate),a.start=t.minDate&&c===Vn(t.minDate),a.end=t.maxDate&&c===Vn(t.maxDate),c===o&&(a.type="today"),a.text=l;var u=new Date(c);a.disabled="function"==typeof i&&i(u),a.selected=Object(g.arrayFind)(n,function(t){return t.getTime()===u.getTime()}),t.$set(s,e,a)},l=0;l<4;l++)a(l);return e}}},Hn,[],!1,null,null,null);Gn.options.__file="packages/date-picker/src/basic/month-table.vue";var Wn=Gn.exports,$n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("table",{staticClass:"el-date-table",class:{"is-week-mode":"week"===t.selectionMode},attrs:{cellspacing:"0",cellpadding:"0"},on:{click:t.handleClick,mousemove:t.handleMouseMove}},[i("tbody",[i("tr",[t.showWeekNumber?i("th",[t._v(t._s(t.t("el.datepicker.week")))]):t._e(),t._l(t.WEEKS,function(e,n){return i("th",{key:n},[t._v(t._s(t.t("el.datepicker.weeks."+e)))])})],2),t._l(t.rows,function(e,n){return i("tr",{key:n,staticClass:"el-date-table__row",class:{current:t.isWeekActive(e[1])}},t._l(e,function(e,n){return i("td",{key:n,class:t.getCellClasses(e)},[i("div",[i("span",[t._v("\n          "+t._s(e.text)+"\n        ")])])])}),0)})],2)])};$n._withStripped=!0;var jn=["sun","mon","tue","wed","thu","fri","sat"],zn=function(t){return"number"==typeof t||"string"==typeof t?Object(pn.clearTime)(new Date(t)).getTime():t instanceof Date?Object(pn.clearTime)(t).getTime():NaN},Xn=o({mixins:[f.a],props:{firstDayOfWeek:{default:7,type:Number,validator:function(t){return t>=1&&t<=7}},value:{},defaultValue:{validator:function(t){return null===t||Object(pn.isDate)(t)||Array.isArray(t)&&t.every(pn.isDate)}},date:{},selectionMode:{default:"day"},showWeekNumber:{type:Boolean,default:!1},disabledDate:{},cellClassName:{},minDate:{},maxDate:{},rangeState:{default:function(){return{endDate:null,selecting:!1}}}},computed:{offsetDay:function(){var t=this.firstDayOfWeek;return t>3?7-t:-t},WEEKS:function(){var t=this.firstDayOfWeek;return jn.concat(jn).slice(t,t+7)},year:function(){return this.date.getFullYear()},month:function(){return this.date.getMonth()},startDate:function(){return Object(pn.getStartDateOfMonth)(this.year,this.month)},rows:function(){var t=this,e=new Date(this.year,this.month,1),i=Object(pn.getFirstDayOfMonth)(e),n=Object(pn.getDayCountOfMonth)(e.getFullYear(),e.getMonth()),o=Object(pn.getDayCountOfMonth)(e.getFullYear(),0===e.getMonth()?11:e.getMonth()-1);i=0===i?7:i;for(var r=this.offsetDay,s=this.tableRows,a=1,l=this.startDate,c=this.disabledDate,u=this.cellClassName,h="dates"===this.selectionMode?Object(g.coerceTruthyValueToArray)(this.value):[],p=zn(new Date),d=0;d<6;d++){var f=s[d];this.showWeekNumber&&(f[0]||(f[0]={type:"week",text:Object(pn.getWeekNumber)(Object(pn.nextDate)(l,7*d+1))}));for(var _=function(e){var s=f[t.showWeekNumber?e+1:e];s||(s={row:d,column:e,type:"normal",inRange:!1,start:!1,end:!1}),s.type="normal";var _=7*d+e,m=Object(pn.nextDate)(l,_-r).getTime();if(s.inRange=m>=zn(t.minDate)&&m<=zn(t.maxDate),s.start=t.minDate&&m===zn(t.minDate),s.end=t.maxDate&&m===zn(t.maxDate),m===p&&(s.type="today"),d>=0&&d<=1){var v=i+r<0?7+i+r:i+r;e+7*d>=v?s.text=a++:(s.text=o-(v-e%7)+1+7*d,s.type="prev-month")}else a<=n?s.text=a++:(s.text=a++-n,s.type="next-month");var y=new Date(m);s.disabled="function"==typeof c&&c(y),s.selected=Object(g.arrayFind)(h,function(t){return t.getTime()===y.getTime()}),s.customClass="function"==typeof u&&u(y),t.$set(f,t.showWeekNumber?e+1:e,s)},m=0;m<7;m++)_(m);if("week"===this.selectionMode){var v=this.showWeekNumber?1:0,y=this.showWeekNumber?7:6,b=this.isWeekActive(f[v+1]);f[v].inRange=b,f[v].start=b,f[y].inRange=b,f[y].end=b}}return s}},watch:{"rangeState.endDate":function(t){this.markRange(this.minDate,t)},minDate:function(t,e){zn(t)!==zn(e)&&this.markRange(this.minDate,this.maxDate)},maxDate:function(t,e){zn(t)!==zn(e)&&this.markRange(this.minDate,this.maxDate)}},data:function(){return{tableRows:[[],[],[],[],[],[]],lastRow:null,lastColumn:null}},methods:{cellMatchesDate:function(t,e){var i=new Date(e);return this.year===i.getFullYear()&&this.month===i.getMonth()&&Number(t.text)===i.getDate()},getCellClasses:function(t){var e=this,i=this.selectionMode,n=this.defaultValue?Array.isArray(this.defaultValue)?this.defaultValue:[this.defaultValue]:[],o=[];return"normal"!==t.type&&"today"!==t.type||t.disabled?o.push(t.type):(o.push("available"),"today"===t.type&&o.push("today")),"normal"===t.type&&n.some(function(i){return e.cellMatchesDate(t,i)})&&o.push("default"),"day"!==i||"normal"!==t.type&&"today"!==t.type||!this.cellMatchesDate(t,this.value)||o.push("current"),!t.inRange||"normal"!==t.type&&"today"!==t.type&&"week"!==this.selectionMode||(o.push("in-range"),t.start&&o.push("start-date"),t.end&&o.push("end-date")),t.disabled&&o.push("disabled"),t.selected&&o.push("selected"),t.customClass&&o.push(t.customClass),o.join(" ")},getDateOfCell:function(t,e){var i=7*t+(e-(this.showWeekNumber?1:0))-this.offsetDay;return Object(pn.nextDate)(this.startDate,i)},isWeekActive:function(t){if("week"!==this.selectionMode)return!1;var e=new Date(this.year,this.month,1),i=e.getFullYear(),n=e.getMonth();if("prev-month"===t.type&&(e.setMonth(0===n?11:n-1),e.setFullYear(0===n?i-1:i)),"next-month"===t.type&&(e.setMonth(11===n?0:n+1),e.setFullYear(11===n?i+1:i)),e.setDate(parseInt(t.text,10)),Object(pn.isDate)(this.value)){var o=(this.value.getDay()-this.firstDayOfWeek+7)%7-1;return Object(pn.prevDate)(this.value,o).getTime()===e.getTime()}return!1},markRange:function(t,e){t=zn(t),e=zn(e)||t;var i=[Math.min(t,e),Math.max(t,e)];t=i[0],e=i[1];for(var n=this.startDate,o=this.rows,r=0,s=o.length;r<s;r++)for(var a=o[r],l=0,c=a.length;l<c;l++)if(!this.showWeekNumber||0!==l){var u=a[l],h=7*r+l+(this.showWeekNumber?-1:0),p=Object(pn.nextDate)(n,h-this.offsetDay).getTime();u.inRange=t&&p>=t&&p<=e,u.start=t&&p===t,u.end=e&&p===e}},handleMouseMove:function(t){if(this.rangeState.selecting){var e=t.target;if("SPAN"===e.tagName&&(e=e.parentNode.parentNode),"DIV"===e.tagName&&(e=e.parentNode),"TD"===e.tagName){var i=e.parentNode.rowIndex-1,n=e.cellIndex;this.rows[i][n].disabled||i===this.lastRow&&n===this.lastColumn||(this.lastRow=i,this.lastColumn=n,this.$emit("changerange",{minDate:this.minDate,maxDate:this.maxDate,rangeState:{selecting:!0,endDate:this.getDateOfCell(i,n)}}))}}},handleClick:function(t){var e=t.target;if("SPAN"===e.tagName&&(e=e.parentNode.parentNode),"DIV"===e.tagName&&(e=e.parentNode),"TD"===e.tagName){var i=e.parentNode.rowIndex-1,n="week"===this.selectionMode?1:e.cellIndex,o=this.rows[i][n];if(!o.disabled&&"week"!==o.type){var r,s,a,l=this.getDateOfCell(i,n);if("range"===this.selectionMode)this.rangeState.selecting?(l>=this.minDate?this.$emit("pick",{minDate:this.minDate,maxDate:l}):this.$emit("pick",{minDate:l,maxDate:this.minDate}),this.rangeState.selecting=!1):(this.$emit("pick",{minDate:l,maxDate:null}),this.rangeState.selecting=!0);else if("day"===this.selectionMode)this.$emit("pick",l);else if("week"===this.selectionMode){var c=Object(pn.getWeekNumber)(l),u=l.getFullYear()+"w"+c;this.$emit("pick",{year:l.getFullYear(),week:c,value:u,date:l})}else if("dates"===this.selectionMode){var h=this.value||[],p=o.selected?(r=h,(a="function"==typeof(s=function(t){return t.getTime()===l.getTime()})?Object(g.arrayFindIndex)(r,s):r.indexOf(s))>=0?[].concat(r.slice(0,a),r.slice(a+1)):r):[].concat(h,[l]);this.$emit("pick",p)}}}}}},$n,[],!1,null,null,null);Xn.options.__file="packages/date-picker/src/basic/date-table.vue";var Yn=Xn.exports,Kn=o({mixins:[f.a],directives:{Clickoutside:M.a},watch:{showTime:function(t){var e=this;t&&this.$nextTick(function(t){var i=e.$refs.input.$el;i&&(e.pickerWidth=i.getBoundingClientRect().width+10)})},value:function(t){"dates"===this.selectionMode&&this.value||(Object(pn.isDate)(t)?this.date=new Date(t):this.date=this.getDefaultValue())},defaultValue:function(t){Object(pn.isDate)(this.value)||(this.date=t?new Date(t):new Date)},timePickerVisible:function(t){var e=this;t&&this.$nextTick(function(){return e.$refs.timepicker.adjustSpinners()})},selectionMode:function(t){"month"===t?"year"===this.currentView&&"month"===this.currentView||(this.currentView="month"):"dates"===t&&(this.currentView="date")}},methods:{proxyTimePickerDataProperties:function(){var t,e=this,i=function(t){e.$refs.timepicker.value=t},n=function(t){e.$refs.timepicker.date=t},o=function(t){e.$refs.timepicker.selectableRange=t};this.$watch("value",i),this.$watch("date",n),this.$watch("selectableRange",o),t=this.timeFormat,e.$refs.timepicker.format=t,i(this.value),n(this.date),o(this.selectableRange)},handleClear:function(){this.date=this.getDefaultValue(),this.$emit("pick",null)},emit:function(t){for(var e=this,i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];if(t)if(Array.isArray(t)){var r=t.map(function(t){return e.showTime?Object(pn.clearMilliseconds)(t):Object(pn.clearTime)(t)});this.$emit.apply(this,["pick",r].concat(n))}else this.$emit.apply(this,["pick",this.showTime?Object(pn.clearMilliseconds)(t):Object(pn.clearTime)(t)].concat(n));else this.$emit.apply(this,["pick",t].concat(n));this.userInputDate=null,this.userInputTime=null},showMonthPicker:function(){this.currentView="month"},showYearPicker:function(){this.currentView="year"},prevMonth:function(){this.date=Object(pn.prevMonth)(this.date)},nextMonth:function(){this.date=Object(pn.nextMonth)(this.date)},prevYear:function(){"year"===this.currentView?this.date=Object(pn.prevYear)(this.date,10):this.date=Object(pn.prevYear)(this.date)},nextYear:function(){"year"===this.currentView?this.date=Object(pn.nextYear)(this.date,10):this.date=Object(pn.nextYear)(this.date)},handleShortcutClick:function(t){t.onClick&&t.onClick(this)},handleTimePick:function(t,e,i){if(Object(pn.isDate)(t)){var n=this.value?Object(pn.modifyTime)(this.value,t.getHours(),t.getMinutes(),t.getSeconds()):Object(pn.modifyWithTimeString)(this.getDefaultValue(),this.defaultTime);this.date=n,this.emit(this.date,!0)}else this.emit(t,!0);i||(this.timePickerVisible=e)},handleTimePickClose:function(){this.timePickerVisible=!1},handleMonthPick:function(t){"month"===this.selectionMode?(this.date=Object(pn.modifyDate)(this.date,this.year,t,1),this.emit(this.date)):(this.date=Object(pn.changeYearMonthAndClampDate)(this.date,this.year,t),this.currentView="date")},handleDatePick:function(t){if("day"===this.selectionMode){var e=this.value?Object(pn.modifyDate)(this.value,t.getFullYear(),t.getMonth(),t.getDate()):Object(pn.modifyWithTimeString)(t,this.defaultTime);this.checkDateWithinRange(e)||(e=Object(pn.modifyDate)(this.selectableRange[0][0],t.getFullYear(),t.getMonth(),t.getDate())),this.date=e,this.emit(this.date,this.showTime)}else"week"===this.selectionMode?this.emit(t.date):"dates"===this.selectionMode&&this.emit(t,!0)},handleYearPick:function(t){"year"===this.selectionMode?(this.date=Object(pn.modifyDate)(this.date,t,0,1),this.emit(this.date)):(this.date=Object(pn.changeYearMonthAndClampDate)(this.date,t,this.month),this.currentView="month")},changeToNow:function(){this.disabledDate&&this.disabledDate(new Date)||!this.checkDateWithinRange(new Date)||(this.date=new Date,this.emit(this.date))},confirm:function(){if("dates"===this.selectionMode)this.emit(this.value);else{var t=this.value?this.value:Object(pn.modifyWithTimeString)(this.getDefaultValue(),this.defaultTime);this.date=new Date(t),this.emit(t)}},resetView:function(){"month"===this.selectionMode?this.currentView="month":"year"===this.selectionMode?this.currentView="year":this.currentView="date"},handleEnter:function(){document.body.addEventListener("keydown",this.handleKeydown)},handleLeave:function(){this.$emit("dodestroy"),document.body.removeEventListener("keydown",this.handleKeydown)},handleKeydown:function(t){var e=t.keyCode;this.visible&&!this.timePickerVisible&&(-1!==[38,40,37,39].indexOf(e)&&(this.handleKeyControl(e),t.stopPropagation(),t.preventDefault()),13===e&&null===this.userInputDate&&null===this.userInputTime&&this.emit(this.date,!1))},handleKeyControl:function(t){for(var e={year:{38:-4,40:4,37:-1,39:1,offset:function(t,e){return t.setFullYear(t.getFullYear()+e)}},month:{38:-4,40:4,37:-1,39:1,offset:function(t,e){return t.setMonth(t.getMonth()+e)}},week:{38:-1,40:1,37:-1,39:1,offset:function(t,e){return t.setDate(t.getDate()+7*e)}},day:{38:-7,40:7,37:-1,39:1,offset:function(t,e){return t.setDate(t.getDate()+e)}}},i=this.selectionMode,n=this.date.getTime(),o=new Date(this.date.getTime());Math.abs(n-o.getTime())<=31536e6;){var r=e[i];if(r.offset(o,r[t]),"function"!=typeof this.disabledDate||!this.disabledDate(o)){this.date=o,this.$emit("pick",o,!0);break}}},handleVisibleTimeChange:function(t){var e=Object(pn.parseDate)(t,this.timeFormat);e&&this.checkDateWithinRange(e)&&(this.date=Object(pn.modifyDate)(e,this.year,this.month,this.monthDate),this.userInputTime=null,this.$refs.timepicker.value=this.date,this.timePickerVisible=!1,this.emit(this.date,!0))},handleVisibleDateChange:function(t){var e=Object(pn.parseDate)(t,this.dateFormat);if(e){if("function"==typeof this.disabledDate&&this.disabledDate(e))return;this.date=Object(pn.modifyTime)(e,this.date.getHours(),this.date.getMinutes(),this.date.getSeconds()),this.userInputDate=null,this.resetView(),this.emit(this.date,!0)}},isValidValue:function(t){return t&&!isNaN(t)&&("function"!=typeof this.disabledDate||!this.disabledDate(t))&&this.checkDateWithinRange(t)},getDefaultValue:function(){return this.defaultValue?new Date(this.defaultValue):new Date},checkDateWithinRange:function(t){return!(this.selectableRange.length>0)||Object(pn.timeWithinRange)(t,this.selectableRange,this.format||"HH:mm:ss")}},components:{TimePicker:Ln,YearTable:Fn,MonthTable:Wn,DateTable:Yn,ElInput:p.a,ElButton:z.a},data:function(){return{popperClass:"",date:new Date,value:"",defaultValue:null,defaultTime:null,showTime:!1,selectionMode:"day",shortcuts:"",visible:!1,currentView:"date",disabledDate:"",cellClassName:"",selectableRange:[],firstDayOfWeek:7,showWeekNumber:!1,timePickerVisible:!1,format:"",arrowControl:!1,userInputDate:null,userInputTime:null}},computed:{year:function(){return this.date.getFullYear()},month:function(){return this.date.getMonth()},week:function(){return Object(pn.getWeekNumber)(this.date)},monthDate:function(){return this.date.getDate()},footerVisible:function(){return this.showTime||"dates"===this.selectionMode},visibleTime:function(){return null!==this.userInputTime?this.userInputTime:Object(pn.formatDate)(this.value||this.defaultValue,this.timeFormat)},visibleDate:function(){return null!==this.userInputDate?this.userInputDate:Object(pn.formatDate)(this.value||this.defaultValue,this.dateFormat)},yearLabel:function(){var t=this.t("el.datepicker.year");if("year"===this.currentView){var e=10*Math.floor(this.year/10);return t?e+" "+t+" - "+(e+9)+" "+t:e+" - "+(e+9)}return this.year+" "+t},timeFormat:function(){return this.format?Object(pn.extractTimeFormat)(this.format):"HH:mm:ss"},dateFormat:function(){return this.format?Object(pn.extractDateFormat)(this.format):"yyyy-MM-dd"}}},Rn,[],!1,null,null,null);Kn.options.__file="packages/date-picker/src/panel/date.vue";var Jn=Kn.exports,qn=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"el-zoom-in-top"},on:{"after-leave":function(e){t.$emit("dodestroy")}}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"el-picker-panel el-date-range-picker el-popper",class:[{"has-sidebar":t.$slots.sidebar||t.shortcuts,"has-time":t.showTime},t.popperClass]},[i("div",{staticClass:"el-picker-panel__body-wrapper"},[t._t("sidebar"),t.shortcuts?i("div",{staticClass:"el-picker-panel__sidebar"},t._l(t.shortcuts,function(e,n){return i("button",{key:n,staticClass:"el-picker-panel__shortcut",attrs:{type:"button"},on:{click:function(i){t.handleShortcutClick(e)}}},[t._v(t._s(e.text))])}),0):t._e(),i("div",{staticClass:"el-picker-panel__body"},[t.showTime?i("div",{staticClass:"el-date-range-picker__time-header"},[i("span",{staticClass:"el-date-range-picker__editors-wrap"},[i("span",{staticClass:"el-date-range-picker__time-picker-wrap"},[i("el-input",{ref:"minInput",staticClass:"el-date-range-picker__editor",attrs:{size:"small",disabled:t.rangeState.selecting,placeholder:t.t("el.datepicker.startDate"),value:t.minVisibleDate},on:{input:function(e){return t.handleDateInput(e,"min")},change:function(e){return t.handleDateChange(e,"min")}}})],1),i("span",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:t.handleMinTimeClose,expression:"handleMinTimeClose"}],staticClass:"el-date-range-picker__time-picker-wrap"},[i("el-input",{staticClass:"el-date-range-picker__editor",attrs:{size:"small",disabled:t.rangeState.selecting,placeholder:t.t("el.datepicker.startTime"),value:t.minVisibleTime},on:{focus:function(e){t.minTimePickerVisible=!0},input:function(e){return t.handleTimeInput(e,"min")},change:function(e){return t.handleTimeChange(e,"min")}}}),i("time-picker",{ref:"minTimePicker",attrs:{"time-arrow-control":t.arrowControl,visible:t.minTimePickerVisible},on:{pick:t.handleMinTimePick,mounted:function(e){t.$refs.minTimePicker.format=t.timeFormat}}})],1)]),i("span",{staticClass:"el-icon-arrow-right"}),i("span",{staticClass:"el-date-range-picker__editors-wrap is-right"},[i("span",{staticClass:"el-date-range-picker__time-picker-wrap"},[i("el-input",{staticClass:"el-date-range-picker__editor",attrs:{size:"small",disabled:t.rangeState.selecting,placeholder:t.t("el.datepicker.endDate"),value:t.maxVisibleDate,readonly:!t.minDate},on:{input:function(e){return t.handleDateInput(e,"max")},change:function(e){return t.handleDateChange(e,"max")}}})],1),i("span",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:t.handleMaxTimeClose,expression:"handleMaxTimeClose"}],staticClass:"el-date-range-picker__time-picker-wrap"},[i("el-input",{staticClass:"el-date-range-picker__editor",attrs:{size:"small",disabled:t.rangeState.selecting,placeholder:t.t("el.datepicker.endTime"),value:t.maxVisibleTime,readonly:!t.minDate},on:{focus:function(e){t.minDate&&(t.maxTimePickerVisible=!0)},input:function(e){return t.handleTimeInput(e,"max")},change:function(e){return t.handleTimeChange(e,"max")}}}),i("time-picker",{ref:"maxTimePicker",attrs:{"time-arrow-control":t.arrowControl,visible:t.maxTimePickerVisible},on:{pick:t.handleMaxTimePick,mounted:function(e){t.$refs.maxTimePicker.format=t.timeFormat}}})],1)])]):t._e(),i("div",{staticClass:"el-picker-panel__content el-date-range-picker__content is-left"},[i("div",{staticClass:"el-date-range-picker__header"},[i("button",{staticClass:"el-picker-panel__icon-btn el-icon-d-arrow-left",attrs:{type:"button"},on:{click:t.leftPrevYear}}),i("button",{staticClass:"el-picker-panel__icon-btn el-icon-arrow-left",attrs:{type:"button"},on:{click:t.leftPrevMonth}}),t.unlinkPanels?i("button",{staticClass:"el-picker-panel__icon-btn el-icon-d-arrow-right",class:{"is-disabled":!t.enableYearArrow},attrs:{type:"button",disabled:!t.enableYearArrow},on:{click:t.leftNextYear}}):t._e(),t.unlinkPanels?i("button",{staticClass:"el-picker-panel__icon-btn el-icon-arrow-right",class:{"is-disabled":!t.enableMonthArrow},attrs:{type:"button",disabled:!t.enableMonthArrow},on:{click:t.leftNextMonth}}):t._e(),i("div",[t._v(t._s(t.leftLabel))])]),i("date-table",{attrs:{"selection-mode":"range",date:t.leftDate,"default-value":t.defaultValue,"min-date":t.minDate,"max-date":t.maxDate,"range-state":t.rangeState,"disabled-date":t.disabledDate,"cell-class-name":t.cellClassName,"first-day-of-week":t.firstDayOfWeek},on:{changerange:t.handleChangeRange,pick:t.handleRangePick}})],1),i("div",{staticClass:"el-picker-panel__content el-date-range-picker__content is-right"},[i("div",{staticClass:"el-date-range-picker__header"},[t.unlinkPanels?i("button",{staticClass:"el-picker-panel__icon-btn el-icon-d-arrow-left",class:{"is-disabled":!t.enableYearArrow},attrs:{type:"button",disabled:!t.enableYearArrow},on:{click:t.rightPrevYear}}):t._e(),t.unlinkPanels?i("button",{staticClass:"el-picker-panel__icon-btn el-icon-arrow-left",class:{"is-disabled":!t.enableMonthArrow},attrs:{type:"button",disabled:!t.enableMonthArrow},on:{click:t.rightPrevMonth}}):t._e(),i("button",{staticClass:"el-picker-panel__icon-btn el-icon-d-arrow-right",attrs:{type:"button"},on:{click:t.rightNextYear}}),i("button",{staticClass:"el-picker-panel__icon-btn el-icon-arrow-right",attrs:{type:"button"},on:{click:t.rightNextMonth}}),i("div",[t._v(t._s(t.rightLabel))])]),i("date-table",{attrs:{"selection-mode":"range",date:t.rightDate,"default-value":t.defaultValue,"min-date":t.minDate,"max-date":t.maxDate,"range-state":t.rangeState,"disabled-date":t.disabledDate,"cell-class-name":t.cellClassName,"first-day-of-week":t.firstDayOfWeek},on:{changerange:t.handleChangeRange,pick:t.handleRangePick}})],1)])],2),t.showTime?i("div",{staticClass:"el-picker-panel__footer"},[i("el-button",{staticClass:"el-picker-panel__link-btn",attrs:{size:"mini",type:"text"},on:{click:t.handleClear}},[t._v("\n        "+t._s(t.t("el.datepicker.clear"))+"\n      ")]),i("el-button",{staticClass:"el-picker-panel__link-btn",attrs:{plain:"",size:"mini",disabled:t.btnDisabled},on:{click:function(e){t.handleConfirm(!1)}}},[t._v("\n        "+t._s(t.t("el.datepicker.confirm"))+"\n      ")])],1):t._e()])])};qn._withStripped=!0;var Zn=function(t){return Array.isArray(t)?[new Date(t[0]),new Date(t[1])]:t?[new Date(t),Object(pn.nextDate)(new Date(t),1)]:[new Date,Object(pn.nextDate)(new Date,1)]},Qn=o({mixins:[f.a],directives:{Clickoutside:M.a},computed:{btnDisabled:function(){return!(this.minDate&&this.maxDate&&!this.selecting&&this.isValidValue([this.minDate,this.maxDate]))},leftLabel:function(){return this.leftDate.getFullYear()+" "+this.t("el.datepicker.year")+" "+this.t("el.datepicker.month"+(this.leftDate.getMonth()+1))},rightLabel:function(){return this.rightDate.getFullYear()+" "+this.t("el.datepicker.year")+" "+this.t("el.datepicker.month"+(this.rightDate.getMonth()+1))},leftYear:function(){return this.leftDate.getFullYear()},leftMonth:function(){return this.leftDate.getMonth()},leftMonthDate:function(){return this.leftDate.getDate()},rightYear:function(){return this.rightDate.getFullYear()},rightMonth:function(){return this.rightDate.getMonth()},rightMonthDate:function(){return this.rightDate.getDate()},minVisibleDate:function(){return null!==this.dateUserInput.min?this.dateUserInput.min:this.minDate?Object(pn.formatDate)(this.minDate,this.dateFormat):""},maxVisibleDate:function(){return null!==this.dateUserInput.max?this.dateUserInput.max:this.maxDate||this.minDate?Object(pn.formatDate)(this.maxDate||this.minDate,this.dateFormat):""},minVisibleTime:function(){return null!==this.timeUserInput.min?this.timeUserInput.min:this.minDate?Object(pn.formatDate)(this.minDate,this.timeFormat):""},maxVisibleTime:function(){return null!==this.timeUserInput.max?this.timeUserInput.max:this.maxDate||this.minDate?Object(pn.formatDate)(this.maxDate||this.minDate,this.timeFormat):""},timeFormat:function(){return this.format?Object(pn.extractTimeFormat)(this.format):"HH:mm:ss"},dateFormat:function(){return this.format?Object(pn.extractDateFormat)(this.format):"yyyy-MM-dd"},enableMonthArrow:function(){var t=(this.leftMonth+1)%12,e=this.leftMonth+1>=12?1:0;return this.unlinkPanels&&new Date(this.leftYear+e,t)<new Date(this.rightYear,this.rightMonth)},enableYearArrow:function(){return this.unlinkPanels&&12*this.rightYear+this.rightMonth-(12*this.leftYear+this.leftMonth+1)>=12}},data:function(){return{popperClass:"",value:[],defaultValue:null,defaultTime:null,minDate:"",maxDate:"",leftDate:new Date,rightDate:Object(pn.nextMonth)(new Date),rangeState:{endDate:null,selecting:!1,row:null,column:null},showTime:!1,shortcuts:"",visible:"",disabledDate:"",cellClassName:"",firstDayOfWeek:7,minTimePickerVisible:!1,maxTimePickerVisible:!1,format:"",arrowControl:!1,unlinkPanels:!1,dateUserInput:{min:null,max:null},timeUserInput:{min:null,max:null}}},watch:{minDate:function(t){var e=this;this.dateUserInput.min=null,this.timeUserInput.min=null,this.$nextTick(function(){if(e.$refs.maxTimePicker&&e.maxDate&&e.maxDate<e.minDate){e.$refs.maxTimePicker.selectableRange=[[Object(pn.parseDate)(Object(pn.formatDate)(e.minDate,"HH:mm:ss"),"HH:mm:ss"),Object(pn.parseDate)("23:59:59","HH:mm:ss")]]}}),t&&this.$refs.minTimePicker&&(this.$refs.minTimePicker.date=t,this.$refs.minTimePicker.value=t)},maxDate:function(t){this.dateUserInput.max=null,this.timeUserInput.max=null,t&&this.$refs.maxTimePicker&&(this.$refs.maxTimePicker.date=t,this.$refs.maxTimePicker.value=t)},minTimePickerVisible:function(t){var e=this;t&&this.$nextTick(function(){e.$refs.minTimePicker.date=e.minDate,e.$refs.minTimePicker.value=e.minDate,e.$refs.minTimePicker.adjustSpinners()})},maxTimePickerVisible:function(t){var e=this;t&&this.$nextTick(function(){e.$refs.maxTimePicker.date=e.maxDate,e.$refs.maxTimePicker.value=e.maxDate,e.$refs.maxTimePicker.adjustSpinners()})},value:function(t){if(t){if(Array.isArray(t))if(this.minDate=Object(pn.isDate)(t[0])?new Date(t[0]):null,this.maxDate=Object(pn.isDate)(t[1])?new Date(t[1]):null,this.minDate)if(this.leftDate=this.minDate,this.unlinkPanels&&this.maxDate){var e=this.minDate.getFullYear(),i=this.minDate.getMonth(),n=this.maxDate.getFullYear(),o=this.maxDate.getMonth();this.rightDate=e===n&&i===o?Object(pn.nextMonth)(this.maxDate):this.maxDate}else this.rightDate=Object(pn.nextMonth)(this.leftDate);else this.leftDate=Zn(this.defaultValue)[0],this.rightDate=Object(pn.nextMonth)(this.leftDate)}else this.minDate=null,this.maxDate=null},defaultValue:function(t){if(!Array.isArray(this.value)){var e=Zn(t),i=e[0],n=e[1];this.leftDate=i,this.rightDate=t&&t[1]&&this.unlinkPanels?n:Object(pn.nextMonth)(this.leftDate)}}},methods:{handleClear:function(){this.minDate=null,this.maxDate=null,this.leftDate=Zn(this.defaultValue)[0],this.rightDate=Object(pn.nextMonth)(this.leftDate),this.$emit("pick",null)},handleChangeRange:function(t){this.minDate=t.minDate,this.maxDate=t.maxDate,this.rangeState=t.rangeState},handleDateInput:function(t,e){if(this.dateUserInput[e]=t,t.length===this.dateFormat.length){var i=Object(pn.parseDate)(t,this.dateFormat);if(i){if("function"==typeof this.disabledDate&&this.disabledDate(new Date(i)))return;"min"===e?(this.minDate=Object(pn.modifyDate)(this.minDate||new Date,i.getFullYear(),i.getMonth(),i.getDate()),this.leftDate=new Date(i),this.unlinkPanels||(this.rightDate=Object(pn.nextMonth)(this.leftDate))):(this.maxDate=Object(pn.modifyDate)(this.maxDate||new Date,i.getFullYear(),i.getMonth(),i.getDate()),this.rightDate=new Date(i),this.unlinkPanels||(this.leftDate=Object(pn.prevMonth)(i)))}}},handleDateChange:function(t,e){var i=Object(pn.parseDate)(t,this.dateFormat);i&&("min"===e?(this.minDate=Object(pn.modifyDate)(this.minDate,i.getFullYear(),i.getMonth(),i.getDate()),this.minDate>this.maxDate&&(this.maxDate=this.minDate)):(this.maxDate=Object(pn.modifyDate)(this.maxDate,i.getFullYear(),i.getMonth(),i.getDate()),this.maxDate<this.minDate&&(this.minDate=this.maxDate)))},handleTimeInput:function(t,e){var i=this;if(this.timeUserInput[e]=t,t.length===this.timeFormat.length){var n=Object(pn.parseDate)(t,this.timeFormat);n&&("min"===e?(this.minDate=Object(pn.modifyTime)(this.minDate,n.getHours(),n.getMinutes(),n.getSeconds()),this.$nextTick(function(t){return i.$refs.minTimePicker.adjustSpinners()})):(this.maxDate=Object(pn.modifyTime)(this.maxDate,n.getHours(),n.getMinutes(),n.getSeconds()),this.$nextTick(function(t){return i.$refs.maxTimePicker.adjustSpinners()})))}},handleTimeChange:function(t,e){var i=Object(pn.parseDate)(t,this.timeFormat);i&&("min"===e?(this.minDate=Object(pn.modifyTime)(this.minDate,i.getHours(),i.getMinutes(),i.getSeconds()),this.minDate>this.maxDate&&(this.maxDate=this.minDate),this.$refs.minTimePicker.value=this.minDate,this.minTimePickerVisible=!1):(this.maxDate=Object(pn.modifyTime)(this.maxDate,i.getHours(),i.getMinutes(),i.getSeconds()),this.maxDate<this.minDate&&(this.minDate=this.maxDate),this.$refs.maxTimePicker.value=this.minDate,this.maxTimePickerVisible=!1))},handleRangePick:function(t){var e=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.defaultTime||[],o=Object(pn.modifyWithTimeString)(t.minDate,n[0]),r=Object(pn.modifyWithTimeString)(t.maxDate,n[1]);this.maxDate===r&&this.minDate===o||(this.onPick&&this.onPick(t),this.maxDate=r,this.minDate=o,setTimeout(function(){e.maxDate=r,e.minDate=o},10),i&&!this.showTime&&this.handleConfirm())},handleShortcutClick:function(t){t.onClick&&t.onClick(this)},handleMinTimePick:function(t,e,i){this.minDate=this.minDate||new Date,t&&(this.minDate=Object(pn.modifyTime)(this.minDate,t.getHours(),t.getMinutes(),t.getSeconds())),i||(this.minTimePickerVisible=e),(!this.maxDate||this.maxDate&&this.maxDate.getTime()<this.minDate.getTime())&&(this.maxDate=new Date(this.minDate))},handleMinTimeClose:function(){this.minTimePickerVisible=!1},handleMaxTimePick:function(t,e,i){this.maxDate&&t&&(this.maxDate=Object(pn.modifyTime)(this.maxDate,t.getHours(),t.getMinutes(),t.getSeconds())),i||(this.maxTimePickerVisible=e),this.maxDate&&this.minDate&&this.minDate.getTime()>this.maxDate.getTime()&&(this.minDate=new Date(this.maxDate))},handleMaxTimeClose:function(){this.maxTimePickerVisible=!1},leftPrevYear:function(){this.leftDate=Object(pn.prevYear)(this.leftDate),this.unlinkPanels||(this.rightDate=Object(pn.nextMonth)(this.leftDate))},leftPrevMonth:function(){this.leftDate=Object(pn.prevMonth)(this.leftDate),this.unlinkPanels||(this.rightDate=Object(pn.nextMonth)(this.leftDate))},rightNextYear:function(){this.unlinkPanels?this.rightDate=Object(pn.nextYear)(this.rightDate):(this.leftDate=Object(pn.nextYear)(this.leftDate),this.rightDate=Object(pn.nextMonth)(this.leftDate))},rightNextMonth:function(){this.unlinkPanels?this.rightDate=Object(pn.nextMonth)(this.rightDate):(this.leftDate=Object(pn.nextMonth)(this.leftDate),this.rightDate=Object(pn.nextMonth)(this.leftDate))},leftNextYear:function(){this.leftDate=Object(pn.nextYear)(this.leftDate)},leftNextMonth:function(){this.leftDate=Object(pn.nextMonth)(this.leftDate)},rightPrevYear:function(){this.rightDate=Object(pn.prevYear)(this.rightDate)},rightPrevMonth:function(){this.rightDate=Object(pn.prevMonth)(this.rightDate)},handleConfirm:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isValidValue([this.minDate,this.maxDate])&&this.$emit("pick",[this.minDate,this.maxDate],t)},isValidValue:function(t){return Array.isArray(t)&&t&&t[0]&&t[1]&&Object(pn.isDate)(t[0])&&Object(pn.isDate)(t[1])&&t[0].getTime()<=t[1].getTime()&&("function"!=typeof this.disabledDate||!this.disabledDate(t[0])&&!this.disabledDate(t[1]))},resetView:function(){this.minDate&&null==this.maxDate&&(this.rangeState.selecting=!1),this.minDate=this.value&&Object(pn.isDate)(this.value[0])?new Date(this.value[0]):null,this.maxDate=this.value&&Object(pn.isDate)(this.value[0])?new Date(this.value[1]):null}},components:{TimePicker:Ln,DateTable:Yn,ElInput:p.a,ElButton:z.a}},qn,[],!1,null,null,null);Qn.options.__file="packages/date-picker/src/panel/date-range.vue";var to=Qn.exports,eo=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"el-zoom-in-top"},on:{"after-leave":function(e){t.$emit("dodestroy")}}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"el-picker-panel el-date-range-picker el-popper",class:[{"has-sidebar":t.$slots.sidebar||t.shortcuts},t.popperClass]},[i("div",{staticClass:"el-picker-panel__body-wrapper"},[t._t("sidebar"),t.shortcuts?i("div",{staticClass:"el-picker-panel__sidebar"},t._l(t.shortcuts,function(e,n){return i("button",{key:n,staticClass:"el-picker-panel__shortcut",attrs:{type:"button"},on:{click:function(i){t.handleShortcutClick(e)}}},[t._v(t._s(e.text))])}),0):t._e(),i("div",{staticClass:"el-picker-panel__body"},[i("div",{staticClass:"el-picker-panel__content el-date-range-picker__content is-left"},[i("div",{staticClass:"el-date-range-picker__header"},[i("button",{staticClass:"el-picker-panel__icon-btn el-icon-d-arrow-left",attrs:{type:"button"},on:{click:t.leftPrevYear}}),t.unlinkPanels?i("button",{staticClass:"el-picker-panel__icon-btn el-icon-d-arrow-right",class:{"is-disabled":!t.enableYearArrow},attrs:{type:"button",disabled:!t.enableYearArrow},on:{click:t.leftNextYear}}):t._e(),i("div",[t._v(t._s(t.leftLabel))])]),i("month-table",{attrs:{"selection-mode":"range",date:t.leftDate,"default-value":t.defaultValue,"min-date":t.minDate,"max-date":t.maxDate,"range-state":t.rangeState,"disabled-date":t.disabledDate},on:{changerange:t.handleChangeRange,pick:t.handleRangePick}})],1),i("div",{staticClass:"el-picker-panel__content el-date-range-picker__content is-right"},[i("div",{staticClass:"el-date-range-picker__header"},[t.unlinkPanels?i("button",{staticClass:"el-picker-panel__icon-btn el-icon-d-arrow-left",class:{"is-disabled":!t.enableYearArrow},attrs:{type:"button",disabled:!t.enableYearArrow},on:{click:t.rightPrevYear}}):t._e(),i("button",{staticClass:"el-picker-panel__icon-btn el-icon-d-arrow-right",attrs:{type:"button"},on:{click:t.rightNextYear}}),i("div",[t._v(t._s(t.rightLabel))])]),i("month-table",{attrs:{"selection-mode":"range",date:t.rightDate,"default-value":t.defaultValue,"min-date":t.minDate,"max-date":t.maxDate,"range-state":t.rangeState,"disabled-date":t.disabledDate},on:{changerange:t.handleChangeRange,pick:t.handleRangePick}})],1)])],2)])])};eo._withStripped=!0;var io=function(t){return Array.isArray(t)?[new Date(t[0]),new Date(t[1])]:t?[new Date(t),Object(pn.nextMonth)(new Date(t))]:[new Date,Object(pn.nextMonth)(new Date)]},no=o({mixins:[f.a],directives:{Clickoutside:M.a},computed:{btnDisabled:function(){return!(this.minDate&&this.maxDate&&!this.selecting&&this.isValidValue([this.minDate,this.maxDate]))},leftLabel:function(){return this.leftDate.getFullYear()+" "+this.t("el.datepicker.year")},rightLabel:function(){return this.rightDate.getFullYear()+" "+this.t("el.datepicker.year")},leftYear:function(){return this.leftDate.getFullYear()},rightYear:function(){return this.rightDate.getFullYear()===this.leftDate.getFullYear()?this.leftDate.getFullYear()+1:this.rightDate.getFullYear()},enableYearArrow:function(){return this.unlinkPanels&&this.rightYear>this.leftYear+1}},data:function(){return{popperClass:"",value:[],defaultValue:null,defaultTime:null,minDate:"",maxDate:"",leftDate:new Date,rightDate:Object(pn.nextYear)(new Date),rangeState:{endDate:null,selecting:!1,row:null,column:null},shortcuts:"",visible:"",disabledDate:"",format:"",arrowControl:!1,unlinkPanels:!1}},watch:{value:function(t){if(t){if(Array.isArray(t))if(this.minDate=Object(pn.isDate)(t[0])?new Date(t[0]):null,this.maxDate=Object(pn.isDate)(t[1])?new Date(t[1]):null,this.minDate)if(this.leftDate=this.minDate,this.unlinkPanels&&this.maxDate){var e=this.minDate.getFullYear(),i=this.maxDate.getFullYear();this.rightDate=e===i?Object(pn.nextYear)(this.maxDate):this.maxDate}else this.rightDate=Object(pn.nextYear)(this.leftDate);else this.leftDate=io(this.defaultValue)[0],this.rightDate=Object(pn.nextYear)(this.leftDate)}else this.minDate=null,this.maxDate=null},defaultValue:function(t){if(!Array.isArray(this.value)){var e=io(t),i=e[0],n=e[1];this.leftDate=i,this.rightDate=t&&t[1]&&i.getFullYear()!==n.getFullYear()&&this.unlinkPanels?n:Object(pn.nextYear)(this.leftDate)}}},methods:{handleClear:function(){this.minDate=null,this.maxDate=null,this.leftDate=io(this.defaultValue)[0],this.rightDate=Object(pn.nextYear)(this.leftDate),this.$emit("pick",null)},handleChangeRange:function(t){this.minDate=t.minDate,this.maxDate=t.maxDate,this.rangeState=t.rangeState},handleRangePick:function(t){var e=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.defaultTime||[],o=Object(pn.modifyWithTimeString)(t.minDate,n[0]),r=Object(pn.modifyWithTimeString)(t.maxDate,n[1]);this.maxDate===r&&this.minDate===o||(this.onPick&&this.onPick(t),this.maxDate=r,this.minDate=o,setTimeout(function(){e.maxDate=r,e.minDate=o},10),i&&this.handleConfirm())},handleShortcutClick:function(t){t.onClick&&t.onClick(this)},leftPrevYear:function(){this.leftDate=Object(pn.prevYear)(this.leftDate),this.unlinkPanels||(this.rightDate=Object(pn.prevYear)(this.rightDate))},rightNextYear:function(){this.unlinkPanels||(this.leftDate=Object(pn.nextYear)(this.leftDate)),this.rightDate=Object(pn.nextYear)(this.rightDate)},leftNextYear:function(){this.leftDate=Object(pn.nextYear)(this.leftDate)},rightPrevYear:function(){this.rightDate=Object(pn.prevYear)(this.rightDate)},handleConfirm:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isValidValue([this.minDate,this.maxDate])&&this.$emit("pick",[this.minDate,this.maxDate],t)},isValidValue:function(t){return Array.isArray(t)&&t&&t[0]&&t[1]&&Object(pn.isDate)(t[0])&&Object(pn.isDate)(t[1])&&t[0].getTime()<=t[1].getTime()&&("function"!=typeof this.disabledDate||!this.disabledDate(t[0])&&!this.disabledDate(t[1]))},resetView:function(){this.minDate=this.value&&Object(pn.isDate)(this.value[0])?new Date(this.value[0]):null,this.maxDate=this.value&&Object(pn.isDate)(this.value[0])?new Date(this.value[1]):null}},components:{MonthTable:Wn,ElInput:p.a,ElButton:z.a}},eo,[],!1,null,null,null);no.options.__file="packages/date-picker/src/panel/month-range.vue";var oo=no.exports,ro=function(t){return"daterange"===t||"datetimerange"===t?to:"monthrange"===t?oo:Jn},so={mixins:[wn],name:"ElDatePicker",props:{type:{type:String,default:"date"},timeArrowControl:Boolean},watch:{type:function(t){this.picker?(this.unmountPicker(),this.panel=ro(t),this.mountPicker()):this.panel=ro(t)}},created:function(){this.panel=ro(this.type)},install:function(t){t.component(so.name,so)}},ao=so,lo=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"el-zoom-in-top"},on:{"before-enter":t.handleMenuEnter,"after-leave":function(e){t.$emit("dodestroy")}}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],ref:"popper",staticClass:"el-picker-panel time-select el-popper",class:t.popperClass,style:{width:t.width+"px"}},[i("el-scrollbar",{attrs:{noresize:"","wrap-class":"el-picker-panel__content"}},t._l(t.items,function(e){return i("div",{key:e.value,staticClass:"time-select-item",class:{selected:t.value===e.value,disabled:e.disabled,default:e.value===t.defaultValue},attrs:{disabled:e.disabled},on:{click:function(i){t.handleClick(e)}}},[t._v(t._s(e.value))])}),0)],1)])};lo._withStripped=!0;var co=function(t){var e=(t||"").split(":");return e.length>=2?{hours:parseInt(e[0],10),minutes:parseInt(e[1],10)}:null},uo=function(t,e){var i=co(t),n=co(e),o=i.minutes+60*i.hours,r=n.minutes+60*n.hours;return o===r?0:o>r?1:-1},ho=function(t,e){var i=co(t),n=co(e),o={hours:i.hours,minutes:i.minutes};return o.minutes+=n.minutes,o.hours+=n.hours,o.hours+=Math.floor(o.minutes/60),o.minutes=o.minutes%60,function(t){return(t.hours<10?"0"+t.hours:t.hours)+":"+(t.minutes<10?"0"+t.minutes:t.minutes)}(o)},po=o({components:{ElScrollbar:B.a},watch:{value:function(t){var e=this;t&&this.$nextTick(function(){return e.scrollToOption()})}},methods:{handleClick:function(t){t.disabled||this.$emit("pick",t.value)},handleClear:function(){this.$emit("pick",null)},scrollToOption:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:".selected",e=this.$refs.popper.querySelector(".el-picker-panel__content");Fe()(e,e.querySelector(t))},handleMenuEnter:function(){var t=this,e=-1!==this.items.map(function(t){return t.value}).indexOf(this.value),i=-1!==this.items.map(function(t){return t.value}).indexOf(this.defaultValue),n=(e?".selected":i&&".default")||".time-select-item:not(.disabled)";this.$nextTick(function(){return t.scrollToOption(n)})},scrollDown:function(t){for(var e=this.items,i=e.length,n=e.length,o=e.map(function(t){return t.value}).indexOf(this.value);n--;)if(!e[o=(o+t+i)%i].disabled)return void this.$emit("pick",e[o].value,!0)},isValidValue:function(t){return-1!==this.items.filter(function(t){return!t.disabled}).map(function(t){return t.value}).indexOf(t)},handleKeydown:function(t){var e=t.keyCode;if(38===e||40===e){var i={40:1,38:-1}[e.toString()];return this.scrollDown(i),void t.stopPropagation()}}},data:function(){return{popperClass:"",start:"09:00",end:"18:00",step:"00:30",value:"",defaultValue:"",visible:!1,minTime:"",maxTime:"",width:0}},computed:{items:function(){var t=this.start,e=this.end,i=this.step,n=[];if(t&&e&&i)for(var o=t;uo(o,e)<=0;)n.push({value:o,disabled:uo(o,this.minTime||"-1:-1")<=0||uo(o,this.maxTime||"100:100")>=0}),o=ho(o,i);return n}}},lo,[],!1,null,null,null);po.options.__file="packages/date-picker/src/panel/time-select.vue";var fo=po.exports,go={mixins:[wn],name:"ElTimeSelect",componentName:"ElTimeSelect",props:{type:{type:String,default:"time-select"}},beforeCreate:function(){this.panel=fo},install:function(t){t.component(go.name,go)}},_o=go,mo=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"el-zoom-in-top"},on:{"after-leave":function(e){t.$emit("dodestroy")}}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"el-time-range-picker el-picker-panel el-popper",class:t.popperClass},[i("div",{staticClass:"el-time-range-picker__content"},[i("div",{staticClass:"el-time-range-picker__cell"},[i("div",{staticClass:"el-time-range-picker__header"},[t._v(t._s(t.t("el.datepicker.startTime")))]),i("div",{staticClass:"el-time-range-picker__body el-time-panel__content",class:{"has-seconds":t.showSeconds,"is-arrow":t.arrowControl}},[i("time-spinner",{ref:"minSpinner",attrs:{"show-seconds":t.showSeconds,"am-pm-mode":t.amPmMode,"arrow-control":t.arrowControl,date:t.minDate},on:{change:t.handleMinChange,"select-range":t.setMinSelectionRange}})],1)]),i("div",{staticClass:"el-time-range-picker__cell"},[i("div",{staticClass:"el-time-range-picker__header"},[t._v(t._s(t.t("el.datepicker.endTime")))]),i("div",{staticClass:"el-time-range-picker__body el-time-panel__content",class:{"has-seconds":t.showSeconds,"is-arrow":t.arrowControl}},[i("time-spinner",{ref:"maxSpinner",attrs:{"show-seconds":t.showSeconds,"am-pm-mode":t.amPmMode,"arrow-control":t.arrowControl,date:t.maxDate},on:{change:t.handleMaxChange,"select-range":t.setMaxSelectionRange}})],1)])]),i("div",{staticClass:"el-time-panel__footer"},[i("button",{staticClass:"el-time-panel__btn cancel",attrs:{type:"button"},on:{click:function(e){t.handleCancel()}}},[t._v(t._s(t.t("el.datepicker.cancel")))]),i("button",{staticClass:"el-time-panel__btn confirm",attrs:{type:"button",disabled:t.btnDisabled},on:{click:function(e){t.handleConfirm()}}},[t._v(t._s(t.t("el.datepicker.confirm")))])])])])};mo._withStripped=!0;var vo=Object(pn.parseDate)("00:00:00","HH:mm:ss"),yo=Object(pn.parseDate)("23:59:59","HH:mm:ss"),bo=function(t){return Object(pn.modifyDate)(yo,t.getFullYear(),t.getMonth(),t.getDate())},To=function(t,e){return new Date(Math.min(t.getTime()+e,bo(t).getTime()))},Eo=o({mixins:[f.a],components:{TimeSpinner:An},computed:{showSeconds:function(){return-1!==(this.format||"").indexOf("ss")},offset:function(){return this.showSeconds?11:8},spinner:function(){return this.selectionRange[0]<this.offset?this.$refs.minSpinner:this.$refs.maxSpinner},btnDisabled:function(){return this.minDate.getTime()>this.maxDate.getTime()},amPmMode:function(){return-1!==(this.format||"").indexOf("A")?"A":-1!==(this.format||"").indexOf("a")?"a":""}},data:function(){return{popperClass:"",minDate:new Date,maxDate:new Date,value:[],oldValue:[new Date,new Date],defaultValue:null,format:"HH:mm:ss",visible:!1,selectionRange:[0,2],arrowControl:!1}},watch:{value:function(t){Array.isArray(t)?(this.minDate=new Date(t[0]),this.maxDate=new Date(t[1])):Array.isArray(this.defaultValue)?(this.minDate=new Date(this.defaultValue[0]),this.maxDate=new Date(this.defaultValue[1])):this.defaultValue?(this.minDate=new Date(this.defaultValue),this.maxDate=To(new Date(this.defaultValue),36e5)):(this.minDate=new Date,this.maxDate=To(new Date,36e5))},visible:function(t){var e=this;t&&(this.oldValue=this.value,this.$nextTick(function(){return e.$refs.minSpinner.emitSelectRange("hours")}))}},methods:{handleClear:function(){this.$emit("pick",null)},handleCancel:function(){this.$emit("pick",this.oldValue)},handleMinChange:function(t){this.minDate=Object(pn.clearMilliseconds)(t),this.handleChange()},handleMaxChange:function(t){this.maxDate=Object(pn.clearMilliseconds)(t),this.handleChange()},handleChange:function(){var t;this.isValidValue([this.minDate,this.maxDate])&&(this.$refs.minSpinner.selectableRange=[[(t=this.minDate,Object(pn.modifyDate)(vo,t.getFullYear(),t.getMonth(),t.getDate())),this.maxDate]],this.$refs.maxSpinner.selectableRange=[[this.minDate,bo(this.maxDate)]],this.$emit("pick",[this.minDate,this.maxDate],!0))},setMinSelectionRange:function(t,e){this.$emit("select-range",t,e,"min"),this.selectionRange=[t,e]},setMaxSelectionRange:function(t,e){this.$emit("select-range",t,e,"max"),this.selectionRange=[t+this.offset,e+this.offset]},handleConfirm:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.$refs.minSpinner.selectableRange,i=this.$refs.maxSpinner.selectableRange;this.minDate=Object(pn.limitTimeRange)(this.minDate,e,this.format),this.maxDate=Object(pn.limitTimeRange)(this.maxDate,i,this.format),this.$emit("pick",[this.minDate,this.maxDate],t)},adjustSpinners:function(){this.$refs.minSpinner.adjustSpinners(),this.$refs.maxSpinner.adjustSpinners()},changeSelectionRange:function(t){var e=this.showSeconds?[0,3,6,11,14,17]:[0,3,8,11],i=["hours","minutes"].concat(this.showSeconds?["seconds"]:[]),n=(e.indexOf(this.selectionRange[0])+t+e.length)%e.length,o=e.length/2;n<o?this.$refs.minSpinner.emitSelectRange(i[n]):this.$refs.maxSpinner.emitSelectRange(i[n-o])},isValidValue:function(t){return Array.isArray(t)&&Object(pn.timeWithinRange)(this.minDate,this.$refs.minSpinner.selectableRange)&&Object(pn.timeWithinRange)(this.maxDate,this.$refs.maxSpinner.selectableRange)},handleKeydown:function(t){var e=t.keyCode,i={38:-1,40:1,37:-1,39:1};if(37===e||39===e){var n=i[e];return this.changeSelectionRange(n),void t.preventDefault()}if(38===e||40===e){var o=i[e];return this.spinner.scrollDown(o),void t.preventDefault()}}}},mo,[],!1,null,null,null);Eo.options.__file="packages/date-picker/src/panel/time-range.vue";var Co=Eo.exports,So={mixins:[wn],name:"ElTimePicker",props:{isRange:Boolean,arrowControl:Boolean},data:function(){return{type:""}},watch:{isRange:function(t){this.picker?(this.unmountPicker(),this.type=t?"timerange":"time",this.panel=t?Co:Ln,this.mountPicker()):(this.type=t?"timerange":"time",this.panel=t?Co:Ln)}},created:function(){this.type=this.isRange?"timerange":"time",this.panel=this.isRange?Co:Ln},install:function(t){t.component(So.name,So)}},ko=So,Oo=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("span",[i("transition",{attrs:{name:t.transition},on:{"after-enter":t.handleAfterEnter,"after-leave":t.handleAfterLeave}},[i("div",{directives:[{name:"show",rawName:"v-show",value:!t.disabled&&t.showPopper,expression:"!disabled && showPopper"}],ref:"popper",staticClass:"el-popover el-popper",class:[t.popperClass,t.content&&"el-popover--plain"],style:{width:t.width+"px"},attrs:{role:"tooltip",id:t.tooltipId,"aria-hidden":t.disabled||!t.showPopper?"true":"false"}},[t.title?i("div",{staticClass:"el-popover__title",domProps:{textContent:t._s(t.title)}}):t._e(),t._t("default",[t._v(t._s(t.content))])],2)]),i("span",{ref:"wrapper",staticClass:"el-popover__reference-wrapper"},[t._t("reference")],2)],1)};Oo._withStripped=!0;var Io=o({name:"ElPopover",mixins:[L.a],props:{trigger:{type:String,default:"click",validator:function(t){return["click","focus","hover","manual"].indexOf(t)>-1}},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:200},title:String,disabled:Boolean,content:String,reference:{},popperClass:String,width:{},visibleArrow:{default:!0},arrowOffset:{type:Number,default:0},transition:{type:String,default:"fade-in-linear"},tabindex:{type:Number,default:0}},computed:{tooltipId:function(){return"el-popover-"+Object(g.generateId)()}},watch:{showPopper:function(t){this.disabled||(t?this.$emit("show"):this.$emit("hide"))}},mounted:function(){var t=this,e=this.referenceElm=this.reference||this.$refs.reference,i=this.popper||this.$refs.popper;!e&&this.$refs.wrapper.children&&(e=this.referenceElm=this.$refs.wrapper.children[0]),e&&(Object(ft.addClass)(e,"el-popover__reference"),e.setAttribute("aria-describedby",this.tooltipId),e.setAttribute("tabindex",this.tabindex),i.setAttribute("tabindex",0),"click"!==this.trigger&&(Object(ft.on)(e,"focusin",function(){t.handleFocus();var i=e.__vue__;i&&"function"==typeof i.focus&&i.focus()}),Object(ft.on)(i,"focusin",this.handleFocus),Object(ft.on)(e,"focusout",this.handleBlur),Object(ft.on)(i,"focusout",this.handleBlur)),Object(ft.on)(e,"keydown",this.handleKeydown),Object(ft.on)(e,"click",this.handleClick)),"click"===this.trigger?(Object(ft.on)(e,"click",this.doToggle),Object(ft.on)(document,"click",this.handleDocumentClick)):"hover"===this.trigger?(Object(ft.on)(e,"mouseenter",this.handleMouseEnter),Object(ft.on)(i,"mouseenter",this.handleMouseEnter),Object(ft.on)(e,"mouseleave",this.handleMouseLeave),Object(ft.on)(i,"mouseleave",this.handleMouseLeave)):"focus"===this.trigger&&(this.tabindex<0&&console.warn("[Element Warn][Popover]a negative taindex means that the element cannot be focused by tab key"),e.querySelector("input, textarea")?(Object(ft.on)(e,"focusin",this.doShow),Object(ft.on)(e,"focusout",this.doClose)):(Object(ft.on)(e,"mousedown",this.doShow),Object(ft.on)(e,"mouseup",this.doClose)))},beforeDestroy:function(){this.cleanup()},deactivated:function(){this.cleanup()},methods:{doToggle:function(){this.showPopper=!this.showPopper},doShow:function(){this.showPopper=!0},doClose:function(){this.showPopper=!1},handleFocus:function(){Object(ft.addClass)(this.referenceElm,"focusing"),"click"!==this.trigger&&"focus"!==this.trigger||(this.showPopper=!0)},handleClick:function(){Object(ft.removeClass)(this.referenceElm,"focusing")},handleBlur:function(){Object(ft.removeClass)(this.referenceElm,"focusing"),"click"!==this.trigger&&"focus"!==this.trigger||(this.showPopper=!1)},handleMouseEnter:function(){var t=this;clearTimeout(this._timer),this.openDelay?this._timer=setTimeout(function(){t.showPopper=!0},this.openDelay):this.showPopper=!0},handleKeydown:function(t){27===t.keyCode&&"manual"!==this.trigger&&this.doClose()},handleMouseLeave:function(){var t=this;clearTimeout(this._timer),this.closeDelay?this._timer=setTimeout(function(){t.showPopper=!1},this.closeDelay):this.showPopper=!1},handleDocumentClick:function(t){var e=this.reference||this.$refs.reference,i=this.popper||this.$refs.popper;!e&&this.$refs.wrapper.children&&(e=this.referenceElm=this.$refs.wrapper.children[0]),this.$el&&e&&!this.$el.contains(t.target)&&!e.contains(t.target)&&i&&!i.contains(t.target)&&(this.showPopper=!1)},handleAfterEnter:function(){this.$emit("after-enter")},handleAfterLeave:function(){this.$emit("after-leave"),this.doDestroy()},cleanup:function(){(this.openDelay||this.closeDelay)&&clearTimeout(this._timer)}},destroyed:function(){var t=this.reference;Object(ft.off)(t,"click",this.doToggle),Object(ft.off)(t,"mouseup",this.doClose),Object(ft.off)(t,"mousedown",this.doShow),Object(ft.off)(t,"focusin",this.doShow),Object(ft.off)(t,"focusout",this.doClose),Object(ft.off)(t,"mousedown",this.doShow),Object(ft.off)(t,"mouseup",this.doClose),Object(ft.off)(t,"mouseleave",this.handleMouseLeave),Object(ft.off)(t,"mouseenter",this.handleMouseEnter),Object(ft.off)(document,"click",this.handleDocumentClick)}},Oo,[],!1,null,null,null);Io.options.__file="packages/popover/src/main.vue";var wo=Io.exports,Ro=function(t,e,i){var n=e.expression?e.value:e.arg,o=i.context.$refs[n];o&&(Array.isArray(o)?o[0].$refs.reference=t:o.$refs.reference=t)},Do={bind:function(t,e,i){Ro(t,e,i)},inserted:function(t,e,i){Ro(t,e,i)}};ui.a.directive("popover",Do),wo.install=function(t){t.directive("popover",Do),t.component(wo.name,wo)},wo.directive=Do;var xo=wo,Mo={name:"ElTooltip",mixins:[L.a],props:{openDelay:{type:Number,default:0},disabled:Boolean,manual:Boolean,effect:{type:String,default:"dark"},arrowOffset:{type:Number,default:0},popperClass:String,content:String,visibleArrow:{default:!0},transition:{type:String,default:"el-fade-in-linear"},popperOptions:{default:function(){return{boundariesPadding:10,gpuAcceleration:!1}}},enterable:{type:Boolean,default:!0},hideAfter:{type:Number,default:0},tabindex:{type:Number,default:0}},data:function(){return{tooltipId:"el-tooltip-"+Object(g.generateId)(),timeoutPending:null,focusing:!1}},beforeCreate:function(){var t=this;this.$isServer||(this.popperVM=new ui.a({data:{node:""},render:function(t){return this.node}}).$mount(),this.debounceClose=D()(200,function(){return t.handleClosePopper()}))},render:function(t){var e=this;this.popperVM&&(this.popperVM.node=t("transition",{attrs:{name:this.transition},on:{afterLeave:this.doDestroy}},[t("div",{on:{mouseleave:function(){e.setExpectedState(!1),e.debounceClose()},mouseenter:function(){e.setExpectedState(!0)}},ref:"popper",attrs:{role:"tooltip",id:this.tooltipId,"aria-hidden":this.disabled||!this.showPopper?"true":"false"},directives:[{name:"show",value:!this.disabled&&this.showPopper}],class:["el-tooltip__popper","is-"+this.effect,this.popperClass]},[this.$slots.content||this.content])]));var i=this.getFirstElement();if(!i)return null;var n=i.data=i.data||{};return n.staticClass=this.addTooltipClass(n.staticClass),i},mounted:function(){var t=this;this.referenceElm=this.$el,1===this.$el.nodeType&&(this.$el.setAttribute("aria-describedby",this.tooltipId),this.$el.setAttribute("tabindex",this.tabindex),Object(ft.on)(this.referenceElm,"mouseenter",this.show),Object(ft.on)(this.referenceElm,"mouseleave",this.hide),Object(ft.on)(this.referenceElm,"focus",function(){if(t.$slots.default&&t.$slots.default.length){var e=t.$slots.default[0].componentInstance;e&&e.focus?e.focus():t.handleFocus()}else t.handleFocus()}),Object(ft.on)(this.referenceElm,"blur",this.handleBlur),Object(ft.on)(this.referenceElm,"click",this.removeFocusing)),this.value&&this.popperVM&&this.popperVM.$nextTick(function(){t.value&&t.updatePopper()})},watch:{focusing:function(t){t?Object(ft.addClass)(this.referenceElm,"focusing"):Object(ft.removeClass)(this.referenceElm,"focusing")}},methods:{show:function(){this.setExpectedState(!0),this.handleShowPopper()},hide:function(){this.setExpectedState(!1),this.debounceClose()},handleFocus:function(){this.focusing=!0,this.show()},handleBlur:function(){this.focusing=!1,this.hide()},removeFocusing:function(){this.focusing=!1},addTooltipClass:function(t){return t?"el-tooltip "+t.replace("el-tooltip",""):"el-tooltip"},handleShowPopper:function(){var t=this;this.expectedState&&!this.manual&&(clearTimeout(this.timeout),this.timeout=setTimeout(function(){t.showPopper=!0},this.openDelay),this.hideAfter>0&&(this.timeoutPending=setTimeout(function(){t.showPopper=!1},this.hideAfter)))},handleClosePopper:function(){this.enterable&&this.expectedState||this.manual||(clearTimeout(this.timeout),this.timeoutPending&&clearTimeout(this.timeoutPending),this.showPopper=!1,this.disabled&&this.doDestroy())},setExpectedState:function(t){!1===t&&clearTimeout(this.timeoutPending),this.expectedState=t},getFirstElement:function(){var t=this.$slots.default;if(!Array.isArray(t))return null;for(var e=null,i=0;i<t.length;i++)t[i]&&t[i].tag&&(e=t[i]);return e}},beforeDestroy:function(){this.popperVM&&this.popperVM.$destroy()},destroyed:function(){var t=this.referenceElm;1===t.nodeType&&(Object(ft.off)(t,"mouseenter",this.show),Object(ft.off)(t,"mouseleave",this.hide),Object(ft.off)(t,"focus",this.handleFocus),Object(ft.off)(t,"blur",this.handleBlur),Object(ft.off)(t,"click",this.removeFocusing))},install:function(t){t.component(Mo.name,Mo)}},Ao=Mo,No=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"msgbox-fade"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"el-message-box__wrapper",attrs:{tabindex:"-1",role:"dialog","aria-modal":"true","aria-label":t.title||"dialog"},on:{click:function(e){return e.target!==e.currentTarget?null:t.handleWrapperClick(e)}}},[i("div",{staticClass:"el-message-box",class:[t.customClass,t.center&&"el-message-box--center"]},[null!==t.title?i("div",{staticClass:"el-message-box__header"},[i("div",{staticClass:"el-message-box__title"},[t.icon&&t.center?i("div",{class:["el-message-box__status",t.icon]}):t._e(),i("span",[t._v(t._s(t.title))])]),t.showClose?i("button",{staticClass:"el-message-box__headerbtn",attrs:{type:"button","aria-label":"Close"},on:{click:function(e){t.handleAction(t.distinguishCancelAndClose?"close":"cancel")},keydown:function(e){if(!("button"in e)&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;t.handleAction(t.distinguishCancelAndClose?"close":"cancel")}}},[i("i",{staticClass:"el-message-box__close el-icon-close"})]):t._e()]):t._e(),i("div",{staticClass:"el-message-box__content"},[i("div",{staticClass:"el-message-box__container"},[t.icon&&!t.center&&""!==t.message?i("div",{class:["el-message-box__status",t.icon]}):t._e(),""!==t.message?i("div",{staticClass:"el-message-box__message"},[t._t("default",[t.dangerouslyUseHTMLString?i("p",{domProps:{innerHTML:t._s(t.message)}}):i("p",[t._v(t._s(t.message))])])],2):t._e()]),i("div",{directives:[{name:"show",rawName:"v-show",value:t.showInput,expression:"showInput"}],staticClass:"el-message-box__input"},[i("el-input",{ref:"input",attrs:{type:t.inputType,placeholder:t.inputPlaceholder},nativeOn:{keydown:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.handleInputEnter(e):null}},model:{value:t.inputValue,callback:function(e){t.inputValue=e},expression:"inputValue"}}),i("div",{staticClass:"el-message-box__errormsg",style:{visibility:t.editorErrorMessage?"visible":"hidden"}},[t._v(t._s(t.editorErrorMessage))])],1)]),i("div",{staticClass:"el-message-box__btns"},[t.showCancelButton?i("el-button",{class:[t.cancelButtonClasses],attrs:{loading:t.cancelButtonLoading,round:t.roundButton,size:"small"},on:{keydown:function(e){if(!("button"in e)&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;t.handleAction("cancel")}},nativeOn:{click:function(e){t.handleAction("cancel")}}},[t._v("\n          "+t._s(t.cancelButtonText||t.t("el.messagebox.cancel"))+"\n        ")]):t._e(),i("el-button",{directives:[{name:"show",rawName:"v-show",value:t.showConfirmButton,expression:"showConfirmButton"}],ref:"confirm",class:[t.confirmButtonClasses],attrs:{loading:t.confirmButtonLoading,round:t.roundButton,size:"small"},on:{keydown:function(e){if(!("button"in e)&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;t.handleAction("confirm")}},nativeOn:{click:function(e){t.handleAction("confirm")}}},[t._v("\n          "+t._s(t.confirmButtonText||t.t("el.messagebox.confirm"))+"\n        ")])],1)])])])};No._withStripped=!0;var Lo=i(12),Po=i.n(Lo),Bo=i(39),Fo=i.n(Bo),Ho=void 0,Uo={success:"success",info:"info",warning:"warning",error:"error"},Vo=o({mixins:[b.a,f.a],props:{modal:{default:!0},lockScroll:{default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{default:!0},closeOnPressEscape:{default:!0},closeOnHashChange:{default:!0},center:{default:!1,type:Boolean},roundButton:{default:!1,type:Boolean}},components:{ElInput:p.a,ElButton:z.a},computed:{icon:function(){var t=this.type;return this.iconClass||(t&&Uo[t]?"el-icon-"+Uo[t]:"")},confirmButtonClasses:function(){return"el-button--primary "+this.confirmButtonClass},cancelButtonClasses:function(){return""+this.cancelButtonClass}},methods:{getSafeClose:function(){var t=this,e=this.uid;return function(){t.$nextTick(function(){e===t.uid&&t.doClose()})}},doClose:function(){var t=this;this.visible&&(this.visible=!1,this._closing=!0,this.onClose&&this.onClose(),Ho.closeDialog(),this.lockScroll&&setTimeout(this.restoreBodyStyle,200),this.opened=!1,this.doAfterClose(),setTimeout(function(){t.action&&t.callback(t.action,t)}))},handleWrapperClick:function(){this.closeOnClickModal&&this.handleAction(this.distinguishCancelAndClose?"close":"cancel")},handleInputEnter:function(){if("textarea"!==this.inputType)return this.handleAction("confirm")},handleAction:function(t){("prompt"!==this.$type||"confirm"!==t||this.validate())&&(this.action=t,"function"==typeof this.beforeClose?(this.close=this.getSafeClose(),this.beforeClose(t,this,this.close)):this.doClose())},validate:function(){if("prompt"===this.$type){var t=this.inputPattern;if(t&&!t.test(this.inputValue||""))return this.editorErrorMessage=this.inputErrorMessage||Object(Lo.t)("el.messagebox.error"),Object(ft.addClass)(this.getInputElement(),"invalid"),!1;var e=this.inputValidator;if("function"==typeof e){var i=e(this.inputValue);if(!1===i)return this.editorErrorMessage=this.inputErrorMessage||Object(Lo.t)("el.messagebox.error"),Object(ft.addClass)(this.getInputElement(),"invalid"),!1;if("string"==typeof i)return this.editorErrorMessage=i,Object(ft.addClass)(this.getInputElement(),"invalid"),!1}}return this.editorErrorMessage="",Object(ft.removeClass)(this.getInputElement(),"invalid"),!0},getFirstFocus:function(){var t=this.$el.querySelector(".el-message-box__btns .el-button"),e=this.$el.querySelector(".el-message-box__btns .el-message-box__title");return t||e},getInputElement:function(){var t=this.$refs.input.$refs;return t.input||t.textarea},handleClose:function(){this.handleAction("close")}},watch:{inputValue:{immediate:!0,handler:function(t){var e=this;this.$nextTick(function(i){"prompt"===e.$type&&null!==t&&e.validate()})}},visible:function(t){var e=this;t&&(this.uid++,"alert"!==this.$type&&"confirm"!==this.$type||this.$nextTick(function(){e.$refs.confirm.$el.focus()}),this.focusAfterClosed=document.activeElement,Ho=new Fo.a(this.$el,this.focusAfterClosed,this.getFirstFocus())),"prompt"===this.$type&&(t?setTimeout(function(){e.$refs.input&&e.$refs.input.$el&&e.getInputElement().focus()},500):(this.editorErrorMessage="",Object(ft.removeClass)(this.getInputElement(),"invalid")))}},mounted:function(){var t=this;this.$nextTick(function(){t.closeOnHashChange&&window.addEventListener("hashchange",t.close)})},beforeDestroy:function(){this.closeOnHashChange&&window.removeEventListener("hashchange",this.close),setTimeout(function(){Ho.closeDialog()})},data:function(){return{uid:1,title:void 0,message:"",type:"",iconClass:"",customClass:"",showInput:!1,inputValue:null,inputPlaceholder:"",inputType:"text",inputPattern:null,inputValidator:null,inputErrorMessage:"",showConfirmButton:!0,showCancelButton:!1,action:"",confirmButtonText:"",cancelButtonText:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonClass:"",confirmButtonDisabled:!1,cancelButtonClass:"",editorErrorMessage:null,callback:null,dangerouslyUseHTMLString:!1,focusAfterClosed:null,isOnComposition:!1,distinguishCancelAndClose:!1}}},No,[],!1,null,null,null);Vo.options.__file="packages/message-box/src/main.vue";var Go=Vo.exports,Wo=i(23),$o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jo={title:null,message:"",type:"",iconClass:"",showInput:!1,showClose:!0,modalFade:!0,lockScroll:!0,closeOnClickModal:!0,closeOnPressEscape:!0,closeOnHashChange:!0,inputValue:null,inputPlaceholder:"",inputType:"text",inputPattern:null,inputValidator:null,inputErrorMessage:"",showConfirmButton:!0,showCancelButton:!1,confirmButtonPosition:"right",confirmButtonHighlight:!1,cancelButtonHighlight:!1,confirmButtonText:"",cancelButtonText:"",confirmButtonClass:"",cancelButtonClass:"",customClass:"",beforeClose:null,dangerouslyUseHTMLString:!1,center:!1,roundButton:!1,distinguishCancelAndClose:!1},zo=ui.a.extend(Go),Xo=void 0,Yo=void 0,Ko=[],Jo=function(t){if(Xo){var e=Xo.callback;"function"==typeof e&&(Yo.showInput?e(Yo.inputValue,t):e(t)),Xo.resolve&&("confirm"===t?Yo.showInput?Xo.resolve({value:Yo.inputValue,action:t}):Xo.resolve(t):!Xo.reject||"cancel"!==t&&"close"!==t||Xo.reject(t))}},qo=function t(){if(Yo||((Yo=new zo({el:document.createElement("div")})).callback=Jo),Yo.action="",(!Yo.visible||Yo.closeTimer)&&Ko.length>0){var e=(Xo=Ko.shift()).options;for(var i in e)e.hasOwnProperty(i)&&(Yo[i]=e[i]);void 0===e.callback&&(Yo.callback=Jo);var n=Yo.callback;Yo.callback=function(e,i){n(e,i),t()},Object(Wo.isVNode)(Yo.message)?(Yo.$slots.default=[Yo.message],Yo.message=null):delete Yo.$slots.default,["modal","showClose","closeOnClickModal","closeOnPressEscape","closeOnHashChange"].forEach(function(t){void 0===Yo[t]&&(Yo[t]=!0)}),document.body.appendChild(Yo.$el),ui.a.nextTick(function(){Yo.visible=!0})}},Zo=function t(e,i){if(!ui.a.prototype.$isServer){if("string"==typeof e||Object(Wo.isVNode)(e)?(e={message:e},"string"==typeof arguments[1]&&(e.title=arguments[1])):e.callback&&!i&&(i=e.callback),"undefined"!=typeof Promise)return new Promise(function(n,o){Ko.push({options:Vt()({},jo,t.defaults,e),callback:i,resolve:n,reject:o}),qo()});Ko.push({options:Vt()({},jo,t.defaults,e),callback:i}),qo()}};Zo.setDefaults=function(t){Zo.defaults=t},Zo.alert=function(t,e,i){return"object"===(void 0===e?"undefined":$o(e))?(i=e,e=""):void 0===e&&(e=""),Zo(Vt()({title:e,message:t,$type:"alert",closeOnPressEscape:!1,closeOnClickModal:!1},i))},Zo.confirm=function(t,e,i){return"object"===(void 0===e?"undefined":$o(e))?(i=e,e=""):void 0===e&&(e=""),Zo(Vt()({title:e,message:t,$type:"confirm",showCancelButton:!0},i))},Zo.prompt=function(t,e,i){return"object"===(void 0===e?"undefined":$o(e))?(i=e,e=""):void 0===e&&(e=""),Zo(Vt()({title:e,message:t,showCancelButton:!0,showInput:!0,$type:"prompt"},i))},Zo.close=function(){Yo.doClose(),Yo.visible=!1,Ko=[],Xo=null};var Qo=Zo,tr=function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"el-breadcrumb",attrs:{"aria-label":"Breadcrumb",role:"navigation"}},[this._t("default")],2)};tr._withStripped=!0;var er=o({name:"ElBreadcrumb",props:{separator:{type:String,default:"/"},separatorClass:{type:String,default:""}},provide:function(){return{elBreadcrumb:this}},mounted:function(){var t=this.$el.querySelectorAll(".el-breadcrumb__item");t.length&&t[t.length-1].setAttribute("aria-current","page")}},tr,[],!1,null,null,null);er.options.__file="packages/breadcrumb/src/breadcrumb.vue";var ir=er.exports;ir.install=function(t){t.component(ir.name,ir)};var nr=ir,or=function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"el-breadcrumb__item"},[e("span",{ref:"link",class:["el-breadcrumb__inner",this.to?"is-link":""],attrs:{role:"link"}},[this._t("default")],2),this.separatorClass?e("i",{staticClass:"el-breadcrumb__separator",class:this.separatorClass}):e("span",{staticClass:"el-breadcrumb__separator",attrs:{role:"presentation"}},[this._v(this._s(this.separator))])])};or._withStripped=!0;var rr=o({name:"ElBreadcrumbItem",props:{to:{},replace:Boolean},data:function(){return{separator:"",separatorClass:""}},inject:["elBreadcrumb"],mounted:function(){var t=this;this.separator=this.elBreadcrumb.separator,this.separatorClass=this.elBreadcrumb.separatorClass;var e=this.$refs.link;e.setAttribute("role","link"),e.addEventListener("click",function(e){var i=t.to,n=t.$router;i&&n&&(t.replace?n.replace(i):n.push(i))})}},or,[],!1,null,null,null);rr.options.__file="packages/breadcrumb/src/breadcrumb-item.vue";var sr=rr.exports;sr.install=function(t){t.component(sr.name,sr)};var ar=sr,lr=function(){var t=this.$createElement;return(this._self._c||t)("form",{staticClass:"el-form",class:[this.labelPosition?"el-form--label-"+this.labelPosition:"",{"el-form--inline":this.inline}]},[this._t("default")],2)};lr._withStripped=!0;var cr=o({name:"ElForm",componentName:"ElForm",provide:function(){return{elForm:this}},props:{model:Object,rules:Object,labelPosition:String,labelWidth:String,labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},size:String,disabled:Boolean,validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:{type:Boolean,default:!1}},watch:{rules:function(){this.fields.forEach(function(t){t.removeValidateEvents(),t.addValidateEvents()}),this.validateOnRuleChange&&this.validate(function(){})}},computed:{autoLabelWidth:function(){if(!this.potentialLabelWidthArr.length)return 0;var t=Math.max.apply(Math,this.potentialLabelWidthArr);return t?t+"px":""}},data:function(){return{fields:[],potentialLabelWidthArr:[]}},created:function(){var t=this;this.$on("el.form.addField",function(e){e&&t.fields.push(e)}),this.$on("el.form.removeField",function(e){e.prop&&t.fields.splice(t.fields.indexOf(e),1)})},methods:{resetFields:function(){this.model?this.fields.forEach(function(t){t.resetField()}):console.warn("[Element Warn][Form]model is required for resetFields to work.")},clearValidate:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];(t.length?"string"==typeof t?this.fields.filter(function(e){return t===e.prop}):this.fields.filter(function(e){return t.indexOf(e.prop)>-1}):this.fields).forEach(function(t){t.clearValidate()})},validate:function(t){var e=this;if(this.model){var i=void 0;"function"!=typeof t&&window.Promise&&(i=new window.Promise(function(e,i){t=function(t){t?e(t):i(t)}}));var n=!0,o=0;0===this.fields.length&&t&&t(!0);var r={};return this.fields.forEach(function(i){i.validate("",function(i,s){i&&(n=!1),r=Vt()({},r,s),"function"==typeof t&&++o===e.fields.length&&t(n,r)})}),i||void 0}console.warn("[Element Warn][Form]model is required for validate to work!")},validateField:function(t,e){t=[].concat(t);var i=this.fields.filter(function(e){return-1!==t.indexOf(e.prop)});i.length?i.forEach(function(t){t.validate("",e)}):console.warn("[Element Warn]please pass correct props!")},getLabelWidthIndex:function(t){var e=this.potentialLabelWidthArr.indexOf(t);if(-1===e)throw new Error("[ElementForm]unpected width ",t);return e},registerLabelWidth:function(t,e){if(t&&e){var i=this.getLabelWidthIndex(e);this.potentialLabelWidthArr.splice(i,1,t)}else t&&this.potentialLabelWidthArr.push(t)},deregisterLabelWidth:function(t){var e=this.getLabelWidthIndex(t);this.potentialLabelWidthArr.splice(e,1)}}},lr,[],!1,null,null,null);cr.options.__file="packages/form/src/form.vue";var ur=cr.exports;ur.install=function(t){t.component(ur.name,ur)};var hr=ur,pr=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"el-form-item",class:[{"el-form-item--feedback":t.elForm&&t.elForm.statusIcon,"is-error":"error"===t.validateState,"is-validating":"validating"===t.validateState,"is-success":"success"===t.validateState,"is-required":t.isRequired||t.required,"is-no-asterisk":t.elForm&&t.elForm.hideRequiredAsterisk},t.sizeClass?"el-form-item--"+t.sizeClass:""]},[i("label-wrap",{attrs:{"is-auto-width":t.labelStyle&&"auto"===t.labelStyle.width,"update-all":"auto"===t.form.labelWidth}},[t.label||t.$slots.label?i("label",{staticClass:"el-form-item__label",style:t.labelStyle,attrs:{for:t.labelFor}},[t._t("label",[t._v(t._s(t.label+t.form.labelSuffix))])],2):t._e()]),i("div",{staticClass:"el-form-item__content",style:t.contentStyle},[t._t("default"),i("transition",{attrs:{name:"el-zoom-in-top"}},["error"===t.validateState&&t.showMessage&&t.form.showMessage?t._t("error",[i("div",{staticClass:"el-form-item__error",class:{"el-form-item__error--inline":"boolean"==typeof t.inlineMessage?t.inlineMessage:t.elForm&&t.elForm.inlineMessage||!1}},[t._v("\n          "+t._s(t.validateMessage)+"\n        ")])],{error:t.validateMessage}):t._e()],2)],2)],1)};pr._withStripped=!0;var dr=i(40),fr=i.n(dr),gr=o({props:{isAutoWidth:Boolean,updateAll:Boolean},inject:["elForm","elFormItem"],render:function(){var t=arguments[0],e=this.$slots.default;if(!e)return null;if(this.isAutoWidth){var i=this.elForm.autoLabelWidth,n={};if(i&&"auto"!==i){var o=parseInt(i,10)-this.computedWidth;o&&(n.marginLeft=o+"px")}return t("div",{class:"el-form-item__label-wrap",style:n},[e])}return e[0]},methods:{getLabelWidth:function(){if(this.$el&&this.$el.firstElementChild){var t=window.getComputedStyle(this.$el.firstElementChild).width;return Math.ceil(parseFloat(t))}return 0},updateLabelWidth:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"update";this.$slots.default&&this.isAutoWidth&&this.$el.firstElementChild&&("update"===t?this.computedWidth=this.getLabelWidth():"remove"===t&&this.elForm.deregisterLabelWidth(this.computedWidth))}},watch:{computedWidth:function(t,e){this.updateAll&&(this.elForm.registerLabelWidth(t,e),this.elFormItem.updateComputedLabelWidth(t))}},data:function(){return{computedWidth:0}},mounted:function(){this.updateLabelWidth("update")},updated:function(){this.updateLabelWidth("update")},beforeDestroy:function(){this.updateLabelWidth("remove")}},void 0,void 0,!1,null,null,null);gr.options.__file="packages/form/src/label-wrap.vue";var _r=gr.exports,mr=o({name:"ElFormItem",componentName:"ElFormItem",mixins:[S.a],provide:function(){return{elFormItem:this}},inject:["elForm"],props:{label:String,labelWidth:String,prop:String,required:{type:Boolean,default:void 0},rules:[Object,Array],error:String,validateStatus:String,for:String,inlineMessage:{type:[String,Boolean],default:""},showMessage:{type:Boolean,default:!0},size:String},components:{LabelWrap:_r},watch:{error:{immediate:!0,handler:function(t){this.validateMessage=t,this.validateState=t?"error":""}},validateStatus:function(t){this.validateState=t}},computed:{labelFor:function(){return this.for||this.prop},labelStyle:function(){var t={};if("top"===this.form.labelPosition)return t;var e=this.labelWidth||this.form.labelWidth;return e&&(t.width=e),t},contentStyle:function(){var t={},e=this.label;if("top"===this.form.labelPosition||this.form.inline)return t;if(!e&&!this.labelWidth&&this.isNested)return t;var i=this.labelWidth||this.form.labelWidth;return"auto"===i?"auto"===this.labelWidth?t.marginLeft=this.computedLabelWidth:"auto"===this.form.labelWidth&&(t.marginLeft=this.elForm.autoLabelWidth):t.marginLeft=i,t},form:function(){for(var t=this.$parent,e=t.$options.componentName;"ElForm"!==e;)"ElFormItem"===e&&(this.isNested=!0),e=(t=t.$parent).$options.componentName;return t},fieldValue:function(){var t=this.form.model;if(t&&this.prop){var e=this.prop;return-1!==e.indexOf(":")&&(e=e.replace(/:/,".")),Object(g.getPropByPath)(t,e,!0).v}},isRequired:function(){var t=this.getRules(),e=!1;return t&&t.length&&t.every(function(t){return!t.required||(e=!0,!1)}),e},_formSize:function(){return this.elForm.size},elFormItemSize:function(){return this.size||this._formSize},sizeClass:function(){return this.elFormItemSize||(this.$ELEMENT||{}).size}},data:function(){return{validateState:"",validateMessage:"",validateDisabled:!1,validator:{},isNested:!1,computedLabelWidth:""}},methods:{validate:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g.noop;this.validateDisabled=!1;var n=this.getFilteredRule(t);if((!n||0===n.length)&&void 0===this.required)return i(),!0;this.validateState="validating";var o={};n&&n.length>0&&n.forEach(function(t){delete t.trigger}),o[this.prop]=n;var r=new fr.a(o),s={};s[this.prop]=this.fieldValue,r.validate(s,{firstFields:!0},function(t,n){e.validateState=t?"error":"success",e.validateMessage=t?t[0].message:"",i(e.validateMessage,n),e.elForm&&e.elForm.$emit("validate",e.prop,!t,e.validateMessage||null)})},clearValidate:function(){this.validateState="",this.validateMessage="",this.validateDisabled=!1},resetField:function(){var t=this;this.validateState="",this.validateMessage="";var e=this.form.model,i=this.fieldValue,n=this.prop;-1!==n.indexOf(":")&&(n=n.replace(/:/,"."));var o=Object(g.getPropByPath)(e,n,!0);this.validateDisabled=!0,Array.isArray(i)?o.o[o.k]=[].concat(this.initialValue):o.o[o.k]=this.initialValue,this.$nextTick(function(){t.validateDisabled=!1}),this.broadcast("ElTimeSelect","fieldReset",this.initialValue)},getRules:function(){var t=this.form.rules,e=this.rules,i=void 0!==this.required?{required:!!this.required}:[],n=Object(g.getPropByPath)(t,this.prop||"");return t=t?n.o[this.prop||""]||n.v:[],[].concat(e||t||[]).concat(i)},getFilteredRule:function(t){return this.getRules().filter(function(e){return!e.trigger||""===t||(Array.isArray(e.trigger)?e.trigger.indexOf(t)>-1:e.trigger===t)}).map(function(t){return Vt()({},t)})},onFieldBlur:function(){this.validate("blur")},onFieldChange:function(){this.validateDisabled?this.validateDisabled=!1:this.validate("change")},updateComputedLabelWidth:function(t){this.computedLabelWidth=t?t+"px":""},addValidateEvents:function(){(this.getRules().length||void 0!==this.required)&&(this.$on("el.form.blur",this.onFieldBlur),this.$on("el.form.change",this.onFieldChange))},removeValidateEvents:function(){this.$off()}},mounted:function(){if(this.prop){this.dispatch("ElForm","el.form.addField",[this]);var t=this.fieldValue;Array.isArray(t)&&(t=[].concat(t)),Object.defineProperty(this,"initialValue",{value:t}),this.addValidateEvents()}},beforeDestroy:function(){this.dispatch("ElForm","el.form.removeField",[this])}},pr,[],!1,null,null,null);mr.options.__file="packages/form/src/form-item.vue";var vr=mr.exports;vr.install=function(t){t.component(vr.name,vr)};var yr=vr,br=function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"el-tabs__active-bar",class:"is-"+this.rootTabs.tabPosition,style:this.barStyle})};br._withStripped=!0;var Tr=o({name:"TabBar",props:{tabs:Array},inject:["rootTabs"],computed:{barStyle:{get:function(){var t=this,e={},i=0,n=0,o=-1!==["top","bottom"].indexOf(this.rootTabs.tabPosition)?"width":"height",r="width"===o?"x":"y",s=function(t){return t.toLowerCase().replace(/( |^)[a-z]/g,function(t){return t.toUpperCase()})};this.tabs.every(function(e,r){var a=Object(g.arrayFind)(t.$parent.$refs.tabs||[],function(t){return t.id.replace("tab-","")===e.paneName});if(!a)return!1;if(e.active){n=a["client"+s(o)];var l=window.getComputedStyle(a);return"width"===o&&t.tabs.length>1&&(n-=parseFloat(l.paddingLeft)+parseFloat(l.paddingRight)),"width"===o&&(i+=parseFloat(l.paddingLeft)),!1}return i+=a["client"+s(o)],!0});var a="translate"+s(r)+"("+i+"px)";return e[o]=n+"px",e.transform=a,e.msTransform=a,e.webkitTransform=a,e}}}},br,[],!1,null,null,null);function Er(){}Tr.options.__file="packages/tabs/src/tab-bar.vue";var Cr=function(t){return t.toLowerCase().replace(/( |^)[a-z]/g,function(t){return t.toUpperCase()})},Sr=o({name:"TabNav",components:{TabBar:Tr.exports},inject:["rootTabs"],props:{panes:Array,currentName:String,editable:Boolean,onTabClick:{type:Function,default:Er},onTabRemove:{type:Function,default:Er},type:String,stretch:Boolean},data:function(){return{scrollable:!1,navOffset:0,isFocus:!1,focusable:!0}},computed:{navStyle:function(){return{transform:"translate"+(-1!==["top","bottom"].indexOf(this.rootTabs.tabPosition)?"X":"Y")+"(-"+this.navOffset+"px)"}},sizeName:function(){return-1!==["top","bottom"].indexOf(this.rootTabs.tabPosition)?"width":"height"}},methods:{scrollPrev:function(){var t=this.$refs.navScroll["offset"+Cr(this.sizeName)],e=this.navOffset;if(e){var i=e>t?e-t:0;this.navOffset=i}},scrollNext:function(){var t=this.$refs.nav["offset"+Cr(this.sizeName)],e=this.$refs.navScroll["offset"+Cr(this.sizeName)],i=this.navOffset;if(!(t-i<=e)){var n=t-i>2*e?i+e:t-e;this.navOffset=n}},scrollToActiveTab:function(){if(this.scrollable){var t=this.$refs.nav,e=this.$el.querySelector(".is-active");if(e){var i=this.$refs.navScroll,n=-1!==["top","bottom"].indexOf(this.rootTabs.tabPosition),o=e.getBoundingClientRect(),r=i.getBoundingClientRect(),s=n?t.offsetWidth-r.width:t.offsetHeight-r.height,a=this.navOffset,l=a;n?(o.left<r.left&&(l=a-(r.left-o.left)),o.right>r.right&&(l=a+o.right-r.right)):(o.top<r.top&&(l=a-(r.top-o.top)),o.bottom>r.bottom&&(l=a+(o.bottom-r.bottom))),l=Math.max(l,0),this.navOffset=Math.min(l,s)}}},update:function(){if(this.$refs.nav){var t=this.sizeName,e=this.$refs.nav["offset"+Cr(t)],i=this.$refs.navScroll["offset"+Cr(t)],n=this.navOffset;if(i<e){var o=this.navOffset;this.scrollable=this.scrollable||{},this.scrollable.prev=o,this.scrollable.next=o+i<e,e-o<i&&(this.navOffset=e-i)}else this.scrollable=!1,n>0&&(this.navOffset=0)}},changeTab:function(t){var e=t.keyCode,i=void 0,n=void 0,o=void 0;-1!==[37,38,39,40].indexOf(e)&&(o=t.currentTarget.querySelectorAll("[role=tab]"),n=Array.prototype.indexOf.call(o,t.target),o[i=37===e||38===e?0===n?o.length-1:n-1:n<o.length-1?n+1:0].focus(),o[i].click(),this.setFocus())},setFocus:function(){this.focusable&&(this.isFocus=!0)},removeFocus:function(){this.isFocus=!1},visibilityChangeHandler:function(){var t=this,e=document.visibilityState;"hidden"===e?this.focusable=!1:"visible"===e&&setTimeout(function(){t.focusable=!0},50)},windowBlurHandler:function(){this.focusable=!1},windowFocusHandler:function(){var t=this;setTimeout(function(){t.focusable=!0},50)}},updated:function(){this.update()},render:function(t){var e=this,i=this.type,n=this.panes,o=this.editable,r=this.stretch,s=this.onTabClick,a=this.onTabRemove,l=this.navStyle,c=this.scrollable,u=this.scrollNext,h=this.scrollPrev,p=this.changeTab,d=this.setFocus,f=this.removeFocus,g=c?[t("span",{class:["el-tabs__nav-prev",c.prev?"":"is-disabled"],on:{click:h}},[t("i",{class:"el-icon-arrow-left"})]),t("span",{class:["el-tabs__nav-next",c.next?"":"is-disabled"],on:{click:u}},[t("i",{class:"el-icon-arrow-right"})])]:null,_=this._l(n,function(i,n){var r,l=i.name||i.index||n,c=i.isClosable||o;i.index=""+n;var u=c?t("span",{class:"el-icon-close",on:{click:function(t){a(i,t)}}}):null,h=i.$slots.label||i.label,p=i.active?0:-1;return t("div",{class:(r={"el-tabs__item":!0},r["is-"+e.rootTabs.tabPosition]=!0,r["is-active"]=i.active,r["is-disabled"]=i.disabled,r["is-closable"]=c,r["is-focus"]=e.isFocus,r),attrs:{id:"tab-"+l,"aria-controls":"pane-"+l,role:"tab","aria-selected":i.active,tabindex:p},key:"tab-"+l,ref:"tabs",refInFor:!0,on:{focus:function(){d()},blur:function(){f()},click:function(t){f(),s(i,l,t)},keydown:function(t){!c||46!==t.keyCode&&8!==t.keyCode||a(i,t)}}},[h,u])});return t("div",{class:["el-tabs__nav-wrap",c?"is-scrollable":"","is-"+this.rootTabs.tabPosition]},[g,t("div",{class:["el-tabs__nav-scroll"],ref:"navScroll"},[t("div",{class:["el-tabs__nav","is-"+this.rootTabs.tabPosition,r&&-1!==["top","bottom"].indexOf(this.rootTabs.tabPosition)?"is-stretch":""],ref:"nav",style:l,attrs:{role:"tablist"},on:{keydown:p}},[i?null:t("tab-bar",{attrs:{tabs:n}}),_])])])},mounted:function(){var t=this;Object(Pe.addResizeListener)(this.$el,this.update),document.addEventListener("visibilitychange",this.visibilityChangeHandler),window.addEventListener("blur",this.windowBlurHandler),window.addEventListener("focus",this.windowFocusHandler),setTimeout(function(){t.scrollToActiveTab()},0)},beforeDestroy:function(){this.$el&&this.update&&Object(Pe.removeResizeListener)(this.$el,this.update),document.removeEventListener("visibilitychange",this.visibilityChangeHandler),window.removeEventListener("blur",this.windowBlurHandler),window.removeEventListener("focus",this.windowFocusHandler)}},void 0,void 0,!1,null,null,null);Sr.options.__file="packages/tabs/src/tab-nav.vue";var kr=o({name:"ElTabs",components:{TabNav:Sr.exports},props:{type:String,activeName:String,closable:Boolean,addable:Boolean,value:{},editable:Boolean,tabPosition:{type:String,default:"top"},beforeLeave:Function,stretch:Boolean},provide:function(){return{rootTabs:this}},data:function(){return{currentName:this.value||this.activeName,panes:[]}},watch:{activeName:function(t){this.setCurrentName(t)},value:function(t){this.setCurrentName(t)},currentName:function(t){var e=this;this.$refs.nav&&this.$nextTick(function(){e.$refs.nav.$nextTick(function(t){e.$refs.nav.scrollToActiveTab()})})}},methods:{calcPaneInstances:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.$slots.default){var i=this.$slots.default.filter(function(t){return t.tag&&t.componentOptions&&"ElTabPane"===t.componentOptions.Ctor.options.name}).map(function(t){return t.componentInstance}),n=!(i.length===this.panes.length&&i.every(function(e,i){return e===t.panes[i]}));(e||n)&&(this.panes=i)}else 0!==this.panes.length&&(this.panes=[])},handleTabClick:function(t,e,i){t.disabled||(this.setCurrentName(e),this.$emit("tab-click",t,i))},handleTabRemove:function(t,e){t.disabled||(e.stopPropagation(),this.$emit("edit",t.name,"remove"),this.$emit("tab-remove",t.name))},handleTabAdd:function(){this.$emit("edit",null,"add"),this.$emit("tab-add")},setCurrentName:function(t){var e=this,i=function(){e.currentName=t,e.$emit("input",t)};if(this.currentName!==t&&this.beforeLeave){var n=this.beforeLeave(t,this.currentName);n&&n.then?n.then(function(){i(),e.$refs.nav&&e.$refs.nav.removeFocus()},function(){}):!1!==n&&i()}else i()}},render:function(t){var e,i=this.type,n=this.handleTabClick,o=this.handleTabRemove,r=this.handleTabAdd,s=this.currentName,a=this.panes,l=this.editable,c=this.addable,u=this.tabPosition,h=this.stretch,p=t("div",{class:["el-tabs__header","is-"+u]},[l||c?t("span",{class:"el-tabs__new-tab",on:{click:r,keydown:function(t){13===t.keyCode&&r()}},attrs:{tabindex:"0"}},[t("i",{class:"el-icon-plus"})]):null,t("tab-nav",{props:{currentName:s,onTabClick:n,onTabRemove:o,editable:l,type:i,panes:a,stretch:h},ref:"nav"})]),d=t("div",{class:"el-tabs__content"},[this.$slots.default]);return t("div",{class:(e={"el-tabs":!0,"el-tabs--card":"card"===i},e["el-tabs--"+u]=!0,e["el-tabs--border-card"]="border-card"===i,e)},["bottom"!==u?[p,d]:[d,p]])},created:function(){this.currentName||this.setCurrentName("0"),this.$on("tab-nav-update",this.calcPaneInstances.bind(null,!0))},mounted:function(){this.calcPaneInstances()},updated:function(){this.calcPaneInstances()}},void 0,void 0,!1,null,null,null);kr.options.__file="packages/tabs/src/tabs.vue";var Or=kr.exports;Or.install=function(t){t.component(Or.name,Or)};var Ir=Or,wr=function(){var t=this,e=t.$createElement,i=t._self._c||e;return!t.lazy||t.loaded||t.active?i("div",{directives:[{name:"show",rawName:"v-show",value:t.active,expression:"active"}],staticClass:"el-tab-pane",attrs:{role:"tabpanel","aria-hidden":!t.active,id:"pane-"+t.paneName,"aria-labelledby":"tab-"+t.paneName}},[t._t("default")],2):t._e()};wr._withStripped=!0;var Rr=o({name:"ElTabPane",componentName:"ElTabPane",props:{label:String,labelContent:Function,name:String,closable:Boolean,disabled:Boolean,lazy:Boolean},data:function(){return{index:null,loaded:!1}},computed:{isClosable:function(){return this.closable||this.$parent.closable},active:function(){var t=this.$parent.currentName===(this.name||this.index);return t&&(this.loaded=!0),t},paneName:function(){return this.name||this.index}},updated:function(){this.$parent.$emit("tab-nav-update")}},wr,[],!1,null,null,null);Rr.options.__file="packages/tabs/src/tab-pane.vue";var Dr=Rr.exports;Dr.install=function(t){t.component(Dr.name,Dr)};var xr=Dr,Mr=o({name:"ElTag",props:{text:String,closable:Boolean,type:String,hit:Boolean,disableTransitions:Boolean,color:String,size:String,effect:{type:String,default:"light",validator:function(t){return-1!==["dark","light","plain"].indexOf(t)}}},methods:{handleClose:function(t){t.stopPropagation(),this.$emit("close",t)},handleClick:function(t){this.$emit("click",t)}},computed:{tagSize:function(){return this.size||(this.$ELEMENT||{}).size}},render:function(t){var e=this.type,i=this.tagSize,n=this.hit,o=this.effect,r=t("span",{class:["el-tag",e?"el-tag--"+e:"",i?"el-tag--"+i:"",o?"el-tag--"+o:"",n&&"is-hit"],style:{backgroundColor:this.color},on:{click:this.handleClick}},[this.$slots.default,this.closable&&t("i",{class:"el-tag__close el-icon-close",on:{click:this.handleClose}})]);return this.disableTransitions?r:t("transition",{attrs:{name:"el-zoom-in-center"}},[r])}},void 0,void 0,!1,null,null,null);Mr.options.__file="packages/tag/src/tag.vue";var Ar=Mr.exports;Ar.install=function(t){t.component(Ar.name,Ar)};var Nr=Ar,Lr=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"el-tree",class:{"el-tree--highlight-current":t.highlightCurrent,"is-dragging":!!t.dragState.draggingNode,"is-drop-not-allow":!t.dragState.allowDrop,"is-drop-inner":"inner"===t.dragState.dropType},attrs:{role:"tree"}},[t._l(t.root.childNodes,function(e){return i("el-tree-node",{key:t.getNodeKey(e),attrs:{node:e,props:t.props,"render-after-expand":t.renderAfterExpand,"show-checkbox":t.showCheckbox,"render-content":t.renderContent},on:{"node-expand":t.handleNodeExpand}})}),t.isEmpty?i("div",{staticClass:"el-tree__empty-block"},[i("span",{staticClass:"el-tree__empty-text"},[t._v(t._s(t.emptyText))])]):t._e(),i("div",{directives:[{name:"show",rawName:"v-show",value:t.dragState.showDropIndicator,expression:"dragState.showDropIndicator"}],ref:"dropIndicator",staticClass:"el-tree__drop-indicator"})],2)};Lr._withStripped=!0;var Pr="$treeNodeId",Br=function(t,e){e&&!e[Pr]&&Object.defineProperty(e,Pr,{value:t.id,enumerable:!1,configurable:!1,writable:!1})},Fr=function(t,e){return t?e[t]:e[Pr]},Hr=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}();var Ur=function(t){for(var e=!0,i=!0,n=!0,o=0,r=t.length;o<r;o++){var s=t[o];(!0!==s.checked||s.indeterminate)&&(e=!1,s.disabled||(n=!1)),(!1!==s.checked||s.indeterminate)&&(i=!1)}return{all:e,none:i,allWithoutDisable:n,half:!e&&!i}},Vr=function t(e){if(0!==e.childNodes.length){var i=Ur(e.childNodes),n=i.all,o=i.none,r=i.half;n?(e.checked=!0,e.indeterminate=!1):r?(e.checked=!1,e.indeterminate=!0):o&&(e.checked=!1,e.indeterminate=!1);var s=e.parent;s&&0!==s.level&&(e.store.checkStrictly||t(s))}},Gr=function(t,e){var i=t.store.props,n=t.data||{},o=i[e];if("function"==typeof o)return o(n,t);if("string"==typeof o)return n[o];if(void 0===o){var r=n[e];return void 0===r?"":r}},Wr=0,$r=function(){function t(e){for(var i in function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=Wr++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,this.isCurrent=!1,e)e.hasOwnProperty(i)&&(this[i]=e[i]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1);var n=this.store;if(!n)throw new Error("[Node]store is required!");n.registerNode(this);var o=n.props;if(o&&void 0!==o.isLeaf){var r=Gr(this,"isLeaf");"boolean"==typeof r&&(this.isLeafByUser=r)}if(!0!==n.lazy&&this.data?(this.setData(this.data),n.defaultExpandAll&&(this.expanded=!0)):this.level>0&&n.lazy&&n.defaultExpandAll&&this.expand(),Array.isArray(this.data)||Br(this,this.data),this.data){var s=n.defaultExpandedKeys,a=n.key;a&&s&&-1!==s.indexOf(this.key)&&this.expand(null,n.autoExpandParent),a&&void 0!==n.currentNodeKey&&this.key===n.currentNodeKey&&(n.currentNode=this,n.currentNode.isCurrent=!0),n.lazy&&n._initDefaultCheckedNode(this),this.updateLeafState()}}return t.prototype.setData=function(t){Array.isArray(t)||Br(this,t),this.data=t,this.childNodes=[];for(var e=void 0,i=0,n=(e=0===this.level&&this.data instanceof Array?this.data:Gr(this,"children")||[]).length;i<n;i++)this.insertChild({data:e[i]})},t.prototype.contains=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return function i(n){for(var o=n.childNodes||[],r=!1,s=0,a=o.length;s<a;s++){var l=o[s];if(l===t||e&&i(l)){r=!0;break}}return r}(this)},t.prototype.remove=function(){var t=this.parent;t&&t.removeChild(this)},t.prototype.insertChild=function(e,i,n){if(!e)throw new Error("insertChild error: child is required.");if(!(e instanceof t)){if(!n){var o=this.getChildren(!0);-1===o.indexOf(e.data)&&(void 0===i||i<0?o.push(e.data):o.splice(i,0,e.data))}Vt()(e,{parent:this,store:this.store}),e=new t(e)}e.level=this.level+1,void 0===i||i<0?this.childNodes.push(e):this.childNodes.splice(i,0,e),this.updateLeafState()},t.prototype.insertBefore=function(t,e){var i=void 0;e&&(i=this.childNodes.indexOf(e)),this.insertChild(t,i)},t.prototype.insertAfter=function(t,e){var i=void 0;e&&-1!==(i=this.childNodes.indexOf(e))&&(i+=1),this.insertChild(t,i)},t.prototype.removeChild=function(t){var e=this.getChildren()||[],i=e.indexOf(t.data);i>-1&&e.splice(i,1);var n=this.childNodes.indexOf(t);n>-1&&(this.store&&this.store.deregisterNode(t),t.parent=null,this.childNodes.splice(n,1)),this.updateLeafState()},t.prototype.removeChildByData=function(t){for(var e=null,i=0;i<this.childNodes.length;i++)if(this.childNodes[i].data===t){e=this.childNodes[i];break}e&&this.removeChild(e)},t.prototype.expand=function(t,e){var i=this,n=function(){if(e)for(var n=i.parent;n.level>0;)n.expanded=!0,n=n.parent;i.expanded=!0,t&&t()};this.shouldLoadData()?this.loadData(function(t){t instanceof Array&&(i.checked?i.setChecked(!0,!0):i.store.checkStrictly||Vr(i),n())}):n()},t.prototype.doCreateChildren=function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.forEach(function(t){e.insertChild(Vt()({data:t},i),void 0,!0)})},t.prototype.collapse=function(){this.expanded=!1},t.prototype.shouldLoadData=function(){return!0===this.store.lazy&&this.store.load&&!this.loaded},t.prototype.updateLeafState=function(){if(!0!==this.store.lazy||!0===this.loaded||void 0===this.isLeafByUser){var t=this.childNodes;!this.store.lazy||!0===this.store.lazy&&!0===this.loaded?this.isLeaf=!t||0===t.length:this.isLeaf=!1}else this.isLeaf=this.isLeafByUser},t.prototype.setChecked=function(t,e,i,n){var o=this;if(this.indeterminate="half"===t,this.checked=!0===t,!this.store.checkStrictly){if(!this.shouldLoadData()||this.store.checkDescendants){var r=Ur(this.childNodes),s=r.all,a=r.allWithoutDisable;this.isLeaf||s||!a||(this.checked=!1,t=!1);var l=function(){if(e){for(var i=o.childNodes,r=0,s=i.length;r<s;r++){var a=i[r];n=n||!1!==t;var l=a.disabled?a.checked:n;a.setChecked(l,e,!0,n)}var c=Ur(i),u=c.half,h=c.all;h||(o.checked=h,o.indeterminate=u)}};if(this.shouldLoadData())return void this.loadData(function(){l(),Vr(o)},{checked:!1!==t});l()}var c=this.parent;c&&0!==c.level&&(i||Vr(c))}},t.prototype.getChildren=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(0===this.level)return this.data;var e=this.data;if(!e)return null;var i=this.store.props,n="children";return i&&(n=i.children||"children"),void 0===e[n]&&(e[n]=null),t&&!e[n]&&(e[n]=[]),e[n]},t.prototype.updateChildren=function(){var t=this,e=this.getChildren()||[],i=this.childNodes.map(function(t){return t.data}),n={},o=[];e.forEach(function(t,e){var r=t[Pr];!!r&&Object(g.arrayFindIndex)(i,function(t){return t[Pr]===r})>=0?n[r]={index:e,data:t}:o.push({index:e,data:t})}),this.store.lazy||i.forEach(function(e){n[e[Pr]]||t.removeChildByData(e)}),o.forEach(function(e){var i=e.index,n=e.data;t.insertChild({data:n},i)}),this.updateLeafState()},t.prototype.loadData=function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!0!==this.store.lazy||!this.store.load||this.loaded||this.loading&&!Object.keys(i).length)t&&t.call(this);else{this.loading=!0;this.store.load(this,function(n){e.loaded=!0,e.loading=!1,e.childNodes=[],e.doCreateChildren(n,i),e.updateLeafState(),t&&t.call(e,n)})}},Hr(t,[{key:"label",get:function(){return Gr(this,"label")}},{key:"key",get:function(){var t=this.store.key;return this.data?this.data[t]:null}},{key:"disabled",get:function(){return Gr(this,"disabled")}},{key:"nextSibling",get:function(){var t=this.parent;if(t){var e=t.childNodes.indexOf(this);if(e>-1)return t.childNodes[e+1]}return null}},{key:"previousSibling",get:function(){var t=this.parent;if(t){var e=t.childNodes.indexOf(this);if(e>-1)return e>0?t.childNodes[e-1]:null}return null}}]),t}(),jr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};var zr=function(){function t(e){var i=this;for(var n in function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.currentNode=null,this.currentNodeKey=null,e)e.hasOwnProperty(n)&&(this[n]=e[n]);(this.nodesMap={},this.root=new $r({data:this.data,store:this}),this.lazy&&this.load)?(0,this.load)(this.root,function(t){i.root.doCreateChildren(t),i._initDefaultCheckedNodes()}):this._initDefaultCheckedNodes()}return t.prototype.filter=function(t){var e=this.filterNodeMethod,i=this.lazy;!function n(o){var r=o.root?o.root.childNodes:o.childNodes;if(r.forEach(function(i){i.visible=e.call(i,t,i.data,i),n(i)}),!o.visible&&r.length){var s;s=!r.some(function(t){return t.visible}),o.root?o.root.visible=!1===s:o.visible=!1===s}t&&(!o.visible||o.isLeaf||i||o.expand())}(this)},t.prototype.setData=function(t){t!==this.root.data?(this.root.setData(t),this._initDefaultCheckedNodes()):this.root.updateChildren()},t.prototype.getNode=function(t){if(t instanceof $r)return t;var e="object"!==(void 0===t?"undefined":jr(t))?t:Fr(this.key,t);return this.nodesMap[e]||null},t.prototype.insertBefore=function(t,e){var i=this.getNode(e);i.parent.insertBefore({data:t},i)},t.prototype.insertAfter=function(t,e){var i=this.getNode(e);i.parent.insertAfter({data:t},i)},t.prototype.remove=function(t){var e=this.getNode(t);e&&e.parent&&(e===this.currentNode&&(this.currentNode=null),e.parent.removeChild(e))},t.prototype.append=function(t,e){var i=e?this.getNode(e):this.root;i&&i.insertChild({data:t})},t.prototype._initDefaultCheckedNodes=function(){var t=this,e=this.defaultCheckedKeys||[],i=this.nodesMap;e.forEach(function(e){var n=i[e];n&&n.setChecked(!0,!t.checkStrictly)})},t.prototype._initDefaultCheckedNode=function(t){-1!==(this.defaultCheckedKeys||[]).indexOf(t.key)&&t.setChecked(!0,!this.checkStrictly)},t.prototype.setDefaultCheckedKey=function(t){t!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=t,this._initDefaultCheckedNodes())},t.prototype.registerNode=function(t){this.key&&t&&t.data&&(void 0!==t.key&&(this.nodesMap[t.key]=t))},t.prototype.deregisterNode=function(t){var e=this;this.key&&t&&t.data&&(t.childNodes.forEach(function(t){e.deregisterNode(t)}),delete this.nodesMap[t.key])},t.prototype.getCheckedNodes=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=[];return function n(o){(o.root?o.root.childNodes:o.childNodes).forEach(function(o){(o.checked||e&&o.indeterminate)&&(!t||t&&o.isLeaf)&&i.push(o.data),n(o)})}(this),i},t.prototype.getCheckedKeys=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.getCheckedNodes(e).map(function(e){return(e||{})[t.key]})},t.prototype.getHalfCheckedNodes=function(){var t=[];return function e(i){(i.root?i.root.childNodes:i.childNodes).forEach(function(i){i.indeterminate&&t.push(i.data),e(i)})}(this),t},t.prototype.getHalfCheckedKeys=function(){var t=this;return this.getHalfCheckedNodes().map(function(e){return(e||{})[t.key]})},t.prototype._getAllNodes=function(){var t=[],e=this.nodesMap;for(var i in e)e.hasOwnProperty(i)&&t.push(e[i]);return t},t.prototype.updateChildren=function(t,e){var i=this.nodesMap[t];if(i){for(var n=i.childNodes,o=n.length-1;o>=0;o--){var r=n[o];this.remove(r.data)}for(var s=0,a=e.length;s<a;s++){var l=e[s];this.append(l,i.data)}}},t.prototype._setCheckedKeys=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments[2],n=this._getAllNodes().sort(function(t,e){return e.level-t.level}),o=Object.create(null),r=Object.keys(i);n.forEach(function(t){return t.setChecked(!1,!1)});for(var s=0,a=n.length;s<a;s++){var l=n[s],c=l.data[t].toString();if(r.indexOf(c)>-1){for(var u=l.parent;u&&u.level>0;)o[u.data[t]]=!0,u=u.parent;l.isLeaf||this.checkStrictly?l.setChecked(!0,!1):(l.setChecked(!0,!0),e&&function(){l.setChecked(!1,!1);!function t(e){e.childNodes.forEach(function(e){e.isLeaf||e.setChecked(!1,!1),t(e)})}(l)}())}else l.checked&&!o[c]&&l.setChecked(!1,!1)}},t.prototype.setCheckedNodes=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.key,n={};t.forEach(function(t){n[(t||{})[i]]=!0}),this._setCheckedKeys(i,e,n)},t.prototype.setCheckedKeys=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.defaultCheckedKeys=t;var i=this.key,n={};t.forEach(function(t){n[t]=!0}),this._setCheckedKeys(i,e,n)},t.prototype.setDefaultExpandedKeys=function(t){var e=this;t=t||[],this.defaultExpandedKeys=t,t.forEach(function(t){var i=e.getNode(t);i&&i.expand(null,e.autoExpandParent)})},t.prototype.setChecked=function(t,e,i){var n=this.getNode(t);n&&n.setChecked(!!e,i)},t.prototype.getCurrentNode=function(){return this.currentNode},t.prototype.setCurrentNode=function(t){var e=this.currentNode;e&&(e.isCurrent=!1),this.currentNode=t,this.currentNode.isCurrent=!0},t.prototype.setUserCurrentNode=function(t){var e=t[this.key],i=this.nodesMap[e];this.setCurrentNode(i)},t.prototype.setCurrentNodeKey=function(t){if(null===t||void 0===t)return this.currentNode&&(this.currentNode.isCurrent=!1),void(this.currentNode=null);var e=this.getNode(t);e&&this.setCurrentNode(e)},t}(),Xr=function(){var t=this,e=this,i=e.$createElement,n=e._self._c||i;return n("div",{directives:[{name:"show",rawName:"v-show",value:e.node.visible,expression:"node.visible"}],ref:"node",staticClass:"el-tree-node",class:{"is-expanded":e.expanded,"is-current":e.node.isCurrent,"is-hidden":!e.node.visible,"is-focusable":!e.node.disabled,"is-checked":!e.node.disabled&&e.node.checked},attrs:{role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.node.disabled,"aria-checked":e.node.checked,draggable:e.tree.draggable},on:{click:function(t){return t.stopPropagation(),e.handleClick(t)},contextmenu:function(e){return t.handleContextMenu(e)},dragstart:function(t){return t.stopPropagation(),e.handleDragStart(t)},dragover:function(t){return t.stopPropagation(),e.handleDragOver(t)},dragend:function(t){return t.stopPropagation(),e.handleDragEnd(t)},drop:function(t){return t.stopPropagation(),e.handleDrop(t)}}},[n("div",{staticClass:"el-tree-node__content",style:{"padding-left":(e.node.level-1)*e.tree.indent+"px"}},[n("span",{class:[{"is-leaf":e.node.isLeaf,expanded:!e.node.isLeaf&&e.expanded},"el-tree-node__expand-icon",e.tree.iconClass?e.tree.iconClass:"el-icon-caret-right"],on:{click:function(t){return t.stopPropagation(),e.handleExpandIconClick(t)}}}),e.showCheckbox?n("el-checkbox",{attrs:{indeterminate:e.node.indeterminate,disabled:!!e.node.disabled},on:{change:e.handleCheckChange},nativeOn:{click:function(t){t.stopPropagation()}},model:{value:e.node.checked,callback:function(t){e.$set(e.node,"checked",t)},expression:"node.checked"}}):e._e(),e.node.loading?n("span",{staticClass:"el-tree-node__loading-icon el-icon-loading"}):e._e(),n("node-content",{attrs:{node:e.node}})],1),n("el-collapse-transition",[!e.renderAfterExpand||e.childNodeRendered?n("div",{directives:[{name:"show",rawName:"v-show",value:e.expanded,expression:"expanded"}],staticClass:"el-tree-node__children",attrs:{role:"group","aria-expanded":e.expanded}},e._l(e.node.childNodes,function(t){return n("el-tree-node",{key:e.getNodeKey(t),attrs:{"render-content":e.renderContent,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,node:t},on:{"node-expand":e.handleChildNodeExpand}})}),1):e._e()])],1)};Xr._withStripped=!0;var Yr=o({name:"ElTreeNode",componentName:"ElTreeNode",mixins:[S.a],props:{node:{default:function(){return{}}},props:{},renderContent:Function,renderAfterExpand:{type:Boolean,default:!0},showCheckbox:{type:Boolean,default:!1}},components:{ElCollapseTransition:yt.a,ElCheckbox:ni.a,NodeContent:{props:{node:{required:!0}},render:function(t){var e=this.$parent,i=e.tree,n=this.node,o=n.data,r=n.store;return e.renderContent?e.renderContent.call(e._renderProxy,t,{_self:i.$vnode.context,node:n,data:o,store:r}):i.$scopedSlots.default?i.$scopedSlots.default({node:n,data:o}):t("span",{class:"el-tree-node__label"},[n.label])}}},data:function(){return{tree:null,expanded:!1,childNodeRendered:!1,oldChecked:null,oldIndeterminate:null}},watch:{"node.indeterminate":function(t){this.handleSelectChange(this.node.checked,t)},"node.checked":function(t){this.handleSelectChange(t,this.node.indeterminate)},"node.expanded":function(t){var e=this;this.$nextTick(function(){return e.expanded=t}),t&&(this.childNodeRendered=!0)}},methods:{getNodeKey:function(t){return Fr(this.tree.nodeKey,t.data)},handleSelectChange:function(t,e){this.oldChecked!==t&&this.oldIndeterminate!==e&&this.tree.$emit("check-change",this.node.data,t,e),this.oldChecked=t,this.indeterminate=e},handleClick:function(){var t=this.tree.store;t.setCurrentNode(this.node),this.tree.$emit("current-change",t.currentNode?t.currentNode.data:null,t.currentNode),this.tree.currentNode=this,this.tree.expandOnClickNode&&this.handleExpandIconClick(),this.tree.checkOnClickNode&&!this.node.disabled&&this.handleCheckChange(null,{target:{checked:!this.node.checked}}),this.tree.$emit("node-click",this.node.data,this.node,this)},handleContextMenu:function(t){this.tree._events["node-contextmenu"]&&this.tree._events["node-contextmenu"].length>0&&(t.stopPropagation(),t.preventDefault()),this.tree.$emit("node-contextmenu",t,this.node.data,this.node,this)},handleExpandIconClick:function(){this.node.isLeaf||(this.expanded?(this.tree.$emit("node-collapse",this.node.data,this.node,this),this.node.collapse()):(this.node.expand(),this.$emit("node-expand",this.node.data,this.node,this)))},handleCheckChange:function(t,e){var i=this;this.node.setChecked(e.target.checked,!this.tree.checkStrictly),this.$nextTick(function(){var t=i.tree.store;i.tree.$emit("check",i.node.data,{checkedNodes:t.getCheckedNodes(),checkedKeys:t.getCheckedKeys(),halfCheckedNodes:t.getHalfCheckedNodes(),halfCheckedKeys:t.getHalfCheckedKeys()})})},handleChildNodeExpand:function(t,e,i){this.broadcast("ElTreeNode","tree-node-expand",e),this.tree.$emit("node-expand",t,e,i)},handleDragStart:function(t){this.tree.draggable&&this.tree.$emit("tree-node-drag-start",t,this)},handleDragOver:function(t){this.tree.draggable&&(this.tree.$emit("tree-node-drag-over",t,this),t.preventDefault())},handleDrop:function(t){t.preventDefault()},handleDragEnd:function(t){this.tree.draggable&&this.tree.$emit("tree-node-drag-end",t,this)}},created:function(){var t=this,e=this.$parent;e.isTree?this.tree=e:this.tree=e.tree;var i=this.tree;i||console.warn("Can not find node's tree.");var n=(i.props||{}).children||"children";this.$watch("node.data."+n,function(){t.node.updateChildren()}),this.node.expanded&&(this.expanded=!0,this.childNodeRendered=!0),this.tree.accordion&&this.$on("tree-node-expand",function(e){t.node!==e&&t.node.collapse()})}},Xr,[],!1,null,null,null);Yr.options.__file="packages/tree/src/tree-node.vue";var Kr=Yr.exports,Jr=o({name:"ElTree",mixins:[S.a],components:{ElTreeNode:Kr},data:function(){return{store:null,root:null,currentNode:null,treeItems:null,checkboxItems:[],dragState:{showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0}}},props:{data:{type:Array},emptyText:{type:String,default:function(){return Object(Lo.t)("el.tree.emptyText")}},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkDescendants:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:Array,defaultExpandedKeys:Array,currentNodeKey:[String,Number],renderContent:Function,showCheckbox:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},allowDrag:Function,allowDrop:Function,props:{default:function(){return{children:"children",label:"label",disabled:"disabled"}}},lazy:{type:Boolean,default:!1},highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:18},iconClass:String},computed:{children:{set:function(t){this.data=t},get:function(){return this.data}},treeItemArray:function(){return Array.prototype.slice.call(this.treeItems)},isEmpty:function(){var t=this.root.childNodes;return!t||0===t.length||t.every(function(t){return!t.visible})}},watch:{defaultCheckedKeys:function(t){this.store.setDefaultCheckedKey(t)},defaultExpandedKeys:function(t){this.store.defaultExpandedKeys=t,this.store.setDefaultExpandedKeys(t)},data:function(t){this.store.setData(t)},checkboxItems:function(t){Array.prototype.forEach.call(t,function(t){t.setAttribute("tabindex",-1)})},checkStrictly:function(t){this.store.checkStrictly=t}},methods:{filter:function(t){if(!this.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");this.store.filter(t)},getNodeKey:function(t){return Fr(this.nodeKey,t.data)},getNodePath:function(t){if(!this.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");var e=this.store.getNode(t);if(!e)return[];for(var i=[e.data],n=e.parent;n&&n!==this.root;)i.push(n.data),n=n.parent;return i.reverse()},getCheckedNodes:function(t,e){return this.store.getCheckedNodes(t,e)},getCheckedKeys:function(t){return this.store.getCheckedKeys(t)},getCurrentNode:function(){var t=this.store.getCurrentNode();return t?t.data:null},getCurrentKey:function(){if(!this.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");var t=this.getCurrentNode();return t?t[this.nodeKey]:null},setCheckedNodes:function(t,e){if(!this.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");this.store.setCheckedNodes(t,e)},setCheckedKeys:function(t,e){if(!this.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");this.store.setCheckedKeys(t,e)},setChecked:function(t,e,i){this.store.setChecked(t,e,i)},getHalfCheckedNodes:function(){return this.store.getHalfCheckedNodes()},getHalfCheckedKeys:function(){return this.store.getHalfCheckedKeys()},setCurrentNode:function(t){if(!this.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");this.store.setUserCurrentNode(t)},setCurrentKey:function(t){if(!this.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");this.store.setCurrentNodeKey(t)},getNode:function(t){return this.store.getNode(t)},remove:function(t){this.store.remove(t)},append:function(t,e){this.store.append(t,e)},insertBefore:function(t,e){this.store.insertBefore(t,e)},insertAfter:function(t,e){this.store.insertAfter(t,e)},handleNodeExpand:function(t,e,i){this.broadcast("ElTreeNode","tree-node-expand",e),this.$emit("node-expand",t,e,i)},updateKeyChildren:function(t,e){if(!this.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");this.store.updateChildren(t,e)},initTabIndex:function(){this.treeItems=this.$el.querySelectorAll(".is-focusable[role=treeitem]"),this.checkboxItems=this.$el.querySelectorAll("input[type=checkbox]");var t=this.$el.querySelectorAll(".is-checked[role=treeitem]");t.length?t[0].setAttribute("tabindex",0):this.treeItems[0]&&this.treeItems[0].setAttribute("tabindex",0)},handleKeydown:function(t){var e=t.target;if(-1!==e.className.indexOf("el-tree-node")){var i=t.keyCode;this.treeItems=this.$el.querySelectorAll(".is-focusable[role=treeitem]");var n=this.treeItemArray.indexOf(e),o=void 0;[38,40].indexOf(i)>-1&&(t.preventDefault(),o=38===i?0!==n?n-1:0:n<this.treeItemArray.length-1?n+1:0,this.treeItemArray[o].focus()),[37,39].indexOf(i)>-1&&(t.preventDefault(),e.click());var r=e.querySelector('[type="checkbox"]');[13,32].indexOf(i)>-1&&r&&(t.preventDefault(),r.click())}}},created:function(){var t=this;this.isTree=!0,this.store=new zr({key:this.nodeKey,data:this.data,lazy:this.lazy,props:this.props,load:this.load,currentNodeKey:this.currentNodeKey,checkStrictly:this.checkStrictly,checkDescendants:this.checkDescendants,defaultCheckedKeys:this.defaultCheckedKeys,defaultExpandedKeys:this.defaultExpandedKeys,autoExpandParent:this.autoExpandParent,defaultExpandAll:this.defaultExpandAll,filterNodeMethod:this.filterNodeMethod}),this.root=this.store.root;var e=this.dragState;this.$on("tree-node-drag-start",function(i,n){if("function"==typeof t.allowDrag&&!t.allowDrag(n.node))return i.preventDefault(),!1;i.dataTransfer.effectAllowed="move";try{i.dataTransfer.setData("text/plain","")}catch(t){}e.draggingNode=n,t.$emit("node-drag-start",n.node,i)}),this.$on("tree-node-drag-over",function(i,n){var o=function(t,e){for(var i=t;i&&"BODY"!==i.tagName;){if(i.__vue__&&i.__vue__.$options.name===e)return i.__vue__;i=i.parentNode}return null}(i.target,"ElTreeNode"),r=e.dropNode;r&&r!==o&&Object(ft.removeClass)(r.$el,"is-drop-inner");var s=e.draggingNode;if(s&&o){var a=!0,l=!0,c=!0,u=!0;"function"==typeof t.allowDrop&&(a=t.allowDrop(s.node,o.node,"prev"),u=l=t.allowDrop(s.node,o.node,"inner"),c=t.allowDrop(s.node,o.node,"next")),i.dataTransfer.dropEffect=l?"move":"none",(a||l||c)&&r!==o&&(r&&t.$emit("node-drag-leave",s.node,r.node,i),t.$emit("node-drag-enter",s.node,o.node,i)),(a||l||c)&&(e.dropNode=o),o.node.nextSibling===s.node&&(c=!1),o.node.previousSibling===s.node&&(a=!1),o.node.contains(s.node,!1)&&(l=!1),(s.node===o.node||s.node.contains(o.node))&&(a=!1,l=!1,c=!1);var h=o.$el.getBoundingClientRect(),p=t.$el.getBoundingClientRect(),d=void 0,f=a?l?.25:c?.45:1:-1,g=c?l?.75:a?.55:0:1,_=-9999,m=i.clientY-h.top;d=m<h.height*f?"before":m>h.height*g?"after":l?"inner":"none";var v=o.$el.querySelector(".el-tree-node__expand-icon").getBoundingClientRect(),y=t.$refs.dropIndicator;"before"===d?_=v.top-p.top:"after"===d&&(_=v.bottom-p.top),y.style.top=_+"px",y.style.left=v.right-p.left+"px","inner"===d?Object(ft.addClass)(o.$el,"is-drop-inner"):Object(ft.removeClass)(o.$el,"is-drop-inner"),e.showDropIndicator="before"===d||"after"===d,e.allowDrop=e.showDropIndicator||u,e.dropType=d,t.$emit("node-drag-over",s.node,o.node,i)}}),this.$on("tree-node-drag-end",function(i){var n=e.draggingNode,o=e.dropType,r=e.dropNode;if(i.preventDefault(),i.dataTransfer.dropEffect="move",n&&r){var s={data:n.node.data};"none"!==o&&n.node.remove(),"before"===o?r.node.parent.insertBefore(s,r.node):"after"===o?r.node.parent.insertAfter(s,r.node):"inner"===o&&r.node.insertChild(s),"none"!==o&&t.store.registerNode(s),Object(ft.removeClass)(r.$el,"is-drop-inner"),t.$emit("node-drag-end",n.node,r.node,o,i),"none"!==o&&t.$emit("node-drop",n.node,r.node,o,i)}n&&!r&&t.$emit("node-drag-end",n.node,null,o,i),e.showDropIndicator=!1,e.draggingNode=null,e.dropNode=null,e.allowDrop=!0})},mounted:function(){this.initTabIndex(),this.$el.addEventListener("keydown",this.handleKeydown)},updated:function(){this.treeItems=this.$el.querySelectorAll("[role=treeitem]"),this.checkboxItems=this.$el.querySelectorAll("input[type=checkbox]")}},Lr,[],!1,null,null,null);Jr.options.__file="packages/tree/src/tree.vue";var qr=Jr.exports;qr.install=function(t){t.component(qr.name,qr)};var Zr=qr,Qr=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"el-alert-fade"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"el-alert",class:[t.typeClass,t.center?"is-center":"","is-"+t.effect],attrs:{role:"alert"}},[t.showIcon?i("i",{staticClass:"el-alert__icon",class:[t.iconClass,t.isBigIcon]}):t._e(),i("div",{staticClass:"el-alert__content"},[t.title||t.$slots.title?i("span",{staticClass:"el-alert__title",class:[t.isBoldTitle]},[t._t("title",[t._v(t._s(t.title))])],2):t._e(),t.$slots.default&&!t.description?i("p",{staticClass:"el-alert__description"},[t._t("default")],2):t._e(),t.description&&!t.$slots.default?i("p",{staticClass:"el-alert__description"},[t._v(t._s(t.description))]):t._e(),i("i",{directives:[{name:"show",rawName:"v-show",value:t.closable,expression:"closable"}],staticClass:"el-alert__closebtn",class:{"is-customed":""!==t.closeText,"el-icon-close":""===t.closeText},on:{click:function(e){t.close()}}},[t._v(t._s(t.closeText))])])])])};Qr._withStripped=!0;var ts={success:"el-icon-success",warning:"el-icon-warning",error:"el-icon-error"},es=o({name:"ElAlert",props:{title:{type:String,default:""},description:{type:String,default:""},type:{type:String,default:"info"},closable:{type:Boolean,default:!0},closeText:{type:String,default:""},showIcon:Boolean,center:Boolean,effect:{type:String,default:"light",validator:function(t){return-1!==["light","dark"].indexOf(t)}}},data:function(){return{visible:!0}},methods:{close:function(){this.visible=!1,this.$emit("close")}},computed:{typeClass:function(){return"el-alert--"+this.type},iconClass:function(){return ts[this.type]||"el-icon-info"},isBigIcon:function(){return this.description||this.$slots.default?"is-big":""},isBoldTitle:function(){return this.description||this.$slots.default?"is-bold":""}}},Qr,[],!1,null,null,null);es.options.__file="packages/alert/src/main.vue";var is=es.exports;is.install=function(t){t.component(is.name,is)};var ns=is,os=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"el-notification-fade"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],class:["el-notification",t.customClass,t.horizontalClass],style:t.positionStyle,attrs:{role:"alert"},on:{mouseenter:function(e){t.clearTimer()},mouseleave:function(e){t.startTimer()},click:t.click}},[t.type||t.iconClass?i("i",{staticClass:"el-notification__icon",class:[t.typeClass,t.iconClass]}):t._e(),i("div",{staticClass:"el-notification__group",class:{"is-with-icon":t.typeClass||t.iconClass}},[i("h2",{staticClass:"el-notification__title",domProps:{textContent:t._s(t.title)}}),i("div",{directives:[{name:"show",rawName:"v-show",value:t.message,expression:"message"}],staticClass:"el-notification__content"},[t._t("default",[t.dangerouslyUseHTMLString?i("p",{domProps:{innerHTML:t._s(t.message)}}):i("p",[t._v(t._s(t.message))])])],2),t.showClose?i("div",{staticClass:"el-notification__closeBtn el-icon-close",on:{click:function(e){return e.stopPropagation(),t.close(e)}}}):t._e()])])])};os._withStripped=!0;var rs={success:"success",info:"info",warning:"warning",error:"error"},ss=o({data:function(){return{visible:!1,title:"",message:"",duration:4500,type:"",showClose:!0,customClass:"",iconClass:"",onClose:null,onClick:null,closed:!1,verticalOffset:0,timer:null,dangerouslyUseHTMLString:!1,position:"top-right"}},computed:{typeClass:function(){return this.type&&rs[this.type]?"el-icon-"+rs[this.type]:""},horizontalClass:function(){return this.position.indexOf("right")>-1?"right":"left"},verticalProperty:function(){return/^top-/.test(this.position)?"top":"bottom"},positionStyle:function(){var t;return(t={})[this.verticalProperty]=this.verticalOffset+"px",t}},watch:{closed:function(t){t&&(this.visible=!1,this.$el.addEventListener("transitionend",this.destroyElement))}},methods:{destroyElement:function(){this.$el.removeEventListener("transitionend",this.destroyElement),this.$destroy(!0),this.$el.parentNode.removeChild(this.$el)},click:function(){"function"==typeof this.onClick&&this.onClick()},close:function(){this.closed=!0,"function"==typeof this.onClose&&this.onClose()},clearTimer:function(){clearTimeout(this.timer)},startTimer:function(){var t=this;this.duration>0&&(this.timer=setTimeout(function(){t.closed||t.close()},this.duration))},keydown:function(t){46===t.keyCode||8===t.keyCode?this.clearTimer():27===t.keyCode?this.closed||this.close():this.startTimer()}},mounted:function(){var t=this;this.duration>0&&(this.timer=setTimeout(function(){t.closed||t.close()},this.duration)),document.addEventListener("keydown",this.keydown)},beforeDestroy:function(){document.removeEventListener("keydown",this.keydown)}},os,[],!1,null,null,null);ss.options.__file="packages/notification/src/main.vue";var as=ss.exports,ls=ui.a.extend(as),cs=void 0,us=[],hs=1,ps=function t(e){if(!ui.a.prototype.$isServer){var i=(e=Vt()({},e)).onClose,n="notification_"+hs++,o=e.position||"top-right";e.onClose=function(){t.close(n,i)},cs=new ls({data:e}),Object(Wo.isVNode)(e.message)&&(cs.$slots.default=[e.message],e.message="REPLACED_BY_VNODE"),cs.id=n,cs.$mount(),document.body.appendChild(cs.$el),cs.visible=!0,cs.dom=cs.$el,cs.dom.style.zIndex=y.PopupManager.nextZIndex();var r=e.offset||0;return us.filter(function(t){return t.position===o}).forEach(function(t){r+=t.$el.offsetHeight+16}),r+=16,cs.verticalOffset=r,us.push(cs),cs}};["success","warning","info","error"].forEach(function(t){ps[t]=function(e){return("string"==typeof e||Object(Wo.isVNode)(e))&&(e={message:e}),e.type=t,ps(e)}}),ps.close=function(t,e){var i=-1,n=us.length,o=us.filter(function(e,n){return e.id===t&&(i=n,!0)})[0];if(o&&("function"==typeof e&&e(o),us.splice(i,1),!(n<=1)))for(var r=o.position,s=o.dom.offsetHeight,a=i;a<n-1;a++)us[a].position===r&&(us[a].dom.style[o.verticalProperty]=parseInt(us[a].dom.style[o.verticalProperty],10)-s-16+"px")},ps.closeAll=function(){for(var t=us.length-1;t>=0;t--)us[t].close()};var ds=ps,fs=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"el-slider",class:{"is-vertical":t.vertical,"el-slider--with-input":t.showInput},attrs:{role:"slider","aria-valuemin":t.min,"aria-valuemax":t.max,"aria-orientation":t.vertical?"vertical":"horizontal","aria-disabled":t.sliderDisabled}},[t.showInput&&!t.range?i("el-input-number",{ref:"input",staticClass:"el-slider__input",attrs:{step:t.step,disabled:t.sliderDisabled,controls:t.showInputControls,min:t.min,max:t.max,debounce:t.debounce,size:t.inputSize},on:{change:t.emitChange},model:{value:t.firstValue,callback:function(e){t.firstValue=e},expression:"firstValue"}}):t._e(),i("div",{ref:"slider",staticClass:"el-slider__runway",class:{"show-input":t.showInput,disabled:t.sliderDisabled},style:t.runwayStyle,on:{click:t.onSliderClick}},[i("div",{staticClass:"el-slider__bar",style:t.barStyle}),i("slider-button",{ref:"button1",attrs:{vertical:t.vertical,"tooltip-class":t.tooltipClass},model:{value:t.firstValue,callback:function(e){t.firstValue=e},expression:"firstValue"}}),t.range?i("slider-button",{ref:"button2",attrs:{vertical:t.vertical,"tooltip-class":t.tooltipClass},model:{value:t.secondValue,callback:function(e){t.secondValue=e},expression:"secondValue"}}):t._e(),t._l(t.stops,function(e,n){return t.showStops?i("div",{key:n,staticClass:"el-slider__stop",style:t.getStopStyle(e)}):t._e()}),t.markList.length>0?[i("div",t._l(t.markList,function(e,n){return i("div",{key:n,staticClass:"el-slider__stop el-slider__marks-stop",style:t.getStopStyle(e.position)})}),0),i("div",{staticClass:"el-slider__marks"},t._l(t.markList,function(e,n){return i("slider-marker",{key:n,style:t.getStopStyle(e.position),attrs:{mark:e.mark}})}),1)]:t._e()],2)],1)};fs._withStripped=!0;var gs=i(41),_s=i.n(gs),ms=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{ref:"button",staticClass:"el-slider__button-wrapper",class:{hover:t.hovering,dragging:t.dragging},style:t.wrapperStyle,attrs:{tabindex:"0"},on:{mouseenter:t.handleMouseEnter,mouseleave:t.handleMouseLeave,mousedown:t.onButtonDown,touchstart:t.onButtonDown,focus:t.handleMouseEnter,blur:t.handleMouseLeave,keydown:[function(e){return"button"in e||!t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?"button"in e&&0!==e.button?null:t.onLeftKeyDown(e):null},function(e){return"button"in e||!t._k(e.keyCode,"right",39,e.key,["Right","ArrowRight"])?"button"in e&&2!==e.button?null:t.onRightKeyDown(e):null},function(e){return"button"in e||!t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?(e.preventDefault(),t.onLeftKeyDown(e)):null},function(e){return"button"in e||!t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?(e.preventDefault(),t.onRightKeyDown(e)):null}]}},[i("el-tooltip",{ref:"tooltip",attrs:{placement:"top","popper-class":t.tooltipClass,disabled:!t.showTooltip}},[i("span",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(t.formatValue))]),i("div",{staticClass:"el-slider__button",class:{hover:t.hovering,dragging:t.dragging}})])],1)};ms._withStripped=!0;var vs=o({name:"ElSliderButton",components:{ElTooltip:It.a},props:{value:{type:Number,default:0},vertical:{type:Boolean,default:!1},tooltipClass:String},data:function(){return{hovering:!1,dragging:!1,isClick:!1,startX:0,currentX:0,startY:0,currentY:0,startPosition:0,newPosition:null,oldValue:this.value}},computed:{disabled:function(){return this.$parent.sliderDisabled},max:function(){return this.$parent.max},min:function(){return this.$parent.min},step:function(){return this.$parent.step},showTooltip:function(){return this.$parent.showTooltip},precision:function(){return this.$parent.precision},currentPosition:function(){return(this.value-this.min)/(this.max-this.min)*100+"%"},enableFormat:function(){return this.$parent.formatTooltip instanceof Function},formatValue:function(){return this.enableFormat&&this.$parent.formatTooltip(this.value)||this.value},wrapperStyle:function(){return this.vertical?{bottom:this.currentPosition}:{left:this.currentPosition}}},watch:{dragging:function(t){this.$parent.dragging=t}},methods:{displayTooltip:function(){this.$refs.tooltip&&(this.$refs.tooltip.showPopper=!0)},hideTooltip:function(){this.$refs.tooltip&&(this.$refs.tooltip.showPopper=!1)},handleMouseEnter:function(){this.hovering=!0,this.displayTooltip()},handleMouseLeave:function(){this.hovering=!1,this.hideTooltip()},onButtonDown:function(t){this.disabled||(t.preventDefault(),this.onDragStart(t),window.addEventListener("mousemove",this.onDragging),window.addEventListener("touchmove",this.onDragging),window.addEventListener("mouseup",this.onDragEnd),window.addEventListener("touchend",this.onDragEnd),window.addEventListener("contextmenu",this.onDragEnd))},onLeftKeyDown:function(){this.disabled||(this.newPosition=parseFloat(this.currentPosition)-this.step/(this.max-this.min)*100,this.setPosition(this.newPosition),this.$parent.emitChange())},onRightKeyDown:function(){this.disabled||(this.newPosition=parseFloat(this.currentPosition)+this.step/(this.max-this.min)*100,this.setPosition(this.newPosition),this.$parent.emitChange())},onDragStart:function(t){this.dragging=!0,this.isClick=!0,"touchstart"===t.type&&(t.clientY=t.touches[0].clientY,t.clientX=t.touches[0].clientX),this.vertical?this.startY=t.clientY:this.startX=t.clientX,this.startPosition=parseFloat(this.currentPosition),this.newPosition=this.startPosition},onDragging:function(t){if(this.dragging){this.isClick=!1,this.displayTooltip(),this.$parent.resetSize();var e=0;"touchmove"===t.type&&(t.clientY=t.touches[0].clientY,t.clientX=t.touches[0].clientX),this.vertical?(this.currentY=t.clientY,e=(this.startY-this.currentY)/this.$parent.sliderSize*100):(this.currentX=t.clientX,e=(this.currentX-this.startX)/this.$parent.sliderSize*100),this.newPosition=this.startPosition+e,this.setPosition(this.newPosition)}},onDragEnd:function(){var t=this;this.dragging&&(setTimeout(function(){t.dragging=!1,t.hideTooltip(),t.isClick||(t.setPosition(t.newPosition),t.$parent.emitChange())},0),window.removeEventListener("mousemove",this.onDragging),window.removeEventListener("touchmove",this.onDragging),window.removeEventListener("mouseup",this.onDragEnd),window.removeEventListener("touchend",this.onDragEnd),window.removeEventListener("contextmenu",this.onDragEnd))},setPosition:function(t){var e=this;if(null!==t&&!isNaN(t)){t<0?t=0:t>100&&(t=100);var i=100/((this.max-this.min)/this.step),n=Math.round(t/i)*i*(this.max-this.min)*.01+this.min;n=parseFloat(n.toFixed(this.precision)),this.$emit("input",n),this.$nextTick(function(){e.displayTooltip(),e.$refs.tooltip&&e.$refs.tooltip.updatePopper()}),this.dragging||this.value===this.oldValue||(this.oldValue=this.value)}}}},ms,[],!1,null,null,null);vs.options.__file="packages/slider/src/button.vue";var ys=vs.exports,bs={name:"ElMarker",props:{mark:{type:[String,Object]}},render:function(){var t=arguments[0],e="string"==typeof this.mark?this.mark:this.mark.label;return t("div",{class:"el-slider__marks-text",style:this.mark.style||{}},[e])}},Ts=o({name:"ElSlider",mixins:[S.a],inject:{elForm:{default:""}},props:{min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},value:{type:[Number,Array],default:0},showInput:{type:Boolean,default:!1},showInputControls:{type:Boolean,default:!0},inputSize:{type:String,default:"small"},showStops:{type:Boolean,default:!1},showTooltip:{type:Boolean,default:!0},formatTooltip:Function,disabled:{type:Boolean,default:!1},range:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1},height:{type:String},debounce:{type:Number,default:300},label:{type:String},tooltipClass:String,marks:Object},components:{ElInputNumber:_s.a,SliderButton:ys,SliderMarker:bs},data:function(){return{firstValue:null,secondValue:null,oldValue:null,dragging:!1,sliderSize:1}},watch:{value:function(t,e){this.dragging||Array.isArray(t)&&Array.isArray(e)&&t.every(function(t,i){return t===e[i]})||this.setValues()},dragging:function(t){t||this.setValues()},firstValue:function(t){this.range?this.$emit("input",[this.minValue,this.maxValue]):this.$emit("input",t)},secondValue:function(){this.range&&this.$emit("input",[this.minValue,this.maxValue])},min:function(){this.setValues()},max:function(){this.setValues()}},methods:{valueChanged:function(){var t=this;return this.range?![this.minValue,this.maxValue].every(function(e,i){return e===t.oldValue[i]}):this.value!==this.oldValue},setValues:function(){if(this.min>this.max)console.error("[Element Error][Slider]min should not be greater than max.");else{var t=this.value;this.range&&Array.isArray(t)?t[1]<this.min?this.$emit("input",[this.min,this.min]):t[0]>this.max?this.$emit("input",[this.max,this.max]):t[0]<this.min?this.$emit("input",[this.min,t[1]]):t[1]>this.max?this.$emit("input",[t[0],this.max]):(this.firstValue=t[0],this.secondValue=t[1],this.valueChanged()&&(this.dispatch("ElFormItem","el.form.change",[this.minValue,this.maxValue]),this.oldValue=t.slice())):this.range||"number"!=typeof t||isNaN(t)||(t<this.min?this.$emit("input",this.min):t>this.max?this.$emit("input",this.max):(this.firstValue=t,this.valueChanged()&&(this.dispatch("ElFormItem","el.form.change",t),this.oldValue=t)))}},setPosition:function(t){var e=this.min+t*(this.max-this.min)/100;if(this.range){var i=void 0;i=Math.abs(this.minValue-e)<Math.abs(this.maxValue-e)?this.firstValue<this.secondValue?"button1":"button2":this.firstValue>this.secondValue?"button1":"button2",this.$refs[i].setPosition(t)}else this.$refs.button1.setPosition(t)},onSliderClick:function(t){if(!this.sliderDisabled&&!this.dragging){if(this.resetSize(),this.vertical){var e=this.$refs.slider.getBoundingClientRect().bottom;this.setPosition((e-t.clientY)/this.sliderSize*100)}else{var i=this.$refs.slider.getBoundingClientRect().left;this.setPosition((t.clientX-i)/this.sliderSize*100)}this.emitChange()}},resetSize:function(){this.$refs.slider&&(this.sliderSize=this.$refs.slider["client"+(this.vertical?"Height":"Width")])},emitChange:function(){var t=this;this.$nextTick(function(){t.$emit("change",t.range?[t.minValue,t.maxValue]:t.value)})},getStopStyle:function(t){return this.vertical?{bottom:t+"%"}:{left:t+"%"}}},computed:{stops:function(){var t=this;if(!this.showStops||this.min>this.max)return[];if(0===this.step)return[];for(var e=(this.max-this.min)/this.step,i=100*this.step/(this.max-this.min),n=[],o=1;o<e;o++)n.push(o*i);return this.range?n.filter(function(e){return e<100*(t.minValue-t.min)/(t.max-t.min)||e>100*(t.maxValue-t.min)/(t.max-t.min)}):n.filter(function(e){return e>100*(t.firstValue-t.min)/(t.max-t.min)})},markList:function(){var t=this;return this.marks?Object.keys(this.marks).map(parseFloat).sort(function(t,e){return t-e}).filter(function(e){return e<=t.max&&e>=t.min}).map(function(e){return{point:e,position:100*(e-t.min)/(t.max-t.min),mark:t.marks[e]}}):[]},minValue:function(){return Math.min(this.firstValue,this.secondValue)},maxValue:function(){return Math.max(this.firstValue,this.secondValue)},barSize:function(){return this.range?100*(this.maxValue-this.minValue)/(this.max-this.min)+"%":100*(this.firstValue-this.min)/(this.max-this.min)+"%"},barStart:function(){return this.range?100*(this.minValue-this.min)/(this.max-this.min)+"%":"0%"},precision:function(){var t=[this.min,this.max,this.step].map(function(t){var e=(""+t).split(".")[1];return e?e.length:0});return Math.max.apply(null,t)},runwayStyle:function(){return this.vertical?{height:this.height}:{}},barStyle:function(){return this.vertical?{height:this.barSize,bottom:this.barStart}:{width:this.barSize,left:this.barStart}},sliderDisabled:function(){return this.disabled||(this.elForm||{}).disabled}},mounted:function(){var t=void 0;this.range?(Array.isArray(this.value)?(this.firstValue=Math.max(this.min,this.value[0]),this.secondValue=Math.min(this.max,this.value[1])):(this.firstValue=this.min,this.secondValue=this.max),this.oldValue=[this.firstValue,this.secondValue],t=this.firstValue+"-"+this.secondValue):("number"!=typeof this.value||isNaN(this.value)?this.firstValue=this.min:this.firstValue=Math.min(this.max,Math.max(this.min,this.value)),this.oldValue=this.firstValue,t=this.firstValue),this.$el.setAttribute("aria-valuetext",t),this.$el.setAttribute("aria-label",this.label?this.label:"slider between "+this.min+" and "+this.max),this.resetSize(),window.addEventListener("resize",this.resetSize)},beforeDestroy:function(){window.removeEventListener("resize",this.resetSize)}},fs,[],!1,null,null,null);Ts.options.__file="packages/slider/src/main.vue";var Es=Ts.exports;Es.install=function(t){t.component(Es.name,Es)};var Cs=Es,Ss=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"el-loading-fade"},on:{"after-leave":t.handleAfterLeave}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"el-loading-mask",class:[t.customClass,{"is-fullscreen":t.fullscreen}],style:{backgroundColor:t.background||""}},[i("div",{staticClass:"el-loading-spinner"},[t.spinner?i("i",{class:t.spinner}):i("svg",{staticClass:"circular",attrs:{viewBox:"25 25 50 50"}},[i("circle",{staticClass:"path",attrs:{cx:"50",cy:"50",r:"20",fill:"none"}})]),t.text?i("p",{staticClass:"el-loading-text"},[t._v(t._s(t.text))]):t._e()])])])};Ss._withStripped=!0;var ks=o({data:function(){return{text:null,spinner:null,background:null,fullscreen:!0,visible:!1,customClass:""}},methods:{handleAfterLeave:function(){this.$emit("after-leave")},setText:function(t){this.text=t}}},Ss,[],!1,null,null,null);ks.options.__file="packages/loading/src/loading.vue";var Os=ks.exports,Is=i(32),ws=i.n(Is),Rs=ui.a.extend(Os),Ds={install:function(t){if(!t.prototype.$isServer){var e=function(e,n){n.value?t.nextTick(function(){n.modifiers.fullscreen?(e.originalPosition=Object(ft.getStyle)(document.body,"position"),e.originalOverflow=Object(ft.getStyle)(document.body,"overflow"),e.maskStyle.zIndex=y.PopupManager.nextZIndex(),Object(ft.addClass)(e.mask,"is-fullscreen"),i(document.body,e,n)):(Object(ft.removeClass)(e.mask,"is-fullscreen"),n.modifiers.body?(e.originalPosition=Object(ft.getStyle)(document.body,"position"),["top","left"].forEach(function(t){var i="top"===t?"scrollTop":"scrollLeft";e.maskStyle[t]=e.getBoundingClientRect()[t]+document.body[i]+document.documentElement[i]-parseInt(Object(ft.getStyle)(document.body,"margin-"+t),10)+"px"}),["height","width"].forEach(function(t){e.maskStyle[t]=e.getBoundingClientRect()[t]+"px"}),i(document.body,e,n)):(e.originalPosition=Object(ft.getStyle)(e,"position"),i(e,e,n)))}):(ws()(e.instance,function(t){if(e.instance.hiding){e.domVisible=!1;var i=n.modifiers.fullscreen||n.modifiers.body?document.body:e;Object(ft.removeClass)(i,"el-loading-parent--relative"),Object(ft.removeClass)(i,"el-loading-parent--hidden"),e.instance.hiding=!1}},300,!0),e.instance.visible=!1,e.instance.hiding=!0)},i=function(e,i,n){i.domVisible||"none"===Object(ft.getStyle)(i,"display")||"hidden"===Object(ft.getStyle)(i,"visibility")?i.domVisible&&!0===i.instance.hiding&&(i.instance.visible=!0,i.instance.hiding=!1):(Object.keys(i.maskStyle).forEach(function(t){i.mask.style[t]=i.maskStyle[t]}),"absolute"!==i.originalPosition&&"fixed"!==i.originalPosition&&Object(ft.addClass)(e,"el-loading-parent--relative"),n.modifiers.fullscreen&&n.modifiers.lock&&Object(ft.addClass)(e,"el-loading-parent--hidden"),i.domVisible=!0,e.appendChild(i.mask),t.nextTick(function(){i.instance.hiding?i.instance.$emit("after-leave"):i.instance.visible=!0}),i.domInserted=!0)};t.directive("loading",{bind:function(t,i,n){var o=t.getAttribute("element-loading-text"),r=t.getAttribute("element-loading-spinner"),s=t.getAttribute("element-loading-background"),a=t.getAttribute("element-loading-custom-class"),l=n.context,c=new Rs({el:document.createElement("div"),data:{text:l&&l[o]||o,spinner:l&&l[r]||r,background:l&&l[s]||s,customClass:l&&l[a]||a,fullscreen:!!i.modifiers.fullscreen}});t.instance=c,t.mask=c.$el,t.maskStyle={},i.value&&e(t,i)},update:function(t,i){t.instance.setText(t.getAttribute("element-loading-text")),i.oldValue!==i.value&&e(t,i)},unbind:function(t,i){t.domInserted&&(t.mask&&t.mask.parentNode&&t.mask.parentNode.removeChild(t.mask),e(t,{value:!1,modifiers:i.modifiers})),t.instance&&t.instance.$destroy()}})}}},xs=Ds,Ms=ui.a.extend(Os),As={text:null,fullscreen:!0,body:!1,lock:!1,customClass:""},Ns=void 0;Ms.prototype.originalPosition="",Ms.prototype.originalOverflow="",Ms.prototype.close=function(){var t=this;this.fullscreen&&(Ns=void 0),ws()(this,function(e){var i=t.fullscreen||t.body?document.body:t.target;Object(ft.removeClass)(i,"el-loading-parent--relative"),Object(ft.removeClass)(i,"el-loading-parent--hidden"),t.$el&&t.$el.parentNode&&t.$el.parentNode.removeChild(t.$el),t.$destroy()},300),this.visible=!1};var Ls=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ui.a.prototype.$isServer){if("string"==typeof(t=Vt()({},As,t)).target&&(t.target=document.querySelector(t.target)),t.target=t.target||document.body,t.target!==document.body?t.fullscreen=!1:t.body=!0,t.fullscreen&&Ns)return Ns;var e=t.body?document.body:t.target,i=new Ms({el:document.createElement("div"),data:t});return function(t,e,i){var n={};t.fullscreen?(i.originalPosition=Object(ft.getStyle)(document.body,"position"),i.originalOverflow=Object(ft.getStyle)(document.body,"overflow"),n.zIndex=y.PopupManager.nextZIndex()):t.body?(i.originalPosition=Object(ft.getStyle)(document.body,"position"),["top","left"].forEach(function(e){var i="top"===e?"scrollTop":"scrollLeft";n[e]=t.target.getBoundingClientRect()[e]+document.body[i]+document.documentElement[i]+"px"}),["height","width"].forEach(function(e){n[e]=t.target.getBoundingClientRect()[e]+"px"})):i.originalPosition=Object(ft.getStyle)(e,"position"),Object.keys(n).forEach(function(t){i.$el.style[t]=n[t]})}(t,e,i),"absolute"!==i.originalPosition&&"fixed"!==i.originalPosition&&Object(ft.addClass)(e,"el-loading-parent--relative"),t.fullscreen&&t.lock&&Object(ft.addClass)(e,"el-loading-parent--hidden"),e.appendChild(i.$el),ui.a.nextTick(function(){i.visible=!0}),t.fullscreen&&(Ns=i),i}},Ps={install:function(t){t.use(xs),t.prototype.$loading=Ls},directive:xs,service:Ls},Bs=function(){var t=this.$createElement;return(this._self._c||t)("i",{class:"el-icon-"+this.name})};Bs._withStripped=!0;var Fs=o({name:"ElIcon",props:{name:String}},Bs,[],!1,null,null,null);Fs.options.__file="packages/icon/src/icon.vue";var Hs=Fs.exports;Hs.install=function(t){t.component(Hs.name,Hs)};var Us=Hs,Vs={name:"ElRow",componentName:"ElRow",props:{tag:{type:String,default:"div"},gutter:Number,type:String,justify:{type:String,default:"start"},align:String},computed:{style:function(){var t={};return this.gutter&&(t.marginLeft="-"+this.gutter/2+"px",t.marginRight=t.marginLeft),t}},render:function(t){return t(this.tag,{class:["el-row","start"!==this.justify?"is-justify-"+this.justify:"",this.align?"is-align-"+this.align:"",{"el-row--flex":"flex"===this.type}],style:this.style},this.$slots.default)},install:function(t){t.component(Vs.name,Vs)}},Gs=Vs,Ws="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$s={name:"ElCol",props:{span:{type:Number,default:24},tag:{type:String,default:"div"},offset:Number,pull:Number,push:Number,xs:[Number,Object],sm:[Number,Object],md:[Number,Object],lg:[Number,Object],xl:[Number,Object]},computed:{gutter:function(){for(var t=this.$parent;t&&"ElRow"!==t.$options.componentName;)t=t.$parent;return t?t.gutter:0}},render:function(t){var e=this,i=[],n={};return this.gutter&&(n.paddingLeft=this.gutter/2+"px",n.paddingRight=n.paddingLeft),["span","offset","pull","push"].forEach(function(t){(e[t]||0===e[t])&&i.push("span"!==t?"el-col-"+t+"-"+e[t]:"el-col-"+e[t])}),["xs","sm","md","lg","xl"].forEach(function(t){if("number"==typeof e[t])i.push("el-col-"+t+"-"+e[t]);else if("object"===Ws(e[t])){var n=e[t];Object.keys(n).forEach(function(e){i.push("span"!==e?"el-col-"+t+"-"+e+"-"+n[e]:"el-col-"+t+"-"+n[e])})}}),t(this.tag,{class:["el-col",i],style:n},this.$slots.default)},install:function(t){t.component($s.name,$s)}},js=$s,zs=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition-group",{class:["el-upload-list","el-upload-list--"+t.listType,{"is-disabled":t.disabled}],attrs:{tag:"ul",name:"el-list"}},t._l(t.files,function(e){return i("li",{key:e.uid,class:["el-upload-list__item","is-"+e.status,t.focusing?"focusing":""],attrs:{tabindex:"0"},on:{keydown:function(i){if(!("button"in i)&&t._k(i.keyCode,"delete",[8,46],i.key,["Backspace","Delete","Del"]))return null;!t.disabled&&t.$emit("remove",e)},focus:function(e){t.focusing=!0},blur:function(e){t.focusing=!1},click:function(e){t.focusing=!1}}},[t._t("default",["uploading"!==e.status&&["picture-card","picture"].indexOf(t.listType)>-1?i("img",{staticClass:"el-upload-list__item-thumbnail",attrs:{src:e.url,alt:""}}):t._e(),i("a",{staticClass:"el-upload-list__item-name",on:{click:function(i){t.handleClick(e)}}},[i("i",{staticClass:"el-icon-document"}),t._v(t._s(e.name)+"\n      ")]),i("label",{staticClass:"el-upload-list__item-status-label"},[i("i",{class:{"el-icon-upload-success":!0,"el-icon-circle-check":"text"===t.listType,"el-icon-check":["picture-card","picture"].indexOf(t.listType)>-1}})]),t.disabled?t._e():i("i",{staticClass:"el-icon-close",on:{click:function(i){t.$emit("remove",e)}}}),t.disabled?t._e():i("i",{staticClass:"el-icon-close-tip"},[t._v(t._s(t.t("el.upload.deleteTip")))]),"uploading"===e.status?i("el-progress",{attrs:{type:"picture-card"===t.listType?"circle":"line","stroke-width":"picture-card"===t.listType?6:2,percentage:t.parsePercentage(e.percentage)}}):t._e(),"picture-card"===t.listType?i("span",{staticClass:"el-upload-list__item-actions"},[t.handlePreview&&"picture-card"===t.listType?i("span",{staticClass:"el-upload-list__item-preview",on:{click:function(i){t.handlePreview(e)}}},[i("i",{staticClass:"el-icon-zoom-in"})]):t._e(),t.disabled?t._e():i("span",{staticClass:"el-upload-list__item-delete",on:{click:function(i){t.$emit("remove",e)}}},[i("i",{staticClass:"el-icon-delete"})])]):t._e()],{file:e})],2)}),0)};zs._withStripped=!0;var Xs=i(33),Ys=i.n(Xs),Ks=o({name:"ElUploadList",mixins:[f.a],data:function(){return{focusing:!1}},components:{ElProgress:Ys.a},props:{files:{type:Array,default:function(){return[]}},disabled:{type:Boolean,default:!1},handlePreview:Function,listType:String},methods:{parsePercentage:function(t){return parseInt(t,10)},handleClick:function(t){this.handlePreview&&this.handlePreview(t)}}},zs,[],!1,null,null,null);Ks.options.__file="packages/upload/src/upload-list.vue";var Js=Ks.exports,qs=i(24),Zs=i.n(qs);var Qs=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"el-upload-dragger",class:{"is-dragover":t.dragover},on:{drop:function(e){return e.preventDefault(),t.onDrop(e)},dragover:function(e){return e.preventDefault(),t.onDragover(e)},dragleave:function(e){e.preventDefault(),t.dragover=!1}}},[t._t("default")],2)};Qs._withStripped=!0;var ta=o({name:"ElUploadDrag",props:{disabled:Boolean},inject:{uploader:{default:""}},data:function(){return{dragover:!1}},methods:{onDragover:function(){this.disabled||(this.dragover=!0)},onDrop:function(t){if(!this.disabled&&this.uploader){var e=this.uploader.accept;this.dragover=!1,e?this.$emit("file",[].slice.call(t.dataTransfer.files).filter(function(t){var i=t.type,n=t.name,o=n.indexOf(".")>-1?"."+n.split(".").pop():"",r=i.replace(/\/.*$/,"");return e.split(",").map(function(t){return t.trim()}).filter(function(t){return t}).some(function(t){return/\..+$/.test(t)?o===t:/\/\*$/.test(t)?r===t.replace(/\/\*$/,""):!!/^[^\/]+\/[^\/]+$/.test(t)&&i===t})})):this.$emit("file",t.dataTransfer.files)}}}},Qs,[],!1,null,null,null);ta.options.__file="packages/upload/src/upload-dragger.vue";var ea=o({inject:["uploader"],components:{UploadDragger:ta.exports},props:{type:String,action:{type:String,required:!0},name:{type:String,default:"file"},data:Object,headers:Object,withCredentials:Boolean,multiple:Boolean,accept:String,onStart:Function,onProgress:Function,onSuccess:Function,onError:Function,beforeUpload:Function,drag:Boolean,onPreview:{type:Function,default:function(){}},onRemove:{type:Function,default:function(){}},fileList:Array,autoUpload:Boolean,listType:String,httpRequest:{type:Function,default:function(t){if("undefined"!=typeof XMLHttpRequest){var e=new XMLHttpRequest,i=t.action;e.upload&&(e.upload.onprogress=function(e){e.total>0&&(e.percent=e.loaded/e.total*100),t.onProgress(e)});var n=new FormData;t.data&&Object.keys(t.data).forEach(function(e){n.append(e,t.data[e])}),n.append(t.filename,t.file,t.file.name),e.onerror=function(e){t.onError(e)},e.onload=function(){if(e.status<200||e.status>=300)return t.onError(function(t,e,i){var n=void 0;n=i.response?""+(i.response.error||i.response):i.responseText?""+i.responseText:"fail to post "+t+" "+i.status;var o=new Error(n);return o.status=i.status,o.method="post",o.url=t,o}(i,0,e));t.onSuccess(function(t){var e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch(t){return e}}(e))},e.open("post",i,!0),t.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);var o=t.headers||{};for(var r in o)o.hasOwnProperty(r)&&null!==o[r]&&e.setRequestHeader(r,o[r]);return e.send(n),e}}},disabled:Boolean,limit:Number,onExceed:Function},data:function(){return{mouseover:!1,reqs:{}}},methods:{isImage:function(t){return-1!==t.indexOf("image")},handleChange:function(t){var e=t.target.files;e&&this.uploadFiles(e)},uploadFiles:function(t){var e=this;if(this.limit&&this.fileList.length+t.length>this.limit)this.onExceed&&this.onExceed(t,this.fileList);else{var i=Array.prototype.slice.call(t);this.multiple||(i=i.slice(0,1)),0!==i.length&&i.forEach(function(t){e.onStart(t),e.autoUpload&&e.upload(t)})}},upload:function(t){var e=this;if(this.$refs.input.value=null,!this.beforeUpload)return this.post(t);var i=this.beforeUpload(t);i&&i.then?i.then(function(i){var n=Object.prototype.toString.call(i);if("[object File]"===n||"[object Blob]"===n){for(var o in"[object Blob]"===n&&(i=new File([i],t.name,{type:t.type})),t)t.hasOwnProperty(o)&&(i[o]=t[o]);e.post(i)}else e.post(t)},function(){e.onRemove(null,t)}):!1!==i?this.post(t):this.onRemove(null,t)},abort:function(t){var e=this.reqs;if(t){var i=t;t.uid&&(i=t.uid),e[i]&&e[i].abort()}else Object.keys(e).forEach(function(t){e[t]&&e[t].abort(),delete e[t]})},post:function(t){var e=this,i=t.uid,n={headers:this.headers,withCredentials:this.withCredentials,file:t,data:this.data,filename:this.name,action:this.action,onProgress:function(i){e.onProgress(i,t)},onSuccess:function(n){e.onSuccess(n,t),delete e.reqs[i]},onError:function(n){e.onError(n,t),delete e.reqs[i]}},o=this.httpRequest(n);this.reqs[i]=o,o&&o.then&&o.then(n.onSuccess,n.onError)},handleClick:function(){this.disabled||(this.$refs.input.value=null,this.$refs.input.click())},handleKeydown:function(t){t.target===t.currentTarget&&(13!==t.keyCode&&32!==t.keyCode||this.handleClick())}},render:function(t){var e=this.handleClick,i=this.drag,n=this.name,o=this.handleChange,r=this.multiple,s=this.accept,a=this.listType,l=this.uploadFiles,c=this.disabled,u={class:{"el-upload":!0},on:{click:e,keydown:this.handleKeydown}};return u.class["el-upload--"+a]=!0,t("div",Zs()([u,{attrs:{tabindex:"0"}}]),[i?t("upload-dragger",{attrs:{disabled:c},on:{file:l}},[this.$slots.default]):this.$slots.default,t("input",{class:"el-upload__input",attrs:{type:"file",name:n,multiple:r,accept:s},ref:"input",on:{change:o}})])}},void 0,void 0,!1,null,null,null);ea.options.__file="packages/upload/src/upload.vue";var ia=ea.exports;function na(){}var oa=o({name:"ElUpload",mixins:[E.a],components:{ElProgress:Ys.a,UploadList:Js,Upload:ia},provide:function(){return{uploader:this}},inject:{elForm:{default:""}},props:{action:{type:String,required:!0},headers:{type:Object,default:function(){return{}}},data:Object,multiple:Boolean,name:{type:String,default:"file"},drag:Boolean,dragger:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:String,type:{type:String,default:"select"},beforeUpload:Function,beforeRemove:Function,onRemove:{type:Function,default:na},onChange:{type:Function,default:na},onPreview:{type:Function},onSuccess:{type:Function,default:na},onProgress:{type:Function,default:na},onError:{type:Function,default:na},fileList:{type:Array,default:function(){return[]}},autoUpload:{type:Boolean,default:!0},listType:{type:String,default:"text"},httpRequest:Function,disabled:Boolean,limit:Number,onExceed:{type:Function,default:na}},data:function(){return{uploadFiles:[],dragOver:!1,draging:!1,tempIndex:1}},computed:{uploadDisabled:function(){return this.disabled||(this.elForm||{}).disabled}},watch:{listType:function(t){"picture-card"!==t&&"picture"!==t||(this.uploadFiles=this.uploadFiles.map(function(t){if(!t.url&&t.raw)try{t.url=URL.createObjectURL(t.raw)}catch(t){console.error("[Element Error][Upload]",t)}return t}))},fileList:{immediate:!0,handler:function(t){var e=this;this.uploadFiles=t.map(function(t){return t.uid=t.uid||Date.now()+e.tempIndex++,t.status=t.status||"success",t})}}},methods:{handleStart:function(t){t.uid=Date.now()+this.tempIndex++;var e={status:"ready",name:t.name,size:t.size,percentage:0,uid:t.uid,raw:t};if("picture-card"===this.listType||"picture"===this.listType)try{e.url=URL.createObjectURL(t)}catch(t){return void console.error("[Element Error][Upload]",t)}this.uploadFiles.push(e),this.onChange(e,this.uploadFiles)},handleProgress:function(t,e){var i=this.getFile(e);this.onProgress(t,i,this.uploadFiles),i.status="uploading",i.percentage=t.percent||0},handleSuccess:function(t,e){var i=this.getFile(e);i&&(i.status="success",i.response=t,this.onSuccess(t,i,this.uploadFiles),this.onChange(i,this.uploadFiles))},handleError:function(t,e){var i=this.getFile(e),n=this.uploadFiles;i.status="fail",n.splice(n.indexOf(i),1),this.onError(t,i,this.uploadFiles),this.onChange(i,this.uploadFiles)},handleRemove:function(t,e){var i=this;e&&(t=this.getFile(e));var n=function(){i.abort(t);var e=i.uploadFiles;e.splice(e.indexOf(t),1),i.onRemove(t,e)};if(this.beforeRemove){if("function"==typeof this.beforeRemove){var o=this.beforeRemove(t,this.uploadFiles);o&&o.then?o.then(function(){n()},na):!1!==o&&n()}}else n()},getFile:function(t){var e=void 0;return this.uploadFiles.every(function(i){return!(e=t.uid===i.uid?i:null)}),e},abort:function(t){this.$refs["upload-inner"].abort(t)},clearFiles:function(){this.uploadFiles=[]},submit:function(){var t=this;this.uploadFiles.filter(function(t){return"ready"===t.status}).forEach(function(e){t.$refs["upload-inner"].upload(e.raw)})},getMigratingConfig:function(){return{props:{"default-file-list":"default-file-list is renamed to file-list.","show-upload-list":"show-upload-list is renamed to show-file-list.","thumbnail-mode":"thumbnail-mode has been deprecated, you can implement the same effect according to this case: http://element.eleme.io/#/zh-CN/component/upload#yong-hu-tou-xiang-shang-chuan"}}}},beforeDestroy:function(){this.uploadFiles.forEach(function(t){t.url&&0===t.url.indexOf("blob:")&&URL.revokeObjectURL(t.url)})},render:function(t){var e=this,i=void 0;this.showFileList&&(i=t(Js,{attrs:{disabled:this.uploadDisabled,listType:this.listType,files:this.uploadFiles,handlePreview:this.onPreview},on:{remove:this.handleRemove}},[function(t){if(e.$scopedSlots.file)return e.$scopedSlots.file({file:t.file})}]));var n=t("upload",{props:{type:this.type,drag:this.drag,action:this.action,multiple:this.multiple,"before-upload":this.beforeUpload,"with-credentials":this.withCredentials,headers:this.headers,name:this.name,data:this.data,accept:this.accept,fileList:this.uploadFiles,autoUpload:this.autoUpload,listType:this.listType,disabled:this.uploadDisabled,limit:this.limit,"on-exceed":this.onExceed,"on-start":this.handleStart,"on-progress":this.handleProgress,"on-success":this.handleSuccess,"on-error":this.handleError,"on-preview":this.onPreview,"on-remove":this.handleRemove,"http-request":this.httpRequest},ref:"upload-inner"},[this.$slots.trigger||this.$slots.default]);return t("div",["picture-card"===this.listType?i:"",this.$slots.trigger?[n,this.$slots.default]:n,this.$slots.tip,"picture-card"!==this.listType?i:""])}},void 0,void 0,!1,null,null,null);oa.options.__file="packages/upload/src/index.vue";var ra=oa.exports;ra.install=function(t){t.component(ra.name,ra)};var sa=ra,aa=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"el-progress",class:["el-progress--"+t.type,t.status?"is-"+t.status:"",{"el-progress--without-text":!t.showText,"el-progress--text-inside":t.textInside}],attrs:{role:"progressbar","aria-valuenow":t.percentage,"aria-valuemin":"0","aria-valuemax":"100"}},["line"===t.type?i("div",{staticClass:"el-progress-bar"},[i("div",{staticClass:"el-progress-bar__outer",style:{height:t.strokeWidth+"px"}},[i("div",{staticClass:"el-progress-bar__inner",style:t.barStyle},[t.showText&&t.textInside?i("div",{staticClass:"el-progress-bar__innerText"},[t._v(t._s(t.content))]):t._e()])])]):i("div",{staticClass:"el-progress-circle",style:{height:t.width+"px",width:t.width+"px"}},[i("svg",{attrs:{viewBox:"0 0 100 100"}},[i("path",{staticClass:"el-progress-circle__track",style:t.trailPathStyle,attrs:{d:t.trackPath,stroke:"#e5e9f2","stroke-width":t.relativeStrokeWidth,fill:"none"}}),i("path",{staticClass:"el-progress-circle__path",style:t.circlePathStyle,attrs:{d:t.trackPath,stroke:t.stroke,fill:"none","stroke-linecap":t.strokeLinecap,"stroke-width":t.percentage?t.relativeStrokeWidth:0}})])]),t.showText&&!t.textInside?i("div",{staticClass:"el-progress__text",style:{fontSize:t.progressTextSize+"px"}},[t.status?i("i",{class:t.iconClass}):[t._v(t._s(t.content))]],2):t._e()])};aa._withStripped=!0;var la=o({name:"ElProgress",props:{type:{type:String,default:"line",validator:function(t){return["line","circle","dashboard"].indexOf(t)>-1}},percentage:{type:Number,default:0,required:!0,validator:function(t){return t>=0&&t<=100}},status:{type:String,validator:function(t){return["success","exception","warning"].indexOf(t)>-1}},strokeWidth:{type:Number,default:6},strokeLinecap:{type:String,default:"round"},textInside:{type:Boolean,default:!1},width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:[String,Array,Function],default:""},format:Function},computed:{barStyle:function(){var t={};return t.width=this.percentage+"%",t.backgroundColor=this.getCurrentColor(this.percentage),t},relativeStrokeWidth:function(){return(this.strokeWidth/this.width*100).toFixed(1)},radius:function(){return"circle"===this.type||"dashboard"===this.type?parseInt(50-parseFloat(this.relativeStrokeWidth)/2,10):0},trackPath:function(){var t=this.radius,e="dashboard"===this.type;return"\n        M 50 50\n        m 0 "+(e?"":"-")+t+"\n        a "+t+" "+t+" 0 1 1 0 "+(e?"-":"")+2*t+"\n        a "+t+" "+t+" 0 1 1 0 "+(e?"":"-")+2*t+"\n        "},perimeter:function(){return 2*Math.PI*this.radius},rate:function(){return"dashboard"===this.type?.75:1},strokeDashoffset:function(){return-1*this.perimeter*(1-this.rate)/2+"px"},trailPathStyle:function(){return{strokeDasharray:this.perimeter*this.rate+"px, "+this.perimeter+"px",strokeDashoffset:this.strokeDashoffset}},circlePathStyle:function(){return{strokeDasharray:this.perimeter*this.rate*(this.percentage/100)+"px, "+this.perimeter+"px",strokeDashoffset:this.strokeDashoffset,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease"}},stroke:function(){var t=void 0;if(this.color)t=this.getCurrentColor(this.percentage);else switch(this.status){case"success":t="#13ce66";break;case"exception":t="#ff4949";break;case"warning":t="#e6a23c";break;default:t="#20a0ff"}return t},iconClass:function(){return"warning"===this.status?"el-icon-warning":"line"===this.type?"success"===this.status?"el-icon-circle-check":"el-icon-circle-close":"success"===this.status?"el-icon-check":"el-icon-close"},progressTextSize:function(){return"line"===this.type?12+.4*this.strokeWidth:.111111*this.width+2},content:function(){return"function"==typeof this.format?this.format(this.percentage)||"":this.percentage+"%"}},methods:{getCurrentColor:function(t){return"function"==typeof this.color?this.color(t):"string"==typeof this.color?this.color:this.getLevelColor(t)},getLevelColor:function(t){for(var e=this.getColorArray().sort(function(t,e){return t.percentage-e.percentage}),i=0;i<e.length;i++)if(e[i].percentage>t)return e[i].color;return e[e.length-1].color},getColorArray:function(){var t=this.color,e=100/t.length;return t.map(function(t,i){return"string"==typeof t?{color:t,percentage:(i+1)*e}:t})}}},aa,[],!1,null,null,null);la.options.__file="packages/progress/src/progress.vue";var ca=la.exports;ca.install=function(t){t.component(ca.name,ca)};var ua=ca,ha=function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"el-spinner"},[e("svg",{staticClass:"el-spinner-inner",style:{width:this.radius/2+"px",height:this.radius/2+"px"},attrs:{viewBox:"0 0 50 50"}},[e("circle",{staticClass:"path",attrs:{cx:"25",cy:"25",r:"20",fill:"none",stroke:this.strokeColor,"stroke-width":this.strokeWidth}})])])};ha._withStripped=!0;var pa=o({name:"ElSpinner",props:{type:String,radius:{type:Number,default:100},strokeWidth:{type:Number,default:5},strokeColor:{type:String,default:"#efefef"}}},ha,[],!1,null,null,null);pa.options.__file="packages/spinner/src/spinner.vue";var da=pa.exports;da.install=function(t){t.component(da.name,da)};var fa=da,ga=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"el-message-fade"},on:{"after-leave":t.handleAfterLeave}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],class:["el-message",t.type&&!t.iconClass?"el-message--"+t.type:"",t.center?"is-center":"",t.showClose?"is-closable":"",t.customClass],style:t.positionStyle,attrs:{role:"alert"},on:{mouseenter:t.clearTimer,mouseleave:t.startTimer}},[t.iconClass?i("i",{class:t.iconClass}):i("i",{class:t.typeClass}),t._t("default",[t.dangerouslyUseHTMLString?i("p",{staticClass:"el-message__content",domProps:{innerHTML:t._s(t.message)}}):i("p",{staticClass:"el-message__content"},[t._v(t._s(t.message))])]),t.showClose?i("i",{staticClass:"el-message__closeBtn el-icon-close",on:{click:t.close}}):t._e()],2)])};ga._withStripped=!0;var _a={success:"success",info:"info",warning:"warning",error:"error"},ma=o({data:function(){return{visible:!1,message:"",duration:3e3,type:"info",iconClass:"",customClass:"",onClose:null,showClose:!1,closed:!1,verticalOffset:20,timer:null,dangerouslyUseHTMLString:!1,center:!1}},computed:{typeClass:function(){return this.type&&!this.iconClass?"el-message__icon el-icon-"+_a[this.type]:""},positionStyle:function(){return{top:this.verticalOffset+"px"}}},watch:{closed:function(t){t&&(this.visible=!1)}},methods:{handleAfterLeave:function(){this.$destroy(!0),this.$el.parentNode.removeChild(this.$el)},close:function(){this.closed=!0,"function"==typeof this.onClose&&this.onClose(this)},clearTimer:function(){clearTimeout(this.timer)},startTimer:function(){var t=this;this.duration>0&&(this.timer=setTimeout(function(){t.closed||t.close()},this.duration))},keydown:function(t){27===t.keyCode&&(this.closed||this.close())}},mounted:function(){this.startTimer(),document.addEventListener("keydown",this.keydown)},beforeDestroy:function(){document.removeEventListener("keydown",this.keydown)}},ga,[],!1,null,null,null);ma.options.__file="packages/message/src/main.vue";var va=ma.exports,ya=ui.a.extend(va),ba=void 0,Ta=[],Ea=1,Ca=function t(e){if(!ui.a.prototype.$isServer){"string"==typeof(e=e||{})&&(e={message:e});var i=e.onClose,n="message_"+Ea++;e.onClose=function(){t.close(n,i)},(ba=new ya({data:e})).id=n,Object(Wo.isVNode)(ba.message)&&(ba.$slots.default=[ba.message],ba.message=null),ba.$mount(),document.body.appendChild(ba.$el);var o=e.offset||20;return Ta.forEach(function(t){o+=t.$el.offsetHeight+16}),ba.verticalOffset=o,ba.visible=!0,ba.$el.style.zIndex=y.PopupManager.nextZIndex(),Ta.push(ba),ba}};["success","warning","info","error"].forEach(function(t){Ca[t]=function(e){return"string"==typeof e&&(e={message:e}),e.type=t,Ca(e)}}),Ca.close=function(t,e){for(var i=Ta.length,n=-1,o=void 0,r=0;r<i;r++)if(t===Ta[r].id){o=Ta[r].$el.offsetHeight,n=r,"function"==typeof e&&e(Ta[r]),Ta.splice(r,1);break}if(!(i<=1||-1===n||n>Ta.length-1))for(var s=n;s<i-1;s++){var a=Ta[s].$el;a.style.top=parseInt(a.style.top,10)-o-16+"px"}},Ca.closeAll=function(){for(var t=Ta.length-1;t>=0;t--)Ta[t].close()};var Sa=Ca,ka=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"el-badge"},[t._t("default"),i("transition",{attrs:{name:"el-zoom-in-center"}},[i("sup",{directives:[{name:"show",rawName:"v-show",value:!t.hidden&&(t.content||0===t.content||t.isDot),expression:"!hidden && (content || content === 0 || isDot)"}],staticClass:"el-badge__content",class:["el-badge__content--"+t.type,{"is-fixed":t.$slots.default,"is-dot":t.isDot}],domProps:{textContent:t._s(t.content)}})])],2)};ka._withStripped=!0;var Oa=o({name:"ElBadge",props:{value:[String,Number],max:Number,isDot:Boolean,hidden:Boolean,type:{type:String,validator:function(t){return["primary","success","warning","info","danger"].indexOf(t)>-1}}},computed:{content:function(){if(!this.isDot){var t=this.value,e=this.max;return"number"==typeof t&&"number"==typeof e&&e<t?e+"+":t}}}},ka,[],!1,null,null,null);Oa.options.__file="packages/badge/src/main.vue";var Ia=Oa.exports;Ia.install=function(t){t.component(Ia.name,Ia)};var wa=Ia,Ra=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"el-card",class:t.shadow?"is-"+t.shadow+"-shadow":"is-always-shadow"},[t.$slots.header||t.header?i("div",{staticClass:"el-card__header"},[t._t("header",[t._v(t._s(t.header))])],2):t._e(),i("div",{staticClass:"el-card__body",style:t.bodyStyle},[t._t("default")],2)])};Ra._withStripped=!0;var Da=o({name:"ElCard",props:{header:{},bodyStyle:{},shadow:{type:String}}},Ra,[],!1,null,null,null);Da.options.__file="packages/card/src/main.vue";var xa=Da.exports;xa.install=function(t){t.component(xa.name,xa)};var Ma=xa,Aa=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"el-rate",attrs:{role:"slider","aria-valuenow":t.currentValue,"aria-valuetext":t.text,"aria-valuemin":"0","aria-valuemax":t.max,tabindex:"0"},on:{keydown:t.handleKey}},[t._l(t.max,function(e,n){return i("span",{key:n,staticClass:"el-rate__item",style:{cursor:t.rateDisabled?"auto":"pointer"},on:{mousemove:function(i){t.setCurrentValue(e,i)},mouseleave:t.resetCurrentValue,click:function(i){t.selectValue(e)}}},[i("i",{staticClass:"el-rate__icon",class:[t.classes[e-1],{hover:t.hoverIndex===e}],style:t.getIconStyle(e)},[t.showDecimalIcon(e)?i("i",{staticClass:"el-rate__decimal",class:t.decimalIconClass,style:t.decimalStyle}):t._e()])])}),t.showText||t.showScore?i("span",{staticClass:"el-rate__text",style:{color:t.textColor}},[t._v(t._s(t.text))]):t._e()],2)};Aa._withStripped=!0;var Na=i(18),La=o({name:"ElRate",mixins:[E.a],inject:{elForm:{default:""}},data:function(){return{pointerAtLeftHalf:!0,currentValue:this.value,hoverIndex:-1}},props:{value:{type:Number,default:0},lowThreshold:{type:Number,default:2},highThreshold:{type:Number,default:4},max:{type:Number,default:5},colors:{type:[Array,Object],default:function(){return["#F7BA2A","#F7BA2A","#F7BA2A"]}},voidColor:{type:String,default:"#C6D1DE"},disabledVoidColor:{type:String,default:"#EFF2F7"},iconClasses:{type:[Array,Object],default:function(){return["el-icon-star-on","el-icon-star-on","el-icon-star-on"]}},voidIconClass:{type:String,default:"el-icon-star-off"},disabledVoidIconClass:{type:String,default:"el-icon-star-on"},disabled:{type:Boolean,default:!1},allowHalf:{type:Boolean,default:!1},showText:{type:Boolean,default:!1},showScore:{type:Boolean,default:!1},textColor:{type:String,default:"#1f2d3d"},texts:{type:Array,default:function(){return["极差","失望","一般","满意","惊喜"]}},scoreTemplate:{type:String,default:"{value}"}},computed:{text:function(){var t="";return this.showScore?t=this.scoreTemplate.replace(/\{\s*value\s*\}/,this.rateDisabled?this.value:this.currentValue):this.showText&&(t=this.texts[Math.ceil(this.currentValue)-1]),t},decimalStyle:function(){var t="";return this.rateDisabled?t=this.valueDecimal+"%":this.allowHalf&&(t="50%"),{color:this.activeColor,width:t}},valueDecimal:function(){return 100*this.value-100*Math.floor(this.value)},classMap:function(){var t;return Array.isArray(this.iconClasses)?((t={})[this.lowThreshold]=this.iconClasses[0],t[this.highThreshold]={value:this.iconClasses[1],excluded:!0},t[this.max]=this.iconClasses[2],t):this.iconClasses},decimalIconClass:function(){return this.getValueFromMap(this.value,this.classMap)},voidClass:function(){return this.rateDisabled?this.disabledVoidIconClass:this.voidIconClass},activeClass:function(){return this.getValueFromMap(this.currentValue,this.classMap)},colorMap:function(){var t;return Array.isArray(this.colors)?((t={})[this.lowThreshold]=this.colors[0],t[this.highThreshold]={value:this.colors[1],excluded:!0},t[this.max]=this.colors[2],t):this.colors},activeColor:function(){return this.getValueFromMap(this.currentValue,this.colorMap)},classes:function(){var t=[],e=0,i=this.currentValue;for(this.allowHalf&&this.currentValue!==Math.floor(this.currentValue)&&i--;e<i;e++)t.push(this.activeClass);for(;e<this.max;e++)t.push(this.voidClass);return t},rateDisabled:function(){return this.disabled||(this.elForm||{}).disabled}},watch:{value:function(t){this.currentValue=t,this.pointerAtLeftHalf=this.value!==Math.floor(this.value)}},methods:{getMigratingConfig:function(){return{props:{"text-template":"text-template is renamed to score-template."}}},getValueFromMap:function(t,e){var i=Object.keys(e).filter(function(i){var n=e[i];return!!Object(Na.isObject)(n)&&n.excluded?t<i:t<=i}).sort(function(t,e){return t-e}),n=e[i[0]];return Object(Na.isObject)(n)?n.value:n||""},showDecimalIcon:function(t){var e=this.rateDisabled&&this.valueDecimal>0&&t-1<this.value&&t>this.value,i=this.allowHalf&&this.pointerAtLeftHalf&&t-.5<=this.currentValue&&t>this.currentValue;return e||i},getIconStyle:function(t){var e=this.rateDisabled?this.disabledVoidColor:this.voidColor;return{color:t<=this.currentValue?this.activeColor:e}},selectValue:function(t){this.rateDisabled||(this.allowHalf&&this.pointerAtLeftHalf?(this.$emit("input",this.currentValue),this.$emit("change",this.currentValue)):(this.$emit("input",t),this.$emit("change",t)))},handleKey:function(t){if(!this.rateDisabled){var e=this.currentValue,i=t.keyCode;38===i||39===i?(this.allowHalf?e+=.5:e+=1,t.stopPropagation(),t.preventDefault()):37!==i&&40!==i||(this.allowHalf?e-=.5:e-=1,t.stopPropagation(),t.preventDefault()),e=(e=e<0?0:e)>this.max?this.max:e,this.$emit("input",e),this.$emit("change",e)}},setCurrentValue:function(t,e){if(!this.rateDisabled){if(this.allowHalf){var i=e.target;Object(ft.hasClass)(i,"el-rate__item")&&(i=i.querySelector(".el-rate__icon")),Object(ft.hasClass)(i,"el-rate__decimal")&&(i=i.parentNode),this.pointerAtLeftHalf=2*e.offsetX<=i.clientWidth,this.currentValue=this.pointerAtLeftHalf?t-.5:t}else this.currentValue=t;this.hoverIndex=t}},resetCurrentValue:function(){this.rateDisabled||(this.allowHalf&&(this.pointerAtLeftHalf=this.value!==Math.floor(this.value)),this.currentValue=this.value,this.hoverIndex=-1)}},created:function(){this.value||this.$emit("input",0)}},Aa,[],!1,null,null,null);La.options.__file="packages/rate/src/main.vue";var Pa=La.exports;Pa.install=function(t){t.component(Pa.name,Pa)};var Ba=Pa,Fa=function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"el-steps",class:[!this.simple&&"el-steps--"+this.direction,this.simple&&"el-steps--simple"]},[this._t("default")],2)};Fa._withStripped=!0;var Ha=o({name:"ElSteps",mixins:[E.a],props:{space:[Number,String],active:Number,direction:{type:String,default:"horizontal"},alignCenter:Boolean,simple:Boolean,finishStatus:{type:String,default:"finish"},processStatus:{type:String,default:"process"}},data:function(){return{steps:[],stepOffset:0}},methods:{getMigratingConfig:function(){return{props:{center:"center is removed."}}}},watch:{active:function(t,e){this.$emit("change",t,e)},steps:function(t){t.forEach(function(t,e){t.index=e})}}},Fa,[],!1,null,null,null);Ha.options.__file="packages/steps/src/steps.vue";var Ua=Ha.exports;Ua.install=function(t){t.component(Ua.name,Ua)};var Va=Ua,Ga=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"el-step",class:[!t.isSimple&&"is-"+t.$parent.direction,t.isSimple&&"is-simple",t.isLast&&!t.space&&!t.isCenter&&"is-flex",t.isCenter&&!t.isVertical&&!t.isSimple&&"is-center"],style:t.style},[i("div",{staticClass:"el-step__head",class:"is-"+t.currentStatus},[i("div",{staticClass:"el-step__line",style:t.isLast?"":{marginRight:t.$parent.stepOffset+"px"}},[i("i",{staticClass:"el-step__line-inner",style:t.lineStyle})]),i("div",{staticClass:"el-step__icon",class:"is-"+(t.icon?"icon":"text")},["success"!==t.currentStatus&&"error"!==t.currentStatus?t._t("icon",[t.icon?i("i",{staticClass:"el-step__icon-inner",class:[t.icon]}):t._e(),t.icon||t.isSimple?t._e():i("div",{staticClass:"el-step__icon-inner"},[t._v(t._s(t.index+1))])]):i("i",{staticClass:"el-step__icon-inner is-status",class:["el-icon-"+("success"===t.currentStatus?"check":"close")]})],2)]),i("div",{staticClass:"el-step__main"},[i("div",{ref:"title",staticClass:"el-step__title",class:["is-"+t.currentStatus]},[t._t("title",[t._v(t._s(t.title))])],2),t.isSimple?i("div",{staticClass:"el-step__arrow"}):i("div",{staticClass:"el-step__description",class:["is-"+t.currentStatus]},[t._t("description",[t._v(t._s(t.description))])],2)])])};Ga._withStripped=!0;var Wa=o({name:"ElStep",props:{title:String,icon:String,description:String,status:String},data:function(){return{index:-1,lineStyle:{},internalStatus:""}},beforeCreate:function(){this.$parent.steps.push(this)},beforeDestroy:function(){var t=this.$parent.steps,e=t.indexOf(this);e>=0&&t.splice(e,1)},computed:{currentStatus:function(){return this.status||this.internalStatus},prevStatus:function(){var t=this.$parent.steps[this.index-1];return t?t.currentStatus:"wait"},isCenter:function(){return this.$parent.alignCenter},isVertical:function(){return"vertical"===this.$parent.direction},isSimple:function(){return this.$parent.simple},isLast:function(){var t=this.$parent;return t.steps[t.steps.length-1]===this},stepsCount:function(){return this.$parent.steps.length},space:function(){var t=this.isSimple,e=this.$parent.space;return t?"":e},style:function(){var t={},e=this.$parent.steps.length,i="number"==typeof this.space?this.space+"px":this.space?this.space:100/(e-(this.isCenter?0:1))+"%";return t.flexBasis=i,this.isVertical?t:(this.isLast?t.maxWidth=100/this.stepsCount+"%":t.marginRight=-this.$parent.stepOffset+"px",t)}},methods:{updateStatus:function(t){var e=this.$parent.$children[this.index-1];t>this.index?this.internalStatus=this.$parent.finishStatus:t===this.index&&"error"!==this.prevStatus?this.internalStatus=this.$parent.processStatus:this.internalStatus="wait",e&&e.calcProgress(this.internalStatus)},calcProgress:function(t){var e=100,i={};i.transitionDelay=150*this.index+"ms",t===this.$parent.processStatus?(this.currentStatus,e=0):"wait"===t&&(e=0,i.transitionDelay=-150*this.index+"ms"),i.borderWidth=e&&!this.isSimple?"1px":0,"vertical"===this.$parent.direction?i.height=e+"%":i.width=e+"%",this.lineStyle=i}},mounted:function(){var t=this,e=this.$watch("index",function(i){t.$watch("$parent.active",t.updateStatus,{immediate:!0}),t.$watch("$parent.processStatus",function(){var e=t.$parent.active;t.updateStatus(e)},{immediate:!0}),e()})}},Ga,[],!1,null,null,null);Wa.options.__file="packages/steps/src/step.vue";var $a=Wa.exports;$a.install=function(t){t.component($a.name,$a)};var ja=$a,za=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.carouselClasses,on:{mouseenter:function(e){return e.stopPropagation(),t.handleMouseEnter(e)},mouseleave:function(e){return e.stopPropagation(),t.handleMouseLeave(e)}}},[i("div",{staticClass:"el-carousel__container",style:{height:t.height}},[t.arrowDisplay?i("transition",{attrs:{name:"carousel-arrow-left"}},[i("button",{directives:[{name:"show",rawName:"v-show",value:("always"===t.arrow||t.hover)&&(t.loop||t.activeIndex>0),expression:"(arrow === 'always' || hover) && (loop || activeIndex > 0)"}],staticClass:"el-carousel__arrow el-carousel__arrow--left",attrs:{type:"button"},on:{mouseenter:function(e){t.handleButtonEnter("left")},mouseleave:t.handleButtonLeave,click:function(e){e.stopPropagation(),t.throttledArrowClick(t.activeIndex-1)}}},[i("i",{staticClass:"el-icon-arrow-left"})])]):t._e(),t.arrowDisplay?i("transition",{attrs:{name:"carousel-arrow-right"}},[i("button",{directives:[{name:"show",rawName:"v-show",value:("always"===t.arrow||t.hover)&&(t.loop||t.activeIndex<t.items.length-1),expression:"(arrow === 'always' || hover) && (loop || activeIndex < items.length - 1)"}],staticClass:"el-carousel__arrow el-carousel__arrow--right",attrs:{type:"button"},on:{mouseenter:function(e){t.handleButtonEnter("right")},mouseleave:t.handleButtonLeave,click:function(e){e.stopPropagation(),t.throttledArrowClick(t.activeIndex+1)}}},[i("i",{staticClass:"el-icon-arrow-right"})])]):t._e(),t._t("default")],2),"none"!==t.indicatorPosition?i("ul",{class:t.indicatorsClasses},t._l(t.items,function(e,n){return i("li",{key:n,class:["el-carousel__indicator","el-carousel__indicator--"+t.direction,{"is-active":n===t.activeIndex}],on:{mouseenter:function(e){t.throttledIndicatorHover(n)},click:function(e){e.stopPropagation(),t.handleIndicatorClick(n)}}},[i("button",{staticClass:"el-carousel__button"},[t.hasLabel?i("span",[t._v(t._s(e.label))]):t._e()])])}),0):t._e()])};za._withStripped=!0;var Xa=i(25),Ya=i.n(Xa),Ka=o({name:"ElCarousel",props:{initialIndex:{type:Number,default:0},height:String,trigger:{type:String,default:"hover"},autoplay:{type:Boolean,default:!0},interval:{type:Number,default:3e3},indicatorPosition:String,indicator:{type:Boolean,default:!0},arrow:{type:String,default:"hover"},type:String,loop:{type:Boolean,default:!0},direction:{type:String,default:"horizontal",validator:function(t){return-1!==["horizontal","vertical"].indexOf(t)}}},data:function(){return{items:[],activeIndex:-1,containerWidth:0,timer:null,hover:!1}},computed:{arrowDisplay:function(){return"never"!==this.arrow&&"vertical"!==this.direction},hasLabel:function(){return this.items.some(function(t){return t.label.toString().length>0})},carouselClasses:function(){var t=["el-carousel","el-carousel--"+this.direction];return"card"===this.type&&t.push("el-carousel--card"),t},indicatorsClasses:function(){var t=["el-carousel__indicators","el-carousel__indicators--"+this.direction];return this.hasLabel&&t.push("el-carousel__indicators--labels"),"outside"!==this.indicatorPosition&&"card"!==this.type||t.push("el-carousel__indicators--outside"),t}},watch:{items:function(t){t.length>0&&this.setActiveItem(this.initialIndex)},activeIndex:function(t,e){this.resetItemPosition(e),e>-1&&this.$emit("change",t,e)},autoplay:function(t){t?this.startTimer():this.pauseTimer()},loop:function(){this.setActiveItem(this.activeIndex)},interval:function(){this.pauseTimer(),this.startTimer()}},methods:{handleMouseEnter:function(){this.hover=!0,this.pauseTimer()},handleMouseLeave:function(){this.hover=!1,this.startTimer()},itemInStage:function(t,e){var i=this.items.length;return e===i-1&&t.inStage&&this.items[0].active||t.inStage&&this.items[e+1]&&this.items[e+1].active?"left":!!(0===e&&t.inStage&&this.items[i-1].active||t.inStage&&this.items[e-1]&&this.items[e-1].active)&&"right"},handleButtonEnter:function(t){var e=this;"vertical"!==this.direction&&this.items.forEach(function(i,n){t===e.itemInStage(i,n)&&(i.hover=!0)})},handleButtonLeave:function(){"vertical"!==this.direction&&this.items.forEach(function(t){t.hover=!1})},updateItems:function(){this.items=this.$children.filter(function(t){return"ElCarouselItem"===t.$options.name})},resetItemPosition:function(t){var e=this;this.items.forEach(function(i,n){i.translateItem(n,e.activeIndex,t)})},playSlides:function(){this.activeIndex<this.items.length-1?this.activeIndex++:this.loop&&(this.activeIndex=0)},pauseTimer:function(){this.timer&&(clearInterval(this.timer),this.timer=null)},startTimer:function(){this.interval<=0||!this.autoplay||this.timer||(this.timer=setInterval(this.playSlides,this.interval))},setActiveItem:function(t){if("string"==typeof t){var e=this.items.filter(function(e){return e.name===t});e.length>0&&(t=this.items.indexOf(e[0]))}if(t=Number(t),isNaN(t)||t!==Math.floor(t))console.warn("[Element Warn][Carousel]index must be an integer.");else{var i=this.items.length,n=this.activeIndex;this.activeIndex=t<0?this.loop?i-1:0:t>=i?this.loop?0:i-1:t,n===this.activeIndex&&this.resetItemPosition(n)}},prev:function(){this.setActiveItem(this.activeIndex-1)},next:function(){this.setActiveItem(this.activeIndex+1)},handleIndicatorClick:function(t){this.activeIndex=t},handleIndicatorHover:function(t){"hover"===this.trigger&&t!==this.activeIndex&&(this.activeIndex=t)}},created:function(){var t=this;this.throttledArrowClick=Ya()(300,!0,function(e){t.setActiveItem(e)}),this.throttledIndicatorHover=Ya()(300,function(e){t.handleIndicatorHover(e)})},mounted:function(){var t=this;this.updateItems(),this.$nextTick(function(){Object(Pe.addResizeListener)(t.$el,t.resetItemPosition),t.initialIndex<t.items.length&&t.initialIndex>=0&&(t.activeIndex=t.initialIndex),t.startTimer()})},beforeDestroy:function(){this.$el&&Object(Pe.removeResizeListener)(this.$el,this.resetItemPosition),this.pauseTimer()}},za,[],!1,null,null,null);Ka.options.__file="packages/carousel/src/main.vue";var Ja=Ka.exports;Ja.install=function(t){t.component(Ja.name,Ja)};var qa=Ja,Za={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}};var Qa={name:"Bar",props:{vertical:Boolean,size:String,move:Number},computed:{bar:function(){return Za[this.vertical?"vertical":"horizontal"]},wrap:function(){return this.$parent.wrap}},render:function(t){var e=this.size,i=this.move,n=this.bar;return t("div",{class:["el-scrollbar__bar","is-"+n.key],on:{mousedown:this.clickTrackHandler}},[t("div",{ref:"thumb",class:"el-scrollbar__thumb",on:{mousedown:this.clickThumbHandler},style:function(t){var e=t.move,i=t.size,n=t.bar,o={},r="translate"+n.axis+"("+e+"%)";return o[n.size]=i,o.transform=r,o.msTransform=r,o.webkitTransform=r,o}({size:e,move:i,bar:n})})])},methods:{clickThumbHandler:function(t){t.ctrlKey||2===t.button||(this.startDrag(t),this[this.bar.axis]=t.currentTarget[this.bar.offset]-(t[this.bar.client]-t.currentTarget.getBoundingClientRect()[this.bar.direction]))},clickTrackHandler:function(t){var e=100*(Math.abs(t.target.getBoundingClientRect()[this.bar.direction]-t[this.bar.client])-this.$refs.thumb[this.bar.offset]/2)/this.$el[this.bar.offset];this.wrap[this.bar.scroll]=e*this.wrap[this.bar.scrollSize]/100},startDrag:function(t){t.stopImmediatePropagation(),this.cursorDown=!0,Object(ft.on)(document,"mousemove",this.mouseMoveDocumentHandler),Object(ft.on)(document,"mouseup",this.mouseUpDocumentHandler),document.onselectstart=function(){return!1}},mouseMoveDocumentHandler:function(t){if(!1!==this.cursorDown){var e=this[this.bar.axis];if(e){var i=100*(-1*(this.$el.getBoundingClientRect()[this.bar.direction]-t[this.bar.client])-(this.$refs.thumb[this.bar.offset]-e))/this.$el[this.bar.offset];this.wrap[this.bar.scroll]=i*this.wrap[this.bar.scrollSize]/100}}},mouseUpDocumentHandler:function(t){this.cursorDown=!1,this[this.bar.axis]=0,Object(ft.off)(document,"mousemove",this.mouseMoveDocumentHandler),document.onselectstart=null}},destroyed:function(){Object(ft.off)(document,"mouseup",this.mouseUpDocumentHandler)}},tl={name:"ElScrollbar",components:{Bar:Qa},props:{native:Boolean,wrapStyle:{},wrapClass:{},viewClass:{},viewStyle:{},noresize:Boolean,tag:{type:String,default:"div"}},data:function(){return{sizeWidth:"0",sizeHeight:"0",moveX:0,moveY:0}},computed:{wrap:function(){return this.$refs.wrap}},render:function(t){var e=Ai()(),i=this.wrapStyle;if(e){var n="-"+e+"px",o="margin-bottom: "+n+"; margin-right: "+n+";";Array.isArray(this.wrapStyle)?(i=Object(g.toObject)(this.wrapStyle)).marginRight=i.marginBottom=n:"string"==typeof this.wrapStyle?i+=o:i=o}var r=t(this.tag,{class:["el-scrollbar__view",this.viewClass],style:this.viewStyle,ref:"resize"},this.$slots.default),s=t("div",{ref:"wrap",style:i,on:{scroll:this.handleScroll},class:[this.wrapClass,"el-scrollbar__wrap",e?"":"el-scrollbar__wrap--hidden-default"]},[[r]]);return t("div",{class:"el-scrollbar"},this.native?[t("div",{ref:"wrap",class:[this.wrapClass,"el-scrollbar__wrap"],style:i},[[r]])]:[s,t(Qa,{attrs:{move:this.moveX,size:this.sizeWidth}}),t(Qa,{attrs:{vertical:!0,move:this.moveY,size:this.sizeHeight}})])},methods:{handleScroll:function(){var t=this.wrap;this.moveY=100*t.scrollTop/t.clientHeight,this.moveX=100*t.scrollLeft/t.clientWidth},update:function(){var t,e,i=this.wrap;i&&(t=100*i.clientHeight/i.scrollHeight,e=100*i.clientWidth/i.scrollWidth,this.sizeHeight=t<100?t+"%":"",this.sizeWidth=e<100?e+"%":"")}},mounted:function(){this.native||(this.$nextTick(this.update),!this.noresize&&Object(Pe.addResizeListener)(this.$refs.resize,this.update))},beforeDestroy:function(){this.native||!this.noresize&&Object(Pe.removeResizeListener)(this.$refs.resize,this.update)},install:function(t){t.component(tl.name,tl)}},el=tl,il=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{directives:[{name:"show",rawName:"v-show",value:t.ready,expression:"ready"}],staticClass:"el-carousel__item",class:{"is-active":t.active,"el-carousel__item--card":"card"===t.$parent.type,"is-in-stage":t.inStage,"is-hover":t.hover,"is-animating":t.animating},style:t.itemStyle,on:{click:t.handleItemClick}},["card"===t.$parent.type?i("div",{directives:[{name:"show",rawName:"v-show",value:!t.active,expression:"!active"}],staticClass:"el-carousel__mask"}):t._e(),t._t("default")],2)};il._withStripped=!0;var nl=o({name:"ElCarouselItem",props:{name:String,label:{type:[String,Number],default:""}},data:function(){return{hover:!1,translate:0,scale:1,active:!1,ready:!1,inStage:!1,animating:!1}},methods:{processIndex:function(t,e,i){return 0===e&&t===i-1?-1:e===i-1&&0===t?i:t<e-1&&e-t>=i/2?i+1:t>e+1&&t-e>=i/2?-2:t},calcCardTranslate:function(t,e){var i=this.$parent.$el.offsetWidth;return this.inStage?i*(1.17*(t-e)+1)/4:t<e?-1.83*i/4:3.83*i/4},calcTranslate:function(t,e,i){return this.$parent.$el[i?"offsetHeight":"offsetWidth"]*(t-e)},translateItem:function(t,e,i){var n=this.$parent.type,o=this.parentDirection,r=this.$parent.items.length;if("card"!==n&&void 0!==i&&(this.animating=t===e||t===i),t!==e&&r>2&&this.$parent.loop&&(t=this.processIndex(t,e,r)),"card"===n)"vertical"===o&&console.warn("[Element Warn][Carousel]vertical direction is not supported in card mode"),this.inStage=Math.round(Math.abs(t-e))<=1,this.active=t===e,this.translate=this.calcCardTranslate(t,e),this.scale=this.active?1:.83;else{this.active=t===e;var s="vertical"===o;this.translate=this.calcTranslate(t,e,s),this.scale=1}this.ready=!0},handleItemClick:function(){var t=this.$parent;if(t&&"card"===t.type){var e=t.items.indexOf(this);t.setActiveItem(e)}}},computed:{parentDirection:function(){return this.$parent.direction},itemStyle:function(){var t={transform:("vertical"===this.parentDirection?"translateY":"translateX")+"("+this.translate+"px) scale("+this.scale+")"};return Object(g.autoprefixer)(t)}},created:function(){this.$parent&&this.$parent.updateItems()},destroyed:function(){this.$parent&&this.$parent.updateItems()}},il,[],!1,null,null,null);nl.options.__file="packages/carousel/src/item.vue";var ol=nl.exports;ol.install=function(t){t.component(ol.name,ol)};var rl=ol,sl=function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"el-collapse",attrs:{role:"tablist","aria-multiselectable":"true"}},[this._t("default")],2)};sl._withStripped=!0;var al=o({name:"ElCollapse",componentName:"ElCollapse",props:{accordion:Boolean,value:{type:[Array,String,Number],default:function(){return[]}}},data:function(){return{activeNames:[].concat(this.value)}},provide:function(){return{collapse:this}},watch:{value:function(t){this.activeNames=[].concat(t)}},methods:{setActiveNames:function(t){t=[].concat(t);var e=this.accordion?t[0]:t;this.activeNames=t,this.$emit("input",e),this.$emit("change",e)},handleItemClick:function(t){if(this.accordion)this.setActiveNames(!this.activeNames[0]&&0!==this.activeNames[0]||this.activeNames[0]!==t.name?t.name:"");else{var e=this.activeNames.slice(0),i=e.indexOf(t.name);i>-1?e.splice(i,1):e.push(t.name),this.setActiveNames(e)}}},created:function(){this.$on("item-click",this.handleItemClick)}},sl,[],!1,null,null,null);al.options.__file="packages/collapse/src/collapse.vue";var ll=al.exports;ll.install=function(t){t.component(ll.name,ll)};var cl=ll,ul=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"el-collapse-item",class:{"is-active":t.isActive,"is-disabled":t.disabled}},[i("div",{attrs:{role:"tab","aria-expanded":t.isActive,"aria-controls":"el-collapse-content-"+t.id,"aria-describedby":"el-collapse-content-"+t.id}},[i("div",{staticClass:"el-collapse-item__header",class:{focusing:t.focusing,"is-active":t.isActive},attrs:{role:"button",id:"el-collapse-head-"+t.id,tabindex:t.disabled?void 0:0},on:{click:t.handleHeaderClick,keyup:function(e){return"button"in e||!t._k(e.keyCode,"space",32,e.key,[" ","Spacebar"])||!t._k(e.keyCode,"enter",13,e.key,"Enter")?(e.stopPropagation(),t.handleEnterClick(e)):null},focus:t.handleFocus,blur:function(e){t.focusing=!1}}},[t._t("title",[t._v(t._s(t.title))]),i("i",{staticClass:"el-collapse-item__arrow el-icon-arrow-right",class:{"is-active":t.isActive}})],2)]),i("el-collapse-transition",[i("div",{directives:[{name:"show",rawName:"v-show",value:t.isActive,expression:"isActive"}],staticClass:"el-collapse-item__wrap",attrs:{role:"tabpanel","aria-hidden":!t.isActive,"aria-labelledby":"el-collapse-head-"+t.id,id:"el-collapse-content-"+t.id}},[i("div",{staticClass:"el-collapse-item__content"},[t._t("default")],2)])])],1)};ul._withStripped=!0;var hl=o({name:"ElCollapseItem",componentName:"ElCollapseItem",mixins:[S.a],components:{ElCollapseTransition:yt.a},data:function(){return{contentWrapStyle:{height:"auto",display:"block"},contentHeight:0,focusing:!1,isClick:!1,id:Object(g.generateId)()}},inject:["collapse"],props:{title:String,name:{type:[String,Number],default:function(){return this._uid}},disabled:Boolean},computed:{isActive:function(){return this.collapse.activeNames.indexOf(this.name)>-1}},methods:{handleFocus:function(){var t=this;setTimeout(function(){t.isClick?t.isClick=!1:t.focusing=!0},50)},handleHeaderClick:function(){this.disabled||(this.dispatch("ElCollapse","item-click",this),this.focusing=!1,this.isClick=!0)},handleEnterClick:function(){this.dispatch("ElCollapse","item-click",this)}}},ul,[],!1,null,null,null);hl.options.__file="packages/collapse/src/collapse-item.vue";var pl=hl.exports;pl.install=function(t){t.component(pl.name,pl)};var dl=pl,fl=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:function(){return t.toggleDropDownVisible(!1)},expression:"() => toggleDropDownVisible(false)"}],ref:"reference",class:["el-cascader",t.realSize&&"el-cascader--"+t.realSize,{"is-disabled":t.isDisabled}],on:{mouseenter:function(e){t.inputHover=!0},mouseleave:function(e){t.inputHover=!1},click:function(){return t.toggleDropDownVisible(!t.readonly||void 0)},keydown:t.handleKeyDown}},[i("el-input",{ref:"input",class:{"is-focus":t.dropDownVisible},attrs:{size:t.realSize,placeholder:t.placeholder,readonly:t.readonly,disabled:t.isDisabled,"validate-event":!1},on:{focus:t.handleFocus,blur:t.handleBlur,input:t.handleInput},model:{value:t.multiple?t.presentText:t.inputValue,callback:function(e){t.multiple?t.presentText:t.inputValue=e},expression:"multiple ? presentText : inputValue"}},[i("template",{slot:"suffix"},[t.clearBtnVisible?i("i",{key:"clear",staticClass:"el-input__icon el-icon-circle-close",on:{click:function(e){return e.stopPropagation(),t.handleClear(e)}}}):i("i",{key:"arrow-down",class:["el-input__icon","el-icon-arrow-down",t.dropDownVisible&&"is-reverse"],on:{click:function(e){e.stopPropagation(),t.toggleDropDownVisible()}}})])],2),t.multiple?i("div",{staticClass:"el-cascader__tags"},[t._l(t.presentTags,function(e){return i("el-tag",{key:e.key,attrs:{type:"info",size:t.tagSize,hit:e.hitState,closable:e.closable,"disable-transitions":""},on:{close:function(i){t.deleteTag(e)}}},[i("span",[t._v(t._s(e.text))])])}),t.filterable&&!t.isDisabled?i("input",{directives:[{name:"model",rawName:"v-model.trim",value:t.inputValue,expression:"inputValue",modifiers:{trim:!0}}],staticClass:"el-cascader__search-input",attrs:{type:"text",placeholder:t.presentTags.length?"":t.placeholder},domProps:{value:t.inputValue},on:{input:[function(e){e.target.composing||(t.inputValue=e.target.value.trim())},function(e){return t.handleInput(t.inputValue,e)}],click:function(e){e.stopPropagation(),t.toggleDropDownVisible(!0)},keydown:function(e){return"button"in e||!t._k(e.keyCode,"delete",[8,46],e.key,["Backspace","Delete","Del"])?t.handleDelete(e):null},blur:function(e){t.$forceUpdate()}}}):t._e()],2):t._e(),i("transition",{attrs:{name:"el-zoom-in-top"},on:{"after-leave":t.handleDropdownLeave}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.dropDownVisible,expression:"dropDownVisible"}],ref:"popper",class:["el-popper","el-cascader__dropdown",t.popperClass]},[i("el-cascader-panel",{directives:[{name:"show",rawName:"v-show",value:!t.filtering,expression:"!filtering"}],ref:"panel",attrs:{options:t.options,props:t.config,border:!1,"render-label":t.$scopedSlots.default},on:{"expand-change":t.handleExpandChange,close:function(e){t.toggleDropDownVisible(!1)}},model:{value:t.checkedValue,callback:function(e){t.checkedValue=e},expression:"checkedValue"}}),t.filterable?i("el-scrollbar",{directives:[{name:"show",rawName:"v-show",value:t.filtering,expression:"filtering"}],ref:"suggestionPanel",staticClass:"el-cascader__suggestion-panel",attrs:{tag:"ul","view-class":"el-cascader__suggestion-list"},nativeOn:{keydown:function(e){return t.handleSuggestionKeyDown(e)}}},[t.suggestions.length?t._l(t.suggestions,function(e,n){return i("li",{key:e.uid,class:["el-cascader__suggestion-item",e.checked&&"is-checked"],attrs:{tabindex:-1},on:{click:function(e){t.handleSuggestionClick(n)}}},[i("span",[t._v(t._s(e.text))]),e.checked?i("i",{staticClass:"el-icon-check"}):t._e()])}):t._t("empty",[i("li",{staticClass:"el-cascader__empty-text"},[t._v(t._s(t.t("el.cascader.noMatch")))])])],2):t._e()],1)])],1)};fl._withStripped=!0;var gl=i(42),_l=i.n(gl),ml=i(34),vl=i.n(ml),yl=vl.a.keys,bl={expandTrigger:{newProp:"expandTrigger",type:String},changeOnSelect:{newProp:"checkStrictly",type:Boolean},hoverThreshold:{newProp:"hoverThreshold",type:Number}},Tl={props:{placement:{type:String,default:"bottom-start"},appendToBody:L.a.props.appendToBody,visibleArrow:{type:Boolean,default:!0},arrowOffset:L.a.props.arrowOffset,offset:L.a.props.offset,boundariesPadding:L.a.props.boundariesPadding,popperOptions:L.a.props.popperOptions},methods:L.a.methods,data:L.a.data,beforeDestroy:L.a.beforeDestroy},El={medium:36,small:32,mini:28},Cl=o({name:"ElCascader",directives:{Clickoutside:M.a},mixins:[Tl,S.a,f.a,E.a],inject:{elForm:{default:""},elFormItem:{default:""}},components:{ElInput:p.a,ElTag:Le.a,ElScrollbar:B.a,ElCascaderPanel:_l.a},props:{value:{},options:Array,props:Object,size:String,placeholder:{type:String,default:function(){return Object(Lo.t)("el.cascader.placeholder")}},disabled:Boolean,clearable:Boolean,filterable:Boolean,filterMethod:Function,separator:{type:String,default:" / "},showAllLevels:{type:Boolean,default:!0},collapseTags:Boolean,debounce:{type:Number,default:300},beforeFilter:{type:Function,default:function(){return function(){}}},popperClass:String},data:function(){return{dropDownVisible:!1,checkedValue:this.value||null,inputHover:!1,inputValue:null,presentText:null,presentTags:[],checkedNodes:[],filtering:!1,suggestions:[],inputInitialHeight:0,pressDeleteCount:0}},computed:{realSize:function(){var t=(this.elFormItem||{}).elFormItemSize;return this.size||t||(this.$ELEMENT||{}).size},tagSize:function(){return["small","mini"].indexOf(this.realSize)>-1?"mini":"small"},isDisabled:function(){return this.disabled||(this.elForm||{}).disabled},config:function(){var t=this.props||{},e=this.$attrs;return Object.keys(bl).forEach(function(i){var n=bl[i],o=n.newProp,r=n.type,s=e[i]||e[Object(g.kebabCase)(i)];Object(Gt.isDef)(i)&&!Object(Gt.isDef)(t[o])&&(r===Boolean&&""===s&&(s=!0),t[o]=s)}),t},multiple:function(){return this.config.multiple},leafOnly:function(){return!this.config.checkStrictly},readonly:function(){return!this.filterable||this.multiple},clearBtnVisible:function(){return!(!this.clearable||this.isDisabled||this.filtering||!this.inputHover)&&(this.multiple?!!this.checkedNodes.filter(function(t){return!t.isDisabled}).length:!!this.presentText)},panel:function(){return this.$refs.panel}},watch:{disabled:function(){this.computePresentContent()},value:function(t){Object(g.isEqual)(t,this.checkedValue)||(this.checkedValue=t,this.computePresentContent())},checkedValue:function(t){var e=this.value,i=this.dropDownVisible,n=this.config,o=n.checkStrictly,r=n.multiple;Object(g.isEqual)(t,e)&&!Object(Na.isUndefined)(e)||(this.computePresentContent(),r||o||!i||this.toggleDropDownVisible(!1),this.$emit("input",t),this.$emit("change",t),this.dispatch("ElFormItem","el.form.change",[t]))},options:{handler:function(){this.$nextTick(this.computePresentContent)},deep:!0},presentText:function(t){this.inputValue=t},presentTags:function(t,e){this.multiple&&(t.length||e.length)&&this.$nextTick(this.updateStyle)},filtering:function(t){this.$nextTick(this.updatePopper)}},mounted:function(){var t=this,e=this.$refs.input;e&&e.$el&&(this.inputInitialHeight=e.$el.offsetHeight||El[this.realSize]||40),Object(g.isEmpty)(this.value)||this.computePresentContent(),this.filterHandler=D()(this.debounce,function(){var e=t.inputValue;if(e){var i=t.beforeFilter(e);i&&i.then?i.then(t.getSuggestions):!1!==i?t.getSuggestions():t.filtering=!1}else t.filtering=!1}),Object(Pe.addResizeListener)(this.$el,this.updateStyle)},beforeDestroy:function(){Object(Pe.removeResizeListener)(this.$el,this.updateStyle)},methods:{getMigratingConfig:function(){return{props:{"expand-trigger":"expand-trigger is removed, use `props.expandTrigger` instead.","change-on-select":"change-on-select is removed, use `props.checkStrictly` instead.","hover-threshold":"hover-threshold is removed, use `props.hoverThreshold` instead"},events:{"active-item-change":"active-item-change is renamed to expand-change"}}},toggleDropDownVisible:function(t){var e=this;if(!this.isDisabled){var i=this.dropDownVisible,n=this.$refs.input;(t=Object(Gt.isDef)(t)?t:!i)!==i&&(this.dropDownVisible=t,t&&this.$nextTick(function(){e.updatePopper(),e.panel.scrollIntoView()}),n.$refs.input.setAttribute("aria-expanded",t),this.$emit("visible-change",t))}},handleDropdownLeave:function(){this.filtering=!1,this.inputValue=this.presentText},handleKeyDown:function(t){switch(t.keyCode){case yl.enter:this.toggleDropDownVisible();break;case yl.down:this.toggleDropDownVisible(!0),this.focusFirstNode(),t.preventDefault();break;case yl.esc:case yl.tab:this.toggleDropDownVisible(!1)}},handleFocus:function(t){this.$emit("focus",t)},handleBlur:function(t){this.$emit("blur",t)},handleInput:function(t,e){!this.dropDownVisible&&this.toggleDropDownVisible(!0),e&&e.isComposing||(t?this.filterHandler():this.filtering=!1)},handleClear:function(){this.presentText="",this.panel.clearCheckedNodes()},handleExpandChange:function(t){this.$nextTick(this.updatePopper.bind(this)),this.$emit("expand-change",t),this.$emit("active-item-change",t)},focusFirstNode:function(){var t=this;this.$nextTick(function(){var e=t.filtering,i=t.$refs,n=i.popper,o=i.suggestionPanel,r=null;e&&o?r=o.$el.querySelector(".el-cascader__suggestion-item"):r=n.querySelector(".el-cascader-menu").querySelector('.el-cascader-node[tabindex="-1"]');r&&(r.focus(),!e&&r.click())})},computePresentContent:function(){var t=this;this.$nextTick(function(){t.config.multiple?(t.computePresentTags(),t.presentText=t.presentTags.length?" ":null):t.computePresentText()})},computePresentText:function(){var t=this.checkedValue,e=this.config;if(!Object(g.isEmpty)(t)){var i=this.panel.getNodeByValue(t);if(i&&(e.checkStrictly||i.isLeaf))return void(this.presentText=i.getText(this.showAllLevels,this.separator))}this.presentText=null},computePresentTags:function(){var t=this.isDisabled,e=this.leafOnly,i=this.showAllLevels,n=this.separator,o=this.collapseTags,r=this.getCheckedNodes(e),s=[],a=function(e){return{node:e,key:e.uid,text:e.getText(i,n),hitState:!1,closable:!t&&!e.isDisabled}};if(r.length){var l=r[0],c=r.slice(1),u=c.length;s.push(a(l)),u&&(o?s.push({key:-1,text:"+ "+u,closable:!1}):c.forEach(function(t){return s.push(a(t))}))}this.checkedNodes=r,this.presentTags=s},getSuggestions:function(){var t=this,e=this.filterMethod;Object(Na.isFunction)(e)||(e=function(t,e){return t.text.includes(e)});var i=this.panel.getFlattedNodes(this.leafOnly).filter(function(i){return!i.isDisabled&&(i.text=i.getText(t.showAllLevels,t.separator)||"",e(i,t.inputValue))});this.multiple?this.presentTags.forEach(function(t){t.hitState=!1}):i.forEach(function(e){e.checked=Object(g.isEqual)(t.checkedValue,e.getValueByOption())}),this.filtering=!0,this.suggestions=i,this.$nextTick(this.updatePopper)},handleSuggestionKeyDown:function(t){var e=t.keyCode,i=t.target;switch(e){case yl.enter:i.click();break;case yl.up:var n=i.previousElementSibling;n&&n.focus();break;case yl.down:var o=i.nextElementSibling;o&&o.focus();break;case yl.esc:case yl.tab:this.toggleDropDownVisible(!1)}},handleDelete:function(){var t=this.inputValue,e=this.pressDeleteCount,i=this.presentTags,n=i[i.length-1];this.pressDeleteCount=t?0:e+1,n&&this.pressDeleteCount&&(n.hitState?this.deleteTag(n):n.hitState=!0)},handleSuggestionClick:function(t){var e=this.multiple,i=this.suggestions[t];if(e){var n=i.checked;i.doCheck(!n),this.panel.calculateMultiCheckedValue()}else this.checkedValue=i.getValueByOption(),this.toggleDropDownVisible(!1)},deleteTag:function(t){var e=this.checkedValue,i=t.node.getValueByOption(),n=e.find(function(t){return Object(g.isEqual)(t,i)});this.checkedValue=e.filter(function(t){return!Object(g.isEqual)(t,i)}),this.$emit("remove-tag",n)},updateStyle:function(){var t=this.$el,e=this.inputInitialHeight;if(!this.$isServer&&t){var i=this.$refs.suggestionPanel,n=t.querySelector(".el-input__inner");if(n){var o=t.querySelector(".el-cascader__tags"),r=null;if(i&&(r=i.$el))r.querySelector(".el-cascader__suggestion-list").style.minWidth=n.offsetWidth+"px";if(o){var s=o.offsetHeight,a=Math.max(s+6,e)+"px";n.style.height=a,this.updatePopper()}}}},getCheckedNodes:function(t){return this.panel.getCheckedNodes(t)}}},fl,[],!1,null,null,null);Cl.options.__file="packages/cascader/src/cascader.vue";var Sl=Cl.exports;Sl.install=function(t){t.component(Sl.name,Sl)};var kl=Sl,Ol=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:t.hide,expression:"hide"}],class:["el-color-picker",t.colorDisabled?"is-disabled":"",t.colorSize?"el-color-picker--"+t.colorSize:""]},[t.colorDisabled?i("div",{staticClass:"el-color-picker__mask"}):t._e(),i("div",{staticClass:"el-color-picker__trigger",on:{click:t.handleTrigger}},[i("span",{staticClass:"el-color-picker__color",class:{"is-alpha":t.showAlpha}},[i("span",{staticClass:"el-color-picker__color-inner",style:{backgroundColor:t.displayedColor}}),t.value||t.showPanelColor?t._e():i("span",{staticClass:"el-color-picker__empty el-icon-close"})]),i("span",{directives:[{name:"show",rawName:"v-show",value:t.value||t.showPanelColor,expression:"value || showPanelColor"}],staticClass:"el-color-picker__icon el-icon-arrow-down"})]),i("picker-dropdown",{ref:"dropdown",class:["el-color-picker__panel",t.popperClass||""],attrs:{color:t.color,"show-alpha":t.showAlpha,predefine:t.predefine},on:{pick:t.confirmValue,clear:t.clearValue},model:{value:t.showPicker,callback:function(e){t.showPicker=e},expression:"showPicker"}})],1)};Ol._withStripped=!0;var Il="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};var wl=function(t,e,i){return[t,e*i/((t=(2-e)*i)<1?t:2-t)||0,t/2]},Rl=function(t,e){var i;"string"==typeof(i=t)&&-1!==i.indexOf(".")&&1===parseFloat(i)&&(t="100%");var n=function(t){return"string"==typeof t&&-1!==t.indexOf("%")}(t);return t=Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)},Dl={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},xl={A:10,B:11,C:12,D:13,E:14,F:15},Ml=function(t){return 2===t.length?16*(xl[t[0].toUpperCase()]||+t[0])+(xl[t[1].toUpperCase()]||+t[1]):xl[t[1].toUpperCase()]||+t[1]},Al=function(t,e,i){t=Rl(t,255),e=Rl(e,255),i=Rl(i,255);var n,o=Math.max(t,e,i),r=Math.min(t,e,i),s=void 0,a=o,l=o-r;if(n=0===o?0:l/o,o===r)s=0;else{switch(o){case t:s=(e-i)/l+(e<i?6:0);break;case e:s=(i-t)/l+2;break;case i:s=(t-e)/l+4}s/=6}return{h:360*s,s:100*n,v:100*a}},Nl=function(t,e,i){t=6*Rl(t,360),e=Rl(e,100),i=Rl(i,100);var n=Math.floor(t),o=t-n,r=i*(1-e),s=i*(1-o*e),a=i*(1-(1-o)*e),l=n%6,c=[i,s,r,r,a,i][l],u=[a,i,i,s,r,r][l],h=[r,r,a,i,i,s][l];return{r:Math.round(255*c),g:Math.round(255*u),b:Math.round(255*h)}},Ll=function(){function t(e){for(var i in function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._hue=0,this._saturation=100,this._value=100,this._alpha=100,this.enableAlpha=!1,this.format="hex",this.value="",e=e||{})e.hasOwnProperty(i)&&(this[i]=e[i]);this.doOnChange()}return t.prototype.set=function(t,e){if(1!==arguments.length||"object"!==(void 0===t?"undefined":Il(t)))this["_"+t]=e,this.doOnChange();else for(var i in t)t.hasOwnProperty(i)&&this.set(i,t[i])},t.prototype.get=function(t){return this["_"+t]},t.prototype.toRgb=function(){return Nl(this._hue,this._saturation,this._value)},t.prototype.fromString=function(t){var e=this;if(!t)return this._hue=0,this._saturation=100,this._value=100,void this.doOnChange();var i=function(t,i,n){e._hue=Math.max(0,Math.min(360,t)),e._saturation=Math.max(0,Math.min(100,i)),e._value=Math.max(0,Math.min(100,n)),e.doOnChange()};if(-1!==t.indexOf("hsl")){var n=t.replace(/hsla|hsl|\(|\)/gm,"").split(/\s|,/g).filter(function(t){return""!==t}).map(function(t,e){return e>2?parseFloat(t):parseInt(t,10)});if(4===n.length?this._alpha=Math.floor(100*parseFloat(n[3])):3===n.length&&(this._alpha=100),n.length>=3){var o=function(t,e,i){i/=100;var n=e/=100,o=Math.max(i,.01);return e*=(i*=2)<=1?i:2-i,n*=o<=1?o:2-o,{h:t,s:100*(0===i?2*n/(o+n):2*e/(i+e)),v:(i+e)/2*100}}(n[0],n[1],n[2]);i(o.h,o.s,o.v)}}else if(-1!==t.indexOf("hsv")){var r=t.replace(/hsva|hsv|\(|\)/gm,"").split(/\s|,/g).filter(function(t){return""!==t}).map(function(t,e){return e>2?parseFloat(t):parseInt(t,10)});4===r.length?this._alpha=Math.floor(100*parseFloat(r[3])):3===r.length&&(this._alpha=100),r.length>=3&&i(r[0],r[1],r[2])}else if(-1!==t.indexOf("rgb")){var s=t.replace(/rgba|rgb|\(|\)/gm,"").split(/\s|,/g).filter(function(t){return""!==t}).map(function(t,e){return e>2?parseFloat(t):parseInt(t,10)});if(4===s.length?this._alpha=Math.floor(100*parseFloat(s[3])):3===s.length&&(this._alpha=100),s.length>=3){var a=Al(s[0],s[1],s[2]);i(a.h,a.s,a.v)}}else if(-1!==t.indexOf("#")){var l=t.replace("#","").trim();if(!/^(?:[0-9a-fA-F]{3}){1,2}|[0-9a-fA-F]{8}$/.test(l))return;var c=void 0,u=void 0,h=void 0;3===l.length?(c=Ml(l[0]+l[0]),u=Ml(l[1]+l[1]),h=Ml(l[2]+l[2])):6!==l.length&&8!==l.length||(c=Ml(l.substring(0,2)),u=Ml(l.substring(2,4)),h=Ml(l.substring(4,6))),8===l.length?this._alpha=Math.floor(Ml(l.substring(6))/255*100):3!==l.length&&6!==l.length||(this._alpha=100);var p=Al(c,u,h);i(p.h,p.s,p.v)}},t.prototype.compare=function(t){return Math.abs(t._hue-this._hue)<2&&Math.abs(t._saturation-this._saturation)<1&&Math.abs(t._value-this._value)<1&&Math.abs(t._alpha-this._alpha)<1},t.prototype.doOnChange=function(){var t=this._hue,e=this._saturation,i=this._value,n=this._alpha,o=this.format;if(this.enableAlpha)switch(o){case"hsl":var r=wl(t,e/100,i/100);this.value="hsla("+t+", "+Math.round(100*r[1])+"%, "+Math.round(100*r[2])+"%, "+n/100+")";break;case"hsv":this.value="hsva("+t+", "+Math.round(e)+"%, "+Math.round(i)+"%, "+n/100+")";break;default:var s=Nl(t,e,i),a=s.r,l=s.g,c=s.b;this.value="rgba("+a+", "+l+", "+c+", "+n/100+")"}else switch(o){case"hsl":var u=wl(t,e/100,i/100);this.value="hsl("+t+", "+Math.round(100*u[1])+"%, "+Math.round(100*u[2])+"%)";break;case"hsv":this.value="hsv("+t+", "+Math.round(e)+"%, "+Math.round(i)+"%)";break;case"rgb":var h=Nl(t,e,i),p=h.r,d=h.g,f=h.b;this.value="rgb("+p+", "+d+", "+f+")";break;default:this.value=function(t){var e=t.r,i=t.g,n=t.b,o=function(t){t=Math.min(Math.round(t),255);var e=Math.floor(t/16),i=t%16;return""+(Dl[e]||e)+(Dl[i]||i)};return isNaN(e)||isNaN(i)||isNaN(n)?"":"#"+o(e)+o(i)+o(n)}(Nl(t,e,i))}},t}(),Pl=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"el-zoom-in-top"},on:{"after-leave":t.doDestroy}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.showPopper,expression:"showPopper"}],staticClass:"el-color-dropdown"},[i("div",{staticClass:"el-color-dropdown__main-wrapper"},[i("hue-slider",{ref:"hue",staticStyle:{float:"right"},attrs:{color:t.color,vertical:""}}),i("sv-panel",{ref:"sl",attrs:{color:t.color}})],1),t.showAlpha?i("alpha-slider",{ref:"alpha",attrs:{color:t.color}}):t._e(),t.predefine?i("predefine",{attrs:{color:t.color,colors:t.predefine}}):t._e(),i("div",{staticClass:"el-color-dropdown__btns"},[i("span",{staticClass:"el-color-dropdown__value"},[i("el-input",{attrs:{"validate-event":!1,size:"mini"},on:{blur:t.handleConfirm},nativeOn:{keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.handleConfirm(e):null}},model:{value:t.customInput,callback:function(e){t.customInput=e},expression:"customInput"}})],1),i("el-button",{staticClass:"el-color-dropdown__link-btn",attrs:{size:"mini",type:"text"},on:{click:function(e){t.$emit("clear")}}},[t._v("\n        "+t._s(t.t("el.colorpicker.clear"))+"\n      ")]),i("el-button",{staticClass:"el-color-dropdown__btn",attrs:{plain:"",size:"mini"},on:{click:t.confirmValue}},[t._v("\n        "+t._s(t.t("el.colorpicker.confirm"))+"\n      ")])],1)],1)])};Pl._withStripped=!0;var Bl=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"el-color-svpanel",style:{backgroundColor:this.background}},[e("div",{staticClass:"el-color-svpanel__white"}),e("div",{staticClass:"el-color-svpanel__black"}),e("div",{staticClass:"el-color-svpanel__cursor",style:{top:this.cursorTop+"px",left:this.cursorLeft+"px"}},[e("div")])])};Bl._withStripped=!0;var Fl=!1,Hl=function(t,e){if(!ui.a.prototype.$isServer){var i=function(t){e.drag&&e.drag(t)},n=function t(n){document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",t),document.onselectstart=null,document.ondragstart=null,Fl=!1,e.end&&e.end(n)};t.addEventListener("mousedown",function(t){Fl||(document.onselectstart=function(){return!1},document.ondragstart=function(){return!1},document.addEventListener("mousemove",i),document.addEventListener("mouseup",n),Fl=!0,e.start&&e.start(t))})}},Ul=o({name:"el-sl-panel",props:{color:{required:!0}},computed:{colorValue:function(){return{hue:this.color.get("hue"),value:this.color.get("value")}}},watch:{colorValue:function(){this.update()}},methods:{update:function(){var t=this.color.get("saturation"),e=this.color.get("value"),i=this.$el,n=i.clientWidth,o=i.clientHeight;this.cursorLeft=t*n/100,this.cursorTop=(100-e)*o/100,this.background="hsl("+this.color.get("hue")+", 100%, 50%)"},handleDrag:function(t){var e=this.$el.getBoundingClientRect(),i=t.clientX-e.left,n=t.clientY-e.top;i=Math.max(0,i),i=Math.min(i,e.width),n=Math.max(0,n),n=Math.min(n,e.height),this.cursorLeft=i,this.cursorTop=n,this.color.set({saturation:i/e.width*100,value:100-n/e.height*100})}},mounted:function(){var t=this;Hl(this.$el,{drag:function(e){t.handleDrag(e)},end:function(e){t.handleDrag(e)}}),this.update()},data:function(){return{cursorTop:0,cursorLeft:0,background:"hsl(0, 100%, 50%)"}}},Bl,[],!1,null,null,null);Ul.options.__file="packages/color-picker/src/components/sv-panel.vue";var Vl=Ul.exports,Gl=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"el-color-hue-slider",class:{"is-vertical":this.vertical}},[e("div",{ref:"bar",staticClass:"el-color-hue-slider__bar",on:{click:this.handleClick}}),e("div",{ref:"thumb",staticClass:"el-color-hue-slider__thumb",style:{left:this.thumbLeft+"px",top:this.thumbTop+"px"}})])};Gl._withStripped=!0;var Wl=o({name:"el-color-hue-slider",props:{color:{required:!0},vertical:Boolean},data:function(){return{thumbLeft:0,thumbTop:0}},computed:{hueValue:function(){return this.color.get("hue")}},watch:{hueValue:function(){this.update()}},methods:{handleClick:function(t){var e=this.$refs.thumb;t.target!==e&&this.handleDrag(t)},handleDrag:function(t){var e=this.$el.getBoundingClientRect(),i=this.$refs.thumb,n=void 0;if(this.vertical){var o=t.clientY-e.top;o=Math.min(o,e.height-i.offsetHeight/2),o=Math.max(i.offsetHeight/2,o),n=Math.round((o-i.offsetHeight/2)/(e.height-i.offsetHeight)*360)}else{var r=t.clientX-e.left;r=Math.min(r,e.width-i.offsetWidth/2),r=Math.max(i.offsetWidth/2,r),n=Math.round((r-i.offsetWidth/2)/(e.width-i.offsetWidth)*360)}this.color.set("hue",n)},getThumbLeft:function(){if(this.vertical)return 0;var t=this.$el,e=this.color.get("hue");if(!t)return 0;var i=this.$refs.thumb;return Math.round(e*(t.offsetWidth-i.offsetWidth/2)/360)},getThumbTop:function(){if(!this.vertical)return 0;var t=this.$el,e=this.color.get("hue");if(!t)return 0;var i=this.$refs.thumb;return Math.round(e*(t.offsetHeight-i.offsetHeight/2)/360)},update:function(){this.thumbLeft=this.getThumbLeft(),this.thumbTop=this.getThumbTop()}},mounted:function(){var t=this,e=this.$refs,i=e.bar,n=e.thumb,o={drag:function(e){t.handleDrag(e)},end:function(e){t.handleDrag(e)}};Hl(i,o),Hl(n,o),this.update()}},Gl,[],!1,null,null,null);Wl.options.__file="packages/color-picker/src/components/hue-slider.vue";var $l=Wl.exports,jl=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"el-color-alpha-slider",class:{"is-vertical":this.vertical}},[e("div",{ref:"bar",staticClass:"el-color-alpha-slider__bar",style:{background:this.background},on:{click:this.handleClick}}),e("div",{ref:"thumb",staticClass:"el-color-alpha-slider__thumb",style:{left:this.thumbLeft+"px",top:this.thumbTop+"px"}})])};jl._withStripped=!0;var zl=o({name:"el-color-alpha-slider",props:{color:{required:!0},vertical:Boolean},watch:{"color._alpha":function(){this.update()},"color.value":function(){this.update()}},methods:{handleClick:function(t){var e=this.$refs.thumb;t.target!==e&&this.handleDrag(t)},handleDrag:function(t){var e=this.$el.getBoundingClientRect(),i=this.$refs.thumb;if(this.vertical){var n=t.clientY-e.top;n=Math.max(i.offsetHeight/2,n),n=Math.min(n,e.height-i.offsetHeight/2),this.color.set("alpha",Math.round((n-i.offsetHeight/2)/(e.height-i.offsetHeight)*100))}else{var o=t.clientX-e.left;o=Math.max(i.offsetWidth/2,o),o=Math.min(o,e.width-i.offsetWidth/2),this.color.set("alpha",Math.round((o-i.offsetWidth/2)/(e.width-i.offsetWidth)*100))}},getThumbLeft:function(){if(this.vertical)return 0;var t=this.$el,e=this.color._alpha;if(!t)return 0;var i=this.$refs.thumb;return Math.round(e*(t.offsetWidth-i.offsetWidth/2)/100)},getThumbTop:function(){if(!this.vertical)return 0;var t=this.$el,e=this.color._alpha;if(!t)return 0;var i=this.$refs.thumb;return Math.round(e*(t.offsetHeight-i.offsetHeight/2)/100)},getBackground:function(){if(this.color&&this.color.value){var t=this.color.toRgb(),e=t.r,i=t.g,n=t.b;return"linear-gradient(to right, rgba("+e+", "+i+", "+n+", 0) 0%, rgba("+e+", "+i+", "+n+", 1) 100%)"}return null},update:function(){this.thumbLeft=this.getThumbLeft(),this.thumbTop=this.getThumbTop(),this.background=this.getBackground()}},data:function(){return{thumbLeft:0,thumbTop:0,background:null}},mounted:function(){var t=this,e=this.$refs,i=e.bar,n=e.thumb,o={drag:function(e){t.handleDrag(e)},end:function(e){t.handleDrag(e)}};Hl(i,o),Hl(n,o),this.update()}},jl,[],!1,null,null,null);zl.options.__file="packages/color-picker/src/components/alpha-slider.vue";var Xl=zl.exports,Yl=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"el-color-predefine"},[i("div",{staticClass:"el-color-predefine__colors"},t._l(t.rgbaColors,function(e,n){return i("div",{key:t.colors[n],staticClass:"el-color-predefine__color-selector",class:{selected:e.selected,"is-alpha":e._alpha<100},on:{click:function(e){t.handleSelect(n)}}},[i("div",{style:{"background-color":e.value}})])}),0)])};Yl._withStripped=!0;var Kl=o({props:{colors:{type:Array,required:!0},color:{required:!0}},data:function(){return{rgbaColors:this.parseColors(this.colors,this.color)}},methods:{handleSelect:function(t){this.color.fromString(this.colors[t])},parseColors:function(t,e){return t.map(function(t){var i=new Ll;return i.enableAlpha=!0,i.format="rgba",i.fromString(t),i.selected=i.value===e.value,i})}},watch:{"$parent.currentColor":function(t){var e=new Ll;e.fromString(t),this.rgbaColors.forEach(function(t){t.selected=e.compare(t)})},colors:function(t){this.rgbaColors=this.parseColors(t,this.color)},color:function(t){this.rgbaColors=this.parseColors(this.colors,t)}}},Yl,[],!1,null,null,null);Kl.options.__file="packages/color-picker/src/components/predefine.vue";var Jl=Kl.exports,ql=o({name:"el-color-picker-dropdown",mixins:[L.a,f.a],components:{SvPanel:Vl,HueSlider:$l,AlphaSlider:Xl,ElInput:p.a,ElButton:z.a,Predefine:Jl},props:{color:{required:!0},showAlpha:Boolean,predefine:Array},data:function(){return{customInput:""}},computed:{currentColor:function(){var t=this.$parent;return t.value||t.showPanelColor?t.color.value:""}},methods:{confirmValue:function(){this.$emit("pick")},handleConfirm:function(){this.color.fromString(this.customInput)}},mounted:function(){this.$parent.popperElm=this.popperElm=this.$el,this.referenceElm=this.$parent.$el},watch:{showPopper:function(t){var e=this;!0===t&&this.$nextTick(function(){var t=e.$refs,i=t.sl,n=t.hue,o=t.alpha;i&&i.update(),n&&n.update(),o&&o.update()})},currentColor:{immediate:!0,handler:function(t){this.customInput=t}}}},Pl,[],!1,null,null,null);ql.options.__file="packages/color-picker/src/components/picker-dropdown.vue";var Zl=ql.exports,Ql=o({name:"ElColorPicker",mixins:[S.a],props:{value:String,showAlpha:Boolean,colorFormat:String,disabled:Boolean,size:String,popperClass:String,predefine:Array},inject:{elForm:{default:""},elFormItem:{default:""}},directives:{Clickoutside:M.a},computed:{displayedColor:function(){return this.value||this.showPanelColor?this.displayedRgb(this.color,this.showAlpha):"transparent"},_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},colorSize:function(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size},colorDisabled:function(){return this.disabled||(this.elForm||{}).disabled}},watch:{value:function(t){t?t&&t!==this.color.value&&this.color.fromString(t):this.showPanelColor=!1},color:{deep:!0,handler:function(){this.showPanelColor=!0}},displayedColor:function(t){if(this.showPicker){var e=new Ll({enableAlpha:this.showAlpha,format:this.colorFormat});e.fromString(this.value),t!==this.displayedRgb(e,this.showAlpha)&&this.$emit("active-change",t)}}},methods:{handleTrigger:function(){this.colorDisabled||(this.showPicker=!this.showPicker)},confirmValue:function(){var t=this.color.value;this.$emit("input",t),this.$emit("change",t),this.dispatch("ElFormItem","el.form.change",t),this.showPicker=!1},clearValue:function(){this.$emit("input",null),this.$emit("change",null),null!==this.value&&this.dispatch("ElFormItem","el.form.change",null),this.showPanelColor=!1,this.showPicker=!1,this.resetColor()},hide:function(){this.showPicker=!1,this.resetColor()},resetColor:function(){var t=this;this.$nextTick(function(e){t.value?t.color.fromString(t.value):t.showPanelColor=!1})},displayedRgb:function(t,e){if(!(t instanceof Ll))throw Error("color should be instance of Color Class");var i=t.toRgb(),n=i.r,o=i.g,r=i.b;return e?"rgba("+n+", "+o+", "+r+", "+t.get("alpha")/100+")":"rgb("+n+", "+o+", "+r+")"}},mounted:function(){var t=this.value;t&&this.color.fromString(t),this.popperElm=this.$refs.dropdown.$el},data:function(){return{color:new Ll({enableAlpha:this.showAlpha,format:this.colorFormat}),showPicker:!1,showPanelColor:!1}},components:{PickerDropdown:Zl}},Ol,[],!1,null,null,null);Ql.options.__file="packages/color-picker/src/main.vue";var tc=Ql.exports;tc.install=function(t){t.component(tc.name,tc)};var ec=tc,ic=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"el-transfer"},[i("transfer-panel",t._b({ref:"leftPanel",attrs:{data:t.sourceData,title:t.titles[0]||t.t("el.transfer.titles.0"),"default-checked":t.leftDefaultChecked,placeholder:t.filterPlaceholder||t.t("el.transfer.filterPlaceholder")},on:{"checked-change":t.onSourceCheckedChange}},"transfer-panel",t.$props,!1),[t._t("left-footer")],2),i("div",{staticClass:"el-transfer__buttons"},[i("el-button",{class:["el-transfer__button",t.hasButtonTexts?"is-with-texts":""],attrs:{type:"primary",disabled:0===t.rightChecked.length},nativeOn:{click:function(e){return t.addToLeft(e)}}},[i("i",{staticClass:"el-icon-arrow-left"}),void 0!==t.buttonTexts[0]?i("span",[t._v(t._s(t.buttonTexts[0]))]):t._e()]),i("el-button",{class:["el-transfer__button",t.hasButtonTexts?"is-with-texts":""],attrs:{type:"primary",disabled:0===t.leftChecked.length},nativeOn:{click:function(e){return t.addToRight(e)}}},[void 0!==t.buttonTexts[1]?i("span",[t._v(t._s(t.buttonTexts[1]))]):t._e(),i("i",{staticClass:"el-icon-arrow-right"})])],1),i("transfer-panel",t._b({ref:"rightPanel",attrs:{data:t.targetData,title:t.titles[1]||t.t("el.transfer.titles.1"),"default-checked":t.rightDefaultChecked,placeholder:t.filterPlaceholder||t.t("el.transfer.filterPlaceholder")},on:{"checked-change":t.onTargetCheckedChange}},"transfer-panel",t.$props,!1),[t._t("right-footer")],2)],1)};ic._withStripped=!0;var nc=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"el-transfer-panel"},[i("p",{staticClass:"el-transfer-panel__header"},[i("el-checkbox",{attrs:{indeterminate:t.isIndeterminate},on:{change:t.handleAllCheckedChange},model:{value:t.allChecked,callback:function(e){t.allChecked=e},expression:"allChecked"}},[t._v("\n      "+t._s(t.title)+"\n      "),i("span",[t._v(t._s(t.checkedSummary))])])],1),i("div",{class:["el-transfer-panel__body",t.hasFooter?"is-with-footer":""]},[t.filterable?i("el-input",{staticClass:"el-transfer-panel__filter",attrs:{size:"small",placeholder:t.placeholder},nativeOn:{mouseenter:function(e){t.inputHover=!0},mouseleave:function(e){t.inputHover=!1}},model:{value:t.query,callback:function(e){t.query=e},expression:"query"}},[i("i",{class:["el-input__icon","el-icon-"+t.inputIcon],attrs:{slot:"prefix"},on:{click:t.clearQuery},slot:"prefix"})]):t._e(),i("el-checkbox-group",{directives:[{name:"show",rawName:"v-show",value:!t.hasNoMatch&&t.data.length>0,expression:"!hasNoMatch && data.length > 0"}],staticClass:"el-transfer-panel__list",class:{"is-filterable":t.filterable},model:{value:t.checked,callback:function(e){t.checked=e},expression:"checked"}},t._l(t.filteredData,function(e){return i("el-checkbox",{key:e[t.keyProp],staticClass:"el-transfer-panel__item",attrs:{label:e[t.keyProp],disabled:e[t.disabledProp]}},[i("option-content",{attrs:{option:e}})],1)}),1),i("p",{directives:[{name:"show",rawName:"v-show",value:t.hasNoMatch,expression:"hasNoMatch"}],staticClass:"el-transfer-panel__empty"},[t._v(t._s(t.t("el.transfer.noMatch")))]),i("p",{directives:[{name:"show",rawName:"v-show",value:0===t.data.length&&!t.hasNoMatch,expression:"data.length === 0 && !hasNoMatch"}],staticClass:"el-transfer-panel__empty"},[t._v(t._s(t.t("el.transfer.noData")))])],1),t.hasFooter?i("p",{staticClass:"el-transfer-panel__footer"},[t._t("default")],2):t._e()])};nc._withStripped=!0;var oc=o({mixins:[f.a],name:"ElTransferPanel",componentName:"ElTransferPanel",components:{ElCheckboxGroup:$i.a,ElCheckbox:ni.a,ElInput:p.a,OptionContent:{props:{option:Object},render:function(t){var e=function t(e){return"ElTransferPanel"===e.$options.componentName?e:e.$parent?t(e.$parent):e}(this),i=e.$parent||e;return e.renderContent?e.renderContent(t,this.option):i.$scopedSlots.default?i.$scopedSlots.default({option:this.option}):t("span",[this.option[e.labelProp]||this.option[e.keyProp]])}}},props:{data:{type:Array,default:function(){return[]}},renderContent:Function,placeholder:String,title:String,filterable:Boolean,format:Object,filterMethod:Function,defaultChecked:Array,props:Object},data:function(){return{checked:[],allChecked:!1,query:"",inputHover:!1,checkChangeByUser:!0}},watch:{checked:function(t,e){if(this.updateAllChecked(),this.checkChangeByUser){var i=t.concat(e).filter(function(i){return-1===t.indexOf(i)||-1===e.indexOf(i)});this.$emit("checked-change",t,i)}else this.$emit("checked-change",t),this.checkChangeByUser=!0},data:function(){var t=this,e=[],i=this.filteredData.map(function(e){return e[t.keyProp]});this.checked.forEach(function(t){i.indexOf(t)>-1&&e.push(t)}),this.checkChangeByUser=!1,this.checked=e},checkableData:function(){this.updateAllChecked()},defaultChecked:{immediate:!0,handler:function(t,e){var i=this;if(!e||t.length!==e.length||!t.every(function(t){return e.indexOf(t)>-1})){var n=[],o=this.checkableData.map(function(t){return t[i.keyProp]});t.forEach(function(t){o.indexOf(t)>-1&&n.push(t)}),this.checkChangeByUser=!1,this.checked=n}}}},computed:{filteredData:function(){var t=this;return this.data.filter(function(e){return"function"==typeof t.filterMethod?t.filterMethod(t.query,e):(e[t.labelProp]||e[t.keyProp].toString()).toLowerCase().indexOf(t.query.toLowerCase())>-1})},checkableData:function(){var t=this;return this.filteredData.filter(function(e){return!e[t.disabledProp]})},checkedSummary:function(){var t=this.checked.length,e=this.data.length,i=this.format,n=i.noChecked,o=i.hasChecked;return n&&o?t>0?o.replace(/\${checked}/g,t).replace(/\${total}/g,e):n.replace(/\${total}/g,e):t+"/"+e},isIndeterminate:function(){var t=this.checked.length;return t>0&&t<this.checkableData.length},hasNoMatch:function(){return this.query.length>0&&0===this.filteredData.length},inputIcon:function(){return this.query.length>0&&this.inputHover?"circle-close":"search"},labelProp:function(){return this.props.label||"label"},keyProp:function(){return this.props.key||"key"},disabledProp:function(){return this.props.disabled||"disabled"},hasFooter:function(){return!!this.$slots.default}},methods:{updateAllChecked:function(){var t=this,e=this.checkableData.map(function(e){return e[t.keyProp]});this.allChecked=e.length>0&&e.every(function(e){return t.checked.indexOf(e)>-1})},handleAllCheckedChange:function(t){var e=this;this.checked=t?this.checkableData.map(function(t){return t[e.keyProp]}):[]},clearQuery:function(){"circle-close"===this.inputIcon&&(this.query="")}}},nc,[],!1,null,null,null);oc.options.__file="packages/transfer/src/transfer-panel.vue";var rc=oc.exports,sc=o({name:"ElTransfer",mixins:[S.a,f.a,E.a],components:{TransferPanel:rc,ElButton:z.a},props:{data:{type:Array,default:function(){return[]}},titles:{type:Array,default:function(){return[]}},buttonTexts:{type:Array,default:function(){return[]}},filterPlaceholder:{type:String,default:""},filterMethod:Function,leftDefaultChecked:{type:Array,default:function(){return[]}},rightDefaultChecked:{type:Array,default:function(){return[]}},renderContent:Function,value:{type:Array,default:function(){return[]}},format:{type:Object,default:function(){return{}}},filterable:Boolean,props:{type:Object,default:function(){return{label:"label",key:"key",disabled:"disabled"}}},targetOrder:{type:String,default:"original"}},data:function(){return{leftChecked:[],rightChecked:[]}},computed:{dataObj:function(){var t=this.props.key;return this.data.reduce(function(e,i){return(e[i[t]]=i)&&e},{})},sourceData:function(){var t=this;return this.data.filter(function(e){return-1===t.value.indexOf(e[t.props.key])})},targetData:function(){var t=this;return"original"===this.targetOrder?this.data.filter(function(e){return t.value.indexOf(e[t.props.key])>-1}):this.value.reduce(function(e,i){var n=t.dataObj[i];return n&&e.push(n),e},[])},hasButtonTexts:function(){return 2===this.buttonTexts.length}},watch:{value:function(t){this.dispatch("ElFormItem","el.form.change",t)}},methods:{getMigratingConfig:function(){return{props:{"footer-format":"footer-format is renamed to format."}}},onSourceCheckedChange:function(t,e){this.leftChecked=t,void 0!==e&&this.$emit("left-check-change",t,e)},onTargetCheckedChange:function(t,e){this.rightChecked=t,void 0!==e&&this.$emit("right-check-change",t,e)},addToLeft:function(){var t=this.value.slice();this.rightChecked.forEach(function(e){var i=t.indexOf(e);i>-1&&t.splice(i,1)}),this.$emit("input",t),this.$emit("change",t,"left",this.rightChecked)},addToRight:function(){var t=this,e=this.value.slice(),i=[],n=this.props.key;this.data.forEach(function(e){var o=e[n];t.leftChecked.indexOf(o)>-1&&-1===t.value.indexOf(o)&&i.push(o)}),e="unshift"===this.targetOrder?i.concat(e):e.concat(i),this.$emit("input",e),this.$emit("change",e,"right",this.leftChecked)},clearQuery:function(t){"left"===t?this.$refs.leftPanel.query="":"right"===t&&(this.$refs.rightPanel.query="")}}},ic,[],!1,null,null,null);sc.options.__file="packages/transfer/src/main.vue";var ac=sc.exports;ac.install=function(t){t.component(ac.name,ac)};var lc=ac,cc=function(){var t=this.$createElement;return(this._self._c||t)("section",{staticClass:"el-container",class:{"is-vertical":this.isVertical}},[this._t("default")],2)};cc._withStripped=!0;var uc=o({name:"ElContainer",componentName:"ElContainer",props:{direction:String},computed:{isVertical:function(){return"vertical"===this.direction||"horizontal"!==this.direction&&(!(!this.$slots||!this.$slots.default)&&this.$slots.default.some(function(t){var e=t.componentOptions&&t.componentOptions.tag;return"el-header"===e||"el-footer"===e}))}}},cc,[],!1,null,null,null);uc.options.__file="packages/container/src/main.vue";var hc=uc.exports;hc.install=function(t){t.component(hc.name,hc)};var pc=hc,dc=function(){var t=this.$createElement;return(this._self._c||t)("header",{staticClass:"el-header",style:{height:this.height}},[this._t("default")],2)};dc._withStripped=!0;var fc=o({name:"ElHeader",componentName:"ElHeader",props:{height:{type:String,default:"60px"}}},dc,[],!1,null,null,null);fc.options.__file="packages/header/src/main.vue";var gc=fc.exports;gc.install=function(t){t.component(gc.name,gc)};var _c=gc,mc=function(){var t=this.$createElement;return(this._self._c||t)("aside",{staticClass:"el-aside",style:{width:this.width}},[this._t("default")],2)};mc._withStripped=!0;var vc=o({name:"ElAside",componentName:"ElAside",props:{width:{type:String,default:"300px"}}},mc,[],!1,null,null,null);vc.options.__file="packages/aside/src/main.vue";var yc=vc.exports;yc.install=function(t){t.component(yc.name,yc)};var bc=yc,Tc=function(){var t=this.$createElement;return(this._self._c||t)("main",{staticClass:"el-main"},[this._t("default")],2)};Tc._withStripped=!0;var Ec=o({name:"ElMain",componentName:"ElMain"},Tc,[],!1,null,null,null);Ec.options.__file="packages/main/src/main.vue";var Cc=Ec.exports;Cc.install=function(t){t.component(Cc.name,Cc)};var Sc=Cc,kc=function(){var t=this.$createElement;return(this._self._c||t)("footer",{staticClass:"el-footer",style:{height:this.height}},[this._t("default")],2)};kc._withStripped=!0;var Oc=o({name:"ElFooter",componentName:"ElFooter",props:{height:{type:String,default:"60px"}}},kc,[],!1,null,null,null);Oc.options.__file="packages/footer/src/main.vue";var Ic=Oc.exports;Ic.install=function(t){t.component(Ic.name,Ic)};var wc=Ic,Rc=o({name:"ElTimeline",props:{reverse:{type:Boolean,default:!1}},provide:function(){return{timeline:this}},render:function(){var t=arguments[0],e=this.reverse,i={"el-timeline":!0,"is-reverse":e},n=this.$slots.default||[];return e&&(n=n.reverse()),t("ul",{class:i},[n])}},void 0,void 0,!1,null,null,null);Rc.options.__file="packages/timeline/src/main.vue";var Dc=Rc.exports;Dc.install=function(t){t.component(Dc.name,Dc)};var xc=Dc,Mc=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("li",{staticClass:"el-timeline-item"},[i("div",{staticClass:"el-timeline-item__tail"}),t.$slots.dot?t._e():i("div",{staticClass:"el-timeline-item__node",class:["el-timeline-item__node--"+(t.size||""),"el-timeline-item__node--"+(t.type||"")],style:{backgroundColor:t.color}},[t.icon?i("i",{staticClass:"el-timeline-item__icon",class:t.icon}):t._e()]),t.$slots.dot?i("div",{staticClass:"el-timeline-item__dot"},[t._t("dot")],2):t._e(),i("div",{staticClass:"el-timeline-item__wrapper"},[t.hideTimestamp||"top"!==t.placement?t._e():i("div",{staticClass:"el-timeline-item__timestamp is-top"},[t._v("\n      "+t._s(t.timestamp)+"\n    ")]),i("div",{staticClass:"el-timeline-item__content"},[t._t("default")],2),t.hideTimestamp||"bottom"!==t.placement?t._e():i("div",{staticClass:"el-timeline-item__timestamp is-bottom"},[t._v("\n      "+t._s(t.timestamp)+"\n    ")])])])};Mc._withStripped=!0;var Ac=o({name:"ElTimelineItem",inject:["timeline"],props:{timestamp:String,hideTimestamp:{type:Boolean,default:!1},placement:{type:String,default:"bottom"},type:String,color:String,size:{type:String,default:"normal"},icon:String}},Mc,[],!1,null,null,null);Ac.options.__file="packages/timeline/src/item.vue";var Nc=Ac.exports;Nc.install=function(t){t.component(Nc.name,Nc)};var Lc=Nc,Pc=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("a",t._b({class:["el-link",t.type?"el-link--"+t.type:"",t.disabled&&"is-disabled",t.underline&&!t.disabled&&"is-underline"],attrs:{href:t.disabled?null:t.href},on:{click:t.handleClick}},"a",t.$attrs,!1),[t.icon?i("i",{class:t.icon}):t._e(),t.$slots.default?i("span",{staticClass:"el-link--inner"},[t._t("default")],2):t._e(),t.$slots.icon?[t.$slots.icon?t._t("icon"):t._e()]:t._e()],2)};Pc._withStripped=!0;var Bc=o({name:"ElLink",props:{type:{type:String,default:"default"},underline:{type:Boolean,default:!0},disabled:Boolean,href:String,icon:String},methods:{handleClick:function(t){this.disabled||this.href||this.$emit("click",t)}}},Pc,[],!1,null,null,null);Bc.options.__file="packages/link/src/main.vue";var Fc=Bc.exports;Fc.install=function(t){t.component(Fc.name,Fc)};var Hc=Fc,Uc=function(t,e){var i=e._c;return i("div",e._g(e._b({class:[e.data.staticClass,"el-divider","el-divider--"+e.props.direction]},"div",e.data.attrs,!1),e.listeners),[e.slots().default&&"vertical"!==e.props.direction?i("div",{class:["el-divider__text","is-"+e.props.contentPosition]},[e._t("default")],2):e._e()])};Uc._withStripped=!0;var Vc=o({name:"ElDivider",props:{direction:{type:String,default:"horizontal",validator:function(t){return-1!==["horizontal","vertical"].indexOf(t)}},contentPosition:{type:String,default:"center",validator:function(t){return-1!==["left","center","right"].indexOf(t)}}}},Uc,[],!0,null,null,null);Vc.options.__file="packages/divider/src/main.vue";var Gc=Vc.exports;Gc.install=function(t){t.component(Gc.name,Gc)};var Wc=Gc,$c=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"el-image"},[t.loading?t._t("placeholder",[i("div",{staticClass:"el-image__placeholder"})]):t.error?t._t("error",[i("div",{staticClass:"el-image__error"},[t._v(t._s(t.t("el.image.error")))])]):i("img",t._g(t._b({staticClass:"el-image__inner",class:{"el-image__inner--center":t.alignCenter,"el-image__preview":t.preview},style:t.imageStyle,attrs:{src:t.src},on:{click:t.clickHandler}},"img",t.$attrs,!1),t.$listeners)),t.preview?[t.showViewer?i("image-viewer",{attrs:{"z-index":t.zIndex,"initial-index":t.imageIndex,"on-close":t.closeViewer,"url-list":t.previewSrcList}}):t._e()]:t._e()],2)};$c._withStripped=!0;var jc=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"viewer-fade"}},[i("div",{ref:"el-image-viewer__wrapper",staticClass:"el-image-viewer__wrapper",style:{"z-index":t.viewerZIndex},attrs:{tabindex:"-1"}},[i("div",{staticClass:"el-image-viewer__mask",on:{click:function(e){return e.target!==e.currentTarget?null:t.handleMaskClick(e)}}}),i("span",{staticClass:"el-image-viewer__btn el-image-viewer__close",on:{click:t.hide}},[i("i",{staticClass:"el-icon-close"})]),t.isSingle?t._e():[i("span",{staticClass:"el-image-viewer__btn el-image-viewer__prev",class:{"is-disabled":!t.infinite&&t.isFirst},on:{click:t.prev}},[i("i",{staticClass:"el-icon-arrow-left"})]),i("span",{staticClass:"el-image-viewer__btn el-image-viewer__next",class:{"is-disabled":!t.infinite&&t.isLast},on:{click:t.next}},[i("i",{staticClass:"el-icon-arrow-right"})])],i("div",{staticClass:"el-image-viewer__btn el-image-viewer__actions"},[i("div",{staticClass:"el-image-viewer__actions__inner"},[i("i",{staticClass:"el-icon-zoom-out",on:{click:function(e){t.handleActions("zoomOut")}}}),i("i",{staticClass:"el-icon-zoom-in",on:{click:function(e){t.handleActions("zoomIn")}}}),i("i",{staticClass:"el-image-viewer__actions__divider"}),i("i",{class:t.mode.icon,on:{click:t.toggleMode}}),i("i",{staticClass:"el-image-viewer__actions__divider"}),i("i",{staticClass:"el-icon-refresh-left",on:{click:function(e){t.handleActions("anticlocelise")}}}),i("i",{staticClass:"el-icon-refresh-right",on:{click:function(e){t.handleActions("clocelise")}}})])]),i("div",{staticClass:"el-image-viewer__canvas"},t._l(t.urlList,function(e,n){return n===t.index?i("img",{key:e,ref:"img",refInFor:!0,staticClass:"el-image-viewer__img",style:t.imgStyle,attrs:{src:t.currentImg},on:{load:t.handleImgLoad,error:t.handleImgError,mousedown:t.handleMouseDown}}):t._e()}),0)],2)])};jc._withStripped=!0;var zc=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},Xc={CONTAIN:{name:"contain",icon:"el-icon-full-screen"},ORIGINAL:{name:"original",icon:"el-icon-c-scale-to-original"}},Yc=Object(g.isFirefox)()?"DOMMouseScroll":"mousewheel",Kc=o({name:"elImageViewer",props:{urlList:{type:Array,default:function(){return[]}},zIndex:{type:Number,default:2e3},onSwitch:{type:Function,default:function(){}},onClose:{type:Function,default:function(){}},initialIndex:{type:Number,default:0},appendToBody:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0}},data:function(){return{index:this.initialIndex,isShow:!1,infinite:!0,loading:!1,mode:Xc.CONTAIN,transform:{scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}},computed:{isSingle:function(){return this.urlList.length<=1},isFirst:function(){return 0===this.index},isLast:function(){return this.index===this.urlList.length-1},currentImg:function(){return this.urlList[this.index]},imgStyle:function(){var t=this.transform,e=t.scale,i=t.deg,n=t.offsetX,o=t.offsetY,r={transform:"scale("+e+") rotate("+i+"deg)",transition:t.enableTransition?"transform .3s":"","margin-left":n+"px","margin-top":o+"px"};return this.mode===Xc.CONTAIN&&(r.maxWidth=r.maxHeight="100%"),r},viewerZIndex:function(){var t=y.PopupManager.nextZIndex();return this.zIndex>t?this.zIndex:t}},watch:{index:{handler:function(t){this.reset(),this.onSwitch(t)}},currentImg:function(t){var e=this;this.$nextTick(function(t){e.$refs.img[0].complete||(e.loading=!0)})}},methods:{hide:function(){this.deviceSupportUninstall(),this.onClose()},deviceSupportInstall:function(){var t=this;this._keyDownHandler=function(e){switch(e.stopPropagation(),e.keyCode){case 27:t.hide();break;case 32:t.toggleMode();break;case 37:t.prev();break;case 38:t.handleActions("zoomIn");break;case 39:t.next();break;case 40:t.handleActions("zoomOut")}},this._mouseWheelHandler=Object(g.rafThrottle)(function(e){(e.wheelDelta?e.wheelDelta:-e.detail)>0?t.handleActions("zoomIn",{zoomRate:.015,enableTransition:!1}):t.handleActions("zoomOut",{zoomRate:.015,enableTransition:!1})}),Object(ft.on)(document,"keydown",this._keyDownHandler),Object(ft.on)(document,Yc,this._mouseWheelHandler)},deviceSupportUninstall:function(){Object(ft.off)(document,"keydown",this._keyDownHandler),Object(ft.off)(document,Yc,this._mouseWheelHandler),this._keyDownHandler=null,this._mouseWheelHandler=null},handleImgLoad:function(t){this.loading=!1},handleImgError:function(t){this.loading=!1,t.target.alt="加载失败"},handleMouseDown:function(t){var e=this;if(!this.loading&&0===t.button){var i=this.transform,n=i.offsetX,o=i.offsetY,r=t.pageX,s=t.pageY;this._dragHandler=Object(g.rafThrottle)(function(t){e.transform.offsetX=n+t.pageX-r,e.transform.offsetY=o+t.pageY-s}),Object(ft.on)(document,"mousemove",this._dragHandler),Object(ft.on)(document,"mouseup",function(t){Object(ft.off)(document,"mousemove",e._dragHandler)}),t.preventDefault()}},handleMaskClick:function(){this.maskClosable&&this.hide()},reset:function(){this.transform={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}},toggleMode:function(){if(!this.loading){var t=Object.keys(Xc),e=(Object.values(Xc).indexOf(this.mode)+1)%t.length;this.mode=Xc[t[e]],this.reset()}},prev:function(){if(!this.isFirst||this.infinite){var t=this.urlList.length;this.index=(this.index-1+t)%t}},next:function(){if(!this.isLast||this.infinite){var t=this.urlList.length;this.index=(this.index+1)%t}},handleActions:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.loading){var i=zc({zoomRate:.2,rotateDeg:90,enableTransition:!0},e),n=i.zoomRate,o=i.rotateDeg,r=i.enableTransition,s=this.transform;switch(t){case"zoomOut":s.scale>.2&&(s.scale=parseFloat((s.scale-n).toFixed(3)));break;case"zoomIn":s.scale=parseFloat((s.scale+n).toFixed(3));break;case"clocelise":s.deg+=o;break;case"anticlocelise":s.deg-=o}s.enableTransition=r}}},mounted:function(){this.deviceSupportInstall(),this.appendToBody&&document.body.appendChild(this.$el),this.$refs["el-image-viewer__wrapper"].focus()},destroyed:function(){this.appendToBody&&this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)}},jc,[],!1,null,null,null);Kc.options.__file="packages/image/src/image-viewer.vue";var Jc=Kc.exports,qc=function(){return void 0!==document.documentElement.style.objectFit},Zc="none",Qc="contain",tu="cover",eu="fill",iu="scale-down",nu="",ou=o({name:"ElImage",mixins:[f.a],inheritAttrs:!1,components:{ImageViewer:Jc},props:{src:String,fit:String,lazy:Boolean,scrollContainer:{},previewSrcList:{type:Array,default:function(){return[]}},zIndex:{type:Number,default:2e3}},data:function(){return{loading:!0,error:!1,show:!this.lazy,imageWidth:0,imageHeight:0,showViewer:!1}},computed:{imageStyle:function(){var t=this.fit;return!this.$isServer&&t?qc()?{"object-fit":t}:this.getImageStyle(t):{}},alignCenter:function(){return!this.$isServer&&!qc()&&this.fit!==eu},preview:function(){var t=this.previewSrcList;return Array.isArray(t)&&t.length>0},imageIndex:function(){var t=0,e=this.previewSrcList.indexOf(this.src);return e>=0&&(t=e),t}},watch:{src:function(t){this.show&&this.loadImage()},show:function(t){t&&this.loadImage()}},mounted:function(){this.lazy?this.addLazyLoadListener():this.loadImage()},beforeDestroy:function(){this.lazy&&this.removeLazyLoadListener()},methods:{loadImage:function(){var t=this;if(!this.$isServer){this.loading=!0,this.error=!1;var e=new Image;e.onload=function(i){return t.handleLoad(i,e)},e.onerror=this.handleError.bind(this),Object.keys(this.$attrs).forEach(function(i){var n=t.$attrs[i];e.setAttribute(i,n)}),e.src=this.src}},handleLoad:function(t,e){this.imageWidth=e.width,this.imageHeight=e.height,this.loading=!1,this.error=!1},handleError:function(t){this.loading=!1,this.error=!0,this.$emit("error",t)},handleLazyLoad:function(){Object(ft.isInContainer)(this.$el,this._scrollContainer)&&(this.show=!0,this.removeLazyLoadListener())},addLazyLoadListener:function(){if(!this.$isServer){var t=this.scrollContainer,e=null;(e=Object(Na.isHtmlElement)(t)?t:Object(Na.isString)(t)?document.querySelector(t):Object(ft.getScrollContainer)(this.$el))&&(this._scrollContainer=e,this._lazyLoadHandler=Ya()(200,this.handleLazyLoad),Object(ft.on)(e,"scroll",this._lazyLoadHandler),this.handleLazyLoad())}},removeLazyLoadListener:function(){var t=this._scrollContainer,e=this._lazyLoadHandler;!this.$isServer&&t&&e&&(Object(ft.off)(t,"scroll",e),this._scrollContainer=null,this._lazyLoadHandler=null)},getImageStyle:function(t){var e=this.imageWidth,i=this.imageHeight,n=this.$el,o=n.clientWidth,r=n.clientHeight;if(!(e&&i&&o&&r))return{};var s=e/i,a=o/r;t===iu&&(t=e<o&&i<r?Zc:Qc);switch(t){case Zc:return{width:"auto",height:"auto"};case Qc:return s<a?{width:"auto"}:{height:"auto"};case tu:return s<a?{height:"auto"}:{width:"auto"};default:return{}}},clickHandler:function(){this.preview&&(nu=document.body.style.overflow,document.body.style.overflow="hidden",this.showViewer=!0)},closeViewer:function(){document.body.style.overflow=nu,this.showViewer=!1}}},$c,[],!1,null,null,null);ou.options.__file="packages/image/src/main.vue";var ru=ou.exports;ru.install=function(t){t.component(ru.name,ru)};var su=ru,au=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"el-calendar"},[i("div",{staticClass:"el-calendar__header"},[i("div",{staticClass:"el-calendar__title"},[t._v("\n      "+t._s(t.i18nDate)+"\n    ")]),0===t.validatedRange.length?i("div",{staticClass:"el-calendar__button-group"},[i("el-button-group",[i("el-button",{attrs:{type:"plain",size:"mini"},on:{click:function(e){t.selectDate("prev-month")}}},[t._v("\n          "+t._s(t.t("el.datepicker.prevMonth"))+"\n        ")]),i("el-button",{attrs:{type:"plain",size:"mini"},on:{click:function(e){t.selectDate("today")}}},[t._v("\n          "+t._s(t.t("el.datepicker.today"))+"\n        ")]),i("el-button",{attrs:{type:"plain",size:"mini"},on:{click:function(e){t.selectDate("next-month")}}},[t._v("\n          "+t._s(t.t("el.datepicker.nextMonth"))+"\n        ")])],1)],1):t._e()]),0===t.validatedRange.length?i("div",{key:"no-range",staticClass:"el-calendar__body"},[i("date-table",{attrs:{date:t.date,"selected-day":t.realSelectedDay,"first-day-of-week":t.realFirstDayOfWeek},on:{pick:t.pickDay}})],1):i("div",{key:"has-range",staticClass:"el-calendar__body"},t._l(t.validatedRange,function(e,n){return i("date-table",{key:n,attrs:{date:e[0],"selected-day":t.realSelectedDay,range:e,"hide-header":0!==n,"first-day-of-week":t.realFirstDayOfWeek},on:{pick:t.pickDay}})}),1)])};au._withStripped=!0;var lu=i(20),cu=i.n(lu),uu=o({props:{selectedDay:String,range:{type:Array,validator:function(t){if(!t||!t.length)return!0;var e=t[0],i=t[1];return Object(pn.validateRangeInOneMonth)(e,i)}},date:Date,hideHeader:Boolean,firstDayOfWeek:Number},inject:["elCalendar"],methods:{toNestedArr:function(t){return Object(pn.range)(t.length/7).map(function(e,i){var n=7*i;return t.slice(n,n+7)})},getFormateDate:function(t,e){if(!t||-1===["prev","current","next"].indexOf(e))throw new Error("invalid day or type");var i=this.curMonthDatePrefix;return"prev"===e?i=this.prevMonthDatePrefix:"next"===e&&(i=this.nextMonthDatePrefix),i+"-"+(t=("00"+t).slice(-2))},getCellClass:function(t){var e=t.text,i=t.type,n=[i];if("current"===i){var o=this.getFormateDate(e,i);o===this.selectedDay&&n.push("is-selected"),o===this.formatedToday&&n.push("is-today")}return n},pickDay:function(t){var e=t.text,i=t.type,n=this.getFormateDate(e,i);this.$emit("pick",n)},cellRenderProxy:function(t){var e=t.text,i=t.type,n=this.$createElement,o=this.elCalendar.$scopedSlots.dateCell;if(!o)return n("span",[e]);var r=this.getFormateDate(e,i);return o({date:new Date(r),data:{isSelected:this.selectedDay===r,type:i+"-month",day:r}})}},computed:{WEEK_DAYS:function(){return Object(pn.getI18nSettings)().dayNames},prevMonthDatePrefix:function(){var t=new Date(this.date.getTime());return t.setDate(0),cu.a.format(t,"yyyy-MM")},curMonthDatePrefix:function(){return cu.a.format(this.date,"yyyy-MM")},nextMonthDatePrefix:function(){var t=new Date(this.date.getFullYear(),this.date.getMonth()+1,1);return cu.a.format(t,"yyyy-MM")},formatedToday:function(){return this.elCalendar.formatedToday},isInRange:function(){return this.range&&this.range.length},rows:function(){var t=[];if(this.isInRange){var e=this.range,i=e[0],n=e[1],o=Object(pn.range)(n.getDate()-i.getDate()+1).map(function(t,e){return{text:i.getDate()+e,type:"current"}}),r=o.length%7;r=0===r?0:7-r;var s=Object(pn.range)(r).map(function(t,e){return{text:e+1,type:"next"}});t=o.concat(s)}else{var a=this.date,l=Object(pn.getFirstDayOfMonth)(a),c=(7+(l=0===l?7:l)-("number"==typeof this.firstDayOfWeek?this.firstDayOfWeek:1))%7,u=Object(pn.getPrevMonthLastDays)(a,c).map(function(t){return{text:t,type:"prev"}}),h=Object(pn.getMonthDays)(a).map(function(t){return{text:t,type:"current"}});t=[].concat(u,h);var p=Object(pn.range)(42-t.length).map(function(t,e){return{text:e+1,type:"next"}});t=t.concat(p)}return this.toNestedArr(t)},weekDays:function(){var t=this.firstDayOfWeek,e=this.WEEK_DAYS;return"number"!=typeof t||0===t?e.slice():e.slice(t).concat(e.slice(0,t))}},render:function(){var t=this,e=arguments[0],i=this.hideHeader?null:e("thead",[this.weekDays.map(function(t){return e("th",{key:t},[t])})]);return e("table",{class:{"el-calendar-table":!0,"is-range":this.isInRange},attrs:{cellspacing:"0",cellpadding:"0"}},[i,e("tbody",[this.rows.map(function(i,n){return e("tr",{class:{"el-calendar-table__row":!0,"el-calendar-table__row--hide-border":0===n&&t.hideHeader},key:n},[i.map(function(i,n){return e("td",{key:n,class:t.getCellClass(i),on:{click:t.pickDay.bind(t,i)}},[e("div",{class:"el-calendar-day"},[t.cellRenderProxy(i)])])})])})])])}},void 0,void 0,!1,null,null,null);uu.options.__file="packages/calendar/src/date-table.vue";var hu=uu.exports,pu=["prev-month","today","next-month"],du=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],fu=o({name:"ElCalendar",mixins:[f.a],components:{DateTable:hu,ElButton:z.a,ElButtonGroup:Y.a},props:{value:[Date,String,Number],range:{type:Array,validator:function(t){return!Array.isArray(t)||2===t.length&&t.every(function(t){return"string"==typeof t||"number"==typeof t||t instanceof Date})}},firstDayOfWeek:{type:Number,default:1}},provide:function(){return{elCalendar:this}},methods:{pickDay:function(t){this.realSelectedDay=t},selectDate:function(t){if(-1===pu.indexOf(t))throw new Error("invalid type "+t);var e="";(e="prev-month"===t?this.prevMonthDatePrefix+"-01":"next-month"===t?this.nextMonthDatePrefix+"-01":this.formatedToday)!==this.formatedDate&&this.pickDay(e)},toDate:function(t){if(!t)throw new Error("invalid val");return t instanceof Date?t:new Date(t)},rangeValidator:function(t,e){var i=this.realFirstDayOfWeek,n=e?i:0===i?6:i-1,o=(e?"start":"end")+" of range should be "+du[n]+".";return t.getDay()===n||(console.warn("[ElementCalendar]",o,"Invalid range will be ignored."),!1)}},computed:{prevMonthDatePrefix:function(){var t=new Date(this.date.getTime());return t.setDate(0),cu.a.format(t,"yyyy-MM")},curMonthDatePrefix:function(){return cu.a.format(this.date,"yyyy-MM")},nextMonthDatePrefix:function(){var t=new Date(this.date.getFullYear(),this.date.getMonth()+1,1);return cu.a.format(t,"yyyy-MM")},formatedDate:function(){return cu.a.format(this.date,"yyyy-MM-dd")},i18nDate:function(){var t=this.date.getFullYear(),e=this.date.getMonth()+1;return t+" "+this.t("el.datepicker.year")+" "+this.t("el.datepicker.month"+e)},formatedToday:function(){return cu.a.format(this.now,"yyyy-MM-dd")},realSelectedDay:{get:function(){return this.value?this.formatedDate:this.selectedDay},set:function(t){this.selectedDay=t;var e=new Date(t);this.$emit("input",e)}},date:function(){if(this.value)return this.toDate(this.value);if(this.realSelectedDay){var t=this.selectedDay.split("-");return new Date(t[0],t[1]-1,t[2])}return this.validatedRange.length?this.validatedRange[0][0]:this.now},validatedRange:function(){var t=this,e=this.range;if(!e)return[];if(2===(e=e.reduce(function(e,i,n){var o=t.toDate(i);return t.rangeValidator(o,0===n)&&(e=e.concat(o)),e},[])).length){var i=e,n=i[0],o=i[1];if(n>o)return console.warn("[ElementCalendar]end time should be greater than start time"),[];if(Object(pn.validateRangeInOneMonth)(n,o))return[[n,o]];var r=[],s=new Date(n.getFullYear(),n.getMonth()+1,1),a=this.toDate(s.getTime()-864e5);if(!Object(pn.validateRangeInOneMonth)(s,o))return console.warn("[ElementCalendar]start time and end time interval must not exceed two months"),[];r.push([n,a]);var l=this.realFirstDayOfWeek,c=s.getDay(),u=0;return c!==l&&(u=0===l?7-c:(u=l-c)>0?u:7+u),(s=this.toDate(s.getTime()+864e5*u)).getDate()<o.getDate()&&r.push([s,o]),r}return[]},realFirstDayOfWeek:function(){return this.firstDayOfWeek<1||this.firstDayOfWeek>6?0:Math.floor(this.firstDayOfWeek)}},data:function(){return{selectedDay:"",now:new Date}}},au,[],!1,null,null,null);fu.options.__file="packages/calendar/src/main.vue";var gu=fu.exports;gu.install=function(t){t.component(gu.name,gu)};var _u=gu,mu=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"el-fade-in"}},[t.visible?i("div",{staticClass:"el-backtop",style:{right:t.styleRight,bottom:t.styleBottom},on:{click:function(e){return e.stopPropagation(),t.handleClick(e)}}},[t._t("default",[i("el-icon",{attrs:{name:"caret-top"}})])],2):t._e()])};mu._withStripped=!0;var vu=function(t){return Math.pow(t,3)},yu=o({name:"ElBacktop",props:{visibilityHeight:{type:Number,default:200},target:[String],right:{type:Number,default:40},bottom:{type:Number,default:40}},data:function(){return{el:null,container:null,visible:!1}},computed:{styleBottom:function(){return this.bottom+"px"},styleRight:function(){return this.right+"px"}},mounted:function(){this.init(),this.throttledScrollHandler=Ya()(300,this.onScroll),this.container.addEventListener("scroll",this.throttledScrollHandler)},methods:{init:function(){if(this.container=document,this.el=document.documentElement,this.target){if(this.el=document.querySelector(this.target),!this.el)throw new Error("target is not existed: "+this.target);this.container=this.el}},onScroll:function(){var t=this.el.scrollTop;this.visible=t>=this.visibilityHeight},handleClick:function(t){this.scrollToTop(),this.$emit("click",t)},scrollToTop:function(){var t=this.el,e=Date.now(),i=t.scrollTop,n=window.requestAnimationFrame||function(t){return setTimeout(t,16)};n(function o(){var r,s=(Date.now()-e)/500;s<1?(t.scrollTop=i*(1-((r=s)<.5?vu(2*r)/2:1-vu(2*(1-r))/2)),n(o)):t.scrollTop=0})}},beforeDestroy:function(){this.container.removeEventListener("scroll",this.throttledScrollHandler)}},mu,[],!1,null,null,null);yu.options.__file="packages/backtop/src/main.vue";var bu=yu.exports;bu.install=function(t){t.component(bu.name,bu)};var Tu=bu,Eu=function(t,e){return t===window||t===document?document.documentElement[e]:t[e]},Cu=function(t){return Eu(t,"offsetHeight")},Su="ElInfiniteScroll",ku={delay:{type:Number,default:200},distance:{type:Number,default:0},disabled:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0}},Ou=function(t,e){return Object(Na.isHtmlElement)(t)?(i=ku,Object.keys(i||{}).map(function(t){return[t,i[t]]})).reduce(function(i,n){var o=n[0],r=n[1],s=r.type,a=r.default,l=t.getAttribute("infinite-scroll-"+o);switch(l=Object(Na.isUndefined)(e[l])?l:e[l],s){case Number:l=Number(l),l=Number.isNaN(l)?a:l;break;case Boolean:l=Object(Na.isDefined)(l)?"false"!==l&&Boolean(l):a;break;default:l=s(l)}return i[o]=l,i},{}):{};var i},Iu=function(t){return t.getBoundingClientRect().top},wu=function(t){var e=this[Su],i=e.el,n=e.vm,o=e.container,r=e.observer,s=Ou(i,n),a=s.distance;if(!s.disabled){var l=o.getBoundingClientRect();if(l.width||l.height){var c=!1;if(o===i){var u=o.scrollTop+function(t){return Eu(t,"clientHeight")}(o);c=o.scrollHeight-u<=a}else{c=Cu(i)+Iu(i)-Iu(o)-Cu(o)+Number.parseFloat(function(t,e){if(t===window&&(t=document.documentElement),1!==t.nodeType)return[];var i=window.getComputedStyle(t,null);return e?i[e]:i}(o,"borderBottomWidth"))<=a}c&&Object(Na.isFunction)(t)?t.call(n):r&&(r.disconnect(),this[Su].observer=null)}}},Ru={name:"InfiniteScroll",inserted:function(t,e,i){var n=e.value,o=i.context,r=Object(ft.getScrollContainer)(t,!0),s=Ou(t,o),a=s.delay,l=s.immediate,c=D()(a,wu.bind(t,n));(t[Su]={el:t,vm:o,container:r,onScroll:c},r)&&(r.addEventListener("scroll",c),l&&((t[Su].observer=new MutationObserver(c)).observe(r,{childList:!0,subtree:!0}),c()))},unbind:function(t){var e=t[Su],i=e.container,n=e.onScroll;i&&i.removeEventListener("scroll",n)},install:function(t){t.directive(Ru.name,Ru)}},Du=Ru,xu=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"el-page-header"},[i("div",{staticClass:"el-page-header__left",on:{click:function(e){t.$emit("back")}}},[i("i",{staticClass:"el-icon-back"}),i("div",{staticClass:"el-page-header__title"},[t._t("title",[t._v(t._s(t.title))])],2)]),i("div",{staticClass:"el-page-header__content"},[t._t("content",[t._v(t._s(t.content))])],2)])};xu._withStripped=!0;var Mu=o({name:"ElPageHeader",props:{title:{type:String,default:function(){return Object(Lo.t)("el.pageHeader.title")}},content:String}},xu,[],!1,null,null,null);Mu.options.__file="packages/page-header/src/main.vue";var Au=Mu.exports;Au.install=function(t){t.component(Au.name,Au)};var Nu=Au,Lu=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{class:["el-cascader-panel",this.border&&"is-bordered"],on:{keydown:this.handleKeyDown}},this._l(this.menus,function(t,i){return e("cascader-menu",{key:i,ref:"menu",refInFor:!0,attrs:{index:i,nodes:t}})}),1)};Lu._withStripped=!0;var Pu=i(43),Bu=i.n(Pu),Fu=function(t){return t.stopPropagation()},Hu=o({inject:["panel"],components:{ElCheckbox:ni.a,ElRadio:Bu.a},props:{node:{required:!0},nodeId:String},computed:{config:function(){return this.panel.config},isLeaf:function(){return this.node.isLeaf},isDisabled:function(){return this.node.isDisabled},checkedValue:function(){return this.panel.checkedValue},isChecked:function(){return this.node.isSameNode(this.checkedValue)},inActivePath:function(){return this.isInPath(this.panel.activePath)},inCheckedPath:function(){var t=this;return!!this.config.checkStrictly&&this.panel.checkedNodePaths.some(function(e){return t.isInPath(e)})},value:function(){return this.node.getValueByOption()}},methods:{handleExpand:function(){var t=this,e=this.panel,i=this.node,n=this.isDisabled,o=this.config,r=o.multiple;!o.checkStrictly&&n||i.loading||(o.lazy&&!i.loaded?e.lazyLoad(i,function(){var e=t.isLeaf;if(e||t.handleExpand(),r){var n=!!e&&i.checked;t.handleMultiCheckChange(n)}}):e.handleExpand(i))},handleCheckChange:function(){var t=this.panel,e=this.value,i=this.node;t.handleCheckChange(e),t.handleExpand(i)},handleMultiCheckChange:function(t){this.node.doCheck(t),this.panel.calculateMultiCheckedValue()},isInPath:function(t){var e=this.node;return(t[e.level-1]||{}).uid===e.uid},renderPrefix:function(t){var e=this.isLeaf,i=this.isChecked,n=this.config,o=n.checkStrictly;return n.multiple?this.renderCheckbox(t):o?this.renderRadio(t):e&&i?this.renderCheckIcon(t):null},renderPostfix:function(t){var e=this.node,i=this.isLeaf;return e.loading?this.renderLoadingIcon(t):i?null:this.renderExpandIcon(t)},renderCheckbox:function(t){var e=this.node,i=this.config,n=this.isDisabled,o={on:{change:this.handleMultiCheckChange},nativeOn:{}};return i.checkStrictly&&(o.nativeOn.click=Fu),t("el-checkbox",Zs()([{attrs:{value:e.checked,indeterminate:e.indeterminate,disabled:n}},o]))},renderRadio:function(t){var e=this.checkedValue,i=this.value,n=this.isDisabled;return Object(g.isEqual)(i,e)&&(i=e),t("el-radio",{attrs:{value:e,label:i,disabled:n},on:{change:this.handleCheckChange},nativeOn:{click:Fu}},[t("span")])},renderCheckIcon:function(t){return t("i",{class:"el-icon-check el-cascader-node__prefix"})},renderLoadingIcon:function(t){return t("i",{class:"el-icon-loading el-cascader-node__postfix"})},renderExpandIcon:function(t){return t("i",{class:"el-icon-arrow-right el-cascader-node__postfix"})},renderContent:function(t){var e=this.panel,i=this.node,n=e.renderLabelFn;return t("span",{class:"el-cascader-node__label"},[(n?n({node:i,data:i.data}):null)||i.label])}},render:function(t){var e=this,i=this.inActivePath,n=this.inCheckedPath,o=this.isChecked,r=this.isLeaf,s=this.isDisabled,a=this.config,l=this.nodeId,c=a.expandTrigger,u=a.checkStrictly,h=a.multiple,p=!u&&s,d={on:{}};return"click"===c?d.on.click=this.handleExpand:(d.on.mouseenter=function(t){e.handleExpand(),e.$emit("expand",t)},d.on.focus=function(t){e.handleExpand(),e.$emit("expand",t)}),!r||s||u||h||(d.on.click=this.handleCheckChange),t("li",Zs()([{attrs:{role:"menuitem",id:l,"aria-expanded":i,tabindex:p?null:-1},class:{"el-cascader-node":!0,"is-selectable":u,"in-active-path":i,"in-checked-path":n,"is-active":o,"is-disabled":p}},d]),[this.renderPrefix(t),this.renderContent(t),this.renderPostfix(t)])}},void 0,void 0,!1,null,null,null);Hu.options.__file="packages/cascader-panel/src/cascader-node.vue";var Uu=Hu.exports,Vu=o({name:"ElCascaderMenu",mixins:[f.a],inject:["panel"],components:{ElScrollbar:B.a,CascaderNode:Uu},props:{nodes:{type:Array,required:!0},index:Number},data:function(){return{activeNode:null,hoverTimer:null,id:Object(g.generateId)()}},computed:{isEmpty:function(){return!this.nodes.length},menuId:function(){return"cascader-menu-"+this.id+"-"+this.index}},methods:{handleExpand:function(t){this.activeNode=t.target},handleMouseMove:function(t){var e=this.activeNode,i=this.hoverTimer,n=this.$refs.hoverZone;if(e&&n)if(e.contains(t.target)){clearTimeout(i);var o=this.$el.getBoundingClientRect().left,r=t.clientX-o,s=this.$el,a=s.offsetWidth,l=s.offsetHeight,c=e.offsetTop,u=c+e.offsetHeight;n.innerHTML='\n          <path style="pointer-events: auto;" fill="transparent" d="M'+r+" "+c+" L"+a+" 0 V"+c+' Z" />\n          <path style="pointer-events: auto;" fill="transparent" d="M'+r+" "+u+" L"+a+" "+l+" V"+u+' Z" />\n        '}else i||(this.hoverTimer=setTimeout(this.clearHoverZone,this.panel.config.hoverThreshold))},clearHoverZone:function(){var t=this.$refs.hoverZone;t&&(t.innerHTML="")},renderEmptyText:function(t){return t("div",{class:"el-cascader-menu__empty-text"},[this.t("el.cascader.noData")])},renderNodeList:function(t){var e=this.menuId,i=this.panel.isHoverMenu,n={on:{}};i&&(n.on.expand=this.handleExpand);var o=this.nodes.map(function(i,o){var r=i.hasChildren;return t("cascader-node",Zs()([{key:i.uid,attrs:{node:i,"node-id":e+"-"+o,"aria-haspopup":r,"aria-owns":r?e:null}},n]))});return[].concat(o,[i?t("svg",{ref:"hoverZone",class:"el-cascader-menu__hover-zone"}):null])}},render:function(t){var e=this.isEmpty,i=this.menuId,n={nativeOn:{}};return this.panel.isHoverMenu&&(n.nativeOn.mousemove=this.handleMouseMove),t("el-scrollbar",Zs()([{attrs:{tag:"ul",role:"menu",id:i,"wrap-class":"el-cascader-menu__wrap","view-class":{"el-cascader-menu__list":!0,"is-empty":e}},class:"el-cascader-menu"},n]),[e?this.renderEmptyText(t):this.renderNodeList(t)])}},void 0,void 0,!1,null,null,null);Vu.options.__file="packages/cascader-panel/src/cascader-menu.vue";var Gu=Vu.exports,Wu=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}();var $u=0,ju=function(){function t(e,i,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.data=e,this.config=i,this.parent=n||null,this.level=this.parent?this.parent.level+1:1,this.uid=$u++,this.initState(),this.initChildren()}return t.prototype.initState=function(){var t=this.config,e=t.value,i=t.label;this.value=this.data[e],this.label=this.data[i],this.pathNodes=this.calculatePathNodes(),this.path=this.pathNodes.map(function(t){return t.value}),this.pathLabels=this.pathNodes.map(function(t){return t.label}),this.loading=!1,this.loaded=!1},t.prototype.initChildren=function(){var e=this,i=this.config,n=i.children,o=this.data[n];this.hasChildren=Array.isArray(o),this.children=(o||[]).map(function(n){return new t(n,i,e)})},t.prototype.calculatePathNodes=function(){for(var t=[this],e=this.parent;e;)t.unshift(e),e=e.parent;return t},t.prototype.getPath=function(){return this.path},t.prototype.getValue=function(){return this.value},t.prototype.getValueByOption=function(){return this.config.emitPath?this.getPath():this.getValue()},t.prototype.getText=function(t,e){return t?this.pathLabels.join(e):this.label},t.prototype.isSameNode=function(t){var e=this.getValueByOption();return this.config.multiple&&Array.isArray(t)?t.some(function(t){return Object(g.isEqual)(t,e)}):Object(g.isEqual)(t,e)},t.prototype.broadcast=function(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];var o="onParent"+Object(g.capitalize)(t);this.children.forEach(function(e){e&&(e.broadcast.apply(e,[t].concat(i)),e[o]&&e[o].apply(e,i))})},t.prototype.emit=function(t){var e=this.parent,i="onChild"+Object(g.capitalize)(t);if(e){for(var n=arguments.length,o=Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];e[i]&&e[i].apply(e,o),e.emit.apply(e,[t].concat(o))}},t.prototype.onParentCheck=function(t){this.isDisabled||this.setCheckState(t)},t.prototype.onChildCheck=function(){var t=this.children.filter(function(t){return!t.isDisabled}),e=!!t.length&&t.every(function(t){return t.checked});this.setCheckState(e)},t.prototype.setCheckState=function(t){var e=this.children.length,i=this.children.reduce(function(t,e){return t+(e.checked?1:e.indeterminate?.5:0)},0);this.checked=t,this.indeterminate=i!==e&&i>0},t.prototype.syncCheckState=function(t){var e=this.getValueByOption(),i=this.isSameNode(t,e);this.doCheck(i)},t.prototype.doCheck=function(t){this.checked!==t&&(this.config.checkStrictly?this.checked=t:(this.broadcast("check",t),this.setCheckState(t),this.emit("check")))},Wu(t,[{key:"isDisabled",get:function(){var t=this.data,e=this.parent,i=this.config,n=i.disabled,o=i.checkStrictly;return t[n]||!o&&e&&e.isDisabled}},{key:"isLeaf",get:function(){var t=this.data,e=this.loaded,i=this.hasChildren,n=this.children,o=this.config,r=o.lazy,s=o.leaf;if(r){var a=Object(Gt.isDef)(t[s])?t[s]:!!e&&!n.length;return this.hasChildren=!a,a}return!i}}]),t}();var zu=function(){function t(e,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.config=i,this.initNodes(e)}return t.prototype.initNodes=function(t){var e=this;t=Object(g.coerceTruthyValueToArray)(t),this.nodes=t.map(function(t){return new ju(t,e.config)}),this.flattedNodes=this.getFlattedNodes(!1,!1),this.leafNodes=this.getFlattedNodes(!0,!1)},t.prototype.appendNode=function(t,e){var i=new ju(t,this.config,e);(e?e.children:this.nodes).push(i)},t.prototype.appendNodes=function(t,e){var i=this;(t=Object(g.coerceTruthyValueToArray)(t)).forEach(function(t){return i.appendNode(t,e)})},t.prototype.getNodes=function(){return this.nodes},t.prototype.getFlattedNodes=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=t?this.leafNodes:this.flattedNodes;return e?i:function t(e,i){return e.reduce(function(e,n){return n.isLeaf?e.push(n):(!i&&e.push(n),e=e.concat(t(n.children,i))),e},[])}(this.nodes,t)},t.prototype.getNodeByValue=function(t){if(t){var e=this.getFlattedNodes(!1,!this.config.lazy).filter(function(e){return Object(g.valueEquals)(e.path,t)||e.value===t});return e&&e.length?e[0]:null}return null},t}(),Xu=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},Yu=vl.a.keys,Ku={expandTrigger:"click",multiple:!1,checkStrictly:!1,emitPath:!0,lazy:!1,lazyLoad:g.noop,value:"value",label:"label",children:"children",leaf:"leaf",disabled:"disabled",hoverThreshold:500},Ju=function(t){return!t.getAttribute("aria-owns")},qu=function(t,e){var i=t.parentNode;if(i){var n=i.querySelectorAll('.el-cascader-node[tabindex="-1"]');return n[Array.prototype.indexOf.call(n,t)+e]||null}return null},Zu=function(t,e){if(t){var i=t.id.split("-");return Number(i[i.length-2])}},Qu=function(t){t&&(t.focus(),!Ju(t)&&t.click())},th=o({name:"ElCascaderPanel",components:{CascaderMenu:Gu},props:{value:{},options:Array,props:Object,border:{type:Boolean,default:!0},renderLabel:Function},provide:function(){return{panel:this}},data:function(){return{checkedValue:null,checkedNodePaths:[],store:[],menus:[],activePath:[],loadCount:0}},computed:{config:function(){return Vt()(Xu({},Ku),this.props||{})},multiple:function(){return this.config.multiple},checkStrictly:function(){return this.config.checkStrictly},leafOnly:function(){return!this.checkStrictly},isHoverMenu:function(){return"hover"===this.config.expandTrigger},renderLabelFn:function(){return this.renderLabel||this.$scopedSlots.default}},watch:{options:{handler:function(){this.initStore()},immediate:!0,deep:!0},value:function(){this.syncCheckedValue(),this.checkStrictly&&this.calculateCheckedNodePaths()},checkedValue:function(t){Object(g.isEqual)(t,this.value)||(this.checkStrictly&&this.calculateCheckedNodePaths(),this.$emit("input",t),this.$emit("change",t))}},mounted:function(){Object(g.isEmpty)(this.value)||this.syncCheckedValue()},methods:{initStore:function(){var t=this.config,e=this.options;t.lazy&&Object(g.isEmpty)(e)?this.lazyLoad():(this.store=new zu(e,t),this.menus=[this.store.getNodes()],this.syncMenuState())},syncCheckedValue:function(){var t=this.value,e=this.checkedValue;Object(g.isEqual)(t,e)||(this.activePath=[],this.checkedValue=t,this.syncMenuState())},syncMenuState:function(){var t=this.multiple,e=this.checkStrictly;this.syncActivePath(),t&&this.syncMultiCheckState(),e&&this.calculateCheckedNodePaths(),this.$nextTick(this.scrollIntoView)},syncMultiCheckState:function(){var t=this;this.getFlattedNodes(this.leafOnly).forEach(function(e){e.syncCheckState(t.checkedValue)})},syncActivePath:function(){var t=this,e=this.store,i=this.multiple,n=this.activePath,o=this.checkedValue;if(Object(g.isEmpty)(n))if(Object(g.isEmpty)(o))this.activePath=[],this.menus=[e.getNodes()];else{var r=i?o[0]:o,s=((this.getNodeByValue(r)||{}).pathNodes||[]).slice(0,-1);this.expandNodes(s)}else{var a=n.map(function(e){return t.getNodeByValue(e.getValue())});this.expandNodes(a)}},expandNodes:function(t){var e=this;t.forEach(function(t){return e.handleExpand(t,!0)})},calculateCheckedNodePaths:function(){var t=this,e=this.checkedValue,i=this.multiple?Object(g.coerceTruthyValueToArray)(e):[e];this.checkedNodePaths=i.map(function(e){var i=t.getNodeByValue(e);return i?i.pathNodes:[]})},handleKeyDown:function(t){var e=t.target;switch(t.keyCode){case Yu.up:var i=qu(e,-1);Qu(i);break;case Yu.down:var n=qu(e,1);Qu(n);break;case Yu.left:var o=this.$refs.menu[Zu(e)-1];if(o){var r=o.$el.querySelector('.el-cascader-node[aria-expanded="true"]');Qu(r)}break;case Yu.right:var s=this.$refs.menu[Zu(e)+1];if(s){var a=s.$el.querySelector('.el-cascader-node[tabindex="-1"]');Qu(a)}break;case Yu.enter:!function(t){if(t){var e=t.querySelector("input");e?e.click():Ju(t)&&t.click()}}(e);break;case Yu.esc:case Yu.tab:this.$emit("close");break;default:return}},handleExpand:function(t,e){var i=this.activePath,n=t.level,o=i.slice(0,n-1),r=this.menus.slice(0,n);if(t.isLeaf||(o.push(t),r.push(t.children)),this.activePath=o,this.menus=r,!e){var s=o.map(function(t){return t.getValue()}),a=i.map(function(t){return t.getValue()});Object(g.valueEquals)(s,a)||(this.$emit("active-item-change",s),this.$emit("expand-change",s))}},handleCheckChange:function(t){this.checkedValue=t},lazyLoad:function(t,e){var i=this,n=this.config;t||(t=t||{root:!0,level:0},this.store=new zu([],n),this.menus=[this.store.getNodes()]),t.loading=!0;n.lazyLoad(t,function(n){var o=t.root?null:t;if(n&&n.length&&i.store.appendNodes(n,o),t.loading=!1,t.loaded=!0,Array.isArray(i.checkedValue)){var r=i.checkedValue[i.loadCount++],s=i.config.value,a=i.config.leaf;if(Array.isArray(n)&&n.filter(function(t){return t[s]===r}).length>0){var l=i.store.getNodeByValue(r);l.data[a]||i.lazyLoad(l,function(){i.handleExpand(l)}),i.loadCount===i.checkedValue.length&&i.$parent.computePresentText()}}e&&e(n)})},calculateMultiCheckedValue:function(){this.checkedValue=this.getCheckedNodes(this.leafOnly).map(function(t){return t.getValueByOption()})},scrollIntoView:function(){this.$isServer||(this.$refs.menu||[]).forEach(function(t){var e=t.$el;if(e){var i=e.querySelector(".el-scrollbar__wrap"),n=e.querySelector(".el-cascader-node.is-active")||e.querySelector(".el-cascader-node.in-active-path");Fe()(i,n)}})},getNodeByValue:function(t){return this.store.getNodeByValue(t)},getFlattedNodes:function(t){var e=!this.config.lazy;return this.store.getFlattedNodes(t,e)},getCheckedNodes:function(t){var e=this.checkedValue;return this.multiple?this.getFlattedNodes(t).filter(function(t){return t.checked}):Object(g.isEmpty)(e)?[]:[this.getNodeByValue(e)]},clearCheckedNodes:function(){var t=this.config,e=this.leafOnly,i=t.multiple,n=t.emitPath;i?(this.getCheckedNodes(e).filter(function(t){return!t.isDisabled}).forEach(function(t){return t.doCheck(!1)}),this.calculateMultiCheckedValue()):this.checkedValue=n?[]:null}}},Lu,[],!1,null,null,null);th.options.__file="packages/cascader-panel/src/cascader-panel.vue";var eh=th.exports;eh.install=function(t){t.component(eh.name,eh)};var ih=eh,nh=o({name:"ElAvatar",props:{size:{type:[Number,String],validator:function(t){return"string"==typeof t?["large","medium","small"].includes(t):"number"==typeof t}},shape:{type:String,default:"circle",validator:function(t){return["circle","square"].includes(t)}},icon:String,src:String,alt:String,srcSet:String,error:Function,fit:{type:String,default:"cover"}},data:function(){return{isImageExist:!0}},computed:{avatarClass:function(){var t=this.size,e=this.icon,i=this.shape,n=["el-avatar"];return t&&"string"==typeof t&&n.push("el-avatar--"+t),e&&n.push("el-avatar--icon"),i&&n.push("el-avatar--"+i),n.join(" ")}},methods:{handleError:function(){var t=this.error;!1!==(t?t():void 0)&&(this.isImageExist=!1)},renderAvatar:function(){var t=this.$createElement,e=this.icon,i=this.src,n=this.alt,o=this.isImageExist,r=this.srcSet,s=this.fit;return o&&i?t("img",{attrs:{src:i,alt:n,srcSet:r},on:{error:this.handleError},style:{"object-fit":s}}):e?t("i",{class:e}):this.$slots.default}},render:function(){var t=arguments[0],e=this.avatarClass,i=this.size;return t("span",{class:e,style:"number"==typeof i?{height:i+"px",width:i+"px",lineHeight:i+"px"}:{}},[this.renderAvatar()])}},void 0,void 0,!1,null,null,null);nh.options.__file="packages/avatar/src/main.vue";var oh=nh.exports;oh.install=function(t){t.component(oh.name,oh)};var rh=oh,sh=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"el-drawer-fade"},on:{"after-enter":t.afterEnter,"after-leave":t.afterLeave}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"el-drawer__wrapper",attrs:{tabindex:"-1"}},[i("div",{staticClass:"el-drawer__container",class:t.visible&&"el-drawer__open",attrs:{role:"document",tabindex:"-1"},on:{click:function(e){return e.target!==e.currentTarget?null:t.handleWrapperClick(e)}}},[i("div",{ref:"drawer",staticClass:"el-drawer",class:[t.direction,t.customClass],style:t.isHorizontal?"width: "+t.drawerSize:"height: "+t.drawerSize,attrs:{"aria-modal":"true","aria-labelledby":"el-drawer__title","aria-label":t.title,role:"dialog",tabindex:"-1"}},[t.withHeader?i("header",{staticClass:"el-drawer__header",attrs:{id:"el-drawer__title"}},[t._t("title",[i("span",{attrs:{role:"heading",title:t.title}},[t._v(t._s(t.title))])]),t.showClose?i("button",{staticClass:"el-drawer__close-btn",attrs:{"aria-label":"close "+(t.title||"drawer"),type:"button"},on:{click:t.closeDrawer}},[i("i",{staticClass:"el-dialog__close el-icon el-icon-close"})]):t._e()],2):t._e(),t.rendered?i("section",{staticClass:"el-drawer__body"},[t._t("default")],2):t._e()])])])])};sh._withStripped=!0;var ah=o({name:"ElDrawer",mixins:[b.a,S.a],props:{appendToBody:{type:Boolean,default:!1},beforeClose:{type:Function},customClass:{type:String,default:""},closeOnPressEscape:{type:Boolean,default:!0},destroyOnClose:{type:Boolean,default:!1},modal:{type:Boolean,default:!0},direction:{type:String,default:"rtl",validator:function(t){return-1!==["ltr","rtl","ttb","btt"].indexOf(t)}},modalAppendToBody:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},size:{type:[Number,String],default:"30%"},title:{type:String,default:""},visible:{type:Boolean},wrapperClosable:{type:Boolean,default:!0},withHeader:{type:Boolean,default:!0}},computed:{isHorizontal:function(){return"rtl"===this.direction||"ltr"===this.direction},drawerSize:function(){return"number"==typeof this.size?this.size+"px":this.size}},data:function(){return{closed:!1,prevActiveElement:null}},watch:{visible:function(t){var e=this;t?(this.closed=!1,this.$emit("open"),this.appendToBody&&document.body.appendChild(this.$el),this.prevActiveElement=document.activeElement):(this.closed||(this.$emit("close"),!0===this.destroyOnClose&&(this.rendered=!1)),this.$nextTick(function(){e.prevActiveElement&&e.prevActiveElement.focus()}))}},methods:{afterEnter:function(){this.$emit("opened")},afterLeave:function(){this.$emit("closed")},hide:function(t){!1!==t&&(this.$emit("update:visible",!1),this.$emit("close"),!0===this.destroyOnClose&&(this.rendered=!1),this.closed=!0)},handleWrapperClick:function(){this.wrapperClosable&&this.closeDrawer()},closeDrawer:function(){"function"==typeof this.beforeClose?this.beforeClose(this.hide):this.hide()},handleClose:function(){this.closeDrawer()}},mounted:function(){this.visible&&(this.rendered=!0,this.open())},destroyed:function(){this.appendToBody&&this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)}},sh,[],!1,null,null,null);ah.options.__file="packages/drawer/src/main.vue";var lh=ah.exports;lh.install=function(t){t.component(lh.name,lh)};var ch=lh,uh=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-popover",t._b({attrs:{trigger:"click"},model:{value:t.visible,callback:function(e){t.visible=e},expression:"visible"}},"el-popover",t.$attrs,!1),[i("div",{staticClass:"el-popconfirm"},[i("p",{staticClass:"el-popconfirm__main"},[t.hideIcon?t._e():i("i",{staticClass:"el-popconfirm__icon",class:t.icon,style:{color:t.iconColor}}),t._v("\n      "+t._s(t.title)+"\n    ")]),i("div",{staticClass:"el-popconfirm__action"},[i("el-button",{attrs:{size:"mini",type:t.cancelButtonType},on:{click:t.cancel}},[t._v("\n        "+t._s(t.displayCancelButtonText)+"\n      ")]),i("el-button",{attrs:{size:"mini",type:t.confirmButtonType},on:{click:t.confirm}},[t._v("\n        "+t._s(t.displayConfirmButtonText)+"\n      ")])],1)]),t._t("reference",null,{slot:"reference"})],2)};uh._withStripped=!0;var hh=i(44),ph=o({name:"ElPopconfirm",props:{title:{type:String},confirmButtonText:{type:String},cancelButtonText:{type:String},confirmButtonType:{type:String,default:"primary"},cancelButtonType:{type:String,default:"text"},icon:{type:String,default:"el-icon-question"},iconColor:{type:String,default:"#f90"},hideIcon:{type:Boolean,default:!1}},components:{ElPopover:i.n(hh).a,ElButton:z.a},data:function(){return{visible:!1}},computed:{displayConfirmButtonText:function(){return this.confirmButtonText||Object(Lo.t)("el.popconfirm.confirmButtonText")},displayCancelButtonText:function(){return this.cancelButtonText||Object(Lo.t)("el.popconfirm.cancelButtonText")}},methods:{confirm:function(){this.visible=!1,this.$emit("confirm")},cancel:function(){this.visible=!1,this.$emit("cancel")}}},uh,[],!1,null,null,null);ph.options.__file="packages/popconfirm/src/main.vue";var dh=ph.exports;dh.install=function(t){t.component(dh.name,dh)};var fh=dh,gh=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t.uiLoading?[i("div",t._b({class:["el-skeleton",t.animated?"is-animated":""]},"div",t.$attrs,!1),[t._l(t.count,function(e){return[t.loading?t._t("template",t._l(t.rows,function(e){return i("el-skeleton-item",{key:e,class:{"el-skeleton__paragraph":1!==e,"is-first":1===e,"is-last":e===t.rows&&t.rows>1},attrs:{variant:"p"}})})):t._e()]})],2)]:[t._t("default",null,null,t.$attrs)]],2)};gh._withStripped=!0;var _h=o({name:"ElSkeleton",props:{animated:{type:Boolean,default:!1},count:{type:Number,default:1},rows:{type:Number,default:4},loading:{type:Boolean,default:!0},throttle:{type:Number,default:0}},watch:{loading:{handler:function(t){var e=this;this.throttle<=0?this.uiLoading=t:t?(clearTimeout(this.timeoutHandle),this.timeoutHandle=setTimeout(function(){e.uiLoading=e.loading},this.throttle)):this.uiLoading=t},immediate:!0}},data:function(){return{uiLoading:this.throttle<=0&&this.loading}}},gh,[],!1,null,null,null);_h.options.__file="packages/skeleton/src/index.vue";var mh=_h.exports;mh.install=function(t){t.component(mh.name,mh)};var vh=mh,yh=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{class:["el-skeleton__item","el-skeleton__"+this.variant]},["image"===this.variant?e("img-placeholder"):this._e()],1)};yh._withStripped=!0;var bh=function(){var t=this.$createElement,e=this._self._c||t;return e("svg",{attrs:{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{d:"M64 896V128h896v768H64z m64-128l192-192 116.352 116.352L640 448l256 307.2V192H128v576z m224-480a96 96 0 1 1-0.064 192.064A96 96 0 0 1 352 288z"}})])};bh._withStripped=!0;var Th=o({name:"ImgPlaceholder"},bh,[],!1,null,null,null);Th.options.__file="packages/skeleton/src/img-placeholder.vue";var Eh,Ch=Th.exports,Sh=o({name:"ElSkeletonItem",props:{variant:{type:String,default:"text"}},components:(Eh={},Eh[Ch.name]=Ch,Eh)},yh,[],!1,null,null,null);Sh.options.__file="packages/skeleton/src/item.vue";var kh=Sh.exports;kh.install=function(t){t.component(kh.name,kh)};var Oh=kh,Ih=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"el-empty"},[i("div",{staticClass:"el-empty__image",style:t.imageStyle},[t.image?i("img",{attrs:{src:t.image,ondragstart:"return false"}}):t._t("image",[i("img-empty")])],2),i("div",{staticClass:"el-empty__description"},[t.$slots.description?t._t("description"):i("p",[t._v(t._s(t.emptyDescription))])],2),t.$slots.default?i("div",{staticClass:"el-empty__bottom"},[t._t("default")],2):t._e()])};Ih._withStripped=!0;var wh=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("svg",{attrs:{viewBox:"0 0 79 86",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[i("defs",[i("linearGradient",{attrs:{id:"linearGradient-1-"+t.id,x1:"38.8503086%",y1:"0%",x2:"61.1496914%",y2:"100%"}},[i("stop",{attrs:{"stop-color":"#FCFCFD",offset:"0%"}}),i("stop",{attrs:{"stop-color":"#EEEFF3",offset:"100%"}})],1),i("linearGradient",{attrs:{id:"linearGradient-2-"+t.id,x1:"0%",y1:"9.5%",x2:"100%",y2:"90.5%"}},[i("stop",{attrs:{"stop-color":"#FCFCFD",offset:"0%"}}),i("stop",{attrs:{"stop-color":"#E9EBEF",offset:"100%"}})],1),i("rect",{attrs:{id:"path-3-"+t.id,x:"0",y:"0",width:"17",height:"36"}})],1),i("g",{attrs:{id:"Illustrations",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"}},[i("g",{attrs:{id:"B-type",transform:"translate(-1268.000000, -535.000000)"}},[i("g",{attrs:{id:"Group-2",transform:"translate(1268.000000, 535.000000)"}},[i("path",{attrs:{id:"Oval-Copy-2",d:"M39.5,86 C61.3152476,86 79,83.9106622 79,81.3333333 C79,78.7560045 57.3152476,78 35.5,78 C13.6847524,78 0,78.7560045 0,81.3333333 C0,83.9106622 17.6847524,86 39.5,86 Z",fill:"#F7F8FC"}}),i("polygon",{attrs:{id:"Rectangle-Copy-14",fill:"#E5E7E9",transform:"translate(27.500000, 51.500000) scale(1, -1) translate(-27.500000, -51.500000) ",points:"13 58 53 58 42 45 2 45"}}),i("g",{attrs:{id:"Group-Copy",transform:"translate(34.500000, 31.500000) scale(-1, 1) rotate(-25.000000) translate(-34.500000, -31.500000) translate(7.000000, 10.000000)"}},[i("polygon",{attrs:{id:"Rectangle-Copy-10",fill:"#E5E7E9",transform:"translate(11.500000, 5.000000) scale(1, -1) translate(-11.500000, -5.000000) ",points:"2.84078316e-14 3 18 3 23 7 5 7"}}),i("polygon",{attrs:{id:"Rectangle-Copy-11",fill:"#EDEEF2",points:"-3.69149156e-15 7 38 7 38 43 -3.69149156e-15 43"}}),i("rect",{attrs:{id:"Rectangle-Copy-12",fill:"url(#linearGradient-1-"+t.id+")",transform:"translate(46.500000, 25.000000) scale(-1, 1) translate(-46.500000, -25.000000) ",x:"38",y:"7",width:"17",height:"36"}}),i("polygon",{attrs:{id:"Rectangle-Copy-13",fill:"#F8F9FB",transform:"translate(39.500000, 3.500000) scale(-1, 1) translate(-39.500000, -3.500000) ",points:"24 7 41 7 55 -3.63806207e-12 38 -3.63806207e-12"}})]),i("rect",{attrs:{id:"Rectangle-Copy-15",fill:"url(#linearGradient-2-"+t.id+")",x:"13",y:"45",width:"40",height:"36"}}),i("g",{attrs:{id:"Rectangle-Copy-17",transform:"translate(53.000000, 45.000000)"}},[i("mask",{attrs:{id:"mask-4-"+t.id,fill:"white"}},[i("use",{attrs:{"xlink:href":"#path-3-"+t.id}})]),i("use",{attrs:{id:"Mask",fill:"#E0E3E9",transform:"translate(8.500000, 18.000000) scale(-1, 1) translate(-8.500000, -18.000000) ","xlink:href":"#path-3-"+t.id}}),i("polygon",{attrs:{id:"Rectangle-Copy",fill:"#D5D7DE",mask:"url(#mask-4-"+t.id+")",transform:"translate(12.000000, 9.000000) scale(-1, 1) translate(-12.000000, -9.000000) ",points:"7 0 24 0 20 18 -1.70530257e-13 16"}})]),i("polygon",{attrs:{id:"Rectangle-Copy-18",fill:"#F8F9FB",transform:"translate(66.000000, 51.500000) scale(-1, 1) translate(-66.000000, -51.500000) ",points:"62 45 79 45 70 58 53 58"}})])])])])};wh._withStripped=!0;var Rh=0,Dh=o({name:"ImgEmpty",data:function(){return{id:++Rh}}},wh,[],!1,null,null,null);Dh.options.__file="packages/empty/src/img-empty.vue";var xh,Mh=Dh.exports,Ah=o({name:"ElEmpty",components:(xh={},xh[Mh.name]=Mh,xh),props:{image:{type:String,default:""},imageSize:Number,description:{type:String,default:""}},computed:{emptyDescription:function(){return this.description||Object(Lo.t)("el.empty.description")},imageStyle:function(){return{width:this.imageSize?this.imageSize+"px":""}}}},Ih,[],!1,null,null,null);Ah.options.__file="packages/empty/src/index.vue";var Nh=Ah.exports;Nh.install=function(t){t.component(Nh.name,Nh)};var Lh=Nh,Ph=[m,I,$,q,et,rt,mt,St,Dt,Nt,jt,Jt,te,re,ce,de,me,Te,ke,Ve,Ge,ze,Je,ti,nn,un,ao,_o,ko,xo,Ao,nr,ar,hr,yr,Ir,xr,Nr,Zr,ns,Cs,Us,Gs,js,sa,ua,fa,wa,Ma,Ba,Va,ja,qa,el,rl,cl,dl,kl,ec,lc,pc,_c,bc,Sc,wc,xc,Lc,Hc,Wc,su,_u,Tu,Nu,ih,rh,ch,fh,vh,Oh,Lh,yt.a],Bh=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Po.a.use(e.locale),Po.a.i18n(e.i18n),Ph.forEach(function(e){t.component(e.name,e)}),t.use(Du),t.use(Ps.directive),t.prototype.$ELEMENT={size:e.size||"",zIndex:e.zIndex||2e3},t.prototype.$loading=Ps.service,t.prototype.$msgbox=Qo,t.prototype.$alert=Qo.alert,t.prototype.$confirm=Qo.confirm,t.prototype.$prompt=Qo.prompt,t.prototype.$notify=ds,t.prototype.$message=Sa};"undefined"!=typeof window&&window.Vue&&Bh(window.Vue);e.default={version:"2.15.3",locale:Po.a.use,i18n:Po.a.i18n,install:Bh,CollapseTransition:yt.a,Loading:Ps,Pagination:m,Dialog:I,Autocomplete:$,Dropdown:q,DropdownMenu:et,DropdownItem:rt,Menu:mt,Submenu:St,MenuItem:Dt,MenuItemGroup:Nt,Input:jt,InputNumber:Jt,Radio:te,RadioGroup:re,RadioButton:ce,Checkbox:de,CheckboxButton:me,CheckboxGroup:Te,Switch:ke,Select:Ve,Option:Ge,OptionGroup:ze,Button:Je,ButtonGroup:ti,Table:nn,TableColumn:un,DatePicker:ao,TimeSelect:_o,TimePicker:ko,Popover:xo,Tooltip:Ao,MessageBox:Qo,Breadcrumb:nr,BreadcrumbItem:ar,Form:hr,FormItem:yr,Tabs:Ir,TabPane:xr,Tag:Nr,Tree:Zr,Alert:ns,Notification:ds,Slider:Cs,Icon:Us,Row:Gs,Col:js,Upload:sa,Progress:ua,Spinner:fa,Message:Sa,Badge:wa,Card:Ma,Rate:Ba,Steps:Va,Step:ja,Carousel:qa,Scrollbar:el,CarouselItem:rl,Collapse:cl,CollapseItem:dl,Cascader:kl,ColorPicker:ec,Transfer:lc,Container:pc,Header:_c,Aside:bc,Main:Sc,Footer:wc,Timeline:xc,TimelineItem:Lc,Link:Hc,Divider:Wc,Image:su,Calendar:_u,Backtop:Tu,InfiniteScroll:Du,PageHeader:Nu,CascaderPanel:ih,Avatar:rh,Drawer:ch,Popconfirm:fh,Skeleton:vh,SkeletonItem:Oh,Empty:Lh}}]).default},zQR9:function(t,e,i){"use strict";var n=i("h65t")(!0);i("vIB/")(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,i=this._i;return i>=e.length?{value:void 0,done:!0}:(t=n(e,i),this._i+=t.length,{value:t,done:!1})})},zTCi:function(t,e,i){"use strict";e.__esModule=!0,e.default=function(t,e){if(r.default.prototype.$isServer)return;if(!e)return void(t.scrollTop=0);var i=[],n=e.offsetParent;for(;n&&t!==n&&t.contains(n);)i.push(n),n=n.offsetParent;var o=e.offsetTop+i.reduce(function(t,e){return t+e.offsetTop},0),s=o+e.offsetHeight,a=t.scrollTop,l=a+t.clientHeight;o<a?t.scrollTop=o:s>l&&(t.scrollTop=s-t.clientHeight)};var n,o=i("7+uW"),r=(n=o)&&n.__esModule?n:{default:n}}});
//# sourceMappingURL=vendor.e92bfe0d59979c2fbfd8.js.map