1 line
191 KiB
JavaScript
1 line
191 KiB
JavaScript
|
!function(t){var e={};function n(a){if(e[a])return e[a].exports;var s=e[a]={i:a,l:!1,exports:{}};return t[a].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=t,n.c=e,n.d=function(t,e,a){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(a,s,function(e){return t[e]}.bind(null,s));return a},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="http://192.168.1.101:8000/",n(n.s=38)}([function(t,e,n){"use strict";var a=X4CryptoTables;window[a];e.a={components:function(t){var e={};for(var n in t)e[n]=t[n].default;return e},variables:function(t){var e=function(e){var n=t[e];t[e]=function(){var t=[].slice.call(arguments);return t.unshift({state:this.$store.state,getters:this.$store.getters,commit:this.$store.commit,dispatch:this.$store.dispatch}),n.apply(this,t)}};for(var n in t)e(n);return t}}},function(t,e,n){"use strict";function a(t,e,n,a,s,o,i,l){var r,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),a&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),i?(r=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__),s&&s.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},c._ssrRegister=r):s&&(r=l?function(){s.call(this,this.$root.$options.shadowRoot)}:s),r)if(c.functional){c._injectStyles=r;var u=c.render;c.render=function(t,e){return r.call(e),u(t,e)}}else{var p=c.beforeCreate;c.beforeCreate=p?[].concat(p,r):[r]}return{exports:t,options:c}}n.d(e,"a",function(){return a})},function(t,e,n){"use strict";n.r(e);var a={props:["scale","colors"],data:function(){return{text:this.$slots.default?this.$slots.default[0].text:""}},updated:function(){this.$slots.default&&this.text!==this.$slots.default[0].text&&(this.text=this.$slots.default[0].text)},computed:{ascale:function(){return parseFloat(this.scale||this.$vnode.context.scale)||1},acolors:function(){return this.colors||this.$root.colors||this.$store.state.colors},output:function(){var t=this,e="",n=this.text;n=this.applyScale(n),n=this.applyColor(n);var a=this.buildBlocks(n),s=a.blocks,o=a.extraBlocks;return s=this.buildMultiBlocks(s),o.forEach(function(e){e.blocks=t.buildMultiBlocks(e.blocks)}),e+=this.buildOutput(s),e+=this.buildExtraOutput(o)}},methods:{buildBlocks:function(t){var e=[],n=[],a=[],s=[],o={key:!1,name:!1,blocks:[]},i=function(){0!==a.length&&((o.name?o.blocks:e).push({selector:n,props:a}),a=[])};return t.split("\n").forEach(function(t){var e=t.trim(),l=e.split(": ");if(0!==e.length){if(e.match(/\{$/))return i(),e.match(/^@/)&&(o.key=e.match(/^(@[^\s]+)\s/)[1]),void(o.name=e.match(/^(.+)\{$/)[1].trim());if("}"===e)return i(),o.blocks.length>0&&s.push(o),void(o={key:!1,name:!1,blocks:[]});if(1===l.length){i();var r=Math.ceil(t.match(/^\s*/)[0].length/2)-(o.name?1:0);(n=n.slice(0,r+1))[r]=e}else a.push({name:l[0].trim(),value:l.slice(1).join(":").trim()})}}),i(),{blocks:e,extraBlocks:s}},applyScale:function(t){var e=this;return t.replace(/\$scale\(([^)]+)\)/g,function(t,n){return 1!==e.ascale&&(n=n.replace(/[0-9.]+/g,function(t){return e.ascale*parseFloat(t)})),n})},applyColor:function(t){var e=this;return t.replace(/\$color\(([^)]+)\)/g,function(t,n){var a=n.split(",")[0].trim(),s=(n.split(",")[1]||"").trim();if(n=e.acolors[a],s){var o=parseFloat(s);e.acolors.dark&&o<=.16&&"!"!==s.substr(s.length-1,1)&&(o*=2),o<1&&(o=o.toString().replace("0.",".")),n=n.replace(/,\s*[0-9.]+\s*\)$/g,","+o+")")}return n})},buildMultiBlocks:function(t){var e=
|