From 7e40471ecc20cabe8c6c9f3c86f3e5495747f89b Mon Sep 17 00:00:00 2001 From: trendschau Date: Fri, 13 Sep 2024 19:48:53 +0200 Subject: [PATCH] Updated vue, autosize, axios and vendor --- composer.lock | 104 +- system/typemill/author/js/autosize.min.js | 4 +- system/typemill/author/js/axios.min.js | 5 +- system/typemill/author/js/vue.global.prod.js | 13 +- system/typemill/author/js/vue.js | 8468 ++++++++++-------- 5 files changed, 4973 insertions(+), 3621 deletions(-) diff --git a/composer.lock b/composer.lock index 5fd00e3..da34fb5 100644 --- a/composer.lock +++ b/composer.lock @@ -1050,16 +1050,16 @@ }, { "name": "psr/log", - "version": "3.0.0", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", "shasum": "" }, "require": { @@ -1094,9 +1094,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/3.0.0" + "source": "https://github.com/php-fig/log/tree/3.0.2" }, - "time": "2021-07-14T16:46:02+00:00" + "time": "2024-09-11T13:17:53+00:00" }, { "name": "ralouphie/getallheaders", @@ -1748,16 +1748,16 @@ }, { "name": "symfony/finder", - "version": "v5.4.42", + "version": "v5.4.43", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "0724c51fa067b198e36506d2864e09a52180998a" + "reference": "ae25a9145a900764158d439653d5630191155ca0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/0724c51fa067b198e36506d2864e09a52180998a", - "reference": "0724c51fa067b198e36506d2864e09a52180998a", + "url": "https://api.github.com/repos/symfony/finder/zipball/ae25a9145a900764158d439653d5630191155ca0", + "reference": "ae25a9145a900764158d439653d5630191155ca0", "shasum": "" }, "require": { @@ -1791,7 +1791,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.42" + "source": "https://github.com/symfony/finder/tree/v5.4.43" }, "funding": [ { @@ -1807,24 +1807,24 @@ "type": "tidelift" } ], - "time": "2024-07-22T08:53:29+00:00" + "time": "2024-08-13T14:03:51+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "0424dff1c58f028c451efff2045f5d92410bd540" + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540", - "reference": "0424dff1c58f028c451efff2045f5d92410bd540", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-ctype": "*" @@ -1870,7 +1870,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" }, "funding": [ { @@ -1886,24 +1886,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-mbstring": "*" @@ -1950,7 +1950,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" }, "funding": [ { @@ -1966,24 +1966,24 @@ "type": "tidelift" } ], - "time": "2024-06-19T12:30:46+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { @@ -2030,7 +2030,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" }, "funding": [ { @@ -2046,24 +2046,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "3fb075789fb91f9ad9af537c4012d523085bd5af" + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/3fb075789fb91f9ad9af537c4012d523085bd5af", - "reference": "3fb075789fb91f9ad9af537c4012d523085bd5af", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { @@ -2106,7 +2106,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.31.0" }, "funding": [ { @@ -2122,20 +2122,20 @@ "type": "tidelift" } ], - "time": "2024-06-19T12:30:46+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/yaml", - "version": "v5.4.40", + "version": "v5.4.43", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "81cad0ceab3d61fe14fe941ff18a230ac9c80f83" + "reference": "62f96e1cfd4cf518882a36bfedcf1fe4093c1299" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/81cad0ceab3d61fe14fe941ff18a230ac9c80f83", - "reference": "81cad0ceab3d61fe14fe941ff18a230ac9c80f83", + "url": "https://api.github.com/repos/symfony/yaml/zipball/62f96e1cfd4cf518882a36bfedcf1fe4093c1299", + "reference": "62f96e1cfd4cf518882a36bfedcf1fe4093c1299", "shasum": "" }, "require": { @@ -2181,7 +2181,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.4.40" + "source": "https://github.com/symfony/yaml/tree/v5.4.43" }, "funding": [ { @@ -2197,20 +2197,20 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:33:22+00:00" + "time": "2024-08-11T17:40:32+00:00" }, { "name": "twig/twig", - "version": "v3.11.0", + "version": "v3.11.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "e80fb8ebba85c7341a97a9ebf825d7fd4b77708d" + "reference": "ff063afc691e1cfda6714f1915ed766cb108d188" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/e80fb8ebba85c7341a97a9ebf825d7fd4b77708d", - "reference": "e80fb8ebba85c7341a97a9ebf825d7fd4b77708d", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/ff063afc691e1cfda6714f1915ed766cb108d188", + "reference": "ff063afc691e1cfda6714f1915ed766cb108d188", "shasum": "" }, "require": { @@ -2265,7 +2265,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.11.0" + "source": "https://github.com/twigphp/Twig/tree/v3.11.1" }, "funding": [ { @@ -2277,7 +2277,7 @@ "type": "tidelift" } ], - "time": "2024-08-08T16:15:16+00:00" + "time": "2024-09-10T10:40:14+00:00" }, { "name": "vlucas/valitron", diff --git a/system/typemill/author/js/autosize.min.js b/system/typemill/author/js/autosize.min.js index 2a162d3..d87aefa 100644 --- a/system/typemill/author/js/autosize.min.js +++ b/system/typemill/author/js/autosize.min.js @@ -1,6 +1,6 @@ /*! - Autosize 4.0.0 + Autosize 6.0.1 license: MIT http://www.jacklmoore.com/autosize */ -!function(e,t){if("function"==typeof define&&define.amd)define(["exports","module"],t);else if("undefined"!=typeof exports&&"undefined"!=typeof module)t(exports,module);else{var n={exports:{}};t(n.exports,n),e.autosize=n.exports}}(this,function(e,t){"use strict";function n(e){function t(){var t=window.getComputedStyle(e,null);"vertical"===t.resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),s="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(s)&&(s=0),l()}function n(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function o(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}function r(){var t=e.style.height,n=o(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="";var i=e.scrollHeight+s;return 0===e.scrollHeight?void(e.style.height=t):(e.style.height=i+"px",u=e.clientWidth,n.forEach(function(e){e.node.scrollTop=e.scrollTop}),void(r&&(document.documentElement.scrollTop=r)))}function l(){r();var t=Math.round(parseFloat(e.style.height)),o=window.getComputedStyle(e,null),i="content-box"===o.boxSizing?Math.round(parseFloat(o.height)):e.offsetHeight;if(i!==t?"hidden"===o.overflowY&&(n("scroll"),r(),i="content-box"===o.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==o.overflowY&&(n("hidden"),r(),i="content-box"===o.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),a!==i){a=i;var l=d("autosize:resized");try{e.dispatchEvent(l)}catch(e){}}}if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!i.has(e)){var s=null,u=e.clientWidth,a=null,c=function(){e.clientWidth!==u&&l()},p=function(t){window.removeEventListener("resize",c,!1),e.removeEventListener("input",l,!1),e.removeEventListener("keyup",l,!1),e.removeEventListener("autosize:destroy",p,!1),e.removeEventListener("autosize:update",l,!1),Object.keys(t).forEach(function(n){e.style[n]=t[n]}),i.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",p,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",l,!1),window.addEventListener("resize",c,!1),e.addEventListener("input",l,!1),e.addEventListener("autosize:update",l,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",i.set(e,{destroy:p,update:l}),t()}}function o(e){var t=i.get(e);t&&t.destroy()}function r(e){var t=i.get(e);t&&t.update()}var i="function"==typeof Map?new Map:function(){var e=[],t=[];return{has:function(t){return e.indexOf(t)>-1},get:function(n){return t[e.indexOf(n)]},set:function(n,o){e.indexOf(n)===-1&&(e.push(n),t.push(o))},delete:function(n){var o=e.indexOf(n);o>-1&&(e.splice(o,1),t.splice(o,1))}}}(),d=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){d=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}var l=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?(l=function(e){return e},l.destroy=function(e){return e},l.update=function(e){return e}):(l=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(e){return n(e,t)}),e},l.destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],o),e},l.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],r),e}),t.exports=l}); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e||self).autosize=t()}(this,function(){var e=new Map;function t(t){var o=e.get(t);o&&o.destroy()}function o(t){var o=e.get(t);o&&o.update()}var r=null;return"undefined"==typeof window?((r=function(e){return e}).destroy=function(e){return e},r.update=function(e){return e}):((r=function(t,o){return t&&Array.prototype.forEach.call(t.length?t:[t],function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!e.has(t)){var o,r=null,n=window.getComputedStyle(t),i=(o=t.value,function(){s({testForHeightReduction:""===o||!t.value.startsWith(o),restoreTextAlign:null}),o=t.value}),l=function(o){t.removeEventListener("autosize:destroy",l),t.removeEventListener("autosize:update",a),t.removeEventListener("input",i),window.removeEventListener("resize",a),Object.keys(o).forEach(function(e){return t.style[e]=o[e]}),e.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,textAlign:t.style.textAlign,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",l),t.addEventListener("autosize:update",a),t.addEventListener("input",i),window.addEventListener("resize",a),t.style.overflowX="hidden",t.style.wordWrap="break-word",e.set(t,{destroy:l,update:a}),a()}function s(e){var o,i,l=e.restoreTextAlign,a=void 0===l?null:l,d=e.testForHeightReduction,u=void 0===d||d,f=n.overflowY;if(0!==t.scrollHeight&&("vertical"===n.resize?t.style.resize="none":"both"===n.resize&&(t.style.resize="horizontal"),u&&(o=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push([e.parentNode,e.parentNode.scrollTop]),e=e.parentNode;return function(){return t.forEach(function(e){var t=e[0],o=e[1];t.style.scrollBehavior="auto",t.scrollTop=o,t.style.scrollBehavior=null})}}(t),t.style.height=""),i="content-box"===n.boxSizing?t.scrollHeight-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):t.scrollHeight+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),"none"!==n.maxHeight&&i>parseFloat(n.maxHeight)?("hidden"===n.overflowY&&(t.style.overflow="scroll"),i=parseFloat(n.maxHeight)):"hidden"!==n.overflowY&&(t.style.overflow="hidden"),t.style.height=i+"px",a&&(t.style.textAlign=a),o&&o(),r!==i&&(t.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),r=i),f!==n.overflow&&!a)){var c=n.textAlign;"hidden"===n.overflow&&(t.style.textAlign="start"===c?"end":"start"),s({restoreTextAlign:c,testForHeightReduction:!0})}}function a(){s({testForHeightReduction:!0,restoreTextAlign:null})}}(t)}),t}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],t),e},r.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],o),e}),r}); \ No newline at end of file diff --git a/system/typemill/author/js/axios.min.js b/system/typemill/author/js/axios.min.js index e8e4fc1..2ac2bb0 100644 --- a/system/typemill/author/js/axios.min.js +++ b/system/typemill/author/js/axios.min.js @@ -1,3 +1,2 @@ -/* axios v0.27.2 | (c) 2022 by Matt Zabriskie */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.axios=t():e.axios=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=13)}([function(e,t,n){"use strict";var r,o=n(4),i=Object.prototype.toString,s=(r=Object.create(null),function(e){var t=i.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())});function a(e){return e=e.toLowerCase(),function(t){return s(t)===e}}function u(e){return Array.isArray(e)}function c(e){return void 0===e}var f=a("ArrayBuffer");function l(e){return null!==e&&"object"==typeof e}function p(e){if("object"!==s(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var d=a("Date"),h=a("File"),m=a("Blob"),v=a("FileList");function y(e){return"[object Function]"===i.call(e)}var g=a("URLSearchParams");function E(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),u(e))for(var n=0,r=e.length;n0;)s[i=r[o]]||(t[i]=e[i],s[i]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:a,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;var t=e.length;if(c(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:O,isFileList:v}},function(e,t,n){"use strict";var r=n(0);function o(e,t,n,r,o){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}r.inherits(o,Error,{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,status:this.response&&this.response.status?this.response.status:null}}});var i=o.prototype,s={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){s[e]={value:e}})),Object.defineProperties(o,s),Object.defineProperty(i,"isAxiosError",{value:!0}),o.from=function(e,t,n,s,a,u){var c=Object.create(i);return r.toFlatObject(e,c,(function(e){return e!==Error.prototype})),o.call(c,e.message,t,n,s,a),c.name=e.name,u&&Object.assign(c,u),c},e.exports=o},function(e,t,n){"use strict";var r=n(1);function o(e){r.call(this,null==e?"canceled":e,r.ERR_CANCELED),this.name="CanceledError"}n(0).inherits(o,r,{__CANCEL__:!0}),e.exports=o},function(e,t,n){"use strict";var r=n(0),o=n(19),i=n(1),s=n(6),a=n(7),u={"Content-Type":"application/x-www-form-urlencoded"};function c(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var f,l={transitional:s,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(f=n(8)),f),transformRequest:[function(e,t){if(o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e))return e;if(r.isArrayBufferView(e))return e.buffer;if(r.isURLSearchParams(e))return c(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var n,i=r.isObject(e),s=t&&t["Content-Type"];if((n=r.isFileList(e))||i&&"multipart/form-data"===s){var u=this.env&&this.env.FormData;return a(n?{"files[]":e}:e,u&&new u)}return i||"application/json"===s?(c(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||l.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,s=!n&&"json"===this.responseType;if(s||o&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw i.from(e,i.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:n(27)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){l.headers[e]=r.merge(u)})),e.exports=l},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([n]):s[t]?s[t]+", "+n:n}})),s):s}},function(e,t,n){"use strict";var r=n(0);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},function(e,t){e.exports=null},function(e,t,n){"use strict";var r=n(12).version,o=n(1),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var s={};i.transitional=function(e,t,n){function i(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,a){if(!1===e)throw new o(i(r," has been removed"+(t?" in "+t:"")),o.ERR_DEPRECATED);return t&&!s[r]&&(s[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,a)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new o("options must be an object",o.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),i=r.length;i-- >0;){var s=r[i],a=t[s];if(a){var u=e[s],c=void 0===u||a(u,s,e);if(!0!==c)throw new o("option "+s+" must be "+c,o.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new o("Unknown option "+s,o.ERR_BAD_OPTION)}},validators:i}},function(e,t,n){"use strict";var r=n(2);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function c(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function l(t){return function(){return new e(t.apply(this,arguments))}}function h(e,t,r,n,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void r(e)}u.done?t(s):Promise.resolve(s).then(n,o)}function p(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){h(i,n,o,a,u,"next",e)}function u(e){h(i,n,o,a,u,"throw",e)}a(void 0)}))}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&void 0!==arguments[2]?arguments[2]:{},i=o.allOwnKeys,a=void 0!==i&&i;if(null!=e)if("object"!==f(e)&&(e=[e]),N(e))for(r=0,n=e.length;r0;)if(t===(r=n[o]).toLowerCase())return r;return null}var Q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Z=function(e){return!_(e)&&e!==Q};var ee,te=(ee="undefined"!=typeof Uint8Array&&A(Uint8Array),function(e){return ee&&e instanceof ee}),re=P("HTMLFormElement"),ne=function(e){var t=Object.prototype.hasOwnProperty;return function(e,r){return t.call(e,r)}}(),oe=P("RegExp"),ie=function(e,t){var r=Object.getOwnPropertyDescriptors(e),n={};$(r,(function(r,o){var i;!1!==(i=t(r,o,e))&&(n[o]=i||r)})),Object.defineProperties(e,n)},ae="abcdefghijklmnopqrstuvwxyz",ue="0123456789",se={DIGIT:ue,ALPHA:ae,ALPHA_DIGIT:ae+ae.toUpperCase()+ue};var ce,fe,le,he,pe=P("AsyncFunction"),de=(ce="function"==typeof setImmediate,fe=U(Q.postMessage),ce?setImmediate:fe?(le="axios@".concat(Math.random()),he=[],Q.addEventListener("message",(function(e){var t=e.source,r=e.data;t===Q&&r===le&&he.length&&he.shift()()}),!1),function(e){he.push(e),Q.postMessage(le,"*")}):function(e){return setTimeout(e)}),ve="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Q):"undefined"!=typeof process&&process.nextTick||de,ye={isArray:N,isArrayBuffer:C,isBuffer:function(e){return null!==e&&!_(e)&&null!==e.constructor&&!_(e.constructor)&&U(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:function(e){var t;return e&&("function"==typeof FormData&&e instanceof FormData||U(e.append)&&("formdata"===(t=j(e))||"object"===t&&U(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&C(e.buffer)},isString:F,isNumber:B,isBoolean:function(e){return!0===e||!1===e},isObject:D,isPlainObject:I,isReadableStream:G,isRequest:K,isResponse:V,isHeaders:X,isUndefined:_,isDate:q,isFile:M,isBlob:z,isRegExp:oe,isFunction:U,isStream:function(e){return D(e)&&U(e.pipe)},isURLSearchParams:J,isTypedArray:te,isFileList:H,forEach:$,merge:function e(){for(var t=Z(this)&&this||{},r=t.caseless,n={},o=function(t,o){var i=r&&Y(n,o)||o;I(n[i])&&I(t)?n[i]=e(n[i],t):I(t)?n[i]=e({},t):N(t)?n[i]=t.slice():n[i]=t},i=0,a=arguments.length;i3&&void 0!==arguments[3]?arguments[3]:{},o=n.allOwnKeys;return $(t,(function(t,n){r&&U(t)?e[n]=R(t,r):e[n]=t}),{allOwnKeys:o}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,r,n){e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:function(e,t,r,n){var o,i,a,u={};if(t=t||{},null==e)return t;do{for(i=(o=Object.getOwnPropertyNames(e)).length;i-- >0;)a=o[i],n&&!n(a,e,t)||u[a]||(t[a]=e[a],u[a]=!0);e=!1!==r&&A(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:j,kindOfTest:P,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return-1!==n&&n===r},toArray:function(e){if(!e)return null;if(N(e))return e;var t=e.length;if(!B(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},forEachEntry:function(e,t){for(var r,n=(e&&e[Symbol.iterator]).call(e);(r=n.next())&&!r.done;){var o=r.value;t.call(e,o[0],o[1])}},matchAll:function(e,t){for(var r,n=[];null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:re,hasOwnProperty:ne,hasOwnProp:ne,reduceDescriptors:ie,freezeMethods:function(e){ie(e,(function(t,r){if(U(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;var n=e[r];U(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=function(){throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:function(e,t){var r={},n=function(e){e.forEach((function(e){r[e]=!0}))};return N(e)?n(e):n(String(e).split(t)),r},toCamelCase:function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))},noop:function(){},toFiniteNumber:function(e,t){return null!=e&&Number.isFinite(e=+e)?e:t},findKey:Y,global:Q,isContextDefined:Z,ALPHABET:se,generateString:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:se.ALPHA_DIGIT,r="",n=t.length;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&U(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:function(e){var t=new Array(10);return function e(r,n){if(D(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[n]=r;var o=N(r)?[]:{};return $(r,(function(t,r){var i=e(t,n+1);!_(i)&&(o[r]=i)})),t[n]=void 0,o}}return r}(e,0)},isAsyncFn:pe,isThenable:function(e){return e&&(D(e)||U(e))&&U(e.then)&&U(e.catch)},setImmediate:de,asap:ve};function me(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}ye.inherits(me,Error,{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:ye.toJSONObject(this.config),code:this.code,status:this.status}}});var be=me.prototype,ge={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){ge[e]={value:e}})),Object.defineProperties(me,ge),Object.defineProperty(be,"isAxiosError",{value:!0}),me.from=function(e,t,r,n,o,i){var a=Object.create(be);return ye.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(function(e){return"isAxiosError"!==e})),me.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};function we(e){return ye.isPlainObject(e)||ye.isArray(e)}function Ee(e){return ye.endsWith(e,"[]")?e.slice(0,-2):e}function Oe(e,t,r){return e?e.concat(t).map((function(e,t){return e=Ee(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}var Se=ye.toFlatObject(ye,{},null,(function(e){return/^is[A-Z]/.test(e)}));function xe(e,t,r){if(!ye.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var n=(r=ye.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!ye.isUndefined(t[e])}))).metaTokens,o=r.visitor||c,i=r.dots,a=r.indexes,u=(r.Blob||"undefined"!=typeof Blob&&Blob)&&ye.isSpecCompliantForm(t);if(!ye.isFunction(o))throw new TypeError("visitor must be a function");function s(e){if(null===e)return"";if(ye.isDate(e))return e.toISOString();if(!u&&ye.isBlob(e))throw new me("Blob is not supported. Use a Buffer instead.");return ye.isArrayBuffer(e)||ye.isTypedArray(e)?u&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,o){var u=e;if(e&&!o&&"object"===f(e))if(ye.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(ye.isArray(e)&&function(e){return ye.isArray(e)&&!e.some(we)}(e)||(ye.isFileList(e)||ye.endsWith(r,"[]"))&&(u=ye.toArray(e)))return r=Ee(r),u.forEach((function(e,n){!ye.isUndefined(e)&&null!==e&&t.append(!0===a?Oe([r],n,i):null===a?r:r+"[]",s(e))})),!1;return!!we(e)||(t.append(Oe(o,r,i),s(e)),!1)}var l=[],h=Object.assign(Se,{defaultVisitor:c,convertValue:s,isVisitable:we});if(!ye.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!ye.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),ye.forEach(r,(function(r,i){!0===(!(ye.isUndefined(r)||null===r)&&o.call(t,r,ye.isString(i)?i.trim():i,n,h))&&e(r,n?n.concat(i):[i])})),l.pop()}}(e),t}function Re(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Te(e,t){this._pairs=[],e&&xe(e,this,t)}var ke=Te.prototype;function Ae(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function je(e,t,r){if(!t)return e;var n,o=r&&r.encode||Ae,i=r&&r.serialize;if(n=i?i(t,r):ye.isURLSearchParams(t)?t.toString():new Te(t,r).toString(o)){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}ke.append=function(e,t){this._pairs.push([e,t])},ke.toString=function(e){var t=e?function(t){return e.call(this,t,Re)}:Re;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var Pe=function(){function e(){d(this,e),this.handlers=[]}return y(e,[{key:"use",value:function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}},{key:"eject",value:function(e){this.handlers[e]&&(this.handlers[e]=null)}},{key:"clear",value:function(){this.handlers&&(this.handlers=[])}},{key:"forEach",value:function(e){ye.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}]),e}(),Le={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ne={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Te,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},_e="undefined"!=typeof window&&"undefined"!=typeof document,Ce="object"===("undefined"==typeof navigator?"undefined":f(navigator))&&navigator||void 0,Fe=_e&&(!Ce||["ReactNative","NativeScript","NS"].indexOf(Ce.product)<0),Ue="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Be=_e&&window.location.href||"http://localhost",De=u(u({},Object.freeze({__proto__:null,hasBrowserEnv:_e,hasStandardBrowserWebWorkerEnv:Ue,hasStandardBrowserEnv:Fe,navigator:Ce,origin:Be})),Ne);function Ie(e){function t(e,r,n,o){var i=e[o++];if("__proto__"===i)return!0;var a=Number.isFinite(+i),u=o>=e.length;return i=!i&&ye.isArray(n)?n.length:i,u?(ye.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a):(n[i]&&ye.isObject(n[i])||(n[i]=[]),t(e,r,n[i],o)&&ye.isArray(n[i])&&(n[i]=function(e){var t,r,n={},o=Object.keys(e),i=o.length;for(t=0;t-1,i=ye.isObject(e);if(i&&ye.isHTMLForm(e)&&(e=new FormData(e)),ye.isFormData(e))return o?JSON.stringify(Ie(e)):e;if(ye.isArrayBuffer(e)||ye.isBuffer(e)||ye.isStream(e)||ye.isFile(e)||ye.isBlob(e)||ye.isReadableStream(e))return e;if(ye.isArrayBufferView(e))return e.buffer;if(ye.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return xe(e,new De.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return De.isNode&&ye.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((r=ye.isFileList(e))||n.indexOf("multipart/form-data")>-1){var a=this.env&&this.env.FormData;return xe(r?{"files[]":e}:e,a&&new a,this.formSerializer)}}return i||o?(t.setContentType("application/json",!1),function(e,t,r){if(ye.isString(e))try{return(t||JSON.parse)(e),ye.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||qe.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(ye.isResponse(e)||ye.isReadableStream(e))return e;if(e&&ye.isString(e)&&(r&&!this.responseType||n)){var o=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw me.from(e,me.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:De.classes.FormData,Blob:De.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ye.forEach(["delete","get","head","post","put","patch"],(function(e){qe.headers[e]={}}));var Me=qe,ze=ye.toObjectSet(["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"]),He=Symbol("internals");function Je(e){return e&&String(e).trim().toLowerCase()}function We(e){return!1===e||null==e?e:ye.isArray(e)?e.map(We):String(e)}function Ge(e,t,r,n,o){return ye.isFunction(n)?n.call(this,t,r):(o&&(t=r),ye.isString(t)?ye.isString(n)?-1!==t.indexOf(n):ye.isRegExp(n)?n.test(t):void 0:void 0)}var Ke=function(e,t){function r(e){d(this,r),e&&this.set(e)}return y(r,[{key:"set",value:function(e,t,r){var n=this;function o(e,t,r){var o=Je(t);if(!o)throw new Error("header name must be a non-empty string");var i=ye.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=We(e))}var i=function(e,t){return ye.forEach(e,(function(e,r){return o(e,r,t)}))};if(ye.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(ye.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i(function(e){var t,r,n,o={};return e&&e.split("\n").forEach((function(e){n=e.indexOf(":"),t=e.substring(0,n).trim().toLowerCase(),r=e.substring(n+1).trim(),!t||o[t]&&ze[t]||("set-cookie"===t?o[t]?o[t].push(r):o[t]=[r]:o[t]=o[t]?o[t]+", "+r:r)})),o}(e),t);else if(ye.isHeaders(e)){var a,u=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=O(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e.entries());try{for(u.s();!(a=u.n()).done;){var s=b(a.value,2),c=s[0];o(s[1],c,r)}}catch(e){u.e(e)}finally{u.f()}}else null!=e&&o(t,e,r);return this}},{key:"get",value:function(e,t){if(e=Je(e)){var r=ye.findKey(this,e);if(r){var n=this[r];if(!t)return n;if(!0===t)return function(e){for(var t,r=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;t=n.exec(e);)r[t[1]]=t[2];return r}(n);if(ye.isFunction(t))return t.call(this,n,r);if(ye.isRegExp(t))return t.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=Je(e)){var r=ye.findKey(this,e);return!(!r||void 0===this[r]||t&&!Ge(0,this[r],r,t))}return!1}},{key:"delete",value:function(e,t){var r=this,n=!1;function o(e){if(e=Je(e)){var o=ye.findKey(r,e);!o||t&&!Ge(0,r[o],o,t)||(delete r[o],n=!0)}}return ye.isArray(e)?e.forEach(o):o(e),n}},{key:"clear",value:function(e){for(var t=Object.keys(this),r=t.length,n=!1;r--;){var o=t[r];e&&!Ge(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}},{key:"normalize",value:function(e){var t=this,r={};return ye.forEach(this,(function(n,o){var i=ye.findKey(r,o);if(i)return t[i]=We(n),void delete t[o];var a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))}(o):String(o).trim();a!==o&&delete t[o],t[a]=We(n),r[a]=!0})),this}},{key:"concat",value:function(){for(var e,t=arguments.length,r=new Array(t),n=0;n1?r-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:Date.now();o=i,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[function(){for(var e=Date.now(),t=e-o,u=arguments.length,s=new Array(u),c=0;c=i?a(s,e):(r=s,n||(n=setTimeout((function(){n=null,a(r)}),i-t)))},function(){return r&&a(r)}]}ye.inherits(Ye,me,{__CANCEL__:!0});var tt=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,n=0,o=Ze(50,250);return et((function(r){var i=r.loaded,a=r.lengthComputable?r.total:void 0,u=i-n,s=o(u);n=i;var c=m({loaded:i,total:a,progress:a?i/a:void 0,bytes:u,rate:s||void 0,estimated:s&&a&&i<=a?(a-i)/s:void 0,event:r,lengthComputable:null!=a},t?"download":"upload",!0);e(c)}),r)},rt=function(e,t){var r=null!=e;return[function(n){return t[0]({lengthComputable:r,total:e,loaded:n})},t[1]]},nt=function(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n1?t-1:0),n=1;n1?"since :\n"+u.map(jt).join("\n"):" "+jt(u[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Nt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ye(null,e)}function _t(e){return Nt(e),e.headers=Ve.from(e.headers),e.data=Xe.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Lt(e.adapter||Me.adapter)(e).then((function(t){return Nt(e),t.data=Xe.call(e,e.transformResponse,t),t.headers=Ve.from(t.headers),t}),(function(t){return $e(t)||(Nt(e),t&&t.response&&(t.response.data=Xe.call(e,e.transformResponse,t.response),t.response.headers=Ve.from(t.response.headers))),Promise.reject(t)}))}var Ct="1.7.7",Ft={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){Ft[e]=function(r){return f(r)===e||"a"+(t<1?"n ":" ")+e}}));var Ut={};Ft.transitional=function(e,t,r){function n(e,t){return"[Axios v1.7.7] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,o,i){if(!1===e)throw new me(n(o," has been removed"+(t?" in "+t:"")),me.ERR_DEPRECATED);return t&&!Ut[o]&&(Ut[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}};var Bt={assertOptions:function(e,t,r){if("object"!==f(e))throw new me("options must be an object",me.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],a=t[i];if(a){var u=e[i],s=void 0===u||a(u,i,e);if(!0!==s)throw new me("option "+i+" must be "+s,me.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new me("Unknown option "+i,me.ERR_BAD_OPTION)}},validators:Ft},Dt=Bt.validators,It=function(){function e(t){d(this,e),this.defaults=t,this.interceptors={request:new Pe,response:new Pe}}var t;return y(e,[{key:"request",value:(t=p(s().mark((function e(t,r){var n,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._request(t,r);case 3:return e.abrupt("return",e.sent);case 6:if(e.prev=6,e.t0=e.catch(0),e.t0 instanceof Error){Error.captureStackTrace?Error.captureStackTrace(n={}):n=new Error,o=n.stack?n.stack.replace(/^.+\n/,""):"";try{e.t0.stack?o&&!String(e.t0.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(e.t0.stack+="\n"+o):e.t0.stack=o}catch(e){}}throw e.t0;case 10:case"end":return e.stop()}}),e,this,[[0,6]])}))),function(e,r){return t.apply(this,arguments)})},{key:"_request",value:function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{};var r=t=st(this.defaults,t),n=r.transitional,o=r.paramsSerializer,i=r.headers;void 0!==n&&Bt.assertOptions(n,{silentJSONParsing:Dt.transitional(Dt.boolean),forcedJSONParsing:Dt.transitional(Dt.boolean),clarifyTimeoutError:Dt.transitional(Dt.boolean)},!1),null!=o&&(ye.isFunction(o)?t.paramsSerializer={serialize:o}:Bt.assertOptions(o,{encode:Dt.function,serialize:Dt.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();var a=i&&ye.merge(i.common,i[t.method]);i&&ye.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]})),t.headers=Ve.concat(a,i);var u=[],s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,u.unshift(e.fulfilled,e.rejected))}));var c,f=[];this.interceptors.response.forEach((function(e){f.push(e.fulfilled,e.rejected)}));var l,h=0;if(!s){var p=[_t.bind(this),void 0];for(p.unshift.apply(p,u),p.push.apply(p,f),l=p.length,c=Promise.resolve(t);h0;)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},t((function(e,t,o){n.reason||(n.reason=new Ye(e,t,o),r(n.reason))}))}return y(e,[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}},{key:"unsubscribe",value:function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}},{key:"toAbortSignal",value:function(){var e=this,t=new AbortController,r=function(e){t.abort(e)};return this.subscribe(r),t.signal.unsubscribe=function(){return e.unsubscribe(r)},t.signal}}],[{key:"source",value:function(){var t;return{token:new e((function(e){t=e})),cancel:t}}}]),e}(),zt=Mt;var Ht={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ht).forEach((function(e){var t=b(e,2),r=t[0],n=t[1];Ht[n]=r}));var Jt=Ht;var Wt=function e(t){var r=new qt(t),n=R(qt.prototype.request,r);return ye.extend(n,qt.prototype,r,{allOwnKeys:!0}),ye.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(st(t,r))},n}(Me);return Wt.Axios=qt,Wt.CanceledError=Ye,Wt.CancelToken=zt,Wt.isCancel=$e,Wt.VERSION=Ct,Wt.toFormData=xe,Wt.AxiosError=me,Wt.Cancel=Wt.CanceledError,Wt.all=function(e){return Promise.all(e)},Wt.spread=function(e){return function(t){return e.apply(null,t)}},Wt.isAxiosError=function(e){return ye.isObject(e)&&!0===e.isAxiosError},Wt.mergeConfig=st,Wt.AxiosHeaders=Ve,Wt.formToJSON=function(e){return Ie(ye.isHTMLForm(e)?new FormData(e):e)},Wt.getAdapter=Lt,Wt.HttpStatusCode=Jt,Wt.default=Wt,Wt})); diff --git a/system/typemill/author/js/vue.global.prod.js b/system/typemill/author/js/vue.global.prod.js index 5ae9924..0ee4384 100644 --- a/system/typemill/author/js/vue.global.prod.js +++ b/system/typemill/author/js/vue.global.prod.js @@ -1,11 +1,10 @@ /** -* vue v3.4.21 +* vue v3.5.5 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ -var Vue=function(e){"use strict";function t(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}const n={},s=[],o=()=>{},r=()=>!1,i=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),l=e=>e.startsWith("onUpdate:"),c=Object.assign,a=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},u=Object.prototype.hasOwnProperty,d=(e,t)=>u.call(e,t),p=Array.isArray,h=e=>"[object Map]"===x(e),f=e=>"[object Set]"===x(e),m=e=>"[object Date]"===x(e),g=e=>"function"==typeof e,v=e=>"string"==typeof e,y=e=>"symbol"==typeof e,b=e=>null!==e&&"object"==typeof e,_=e=>(b(e)||g(e))&&g(e.then)&&g(e.catch),S=Object.prototype.toString,x=e=>S.call(e),C=e=>x(e).slice(8,-1),k=e=>"[object Object]"===x(e),T=e=>v(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,w=t(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),E=t("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),N=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},A=/-(\w)/g,I=N((e=>e.replace(A,((e,t)=>t?t.toUpperCase():"")))),R=/\B([A-Z])/g,O=N((e=>e.replace(R,"-$1").toLowerCase())),L=N((e=>e.charAt(0).toUpperCase()+e.slice(1))),F=N((e=>e?`on${L(e)}`:"")),M=(e,t)=>!Object.is(e,t),P=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},B=e=>{const t=parseFloat(e);return isNaN(t)?e:t},V=e=>{const t=v(e)?Number(e):NaN;return isNaN(t)?e:t};let D;const U=()=>D||(D="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}),j=t("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error");function H(e){if(p(e)){const t={};for(let n=0;n{if(e){const n=e.split(W);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function G(e){let t="";if(v(e))t=e;else if(p(e))for(let n=0;nte(e,t)))}const se=(e,t)=>t&&t.__v_isRef?se(e,t.value):h(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n],s)=>(e[oe(t,s)+" =>"]=n,e)),{})}:f(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>oe(e)))}:y(t)?oe(t):!b(t)||p(t)||k(t)?t:String(t),oe=(e,t="")=>{var n;return y(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};let re,ie;class le{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=re,!e&&re&&(this.index=(re.scopes||(re.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=re;try{return re=this,e()}finally{re=t}}}on(){re=this}off(){re=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),be()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=me,t=ie;try{return me=!0,ie=this,this._runnings++,pe(this),this.fn()}finally{he(this),this._runnings--,ie=t,me=e}}stop(){var e;this.active&&(pe(this),he(this),null==(e=this.onStop)||e.call(this),this.active=!1)}}function de(e){return e.value}function pe(e){e._trackId++,e._depsLength=0}function he(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t{const n=new Map;return n.cleanup=e,n.computed=t,n},we=new WeakMap,Ee=Symbol(""),Ne=Symbol("");function Ae(e,t,n){if(me&&ie){let t=we.get(e);t||we.set(e,t=new Map);let s=t.get(n);s||t.set(n,s=Te((()=>t.delete(n)))),xe(ie,s)}}function Ie(e,t,n,s,o,r){const i=we.get(e);if(!i)return;let l=[];if("clear"===t)l=[...i.values()];else if("length"===n&&p(e)){const e=Number(s);i.forEach(((t,n)=>{("length"===n||!y(n)&&n>=e)&&l.push(t)}))}else switch(void 0!==n&&l.push(i.get(n)),t){case"add":p(e)?T(n)&&l.push(i.get("length")):(l.push(i.get(Ee)),h(e)&&l.push(i.get(Ne)));break;case"delete":p(e)||(l.push(i.get(Ee)),h(e)&&l.push(i.get(Ne)));break;case"set":h(e)&&l.push(i.get(Ee))}_e();for(const c of l)c&&ke(c,4);Se()}const Re=t("__proto__,__v_isRef,__isVue"),Oe=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(y)),Le=Fe();function Fe(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=Ct(this);for(let t=0,o=this.length;t{e[t]=function(...e){ye(),_e();const n=Ct(this)[t].apply(this,e);return Se(),be(),n}})),e}function Me(e){const t=Ct(this);return Ae(t,0,e),t.hasOwnProperty(e)}class Pe{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const s=this._isReadonly,o=this._isShallow;if("__v_isReactive"===t)return!s;if("__v_isReadonly"===t)return s;if("__v_isShallow"===t)return o;if("__v_raw"===t)return n===(s?o?ft:ht:o?pt:dt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const r=p(e);if(!s){if(r&&d(Le,t))return Reflect.get(Le,t,n);if("hasOwnProperty"===t)return Me}const i=Reflect.get(e,t,n);return(y(t)?Oe.has(t):Re(t))?i:(s||Ae(e,0,t),o?i:It(i)?r&&T(t)?i:i.value:b(i)?s?vt(i):mt(i):i)}}class $e extends Pe{constructor(e=!1){super(!1,e)}set(e,t,n,s){let o=e[t];if(!this._isShallow){const t=_t(o);if(St(n)||_t(n)||(o=Ct(o),n=Ct(n)),!p(e)&&It(o)&&!It(n))return!t&&(o.value=n,!0)}const r=p(e)&&T(t)?Number(t)e,qe=e=>Reflect.getPrototypeOf(e);function We(e,t,n=!1,s=!1){const o=Ct(e=e.__v_raw),r=Ct(t);n||(M(t,r)&&Ae(o,0,t),Ae(o,0,r));const{has:i}=qe(o),l=s?He:n?wt:Tt;return i.call(o,t)?l(e.get(t)):i.call(o,r)?l(e.get(r)):void(e!==o&&e.get(t))}function Ke(e,t=!1){const n=this.__v_raw,s=Ct(n),o=Ct(e);return t||(M(e,o)&&Ae(s,0,e),Ae(s,0,o)),e===o?n.has(e):n.has(e)||n.has(o)}function ze(e,t=!1){return e=e.__v_raw,!t&&Ae(Ct(e),0,Ee),Reflect.get(e,"size",e)}function Ge(e){e=Ct(e);const t=Ct(this);return qe(t).has.call(t,e)||(t.add(e),Ie(t,"add",e,e)),this}function Je(e,t){t=Ct(t);const n=Ct(this),{has:s,get:o}=qe(n);let r=s.call(n,e);r||(e=Ct(e),r=s.call(n,e));const i=o.call(n,e);return n.set(e,t),r?M(t,i)&&Ie(n,"set",e,t):Ie(n,"add",e,t),this}function Xe(e){const t=Ct(this),{has:n,get:s}=qe(t);let o=n.call(t,e);o||(e=Ct(e),o=n.call(t,e)),s&&s.call(t,e);const r=t.delete(e);return o&&Ie(t,"delete",e,void 0),r}function Qe(){const e=Ct(this),t=0!==e.size,n=e.clear();return t&&Ie(e,"clear",void 0,void 0),n}function Ze(e,t){return function(n,s){const o=this,r=o.__v_raw,i=Ct(r),l=t?He:e?wt:Tt;return!e&&Ae(i,0,Ee),r.forEach(((e,t)=>n.call(s,l(e),l(t),o)))}}function Ye(e,t,n){return function(...s){const o=this.__v_raw,r=Ct(o),i=h(r),l="entries"===e||e===Symbol.iterator&&i,c="keys"===e&&i,a=o[e](...s),u=n?He:t?wt:Tt;return!t&&Ae(r,0,c?Ne:Ee),{next(){const{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:l?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function et(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function tt(){const e={get(e){return We(this,e)},get size(){return ze(this)},has:Ke,add:Ge,set:Je,delete:Xe,clear:Qe,forEach:Ze(!1,!1)},t={get(e){return We(this,e,!1,!0)},get size(){return ze(this)},has:Ke,add:Ge,set:Je,delete:Xe,clear:Qe,forEach:Ze(!1,!0)},n={get(e){return We(this,e,!0)},get size(){return ze(this,!0)},has(e){return Ke.call(this,e,!0)},add:et("add"),set:et("set"),delete:et("delete"),clear:et("clear"),forEach:Ze(!0,!1)},s={get(e){return We(this,e,!0,!0)},get size(){return ze(this,!0)},has(e){return Ke.call(this,e,!0)},add:et("add"),set:et("set"),delete:et("delete"),clear:et("clear"),forEach:Ze(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((o=>{e[o]=Ye(o,!1,!1),n[o]=Ye(o,!0,!1),t[o]=Ye(o,!1,!0),s[o]=Ye(o,!0,!0)})),[e,n,t,s]}const[nt,st,ot,rt]=tt();function it(e,t){const n=t?e?rt:ot:e?st:nt;return(t,s,o)=>"__v_isReactive"===s?!e:"__v_isReadonly"===s?e:"__v_raw"===s?t:Reflect.get(d(n,s)&&s in t?n:t,s,o)}const lt={get:it(!1,!1)},ct={get:it(!1,!0)},at={get:it(!0,!1)},ut={get:it(!0,!0)},dt=new WeakMap,pt=new WeakMap,ht=new WeakMap,ft=new WeakMap;function mt(e){return _t(e)?e:yt(e,!1,Ve,lt,dt)}function gt(e){return yt(e,!1,Ue,ct,pt)}function vt(e){return yt(e,!0,De,at,ht)}function yt(e,t,n,s,o){if(!b(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const r=o.get(e);if(r)return r;const i=(l=e).__v_skip||!Object.isExtensible(l)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(C(l));var l;if(0===i)return e;const c=new Proxy(e,2===i?s:n);return o.set(e,c),c}function bt(e){return _t(e)?bt(e.__v_raw):!(!e||!e.__v_isReactive)}function _t(e){return!(!e||!e.__v_isReadonly)}function St(e){return!(!e||!e.__v_isShallow)}function xt(e){return bt(e)||_t(e)}function Ct(e){const t=e&&e.__v_raw;return t?Ct(t):e}function kt(e){return Object.isExtensible(e)&&$(e,"__v_skip",!0),e}const Tt=e=>b(e)?mt(e):e,wt=e=>b(e)?vt(e):e;class Et{constructor(e,t,n,s){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new ue((()=>e(this._value)),(()=>At(this,2===this.effect._dirtyLevel?2:3))),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const e=Ct(this);return e._cacheable&&!e.effect.dirty||!M(e._value,e._value=e.effect.run())||At(e,4),Nt(e),e.effect._dirtyLevel>=2&&At(e,2),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function Nt(e){var t;me&&ie&&(e=Ct(e),xe(ie,null!=(t=e.dep)?t:e.dep=Te((()=>e.dep=void 0),e instanceof Et?e:void 0)))}function At(e,t=4,n){const s=(e=Ct(e)).dep;s&&ke(s,t)}function It(e){return!(!e||!0!==e.__v_isRef)}function Rt(e){return Ot(e,!1)}function Ot(e,t){return It(e)?e:new Lt(e,t)}class Lt{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:Ct(e),this._value=t?e:Tt(e)}get value(){return Nt(this),this._value}set value(e){const t=this.__v_isShallow||St(e)||_t(e);e=t?e:Ct(e),M(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:Tt(e),At(this,4))}}function Ft(e){return It(e)?e.value:e}const Mt={get:(e,t,n)=>Ft(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return It(o)&&!It(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function Pt(e){return bt(e)?e:new Proxy(e,Mt)}class $t{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e((()=>Nt(this)),(()=>At(this)));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function Bt(e){return new $t(e)}class Vt{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return e=Ct(this._object),t=this._key,null==(n=we.get(e))?void 0:n.get(t);var e,t,n}}class Dt{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Ut(e,t,n){const s=e[t];return It(s)?s:new Vt(e,t,n)}function jt(e,t,n,s){try{return s?e(...s):e()}catch(o){qt(o,t,n)}}function Ht(e,t,n,s){if(g(e)){const o=jt(e,t,n,s);return o&&_(o)&&o.catch((e=>{qt(e,t,n)})),o}const o=[];for(let r=0;r>>1,o=zt[s],r=ln(o);rln(e)-ln(t)));if(Jt.length=0,Xt)return void Xt.push(...e);for(Xt=e,Qt=0;Qtnull==e.id?1/0:e.id,cn=(e,t)=>{const n=ln(e)-ln(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function an(e){Kt=!1,Wt=!0,zt.sort(cn);try{for(Gt=0;Gtv(e)?e.trim():e))),t&&(r=s.map(B))}let c,a=o[c=F(t)]||o[c=F(I(t))];!a&&i&&(a=o[c=F(O(t))]),a&&Ht(a,e,6,r);const u=o[c+"Once"];if(u){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,Ht(u,e,6,r)}}function dn(e,t,n=!1){const s=t.emitsCache,o=s.get(e);if(void 0!==o)return o;const r=e.emits;let i={},l=!1;if(!g(e)){const s=e=>{const n=dn(e,t,!0);n&&(l=!0,c(i,n))};!n&&t.mixins.length&&t.mixins.forEach(s),e.extends&&s(e.extends),e.mixins&&e.mixins.forEach(s)}return r||l?(p(r)?r.forEach((e=>i[e]=null)):c(i,r),b(e)&&s.set(e,i),i):(b(e)&&s.set(e,null),null)}function pn(e,t){return!(!e||!i(t))&&(t=t.slice(2).replace(/Once$/,""),d(e,t[0].toLowerCase()+t.slice(1))||d(e,O(t))||d(e,t))}let hn=null,fn=null;function mn(e){const t=hn;return hn=e,fn=e&&e.type.__scopeId||null,t}function gn(e,t=hn,n){if(!t)return e;if(e._n)return e;const s=(...n)=>{s._d&&Ho(-1);const o=mn(t);let r;try{r=e(...n)}finally{mn(o),s._d&&Ho(1)}return r};return s._n=!0,s._c=!0,s._d=!0,s}function vn(e){const{type:t,vnode:n,proxy:s,withProxy:o,props:r,propsOptions:[i],slots:c,attrs:a,emit:u,render:d,renderCache:p,data:h,setupState:f,ctx:m,inheritAttrs:g}=e;let v,y;const b=mn(e);try{if(4&n.shapeFlag){const e=o||s;v=nr(d.call(e,e,p,r,f,h,m)),y=a}else{const e=t;0,v=nr(e(r,e.length>1?{attrs:a,slots:c,emit:u}:null)),y=t.props?a:yn(a)}}catch(S){Bo.length=0,qt(S,e,1),v=Zo(Po)}let _=v;if(y&&!1!==g){const e=Object.keys(y),{shapeFlag:t}=_;e.length&&7&t&&(i&&e.some(l)&&(y=bn(y,i)),_=er(_,y))}return n.dirs&&(_=er(_),_.dirs=_.dirs?_.dirs.concat(n.dirs):n.dirs),n.transition&&(_.transition=n.transition),v=_,mn(b),v}const yn=e=>{let t;for(const n in e)("class"===n||"style"===n||i(n))&&((t||(t={}))[n]=e[n]);return t},bn=(e,t)=>{const n={};for(const s in e)l(s)&&s.slice(9)in t||(n[s]=e[s]);return n};function _n(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let o=0;oe.__isSuspense;let En=0;const Nn={name:"Suspense",__isSuspense:!0,process(e,t,n,s,o,r,i,l,c,a){if(null==e)!function(e,t,n,s,o,r,i,l,c){const{p:a,o:{createElement:u}}=c,d=u("div"),p=e.suspense=In(e,o,s,t,d,n,r,i,l,c);a(null,p.pendingBranch=e.ssContent,d,null,s,p,r,i),p.deps>0?(An(e,"onPending"),An(e,"onFallback"),a(null,e.ssFallback,t,n,s,null,r,i),Ln(p,e.ssFallback)):p.resolve(!1,!0)}(t,n,s,o,r,i,l,c,a);else{if(r&&r.deps>0&&!e.suspense.isInFallback)return t.suspense=e.suspense,t.suspense.vnode=t,void(t.el=e.el);!function(e,t,n,s,o,r,i,l,{p:c,um:a,o:{createElement:u}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const p=t.ssContent,h=t.ssFallback,{activeBranch:f,pendingBranch:m,isInFallback:g,isHydrating:v}=d;if(m)d.pendingBranch=p,zo(p,m)?(c(m,p,d.hiddenContainer,null,o,d,r,i,l),d.deps<=0?d.resolve():g&&(v||(c(f,h,n,s,o,null,r,i,l),Ln(d,h)))):(d.pendingId=En++,v?(d.isHydrating=!1,d.activeBranch=m):a(m,o,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),g?(c(null,p,d.hiddenContainer,null,o,d,r,i,l),d.deps<=0?d.resolve():(c(f,h,n,s,o,null,r,i,l),Ln(d,h))):f&&zo(p,f)?(c(f,p,n,s,o,d,r,i,l),d.resolve(!0)):(c(null,p,d.hiddenContainer,null,o,d,r,i,l),d.deps<=0&&d.resolve()));else if(f&&zo(p,f))c(f,p,n,s,o,d,r,i,l),Ln(d,p);else if(An(t,"onPending"),d.pendingBranch=p,d.pendingId=512&p.shapeFlag?p.component.suspenseId:En++,c(null,p,d.hiddenContainer,null,o,d,r,i,l),d.deps<=0)d.resolve();else{const{timeout:e,pendingId:t}=d;e>0?setTimeout((()=>{d.pendingId===t&&d.fallback(h)}),e):0===e&&d.fallback(h)}}(e,t,n,s,o,i,l,c,a)}},hydrate:function(e,t,n,s,o,r,i,l,c){const a=t.suspense=In(t,s,n,e.parentNode,document.createElement("div"),null,o,r,i,l,!0),u=c(e,a.pendingBranch=t.ssContent,n,a,r,i);0===a.deps&&a.resolve(!1,!0);return u},create:In,normalize:function(e){const{shapeFlag:t,children:n}=e,s=32&t;e.ssContent=Rn(s?n.default:n),e.ssFallback=s?Rn(n.fallback):Zo(Po)}};function An(e,t){const n=e.props&&e.props[t];g(n)&&n()}function In(e,t,n,s,o,r,i,l,c,a,u=!1){const{p:d,m:p,um:h,n:f,o:{parentNode:m,remove:g}}=a;let v;const y=function(e){var t;return null!=(null==(t=e.props)?void 0:t.suspensible)&&!1!==e.props.suspensible}(e);y&&(null==t?void 0:t.pendingBranch)&&(v=t.pendingId,t.deps++);const b=e.props?V(e.props.timeout):void 0,_=r,S={vnode:e,parent:t,parentComponent:n,namespace:i,container:s,hiddenContainer:o,deps:0,pendingId:En++,timeout:"number"==typeof b?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){const{vnode:s,activeBranch:o,pendingBranch:i,pendingId:l,effects:c,parentComponent:a,container:u}=S;let d=!1;S.isHydrating?S.isHydrating=!1:e||(d=o&&i.transition&&"out-in"===i.transition.mode,d&&(o.transition.afterLeave=()=>{l===S.pendingId&&(p(i,u,r===_?f(o):r,0),sn(c))}),o&&(m(o.el)!==S.hiddenContainer&&(r=f(o)),h(o,a,S,!0)),d||p(i,u,r,0)),Ln(S,i),S.pendingBranch=null,S.isInFallback=!1;let g=S.parent,b=!1;for(;g;){if(g.pendingBranch){g.effects.push(...c),b=!0;break}g=g.parent}b||d||sn(c),S.effects=[],y&&t&&t.pendingBranch&&v===t.pendingId&&(t.deps--,0!==t.deps||n||t.resolve()),An(s,"onResolve")},fallback(e){if(!S.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:s,container:o,namespace:r}=S;An(t,"onFallback");const i=f(n),a=()=>{S.isInFallback&&(d(null,e,o,i,s,null,r,l,c),Ln(S,e))},u=e.transition&&"out-in"===e.transition.mode;u&&(n.transition.afterLeave=a),S.isInFallback=!0,h(n,s,null,!0),u||a()},move(e,t,n){S.activeBranch&&p(S.activeBranch,e,t,n),S.container=e},next:()=>S.activeBranch&&f(S.activeBranch),registerDep(e,t){const n=!!S.pendingBranch;n&&S.deps++;const s=e.vnode.el;e.asyncDep.catch((t=>{qt(t,e,0)})).then((o=>{if(e.isUnmounted||S.isUnmounted||S.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:r}=e;br(e,o,!1),s&&(r.el=s);const l=!s&&e.subTree.el;t(e,r,m(s||e.subTree.el),s?null:f(e.subTree),S,i,c),l&&g(l),Sn(e,r.el),n&&0==--S.deps&&S.resolve()}))},unmount(e,t){S.isUnmounted=!0,S.activeBranch&&h(S.activeBranch,n,e,t),S.pendingBranch&&h(S.pendingBranch,n,e,t)}};return S}function Rn(e){let t;if(g(e)){const n=jo&&e._c;n&&(e._d=!1,Do()),e=e(),n&&(e._d=!0,t=Vo,Uo())}if(p(e)){const t=function(e,t=!0){let n;for(let s=0;st!==e))),e}function On(e,t){t&&t.pendingBranch?p(e)?t.effects.push(...e):t.effects.push(e):sn(e)}function Ln(e,t){e.activeBranch=t;const{vnode:n,parentComponent:s}=e;let o=t.el;for(;!o&&t.component;)o=(t=t.component.subTree).el;n.el=o,s&&s.subTree===n&&(s.vnode.el=o,Sn(s,o))}const Fn=Symbol.for("v-scx");function Mn(e,t){return Vn(e,null,{flush:"post"})}function Pn(e,t){return Vn(e,null,{flush:"sync"})}const $n={};function Bn(e,t,n){return Vn(e,t,n)}function Vn(e,t,{immediate:s,deep:r,flush:i,once:l}=n){if(t&&l){const e=t;t=(...t)=>{e(...t),C()}}const c=ar,u=e=>!0===r?e:jn(e,!1===r?1:void 0);let d,h,f=!1,m=!1;if(It(e)?(d=()=>e.value,f=St(e)):bt(e)?(d=()=>u(e),f=!0):p(e)?(m=!0,f=e.some((e=>bt(e)||St(e))),d=()=>e.map((e=>It(e)?e.value:bt(e)?u(e):g(e)?jt(e,c,2):void 0))):d=g(e)?t?()=>jt(e,c,2):()=>(h&&h(),Ht(e,c,3,[v])):o,t&&r){const e=d;d=()=>jn(e())}let v=e=>{h=S.onStop=()=>{jt(e,c,4),h=S.onStop=void 0}},y=m?new Array(e.length).fill($n):$n;const b=()=>{if(S.active&&S.dirty)if(t){const e=S.run();(r||f||(m?e.some(((e,t)=>M(e,y[t]))):M(e,y)))&&(h&&h(),Ht(t,c,3,[e,y===$n?void 0:m&&y[0]===$n?[]:y,v]),y=e)}else S.run()};let _;b.allowRecurse=!!t,"sync"===i?_=b:"post"===i?_=()=>yo(b,c&&c.suspense):(b.pre=!0,c&&(b.id=c.uid),_=()=>tn(b));const S=new ue(d,o,_),x=ae(),C=()=>{S.stop(),x&&a(x.effects,S)};return t?s?b():y=S.run():"post"===i?yo(S.run.bind(S),c&&c.suspense):S.run(),C}function Dn(e,t,n){const s=this.proxy,o=v(e)?e.includes(".")?Un(s,e):()=>s[e]:e.bind(s,s);let r;g(t)?r=t:(r=t.handler,n=t);const i=hr(this),l=Vn(o,r.bind(s),n);return i(),l}function Un(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e0){if(n>=t)return e;n++}if((s=s||new Set).has(e))return e;if(s.add(e),It(e))jn(e.value,t,n,s);else if(p(e))for(let o=0;o{jn(e,t,n,s)}));else if(k(e))for(const o in e)jn(e[o],t,n,s);return e}function Hn(e,t,n,s){const o=e.dirs,r=t&&t.dirs;for(let i=0;i{e.isMounted=!0})),_s((()=>{e.isUnmounting=!0})),e}const zn=[Function,Array],Gn={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:zn,onEnter:zn,onAfterEnter:zn,onEnterCancelled:zn,onBeforeLeave:zn,onLeave:zn,onAfterLeave:zn,onLeaveCancelled:zn,onBeforeAppear:zn,onAppear:zn,onAfterAppear:zn,onAppearCancelled:zn},Jn={name:"BaseTransition",props:Gn,setup(e,{slots:t}){const n=ur(),s=Kn();return()=>{const o=t.default&&ts(t.default(),!0);if(!o||!o.length)return;let r=o[0];if(o.length>1)for(const e of o)if(e.type!==Po){r=e;break}const i=Ct(e),{mode:l}=i;if(s.isLeaving)return Zn(r);const c=Yn(r);if(!c)return Zn(r);const a=Qn(c,i,s,n);es(c,a);const u=n.subTree,d=u&&Yn(u);if(d&&d.type!==Po&&!zo(c,d)){const e=Qn(d,i,s,n);if(es(d,e),"out-in"===l)return s.isLeaving=!0,e.afterLeave=()=>{s.isLeaving=!1,!1!==n.update.active&&(n.effect.dirty=!0,n.update())},Zn(r);"in-out"===l&&c.type!==Po&&(e.delayLeave=(e,t,n)=>{Xn(s,d)[String(d.key)]=d,e[qn]=()=>{t(),e[qn]=void 0,delete a.delayedLeave},a.delayedLeave=n})}return r}}};function Xn(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Qn(e,t,n,s){const{appear:o,mode:r,persisted:i=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:a,onEnterCancelled:u,onBeforeLeave:d,onLeave:h,onAfterLeave:f,onLeaveCancelled:m,onBeforeAppear:g,onAppear:v,onAfterAppear:y,onAppearCancelled:b}=t,_=String(e.key),S=Xn(n,e),x=(e,t)=>{e&&Ht(e,s,9,t)},C=(e,t)=>{const n=t[1];x(e,t),p(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},k={mode:r,persisted:i,beforeEnter(t){let s=l;if(!n.isMounted){if(!o)return;s=g||l}t[qn]&&t[qn](!0);const r=S[_];r&&zo(e,r)&&r.el[qn]&&r.el[qn](),x(s,[t])},enter(e){let t=c,s=a,r=u;if(!n.isMounted){if(!o)return;t=v||c,s=y||a,r=b||u}let i=!1;const l=e[Wn]=t=>{i||(i=!0,x(t?r:s,[e]),k.delayedLeave&&k.delayedLeave(),e[Wn]=void 0)};t?C(t,[e,l]):l()},leave(t,s){const o=String(e.key);if(t[Wn]&&t[Wn](!0),n.isUnmounting)return s();x(d,[t]);let r=!1;const i=t[qn]=n=>{r||(r=!0,s(),x(n?m:f,[t]),t[qn]=void 0,S[o]===e&&delete S[o])};S[o]=e,h?C(h,[t,i]):i()},clone:e=>Qn(e,t,n,s)};return k}function Zn(e){if(rs(e))return(e=er(e)).children=null,e}function Yn(e){return rs(e)?e.children?e.children[0]:void 0:e}function es(e,t){6&e.shapeFlag&&e.component?es(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ts(e,t=!1,n){let s=[],o=0;for(let r=0;r1)for(let r=0;rc({name:e.name},t,{setup:e}))():e}const ss=e=>!!e.type.__asyncLoader -/*! #__NO_SIDE_EFFECTS__ */;function os(e,t){const{ref:n,props:s,children:o,ce:r}=t.vnode,i=Zo(e,s,o);return i.ref=n,i.ce=r,delete t.vnode.ce,i}const rs=e=>e.type.__isKeepAlive,is={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=ur(),s=n.ctx,o=new Map,r=new Set;let i=null;const l=n.suspense,{renderer:{p:c,m:a,um:u,o:{createElement:d}}}=s,p=d("div");function h(e){ps(e),u(e,n,l,!0)}function f(e){o.forEach(((t,n)=>{const s=kr(t.type);!s||e&&e(s)||m(n)}))}function m(e){const t=o.get(e);i&&zo(t,i)?i&&ps(i):h(t),o.delete(e),r.delete(e)}s.activate=(e,t,n,s,o)=>{const r=e.component;a(e,t,n,0,l),c(r.vnode,e,t,n,r,l,s,e.slotScopeIds,o),yo((()=>{r.isDeactivated=!1,r.a&&P(r.a);const t=e.props&&e.props.onVnodeMounted;t&&ir(t,r.parent,e)}),l)},s.deactivate=e=>{const t=e.component;a(e,p,null,1,l),yo((()=>{t.da&&P(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&ir(n,t.parent,e),t.isDeactivated=!0}),l)},Bn((()=>[e.include,e.exclude]),(([e,t])=>{e&&f((t=>ls(e,t))),t&&f((e=>!ls(t,e)))}),{flush:"post",deep:!0});let g=null;const v=()=>{null!=g&&o.set(g,hs(n.subTree))};return vs(v),bs(v),_s((()=>{o.forEach((e=>{const{subTree:t,suspense:s}=n,o=hs(t);if(e.type!==o.type||e.key!==o.key)h(e);else{ps(o);const e=o.component.da;e&&yo(e,s)}}))})),()=>{if(g=null,!t.default)return null;const n=t.default(),s=n[0];if(n.length>1)return i=null,n;if(!(Ko(s)&&(4&s.shapeFlag||128&s.shapeFlag)))return i=null,s;let l=hs(s);const c=l.type,a=kr(ss(l)?l.type.__asyncResolved||{}:c),{include:u,exclude:d,max:p}=e;if(u&&(!a||!ls(u,a))||d&&a&&ls(d,a))return i=l,s;const h=null==l.key?c:l.key,f=o.get(h);return l.el&&(l=er(l),128&s.shapeFlag&&(s.ssContent=l)),g=h,f?(l.el=f.el,l.component=f.component,l.transition&&es(l,l.transition),l.shapeFlag|=512,r.delete(h),r.add(h)):(r.add(h),p&&r.size>parseInt(p,10)&&m(r.values().next().value)),l.shapeFlag|=256,i=l,wn(s.type)?s:l}}};function ls(e,t){return p(e)?e.some((e=>ls(e,t))):v(e)?e.split(",").includes(t):"[object RegExp]"===x(e)&&e.test(t)}function cs(e,t){us(e,"a",t)}function as(e,t){us(e,"da",t)}function us(e,t,n=ar){const s=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(fs(t,s,n),n){let e=n.parent;for(;e&&e.parent;)rs(e.parent.vnode)&&ds(s,t,n,e),e=e.parent}}function ds(e,t,n,s){const o=fs(t,e,s,!0);Ss((()=>{a(s[t],o)}),n)}function ps(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function hs(e){return 128&e.shapeFlag?e.ssContent:e}function fs(e,t,n=ar,s=!1){if(n){const o=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...s)=>{if(n.isUnmounted)return;ye();const o=hr(n),r=Ht(t,n,e,s);return o(),be(),r});return s?o.unshift(r):o.push(r),r}}const ms=e=>(t,n=ar)=>(!yr||"sp"===e)&&fs(e,((...e)=>t(...e)),n),gs=ms("bm"),vs=ms("m"),ys=ms("bu"),bs=ms("u"),_s=ms("bum"),Ss=ms("um"),xs=ms("sp"),Cs=ms("rtg"),ks=ms("rtc");function Ts(e,t=ar){fs("ec",e,t)}function ws(e){return e.some((e=>!Ko(e)||e.type!==Po&&!(e.type===Fo&&!ws(e.children))))?e:null}const Es=e=>e?mr(e)?Cr(e)||e.proxy:Es(e.parent):null,Ns=c(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Es(e.parent),$root:e=>Es(e.root),$emit:e=>e.emit,$options:e=>Bs(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,tn(e.update)}),$nextTick:e=>e.n||(e.n=en.bind(e.proxy)),$watch:e=>Dn.bind(e)}),As=(e,t)=>e!==n&&!e.__isScriptSetup&&d(e,t),Is={get({_:e},t){const{ctx:s,setupState:o,data:r,props:i,accessCache:l,type:c,appContext:a}=e;let u;if("$"!==t[0]){const c=l[t];if(void 0!==c)switch(c){case 1:return o[t];case 2:return r[t];case 4:return s[t];case 3:return i[t]}else{if(As(o,t))return l[t]=1,o[t];if(r!==n&&d(r,t))return l[t]=2,r[t];if((u=e.propsOptions[0])&&d(u,t))return l[t]=3,i[t];if(s!==n&&d(s,t))return l[t]=4,s[t];Fs&&(l[t]=0)}}const p=Ns[t];let h,f;return p?("$attrs"===t&&Ae(e,0,t),p(e)):(h=c.__cssModules)&&(h=h[t])?h:s!==n&&d(s,t)?(l[t]=4,s[t]):(f=a.config.globalProperties,d(f,t)?f[t]:void 0)},set({_:e},t,s){const{data:o,setupState:r,ctx:i}=e;return As(r,t)?(r[t]=s,!0):o!==n&&d(o,t)?(o[t]=s,!0):!d(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(i[t]=s,!0))},has({_:{data:e,setupState:t,accessCache:s,ctx:o,appContext:r,propsOptions:i}},l){let c;return!!s[l]||e!==n&&d(e,l)||As(t,l)||(c=i[0])&&d(c,l)||d(o,l)||d(Ns,l)||d(r.config.globalProperties,l)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:d(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},Rs=c({},Is,{get(e,t){if(t!==Symbol.unscopables)return Is.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!j(t)});function Os(){const e=ur();return e.setupContext||(e.setupContext=xr(e))}function Ls(e){return p(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}let Fs=!0;function Ms(e){const t=Bs(e),n=e.proxy,s=e.ctx;Fs=!1,t.beforeCreate&&Ps(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:l,watch:c,provide:a,inject:u,created:d,beforeMount:h,mounted:f,beforeUpdate:m,updated:v,activated:y,deactivated:_,beforeUnmount:S,unmounted:x,render:C,renderTracked:k,renderTriggered:T,errorCaptured:w,serverPrefetch:E,expose:N,inheritAttrs:A,components:I,directives:R}=t;if(u&&function(e,t,n=o){p(e)&&(e=js(e));for(const s in e){const n=e[s];let o;o=b(n)?"default"in n?Qs(n.from||s,n.default,!0):Qs(n.from||s):Qs(n),It(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:e=>o.value=e}):t[s]=o}}(u,s,null),l)for(const o in l){const e=l[o];g(e)&&(s[o]=e.bind(n))}if(r){const t=r.call(n,n);b(t)&&(e.data=mt(t))}if(Fs=!0,i)for(const p in i){const e=i[p],t=g(e)?e.bind(n,n):g(e.get)?e.get.bind(n,n):o,r=!g(e)&&g(e.set)?e.set.bind(n):o,l=Tr({get:t,set:r});Object.defineProperty(s,p,{enumerable:!0,configurable:!0,get:()=>l.value,set:e=>l.value=e})}if(c)for(const o in c)$s(c[o],s,n,o);if(a){const e=g(a)?a.call(n):a;Reflect.ownKeys(e).forEach((t=>{Xs(t,e[t])}))}function O(e,t){p(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(d&&Ps(d,e,"c"),O(gs,h),O(vs,f),O(ys,m),O(bs,v),O(cs,y),O(as,_),O(Ts,w),O(ks,k),O(Cs,T),O(_s,S),O(Ss,x),O(xs,E),p(N))if(N.length){const t=e.exposed||(e.exposed={});N.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});C&&e.render===o&&(e.render=C),null!=A&&(e.inheritAttrs=A),I&&(e.components=I),R&&(e.directives=R)}function Ps(e,t,n){Ht(p(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function $s(e,t,n,s){const o=s.includes(".")?Un(n,s):()=>n[s];if(v(e)){const n=t[e];g(n)&&Bn(o,n)}else if(g(e))Bn(o,e.bind(n));else if(b(e))if(p(e))e.forEach((e=>$s(e,t,n,s)));else{const s=g(e.handler)?e.handler.bind(n):t[e.handler];g(s)&&Bn(o,s,e)}}function Bs(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:i}}=e.appContext,l=r.get(t);let c;return l?c=l:o.length||n||s?(c={},o.length&&o.forEach((e=>Vs(c,e,i,!0))),Vs(c,t,i)):c=t,b(t)&&r.set(t,c),c}function Vs(e,t,n,s=!1){const{mixins:o,extends:r}=t;r&&Vs(e,r,n,!0),o&&o.forEach((t=>Vs(e,t,n,!0)));for(const i in t)if(s&&"expose"===i);else{const s=Ds[i]||n&&n[i];e[i]=s?s(e[i],t[i]):t[i]}return e}const Ds={data:Us,props:Ws,emits:Ws,methods:qs,computed:qs,beforeCreate:Hs,created:Hs,beforeMount:Hs,mounted:Hs,beforeUpdate:Hs,updated:Hs,beforeDestroy:Hs,beforeUnmount:Hs,destroyed:Hs,unmounted:Hs,activated:Hs,deactivated:Hs,errorCaptured:Hs,serverPrefetch:Hs,components:qs,directives:qs,watch:function(e,t){if(!e)return t;if(!t)return e;const n=c(Object.create(null),e);for(const s in t)n[s]=Hs(e[s],t[s]);return n},provide:Us,inject:function(e,t){return qs(js(e),js(t))}};function Us(e,t){return t?e?function(){return c(g(e)?e.call(this,this):e,g(t)?t.call(this,this):t)}:t:e}function js(e){if(p(e)){const t={};for(let n=0;n(r.has(e)||(e&&g(e.install)?(r.add(e),e.install(l,...t)):g(e)&&(r.add(e),e(l,...t))),l),mixin:e=>(o.mixins.includes(e)||o.mixins.push(e),l),component:(e,t)=>t?(o.components[e]=t,l):o.components[e],directive:(e,t)=>t?(o.directives[e]=t,l):o.directives[e],mount(r,c,a){if(!i){const u=Zo(n,s);return u.appContext=o,!0===a?a="svg":!1===a&&(a=void 0),c&&t?t(u,r):e(u,r,a),i=!0,l._container=r,r.__vue_app__=l,Cr(u.component)||u.component.proxy}},unmount(){i&&(e(null,l._container),delete l._container.__vue_app__)},provide:(e,t)=>(o.provides[e]=t,l),runWithContext(e){const t=Js;Js=l;try{return e()}finally{Js=t}}};return l}}let Js=null;function Xs(e,t){if(ar){let n=ar.provides;const s=ar.parent&&ar.parent.provides;s===n&&(n=ar.provides=Object.create(s)),n[e]=t}else;}function Qs(e,t,n=!1){const s=ar||hn;if(s||Js){const o=s?null==s.parent?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:Js._context.provides;if(o&&e in o)return o[e];if(arguments.length>1)return n&&g(t)?t.call(s&&s.proxy):t}}function Zs(e,t,s,o){const[r,i]=e.propsOptions;let l,c=!1;if(t)for(let n in t){if(w(n))continue;const a=t[n];let u;r&&d(r,u=I(n))?i&&i.includes(u)?(l||(l={}))[u]=a:s[u]=a:pn(e.emitsOptions,n)||n in o&&a===o[n]||(o[n]=a,c=!0)}if(i){const t=Ct(s),o=l||n;for(let n=0;n{h=!0;const[n,s]=eo(e,t,!0);c(a,n),s&&u.push(...s)};!o&&t.mixins.length&&t.mixins.forEach(n),e.extends&&n(e.extends),e.mixins&&e.mixins.forEach(n)}if(!l&&!h)return b(e)&&r.set(e,s),s;if(p(l))for(let s=0;s-1,s[1]=n<0||t-1||d(s,"default"))&&u.push(e)}}}const f=[a,u];return b(e)&&r.set(e,f),f}function to(e){return"$"!==e[0]&&!w(e)}function no(e){if(null===e)return"null";if("function"==typeof e)return e.name||"";if("object"==typeof e){return e.constructor&&e.constructor.name||""}return""}function so(e,t){return no(e)===no(t)}function oo(e,t){return p(t)?t.findIndex((t=>so(t,e))):g(t)&&so(t,e)?0:-1}const ro=e=>"_"===e[0]||"$stable"===e,io=e=>p(e)?e.map(nr):[nr(e)],lo=(e,t,n)=>{if(t._n)return t;const s=gn(((...e)=>io(t(...e))),n);return s._c=!1,s},co=(e,t,n)=>{const s=e._ctx;for(const o in e){if(ro(o))continue;const n=e[o];if(g(n))t[o]=lo(0,n,s);else if(null!=n){const e=io(n);t[o]=()=>e}}},ao=(e,t)=>{const n=io(t);e.slots.default=()=>n},uo=(e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=Ct(t),$(t,"_",n)):co(t,e.slots={})}else e.slots={},t&&ao(e,t);$(e.slots,Go,1)},po=(e,t,s)=>{const{vnode:o,slots:r}=e;let i=!0,l=n;if(32&o.shapeFlag){const e=t._;e?s&&1===e?i=!1:(c(r,t),s||1!==e||delete r._):(i=!t.$stable,co(t,r)),l=t}else t&&(ao(e,t),l={default:1});if(i)for(const n in r)ro(n)||null!=l[n]||delete r[n]};function ho(e,t,s,o,r=!1){if(p(e))return void e.forEach(((e,n)=>ho(e,t&&(p(t)?t[n]:t),s,o,r)));if(ss(o)&&!r)return;const i=4&o.shapeFlag?Cr(o.component)||o.component.proxy:o.el,l=r?null:i,{i:c,r:u}=e,h=t&&t.r,f=c.refs===n?c.refs={}:c.refs,m=c.setupState;if(null!=h&&h!==u&&(v(h)?(f[h]=null,d(m,h)&&(m[h]=null)):It(h)&&(h.value=null)),g(u))jt(u,c,12,[l,f]);else{const t=v(u),n=It(u);if(t||n){const o=()=>{if(e.f){const n=t?d(m,u)?m[u]:f[u]:u.value;r?p(n)&&a(n,i):p(n)?n.includes(i)||n.push(i):t?(f[u]=[i],d(m,u)&&(m[u]=f[u])):(u.value=[i],e.k&&(f[e.k]=u.value))}else t?(f[u]=l,d(m,u)&&(m[u]=l)):n&&(u.value=l,e.k&&(f[e.k]=l))};l?(o.id=-1,yo(o,s)):o()}}}let fo=!1;const mo=e=>(e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName)(e)?"svg":(e=>e.namespaceURI.includes("MathML"))(e)?"mathml":void 0,go=e=>8===e.nodeType;function vo(e){const{mt:t,p:n,o:{patchProp:s,createText:o,nextSibling:r,parentNode:l,remove:c,insert:a,createComment:u}}=e,d=(n,s,i,c,u,b=!1)=>{const _=go(n)&&"["===n.data,S=()=>m(n,s,i,c,u,_),{type:x,ref:C,shapeFlag:k,patchFlag:T}=s;let w=n.nodeType;s.el=n,-2===T&&(b=!1,s.dynamicChildren=null);let E=null;switch(x){case Mo:3!==w?""===s.children?(a(s.el=o(""),l(n),n),E=n):E=S():(n.data!==s.children&&(fo=!0,n.data=s.children),E=r(n));break;case Po:y(n)?(E=r(n),v(s.el=n.content.firstChild,n,i)):E=8!==w||_?S():r(n);break;case $o:if(_&&(w=(n=r(n)).nodeType),1===w||3===w){E=n;const e=!s.children.length;for(let t=0;t{l=l||!!t.dynamicChildren;const{type:a,props:u,patchFlag:d,shapeFlag:p,dirs:f,transition:m}=t,g="input"===a||"option"===a;if(g||-1!==d){f&&Hn(t,null,n,"created");let a,b=!1;if(y(e)){b=ko(o,m)&&n&&n.vnode.props&&n.vnode.props.appear;const s=e.content.firstChild;b&&m.beforeEnter(s),v(s,e,n),t.el=e=s}if(16&p&&(!u||!u.innerHTML&&!u.textContent)){let s=h(e.firstChild,t,e,n,o,r,l);for(;s;){fo=!0;const e=s;s=s.nextSibling,c(e)}}else 8&p&&e.textContent!==t.children&&(fo=!0,e.textContent=t.children);if(u)if(g||!l||48&d)for(const t in u)(g&&(t.endsWith("value")||"indeterminate"===t)||i(t)&&!w(t)||"."===t[0])&&s(e,t,null,u[t],void 0,void 0,n);else u.onClick&&s(e,"onClick",null,u.onClick,void 0,void 0,n);(a=u&&u.onVnodeBeforeMount)&&ir(a,n,t),f&&Hn(t,null,n,"beforeMount"),((a=u&&u.onVnodeMounted)||f||b)&&On((()=>{a&&ir(a,n,t),b&&m.enter(e),f&&Hn(t,null,n,"mounted")}),o)}return e.nextSibling},h=(e,t,s,o,r,i,l)=>{l=l||!!t.dynamicChildren;const c=t.children,a=c.length;for(let u=0;u{const{slotScopeIds:c}=t;c&&(o=o?o.concat(c):c);const d=l(e),p=h(r(e),t,d,n,s,o,i);return p&&go(p)&&"]"===p.data?r(t.anchor=p):(fo=!0,a(t.anchor=u("]"),d,p),p)},m=(e,t,s,o,i,a)=>{if(fo=!0,t.el=null,a){const t=g(e);for(;;){const n=r(e);if(!n||n===t)break;c(n)}}const u=r(e),d=l(e);return c(e),n(null,t,d,u,s,o,mo(d),i),u},g=(e,t="[",n="]")=>{let s=0;for(;e;)if((e=r(e))&&go(e)&&(e.data===t&&s++,e.data===n)){if(0===s)return r(e);s--}return e},v=(e,t,n)=>{const s=t.parentNode;s&&s.replaceChild(e,t);let o=n;for(;o;)o.vnode.el===t&&(o.vnode.el=o.subTree.el=e),o=o.parent},y=e=>1===e.nodeType&&"template"===e.tagName.toLowerCase();return[(e,t)=>{if(!t.hasChildNodes())return n(null,e,t),rn(),void(t._vnode=e);fo=!1,d(t.firstChild,e,null,null,null),rn(),t._vnode=e,fo&&console.error("Hydration completed but contains mismatches.")},d]}const yo=On;function bo(e){return So(e)}function _o(e){return So(e,vo)}function So(e,t){U().__VUE__=!0;const{insert:r,remove:i,patchProp:l,createElement:c,createText:a,createComment:u,setText:p,setElementText:h,parentNode:f,nextSibling:m,setScopeId:g=o,insertStaticContent:v}=e,y=(e,t,n,s=null,o=null,r=null,i=void 0,l=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!zo(e,t)&&(s=Q(e),K(e,o,r,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:a,ref:u,shapeFlag:d}=t;switch(a){case Mo:b(e,t,n,s);break;case Po:S(e,t,n,s);break;case $o:null==e&&x(t,n,s,i);break;case Fo:L(e,t,n,s,o,r,i,l,c);break;default:1&d?C(e,t,n,s,o,r,i,l,c):6&d?F(e,t,n,s,o,r,i,l,c):(64&d||128&d)&&a.process(e,t,n,s,o,r,i,l,c,ee)}null!=u&&o&&ho(u,e&&e.ref,r,t||e,!t)},b=(e,t,n,s)=>{if(null==e)r(t.el=a(t.children),n,s);else{const n=t.el=e.el;t.children!==e.children&&p(n,t.children)}},S=(e,t,n,s)=>{null==e?r(t.el=u(t.children||""),n,s):t.el=e.el},x=(e,t,n,s)=>{[e.el,e.anchor]=v(e.children,t,n,s,e.el,e.anchor)},C=(e,t,n,s,o,r,i,l,c)=>{"svg"===t.type?i="svg":"math"===t.type&&(i="mathml"),null==e?k(t,n,s,o,r,i,l,c):N(e,t,o,r,i,l,c)},k=(e,t,n,s,o,i,a,u)=>{let d,p;const{props:f,shapeFlag:m,transition:g,dirs:v}=e;if(d=e.el=c(e.type,i,f&&f.is,f),8&m?h(d,e.children):16&m&&E(e.children,d,null,s,o,xo(e,i),a,u),v&&Hn(e,null,s,"created"),T(d,e,e.scopeId,a,s),f){for(const t in f)"value"===t||w(t)||l(d,t,null,f[t],i,e.children,s,o,X);"value"in f&&l(d,"value",null,f.value,i),(p=f.onVnodeBeforeMount)&&ir(p,s,e)}v&&Hn(e,null,s,"beforeMount");const y=ko(o,g);y&&g.beforeEnter(d),r(d,t,n),((p=f&&f.onVnodeMounted)||y||v)&&yo((()=>{p&&ir(p,s,e),y&&g.enter(d),v&&Hn(e,null,s,"mounted")}),o)},T=(e,t,n,s,o)=>{if(n&&g(e,n),s)for(let r=0;r{for(let a=c;a{const a=t.el=e.el;let{patchFlag:u,dynamicChildren:d,dirs:p}=t;u|=16&e.patchFlag;const f=e.props||n,m=t.props||n;let g;if(s&&Co(s,!1),(g=m.onVnodeBeforeUpdate)&&ir(g,s,t,e),p&&Hn(t,e,s,"beforeUpdate"),s&&Co(s,!0),d?A(e.dynamicChildren,d,a,s,o,xo(t,r),i):c||j(e,t,a,null,s,o,xo(t,r),i,!1),u>0){if(16&u)R(a,t,f,m,s,o,r);else if(2&u&&f.class!==m.class&&l(a,"class",null,m.class,r),4&u&&l(a,"style",f.style,m.style,r),8&u){const n=t.dynamicProps;for(let t=0;t{g&&ir(g,s,t,e),p&&Hn(t,e,s,"updated")}),o)},A=(e,t,n,s,o,r,i)=>{for(let l=0;l{if(s!==o){if(s!==n)for(const n in s)w(n)||n in o||l(e,n,s[n],null,c,t.children,r,i,X);for(const n in o){if(w(n))continue;const a=o[n],u=s[n];a!==u&&"value"!==n&&l(e,n,u,a,c,t.children,r,i,X)}"value"in o&&l(e,"value",s.value,o.value,c)}},L=(e,t,n,s,o,i,l,c,u)=>{const d=t.el=e?e.el:a(""),p=t.anchor=e?e.anchor:a("");let{patchFlag:h,dynamicChildren:f,slotScopeIds:m}=t;m&&(c=c?c.concat(m):m),null==e?(r(d,n,s),r(p,n,s),E(t.children||[],n,p,o,i,l,c,u)):h>0&&64&h&&f&&e.dynamicChildren?(A(e.dynamicChildren,f,n,o,i,l,c),(null!=t.key||o&&t===o.subTree)&&To(e,t,!0)):j(e,t,n,p,o,i,l,c,u)},F=(e,t,n,s,o,r,i,l,c)=>{t.slotScopeIds=l,null==e?512&t.shapeFlag?o.ctx.activate(t,n,s,i,c):M(t,n,s,o,r,i,c):B(e,t,c)},M=(e,t,s,o,r,i,l)=>{const c=e.component=function(e,t,s){const o=e.type,r=(t?t.appContext:e.appContext)||lr,i={uid:cr++,vnode:e,type:o,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,scope:new le(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:eo(o,r),emitsOptions:dn(o,r),emit:null,emitted:null,propsDefaults:n,inheritAttrs:o.inheritAttrs,ctx:n,data:n,props:n,attrs:n,slots:n,refs:n,setupState:n,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:s,suspenseId:s?s.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};i.ctx={_:i},i.root=t?t.root:i,i.emit=un.bind(null,i),e.ce&&e.ce(i);return i}(e,o,r);if(rs(e)&&(c.ctx.renderer=ee),function(e,t=!1){t&&pr(t);const{props:n,children:s}=e.vnode,o=mr(e);(function(e,t,n,s=!1){const o={},r={};$(r,Go,1),e.propsDefaults=Object.create(null),Zs(e,t,o,r);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);e.props=n?s?o:gt(o):e.type.props?o:r,e.attrs=r})(e,n,o,t),uo(e,s);const r=o?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=kt(new Proxy(e.ctx,Is));const{setup:s}=n;if(s){const n=e.setupContext=s.length>1?xr(e):null,o=hr(e);ye();const r=jt(s,e,0,[e.props,n]);if(be(),o(),_(r)){if(r.then(fr,fr),t)return r.then((n=>{br(e,n,t)})).catch((t=>{qt(t,e,0)}));e.asyncDep=r}else br(e,r,t)}else Sr(e,t)}(e,t):void 0;t&&pr(!1)}(c),c.asyncDep){if(r&&r.registerDep(c,V),!e.el){const e=c.subTree=Zo(Po);S(null,e,t,s)}}else V(c,e,t,s,r,i,l)},B=(e,t,n)=>{const s=t.component=e.component;if(function(e,t,n){const{props:s,children:o,component:r}=e,{props:i,children:l,patchFlag:c}=t,a=r.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!o&&!l||l&&l.$stable)||s!==i&&(s?!i||_n(s,i,a):!!i);if(1024&c)return!0;if(16&c)return s?_n(s,i,a):!!i;if(8&c){const e=t.dynamicProps;for(let t=0;tGt&&zt.splice(t,1)}(s.update),s.effect.dirty=!0,s.update()}else t.el=e.el,s.vnode=t},V=(e,t,n,s,r,i,l)=>{const c=()=>{if(e.isMounted){let{next:t,bu:n,u:s,parent:o,vnode:a}=e;{const n=wo(e);if(n)return t&&(t.el=a.el,D(e,t,l)),void n.asyncDep.then((()=>{e.isUnmounted||c()}))}let u,d=t;Co(e,!1),t?(t.el=a.el,D(e,t,l)):t=a,n&&P(n),(u=t.props&&t.props.onVnodeBeforeUpdate)&&ir(u,o,t,a),Co(e,!0);const p=vn(e),h=e.subTree;e.subTree=p,y(h,p,f(h.el),Q(h),e,r,i),t.el=p.el,null===d&&Sn(e,p.el),s&&yo(s,r),(u=t.props&&t.props.onVnodeUpdated)&&yo((()=>ir(u,o,t,a)),r)}else{let o;const{el:l,props:c}=t,{bm:a,m:u,parent:d}=e,p=ss(t);if(Co(e,!1),a&&P(a),!p&&(o=c&&c.onVnodeBeforeMount)&&ir(o,d,t),Co(e,!0),l&&ne){const n=()=>{e.subTree=vn(e),ne(l,e.subTree,e,r,null)};p?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const o=e.subTree=vn(e);y(null,o,n,s,e,r,i),t.el=o.el}if(u&&yo(u,r),!p&&(o=c&&c.onVnodeMounted)){const e=t;yo((()=>ir(o,d,e)),r)}(256&t.shapeFlag||d&&ss(d.vnode)&&256&d.vnode.shapeFlag)&&e.a&&yo(e.a,r),e.isMounted=!0,t=n=s=null}},a=e.effect=new ue(c,o,(()=>tn(u)),e.scope),u=e.update=()=>{a.dirty&&a.run()};u.id=e.uid,Co(e,!0),u()},D=(e,t,n)=>{t.component=e;const s=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,s){const{props:o,attrs:r,vnode:{patchFlag:i}}=e,l=Ct(o),[c]=e.propsOptions;let a=!1;if(!(s||i>0)||16&i){let s;Zs(e,t,o,r)&&(a=!0);for(const r in l)t&&(d(t,r)||(s=O(r))!==r&&d(t,s))||(c?!n||void 0===n[r]&&void 0===n[s]||(o[r]=Ys(c,l,r,void 0,e,!0)):delete o[r]);if(r!==l)for(const e in r)t&&d(t,e)||(delete r[e],a=!0)}else if(8&i){const n=e.vnode.dynamicProps;for(let s=0;s{const a=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:p,shapeFlag:f}=t;if(p>0){if(128&p)return void q(a,d,n,s,o,r,i,l,c);if(256&p)return void H(a,d,n,s,o,r,i,l,c)}8&f?(16&u&&X(a,o,r),d!==a&&h(n,d)):16&u?16&f?q(a,d,n,s,o,r,i,l,c):X(a,o,r,!0):(8&u&&h(n,""),16&f&&E(d,n,s,o,r,i,l,c))},H=(e,t,n,o,r,i,l,c,a)=>{const u=(e=e||s).length,d=(t=t||s).length,p=Math.min(u,d);let h;for(h=0;hd?X(e,r,i,!0,!1,p):E(t,n,o,r,i,l,c,a,p)},q=(e,t,n,o,r,i,l,c,a)=>{let u=0;const d=t.length;let p=e.length-1,h=d-1;for(;u<=p&&u<=h;){const s=e[u],o=t[u]=a?sr(t[u]):nr(t[u]);if(!zo(s,o))break;y(s,o,n,null,r,i,l,c,a),u++}for(;u<=p&&u<=h;){const s=e[p],o=t[h]=a?sr(t[h]):nr(t[h]);if(!zo(s,o))break;y(s,o,n,null,r,i,l,c,a),p--,h--}if(u>p){if(u<=h){const e=h+1,s=eh)for(;u<=p;)K(e[u],r,i,!0),u++;else{const f=u,m=u,g=new Map;for(u=m;u<=h;u++){const e=t[u]=a?sr(t[u]):nr(t[u]);null!=e.key&&g.set(e.key,u)}let v,b=0;const _=h-m+1;let S=!1,x=0;const C=new Array(_);for(u=0;u<_;u++)C[u]=0;for(u=f;u<=p;u++){const s=e[u];if(b>=_){K(s,r,i,!0);continue}let o;if(null!=s.key)o=g.get(s.key);else for(v=m;v<=h;v++)if(0===C[v-m]&&zo(s,t[v])){o=v;break}void 0===o?K(s,r,i,!0):(C[o-m]=u+1,o>=x?x=o:S=!0,y(s,t[o],n,null,r,i,l,c,a),b++)}const k=S?function(e){const t=e.slice(),n=[0];let s,o,r,i,l;const c=e.length;for(s=0;s>1,e[n[l]]0&&(t[s]=n[r-1]),n[r]=s)}}r=n.length,i=n[r-1];for(;r-- >0;)n[r]=i,i=t[i];return n}(C):s;for(v=k.length-1,u=_-1;u>=0;u--){const e=m+u,s=t[e],p=e+1{const{el:i,type:l,transition:c,children:a,shapeFlag:u}=e;if(6&u)return void W(e.component.subTree,t,n,s);if(128&u)return void e.suspense.move(t,n,s);if(64&u)return void l.move(e,t,n,ee);if(l===Fo){r(i,t,n);for(let e=0;e{let o;for(;e&&e!==t;)o=m(e),r(e,n,s),e=o;r(t,n,s)})(e,t,n);if(2!==s&&1&u&&c)if(0===s)c.beforeEnter(i),r(i,t,n),yo((()=>c.enter(i)),o);else{const{leave:e,delayLeave:s,afterLeave:o}=c,l=()=>r(i,t,n),a=()=>{e(i,(()=>{l(),o&&o()}))};s?s(i,l,a):a()}else r(i,t,n)},K=(e,t,n,s=!1,o=!1)=>{const{type:r,props:i,ref:l,children:c,dynamicChildren:a,shapeFlag:u,patchFlag:d,dirs:p}=e;if(null!=l&&ho(l,null,n,e,!0),256&u)return void t.ctx.deactivate(e);const h=1&u&&p,f=!ss(e);let m;if(f&&(m=i&&i.onVnodeBeforeUnmount)&&ir(m,t,e),6&u)J(e.component,n,s);else{if(128&u)return void e.suspense.unmount(n,s);h&&Hn(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,o,ee,s):a&&(r!==Fo||d>0&&64&d)?X(a,t,n,!1,!0):(r===Fo&&384&d||!o&&16&u)&&X(c,t,n),s&&z(e)}(f&&(m=i&&i.onVnodeUnmounted)||h)&&yo((()=>{m&&ir(m,t,e),h&&Hn(e,null,t,"unmounted")}),n)},z=e=>{const{type:t,el:n,anchor:s,transition:o}=e;if(t===Fo)return void G(n,s);if(t===$o)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=m(e),i(e),e=n;i(t)})(e);const r=()=>{i(n),o&&!o.persisted&&o.afterLeave&&o.afterLeave()};if(1&e.shapeFlag&&o&&!o.persisted){const{leave:t,delayLeave:s}=o,i=()=>t(n,r);s?s(e.el,r,i):i()}else r()},G=(e,t)=>{let n;for(;e!==t;)n=m(e),i(e),e=n;i(t)},J=(e,t,n)=>{const{bum:s,scope:o,update:r,subTree:i,um:l}=e;s&&P(s),o.stop(),r&&(r.active=!1,K(i,e,t,n)),l&&yo(l,t),yo((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},X=(e,t,n,s=!1,o=!1,r=0)=>{for(let i=r;i6&e.shapeFlag?Q(e.component.subTree):128&e.shapeFlag?e.suspense.next():m(e.anchor||e.el);let Z=!1;const Y=(e,t,n)=>{null==e?t._vnode&&K(t._vnode,null,null,!0):y(t._vnode||null,e,t,null,null,null,n),Z||(Z=!0,on(),rn(),Z=!1),t._vnode=e},ee={p:y,um:K,m:W,r:z,mt:M,mc:E,pc:j,pbc:A,n:Q,o:e};let te,ne;return t&&([te,ne]=t(ee)),{render:Y,hydrate:te,createApp:Gs(Y,te)}}function xo({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Co({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function ko(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function To(e,t,n=!1){const s=e.children,o=t.children;if(p(s)&&p(o))for(let r=0;re&&(e.disabled||""===e.disabled),No=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,Ao=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,Io=(e,t)=>{const n=e&&e.to;if(v(n)){if(t){return t(n)}return null}return n};function Ro(e,t,n,{o:{insert:s},m:o},r=2){0===r&&s(e.targetAnchor,t,n);const{el:i,anchor:l,shapeFlag:c,children:a,props:u}=e,d=2===r;if(d&&s(i,t,n),(!d||Eo(u))&&16&c)for(let p=0;p{16&v&&u(y,e,t,o,r,i,l,c)};g?b(n,a):d&&b(d,p)}else{t.el=e.el;const s=t.anchor=e.anchor,u=t.target=e.target,h=t.targetAnchor=e.targetAnchor,m=Eo(e.props),v=m?n:u,y=m?s:h;if("svg"===i||No(u)?i="svg":("mathml"===i||Ao(u))&&(i="mathml"),b?(p(e.dynamicChildren,b,v,o,r,i,l),To(e,t,!0)):c||d(e,t,v,y,o,r,i,l,!1),g)m?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Ro(t,n,s,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=Io(t.props,f);e&&Ro(t,e,null,a,0)}else m&&Ro(t,u,h,a,1)}Lo(t)},remove(e,t,n,s,{um:o,o:{remove:r}},i){const{shapeFlag:l,children:c,anchor:a,targetAnchor:u,target:d,props:p}=e;if(d&&r(u),i&&r(a),16&l){const e=i||!Eo(p);for(let s=0;s0?Vo||s:null,Uo(),jo>0&&Vo&&Vo.push(e),e}function Wo(e,t,n,s,o){return qo(Zo(e,t,n,s,o,!0))}function Ko(e){return!!e&&!0===e.__v_isVNode}function zo(e,t){return e.type===t.type&&e.key===t.key}const Go="__vInternal",Jo=({key:e})=>null!=e?e:null,Xo=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?v(e)||It(e)||g(e)?{i:hn,r:e,k:t,f:!!n}:e:null);function Qo(e,t=null,n=null,s=0,o=null,r=(e===Fo?0:1),i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Jo(t),ref:t&&Xo(t),scopeId:fn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:hn};return l?(or(c,n),128&r&&e.normalize(c)):n&&(c.shapeFlag|=v(n)?8:16),jo>0&&!i&&Vo&&(c.patchFlag>0||6&r)&&32!==c.patchFlag&&Vo.push(c),c}const Zo=function(e,t=null,n=null,s=0,o=null,r=!1){e&&e!==Cn||(e=Po);if(Ko(e)){const s=er(e,t,!0);return n&&or(s,n),jo>0&&!r&&Vo&&(6&s.shapeFlag?Vo[Vo.indexOf(e)]=s:Vo.push(s)),s.patchFlag|=-2,s}i=e,g(i)&&"__vccOpts"in i&&(e=e.__vccOpts);var i;if(t){t=Yo(t);let{class:e,style:n}=t;e&&!v(e)&&(t.class=G(e)),b(n)&&(xt(n)&&!p(n)&&(n=c({},n)),t.style=H(n))}const l=v(e)?1:wn(e)?128:(e=>e.__isTeleport)(e)?64:b(e)?4:g(e)?2:0;return Qo(e,t,n,s,o,l,r,!0)};function Yo(e){return e?xt(e)||Go in e?c({},e):e:null}function er(e,t,n=!1){const{props:s,ref:o,patchFlag:r,children:i}=e,l=t?rr(s||{},t):s;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Jo(l),ref:t&&t.ref?n&&o?p(o)?o.concat(Xo(t)):[o,Xo(t)]:Xo(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Fo?-1===r?16:16|r:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&er(e.ssContent),ssFallback:e.ssFallback&&er(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function tr(e=" ",t=0){return Zo(Mo,null,e,t)}function nr(e){return null==e||"boolean"==typeof e?Zo(Po):p(e)?Zo(Fo,null,e.slice()):"object"==typeof e?sr(e):Zo(Mo,null,String(e))}function sr(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:er(e)}function or(e,t){let n=0;const{shapeFlag:s}=e;if(null==t)t=null;else if(p(t))n=16;else if("object"==typeof t){if(65&s){const n=t.default;return void(n&&(n._c&&(n._d=!1),or(e,n()),n._c&&(n._d=!0)))}{n=32;const s=t._;s||Go in t?3===s&&hn&&(1===hn.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=hn}}else g(t)?(t={default:t,_ctx:hn},n=32):(t=String(t),64&s?(n=16,t=[tr(t)]):n=8);e.children=t,e.shapeFlag|=n}function rr(...e){const t={};for(let n=0;nar||hn;let dr,pr;dr=e=>{ar=e},pr=e=>{yr=e};const hr=e=>{const t=ar;return dr(e),e.scope.on(),()=>{e.scope.off(),dr(t)}},fr=()=>{ar&&ar.scope.off(),dr(null)};function mr(e){return 4&e.vnode.shapeFlag}let gr,vr,yr=!1;function br(e,t,n){g(t)?e.render=t:b(t)&&(e.setupState=Pt(t)),Sr(e,n)}function _r(e){gr=e,vr=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,Rs))}}function Sr(e,t,n){const s=e.type;if(!e.render){if(!t&&gr&&!s.render){const t=s.template||Bs(e).template;if(t){const{isCustomElement:n,compilerOptions:o}=e.appContext.config,{delimiters:r,compilerOptions:i}=s,l=c(c({isCustomElement:n,delimiters:r},o),i);s.render=gr(t,l)}}e.render=s.render||o,vr&&vr(e)}{const t=hr(e);ye();try{Ms(e)}finally{be(),t()}}}function xr(e){const t=t=>{e.exposed=t||{}};return{get attrs(){return function(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get:(t,n)=>(Ae(e,0,"$attrs"),t[n])}))}(e)},slots:e.slots,emit:e.emit,expose:t}}function Cr(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Pt(kt(e.exposed)),{get:(t,n)=>n in t?t[n]:n in Ns?Ns[n](e):void 0,has:(e,t)=>t in e||t in Ns}))}function kr(e,t=!0){return g(e)?e.displayName||e.name:e.name||t&&e.__name}const Tr=(e,t)=>{const n=function(e,t,n=!1){let s,r;const i=g(e);return i?(s=e,r=o):(s=e.get,r=e.set),new Et(s,r,i||!r,n)}(e,0,yr);return n};function wr(e,t,n){const s=arguments.length;return 2===s?b(t)&&!p(t)?Ko(t)?Zo(e,null,[t]):Zo(e,t):Zo(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):3===s&&Ko(n)&&(n=[n]),Zo(e,t,n))}function Er(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let s=0;s0&&Vo&&Vo.push(e),!0}const Nr="3.4.21",Ar=o,Ir=o,Rr="undefined"!=typeof document?document:null,Or=Rr&&Rr.createElement("template"),Lr={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const o="svg"===t?Rr.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?Rr.createElementNS("http://www.w3.org/1998/Math/MathML",e):Rr.createElement(e,n?{is:n}:void 0);return"select"===e&&s&&null!=s.multiple&&o.setAttribute("multiple",s.multiple),o},createText:e=>Rr.createTextNode(e),createComment:e=>Rr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Rr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,r){const i=n?n.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),o!==r&&(o=o.nextSibling););else{Or.innerHTML="svg"===s?`${e}`:"mathml"===s?`${e}`:e;const o=Or.content;if("svg"===s||"mathml"===s){const e=o.firstChild;for(;e.firstChild;)o.appendChild(e.firstChild);o.removeChild(e)}t.insertBefore(o,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Fr="transition",Mr="animation",Pr=Symbol("_vtc"),$r=(e,{slots:t})=>wr(Jn,jr(e),t);$r.displayName="Transition";const Br={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Vr=$r.props=c({},Gn,Br),Dr=(e,t=[])=>{p(e)?e.forEach((e=>e(...t))):e&&e(...t)},Ur=e=>!!e&&(p(e)?e.some((e=>e.length>1)):e.length>1);function jr(e){const t={};for(const c in e)c in Br||(t[c]=e[c]);if(!1===e.css)return t;const{name:n="v",type:s,duration:o,enterFromClass:r=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=r,appearActiveClass:u=i,appearToClass:d=l,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=e,m=function(e){if(null==e)return null;if(b(e))return[Hr(e.enter),Hr(e.leave)];{const t=Hr(e);return[t,t]}}(o),g=m&&m[0],v=m&&m[1],{onBeforeEnter:y,onEnter:_,onEnterCancelled:S,onLeave:x,onLeaveCancelled:C,onBeforeAppear:k=y,onAppear:T=_,onAppearCancelled:w=S}=t,E=(e,t,n)=>{Wr(e,t?d:l),Wr(e,t?u:i),n&&n()},N=(e,t)=>{e._isLeaving=!1,Wr(e,p),Wr(e,f),Wr(e,h),t&&t()},A=e=>(t,n)=>{const o=e?T:_,i=()=>E(t,e,n);Dr(o,[t,i]),Kr((()=>{Wr(t,e?a:r),qr(t,e?d:l),Ur(o)||Gr(t,s,g,i)}))};return c(t,{onBeforeEnter(e){Dr(y,[e]),qr(e,r),qr(e,i)},onBeforeAppear(e){Dr(k,[e]),qr(e,a),qr(e,u)},onEnter:A(!1),onAppear:A(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>N(e,t);qr(e,p),Zr(),qr(e,h),Kr((()=>{e._isLeaving&&(Wr(e,p),qr(e,f),Ur(x)||Gr(e,s,v,n))})),Dr(x,[e,n])},onEnterCancelled(e){E(e,!1),Dr(S,[e])},onAppearCancelled(e){E(e,!0),Dr(w,[e])},onLeaveCancelled(e){N(e),Dr(C,[e])}})}function Hr(e){return V(e)}function qr(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e[Pr]||(e[Pr]=new Set)).add(t)}function Wr(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const n=e[Pr];n&&(n.delete(t),n.size||(e[Pr]=void 0))}function Kr(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let zr=0;function Gr(e,t,n,s){const o=e._endId=++zr,r=()=>{o===e._endId&&s()};if(n)return setTimeout(r,n);const{type:i,timeout:l,propCount:c}=Jr(e,t);if(!i)return s();const a=i+"end";let u=0;const d=()=>{e.removeEventListener(a,p),r()},p=t=>{t.target===e&&++u>=c&&d()};setTimeout((()=>{u(n[e]||"").split(", "),o=s(`${Fr}Delay`),r=s(`${Fr}Duration`),i=Xr(o,r),l=s(`${Mr}Delay`),c=s(`${Mr}Duration`),a=Xr(l,c);let u=null,d=0,p=0;t===Fr?i>0&&(u=Fr,d=i,p=r.length):t===Mr?a>0&&(u=Mr,d=a,p=c.length):(d=Math.max(i,a),u=d>0?i>a?Fr:Mr:null,p=u?u===Fr?r.length:c.length:0);return{type:u,timeout:d,propCount:p,hasTransform:u===Fr&&/\b(transform|all)(,|$)/.test(s(`${Fr}Property`).toString())}}function Xr(e,t){for(;e.lengthQr(t)+Qr(e[n]))))}function Qr(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function Zr(){return document.body.offsetHeight}const Yr=Symbol("_vod"),ei=Symbol("_vsh"),ti={beforeMount(e,{value:t},{transition:n}){e[Yr]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):ni(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),ni(e,!0),s.enter(e)):s.leave(e,(()=>{ni(e,!1)})):ni(e,t))},beforeUnmount(e,{value:t}){ni(e,t)}};function ni(e,t){e.style.display=t?e[Yr]:"none",e[ei]=!t}const si=Symbol("");function oi(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push((()=>{oi(n.activeBranch,t)}))}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)ri(e.el,t);else if(e.type===Fo)e.children.forEach((e=>oi(e,t)));else if(e.type===$o){let{el:n,anchor:s}=e;for(;n&&(ri(n,t),n!==s);)n=n.nextSibling}}function ri(e,t){if(1===e.nodeType){const n=e.style;let s="";for(const e in t)n.setProperty(`--${e}`,t[e]),s+=`--${e}: ${t[e]};`;n[si]=s}}const ii=/(^|;)\s*display\s*:/;const li=/\s*!important$/;function ci(e,t,n){if(p(n))n.forEach((n=>ci(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=function(e,t){const n=ui[t];if(n)return n;let s=I(t);if("filter"!==s&&s in e)return ui[t]=s;s=L(s);for(let o=0;o{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();Ht(function(e,t){if(p(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=yi(),n}(s,o);pi(e,n,i,l)}else i&&(!function(e,t,n,s){e.removeEventListener(t,n,s)}(e,n,i,l),r[t]=void 0)}}const mi=/(?:Once|Passive|Capture)$/;let gi=0;const vi=Promise.resolve(),yi=()=>gi||(vi.then((()=>gi=0)),gi=Date.now());const bi=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123; -/*! #__NO_SIDE_EFFECTS__ */ -function _i(e,t){const n=ns(e);class s extends xi{constructor(e){super(n,e,t)}}return s.def=n,s} -/*! #__NO_SIDE_EFFECTS__ */const Si="undefined"!=typeof HTMLElement?HTMLElement:class{};class xi extends Si{constructor(e,t={},n){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this._ob=null,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,this._ob&&(this._ob.disconnect(),this._ob=null),en((()=>{this._connected||(el(null,this.shadowRoot),this._instance=null)}))}_resolveDef(){this._resolved=!0;for(let n=0;n{for(const t of e)this._setAttr(t.attributeName)})),this._ob.observe(this,{attributes:!0});const e=(e,t=!1)=>{const{props:n,styles:s}=e;let o;if(n&&!p(n))for(const r in n){const e=n[r];(e===Number||e&&e.type===Number)&&(r in this._props&&(this._props[r]=V(this._props[r])),(o||(o=Object.create(null)))[I(r)]=!0)}this._numberProps=o,t&&this._resolveProps(e),this._applyStyles(s),this._update()},t=this._def.__asyncLoader;t?t().then((t=>e(t,!0))):e(this._def)}_resolveProps(e){const{props:t}=e,n=p(t)?t:Object.keys(t||{});for(const s of Object.keys(this))"_"!==s[0]&&n.includes(s)&&this._setProp(s,this[s],!0,!1);for(const s of n.map(I))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(e){this._setProp(s,e)}})}_setAttr(e){let t=this.getAttribute(e);const n=I(e);this._numberProps&&this._numberProps[n]&&(t=V(t)),this._setProp(n,t,!1)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,s=!0){t!==this._props[e]&&(this._props[e]=t,s&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(O(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(O(e),t+""):t||this.removeAttribute(O(e))))}_update(){el(this._createVNode(),this.shadowRoot)}_createVNode(){const e=Zo(this._def,c({},this._props));return this._instance||(e.ce=e=>{this._instance=e,e.isCE=!0;const t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,{detail:t}))};e.emit=(e,...n)=>{t(e,n),O(e)!==e&&t(O(e),n)};let n=this;for(;n=n&&(n.parentNode||n.host);)if(n instanceof xi){e.parent=n._instance,e.provides=n._instance.provides;break}}),e}_applyStyles(e){e&&e.forEach((e=>{const t=document.createElement("style");t.textContent=e,this.shadowRoot.appendChild(t)}))}}const Ci=new WeakMap,ki=new WeakMap,Ti=Symbol("_moveCb"),wi=Symbol("_enterCb"),Ei={name:"TransitionGroup",props:c({},Vr,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=ur(),s=Kn();let o,r;return bs((()=>{if(!o.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){const s=e.cloneNode(),o=e[Pr];o&&o.forEach((e=>{e.split(/\s+/).forEach((e=>e&&s.classList.remove(e)))}));n.split(/\s+/).forEach((e=>e&&s.classList.add(e))),s.style.display="none";const r=1===t.nodeType?t:t.parentNode;r.appendChild(s);const{hasTransform:i}=Jr(s);return r.removeChild(s),i}(o[0].el,n.vnode.el,t))return;o.forEach(Ai),o.forEach(Ii);const s=o.filter(Ri);Zr(),s.forEach((e=>{const n=e.el,s=n.style;qr(n,t),s.transform=s.webkitTransform=s.transitionDuration="";const o=n[Ti]=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",o),n[Ti]=null,Wr(n,t))};n.addEventListener("transitionend",o)}))})),()=>{const i=Ct(e),l=jr(i);let c=i.tag||Fo;o=r,r=t.default?ts(t.default()):[];for(let e=0;e{const t=e.props["onUpdate:modelValue"]||!1;return p(t)?e=>P(t,e):t};function Li(e){e.target.composing=!0}function Fi(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Mi=Symbol("_assign"),Pi={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e[Mi]=Oi(o);const r=s||o.props&&"number"===o.props.type;pi(e,t?"change":"input",(t=>{if(t.target.composing)return;let s=e.value;n&&(s=s.trim()),r&&(s=B(s)),e[Mi](s)})),n&&pi(e,"change",(()=>{e.value=e.value.trim()})),t||(pi(e,"compositionstart",Li),pi(e,"compositionend",Fi),pi(e,"change",Fi))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:s,number:o}},r){if(e[Mi]=Oi(r),e.composing)return;const i=null==t?"":t;if((o||"number"===e.type?B(e.value):e.value)!==i){if(document.activeElement===e&&"range"!==e.type){if(n)return;if(s&&e.value.trim()===i)return}e.value=i}}},$i={deep:!0,created(e,t,n){e[Mi]=Oi(n),pi(e,"change",(()=>{const t=e._modelValue,n=ji(e),s=e.checked,o=e[Mi];if(p(t)){const e=ne(t,n),r=-1!==e;if(s&&!r)o(t.concat(n));else if(!s&&r){const n=[...t];n.splice(e,1),o(n)}}else if(f(t)){const e=new Set(t);s?e.add(n):e.delete(n),o(e)}else o(Hi(e,s))}))},mounted:Bi,beforeUpdate(e,t,n){e[Mi]=Oi(n),Bi(e,t,n)}};function Bi(e,{value:t,oldValue:n},s){e._modelValue=t,p(t)?e.checked=ne(t,s.props.value)>-1:f(t)?e.checked=t.has(s.props.value):t!==n&&(e.checked=te(t,Hi(e,!0)))}const Vi={created(e,{value:t},n){e.checked=te(t,n.props.value),e[Mi]=Oi(n),pi(e,"change",(()=>{e[Mi](ji(e))}))},beforeUpdate(e,{value:t,oldValue:n},s){e[Mi]=Oi(s),t!==n&&(e.checked=te(t,s.props.value))}},Di={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const o=f(t);pi(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?B(ji(e)):ji(e)));e[Mi](e.multiple?o?new Set(t):t:t[0]),e._assigning=!0,en((()=>{e._assigning=!1}))})),e[Mi]=Oi(s)},mounted(e,{value:t,modifiers:{number:n}}){Ui(e,t,n)},beforeUpdate(e,t,n){e[Mi]=Oi(n)},updated(e,{value:t,modifiers:{number:n}}){e._assigning||Ui(e,t,n)}};function Ui(e,t,n){const s=e.multiple,o=p(t);if(!s||o||f(t)){for(let r=0,i=e.options.length;r-1}else i.selected=t.has(l);else if(te(ji(i),t))return void(e.selectedIndex!==r&&(e.selectedIndex=r))}s||-1===e.selectedIndex||(e.selectedIndex=-1)}}function ji(e){return"_value"in e?e._value:e.value}function Hi(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const qi={created(e,t,n){Wi(e,t,n,null,"created")},mounted(e,t,n){Wi(e,t,n,null,"mounted")},beforeUpdate(e,t,n,s){Wi(e,t,n,s,"beforeUpdate")},updated(e,t,n,s){Wi(e,t,n,s,"updated")}};function Wi(e,t,n,s,o){const r=function(e,t){switch(e){case"SELECT":return Di;case"TEXTAREA":return Pi;default:switch(t){case"checkbox":return $i;case"radio":return Vi;default:return Pi}}}(e.tagName,n.props&&n.props.type)[o];r&&r(e,t,n,s)}const Ki=["ctrl","shift","alt","meta"],zi={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Ki.some((n=>e[`${n}Key`]&&!t.includes(n)))},Gi={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Ji=c({patchProp:(e,t,n,s,o,r,c,a,u)=>{const d="svg"===o;"class"===t?function(e,t,n){const s=e[Pr];s&&(t=(t?[t,...s]:[...s]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,s,d):"style"===t?function(e,t,n){const s=e.style,o=v(n);let r=!1;if(n&&!o){if(t)if(v(t))for(const e of t.split(";")){const t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&ci(s,t,"")}else for(const e in t)null==n[e]&&ci(s,e,"");for(const e in n)"display"===e&&(r=!0),ci(s,e,n[e])}else if(o){if(t!==n){const e=s[si];e&&(n+=";"+e),s.cssText=n,r=ii.test(n)}}else t&&e.removeAttribute("style");Yr in e&&(e[Yr]=r?s.display:"",e[ei]&&(s.display="none"))}(e,n,s):i(t)?l(t)||fi(e,t,0,s,c):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,s){if(s)return"innerHTML"===t||"textContent"===t||!!(t in e&&bi(t)&&g(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}if(bi(t)&&v(n))return!1;return t in e}(e,t,s,d))?function(e,t,n,s,o,r,i){if("innerHTML"===t||"textContent"===t)return s&&i(s,o,r),void(e[t]=null==n?"":n);const l=e.tagName;if("value"===t&&"PROGRESS"!==l&&!l.includes("-")){const s=null==n?"":n;return("OPTION"===l?e.getAttribute("value")||"":e.value)===s&&"_value"in e||(e.value=s),null==n&&e.removeAttribute(t),void(e._value=n)}let c=!1;if(""===n||null==n){const s=typeof e[t];"boolean"===s?n=ee(n):null==n&&"string"===s?(n="",c=!0):"number"===s&&(n=0,c=!0)}try{e[t]=n}catch(a){}c&&e.removeAttribute(t)}(e,t,s,r,c,a,u):("true-value"===t?e._trueValue=s:"false-value"===t&&(e._falseValue=s),function(e,t,n,s,o){if(s&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(di,t.slice(6,t.length)):e.setAttributeNS(di,t,n);else{const s=Y(t);null==n||s&&!ee(n)?e.removeAttribute(t):e.setAttribute(t,s?"":n)}}(e,t,s,d))}},Lr);let Xi,Qi=!1;function Zi(){return Xi||(Xi=bo(Ji))}function Yi(){return Xi=Qi?Xi:_o(Ji),Qi=!0,Xi}const el=(...e)=>{Zi().render(...e)},tl=(...e)=>{Yi().hydrate(...e)};function nl(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function sl(e){if(v(e)){return document.querySelector(e)}return e}const ol=o,rl=Symbol(""),il=Symbol(""),ll=Symbol(""),cl=Symbol(""),al=Symbol(""),ul=Symbol(""),dl=Symbol(""),pl=Symbol(""),hl=Symbol(""),fl=Symbol(""),ml=Symbol(""),gl=Symbol(""),vl=Symbol(""),yl=Symbol(""),bl=Symbol(""),_l=Symbol(""),Sl=Symbol(""),xl=Symbol(""),Cl=Symbol(""),kl=Symbol(""),Tl=Symbol(""),wl=Symbol(""),El=Symbol(""),Nl=Symbol(""),Al=Symbol(""),Il=Symbol(""),Rl=Symbol(""),Ol=Symbol(""),Ll=Symbol(""),Fl=Symbol(""),Ml=Symbol(""),Pl=Symbol(""),$l=Symbol(""),Bl=Symbol(""),Vl=Symbol(""),Dl=Symbol(""),Ul=Symbol(""),jl=Symbol(""),Hl=Symbol(""),ql={[rl]:"Fragment",[il]:"Teleport",[ll]:"Suspense",[cl]:"KeepAlive",[al]:"BaseTransition",[ul]:"openBlock",[dl]:"createBlock",[pl]:"createElementBlock",[hl]:"createVNode",[fl]:"createElementVNode",[ml]:"createCommentVNode",[gl]:"createTextVNode",[vl]:"createStaticVNode",[yl]:"resolveComponent",[bl]:"resolveDynamicComponent",[_l]:"resolveDirective",[Sl]:"resolveFilter",[xl]:"withDirectives",[Cl]:"renderList",[kl]:"renderSlot",[Tl]:"createSlots",[wl]:"toDisplayString",[El]:"mergeProps",[Nl]:"normalizeClass",[Al]:"normalizeStyle",[Il]:"normalizeProps",[Rl]:"guardReactiveProps",[Ol]:"toHandlers",[Ll]:"camelize",[Fl]:"capitalize",[Ml]:"toHandlerKey",[Pl]:"setBlockTracking",[$l]:"pushScopeId",[Bl]:"popScopeId",[Vl]:"withCtx",[Dl]:"unref",[Ul]:"isRef",[jl]:"withMemo",[Hl]:"isMemoSame"};const Wl={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function Kl(e,t,n,s,o,r,i,l=!1,c=!1,a=!1,u=Wl){return e&&(l?(e.helper(ul),e.helper(nc(e.inSSR,a))):e.helper(tc(e.inSSR,a)),i&&e.helper(xl)),{type:13,tag:t,props:n,children:s,patchFlag:o,dynamicProps:r,directives:i,isBlock:l,disableTracking:c,isComponent:a,loc:u}}function zl(e,t=Wl){return{type:17,loc:t,elements:e}}function Gl(e,t=Wl){return{type:15,loc:t,properties:e}}function Jl(e,t){return{type:16,loc:Wl,key:v(e)?Xl(e,!0):e,value:t}}function Xl(e,t=!1,n=Wl,s=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:s}}function Ql(e,t=Wl){return{type:8,loc:t,children:e}}function Zl(e,t=[],n=Wl){return{type:14,loc:n,callee:e,arguments:t}}function Yl(e,t=void 0,n=!1,s=!1,o=Wl){return{type:18,params:e,returns:t,newline:n,isSlot:s,loc:o}}function ec(e,t,n,s=!0){return{type:19,test:e,consequent:t,alternate:n,newline:s,loc:Wl}}function tc(e,t){return e||t?hl:fl}function nc(e,t){return e||t?dl:pl}function sc(e,{helper:t,removeHelper:n,inSSR:s}){e.isBlock||(e.isBlock=!0,n(tc(s,e.isComponent)),t(ul),t(nc(s,e.isComponent)))}const oc=new Uint8Array([123,123]),rc=new Uint8Array([125,125]);function ic(e){return e>=97&&e<=122||e>=65&&e<=90}function lc(e){return 32===e||10===e||9===e||12===e||13===e}function cc(e){return 47===e||62===e||lc(e)}function ac(e){const t=new Uint8Array(e.length);for(let n=0;n4===e.type&&e.isStatic;function mc(e){switch(e){case"Teleport":case"teleport":return il;case"Suspense":case"suspense":return ll;case"KeepAlive":case"keep-alive":return cl;case"BaseTransition":case"base-transition":return al}}const gc=/^\d|[^\$\w]/,vc=e=>!gc.test(e),yc=/[A-Za-z_$\xA0-\uFFFF]/,bc=/[\.\?\w$\xA0-\uFFFF]/,_c=/\s+[.[]\s*|\s*[.[]\s+/g,Sc=e=>{e=e.trim().replace(_c,(e=>e.trim()));let t=0,n=[],s=0,o=0,r=null;for(let i=0;i4===e.key.type&&e.key.content===s))}return n}function Lc(e,t){return`_${t}_${e.replace(/[^\w]/g,((t,n)=>"-"===t?"_":e.charCodeAt(n).toString()))}`}const Fc=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Mc={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:r,isPreTag:r,isCustomElement:r,onError:dc,onWarn:pc,comments:!1,prefixIdentifiers:!1};let Pc=Mc,$c=null,Bc="",Vc=null,Dc=null,Uc="",jc=-1,Hc=-1,qc=0,Wc=!1,Kc=null;const zc=[],Gc=new class{constructor(e,t){this.stack=e,this.cbs=t,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=oc,this.delimiterClose=rc,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return 2===this.mode&&0===this.stack.length}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=oc,this.delimiterClose=rc}getPos(e){let t=1,n=e+1;for(let s=this.newlines.length-1;s>=0;s--){const o=this.newlines[s];if(e>o){t=s+2,n=e-o;break}}return{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){60===e?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.state=this.inRCDATA?32:1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){const t=this.sequenceIndex===this.currentSequence.length;if(t?cc(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.inRCDATA=!1;this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(62===e||lc(e)){const t=this.index-this.currentSequence.length;if(this.sectionStart=e||(28===this.state?this.currentSequence===uc.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):6===this.state||11===this.state||18===this.state||17===this.state||12===this.state||13===this.state||14===this.state||15===this.state||16===this.state||20===this.state||19===this.state||21===this.state||9===this.state||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}}(zc,{onerr:ha,ontext(e,t){Yc(Qc(e,t),e,t)},ontextentity(e,t,n){Yc(e,t,n)},oninterpolation(e,t){if(Wc)return Yc(Qc(e,t),e,t);let n=e+Gc.delimiterOpen.length,s=t-Gc.delimiterClose.length;for(;lc(Bc.charCodeAt(n));)n++;for(;lc(Bc.charCodeAt(s-1));)s--;let o=Qc(n,s);o.includes("&")&&(o=Pc.decodeEntities(o,!1)),ca({type:5,content:pa(o,!1,aa(n,s)),loc:aa(e,t)})},onopentagname(e,t){const n=Qc(e,t);Vc={type:1,tag:n,ns:Pc.getNamespace(n,zc[0],Pc.ns),tagType:0,props:[],children:[],loc:aa(e-1,t),codegenNode:void 0}},onopentagend(e){Zc(e)},onclosetag(e,t){const n=Qc(e,t);if(!Pc.isVoidTag(n)){let s=!1;for(let e=0;e(7===e.type?e.rawName:e.name)===t))},onattribend(e,t){if(Vc&&Dc){if(ua(Dc.loc,t),0!==e)if(Uc.includes("&")&&(Uc=Pc.decodeEntities(Uc,!0)),6===Dc.type)"class"===Dc.name&&(Uc=la(Uc).trim()),Dc.value={type:2,content:Uc,loc:1===e?aa(jc,Hc):aa(jc-1,Hc+1)},Gc.inSFCRoot&&"template"===Vc.tag&&"lang"===Dc.name&&Uc&&"html"!==Uc&&Gc.enterRCDATA(ac("{const o=t.start.offset+n;return pa(e,!1,aa(o,o+e.length),0,s?1:0)},l={source:i(r.trim(),n.indexOf(r,o.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let c=o.trim().replace(Xc,"").trim();const a=o.indexOf(c),u=c.match(Jc);if(u){c=c.replace(Jc,"").trim();const e=u[1].trim();let t;if(e&&(t=n.indexOf(e,a+c.length),l.key=i(e,t,!0)),u[2]){const s=u[2].trim();s&&(l.index=i(s,n.indexOf(s,l.key?t+e.length:a+c.length),!0))}}c&&(l.value=i(c,a,!0));return l}(Dc.exp))}7===Dc.type&&"pre"===Dc.name||Vc.props.push(Dc)}Uc="",jc=Hc=-1},oncomment(e,t){Pc.comments&&ca({type:3,content:Qc(e,t),loc:aa(e-4,t+3)})},onend(){const e=Bc.length;for(let t=0;t64&&s<91)||mc(e)||(null==(n=Pc.isBuiltInComponent)?void 0:n.call(Pc,e))||Pc.isNativeTag&&!Pc.isNativeTag(e))return!0;var s;for(let o=0;o=0;)n--;return n}const na=new Set(["if","else","else-if","for","slot"]);const sa=/\r\n/g;function oa(e,t){var n,s;const o="preserve"!==Pc.whitespace;let r=!1;for(let i=0;i0){if(s>=2){e.codegenNode.patchFlag="-1",e.codegenNode=t.hoist(e.codegenNode),r++;continue}}else{const n=e.codegenNode;if(13===n.type){const s=Ca(n);if((!s||512===s||1===s)&&Sa(e,t)>=2){const s=xa(e);s&&(n.props=t.hoist(s))}n.dynamicProps&&(n.dynamicProps=t.hoist(n.dynamicProps))}}}if(1===e.type){const n=1===e.tagType;n&&t.scopes.vSlot++,va(e,t),n&&t.scopes.vSlot--}else if(11===e.type)va(e,t,1===e.children.length);else if(9===e.type)for(let n=0;n1)for(let o=0;o`_${ql[E.helper(e)]}`,replaceNode(e){E.parent.children[E.childIndex]=E.currentNode=e},removeNode(e){const t=e?E.parent.children.indexOf(e):E.currentNode?E.childIndex:-1;e&&e!==E.currentNode?E.childIndex>t&&(E.childIndex--,E.onNodeRemoved()):(E.currentNode=null,E.onNodeRemoved()),E.parent.children.splice(t,1)},onNodeRemoved:o,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){v(e)&&(e=Xl(e)),E.hoists.push(e);const t=Xl(`_hoisted_${E.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache:(e,t=!1)=>function(e,t,n=!1){return{type:20,index:e,value:t,isVNode:n,loc:Wl}}(E.cached++,e,t)};return E}function Ta(e,t){const n=ka(e,t);wa(e,n),t.hoistStatic&&ma(e,n),t.ssr||function(e,t){const{helper:n}=t,{children:s}=e;if(1===s.length){const n=s[0];if(ga(e,n)&&n.codegenNode){const s=n.codegenNode;13===s.type&&sc(s,t),e.codegenNode=s}else e.codegenNode=n}else if(s.length>1){let s=64;e.codegenNode=Kl(t,n(rl),void 0,e.children,s+"",void 0,void 0,!0,void 0,!1)}}(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0}function wa(e,t){t.currentNode=e;const{nodeTransforms:n}=t,s=[];for(let r=0;r{n--};for(;nt===e:t=>e.test(t);return(e,s)=>{if(1===e.type){const{props:o}=e;if(3===e.tagType&&o.some(wc))return;const r=[];for(let i=0;i`${ql[e]}: _${ql[e]}`;function Ia(e,t={}){const n=function(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:s=!1,filename:o="template.vue.html",scopeId:r=null,optimizeImports:i=!1,runtimeGlobalName:l="Vue",runtimeModuleName:c="vue",ssrRuntimeModuleName:a="vue/server-renderer",ssr:u=!1,isTS:d=!1,inSSR:p=!1}){const h={mode:t,prefixIdentifiers:n,sourceMap:s,filename:o,scopeId:r,optimizeImports:i,runtimeGlobalName:l,runtimeModuleName:c,ssrRuntimeModuleName:a,ssr:u,isTS:d,inSSR:p,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${ql[e]}`,push(e,t=-2,n){h.code+=e},indent(){f(++h.indentLevel)},deindent(e=!1){e?--h.indentLevel:f(--h.indentLevel)},newline(){f(h.indentLevel)}};function f(e){h.push("\n"+" ".repeat(e),0)}return h}(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:s,push:o,prefixIdentifiers:r,indent:i,deindent:l,newline:c,ssr:a}=n,u=Array.from(e.helpers),d=u.length>0,p=!r&&"module"!==s;!function(e,t){const{push:n,newline:s,runtimeGlobalName:o}=t,r=o,i=Array.from(e.helpers);if(i.length>0&&(n(`const _Vue = ${r}\n`,-1),e.hoists.length)){n(`const { ${[hl,fl,ml,gl,vl].filter((e=>i.includes(e))).map(Aa).join(", ")} } = _Vue\n`,-1)}(function(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:s}=t;s();for(let o=0;o0)&&c()),e.directives.length&&(Ra(e.directives,"directive",n),e.temps>0&&c()),e.temps>0){o("let ");for(let t=0;t0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(o("\n",0),c()),a||o("return "),e.codegenNode?Fa(e.codegenNode,n):o("null"),p&&(l(),o("}")),l(),o("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function Ra(e,t,{helper:n,push:s,newline:o,isTS:r}){const i=n("component"===t?yl:_l);for(let l=0;l3||!1;t.push("["),n&&t.indent(),La(e,t,n),n&&t.deindent(),t.push("]")}function La(e,t,n=!1,s=!0){const{push:o,newline:r}=t;for(let i=0;ie||"null"))}([r,i,l,c,a]),t),n(")"),d&&n(")");u&&(n(", "),Fa(u,t),n(")"))}(e,t);break;case 14:!function(e,t){const{push:n,helper:s,pure:o}=t,r=v(e.callee)?e.callee:s(e.callee);o&&n(Na);n(r+"(",-2,e),La(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){const{push:n,indent:s,deindent:o,newline:r}=t,{properties:i}=e;if(!i.length)return void n("{}",-2,e);const l=i.length>1||!1;n(l?"{":"{ "),l&&s();for(let c=0;c "),(c||l)&&(n("{"),s());i?(c&&n("return "),p(i)?Oa(i,t):Fa(i,t)):l&&Fa(l,t);(c||l)&&(o(),n("}"));a&&n(")")}(e,t);break;case 19:!function(e,t){const{test:n,consequent:s,alternate:o,newline:r}=e,{push:i,indent:l,deindent:c,newline:a}=t;if(4===n.type){const e=!vc(n.content);e&&i("("),Ma(n,t),e&&i(")")}else i("("),Fa(n,t),i(")");r&&l(),t.indentLevel++,r||i(" "),i("? "),Fa(s,t),t.indentLevel--,r&&a(),r||i(" "),i(": ");const u=19===o.type;u||t.indentLevel++;Fa(o,t),u||t.indentLevel--;r&&c(!0)}(e,t);break;case 20:!function(e,t){const{push:n,helper:s,indent:o,deindent:r,newline:i}=t;n(`_cache[${e.index}] || (`),e.isVNode&&(o(),n(`${s(Pl)}(-1),`),i());n(`_cache[${e.index}] = `),Fa(e.value,t),e.isVNode&&(n(","),i(),n(`${s(Pl)}(1),`),i(),n(`_cache[${e.index}]`),r());n(")")}(e,t);break;case 21:La(e.body,t,!0,!1)}}function Ma(e,t){const{content:n,isStatic:s}=e;t.push(s?JSON.stringify(n):n,-3,e)}function Pa(e,t){for(let n=0;nfunction(e,t,n,s){if(!("else"===t.name||t.exp&&t.exp.content.trim())){const s=t.exp?t.exp.loc:e.loc;n.onError(hc(28,t.loc)),t.exp=Xl("true",!1,s)}if("if"===t.name){const o=Va(e,t),r={type:9,loc:e.loc,branches:[o]};if(n.replaceNode(r),s)return s(r,o,!0)}else{const o=n.parent.children;let r=o.indexOf(e);for(;r-- >=-1;){const i=o[r];if(i&&3===i.type)n.removeNode(i);else{if(!i||2!==i.type||i.content.trim().length){if(i&&9===i.type){"else-if"===t.name&&void 0===i.branches[i.branches.length-1].condition&&n.onError(hc(30,e.loc)),n.removeNode();const o=Va(e,t);i.branches.push(o);const r=s&&s(i,o,!1);wa(o,n),r&&r(),n.currentNode=null}else n.onError(hc(30,e.loc));break}n.removeNode(i)}}}}(e,t,n,((e,t,s)=>{const o=n.parent.children;let r=o.indexOf(e),i=0;for(;r-- >=0;){const e=o[r];e&&9===e.type&&(i+=e.branches.length)}return()=>{if(s)e.codegenNode=Da(t,i,n);else{const s=function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode);s.alternate=Da(t,i+e.branches.length-1,n)}}}))));function Va(e,t){const n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!xc(e,"for")?e.children:[e],userKey:Cc(e,"key"),isTemplateIf:n}}function Da(e,t,n){return e.condition?ec(e.condition,Ua(e,t,n),Zl(n.helper(ml),['""',"true"])):Ua(e,t,n)}function Ua(e,t,n){const{helper:s}=n,o=Jl("key",Xl(`${t}`,!1,Wl,2)),{children:r}=e,i=r[0];if(1!==r.length||1!==i.type){if(1===r.length&&11===i.type){const e=i.codegenNode;return Rc(e,o,n),e}{let t=64;return Kl(n,s(rl),Gl([o]),r,t+"",void 0,void 0,!0,!1,!1,e.loc)}}{const e=i.codegenNode,t=14===(l=e).type&&l.callee===jl?l.arguments[1].returns:l;return 13===t.type&&sc(t,n),Rc(t,o,n),e}var l}const ja=Ea("for",((e,t,n)=>{const{helper:s,removeHelper:o}=n;return function(e,t,n,s){if(!t.exp)return void n.onError(hc(31,t.loc));const o=t.forParseResult;if(!o)return void n.onError(hc(32,t.loc));Ha(o);const{scopes:r}=n,{source:i,value:l,key:c,index:a}=o,u={type:11,loc:t.loc,source:i,valueAlias:l,keyAlias:c,objectIndexAlias:a,parseResult:o,children:Ec(e)?e.children:[e]};n.replaceNode(u),r.vFor++;const d=s&&s(u);return()=>{r.vFor--,d&&d()}}(e,t,n,(t=>{const r=Zl(s(Cl),[t.source]),i=Ec(e),l=xc(e,"memo"),c=Cc(e,"key"),a=c&&(6===c.type?Xl(c.value.content,!0):c.exp),u=c?Jl("key",a):null,d=4===t.source.type&&t.source.constType>0,p=d?64:c?128:256;return t.codegenNode=Kl(n,s(rl),void 0,r,p+"",void 0,void 0,!0,!d,!1,e.loc),()=>{let c;const{children:p}=t,h=1!==p.length||1!==p[0].type,f=Nc(e)?e:i&&1===e.children.length&&Nc(e.children[0])?e.children[0]:null;if(f?(c=f.codegenNode,i&&u&&Rc(c,u,n)):h?c=Kl(n,s(rl),u?Gl([u]):void 0,e.children,"64",void 0,void 0,!0,void 0,!1):(c=p[0].codegenNode,i&&u&&Rc(c,u,n),c.isBlock!==!d&&(c.isBlock?(o(ul),o(nc(n.inSSR,c.isComponent))):o(tc(n.inSSR,c.isComponent))),c.isBlock=!d,c.isBlock?(s(ul),s(nc(n.inSSR,c.isComponent))):s(tc(n.inSSR,c.isComponent))),l){const e=Yl(qa(t.parseResult,[Xl("_cached")]));e.body={type:21,body:[Ql(["const _memo = (",l.exp,")"]),Ql(["if (_cached",...a?[" && _cached.key === ",a]:[],` && ${n.helperString(Hl)}(_cached, _memo)) return _cached`]),Ql(["const _item = ",c]),Xl("_item.memo = _memo"),Xl("return _item")],loc:Wl},r.arguments.push(e,Xl("_cache"),Xl(String(n.cached++)))}else r.arguments.push(Yl(qa(t.parseResult),c,!0))}}))}));function Ha(e,t){e.finalized||(e.finalized=!0)}function qa({value:e,key:t,index:n},s=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map(((e,t)=>e||Xl("_".repeat(t+1),!1)))}([e,t,n,...s])}const Wa=Xl("undefined",!1),Ka=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){const n=xc(e,"slot");if(n)return t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},za=(e,t,n,s)=>Yl(e,n,!1,!0,n.length?n[0].loc:s);function Ga(e,t,n=za){t.helper(Vl);const{children:s,loc:o}=e,r=[],i=[];let l=t.scopes.vSlot>0||t.scopes.vFor>0;const c=xc(e,"slot",!0);if(c){const{arg:e,exp:t}=c;e&&!fc(e)&&(l=!0),r.push(Jl(e||Xl("default",!0),n(t,void 0,s,o)))}let a=!1,u=!1;const d=[],p=new Set;let h=0;for(let g=0;gJl("default",n(e,void 0,t,o));a?d.length&&d.some((e=>Qa(e)))&&(u?t.onError(hc(39,d[0].loc)):r.push(e(void 0,d))):r.push(e(void 0,s))}const f=l?2:Xa(e.children)?3:1;let m=Gl(r.concat(Jl("_",Xl(f+"",!1))),o);return i.length&&(m=Zl(t.helper(Tl),[m,zl(i)])),{slots:m,hasDynamicSlots:l}}function Ja(e,t,n){const s=[Jl("name",e),Jl("fn",t)];return null!=n&&s.push(Jl("key",Xl(String(n),!0))),Gl(s)}function Xa(e){for(let t=0;tfunction(){if(1!==(e=t.currentNode).type||0!==e.tagType&&1!==e.tagType)return;const{tag:n,props:s}=e,o=1===e.tagType;let r=o?function(e,t,n=!1){let{tag:s}=e;const o=su(s),r=Cc(e,"is");if(r)if(o){const e=6===r.type?r.value&&Xl(r.value.content,!0):r.exp;if(e)return Zl(t.helper(bl),[e])}else 6===r.type&&r.value.content.startsWith("vue:")&&(s=r.value.content.slice(4));const i=mc(s)||t.isBuiltInComponent(s);if(i)return n||t.helper(i),i;return t.helper(yl),t.components.add(s),Lc(s,"component")}(e,t):`"${n}"`;const i=b(r)&&r.callee===bl;let l,c,a,u,d,p,h=0,f=i||r===il||r===ll||!o&&("svg"===n||"foreignObject"===n);if(s.length>0){const n=eu(e,t,void 0,o,i);l=n.props,h=n.patchFlag,d=n.dynamicPropNames;const s=n.directives;p=s&&s.length?zl(s.map((e=>function(e,t){const n=[],s=Za.get(e);s?n.push(t.helperString(s)):(t.helper(_l),t.directives.add(e.name),n.push(Lc(e.name,"directive")));const{loc:o}=e;e.exp&&n.push(e.exp);e.arg&&(e.exp||n.push("void 0"),n.push(e.arg));if(Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));const t=Xl("true",!1,o);n.push(Gl(e.modifiers.map((e=>Jl(e,t))),o))}return zl(n,e.loc)}(e,t)))):void 0,n.shouldUseBlock&&(f=!0)}if(e.children.length>0){r===cl&&(f=!0,h|=1024);if(o&&r!==il&&r!==cl){const{slots:n,hasDynamicSlots:s}=Ga(e,t);c=n,s&&(h|=1024)}else if(1===e.children.length&&r!==il){const n=e.children[0],s=n.type,o=5===s||8===s;o&&0===ya(n,t)&&(h|=1),c=o||2===s?n:e.children}else c=e.children}0!==h&&(a=String(h),d&&d.length&&(u=function(e){let t="[";for(let n=0,s=e.length;n0;let f=!1,m=0,g=!1,v=!1,b=!1,_=!1,S=!1,x=!1;const C=[],k=e=>{u.length&&(d.push(Gl(tu(u),c)),u=[]),e&&d.push(e)},T=({key:e,value:n})=>{if(fc(e)){const r=e.content,l=i(r);if(!l||s&&!o||"onclick"===r.toLowerCase()||"onUpdate:modelValue"===r||w(r)||(_=!0),l&&w(r)&&(x=!0),l&&14===n.type&&(n=n.arguments[0]),20===n.type||(4===n.type||8===n.type)&&ya(n,t)>0)return;"ref"===r?g=!0:"class"===r?v=!0:"style"===r?b=!0:"key"===r||C.includes(r)||C.push(r),!s||"class"!==r&&"style"!==r||C.includes(r)||C.push(r)}else S=!0};for(let i=0;i0&&u.push(Jl(Xl("ref_for",!0),Xl("true")))),"is"===n&&(su(l)||r&&r.content.startsWith("vue:")))continue;u.push(Jl(Xl(n,!0,s),Xl(r?r.content:"",i,r?r.loc:e)))}else{const{name:n,arg:i,exp:a,loc:g,modifiers:v}=o,b="bind"===n,_="on"===n;if("slot"===n){s||t.onError(hc(40,g));continue}if("once"===n||"memo"===n)continue;if("is"===n||b&&kc(i,"is")&&su(l))continue;if(_&&r)continue;if((b&&kc(i,"key")||_&&h&&kc(i,"vue:before-update"))&&(f=!0),b&&kc(i,"ref")&&t.scopes.vFor>0&&u.push(Jl(Xl("ref_for",!0),Xl("true"))),!i&&(b||_)){S=!0,a?b?(k(),d.push(a)):k({type:14,loc:g,callee:t.helper(Ol),arguments:s?[a]:[a,"true"]}):t.onError(hc(b?34:35,g));continue}b&&v.includes("prop")&&(m|=32);const x=t.directiveTransforms[n];if(x){const{props:n,needRuntime:s}=x(o,e,t);!r&&n.forEach(T),_&&i&&!fc(i)?k(Gl(n,c)):u.push(...n),s&&(p.push(o),y(s)&&Za.set(o,s))}else E(n)||(p.push(o),h&&(f=!0))}}let N;if(d.length?(k(),N=d.length>1?Zl(t.helper(El),d,c):d[0]):u.length&&(N=Gl(tu(u),c)),S?m|=16:(v&&!s&&(m|=2),b&&!s&&(m|=4),C.length&&(m|=8),_&&(m|=32)),f||0!==m&&32!==m||!(g||x||p.length>0)||(m|=512),!t.inSSR&&N)switch(N.type){case 15:let e=-1,n=-1,s=!1;for(let t=0;t{if(Nc(e)){const{children:n,loc:s}=e,{slotName:o,slotProps:r}=function(e,t){let n,s='"default"';const o=[];for(let r=0;r0){const{props:s,directives:r}=eu(e,t,o,!1,!1);n=s,r.length&&t.onError(hc(36,r[0].loc))}return{slotName:s,slotProps:n}}(e,t),i=[t.prefixIdentifiers?"_ctx.$slots":"$slots",o,"{}","undefined","true"];let l=2;r&&(i[2]=r,l=3),n.length&&(i[3]=Yl([],n,!1,!1,s),l=4),t.scopeId&&!t.slotted&&(l=5),i.splice(l),e.codegenNode=Zl(t.helper(kl),i,s)}};const ru=/^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,iu=(e,t,n,s)=>{const{loc:o,modifiers:r,arg:i}=e;let l;if(4===i.type)if(i.isStatic){let e=i.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`);l=Xl(0!==t.tagType||e.startsWith("vnode")||!/[A-Z]/.test(e)?F(I(e)):`on:${e}`,!0,i.loc)}else l=Ql([`${n.helperString(Ml)}(`,i,")"]);else l=i,l.children.unshift(`${n.helperString(Ml)}(`),l.children.push(")");let c=e.exp;c&&!c.content.trim()&&(c=void 0);let a=n.cacheHandlers&&!c&&!n.inVOnce;if(c){const e=Sc(c.content),t=!(e||ru.test(c.content)),n=c.content.includes(";");(t||a&&e)&&(c=Ql([`${t?"$event":"(...args)"} => ${n?"{":"("}`,c,n?"}":")"]))}let u={props:[Jl(l,c||Xl("() => {}",!1,o))]};return s&&(u=s(u)),a&&(u.props[0].value=n.cache(u.props[0].value)),u.props.forEach((e=>e.key.isHandlerKey=!0)),u},lu=(e,t,n)=>{const{modifiers:s,loc:o}=e,r=e.arg;let{exp:i}=e;if(i&&4===i.type&&!i.content.trim()&&(i=void 0),!i){if(4!==r.type||!r.isStatic)return n.onError(hc(52,r.loc)),{props:[Jl(r,Xl("",!0,o))]};const t=I(r.content);i=e.exp=Xl(t,!1,r.loc)}return 4!==r.type?(r.children.unshift("("),r.children.push(') || ""')):r.isStatic||(r.content=`${r.content} || ""`),s.includes("camel")&&(4===r.type?r.content=r.isStatic?I(r.content):`${n.helperString(Ll)}(${r.content})`:(r.children.unshift(`${n.helperString(Ll)}(`),r.children.push(")"))),n.inSSR||(s.includes("prop")&&cu(r,"."),s.includes("attr")&&cu(r,"^")),{props:[Jl(r,i)]}},cu=(e,t)=>{4===e.type?e.content=e.isStatic?t+e.content:`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},au=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{const n=e.children;let s,o=!1;for(let e=0;e7===e.type&&!t.directiveTransforms[e.name])))))for(let e=0;e{if(1===e.type&&xc(e,"once",!0)){if(uu.has(e)||t.inVOnce||t.inSSR)return;return uu.add(e),t.inVOnce=!0,t.helper(Pl),()=>{t.inVOnce=!1;const e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0))}}},pu=(e,t,n)=>{const{exp:s,arg:o}=e;if(!s)return n.onError(hc(41,e.loc)),hu();const r=s.loc.source,i=4===s.type?s.content:r,l=n.bindingMetadata[r];if("props"===l||"props-aliased"===l)return hu();if(!i.trim()||!Sc(i))return n.onError(hc(42,s.loc)),hu();const c=o||Xl("modelValue",!0),a=o?fc(o)?`onUpdate:${I(o.content)}`:Ql(['"onUpdate:" + ',o]):"onUpdate:modelValue";let u;u=Ql([`${n.isTS?"($event: any)":"$event"} => ((`,s,") = $event)"]);const d=[Jl(c,e.exp),Jl(a,u)];if(e.modifiers.length&&1===t.tagType){const t=e.modifiers.map((e=>(vc(e)?e:JSON.stringify(e))+": true")).join(", "),n=o?fc(o)?`${o.content}Modifiers`:Ql([o,' + "Modifiers"']):"modelModifiers";d.push(Jl(n,Xl(`{ ${t} }`,!1,e.loc,2)))}return hu(d)};function hu(e=[]){return{props:e}}const fu=new WeakSet,mu=(e,t)=>{if(1===e.type){const n=xc(e,"memo");if(!n||fu.has(e))return;return fu.add(e),()=>{const s=e.codegenNode||t.currentNode.codegenNode;s&&13===s.type&&(1!==e.tagType&&sc(s,t),e.codegenNode=Zl(t.helper(jl),[n.exp,Yl(void 0,s),"_cache",String(t.cached++)]))}}};function gu(e,t={}){const n=t.onError||dc,s="module"===t.mode;!0===t.prefixIdentifiers?n(hc(47)):s&&n(hc(48));t.cacheHandlers&&n(hc(49)),t.scopeId&&!s&&n(hc(50));const o=c({},t,{prefixIdentifiers:!1}),r=v(e)?fa(e,o):e,[i,l]=[[du,Ba,mu,ja,ou,Ya,Ka,au],{on:iu,bind:lu,model:pu}];return Ta(r,c({},o,{nodeTransforms:[...i,...t.nodeTransforms||[]],directiveTransforms:c({},l,t.directiveTransforms||{})})),Ia(r,o)}const vu=Symbol(""),yu=Symbol(""),bu=Symbol(""),_u=Symbol(""),Su=Symbol(""),xu=Symbol(""),Cu=Symbol(""),ku=Symbol(""),Tu=Symbol(""),wu=Symbol("");var Eu;let Nu;Eu={[vu]:"vModelRadio",[yu]:"vModelCheckbox",[bu]:"vModelText",[_u]:"vModelSelect",[Su]:"vModelDynamic",[xu]:"withModifiers",[Cu]:"withKeys",[ku]:"vShow",[Tu]:"Transition",[wu]:"TransitionGroup"},Object.getOwnPropertySymbols(Eu).forEach((e=>{ql[e]=Eu[e]}));const Au={parseMode:"html",isVoidTag:Z,isNativeTag:e=>J(e)||X(e)||Q(e),isPreTag:e=>"pre"===e,decodeEntities:function(e,t=!1){return Nu||(Nu=document.createElement("div")),t?(Nu.innerHTML=`
`,Nu.children[0].getAttribute("foo")):(Nu.innerHTML=e,Nu.textContent)},isBuiltInComponent:e=>"Transition"===e||"transition"===e?Tu:"TransitionGroup"===e||"transition-group"===e?wu:void 0,getNamespace(e,t,n){let s=t?t.ns:n;if(t&&2===s)if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some((e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content)))&&(s=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(s=0);else t&&1===s&&("foreignObject"!==t.tag&&"desc"!==t.tag&&"title"!==t.tag||(s=0));if(0===s){if("svg"===e)return 1;if("math"===e)return 2}return s}},Iu=(e,t)=>{const n=z(e);return Xl(JSON.stringify(n),!1,t,3)};function Ru(e,t){return hc(e,t)}const Ou=t("passive,once,capture"),Lu=t("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),Fu=t("left,right"),Mu=t("onkeyup,onkeydown,onkeypress",!0),Pu=(e,t)=>fc(e)&&"onclick"===e.content.toLowerCase()?Xl(t,!0):4!==e.type?Ql(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,$u=(e,t)=>{1!==e.type||0!==e.tagType||"script"!==e.tag&&"style"!==e.tag||t.removeNode()},Bu=[e=>{1===e.type&&e.props.forEach(((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:Xl("style",!0,t.loc),exp:Iu(t.value.content,t.loc),modifiers:[],loc:t.loc})}))}],Vu={cloak:()=>({props:[]}),html:(e,t,n)=>{const{exp:s,loc:o}=e;return s||n.onError(Ru(53,o)),t.children.length&&(n.onError(Ru(54,o)),t.children.length=0),{props:[Jl(Xl("innerHTML",!0,o),s||Xl("",!0))]}},text:(e,t,n)=>{const{exp:s,loc:o}=e;return s||n.onError(Ru(55,o)),t.children.length&&(n.onError(Ru(56,o)),t.children.length=0),{props:[Jl(Xl("textContent",!0),s?ya(s,n)>0?s:Zl(n.helperString(wl),[s],o):Xl("",!0))]}},model:(e,t,n)=>{const s=pu(e,t,n);if(!s.props.length||1===t.tagType)return s;e.arg&&n.onError(Ru(58,e.arg.loc));const{tag:o}=t,r=n.isCustomElement(o);if("input"===o||"textarea"===o||"select"===o||r){let i=bu,l=!1;if("input"===o||r){const s=Cc(t,"type");if(s){if(7===s.type)i=Su;else if(s.value)switch(s.value.content){case"radio":i=vu;break;case"checkbox":i=yu;break;case"file":l=!0,n.onError(Ru(59,e.loc))}}else(function(e){return e.props.some((e=>!(7!==e.type||"bind"!==e.name||e.arg&&4===e.arg.type&&e.arg.isStatic)))})(t)&&(i=Su)}else"select"===o&&(i=_u);l||(s.needRuntime=n.helper(i))}else n.onError(Ru(57,e.loc));return s.props=s.props.filter((e=>!(4===e.key.type&&"modelValue"===e.key.content))),s},on:(e,t,n)=>iu(e,t,n,(t=>{const{modifiers:s}=e;if(!s.length)return t;let{key:o,value:r}=t.props[0];const{keyModifiers:i,nonKeyModifiers:l,eventOptionModifiers:c}=((e,t,n,s)=>{const o=[],r=[],i=[];for(let l=0;l{const{exp:s,loc:o}=e;return s||n.onError(Ru(61,o)),{props:[],needRuntime:n.helper(ku)}}};const Du=new WeakMap;function Uu(e,t){if(!v(e)){if(!e.nodeType)return o;e=e.innerHTML}const s=e,r=function(e){let t=Du.get(null!=e?e:n);return t||(t=Object.create(null),Du.set(null!=e?e:n,t)),t}(t),i=r[s];if(i)return i;if("#"===e[0]){const t=document.querySelector(e);e=t?t.innerHTML:""}const l=c({hoistStatic:!0,onError:void 0,onWarn:o},t);l.isCustomElement||"undefined"==typeof customElements||(l.isCustomElement=e=>!!customElements.get(e));const{code:a}=function(e,t={}){return gu(e,c({},Au,t,{nodeTransforms:[$u,...Bu,...t.nodeTransforms||[]],directiveTransforms:c({},Vu,t.directiveTransforms||{}),transformHoist:null}))}(e,l),u=new Function(a)();return u._rc=!0,r[s]=u}return _r(Uu),e.BaseTransition=Jn,e.BaseTransitionPropsValidators=Gn,e.Comment=Po,e.DeprecationTypes=null,e.EffectScope=le,e.ErrorCodes={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER"},e.ErrorTypeStrings=null,e.Fragment=Fo,e.KeepAlive=is,e.ReactiveEffect=ue,e.Static=$o,e.Suspense=Nn,e.Teleport=Oo,e.Text=Mo,e.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},e.Transition=$r,e.TransitionGroup=Ni,e.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},e.VueElement=xi,e.assertNumber=function(e,t){},e.callWithAsyncErrorHandling=Ht,e.callWithErrorHandling=jt,e.camelize=I,e.capitalize=L,e.cloneVNode=er,e.compatUtils=null,e.compile=Uu,e.computed=Tr,e.createApp=(...e)=>{const t=Zi().createApp(...e),{mount:n}=t;return t.mount=e=>{const s=sl(e);if(!s)return;const o=t._component;g(o)||o.render||o.template||(o.template=s.innerHTML),s.innerHTML="";const r=n(s,!1,nl(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),r},t},e.createBlock=Wo,e.createCommentVNode=function(e="",t=!1){return t?(Do(),Wo(Po,null,e)):Zo(Po,null,e)},e.createElementBlock=function(e,t,n,s,o,r){return qo(Qo(e,t,n,s,o,r,!0))},e.createElementVNode=Qo,e.createHydrationRenderer=_o,e.createPropsRestProxy=function(e,t){const n={};for(const s in e)t.includes(s)||Object.defineProperty(n,s,{enumerable:!0,get:()=>e[s]});return n},e.createRenderer=bo,e.createSSRApp=(...e)=>{const t=Yi().createApp(...e),{mount:n}=t;return t.mount=e=>{const t=sl(e);if(t)return n(t,!0,nl(t))},t},e.createSlots=function(e,t){for(let n=0;n{const t=s.fn(...e);return t&&(t.key=s.key),t}:s.fn)}return e},e.createStaticVNode=function(e,t){const n=Zo($o,null,e);return n.staticCount=t,n},e.createTextVNode=tr,e.createVNode=Zo,e.customRef=Bt,e.defineAsyncComponent=function(e){g(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:s,delay:o=200,timeout:r,suspensible:i=!0,onError:l}=e;let c,a=null,u=0;const d=()=>{let e;return a||(e=a=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),l)return new Promise(((t,n)=>{l(e,(()=>t((u++,a=null,d()))),(()=>n(e)),u+1)}));throw e})).then((t=>e!==a&&a?a:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),c=t,t))))};return ns({name:"AsyncComponentWrapper",__asyncLoader:d,get __asyncResolved(){return c},setup(){const e=ar;if(c)return()=>os(c,e);const t=t=>{a=null,qt(t,e,13,!s)};if(i&&e.suspense)return d().then((t=>()=>os(t,e))).catch((e=>(t(e),()=>s?Zo(s,{error:e}):null)));const l=Rt(!1),u=Rt(),p=Rt(!!o);return o&&setTimeout((()=>{p.value=!1}),o),null!=r&&setTimeout((()=>{if(!l.value&&!u.value){const e=new Error(`Async component timed out after ${r}ms.`);t(e),u.value=e}}),r),d().then((()=>{l.value=!0,e.parent&&rs(e.parent.vnode)&&(e.parent.effect.dirty=!0,tn(e.parent.update))})).catch((e=>{t(e),u.value=e})),()=>l.value&&c?os(c,e):u.value&&s?Zo(s,{error:u.value}):n&&!p.value?Zo(n):void 0}})},e.defineComponent=ns,e.defineCustomElement=_i,e.defineEmits=function(){return null},e.defineExpose=function(e){},e.defineModel=function(){},e.defineOptions=function(e){},e.defineProps=function(){return null},e.defineSSRCustomElement=e=>_i(e,tl),e.defineSlots=function(){return null},e.devtools=void 0,e.effect=function(e,t){e.effect instanceof ue&&(e=e.effect.fn);const n=new ue(e,o,(()=>{n.dirty&&n.run()}));t&&(c(n,t),t.scope&&ce(n,t.scope)),t&&t.lazy||n.run();const s=n.run.bind(n);return s.effect=n,s},e.effectScope=function(e){return new le(e)},e.getCurrentInstance=ur,e.getCurrentScope=ae,e.getTransitionRawChildren=ts,e.guardReactiveProps=Yo,e.h=wr,e.handleError=qt,e.hasInjectionContext=function(){return!!(ar||hn||Js)},e.hydrate=tl,e.initCustomFormatter=function(){},e.initDirectivesForSSR=ol,e.inject=Qs,e.isMemoSame=Er,e.isProxy=xt,e.isReactive=bt,e.isReadonly=_t,e.isRef=It,e.isRuntimeOnly=()=>!gr,e.isShallow=St,e.isVNode=Ko,e.markRaw=kt,e.mergeDefaults=function(e,t){const n=Ls(e);for(const s in t){if(s.startsWith("__skip"))continue;let e=n[s];e?p(e)||g(e)?e=n[s]={type:e,default:t[s]}:e.default=t[s]:null===e&&(e=n[s]={default:t[s]}),e&&t[`__skip_${s}`]&&(e.skipFactory=!0)}return n},e.mergeModels=function(e,t){return e&&t?p(e)&&p(t)?e.concat(t):c({},Ls(e),Ls(t)):e||t},e.mergeProps=rr,e.nextTick=en,e.normalizeClass=G,e.normalizeProps=function(e){if(!e)return null;let{class:t,style:n}=e;return t&&!v(t)&&(e.class=G(t)),n&&(e.style=H(n)),e},e.normalizeStyle=H,e.onActivated=cs,e.onBeforeMount=gs,e.onBeforeUnmount=_s,e.onBeforeUpdate=ys,e.onDeactivated=as,e.onErrorCaptured=Ts,e.onMounted=vs,e.onRenderTracked=ks,e.onRenderTriggered=Cs,e.onScopeDispose=function(e){re&&re.cleanups.push(e)},e.onServerPrefetch=xs,e.onUnmounted=Ss,e.onUpdated=bs,e.openBlock=Do,e.popScopeId=function(){fn=null},e.provide=Xs,e.proxyRefs=Pt,e.pushScopeId=function(e){fn=e},e.queuePostFlushCb=sn,e.reactive=mt,e.readonly=vt,e.ref=Rt,e.registerRuntimeCompiler=_r,e.render=el,e.renderList=function(e,t,n,s){let o;const r=n&&n[s];if(p(e)||v(e)){o=new Array(e.length);for(let n=0,s=e.length;nt(e,n,void 0,r&&r[n])));else{const n=Object.keys(e);o=new Array(n.length);for(let s=0,i=n.length;sv(e)?e:null==e?"":p(e)||b(e)&&(e.toString===S||!g(e.toString))?JSON.stringify(e,se,2):String(e),e.toHandlerKey=F,e.toHandlers=function(e,t){const n={};for(const s in e)n[t&&/[A-Z]/.test(s)?`on:${s}`:F(s)]=e[s];return n},e.toRaw=Ct,e.toRef=function(e,t,n){return It(e)?e:g(e)?new Dt(e):b(e)&&arguments.length>1?Ut(e,t,n):Rt(e)},e.toRefs=function(e){const t=p(e)?new Array(e.length):{};for(const n in e)t[n]=Ut(e,n);return t},e.toValue=function(e){return g(e)?e():Ft(e)},e.transformVNodeArgs=function(e){},e.triggerRef=function(e){At(e,4)},e.unref=Ft,e.useAttrs=function(){return Os().attrs},e.useCssModule=function(e="$style"){return n},e.useCssVars=function(e){const t=ur();if(!t)return;const n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach((e=>ri(e,n)))},s=()=>{const s=e(t.proxy);oi(t.subTree,s),n(s)};Mn(s),vs((()=>{const e=new MutationObserver(s);e.observe(t.subTree.el.parentNode,{childList:!0}),Ss((()=>e.disconnect()))}))},e.useModel=function(e,t,s=n){const o=ur(),r=I(t),i=O(t),l=Bt(((n,l)=>{let c;return Pn((()=>{const n=e[t];M(c,n)&&(c=n,l())})),{get:()=>(n(),s.get?s.get(c):c),set(e){const n=o.vnode.props;n&&(t in n||r in n||i in n)&&(`onUpdate:${t}`in n||`onUpdate:${r}`in n||`onUpdate:${i}`in n)||!M(e,c)||(c=e,l()),o.emit(`update:${t}`,s.set?s.set(e):e)}}})),c="modelValue"===t?"modelModifiers":`${t}Modifiers`;return l[Symbol.iterator]=()=>{let t=0;return{next:()=>t<2?{value:t++?e[c]||{}:l,done:!1}:{done:!0}}},l},e.useSSRContext=()=>{},e.useSlots=function(){return Os().slots},e.useTransitionState=Kn,e.vModelCheckbox=$i,e.vModelDynamic=qi,e.vModelRadio=Vi,e.vModelSelect=Di,e.vModelText=Pi,e.vShow=ti,e.version=Nr,e.warn=Ar,e.watch=Bn,e.watchEffect=function(e,t){return Vn(e,null,t)},e.watchPostEffect=Mn,e.watchSyncEffect=Pn,e.withAsyncContext=function(e){const t=ur();let n=e();return fr(),_(n)&&(n=n.catch((e=>{throw hr(t),e}))),[n,()=>hr(t)]},e.withCtx=gn,e.withDefaults=function(e,t){return null},e.withDirectives=function(e,t){if(null===hn)return e;const s=Cr(hn)||hn.proxy,o=e.dirs||(e.dirs=[]);for(let r=0;r{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=n=>{if(!("key"in n))return;const s=O(n.key);return t.some((e=>e===s||Gi[e]===s))?e(n):void 0})},e.withMemo=function(e,t,n,s){const o=n[s];if(o&&Er(o,e))return o;const r=t();return r.memo=e.slice(),n[s]=r},e.withModifiers=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(n,...s)=>{for(let e=0;egn,e}({}); \ No newline at end of file +var Vue=function(e){"use strict";var t,n;let r,i,l,s,o,a,c,u,d,h,f,p;/*! #__NO_SIDE_EFFECTS__ */function m(e){let t=/* @__PURE__ */Object.create(null);for(let n of e.split(","))t[n]=1;return e=>e in t}let g={},y=[],b=()=>{},_=()=>!1,S=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||97>e.charCodeAt(2)),x=e=>e.startsWith("onUpdate:"),C=Object.assign,k=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},T=Object.prototype.hasOwnProperty,N=(e,t)=>T.call(e,t),w=Array.isArray,A=e=>"[object Map]"===F(e),E=e=>"[object Set]"===F(e),I=e=>"[object Date]"===F(e),R=e=>"[object RegExp]"===F(e),O=e=>"function"==typeof e,P=e=>"string"==typeof e,M=e=>"symbol"==typeof e,L=e=>null!==e&&"object"==typeof e,$=e=>(L(e)||O(e))&&O(e.then)&&O(e.catch),D=Object.prototype.toString,F=e=>D.call(e),V=e=>F(e).slice(8,-1),B=e=>"[object Object]"===F(e),U=e=>P(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,j=/* @__PURE__ */m(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),H=/* @__PURE__ */m("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),q=e=>{let t=/* @__PURE__ */Object.create(null);return n=>t[n]||(t[n]=e(n))},W=/-(\w)/g,K=q(e=>e.replace(W,(e,t)=>t?t.toUpperCase():"")),z=/\B([A-Z])/g,J=q(e=>e.replace(z,"-$1").toLowerCase()),G=q(e=>e.charAt(0).toUpperCase()+e.slice(1)),X=q(e=>e?`on${G(e)}`:""),Q=(e,t)=>!Object.is(e,t),Z=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},ee=e=>{let t=parseFloat(e);return isNaN(t)?e:t},et=e=>{let t=P(e)?Number(e):NaN;return isNaN(t)?e:t},en=()=>r||(r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}),er=/* @__PURE__ */m("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");function ei(e){if(w(e)){let t={};for(let n=0;n{if(e){let n=e.split(es);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function ec(e){let t="";if(P(e))t=e;else if(w(e))for(let n=0;nem(e,t))}let ey=e=>!!(e&&!0===e.__v_isRef),ev=e=>P(e)?e:null==e?"":w(e)||L(e)&&(e.toString===D||!O(e.toString))?ey(e)?ev(e.value):JSON.stringify(e,eb,2):String(e),eb=(e,t)=>ey(t)?eb(e,t.value):A(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[e_(t,r)+" =>"]=n,e),{})}:E(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>e_(e))}:M(t)?e_(t):!L(t)||w(t)||B(t)?t:String(t),e_=(e,t="")=>{var n;return M(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};class eS{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=i,!e&&i&&(this.index=(i.scopes||(i.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e0)){for(;s;){let t=s;for(s=void 0;t;){let n=t.nextEffect;if(t.nextEffect=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=n}}if(e)throw e}}function eN(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ew(e){let t;let n=e.depsTail,r=n;for(;r;){let e=r.prevDep;-1===r.version?(r===n&&(n=e),eI(r),function(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function eA(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&eE(t.dep.computed)||t.dep.version!==t.version)return!0;return!!e._dirty}function eE(e){if(4&e.flags&&!(16&e.flags)||(e.flags&=-17,e.globalVersion===e$))return;e.globalVersion=e$;let t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&!eA(e)){e.flags&=-3;return}let n=l,r=eR;l=e,eR=!0;try{eN(e);let n=e.fn(e._value);(0===t.version||Q(n,e._value))&&(e._value=n,t.version++)}catch(e){throw t.version++,e}finally{l=n,eR=r,ew(e),e.flags&=-3}}function eI(e){let{dep:t,prevSub:n,nextSub:r}=e;if(n&&(n.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=n,e.nextSub=void 0),t.subs===e&&(t.subs=n),!t.subs&&t.computed){t.computed.flags&=-5;for(let e=t.computed.deps;e;e=e.nextDep)eI(e)}}let eR=!0,eO=[];function eP(){eO.push(eR),eR=!1}function eM(){let e=eO.pop();eR=void 0===e||e}function eL(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=l;l=void 0;try{t()}finally{l=e}}}let e$=0;class eD{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class eF{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0}track(e){if(!l||!eR||l===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==l)t=this.activeLink=new eD(l,this),l.deps?(t.prevDep=l.depsTail,l.depsTail.nextDep=t,l.depsTail=t):l.deps=l.depsTail=t,4&l.flags&&function e(t){let n=t.dep.computed;if(n&&!t.dep.subs){n.flags|=20;for(let t=n.deps;t;t=t.nextDep)e(t)}let r=t.dep.subs;r!==t&&(t.prevSub=r,r&&(r.nextSub=t)),t.dep.subs=t}(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=l.depsTail,t.nextDep=void 0,l.depsTail.nextDep=t,l.depsTail=t,l.deps===t&&(l.deps=e)}return t}trigger(e){this.version++,e$++,this.notify(e)}notify(e){ek++;try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()}finally{eT()}}}let eV=/* @__PURE__ */new WeakMap,eB=Symbol(""),eU=Symbol(""),ej=Symbol("");function eH(e,t,n){if(eR&&l){let t=eV.get(e);t||eV.set(e,t=/* @__PURE__ */new Map);let r=t.get(n);r||t.set(n,r=new eF),r.track()}}function eq(e,t,n,r,i,l){let s=eV.get(e);if(!s){e$++;return}let o=e=>{e&&e.trigger()};if(ek++,"clear"===t)s.forEach(o);else{let i=w(e),l=i&&U(n);if(i&&"length"===n){let e=Number(r);s.forEach((t,n)=>{("length"===n||n===ej||!M(n)&&n>=e)&&o(t)})}else switch(void 0!==n&&o(s.get(n)),l&&o(s.get(ej)),t){case"add":i?l&&o(s.get("length")):(o(s.get(eB)),A(e)&&o(s.get(eU)));break;case"delete":!i&&(o(s.get(eB)),A(e)&&o(s.get(eU)));break;case"set":A(e)&&o(s.get(eB))}}eT()}function eW(e){let t=tP(e);return t===e?t:(eH(t,"iterate",ej),tR(e)?t:t.map(tL))}function eK(e){return eH(e=tP(e),"iterate",ej),e}let ez={__proto__:null,[Symbol.iterator](){return eJ(this,Symbol.iterator,tL)},concat(...e){return eW(this).concat(...e.map(e=>w(e)?eW(e):e))},entries(){return eJ(this,"entries",e=>(e[1]=tL(e[1]),e))},every(e,t){return eX(this,"every",e,t,void 0,arguments)},filter(e,t){return eX(this,"filter",e,t,e=>e.map(tL),arguments)},find(e,t){return eX(this,"find",e,t,tL,arguments)},findIndex(e,t){return eX(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return eX(this,"findLast",e,t,tL,arguments)},findLastIndex(e,t){return eX(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return eX(this,"forEach",e,t,void 0,arguments)},includes(...e){return eZ(this,"includes",e)},indexOf(...e){return eZ(this,"indexOf",e)},join(e){return eW(this).join(e)},lastIndexOf(...e){return eZ(this,"lastIndexOf",e)},map(e,t){return eX(this,"map",e,t,void 0,arguments)},pop(){return eY(this,"pop")},push(...e){return eY(this,"push",e)},reduce(e,...t){return eQ(this,"reduce",e,t)},reduceRight(e,...t){return eQ(this,"reduceRight",e,t)},shift(){return eY(this,"shift")},some(e,t){return eX(this,"some",e,t,void 0,arguments)},splice(...e){return eY(this,"splice",e)},toReversed(){return eW(this).toReversed()},toSorted(e){return eW(this).toSorted(e)},toSpliced(...e){return eW(this).toSpliced(...e)},unshift(...e){return eY(this,"unshift",e)},values(){return eJ(this,"values",tL)}};function eJ(e,t,n){let r=eK(e),i=r[t]();return r===e||tR(e)||(i._next=i.next,i.next=()=>{let e=i._next();return e.value&&(e.value=n(e.value)),e}),i}let eG=Array.prototype;function eX(e,t,n,r,i,l){let s=eK(e),o=s!==e&&!tR(e),a=s[t];if(a!==eG[t]){let t=a.apply(e,l);return o?tL(t):t}let c=n;s!==e&&(o?c=function(t,r){return n.call(this,tL(t),r,e)}:n.length>2&&(c=function(t,r){return n.call(this,t,r,e)}));let u=a.call(s,c,r);return o&&i?i(u):u}function eQ(e,t,n,r){let i=eK(e),l=n;return i!==e&&(tR(e)?n.length>3&&(l=function(t,r,i){return n.call(this,t,r,i,e)}):l=function(t,r,i){return n.call(this,t,tL(r),i,e)}),i[t](l,...r)}function eZ(e,t,n){let r=tP(e);eH(r,"iterate",ej);let i=r[t](...n);return(-1===i||!1===i)&&tO(n[0])?(n[0]=tP(n[0]),r[t](...n)):i}function eY(e,t,n=[]){eP(),ek++;let r=tP(e)[t].apply(e,n);return eT(),eM(),r}let e0=/* @__PURE__ */m("__proto__,__v_isRef,__isVue"),e1=new Set(/* @__PURE__ */Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(M));function e2(e){M(e)||(e=String(e));let t=tP(this);return eH(t,"has",e),t.hasOwnProperty(e)}class e6{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){let r=this._isReadonly,i=this._isShallow;if("__v_isReactive"===t)return!r;if("__v_isReadonly"===t)return r;if("__v_isShallow"===t)return i;if("__v_raw"===t)return n===(r?i?tk:tC:i?tx:tS).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let l=w(e);if(!r){let e;if(l&&(e=ez[t]))return e;if("hasOwnProperty"===t)return e2}let s=Reflect.get(e,t,tD(e)?e:n);return(M(t)?e1.has(t):e0(t))?s:(r||eH(e,"get",t),i)?s:tD(s)?l&&U(t)?s:s.value:L(s)?r?tw(s):tT(s):s}}class e3 extends e6{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t];if(!this._isShallow){let t=tI(i);if(tR(n)||tI(n)||(i=tP(i),n=tP(n)),!w(e)&&tD(i)&&!tD(n))return!t&&(i.value=n,!0)}let l=w(e)&&U(t)?Number(t)e,tt=e=>Reflect.getPrototypeOf(e);function tn(e,t,n=!1,r=!1){let i=tP(e=e.__v_raw),l=tP(t);n||(Q(t,l)&&eH(i,"get",t),eH(i,"get",l));let{has:s}=tt(i),o=r?te:n?t$:tL;return s.call(i,t)?o(e.get(t)):s.call(i,l)?o(e.get(l)):void(e!==i&&e.get(t))}function tr(e,t=!1){let n=this.__v_raw,r=tP(n),i=tP(e);return t||(Q(e,i)&&eH(r,"has",e),eH(r,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function ti(e,t=!1){return e=e.__v_raw,t||eH(tP(e),"iterate",eB),Reflect.get(e,"size",e)}function tl(e,t=!1){t||tR(e)||tI(e)||(e=tP(e));let n=tP(this);return tt(n).has.call(n,e)||(n.add(e),eq(n,"add",e,e)),this}function ts(e,t,n=!1){n||tR(t)||tI(t)||(t=tP(t));let r=tP(this),{has:i,get:l}=tt(r),s=i.call(r,e);s||(e=tP(e),s=i.call(r,e));let o=l.call(r,e);return r.set(e,t),s?Q(t,o)&&eq(r,"set",e,t):eq(r,"add",e,t),this}function to(e){let t=tP(this),{has:n,get:r}=tt(t),i=n.call(t,e);i||(e=tP(e),i=n.call(t,e)),r&&r.call(t,e);let l=t.delete(e);return i&&eq(t,"delete",e,void 0),l}function ta(){let e=tP(this),t=0!==e.size,n=e.clear();return t&&eq(e,"clear",void 0,void 0),n}function tc(e,t){return function(n,r){let i=this,l=i.__v_raw,s=tP(l),o=t?te:e?t$:tL;return e||eH(s,"iterate",eB),l.forEach((e,t)=>n.call(r,o(e),o(t),i))}}function tu(e,t,n){return function(...r){let i=this.__v_raw,l=tP(i),s=A(l),o="entries"===e||e===Symbol.iterator&&s,a=i[e](...r),c=n?te:t?t$:tL;return t||eH(l,"iterate","keys"===e&&s?eU:eB),{next(){let{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:o?[c(e[0]),c(e[1])]:c(e),done:t}},[Symbol.iterator](){return this}}}}function td(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}let[th,tf,tp,tm]=/* @__PURE__ */function(){let e={get(e){return tn(this,e)},get size(){return ti(this)},has:tr,add:tl,set:ts,delete:to,clear:ta,forEach:tc(!1,!1)},t={get(e){return tn(this,e,!1,!0)},get size(){return ti(this)},has:tr,add(e){return tl.call(this,e,!0)},set(e,t){return ts.call(this,e,t,!0)},delete:to,clear:ta,forEach:tc(!1,!0)},n={get(e){return tn(this,e,!0)},get size(){return ti(this,!0)},has(e){return tr.call(this,e,!0)},add:td("add"),set:td("set"),delete:td("delete"),clear:td("clear"),forEach:tc(!0,!1)},r={get(e){return tn(this,e,!0,!0)},get size(){return ti(this,!0)},has(e){return tr.call(this,e,!0)},add:td("add"),set:td("set"),delete:td("delete"),clear:td("clear"),forEach:tc(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=tu(i,!1,!1),n[i]=tu(i,!0,!1),t[i]=tu(i,!1,!0),r[i]=tu(i,!0,!0)}),[e,n,t,r]}();function tg(e,t){let n=t?e?tm:tp:e?tf:th;return(t,r,i)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(N(n,r)&&r in t?n:t,r,i)}let ty={get:/* @__PURE__ */tg(!1,!1)},tv={get:/* @__PURE__ */tg(!1,!0)},tb={get:/* @__PURE__ */tg(!0,!1)},t_={get:/* @__PURE__ */tg(!0,!0)},tS=/* @__PURE__ */new WeakMap,tx=/* @__PURE__ */new WeakMap,tC=/* @__PURE__ */new WeakMap,tk=/* @__PURE__ */new WeakMap;function tT(e){return tI(e)?e:tA(e,!1,e8,ty,tS)}function tN(e){return tA(e,!1,e9,tv,tx)}function tw(e){return tA(e,!0,e5,tb,tC)}function tA(e,t,n,r,i){if(!L(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let l=i.get(e);if(l)return l;let s=e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(V(e));if(0===s)return e;let o=new Proxy(e,2===s?r:n);return i.set(e,o),o}function tE(e){return tI(e)?tE(e.__v_raw):!!(e&&e.__v_isReactive)}function tI(e){return!!(e&&e.__v_isReadonly)}function tR(e){return!!(e&&e.__v_isShallow)}function tO(e){return!!e&&!!e.__v_raw}function tP(e){let t=e&&e.__v_raw;return t?tP(t):e}function tM(e){return!N(e,"__v_skip")&&Object.isExtensible(e)&&Y(e,"__v_skip",!0),e}let tL=e=>L(e)?tT(e):e,t$=e=>L(e)?tw(e):e;function tD(e){return!!e&&!0===e.__v_isRef}function tF(e){return tB(e,!1)}function tV(e){return tB(e,!0)}function tB(e,t){return tD(e)?e:new tU(e,t)}class tU{constructor(e,t){this.dep=new eF,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:tP(e),this._value=t?e:tL(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||tR(e)||tI(e);Q(e=n?e:tP(e),t)&&(this._rawValue=e,this._value=n?e:tL(e),this.dep.trigger())}}function tj(e){return tD(e)?e.value:e}let tH={get:(e,t,n)=>"__v_raw"===t?e:tj(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return tD(i)&&!tD(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function tq(e){return tE(e)?e:new Proxy(e,tH)}class tW{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new eF,{get:n,set:r}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}}function tK(e){return new tW(e)}class tz{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0}get value(){let e=this._object[this._key];return this._value=void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){var e,t,n;return e=tP(this._object),t=this._key,null==(n=eV.get(e))?void 0:n.get(t)}}class tJ{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function tG(e,t,n){let r=e[t];return tD(r)?r:new tz(e,t,n)}class tX{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new eF(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=e$-1,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){this.flags|=16,l!==this&&this.dep.notify()}get value(){let e=this.dep.track();return eE(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}let tQ={},tZ=/* @__PURE__ */new WeakMap;function tY(e,t=!1,n=f){if(n){let t=tZ.get(n);t||tZ.set(n,t=[]),t.push(e)}}function t0(e,t=1/0,n){if(t<=0||!L(e)||e.__v_skip||(n=n||/* @__PURE__ */new Set).has(e))return e;if(n.add(e),t--,tD(e))t0(e.value,t,n);else if(w(e))for(let r=0;r{t0(e,t,n)});else if(B(e)){for(let r in e)t0(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&t0(e[r],t,n)}return e}function t1(e,t,n,r){try{return r?e(...r):e()}catch(e){t6(e,t,n)}}function t2(e,t,n,r){if(O(e)){let i=t1(e,t,n,r);return i&&$(i)&&i.catch(e=>{t6(e,t,n)}),i}if(w(e)){let i=[];for(let l=0;l=nc(n)?t8.push(e):t8.splice(function(e){let t=t3?t5+1:0,n=t8.length;for(;t>>1,i=t8[r],l=nc(i);lnc(e)-nc(t));if(t9.length=0,t7){t7.push(...e);return}for(ne=0,t7=e;nenull==e.id?2&e.flags?-1:1/0:e.id,nu=null,nd=null;function nh(e){let t=nu;return nu=e,nd=e&&e.type.__scopeId||null,t}function nf(e,t=nu,n){if(!t||e._n)return e;let r=(...n)=>{let i;r._d&&iN(-1);let l=nh(t);try{i=e(...n)}finally{nh(l),r._d&&iN(1)}return i};return r._n=!0,r._c=!0,r._d=!0,r}function np(e,t,n,r){let i=e.dirs,l=t&&t.dirs;for(let s=0;se.__isTeleport,ny=e=>e&&(e.disabled||""===e.disabled),nv=e=>e&&(e.defer||""===e.defer),nb=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,n_=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,nS=(e,t)=>{let n=e&&e.to;return P(n)?t?t(n):null:n};function nx(e,t,n,{o:{insert:r},m:i},l=2){0===l&&r(e.targetAnchor,t,n);let{el:s,anchor:o,shapeFlag:a,children:c,props:u}=e,d=2===l;if(d&&r(s,t,n),(!d||ny(u))&&16&a)for(let e=0;e{e.isMounted=!0}),rr(()=>{e.isUnmounting=!0}),e}let nA=[Function,Array],nE={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:nA,onEnter:nA,onAfterEnter:nA,onEnterCancelled:nA,onBeforeLeave:nA,onLeave:nA,onAfterLeave:nA,onLeaveCancelled:nA,onBeforeAppear:nA,onAppear:nA,onAfterAppear:nA,onAppearCancelled:nA},nI=e=>{let t=e.subTree;return t.component?nI(t.component):t};function nR(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==ib){t=n;break}}return t}let nO={name:"BaseTransition",props:nE,setup(e,{slots:t}){let n=iK(),r=nw();return()=>{let i=t.default&&nF(t.default(),!0);if(!i||!i.length)return;let l=nR(i),s=tP(e),{mode:o}=s;if(r.isLeaving)return nL(l);let a=n$(l);if(!a)return nL(l);let c=nM(a,s,r,n,e=>c=e);a.type!==ib&&nD(a,c);let u=n.subTree,d=u&&n$(u);if(d&&d.type!==ib&&!iI(a,d)&&nI(n).type!==ib){let e=nM(d,s,r,n);if(nD(d,e),"out-in"===o&&a.type!==ib)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,8&n.job.flags||n.update(),delete e.afterLeave},nL(l);"in-out"===o&&a.type!==ib&&(e.delayLeave=(e,t,n)=>{nP(r,d)[String(d.key)]=d,e[nT]=()=>{t(),e[nT]=void 0,delete c.delayedLeave},c.delayedLeave=n})}return l}}};function nP(e,t){let{leavingVNodes:n}=e,r=n.get(t.type);return r||(r=/* @__PURE__ */Object.create(null),n.set(t.type,r)),r}function nM(e,t,n,r,i){let{appear:l,mode:s,persisted:o=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:h,onLeave:f,onAfterLeave:p,onLeaveCancelled:m,onBeforeAppear:g,onAppear:y,onAfterAppear:b,onAppearCancelled:_}=t,S=String(e.key),x=nP(n,e),C=(e,t)=>{e&&t2(e,r,9,t)},k=(e,t)=>{let n=t[1];C(e,t),w(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},T={mode:s,persisted:o,beforeEnter(t){let r=a;if(!n.isMounted){if(!l)return;r=g||a}t[nT]&&t[nT](!0);let i=x[S];i&&iI(e,i)&&i.el[nT]&&i.el[nT](),C(r,[t])},enter(e){let t=c,r=u,i=d;if(!n.isMounted){if(!l)return;t=y||c,r=b||u,i=_||d}let s=!1,o=e[nN]=t=>{s||(s=!0,t?C(i,[e]):C(r,[e]),T.delayedLeave&&T.delayedLeave(),e[nN]=void 0)};t?k(t,[e,o]):o()},leave(t,r){let i=String(e.key);if(t[nN]&&t[nN](!0),n.isUnmounting)return r();C(h,[t]);let l=!1,s=t[nT]=n=>{l||(l=!0,r(),n?C(m,[t]):C(p,[t]),t[nT]=void 0,x[i]!==e||delete x[i])};x[i]=e,f?k(f,[t,s]):s()},clone(e){let l=nM(e,t,n,r,i);return i&&i(l),l}};return T}function nL(e){if(n0(e))return(e=i$(e)).children=null,e}function n$(e){if(!n0(e))return ng(e.type)&&e.children?nR(e.children):e;let{shapeFlag:t,children:n}=e;if(n){if(16&t)return n[0];if(32&t&&O(n.default))return n.default()}}function nD(e,t){6&e.shapeFlag&&e.component?(e.transition=t,nD(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function nF(e,t=!1,n){let r=[],i=0;for(let l=0;l1)for(let e=0;enU(e,t&&(w(t)?t[l]:t),n,r,i));return}if(nZ(r)&&!i)return;let l=4&r.shapeFlag?i2(r.component):r.el,s=i?null:l,{i:o,r:a}=e,c=t&&t.r,u=o.refs===g?o.refs={}:o.refs,d=o.setupState,h=tP(d),f=d===g?()=>!1:e=>N(h,e);if(null!=c&&c!==a&&(P(c)?(u[c]=null,f(c)&&(d[c]=null)):tD(c)&&(c.value=null)),O(a))t1(a,o,12,[s,u]);else{let t=P(a),r=tD(a);if(t||r){let o=()=>{if(e.f){let n=t?f(a)?d[a]:u[a]:a.value;i?w(n)&&k(n,l):w(n)?n.includes(l)||n.push(l):t?(u[a]=[l],f(a)&&(d[a]=u[a])):(a.value=[l],e.k&&(u[e.k]=a.value))}else t?(u[a]=s,f(a)&&(d[a]=s)):r&&(a.value=s,e.k&&(u[e.k]=s))};s?(o.id=-1,rX(o,n)):o()}}}let nj=!1,nH=()=>{nj||(console.error("Hydration completed but contains mismatches."),nj=!0)},nq=e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName,nW=e=>e.namespaceURI.includes("MathML"),nK=e=>{if(1===e.nodeType){if(nq(e))return"svg";if(nW(e))return"mathml"}},nz=e=>8===e.nodeType;function nJ(e){let{mt:t,p:n,o:{patchProp:r,createText:i,nextSibling:l,parentNode:s,remove:o,insert:a,createComment:c}}=e,u=(n,r,o,c,b,_=!1)=>{_=_||!!r.dynamicChildren;let S=nz(n)&&"["===n.data,x=()=>p(n,r,o,c,b,S),{type:C,ref:k,shapeFlag:T,patchFlag:N}=r,w=n.nodeType;r.el=n,-2===N&&(_=!1,r.dynamicChildren=null);let A=null;switch(C){case iv:3!==w?""===r.children?(a(r.el=i(""),s(n),n),A=n):A=x():(n.data!==r.children&&(nH(),n.data=r.children),A=l(n));break;case ib:y(n)?(A=l(n),g(r.el=n.content.firstChild,n,o)):A=8!==w||S?x():l(n);break;case i_:if(S&&(w=(n=l(n)).nodeType),1===w||3===w){A=n;let e=!r.children.length;for(let t=0;t{s=s||!!t.dynamicChildren;let{type:a,props:c,patchFlag:u,shapeFlag:d,dirs:f,transition:p}=t,m="input"===a||"option"===a;if(m||-1!==u){let a;f&&np(t,null,n,"created");let b=!1;if(y(e)){b=r1(i,p)&&n&&n.vnode.props&&n.vnode.props.appear;let r=e.content.firstChild;b&&p.beforeEnter(r),g(r,e,n),t.el=e=r}if(16&d&&!(c&&(c.innerHTML||c.textContent))){let r=h(e.firstChild,t,e,n,i,l,s);for(;r;){nQ(e,1)||nH();let t=r;r=r.nextSibling,o(t)}}else if(8&d){let n=t.children;"\n"===n[0]&&("PRE"===e.tagName||"TEXTAREA"===e.tagName)&&(n=n.slice(1)),e.textContent!==n&&(nQ(e,0)||nH(),e.textContent=t.children)}if(c){if(m||!s||48&u){let t=e.tagName.includes("-");for(let i in c)(m&&(i.endsWith("value")||"indeterminate"===i)||S(i)&&!j(i)||"."===i[0]||t)&&r(e,i,null,c[i],void 0,n)}else if(c.onClick)r(e,"onClick",null,c.onClick,void 0,n);else if(4&u&&tE(c.style))for(let e in c.style)c.style[e]}(a=c&&c.onVnodeBeforeMount)&&ij(a,n,t),f&&np(t,null,n,"beforeMount"),((a=c&&c.onVnodeMounted)||f||b)&&im(()=>{a&&ij(a,n,t),b&&p.enter(e),f&&np(t,null,n,"mounted")},i)}return e.nextSibling},h=(e,t,r,s,o,c,d)=>{d=d||!!t.dynamicChildren;let h=t.children,f=h.length;for(let t=0;t{let{slotScopeIds:u}=t;u&&(i=i?i.concat(u):u);let d=s(e),f=h(l(e),t,d,n,r,i,o);return f&&nz(f)&&"]"===f.data?l(t.anchor=f):(nH(),a(t.anchor=c("]"),d,f),f)},p=(e,t,r,i,a,c)=>{if(nQ(e.parentElement,1)||nH(),t.el=null,c){let t=m(e);for(;;){let n=l(e);if(n&&n!==t)o(n);else break}}let u=l(e),d=s(e);return o(e),n(null,t,d,u,r,i,nK(d),a),u},m=(e,t="[",n="]")=>{let r=0;for(;e;)if((e=l(e))&&nz(e)&&(e.data===t&&r++,e.data===n)){if(0===r)return l(e);r--}return e},g=(e,t,n)=>{let r=t.parentNode;r&&r.replaceChild(e,t);let i=n;for(;i;)i.vnode.el===t&&(i.vnode.el=i.subTree.el=e),i=i.parent},y=e=>1===e.nodeType&&"TEMPLATE"===e.tagName;return[(e,t)=>{if(!t.hasChildNodes()){n(null,e,t),na(),t._vnode=e;return}u(t.firstChild,e,null,null,null),na(),t._vnode=e},u]}let nG="data-allow-mismatch",nX={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function nQ(e,t){if(0===t||1===t)for(;e&&!e.hasAttribute(nG);)e=e.parentElement;let n=e&&e.getAttribute(nG);if(null==n)return!1;if(""===n)return!0;{let e=n.split(",");return!!(0===t&&e.includes("children"))||n.split(",").includes(nX[t])}}let nZ=e=>!!e.type.__asyncLoader;function nY(e,t){let{ref:n,props:r,children:i,ce:l}=t.vnode,s=iM(e,r,i);return s.ref=n,s.ce=l,delete t.vnode.ce,s}let n0=e=>e.type.__isKeepAlive;function n1(e,t){return w(e)?e.some(e=>n1(e,t)):P(e)?e.split(",").includes(t):!!R(e)&&(e.lastIndex=0,e.test(t))}function n2(e,t){n3(e,"a",t)}function n6(e,t){n3(e,"da",t)}function n3(e,t,n=iW){let r=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(n5(t,r,n),n){let e=n.parent;for(;e&&e.parent;)n0(e.parent.vnode)&&function(e,t,n,r){let i=n5(t,e,r,!0);ri(()=>{k(r[t],i)},n)}(r,t,n,e),e=e.parent}}function n4(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function n8(e){return 128&e.shapeFlag?e.ssContent:e}function n5(e,t,n=iW,r=!1){if(n){let i=n[e]||(n[e]=[]),l=t.__weh||(t.__weh=(...r)=>{eP();let i=iz(n),l=t2(t,n,e,r);return i(),eM(),l});return r?i.unshift(l):i.push(l),l}}let n9=e=>(t,n=iW)=>{iX&&"sp"!==e||n5(e,(...e)=>t(...e),n)},n7=n9("bm"),re=n9("m"),rt=n9("bu"),rn=n9("u"),rr=n9("bum"),ri=n9("um"),rl=n9("sp"),rs=n9("rtg"),ro=n9("rtc");function ra(e,t=iW){n5("ec",e,t)}let rc="components",ru=Symbol.for("v-ndc");function rd(e,t,n=!0,r=!1){let i=nu||iW;if(i){let n=i.type;if(e===rc){let e=i6(n,!1);if(e&&(e===t||e===K(t)||e===G(K(t))))return n}let l=rh(i[e]||n[e],t)||rh(i.appContext[e],t);return!l&&r?n:l}}function rh(e,t){return e&&(e[t]||e[K(t)]||e[G(K(t))])}let rf=e=>e?iG(e)?i2(e):rf(e.parent):null,rp=/* @__PURE__ */C(/* @__PURE__ */Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>rf(e.parent),$root:e=>rf(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>rx(e),$forceUpdate:e=>e.f||(e.f=()=>{ni(e.update)}),$nextTick:e=>e.n||(e.n=nr.bind(e.proxy)),$watch:e=>r9.bind(e)}),rm=(e,t)=>e!==g&&!e.__isScriptSetup&&N(e,t),rg={get({_:e},t){let n,r,i;if("__v_skip"===t)return!0;let{ctx:l,setupState:s,data:o,props:a,accessCache:c,type:u,appContext:d}=e;if("$"!==t[0]){let r=c[t];if(void 0!==r)switch(r){case 1:return s[t];case 2:return o[t];case 4:return l[t];case 3:return a[t]}else{if(rm(s,t))return c[t]=1,s[t];if(o!==g&&N(o,t))return c[t]=2,o[t];if((n=e.propsOptions[0])&&N(n,t))return c[t]=3,a[t];if(l!==g&&N(l,t))return c[t]=4,l[t];r_&&(c[t]=0)}}let h=rp[t];return h?("$attrs"===t&&eH(e.attrs,"get",""),h(e)):(r=u.__cssModules)&&(r=r[t])?r:l!==g&&N(l,t)?(c[t]=4,l[t]):N(i=d.config.globalProperties,t)?i[t]:void 0},set({_:e},t,n){let{data:r,setupState:i,ctx:l}=e;return rm(i,t)?(i[t]=n,!0):r!==g&&N(r,t)?(r[t]=n,!0):!N(e.props,t)&&!("$"===t[0]&&t.slice(1) in e)&&(l[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:l}},s){let o;return!!n[s]||e!==g&&N(e,s)||rm(t,s)||(o=l[0])&&N(o,s)||N(r,s)||N(rp,s)||N(i.config.globalProperties,s)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:N(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},ry=/* @__PURE__ */C({},rg,{get(e,t){if(t!==Symbol.unscopables)return rg.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!er(t)});function rv(){let e=iK();return e.setupContext||(e.setupContext=i1(e))}function rb(e){return w(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}let r_=!0;function rS(e,t,n){t2(w(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function rx(e){let t;let n=e.type,{mixins:r,extends:i}=n,{mixins:l,optionsCache:s,config:{optionMergeStrategies:o}}=e.appContext,a=s.get(n);return a?t=a:l.length||r||i?(t={},l.length&&l.forEach(e=>rC(t,e,o,!0)),rC(t,n,o)):t=n,L(n)&&s.set(n,t),t}function rC(e,t,n,r=!1){let{mixins:i,extends:l}=t;for(let s in l&&rC(e,l,n,!0),i&&i.forEach(t=>rC(e,t,n,!0)),t)if(r&&"expose"===s);else{let r=rk[s]||n&&n[s];e[s]=r?r(e[s],t[s]):t[s]}return e}let rk={data:rT,props:rE,emits:rE,methods:rA,computed:rA,beforeCreate:rw,created:rw,beforeMount:rw,mounted:rw,beforeUpdate:rw,updated:rw,beforeDestroy:rw,beforeUnmount:rw,destroyed:rw,unmounted:rw,activated:rw,deactivated:rw,errorCaptured:rw,serverPrefetch:rw,components:rA,directives:rA,watch:function(e,t){if(!e)return t;if(!t)return e;let n=C(/* @__PURE__ */Object.create(null),e);for(let r in t)n[r]=rw(e[r],t[r]);return n},provide:rT,inject:function(e,t){return rA(rN(e),rN(t))}};function rT(e,t){return t?e?function(){return C(O(e)?e.call(this,this):e,O(t)?t.call(this,this):t)}:t:e}function rN(e){if(w(e)){let t={};for(let n=0;n1)return n&&O(t)?t.call(r&&r.proxy):t}}let rL={},r$=()=>Object.create(rL),rD=e=>Object.getPrototypeOf(e)===rL;function rF(e,t,n,r){let i;let[l,s]=e.propsOptions,o=!1;if(t)for(let a in t){let c;if(j(a))continue;let u=t[a];l&&N(l,c=K(a))?s&&s.includes(c)?(i||(i={}))[c]=u:n[c]=u:ir(e.emitsOptions,a)||a in r&&u===r[a]||(r[a]=u,o=!0)}if(s){let t=tP(n),r=i||g;for(let i=0;i"_"===e[0]||"$stable"===e,rH=e=>w(e)?e.map(iF):[iF(e)],rq=(e,t,n)=>{if(t._n)return t;let r=nf((...e)=>rH(t(...e)),n);return r._c=!1,r},rW=(e,t,n)=>{let r=e._ctx;for(let n in e){if(rj(n))continue;let i=e[n];if(O(i))t[n]=rq(n,i,r);else if(null!=i){let e=rH(i);t[n]=()=>e}}},rK=(e,t)=>{let n=rH(t);e.slots.default=()=>n},rz=(e,t,n)=>{for(let r in t)(n||"_"!==r)&&(e[r]=t[r])},rJ=(e,t,n)=>{let r=e.slots=r$();if(32&e.vnode.shapeFlag){let e=t._;e?(rz(r,t,n),n&&Y(r,"_",e,!0)):rW(t,r)}else t&&rK(e,t)},rG=(e,t,n)=>{let{vnode:r,slots:i}=e,l=!0,s=g;if(32&r.shapeFlag){let e=t._;e?n&&1===e?l=!1:rz(i,t,n):(l=!t.$stable,rW(t,i)),s=t}else t&&(rK(e,t),s={default:1});if(l)for(let e in i)rj(e)||null!=s[e]||delete i[e]},rX=im;function rQ(e){return rZ(e,nJ)}function rZ(e,t){var n;let r,i;en().__VUE__=!0;let{insert:l,remove:s,patchProp:o,createElement:c,createText:u,createComment:d,setText:h,setElementText:f,parentNode:p,nextSibling:m,setScopeId:_=b,insertStaticContent:S}=e,x=(e,t,n,r=null,i=null,l=null,s,o=null,a=!!t.dynamicChildren)=>{if(e===t)return;e&&!iI(e,t)&&(r=eo(e),et(e,i,l,!0),e=null),-2===t.patchFlag&&(a=!1,t.dynamicChildren=null);let{type:c,ref:u,shapeFlag:d}=t;switch(c){case iv:k(e,t,n,r);break;case ib:T(e,t,n,r);break;case i_:null==e&&A(t,n,r,s);break;case iy:U(e,t,n,r,i,l,s,o,a);break;default:1&d?R(e,t,n,r,i,l,s,o,a):6&d?H(e,t,n,r,i,l,s,o,a):64&d?c.process(e,t,n,r,i,l,s,o,a,eu):128&d&&c.process(e,t,n,r,i,l,s,o,a,eu)}null!=u&&i&&nU(u,e&&e.ref,l,t||e,!t)},k=(e,t,n,r)=>{if(null==e)l(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&h(n,t.children)}},T=(e,t,n,r)=>{null==e?l(t.el=d(t.children||""),n,r):t.el=e.el},A=(e,t,n,r)=>{[e.el,e.anchor]=S(e.children,t,n,r,e.el,e.anchor)},E=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=m(e),l(e,n,r),e=i;l(t,n,r)},I=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=m(e),s(e),e=n;s(t)},R=(e,t,n,r,i,l,s,o,a)=>{"svg"===t.type?s="svg":"math"===t.type&&(s="mathml"),null==e?P(t,n,r,i,l,s,o,a):F(e,t,i,l,s,o,a)},P=(e,t,n,r,i,s,a,u)=>{let d,h;let{props:p,shapeFlag:m,transition:g,dirs:y}=e;if(d=e.el=c(e.type,s,p&&p.is,p),8&m?f(d,e.children):16&m&&D(e.children,d,null,r,i,rY(e,s),a,u),y&&np(e,null,r,"created"),M(d,e,e.scopeId,a,r),p){for(let e in p)"value"===e||j(e)||o(d,e,null,p[e],s,r);"value"in p&&o(d,"value",null,p.value,s),(h=p.onVnodeBeforeMount)&&ij(h,r,e)}y&&np(e,null,r,"beforeMount");let b=r1(i,g);b&&g.beforeEnter(d),l(d,t,n),((h=p&&p.onVnodeMounted)||b||y)&&rX(()=>{h&&ij(h,r,e),b&&g.enter(d),y&&np(e,null,r,"mounted")},i)},M=(e,t,n,r,i)=>{if(n&&_(e,n),r)for(let t=0;t{for(let c=a;c{let a;let c=t.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:h}=t;u|=16&e.patchFlag;let p=e.props||g,m=t.props||g;if(n&&r0(n,!1),(a=m.onVnodeBeforeUpdate)&&ij(a,n,t,e),h&&np(t,e,n,"beforeUpdate"),n&&r0(n,!0),(p.innerHTML&&null==m.innerHTML||p.textContent&&null==m.textContent)&&f(c,""),d?V(e.dynamicChildren,d,c,n,r,rY(t,i),l):s||X(e,t,c,null,n,r,rY(t,i),l,!1),u>0){if(16&u)B(c,p,m,n,i);else if(2&u&&p.class!==m.class&&o(c,"class",null,m.class,i),4&u&&o(c,"style",p.style,m.style,i),8&u){let e=t.dynamicProps;for(let t=0;t{a&&ij(a,n,t,e),h&&np(t,e,n,"updated")},r)},V=(e,t,n,r,i,l,s)=>{for(let o=0;o{if(t!==n){if(t!==g)for(let l in t)j(l)||l in n||o(e,l,t[l],null,i,r);for(let l in n){if(j(l))continue;let s=n[l],a=t[l];s!==a&&"value"!==l&&o(e,l,a,s,i,r)}"value"in n&&o(e,"value",t.value,n.value,i)}},U=(e,t,n,r,i,s,o,a,c)=>{let d=t.el=e?e.el:u(""),h=t.anchor=e?e.anchor:u(""),{patchFlag:f,dynamicChildren:p,slotScopeIds:m}=t;m&&(a=a?a.concat(m):m),null==e?(l(d,n,r),l(h,n,r),D(t.children||[],n,h,i,s,o,a,c)):f>0&&64&f&&p&&e.dynamicChildren?(V(e.dynamicChildren,p,n,i,s,o,a),(null!=t.key||i&&t===i.subTree)&&r2(e,t,!0)):X(e,t,n,h,i,s,o,a,c)},H=(e,t,n,r,i,l,s,o,a)=>{t.slotScopeIds=o,null==e?512&t.shapeFlag?i.ctx.activate(t,n,r,s,a):q(t,n,r,i,l,s,a):W(e,t,a)},q=(e,t,n,r,i,l,s)=>{let o=e.component=function(e,t,n){let r=e.type,i=(t?t.appContext:e.appContext)||iH,l={uid:iq++,vnode:e,type:r,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new eS(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:function e(t,n,r=!1){let i=r?rB:n.propsCache,l=i.get(t);if(l)return l;let s=t.props,o={},a=[],c=!1;if(!O(t)){let i=t=>{c=!0;let[r,i]=e(t,n,!0);C(o,r),i&&a.push(...i)};!r&&n.mixins.length&&n.mixins.forEach(i),t.extends&&i(t.extends),t.mixins&&t.mixins.forEach(i)}if(!s&&!c)return L(t)&&i.set(t,y),y;if(w(s))for(let e=0;e{let r=e(t,n,!0);r&&(a=!0,C(o,r))};!r&&n.mixins.length&&n.mixins.forEach(i),t.extends&&i(t.extends),t.mixins&&t.mixins.forEach(i)}return s||a?(w(s)?s.forEach(e=>o[e]=null):C(o,s),L(t)&&i.set(t,o),o):(L(t)&&i.set(t,null),null)}(r,i),emit:null,emitted:null,propsDefaults:g,inheritAttrs:r.inheritAttrs,ctx:g,data:g,props:g,attrs:g,slots:g,refs:g,setupState:g,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return l.ctx={_:l},l.root=t?t.root:l,l.emit=it.bind(null,l),e.ce&&e.ce(l),l}(e,r,i);n0(e)&&(o.ctx.renderer=eu),function(e,t=!1,n=!1){t&&a(t);let{props:r,children:i}=e.vnode,l=iG(e);(function(e,t,n,r=!1){let i={},l=r$();for(let n in e.propsDefaults=/* @__PURE__ */Object.create(null),rF(e,t,i,l),e.propsOptions[0])n in i||(i[n]=void 0);n?e.props=r?i:tN(i):e.type.props?e.props=i:e.props=l,e.attrs=l})(e,r,l,t),rJ(e,i,n),l&&function(e,t){let n=e.type;e.accessCache=/* @__PURE__ */Object.create(null),e.proxy=new Proxy(e.ctx,rg);let{setup:r}=n;if(r){let n=e.setupContext=r.length>1?i1(e):null,i=iz(e);eP();let l=t1(r,e,0,[e.props,n]);if(eM(),i(),$(l)){if(nZ(e)||nB(e),l.then(iJ,iJ),t)return l.then(n=>{iQ(e,n,t)}).catch(t=>{t6(t,e,0)});e.asyncDep=l}else iQ(e,l,t)}else iY(e,t)}(e,t),t&&a(!1)}(o,!1,s),o.asyncDep?(i&&i.registerDep(o,z,s),e.el||T(null,o.subTree=iM(ib),t,n)):z(o,e,t,n,i,l,s)},W=(e,t,n)=>{let r=t.component=e.component;if(function(e,t,n){let{props:r,children:i,component:l}=e,{props:s,children:o,patchFlag:a}=t,c=l.emitsOptions;if(t.dirs||t.transition)return!0;if(!n||!(a>=0))return(!!i||!!o)&&(!o||!o.$stable)||r!==s&&(r?!s||io(r,s,c):!!s);if(1024&a)return!0;if(16&a)return r?io(r,s,c):!!s;if(8&a){let e=t.dynamicProps;for(let t=0;t{let a=()=>{if(e.isMounted){let t,{next:n,bu:r,u:i,parent:c,vnode:u}=e;{let t=function e(t){let n=t.subTree.component;if(n)return n.asyncDep&&!n.asyncResolved?n:e(n)}(e);if(t){n&&(n.el=u.el,G(e,n,o)),t.asyncDep.then(()=>{e.isUnmounted||a()});return}}let d=n;r0(e,!1),n?(n.el=u.el,G(e,n,o)):n=u,r&&Z(r),(t=n.props&&n.props.onVnodeBeforeUpdate)&&ij(t,c,n,u),r0(e,!0);let h=ii(e),f=e.subTree;e.subTree=h,x(f,h,p(f.el),eo(f),e,l,s),n.el=h.el,null===d&&ia(e,h.el),i&&rX(i,l),(t=n.props&&n.props.onVnodeUpdated)&&rX(()=>ij(t,c,n,u),l)}else{let o;let{el:a,props:c}=t,{bm:u,m:d,parent:h,root:f,type:p}=e,m=nZ(t);if(r0(e,!1),u&&Z(u),!m&&(o=c&&c.onVnodeBeforeMount)&&ij(o,h,t),r0(e,!0),a&&i){let t=()=>{e.subTree=ii(e),i(a,e.subTree,e,l,null)};m&&p.__asyncHydrate?p.__asyncHydrate(a,e,t):t()}else{f.ce&&f.ce._injectChildStyle(p);let i=e.subTree=ii(e);x(null,i,n,r,e,l,s),t.el=i.el}if(d&&rX(d,l),!m&&(o=c&&c.onVnodeMounted)){let e=t;rX(()=>ij(o,h,e),l)}(256&t.shapeFlag||h&&nZ(h.vnode)&&256&h.vnode.shapeFlag)&&e.a&&rX(e.a,l),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new eC(a);e.scope.off();let u=e.update=c.run.bind(c),d=e.job=c.runIfDirty.bind(c);d.i=e,d.id=e.uid,c.scheduler=()=>ni(d),r0(e,!0),u()},G=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,r){let{props:i,attrs:l,vnode:{patchFlag:s}}=e,o=tP(i),[a]=e.propsOptions,c=!1;if((r||s>0)&&!(16&s)){if(8&s){let n=e.vnode.dynamicProps;for(let r=0;r{let c=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:h,shapeFlag:p}=t;if(h>0){if(128&h){Y(c,d,n,r,i,l,s,o,a);return}if(256&h){Q(c,d,n,r,i,l,s,o,a);return}}8&p?(16&u&&es(c,i,l),d!==c&&f(n,d)):16&u?16&p?Y(c,d,n,r,i,l,s,o,a):es(c,i,l,!0):(8&u&&f(n,""),16&p&&D(d,n,r,i,l,s,o,a))},Q=(e,t,n,r,i,l,s,o,a)=>{let c;e=e||y,t=t||y;let u=e.length,d=t.length,h=Math.min(u,d);for(c=0;cd?es(e,i,l,!0,!1,h):D(t,n,r,i,l,s,o,a,h)},Y=(e,t,n,r,i,l,s,o,a)=>{let c=0,u=t.length,d=e.length-1,h=u-1;for(;c<=d&&c<=h;){let r=e[c],u=t[c]=a?iV(t[c]):iF(t[c]);if(iI(r,u))x(r,u,n,null,i,l,s,o,a);else break;c++}for(;c<=d&&c<=h;){let r=e[d],c=t[h]=a?iV(t[h]):iF(t[h]);if(iI(r,c))x(r,c,n,null,i,l,s,o,a);else break;d--,h--}if(c>d){if(c<=h){let e=h+1,d=eh)for(;c<=d;)et(e[c],i,l,!0),c++;else{let f;let p=c,m=c,g=/* @__PURE__ */new Map;for(c=m;c<=h;c++){let e=t[c]=a?iV(t[c]):iF(t[c]);null!=e.key&&g.set(e.key,c)}let b=0,_=h-m+1,S=!1,C=0,k=Array(_);for(c=0;c<_;c++)k[c]=0;for(c=p;c<=d;c++){let r;let u=e[c];if(b>=_){et(u,i,l,!0);continue}if(null!=u.key)r=g.get(u.key);else for(f=m;f<=h;f++)if(0===k[f-m]&&iI(u,t[f])){r=f;break}void 0===r?et(u,i,l,!0):(k[r-m]=c+1,r>=C?C=r:S=!0,x(u,t[r],n,null,i,l,s,o,a),b++)}let T=S?function(e){let t,n,r,i,l;let s=e.slice(),o=[0],a=e.length;for(t=0;t>1]]0&&(s[t]=o[r-1]),o[r]=t)}}for(r=o.length,i=o[r-1];r-- >0;)o[r]=i,i=s[i];return o}(k):y;for(f=T.length-1,c=_-1;c>=0;c--){let e=m+c,d=t[e],h=e+1{let{el:s,type:o,transition:a,children:c,shapeFlag:u}=e;if(6&u){ee(e.component.subTree,t,n,r);return}if(128&u){e.suspense.move(t,n,r);return}if(64&u){o.move(e,t,n,eu);return}if(o===iy){l(s,t,n);for(let e=0;ea.enter(s),i);else{let{leave:e,delayLeave:r,afterLeave:i}=a,o=()=>l(s,t,n),c=()=>{e(s,()=>{o(),i&&i()})};r?r(s,o,c):c()}}else l(s,t,n)},et=(e,t,n,r=!1,i=!1)=>{let l;let{type:s,props:o,ref:a,children:c,dynamicChildren:u,shapeFlag:d,patchFlag:h,dirs:f,cacheIndex:p}=e;if(-2===h&&(i=!1),null!=a&&nU(a,null,n,e,!0),null!=p&&(t.renderCache[p]=void 0),256&d){t.ctx.deactivate(e);return}let m=1&d&&f,g=!nZ(e);if(g&&(l=o&&o.onVnodeBeforeUnmount)&&ij(l,t,e),6&d)el(e.component,n,r);else{if(128&d){e.suspense.unmount(n,r);return}m&&np(e,null,t,"beforeUnmount"),64&d?e.type.remove(e,t,n,eu,r):u&&!u.hasOnce&&(s!==iy||h>0&&64&h)?es(u,t,n,!1,!0):(s===iy&&384&h||!i&&16&d)&&es(c,t,n),r&&er(e)}(g&&(l=o&&o.onVnodeUnmounted)||m)&&rX(()=>{l&&ij(l,t,e),m&&np(e,null,t,"unmounted")},n)},er=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===iy){ei(n,r);return}if(t===i_){I(e);return}let l=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(1&e.shapeFlag&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,s=()=>t(n,l);r?r(e.el,l,s):s()}else l()},ei=(e,t)=>{let n;for(;e!==t;)n=m(e),s(e),e=n;s(t)},el=(e,t,n)=>{let{bum:r,scope:i,job:l,subTree:s,um:o,m:a,a:c}=e;r6(a),r6(c),r&&Z(r),i.stop(),l&&(l.flags|=8,et(s,e,t,n)),o&&rX(o,t),rX(()=>{e.isUnmounted=!0},t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},es=(e,t,n,r=!1,i=!1,l=0)=>{for(let s=l;s{if(6&e.shapeFlag)return eo(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();let t=m(e.anchor||e.el),n=t&&t[nm];return n?m(n):t},ea=!1,ec=(e,t,n)=>{null==e?t._vnode&&et(t._vnode,null,null,!0):x(t._vnode||null,e,t,null,null,null,n),t._vnode=e,ea||(ea=!0,no(),na(),ea=!1)},eu={p:x,um:et,m:ee,r:er,mt:q,mc:D,pc:X,pbc:V,n:eo,o:e};return t&&([r,i]=t(eu)),{render:ec,hydrate:r,createApp:(n=r,function(e,t=null){O(e)||(e=C({},e)),null==t||L(t)||(t=null);let r=rI(),i=/* @__PURE__ */new WeakSet,l=[],s=!1,o=r.app={_uid:rR++,_component:e,_props:t,_container:null,_context:r,_instance:null,version:i5,get config(){return r.config},set config(v){},use:(e,...t)=>(i.has(e)||(e&&O(e.install)?(i.add(e),e.install(o,...t)):O(e)&&(i.add(e),e(o,...t))),o),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),o),component:(e,t)=>t?(r.components[e]=t,o):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,o):r.directives[e],mount(i,l,a){if(!s){let c=o._ceVNode||iM(e,t);return c.appContext=r,!0===a?a="svg":!1===a&&(a=void 0),l&&n?n(c,i):ec(c,i,a),s=!0,o._container=i,i.__vue_app__=o,i2(c.component)}},onUnmount(e){l.push(e)},unmount(){s&&(t2(l,o._instance,16),ec(null,o._container),delete o._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,o),runWithContext(e){let t=rO;rO=o;try{return e()}finally{rO=t}}};return o})}}function rY({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function r0({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function r1(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function r2(e,t,n=!1){let r=e.children,i=t.children;if(w(r)&&w(i))for(let e=0;et2(e,c,t,n);let u=!1;return"post"===s?a.scheduler=e=>{rX(e,c&&c.suspense)}:"sync"!==s&&(u=!0,a.scheduler=(e,t)=>{t?e():ni(e)}),a.augmentJob=e=>{t&&(e.flags|=4),u&&(e.flags|=2,c&&(e.id=c.uid,e.i=c))},function(e,t,n=g){let r,l,s,o;let{immediate:a,deep:c,once:u,scheduler:d,augmentJob:h,call:p}=n,m=e=>c?e:tR(e)||!1===c||0===c?t0(e,1):t0(e),y=!1,_=!1;if(tD(e)?(l=()=>e.value,y=tR(e)):tE(e)?(l=()=>m(e),y=!0):w(e)?(_=!0,y=e.some(e=>tE(e)||tR(e)),l=()=>e.map(e=>tD(e)?e.value:tE(e)?m(e):O(e)?p?p(e,2):e():void 0)):l=O(e)?t?p?()=>p(e,2):e:()=>{if(s){eP();try{s()}finally{eM()}}let t=f;f=r;try{return p?p(e,3,[o]):e(o)}finally{f=t}}:b,t&&c){let e=l,t=!0===c?1/0:c;l=()=>t0(e(),t)}let S=i,x=()=>{r.stop(),S&&k(S.effects,r)};if(u){if(t){let e=t;t=(...t)=>{e(...t),x()}}else{let e=l;l=()=>{e(),x()}}}let C=_?Array(e.length).fill(tQ):tQ,T=e=>{if(1&r.flags&&(r.dirty||e)){if(t){let e=r.run();if(c||y||(_?e.some((e,t)=>Q(e,C[t])):Q(e,C))){s&&s();let n=f;f=r;try{let n=[e,C===tQ?void 0:_&&C[0]===tQ?[]:C,o];p?p(t,3,n):t(...n),C=e}finally{f=n}}}else r.run()}};return h&&h(T),(r=new eC(l)).scheduler=d?()=>d(T,!1):T,o=e=>tY(e,!1,r),s=r.onStop=()=>{let e=tZ.get(r);if(e){if(p)p(e,4);else for(let t of e)t();tZ.delete(r)}},t?a?T(!0):C=r.run():d?d(T.bind(null,!0),!0):r.run(),x.pause=r.pause.bind(r),x.resume=r.resume.bind(r),x.stop=x,x}(e,t,a)}function r9(e,t,n){let r;let i=this.proxy,l=P(e)?e.includes(".")?r7(i,e):()=>i[e]:e.bind(i,i);O(t)?r=t:(r=t.handler,n=t);let s=iz(this),o=r5(l,r.bind(i),n);return s(),o}function r7(e,t){let n=t.split(".");return()=>{let t=e;for(let e=0;e"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${K(t)}Modifiers`]||e[`${J(t)}Modifiers`];function it(e,t,...n){let r;if(e.isUnmounted)return;let i=e.vnode.props||g,l=n,s=t.startsWith("update:"),o=s&&ie(i,t.slice(7));o&&(o.trim&&(l=n.map(e=>P(e)?e.trim():e)),o.number&&(l=n.map(ee)));let a=i[r=X(t)]||i[r=X(K(t))];!a&&s&&(a=i[r=X(J(t))]),a&&t2(a,e,6,l);let c=i[r+"Once"];if(c){if(e.emitted){if(e.emitted[r])return}else e.emitted={};e.emitted[r]=!0,t2(c,e,6,l)}}function ir(e,t){return!!(e&&S(t))&&(N(e,(t=t.slice(2).replace(/Once$/,""))[0].toLowerCase()+t.slice(1))||N(e,J(t))||N(e,t))}function ii(e){let t,n;let{type:r,vnode:i,proxy:l,withProxy:s,propsOptions:[o],slots:a,attrs:c,emit:u,render:d,renderCache:h,props:f,data:p,setupState:m,ctx:g,inheritAttrs:y}=e,b=nh(e);try{if(4&i.shapeFlag){let e=s||l;t=iF(d.call(e,e,h,f,m,p,g)),n=c}else t=iF(r.length>1?r(f,{attrs:c,slots:a,emit:u}):r(f,null)),n=r.props?c:il(c)}catch(n){iS.length=0,t6(n,e,1),t=iM(ib)}let _=t;if(n&&!1!==y){let e=Object.keys(n),{shapeFlag:t}=_;e.length&&7&t&&(o&&e.some(x)&&(n=is(n,o)),_=i$(_,n,!1,!0))}return i.dirs&&((_=i$(_,null,!1,!0)).dirs=_.dirs?_.dirs.concat(i.dirs):i.dirs),i.transition&&nD(_,i.transition),t=_,nh(b),t}let il=e=>{let t;for(let n in e)("class"===n||"style"===n||S(n))&&((t||(t={}))[n]=e[n]);return t},is=(e,t)=>{let n={};for(let r in e)x(r)&&r.slice(9) in t||(n[r]=e[r]);return n};function io(e,t,n){let r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;ie.__isSuspense,iu=0;function id(e,t){let n=e.props&&e.props[t];O(n)&&n()}function ih(e,t,n,r,i,l,s,o,a,c,u=!1){let d;let{p:h,m:f,um:p,n:m,o:{parentNode:g,remove:y}}=c,b=function(e){let t=e.props&&e.props.suspensible;return null!=t&&!1!==t}(e);b&&t&&t.pendingBranch&&(d=t.pendingId,t.deps++);let _=e.props?et(e.props.timeout):void 0,S=l,x={vnode:e,parent:t,parentComponent:n,namespace:s,container:r,hiddenContainer:i,deps:0,pendingId:iu++,timeout:"number"==typeof _?_:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){let{vnode:r,activeBranch:i,pendingBranch:s,pendingId:o,effects:a,parentComponent:c,container:u}=x,h=!1;x.isHydrating?x.isHydrating=!1:e||((h=i&&s.transition&&"out-in"===s.transition.mode)&&(i.transition.afterLeave=()=>{o===x.pendingId&&(f(s,u,l===S?m(i):l,0),ns(a))}),i&&(g(i.el)===u&&(l=m(i)),p(i,c,x,!0)),h||f(s,u,l,0)),ig(x,s),x.pendingBranch=null,x.isInFallback=!1;let y=x.parent,_=!1;for(;y;){if(y.pendingBranch){y.effects.push(...a),_=!0;break}y=y.parent}_||h||ns(a),x.effects=[],b&&t&&t.pendingBranch&&d===t.pendingId&&(t.deps--,0!==t.deps||n||t.resolve()),id(r,"onResolve")},fallback(e){if(!x.pendingBranch)return;let{vnode:t,activeBranch:n,parentComponent:r,container:i,namespace:l}=x;id(t,"onFallback");let s=m(n),c=()=>{x.isInFallback&&(h(null,e,i,s,r,null,l,o,a),ig(x,e))},u=e.transition&&"out-in"===e.transition.mode;u&&(n.transition.afterLeave=c),x.isInFallback=!0,p(n,r,null,!0),u||c()},move(e,t,n){x.activeBranch&&f(x.activeBranch,e,t,n),x.container=e},next:()=>x.activeBranch&&m(x.activeBranch),registerDep(e,t,n){let r=!!x.pendingBranch;r&&x.deps++;let i=e.vnode.el;e.asyncDep.catch(t=>{t6(t,e,0)}).then(l=>{if(e.isUnmounted||x.isUnmounted||x.pendingId!==e.suspenseId)return;e.asyncResolved=!0;let{vnode:o}=e;iQ(e,l,!1),i&&(o.el=i);let a=!i&&e.subTree.el;t(e,o,g(i||e.subTree.el),i?null:m(e.subTree),x,s,n),a&&y(a),ia(e,o.el),r&&0==--x.deps&&x.resolve()})},unmount(e,t){x.isUnmounted=!0,x.activeBranch&&p(x.activeBranch,n,e,t),x.pendingBranch&&p(x.pendingBranch,n,e,t)}};return x}function ip(e){let t;if(O(e)){let n=iT&&e._c;n&&(e._d=!1,iC()),e=e(),n&&(e._d=!0,t=ix,ik())}return w(e)&&(e=function(e,t=!0){let n;for(let t=0;tt!==e)),e}function im(e,t){t&&t.pendingBranch?w(e)?t.effects.push(...e):t.effects.push(e):ns(e)}function ig(e,t){e.activeBranch=t;let{vnode:n,parentComponent:r}=e,i=t.el;for(;!i&&t.component;)i=(t=t.component.subTree).el;n.el=i,r&&r.subTree===n&&(r.vnode.el=i,ia(r,i))}let iy=Symbol.for("v-fgt"),iv=Symbol.for("v-txt"),ib=Symbol.for("v-cmt"),i_=Symbol.for("v-stc"),iS=[],ix=null;function iC(e=!1){iS.push(ix=e?null:[])}function ik(){iS.pop(),ix=iS[iS.length-1]||null}let iT=1;function iN(e){iT+=e,e<0&&ix&&(ix.hasOnce=!0)}function iw(e){return e.dynamicChildren=iT>0?ix||y:null,ik(),iT>0&&ix&&ix.push(e),e}function iA(e,t,n,r,i){return iw(iM(e,t,n,r,i,!0))}function iE(e){return!!e&&!0===e.__v_isVNode}function iI(e,t){return e.type===t.type&&e.key===t.key}let iR=({key:e})=>null!=e?e:null,iO=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?P(e)||tD(e)||O(e)?{i:nu,r:e,k:t,f:!!n}:e:null);function iP(e,t=null,n=null,r=0,i=null,l=e===iy?0:1,s=!1,o=!1){let a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&iR(t),ref:t&&iO(t),scopeId:nd,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:l,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:nu};return o?(iB(a,n),128&l&&e.normalize(a)):n&&(a.shapeFlag|=P(n)?8:16),iT>0&&!s&&ix&&(a.patchFlag>0||6&l)&&32!==a.patchFlag&&ix.push(a),a}let iM=function(e,t=null,n=null,r=0,i=null,l=!1){var s;if(e&&e!==ru||(e=ib),iE(e)){let r=i$(e,t,!0);return n&&iB(r,n),iT>0&&!l&&ix&&(6&r.shapeFlag?ix[ix.indexOf(e)]=r:ix.push(r)),r.patchFlag=-2,r}if(O(s=e)&&"__vccOpts"in s&&(e=e.__vccOpts),t){let{class:e,style:n}=t=iL(t);e&&!P(e)&&(t.class=ec(e)),L(n)&&(tO(n)&&!w(n)&&(n=C({},n)),t.style=ei(n))}let o=P(e)?1:ic(e)?128:ng(e)?64:L(e)?4:O(e)?2:0;return iP(e,t,n,r,i,o,l,!0)};function iL(e){return e?tO(e)||rD(e)?C({},e):e:null}function i$(e,t,n=!1,r=!1){let{props:i,ref:l,patchFlag:s,children:o,transition:a}=e,c=t?iU(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&iR(c),ref:t&&t.ref?n&&l?w(l)?l.concat(iO(t)):[l,iO(t)]:iO(t):l,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==iy?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&i$(e.ssContent),ssFallback:e.ssFallback&&i$(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&r&&nD(u,a.clone(u)),u}function iD(e=" ",t=0){return iM(iv,null,e,t)}function iF(e){return null==e||"boolean"==typeof e?iM(ib):w(e)?iM(iy,null,e.slice()):"object"==typeof e?iV(e):iM(iv,null,String(e))}function iV(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:i$(e)}function iB(e,t){let n=0,{shapeFlag:r}=e;if(null==t)t=null;else if(w(t))n=16;else if("object"==typeof t){if(65&r){let n=t.default;n&&(n._c&&(n._d=!1),iB(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;r||rD(t)?3===r&&nu&&(1===nu.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=nu}}else O(t)?(t={default:t,_ctx:nu},n=32):(t=String(t),64&r?(n=16,t=[iD(t)]):n=8);e.children=t,e.shapeFlag|=n}function iU(...e){let t={};for(let n=0;niW||nu;o=e=>{iW=e},a=e=>{iX=e};let iz=e=>{let t=iW;return o(e),e.scope.on(),()=>{e.scope.off(),o(t)}},iJ=()=>{iW&&iW.scope.off(),o(null)};function iG(e){return 4&e.vnode.shapeFlag}let iX=!1;function iQ(e,t,n){O(t)?e.render=t:L(t)&&(e.setupState=tq(t)),iY(e,n)}function iZ(e){c=e,u=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,ry))}}function iY(e,t,n){let r=e.type;if(!e.render){if(!t&&c&&!r.render){let t=r.template||rx(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:l,compilerOptions:s}=r,o=C(C({isCustomElement:n,delimiters:l},i),s);r.render=c(t,o)}}e.render=r.render||b,u&&u(e)}{let t=iz(e);eP();try{!function(e){let t=rx(e),n=e.proxy,r=e.ctx;r_=!1,t.beforeCreate&&rS(t.beforeCreate,e,"bc");let{data:i,computed:l,methods:s,watch:o,provide:a,inject:c,created:u,beforeMount:d,mounted:h,beforeUpdate:f,updated:p,activated:m,deactivated:g,beforeDestroy:y,beforeUnmount:_,destroyed:S,unmounted:x,render:C,renderTracked:k,renderTriggered:T,errorCaptured:N,serverPrefetch:A,expose:E,inheritAttrs:I,components:R,directives:M,filters:$}=t;if(c&&function(e,t,n=b){for(let n in w(e)&&(e=rN(e)),e){let r;let i=e[n];tD(r=L(i)?"default"in i?rM(i.from||n,i.default,!0):rM(i.from||n):rM(i))?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e}):t[n]=r}}(c,r,null),s)for(let e in s){let t=s[e];O(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);L(t)&&(e.data=tT(t))}if(r_=!0,l)for(let e in l){let t=l[e],i=O(t)?t.bind(n,n):O(t.get)?t.get.bind(n,n):b,s=i3({get:i,set:!O(t)&&O(t.set)?t.set.bind(n):b});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e})}if(o)for(let e in o)!function e(t,n,r,i){let l=i.includes(".")?r7(r,i):()=>r[i];if(P(t)){let e=n[t];O(e)&&r5(l,e,void 0)}else if(O(t)){var s;s=t.bind(r),r5(l,s,void 0)}else if(L(t)){if(w(t))t.forEach(t=>e(t,n,r,i));else{let e=O(t.handler)?t.handler.bind(r):n[t.handler];O(e)&&r5(l,e,t)}}}(o[e],r,n,e);if(a){let e=O(a)?a.call(n):a;Reflect.ownKeys(e).forEach(t=>{rP(t,e[t])})}function D(e,t){w(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(u&&rS(u,e,"c"),D(n7,d),D(re,h),D(rt,f),D(rn,p),D(n2,m),D(n6,g),D(ra,N),D(ro,k),D(rs,T),D(rr,_),D(ri,x),D(rl,A),w(E)){if(E.length){let t=e.exposed||(e.exposed={});E.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})})}else e.exposed||(e.exposed={})}C&&e.render===b&&(e.render=C),null!=I&&(e.inheritAttrs=I),R&&(e.components=R),M&&(e.directives=M)}(e)}finally{eM(),t()}}}let i0={get:(e,t)=>(eH(e,"get",""),e[t])};function i1(e){return{attrs:new Proxy(e.attrs,i0),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function i2(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(tq(tM(e.exposed)),{get:(t,n)=>n in t?t[n]:n in rp?rp[n](e):void 0,has:(e,t)=>t in e||t in rp})):e.proxy}function i6(e,t=!0){return O(e)?e.displayName||e.name:e.name||t&&e.__name}let i3=(e,t)=>(function(e,t,n=!1){let r,i;return O(e)?r=e:(r=e.get,i=e.set),new tX(r,i,n)})(e,0,iX);function i4(e,t,n){let r=arguments.length;return 2!==r?(r>3?n=Array.prototype.slice.call(arguments,2):3===r&&iE(n)&&(n=[n]),iM(e,t,n)):!L(t)||w(t)?iM(e,null,t):iE(t)?iM(e,null,[t]):iM(e,t)}function i8(e,t){let n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e0&&ix&&ix.push(e),!0}let i5="3.5.5",i9="undefined"!=typeof window&&window.trustedTypes;if(i9)try{p=/* @__PURE__ */i9.createPolicy("vue",{createHTML:e=>e})}catch(e){}let i7=p?e=>p.createHTML(e):e=>e,le="undefined"!=typeof document?document:null,lt=le&&/* @__PURE__ */le.createElement("template"),ln="transition",lr="animation",li=Symbol("_vtc"),ll={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},ls=/* @__PURE__ */C({},nE,ll),lo=((t=(e,{slots:t})=>i4(nO,lu(e),t)).displayName="Transition",t.props=ls,t),la=(e,t=[])=>{w(e)?e.forEach(e=>e(...t)):e&&e(...t)},lc=e=>!!e&&(w(e)?e.some(e=>e.length>1):e.length>1);function lu(e){let t={};for(let n in e)n in ll||(t[n]=e[n]);if(!1===e.css)return t;let{name:n="v",type:r,duration:i,enterFromClass:l=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:o=`${n}-enter-to`,appearFromClass:a=l,appearActiveClass:c=s,appearToClass:u=o,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=e,p=function(e){if(null==e)return null;if(L(e))return[et(e.enter),et(e.leave)];{let t=et(e);return[t,t]}}(i),m=p&&p[0],g=p&&p[1],{onBeforeEnter:y,onEnter:b,onEnterCancelled:_,onLeave:S,onLeaveCancelled:x,onBeforeAppear:k=y,onAppear:T=b,onAppearCancelled:N=_}=t,w=(e,t,n)=>{lh(e,t?u:o),lh(e,t?c:s),n&&n()},A=(e,t)=>{e._isLeaving=!1,lh(e,d),lh(e,f),lh(e,h),t&&t()},E=e=>(t,n)=>{let i=e?T:b,s=()=>w(t,e,n);la(i,[t,s]),lf(()=>{lh(t,e?a:l),ld(t,e?u:o),lc(i)||lm(t,r,m,s)})};return C(t,{onBeforeEnter(e){la(y,[e]),ld(e,l),ld(e,s)},onBeforeAppear(e){la(k,[e]),ld(e,a),ld(e,c)},onEnter:E(!1),onAppear:E(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>A(e,t);ld(e,d),ld(e,h),lb(),lf(()=>{e._isLeaving&&(lh(e,d),ld(e,f),lc(S)||lm(e,r,g,n))}),la(S,[e,n])},onEnterCancelled(e){w(e,!1),la(_,[e])},onAppearCancelled(e){w(e,!0),la(N,[e])},onLeaveCancelled(e){A(e),la(x,[e])}})}function ld(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[li]||(e[li]=/* @__PURE__ */new Set)).add(t)}function lh(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[li];n&&(n.delete(t),n.size||(e[li]=void 0))}function lf(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let lp=0;function lm(e,t,n,r){let i=e._endId=++lp,l=()=>{i===e._endId&&r()};if(n)return setTimeout(l,n);let{type:s,timeout:o,propCount:a}=lg(e,t);if(!s)return r();let c=s+"end",u=0,d=()=>{e.removeEventListener(c,h),l()},h=t=>{t.target===e&&++u>=a&&d()};setTimeout(()=>{u(n[e]||"").split(", "),i=r(`${ln}Delay`),l=r(`${ln}Duration`),s=ly(i,l),o=r(`${lr}Delay`),a=r(`${lr}Duration`),c=ly(o,a),u=null,d=0,h=0;t===ln?s>0&&(u=ln,d=s,h=l.length):t===lr?c>0&&(u=lr,d=c,h=a.length):h=(u=(d=Math.max(s,c))>0?s>c?ln:lr:null)?u===ln?l.length:a.length:0;let f=u===ln&&/\b(transform|all)(,|$)/.test(r(`${ln}Property`).toString());return{type:u,timeout:d,propCount:h,hasTransform:f}}function ly(e,t){for(;e.lengthlv(t)+lv(e[n])))}function lv(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function lb(){return document.body.offsetHeight}let l_=Symbol("_vod"),lS=Symbol("_vsh");function lx(e,t){e.style.display=t?e[l_]:"none",e[lS]=!t}let lC=Symbol("");function lk(e,t){if(1===e.nodeType){let n=e.style,r="";for(let e in t)n.setProperty(`--${e}`,t[e]),r+=`--${e}: ${t[e]};`;n[lC]=r}}let lT=/(^|;)\s*display\s*:/,lN=/\s*!important$/;function lw(e,t,n){if(w(n))n.forEach(n=>lw(e,t,n));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{let r=function(e,t){let n=lE[t];if(n)return n;let r=K(t);if("filter"!==r&&r in e)return lE[t]=r;r=G(r);for(let n=0;nlL||(l$.then(()=>lL=0),lL=Date.now()),lF=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&123>e.charCodeAt(2),lV={};/*! #__NO_SIDE_EFFECTS__ */function lB(e,t,n){let r=nV(e,t);B(r)&&C(r,t);class i extends lj{constructor(e){super(r,e,n)}}return i.def=r,i}let lU="undefined"!=typeof HTMLElement?HTMLElement:class{};class lj extends lU{constructor(e,t={},n=sa){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=/* @__PURE__ */new WeakSet,this._ob=null,this.shadowRoot&&n!==sa?this._root=this.shadowRoot:!1!==e.shadowRoot?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof lj){this._parent=e;break}this._instance||(this._resolved?(this._setParent(),this._update()):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._instance.provides=e._instance.provides)}disconnectedCallback(){this._connected=!1,nr(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let e=0;e{for(let t of e)this._setAttr(t.attributeName)}),this._ob.observe(this,{attributes:!0});let e=(e,t=!1)=>{let n;this._resolved=!0,this._pendingResolve=void 0;let{props:r,styles:i}=e;if(r&&!w(r))for(let e in r){let t=r[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=et(this._props[e])),(n||(n=/* @__PURE__ */Object.create(null)))[K(e)]=!0)}this._numberProps=n,t&&this._resolveProps(e),this.shadowRoot&&this._applyStyles(i),this._mount(e)},t=this._def.__asyncLoader;t?this._pendingResolve=t().then(t=>e(this._def=t,!0)):e(this._def)}_mount(e){this._app=this._createApp(e),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let t=this._instance&&this._instance.exposed;if(t)for(let e in t)N(this,e)||Object.defineProperty(this,e,{get:()=>tj(t[e])})}_resolveProps(e){let{props:t}=e,n=w(t)?t:Object.keys(t||{});for(let e of Object.keys(this))"_"!==e[0]&&n.includes(e)&&this._setProp(e,this[e]);for(let e of n.map(K))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!0)}})}_setAttr(e){if(e.startsWith("data-v-"))return;let t=this.hasAttribute(e),n=t?this.getAttribute(e):lV,r=K(e);t&&this._numberProps&&this._numberProps[r]&&(n=et(n)),this._setProp(r,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,r=!1){t!==this._props[e]&&(t===lV?delete this._props[e]:(this._props[e]=t,"key"===e&&this._app&&(this._app._ceVNode.key=t)),r&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(J(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(J(e),t+""):t||this.removeAttribute(J(e))))}_update(){so(this._createVNode(),this._root)}_createVNode(){let e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));let t=iM(this._def,C(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;let t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,B(t[0])?C({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),J(e)!==e&&t(J(e),n)},this._setParent()}),t}_applyStyles(e,t){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}let n=this._nonce;for(let t=e.length-1;t>=0;t--){let r=document.createElement("style");n&&r.setAttribute("nonce",n),r.textContent=e[t],this.shadowRoot.prepend(r)}}_parseSlots(){let e;let t=this._slots={};for(;e=this.firstChild;){let n=1===e.nodeType&&e.getAttribute("slot")||"default";(t[n]||(t[n]=[])).push(e),this.removeChild(e)}}_renderSlots(){let e=(this._teleportTarget||this).querySelectorAll("slot"),t=this._instance.type.__scopeId;for(let n=0;n{if(!n.length)return;let t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){let r=e.cloneNode(),i=e[li];i&&i.forEach(e=>{e.split(/\s+/).forEach(e=>e&&r.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&r.classList.add(e)),r.style.display="none";let l=1===t.nodeType?t:t.parentNode;l.appendChild(r);let{hasTransform:s}=lg(r);return l.removeChild(r),s}(n[0].el,i.vnode.el,t))return;n.forEach(lG),n.forEach(lX);let r=n.filter(lQ);lb(),r.forEach(e=>{let n=e.el,r=n.style;ld(n,t),r.transform=r.webkitTransform=r.transitionDuration="";let i=n[lK]=e=>{(!e||e.target===n)&&(!e||/transform$/.test(e.propertyName))&&(n.removeEventListener("transitionend",i),n[lK]=null,lh(n,t))};n.addEventListener("transitionend",i)})}),()=>{let s=tP(e),o=lu(s),a=s.tag||iy;if(n=[],r)for(let e=0;e{let t=e.props["onUpdate:modelValue"]||!1;return w(t)?e=>Z(t,e):t};function lY(e){e.target.composing=!0}function l0(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}let l1=Symbol("_assign"),l2={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[l1]=lZ(i);let l=r||i.props&&"number"===i.props.type;lO(e,t?"change":"input",t=>{if(t.target.composing)return;let r=e.value;n&&(r=r.trim()),l&&(r=ee(r)),e[l1](r)}),n&&lO(e,"change",()=>{e.value=e.value.trim()}),t||(lO(e,"compositionstart",lY),lO(e,"compositionend",l0),lO(e,"change",l0))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:l}},s){if(e[l1]=lZ(s),e.composing)return;let o=(l||"number"===e.type)&&!/^0\d/.test(e.value)?ee(e.value):e.value,a=null==t?"":t;o===a||document.activeElement===e&&"range"!==e.type&&(r&&t===n||i&&e.value.trim()===a)||(e.value=a)}},l6={deep:!0,created(e,t,n){e[l1]=lZ(n),lO(e,"change",()=>{let t=e._modelValue,n=l9(e),r=e.checked,i=e[l1];if(w(t)){let e=eg(t,n),l=-1!==e;if(r&&!l)i(t.concat(n));else if(!r&&l){let n=[...t];n.splice(e,1),i(n)}}else if(E(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(l7(e,r))})},mounted:l3,beforeUpdate(e,t,n){e[l1]=lZ(n),l3(e,t,n)}};function l3(e,{value:t},n){let r;e._modelValue=t,r=w(t)?eg(t,n.props.value)>-1:E(t)?t.has(n.props.value):em(t,l7(e,!0)),e.checked!==r&&(e.checked=r)}let l4={created(e,{value:t},n){e.checked=em(t,n.props.value),e[l1]=lZ(n),lO(e,"change",()=>{e[l1](l9(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[l1]=lZ(r),t!==n&&(e.checked=em(t,r.props.value))}},l8={deep:!0,created(e,{value:t,modifiers:{number:n}},r){let i=E(t);lO(e,"change",()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?ee(l9(e)):l9(e));e[l1](e.multiple?i?new Set(t):t:t[0]),e._assigning=!0,nr(()=>{e._assigning=!1})}),e[l1]=lZ(r)},mounted(e,{value:t}){l5(e,t)},beforeUpdate(e,t,n){e[l1]=lZ(n)},updated(e,{value:t}){e._assigning||l5(e,t)}};function l5(e,t,n){let r=e.multiple,i=w(t);if(!r||i||E(t)){for(let n=0,l=e.options.length;nString(e)===String(s)):l.selected=eg(t,s)>-1}else l.selected=t.has(s)}else if(em(l9(l),t)){e.selectedIndex!==n&&(e.selectedIndex=n);return}}r||-1===e.selectedIndex||(e.selectedIndex=-1)}}function l9(e){return"_value"in e?e._value:e.value}function l7(e,t){let n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}function se(e,t,n,r,i){let l=function(e,t){switch(e){case"SELECT":return l8;case"TEXTAREA":return l2;default:switch(t){case"checkbox":return l6;case"radio":return l4;default:return l2}}}(e.tagName,n.props&&n.props.type)[i];l&&l(e,t,n,r)}let st=["ctrl","shift","alt","meta"],sn={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>st.some(n=>e[`${n}Key`]&&!t.includes(n))},sr={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},si=/* @__PURE__ */C({patchProp:(e,t,n,r,i,l)=>{let s="svg"===i;"class"===t?function(e,t,n){let r=e[li];r&&(t=(t?[t,...r]:[...r]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,r,s):"style"===t?function(e,t,n){let r=e.style,i=P(n),l=!1;if(n&&!i){if(t){if(P(t))for(let e of t.split(";")){let t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&lw(r,t,"")}else for(let e in t)null==n[e]&&lw(r,e,"")}for(let e in n)"display"===e&&(l=!0),lw(r,e,n[e])}else if(i){if(t!==n){let e=r[lC];e&&(n+=";"+e),r.cssText=n,l=lT.test(n)}}else t&&e.removeAttribute("style");l_ in e&&(e[l_]=l?r.display:"",e[lS]&&(r.display="none"))}(e,n,r):S(t)?x(t)||function(e,t,n,r,i=null){let l=e[lP]||(e[lP]={}),s=l[t];if(r&&s)s.value=r;else{let[n,o]=function(e){let t;if(lM.test(e)){let n;for(t={};n=e.match(lM);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[":"===e[2]?e.slice(3):J(e.slice(2)),t]}(t);r?lO(e,n,l[t]=function(e,t){let n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();t2(function(e,t){if(!w(t))return t;{let n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}}(e,n.value),t,5,[e])};return n.value=e,n.attached=lD(),n}(r,i),o):s&&(!function(e,t,n,r){e.removeEventListener(t,n,r)}(e,n,s,o),l[t]=void 0)}}(e,t,0,r,l):("."===t[0]?(t=t.slice(1),0):"^"===t[0]?(t=t.slice(1),1):!function(e,t,n,r){if(r)return!!("innerHTML"===t||"textContent"===t||t in e&&lF(t)&&O(n));if("spellcheck"===t||"draggable"===t||"translate"===t||"form"===t||"list"===t&&"INPUT"===e.tagName||"type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){let t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return!(lF(t)&&P(n))&&!!(t in e||e._isVueCE&&(/[A-Z]/.test(t)||!P(n)))}(e,t,r,s))?("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),lR(e,t,r,s)):(!function(e,t,n,r){if("innerHTML"===t||"textContent"===t){null!=n&&(e[t]="innerHTML"===t?i7(n):n);return}let i=e.tagName;if("value"===t&&"PROGRESS"!==i&&!i.includes("-")){let r="OPTION"===i?e.getAttribute("value")||"":e.value,l=null==n?"checkbox"===e.type?"on":"":String(n);r===l&&"_value"in e||(e.value=l),null==n&&e.removeAttribute(t),e._value=n;return}let l=!1;if(""===n||null==n){let r=typeof e[t];if("boolean"===r){var s;n=!!(s=n)||""===s}else null==n&&"string"===r?(n="",l=!0):"number"===r&&(n=0,l=!0)}try{e[t]=n}catch(e){}l&&e.removeAttribute(t)}(e,t,r),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||lR(e,t,r,s,l,"value"!==t))}},{insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i="svg"===t?le.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?le.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?le.createElement(e,{is:n}):le.createElement(e);return"select"===e&&r&&null!=r.multiple&&i.setAttribute("multiple",r.multiple),i},createText:e=>le.createTextNode(e),createComment:e=>le.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>le.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,i,l){let s=n?n.previousSibling:t.lastChild;if(i&&(i===l||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==l&&(i=i.nextSibling););else{lt.innerHTML=i7("svg"===r?`${e}`:"mathml"===r?`${e}`:e);let i=lt.content;if("svg"===r||"mathml"===r){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}}),sl=!1;function ss(){return d=sl?d:rQ(si),sl=!0,d}let so=(...e)=>{(d||(d=rZ(si))).render(...e)},sa=(...e)=>{let t=(d||(d=rZ(si))).createApp(...e),{mount:n}=t;return t.mount=e=>{let r=sd(e);if(!r)return;let i=t._component;O(i)||i.render||i.template||(i.template=r.innerHTML),1===r.nodeType&&(r.textContent="");let l=n(r,!1,su(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),l},t},sc=(...e)=>{let t=ss().createApp(...e),{mount:n}=t;return t.mount=e=>{let t=sd(e);if(t)return n(t,!0,su(t))},t};function su(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function sd(e){return P(e)?document.querySelector(e):e}let sh=Symbol(""),sf=Symbol(""),sp=Symbol(""),sm=Symbol(""),sg=Symbol(""),sy=Symbol(""),sv=Symbol(""),sb=Symbol(""),s_=Symbol(""),sS=Symbol(""),sx=Symbol(""),sC=Symbol(""),sk=Symbol(""),sT=Symbol(""),sN=Symbol(""),sw=Symbol(""),sA=Symbol(""),sE=Symbol(""),sI=Symbol(""),sR=Symbol(""),sO=Symbol(""),sP=Symbol(""),sM=Symbol(""),sL=Symbol(""),s$=Symbol(""),sD=Symbol(""),sF=Symbol(""),sV=Symbol(""),sB=Symbol(""),sU=Symbol(""),sj=Symbol(""),sH=Symbol(""),sq=Symbol(""),sW=Symbol(""),sK=Symbol(""),sz=Symbol(""),sJ=Symbol(""),sG=Symbol(""),sX=Symbol(""),sQ={[sh]:"Fragment",[sf]:"Teleport",[sp]:"Suspense",[sm]:"KeepAlive",[sg]:"BaseTransition",[sy]:"openBlock",[sv]:"createBlock",[sb]:"createElementBlock",[s_]:"createVNode",[sS]:"createElementVNode",[sx]:"createCommentVNode",[sC]:"createTextVNode",[sk]:"createStaticVNode",[sT]:"resolveComponent",[sN]:"resolveDynamicComponent",[sw]:"resolveDirective",[sA]:"resolveFilter",[sE]:"withDirectives",[sI]:"renderList",[sR]:"renderSlot",[sO]:"createSlots",[sP]:"toDisplayString",[sM]:"mergeProps",[sL]:"normalizeClass",[s$]:"normalizeStyle",[sD]:"normalizeProps",[sF]:"guardReactiveProps",[sV]:"toHandlers",[sB]:"camelize",[sU]:"capitalize",[sj]:"toHandlerKey",[sH]:"setBlockTracking",[sq]:"pushScopeId",[sW]:"popScopeId",[sK]:"withCtx",[sz]:"unref",[sJ]:"isRef",[sG]:"withMemo",[sX]:"isMemoSame"},sZ={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function sY(e,t,n,r,i,l,s,o=!1,a=!1,c=!1,u=sZ){return e&&(o?(e.helper(sy),e.helper(e.inSSR||c?sv:sb)):e.helper(e.inSSR||c?s_:sS),s&&e.helper(sE)),{type:13,tag:t,props:n,children:r,patchFlag:i,dynamicProps:l,directives:s,isBlock:o,disableTracking:a,isComponent:c,loc:u}}function s0(e,t=sZ){return{type:17,loc:t,elements:e}}function s1(e,t=sZ){return{type:15,loc:t,properties:e}}function s2(e,t){return{type:16,loc:sZ,key:P(e)?s6(e,!0):e,value:t}}function s6(e,t=!1,n=sZ,r=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:r}}function s3(e,t=sZ){return{type:8,loc:t,children:e}}function s4(e,t=[],n=sZ){return{type:14,loc:n,callee:e,arguments:t}}function s8(e,t,n=!1,r=!1,i=sZ){return{type:18,params:e,returns:t,newline:n,isSlot:r,loc:i}}function s5(e,t,n,r=!0){return{type:19,test:e,consequent:t,alternate:n,newline:r,loc:sZ}}function s9(e,{helper:t,removeHelper:n,inSSR:r}){if(!e.isBlock){var i,l;e.isBlock=!0,n((i=e.isComponent,r||i?s_:sS)),t(sy),t((l=e.isComponent,r||l?sv:sb))}}let s7=new Uint8Array([123,123]),oe=new Uint8Array([125,125]);function ot(e){return e>=97&&e<=122||e>=65&&e<=90}function on(e){return 32===e||10===e||9===e||12===e||13===e}function or(e){return 47===e||62===e||on(e)}function oi(e){let t=new Uint8Array(e.length);for(let n=0;n4===e.type&&e.isStatic;function ou(e){switch(e){case"Teleport":case"teleport":return sf;case"Suspense":case"suspense":return sp;case"KeepAlive":case"keep-alive":return sm;case"BaseTransition":case"base-transition":return sg}}let od=/^\d|[^\$\w\xA0-\uFFFF]/,oh=e=>!od.test(e),of=/[A-Za-z_$\xA0-\uFFFF]/,op=/[\.\?\w$\xA0-\uFFFF]/,om=/\s+[.[]\s*|\s*[.[]\s+/g,og=e=>4===e.type?e.content:e.loc.source,oy=e=>{let t=og(e).trim().replace(om,e=>e.trim()),n=0,r=[],i=0,l=0,s=null;for(let e=0;e|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,ob=e=>ov.test(og(e));function o_(e,t,n=!1){for(let r=0;r4===e.key.type&&e.key.content===r)}return n}function oI(e,t){return`_${t}_${e.replace(/[^\w]/g,(t,n)=>"-"===t?"_":e.charCodeAt(n).toString())}`}let oR=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,oO={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:_,isPreTag:_,isIgnoreNewlineTag:_,isCustomElement:_,onError:os,onWarn:oo,comments:!1,prefixIdentifiers:!1},oP=oO,oM=null,oL="",o$=null,oD=null,oF="",oV=-1,oB=-1,oU=0,oj=!1,oH=null,oq=[],oW=new class{constructor(e,t){this.stack=e,this.cbs=t,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=s7,this.delimiterClose=oe,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return 2===this.mode&&0===this.stack.length}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=s7,this.delimiterClose=oe}getPos(e){let t=1,n=e+1;for(let r=this.newlines.length-1;r>=0;r--){let i=this.newlines[r];if(e>i){t=r+2,n=e-i;break}}return{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){60===e?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex]){if(this.delimiterIndex===this.delimiterOpen.length-1){let e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++}else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){let t=this.sequenceIndex===this.currentSequence.length;if(t?or(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t){this.sequenceIndex++;return}}else this.inRCDATA=!1;this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(62===e||on(e)){let t=this.index-this.currentSequence.length;if(this.sectionStart=e||(28===this.state?this.currentSequence===ol.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):6===this.state||11===this.state||18===this.state||17===this.state||12===this.state||13===this.state||14===this.state||15===this.state||16===this.state||20===this.state||19===this.state||21===this.state||9===this.state||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}}(oq,{onerr:o5,ontext(e,t){oX(oJ(e,t),e,t)},ontextentity(e,t,n){oX(e,t,n)},oninterpolation(e,t){if(oj)return oX(oJ(e,t),e,t);let n=e+oW.delimiterOpen.length,r=t-oW.delimiterClose.length;for(;on(oL.charCodeAt(n));)n++;for(;on(oL.charCodeAt(r-1));)r--;let i=oJ(n,r);i.includes("&")&&(i=oP.decodeEntities(i,!1)),o6({type:5,content:o8(i,!1,o3(n,r)),loc:o3(e,t)})},onopentagname(e,t){let n=oJ(e,t);o$={type:1,tag:n,ns:oP.getNamespace(n,oq[0],oP.ns),tagType:0,props:[],children:[],loc:o3(e-1,t),codegenNode:void 0}},onopentagend(e){oG(e)},onclosetag(e,t){let n=oJ(e,t);if(!oP.isVoidTag(n)){let r=!1;for(let e=0;e0&&/* @__PURE__ *//*@__PURE__*/oq[0].loc.start.offset;for(let n=0;n<=e;n++)oQ(oq.shift(),t,n(7===e.type?e.rawName:e.name)===t)},onattribend(e,t){o$&&oD&&(o4(oD.loc,t),0!==e&&(oF.includes("&")&&(oF=oP.decodeEntities(oF,!0)),6===oD.type?("class"===oD.name&&(oF=o2(oF).trim()),oD.value={type:2,content:oF,loc:1===e?o3(oV,oB):o3(oV-1,oB+1)},oW.inSFCRoot&&"template"===o$.tag&&"lang"===oD.name&&oF&&"html"!==oF&&oW.enterRCDATA(oi("{let i=t.start.offset+n,l=i+e.length;return o8(e,!1,o3(i,l),0,r?1:0)},o={source:s(l.trim(),n.indexOf(l,i.length)),value:void 0,key:void 0,index:void 0,finalized:!1},a=i.trim().replace(oz,"").trim(),c=i.indexOf(a),u=a.match(oK);if(u){let e;a=a.replace(oK,"").trim();let t=u[1].trim();if(t&&(e=n.indexOf(t,c+a.length),o.key=s(t,e,!0)),u[2]){let r=u[2].trim();r&&(o.index=s(r,n.indexOf(r,o.key?e+t.length:c+a.length),!0))}}return a&&(o.value=s(a,c,!0)),o}(oD.exp)))),(7!==oD.type||"pre"!==oD.name)&&o$.props.push(oD)),oF="",oV=oB=-1},oncomment(e,t){oP.comments&&o6({type:3,content:oJ(e,t),loc:o3(e-4,t+3)})},onend(){let e=oL.length;for(let t=0;t64&&n<91||ou(e)||oP.isBuiltInComponent&&oP.isBuiltInComponent(e)||oP.isNativeTag&&!oP.isNativeTag(e))return!0;for(let e=0;e=0;)n--;return n}let oY=/* @__PURE__ */new Set(["if","else","else-if","for","slot"]),o0=/\r\n/g;function o1(e,t){let n="preserve"!==oP.whitespace,r=!1;for(let t=0;t1)for(let i=0;i{n--};for(;nt===e:t=>e.test(t);return(e,r)=>{if(1===e.type){let{props:i}=e;if(3===e.tagType&&i.some(ok))return;let l=[];for(let s=0;s`${sQ[e]}: _${sQ[e]}`;function ao(e,t,{helper:n,push:r,newline:i,isTS:l}){let s=n("component"===t?sT:sw);for(let n=0;n3;t.push("["),n&&t.indent(),ac(e,t,n),n&&t.deindent(),t.push("]")}function ac(e,t,n=!1,r=!0){let{push:i,newline:l}=t;for(let s=0;se||"null")}([s,o,a,n,u]),t),r(")"),h&&r(")"),d&&(r(", "),au(d,t),r(")"))}(e,t);break;case 14:!function(e,t){let{push:n,helper:r,pure:i}=t,l=P(e.callee)?e.callee:r(e.callee);i&&n(al),n(l+"(",-2,e),ac(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){let{push:n,indent:r,deindent:i,newline:l}=t,{properties:s}=e;if(!s.length){n("{}",-2,e);return}let o=s.length>1;n(o?"{":"{ "),o&&r();for(let e=0;e "),(a||o)&&(n("{"),r()),s?(a&&n("return "),w(s)?aa(s,t):au(s,t)):o&&au(o,t),(a||o)&&(i(),n("}")),c&&n(")")}(e,t);break;case 19:!function(e,t){let{test:n,consequent:r,alternate:i,newline:l}=e,{push:s,indent:o,deindent:a,newline:c}=t;if(4===n.type){let e=!oh(n.content);e&&s("("),ad(n,t),e&&s(")")}else s("("),au(n,t),s(")");l&&o(),t.indentLevel++,l||s(" "),s("? "),au(r,t),t.indentLevel--,l&&c(),l||s(" "),s(": ");let u=19===i.type;!u&&t.indentLevel++,au(i,t),!u&&t.indentLevel--,l&&a(!0)}(e,t);break;case 20:!function(e,t){let{push:n,helper:r,indent:i,deindent:l,newline:s}=t,{needPauseTracking:o,needArraySpread:a}=e;a&&n("[...("),n(`_cache[${e.index}] || (`),o&&(i(),n(`${r(sH)}(-1),`),s(),n("(")),n(`_cache[${e.index}] = `),au(e.value,t),o&&(n(`).cacheIndex = ${e.index},`),s(),n(`${r(sH)}(1),`),s(),n(`_cache[${e.index}]`),l()),n(")"),a&&n(")]")}(e,t);break;case 21:ac(e.body,t,!0,!1)}}function ad(e,t){let{content:n,isStatic:r}=e;t.push(r?JSON.stringify(n):n,-3,e)}function ah(e,t){for(let n=0;n(function(e,t,n,r){if("else"!==t.name&&(!t.exp||!t.exp.content.trim())){let r=t.exp?t.exp.loc:e.loc;n.onError(/* @__PURE__ *//*@__PURE__*/oa(28,t.loc)),t.exp=s6("true",!1,r)}if("if"===t.name){let i=ap(e,t),l={type:9,loc:e.loc,branches:[i]};if(n.replaceNode(l),r)return r(l,i,!0)}else{let i=n.parent.children,l=i.indexOf(e);for(;l-- >=-1;){let s=i[l];if(s&&3===s.type||s&&2===s.type&&!s.content.trim().length){n.removeNode(s);continue}if(s&&9===s.type){"else-if"===t.name&&void 0===s.branches[s.branches.length-1].condition&&n.onError(/* @__PURE__ *//*@__PURE__*/oa(30,e.loc)),n.removeNode();let i=ap(e,t);s.branches.push(i);let l=r&&r(s,i,!1);ar(i,n),l&&l(),n.currentNode=null}else n.onError(/* @__PURE__ *//*@__PURE__*/oa(30,e.loc));break}}})(e,t,n,(e,t,r)=>{let i=n.parent.children,l=i.indexOf(e),s=0;for(;l-- >=0;){let e=i[l];e&&9===e.type&&(s+=e.branches.length)}return()=>{r?e.codegenNode=am(t,s,n):function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode).alternate=am(t,s+e.branches.length-1,n)}}));function ap(e,t){let n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!o_(e,"for")?e.children:[e],userKey:oS(e,"key"),isTemplateIf:n}}function am(e,t,n){return e.condition?s5(e.condition,ag(e,t,n),s4(n.helper(sx),['""',"true"])):ag(e,t,n)}function ag(e,t,n){let{helper:r}=n,i=s2("key",s6(`${t}`,!1,sZ,2)),{children:l}=e,s=l[0];if(1!==l.length||1!==s.type){if(1!==l.length||11!==s.type)return sY(n,r(sh),s1([i]),l,64,void 0,void 0,!0,!1,!1,e.loc);{let e=s.codegenNode;return oA(e,i,n),e}}{let e=s.codegenNode,t=14===e.type&&e.callee===sG?e.arguments[1].returns:e;return 13===t.type&&s9(t,n),oA(t,i,n),e}}let ay=(e,t,n)=>{let{modifiers:r,loc:i}=e,l=e.arg,{exp:s}=e;if(s&&4===s.type&&!s.content.trim()&&(s=void 0),!s){if(4!==l.type||!l.isStatic)return n.onError(oa(52,l.loc)),{props:[s2(l,s6("",!0,i))]};av(e),s=e.exp}return 4!==l.type?(l.children.unshift("("),l.children.push(') || ""')):l.isStatic||(l.content=`${l.content} || ""`),r.some(e=>"camel"===e.content)&&(4===l.type?l.isStatic?l.content=K(l.content):l.content=`${n.helperString(sB)}(${l.content})`:(l.children.unshift(`${n.helperString(sB)}(`),l.children.push(")"))),!n.inSSR&&(r.some(e=>"prop"===e.content)&&ab(l,"."),r.some(e=>"attr"===e.content)&&ab(l,"^")),{props:[s2(l,s)]}},av=(e,t)=>{let n=e.arg,r=K(n.content);e.exp=s6(r,!1,n.loc)},ab=(e,t)=>{4===e.type?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},a_=ai("for",(e,t,n)=>{let{helper:r,removeHelper:i}=n;return function(e,t,n,r){if(!t.exp){n.onError(/* @__PURE__ *//*@__PURE__*/oa(31,t.loc));return}let i=t.forParseResult;if(!i){n.onError(/* @__PURE__ *//*@__PURE__*/oa(32,t.loc));return}aS(i);let{addIdentifiers:l,removeIdentifiers:s,scopes:o}=n,{source:a,value:c,key:u,index:d}=i,h={type:11,loc:t.loc,source:a,valueAlias:c,keyAlias:u,objectIndexAlias:d,parseResult:i,children:oT(e)?e.children:[e]};n.replaceNode(h),o.vFor++;let f=r&&r(h);return()=>{o.vFor--,f&&f()}}(e,t,n,t=>{let l=s4(r(sI),[t.source]),s=oT(e),o=o_(e,"memo"),a=oS(e,"key",!1,!0);a&&7===a.type&&!a.exp&&av(a);let c=a&&(6===a.type?a.value?s6(a.value.content,!0):void 0:a.exp),u=a&&c?s2("key",c):null,d=4===t.source.type&&t.source.constType>0,h=d?64:a?128:256;return t.codegenNode=sY(n,r(sh),void 0,l,h,void 0,void 0,!0,!d,!1,e.loc),()=>{let a;let{children:h}=t,f=1!==h.length||1!==h[0].type,p=oN(e)?e:s&&1===e.children.length&&oN(e.children[0])?e.children[0]:null;if(p)a=p.codegenNode,s&&u&&oA(a,u,n);else if(f)a=sY(n,r(sh),u?s1([u]):void 0,e.children,64,void 0,void 0,!0,void 0,!1);else{var m,g,y,b,_,S,x,C;a=h[0].codegenNode,s&&u&&oA(a,u,n),!d!==a.isBlock&&(a.isBlock?(i(sy),i((m=n.inSSR,g=a.isComponent,m||g?sv:sb))):i((y=n.inSSR,b=a.isComponent,y||b?s_:sS))),(a.isBlock=!d,a.isBlock)?(r(sy),r((_=n.inSSR,S=a.isComponent,_||S?sv:sb))):r((x=n.inSSR,C=a.isComponent,x||C?s_:sS))}if(o){let e=s8(ax(t.parseResult,[s6("_cached")]));e.body={type:21,body:[s3(["const _memo = (",o.exp,")"]),s3(["if (_cached",...c?[" && _cached.key === ",c]:[],` && ${n.helperString(sX)}(_cached, _memo)) return _cached`]),s3(["const _item = ",a]),s6("_item.memo = _memo"),s6("return _item")],loc:sZ},l.arguments.push(e,s6("_cache"),s6(String(n.cached.length))),n.cached.push(null)}else l.arguments.push(s8(ax(t.parseResult),a,!0))}})});function aS(e,t){e.finalized||(e.finalized=!0)}function ax({value:e,key:t,index:n},r=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map((e,t)=>e||s6("_".repeat(t+1),!1))}([e,t,n,...r])}let aC=s6("undefined",!1),ak=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){let n=o_(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},aT=(e,t,n,r)=>s8(e,n,!1,!0,n.length?n[0].loc:r);function aN(e,t,n){let r=[s2("name",e),s2("fn",t)];return null!=n&&r.push(s2("key",s6(String(n),!0))),s1(r)}let aw=/* @__PURE__ */new WeakMap,aA=(e,t)=>function(){let n,r,i,l,s;if(!(1===(e=t.currentNode).type&&(0===e.tagType||1===e.tagType)))return;let{tag:o,props:a}=e,c=1===e.tagType,u=c?function(e,t,n=!1){let{tag:r}=e,i=aR(r),l=oS(e,"is",!1,!0);if(l){if(i){let e;if(6===l.type?e=l.value&&s6(l.value.content,!0):(e=l.exp)||(e=s6("is",!1,l.arg.loc)),e)return s4(t.helper(sN),[e])}else 6===l.type&&l.value.content.startsWith("vue:")&&(r=l.value.content.slice(4))}let s=ou(r)||t.isBuiltInComponent(r);return s?(n||t.helper(s),s):(t.helper(sT),t.components.add(r),oI(r,"component"))}(e,t):`"${o}"`,d=L(u)&&u.callee===sN,h=0,f=d||u===sf||u===sp||!c&&("svg"===o||"foreignObject"===o||"math"===o);if(a.length>0){let r=aE(e,t,void 0,c,d);n=r.props,h=r.patchFlag,l=r.dynamicPropNames;let i=r.directives;s=i&&i.length?s0(i.map(e=>(function(e,t){let n=[],r=aw.get(e);r?n.push(t.helperString(r)):(t.helper(sw),t.directives.add(e.name),n.push(oI(e.name,"directive")));let{loc:i}=e;if(e.exp&&n.push(e.exp),e.arg&&(e.exp||n.push("void 0"),n.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));let t=s6("true",!1,i);n.push(s1(e.modifiers.map(e=>s2(e,t)),i))}return s0(n,e.loc)})(e,t))):void 0,r.shouldUseBlock&&(f=!0)}if(e.children.length>0){if(u===sm&&(f=!0,h|=1024),c&&u!==sf&&u!==sm){let{slots:n,hasDynamicSlots:i}=function(e,t,n=aT){t.helper(sK);let{children:r,loc:i}=e,l=[],s=[],o=t.scopes.vSlot>0||t.scopes.vFor>0,a=o_(e,"slot",!0);if(a){let{arg:e,exp:t}=a;e&&!oc(e)&&(o=!0),l.push(s2(e||s6("default",!0),n(t,void 0,r,i)))}let c=!1,u=!1,d=[],h=/* @__PURE__ */new Set,f=0;for(let e=0;es2("default",n(e,void 0,t,i));c?d.length&&d.some(e=>(function e(t){return 2!==t.type&&12!==t.type||(2===t.type?!!t.content.trim():e(t.content))})(e))&&(u?t.onError(oa(39,d[0].loc)):l.push(e(void 0,d))):l.push(e(void 0,r))}let p=o?2:!function e(t){for(let n=0;n0,p=!1,m=0,g=!1,y=!1,b=!1,_=!1,x=!1,C=!1,k=[],T=e=>{u.length&&(d.push(s1(aI(u),a)),u=[]),e&&d.push(e)},N=()=>{t.scopes.vFor>0&&u.push(s2(s6("ref_for",!0),s6("true")))},w=({key:e,value:n})=>{if(oc(e)){let l=e.content,s=S(l);s&&(!r||i)&&"onclick"!==l.toLowerCase()&&"onUpdate:modelValue"!==l&&!j(l)&&(_=!0),s&&j(l)&&(C=!0),s&&14===n.type&&(n=n.arguments[0]),20===n.type||(4===n.type||8===n.type)&&o7(n,t)>0||("ref"===l?g=!0:"class"===l?y=!0:"style"===l?b=!0:"key"===l||k.includes(l)||k.push(l),r&&("class"===l||"style"===l)&&!k.includes(l)&&k.push(l))}else x=!0};for(let i=0;i"prop"===e.content)&&(m|=32);let S=t.directiveTransforms[n];if(S){let{props:n,needRuntime:r}=S(s,e,t);l||n.forEach(w),_&&i&&!oc(i)?T(s1(n,a)):u.push(...n),r&&(h.push(s),M(r)&&aw.set(s,r))}else!H(n)&&(h.push(s),f&&(p=!0))}}if(d.length?(T(),s=d.length>1?s4(t.helper(sM),d,a):d[0]):u.length&&(s=s1(aI(u),a)),x?m|=16:(y&&!r&&(m|=2),b&&!r&&(m|=4),k.length&&(m|=8),_&&(m|=32)),!p&&(0===m||32===m)&&(g||C||h.length>0)&&(m|=512),!t.inSSR&&s)switch(s.type){case 15:let A=-1,E=-1,I=!1;for(let e=0;e{if(oN(e)){let{children:n,loc:r}=e,{slotName:i,slotProps:l}=function(e,t){let n,r='"default"',i=[];for(let t=0;t0){let{props:r,directives:l}=aE(e,t,i,!1,!1);n=r,l.length&&t.onError(oa(36,l[0].loc))}return{slotName:r,slotProps:n}}(e,t),s=[t.prefixIdentifiers?"_ctx.$slots":"$slots",i,"{}","undefined","true"],o=2;l&&(s[2]=l,o=3),n.length&&(s[3]=s8([],n,!1,!1,r),o=4),t.scopeId&&!t.slotted&&(o=5),s.splice(o),e.codegenNode=s4(t.helper(sR),s,r)}},aP=(e,t,n,r)=>{let i;let{loc:l,modifiers:s,arg:o}=e;if(e.exp||s.length,4===o.type){if(o.isStatic){let e=o.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`),i=s6(0!==t.tagType||e.startsWith("vnode")||!/[A-Z]/.test(e)?X(K(e)):`on:${e}`,!0,o.loc)}else i=s3([`${n.helperString(sj)}(`,o,")"])}else(i=o).children.unshift(`${n.helperString(sj)}(`),i.children.push(")");let a=e.exp;a&&!a.content.trim()&&(a=void 0);let c=n.cacheHandlers&&!a&&!n.inVOnce;if(a){let e=oy(a),t=!(e||ob(a)),n=a.content.includes(";");(t||c&&e)&&(a=s3([`${t?"$event":"(...args)"} => ${n?"{":"("}`,a,n?"}":")"]))}let u={props:[s2(i,a||s6("() => {}",!1,l))]};return r&&(u=r(u)),c&&(u.props[0].value=n.cache(u.props[0].value)),u.props.forEach(e=>e.key.isHandlerKey=!0),u},aM=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{let n;let r=e.children,i=!1;for(let e=0;e7===e.type&&!t.directiveTransforms[e.name]))))for(let e=0;e{if(1===e.type&&o_(e,"once",!0)&&!aL.has(e)&&!t.inVOnce&&!t.inSSR)return aL.add(e),t.inVOnce=!0,t.helper(sH),()=>{t.inVOnce=!1;let e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0))}},aD=(e,t,n)=>{let r;let{exp:i,arg:l}=e;if(!i)return n.onError(/* @__PURE__ *//*@__PURE__*/oa(41,e.loc)),aF();let s=i.loc.source,o=4===i.type?i.content:s,a=n.bindingMetadata[s];if("props"===a||"props-aliased"===a)return /* @__PURE__ */i.loc,aF();if(!o.trim()||!oy(i))return n.onError(/* @__PURE__ *//*@__PURE__*/oa(42,i.loc)),aF();let c=l||s6("modelValue",!0),u=l?oc(l)?`onUpdate:${K(l.content)}`:s3(['"onUpdate:" + ',l]):"onUpdate:modelValue",d=n.isTS?"($event: any)":"$event";r=s3([`${d} => ((`,i,") = $event)"]);let h=[s2(c,e.exp),s2(u,r)];if(e.modifiers.length&&1===t.tagType){let t=e.modifiers.map(e=>e.content).map(e=>(oh(e)?e:JSON.stringify(e))+": true").join(", "),n=l?oc(l)?`${l.content}Modifiers`:s3([l,' + "Modifiers"']):"modelModifiers";h.push(s2(n,s6(`{ ${t} }`,!1,e.loc,2)))}return aF(h)};function aF(e=[]){return{props:e}}let aV=/* @__PURE__ */new WeakSet,aB=(e,t)=>{if(1===e.type){let n=o_(e,"memo");if(!(!n||aV.has(e)))return aV.add(e),()=>{let r=e.codegenNode||t.currentNode.codegenNode;r&&13===r.type&&(1!==e.tagType&&s9(r,t),e.codegenNode=s4(t.helper(sG),[n.exp,s8(void 0,r),"_cache",String(t.cached.length)]),t.cached.push(null))}}},aU=Symbol(""),aj=Symbol(""),aH=Symbol(""),aq=Symbol(""),aW=Symbol(""),aK=Symbol(""),az=Symbol(""),aJ=Symbol(""),aG=Symbol(""),aX=Symbol("");!function(e){Object.getOwnPropertySymbols(e).forEach(t=>{sQ[t]=e[t]})}({[aU]:"vModelRadio",[aj]:"vModelCheckbox",[aH]:"vModelText",[aq]:"vModelSelect",[aW]:"vModelDynamic",[aK]:"withModifiers",[az]:"withKeys",[aJ]:"vShow",[aG]:"Transition",[aX]:"TransitionGroup"});let aQ={parseMode:"html",isVoidTag:ef,isNativeTag:e=>eu(e)||ed(e)||eh(e),isPreTag:e=>"pre"===e,isIgnoreNewlineTag:e=>"pre"===e||"textarea"===e,decodeEntities:function(e,t=!1){return(h||(h=document.createElement("div")),t)?(h.innerHTML=`
`,h.children[0].getAttribute("foo")):(h.innerHTML=e,h.textContent)},isBuiltInComponent:e=>"Transition"===e||"transition"===e?aG:"TransitionGroup"===e||"transition-group"===e?aX:void 0,getNamespace(e,t,n){let r=t?t.ns:n;if(t&&2===r){if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some(e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content))&&(r=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(r=0)}else t&&1===r&&("foreignObject"===t.tag||"desc"===t.tag||"title"===t.tag)&&(r=0);if(0===r){if("svg"===e)return 1;if("math"===e)return 2}return r}},aZ=(e,t)=>s6(JSON.stringify(ea(e)),!1,t,3),aY=/* @__PURE__ */m("passive,once,capture"),a0=/* @__PURE__ */m("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),a1=/* @__PURE__ */m("left,right"),a2=/* @__PURE__ */m("onkeyup,onkeydown,onkeypress"),a6=(e,t,n,r)=>{let i=[],l=[],s=[];for(let n=0;noc(e)&&"onclick"===e.content.toLowerCase()?s6(t,!0):4!==e.type?s3(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,a4=(e,t)=>{1===e.type&&0===e.tagType&&("script"===e.tag||"style"===e.tag)&&t.removeNode()},a8=[e=>{1===e.type&&e.props.forEach((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:s6("style",!0,t.loc),exp:aZ(t.value.content,t.loc),modifiers:[],loc:t.loc})})}],a5={cloak:()=>({props:[]}),html:(e,t,n)=>{let{exp:r,loc:i}=e;return r||n.onError(oa(53,i)),t.children.length&&(n.onError(oa(54,i)),t.children.length=0),{props:[s2(s6("innerHTML",!0,i),r||s6("",!0))]}},text:(e,t,n)=>{let{exp:r,loc:i}=e;return r||n.onError(oa(55,i)),t.children.length&&(n.onError(oa(56,i)),t.children.length=0),{props:[s2(s6("textContent",!0),r?o7(r,n)>0?r:s4(n.helperString(sP),[r],i):s6("",!0))]}},model:(e,t,n)=>{let r=aD(e,t,n);if(!r.props.length||1===t.tagType)return r;e.arg&&n.onError(oa(58,e.arg.loc));let{tag:i}=t,l=n.isCustomElement(i);if("input"===i||"textarea"===i||"select"===i||l){let s=aH,o=!1;if("input"===i||l){let r=oS(t,"type");if(r){if(7===r.type)s=aW;else if(r.value)switch(r.value.content){case"radio":s=aU;break;case"checkbox":s=aj;break;case"file":o=!0,n.onError(oa(59,e.loc))}}else t.props.some(e=>7===e.type&&"bind"===e.name&&(!e.arg||4!==e.arg.type||!e.arg.isStatic))&&(s=aW)}else"select"===i&&(s=aq);o||(r.needRuntime=n.helper(s))}else n.onError(oa(57,e.loc));return r.props=r.props.filter(e=>!(4===e.key.type&&"modelValue"===e.key.content)),r},on:(e,t,n)=>aP(e,t,n,t=>{let{modifiers:r}=e;if(!r.length)return t;let{key:i,value:l}=t.props[0],{keyModifiers:s,nonKeyModifiers:o,eventOptionModifiers:a}=a6(i,r,n,e.loc);if(o.includes("right")&&(i=a3(i,"onContextmenu")),o.includes("middle")&&(i=a3(i,"onMouseup")),o.length&&(l=s4(n.helper(aK),[l,JSON.stringify(o)])),s.length&&(!oc(i)||a2(i.content.toLowerCase()))&&(l=s4(n.helper(az),[l,JSON.stringify(s)])),a.length){let e=a.map(G).join("");i=oc(i)?s6(`${i.content}${e}`,!0):s3(["(",i,`) + "${e}"`])}return{props:[s2(i,l)]}}),show:(e,t,n)=>{let{exp:r,loc:i}=e;return!r&&n.onError(oa(61,i)),{props:[],needRuntime:n.helper(aJ)}}},a9=/* @__PURE__ */new WeakMap;function a7(e,t){let n;if(!P(e)){if(!e.nodeType)return b;e=e.innerHTML}let r=e,i=((n=a9.get(null!=t?t:g))||(n=/* @__PURE__ */Object.create(null),a9.set(null!=t?t:g,n)),n),l=i[r];if(l)return l;if("#"===e[0]){let t=document.querySelector(e);e=t?t.innerHTML:""}let s=C({hoistStatic:!0,onError:void 0,onWarn:b},t);s.isCustomElement||"undefined"==typeof customElements||(s.isCustomElement=e=>!!customElements.get(e));let{code:o}=function(e,t={}){return function(e,t={}){let n=t.onError||os,r="module"===t.mode;!0===t.prefixIdentifiers?n(/* @__PURE__ *//*@__PURE__*/oa(47)):r&&n(/* @__PURE__ *//*@__PURE__*/oa(48)),t.cacheHandlers&&n(/* @__PURE__ *//*@__PURE__*/oa(49)),t.scopeId&&!r&&n(/* @__PURE__ *//*@__PURE__*/oa(50));let i=C({},t,{prefixIdentifiers:!1}),l=P(e)?function(e,t){if(oW.reset(),o$=null,oD=null,oF="",oV=-1,oB=-1,oq.length=0,oL=e,oP=C({},oO),t){let e;for(e in t)null!=t[e]&&(oP[e]=t[e])}oW.mode="html"===oP.parseMode?1:"sfc"===oP.parseMode?2:0,oW.inXML=1===oP.ns||2===oP.ns;let n=t&&t.delimiters;n&&(oW.delimiterOpen=oi(n[0]),oW.delimiterClose=oi(n[1]));let r=oM=function(e,t=""){return{type:0,source:t,children:e,helpers:/* @__PURE__ */new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:sZ}}([],e);return oW.parse(oL),r.loc=o3(0,e.length),r.children=o1(r.children),oM=null,r}(e,i):e,[s,o]=[[a$,af,aB,a_,aO,aA,ak,aM],{on:aP,bind:ay,model:aD}];return!function(e,t){let n=function(e,{filename:t="",prefixIdentifiers:n=!1,hoistStatic:r=!1,hmr:i=!1,cacheHandlers:l=!1,nodeTransforms:s=[],directiveTransforms:o={},transformHoist:a=null,isBuiltInComponent:c=b,isCustomElement:u=b,expressionPlugins:d=[],scopeId:h=null,slotted:f=!0,ssr:p=!1,inSSR:m=!1,ssrCssVars:y="",bindingMetadata:_=g,inline:S=!1,isTS:x=!1,onError:C=os,onWarn:k=oo,compatConfig:T}){let N=t.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),w={filename:t,selfName:N&&G(K(N[1])),prefixIdentifiers:n,hoistStatic:r,hmr:i,cacheHandlers:l,nodeTransforms:s,directiveTransforms:o,transformHoist:a,isBuiltInComponent:c,isCustomElement:u,expressionPlugins:d,scopeId:h,slotted:f,ssr:p,inSSR:m,ssrCssVars:y,bindingMetadata:_,inline:S,isTS:x,onError:C,onWarn:k,compatConfig:T,root:e,helpers:/* @__PURE__ */new Map,components:/* @__PURE__ */new Set,directives:/* @__PURE__ */new Set,hoists:[],imports:[],cached:[],constantCache:/* @__PURE__ */new WeakMap,temps:0,identifiers:/* @__PURE__ */Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent:null,currentNode:e,childIndex:0,inVOnce:!1,helper(e){let t=w.helpers.get(e)||0;return w.helpers.set(e,t+1),e},removeHelper(e){let t=w.helpers.get(e);if(t){let n=t-1;n?w.helpers.set(e,n):w.helpers.delete(e)}},helperString:e=>`_${sQ[w.helper(e)]}`,replaceNode(e){w.parent.children[w.childIndex]=w.currentNode=e},removeNode(e){let t=w.parent.children,n=e?t.indexOf(e):w.currentNode?w.childIndex:-1;e&&e!==w.currentNode?w.childIndex>n&&(w.childIndex--,w.onNodeRemoved()):(w.currentNode=null,w.onNodeRemoved()),w.parent.children.splice(n,1)},onNodeRemoved:b,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){P(e)&&(e=s6(e)),w.hoists.push(e);let t=s6(`_hoisted_${w.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache(e,t=!1){let n=function(e,t,n=!1){return{type:20,index:e,value:t,needPauseTracking:n,needArraySpread:!1,loc:sZ}}(w.cached.length,e,t);return w.cached.push(n),n}};return w}(e,t);ar(e,n),t.hoistStatic&&function e(t,n,r,i=!1,l=!1){let{children:s}=t,o=[];for(let n=0;n0){if(e>=2){a.codegenNode.patchFlag=-1,o.push(a);continue}}else{let e=a.codegenNode;if(13===e.type){let t=e.patchFlag;if((void 0===t||512===t||1===t)&&at(a,r)>=2){let t=an(a);t&&(e.props=r.hoist(t))}e.dynamicProps&&(e.dynamicProps=r.hoist(e.dynamicProps))}}}else if(12===a.type&&(i?0:o7(a,r))>=2){o.push(a);continue}if(1===a.type){let n=1===a.tagType;n&&r.scopes.vSlot++,e(a,t,r,!1,l),n&&r.scopes.vSlot--}else if(11===a.type)e(a,t,r,1===a.children.length,!0);else if(9===a.type)for(let n=0;ne.key===t||e.key.content===t);return n&&n.value}}o.length&&r.transformHoist&&r.transformHoist(s,r,t)}(e,void 0,n,o9(e,e.children[0])),t.ssr||function(e,t){let{helper:n}=t,{children:r}=e;if(1===r.length){let n=r[0];if(o9(e,n)&&n.codegenNode){let r=n.codegenNode;13===r.type&&s9(r,t),e.codegenNode=r}else e.codegenNode=n}else r.length>1&&(e.codegenNode=sY(t,n(sh),void 0,e.children,64,void 0,void 0,!0,void 0,!1))}(e,n),e.helpers=/* @__PURE__ */new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0}(l,C({},i,{nodeTransforms:[...s,...t.nodeTransforms||[]],directiveTransforms:C({},o,t.directiveTransforms||{})})),function(e,t={}){let n=function(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:r=!1,filename:i="template.vue.html",scopeId:l=null,optimizeImports:s=!1,runtimeGlobalName:o="Vue",runtimeModuleName:a="vue",ssrRuntimeModuleName:c="vue/server-renderer",ssr:u=!1,isTS:d=!1,inSSR:h=!1}){let f={mode:t,prefixIdentifiers:n,sourceMap:r,filename:i,scopeId:l,optimizeImports:s,runtimeGlobalName:o,runtimeModuleName:a,ssrRuntimeModuleName:c,ssr:u,isTS:d,inSSR:h,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${sQ[e]}`,push(e,t=-2,n){f.code+=e},indent(){p(++f.indentLevel)},deindent(e=!1){e?--f.indentLevel:p(--f.indentLevel)},newline(){p(f.indentLevel)}};function p(e){f.push("\n"+" ".repeat(e),0)}return f}(e,t);t.onContextCreated&&t.onContextCreated(n);let{mode:r,push:i,prefixIdentifiers:l,indent:s,deindent:o,newline:a,scopeId:c,ssr:u}=n,d=Array.from(e.helpers),h=d.length>0,f=!l&&"module"!==r;(function(e,t){let{ssr:n,prefixIdentifiers:r,push:i,newline:l,runtimeModuleName:s,runtimeGlobalName:o,ssrRuntimeModuleName:a}=t,c=Array.from(e.helpers);if(c.length>0&&(i(`const _Vue = ${o} +`,-1),e.hoists.length)){let e=[s_,sS,sx,sC,sk].filter(e=>c.includes(e)).map(as).join(", ");i(`const { ${e} } = _Vue +`,-1)}(function(e,t){if(!e.length)return;t.pure=!0;let{push:n,newline:r}=t;r();for(let i=0;i0)&&a()),e.directives.length&&(ao(e.directives,"directive",n),e.temps>0&&a()),e.temps>0){i("let ");for(let t=0;t0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(i(` +`,0),a()),u||i("return "),e.codegenNode?au(e.codegenNode,n):i("null"),f&&(o(),i("}")),o(),i("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}(l,i)}(e,C({},aQ,t,{nodeTransforms:[a4,...a8,...t.nodeTransforms||[]],directiveTransforms:C({},a5,t.directiveTransforms||{}),transformHoist:null}))}(e,s),a=Function(o)();return a._rc=!0,i[r]=a}return iZ(a7),e.BaseTransition=nO,e.BaseTransitionPropsValidators=nE,e.Comment=ib,e.DeprecationTypes=null,e.EffectScope=eS,e.ErrorCodes={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},e.ErrorTypeStrings=null,e.Fragment=iy,e.KeepAlive={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){let n=iK(),r=n.ctx,i=/* @__PURE__ */new Map,l=/* @__PURE__ */new Set,s=null,o=n.suspense,{renderer:{p:a,m:c,um:u,o:{createElement:d}}}=r,h=d("div");function f(e){n4(e),u(e,n,o,!0)}function p(e){i.forEach((t,n)=>{let r=i6(t.type);r&&!e(r)&&m(n)})}function m(e){let t=i.get(e);!t||s&&iI(t,s)?s&&n4(s):f(t),i.delete(e),l.delete(e)}r.activate=(e,t,n,r,i)=>{let l=e.component;c(e,t,n,0,o),a(l.vnode,e,t,n,l,o,r,e.slotScopeIds,i),rX(()=>{l.isDeactivated=!1,l.a&&Z(l.a);let t=e.props&&e.props.onVnodeMounted;t&&ij(t,l.parent,e)},o)},r.deactivate=e=>{let t=e.component;r6(t.m),r6(t.a),c(e,h,null,1,o),rX(()=>{t.da&&Z(t.da);let n=e.props&&e.props.onVnodeUnmounted;n&&ij(n,t.parent,e),t.isDeactivated=!0},o)},r5(()=>[e.include,e.exclude],([e,t])=>{e&&p(t=>n1(e,t)),t&&p(e=>!n1(t,e))},{flush:"post",deep:!0});let g=null,y=()=>{null!=g&&(ic(n.subTree.type)?rX(()=>{i.set(g,n8(n.subTree))},n.subTree.suspense):i.set(g,n8(n.subTree)))};return re(y),rn(y),rr(()=>{i.forEach(e=>{let{subTree:t,suspense:r}=n,i=n8(t);if(e.type===i.type&&e.key===i.key){n4(i);let e=i.component.da;e&&rX(e,r);return}f(e)})}),()=>{if(g=null,!t.default)return s=null;let n=t.default(),r=n[0];if(n.length>1)return s=null,n;if(!iE(r)||!(4&r.shapeFlag)&&!(128&r.shapeFlag))return s=null,r;let o=n8(r);if(o.type===ib)return s=null,o;let a=o.type,c=i6(nZ(o)?o.type.__asyncResolved||{}:a),{include:u,exclude:d,max:h}=e;if(u&&(!c||!n1(u,c))||d&&c&&n1(d,c))return o.shapeFlag&=-257,s=o,r;let f=null==o.key?a:o.key,p=i.get(f);return o.el&&(o=i$(o),128&r.shapeFlag&&(r.ssContent=o)),g=f,p?(o.el=p.el,o.component=p.component,o.transition&&nD(o,o.transition),o.shapeFlag|=512,l.delete(f),l.add(f)):(l.add(f),h&&l.size>parseInt(h,10)&&m(l.values().next().value)),o.shapeFlag|=256,s=o,ic(r.type)?r:o}}},e.ReactiveEffect=eC,e.Static=i_,e.Suspense={name:"Suspense",__isSuspense:!0,process(e,t,n,r,i,l,s,o,a,c){if(null==e)(function(e,t,n,r,i,l,s,o,a){let{p:c,o:{createElement:u}}=a,d=u("div"),h=e.suspense=ih(e,i,r,t,d,n,l,s,o,a);c(null,h.pendingBranch=e.ssContent,d,null,r,h,l,s),h.deps>0?(id(e,"onPending"),id(e,"onFallback"),c(null,e.ssFallback,t,n,r,null,l,s),ig(h,e.ssFallback)):h.resolve(!1,!0)})(t,n,r,i,l,s,o,a,c);else{if(l&&l.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}(function(e,t,n,r,i,l,s,o,{p:a,um:c,o:{createElement:u}}){let d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;let h=t.ssContent,f=t.ssFallback,{activeBranch:p,pendingBranch:m,isInFallback:g,isHydrating:y}=d;if(m)d.pendingBranch=h,iI(h,m)?(a(m,h,d.hiddenContainer,null,i,d,l,s,o),d.deps<=0?d.resolve():g&&!y&&(a(p,f,n,r,i,null,l,s,o),ig(d,f))):(d.pendingId=iu++,y?(d.isHydrating=!1,d.activeBranch=m):c(m,i,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),g?(a(null,h,d.hiddenContainer,null,i,d,l,s,o),d.deps<=0?d.resolve():(a(p,f,n,r,i,null,l,s,o),ig(d,f))):p&&iI(h,p)?(a(p,h,n,r,i,d,l,s,o),d.resolve(!0)):(a(null,h,d.hiddenContainer,null,i,d,l,s,o),d.deps<=0&&d.resolve()));else if(p&&iI(h,p))a(p,h,n,r,i,d,l,s,o),ig(d,h);else if(id(t,"onPending"),d.pendingBranch=h,512&h.shapeFlag?d.pendingId=h.component.suspenseId:d.pendingId=iu++,a(null,h,d.hiddenContainer,null,i,d,l,s,o),d.deps<=0)d.resolve();else{let{timeout:e,pendingId:t}=d;e>0?setTimeout(()=>{d.pendingId===t&&d.fallback(f)},e):0===e&&d.fallback(f)}})(e,t,n,r,i,s,o,a,c)}},hydrate:function(e,t,n,r,i,l,s,o,a){let c=t.suspense=ih(t,r,n,e.parentNode,document.createElement("div"),null,i,l,s,o,!0),u=a(e,c.pendingBranch=t.ssContent,n,c,l,s);return 0===c.deps&&c.resolve(!1,!0),u},normalize:function(e){let{shapeFlag:t,children:n}=e,r=32&t;e.ssContent=ip(r?n.default:n),e.ssFallback=r?ip(n.fallback):iM(ib)}},e.Teleport={name:"Teleport",__isTeleport:!0,process(e,t,n,r,i,l,s,o,a,c){let{mc:u,pc:d,pbc:h,o:{insert:f,querySelector:p,createText:m,createComment:g}}=c,y=ny(t.props),{shapeFlag:b,children:_,dynamicChildren:S}=t;if(null==e){let e=t.el=m(""),c=t.anchor=m("");f(e,n,r),f(c,n,r);let d=(e,t)=>{16&b&&(i&&i.isCE&&(i.ce._teleportTarget=e),u(_,e,t,i,l,s,o,a))},h=()=>{let e=t.target=nS(t.props,p),n=nk(e,t,m,f);e&&("svg"!==s&&nb(e)?s="svg":"mathml"!==s&&n_(e)&&(s="mathml"),y||(d(e,n),nC(t)))};y&&(d(n,c),nC(t)),nv(t.props)?rX(h,l):h()}else{t.el=e.el,t.targetStart=e.targetStart;let r=t.anchor=e.anchor,u=t.target=e.target,f=t.targetAnchor=e.targetAnchor,m=ny(e.props),g=m?n:u;if("svg"===s||nb(u)?s="svg":("mathml"===s||n_(u))&&(s="mathml"),S?(h(e.dynamicChildren,S,g,i,l,s,o),r2(e,t,!0)):a||d(e,t,g,m?r:f,i,l,s,o,!1),y)m?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):nx(t,n,r,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=t.target=nS(t.props,p);e&&nx(t,e,null,c,0)}else m&&nx(t,u,f,c,1);nC(t)}},remove(e,t,n,{um:r,o:{remove:i}},l){let{shapeFlag:s,children:o,anchor:a,targetStart:c,targetAnchor:u,target:d,props:h}=e;if(d&&(i(c),i(u)),l&&i(a),16&s){let e=l||!ny(h);for(let i=0;ie[r]});return n},e.createRenderer=function(e){return rZ(e)},e.createSSRApp=sc,e.createSlots=function(e,t){for(let n=0;n{let t=r.fn(...e);return t&&(t.key=r.key),t}:r.fn)}return e},e.createStaticVNode=function(e,t){let n=iM(i_,null,e);return n.staticCount=t,n},e.createTextVNode=iD,e.createVNode=iM,e.customRef=tK,e.defineAsyncComponent=/*! #__NO_SIDE_EFFECTS__ */function(e){let t;O(e)&&(e={loader:e});let{loader:n,loadingComponent:r,errorComponent:i,delay:l=200,hydrate:s,timeout:o,suspensible:a=!0,onError:c}=e,u=null,d=0,h=()=>(d++,u=null,f()),f=()=>{let e;return u||(e=u=n().catch(e=>{if(e=e instanceof Error?e:Error(String(e)),c)return new Promise((t,n)=>{c(e,()=>t(h()),()=>n(e),d+1)});throw e}).then(n=>e!==u&&u?u:(n&&(n.__esModule||"Module"===n[Symbol.toStringTag])&&(n=n.default),t=n,n)))};return nV({name:"AsyncComponentWrapper",__asyncLoader:f,__asyncHydrate(e,n,r){let i=s?()=>{let t=s(r,t=>(function(e,t){if(nz(e)&&"["===e.data){let n=1,r=e.nextSibling;for(;r;){if(1===r.nodeType)t(r);else if(nz(r)){if("]"===r.data){if(0==--n)break}else"["===r.data&&n++}r=r.nextSibling}}else t(e)})(e,t));t&&(n.bum||(n.bum=[])).push(t)}:r;t?i():f().then(()=>!n.isUnmounted&&i())},get __asyncResolved(){return t},setup(){let e=iW;if(nB(e),t)return()=>nY(t,e);let n=t=>{u=null,t6(t,e,13,!i)};if(a&&e.suspense)return f().then(t=>()=>nY(t,e)).catch(e=>(n(e),()=>i?iM(i,{error:e}):null));let s=tF(!1),c=tF(),d=tF(!!l);return l&&setTimeout(()=>{d.value=!1},l),null!=o&&setTimeout(()=>{if(!s.value&&!c.value){let e=Error(`Async component timed out after ${o}ms.`);n(e),c.value=e}},o),f().then(()=>{s.value=!0,e.parent&&n0(e.parent.vnode)&&e.parent.update()}).catch(e=>{n(e),c.value=e}),()=>s.value&&t?nY(t,e):c.value&&i?iM(i,{error:c.value}):r&&!d.value?iM(r):void 0}})},e.defineComponent=nV,e.defineCustomElement=lB,e.defineEmits=function(){return null},e.defineExpose=function(e){},e.defineModel=function(){},e.defineOptions=function(e){},e.defineProps=function(){return null},e.defineSSRCustomElement=(e,t)=>/* @__PURE__ */lB(e,t,sc),e.defineSlots=function(){return null},e.devtools=void 0,e.effect=function(e,t){e.effect instanceof eC&&(e=e.effect.fn);let n=new eC(e);t&&C(n,t);try{n.run()}catch(e){throw n.stop(),e}let r=n.run.bind(n);return r.effect=n,r},e.effectScope=function(e){return new eS(e)},e.getCurrentInstance=iK,e.getCurrentScope=function(){return i},e.getCurrentWatcher=function(){return f},e.getTransitionRawChildren=nF,e.guardReactiveProps=iL,e.h=i4,e.handleError=t6,e.hasInjectionContext=function(){return!!(iW||nu||rO)},e.hydrate=(...e)=>{ss().hydrate(...e)},e.hydrateOnIdle=(e=1e4)=>t=>{let n=requestIdleCallback(t,{timeout:e});return()=>cancelIdleCallback(n)},e.hydrateOnInteraction=(e=[])=>(t,n)=>{P(e)&&(e=[e]);let r=!1,i=e=>{r||(r=!0,l(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},l=()=>{n(t=>{for(let n of e)t.removeEventListener(n,i)})};return n(t=>{for(let n of e)t.addEventListener(n,i,{once:!0})}),l},e.hydrateOnMediaQuery=e=>t=>{if(e){let n=matchMedia(e);if(!n.matches)return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t);t()}},e.hydrateOnVisible=e=>(t,n)=>{let r=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){r.disconnect(),t();break}},e);return n(e=>r.observe(e)),()=>r.disconnect()},e.initCustomFormatter=function(){},e.initDirectivesForSSR=b,e.inject=rM,e.isMemoSame=i8,e.isProxy=tO,e.isReactive=tE,e.isReadonly=tI,e.isRef=tD,e.isRuntimeOnly=()=>!c,e.isShallow=tR,e.isVNode=iE,e.markRaw=tM,e.mergeDefaults=function(e,t){let n=rb(e);for(let e in t){if(e.startsWith("__skip"))continue;let r=n[e];r?w(r)||O(r)?r=n[e]={type:r,default:t[e]}:r.default=t[e]:null===r&&(r=n[e]={default:t[e]}),r&&t[`__skip_${e}`]&&(r.skipFactory=!0)}return n},e.mergeModels=function(e,t){return e&&t?w(e)&&w(t)?e.concat(t):C({},rb(e),rb(t)):e||t},e.mergeProps=iU,e.nextTick=nr,e.normalizeClass=ec,e.normalizeProps=function(e){if(!e)return null;let{class:t,style:n}=e;return t&&!P(t)&&(e.class=ec(t)),n&&(e.style=ei(n)),e},e.normalizeStyle=ei,e.onActivated=n2,e.onBeforeMount=n7,e.onBeforeUnmount=rr,e.onBeforeUpdate=rt,e.onDeactivated=n6,e.onErrorCaptured=ra,e.onMounted=re,e.onRenderTracked=ro,e.onRenderTriggered=rs,e.onScopeDispose=function(e,t=!1){i&&i.cleanups.push(e)},e.onServerPrefetch=rl,e.onUnmounted=ri,e.onUpdated=rn,e.onWatcherCleanup=tY,e.openBlock=iC,e.popScopeId=function(){nd=null},e.provide=rP,e.proxyRefs=tq,e.pushScopeId=function(e){nd=e},e.queuePostFlushCb=ns,e.reactive=tT,e.readonly=tw,e.ref=tF,e.registerRuntimeCompiler=iZ,e.render=so,e.renderList=function(e,t,n,r){let i;let l=n&&n[r],s=w(e);if(s||P(e)){let n=s&&tE(e),r=!1;n&&(r=!tR(e),e=eK(e)),i=Array(e.length);for(let n=0,s=e.length;nt(e,n,void 0,l&&l[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,s=n.length;r!iE(t)||!!(t.type!==ib&&(t.type!==iy||e(t.children))))?t:null}(l(n)),o=iA(iy,{key:(n.key||s&&s.key||`_${t}`)+(!s&&r?"_fb":"")},s||(r?r():[]),s&&1===e._?64:-2);return!i&&o.scopeId&&(o.slotScopeIds=[o.scopeId+"-s"]),l&&l._c&&(l._d=!0),o},e.resolveComponent=function(e,t){return rd(rc,e,!0,t)||e},e.resolveDirective=function(e){return rd("directives",e)},e.resolveDynamicComponent=function(e){return P(e)?rd(rc,e,!1)||e:e||ru},e.resolveFilter=null,e.resolveTransitionHooks=nM,e.setBlockTracking=iN,e.setDevtoolsHook=b,e.setTransitionHooks=nD,e.shallowReactive=tN,e.shallowReadonly=function(e){return tA(e,!0,e7,t_,tk)},e.shallowRef=tV,e.ssrContextKey=r3,e.ssrUtils=null,e.stop=function(e){e.effect.stop()},e.toDisplayString=ev,e.toHandlerKey=X,e.toHandlers=function(e,t){let n={};for(let r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:X(r)]=e[r];return n},e.toRaw=tP,e.toRef=function(e,t,n){return tD(e)?e:O(e)?new tJ(e):L(e)&&arguments.length>1?tG(e,t,n):tF(e)},e.toRefs=function(e){let t=w(e)?Array(e.length):{};for(let n in e)t[n]=tG(e,n);return t},e.toValue=function(e){return O(e)?e():tj(e)},e.transformVNodeArgs=function(e){},e.triggerRef=function(e){e.dep.trigger()},e.unref=tj,e.useAttrs=function(){return rv().attrs},e.useCssModule=function(e="$style"){return g},e.useCssVars=function(e){let t=iK();if(!t)return;let n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(e=>lk(e,n))},r=()=>{let r=e(t.proxy);t.ce?lk(t.ce,r):function e(t,n){if(128&t.shapeFlag){let r=t.suspense;t=r.activeBranch,r.pendingBranch&&!r.isHydrating&&r.effects.push(()=>{e(r.activeBranch,n)})}for(;t.component;)t=t.component.subTree;if(1&t.shapeFlag&&t.el)lk(t.el,n);else if(t.type===iy)t.children.forEach(t=>e(t,n));else if(t.type===i_){let{el:e,anchor:r}=t;for(;e&&(lk(e,n),e!==r);)e=e.nextSibling}}(t.subTree,r),n(r)};n7(()=>{r4(r)}),re(()=>{let e=new MutationObserver(r);e.observe(t.subTree.el.parentNode,{childList:!0}),ri(()=>e.disconnect())})},e.useHost=lH,e.useId=function(){let e=iK();if(e)return(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++},e.useModel=function(e,t,n=g){let r=iK(),i=K(t),l=J(t),s=ie(e,t),o=tK((s,o)=>{let a,c;let u=g;return r8(()=>{let n=e[t];Q(a,n)&&(a=n,o())}),{get:()=>(s(),n.get?n.get(a):a),set(e){let s=n.set?n.set(e):e;if(!Q(s,a)&&!(u!==g&&Q(e,u)))return;let d=r.vnode.props;d&&(t in d||i in d||l in d)&&(`onUpdate:${t}` in d||`onUpdate:${i}` in d||`onUpdate:${l}` in d)||(a=e,o()),r.emit(`update:${t}`,s),Q(e,s)&&Q(e,u)&&!Q(s,c)&&o(),u=e,c=s}}});return o[Symbol.iterator]=()=>{let e=0;return{next:()=>e<2?{value:e++?s||g:o,done:!1}:{done:!0}}},o},e.useSSRContext=()=>{},e.useShadowRoot=function(){let e=lH();return e&&e.shadowRoot},e.useSlots=function(){return rv().slots},e.useTemplateRef=function(e){let t=iK(),n=tV(null);return t&&Object.defineProperty(t.refs===g?t.refs={}:t.refs,e,{enumerable:!0,get:()=>n.value,set:e=>n.value=e}),n},e.useTransitionState=nw,e.vModelCheckbox=l6,e.vModelDynamic={created(e,t,n){se(e,t,n,null,"created")},mounted(e,t,n){se(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){se(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){se(e,t,n,r,"updated")}},e.vModelRadio=l4,e.vModelSelect=l8,e.vModelText=l2,e.vShow={beforeMount(e,{value:t},{transition:n}){e[l_]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):lx(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),lx(e,!0),r.enter(e)):r.leave(e,()=>{lx(e,!1)}):lx(e,t))},beforeUnmount(e,{value:t}){lx(e,t)}},e.version=i5,e.warn=b,e.watch=function(e,t,n){return r5(e,t,n)},e.watchEffect=function(e,t){return r5(e,null,t)},e.watchPostEffect=r4,e.watchSyncEffect=r8,e.withAsyncContext=function(e){let t=iK(),n=e();return iJ(),$(n)&&(n=n.catch(e=>{throw iz(t),e})),[n,()=>iz(t)]},e.withCtx=nf,e.withDefaults=function(e,t){return null},e.withDirectives=function(e,t){if(null===nu)return e;let n=i2(nu),r=e.dirs||(e.dirs=[]);for(let e=0;e{let n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=n=>{if(!("key"in n))return;let r=J(n.key);if(t.some(e=>e===r||sr[e]===r))return e(n)})},e.withMemo=function(e,t,n,r){let i=n[r];if(i&&i8(i,e))return i;let l=t();return l.memo=e.slice(),l.cacheIndex=r,n[r]=l},e.withModifiers=(e,t)=>{let n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(n,...r)=>{for(let e=0;enf,e}({}); \ No newline at end of file diff --git a/system/typemill/author/js/vue.js b/system/typemill/author/js/vue.js index 3ca1453..756f2dc 100644 --- a/system/typemill/author/js/vue.js +++ b/system/typemill/author/js/vue.js @@ -1,14 +1,17 @@ /** -* vue v3.4.21 +* vue v3.5.5 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ var Vue = (function (exports) { 'use strict'; - function makeMap(str, expectsLowerCase) { - const set = new Set(str.split(",")); - return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val); + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ + function makeMap(str) { + const map = /* @__PURE__ */ Object.create(null); + for (const key of str.split(",")) map[key] = 1; + return (val) => val in map; } const EMPTY_OBJ = Object.freeze({}) ; @@ -62,9 +65,11 @@ var Vue = (function (exports) { }; }; const camelizeRE = /-(\w)/g; - const camelize = cacheStringFunction((str) => { - return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); - }); + const camelize = cacheStringFunction( + (str) => { + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); + } + ); const hyphenateRE = /\B([A-Z])/g; const hyphenate = cacheStringFunction( (str) => str.replace(hyphenateRE, "-$1").toLowerCase() @@ -72,20 +77,23 @@ var Vue = (function (exports) { const capitalize = cacheStringFunction((str) => { return str.charAt(0).toUpperCase() + str.slice(1); }); - const toHandlerKey = cacheStringFunction((str) => { - const s = str ? `on${capitalize(str)}` : ``; - return s; - }); + const toHandlerKey = cacheStringFunction( + (str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; + } + ); const hasChanged = (value, oldValue) => !Object.is(value, oldValue); - const invokeArrayFns = (fns, arg) => { + const invokeArrayFns = (fns, ...arg) => { for (let i = 0; i < fns.length; i++) { - fns[i](arg); + fns[i](...arg); } }; - const def = (obj, key, value) => { + const def = (obj, key, value, writable = false) => { Object.defineProperty(obj, key, { configurable: true, enumerable: false, + writable, value }); }; @@ -125,11 +133,14 @@ var Vue = (function (exports) { [3]: "FORWARDED" }; - const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error"; + const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol"; const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); const range = 2; function generateCodeFrame(source, start = 0, end = source.length) { + start = Math.max(0, Math.min(start, source.length)); + end = Math.max(0, Math.min(end, source.length)); + if (start > end) return ""; let lines = source.split(/(\r?\n)/); const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); lines = lines.filter((_, idx) => idx % 2 === 0); @@ -139,8 +150,7 @@ var Vue = (function (exports) { count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); if (count >= start) { for (let j = i - range; j <= i + range || end > count; j++) { - if (j < 0 || j >= lines.length) - continue; + if (j < 0 || j >= lines.length) continue; const line = j + 1; res.push( `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}` @@ -205,8 +215,8 @@ var Vue = (function (exports) { } for (const key in styles) { const value = styles[key]; - const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); if (isString(value) || typeof value === "number") { + const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); ret += `${normalizedKey}:${value};`; } } @@ -233,8 +243,7 @@ var Vue = (function (exports) { return res.trim(); } function normalizeProps(props) { - if (!props) - return null; + if (!props) return null; let { class: klass, style } = props; if (klass && !isString(klass)) { props.class = normalizeClass(klass); @@ -276,9 +285,16 @@ var Vue = (function (exports) { return type === "string" || type === "number" || type === "boolean"; } + const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g; + function getEscapedCssVarName(key, doubleEscape) { + return key.replace( + cssVarNameEscapeSymbolsRE, + (s) => `\\${s}` + ); + } + function looseCompareArrays(a, b) { - if (a.length !== b.length) - return false; + if (a.length !== b.length) return false; let equal = true; for (let i = 0; equal && i < a.length; i++) { equal = looseEqual(a[i], b[i]); @@ -286,8 +302,7 @@ var Vue = (function (exports) { return equal; } function looseEqual(a, b) { - if (a === b) - return true; + if (a === b) return true; let aValidType = isDate(a); let bValidType = isDate(b); if (aValidType || bValidType) { @@ -328,11 +343,14 @@ var Vue = (function (exports) { return arr.findIndex((item) => looseEqual(item, val)); } + const isRef$1 = (val) => { + return !!(val && val["__v_isRef"] === true); + }; const toDisplayString = (val) => { - return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val); }; const replacer = (_key, val) => { - if (val && val.__v_isRef) { + if (isRef$1(val)) { return replacer(_key, val.value); } else if (isMap(val)) { return { @@ -357,7 +375,11 @@ var Vue = (function (exports) { }; const stringifySymbol = (v, i = "") => { var _a; - return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v; + return ( + // Symbol.description in es2019+ so we need to cast here to pass + // the lib: es2016 check + isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v + ); }; function warn$2(msg, ...args) { @@ -380,6 +402,7 @@ var Vue = (function (exports) { * @internal */ this.cleanups = []; + this._isPaused = false; this.parent = activeEffectScope; if (!detached && activeEffectScope) { this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( @@ -390,6 +413,39 @@ var Vue = (function (exports) { get active() { return this._active; } + pause() { + if (this._active) { + this._isPaused = true; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].pause(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].pause(); + } + } + } + /** + * Resumes the effect scope, including all child scopes and effects. + */ + resume() { + if (this._active) { + if (this._isPaused) { + this._isPaused = false; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].resume(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].resume(); + } + } + } + } run(fn) { if (this._active) { const currentEffectScope = activeEffectScope; @@ -446,157 +502,287 @@ var Vue = (function (exports) { function effectScope(detached) { return new EffectScope(detached); } - function recordEffectScope(effect, scope = activeEffectScope) { - if (scope && scope.active) { - scope.effects.push(effect); - } - } function getCurrentScope() { return activeEffectScope; } - function onScopeDispose(fn) { + function onScopeDispose(fn, failSilently = false) { if (activeEffectScope) { activeEffectScope.cleanups.push(fn); - } else { + } else if (!failSilently) { warn$2( `onScopeDispose() is called when there is no active effect scope to be associated with.` ); } } - let activeEffect; + let activeSub; + const pausedQueueEffects = /* @__PURE__ */ new WeakSet(); class ReactiveEffect { - constructor(fn, trigger, scheduler, scope) { + constructor(fn) { this.fn = fn; - this.trigger = trigger; - this.scheduler = scheduler; - this.active = true; - this.deps = []; /** * @internal */ - this._dirtyLevel = 4; + this.deps = void 0; /** * @internal */ - this._trackId = 0; + this.depsTail = void 0; /** * @internal */ - this._runnings = 0; + this.flags = 1 | 4; /** * @internal */ - this._shouldSchedule = false; + this.nextEffect = void 0; /** * @internal */ - this._depsLength = 0; - recordEffectScope(this, scope); - } - get dirty() { - if (this._dirtyLevel === 2 || this._dirtyLevel === 3) { - this._dirtyLevel = 1; - pauseTracking(); - for (let i = 0; i < this._depsLength; i++) { - const dep = this.deps[i]; - if (dep.computed) { - triggerComputed(dep.computed); - if (this._dirtyLevel >= 4) { - break; - } - } - } - if (this._dirtyLevel === 1) { - this._dirtyLevel = 0; - } - resetTracking(); + this.cleanup = void 0; + this.scheduler = void 0; + if (activeEffectScope && activeEffectScope.active) { + activeEffectScope.effects.push(this); } - return this._dirtyLevel >= 4; } - set dirty(v) { - this._dirtyLevel = v ? 4 : 0; + pause() { + this.flags |= 64; + } + resume() { + if (this.flags & 64) { + this.flags &= ~64; + if (pausedQueueEffects.has(this)) { + pausedQueueEffects.delete(this); + this.trigger(); + } + } + } + /** + * @internal + */ + notify() { + if (this.flags & 2 && !(this.flags & 32)) { + return; + } + if (!(this.flags & 8)) { + this.flags |= 8; + this.nextEffect = batchedEffect; + batchedEffect = this; + } } run() { - this._dirtyLevel = 0; - if (!this.active) { + if (!(this.flags & 1)) { return this.fn(); } - let lastShouldTrack = shouldTrack; - let lastEffect = activeEffect; + this.flags |= 2; + cleanupEffect(this); + prepareDeps(this); + const prevEffect = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = this; + shouldTrack = true; try { - shouldTrack = true; - activeEffect = this; - this._runnings++; - preCleanupEffect(this); return this.fn(); } finally { - postCleanupEffect(this); - this._runnings--; - activeEffect = lastEffect; - shouldTrack = lastShouldTrack; + if (activeSub !== this) { + warn$2( + "Active effect was not restored correctly - this is likely a Vue internal bug." + ); + } + cleanupDeps(this); + activeSub = prevEffect; + shouldTrack = prevShouldTrack; + this.flags &= ~2; } } stop() { - var _a; - if (this.active) { - preCleanupEffect(this); - postCleanupEffect(this); - (_a = this.onStop) == null ? void 0 : _a.call(this); - this.active = false; + if (this.flags & 1) { + for (let link = this.deps; link; link = link.nextDep) { + removeSub(link); + } + this.deps = this.depsTail = void 0; + cleanupEffect(this); + this.onStop && this.onStop(); + this.flags &= ~1; + } + } + trigger() { + if (this.flags & 64) { + pausedQueueEffects.add(this); + } else if (this.scheduler) { + this.scheduler(); + } else { + this.runIfDirty(); + } + } + /** + * @internal + */ + runIfDirty() { + if (isDirty(this)) { + this.run(); + } + } + get dirty() { + return isDirty(this); + } + } + let batchDepth = 0; + let batchedEffect; + function startBatch() { + batchDepth++; + } + function endBatch() { + if (--batchDepth > 0) { + return; + } + let error; + while (batchedEffect) { + let e = batchedEffect; + batchedEffect = void 0; + while (e) { + const next = e.nextEffect; + e.nextEffect = void 0; + e.flags &= ~8; + if (e.flags & 1) { + try { + e.trigger(); + } catch (err) { + if (!error) error = err; + } + } + e = next; + } + } + if (error) throw error; + } + function prepareDeps(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + link.version = -1; + link.prevActiveLink = link.dep.activeLink; + link.dep.activeLink = link; + } + } + function cleanupDeps(sub) { + let head; + let tail = sub.depsTail; + let link = tail; + while (link) { + const prev = link.prevDep; + if (link.version === -1) { + if (link === tail) tail = prev; + removeSub(link); + removeDep(link); + } else { + head = link; + } + link.dep.activeLink = link.prevActiveLink; + link.prevActiveLink = void 0; + link = prev; + } + sub.deps = head; + sub.depsTail = tail; + } + function isDirty(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + if (link.dep.version !== link.version || link.dep.computed && refreshComputed(link.dep.computed) || link.dep.version !== link.version) { + return true; + } + } + if (sub._dirty) { + return true; + } + return false; + } + function refreshComputed(computed) { + if (computed.flags & 4 && !(computed.flags & 16)) { + return; + } + computed.flags &= ~16; + if (computed.globalVersion === globalVersion) { + return; + } + computed.globalVersion = globalVersion; + const dep = computed.dep; + computed.flags |= 2; + if (dep.version > 0 && !computed.isSSR && !isDirty(computed)) { + computed.flags &= ~2; + return; + } + const prevSub = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = computed; + shouldTrack = true; + try { + prepareDeps(computed); + const value = computed.fn(computed._value); + if (dep.version === 0 || hasChanged(value, computed._value)) { + computed._value = value; + dep.version++; + } + } catch (err) { + dep.version++; + throw err; + } finally { + activeSub = prevSub; + shouldTrack = prevShouldTrack; + cleanupDeps(computed); + computed.flags &= ~2; + } + } + function removeSub(link) { + const { dep, prevSub, nextSub } = link; + if (prevSub) { + prevSub.nextSub = nextSub; + link.prevSub = void 0; + } + if (nextSub) { + nextSub.prevSub = prevSub; + link.nextSub = void 0; + } + if (dep.subs === link) { + dep.subs = prevSub; + } + if (!dep.subs && dep.computed) { + dep.computed.flags &= ~4; + for (let l = dep.computed.deps; l; l = l.nextDep) { + removeSub(l); } } } - function triggerComputed(computed) { - return computed.value; - } - function preCleanupEffect(effect2) { - effect2._trackId++; - effect2._depsLength = 0; - } - function postCleanupEffect(effect2) { - if (effect2.deps.length > effect2._depsLength) { - for (let i = effect2._depsLength; i < effect2.deps.length; i++) { - cleanupDepEffect(effect2.deps[i], effect2); - } - effect2.deps.length = effect2._depsLength; + function removeDep(link) { + const { prevDep, nextDep } = link; + if (prevDep) { + prevDep.nextDep = nextDep; + link.prevDep = void 0; } - } - function cleanupDepEffect(dep, effect2) { - const trackId = dep.get(effect2); - if (trackId !== void 0 && effect2._trackId !== trackId) { - dep.delete(effect2); - if (dep.size === 0) { - dep.cleanup(); - } + if (nextDep) { + nextDep.prevDep = prevDep; + link.nextDep = void 0; } } function effect(fn, options) { if (fn.effect instanceof ReactiveEffect) { fn = fn.effect.fn; } - const _effect = new ReactiveEffect(fn, NOOP, () => { - if (_effect.dirty) { - _effect.run(); - } - }); + const e = new ReactiveEffect(fn); if (options) { - extend(_effect, options); - if (options.scope) - recordEffectScope(_effect, options.scope); + extend(e, options); } - if (!options || !options.lazy) { - _effect.run(); + try { + e.run(); + } catch (err) { + e.stop(); + throw err; } - const runner = _effect.run.bind(_effect); - runner.effect = _effect; + const runner = e.run.bind(e); + runner.effect = e; return runner; } function stop(runner) { runner.effect.stop(); } let shouldTrack = true; - let pauseScheduleStack = 0; const trackStack = []; function pauseTracking() { trackStack.push(shouldTrack); @@ -606,193 +792,424 @@ var Vue = (function (exports) { const last = trackStack.pop(); shouldTrack = last === void 0 ? true : last; } - function pauseScheduling() { - pauseScheduleStack++; - } - function resetScheduling() { - pauseScheduleStack--; - while (!pauseScheduleStack && queueEffectSchedulers.length) { - queueEffectSchedulers.shift()(); + function cleanupEffect(e) { + const { cleanup } = e; + e.cleanup = void 0; + if (cleanup) { + const prevSub = activeSub; + activeSub = void 0; + try { + cleanup(); + } finally { + activeSub = prevSub; + } } } - function trackEffect(effect2, dep, debuggerEventExtraInfo) { - var _a; - if (dep.get(effect2) !== effect2._trackId) { - dep.set(effect2, effect2._trackId); - const oldDep = effect2.deps[effect2._depsLength]; - if (oldDep !== dep) { - if (oldDep) { - cleanupDepEffect(oldDep, effect2); - } - effect2.deps[effect2._depsLength++] = dep; - } else { - effect2._depsLength++; - } + + let globalVersion = 0; + class Link { + constructor(sub, dep) { + this.sub = sub; + this.dep = dep; + this.version = dep.version; + this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0; + } + } + class Dep { + constructor(computed) { + this.computed = computed; + this.version = 0; + /** + * Link between this dep and the current active effect + */ + this.activeLink = void 0; + /** + * Doubly linked list representing the subscribing effects (tail) + */ + this.subs = void 0; { - (_a = effect2.onTrack) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); + this.subsHead = void 0; } } - } - const queueEffectSchedulers = []; - function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) { - var _a; - pauseScheduling(); - for (const effect2 of dep.keys()) { - let tracking; - if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) { - effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0); - effect2._dirtyLevel = dirtyLevel; + track(debugInfo) { + if (!activeSub || !shouldTrack || activeSub === this.computed) { + return; } - if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) { - { - (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); + let link = this.activeLink; + if (link === void 0 || link.sub !== activeSub) { + link = this.activeLink = new Link(activeSub, this); + if (!activeSub.deps) { + activeSub.deps = activeSub.depsTail = link; + } else { + link.prevDep = activeSub.depsTail; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; } - effect2.trigger(); - if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) { - effect2._shouldSchedule = false; - if (effect2.scheduler) { - queueEffectSchedulers.push(effect2.scheduler); + if (activeSub.flags & 4) { + addSub(link); + } + } else if (link.version === -1) { + link.version = this.version; + if (link.nextDep) { + const next = link.nextDep; + next.prevDep = link.prevDep; + if (link.prevDep) { + link.prevDep.nextDep = next; + } + link.prevDep = activeSub.depsTail; + link.nextDep = void 0; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + if (activeSub.deps === link) { + activeSub.deps = next; } } } + if (activeSub.onTrack) { + activeSub.onTrack( + extend( + { + effect: activeSub + }, + debugInfo + ) + ); + } + return link; + } + trigger(debugInfo) { + this.version++; + globalVersion++; + this.notify(debugInfo); + } + notify(debugInfo) { + startBatch(); + try { + if (true) { + for (let head = this.subsHead; head; head = head.nextSub) { + if (head.sub.onTrigger && !(head.sub.flags & 8)) { + head.sub.onTrigger( + extend( + { + effect: head.sub + }, + debugInfo + ) + ); + } + } + } + for (let link = this.subs; link; link = link.prevSub) { + link.sub.notify(); + } + } finally { + endBatch(); + } } - resetScheduling(); } - - const createDep = (cleanup, computed) => { - const dep = /* @__PURE__ */ new Map(); - dep.cleanup = cleanup; - dep.computed = computed; - return dep; - }; - + function addSub(link) { + const computed = link.dep.computed; + if (computed && !link.dep.subs) { + computed.flags |= 4 | 16; + for (let l = computed.deps; l; l = l.nextDep) { + addSub(l); + } + } + const currentTail = link.dep.subs; + if (currentTail !== link) { + link.prevSub = currentTail; + if (currentTail) currentTail.nextSub = link; + } + if (link.dep.subsHead === void 0) { + link.dep.subsHead = link; + } + link.dep.subs = link; + } const targetMap = /* @__PURE__ */ new WeakMap(); - const ITERATE_KEY = Symbol("iterate" ); - const MAP_KEY_ITERATE_KEY = Symbol("Map key iterate" ); + const ITERATE_KEY = Symbol( + "Object iterate" + ); + const MAP_KEY_ITERATE_KEY = Symbol( + "Map keys iterate" + ); + const ARRAY_ITERATE_KEY = Symbol( + "Array iterate" + ); function track(target, type, key) { - if (shouldTrack && activeEffect) { + if (shouldTrack && activeSub) { let depsMap = targetMap.get(target); if (!depsMap) { targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); } let dep = depsMap.get(key); if (!dep) { - depsMap.set(key, dep = createDep(() => depsMap.delete(key))); + depsMap.set(key, dep = new Dep()); } - trackEffect( - activeEffect, - dep, - { + { + dep.track({ target, type, key - } - ); + }); + } } } function trigger(target, type, key, newValue, oldValue, oldTarget) { const depsMap = targetMap.get(target); if (!depsMap) { + globalVersion++; return; } - let deps = []; - if (type === "clear") { - deps = [...depsMap.values()]; - } else if (key === "length" && isArray(target)) { - const newLength = Number(newValue); - depsMap.forEach((dep, key2) => { - if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) { - deps.push(dep); - } - }); - } else { - if (key !== void 0) { - deps.push(depsMap.get(key)); - } - switch (type) { - case "add": - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } else if (isIntegerKey(key)) { - deps.push(depsMap.get("length")); - } - break; - case "delete": - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - break; - case "set": - if (isMap(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - } - break; - } - } - pauseScheduling(); - for (const dep of deps) { + const run = (dep) => { if (dep) { - triggerEffects( - dep, - 4, - { + { + dep.trigger({ target, type, key, newValue, oldValue, oldTarget - } - ); + }); + } + } + }; + startBatch(); + if (type === "clear") { + depsMap.forEach(run); + } else { + const targetIsArray = isArray(target); + const isArrayIndex = targetIsArray && isIntegerKey(key); + if (targetIsArray && key === "length") { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) { + run(dep); + } + }); + } else { + if (key !== void 0) { + run(depsMap.get(key)); + } + if (isArrayIndex) { + run(depsMap.get(ARRAY_ITERATE_KEY)); + } + switch (type) { + case "add": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isArrayIndex) { + run(depsMap.get("length")); + } + break; + case "delete": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (isMap(target)) { + run(depsMap.get(ITERATE_KEY)); + } + break; + } } } - resetScheduling(); + endBatch(); } function getDepFromReactive(object, key) { var _a; return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key); } + function reactiveReadArray(array) { + const raw = toRaw(array); + if (raw === array) return raw; + track(raw, "iterate", ARRAY_ITERATE_KEY); + return isShallow(array) ? raw : raw.map(toReactive); + } + function shallowReadArray(arr) { + track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY); + return arr; + } + const arrayInstrumentations = { + __proto__: null, + [Symbol.iterator]() { + return iterator(this, Symbol.iterator, toReactive); + }, + concat(...args) { + return reactiveReadArray(this).concat( + ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x) + ); + }, + entries() { + return iterator(this, "entries", (value) => { + value[1] = toReactive(value[1]); + return value; + }); + }, + every(fn, thisArg) { + return apply(this, "every", fn, thisArg, void 0, arguments); + }, + filter(fn, thisArg) { + return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments); + }, + find(fn, thisArg) { + return apply(this, "find", fn, thisArg, toReactive, arguments); + }, + findIndex(fn, thisArg) { + return apply(this, "findIndex", fn, thisArg, void 0, arguments); + }, + findLast(fn, thisArg) { + return apply(this, "findLast", fn, thisArg, toReactive, arguments); + }, + findLastIndex(fn, thisArg) { + return apply(this, "findLastIndex", fn, thisArg, void 0, arguments); + }, + // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement + forEach(fn, thisArg) { + return apply(this, "forEach", fn, thisArg, void 0, arguments); + }, + includes(...args) { + return searchProxy(this, "includes", args); + }, + indexOf(...args) { + return searchProxy(this, "indexOf", args); + }, + join(separator) { + return reactiveReadArray(this).join(separator); + }, + // keys() iterator only reads `length`, no optimisation required + lastIndexOf(...args) { + return searchProxy(this, "lastIndexOf", args); + }, + map(fn, thisArg) { + return apply(this, "map", fn, thisArg, void 0, arguments); + }, + pop() { + return noTracking(this, "pop"); + }, + push(...args) { + return noTracking(this, "push", args); + }, + reduce(fn, ...args) { + return reduce(this, "reduce", fn, args); + }, + reduceRight(fn, ...args) { + return reduce(this, "reduceRight", fn, args); + }, + shift() { + return noTracking(this, "shift"); + }, + // slice could use ARRAY_ITERATE but also seems to beg for range tracking + some(fn, thisArg) { + return apply(this, "some", fn, thisArg, void 0, arguments); + }, + splice(...args) { + return noTracking(this, "splice", args); + }, + toReversed() { + return reactiveReadArray(this).toReversed(); + }, + toSorted(comparer) { + return reactiveReadArray(this).toSorted(comparer); + }, + toSpliced(...args) { + return reactiveReadArray(this).toSpliced(...args); + }, + unshift(...args) { + return noTracking(this, "unshift", args); + }, + values() { + return iterator(this, "values", toReactive); + } + }; + function iterator(self, method, wrapValue) { + const arr = shallowReadArray(self); + const iter = arr[method](); + if (arr !== self && !isShallow(self)) { + iter._next = iter.next; + iter.next = () => { + const result = iter._next(); + if (result.value) { + result.value = wrapValue(result.value); + } + return result; + }; + } + return iter; + } + const arrayProto = Array.prototype; + function apply(self, method, fn, thisArg, wrappedRetFn, args) { + const arr = shallowReadArray(self); + const needsWrap = arr !== self && !isShallow(self); + const methodFn = arr[method]; + if (methodFn !== arrayProto[method]) { + const result2 = methodFn.apply(self, args); + return needsWrap ? toReactive(result2) : result2; + } + let wrappedFn = fn; + if (arr !== self) { + if (needsWrap) { + wrappedFn = function(item, index) { + return fn.call(this, toReactive(item), index, self); + }; + } else if (fn.length > 2) { + wrappedFn = function(item, index) { + return fn.call(this, item, index, self); + }; + } + } + const result = methodFn.call(arr, wrappedFn, thisArg); + return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result; + } + function reduce(self, method, fn, args) { + const arr = shallowReadArray(self); + let wrappedFn = fn; + if (arr !== self) { + if (!isShallow(self)) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, toReactive(item), index, self); + }; + } else if (fn.length > 3) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, item, index, self); + }; + } + } + return arr[method](wrappedFn, ...args); + } + function searchProxy(self, method, args) { + const arr = toRaw(self); + track(arr, "iterate", ARRAY_ITERATE_KEY); + const res = arr[method](...args); + if ((res === -1 || res === false) && isProxy(args[0])) { + args[0] = toRaw(args[0]); + return arr[method](...args); + } + return res; + } + function noTracking(self, method, args = []) { + pauseTracking(); + startBatch(); + const res = toRaw(self)[method].apply(self, args); + endBatch(); + resetTracking(); + return res; + } + const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); const builtInSymbols = new Set( /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) ); - const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations(); - function createArrayInstrumentations() { - const instrumentations = {}; - ["includes", "indexOf", "lastIndexOf"].forEach((key) => { - instrumentations[key] = function(...args) { - const arr = toRaw(this); - for (let i = 0, l = this.length; i < l; i++) { - track(arr, "get", i + ""); - } - const res = arr[key](...args); - if (res === -1 || res === false) { - return arr[key](...args.map(toRaw)); - } else { - return res; - } - }; - }); - ["push", "pop", "shift", "unshift", "splice"].forEach((key) => { - instrumentations[key] = function(...args) { - pauseTracking(); - pauseScheduling(); - const res = toRaw(this)[key].apply(this, args); - resetScheduling(); - resetTracking(); - return res; - }; - }); - return instrumentations; - } function hasOwnProperty(key) { + if (!isSymbol(key)) key = String(key); const obj = toRaw(this); track(obj, "has", key); return obj.hasOwnProperty(key); @@ -812,7 +1229,7 @@ var Vue = (function (exports) { return isShallow2; } else if (key === "__v_raw") { if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype - // this means the reciever is a user proxy of the reactive proxy + // this means the receiver is a user proxy of the reactive proxy Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { return target; } @@ -820,14 +1237,22 @@ var Vue = (function (exports) { } const targetIsArray = isArray(target); if (!isReadonly2) { - if (targetIsArray && hasOwn(arrayInstrumentations, key)) { - return Reflect.get(arrayInstrumentations, key, receiver); + let fn; + if (targetIsArray && (fn = arrayInstrumentations[key])) { + return fn; } if (key === "hasOwnProperty") { return hasOwnProperty; } } - const res = Reflect.get(target, key, receiver); + const res = Reflect.get( + target, + key, + // if this is a proxy wrapping a ref, return methods using the raw ref + // as receiver so that we don't have to call `toRaw` on the ref in all + // its class methods + isRef(target) ? target : receiver + ); if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { return res; } @@ -868,7 +1293,12 @@ var Vue = (function (exports) { } } const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); - const result = Reflect.set(target, key, value, receiver); + const result = Reflect.set( + target, + key, + value, + isRef(target) ? target : receiver + ); if (target === toRaw(receiver)) { if (!hadKey) { trigger(target, "add", key, value); @@ -928,25 +1358,23 @@ var Vue = (function (exports) { } const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); - const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler( - true - ); + const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true); const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); const toShallow = (value) => value; const getProto = (v) => Reflect.getPrototypeOf(v); - function get(target, key, isReadonly = false, isShallow = false) { + function get(target, key, isReadonly2 = false, isShallow2 = false) { target = target["__v_raw"]; const rawTarget = toRaw(target); const rawKey = toRaw(key); - if (!isReadonly) { + if (!isReadonly2) { if (hasChanged(key, rawKey)) { track(rawTarget, "get", key); } track(rawTarget, "get", rawKey); } const { has: has2 } = getProto(rawTarget); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; if (has2.call(rawTarget, key)) { return wrap(target.get(key)); } else if (has2.call(rawTarget, rawKey)) { @@ -955,11 +1383,11 @@ var Vue = (function (exports) { target.get(key); } } - function has(key, isReadonly = false) { + function has(key, isReadonly2 = false) { const target = this["__v_raw"]; const rawTarget = toRaw(target); const rawKey = toRaw(key); - if (!isReadonly) { + if (!isReadonly2) { if (hasChanged(key, rawKey)) { track(rawTarget, "has", key); } @@ -967,13 +1395,15 @@ var Vue = (function (exports) { } return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); } - function size(target, isReadonly = false) { + function size(target, isReadonly2 = false) { target = target["__v_raw"]; - !isReadonly && track(toRaw(target), "iterate", ITERATE_KEY); + !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY); return Reflect.get(target, "size", target); } - function add(value) { - value = toRaw(value); + function add(value, _isShallow = false) { + if (!_isShallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } const target = toRaw(this); const proto = getProto(target); const hadKey = proto.has.call(target, value); @@ -983,8 +1413,10 @@ var Vue = (function (exports) { } return this; } - function set(key, value) { - value = toRaw(value); + function set(key, value, _isShallow = false) { + if (!_isShallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } const target = toRaw(this); const { has: has2, get: get2 } = getProto(target); let hadKey = has2.call(target, key); @@ -1030,19 +1462,19 @@ var Vue = (function (exports) { } return result; } - function createForEach(isReadonly, isShallow) { + function createForEach(isReadonly2, isShallow2) { return function forEach(callback, thisArg) { const observed = this; const target = observed["__v_raw"]; const rawTarget = toRaw(target); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - !isReadonly && track(rawTarget, "iterate", ITERATE_KEY); + const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY); return target.forEach((value, key) => { return callback.call(thisArg, wrap(value), wrap(key), observed); }); }; } - function createIterableMethod(method, isReadonly, isShallow) { + function createIterableMethod(method, isReadonly2, isShallow2) { return function(...args) { const target = this["__v_raw"]; const rawTarget = toRaw(target); @@ -1050,8 +1482,8 @@ var Vue = (function (exports) { const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; const isKeyOnly = method === "keys" && targetIsMap; const innerIterator = target[method](...args); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - !isReadonly && track( + const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + !isReadonly2 && track( rawTarget, "iterate", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY @@ -1107,8 +1539,12 @@ var Vue = (function (exports) { return size(this); }, has, - add, - set, + add(value) { + return add.call(this, value, true); + }, + set(key, value) { + return set.call(this, key, value, true); + }, delete: deleteEntry, clear, forEach: createForEach(false, true) @@ -1145,23 +1581,16 @@ var Vue = (function (exports) { clear: createReadonlyMethod("clear"), forEach: createForEach(true, true) }; - const iteratorMethods = ["keys", "values", "entries", Symbol.iterator]; + const iteratorMethods = [ + "keys", + "values", + "entries", + Symbol.iterator + ]; iteratorMethods.forEach((method) => { - mutableInstrumentations2[method] = createIterableMethod( - method, - false, - false - ); - readonlyInstrumentations2[method] = createIterableMethod( - method, - true, - false - ); - shallowInstrumentations2[method] = createIterableMethod( - method, - false, - true - ); + mutableInstrumentations2[method] = createIterableMethod(method, false, false); + readonlyInstrumentations2[method] = createIterableMethod(method, true, false); + shallowInstrumentations2[method] = createIterableMethod(method, false, true); shallowReadonlyInstrumentations2[method] = createIterableMethod( method, true, @@ -1181,13 +1610,13 @@ var Vue = (function (exports) { shallowInstrumentations, shallowReadonlyInstrumentations ] = /* @__PURE__ */ createInstrumentations(); - function createInstrumentationGetter(isReadonly, shallow) { - const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations; + function createInstrumentationGetter(isReadonly2, shallow) { + const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations; return (target, key, receiver) => { if (key === "__v_isReactive") { - return !isReadonly; + return !isReadonly2; } else if (key === "__v_isReadonly") { - return isReadonly; + return isReadonly2; } else if (key === "__v_raw") { return target; } @@ -1283,7 +1712,11 @@ var Vue = (function (exports) { function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { if (!isObject(target)) { { - warn$2(`value cannot be made reactive: ${String(target)}`); + warn$2( + `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String( + target + )}` + ); } return target; } @@ -1318,14 +1751,14 @@ var Vue = (function (exports) { return !!(value && value["__v_isShallow"]); } function isProxy(value) { - return isReactive(value) || isReadonly(value); + return value ? !!value["__v_raw"] : false; } function toRaw(observed) { const raw = observed && observed["__v_raw"]; return raw ? toRaw(raw) : observed; } function markRaw(value) { - if (Object.isExtensible(value)) { + if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) { def(value, "__v_skip", true); } return value; @@ -1333,110 +1766,8 @@ var Vue = (function (exports) { const toReactive = (value) => isObject(value) ? reactive(value) : value; const toReadonly = (value) => isObject(value) ? readonly(value) : value; - const COMPUTED_SIDE_EFFECT_WARN = `Computed is still dirty after getter evaluation, likely because a computed is mutating its own dependency in its getter. State mutations in computed getters should be avoided. Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free`; - class ComputedRefImpl { - constructor(getter, _setter, isReadonly, isSSR) { - this.getter = getter; - this._setter = _setter; - this.dep = void 0; - this.__v_isRef = true; - this["__v_isReadonly"] = false; - this.effect = new ReactiveEffect( - () => getter(this._value), - () => triggerRefValue( - this, - this.effect._dirtyLevel === 2 ? 2 : 3 - ) - ); - this.effect.computed = this; - this.effect.active = this._cacheable = !isSSR; - this["__v_isReadonly"] = isReadonly; - } - get value() { - const self = toRaw(this); - if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) { - triggerRefValue(self, 4); - } - trackRefValue(self); - if (self.effect._dirtyLevel >= 2) { - if (this._warnRecursive) { - warn$2(COMPUTED_SIDE_EFFECT_WARN, ` - -getter: `, this.getter); - } - triggerRefValue(self, 2); - } - return self._value; - } - set value(newValue) { - this._setter(newValue); - } - // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x - get _dirty() { - return this.effect.dirty; - } - set _dirty(v) { - this.effect.dirty = v; - } - // #endregion - } - function computed$1(getterOrOptions, debugOptions, isSSR = false) { - let getter; - let setter; - const onlyGetter = isFunction(getterOrOptions); - if (onlyGetter) { - getter = getterOrOptions; - setter = () => { - warn$2("Write operation failed: computed value is readonly"); - } ; - } else { - getter = getterOrOptions.get; - setter = getterOrOptions.set; - } - const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); - if (debugOptions && !isSSR) { - cRef.effect.onTrack = debugOptions.onTrack; - cRef.effect.onTrigger = debugOptions.onTrigger; - } - return cRef; - } - - function trackRefValue(ref2) { - var _a; - if (shouldTrack && activeEffect) { - ref2 = toRaw(ref2); - trackEffect( - activeEffect, - (_a = ref2.dep) != null ? _a : ref2.dep = createDep( - () => ref2.dep = void 0, - ref2 instanceof ComputedRefImpl ? ref2 : void 0 - ), - { - target: ref2, - type: "get", - key: "value" - } - ); - } - } - function triggerRefValue(ref2, dirtyLevel = 4, newVal) { - ref2 = toRaw(ref2); - const dep = ref2.dep; - if (dep) { - triggerEffects( - dep, - dirtyLevel, - { - target: ref2, - type: "set", - key: "value", - newValue: newVal - } - ); - } - } function isRef(r) { - return !!(r && r.__v_isRef === true); + return r ? r["__v_isRef"] === true : false; } function ref(value) { return createRef(value, false); @@ -1451,29 +1782,52 @@ getter: `, this.getter); return new RefImpl(rawValue, shallow); } class RefImpl { - constructor(value, __v_isShallow) { - this.__v_isShallow = __v_isShallow; - this.dep = void 0; - this.__v_isRef = true; - this._rawValue = __v_isShallow ? value : toRaw(value); - this._value = __v_isShallow ? value : toReactive(value); + constructor(value, isShallow2) { + this.dep = new Dep(); + this["__v_isRef"] = true; + this["__v_isShallow"] = false; + this._rawValue = isShallow2 ? value : toRaw(value); + this._value = isShallow2 ? value : toReactive(value); + this["__v_isShallow"] = isShallow2; } get value() { - trackRefValue(this); + { + this.dep.track({ + target: this, + type: "get", + key: "value" + }); + } return this._value; } - set value(newVal) { - const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal); - newVal = useDirectValue ? newVal : toRaw(newVal); - if (hasChanged(newVal, this._rawValue)) { - this._rawValue = newVal; - this._value = useDirectValue ? newVal : toReactive(newVal); - triggerRefValue(this, 4, newVal); + set value(newValue) { + const oldValue = this._rawValue; + const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue); + newValue = useDirectValue ? newValue : toRaw(newValue); + if (hasChanged(newValue, oldValue)) { + this._rawValue = newValue; + this._value = useDirectValue ? newValue : toReactive(newValue); + { + this.dep.trigger({ + target: this, + type: "set", + key: "value", + newValue, + oldValue + }); + } } } } function triggerRef(ref2) { - triggerRefValue(ref2, 4, ref2.value ); + { + ref2.dep.trigger({ + target: ref2, + type: "set", + key: "value", + newValue: ref2._value + }); + } } function unref(ref2) { return isRef(ref2) ? ref2.value : ref2; @@ -1482,7 +1836,7 @@ getter: `, this.getter); return isFunction(source) ? source() : unref(source); } const shallowUnwrapHandlers = { - get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), + get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)), set: (target, key, value, receiver) => { const oldValue = target[key]; if (isRef(oldValue) && !isRef(value)) { @@ -1498,17 +1852,15 @@ getter: `, this.getter); } class CustomRefImpl { constructor(factory) { - this.dep = void 0; - this.__v_isRef = true; - const { get, set } = factory( - () => trackRefValue(this), - () => triggerRefValue(this) - ); + this["__v_isRef"] = true; + this._value = void 0; + const dep = this.dep = new Dep(); + const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep)); this._get = get; this._set = set; } get value() { - return this._get(); + return this._value = this._get(); } set value(newVal) { this._set(newVal); @@ -1532,11 +1884,12 @@ getter: `, this.getter); this._object = _object; this._key = _key; this._defaultValue = _defaultValue; - this.__v_isRef = true; + this["__v_isRef"] = true; + this._value = void 0; } get value() { const val = this._object[this._key]; - return val === void 0 ? this._defaultValue : val; + return this._value = val === void 0 ? this._defaultValue : val; } set value(newVal) { this._object[this._key] = newVal; @@ -1548,11 +1901,12 @@ getter: `, this.getter); class GetterRefImpl { constructor(_getter) { this._getter = _getter; - this.__v_isRef = true; - this.__v_isReadonly = true; + this["__v_isRef"] = true; + this["__v_isReadonly"] = true; + this._value = void 0; } get value() { - return this._getter(); + return this._value = this._getter(); } } function toRef(source, key, defaultValue) { @@ -1571,6 +1925,91 @@ getter: `, this.getter); return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); } + class ComputedRefImpl { + constructor(fn, setter, isSSR) { + this.fn = fn; + this.setter = setter; + /** + * @internal + */ + this._value = void 0; + /** + * @internal + */ + this.dep = new Dep(this); + /** + * @internal + */ + this.__v_isRef = true; + // TODO isolatedDeclarations "__v_isReadonly" + // A computed is also a subscriber that tracks other deps + /** + * @internal + */ + this.deps = void 0; + /** + * @internal + */ + this.depsTail = void 0; + /** + * @internal + */ + this.flags = 16; + /** + * @internal + */ + this.globalVersion = globalVersion - 1; + // for backwards compat + this.effect = this; + this["__v_isReadonly"] = !setter; + this.isSSR = isSSR; + } + /** + * @internal + */ + notify() { + this.flags |= 16; + if (activeSub !== this) { + this.dep.notify(); + } + } + get value() { + const link = this.dep.track({ + target: this, + type: "get", + key: "value" + }) ; + refreshComputed(this); + if (link) { + link.version = this.dep.version; + } + return this._value; + } + set value(newValue) { + if (this.setter) { + this.setter(newValue); + } else { + warn$2("Write operation failed: computed value is readonly"); + } + } + } + function computed$1(getterOrOptions, debugOptions, isSSR = false) { + let getter; + let setter; + if (isFunction(getterOrOptions)) { + getter = getterOrOptions; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, isSSR); + if (debugOptions && !isSSR) { + cRef.onTrack = debugOptions.onTrack; + cRef.onTrigger = debugOptions.onTrigger; + } + return cRef; + } + const TrackOpTypes = { "GET": "get", "HAS": "has", @@ -1583,6 +2022,220 @@ getter: `, this.getter); "CLEAR": "clear" }; + const INITIAL_WATCHER_VALUE = {}; + const cleanupMap = /* @__PURE__ */ new WeakMap(); + let activeWatcher = void 0; + function getCurrentWatcher() { + return activeWatcher; + } + function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) { + if (owner) { + let cleanups = cleanupMap.get(owner); + if (!cleanups) cleanupMap.set(owner, cleanups = []); + cleanups.push(cleanupFn); + } else if (!failSilently) { + warn$2( + `onWatcherCleanup() was called when there was no active watcher to associate with.` + ); + } + } + function watch$1(source, cb, options = EMPTY_OBJ) { + const { immediate, deep, once, scheduler, augmentJob, call } = options; + const warnInvalidSource = (s) => { + (options.onWarn || warn$2)( + `Invalid watch source: `, + s, + `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` + ); + }; + const reactiveGetter = (source2) => { + if (deep) return source2; + if (isShallow(source2) || deep === false || deep === 0) + return traverse(source2, 1); + return traverse(source2); + }; + let effect; + let getter; + let cleanup; + let boundCleanup; + let forceTrigger = false; + let isMultiSource = false; + if (isRef(source)) { + getter = () => source.value; + forceTrigger = isShallow(source); + } else if (isReactive(source)) { + getter = () => reactiveGetter(source); + forceTrigger = true; + } else if (isArray(source)) { + isMultiSource = true; + forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); + getter = () => source.map((s) => { + if (isRef(s)) { + return s.value; + } else if (isReactive(s)) { + return reactiveGetter(s); + } else if (isFunction(s)) { + return call ? call(s, 2) : s(); + } else { + warnInvalidSource(s); + } + }); + } else if (isFunction(source)) { + if (cb) { + getter = call ? () => call(source, 2) : source; + } else { + getter = () => { + if (cleanup) { + pauseTracking(); + try { + cleanup(); + } finally { + resetTracking(); + } + } + const currentEffect = activeWatcher; + activeWatcher = effect; + try { + return call ? call(source, 3, [boundCleanup]) : source(boundCleanup); + } finally { + activeWatcher = currentEffect; + } + }; + } + } else { + getter = NOOP; + warnInvalidSource(source); + } + if (cb && deep) { + const baseGetter = getter; + const depth = deep === true ? Infinity : deep; + getter = () => traverse(baseGetter(), depth); + } + const scope = getCurrentScope(); + const watchHandle = () => { + effect.stop(); + if (scope) { + remove(scope.effects, effect); + } + }; + if (once) { + if (cb) { + const _cb = cb; + cb = (...args) => { + _cb(...args); + watchHandle(); + }; + } else { + const _getter = getter; + getter = () => { + _getter(); + watchHandle(); + }; + } + } + let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + const job = (immediateFirstRun) => { + if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) { + return; + } + if (cb) { + const newValue = effect.run(); + if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) { + if (cleanup) { + cleanup(); + } + const currentWatcher = activeWatcher; + activeWatcher = effect; + try { + const args = [ + newValue, + // pass undefined as the old value when it's changed for the first time + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, + boundCleanup + ]; + call ? call(cb, 3, args) : ( + // @ts-expect-error + cb(...args) + ); + oldValue = newValue; + } finally { + activeWatcher = currentWatcher; + } + } + } else { + effect.run(); + } + }; + if (augmentJob) { + augmentJob(job); + } + effect = new ReactiveEffect(getter); + effect.scheduler = scheduler ? () => scheduler(job, false) : job; + boundCleanup = (fn) => onWatcherCleanup(fn, false, effect); + cleanup = effect.onStop = () => { + const cleanups = cleanupMap.get(effect); + if (cleanups) { + if (call) { + call(cleanups, 4); + } else { + for (const cleanup2 of cleanups) cleanup2(); + } + cleanupMap.delete(effect); + } + }; + { + effect.onTrack = options.onTrack; + effect.onTrigger = options.onTrigger; + } + if (cb) { + if (immediate) { + job(true); + } else { + oldValue = effect.run(); + } + } else if (scheduler) { + scheduler(job.bind(null, true), true); + } else { + effect.run(); + } + watchHandle.pause = effect.pause.bind(effect); + watchHandle.resume = effect.resume.bind(effect); + watchHandle.stop = watchHandle; + return watchHandle; + } + function traverse(value, depth = Infinity, seen) { + if (depth <= 0 || !isObject(value) || value["__v_skip"]) { + return value; + } + seen = seen || /* @__PURE__ */ new Set(); + if (seen.has(value)) { + return value; + } + seen.add(value); + depth--; + if (isRef(value)) { + traverse(value.value, depth, seen); + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + traverse(value[i], depth, seen); + } + } else if (isSet(value) || isMap(value)) { + value.forEach((v) => { + traverse(v, depth, seen); + }); + } else if (isPlainObject(value)) { + for (const key in value) { + traverse(value[key], depth, seen); + } + for (const key of Object.getOwnPropertySymbols(value)) { + if (Object.prototype.propertyIsEnumerable.call(value, key)) { + traverse(value[key], depth, seen); + } + } + } + return value; + } + const stack$1 = []; function pushWarningContext(vnode) { stack$1.push(vnode); @@ -1590,7 +2243,10 @@ getter: `, this.getter); function popWarningContext() { stack$1.pop(); } + let isWarning = false; function warn$1(msg, ...args) { + if (isWarning) return; + isWarning = true; pauseTracking(); const instance = stack$1.length ? stack$1[stack$1.length - 1].component : null; const appWarnHandler = instance && instance.appContext.config.warnHandler; @@ -1601,6 +2257,7 @@ getter: `, this.getter); instance, 11, [ + // eslint-disable-next-line no-restricted-syntax msg + args.map((a) => { var _a, _b; return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a); @@ -1622,6 +2279,7 @@ getter: `, this.getter); console.warn(...warnArgs); } resetTracking(); + isWarning = false; } function getComponentTrace() { let currentVNode = stack$1[stack$1.length - 1]; @@ -1705,12 +2363,6 @@ getter: `, this.getter); "0": "SETUP_FUNCTION", "RENDER_FUNCTION": 1, "1": "RENDER_FUNCTION", - "WATCH_GETTER": 2, - "2": "WATCH_GETTER", - "WATCH_CALLBACK": 3, - "3": "WATCH_CALLBACK", - "WATCH_CLEANUP": 4, - "4": "WATCH_CLEANUP", "NATIVE_EVENT_HANDLER": 5, "5": "NATIVE_EVENT_HANDLER", "COMPONENT_EVENT_HANDLER": 6, @@ -1730,7 +2382,11 @@ getter: `, this.getter); "ASYNC_COMPONENT_LOADER": 13, "13": "ASYNC_COMPONENT_LOADER", "SCHEDULER": 14, - "14": "SCHEDULER" + "14": "SCHEDULER", + "COMPONENT_UPDATE": 15, + "15": "COMPONENT_UPDATE", + "APP_UNMOUNT_CLEANUP": 16, + "16": "APP_UNMOUNT_CLEANUP" }; const ErrorTypeStrings$1 = { ["sp"]: "serverPrefetch hook", @@ -1761,7 +2417,9 @@ getter: `, this.getter); [11]: "app warnHandler", [12]: "ref function", [13]: "async component loader", - [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ." + [14]: "scheduler flush", + [15]: "component update", + [16]: "app unmount cleanup function" }; function callWithErrorHandling(fn, instance, type, args) { try { @@ -1780,14 +2438,21 @@ getter: `, this.getter); } return res; } - const values = []; - for (let i = 0; i < fn.length; i++) { - values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + if (isArray(fn)) { + const values = []; + for (let i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + } + return values; + } else { + warn$1( + `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}` + ); } - return values; } function handleError(err, instance, type, throwInDev = true) { const contextVNode = instance ? instance.vnode : null; + const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ; if (instance) { let cur = instance.parent; const exposedInstance = instance.proxy; @@ -1803,20 +2468,20 @@ getter: `, this.getter); } cur = cur.parent; } - const appErrorHandler = instance.appContext.config.errorHandler; - if (appErrorHandler) { - callWithErrorHandling( - appErrorHandler, - null, - 10, - [err, exposedInstance, errorInfo] - ); + if (errorHandler) { + pauseTracking(); + callWithErrorHandling(errorHandler, null, 10, [ + err, + exposedInstance, + errorInfo + ]); + resetTracking(); return; } } - logError(err, type, contextVNode, throwInDev); + logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction); } - function logError(err, type, contextVNode, throwInDev = true) { + function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) { { const info = ErrorTypeStrings$1[type]; if (contextVNode) { @@ -1849,13 +2514,13 @@ getter: `, this.getter); return fn ? p.then(this ? fn.bind(this) : fn) : p; } function findInsertionIndex(id) { - let start = flushIndex + 1; + let start = isFlushing ? flushIndex + 1 : 0; let end = queue.length; while (start < end) { const middle = start + end >>> 1; const middleJob = queue[middle]; const middleJobId = getId(middleJob); - if (middleJobId < id || middleJobId === id && middleJob.pre) { + if (middleJobId < id || middleJobId === id && middleJob.flags & 2) { start = middle + 1; } else { end = middle; @@ -1864,15 +2529,16 @@ getter: `, this.getter); return start; } function queueJob(job) { - if (!queue.length || !queue.includes( - job, - isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex - )) { - if (job.id == null) { + if (!(job.flags & 1)) { + const jobId = getId(job); + const lastJob = queue[queue.length - 1]; + if (!lastJob || // fast path when the job id is larger than the tail + !(job.flags & 2) && jobId >= getId(lastJob)) { queue.push(job); } else { - queue.splice(findInsertionIndex(job.id), 0, job); + queue.splice(findInsertionIndex(jobId), 0, job); } + job.flags |= 1; queueFlush(); } } @@ -1882,19 +2548,13 @@ getter: `, this.getter); currentFlushPromise = resolvedPromise.then(flushJobs); } } - function invalidateJob(job) { - const i = queue.indexOf(job); - if (i > flushIndex) { - queue.splice(i, 1); - } - } function queuePostFlushCb(cb) { if (!isArray(cb)) { - if (!activePostFlushCbs || !activePostFlushCbs.includes( - cb, - cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex - )) { + if (activePostFlushCbs && cb.id === -1) { + activePostFlushCbs.splice(postFlushIndex + 1, 0, cb); + } else if (!(cb.flags & 1)) { pendingPostFlushCbs.push(cb); + cb.flags |= 1; } } else { pendingPostFlushCbs.push(...cb); @@ -1907,7 +2567,7 @@ getter: `, this.getter); } for (; i < queue.length; i++) { const cb = queue[i]; - if (cb && cb.pre) { + if (cb && cb.flags & 2) { if (instance && cb.id !== instance.uid) { continue; } @@ -1916,7 +2576,11 @@ getter: `, this.getter); } queue.splice(i, 1); i--; + if (cb.flags & 4) { + cb.flags &= ~1; + } cb(); + cb.flags &= ~1; } } } @@ -1935,45 +2599,53 @@ getter: `, this.getter); seen = seen || /* @__PURE__ */ new Map(); } for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { - if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) { + const cb = activePostFlushCbs[postFlushIndex]; + if (checkRecursiveUpdates(seen, cb)) { continue; } - activePostFlushCbs[postFlushIndex](); + if (cb.flags & 4) { + cb.flags &= ~1; + } + if (!(cb.flags & 8)) cb(); + cb.flags &= ~1; } activePostFlushCbs = null; postFlushIndex = 0; } } - const getId = (job) => job.id == null ? Infinity : job.id; - const comparator = (a, b) => { - const diff = getId(a) - getId(b); - if (diff === 0) { - if (a.pre && !b.pre) - return -1; - if (b.pre && !a.pre) - return 1; - } - return diff; - }; + const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id; function flushJobs(seen) { isFlushPending = false; isFlushing = true; { seen = seen || /* @__PURE__ */ new Map(); } - queue.sort(comparator); const check = (job) => checkRecursiveUpdates(seen, job) ; try { for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { const job = queue[flushIndex]; - if (job && job.active !== false) { + if (job && !(job.flags & 8)) { if (check(job)) { continue; } - callWithErrorHandling(job, null, 14); + if (job.flags & 4) { + job.flags &= ~1; + } + callWithErrorHandling( + job, + job.i, + job.i ? 15 : 14 + ); + job.flags &= ~1; } } } finally { + for (; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job) { + job.flags &= ~1; + } + } flushIndex = 0; queue.length = 0; flushPostFlushCbs(seen); @@ -1985,27 +2657,23 @@ getter: `, this.getter); } } function checkRecursiveUpdates(seen, fn) { - if (!seen.has(fn)) { - seen.set(fn, 1); - } else { - const count = seen.get(fn); - if (count > RECURSION_LIMIT) { - const instance = fn.ownerInstance; - const componentName = instance && getComponentName(instance.type); - handleError( - `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, - null, - 10 - ); - return true; - } else { - seen.set(fn, count + 1); - } + const count = seen.get(fn) || 0; + if (count > RECURSION_LIMIT) { + const instance = fn.i; + const componentName = instance && getComponentName(instance.type); + handleError( + `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, + null, + 10 + ); + return true; } + seen.set(fn, count + 1); + return false; } let isHmrUpdating = false; - const hmrDirtyComponents = /* @__PURE__ */ new Set(); + const hmrDirtyComponents = /* @__PURE__ */ new Map(); { getGlobalThis().__VUE_HMR_RUNTIME__ = { createRecord: tryWrap(createRecord), @@ -2052,36 +2720,41 @@ getter: `, this.getter); } instance.renderCache = []; isHmrUpdating = true; - instance.effect.dirty = true; instance.update(); isHmrUpdating = false; }); } function reload(id, newComp) { const record = map.get(id); - if (!record) - return; + if (!record) return; newComp = normalizeClassComponent(newComp); updateComponentDef(record.initialDef, newComp); const instances = [...record.instances]; - for (const instance of instances) { + for (let i = 0; i < instances.length; i++) { + const instance = instances[i]; const oldComp = normalizeClassComponent(instance.type); - if (!hmrDirtyComponents.has(oldComp)) { + let dirtyInstances = hmrDirtyComponents.get(oldComp); + if (!dirtyInstances) { if (oldComp !== record.initialDef) { updateComponentDef(oldComp, newComp); } - hmrDirtyComponents.add(oldComp); + hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set()); } + dirtyInstances.add(instance); instance.appContext.propsCache.delete(instance.type); instance.appContext.emitsCache.delete(instance.type); instance.appContext.optionsCache.delete(instance.type); if (instance.ceReload) { - hmrDirtyComponents.add(oldComp); + dirtyInstances.add(instance); instance.ceReload(newComp.styles); - hmrDirtyComponents.delete(oldComp); + dirtyInstances.delete(instance); } else if (instance.parent) { - instance.parent.effect.dirty = true; - queueJob(instance.parent.update); + queueJob(() => { + isHmrUpdating = true; + instance.parent.update(); + isHmrUpdating = false; + dirtyInstances.delete(instance); + }); } else if (instance.appContext.reload) { instance.appContext.reload(); } else if (typeof window !== "undefined") { @@ -2091,13 +2764,12 @@ getter: `, this.getter); "[HMR] Root or manually mounted instance modified. Full reload required." ); } + if (instance.root.ce && instance !== instance.root) { + instance.root.ce._removeChildStyle(oldComp); + } } queuePostFlushCb(() => { - for (const instance of instances) { - hmrDirtyComponents.delete( - normalizeClassComponent(instance.type) - ); - } + hmrDirtyComponents.clear(); }); } function updateComponentDef(oldComp, newComp) { @@ -2144,6 +2816,7 @@ getter: `, this.getter); // (#4815) typeof window !== "undefined" && // some envs mock window but not fully window.HTMLElement && // also exclude jsdom + // eslint-disable-next-line no-restricted-syntax !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) ) { const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; @@ -2173,9 +2846,7 @@ getter: `, this.getter); function devtoolsUnmountApp(app) { emit$1("app:unmount" /* APP_UNMOUNT */, app); } - const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook( - "component:added" /* COMPONENT_ADDED */ - ); + const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */); const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( "component:removed" /* COMPONENT_REMOVED */ @@ -2186,6 +2857,8 @@ getter: `, this.getter); _devtoolsComponentRemoved(component); } }; + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ function createDevtoolsComponentHook(hook) { return (component) => { emit$1( @@ -2197,12 +2870,8 @@ getter: `, this.getter); ); }; } - const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook( - "perf:start" /* PERFORMANCE_START */ - ); - const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook( - "perf:end" /* PERFORMANCE_END */ - ); + const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */); + const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */); function createDevtoolsPerformanceHook(hook) { return (component, type, time) => { emit$1(hook, component.appContext.app, component.uid, component, type, time); @@ -2218,145 +2887,6 @@ getter: `, this.getter); ); } - function emit(instance, event, ...rawArgs) { - if (instance.isUnmounted) - return; - const props = instance.vnode.props || EMPTY_OBJ; - { - const { - emitsOptions, - propsOptions: [propsOptions] - } = instance; - if (emitsOptions) { - if (!(event in emitsOptions) && true) { - if (!propsOptions || !(toHandlerKey(event) in propsOptions)) { - warn$1( - `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.` - ); - } - } else { - const validator = emitsOptions[event]; - if (isFunction(validator)) { - const isValid = validator(...rawArgs); - if (!isValid) { - warn$1( - `Invalid event arguments: event validation failed for event "${event}".` - ); - } - } - } - } - } - let args = rawArgs; - const isModelListener = event.startsWith("update:"); - const modelArg = isModelListener && event.slice(7); - if (modelArg && modelArg in props) { - const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`; - const { number, trim } = props[modifiersKey] || EMPTY_OBJ; - if (trim) { - args = rawArgs.map((a) => isString(a) ? a.trim() : a); - } - if (number) { - args = rawArgs.map(looseToNumber); - } - } - { - devtoolsComponentEmit(instance, event, args); - } - { - const lowerCaseEvent = event.toLowerCase(); - if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { - warn$1( - `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( - instance, - instance.type - )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate( - event - )}" instead of "${event}".` - ); - } - } - let handlerName; - let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) - props[handlerName = toHandlerKey(camelize(event))]; - if (!handler && isModelListener) { - handler = props[handlerName = toHandlerKey(hyphenate(event))]; - } - if (handler) { - callWithAsyncErrorHandling( - handler, - instance, - 6, - args - ); - } - const onceHandler = props[handlerName + `Once`]; - if (onceHandler) { - if (!instance.emitted) { - instance.emitted = {}; - } else if (instance.emitted[handlerName]) { - return; - } - instance.emitted[handlerName] = true; - callWithAsyncErrorHandling( - onceHandler, - instance, - 6, - args - ); - } - } - function normalizeEmitsOptions(comp, appContext, asMixin = false) { - const cache = appContext.emitsCache; - const cached = cache.get(comp); - if (cached !== void 0) { - return cached; - } - const raw = comp.emits; - let normalized = {}; - let hasExtends = false; - if (!isFunction(comp)) { - const extendEmits = (raw2) => { - const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); - if (normalizedFromExtend) { - hasExtends = true; - extend(normalized, normalizedFromExtend); - } - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendEmits); - } - if (comp.extends) { - extendEmits(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendEmits); - } - } - if (!raw && !hasExtends) { - if (isObject(comp)) { - cache.set(comp, null); - } - return null; - } - if (isArray(raw)) { - raw.forEach((key) => normalized[key] = null); - } else { - extend(normalized, raw); - } - if (isObject(comp)) { - cache.set(comp, normalized); - } - return normalized; - } - function isEmitListener(options, key) { - if (!options || !isOn(key)) { - return false; - } - key = key.slice(2).replace(/Once$/, ""); - return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); - } - let currentRenderingInstance = null; let currentScopeId = null; function setCurrentRenderingInstance(instance) { @@ -2373,8 +2903,7 @@ getter: `, this.getter); } const withScopeId = (_id) => withCtx; function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { - if (!ctx) - return fn; + if (!ctx) return fn; if (fn._n) { return fn; } @@ -2403,1202 +2932,6 @@ getter: `, this.getter); return renderFnWithContext; } - let accessedAttrs = false; - function markAttrsAccessed() { - accessedAttrs = true; - } - function renderComponentRoot(instance) { - const { - type: Component, - vnode, - proxy, - withProxy, - props, - propsOptions: [propsOptions], - slots, - attrs, - emit, - render, - renderCache, - data, - setupState, - ctx, - inheritAttrs - } = instance; - let result; - let fallthroughAttrs; - const prev = setCurrentRenderingInstance(instance); - { - accessedAttrs = false; - } - try { - if (vnode.shapeFlag & 4) { - const proxyToUse = withProxy || proxy; - const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, { - get(target, key, receiver) { - warn$1( - `Property '${String( - key - )}' was accessed via 'this'. Avoid using 'this' in templates.` - ); - return Reflect.get(target, key, receiver); - } - }) : proxyToUse; - result = normalizeVNode( - render.call( - thisProxy, - proxyToUse, - renderCache, - props, - setupState, - data, - ctx - ) - ); - fallthroughAttrs = attrs; - } else { - const render2 = Component; - if (attrs === props) { - markAttrsAccessed(); - } - result = normalizeVNode( - render2.length > 1 ? render2( - props, - true ? { - get attrs() { - markAttrsAccessed(); - return attrs; - }, - slots, - emit - } : { attrs, slots, emit } - ) : render2( - props, - null - /* we know it doesn't need it */ - ) - ); - fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); - } - } catch (err) { - blockStack.length = 0; - handleError(err, instance, 1); - result = createVNode(Comment); - } - let root = result; - let setRoot = void 0; - if (result.patchFlag > 0 && result.patchFlag & 2048) { - [root, setRoot] = getChildRoot(result); - } - if (fallthroughAttrs && inheritAttrs !== false) { - const keys = Object.keys(fallthroughAttrs); - const { shapeFlag } = root; - if (keys.length) { - if (shapeFlag & (1 | 6)) { - if (propsOptions && keys.some(isModelListener)) { - fallthroughAttrs = filterModelListeners( - fallthroughAttrs, - propsOptions - ); - } - root = cloneVNode(root, fallthroughAttrs); - } else if (!accessedAttrs && root.type !== Comment) { - const allAttrs = Object.keys(attrs); - const eventAttrs = []; - const extraAttrs = []; - for (let i = 0, l = allAttrs.length; i < l; i++) { - const key = allAttrs[i]; - if (isOn(key)) { - if (!isModelListener(key)) { - eventAttrs.push(key[2].toLowerCase() + key.slice(3)); - } - } else { - extraAttrs.push(key); - } - } - if (extraAttrs.length) { - warn$1( - `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.` - ); - } - if (eventAttrs.length) { - warn$1( - `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` - ); - } - } - } - } - if (vnode.dirs) { - if (!isElementRoot(root)) { - warn$1( - `Runtime directive used on component with non-element root node. The directives will not function as intended.` - ); - } - root = cloneVNode(root); - root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; - } - if (vnode.transition) { - if (!isElementRoot(root)) { - warn$1( - `Component inside renders non-element root node that cannot be animated.` - ); - } - root.transition = vnode.transition; - } - if (setRoot) { - setRoot(root); - } else { - result = root; - } - setCurrentRenderingInstance(prev); - return result; - } - const getChildRoot = (vnode) => { - const rawChildren = vnode.children; - const dynamicChildren = vnode.dynamicChildren; - const childRoot = filterSingleRoot(rawChildren, false); - if (!childRoot) { - return [vnode, void 0]; - } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { - return getChildRoot(childRoot); - } - const index = rawChildren.indexOf(childRoot); - const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; - const setRoot = (updatedRoot) => { - rawChildren[index] = updatedRoot; - if (dynamicChildren) { - if (dynamicIndex > -1) { - dynamicChildren[dynamicIndex] = updatedRoot; - } else if (updatedRoot.patchFlag > 0) { - vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; - } - } - }; - return [normalizeVNode(childRoot), setRoot]; - }; - function filterSingleRoot(children, recurse = true) { - let singleRoot; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isVNode(child)) { - if (child.type !== Comment || child.children === "v-if") { - if (singleRoot) { - return; - } else { - singleRoot = child; - if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { - return filterSingleRoot(singleRoot.children); - } - } - } - } else { - return; - } - } - return singleRoot; - } - const getFunctionalFallthrough = (attrs) => { - let res; - for (const key in attrs) { - if (key === "class" || key === "style" || isOn(key)) { - (res || (res = {}))[key] = attrs[key]; - } - } - return res; - }; - const filterModelListeners = (attrs, props) => { - const res = {}; - for (const key in attrs) { - if (!isModelListener(key) || !(key.slice(9) in props)) { - res[key] = attrs[key]; - } - } - return res; - }; - const isElementRoot = (vnode) => { - return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; - }; - function shouldUpdateComponent(prevVNode, nextVNode, optimized) { - const { props: prevProps, children: prevChildren, component } = prevVNode; - const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; - const emits = component.emitsOptions; - if ((prevChildren || nextChildren) && isHmrUpdating) { - return true; - } - if (nextVNode.dirs || nextVNode.transition) { - return true; - } - if (optimized && patchFlag >= 0) { - if (patchFlag & 1024) { - return true; - } - if (patchFlag & 16) { - if (!prevProps) { - return !!nextProps; - } - return hasPropsChanged(prevProps, nextProps, emits); - } else if (patchFlag & 8) { - const dynamicProps = nextVNode.dynamicProps; - for (let i = 0; i < dynamicProps.length; i++) { - const key = dynamicProps[i]; - if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { - return true; - } - } - } - } else { - if (prevChildren || nextChildren) { - if (!nextChildren || !nextChildren.$stable) { - return true; - } - } - if (prevProps === nextProps) { - return false; - } - if (!prevProps) { - return !!nextProps; - } - if (!nextProps) { - return true; - } - return hasPropsChanged(prevProps, nextProps, emits); - } - return false; - } - function hasPropsChanged(prevProps, nextProps, emitsOptions) { - const nextKeys = Object.keys(nextProps); - if (nextKeys.length !== Object.keys(prevProps).length) { - return true; - } - for (let i = 0; i < nextKeys.length; i++) { - const key = nextKeys[i]; - if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { - return true; - } - } - return false; - } - function updateHOCHostEl({ vnode, parent }, el) { - while (parent) { - const root = parent.subTree; - if (root.suspense && root.suspense.activeBranch === vnode) { - root.el = vnode.el; - } - if (root === vnode) { - (vnode = parent.vnode).el = el; - parent = parent.parent; - } else { - break; - } - } - } - - const COMPONENTS = "components"; - const DIRECTIVES = "directives"; - function resolveComponent(name, maybeSelfReference) { - return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; - } - const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); - function resolveDynamicComponent(component) { - if (isString(component)) { - return resolveAsset(COMPONENTS, component, false) || component; - } else { - return component || NULL_DYNAMIC_COMPONENT; - } - } - function resolveDirective(name) { - return resolveAsset(DIRECTIVES, name); - } - function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { - const instance = currentRenderingInstance || currentInstance; - if (instance) { - const Component = instance.type; - if (type === COMPONENTS) { - const selfName = getComponentName( - Component, - false - ); - if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { - return Component; - } - } - const res = ( - // local registration - // check instance[type] first which is resolved for options API - resolve(instance[type] || Component[type], name) || // global registration - resolve(instance.appContext[type], name) - ); - if (!res && maybeSelfReference) { - return Component; - } - if (warnMissing && !res) { - const extra = type === COMPONENTS ? ` -If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; - warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); - } - return res; - } else { - warn$1( - `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().` - ); - } - } - function resolve(registry, name) { - return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); - } - - const isSuspense = (type) => type.__isSuspense; - let suspenseId = 0; - const SuspenseImpl = { - name: "Suspense", - // In order to make Suspense tree-shakable, we need to avoid importing it - // directly in the renderer. The renderer checks for the __isSuspense flag - // on a vnode's type and calls the `process` method, passing in renderer - // internals. - __isSuspense: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { - if (n1 == null) { - mountSuspense( - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - rendererInternals - ); - } else { - if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) { - n2.suspense = n1.suspense; - n2.suspense.vnode = n2; - n2.el = n1.el; - return; - } - patchSuspense( - n1, - n2, - container, - anchor, - parentComponent, - namespace, - slotScopeIds, - optimized, - rendererInternals - ); - } - }, - hydrate: hydrateSuspense, - create: createSuspenseBoundary, - normalize: normalizeSuspenseChildren - }; - const Suspense = SuspenseImpl ; - function triggerEvent(vnode, name) { - const eventListener = vnode.props && vnode.props[name]; - if (isFunction(eventListener)) { - eventListener(); - } - } - function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { - const { - p: patch, - o: { createElement } - } = rendererInternals; - const hiddenContainer = createElement("div"); - const suspense = vnode.suspense = createSuspenseBoundary( - vnode, - parentSuspense, - parentComponent, - container, - hiddenContainer, - anchor, - namespace, - slotScopeIds, - optimized, - rendererInternals - ); - patch( - null, - suspense.pendingBranch = vnode.ssContent, - hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds - ); - if (suspense.deps > 0) { - triggerEvent(vnode, "onPending"); - triggerEvent(vnode, "onFallback"); - patch( - null, - vnode.ssFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - namespace, - slotScopeIds - ); - setActiveBranch(suspense, vnode.ssFallback); - } else { - suspense.resolve(false, true); - } - } - function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { - const suspense = n2.suspense = n1.suspense; - suspense.vnode = n2; - n2.el = n1.el; - const newBranch = n2.ssContent; - const newFallback = n2.ssFallback; - const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; - if (pendingBranch) { - suspense.pendingBranch = newBranch; - if (isSameVNodeType(newBranch, pendingBranch)) { - patch( - pendingBranch, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else if (isInFallback) { - if (!isHydrating) { - patch( - activeBranch, - newFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - namespace, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newFallback); - } - } - } else { - suspense.pendingId = suspenseId++; - if (isHydrating) { - suspense.isHydrating = false; - suspense.activeBranch = pendingBranch; - } else { - unmount(pendingBranch, parentComponent, suspense); - } - suspense.deps = 0; - suspense.effects.length = 0; - suspense.hiddenContainer = createElement("div"); - if (isInFallback) { - patch( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else { - patch( - activeBranch, - newFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - namespace, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newFallback); - } - } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - patch( - activeBranch, - newBranch, - container, - anchor, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - suspense.resolve(true); - } else { - patch( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } - } - } - } else { - if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - patch( - activeBranch, - newBranch, - container, - anchor, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newBranch); - } else { - triggerEvent(n2, "onPending"); - suspense.pendingBranch = newBranch; - if (newBranch.shapeFlag & 512) { - suspense.pendingId = newBranch.component.suspenseId; - } else { - suspense.pendingId = suspenseId++; - } - patch( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else { - const { timeout, pendingId } = suspense; - if (timeout > 0) { - setTimeout(() => { - if (suspense.pendingId === pendingId) { - suspense.fallback(newFallback); - } - }, timeout); - } else if (timeout === 0) { - suspense.fallback(newFallback); - } - } - } - } - } - let hasWarned = false; - function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { - if (!hasWarned) { - hasWarned = true; - console[console.info ? "info" : "log"]( - ` is an experimental feature and its API will likely change.` - ); - } - const { - p: patch, - m: move, - um: unmount, - n: next, - o: { parentNode, remove } - } = rendererInternals; - let parentSuspenseId; - const isSuspensible = isVNodeSuspensible(vnode); - if (isSuspensible) { - if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) { - parentSuspenseId = parentSuspense.pendingId; - parentSuspense.deps++; - } - } - const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0; - { - assertNumber(timeout, `Suspense timeout`); - } - const initialAnchor = anchor; - const suspense = { - vnode, - parent: parentSuspense, - parentComponent, - namespace, - container, - hiddenContainer, - deps: 0, - pendingId: suspenseId++, - timeout: typeof timeout === "number" ? timeout : -1, - activeBranch: null, - pendingBranch: null, - isInFallback: !isHydrating, - isHydrating, - isUnmounted: false, - effects: [], - resolve(resume = false, sync = false) { - { - if (!resume && !suspense.pendingBranch) { - throw new Error( - `suspense.resolve() is called without a pending branch.` - ); - } - if (suspense.isUnmounted) { - throw new Error( - `suspense.resolve() is called on an already unmounted suspense boundary.` - ); - } - } - const { - vnode: vnode2, - activeBranch, - pendingBranch, - pendingId, - effects, - parentComponent: parentComponent2, - container: container2 - } = suspense; - let delayEnter = false; - if (suspense.isHydrating) { - suspense.isHydrating = false; - } else if (!resume) { - delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; - if (delayEnter) { - activeBranch.transition.afterLeave = () => { - if (pendingId === suspense.pendingId) { - move( - pendingBranch, - container2, - anchor === initialAnchor ? next(activeBranch) : anchor, - 0 - ); - queuePostFlushCb(effects); - } - }; - } - if (activeBranch) { - if (parentNode(activeBranch.el) !== suspense.hiddenContainer) { - anchor = next(activeBranch); - } - unmount(activeBranch, parentComponent2, suspense, true); - } - if (!delayEnter) { - move(pendingBranch, container2, anchor, 0); - } - } - setActiveBranch(suspense, pendingBranch); - suspense.pendingBranch = null; - suspense.isInFallback = false; - let parent = suspense.parent; - let hasUnresolvedAncestor = false; - while (parent) { - if (parent.pendingBranch) { - parent.effects.push(...effects); - hasUnresolvedAncestor = true; - break; - } - parent = parent.parent; - } - if (!hasUnresolvedAncestor && !delayEnter) { - queuePostFlushCb(effects); - } - suspense.effects = []; - if (isSuspensible) { - if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { - parentSuspense.deps--; - if (parentSuspense.deps === 0 && !sync) { - parentSuspense.resolve(); - } - } - } - triggerEvent(vnode2, "onResolve"); - }, - fallback(fallbackVNode) { - if (!suspense.pendingBranch) { - return; - } - const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; - triggerEvent(vnode2, "onFallback"); - const anchor2 = next(activeBranch); - const mountFallback = () => { - if (!suspense.isInFallback) { - return; - } - patch( - null, - fallbackVNode, - container2, - anchor2, - parentComponent2, - null, - // fallback tree will not have suspense context - namespace2, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, fallbackVNode); - }; - const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; - if (delayEnter) { - activeBranch.transition.afterLeave = mountFallback; - } - suspense.isInFallback = true; - unmount( - activeBranch, - parentComponent2, - null, - // no suspense so unmount hooks fire now - true - // shouldRemove - ); - if (!delayEnter) { - mountFallback(); - } - }, - move(container2, anchor2, type) { - suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); - suspense.container = container2; - }, - next() { - return suspense.activeBranch && next(suspense.activeBranch); - }, - registerDep(instance, setupRenderEffect) { - const isInPendingSuspense = !!suspense.pendingBranch; - if (isInPendingSuspense) { - suspense.deps++; - } - const hydratedEl = instance.vnode.el; - instance.asyncDep.catch((err) => { - handleError(err, instance, 0); - }).then((asyncSetupResult) => { - if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { - return; - } - instance.asyncResolved = true; - const { vnode: vnode2 } = instance; - { - pushWarningContext(vnode2); - } - handleSetupResult(instance, asyncSetupResult, false); - if (hydratedEl) { - vnode2.el = hydratedEl; - } - const placeholder = !hydratedEl && instance.subTree.el; - setupRenderEffect( - instance, - vnode2, - // component may have been moved before resolve. - // if this is not a hydration, instance.subTree will be the comment - // placeholder. - parentNode(hydratedEl || instance.subTree.el), - // anchor will not be used if this is hydration, so only need to - // consider the comment placeholder case. - hydratedEl ? null : next(instance.subTree), - suspense, - namespace, - optimized - ); - if (placeholder) { - remove(placeholder); - } - updateHOCHostEl(instance, vnode2.el); - { - popWarningContext(); - } - if (isInPendingSuspense && --suspense.deps === 0) { - suspense.resolve(); - } - }); - }, - unmount(parentSuspense2, doRemove) { - suspense.isUnmounted = true; - if (suspense.activeBranch) { - unmount( - suspense.activeBranch, - parentComponent, - parentSuspense2, - doRemove - ); - } - if (suspense.pendingBranch) { - unmount( - suspense.pendingBranch, - parentComponent, - parentSuspense2, - doRemove - ); - } - } - }; - return suspense; - } - function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { - const suspense = vnode.suspense = createSuspenseBoundary( - vnode, - parentSuspense, - parentComponent, - node.parentNode, - // eslint-disable-next-line no-restricted-globals - document.createElement("div"), - null, - namespace, - slotScopeIds, - optimized, - rendererInternals, - true - ); - const result = hydrateNode( - node, - suspense.pendingBranch = vnode.ssContent, - parentComponent, - suspense, - slotScopeIds, - optimized - ); - if (suspense.deps === 0) { - suspense.resolve(false, true); - } - return result; - } - function normalizeSuspenseChildren(vnode) { - const { shapeFlag, children } = vnode; - const isSlotChildren = shapeFlag & 32; - vnode.ssContent = normalizeSuspenseSlot( - isSlotChildren ? children.default : children - ); - vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); - } - function normalizeSuspenseSlot(s) { - let block; - if (isFunction(s)) { - const trackBlock = isBlockTreeEnabled && s._c; - if (trackBlock) { - s._d = false; - openBlock(); - } - s = s(); - if (trackBlock) { - s._d = true; - block = currentBlock; - closeBlock(); - } - } - if (isArray(s)) { - const singleChild = filterSingleRoot(s); - if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) { - warn$1(` slots expect a single root node.`); - } - s = singleChild; - } - s = normalizeVNode(s); - if (block && !s.dynamicChildren) { - s.dynamicChildren = block.filter((c) => c !== s); - } - return s; - } - function queueEffectWithSuspense(fn, suspense) { - if (suspense && suspense.pendingBranch) { - if (isArray(fn)) { - suspense.effects.push(...fn); - } else { - suspense.effects.push(fn); - } - } else { - queuePostFlushCb(fn); - } - } - function setActiveBranch(suspense, branch) { - suspense.activeBranch = branch; - const { vnode, parentComponent } = suspense; - let el = branch.el; - while (!el && branch.component) { - branch = branch.component.subTree; - el = branch.el; - } - vnode.el = el; - if (parentComponent && parentComponent.subTree === vnode) { - parentComponent.vnode.el = el; - updateHOCHostEl(parentComponent, el); - } - } - function isVNodeSuspensible(vnode) { - var _a; - return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false; - } - - const ssrContextKey = Symbol.for("v-scx"); - const useSSRContext = () => { - { - warn$1(`useSSRContext() is not supported in the global build.`); - } - }; - - function watchEffect(effect, options) { - return doWatch(effect, null, options); - } - function watchPostEffect(effect, options) { - return doWatch( - effect, - null, - extend({}, options, { flush: "post" }) - ); - } - function watchSyncEffect(effect, options) { - return doWatch( - effect, - null, - extend({}, options, { flush: "sync" }) - ); - } - const INITIAL_WATCHER_VALUE = {}; - function watch(source, cb, options) { - if (!isFunction(cb)) { - warn$1( - `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` - ); - } - return doWatch(source, cb, options); - } - function doWatch(source, cb, { - immediate, - deep, - flush, - once, - onTrack, - onTrigger - } = EMPTY_OBJ) { - if (cb && once) { - const _cb = cb; - cb = (...args) => { - _cb(...args); - unwatch(); - }; - } - if (deep !== void 0 && typeof deep === "number") { - warn$1( - `watch() "deep" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.` - ); - } - if (!cb) { - if (immediate !== void 0) { - warn$1( - `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` - ); - } - if (deep !== void 0) { - warn$1( - `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` - ); - } - if (once !== void 0) { - warn$1( - `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` - ); - } - } - const warnInvalidSource = (s) => { - warn$1( - `Invalid watch source: `, - s, - `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` - ); - }; - const instance = currentInstance; - const reactiveGetter = (source2) => deep === true ? source2 : ( - // for deep: false, only traverse root-level properties - traverse(source2, deep === false ? 1 : void 0) - ); - let getter; - let forceTrigger = false; - let isMultiSource = false; - if (isRef(source)) { - getter = () => source.value; - forceTrigger = isShallow(source); - } else if (isReactive(source)) { - getter = () => reactiveGetter(source); - forceTrigger = true; - } else if (isArray(source)) { - isMultiSource = true; - forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); - getter = () => source.map((s) => { - if (isRef(s)) { - return s.value; - } else if (isReactive(s)) { - return reactiveGetter(s); - } else if (isFunction(s)) { - return callWithErrorHandling(s, instance, 2); - } else { - warnInvalidSource(s); - } - }); - } else if (isFunction(source)) { - if (cb) { - getter = () => callWithErrorHandling(source, instance, 2); - } else { - getter = () => { - if (cleanup) { - cleanup(); - } - return callWithAsyncErrorHandling( - source, - instance, - 3, - [onCleanup] - ); - }; - } - } else { - getter = NOOP; - warnInvalidSource(source); - } - if (cb && deep) { - const baseGetter = getter; - getter = () => traverse(baseGetter()); - } - let cleanup; - let onCleanup = (fn) => { - cleanup = effect.onStop = () => { - callWithErrorHandling(fn, instance, 4); - cleanup = effect.onStop = void 0; - }; - }; - let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; - const job = () => { - if (!effect.active || !effect.dirty) { - return; - } - if (cb) { - const newValue = effect.run(); - if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) { - if (cleanup) { - cleanup(); - } - callWithAsyncErrorHandling(cb, instance, 3, [ - newValue, - // pass undefined as the old value when it's changed for the first time - oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, - onCleanup - ]); - oldValue = newValue; - } - } else { - effect.run(); - } - }; - job.allowRecurse = !!cb; - let scheduler; - if (flush === "sync") { - scheduler = job; - } else if (flush === "post") { - scheduler = () => queuePostRenderEffect(job, instance && instance.suspense); - } else { - job.pre = true; - if (instance) - job.id = instance.uid; - scheduler = () => queueJob(job); - } - const effect = new ReactiveEffect(getter, NOOP, scheduler); - const scope = getCurrentScope(); - const unwatch = () => { - effect.stop(); - if (scope) { - remove(scope.effects, effect); - } - }; - { - effect.onTrack = onTrack; - effect.onTrigger = onTrigger; - } - if (cb) { - if (immediate) { - job(); - } else { - oldValue = effect.run(); - } - } else if (flush === "post") { - queuePostRenderEffect( - effect.run.bind(effect), - instance && instance.suspense - ); - } else { - effect.run(); - } - return unwatch; - } - function instanceWatch(source, value, options) { - const publicThis = this.proxy; - const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); - let cb; - if (isFunction(value)) { - cb = value; - } else { - cb = value.handler; - options = value; - } - const reset = setCurrentInstance(this); - const res = doWatch(getter, cb.bind(publicThis), options); - reset(); - return res; - } - function createPathGetter(ctx, path) { - const segments = path.split("."); - return () => { - let cur = ctx; - for (let i = 0; i < segments.length && cur; i++) { - cur = cur[segments[i]]; - } - return cur; - }; - } - function traverse(value, depth, currentDepth = 0, seen) { - if (!isObject(value) || value["__v_skip"]) { - return value; - } - if (depth && depth > 0) { - if (currentDepth >= depth) { - return value; - } - currentDepth++; - } - seen = seen || /* @__PURE__ */ new Set(); - if (seen.has(value)) { - return value; - } - seen.add(value); - if (isRef(value)) { - traverse(value.value, depth, currentDepth, seen); - } else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - traverse(value[i], depth, currentDepth, seen); - } - } else if (isSet(value) || isMap(value)) { - value.forEach((v) => { - traverse(v, depth, currentDepth, seen); - }); - } else if (isPlainObject(value)) { - for (const key in value) { - traverse(value[key], depth, currentDepth, seen); - } - } - return value; - } - function validateDirectiveName(name) { if (isBuiltInDirective(name)) { warn$1("Do not use built-in directive ids as custom directive id: " + name); @@ -3609,7 +2942,7 @@ If this is a native custom element, make sure to exclude it from component resol warn$1(`withDirectives can only be used inside render functions.`); return vnode; } - const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy; + const instance = getComponentPublicInstance(currentRenderingInstance); const bindings = vnode.dirs || (vnode.dirs = []); for (let i = 0; i < directives.length; i++) { let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; @@ -3657,6 +2990,325 @@ If this is a native custom element, make sure to exclude it from component resol } } + const TeleportEndKey = Symbol("_vte"); + const isTeleport = (type) => type.__isTeleport; + const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); + const isTeleportDeferred = (props) => props && (props.defer || props.defer === ""); + const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; + const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; + const resolveTarget = (props, select) => { + const targetSelector = props && props.to; + if (isString(targetSelector)) { + if (!select) { + warn$1( + `Current renderer does not support string target for Teleports. (missing querySelector renderer option)` + ); + return null; + } else { + const target = select(targetSelector); + if (!target && !isTeleportDisabled(props)) { + warn$1( + `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.` + ); + } + return target; + } + } else { + if (!targetSelector && !isTeleportDisabled(props)) { + warn$1(`Invalid Teleport target: ${targetSelector}`); + } + return targetSelector; + } + }; + const TeleportImpl = { + name: "Teleport", + __isTeleport: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { + const { + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + o: { insert, querySelector, createText, createComment } + } = internals; + const disabled = isTeleportDisabled(n2.props); + let { shapeFlag, children, dynamicChildren } = n2; + if (isHmrUpdating) { + optimized = false; + dynamicChildren = null; + } + if (n1 == null) { + const placeholder = n2.el = createComment("teleport start") ; + const mainAnchor = n2.anchor = createComment("teleport end") ; + insert(placeholder, container, anchor); + insert(mainAnchor, container, anchor); + const mount = (container2, anchor2) => { + if (shapeFlag & 16) { + if (parentComponent && parentComponent.isCE) { + parentComponent.ce._teleportTarget = container2; + } + mountChildren( + children, + container2, + anchor2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountToTarget = () => { + const target = n2.target = resolveTarget(n2.props, querySelector); + const targetAnchor = prepareAnchor(target, n2, createText, insert); + if (target) { + if (namespace !== "svg" && isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace !== "mathml" && isTargetMathML(target)) { + namespace = "mathml"; + } + if (!disabled) { + mount(target, targetAnchor); + updateCssVars(n2); + } + } else if (!disabled) { + warn$1( + "Invalid Teleport target on mount:", + target, + `(${typeof target})` + ); + } + }; + if (disabled) { + mount(container, mainAnchor); + updateCssVars(n2); + } + if (isTeleportDeferred(n2.props)) { + queuePostRenderEffect(mountToTarget, parentSuspense); + } else { + mountToTarget(); + } + } else { + n2.el = n1.el; + n2.targetStart = n1.targetStart; + const mainAnchor = n2.anchor = n1.anchor; + const target = n2.target = n1.target; + const targetAnchor = n2.targetAnchor = n1.targetAnchor; + const wasDisabled = isTeleportDisabled(n1.props); + const currentContainer = wasDisabled ? container : target; + const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + currentContainer, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + traverseStaticChildren(n1, n2, true); + } else if (!optimized) { + patchChildren( + n1, + n2, + currentContainer, + currentAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + false + ); + } + if (disabled) { + if (!wasDisabled) { + moveTeleport( + n2, + container, + mainAnchor, + internals, + 1 + ); + } else { + if (n2.props && n1.props && n2.props.to !== n1.props.to) { + n2.props.to = n1.props.to; + } + } + } else { + if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { + const nextTarget = n2.target = resolveTarget( + n2.props, + querySelector + ); + if (nextTarget) { + moveTeleport( + n2, + nextTarget, + null, + internals, + 0 + ); + } else { + warn$1( + "Invalid Teleport target on update:", + target, + `(${typeof target})` + ); + } + } else if (wasDisabled) { + moveTeleport( + n2, + target, + targetAnchor, + internals, + 1 + ); + } + } + updateCssVars(n2); + } + }, + remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) { + const { + shapeFlag, + children, + anchor, + targetStart, + targetAnchor, + target, + props + } = vnode; + if (target) { + hostRemove(targetStart); + hostRemove(targetAnchor); + } + doRemove && hostRemove(anchor); + if (shapeFlag & 16) { + const shouldRemove = doRemove || !isTeleportDisabled(props); + for (let i = 0; i < children.length; i++) { + const child = children[i]; + unmount( + child, + parentComponent, + parentSuspense, + shouldRemove, + !!child.dynamicChildren + ); + } + } + }, + move: moveTeleport, + hydrate: hydrateTeleport + }; + function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { + if (moveType === 0) { + insert(vnode.targetAnchor, container, parentAnchor); + } + const { el, anchor, shapeFlag, children, props } = vnode; + const isReorder = moveType === 2; + if (isReorder) { + insert(el, container, parentAnchor); + } + if (!isReorder || isTeleportDisabled(props)) { + if (shapeFlag & 16) { + for (let i = 0; i < children.length; i++) { + move( + children[i], + container, + parentAnchor, + 2 + ); + } + } + } + if (isReorder) { + insert(anchor, container, parentAnchor); + } + } + function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { + o: { nextSibling, parentNode, querySelector, insert, createText } + }, hydrateChildren) { + const target = vnode.target = resolveTarget( + vnode.props, + querySelector + ); + if (target) { + const targetNode = target._lpa || target.firstChild; + if (vnode.shapeFlag & 16) { + if (isTeleportDisabled(vnode.props)) { + vnode.anchor = hydrateChildren( + nextSibling(node), + vnode, + parentNode(node), + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + vnode.targetStart = targetNode; + vnode.targetAnchor = targetNode && nextSibling(targetNode); + } else { + vnode.anchor = nextSibling(node); + let targetAnchor = targetNode; + while (targetAnchor) { + if (targetAnchor && targetAnchor.nodeType === 8) { + if (targetAnchor.data === "teleport start anchor") { + vnode.targetStart = targetAnchor; + } else if (targetAnchor.data === "teleport anchor") { + vnode.targetAnchor = targetAnchor; + target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); + break; + } + } + targetAnchor = nextSibling(targetAnchor); + } + if (!vnode.targetAnchor) { + prepareAnchor(target, vnode, createText, insert); + } + hydrateChildren( + targetNode && nextSibling(targetNode), + vnode, + target, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } + updateCssVars(vnode); + } + return vnode.anchor && nextSibling(vnode.anchor); + } + const Teleport = TeleportImpl; + function updateCssVars(vnode) { + const ctx = vnode.ctx; + if (ctx && ctx.ut) { + let node = vnode.targetStart; + while (node && node !== vnode.targetAnchor) { + if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid); + node = node.nextSibling; + } + ctx.ut(); + } + } + function prepareAnchor(target, vnode, createText, insert) { + const targetStart = vnode.targetStart = createText(""); + const targetAnchor = vnode.targetAnchor = createText(""); + targetStart[TeleportEndKey] = targetAnchor; + if (target) { + insert(targetStart, target); + insert(targetAnchor, target); + } + return targetAnchor; + } + const leaveCbKey = Symbol("_leaveCb"); const enterCbKey$1 = Symbol("_enterCb"); function useTransitionState() { @@ -3695,6 +3347,10 @@ If this is a native custom element, make sure to exclude it from component resol onAfterAppear: TransitionHookValidator, onAppearCancelled: TransitionHookValidator }; + const recursiveGetSubtree = (instance) => { + const subTree = instance.subTree; + return subTree.component ? recursiveGetSubtree(subTree.component) : subTree; + }; const BaseTransitionImpl = { name: `BaseTransition`, props: BaseTransitionPropsValidators, @@ -3706,22 +3362,7 @@ If this is a native custom element, make sure to exclude it from component resol if (!children || !children.length) { return; } - let child = children[0]; - if (children.length > 1) { - let hasFound = false; - for (const c of children) { - if (c.type !== Comment) { - if (hasFound) { - warn$1( - " can only be used on a single element or component. Use for lists." - ); - break; - } - child = c; - hasFound = true; - } - } - } + const child = findNonCommentChild(children); const rawProps = toRaw(props); const { mode } = rawProps; if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { @@ -3730,20 +3371,24 @@ If this is a native custom element, make sure to exclude it from component resol if (state.isLeaving) { return emptyPlaceholder(child); } - const innerChild = getKeepAliveChild(child); + const innerChild = getInnerChild$1(child); if (!innerChild) { return emptyPlaceholder(child); } - const enterHooks = resolveTransitionHooks( + let enterHooks = resolveTransitionHooks( innerChild, rawProps, state, - instance + instance, + // #11061, ensure enterHooks is fresh after clone + (hooks) => enterHooks = hooks ); - setTransitionHooks(innerChild, enterHooks); + if (innerChild.type !== Comment) { + setTransitionHooks(innerChild, enterHooks); + } const oldChild = instance.subTree; - const oldInnerChild = oldChild && getKeepAliveChild(oldChild); - if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild)) { + const oldInnerChild = oldChild && getInnerChild$1(oldChild); + if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) { const leavingHooks = resolveTransitionHooks( oldInnerChild, rawProps, @@ -3751,14 +3396,14 @@ If this is a native custom element, make sure to exclude it from component resol instance ); setTransitionHooks(oldInnerChild, leavingHooks); - if (mode === "out-in") { + if (mode === "out-in" && innerChild.type !== Comment) { state.isLeaving = true; leavingHooks.afterLeave = () => { state.isLeaving = false; - if (instance.update.active !== false) { - instance.effect.dirty = true; + if (!(instance.job.flags & 8)) { instance.update(); } + delete leavingHooks.afterLeave; }; return emptyPlaceholder(child); } else if (mode === "in-out" && innerChild.type !== Comment) { @@ -3781,6 +3426,25 @@ If this is a native custom element, make sure to exclude it from component resol }; } }; + function findNonCommentChild(children) { + let child = children[0]; + if (children.length > 1) { + let hasFound = false; + for (const c of children) { + if (c.type !== Comment) { + if (hasFound) { + warn$1( + " can only be used on a single element or component. Use for lists." + ); + break; + } + child = c; + hasFound = true; + } + } + } + return child; + } const BaseTransition = BaseTransitionImpl; function getLeavingNodesForType(state, vnode) { const { leavingVNodes } = state; @@ -3791,7 +3455,7 @@ If this is a native custom element, make sure to exclude it from component resol } return leavingVNodesCache; } - function resolveTransitionHooks(vnode, props, state, instance) { + function resolveTransitionHooks(vnode, props, state, instance, postClone) { const { appear, mode, @@ -3823,8 +3487,7 @@ If this is a native custom element, make sure to exclude it from component resol const done = args[1]; callHook(hook, args); if (isArray(hook)) { - if (hook.every((hook2) => hook2.length <= 1)) - done(); + if (hook.every((hook2) => hook2.length <= 1)) done(); } else if (hook.length <= 1) { done(); } @@ -3868,8 +3531,7 @@ If this is a native custom element, make sure to exclude it from component resol } let called = false; const done = el[enterCbKey$1] = (cancelled) => { - if (called) - return; + if (called) return; called = true; if (cancelled) { callHook(cancelHook, [el]); @@ -3901,8 +3563,7 @@ If this is a native custom element, make sure to exclude it from component resol callHook(onBeforeLeave, [el]); let called = false; const done = el[leaveCbKey] = (cancelled) => { - if (called) - return; + if (called) return; called = true; remove(); if (cancelled) { @@ -3923,7 +3584,15 @@ If this is a native custom element, make sure to exclude it from component resol } }, clone(vnode2) { - return resolveTransitionHooks(vnode2, props, state, instance); + const hooks2 = resolveTransitionHooks( + vnode2, + props, + state, + instance, + postClone + ); + if (postClone) postClone(hooks2); + return hooks2; } }; return hooks; @@ -3935,15 +3604,29 @@ If this is a native custom element, make sure to exclude it from component resol return vnode; } } - function getKeepAliveChild(vnode) { - return isKeepAlive(vnode) ? ( - // #7121 ensure get the child component subtree in case - // it's been replaced during HMR - vnode.component ? vnode.component.subTree : vnode.children ? vnode.children[0] : void 0 - ) : vnode; + function getInnerChild$1(vnode) { + if (!isKeepAlive(vnode)) { + if (isTeleport(vnode.type) && vnode.children) { + return findNonCommentChild(vnode.children); + } + return vnode; + } + if (vnode.component) { + return vnode.component.subTree; + } + const { shapeFlag, children } = vnode; + if (children) { + if (shapeFlag & 16) { + return children[0]; + } + if (shapeFlag & 32 && isFunction(children.default)) { + return children.default(); + } + } } function setTransitionHooks(vnode, hooks) { if (vnode.shapeFlag & 6 && vnode.component) { + vnode.transition = hooks; setTransitionHooks(vnode.component.subTree, hooks); } else if (vnode.shapeFlag & 128) { vnode.ssContent.transition = hooks.clone(vnode.ssContent); @@ -3959,8 +3642,7 @@ If this is a native custom element, make sure to exclude it from component resol let child = children[i]; const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); if (child.type === Fragment) { - if (child.patchFlag & 128) - keyedFragmentCount++; + if (child.patchFlag & 128) keyedFragmentCount++; ret = ret.concat( getTransitionRawChildren(child.children, keepComment, key) ); @@ -3980,12 +3662,848 @@ If this is a native custom element, make sure to exclude it from component resol // @__NO_SIDE_EFFECTS__ function defineComponent(options, extraOptions) { return isFunction(options) ? ( - // #8326: extend call and options.name access are considered side-effects + // #8236: extend call and options.name access are considered side-effects // by Rollup, so we have to wrap it in a pure-annotated IIFE. /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() ) : options; } + function useId() { + const i = getCurrentInstance(); + if (i) { + return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++; + } else { + warn$1( + `useId() is called when there is no active component instance to be associated with.` + ); + } + } + function markAsyncBoundary(instance) { + instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0]; + } + + const knownTemplateRefs = /* @__PURE__ */ new WeakSet(); + function useTemplateRef(key) { + const i = getCurrentInstance(); + const r = shallowRef(null); + if (i) { + const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs; + let desc; + if ((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) { + warn$1(`useTemplateRef('${key}') already exists.`); + } else { + Object.defineProperty(refs, key, { + enumerable: true, + get: () => r.value, + set: (val) => r.value = val + }); + } + } else { + warn$1( + `useTemplateRef() is called when there is no active component instance to be associated with.` + ); + } + const ret = readonly(r) ; + { + knownTemplateRefs.add(ret); + } + return ret; + } + + function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { + if (isArray(rawRef)) { + rawRef.forEach( + (r, i) => setRef( + r, + oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), + parentSuspense, + vnode, + isUnmount + ) + ); + return; + } + if (isAsyncWrapper(vnode) && !isUnmount) { + return; + } + const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el; + const value = isUnmount ? null : refValue; + const { i: owner, r: ref } = rawRef; + if (!owner) { + warn$1( + `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.` + ); + return; + } + const oldRef = oldRawRef && oldRawRef.r; + const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; + const setupState = owner.setupState; + const rawSetupState = toRaw(setupState); + const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => { + if (knownTemplateRefs.has(rawSetupState[key])) { + return false; + } + return hasOwn(rawSetupState, key); + }; + if (oldRef != null && oldRef !== ref) { + if (isString(oldRef)) { + refs[oldRef] = null; + if (canSetSetupRef(oldRef)) { + setupState[oldRef] = null; + } + } else if (isRef(oldRef)) { + oldRef.value = null; + } + } + if (isFunction(ref)) { + callWithErrorHandling(ref, owner, 12, [value, refs]); + } else { + const _isString = isString(ref); + const _isRef = isRef(ref); + if (_isString || _isRef) { + const doSet = () => { + if (rawRef.f) { + const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value; + if (isUnmount) { + isArray(existing) && remove(existing, refValue); + } else { + if (!isArray(existing)) { + if (_isString) { + refs[ref] = [refValue]; + if (canSetSetupRef(ref)) { + setupState[ref] = refs[ref]; + } + } else { + ref.value = [refValue]; + if (rawRef.k) refs[rawRef.k] = ref.value; + } + } else if (!existing.includes(refValue)) { + existing.push(refValue); + } + } + } else if (_isString) { + refs[ref] = value; + if (canSetSetupRef(ref)) { + setupState[ref] = value; + } + } else if (_isRef) { + ref.value = value; + if (rawRef.k) refs[rawRef.k] = value; + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); + } + }; + if (value) { + doSet.id = -1; + queuePostRenderEffect(doSet, parentSuspense); + } else { + doSet(); + } + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); + } + } + } + + let hasLoggedMismatchError = false; + const logMismatchError = () => { + if (hasLoggedMismatchError) { + return; + } + console.error("Hydration completed but contains mismatches."); + hasLoggedMismatchError = true; + }; + const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; + const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); + const getContainerType = (container) => { + if (container.nodeType !== 1) return void 0; + if (isSVGContainer(container)) return "svg"; + if (isMathMLContainer(container)) return "mathml"; + return void 0; + }; + const isComment = (node) => node.nodeType === 8; + function createHydrationFunctions(rendererInternals) { + const { + mt: mountComponent, + p: patch, + o: { + patchProp, + createText, + nextSibling, + parentNode, + remove, + insert, + createComment + } + } = rendererInternals; + const hydrate = (vnode, container) => { + if (!container.hasChildNodes()) { + warn$1( + `Attempting to hydrate existing markup but container is empty. Performing full mount instead.` + ); + patch(null, vnode, container); + flushPostFlushCbs(); + container._vnode = vnode; + return; + } + hydrateNode(container.firstChild, vnode, null, null, null); + flushPostFlushCbs(); + container._vnode = vnode; + }; + const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { + optimized = optimized || !!vnode.dynamicChildren; + const isFragmentStart = isComment(node) && node.data === "["; + const onMismatch = () => handleMismatch( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + isFragmentStart + ); + const { type, ref, shapeFlag, patchFlag } = vnode; + let domType = node.nodeType; + vnode.el = node; + { + def(node, "__vnode", vnode, true); + def(node, "__vueParentComponent", parentComponent, true); + } + if (patchFlag === -2) { + optimized = false; + vnode.dynamicChildren = null; + } + let nextNode = null; + switch (type) { + case Text: + if (domType !== 3) { + if (vnode.children === "") { + insert(vnode.el = createText(""), parentNode(node), node); + nextNode = node; + } else { + nextNode = onMismatch(); + } + } else { + if (node.data !== vnode.children) { + warn$1( + `Hydration text mismatch in`, + node.parentNode, + ` + - rendered on server: ${JSON.stringify( + node.data + )} + - expected on client: ${JSON.stringify(vnode.children)}` + ); + logMismatchError(); + node.data = vnode.children; + } + nextNode = nextSibling(node); + } + break; + case Comment: + if (isTemplateNode(node)) { + nextNode = nextSibling(node); + replaceNode( + vnode.el = node.content.firstChild, + node, + parentComponent + ); + } else if (domType !== 8 || isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = nextSibling(node); + } + break; + case Static: + if (isFragmentStart) { + node = nextSibling(node); + domType = node.nodeType; + } + if (domType === 1 || domType === 3) { + nextNode = node; + const needToAdoptContent = !vnode.children.length; + for (let i = 0; i < vnode.staticCount; i++) { + if (needToAdoptContent) + vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data; + if (i === vnode.staticCount - 1) { + vnode.anchor = nextNode; + } + nextNode = nextSibling(nextNode); + } + return isFragmentStart ? nextSibling(nextNode) : nextNode; + } else { + onMismatch(); + } + break; + case Fragment: + if (!isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = hydrateFragment( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + break; + default: + if (shapeFlag & 1) { + if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { + nextNode = onMismatch(); + } else { + nextNode = hydrateElement( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } else if (shapeFlag & 6) { + vnode.slotScopeIds = slotScopeIds; + const container = parentNode(node); + if (isFragmentStart) { + nextNode = locateClosingAnchor(node); + } else if (isComment(node) && node.data === "teleport start") { + nextNode = locateClosingAnchor(node, node.data, "teleport end"); + } else { + nextNode = nextSibling(node); + } + mountComponent( + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + optimized + ); + if (isAsyncWrapper(vnode)) { + let subTree; + if (isFragmentStart) { + subTree = createVNode(Fragment); + subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; + } else { + subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); + } + subTree.el = node; + vnode.component.subTree = subTree; + } + } else if (shapeFlag & 64) { + if (domType !== 8) { + nextNode = onMismatch(); + } else { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized, + rendererInternals, + hydrateChildren + ); + } + } else if (shapeFlag & 128) { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + getContainerType(parentNode(node)), + slotScopeIds, + optimized, + rendererInternals, + hydrateNode + ); + } else { + warn$1("Invalid HostVNode type:", type, `(${typeof type})`); + } + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode); + } + return nextNode; + }; + const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!vnode.dynamicChildren; + const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; + const forcePatch = type === "input" || type === "option"; + { + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + let needCallTransitionHooks = false; + if (isTemplateNode(el)) { + needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; + const content = el.content.firstChild; + if (needCallTransitionHooks) { + transition.beforeEnter(content); + } + replaceNode(content, el, parentComponent); + vnode.el = el = content; + } + if (shapeFlag & 16 && // skip if element has innerHTML / textContent + !(props && (props.innerHTML || props.textContent))) { + let next = hydrateChildren( + el.firstChild, + vnode, + el, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + let hasWarned = false; + while (next) { + if (!isMismatchAllowed(el, 1 /* CHILDREN */)) { + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + el, + ` +Server rendered element contains more child nodes than client vdom.` + ); + hasWarned = true; + } + logMismatchError(); + } + const cur = next; + next = next.nextSibling; + remove(cur); + } + } else if (shapeFlag & 8) { + let clientText = vnode.children; + if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) { + clientText = clientText.slice(1); + } + if (el.textContent !== clientText) { + if (!isMismatchAllowed(el, 0 /* TEXT */)) { + warn$1( + `Hydration text content mismatch on`, + el, + ` + - rendered on server: ${el.textContent} + - expected on client: ${vnode.children}` + ); + logMismatchError(); + } + el.textContent = vnode.children; + } + } + if (props) { + { + const isCustomElement = el.tagName.includes("-"); + for (const key in props) { + if (// #11189 skip if this node has directives that have created hooks + // as it could have mutated the DOM in any possible way + !(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) { + logMismatchError(); + } + if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers + key[0] === "." || isCustomElement) { + patchProp(el, key, null, props[key], void 0, parentComponent); + } + } + } + } + let vnodeHooks; + if (vnodeHooks = props && props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHooks, parentComponent, vnode); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { + queueEffectWithSuspense(() => { + vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + } + return el.nextSibling; + }; + const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!parentVNode.dynamicChildren; + const children = parentVNode.children; + const l = children.length; + let hasWarned = false; + for (let i = 0; i < l; i++) { + const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); + const isText = vnode.type === Text; + if (node) { + if (isText && !optimized) { + if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) { + insert( + createText( + node.data.slice(vnode.children.length) + ), + container, + nextSibling(node) + ); + node.data = vnode.children; + } + } + node = hydrateNode( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } else if (isText && !vnode.children) { + insert(vnode.el = createText(""), container); + } else { + if (!isMismatchAllowed(container, 1 /* CHILDREN */)) { + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + container, + ` +Server rendered element contains fewer child nodes than client vdom.` + ); + hasWarned = true; + } + logMismatchError(); + } + patch( + null, + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + } + } + return node; + }; + const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + const { slotScopeIds: fragmentSlotScopeIds } = vnode; + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + const container = parentNode(node); + const next = hydrateChildren( + nextSibling(node), + vnode, + container, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + if (next && isComment(next) && next.data === "]") { + return nextSibling(vnode.anchor = next); + } else { + logMismatchError(); + insert(vnode.anchor = createComment(`]`), container, next); + return next; + } + }; + const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + if (!isMismatchAllowed(node.parentElement, 1 /* CHILDREN */)) { + warn$1( + `Hydration node mismatch: +- rendered on server:`, + node, + node.nodeType === 3 ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, + ` +- expected on client:`, + vnode.type + ); + logMismatchError(); + } + vnode.el = null; + if (isFragment) { + const end = locateClosingAnchor(node); + while (true) { + const next2 = nextSibling(node); + if (next2 && next2 !== end) { + remove(next2); + } else { + break; + } + } + } + const next = nextSibling(node); + const container = parentNode(node); + remove(node); + patch( + null, + vnode, + container, + next, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + return next; + }; + const locateClosingAnchor = (node, open = "[", close = "]") => { + let match = 0; + while (node) { + node = nextSibling(node); + if (node && isComment(node)) { + if (node.data === open) match++; + if (node.data === close) { + if (match === 0) { + return nextSibling(node); + } else { + match--; + } + } + } + } + return node; + }; + const replaceNode = (newNode, oldNode, parentComponent) => { + const parentNode2 = oldNode.parentNode; + if (parentNode2) { + parentNode2.replaceChild(newNode, oldNode); + } + let parent = parentComponent; + while (parent) { + if (parent.vnode.el === oldNode) { + parent.vnode.el = parent.subTree.el = newNode; + } + parent = parent.parent; + } + }; + const isTemplateNode = (node) => { + return node.nodeType === 1 && node.tagName === "TEMPLATE"; + }; + return [hydrate, hydrateNode]; + } + function propHasMismatch(el, key, clientValue, vnode, instance) { + let mismatchType; + let mismatchKey; + let actual; + let expected; + if (key === "class") { + actual = el.getAttribute("class"); + expected = normalizeClass(clientValue); + if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) { + mismatchType = 2 /* CLASS */; + mismatchKey = `class`; + } + } else if (key === "style") { + actual = el.getAttribute("style") || ""; + expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue)); + const actualMap = toStyleMap(actual); + const expectedMap = toStyleMap(expected); + if (vnode.dirs) { + for (const { dir, value } of vnode.dirs) { + if (dir.name === "show" && !value) { + expectedMap.set("display", "none"); + } + } + } + if (instance) { + resolveCssVars(instance, vnode, expectedMap); + } + if (!isMapEqual(actualMap, expectedMap)) { + mismatchType = 3 /* STYLE */; + mismatchKey = "style"; + } + } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) { + if (isBooleanAttr(key)) { + actual = el.hasAttribute(key); + expected = includeBooleanAttr(clientValue); + } else if (clientValue == null) { + actual = el.hasAttribute(key); + expected = false; + } else { + if (el.hasAttribute(key)) { + actual = el.getAttribute(key); + } else if (key === "value" && el.tagName === "TEXTAREA") { + actual = el.value; + } else { + actual = false; + } + expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false; + } + if (actual !== expected) { + mismatchType = 4 /* ATTRIBUTE */; + mismatchKey = key; + } + } + if (mismatchType != null && !isMismatchAllowed(el, mismatchType)) { + const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`; + const preSegment = `Hydration ${MismatchTypeString[mismatchType]} mismatch on`; + const postSegment = ` + - rendered on server: ${format(actual)} + - expected on client: ${format(expected)} + Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead. + You should fix the source of the mismatch.`; + { + warn$1(preSegment, el, postSegment); + } + return true; + } + return false; + } + function toClassSet(str) { + return new Set(str.trim().split(/\s+/)); + } + function isSetEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const s of a) { + if (!b.has(s)) { + return false; + } + } + return true; + } + function toStyleMap(str) { + const styleMap = /* @__PURE__ */ new Map(); + for (const item of str.split(";")) { + let [key, value] = item.split(":"); + key = key.trim(); + value = value && value.trim(); + if (key && value) { + styleMap.set(key, value); + } + } + return styleMap; + } + function isMapEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const [key, value] of a) { + if (value !== b.get(key)) { + return false; + } + } + return true; + } + function resolveCssVars(instance, vnode, expectedMap) { + const root = instance.subTree; + if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) { + const cssVars = instance.getCssVars(); + for (const key in cssVars) { + expectedMap.set( + `--${getEscapedCssVarName(key)}`, + String(cssVars[key]) + ); + } + } + if (vnode === root && instance.parent) { + resolveCssVars(instance.parent, instance.vnode, expectedMap); + } + } + const allowMismatchAttr = "data-allow-mismatch"; + const MismatchTypeString = { + [0 /* TEXT */]: "text", + [1 /* CHILDREN */]: "children", + [2 /* CLASS */]: "class", + [3 /* STYLE */]: "style", + [4 /* ATTRIBUTE */]: "attribute" + }; + function isMismatchAllowed(el, allowedType) { + if (allowedType === 0 /* TEXT */ || allowedType === 1 /* CHILDREN */) { + while (el && !el.hasAttribute(allowMismatchAttr)) { + el = el.parentElement; + } + } + const allowedAttr = el && el.getAttribute(allowMismatchAttr); + if (allowedAttr == null) { + return false; + } else if (allowedAttr === "") { + return true; + } else { + const list = allowedAttr.split(","); + if (allowedType === 0 /* TEXT */ && list.includes("children")) { + return true; + } + return allowedAttr.split(",").includes(MismatchTypeString[allowedType]); + } + } + + const hydrateOnIdle = (timeout = 1e4) => (hydrate) => { + const id = requestIdleCallback(hydrate, { timeout }); + return () => cancelIdleCallback(id); + }; + const hydrateOnVisible = (opts) => (hydrate, forEach) => { + const ob = new IntersectionObserver((entries) => { + for (const e of entries) { + if (!e.isIntersecting) continue; + ob.disconnect(); + hydrate(); + break; + } + }, opts); + forEach((el) => ob.observe(el)); + return () => ob.disconnect(); + }; + const hydrateOnMediaQuery = (query) => (hydrate) => { + if (query) { + const mql = matchMedia(query); + if (mql.matches) { + hydrate(); + } else { + mql.addEventListener("change", hydrate, { once: true }); + return () => mql.removeEventListener("change", hydrate); + } + } + }; + const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => { + if (isString(interactions)) interactions = [interactions]; + let hasHydrated = false; + const doHydrate = (e) => { + if (!hasHydrated) { + hasHydrated = true; + teardown(); + hydrate(); + e.target.dispatchEvent(new e.constructor(e.type, e)); + } + }; + const teardown = () => { + forEach((el) => { + for (const i of interactions) { + el.removeEventListener(i, doHydrate); + } + }); + }; + forEach((el) => { + for (const i of interactions) { + el.addEventListener(i, doHydrate, { once: true }); + } + }); + return teardown; + }; + function forEachElement(node, cb) { + if (isComment(node) && node.data === "[") { + let depth = 1; + let next = node.nextSibling; + while (next) { + if (next.nodeType === 1) { + cb(next); + } else if (isComment(next)) { + if (next.data === "]") { + if (--depth === 0) break; + } else if (next.data === "[") { + depth++; + } + } + next = next.nextSibling; + } + } else { + cb(node); + } + } + const isAsyncWrapper = (i) => !!i.type.__asyncLoader; /*! #__NO_SIDE_EFFECTS__ */ // @__NO_SIDE_EFFECTS__ @@ -3998,6 +4516,7 @@ If this is a native custom element, make sure to exclude it from component resol loadingComponent, errorComponent, delay = 200, + hydrate: hydrateStrategy, timeout, // undefined = never times out suspensible = true, @@ -4046,11 +4565,28 @@ If this is a native custom element, make sure to exclude it from component resol return defineComponent({ name: "AsyncComponentWrapper", __asyncLoader: load, + __asyncHydrate(el, instance, hydrate) { + const doHydrate = hydrateStrategy ? () => { + const teardown = hydrateStrategy( + hydrate, + (cb) => forEachElement(el, cb) + ); + if (teardown) { + (instance.bum || (instance.bum = [])).push(teardown); + } + } : hydrate; + if (resolvedComp) { + doHydrate(); + } else { + load().then(() => !instance.isUnmounted && doHydrate()); + } + }, get __asyncResolved() { return resolvedComp; }, setup() { const instance = currentInstance; + markAsyncBoundary(instance); if (resolvedComp) { return () => createInnerComp(resolvedComp, instance); } @@ -4095,8 +4631,7 @@ If this is a native custom element, make sure to exclude it from component resol load().then(() => { loaded.value = true; if (instance.parent && isKeepAlive(instance.parent.vnode)) { - instance.parent.effect.dirty = true; - queueJob(instance.parent.update); + instance.parent.update(); } }).catch((err) => { onError(err); @@ -4186,6 +4721,8 @@ If this is a native custom element, make sure to exclude it from component resol }; sharedContext.deactivate = (vnode) => { const instance2 = vnode.component; + invalidateMount(instance2.m); + invalidateMount(instance2.a); move(vnode, storageContainer, null, 1, parentSuspense); queuePostRenderEffect(() => { if (instance2.da) { @@ -4208,14 +4745,14 @@ If this is a native custom element, make sure to exclude it from component resol function pruneCache(filter) { cache.forEach((vnode, key) => { const name = getComponentName(vnode.type); - if (name && (!filter || !filter(name))) { + if (name && !filter(name)) { pruneCacheEntry(key); } }); } function pruneCacheEntry(key) { const cached = cache.get(key); - if (!current || !isSameVNodeType(cached, current)) { + if (cached && (!current || !isSameVNodeType(cached, current))) { unmount(cached); } else if (current) { resetShapeFlag(current); @@ -4235,7 +4772,13 @@ If this is a native custom element, make sure to exclude it from component resol let pendingCacheKey = null; const cacheSubtree = () => { if (pendingCacheKey != null) { - cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + if (isSuspense(instance.subTree.type)) { + queuePostRenderEffect(() => { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + }, instance.subTree.suspense); + } else { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + } } }; onMounted(cacheSubtree); @@ -4256,7 +4799,7 @@ If this is a native custom element, make sure to exclude it from component resol return () => { pendingCacheKey = null; if (!slots.default) { - return null; + return current = null; } const children = slots.default(); const rawVNode = children[0]; @@ -4271,12 +4814,17 @@ If this is a native custom element, make sure to exclude it from component resol return rawVNode; } let vnode = getInnerChild(rawVNode); + if (vnode.type === Comment) { + current = null; + return vnode; + } const comp = vnode.type; const name = getComponentName( isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp ); const { include, exclude, max } = props; if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { + vnode.shapeFlag &= ~256; current = vnode; return rawVNode; } @@ -4317,6 +4865,7 @@ If this is a native custom element, make sure to exclude it from component resol } else if (isString(pattern)) { return pattern.split(",").includes(name); } else if (isRegExp(pattern)) { + pattern.lastIndex = 0; return pattern.test(name); } return false; @@ -4373,9 +4922,6 @@ If this is a native custom element, make sure to exclude it from component resol if (target) { const hooks = target[type] || (target[type] = []); const wrappedHook = hook.__weh || (hook.__weh = (...args) => { - if (target.isUnmounted) { - return; - } pauseTracking(); const reset = setCurrentInstance(target); const res = callWithAsyncErrorHandling(hook, target, type, args); @@ -4396,34 +4942,103 @@ If this is a native custom element, make sure to exclude it from component resol ); } } - const createHook = (lifecycle) => (hook, target = currentInstance) => ( - // post-create lifecycle registrations are noops during SSR (except for serverPrefetch) - (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target) - ); + const createHook = (lifecycle) => (hook, target = currentInstance) => { + if (!isInSSRComponentSetup || lifecycle === "sp") { + injectHook(lifecycle, (...args) => hook(...args), target); + } + }; const onBeforeMount = createHook("bm"); const onMounted = createHook("m"); - const onBeforeUpdate = createHook("bu"); + const onBeforeUpdate = createHook( + "bu" + ); const onUpdated = createHook("u"); - const onBeforeUnmount = createHook("bum"); + const onBeforeUnmount = createHook( + "bum" + ); const onUnmounted = createHook("um"); - const onServerPrefetch = createHook("sp"); - const onRenderTriggered = createHook( - "rtg" - ); - const onRenderTracked = createHook( - "rtc" + const onServerPrefetch = createHook( + "sp" ); + const onRenderTriggered = createHook("rtg"); + const onRenderTracked = createHook("rtc"); function onErrorCaptured(hook, target = currentInstance) { injectHook("ec", hook, target); } + const COMPONENTS = "components"; + const DIRECTIVES = "directives"; + function resolveComponent(name, maybeSelfReference) { + return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; + } + const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); + function resolveDynamicComponent(component) { + if (isString(component)) { + return resolveAsset(COMPONENTS, component, false) || component; + } else { + return component || NULL_DYNAMIC_COMPONENT; + } + } + function resolveDirective(name) { + return resolveAsset(DIRECTIVES, name); + } + function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { + const instance = currentRenderingInstance || currentInstance; + if (instance) { + const Component = instance.type; + if (type === COMPONENTS) { + const selfName = getComponentName( + Component, + false + ); + if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { + return Component; + } + } + const res = ( + // local registration + // check instance[type] first which is resolved for options API + resolve(instance[type] || Component[type], name) || // global registration + resolve(instance.appContext[type], name) + ); + if (!res && maybeSelfReference) { + return Component; + } + if (warnMissing && !res) { + const extra = type === COMPONENTS ? ` +If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; + warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); + } + return res; + } else { + warn$1( + `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().` + ); + } + } + function resolve(registry, name) { + return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); + } + function renderList(source, renderItem, cache, index) { let ret; const cached = cache && cache[index]; - if (isArray(source) || isString(source)) { + const sourceIsArray = isArray(source); + if (sourceIsArray || isString(source)) { + const sourceIsReactiveArray = sourceIsArray && isReactive(source); + let needsWrap = false; + if (sourceIsReactiveArray) { + needsWrap = !isShallow(source); + source = shallowReadArray(source); + } ret = new Array(source.length); for (let i = 0, l = source.length; i < l; i++) { - ret[i] = renderItem(source[i], i, void 0, cached && cached[i]); + ret[i] = renderItem( + needsWrap ? toReactive(source[i]) : source[i], + i, + void 0, + cached && cached[i] + ); } } else if (typeof source === "number") { if (!Number.isInteger(source)) { @@ -4466,8 +5081,7 @@ If this is a native custom element, make sure to exclude it from component resol } else if (slot) { slots[slot.name] = slot.key ? (...args) => { const res = slot.fn(...args); - if (res) - res.key = slot.key; + if (res) res.key = slot.key; return res; } : slot.fn; } @@ -4476,10 +5090,14 @@ If this is a native custom element, make sure to exclude it from component resol } function renderSlot(slots, name, props = {}, fallback, noSlotted) { - if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) { - if (name !== "default") - props.name = name; - return createVNode("slot", props, fallback && fallback()); + if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) { + if (name !== "default") props.name = name; + return openBlock(), createBlock( + Fragment, + null, + [createVNode("slot", props, fallback && fallback())], + 64 + ); } let slot = slots[name]; if (slot && slot.length > 1) { @@ -4496,9 +5114,10 @@ If this is a native custom element, make sure to exclude it from component resol const rendered = createBlock( Fragment, { - key: props.key || // slot content array of a dynamic conditional slot may have a branch + key: (props.key || // slot content array of a dynamic conditional slot may have a branch // key attached in the `createSlots` helper, respect that - validSlotContent && validSlotContent.key || `_${name}` + validSlotContent && validSlotContent.key || `_${name}`) + // #7256 force differentiate fallback content from actual content + (!validSlotContent && fallback ? "_fb" : "") }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 ? 64 : -2 @@ -4513,10 +5132,8 @@ If this is a native custom element, make sure to exclude it from component resol } function ensureValidVNode(vnodes) { return vnodes.some((child) => { - if (!isVNode(child)) - return true; - if (child.type === Comment) - return false; + if (!isVNode(child)) return true; + if (child.type === Comment) return false; if (child.type === Fragment && !ensureValidVNode(child.children)) return false; return true; @@ -4536,10 +5153,8 @@ If this is a native custom element, make sure to exclude it from component resol } const getPublicInstance = (i) => { - if (!i) - return null; - if (isStatefulComponent(i)) - return getExposeProxy(i) || i.proxy; + if (!i) return null; + if (isStatefulComponent(i)) return getComponentPublicInstance(i); return getPublicInstance(i.parent); }; const publicPropertiesMap = ( @@ -4555,10 +5170,10 @@ If this is a native custom element, make sure to exclude it from component resol $refs: (i) => shallowReadonly(i.refs) , $parent: (i) => getPublicInstance(i.parent), $root: (i) => getPublicInstance(i.root), + $host: (i) => i.ce, $emit: (i) => i.emit, $options: (i) => resolveMergedOptions(i) , $forceUpdate: (i) => i.f || (i.f = () => { - i.effect.dirty = true; queueJob(i.update); }), $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), @@ -4569,6 +5184,9 @@ If this is a native custom element, make sure to exclude it from component resol const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); const PublicInstanceProxyHandlers = { get({ _: instance }, key) { + if (key === "__v_skip") { + return true; + } const { ctx, setupState, data, props, accessCache, type, appContext } = instance; if (key === "__isVue") { return true; @@ -4611,7 +5229,7 @@ If this is a native custom element, make sure to exclude it from component resol let cssModule, globalProperties; if (publicGetter) { if (key === "$attrs") { - track(instance, "get", key); + track(instance.attrs, "get", ""); markAttrsAccessed(); } else if (key === "$slots") { track(instance, "get", key); @@ -4704,29 +5322,25 @@ If this is a native custom element, make sure to exclude it from component resol return Reflect.ownKeys(target); }; } - const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend( - {}, - PublicInstanceProxyHandlers, - { - get(target, key) { - if (key === Symbol.unscopables) { - return; - } - return PublicInstanceProxyHandlers.get(target, key, target); - }, - has(_, key) { - const has = key[0] !== "_" && !isGloballyAllowed(key); - if (!has && PublicInstanceProxyHandlers.has(_, key)) { - warn$1( - `Property ${JSON.stringify( - key - )} should not start with _ which is a reserved prefix for Vue internals.` - ); - } - return has; + const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend({}, PublicInstanceProxyHandlers, { + get(target, key) { + if (key === Symbol.unscopables) { + return; } + return PublicInstanceProxyHandlers.get(target, key, target); + }, + has(_, key) { + const has = key[0] !== "_" && !isGloballyAllowed(key); + if (!has && PublicInstanceProxyHandlers.has(_, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} should not start with _ which is a reserved prefix for Vue internals.` + ); + } + return has; } - ); + }); function createDevRenderContext(instance) { const target = {}; Object.defineProperty(target, `_`, { @@ -4848,8 +5462,7 @@ If this is a native custom element, make sure to exclude it from component resol function mergeDefaults(raw, defaults) { const props = normalizePropsOrEmits(raw); for (const key in defaults) { - if (key.startsWith("__skip")) - continue; + if (key.startsWith("__skip")) continue; let opt = props[key]; if (opt) { if (isArray(opt) || isFunction(opt)) { @@ -4869,10 +5482,8 @@ If this is a native custom element, make sure to exclude it from component resol return props; } function mergeModels(a, b) { - if (!a || !b) - return a || b; - if (isArray(a) && isArray(b)) - return a.concat(b); + if (!a || !b) return a || b; + if (isArray(a) && isArray(b)) return a.concat(b); return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b)); } function createPropsRestProxy(props, excludedKeys) { @@ -5102,10 +5713,8 @@ If this is a native custom element, make sure to exclude it from component resol if (inheritAttrs != null) { instance.inheritAttrs = inheritAttrs; } - if (components) - instance.components = components; - if (directives) - instance.directives = directives; + if (components) instance.components = components; + if (directives) instance.directives = directives; } function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) { if (isArray(injectOptions)) { @@ -5150,16 +5759,20 @@ If this is a native custom element, make sure to exclude it from component resol ); } function createWatcher(raw, ctx, publicThis, key) { - const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; + let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; if (isString(raw)) { const handler = ctx[raw]; if (isFunction(handler)) { - watch(getter, handler); + { + watch(getter, handler); + } } else { warn$1(`Invalid watch handler specified by key "${raw}"`, handler); } } else if (isFunction(raw)) { - watch(getter, raw.bind(publicThis)); + { + watch(getter, raw.bind(publicThis)); + } } else if (isObject(raw)) { if (isArray(raw)) { raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); @@ -5306,10 +5919,8 @@ If this is a native custom element, make sure to exclude it from component resol } } function mergeWatchOptions(to, from) { - if (!to) - return from; - if (!from) - return to; + if (!to) return from; + if (!from) return to; const merged = extend(/* @__PURE__ */ Object.create(null), to); for (const key in from) { merged[key] = mergeAsArray$1(to[key], from[key]); @@ -5350,6 +5961,7 @@ If this is a native custom element, make sure to exclude it from component resol } const context = createAppContext(); const installedPlugins = /* @__PURE__ */ new WeakSet(); + const pluginCleanupFns = []; let isMounted = false; const app = context.app = { _uid: uid$1++, @@ -5431,7 +6043,7 @@ If this is a native custom element, make sure to exclude it from component resol If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.` ); } - const vnode = createVNode(rootComponent, rootProps); + const vnode = app._ceVNode || createVNode(rootComponent, rootProps); vnode.appContext = context; if (namespace === true) { namespace = "svg"; @@ -5459,7 +6071,7 @@ If this is a native custom element, make sure to exclude it from component resol app._instance = vnode.component; devtoolsInitApp(app, version); } - return getExposeProxy(vnode.component) || vnode.component.proxy; + return getComponentPublicInstance(vnode.component); } else { warn$1( `App has already been mounted. @@ -5467,8 +6079,21 @@ If you want to remount the same app, move your app creation logic into a factory ); } }, + onUnmount(cleanupFn) { + if (typeof cleanupFn !== "function") { + warn$1( + `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}` + ); + } + pluginCleanupFns.push(cleanupFn); + }, unmount() { if (isMounted) { + callWithAsyncErrorHandling( + pluginCleanupFns, + app._instance, + 16 + ); render(null, app._container); { app._instance = null; @@ -5520,7 +6145,7 @@ If you want to remount the same app, move your app creation logic into a factory function inject(key, defaultValue, treatDefaultAsFactory = false) { const instance = currentInstance || currentRenderingInstance; if (instance || currentApp) { - const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : currentApp._context.provides; + const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0; if (provides && key in provides) { return provides[key]; } else if (arguments.length > 1) { @@ -5536,10 +6161,13 @@ If you want to remount the same app, move your app creation logic into a factory return !!(currentInstance || currentRenderingInstance || currentApp); } + const internalObjectProto = {}; + const createInternalObject = () => Object.create(internalObjectProto); + const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto; + function initProps(instance, rawProps, isStateful, isSSR = false) { const props = {}; - const attrs = {}; - def(attrs, InternalObjectKey, 1); + const attrs = createInternalObject(); instance.propsDefaults = /* @__PURE__ */ Object.create(null); setFullProps(instance, rawProps, props, attrs); for (const key in instance.propsOptions[0]) { @@ -5563,8 +6191,7 @@ If you want to remount the same app, move your app creation logic into a factory } function isInHmrContext(instance) { while (instance) { - if (instance.type.__hmrId) - return true; + if (instance.type.__hmrId) return true; instance = instance.parent; } } @@ -5654,7 +6281,7 @@ If you want to remount the same app, move your app creation logic into a factory } } if (hasAttrsChanged) { - trigger(instance, "set", "$attrs"); + trigger(instance.attrs, "set", ""); } { validateProps(rawProps || {}, props, instance); @@ -5723,6 +6350,9 @@ If you want to remount the same app, move your app creation logic into a factory } else { value = defaultValue; } + if (instance.ce) { + instance.ce._setProp(key, value); + } } if (opt[0 /* shouldCast */]) { if (isAbsent && !hasDefault) { @@ -5734,8 +6364,9 @@ If you want to remount the same app, move your app creation logic into a factory } return value; } + const mixinPropsCache = /* @__PURE__ */ new WeakMap(); function normalizePropsOptions(comp, appContext, asMixin = false) { - const cache = appContext.propsCache; + const cache = asMixin ? mixinPropsCache : appContext.propsCache; const cached = cache.get(comp); if (cached) { return cached; @@ -5749,8 +6380,7 @@ If you want to remount the same app, move your app creation logic into a factory hasExtends = true; const [props, keys] = normalizePropsOptions(raw2, appContext, true); extend(normalized, props); - if (keys) - needCastKeys.push(...keys); + if (keys) needCastKeys.push(...keys); }; if (!asMixin && appContext.mixins.length) { appContext.mixins.forEach(extendProps); @@ -5787,14 +6417,27 @@ If you want to remount the same app, move your app creation logic into a factory if (validatePropName(normalizedKey)) { const opt = raw[key]; const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt); - if (prop) { - const booleanIndex = getTypeIndex(Boolean, prop.type); - const stringIndex = getTypeIndex(String, prop.type); - prop[0 /* shouldCast */] = booleanIndex > -1; - prop[1 /* shouldCastTrue */] = stringIndex < 0 || booleanIndex < stringIndex; - if (booleanIndex > -1 || hasOwn(prop, "default")) { - needCastKeys.push(normalizedKey); + const propType = prop.type; + let shouldCast = false; + let shouldCastTrue = true; + if (isArray(propType)) { + for (let index = 0; index < propType.length; ++index) { + const type = propType[index]; + const typeName = isFunction(type) && type.name; + if (typeName === "Boolean") { + shouldCast = true; + break; + } else if (typeName === "String") { + shouldCastTrue = false; + } } + } else { + shouldCast = isFunction(propType) && propType.name === "Boolean"; + } + prop[0 /* shouldCast */] = shouldCast; + prop[1 /* shouldCastTrue */] = shouldCastTrue; + if (shouldCast || hasOwn(prop, "default")) { + needCastKeys.push(normalizedKey); } } } @@ -5825,24 +6468,12 @@ If you want to remount the same app, move your app creation logic into a factory } return ""; } - function isSameType(a, b) { - return getType(a) === getType(b); - } - function getTypeIndex(type, expectedTypes) { - if (isArray(expectedTypes)) { - return expectedTypes.findIndex((t) => isSameType(t, type)); - } else if (isFunction(expectedTypes)) { - return isSameType(expectedTypes, type) ? 0 : -1; - } - return -1; - } function validateProps(rawProps, props, instance) { const resolvedValues = toRaw(props); const options = instance.propsOptions[0]; for (const key in options) { let opt = options[key]; - if (opt == null) - continue; + if (opt == null) continue; validateProp( key, resolvedValues[key], @@ -5885,7 +6516,9 @@ If you want to remount the same app, move your app creation logic into a factory function assertType(value, type) { let valid; const expectedType = getType(type); - if (isSimpleType(expectedType)) { + if (expectedType === "null") { + valid = value === null; + } else if (isSimpleType(expectedType)) { const t = typeof value; valid = t === expectedType.toLowerCase(); if (!valid && t === "object") { @@ -5895,8 +6528,6 @@ If you want to remount the same app, move your app creation logic into a factory valid = isObject(value); } else if (expectedType === "Array") { valid = isArray(value); - } else if (expectedType === "null") { - valid = value === null; } else { valid = value instanceof type; } @@ -5960,8 +6591,7 @@ If you want to remount the same app, move your app creation logic into a factory const normalizeObjectSlots = (rawSlots, slots, instance) => { const ctx = rawSlots._ctx; for (const key in rawSlots) { - if (isInternalKey(key)) - continue; + if (isInternalKey(key)) continue; const value = rawSlots[key]; if (isFunction(value)) { slots[key] = normalizeSlot(key, value, ctx); @@ -5985,24 +6615,28 @@ If you want to remount the same app, move your app creation logic into a factory const normalized = normalizeSlotValue(children); instance.slots.default = () => normalized; }; - const initSlots = (instance, children) => { + const assignSlots = (slots, children, optimized) => { + for (const key in children) { + if (optimized || key !== "_") { + slots[key] = children[key]; + } + } + }; + const initSlots = (instance, children, optimized) => { + const slots = instance.slots = createInternalObject(); if (instance.vnode.shapeFlag & 32) { const type = children._; if (type) { - instance.slots = toRaw(children); - def(children, "_", type); + assignSlots(slots, children, optimized); + if (optimized) { + def(slots, "_", type, true); + } } else { - normalizeObjectSlots( - children, - instance.slots = {}); - } - } else { - instance.slots = {}; - if (children) { - normalizeVNodeSlots(instance, children); + normalizeObjectSlots(children, slots); } + } else if (children) { + normalizeVNodeSlots(instance, children); } - def(instance.slots, InternalObjectKey, 1); }; const updateSlots = (instance, children, optimized) => { const { vnode, slots } = instance; @@ -6012,15 +6646,12 @@ If you want to remount the same app, move your app creation logic into a factory const type = children._; if (type) { if (isHmrUpdating) { - extend(slots, children); + assignSlots(slots, children, optimized); trigger(instance, "set", "$slots"); } else if (optimized && type === 1) { needDeletionCheck = false; } else { - extend(slots, children); - if (!optimized && type === 1) { - delete slots._; - } + assignSlots(slots, children, optimized); } } else { needDeletionCheck = !children.$stable; @@ -6040,671 +6671,6 @@ If you want to remount the same app, move your app creation logic into a factory } }; - function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { - if (isArray(rawRef)) { - rawRef.forEach( - (r, i) => setRef( - r, - oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), - parentSuspense, - vnode, - isUnmount - ) - ); - return; - } - if (isAsyncWrapper(vnode) && !isUnmount) { - return; - } - const refValue = vnode.shapeFlag & 4 ? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el; - const value = isUnmount ? null : refValue; - const { i: owner, r: ref } = rawRef; - if (!owner) { - warn$1( - `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.` - ); - return; - } - const oldRef = oldRawRef && oldRawRef.r; - const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; - const setupState = owner.setupState; - if (oldRef != null && oldRef !== ref) { - if (isString(oldRef)) { - refs[oldRef] = null; - if (hasOwn(setupState, oldRef)) { - setupState[oldRef] = null; - } - } else if (isRef(oldRef)) { - oldRef.value = null; - } - } - if (isFunction(ref)) { - callWithErrorHandling(ref, owner, 12, [value, refs]); - } else { - const _isString = isString(ref); - const _isRef = isRef(ref); - if (_isString || _isRef) { - const doSet = () => { - if (rawRef.f) { - const existing = _isString ? hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value; - if (isUnmount) { - isArray(existing) && remove(existing, refValue); - } else { - if (!isArray(existing)) { - if (_isString) { - refs[ref] = [refValue]; - if (hasOwn(setupState, ref)) { - setupState[ref] = refs[ref]; - } - } else { - ref.value = [refValue]; - if (rawRef.k) - refs[rawRef.k] = ref.value; - } - } else if (!existing.includes(refValue)) { - existing.push(refValue); - } - } - } else if (_isString) { - refs[ref] = value; - if (hasOwn(setupState, ref)) { - setupState[ref] = value; - } - } else if (_isRef) { - ref.value = value; - if (rawRef.k) - refs[rawRef.k] = value; - } else { - warn$1("Invalid template ref type:", ref, `(${typeof ref})`); - } - }; - if (value) { - doSet.id = -1; - queuePostRenderEffect(doSet, parentSuspense); - } else { - doSet(); - } - } else { - warn$1("Invalid template ref type:", ref, `(${typeof ref})`); - } - } - } - - let hasMismatch = false; - const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; - const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); - const getContainerType = (container) => { - if (isSVGContainer(container)) - return "svg"; - if (isMathMLContainer(container)) - return "mathml"; - return void 0; - }; - const isComment = (node) => node.nodeType === 8 /* COMMENT */; - function createHydrationFunctions(rendererInternals) { - const { - mt: mountComponent, - p: patch, - o: { - patchProp, - createText, - nextSibling, - parentNode, - remove, - insert, - createComment - } - } = rendererInternals; - const hydrate = (vnode, container) => { - if (!container.hasChildNodes()) { - warn$1( - `Attempting to hydrate existing markup but container is empty. Performing full mount instead.` - ); - patch(null, vnode, container); - flushPostFlushCbs(); - container._vnode = vnode; - return; - } - hasMismatch = false; - hydrateNode(container.firstChild, vnode, null, null, null); - flushPostFlushCbs(); - container._vnode = vnode; - if (hasMismatch && true) { - console.error(`Hydration completed but contains mismatches.`); - } - }; - const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { - const isFragmentStart = isComment(node) && node.data === "["; - const onMismatch = () => handleMismatch( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - isFragmentStart - ); - const { type, ref, shapeFlag, patchFlag } = vnode; - let domType = node.nodeType; - vnode.el = node; - { - if (!("__vnode" in node)) { - Object.defineProperty(node, "__vnode", { - value: vnode, - enumerable: false - }); - } - if (!("__vueParentComponent" in node)) { - Object.defineProperty(node, "__vueParentComponent", { - value: parentComponent, - enumerable: false - }); - } - } - if (patchFlag === -2) { - optimized = false; - vnode.dynamicChildren = null; - } - let nextNode = null; - switch (type) { - case Text: - if (domType !== 3 /* TEXT */) { - if (vnode.children === "") { - insert(vnode.el = createText(""), parentNode(node), node); - nextNode = node; - } else { - nextNode = onMismatch(); - } - } else { - if (node.data !== vnode.children) { - hasMismatch = true; - warn$1( - `Hydration text mismatch in`, - node.parentNode, - ` - - rendered on server: ${JSON.stringify( - node.data - )} - - expected on client: ${JSON.stringify(vnode.children)}` - ); - node.data = vnode.children; - } - nextNode = nextSibling(node); - } - break; - case Comment: - if (isTemplateNode(node)) { - nextNode = nextSibling(node); - replaceNode( - vnode.el = node.content.firstChild, - node, - parentComponent - ); - } else if (domType !== 8 /* COMMENT */ || isFragmentStart) { - nextNode = onMismatch(); - } else { - nextNode = nextSibling(node); - } - break; - case Static: - if (isFragmentStart) { - node = nextSibling(node); - domType = node.nodeType; - } - if (domType === 1 /* ELEMENT */ || domType === 3 /* TEXT */) { - nextNode = node; - const needToAdoptContent = !vnode.children.length; - for (let i = 0; i < vnode.staticCount; i++) { - if (needToAdoptContent) - vnode.children += nextNode.nodeType === 1 /* ELEMENT */ ? nextNode.outerHTML : nextNode.data; - if (i === vnode.staticCount - 1) { - vnode.anchor = nextNode; - } - nextNode = nextSibling(nextNode); - } - return isFragmentStart ? nextSibling(nextNode) : nextNode; - } else { - onMismatch(); - } - break; - case Fragment: - if (!isFragmentStart) { - nextNode = onMismatch(); - } else { - nextNode = hydrateFragment( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - } - break; - default: - if (shapeFlag & 1) { - if ((domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { - nextNode = onMismatch(); - } else { - nextNode = hydrateElement( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - } - } else if (shapeFlag & 6) { - vnode.slotScopeIds = slotScopeIds; - const container = parentNode(node); - if (isFragmentStart) { - nextNode = locateClosingAnchor(node); - } else if (isComment(node) && node.data === "teleport start") { - nextNode = locateClosingAnchor(node, node.data, "teleport end"); - } else { - nextNode = nextSibling(node); - } - mountComponent( - vnode, - container, - null, - parentComponent, - parentSuspense, - getContainerType(container), - optimized - ); - if (isAsyncWrapper(vnode)) { - let subTree; - if (isFragmentStart) { - subTree = createVNode(Fragment); - subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; - } else { - subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); - } - subTree.el = node; - vnode.component.subTree = subTree; - } - } else if (shapeFlag & 64) { - if (domType !== 8 /* COMMENT */) { - nextNode = onMismatch(); - } else { - nextNode = vnode.type.hydrate( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized, - rendererInternals, - hydrateChildren - ); - } - } else if (shapeFlag & 128) { - nextNode = vnode.type.hydrate( - node, - vnode, - parentComponent, - parentSuspense, - getContainerType(parentNode(node)), - slotScopeIds, - optimized, - rendererInternals, - hydrateNode - ); - } else { - warn$1("Invalid HostVNode type:", type, `(${typeof type})`); - } - } - if (ref != null) { - setRef(ref, null, parentSuspense, vnode); - } - return nextNode; - }; - const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!vnode.dynamicChildren; - const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; - const forcePatch = type === "input" || type === "option"; - { - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "created"); - } - let needCallTransitionHooks = false; - if (isTemplateNode(el)) { - needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; - const content = el.content.firstChild; - if (needCallTransitionHooks) { - transition.beforeEnter(content); - } - replaceNode(content, el, parentComponent); - vnode.el = el = content; - } - if (shapeFlag & 16 && // skip if element has innerHTML / textContent - !(props && (props.innerHTML || props.textContent))) { - let next = hydrateChildren( - el.firstChild, - vnode, - el, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - let hasWarned = false; - while (next) { - hasMismatch = true; - if (!hasWarned) { - warn$1( - `Hydration children mismatch on`, - el, - ` -Server rendered element contains more child nodes than client vdom.` - ); - hasWarned = true; - } - const cur = next; - next = next.nextSibling; - remove(cur); - } - } else if (shapeFlag & 8) { - if (el.textContent !== vnode.children) { - hasMismatch = true; - warn$1( - `Hydration text content mismatch on`, - el, - ` - - rendered on server: ${el.textContent} - - expected on client: ${vnode.children}` - ); - el.textContent = vnode.children; - } - } - if (props) { - { - for (const key in props) { - if (propHasMismatch(el, key, props[key], vnode, parentComponent)) { - hasMismatch = true; - } - if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers - key[0] === ".") { - patchProp( - el, - key, - null, - props[key], - void 0, - void 0, - parentComponent - ); - } - } - } - } - let vnodeHooks; - if (vnodeHooks = props && props.onVnodeBeforeMount) { - invokeVNodeHook(vnodeHooks, parentComponent, vnode); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); - } - if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { - queueEffectWithSuspense(() => { - vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); - needCallTransitionHooks && transition.enter(el); - dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); - }, parentSuspense); - } - } - return el.nextSibling; - }; - const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!parentVNode.dynamicChildren; - const children = parentVNode.children; - const l = children.length; - let hasWarned = false; - for (let i = 0; i < l; i++) { - const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); - if (node) { - node = hydrateNode( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - } else if (vnode.type === Text && !vnode.children) { - continue; - } else { - hasMismatch = true; - if (!hasWarned) { - warn$1( - `Hydration children mismatch on`, - container, - ` -Server rendered element contains fewer child nodes than client vdom.` - ); - hasWarned = true; - } - patch( - null, - vnode, - container, - null, - parentComponent, - parentSuspense, - getContainerType(container), - slotScopeIds - ); - } - } - return node; - }; - const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - const { slotScopeIds: fragmentSlotScopeIds } = vnode; - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; - } - const container = parentNode(node); - const next = hydrateChildren( - nextSibling(node), - vnode, - container, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - if (next && isComment(next) && next.data === "]") { - return nextSibling(vnode.anchor = next); - } else { - hasMismatch = true; - insert(vnode.anchor = createComment(`]`), container, next); - return next; - } - }; - const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { - hasMismatch = true; - warn$1( - `Hydration node mismatch: -- rendered on server:`, - node, - node.nodeType === 3 /* TEXT */ ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, - ` -- expected on client:`, - vnode.type - ); - vnode.el = null; - if (isFragment) { - const end = locateClosingAnchor(node); - while (true) { - const next2 = nextSibling(node); - if (next2 && next2 !== end) { - remove(next2); - } else { - break; - } - } - } - const next = nextSibling(node); - const container = parentNode(node); - remove(node); - patch( - null, - vnode, - container, - next, - parentComponent, - parentSuspense, - getContainerType(container), - slotScopeIds - ); - return next; - }; - const locateClosingAnchor = (node, open = "[", close = "]") => { - let match = 0; - while (node) { - node = nextSibling(node); - if (node && isComment(node)) { - if (node.data === open) - match++; - if (node.data === close) { - if (match === 0) { - return nextSibling(node); - } else { - match--; - } - } - } - } - return node; - }; - const replaceNode = (newNode, oldNode, parentComponent) => { - const parentNode2 = oldNode.parentNode; - if (parentNode2) { - parentNode2.replaceChild(newNode, oldNode); - } - let parent = parentComponent; - while (parent) { - if (parent.vnode.el === oldNode) { - parent.vnode.el = parent.subTree.el = newNode; - } - parent = parent.parent; - } - }; - const isTemplateNode = (node) => { - return node.nodeType === 1 /* ELEMENT */ && node.tagName.toLowerCase() === "template"; - }; - return [hydrate, hydrateNode]; - } - function propHasMismatch(el, key, clientValue, vnode, instance) { - var _a; - let mismatchType; - let mismatchKey; - let actual; - let expected; - if (key === "class") { - actual = el.getAttribute("class"); - expected = normalizeClass(clientValue); - if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) { - mismatchType = mismatchKey = `class`; - } - } else if (key === "style") { - actual = el.getAttribute("style"); - expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue)); - const actualMap = toStyleMap(actual); - const expectedMap = toStyleMap(expected); - if (vnode.dirs) { - for (const { dir, value } of vnode.dirs) { - if (dir.name === "show" && !value) { - expectedMap.set("display", "none"); - } - } - } - const root = instance == null ? void 0 : instance.subTree; - if (vnode === root || (root == null ? void 0 : root.type) === Fragment && root.children.includes(vnode)) { - const cssVars = (_a = instance == null ? void 0 : instance.getCssVars) == null ? void 0 : _a.call(instance); - for (const key2 in cssVars) { - expectedMap.set(`--${key2}`, String(cssVars[key2])); - } - } - if (!isMapEqual(actualMap, expectedMap)) { - mismatchType = mismatchKey = "style"; - } - } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) { - if (isBooleanAttr(key)) { - actual = el.hasAttribute(key); - expected = includeBooleanAttr(clientValue); - } else if (clientValue == null) { - actual = el.hasAttribute(key); - expected = false; - } else { - if (el.hasAttribute(key)) { - actual = el.getAttribute(key); - } else if (key === "value" && el.tagName === "TEXTAREA") { - actual = el.value; - } else { - actual = false; - } - expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false; - } - if (actual !== expected) { - mismatchType = `attribute`; - mismatchKey = key; - } - } - if (mismatchType) { - const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`; - const preSegment = `Hydration ${mismatchType} mismatch on`; - const postSegment = ` - - rendered on server: ${format(actual)} - - expected on client: ${format(expected)} - Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead. - You should fix the source of the mismatch.`; - { - warn$1(preSegment, el, postSegment); - } - return true; - } - return false; - } - function toClassSet(str) { - return new Set(str.trim().split(/\s+/)); - } - function isSetEqual(a, b) { - if (a.size !== b.size) { - return false; - } - for (const s of a) { - if (!b.has(s)) { - return false; - } - } - return true; - } - function toStyleMap(str) { - const styleMap = /* @__PURE__ */ new Map(); - for (const item of str.split(";")) { - let [key, value] = item.split(":"); - key = key == null ? void 0 : key.trim(); - value = value == null ? void 0 : value.trim(); - if (key && value) { - styleMap.set(key, value); - } - } - return styleMap; - } - function isMapEqual(a, b) { - if (a.size !== b.size) { - return false; - } - for (const [key, value] of a) { - if (value !== b.get(key)) { - return false; - } - } - return true; - } - let supported; let perf; function startMeasure(instance, type) { @@ -7000,17 +6966,7 @@ Server rendered element contains fewer child nodes than client vdom.` if (props) { for (const key in props) { if (key !== "value" && !isReservedProp(key)) { - hostPatchProp( - el, - key, - null, - props[key], - namespace, - vnode.children, - parentComponent, - parentSuspense, - unmountChildren - ); + hostPatchProp(el, key, null, props[key], namespace, parentComponent); } } if ("value" in props) { @@ -7021,14 +6977,8 @@ Server rendered element contains fewer child nodes than client vdom.` } } { - Object.defineProperty(el, "__vnode", { - value: vnode, - enumerable: false - }); - Object.defineProperty(el, "__vueParentComponent", { - value: parentComponent, - enumerable: false - }); + def(el, "__vnode", vnode, true); + def(el, "__vueParentComponent", parentComponent, true); } if (dirs) { invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); @@ -7060,7 +7010,7 @@ Server rendered element contains fewer child nodes than client vdom.` if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) { subTree = filterSingleRoot(subTree.children) || subTree; } - if (vnode === subTree) { + if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) { const parentVNode = parentComponent.vnode; setScopeId( el, @@ -7090,6 +7040,9 @@ Server rendered element contains fewer child nodes than client vdom.` }; const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { const el = n2.el = n1.el; + { + el.__vnode = n2; + } let { patchFlag, dynamicChildren, dirs } = n2; patchFlag |= n1.patchFlag & 16; const oldProps = n1.props || EMPTY_OBJ; @@ -7108,6 +7061,9 @@ Server rendered element contains fewer child nodes than client vdom.` optimized = false; dynamicChildren = null; } + if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) { + hostSetElementText(el, ""); + } if (dynamicChildren) { patchBlockChildren( n1.dynamicChildren, @@ -7136,15 +7092,7 @@ Server rendered element contains fewer child nodes than client vdom.` } if (patchFlag > 0) { if (patchFlag & 16) { - patchProps( - el, - n2, - oldProps, - newProps, - parentComponent, - parentSuspense, - namespace - ); + patchProps(el, oldProps, newProps, parentComponent, namespace); } else { if (patchFlag & 2) { if (oldProps.class !== newProps.class) { @@ -7161,17 +7109,7 @@ Server rendered element contains fewer child nodes than client vdom.` const prev = oldProps[key]; const next = newProps[key]; if (next !== prev || key === "value") { - hostPatchProp( - el, - key, - prev, - next, - namespace, - n1.children, - parentComponent, - parentSuspense, - unmountChildren - ); + hostPatchProp(el, key, prev, next, namespace, parentComponent); } } } @@ -7182,15 +7120,7 @@ Server rendered element contains fewer child nodes than client vdom.` } } } else if (!optimized && dynamicChildren == null) { - patchProps( - el, - n2, - oldProps, - newProps, - parentComponent, - parentSuspense, - namespace - ); + patchProps(el, oldProps, newProps, parentComponent, namespace); } if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { queuePostRenderEffect(() => { @@ -7230,7 +7160,7 @@ Server rendered element contains fewer child nodes than client vdom.` ); } }; - const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, namespace) => { + const patchProps = (el, oldProps, newProps, parentComponent, namespace) => { if (oldProps !== newProps) { if (oldProps !== EMPTY_OBJ) { for (const key in oldProps) { @@ -7241,31 +7171,17 @@ Server rendered element contains fewer child nodes than client vdom.` oldProps[key], null, namespace, - vnode.children, - parentComponent, - parentSuspense, - unmountChildren + parentComponent ); } } } for (const key in newProps) { - if (isReservedProp(key)) - continue; + if (isReservedProp(key)) continue; const next = newProps[key]; const prev = oldProps[key]; if (next !== prev && key !== "value") { - hostPatchProp( - el, - key, - prev, - next, - namespace, - vnode.children, - parentComponent, - parentSuspense, - unmountChildren - ); + hostPatchProp(el, key, prev, next, namespace, parentComponent); } } if ("value" in newProps) { @@ -7382,13 +7298,14 @@ Server rendered element contains fewer child nodes than client vdom.` { startMeasure(instance, `init`); } - setupComponent(instance); + setupComponent(instance, false, optimized); { endMeasure(instance, `init`); } } if (instance.asyncDep) { - parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect); + if (isHmrUpdating) initialVNode.el = null; + parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized); if (!initialVNode.el) { const placeholder = instance.subTree = createVNode(Comment); processCommentNode(null, placeholder, container, anchor); @@ -7423,8 +7340,6 @@ Server rendered element contains fewer child nodes than client vdom.` return; } else { instance.next = n2; - invalidateJob(instance.update); - instance.effect.dirty = true; instance.update(); } } else { @@ -7437,7 +7352,7 @@ Server rendered element contains fewer child nodes than client vdom.` if (!instance.isMounted) { let vnodeHook; const { el, props } = initialVNode; - const { bm, m, parent } = instance; + const { bm, m, parent, root, type } = instance; const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); toggleRecurse(instance, false); if (bm) { @@ -7470,18 +7385,19 @@ Server rendered element contains fewer child nodes than client vdom.` endMeasure(instance, `hydrate`); } }; - if (isAsyncWrapperVNode) { - initialVNode.type.__asyncLoader().then( - // note: we are moving the render call into an async callback, - // which means it won't track dependencies - but it's ok because - // a server-rendered async wrapper is already in resolved state - // and it will never need to change. - () => !instance.isUnmounted && hydrateSubTree() + if (isAsyncWrapperVNode && type.__asyncHydrate) { + type.__asyncHydrate( + el, + instance, + hydrateSubTree ); } else { hydrateSubTree(); } } else { + if (root.ce) { + root.ce._injectChildStyle(type); + } { startMeasure(instance, `render`); } @@ -7607,24 +7523,18 @@ Server rendered element contains fewer child nodes than client vdom.` } } }; - const effect = instance.effect = new ReactiveEffect( - componentUpdateFn, - NOOP, - () => queueJob(update), - instance.scope - // track it in component's effect scope - ); - const update = instance.update = () => { - if (effect.dirty) { - effect.run(); - } - }; - update.id = instance.uid; + instance.scope.on(); + const effect = instance.effect = new ReactiveEffect(componentUpdateFn); + instance.scope.off(); + const update = instance.update = effect.run.bind(effect); + const job = instance.job = effect.runIfDirty.bind(effect); + job.i = instance; + job.id = instance.uid; + effect.scheduler = () => queueJob(job); toggleRecurse(instance, true); { effect.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0; effect.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0; - update.ownerInstance = instance; } update(); }; @@ -7853,8 +7763,7 @@ Server rendered element contains fewer child nodes than client vdom.` let moved = false; let maxNewIndexSoFar = 0; const newIndexToOldIndexMap = new Array(toBePatched); - for (i = 0; i < toBePatched; i++) - newIndexToOldIndexMap[i] = 0; + for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0; for (i = s1; i <= e1; i++) { const prevChild = c1[i]; if (patched >= toBePatched) { @@ -7983,11 +7892,18 @@ Server rendered element contains fewer child nodes than client vdom.` dynamicChildren, shapeFlag, patchFlag, - dirs + dirs, + cacheIndex } = vnode; + if (patchFlag === -2) { + optimized = false; + } if (ref != null) { setRef(ref, null, parentSuspense, vnode, true); } + if (cacheIndex != null) { + parentComponent.renderCache[cacheIndex] = void 0; + } if (shapeFlag & 256) { parentComponent.ctx.deactivate(vnode); return; @@ -8013,11 +7929,15 @@ Server rendered element contains fewer child nodes than client vdom.` vnode, parentComponent, parentSuspense, - optimized, internals, doRemove ); - } else if (dynamicChildren && // #1153: fast path should not be taken for non-stable (v-for) fragments + } else if (dynamicChildren && // #5154 + // when v-once is used inside a block, setBlockTracking(-1) marks the + // parent block with hasOnce: true + // so that it doesn't take the fast path during unmount - otherwise + // components nested in v-once are never unmounted. + !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { unmountChildren( dynamicChildren, @@ -8091,13 +8011,15 @@ Server rendered element contains fewer child nodes than client vdom.` if (instance.type.__hmrId) { unregisterHMR(instance); } - const { bum, scope, update, subTree, um } = instance; + const { bum, scope, job, subTree, um, m, a } = instance; + invalidateMount(m); + invalidateMount(a); if (bum) { invokeArrayFns(bum); } scope.stop(); - if (update) { - update.active = false; + if (job) { + job.flags |= 8; unmount(subTree, instance, parentSuspense, doRemove); } if (um) { @@ -8128,7 +8050,9 @@ Server rendered element contains fewer child nodes than client vdom.` if (vnode.shapeFlag & 128) { return vnode.suspense.next(); } - return hostNextSibling(vnode.anchor || vnode.el); + const el = hostNextSibling(vnode.anchor || vnode.el); + const teleportEnd = el && el[TeleportEndKey]; + return teleportEnd ? hostNextSibling(teleportEnd) : el; }; let isFlushing = false; const render = (vnode, container, namespace) => { @@ -8147,13 +8071,13 @@ Server rendered element contains fewer child nodes than client vdom.` namespace ); } + container._vnode = vnode; if (!isFlushing) { isFlushing = true; flushPreFlushCbs(); flushPostFlushCbs(); isFlushing = false; } - container._vnode = vnode; }; const internals = { p: patch, @@ -8183,8 +8107,14 @@ Server rendered element contains fewer child nodes than client vdom.` function resolveChildrenNamespace({ type, props }, currentNamespace) { return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; } - function toggleRecurse({ effect, update }, allowed) { - effect.allowRecurse = update.allowRecurse = allowed; + function toggleRecurse({ effect, job }, allowed) { + if (allowed) { + effect.flags |= 32; + job.flags |= 4; + } else { + effect.flags &= ~32; + job.flags &= ~4; + } } function needTransition(parentSuspense, transition) { return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; @@ -8201,7 +8131,7 @@ Server rendered element contains fewer child nodes than client vdom.` c2 = ch2[i] = cloneIfMounted(ch2[i]); c2.el = c1.el; } - if (!shallow) + if (!shallow && c2.patchFlag !== -2) traverseStaticChildren(c1, c2); } if (c2.type === Text) { @@ -8263,279 +8193,1208 @@ Server rendered element contains fewer child nodes than client vdom.` } } } + function invalidateMount(hooks) { + if (hooks) { + for (let i = 0; i < hooks.length; i++) + hooks[i].flags |= 8; + } + } - const isTeleport = (type) => type.__isTeleport; - const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); - const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; - const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; - const resolveTarget = (props, select) => { - const targetSelector = props && props.to; - if (isString(targetSelector)) { - if (!select) { - warn$1( - `Current renderer does not support string target for Teleports. (missing querySelector renderer option)` - ); - return null; - } else { - const target = select(targetSelector); - if (!target) { - warn$1( - `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.` - ); - } - return target; - } - } else { - if (!targetSelector && !isTeleportDisabled(props)) { - warn$1(`Invalid Teleport target: ${targetSelector}`); - } - return targetSelector; + const ssrContextKey = Symbol.for("v-scx"); + const useSSRContext = () => { + { + warn$1(`useSSRContext() is not supported in the global build.`); } }; - const TeleportImpl = { - name: "Teleport", - __isTeleport: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { - const { - mc: mountChildren, - pc: patchChildren, - pbc: patchBlockChildren, - o: { insert, querySelector, createText, createComment } - } = internals; - const disabled = isTeleportDisabled(n2.props); - let { shapeFlag, children, dynamicChildren } = n2; - if (isHmrUpdating) { - optimized = false; - dynamicChildren = null; + + function watchEffect(effect, options) { + return doWatch(effect, null, options); + } + function watchPostEffect(effect, options) { + return doWatch( + effect, + null, + extend({}, options, { flush: "post" }) + ); + } + function watchSyncEffect(effect, options) { + return doWatch( + effect, + null, + extend({}, options, { flush: "sync" }) + ); + } + function watch(source, cb, options) { + if (!isFunction(cb)) { + warn$1( + `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` + ); + } + return doWatch(source, cb, options); + } + function doWatch(source, cb, options = EMPTY_OBJ) { + const { immediate, deep, flush, once } = options; + if (!cb) { + if (immediate !== void 0) { + warn$1( + `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` + ); } - if (n1 == null) { - const placeholder = n2.el = createComment("teleport start") ; - const mainAnchor = n2.anchor = createComment("teleport end") ; - insert(placeholder, container, anchor); - insert(mainAnchor, container, anchor); - const target = n2.target = resolveTarget(n2.props, querySelector); - const targetAnchor = n2.targetAnchor = createText(""); - if (target) { - insert(targetAnchor, target); - if (namespace === "svg" || isTargetSVG(target)) { - namespace = "svg"; - } else if (namespace === "mathml" || isTargetMathML(target)) { - namespace = "mathml"; - } - } else if (!disabled) { - warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`); + if (deep !== void 0) { + warn$1( + `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + if (once !== void 0) { + warn$1( + `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + } + const baseWatchOptions = extend({}, options); + baseWatchOptions.onWarn = warn$1; + const instance = currentInstance; + baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args); + let isPre = false; + if (flush === "post") { + baseWatchOptions.scheduler = (job) => { + queuePostRenderEffect(job, instance && instance.suspense); + }; + } else if (flush !== "sync") { + isPre = true; + baseWatchOptions.scheduler = (job, isFirstRun) => { + if (isFirstRun) { + job(); + } else { + queueJob(job); } - const mount = (container2, anchor2) => { - if (shapeFlag & 16) { - mountChildren( - children, - container2, - anchor2, + }; + } + baseWatchOptions.augmentJob = (job) => { + if (cb) { + job.flags |= 4; + } + if (isPre) { + job.flags |= 2; + if (instance) { + job.id = instance.uid; + job.i = instance; + } + } + }; + const watchHandle = watch$1(source, cb, baseWatchOptions); + return watchHandle; + } + function instanceWatch(source, value, options) { + const publicThis = this.proxy; + const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); + let cb; + if (isFunction(value)) { + cb = value; + } else { + cb = value.handler; + options = value; + } + const reset = setCurrentInstance(this); + const res = doWatch(getter, cb.bind(publicThis), options); + reset(); + return res; + } + function createPathGetter(ctx, path) { + const segments = path.split("."); + return () => { + let cur = ctx; + for (let i = 0; i < segments.length && cur; i++) { + cur = cur[segments[i]]; + } + return cur; + }; + } + + function useModel(props, name, options = EMPTY_OBJ) { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useModel() called without active instance.`); + return ref(); + } + if (!i.propsOptions[0][name]) { + warn$1(`useModel() called with prop "${name}" which is not declared.`); + return ref(); + } + const camelizedName = camelize(name); + const hyphenatedName = hyphenate(name); + const modifiers = getModelModifiers(props, name); + const res = customRef((track, trigger) => { + let localValue; + let prevSetValue = EMPTY_OBJ; + let prevEmittedValue; + watchSyncEffect(() => { + const propValue = props[name]; + if (hasChanged(localValue, propValue)) { + localValue = propValue; + trigger(); + } + }); + return { + get() { + track(); + return options.get ? options.get(localValue) : localValue; + }, + set(value) { + const emittedValue = options.set ? options.set(value) : value; + if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) { + return; + } + const rawProps = i.vnode.props; + if (!(rawProps && // check if parent has passed v-model + (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) { + localValue = value; + trigger(); + } + i.emit(`update:${name}`, emittedValue); + if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) { + trigger(); + } + prevSetValue = value; + prevEmittedValue = emittedValue; + } + }; + }); + res[Symbol.iterator] = () => { + let i2 = 0; + return { + next() { + if (i2 < 2) { + return { value: i2++ ? modifiers || EMPTY_OBJ : res, done: false }; + } else { + return { done: true }; + } + } + }; + }; + return res; + } + const getModelModifiers = (props, modelName) => { + return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`]; + }; + + function emit(instance, event, ...rawArgs) { + if (instance.isUnmounted) return; + const props = instance.vnode.props || EMPTY_OBJ; + { + const { + emitsOptions, + propsOptions: [propsOptions] + } = instance; + if (emitsOptions) { + if (!(event in emitsOptions) && true) { + if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) { + warn$1( + `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.` + ); + } + } else { + const validator = emitsOptions[event]; + if (isFunction(validator)) { + const isValid = validator(...rawArgs); + if (!isValid) { + warn$1( + `Invalid event arguments: event validation failed for event "${event}".` + ); + } + } + } + } + } + let args = rawArgs; + const isModelListener = event.startsWith("update:"); + const modifiers = isModelListener && getModelModifiers(props, event.slice(7)); + if (modifiers) { + if (modifiers.trim) { + args = rawArgs.map((a) => isString(a) ? a.trim() : a); + } + if (modifiers.number) { + args = rawArgs.map(looseToNumber); + } + } + { + devtoolsComponentEmit(instance, event, args); + } + { + const lowerCaseEvent = event.toLowerCase(); + if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { + warn$1( + `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( + instance, + instance.type + )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate( + event + )}" instead of "${event}".` + ); + } + } + let handlerName; + let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) + props[handlerName = toHandlerKey(camelize(event))]; + if (!handler && isModelListener) { + handler = props[handlerName = toHandlerKey(hyphenate(event))]; + } + if (handler) { + callWithAsyncErrorHandling( + handler, + instance, + 6, + args + ); + } + const onceHandler = props[handlerName + `Once`]; + if (onceHandler) { + if (!instance.emitted) { + instance.emitted = {}; + } else if (instance.emitted[handlerName]) { + return; + } + instance.emitted[handlerName] = true; + callWithAsyncErrorHandling( + onceHandler, + instance, + 6, + args + ); + } + } + function normalizeEmitsOptions(comp, appContext, asMixin = false) { + const cache = appContext.emitsCache; + const cached = cache.get(comp); + if (cached !== void 0) { + return cached; + } + const raw = comp.emits; + let normalized = {}; + let hasExtends = false; + if (!isFunction(comp)) { + const extendEmits = (raw2) => { + const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); + if (normalizedFromExtend) { + hasExtends = true; + extend(normalized, normalizedFromExtend); + } + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendEmits); + } + if (comp.extends) { + extendEmits(comp.extends); + } + if (comp.mixins) { + comp.mixins.forEach(extendEmits); + } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, null); + } + return null; + } + if (isArray(raw)) { + raw.forEach((key) => normalized[key] = null); + } else { + extend(normalized, raw); + } + if (isObject(comp)) { + cache.set(comp, normalized); + } + return normalized; + } + function isEmitListener(options, key) { + if (!options || !isOn(key)) { + return false; + } + key = key.slice(2).replace(/Once$/, ""); + return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); + } + + let accessedAttrs = false; + function markAttrsAccessed() { + accessedAttrs = true; + } + function renderComponentRoot(instance) { + const { + type: Component, + vnode, + proxy, + withProxy, + propsOptions: [propsOptions], + slots, + attrs, + emit, + render, + renderCache, + props, + data, + setupState, + ctx, + inheritAttrs + } = instance; + const prev = setCurrentRenderingInstance(instance); + let result; + let fallthroughAttrs; + { + accessedAttrs = false; + } + try { + if (vnode.shapeFlag & 4) { + const proxyToUse = withProxy || proxy; + const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, { + get(target, key, receiver) { + warn$1( + `Property '${String( + key + )}' was accessed via 'this'. Avoid using 'this' in templates.` + ); + return Reflect.get(target, key, receiver); + } + }) : proxyToUse; + result = normalizeVNode( + render.call( + thisProxy, + proxyToUse, + renderCache, + true ? shallowReadonly(props) : props, + setupState, + data, + ctx + ) + ); + fallthroughAttrs = attrs; + } else { + const render2 = Component; + if (attrs === props) { + markAttrsAccessed(); + } + result = normalizeVNode( + render2.length > 1 ? render2( + true ? shallowReadonly(props) : props, + true ? { + get attrs() { + markAttrsAccessed(); + return shallowReadonly(attrs); + }, + slots, + emit + } : { attrs, slots, emit } + ) : render2( + true ? shallowReadonly(props) : props, + null + ) + ); + fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); + } + } catch (err) { + blockStack.length = 0; + handleError(err, instance, 1); + result = createVNode(Comment); + } + let root = result; + let setRoot = void 0; + if (result.patchFlag > 0 && result.patchFlag & 2048) { + [root, setRoot] = getChildRoot(result); + } + if (fallthroughAttrs && inheritAttrs !== false) { + const keys = Object.keys(fallthroughAttrs); + const { shapeFlag } = root; + if (keys.length) { + if (shapeFlag & (1 | 6)) { + if (propsOptions && keys.some(isModelListener)) { + fallthroughAttrs = filterModelListeners( + fallthroughAttrs, + propsOptions + ); + } + root = cloneVNode(root, fallthroughAttrs, false, true); + } else if (!accessedAttrs && root.type !== Comment) { + const allAttrs = Object.keys(attrs); + const eventAttrs = []; + const extraAttrs = []; + for (let i = 0, l = allAttrs.length; i < l; i++) { + const key = allAttrs[i]; + if (isOn(key)) { + if (!isModelListener(key)) { + eventAttrs.push(key[2].toLowerCase() + key.slice(3)); + } + } else { + extraAttrs.push(key); + } + } + if (extraAttrs.length) { + warn$1( + `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.` + ); + } + if (eventAttrs.length) { + warn$1( + `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` + ); + } + } + } + } + if (vnode.dirs) { + if (!isElementRoot(root)) { + warn$1( + `Runtime directive used on component with non-element root node. The directives will not function as intended.` + ); + } + root = cloneVNode(root, null, false, true); + root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } + if (vnode.transition) { + if (!isElementRoot(root)) { + warn$1( + `Component inside renders non-element root node that cannot be animated.` + ); + } + setTransitionHooks(root, vnode.transition); + } + if (setRoot) { + setRoot(root); + } else { + result = root; + } + setCurrentRenderingInstance(prev); + return result; + } + const getChildRoot = (vnode) => { + const rawChildren = vnode.children; + const dynamicChildren = vnode.dynamicChildren; + const childRoot = filterSingleRoot(rawChildren, false); + if (!childRoot) { + return [vnode, void 0]; + } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { + return getChildRoot(childRoot); + } + const index = rawChildren.indexOf(childRoot); + const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; + const setRoot = (updatedRoot) => { + rawChildren[index] = updatedRoot; + if (dynamicChildren) { + if (dynamicIndex > -1) { + dynamicChildren[dynamicIndex] = updatedRoot; + } else if (updatedRoot.patchFlag > 0) { + vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; + } + } + }; + return [normalizeVNode(childRoot), setRoot]; + }; + function filterSingleRoot(children, recurse = true) { + let singleRoot; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isVNode(child)) { + if (child.type !== Comment || child.children === "v-if") { + if (singleRoot) { + return; + } else { + singleRoot = child; + if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { + return filterSingleRoot(singleRoot.children); + } + } + } + } else { + return; + } + } + return singleRoot; + } + const getFunctionalFallthrough = (attrs) => { + let res; + for (const key in attrs) { + if (key === "class" || key === "style" || isOn(key)) { + (res || (res = {}))[key] = attrs[key]; + } + } + return res; + }; + const filterModelListeners = (attrs, props) => { + const res = {}; + for (const key in attrs) { + if (!isModelListener(key) || !(key.slice(9) in props)) { + res[key] = attrs[key]; + } + } + return res; + }; + const isElementRoot = (vnode) => { + return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; + }; + function shouldUpdateComponent(prevVNode, nextVNode, optimized) { + const { props: prevProps, children: prevChildren, component } = prevVNode; + const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; + const emits = component.emitsOptions; + if ((prevChildren || nextChildren) && isHmrUpdating) { + return true; + } + if (nextVNode.dirs || nextVNode.transition) { + return true; + } + if (optimized && patchFlag >= 0) { + if (patchFlag & 1024) { + return true; + } + if (patchFlag & 16) { + if (!prevProps) { + return !!nextProps; + } + return hasPropsChanged(prevProps, nextProps, emits); + } else if (patchFlag & 8) { + const dynamicProps = nextVNode.dynamicProps; + for (let i = 0; i < dynamicProps.length; i++) { + const key = dynamicProps[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { + return true; + } + } + } + } else { + if (prevChildren || nextChildren) { + if (!nextChildren || !nextChildren.$stable) { + return true; + } + } + if (prevProps === nextProps) { + return false; + } + if (!prevProps) { + return !!nextProps; + } + if (!nextProps) { + return true; + } + return hasPropsChanged(prevProps, nextProps, emits); + } + return false; + } + function hasPropsChanged(prevProps, nextProps, emitsOptions) { + const nextKeys = Object.keys(nextProps); + if (nextKeys.length !== Object.keys(prevProps).length) { + return true; + } + for (let i = 0; i < nextKeys.length; i++) { + const key = nextKeys[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { + return true; + } + } + return false; + } + function updateHOCHostEl({ vnode, parent }, el) { + while (parent) { + const root = parent.subTree; + if (root.suspense && root.suspense.activeBranch === vnode) { + root.el = vnode.el; + } + if (root === vnode) { + (vnode = parent.vnode).el = el; + parent = parent.parent; + } else { + break; + } + } + } + + const isSuspense = (type) => type.__isSuspense; + let suspenseId = 0; + const SuspenseImpl = { + name: "Suspense", + // In order to make Suspense tree-shakable, we need to avoid importing it + // directly in the renderer. The renderer checks for the __isSuspense flag + // on a vnode's type and calls the `process` method, passing in renderer + // internals. + __isSuspense: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + if (n1 == null) { + mountSuspense( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } else { + if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) { + n2.suspense = n1.suspense; + n2.suspense.vnode = n2; + n2.el = n1.el; + return; + } + patchSuspense( + n1, + n2, + container, + anchor, + parentComponent, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } + }, + hydrate: hydrateSuspense, + normalize: normalizeSuspenseChildren + }; + const Suspense = SuspenseImpl ; + function triggerEvent(vnode, name) { + const eventListener = vnode.props && vnode.props[name]; + if (isFunction(eventListener)) { + eventListener(); + } + } + function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + const { + p: patch, + o: { createElement } + } = rendererInternals; + const hiddenContainer = createElement("div"); + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + container, + hiddenContainer, + anchor, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + patch( + null, + suspense.pendingBranch = vnode.ssContent, + hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds + ); + if (suspense.deps > 0) { + triggerEvent(vnode, "onPending"); + triggerEvent(vnode, "onFallback"); + patch( + null, + vnode.ssFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds + ); + setActiveBranch(suspense, vnode.ssFallback); + } else { + suspense.resolve(false, true); + } + } + function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { + const suspense = n2.suspense = n1.suspense; + suspense.vnode = n2; + n2.el = n1.el; + const newBranch = n2.ssContent; + const newFallback = n2.ssFallback; + const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; + if (pendingBranch) { + suspense.pendingBranch = newBranch; + if (isSameVNodeType(newBranch, pendingBranch)) { + patch( + pendingBranch, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else if (isInFallback) { + if (!isHydrating) { + patch( + activeBranch, + newFallback, + container, + anchor, parentComponent, - parentSuspense, + null, + // fallback tree will not have suspense context namespace, slotScopeIds, optimized ); + setActiveBranch(suspense, newFallback); } - }; - if (disabled) { - mount(container, mainAnchor); - } else if (target) { - mount(target, targetAnchor); } } else { - n2.el = n1.el; - const mainAnchor = n2.anchor = n1.anchor; - const target = n2.target = n1.target; - const targetAnchor = n2.targetAnchor = n1.targetAnchor; - const wasDisabled = isTeleportDisabled(n1.props); - const currentContainer = wasDisabled ? container : target; - const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; - if (namespace === "svg" || isTargetSVG(target)) { - namespace = "svg"; - } else if (namespace === "mathml" || isTargetMathML(target)) { - namespace = "mathml"; + suspense.pendingId = suspenseId++; + if (isHydrating) { + suspense.isHydrating = false; + suspense.activeBranch = pendingBranch; + } else { + unmount(pendingBranch, parentComponent, suspense); } - if (dynamicChildren) { - patchBlockChildren( - n1.dynamicChildren, - dynamicChildren, - currentContainer, + suspense.deps = 0; + suspense.effects.length = 0; + suspense.hiddenContainer = createElement("div"); + if (isInFallback) { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, parentComponent, - parentSuspense, - namespace, - slotScopeIds - ); - traverseStaticChildren(n1, n2, true); - } else if (!optimized) { - patchChildren( - n1, - n2, - currentContainer, - currentAnchor, - parentComponent, - parentSuspense, + suspense, namespace, slotScopeIds, - false + optimized ); - } - if (disabled) { - if (!wasDisabled) { - moveTeleport( - n2, - container, - mainAnchor, - internals, - 1 - ); + if (suspense.deps <= 0) { + suspense.resolve(); } else { - if (n2.props && n1.props && n2.props.to !== n1.props.to) { - n2.props.to = n1.props.to; - } - } - } else { - if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { - const nextTarget = n2.target = resolveTarget( - n2.props, - querySelector - ); - if (nextTarget) { - moveTeleport( - n2, - nextTarget, - null, - internals, - 0 - ); - } else { - warn$1( - "Invalid Teleport target on update:", - target, - `(${typeof target})` - ); - } - } else if (wasDisabled) { - moveTeleport( - n2, - target, - targetAnchor, - internals, - 1 + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized ); + setActiveBranch(suspense, newFallback); } - } - } - updateCssVars(n2); - }, - remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) { - const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode; - if (target) { - hostRemove(targetAnchor); - } - doRemove && hostRemove(anchor); - if (shapeFlag & 16) { - const shouldRemove = doRemove || !isTeleportDisabled(props); - for (let i = 0; i < children.length; i++) { - const child = children[i]; - unmount( - child, - parentComponent, - parentSuspense, - shouldRemove, - !!child.dynamicChildren - ); - } - } - }, - move: moveTeleport, - hydrate: hydrateTeleport - }; - function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { - if (moveType === 0) { - insert(vnode.targetAnchor, container, parentAnchor); - } - const { el, anchor, shapeFlag, children, props } = vnode; - const isReorder = moveType === 2; - if (isReorder) { - insert(el, container, parentAnchor); - } - if (!isReorder || isTeleportDisabled(props)) { - if (shapeFlag & 16) { - for (let i = 0; i < children.length; i++) { - move( - children[i], + } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, container, - parentAnchor, - 2 - ); - } - } - } - if (isReorder) { - insert(anchor, container, parentAnchor); - } - } - function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { - o: { nextSibling, parentNode, querySelector } - }, hydrateChildren) { - const target = vnode.target = resolveTarget( - vnode.props, - querySelector - ); - if (target) { - const targetNode = target._lpa || target.firstChild; - if (vnode.shapeFlag & 16) { - if (isTeleportDisabled(vnode.props)) { - vnode.anchor = hydrateChildren( - nextSibling(node), - vnode, - parentNode(node), + anchor, parentComponent, - parentSuspense, + suspense, + namespace, slotScopeIds, optimized ); - vnode.targetAnchor = targetNode; + suspense.resolve(true); } else { - vnode.anchor = nextSibling(node); - let targetAnchor = targetNode; - while (targetAnchor) { - targetAnchor = nextSibling(targetAnchor); - if (targetAnchor && targetAnchor.nodeType === 8 && targetAnchor.data === "teleport anchor") { - vnode.targetAnchor = targetAnchor; - target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); - break; + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } + } + } + } else { + if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newBranch); + } else { + triggerEvent(n2, "onPending"); + suspense.pendingBranch = newBranch; + if (newBranch.shapeFlag & 512) { + suspense.pendingId = newBranch.component.suspenseId; + } else { + suspense.pendingId = suspenseId++; + } + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + const { timeout, pendingId } = suspense; + if (timeout > 0) { + setTimeout(() => { + if (suspense.pendingId === pendingId) { + suspense.fallback(newFallback); + } + }, timeout); + } else if (timeout === 0) { + suspense.fallback(newFallback); + } + } + } + } + } + let hasWarned = false; + function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { + if (!hasWarned) { + hasWarned = true; + console[console.info ? "info" : "log"]( + ` is an experimental feature and its API will likely change.` + ); + } + const { + p: patch, + m: move, + um: unmount, + n: next, + o: { parentNode, remove } + } = rendererInternals; + let parentSuspenseId; + const isSuspensible = isVNodeSuspensible(vnode); + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch) { + parentSuspenseId = parentSuspense.pendingId; + parentSuspense.deps++; + } + } + const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0; + { + assertNumber(timeout, `Suspense timeout`); + } + const initialAnchor = anchor; + const suspense = { + vnode, + parent: parentSuspense, + parentComponent, + namespace, + container, + hiddenContainer, + deps: 0, + pendingId: suspenseId++, + timeout: typeof timeout === "number" ? timeout : -1, + activeBranch: null, + pendingBranch: null, + isInFallback: !isHydrating, + isHydrating, + isUnmounted: false, + effects: [], + resolve(resume = false, sync = false) { + { + if (!resume && !suspense.pendingBranch) { + throw new Error( + `suspense.resolve() is called without a pending branch.` + ); + } + if (suspense.isUnmounted) { + throw new Error( + `suspense.resolve() is called on an already unmounted suspense boundary.` + ); + } + } + const { + vnode: vnode2, + activeBranch, + pendingBranch, + pendingId, + effects, + parentComponent: parentComponent2, + container: container2 + } = suspense; + let delayEnter = false; + if (suspense.isHydrating) { + suspense.isHydrating = false; + } else if (!resume) { + delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = () => { + if (pendingId === suspense.pendingId) { + move( + pendingBranch, + container2, + anchor === initialAnchor ? next(activeBranch) : anchor, + 0 + ); + queuePostFlushCb(effects); + } + }; + } + if (activeBranch) { + if (parentNode(activeBranch.el) === container2) { + anchor = next(activeBranch); + } + unmount(activeBranch, parentComponent2, suspense, true); + } + if (!delayEnter) { + move(pendingBranch, container2, anchor, 0); + } + } + setActiveBranch(suspense, pendingBranch); + suspense.pendingBranch = null; + suspense.isInFallback = false; + let parent = suspense.parent; + let hasUnresolvedAncestor = false; + while (parent) { + if (parent.pendingBranch) { + parent.effects.push(...effects); + hasUnresolvedAncestor = true; + break; + } + parent = parent.parent; + } + if (!hasUnresolvedAncestor && !delayEnter) { + queuePostFlushCb(effects); + } + suspense.effects = []; + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0 && !sync) { + parentSuspense.resolve(); } } - hydrateChildren( - targetNode, - vnode, - target, - parentComponent, - parentSuspense, + } + triggerEvent(vnode2, "onResolve"); + }, + fallback(fallbackVNode) { + if (!suspense.pendingBranch) { + return; + } + const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; + triggerEvent(vnode2, "onFallback"); + const anchor2 = next(activeBranch); + const mountFallback = () => { + if (!suspense.isInFallback) { + return; + } + patch( + null, + fallbackVNode, + container2, + anchor2, + parentComponent2, + null, + // fallback tree will not have suspense context + namespace2, slotScopeIds, optimized ); + setActiveBranch(suspense, fallbackVNode); + }; + const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = mountFallback; + } + suspense.isInFallback = true; + unmount( + activeBranch, + parentComponent2, + null, + // no suspense so unmount hooks fire now + true + // shouldRemove + ); + if (!delayEnter) { + mountFallback(); + } + }, + move(container2, anchor2, type) { + suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); + suspense.container = container2; + }, + next() { + return suspense.activeBranch && next(suspense.activeBranch); + }, + registerDep(instance, setupRenderEffect, optimized2) { + const isInPendingSuspense = !!suspense.pendingBranch; + if (isInPendingSuspense) { + suspense.deps++; + } + const hydratedEl = instance.vnode.el; + instance.asyncDep.catch((err) => { + handleError(err, instance, 0); + }).then((asyncSetupResult) => { + if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { + return; + } + instance.asyncResolved = true; + const { vnode: vnode2 } = instance; + { + pushWarningContext(vnode2); + } + handleSetupResult(instance, asyncSetupResult, false); + if (hydratedEl) { + vnode2.el = hydratedEl; + } + const placeholder = !hydratedEl && instance.subTree.el; + setupRenderEffect( + instance, + vnode2, + // component may have been moved before resolve. + // if this is not a hydration, instance.subTree will be the comment + // placeholder. + parentNode(hydratedEl || instance.subTree.el), + // anchor will not be used if this is hydration, so only need to + // consider the comment placeholder case. + hydratedEl ? null : next(instance.subTree), + suspense, + namespace, + optimized2 + ); + if (placeholder) { + remove(placeholder); + } + updateHOCHostEl(instance, vnode2.el); + { + popWarningContext(); + } + if (isInPendingSuspense && --suspense.deps === 0) { + suspense.resolve(); + } + }); + }, + unmount(parentSuspense2, doRemove) { + suspense.isUnmounted = true; + if (suspense.activeBranch) { + unmount( + suspense.activeBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + if (suspense.pendingBranch) { + unmount( + suspense.pendingBranch, + parentComponent, + parentSuspense2, + doRemove + ); } } - updateCssVars(vnode); - } - return vnode.anchor && nextSibling(vnode.anchor); + }; + return suspense; } - const Teleport = TeleportImpl; - function updateCssVars(vnode) { - const ctx = vnode.ctx; - if (ctx && ctx.ut) { - let node = vnode.children[0].el; - while (node && node !== vnode.targetAnchor) { - if (node.nodeType === 1) - node.setAttribute("data-v-owner", ctx.uid); - node = node.nextSibling; - } - ctx.ut(); + function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + node.parentNode, + // eslint-disable-next-line no-restricted-globals + document.createElement("div"), + null, + namespace, + slotScopeIds, + optimized, + rendererInternals, + true + ); + const result = hydrateNode( + node, + suspense.pendingBranch = vnode.ssContent, + parentComponent, + suspense, + slotScopeIds, + optimized + ); + if (suspense.deps === 0) { + suspense.resolve(false, true); } + return result; + } + function normalizeSuspenseChildren(vnode) { + const { shapeFlag, children } = vnode; + const isSlotChildren = shapeFlag & 32; + vnode.ssContent = normalizeSuspenseSlot( + isSlotChildren ? children.default : children + ); + vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); + } + function normalizeSuspenseSlot(s) { + let block; + if (isFunction(s)) { + const trackBlock = isBlockTreeEnabled && s._c; + if (trackBlock) { + s._d = false; + openBlock(); + } + s = s(); + if (trackBlock) { + s._d = true; + block = currentBlock; + closeBlock(); + } + } + if (isArray(s)) { + const singleChild = filterSingleRoot(s); + if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) { + warn$1(` slots expect a single root node.`); + } + s = singleChild; + } + s = normalizeVNode(s); + if (block && !s.dynamicChildren) { + s.dynamicChildren = block.filter((c) => c !== s); + } + return s; + } + function queueEffectWithSuspense(fn, suspense) { + if (suspense && suspense.pendingBranch) { + if (isArray(fn)) { + suspense.effects.push(...fn); + } else { + suspense.effects.push(fn); + } + } else { + queuePostFlushCb(fn); + } + } + function setActiveBranch(suspense, branch) { + suspense.activeBranch = branch; + const { vnode, parentComponent } = suspense; + let el = branch.el; + while (!el && branch.component) { + branch = branch.component.subTree; + el = branch.el; + } + vnode.el = el; + if (parentComponent && parentComponent.subTree === vnode) { + parentComponent.vnode.el = el; + updateHOCHostEl(parentComponent, el); + } + } + function isVNodeSuspensible(vnode) { + const suspensible = vnode.props && vnode.props.suspensible; + return suspensible != null && suspensible !== false; } const Fragment = Symbol.for("v-fgt"); @@ -8554,6 +9413,9 @@ Server rendered element contains fewer child nodes than client vdom.` let isBlockTreeEnabled = 1; function setBlockTracking(value) { isBlockTreeEnabled += value; + if (value < 0 && currentBlock) { + currentBlock.hasOnce = true; + } } function setupBlock(vnode) { vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null; @@ -8592,10 +9454,13 @@ Server rendered element contains fewer child nodes than client vdom.` return value ? value.__v_isVNode === true : false; } function isSameVNodeType(n1, n2) { - if (n2.shapeFlag & 6 && hmrDirtyComponents.has(n2.type)) { - n1.shapeFlag &= ~256; - n2.shapeFlag &= ~512; - return false; + if (n2.shapeFlag & 6 && n1.component) { + const dirtyInstances = hmrDirtyComponents.get(n2.type); + if (dirtyInstances && dirtyInstances.has(n1.component)) { + n1.shapeFlag &= ~256; + n2.shapeFlag &= ~512; + return false; + } } return n1.type === n2.type && n1.key === n2.key; } @@ -8608,7 +9473,6 @@ Server rendered element contains fewer child nodes than client vdom.` ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args ); }; - const InternalObjectKey = `__vInternal`; const normalizeKey = ({ key }) => key != null ? key : null; const normalizeRef = ({ ref, @@ -8640,6 +9504,7 @@ Server rendered element contains fewer child nodes than client vdom.` el: null, anchor: null, target: null, + targetStart: null, targetAnchor: null, staticCount: 0, shapeFlag, @@ -8698,7 +9563,7 @@ Server rendered element contains fewer child nodes than client vdom.` currentBlock.push(cloned); } } - cloned.patchFlag |= -2; + cloned.patchFlag = -2; return cloned; } if (isClassComponent(type)) { @@ -8739,12 +9604,11 @@ Component that was made reactive: `, ); } function guardReactiveProps(props) { - if (!props) - return null; - return isProxy(props) || InternalObjectKey in props ? extend({}, props) : props; + if (!props) return null; + return isProxy(props) || isInternalObject(props) ? extend({}, props) : props; } - function cloneVNode(vnode, extraProps, mergeRef = false) { - const { props, ref, patchFlag, children } = vnode; + function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) { + const { props, ref, patchFlag, children, transition } = vnode; const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; const cloned = { __v_isVNode: true, @@ -8762,6 +9626,7 @@ Component that was made reactive: `, slotScopeIds: vnode.slotScopeIds, children: patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children, target: vnode.target, + targetStart: vnode.targetStart, targetAnchor: vnode.targetAnchor, staticCount: vnode.staticCount, shapeFlag: vnode.shapeFlag, @@ -8774,7 +9639,7 @@ Component that was made reactive: `, dynamicChildren: vnode.dynamicChildren, appContext: vnode.appContext, dirs: vnode.dirs, - transition: vnode.transition, + transition, // These should technically only be non-null on mounted VNodes. However, // they *should* be copied for kept-alive vnodes. So we just always copy // them since them being non-null during a mount doesn't affect the logic as @@ -8788,6 +9653,12 @@ Component that was made reactive: `, ctx: vnode.ctx, ce: vnode.ce }; + if (transition && cloneTransition) { + setTransitionHooks( + cloned, + transition.clone(cloned) + ); + } return cloned; } function deepCloneVNode(vnode) { @@ -8846,7 +9717,7 @@ Component that was made reactive: `, } else { type = 32; const slotFlag = children._; - if (!slotFlag && !(InternalObjectKey in children)) { + if (!slotFlag && !isInternalObject(children)) { children._ctx = currentRenderingInstance; } else if (slotFlag === 3 && currentRenderingInstance) { if (currentRenderingInstance.slots._ === 1) { @@ -8922,6 +9793,7 @@ Component that was made reactive: `, effect: null, update: null, // will be set synchronously right after creation + job: null, scope: new EffectScope( true /* detached */ @@ -8932,6 +9804,7 @@ Component that was made reactive: `, exposeProxy: null, withProxy: null, provides: parent ? parent.provides : Object.create(appContext.provides), + ids: parent ? parent.ids : ["", 0, 0], accessCache: null, renderCache: [], // local resolved assets @@ -8957,8 +9830,6 @@ Component that was made reactive: `, refs: EMPTY_OBJ, setupState: EMPTY_OBJ, setupContext: null, - attrsProxy: null, - slotsProxy: null, // suspense related suspense, suspenseId: suspense ? suspense.pendingId : 0, @@ -9031,12 +9902,12 @@ Component that was made reactive: `, return instance.vnode.shapeFlag & 4; } let isInSSRComponentSetup = false; - function setupComponent(instance, isSSR = false) { + function setupComponent(instance, isSSR = false, optimized = false) { isSSR && setInSSRSetupState(isSSR); const { props, children } = instance.vnode; const isStateful = isStatefulComponent(instance); initProps(instance, props, isStateful, isSSR); - initSlots(instance, children); + initSlots(instance, children, optimized); const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; isSSR && setInSSRSetupState(false); return setupResult; @@ -9067,7 +9938,7 @@ Component that was made reactive: `, } } instance.accessCache = /* @__PURE__ */ Object.create(null); - instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers)); + instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers); { exposePropsOnRenderContext(instance); } @@ -9088,6 +9959,7 @@ Component that was made reactive: `, resetTracking(); reset(); if (isPromise(setupResult)) { + if (!isAsyncWrapper(instance)) markAsyncBoundary(instance); setupResult.then(unsetCurrentInstance, unsetCurrentInstance); if (isSSR) { return setupResult.then((resolvedResult) => { @@ -9195,37 +10067,32 @@ Component that was made reactive: `, `Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Use "vue.global.js" instead.` ) ); } else { - warn$1(`Component is missing template or render function.`); + warn$1(`Component is missing template or render function: `, Component); } } } - function getAttrsProxy(instance) { - return instance.attrsProxy || (instance.attrsProxy = new Proxy( - instance.attrs, - { - get(target, key) { - markAttrsAccessed(); - track(instance, "get", "$attrs"); - return target[key]; - }, - set() { - warn$1(`setupContext.attrs is readonly.`); - return false; - }, - deleteProperty() { - warn$1(`setupContext.attrs is readonly.`); - return false; - } - } - )); - } + const attrsProxyHandlers = { + get(target, key) { + markAttrsAccessed(); + track(target, "get", ""); + return target[key]; + }, + set() { + warn$1(`setupContext.attrs is readonly.`); + return false; + }, + deleteProperty() { + warn$1(`setupContext.attrs is readonly.`); + return false; + } + } ; function getSlotsProxy(instance) { - return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, { + return new Proxy(instance.slots, { get(target, key) { track(instance, "get", "$slots"); return target[key]; } - })); + }); } function createSetupContext(instance) { const expose = (exposed) => { @@ -9252,12 +10119,14 @@ Component that was made reactive: `, instance.exposed = exposed || {}; }; { + let attrsProxy; + let slotsProxy; return Object.freeze({ get attrs() { - return getAttrsProxy(instance); + return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers)); }, get slots() { - return getSlotsProxy(instance); + return slotsProxy || (slotsProxy = getSlotsProxy(instance)); }, get emit() { return (event, ...args) => instance.emit(event, ...args); @@ -9266,7 +10135,7 @@ Component that was made reactive: `, }); } } - function getExposeProxy(instance) { + function getComponentPublicInstance(instance) { if (instance.exposed) { return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { get(target, key) { @@ -9280,6 +10149,8 @@ Component that was made reactive: `, return key in target || key in publicPropertiesMap; } })); + } else { + return instance.proxy; } } const classifyRE = /(?:^|[-_])(\w)/g; @@ -9324,59 +10195,6 @@ Component that was made reactive: `, return c; }; - function useModel(props, name, options = EMPTY_OBJ) { - const i = getCurrentInstance(); - if (!i) { - warn$1(`useModel() called without active instance.`); - return ref(); - } - if (!i.propsOptions[0][name]) { - warn$1(`useModel() called with prop "${name}" which is not declared.`); - return ref(); - } - const camelizedName = camelize(name); - const hyphenatedName = hyphenate(name); - const res = customRef((track, trigger) => { - let localValue; - watchSyncEffect(() => { - const propValue = props[name]; - if (hasChanged(localValue, propValue)) { - localValue = propValue; - trigger(); - } - }); - return { - get() { - track(); - return options.get ? options.get(localValue) : localValue; - }, - set(value) { - const rawProps = i.vnode.props; - if (!(rawProps && // check if parent has passed v-model - (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) { - localValue = value; - trigger(); - } - i.emit(`update:${name}`, options.set ? options.set(value) : value); - } - }; - }); - const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`; - res[Symbol.iterator] = () => { - let i2 = 0; - return { - next() { - if (i2 < 2) { - return { value: i2++ ? props[modifierKey] || {} : res, done: false }; - } else { - return { done: true }; - } - } - }; - }; - return res; - } - function h(type, propsOrChildren, children) { const l = arguments.length; if (l === 2) { @@ -9407,6 +10225,7 @@ Component that was made reactive: `, const stringStyle = { style: "color:#f5222d" }; const keywordStyle = { style: "color:#eb2f96" }; const formatter = { + __vue_custom_formatter: true, header(obj) { if (!isObject(obj)) { return null; @@ -9419,7 +10238,8 @@ Component that was made reactive: `, {}, ["span", vueStyle, genRefFlag(obj)], "<", - formatValue(obj.value), + // avoid debugger accessing value affecting behavior + formatValue("_value" in obj ? obj._value : obj), `>` ]; } else if (isReactive(obj)) { @@ -9581,6 +10401,7 @@ Component that was made reactive: `, } const ret = render(); ret.memo = memo.slice(); + ret.cacheIndex = index; return cache[index] = ret; } function isMemoSame(cached, memo) { @@ -9599,7 +10420,7 @@ Component that was made reactive: `, return true; } - const version = "3.4.21"; + const version = "3.5.5"; const warn = warn$1 ; const ErrorTypeStrings = ErrorTypeStrings$1 ; const devtools = devtools$1 ; @@ -9609,6 +10430,18 @@ Component that was made reactive: `, const compatUtils = null; const DeprecationTypes = null; + let policy = void 0; + const tt = typeof window !== "undefined" && window.trustedTypes; + if (tt) { + try { + policy = /* @__PURE__ */ tt.createPolicy("vue", { + createHTML: (val) => val + }); + } catch (e) { + warn(`Error creating trusted types policy: ${e}`); + } + } + const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val; const svgNS = "http://www.w3.org/2000/svg"; const mathmlNS = "http://www.w3.org/1998/Math/MathML"; const doc = typeof document !== "undefined" ? document : null; @@ -9624,7 +10457,7 @@ Component that was made reactive: `, } }, createElement: (tag, namespace, is, props) => { - const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : doc.createElement(tag, is ? { is } : void 0); + const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag); if (tag === "select" && props && props.multiple != null) { el.setAttribute("multiple", props.multiple); } @@ -9653,11 +10486,12 @@ Component that was made reactive: `, if (start && (start === end || start.nextSibling)) { while (true) { parent.insertBefore(start.cloneNode(true), anchor); - if (start === end || !(start = start.nextSibling)) - break; + if (start === end || !(start = start.nextSibling)) break; } } else { - templateContainer.innerHTML = namespace === "svg" ? `${content}` : namespace === "mathml" ? `${content}` : content; + templateContainer.innerHTML = unsafeToTrustedHTML( + namespace === "svg" ? `${content}` : namespace === "mathml" ? `${content}` : content + ); const template = templateContainer.content; if (namespace === "svg" || namespace === "mathml") { const wrapper = template.firstChild; @@ -9680,8 +10514,6 @@ Component that was made reactive: `, const TRANSITION$1 = "transition"; const ANIMATION = "animation"; const vtcKey = Symbol("_vtc"); - const Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots); - Transition.displayName = "Transition"; const DOMTransitionPropsValidators = { name: String, type: String, @@ -9700,11 +10532,19 @@ Component that was made reactive: `, leaveActiveClass: String, leaveToClass: String }; - const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend( + const TransitionPropsValidators = /* @__PURE__ */ extend( {}, BaseTransitionPropsValidators, DOMTransitionPropsValidators ); + const decorate$1 = (t) => { + t.displayName = "Transition"; + t.props = TransitionPropsValidators; + return t; + }; + const Transition = /* @__PURE__ */ decorate$1( + (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots) + ); const callHook = (hook, args = []) => { if (isArray(hook)) { hook.forEach((h2) => h2(...args)); @@ -9795,8 +10635,8 @@ Component that was made reactive: `, el._isLeaving = true; const resolve = () => finishLeave(el, done); addTransitionClass(el, leaveFromClass); - forceReflow(); addTransitionClass(el, leaveActiveClass); + forceReflow(); nextFrame(() => { if (!el._isLeaving) { return; @@ -9938,8 +10778,7 @@ Component that was made reactive: `, return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); } function toMs(s) { - if (s === "auto") - return 0; + if (s === "auto") return 0; return Number(s.slice(0, -1).replace(",", ".")) * 1e3; } function forceReflow() { @@ -9977,8 +10816,7 @@ Component that was made reactive: `, } }, updated(el, { value, oldValue }, { transition }) { - if (!value === !oldValue) - return; + if (!value === !oldValue) return; if (transition) { if (value) { transition.beforeEnter(el); @@ -10022,10 +10860,16 @@ Component that was made reactive: `, } const setVars = () => { const vars = getter(instance.proxy); - setVarsOnVNode(instance.subTree, vars); + if (instance.ce) { + setVarsOnNode(instance.ce, vars); + } else { + setVarsOnVNode(instance.subTree, vars); + } updateTeleports(vars); }; - watchPostEffect(setVars); + onBeforeMount(() => { + watchPostEffect(setVars); + }); onMounted(() => { const ob = new MutationObserver(setVars); ob.observe(instance.subTree.el.parentNode, { childList: true }); @@ -10053,8 +10897,7 @@ Component that was made reactive: `, let { el, anchor } = vnode; while (el) { setVarsOnNode(el, vars); - if (el === anchor) - break; + if (el === anchor) break; el = el.nextSibling; } } @@ -10126,8 +10969,7 @@ Component that was made reactive: `, if (isArray(val)) { val.forEach((v) => setStyle(style, name, v)); } else { - if (val == null) - val = ""; + if (val == null) val = ""; { if (semicolonRE.test(val)) { warn( @@ -10173,7 +11015,7 @@ Component that was made reactive: `, } const xlinkNS = "http://www.w3.org/1999/xlink"; - function patchAttr(el, key, value, isSVG, instance) { + function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) { if (isSVG && key.startsWith("xlink:")) { if (value == null) { el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); @@ -10181,28 +11023,33 @@ Component that was made reactive: `, el.setAttributeNS(xlinkNS, key, value); } } else { - const isBoolean = isSpecialBooleanAttr(key); if (value == null || isBoolean && !includeBooleanAttr(value)) { el.removeAttribute(key); } else { - el.setAttribute(key, isBoolean ? "" : value); + el.setAttribute( + key, + isBoolean ? "" : isSymbol(value) ? String(value) : value + ); } } } - function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspense, unmountChildren) { + function patchDOMProp(el, key, value, parentComponent) { if (key === "innerHTML" || key === "textContent") { - if (prevChildren) { - unmountChildren(prevChildren, parentComponent, parentSuspense); + if (value != null) { + el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value; } - el[key] = value == null ? "" : value; return; } const tag = el.tagName; if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally !tag.includes("-")) { const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value; - const newValue = value == null ? "" : value; + const newValue = value == null ? ( + // #11647: value should be set as empty string for null and undefined, + // but should be set as 'on'. + el.type === "checkbox" ? "on" : "" + ) : String(value); if (oldValue !== newValue || !("_value" in el)) { el.value = newValue; } @@ -10249,11 +11096,14 @@ Component that was made reactive: `, const invokers = el[veiKey] || (el[veiKey] = {}); const existingInvoker = invokers[rawName]; if (nextValue && existingInvoker) { - existingInvoker.value = nextValue; + existingInvoker.value = sanitizeEventValue(nextValue, rawName) ; } else { const [name, options] = parseName(rawName); if (nextValue) { - const invoker = invokers[rawName] = createInvoker(nextValue, instance); + const invoker = invokers[rawName] = createInvoker( + sanitizeEventValue(nextValue, rawName) , + instance + ); addEventListener(el, name, invoker, options); } else if (existingInvoker) { removeEventListener(el, name, existingInvoker, options); @@ -10296,6 +11146,16 @@ Component that was made reactive: `, invoker.attached = getNow(); return invoker; } + function sanitizeEventValue(value, propName) { + if (isFunction(value) || isArray(value)) { + return value; + } + warn( + `Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop? +Expected function or array of functions, received type ${typeof value}.` + ); + return NOOP; + } function patchStopImmediatePropagation(e, value) { if (isArray(value)) { const originalStop = e.stopImmediatePropagation; @@ -10303,7 +11163,9 @@ Component that was made reactive: `, originalStop.call(e); e._stopped = true; }; - return value.map((fn) => (e2) => !e2._stopped && fn && fn(e2)); + return value.map( + (fn) => (e2) => !e2._stopped && fn && fn(e2) + ); } else { return value; } @@ -10311,7 +11173,7 @@ Component that was made reactive: `, const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; - const patchProp = (el, key, prevValue, nextValue, namespace, prevChildren, parentComponent, parentSuspense, unmountChildren) => { + const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => { const isSVG = namespace === "svg"; if (key === "class") { patchClass(el, nextValue, isSVG); @@ -10322,15 +11184,10 @@ Component that was made reactive: `, patchEvent(el, key, prevValue, nextValue, parentComponent); } } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { - patchDOMProp( - el, - key, - nextValue, - prevChildren, - parentComponent, - parentSuspense, - unmountChildren - ); + patchDOMProp(el, key, nextValue); + if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) { + patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value"); + } } else { if (key === "true-value") { el._trueValue = nextValue; @@ -10371,74 +11228,124 @@ Component that was made reactive: `, if (isNativeOn(key) && isString(value)) { return false; } - return key in el; + if (key in el) { + return true; + } + if (el._isVueCE && (/[A-Z]/.test(key) || !isString(value))) { + return true; + } + return false; } + const REMOVAL = {}; /*! #__NO_SIDE_EFFECTS__ */ // @__NO_SIDE_EFFECTS__ - function defineCustomElement(options, hydrate2) { - const Comp = defineComponent(options); + function defineCustomElement(options, extraOptions, _createApp) { + const Comp = defineComponent(options, extraOptions); + if (isPlainObject(Comp)) extend(Comp, extraOptions); class VueCustomElement extends VueElement { constructor(initialProps) { - super(Comp, initialProps, hydrate2); + super(Comp, initialProps, _createApp); } } VueCustomElement.def = Comp; return VueCustomElement; } /*! #__NO_SIDE_EFFECTS__ */ - const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options) => { - return /* @__PURE__ */ defineCustomElement(options, hydrate); + const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => { + return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp); }; const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class { }; class VueElement extends BaseClass { - constructor(_def, _props = {}, hydrate2) { + constructor(_def, _props = {}, _createApp = createApp) { super(); this._def = _def; this._props = _props; + this._createApp = _createApp; + this._isVueCE = true; /** * @internal */ this._instance = null; + /** + * @internal + */ + this._app = null; + /** + * @internal + */ + this._nonce = this._def.nonce; this._connected = false; this._resolved = false; this._numberProps = null; + this._styleChildren = /* @__PURE__ */ new WeakSet(); this._ob = null; - if (this.shadowRoot && hydrate2) { - hydrate2(this._createVNode(), this.shadowRoot); + if (this.shadowRoot && _createApp !== createApp) { + this._root = this.shadowRoot; } else { if (this.shadowRoot) { warn( `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.` ); } - this.attachShadow({ mode: "open" }); - if (!this._def.__asyncLoader) { - this._resolveProps(this._def); + if (_def.shadowRoot !== false) { + this.attachShadow({ mode: "open" }); + this._root = this.shadowRoot; + } else { + this._root = this; } } + if (!this._def.__asyncLoader) { + this._resolveProps(this._def); + } } connectedCallback() { + if (!this.isConnected) return; + if (!this.shadowRoot) { + this._parseSlots(); + } this._connected = true; + let parent = this; + while (parent = parent && (parent.parentNode || parent.host)) { + if (parent instanceof VueElement) { + this._parent = parent; + break; + } + } if (!this._instance) { if (this._resolved) { + this._setParent(); this._update(); } else { - this._resolveDef(); + if (parent && parent._pendingResolve) { + this._pendingResolve = parent._pendingResolve.then(() => { + this._pendingResolve = void 0; + this._resolveDef(); + }); + } else { + this._resolveDef(); + } } } } + _setParent(parent = this._parent) { + if (parent) { + this._instance.parent = parent._instance; + this._instance.provides = parent._instance.provides; + } + } disconnectedCallback() { this._connected = false; - if (this._ob) { - this._ob.disconnect(); - this._ob = null; - } nextTick(() => { if (!this._connected) { - render(null, this.shadowRoot); - this._instance = null; + if (this._ob) { + this._ob.disconnect(); + this._ob = null; + } + this._app && this._app.unmount(); + if (this._instance) this._instance.ce = void 0; + this._app = this._instance = null; } }); } @@ -10446,7 +11353,9 @@ Component that was made reactive: `, * resolve inner component definition (handle possible async component) */ _resolveDef() { - this._resolved = true; + if (this._pendingResolve) { + return; + } for (let i = 0; i < this.attributes.length; i++) { this._setAttr(this.attributes[i].name); } @@ -10457,6 +11366,8 @@ Component that was made reactive: `, }); this._ob.observe(this, { attributes: true }); const resolve = (def, isAsync = false) => { + this._resolved = true; + this._pendingResolve = void 0; const { props, styles } = def; let numberProps; if (props && !isArray(props)) { @@ -10474,22 +11385,53 @@ Component that was made reactive: `, if (isAsync) { this._resolveProps(def); } - this._applyStyles(styles); - this._update(); + if (this.shadowRoot) { + this._applyStyles(styles); + } else if (styles) { + warn( + "Custom element style injection is not supported when using shadowRoot: false" + ); + } + this._mount(def); }; const asyncDef = this._def.__asyncLoader; if (asyncDef) { - asyncDef().then((def) => resolve(def, true)); + this._pendingResolve = asyncDef().then( + (def) => resolve(this._def = def, true) + ); } else { resolve(this._def); } } + _mount(def) { + if (!def.name) { + def.name = "VueElement"; + } + this._app = this._createApp(def); + if (def.configureApp) { + def.configureApp(this._app); + } + this._app._ceVNode = this._createVNode(); + this._app.mount(this._root); + const exposed = this._instance && this._instance.exposed; + if (!exposed) return; + for (const key in exposed) { + if (!hasOwn(this, key)) { + Object.defineProperty(this, key, { + // unwrap ref to be consistent with public instance behavior + get: () => unref(exposed[key]) + }); + } else { + warn(`Exposed property "${key}" already exists on custom element.`); + } + } + } _resolveProps(def) { const { props } = def; const declaredPropKeys = isArray(props) ? props : Object.keys(props || {}); for (const key of Object.keys(this)) { if (key[0] !== "_" && declaredPropKeys.includes(key)) { - this._setProp(key, this[key], true, false); + this._setProp(key, this[key]); } } for (const key of declaredPropKeys.map(camelize)) { @@ -10498,18 +11440,20 @@ Component that was made reactive: `, return this._getProp(key); }, set(val) { - this._setProp(key, val); + this._setProp(key, val, true, true); } }); } } _setAttr(key) { - let value = this.getAttribute(key); + if (key.startsWith("data-v-")) return; + const has = this.hasAttribute(key); + let value = has ? this.getAttribute(key) : REMOVAL; const camelKey = camelize(key); - if (this._numberProps && this._numberProps[camelKey]) { + if (has && this._numberProps && this._numberProps[camelKey]) { value = toNumber(value); } - this._setProp(camelKey, value, false); + this._setProp(camelKey, value, false, true); } /** * @internal @@ -10520,9 +11464,16 @@ Component that was made reactive: `, /** * @internal */ - _setProp(key, val, shouldReflect = true, shouldUpdate = true) { + _setProp(key, val, shouldReflect = true, shouldUpdate = false) { if (val !== this._props[key]) { - this._props[key] = val; + if (val === REMOVAL) { + delete this._props[key]; + } else { + this._props[key] = val; + if (key === "key" && this._app) { + this._app._ceVNode.key = val; + } + } if (shouldUpdate && this._instance) { this._update(); } @@ -10538,18 +11489,23 @@ Component that was made reactive: `, } } _update() { - render(this._createVNode(), this.shadowRoot); + render(this._createVNode(), this._root); } _createVNode() { - const vnode = createVNode(this._def, extend({}, this._props)); + const baseProps = {}; + if (!this.shadowRoot) { + baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this); + } + const vnode = createVNode(this._def, extend(baseProps, this._props)); if (!this._instance) { vnode.ce = (instance) => { this._instance = instance; + instance.ce = this; instance.isCE = true; { instance.ceReload = (newStyles) => { if (this._styles) { - this._styles.forEach((s) => this.shadowRoot.removeChild(s)); + this._styles.forEach((s) => this._root.removeChild(s)); this._styles.length = 0; } this._applyStyles(newStyles); @@ -10559,9 +11515,10 @@ Component that was made reactive: `, } const dispatch = (event, args) => { this.dispatchEvent( - new CustomEvent(event, { - detail: args - }) + new CustomEvent( + event, + isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args } + ) ); }; instance.emit = (event, ...args) => { @@ -10570,30 +11527,126 @@ Component that was made reactive: `, dispatch(hyphenate(event), args); } }; - let parent = this; - while (parent = parent && (parent.parentNode || parent.host)) { - if (parent instanceof VueElement) { - instance.parent = parent._instance; - instance.provides = parent._instance.provides; - break; - } - } + this._setParent(); }; } return vnode; } - _applyStyles(styles) { - if (styles) { - styles.forEach((css) => { - const s = document.createElement("style"); - s.textContent = css; - this.shadowRoot.appendChild(s); - { + _applyStyles(styles, owner) { + if (!styles) return; + if (owner) { + if (owner === this._def || this._styleChildren.has(owner)) { + return; + } + this._styleChildren.add(owner); + } + const nonce = this._nonce; + for (let i = styles.length - 1; i >= 0; i--) { + const s = document.createElement("style"); + if (nonce) s.setAttribute("nonce", nonce); + s.textContent = styles[i]; + this.shadowRoot.prepend(s); + { + if (owner) { + if (owner.__hmrId) { + if (!this._childStyles) this._childStyles = /* @__PURE__ */ new Map(); + let entry = this._childStyles.get(owner.__hmrId); + if (!entry) { + this._childStyles.set(owner.__hmrId, entry = []); + } + entry.push(s); + } + } else { (this._styles || (this._styles = [])).push(s); } - }); + } } } + /** + * Only called when shadowRoot is false + */ + _parseSlots() { + const slots = this._slots = {}; + let n; + while (n = this.firstChild) { + const slotName = n.nodeType === 1 && n.getAttribute("slot") || "default"; + (slots[slotName] || (slots[slotName] = [])).push(n); + this.removeChild(n); + } + } + /** + * Only called when shadowRoot is false + */ + _renderSlots() { + const outlets = (this._teleportTarget || this).querySelectorAll("slot"); + const scopeId = this._instance.type.__scopeId; + for (let i = 0; i < outlets.length; i++) { + const o = outlets[i]; + const slotName = o.getAttribute("name") || "default"; + const content = this._slots[slotName]; + const parent = o.parentNode; + if (content) { + for (const n of content) { + if (scopeId && n.nodeType === 1) { + const id = scopeId + "-s"; + const walker = document.createTreeWalker(n, 1); + n.setAttribute(id, ""); + let child; + while (child = walker.nextNode()) { + child.setAttribute(id, ""); + } + } + parent.insertBefore(n, o); + } + } else { + while (o.firstChild) parent.insertBefore(o.firstChild, o); + } + parent.removeChild(o); + } + } + /** + * @internal + */ + _injectChildStyle(comp) { + this._applyStyles(comp.styles, comp); + } + /** + * @internal + */ + _removeChildStyle(comp) { + { + this._styleChildren.delete(comp); + if (this._childStyles && comp.__hmrId) { + const oldStyles = this._childStyles.get(comp.__hmrId); + if (oldStyles) { + oldStyles.forEach((s) => this._root.removeChild(s)); + oldStyles.length = 0; + } + } + } + } + } + function useHost(caller) { + const instance = getCurrentInstance(); + const el = instance && instance.ce; + if (el) { + return el; + } else { + if (!instance) { + warn( + `${caller || "useHost"} called without an active component instance.` + ); + } else { + warn( + `${caller || "useHost"} can only be used in components defined via defineCustomElement.` + ); + } + } + return null; + } + function useShadowRoot() { + const el = useHost("useShadowRoot") ; + return el && el.shadowRoot; } function useCssModule(name = "$style") { @@ -10609,7 +11662,11 @@ Component that was made reactive: `, const newPositionMap = /* @__PURE__ */ new WeakMap(); const moveCbKey = Symbol("_moveCb"); const enterCbKey = Symbol("_enterCb"); - const TransitionGroupImpl = { + const decorate = (t) => { + delete t.props.mode; + return t; + }; + const TransitionGroupImpl = /* @__PURE__ */ decorate({ name: "TransitionGroup", props: /* @__PURE__ */ extend({}, TransitionPropsValidators, { tag: String, @@ -10658,7 +11715,28 @@ Component that was made reactive: `, const rawProps = toRaw(props); const cssTransitionProps = resolveTransitionProps(rawProps); let tag = rawProps.tag || Fragment; - prevChildren = children; + prevChildren = []; + if (children) { + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.el && child.el instanceof Element) { + prevChildren.push(child); + setTransitionHooks( + child, + resolveTransitionHooks( + child, + cssTransitionProps, + state, + instance + ) + ); + positionMap.set( + child, + child.el.getBoundingClientRect() + ); + } + } + } children = slots.default ? getTransitionRawChildren(slots.default()) : []; for (let i = 0; i < children.length; i++) { const child = children[i]; @@ -10667,26 +11745,14 @@ Component that was made reactive: `, child, resolveTransitionHooks(child, cssTransitionProps, state, instance) ); - } else { + } else if (child.type !== Text) { warn(` children must be keyed.`); } } - if (prevChildren) { - for (let i = 0; i < prevChildren.length; i++) { - const child = prevChildren[i]; - setTransitionHooks( - child, - resolveTransitionHooks(child, cssTransitionProps, state, instance) - ); - positionMap.set(child, child.el.getBoundingClientRect()); - } - } return createVNode(tag, null, children); }; } - }; - const removeMode = (props) => delete props.mode; - /* @__PURE__ */ removeMode(TransitionGroupImpl.props); + }); const TransitionGroup = TransitionGroupImpl; function callPendingCbs(c) { const el = c.el; @@ -10749,8 +11815,7 @@ Component that was made reactive: `, el[assignKey] = getModelAssigner(vnode); const castToNumber = number || vnode.props && vnode.props.type === "number"; addEventListener(el, lazy ? "change" : "input", (e) => { - if (e.target.composing) - return; + if (e.target.composing) return; let domValue = el.value; if (trim) { domValue = domValue.trim(); @@ -10775,17 +11840,16 @@ Component that was made reactive: `, mounted(el, { value }) { el.value = value == null ? "" : value; }, - beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) { + beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) { el[assignKey] = getModelAssigner(vnode); - if (el.composing) - return; - const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value; + if (el.composing) return; + const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value; const newValue = value == null ? "" : value; if (elValue === newValue) { return; } if (document.activeElement === el && el.type !== "range") { - if (lazy) { + if (lazy && value === oldValue) { return; } if (trim && el.value.trim() === newValue) { @@ -10837,12 +11901,16 @@ Component that was made reactive: `, }; function setChecked(el, { value, oldValue }, vnode) { el._modelValue = value; + let checked; if (isArray(value)) { - el.checked = looseIndexOf(value, vnode.props.value) > -1; + checked = looseIndexOf(value, vnode.props.value) > -1; } else if (isSet(value)) { - el.checked = value.has(vnode.props.value); - } else if (value !== oldValue) { - el.checked = looseEqual(value, getCheckboxValue(el, true)); + checked = value.has(vnode.props.value); + } else { + checked = looseEqual(value, getCheckboxValue(el, true)); + } + if (el.checked !== checked) { + el.checked = checked; } } const vModelRadio = { @@ -10882,14 +11950,14 @@ Component that was made reactive: `, // set value in mounted & updated because