From bef52e441f6c10bbb4139152e3190ee890f2f25d Mon Sep 17 00:00:00 2001 From: Konstantin Baierer Date: Sat, 16 Dec 2017 17:58:16 +0100 Subject: [PATCH] Allow highlighting ocr_page (disabled by default) --- dist/hocr.fullscreen.js | 2 +- dist/hocr.user.js | 6 +++--- dist/hocr.viewer.js | 2 +- src/_variables.scss | 1 + src/components/hocr-viewer/hocr-viewer.js | 1 + src/components/hocr-viewer/hocr-viewer.scss | 1 + 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/dist/hocr.fullscreen.js b/dist/hocr.fullscreen.js index 601e497..0250a97 100644 --- a/dist/hocr.fullscreen.js +++ b/dist/hocr.fullscreen.js @@ -1 +1 @@ -!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=26)}([function(e,t,n){const r=n(8),o=n(3);e.exports={HocrDOM:r,HocrPropertyParser:o}},function(e,t){function n(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var o=function(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}(r),i=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(i).concat([o]).join("\n")}return[n].join("\n")}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r=n(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o=0&&m.splice(t,1)}function s(e){var t=document.createElement("style");return e.attrs.type="text/css",c(t,e.attrs),i(e,t),t}function c(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function l(e,t){var n,r,o,l;if(t.transform&&e.css){if(!(l=t.transform(e.css)))return function(){};e.css=l}if(t.singleton){var f=v++;n=h||(h=s(t)),r=u.bind(null,n,f,!1),o=u.bind(null,n,f,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",c(t,e.attrs),i(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||i)&&(r=g(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),o=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){a(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}function u(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=y(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}var f={},d=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),p=function(e){var t={};return function(e){if(void 0===t[e]){var n=function(e){return document.querySelector(e)}.call(this,e);if(n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),h=null,v=0,m=[],g=n(5);e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||(t.singleton=d()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=o(e,t);return r(n,t),function(e){for(var i=[],a=0;ae.map(e=>this.numberParser(parseInt)(e.split(","))),hardbreak:this.booleanParser({collapse:!0}),image:this.stringParser({collapse:!0}),imagemd5:this.stringParser({collapse:!0}),lpageno:this.stringParser({collapse:!0}),ppageno:this.numberParser(parseInt,{min:0},{collapse:!0}),nlp:this.numberParser(parseFloat,{min:0,max:100}),order:this.numberParser(parseInt,{min:0},{collapse:!0}),poly:this.numberParser(parseInt,{min:0},{minLength:4,modulo:2}),scan_res:this.numberParser(parseInt,{min:0}),textangle:this.numberParser(parseFloat,{},{collapse:!0}),x_bboxes:this.numberParser(parseInt,{min:0}),x_font:this.stringParser({collapse:!0}),x_fsize:this.numberParser(parseInt,{min:0}),x_confs:this.numberParser(parseFloat,{min:0,max:100}),x_scanner:this.stringParser(),x_source:this.stringParser(),x_wconf:this.numberParser(parseFloat,{min:0,max:100})}}checkCardinality(e,{length:t=-1,modulo:n=-1,collapse:r=!1,minLength:o=0,maxLength:i=Number.MAX_VALUE}){if(this.disableCardinalityChecks)return e;if(r&&(t=1),t>-1&&e.length!=t)throw Error(`Incorrect number of arguments (${e.length} != ${t})`);if(n>-1&&t%n>0)throw Error(`Number of arguments not a multiple of ${n} (${e.length})`);if(r)return e[0];if(e.lengthi)throw Error(`Too many arguments (${e.length} > ${o})`);return e}booleanParser(e={}){return t=>this.checkCardinality(t.map(e=>Boolean.valueOf()(e)),e)}stringParser(e={}){return t=>this.checkCardinality(t,e)}numberParser(e,{min:t=-Number.MAX_VALUE,max:n=Number.MAX_VALUE}={},r={}){return Array.isArray(e)||(e=[e]),o=>{let i=0;return this.checkCardinality(o.map(r=>{let o=e[i++%e.length](r);if(!this.allowInvalidNumbers){if(Number.isNaN(o))throw Error(`Not a number: '${r}'`);if(on)throw Error(`Not in range [${t}..${n}]: '${r}'`)}return o}),r)}}parse(e){let t=this.tokenize(e);this.debug&&console.log("tokens",t);let n={};for(let e=0;e{t.push(i.join("")),i=[]},c=()=>{i.push(a)};for(let e=0;e0?n[e-1]:"";"'"!==(a=n[e])||"\\"==l||r?'"'!==a||"\\"==l||o?o||r||";"!==a?o||r||!a.match(/\s/)?c():i.length>0&&s():(i.length>0&&s(),";"!==t[t.length-1]&&t.push(";")):(r&&s(),r=!r):(o&&s(),o=!o)}return i.length>0&&s(),t}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;ne.startsWith("ocr"))),n._isHocrElement}static getHocrProperties(e,t={},n={}){let{propertyParser:r}=t;return r||(r=o),n._hocr||(i.isHocrElement(e,t,n)?n._hocr=r.parse(e.getAttribute("title")):n._hocr={}),n._hocr}static queryHocr(...e){return Array.from(i.queryHocrAll(...e))[0]}static queryHocrAll(e,t={},n={}){(Array.isArray(t)||"string"==typeof t)&&(t={class:t}),t.tag=t.tag||"*",t.clauses=t.clauses||"",t.title&&(t.clauses+=`[title*="${t.title}"]`),t.class=t.class||"","string"==typeof t.class&&(t.class=[t.class]);let o=t.class.map(function(e){return 0===e.indexOf("ocr")?e:""===e?"ocr":0!==e.indexOf("x_")?`ocr_${e}`:`ocr${e}`}).map(function(e){return`${t.tag}[class^="${e}"]${t.clauses}`}).join(",");r(n,"findByOcrClass:",o);const i=e.querySelectorAll(o);let a=Array.from(i);return t.terminal&&(a=a.filter(function(e){if(!e.querySelector('*[class^="ocr"]'))return e})),t.nonTerminal&&(a=a.filter(function(e){if(e.querySelector('*[class^="ocr"]'))return e})),t.filter&&(r(n,{query:t}),a=a.filter(t.filter)),Object.create(a,i.prototype)}static extendPrototypes({Element:e,Document:t},n){[e.prototype,t.prototype].forEach(e=>{["queryHocr","queryHocrAll"].forEach(t=>{e[t]=function(e={},n){const r=e.context||this;return i[t](r,e,n)}}),Object.defineProperty(e,"_hocr",{enumerable:!1,writable:!0}),Object.defineProperty(e,"hocr",{get(){return i.getHocrProperties(this,n,this)}}),Object.defineProperty(e,"_isHocrElement",{enumerable:!0,writable:!0}),Object.defineProperty(e,"isHocrElement",{get(){return i.isHocrElement(this,n,this)}})}),i._initialized=!0}}e.exports=i},function(e,t,n){"use strict";e.exports=n(10)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(11)),i=r(n(13));t.default={name:"HocrToolbar",template:i.default,style:o.default,computed:{classList:function(){return{"hocrjs-toolbar":!0,expanded:this.expanded}}},data:function(){return{expanded:!0}},methods:{toggle:function(){this.expanded=!this.expanded}}}},function(e,t,n){var r=n(12);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0};o.transform=void 0;n(2)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(void 0)).push([e.i,"@charset \"UTF-8\";\n/*\n * Copyright (c) 2016-2017 Konstantin Baierer\n *\n * This software may be modified and distributed under the terms\n * of the MIT license. See the LICENSE file for details.\n */\n.hocrjs-toolbar {\n position: fixed;\n z-index: 1;\n top: 0;\n height: 100%;\n border: none; }\n .hocrjs-toolbar .toggler {\n float: left;\n font-family: monospace;\n color: white;\n background: #333;\n height: 100vh;\n width: 1em; }\n .hocrjs-toolbar .toggler .toggler-inner {\n font-size: 1.5em;\n top: 40vh;\n position: fixed; }\n .hocrjs-toolbar .toggler .toggler-hide {\n display: none; }\n .hocrjs-toolbar .toggler .toggler-show {\n display: block; }\n .hocrjs-toolbar .wrapper {\n position: fixed;\n margin-left: 1em;\n background-color: rgba(180, 180, 190, 0.85);\n overflow: hidden;\n left: -16em;\n transition: all 0.5s ease;\n height: 100vh; }\n .hocrjs-toolbar.expanded {\n border-right: 3px solid #333; }\n .hocrjs-toolbar.expanded .wrapper {\n padding-left: 1em;\n width: 15em;\n left: 0; }\n .hocrjs-toolbar.expanded .toggler-show {\n display: none; }\n .hocrjs-toolbar.expanded .toggler-hide {\n display: block; }\n .hocrjs-toolbar ul.features {\n list-style-type: none;\n padding: 0; }\n .hocrjs-toolbar ul.features li {\n background-color: #ffcccc;\n margin-bottom: 2px;\n padding: 5px 0; }\n .hocrjs-toolbar ul.features li:before {\n content: '\\2717 '; }\n .hocrjs-toolbar ul.features li.checked {\n background-color: #ccffcc; }\n .hocrjs-toolbar ul.features li.checked:before {\n content: '\\2713 '; }\n .hocrjs-toolbar ul.features li input[type='checkbox'] {\n display: none; }\n .hocrjs-toolbar ul.features li label {\n width: 100%; }\n .hocrjs-toolbar summary {\n font-size: 120%; }\n .hocrjs-toolbar summary span.font {\n font-size: 100%; }\n .hocrjs-toolbar select.font {\n width: 80%;\n font-size: 110%; }\n",""])},function(e,t){e.exports='
\n
\n
\n >
>
>
>
>
>
>
>
>
\n
\n
\n <
<
<
<
<
<
<
<
<
\n
\n
\n
\n\n
\n Features\n
    \n
  • \n \n \n
  • \n
\n
\n\n
\n Zoom: {{ $parent.currentZoomRounded }}%\n \n \n \n \n

\n \n \n \n

\n
\n\n\n
\n Font: \n \n
\n\n
\n
\n\n'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={features:{disableEmStrong:{enabled:!1},contentEditable:{enabled:!1},tooltips:{enabled:!0,styleId:"hocr-viewer-tooltip-style"},transparentText:{enabled:!1}}}},function(e,t){e.exports='
\n \n
\n
\n
\n\n'},function(e,t,n){var r=n(17);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0};o.transform=void 0;n(2)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(void 0)).push([e.i,'/*\n * Copyright (c) 2016-2017 Konstantin Baierer\n *\n * This software may be modified and distributed under the terms\n * of the MIT license. See the LICENSE file for details.\n */\n/*\n * Copyright (c) 2016-2017 Konstantin Baierer\n *\n * This software may be modified and distributed under the terms\n * of the MIT license. See the LICENSE file for details.\n */\n.hocr-viewer.hocr-viewer-toolbar-enabled > .hocr-viewer-container {\n transform: rotate(0);\n margin-left: 1em; }\n\n.hocr-viewer .hocr-viewer-container {\n height: 100vh;\n position: relative !important;\n -webkit-transform: rotate(0deg);\n -ms-transform: rotate(0deg);\n transform: rotate(0deg);\n /* .transform(scale(0.7)); */\n /* position: relative !important; */ }\n .hocr-viewer .hocr-viewer-container > div {\n overflow: auto; }\n\n.hocr-viewer *[class^="ocr"]:hover::before {\n display: none; }\n\n.hocr-viewer.hocr-viewer-feature-Layout *[class^="ocr"] {\n position: fixed;\n white-space: nowrap;\n justify-content: left;\n /* align horizontal */\n align-items: center;\n /* align vertical */ }\n\n.hocr-viewer.hocr-viewer-feature-Layout.hocr-viewer-feature-Tooltip *[class^="ocr"]:hover::before {\n display: block;\n background: white;\n color: black !important;\n border: 1px solid black;\n font-family: monospace;\n position: absolute;\n font-size: 12px;\n font-weight: bold;\n line-height: 100%;\n height: 15px;\n top: -15px; }\n\n.hocr-viewer.hocr-viewer-feature-Highlight {\n margin: -1px; }\n .hocr-viewer.hocr-viewer-feature-Highlight.hocr-viewer-feature-HighlightNotPage *[class^="ocr"]:not(.ocr_page) {\n border: 3px solid red; }\n .hocr-viewer.hocr-viewer-feature-Highlight.hocr-viewer-feature-HighlightNotPage *[class^="ocr"]:not(.ocr_page):hover {\n background: rgba(255, 153, 153, 0.2); }\n .hocr-viewer.hocr-viewer-feature-Highlight.hocr-viewer-feature-HighlightInline .ocr_line *[class^="ocr"] {\n border: 3px solid green; }\n .hocr-viewer.hocr-viewer-feature-Highlight.hocr-viewer-feature-HighlightInline .ocr_line *[class^="ocr"]:hover {\n background: rgba(26, 255, 26, 0.2); }\n .hocr-viewer.hocr-viewer-feature-Highlight.hocr-viewer-feature-HighlightLine *[class^="ocr"][class*="line"] {\n border: 3px solid gold; }\n .hocr-viewer.hocr-viewer-feature-Highlight.hocr-viewer-feature-HighlightLine *[class^="ocr"][class*="line"]:hover {\n background: rgba(255, 239, 153, 0.2); }\n .hocr-viewer.hocr-viewer-feature-Highlight.hocr-viewer-feature-HighlightPar .ocr_par {\n border: 3px solid purple; }\n .hocr-viewer.hocr-viewer-feature-Highlight.hocr-viewer-feature-HighlightPar .ocr_par:hover {\n background: rgba(255, 26, 255, 0.2); }\n .hocr-viewer.hocr-viewer-feature-Highlight.hocr-viewer-feature-HighlightCarea .ocr_carea {\n border: 3px solid blue; }\n .hocr-viewer.hocr-viewer-feature-Highlight.hocr-viewer-feature-HighlightCarea .ocr_carea:hover {\n background: rgba(153, 153, 255, 0.2); }\n\n.hocr-viewer.hocr-viewer-feature-BackgroundImage {\n background-repeat: no-repeat; }\n .hocr-viewer.hocr-viewer-feature-BackgroundImage .ocr_page {\n background-size: contain; }\n\n.hocr-viewer.hocr-viewer-feature-DisableEmStrong em {\n font-style: normal; }\n\n.hocr-viewer.hocr-viewer-feature-DisableEmStrong strong {\n font-weight: normal; }\n\n.hocr-viewer.hocr-viewer-feature-TransparentText .ocr_page {\n color: transparent; }\n',""])},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=r(n(19)),i=r(n(20)),a=r(n(21)),s=r(n(22)),c=r(n(23)),l=r(n(24));e.exports={BackgroundImage:o.default,ContentEditable:i.default,Font:a.default,Layout:s.default,ScaleFont:c.default,Tooltip:l.default}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;nthis.minFontSize&&t.offsetHeight>r&&(i-=t.offsetHeight-r,t.style.fontSize=i+"px");i>this.minFontSize&&t.offsetWidth>o;)t.style.fontSize=--i+"px";this.cache[n]=i-1}}e.style.fontSize=this.cache[n]+"px"}}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n',window.hocrapp=new o.default({el:"#app",components:{HocrViewer:i.default},template:'',data:{hocr:a}})},function(e,t,n){(function(t,n){!function(t,n){e.exports=n()}(0,function(){"use strict";function e(e){return void 0===e||null===e}function r(e){return void 0!==e&&null!==e}function o(e){return!0===e}function i(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e}function a(e){return null!==e&&"object"==typeof e}function s(e){return Un.call(e).slice(8,-1)}function c(e){return"[object Object]"===Un.call(e)}function l(e){return"[object RegExp]"===Un.call(e)}function u(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function f(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function d(e){var t=parseFloat(e);return isNaN(t)?e:t}function p(e,t){for(var n=Object.create(null),r=e.split(","),o=0;o-1)return e.splice(n,1)}}function v(e,t){return qn.call(e,t)}function m(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}function g(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n}function y(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function b(e,t){for(var n in t)e[n]=t[n];return e}function w(e){for(var t={},n=0;n0&&(oe((s=ie(s,(n||"")+"_"+a))[0])&&oe(l)&&(u[c]=T(l.text+s[0].text),s.shift()),u.push.apply(u,s)):i(s)?oe(l)?u[c]=T(l.text+s):""!==s&&u.push(T(s)):oe(s)&&oe(l)?u[c]=T(l.text+s.text):(o(t._isVList)&&r(s.tag)&&e(s.key)&&r(n)&&(s.key="__vlist"+n+"_"+a+"__"),u.push(s)));return u}function ae(e,t){return(e.__esModule||xr&&"Module"===e[Symbol.toStringTag])&&(e=e.default),a(e)?t.extend(e):e}function se(e){return e.isComment&&e.asyncFactory}function ce(e){if(Array.isArray(e))for(var t=0;tpo)){kr("You may have an infinite update loop "+(e.user?'in watcher with expression "'+e.expression+'"':"in a component render function."),e.vm);break}var n=vo.slice(),r=ho.slice();wo=ho.length=vo.length=0,mo={},go={},yo=bo=!1,function(e){for(var t=0;t=0||n.indexOf(e[o])<0)&&r.push(e[o]);return r}return e}(n[i],r[i],o[i]));return t}(e);r&&b(e.extendOptions,r),(t=e.options=U(n,e.extendOptions)).name&&(t.components[t.name]=e)}}return t}function Be(e){this instanceof Be||kr("Vue is a constructor and should be called with the `new` keyword"),this._init(e)}function Ve(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,o=e._Ctor||(e._Ctor={});if(o[r])return o[r];var i=e.name||n.options.name;i&&R(i);var a=function(e){this._init(e)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=t++,a.options=U(n.options,e),a.super=n,a.options.props&&function(e){var t=e.options.props;for(var n in t)we(e.prototype,"_props",n)}(a),a.options.computed&&function(e){var t=e.options.computed;for(var n in t)xe(e.prototype,n,t[n])}(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,er.forEach(function(e){a[e]=n[e]}),i&&(a.options.components[i]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=b({},a.options),o[r]=a,a}}function qe(e){return e&&(e.Ctor.options.name||e.tag)}function Ke(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!l(e)&&e.test(t)}function Je(e,t){var n=e.cache,r=e.keys,o=e._vnode;for(var i in n){var a=n[i];if(a){var s=qe(a.componentOptions);s&&!t(s)&&We(n,i,r,o)}}}function We(e,t,n,r){var o=e[t];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),e[t]=null,h(n,t)}function Ze(e){for(var t=e.data,n=e,o=e;r(o.componentInstance);)(o=o.componentInstance._vnode).data&&(t=Ge(o.data,t));for(;r(n=n.parent);)n.data&&(t=Ge(t,n.data));return function(e,t){if(r(e)||r(t))return Xe(e,Ye(t));return""}(t.staticClass,t.class)}function Ge(e,t){return{staticClass:Xe(e.staticClass,t.staticClass),class:r(e.class)?[e.class,t.class]:t.class}}function Xe(e,t){return e?t?e+" "+t:e:t||""}function Ye(e){return Array.isArray(e)?function(e){for(var t,n="",o=0,i=e.length;o=0&&" "===(m=e.charAt(v));v--);m&&fi.test(m)||(u=!0)}}else void 0===i?(h=o+1,i=e.slice(0,o).trim()):t();if(void 0===i?i=e.slice(0,o).trim():0!==h&&t(),a)for(o=0;o-1?{exp:e.slice(0,Lo),key:'"'+e.slice(Lo+1)+'"'}:{exp:e,key:null};Mo=e,Lo=No=Fo=0;for(;!xt();)kt(Po=_t())?$t(Po):91===Po&&function(e){var t=1;No=Lo;for(;!xt();)if(e=_t(),kt(e))$t(e);else if(91===e&&t++,93===e&&t--,0===t){Fo=Lo;break}}(Po);return{exp:e.slice(0,No),key:e.slice(No+1,Fo)}}(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function _t(){return Mo.charCodeAt(++Lo)}function xt(){return Lo>=Io}function kt(e){return 34===e||39===e}function $t(e){for(var t=e;!xt()&&(e=_t())!==t;);}function Ct(e,t,n,r,o){t=function(e){return e._withTask||(e._withTask=function(){Jr=!0;var t=e.apply(null,arguments);return Jr=!1,t})}(t),n&&(t=function(e,t,n){var r=Do;return function o(){null!==e.apply(null,arguments)&&At(t,o,n,r)}}(t,e,r)),Do.addEventListener(e,t,mr?{capture:r,passive:o}:r)}function At(e,t,n,r){(r||Do).removeEventListener(e,t._withTask||t,n)}function Ot(t,n){if(!e(t.data.on)||!e(n.data.on)){var o=n.data.on||{},i=t.data.on||{};Do=n.elm,function(e){if(r(e[di])){var t=lr?"change":"input";e[t]=[].concat(e[di],e[t]||[]),delete e[di]}r(e[pi])&&(e.change=[].concat(e[pi],e.change||[]),delete e[pi])}(o),te(o,i,Ct,At,n.context),Do=void 0}}function Tt(t,n){if(!e(t.data.domProps)||!e(n.data.domProps)){var o,i,a=n.elm,s=t.data.domProps||{},c=n.data.domProps||{};r(c.__ob__)&&(c=n.data.domProps=b({},c));for(o in s)e(c[o])&&(a[o]="");for(o in c){if(i=c[o],"textContent"===o||"innerHTML"===o){if(n.children&&(n.children.length=0),i===s[o])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===o){a._value=i;var l=e(i)?"":String(i);(function(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(e,t)||function(e,t){var n=e.value,o=e._vModifiers;if(r(o)){if(o.lazy)return!1;if(o.number)return d(n)!==d(t);if(o.trim)return n.trim()!==t.trim()}return n!==t}(e,t))})(a,l)&&(a.value=l)}else a[o]=i}}}function Et(e){var t=St(e.style);return e.staticStyle?b(e.staticStyle,t):t}function St(e){return Array.isArray(e)?w(e):"string"==typeof e?mi(e):e}function jt(t,n){var o=n.data,i=t.data;if(!(e(o.staticStyle)&&e(o.style)&&e(i.staticStyle)&&e(i.style))){var a,s,c=n.elm,l=i.staticStyle,u=i.normalizedStyle||i.style||{},f=l||u,d=St(n.data.style)||{};n.data.normalizedStyle=r(d.__ob__)?b({},d):d;var p=function(e,t){var n,r={};if(t)for(var o=e;o.componentInstance;)(o=o.componentInstance._vnode).data&&(n=Et(o.data))&&b(r,n);(n=Et(e.data))&&b(r,n);for(var i=e;i=i.parent;)i.data&&(n=Et(i.data))&&b(r,n);return r}(n,!0);for(s in f)e(p[s])&&bi(c,s,"");for(s in p)(a=p[s])!==f[s]&&bi(c,s,null==a?"":a)}}function It(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function Mt(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function Pt(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&b(t,ki(e.name||"v")),b(t,e),t}return"string"==typeof e?ki(e):void 0}}function Lt(e){ji(function(){ji(e)})}function Nt(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),It(e,t))}function Ft(e,t){e._transitionClasses&&h(e._transitionClasses,t),Mt(e,t)}function Ht(e,t,n){var r=Dt(e,t),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===Ci?Ti:Si,c=0,l=function(){e.removeEventListener(s,u),n()},u=function(t){t.target===e&&++c>=a&&l()};setTimeout(function(){c0&&(n=Ci,u=a,f=i.length):t===Ai?l>0&&(n=Ai,u=l,f=c.length):f=(n=(u=Math.max(a,l))>0?a>l?Ci:Ai:null)?n===Ci?i.length:c.length:0;return{type:n,timeout:u,propCount:f,hasTransform:n===Ci&&Ii.test(r[Oi+"Property"])}}function Rt(e,t){for(;e.length explicit "+t+" duration is not a valid number - got "+JSON.stringify(e)+".",n.context):isNaN(e)&&kr(" explicit "+t+" duration is NaN - the duration expression might be incorrect.",n.context)}function qt(e){return"number"==typeof e&&!isNaN(e)}function Kt(t){if(e(t))return!1;var n=t.fns;return r(n)?Kt(Array.isArray(n)?n[0]:n):(t._length||t.length)>1}function Jt(e,t){!0!==t.data.show&&Ut(t)}function Wt(e,t,n){Zt(e,t,n),(lr||fr)&&setTimeout(function(){Zt(e,t,n)},0)}function Zt(e,t,n){var r=t.value,o=e.multiple;if(!o||Array.isArray(r)){for(var i,a,s=0,c=e.options.length;s-1,a.selected!==i&&(a.selected=i);else if(x(Xt(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));o||(e.selectedIndex=-1)}else kr('