1 line
1.1 KiB
JavaScript
1 line
1.1 KiB
JavaScript
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var compilerDom=require("@vue/compiler-dom"),runtimeDom=require("@vue/runtime-dom"),shared=require("@vue/shared");function _interopNamespaceDefault(e){var r=Object.create(null);if(e)for(var t in e)r[t]=e[t];return r.default=e,Object.freeze(r)}var runtimeDom__namespace=_interopNamespaceDefault(runtimeDom);const compileCache=Object.create(null);function compileToFunction(e,r){if(!shared.isString(e)){if(!e.nodeType)return shared.NOOP;e=e.innerHTML}var t=e,o=compileCache[t];if(o)return o;"#"===e[0]&&(e=(o=document.querySelector(e))?o.innerHTML:"");const n=shared.extend({hoistStatic:!0,onError:void 0,onWarn:shared.NOOP},r);n.isCustomElement||"undefined"==typeof customElements||(n.isCustomElement=e=>!!customElements.get(e));o=compilerDom.compile(e,n).code;const i=new Function("Vue",o)(runtimeDom__namespace);return i._rc=!0,compileCache[t]=i}runtimeDom.registerRuntimeCompiler(compileToFunction),exports.compile=compileToFunction,Object.keys(runtimeDom).forEach(function(e){"default"===e||exports.hasOwnProperty(e)||(exports[e]=runtimeDom[e])}); |