{"version":3,"sources":["../src/util.js","../src/h.js","../src/vdom/index.js","../src/extend.js","../src/dom/index.js","../src/vdom/diff.js","../node_modules/weakmap-polyfill/weakmap-polyfill.js","../src/we-element.js","../src/render.js","../src/define.js","../src/clone-element.js","../src/get-host.js","../src/class.js","../node_modules/construct-style-sheets-polyfill/dist/adoptedStyleSheets.js","../src/options.js","../src/o.js","../src/omi.js"],"names":["cssToDom","css","node","document","createElement","textContent","camelCase","str","replace","$","$1","toUpperCase","Fragment","props","children","extend","obj","i","applyRef","ref","value","current","isArray","Object","prototype","toString","call","pathToArr","path","split","hyphenate","hyphenateRE","toLowerCase","capitalize","name","all","letter","s","getValByPath","forEach","prop","createStyleSheet","style","styleSheet","CSSStyleSheet","replaceSync","h","nodeName","attributes","lastSimple","child","simple","arguments","length","stack","push","pop","String","p","key","options","vnode","isSameNodeType","splitText","mapping","hydrating","_componentConstructor","isNamedNode","extend$1","handler","extension","origin","arr","get","e","type","eventProxy","el","_listeners","addEventListener","createNode","removeNode","setAccessor","component","old","isSvg","cssText","IS_NON_DIMENSIONAL","test","innerHTML","__html","bindEvent","pureRemoveAttribute","removeAttribute","ns","removeAttributeNS","pureSetAttribute","setAttribute","className","useCapture","event","nameLower","eventProxy$1","ret","diffLevel","isSvgMode","parent","ownerSVGElement","dom","updateSelf","innerDiffNode","ele","idiff","index","item","one","recollectNodeTree","parentNode","appendChild","out","nodeValue","createTextNode","replaceChild","vnodeName","prevProps","vchildren","firstChild","fc","a","nextSibling","constructor","is","noSlot","dangerouslySetInnerHTML","diffAttributes","min","len","childrenLen","vlen","j","keyedLen","originalChildren","keyed","vchild","_child","_component","__key","trim","isHydrating","c","f","unmountOnly","ATTR_KEY","removeChildren","oldClone","assign","receiveProps","isWeElement","attrs","ccName","indexOf","_ccName","_classCallCheck","instance","Constructor","TypeError","_possibleConstructorReturn","self","ReferenceError","HTMLElement","WeElement","_classCallCheck$1","_possibleConstructorReturn$1","define","ctor","customElements","config","Ele","_WeElement","_temp","_this","_ret","_len","args","Array","this","apply","concat","compute","propTypes","defaultProps","isLightDom","storeHelpers","func","target","cloneElement","root","host","b","window","innerWidth","arg","classNames","classes","argType","inner","join","_Array$prototype$slic","slice","class","unshift","o","JSON","stringify","createRef","store","global","Math","Reflect","hasOwnProperty","BuiltInHTMLElement","construct","setPrototypeOf","Promise","resolve","then","bind","setTimeout","isObject","x","WeakMap","hasDefine","defineProperty","object","genId","checkInstance","methodName","prefix","rand","random","substring","entry","_id","globalThis","id","_HTMLElement","elementId","computed","isInstalled","connectedCallback","_this2","inject","provide","injection","injectKey","attrsToProps","beforeInstall","shadowRoot","install","afterInstall","attachShadow","mode","removeChild","adoptedStyleSheetsMap","has","styleSheets","map","default","set","beforeRender","adoptedStyleSheets","_customStyleContent","_customStyleElement","rootNode","installed","disconnectedCallback","uninstall","update","ignoreAttrs","beforeUpdate","_willUpdate","rendered","render","forceUpdate","updated","_this3","updateProps","val","getAttribute","keys","types","matched","Number","substr","Omi","parse","console","warn","fire","data","CustomEvent","detail","_contents","contents","importPattern","clearRules","sheet","cssRules","deleteRule","insertAllRules","from","to","rule","insertRule","isElementConnected","element","isConnected","contains","unique","filter","diff","arr1","arr2","getShadowRoot","closedShadowRootRegistry","isCSSStyleSheetInstance","proto$2","isPrototypeOf","nonConstructedProto","isNonConstructedStyleSheetInstance","addAdopterLocation","location","adopter","$adoptersByLocation","$locations","getAdopterByLocation","removeAdopterLocation","delete","_location","restyleAdopter","requestAnimationFrame","$basicStyleSheet","checkInvocationCorrectness","ConstructedStyleSheet","bootstrapper","body","getAssociatedLocation","locations","Location","attachAdoptedStyleSheetProperty","configurable","enumerable","sheets","traverseWebComponents","callback","iter","createNodeIterator","NodeFilter","SHOW_ELEMENT","foundNode","FILTER_ACCEPT","FILTER_REJECT","next","nextNode","isExistingAdopter","HTMLStyleElement","$uniqueSheets","some","getAdopterContainer","$element","Document","adopt","styleList","createDocumentFragment","observer","$observer","container","disconnect","insertBefore","observe","defaultObserverOptions","MutationObserver","mutations","mutation","hasShadyCss","addedNodes","Element","connect","removedNodes","ShadyCSS","nativeShadow","implementation","createHTMLDocument","cssStyleSheetMethods","NonConstructedStyleSheet","reject","_DOMException","self_1","ownerNode","rejectImports","method","basic","result","Symbol","hasInstance","childList","subtree","proto$1","readyState","locationType","every","oldUniqueSheets","uniqueSheets","proto","attach_1","init","documentLocation","Component","defineElement","tag","elements","getHost","rpx","extractClass","omi","unbind","version","module","exports"],"mappings":"wBAqCO,SAASA,GAASC,GACvB,GAAMC,GAAOC,SAASC,cAAc,QAEpC,OADAF,GAAKG,YAAcJ,EACZC,EAGF,QAASI,GAAUC,GACxB,MAAOA,GAAIC,QAAQ,SAAU,SAACC,EAAGC,GAC/B,MAAOA,GAAGC,gBAIP,QAASC,GAASC,GACvB,MAAOA,GAAMC,SAGR,QAASC,GAAOC,EAAKH,GAC1B,IAAK,GAAII,KAAKJ,GAAOG,EAAIC,GAAKJ,EAAMI,EACpC,OAAOD,GAOF,QAASE,GAASC,EAAKC,GACjB,MAAPD,IACgB,kBAAPA,GAAmBA,EAAIC,GAC7BD,EAAIE,QAAUD,GAehB,QAASE,GAAQN,GACtB,MAA+C,mBAAxCO,OAAOC,UAAUC,SAASC,KAAKV,GAGjC,QAASW,GAAUC,GACxB,MAAoB,gBAATA,IAAsBA,EAE1BA,EACJpB,QAAQ,KAAM,IACdA,QAAQ,MAAO,KACfqB,MAAM,QAIJ,QAASC,GAAUvB,GACxB,MAAOA,GAAIC,QAAQuB,EAAa,OAAOC,cAGlC,QAASC,GAAWC,GACzB,MAAOA,GACJ1B,QAAQ,UAAW,SAAS2B,EAAKC,GAChC,MAAOA,GAAOzB,gBAEfH,QAAQ,MAAO,SAAA6B,GAAA,MAAKA,GAAE1B,gBAGpB,QAAS2B,GAAaV,EAAMP,GAKjC,MAJYM,GAAUC,GAClBW,QAAQ,SAAAC,GACVnB,EAAUA,EAAQmB,KAEbnB,EAaF,QAASoB,GAAiBC,GAC/B,GAAMC,GAAa,GAAIC,cAEvB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AAA,UA0BmBF,mBAAXpO,QAARuO,OAAAC,QAAAJ,GAAAjQ,KAAA+H,IAAAkI","file":"omi.min.js","sourcesContent":["/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * This shim allows elements written in, or compiled to, ES5 to work on native\n * implementations of Custom Elements v1. It sets new.target to the value of\n * this.constructor so that the native HTMLElement constructor can access the\n * current under-construction element's definition.\n */\n;(function() {\n if (\n // No Reflect, no classes, no need for shim because native custom elements\n // require ES2015 classes or Reflect.\n window.Reflect === undefined ||\n window.customElements === undefined ||\n // The webcomponentsjs custom elements polyfill doesn't require\n // ES2015-compatible construction (`super()` or `Reflect.construct`).\n window.customElements.hasOwnProperty('polyfillWrapFlushCallback')\n ) {\n return\n }\n const BuiltInHTMLElement = HTMLElement\n window.HTMLElement = function HTMLElement() {\n return Reflect.construct(BuiltInHTMLElement, [], this.constructor)\n }\n HTMLElement.prototype = BuiltInHTMLElement.prototype\n HTMLElement.prototype.constructor = HTMLElement\n Object.setPrototypeOf(HTMLElement, BuiltInHTMLElement)\n})()\n\nexport function cssToDom(css) {\n const node = document.createElement('style')\n node.textContent = css\n return node\n}\n\nexport function camelCase(str) {\n return str.replace(/-(\\w)/g, ($, $1) => {\n return $1.toUpperCase()\n })\n}\n\nexport function Fragment(props) {\n return props.children\n}\n\nexport function extend(obj, props) {\n for (let i in props) obj[i] = props[i]\n return obj\n}\n\n/** Invoke or update a ref, depending on whether it is a function or object ref.\n * @param {object|function} [ref=null]\n * @param {any} [value]\n */\nexport function applyRef(ref, value) {\n if (ref != null) {\n if (typeof ref == 'function') ref(value)\n else ref.current = value\n }\n}\n\n/**\n * Call a function asynchronously, as soon as possible. Makes\n * use of HTML Promise to schedule the callback if available,\n * otherwise falling back to `setTimeout` (mainly for IE<11).\n * @type {(callback: function) => void}\n */\nexport const defer =\n typeof Promise == 'function'\n ? Promise.resolve().then.bind(Promise.resolve())\n : setTimeout\n\nexport function isArray(obj) {\n return Object.prototype.toString.call(obj) === '[object Array]'\n}\n\nexport function pathToArr(path) {\n if (typeof path !== 'string' || !path) return []\n // return path.split(/\\.|\\[|\\]/).filter(name => !!name)\n return path\n .replace(/]/g, '')\n .replace(/\\[/g, '.')\n .split('.')\n}\n\nconst hyphenateRE = /\\B([A-Z])/g\nexport function hyphenate(str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase()\n}\n\nexport function capitalize(name) {\n return name\n .replace(/\\-(\\w)/g, function(all, letter) {\n return letter.toUpperCase()\n })\n .replace(/^\\S/, s => s.toUpperCase())\n}\n\nexport function getValByPath(path, current) {\n const arr = pathToArr(path)\n arr.forEach(prop => {\n current = current[prop]\n })\n return current\n}\n\nexport function removeItem(item, arr) {\n if (!arr) return\n for (let i = 0, len = arr.length; i < len; i++) {\n if (arr[i] === item) {\n arr.splice(i, 1)\n break\n }\n }\n}\n\nexport function createStyleSheet(style) {\n const styleSheet = new CSSStyleSheet()\n styleSheet.replaceSync(style)\n return styleSheet\n}\n","import options from './options'\nimport { Fragment } from './util'\n\nconst stack = []\n\nexport function h(nodeName, attributes) {\n let children = [],\n lastSimple,\n child,\n simple,\n i\n for (i = arguments.length; i-- > 2; ) {\n stack.push(arguments[i])\n }\n if (attributes && attributes.children != null) {\n if (!stack.length) stack.push(attributes.children)\n delete attributes.children\n }\n while (stack.length) {\n if ((child = stack.pop()) && child.pop !== undefined) {\n for (i = child.length; i--; ) stack.push(child[i])\n } else {\n if (typeof child === 'boolean') child = null\n\n if ((simple = typeof nodeName !== 'function')) {\n if (child == null) child = ''\n else if (typeof child === 'number') child = String(child)\n else if (typeof child !== 'string') simple = false\n }\n\n if (simple && lastSimple) {\n children[children.length - 1] += child\n } else if (children.length === 0) {\n children = [child]\n } else {\n children.push(child)\n }\n\n lastSimple = simple\n }\n }\n\n if (nodeName === Fragment) {\n return children\n }\n\n const p = {\n nodeName,\n children,\n attributes: attributes == null ? undefined : attributes,\n key: attributes == null ? undefined : attributes.key\n }\n\n // if a \"vnode hook\" is defined, pass every created VNode to it\n if (options.vnode !== undefined) options.vnode(p)\n\n return p\n}\n","import { extend } from '../util'\nimport options from '../options'\n/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node DOM Node to compare\n * @param {VNode} vnode Virtual DOM node to compare\n * @param {boolean} [hydrating=false] If true, ignores component constructors when comparing.\n * @private\n */\nexport function isSameNodeType(node, vnode, hydrating) {\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n return node.splitText !== undefined\n }\n if (typeof vnode.nodeName === 'string') {\n return !node._componentConstructor && isNamedNode(node, vnode.nodeName)\n } else if (typeof vnode.nodeName === 'function') {\n return options.mapping[node.nodeName.toLowerCase()] === vnode.nodeName\n }\n return hydrating || node._componentConstructor === vnode.nodeName\n}\n\n/**\n * Check if an Element has a given nodeName, case-insensitively.\n *\n * @param {Element} node A DOM Element to inspect the name of.\n * @param {String} nodeName Unnormalized name to compare against.\n */\nexport function isNamedNode(node, nodeName) {\n return (\n node.normalizedNodeName === nodeName ||\n node.nodeName.toLowerCase() === nodeName.toLowerCase()\n )\n}\n\n/**\n * Reconstruct Component-style `props` from a VNode.\n * Ensures default/fallback values from `defaultProps`:\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\n *\n * @param {VNode} vnode\n * @returns {Object} props\n */\nexport function getNodeProps(vnode) {\n let props = extend({}, vnode.attributes)\n props.children = vnode.children\n\n let defaultProps = vnode.nodeName.defaultProps\n if (defaultProps !== undefined) {\n for (let i in defaultProps) {\n if (props[i] === undefined) {\n props[i] = defaultProps[i]\n }\n }\n }\n\n return props\n}\n","import { pathToArr } from './util'\n\nexport const extension = {}\n\nexport function extend(name, handler) {\n extension['o-' + name] = handler\n}\n\nexport function set(origin, path, value) {\n const arr = pathToArr(path)\n let current = origin\n for (let i = 0, len = arr.length; i < len; i++) {\n if (i === len - 1) {\n current[arr[i]] = value\n } else {\n current = current[arr[i]]\n }\n }\n}\n\nexport function get(origin, path) {\n const arr = pathToArr(path)\n let current = origin\n for (let i = 0, len = arr.length; i < len; i++) {\n current = current[arr[i]]\n }\n\n return current\n}\n\nfunction eventProxy(e) {\n return this._listeners[e.type](e)\n}\n\nexport function bind(el, type, handler) {\n el._listeners = el._listeners || {}\n el._listeners[type] = handler\n el.addEventListener(type, eventProxy)\n}\n\nexport function unbind(el, type) {\n el.removeEventListener(type, eventProxy)\n}\n","import { IS_NON_DIMENSIONAL } from '../constants'\nimport { applyRef } from '../util'\nimport options from '../options'\nimport { extension } from '../extend'\n\n/**\n * Create an element with the given nodeName.\n * @param {string} nodeName The DOM node to create\n * @param {boolean} [isSvg=false] If `true`, creates an element within the SVG\n * namespace.\n * @returns {Element} The created DOM node\n */\nexport function createNode(nodeName, isSvg, options) {\n /** @type {Element} */\n let node = isSvg\n ? document.createElementNS('http://www.w3.org/2000/svg', nodeName)\n : document.createElement(nodeName, options)\n node.normalizedNodeName = nodeName\n return node\n}\n\n/**\n * Remove a child node from its parent if attached.\n * @param {Node} node The node to remove\n */\nexport function removeNode(node) {\n let parentNode = node.parentNode\n if (parentNode) parentNode.removeChild(node)\n}\n\n/**\n * Set a named attribute on the given Node, with special behavior for some names\n * and event handlers. If `value` is `null`, the attribute/handler will be\n * removed.\n * @param {Element} node An element to mutate\n * @param {string} name The name/key to set, such as an event or attribute name\n * @param {*} old The last value that was set for this name/node pair\n * @param {*} value An attribute value, such as a function to be used as an\n * event handler\n * @param {boolean} isSvg Are we currently diffing inside an svg?\n * @private\n */\nexport function setAccessor(node, name, old, value, isSvg, component) {\n if (name === 'className') name = 'class'\n\n if (name[0] == 'o' && name[1] == '-') {\n if (extension[name]) {\n extension[name](node, value, component)\n }\n } else if (name === 'key') {\n // ignore\n } else if (name === 'ref') {\n applyRef(old, null)\n applyRef(value, node)\n } else if (name === 'class' && !isSvg) {\n node.className = value || ''\n } else if (name === 'style') {\n if (!value || typeof value === 'string' || typeof old === 'string') {\n node.style.cssText = value || ''\n }\n if (value && typeof value === 'object') {\n if (typeof old !== 'string') {\n for (let i in old) if (!(i in value)) node.style[i] = ''\n }\n for (let i in value) {\n node.style[i] =\n typeof value[i] === 'number' && IS_NON_DIMENSIONAL.test(i) === false\n ? value[i] + 'px'\n : value[i]\n }\n }\n } else if (name === 'unsafeHTML') {\n if (value) node.innerHTML = value || ''\n } else if (name === 'dangerouslySetInnerHTML') {\n if (value) node.innerHTML = value.__html || ''\n } else if (name[0] == 'o' && name[1] == 'n') {\n bindEvent(node, name, value, old)\n } else if (node.nodeName === 'INPUT' && name === 'value') {\n node[name] = value == null ? '' : value\n } else if (\n name !== 'list' &&\n name !== 'type' &&\n name !== 'css' &&\n !isSvg &&\n name in node &&\n value !== ''\n ) {\n //value !== '' fix for selected, disabled, checked with pure element\n // Attempt to set a DOM property to the given value.\n // IE & FF throw for certain property-value combinations.\n try {\n node[name] = value == null ? '' : value\n } catch (e) {}\n if ((value == null || value === false) && name != 'spellcheck')\n node.pureRemoveAttribute\n ? node.pureRemoveAttribute(name)\n : node.removeAttribute(name)\n } else {\n let ns = isSvg && name !== (name = name.replace(/^xlink:?/, ''))\n // spellcheck is treated differently than all other boolean values and\n // should not be removed when the value is `false`. See:\n // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-spellcheck\n if (value == null || value === false) {\n if (ns)\n node.removeAttributeNS(\n 'http://www.w3.org/1999/xlink',\n name.toLowerCase()\n )\n else\n node.pureRemoveAttribute\n ? node.pureRemoveAttribute(name)\n : node.removeAttribute(name)\n } else if (typeof value !== 'function') {\n if (ns) {\n node.setAttributeNS(\n 'http://www.w3.org/1999/xlink',\n name.toLowerCase(),\n value\n )\n } else {\n node.pureSetAttribute\n ? node.pureSetAttribute(name, value)\n : node.setAttribute(name, value)\n }\n }\n }\n}\n\n/**\n * Proxy an event to hooked event handlers\n * @param {Event} e The event object from the browser\n * @private\n */\nfunction eventProxy(e) {\n return this._listeners[e.type]((options.event && options.event(e)) || e)\n}\n\nfunction bindEvent(node, name, value, old) {\n let useCapture = name !== (name = name.replace(/Capture$/, ''))\n let nameLower = name.toLowerCase()\n name = (nameLower in node ? nameLower : name).slice(2)\n if (value) {\n if (!old) {\n node.addEventListener(name, eventProxy, useCapture)\n }\n } else {\n node.removeEventListener(name, eventProxy, useCapture)\n }\n ;(node._listeners || (node._listeners = {}))[name] = value\n}\n","import { ATTR_KEY } from '../constants'\nimport { isSameNodeType, isNamedNode } from './index'\nimport { createNode, setAccessor, removeNode } from '../dom/index'\nimport { camelCase, isArray, Fragment } from '../util'\nimport options from '../options'\n\n/** Queue of components that have been mounted and are awaiting componentDidMount */\nexport const mounts = []\n\n/** Diff recursion count, used to track the end of the diff cycle. */\nexport let diffLevel = 0\n\n/** Global flag indicating if the diff is currently within an SVG */\nlet isSvgMode = false\n\n/** Global flag indicating if the diff is performing hydration */\nlet hydrating = false\n\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\n * @param {Element} [dom=null] A DOM node to mutate into the shape of the `vnode`\n * @param {VNode} vnode A VNode (with descendants forming a tree) representing the desired DOM structure\n * @returns {Element} dom The created/mutated element\n * @private\n */\nexport function diff(dom, vnode, parent, component, updateSelf) {\n // first render return undefined\n if (!dom && !vnode) return\n // diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\n let ret\n if (!diffLevel++) {\n // when first starting the diff, check if we're diffing an SVG or within an SVG\n isSvgMode = parent != null && parent.ownerSVGElement !== undefined\n\n // hydration is indicated by the existing element to be diffed not having a prop cache\n hydrating = dom != null && !(ATTR_KEY in dom)\n }\n if (vnode && vnode.nodeName === Fragment) {\n vnode = vnode.children\n }\n if (isArray(vnode)) {\n if (parent) {\n // don't use css and props.css when using h.f\n // diff node list and vnode list\n innerDiffNode(parent, vnode, hydrating, component, updateSelf)\n } else {\n // connectedCallback 的时候 parent 为 null\n ret = []\n vnode.forEach((item, index) => {\n let ele = idiff(index === 0 ? dom : null, item, component, updateSelf)\n // 返回数组的情况下,在 WeElement 中进行了 shadowRoot.appendChild\n // 所有不会出现 vnode index 大于 0 丢失的情况\n ret.push(ele)\n })\n }\n } else {\n if (isArray(dom)) {\n dom.forEach((one, index) => {\n if (index === 0) {\n ret = idiff(one, vnode, component, updateSelf)\n } else {\n recollectNodeTree(one, false)\n }\n })\n } else {\n ret = idiff(dom, vnode, component, updateSelf)\n }\n // append the element if its a new parent\n if (parent && ret.parentNode !== parent) parent.appendChild(ret)\n }\n\n // diffLevel being reduced to 0 means we're exiting the diff\n if (!--diffLevel) {\n hydrating = false\n // invoke queued componentDidMount lifecycle methods\n }\n\n return ret\n}\n\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\nfunction idiff(dom, vnode, component, updateSelf) {\n if (dom && vnode && dom.props) {\n dom.props.children = vnode.children\n }\n let out = dom,\n prevSvgMode = isSvgMode\n\n // empty values (null, undefined, booleans) render as empty Text nodes\n if (vnode == null || typeof vnode === 'boolean') vnode = ''\n\n // Fast case: Strings & Numbers create/update Text nodes.\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n // update if it's already a Text node:\n if (\n dom &&\n dom.splitText !== undefined &&\n dom.parentNode &&\n (!dom._component || component)\n ) {\n /* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\n if (dom.nodeValue != vnode) {\n dom.nodeValue = vnode\n }\n } else {\n // it wasn't a Text node: replace it with one and recycle the old Element\n out = document.createTextNode(vnode)\n if (dom) {\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom)\n recollectNodeTree(dom, true)\n }\n }\n\n out[ATTR_KEY] = true\n\n return out\n }\n\n // If the VNode represents a Component, perform a component diff:\n let vnodeName = vnode.nodeName\n if (typeof vnodeName === 'function') {\n for (let key in options.mapping) {\n if (options.mapping[key] === vnodeName) {\n vnodeName = key\n vnode.nodeName = key\n break\n }\n }\n }\n // Tracks entering and exiting SVG namespace when descending through the tree.\n isSvgMode =\n vnodeName === 'svg'\n ? true\n : vnodeName === 'foreignObject'\n ? false\n : isSvgMode\n\n // If there's no existing element or it's the wrong type, create a new one:\n vnodeName = String(vnodeName)\n if (!dom || !isNamedNode(dom, vnodeName)) {\n out = createNode(vnodeName, isSvgMode)\n\n if (dom) {\n // move children into the replacement node\n while (dom.firstChild) out.appendChild(dom.firstChild)\n\n // if the previous Element was mounted into the DOM, replace it inline\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom)\n\n // recycle the old element (skips non-Element node types)\n recollectNodeTree(dom, true)\n }\n }\n\n let fc = out.firstChild,\n props = out[ATTR_KEY],\n vchildren = vnode.children\n\n if (props == null) {\n props = out[ATTR_KEY] = {}\n for (let a = out.attributes, i = a.length; i--; )\n props[a[i].name] = a[i].value\n }\n\n // Optimization: fast-path for elements containing a single TextNode:\n if (\n !hydrating &&\n vchildren &&\n vchildren.length === 1 &&\n typeof vchildren[0] === 'string' &&\n fc != null &&\n fc.splitText !== undefined &&\n fc.nextSibling == null\n ) {\n if (fc.nodeValue != vchildren[0]) {\n fc.nodeValue = vchildren[0]\n }\n }\n // otherwise, if there are existing or new children, diff them:\n else if ((vchildren && vchildren.length) || fc != null) {\n if (!(out.constructor.is == 'WeElement' && out.constructor.noSlot)) {\n innerDiffNode(\n out,\n vchildren,\n hydrating || props.dangerouslySetInnerHTML != null,\n component,\n updateSelf\n )\n }\n }\n\n // Apply attributes/props from VNode to the DOM Element:\n diffAttributes(out, vnode.attributes, props, component, updateSelf)\n if (out.props) {\n out.props.children = vnode.children\n }\n // restore previous SVG mode: (in case we're exiting an SVG namespace)\n isSvgMode = prevSvgMode\n\n return out\n}\n\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\n * @param {Element} dom Element whose children should be compared & mutated\n * @param {Array} vchildren Array of VNodes to compare to `dom.childNodes`\n * @param {Boolean} isHydrating If `true`, consumes externally created elements similar to hydration\n */\nfunction innerDiffNode(dom, vchildren, isHydrating, component, updateSelf) {\n let originalChildren = dom.childNodes,\n children = [],\n keyed = {},\n keyedLen = 0,\n min = 0,\n len = originalChildren.length,\n childrenLen = 0,\n vlen = vchildren ? vchildren.length : 0,\n j,\n c,\n f,\n vchild,\n child\n\n // Build up a map of keyed children and an Array of unkeyed children:\n if (len !== 0) {\n for (let i = 0; i < len; i++) {\n let child = originalChildren[i],\n props = child[ATTR_KEY],\n key =\n vlen && props\n ? child._component\n ? child._component.__key\n : props.key\n : null\n if (key != null) {\n keyedLen++\n keyed[key] = child\n } else if (\n props ||\n (child.splitText !== undefined\n ? isHydrating\n ? child.nodeValue.trim()\n : true\n : isHydrating)\n ) {\n children[childrenLen++] = child\n }\n }\n }\n\n if (vlen !== 0) {\n for (let i = 0; i < vlen; i++) {\n vchild = vchildren[i]\n child = null\n\n if (vchild) {\n // attempt to find a node based on key matching\n let key = vchild.key\n if (key != null) {\n if (keyedLen && keyed[key] !== undefined) {\n child = keyed[key]\n keyed[key] = undefined\n keyedLen--\n }\n }\n // attempt to pluck a node of the same type from the existing children\n else if (!child && min < childrenLen) {\n for (j = min; j < childrenLen; j++) {\n if (\n children[j] !== undefined &&\n isSameNodeType((c = children[j]), vchild, isHydrating)\n ) {\n child = c\n children[j] = undefined\n if (j === childrenLen - 1) childrenLen--\n if (j === min) min++\n break\n }\n }\n }\n }\n\n // morph the matched/found/created DOM child to match vchild (deep)\n child = idiff(child, vchild, component, updateSelf)\n\n f = originalChildren[i]\n if (child && child !== dom && child !== f) {\n if (f == null) {\n dom.appendChild(child)\n } else if (child === f.nextSibling) {\n removeNode(f)\n } else {\n dom.insertBefore(child, f)\n }\n }\n }\n }\n\n // remove unused keyed children:\n if (keyedLen) {\n for (let i in keyed)\n if (keyed[i] !== undefined) recollectNodeTree(keyed[i], false)\n }\n\n // remove orphaned unkeyed children:\n while (min <= childrenLen) {\n if ((child = children[childrenLen--]) !== undefined)\n recollectNodeTree(child, false)\n }\n}\n\n/** Recursively recycle (or just unmount) a node and its descendants.\n * @param {Node} node DOM node to start unmount/removal from\n * @param {Boolean} [unmountOnly=false] If `true`, only triggers unmount lifecycle, skips removal\n */\nexport function recollectNodeTree(node, unmountOnly) {\n // If the node's VNode had a ref function, invoke it with null here.\n // (this is part of the React spec, and smart for unsetting references)\n if (node[ATTR_KEY] != null && node[ATTR_KEY].ref) {\n if (typeof node[ATTR_KEY].ref === 'function') {\n node[ATTR_KEY].ref(null)\n } else if (node[ATTR_KEY].ref.current) {\n node[ATTR_KEY].ref.current = null\n }\n }\n\n if (unmountOnly === false || node[ATTR_KEY] == null) {\n removeNode(node)\n }\n\n removeChildren(node)\n}\n\n/** Recollect/unmount all children.\n * - we use .lastChild here because it causes less reflow than .firstChild\n * - it's also cheaper than accessing the .childNodes Live NodeList\n */\nexport function removeChildren(node) {\n node = node.lastChild\n while (node) {\n let next = node.previousSibling\n recollectNodeTree(node, true)\n node = next\n }\n}\n\n/** Apply differences in attributes from a VNode to the given DOM Element.\n * @param {Element} dom Element with attributes to diff `attrs` against\n * @param {Object} attrs The desired end-state key-value attribute pairs\n * @param {Object} old Current/previous attributes (from previous VNode or element's prop cache)\n */\nfunction diffAttributes(dom, attrs, old, component, updateSelf) {\n let name\n //let update = false\n let isWeElement = dom.update\n let oldClone\n if (dom.receiveProps) {\n oldClone = Object.assign({}, old)\n }\n // remove attributes no longer present on the vnode by setting them to undefined\n for (name in old) {\n if (!(attrs && attrs[name] != null) && old[name] != null) {\n setAccessor(\n dom,\n name,\n old[name],\n (old[name] = undefined),\n isSvgMode,\n component\n )\n if (isWeElement) {\n delete dom.props[name]\n //update = true\n }\n }\n }\n\n // add new & update changed attributes\n for (name in attrs) {\n if (isWeElement && typeof attrs[name] === 'object' && name !== 'ref') {\n if (name === 'style') {\n setAccessor(\n dom,\n name,\n old[name],\n (old[name] = attrs[name]),\n isSvgMode,\n component\n )\n }\n let ccName = camelCase(name)\n dom.props[ccName] = old[ccName] = attrs[name]\n //update = true\n } else if (\n name !== 'children' &&\n (!(name in old) ||\n attrs[name] !==\n (name === 'value' || name === 'checked' ? dom[name] : old[name]))\n ) {\n setAccessor(dom, name, old[name], attrs[name], isSvgMode, component)\n //fix lazy load props missing\n if (dom.nodeName.indexOf('-') !== -1) {\n dom.props = dom.props || {}\n let ccName = camelCase(name)\n dom.props[ccName] = old[ccName] = attrs[name]\n //update = true\n } else {\n old[name] = attrs[name]\n }\n }\n }\n\n if (isWeElement && !updateSelf && dom.parentNode) {\n //__hasChildren is not accuracy when it was empty at first, so add dom.children.length > 0 condition\n //if (update || dom.__hasChildren || dom.children.length > 0 || (dom.store && !dom.store.data)) {\n if (dom.receiveProps(dom.props, oldClone) !== false) {\n dom.update()\n }\n //}\n }\n}\n","/*!\n * weakmap-polyfill v2.0.4 - ECMAScript6 WeakMap polyfill\n * https://github.com/polygonplanet/weakmap-polyfill\n * Copyright (c) 2015-2021 polygonplanet \n * @license MIT\n */\n\n(function(self) {\n 'use strict';\n\n if (self.WeakMap) {\n return;\n }\n\n var hasOwnProperty = Object.prototype.hasOwnProperty;\n var hasDefine = Object.defineProperty && (function() {\n try {\n // Avoid IE8's broken Object.defineProperty\n return Object.defineProperty({}, 'x', { value: 1 }).x === 1;\n } catch (e) {}\n })();\n\n var defineProperty = function(object, name, value) {\n if (hasDefine) {\n Object.defineProperty(object, name, {\n configurable: true,\n writable: true,\n value: value\n });\n } else {\n object[name] = value;\n }\n };\n\n self.WeakMap = (function() {\n\n // ECMA-262 23.3 WeakMap Objects\n function WeakMap() {\n if (this === void 0) {\n throw new TypeError(\"Constructor WeakMap requires 'new'\");\n }\n\n defineProperty(this, '_id', genId('_WeakMap'));\n\n // ECMA-262 23.3.1.1 WeakMap([iterable])\n if (arguments.length > 0) {\n // Currently, WeakMap `iterable` argument is not supported\n throw new TypeError('WeakMap iterable is not supported');\n }\n }\n\n // ECMA-262 23.3.3.2 WeakMap.prototype.delete(key)\n defineProperty(WeakMap.prototype, 'delete', function(key) {\n checkInstance(this, 'delete');\n\n if (!isObject(key)) {\n return false;\n }\n\n var entry = key[this._id];\n if (entry && entry[0] === key) {\n delete key[this._id];\n return true;\n }\n\n return false;\n });\n\n // ECMA-262 23.3.3.3 WeakMap.prototype.get(key)\n defineProperty(WeakMap.prototype, 'get', function(key) {\n checkInstance(this, 'get');\n\n if (!isObject(key)) {\n return void 0;\n }\n\n var entry = key[this._id];\n if (entry && entry[0] === key) {\n return entry[1];\n }\n\n return void 0;\n });\n\n // ECMA-262 23.3.3.4 WeakMap.prototype.has(key)\n defineProperty(WeakMap.prototype, 'has', function(key) {\n checkInstance(this, 'has');\n\n if (!isObject(key)) {\n return false;\n }\n\n var entry = key[this._id];\n if (entry && entry[0] === key) {\n return true;\n }\n\n return false;\n });\n\n // ECMA-262 23.3.3.5 WeakMap.prototype.set(key, value)\n defineProperty(WeakMap.prototype, 'set', function(key, value) {\n checkInstance(this, 'set');\n\n if (!isObject(key)) {\n throw new TypeError('Invalid value used as weak map key');\n }\n\n var entry = key[this._id];\n if (entry && entry[0] === key) {\n entry[1] = value;\n return this;\n }\n\n defineProperty(key, this._id, [key, value]);\n return this;\n });\n\n function checkInstance(x, methodName) {\n if (!isObject(x) || !hasOwnProperty.call(x, '_id')) {\n throw new TypeError(\n methodName + ' method called on incompatible receiver ' +\n typeof x\n );\n }\n }\n\n function genId(prefix) {\n return prefix + '_' + rand() + '.' + rand();\n }\n\n function rand() {\n return Math.random().toString().substring(2);\n }\n\n defineProperty(WeakMap, '_polyfill', true);\n return WeakMap;\n })();\n\n function isObject(x) {\n return Object(x) === x;\n }\n\n})(\n typeof globalThis !== 'undefined' ? globalThis :\n typeof self !== 'undefined' ? self :\n typeof window !== 'undefined' ? window :\n typeof global !== 'undefined' ? global : this\n);\n","import {\n cssToDom,\n isArray,\n hyphenate,\n getValByPath,\n capitalize,\n createStyleSheet\n} from './util'\nimport { diff } from './vdom/diff'\nimport options from './options'\nimport 'weakmap-polyfill'\n\nlet id = 0\n\nconst adoptedStyleSheetsMap = new WeakMap()\nexport default class WeElement extends HTMLElement {\n static is = 'WeElement'\n\n constructor() {\n super()\n // fix lazy load props missing\n this.props = Object.assign({}, this.constructor.defaultProps, this.props)\n this.elementId = id++\n this.computed = {}\n this.isInstalled = false\n }\n\n connectedCallback() {\n let p = this.parentNode\n while (p && !this.store) {\n this.store = p.store\n p = p.parentNode || p.host\n }\n\n if (this.inject) {\n this.injection = {}\n p = this.parentNode\n let provide\n while (p && !provide) {\n provide = p.provide\n p = p.parentNode || p.host\n }\n if (provide) {\n this.inject.forEach(injectKey => {\n this.injection[injectKey] = provide[injectKey]\n })\n } else {\n throw 'The provide prop was not found on the parent node or the provide type is incorrect.'\n }\n }\n\n this.attrsToProps()\n\n this.beforeInstall()\n this.install()\n this.afterInstall()\n\n let shadowRoot\n if (this.constructor.isLightDom) {\n shadowRoot = this\n } else {\n if (!this.shadowRoot) {\n shadowRoot = this.attachShadow({\n mode: 'open'\n })\n } else {\n shadowRoot = this.shadowRoot\n let fc\n while ((fc = shadowRoot.firstChild)) {\n shadowRoot.removeChild(fc)\n }\n }\n }\n\n if (!adoptedStyleSheetsMap.has(this.constructor)) {\n const css = this.constructor.css\n if (css) {\n let styleSheets = []\n if (typeof css === 'string') {\n styleSheets = [createStyleSheet(css)]\n } else if (isArray(css)) {\n styleSheets = css.map(styleSheet => {\n if (typeof styleSheet === 'string') {\n return createStyleSheet(styleSheet)\n } else if (\n styleSheet.default &&\n typeof styleSheet.default === 'string'\n ) {\n return createStyleSheet(styleSheet.default)\n } else {\n return styleSheet\n }\n })\n } else if (css.default && typeof css.default === 'string') {\n styleSheets = [createStyleSheet(css.default)]\n } else {\n styleSheets = [css]\n }\n shadowRoot.adoptedStyleSheets = styleSheets\n adoptedStyleSheetsMap.set(this.constructor, styleSheets)\n }\n } else {\n shadowRoot.adoptedStyleSheets = adoptedStyleSheetsMap.get(\n this.constructor\n )\n }\n\n this.beforeRender()\n options.afterInstall && options.afterInstall(this)\n\n const rendered = this.render(this.props, this.store)\n\n this.rootNode = diff(null, rendered, null, this)\n this.rendered()\n\n if (this.css) {\n shadowRoot.appendChild(\n cssToDom(typeof this.css === 'function' ? this.css() : this.css)\n )\n }\n\n if (this.props.css) {\n this._customStyleElement = cssToDom(this.props.css)\n this._customStyleContent = this.props.css\n shadowRoot.appendChild(this._customStyleElement)\n }\n\n if (isArray(this.rootNode)) {\n this.rootNode.forEach(function(item) {\n shadowRoot.appendChild(item)\n })\n } else {\n this.rootNode && shadowRoot.appendChild(this.rootNode)\n }\n this.installed()\n this.isInstalled = true\n }\n\n disconnectedCallback() {\n this.uninstall()\n this.isInstalled = false\n }\n\n update(ignoreAttrs, updateSelf) {\n this._willUpdate = true\n this.beforeUpdate()\n this.beforeRender()\n //fix null !== undefined\n if (this._customStyleContent != this.props.css) {\n this._customStyleContent = this.props.css\n if (this._customStyleElement) {\n this._customStyleElement.textContent = this._customStyleContent\n } else {\n // 当 prop css 开始没有值,后来有值\n this._customStyleElement = cssToDom(this.props.css)\n this.shadowRoot.appendChild(this._customStyleElement)\n }\n }\n this.attrsToProps(ignoreAttrs)\n\n const rendered = this.render(this.props, this.store)\n this.rendered()\n\n this.rootNode = diff(\n this.rootNode,\n rendered,\n this.constructor.isLightDom ? this : this.shadowRoot,\n this,\n updateSelf\n )\n this._willUpdate = false\n this.updated()\n }\n\n forceUpdate() {\n this.update(true)\n }\n\n updateProps(obj) {\n Object.keys(obj).forEach(key => {\n this.props[key] = obj[key]\n if (this.prevProps) {\n this.prevProps[key] = obj[key]\n }\n })\n this.forceUpdate()\n }\n\n updateSelf(ignoreAttrs) {\n this.update(ignoreAttrs, true)\n }\n\n removeAttribute(key) {\n super.removeAttribute(key)\n //Avoid executing removeAttribute methods before connectedCallback\n this.isInstalled && this.update()\n }\n\n setAttribute(key, val) {\n if (val && typeof val === 'object') {\n super.setAttribute(key, JSON.stringify(val))\n } else {\n super.setAttribute(key, val)\n }\n //Avoid executing setAttribute methods before connectedCallback\n this.isInstalled && this.update()\n }\n\n pureRemoveAttribute(key) {\n super.removeAttribute(key)\n }\n\n pureSetAttribute(key, val) {\n super.setAttribute(key, val)\n }\n\n attrsToProps(ignoreAttrs) {\n if (\n ignoreAttrs ||\n (this.store && this.store.ignoreAttrs) ||\n this.props.ignoreAttrs\n )\n return\n const ele = this\n ele.props['css'] = ele.getAttribute('css')\n const attrs = this.constructor.propTypes\n if (!attrs) return\n Object.keys(attrs).forEach(key => {\n const types = isArray(attrs[key]) ? attrs[key] : [attrs[key]]\n const val = ele.getAttribute(hyphenate(key))\n if (val !== null) {\n for (let i = 0; i < types.length; i++) {\n const type = types[i]\n let matched = false\n switch (type) {\n case String:\n ele.props[key] = val\n matched = true\n break\n case Number:\n ele.props[key] = Number(val)\n matched = true\n break\n case Boolean:\n if (val === 'false' || val === '0') {\n ele.props[key] = false\n } else {\n ele.props[key] = true\n }\n matched = true\n break\n case Array:\n case Object:\n if (val[0] === ':') {\n ele.props[key] = getValByPath(val.substr(1), Omi.$)\n } else {\n try {\n ele.props[key] = JSON.parse(val)\n } catch (e) {\n console.warn(\n `The ${key} object prop does not comply with the JSON specification, the incorrect string is [${val}].`\n )\n }\n }\n matched = true\n break\n }\n if (matched) break\n }\n } else {\n if (\n ele.constructor.defaultProps &&\n ele.constructor.defaultProps.hasOwnProperty(key)\n ) {\n ele.props[key] = ele.constructor.defaultProps[key]\n } else {\n ele.props[key] = null\n }\n }\n })\n }\n\n fire(name, data) {\n const handler = this.props[`on${capitalize(name)}`]\n if (handler) {\n handler(\n new CustomEvent(name, {\n detail: data\n })\n )\n } else {\n this.dispatchEvent(\n new CustomEvent(name, {\n detail: data\n })\n )\n }\n }\n\n beforeInstall() {}\n\n install() {}\n\n afterInstall() {}\n\n installed() {}\n\n uninstall() {}\n\n beforeUpdate() {}\n\n updated() {}\n\n beforeRender() {}\n\n rendered() {}\n\n receiveProps() {}\n}\n","import { diff } from './vdom/diff'\n\nexport function render(vnode, parent, store) {\n parent = typeof parent === 'string' ? document.querySelector(parent) : parent\n if (store) {\n parent.store = store\n }\n return diff(null, vnode, parent, false)\n}\n","import WeElement from './we-element'\nimport options from './options'\n\nconst storeHelpers = ['use', 'useSelf']\n\nexport function define(name, ctor, config) {\n if (customElements.get(name)) {\n return\n }\n if (options.mapping[name]) {\n return\n }\n if (ctor.is === 'WeElement') {\n customElements.define(name, ctor)\n options.mapping[name] = ctor\n } else {\n if (typeof config === 'string') {\n config = { css: config }\n } else {\n config = config || {}\n }\n\n class Ele extends WeElement {\n static css = config.css\n\n static propTypes = config.propTypes\n\n static defaultProps = config.defaultProps\n\n static isLightDom = config.isLightDom\n\n compute = config.compute\n\n render() {\n return ctor.call(this, this)\n }\n }\n\n for (let key in config) {\n if (typeof config[key] === 'function') {\n Ele.prototype[key] = function() {\n return config[key].apply(this, arguments)\n }\n }\n }\n\n storeHelpers.forEach(func => {\n if (config[func] && config[func] !== 'function') {\n Ele.prototype[func] = function() {\n return config[func]\n }\n }\n })\n\n customElements.define(name, Ele)\n options.mapping[name] = Ele\n }\n}\n","import { extend } from './util'\nimport { h } from './h'\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\n * @param {VNode} vnode The virtual DOM element to clone\n * @param {Object} props Attributes/props to add when cloning\n * @param {VNode} rest Any additional arguments will be used as replacement children.\n */\nexport function cloneElement(vnode, props) {\n return h(\n vnode.nodeName,\n extend(extend({}, vnode.attributes), props),\n arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children\n )\n}\n","export function getHost(ele) {\n let root = ele.getRootNode()\n return root && root.host\n}\n","/**\n * classNames based on https://github.com/JedWatson/classnames\n * by Jed Watson\n * Licensed under the MIT License\n * https://github.com/JedWatson/classnames/blob/master/LICENSE\n * modified by dntzhang\n */\n\nvar hasOwn = {}.hasOwnProperty\n\nexport function classNames() {\n var classes = []\n\n for (var i = 0; i < arguments.length; i++) {\n var arg = arguments[i]\n if (!arg) continue\n\n var argType = typeof arg\n\n if (argType === 'string' || argType === 'number') {\n classes.push(arg)\n } else if (Array.isArray(arg) && arg.length) {\n var inner = classNames.apply(null, arg)\n if (inner) {\n classes.push(inner)\n }\n } else if (argType === 'object') {\n for (var key in arg) {\n if (hasOwn.call(arg, key) && arg[key]) {\n classes.push(key)\n }\n }\n }\n }\n\n return classes.join(' ')\n}\n\nexport function extractClass() {\n const [props, ...args] = Array.prototype.slice.call(arguments, 0)\n if (props.class) {\n args.unshift(props.class)\n delete props.class\n } else if (props.className) {\n args.unshift(props.className)\n delete props.className\n }\n if (args.length > 0) {\n return { class: classNames.apply(null, args) }\n }\n}\n","(function () {\n 'use strict';\n\n if (typeof document === 'undefined' || 'adoptedStyleSheets' in document) { return; }\n\n var hasShadyCss = 'ShadyCSS' in window && !ShadyCSS.nativeShadow;\n var bootstrapper = document.implementation.createHTMLDocument('boot');\n var closedShadowRootRegistry = new WeakMap();\n var _DOMException = typeof DOMException === 'object' ? Error : DOMException;\n\n var defineProperty = Object.defineProperty;\n var forEach = Array.prototype.forEach;\n var importPattern = /@import.+?;?$/gm;\n function rejectImports(contents) {\n var _contents = contents.replace(importPattern, '');\n if (_contents !== contents) {\n console.warn('@import rules are not allowed here. See https://github.com/WICG/construct-stylesheets/issues/119#issuecomment-588352418');\n }\n return _contents.trim();\n }\n function clearRules(sheet) {\n for (var i = 0; i < sheet.cssRules.length; i++) {\n sheet.deleteRule(0);\n }\n }\n function insertAllRules(from, to) {\n forEach.call(from.cssRules, function (rule, i) {\n to.insertRule(rule.cssText, i);\n });\n }\n function isElementConnected(element) {\n return 'isConnected' in element\n ? element.isConnected\n : document.contains(element);\n }\n function unique(arr) {\n return arr.filter(function (value, index) { return arr.indexOf(value) === index; });\n }\n function diff(arr1, arr2) {\n return arr1.filter(function (value) { return arr2.indexOf(value) === -1; });\n }\n function removeNode(node) {\n node.parentNode.removeChild(node);\n }\n function getShadowRoot(element) {\n return element.shadowRoot || closedShadowRootRegistry.get(element);\n }\n\n var cssStyleSheetMethods = [\n 'addImport',\n 'addPageRule',\n 'addRule',\n 'deleteRule',\n 'insertRule',\n 'removeImport',\n 'removeRule',\n ];\n var NonConstructedStyleSheet = CSSStyleSheet;\n var nonConstructedProto = NonConstructedStyleSheet.prototype;\n nonConstructedProto.replace = function () {\n return Promise.reject(new _DOMException(\"Can't call replace on non-constructed CSSStyleSheets.\"));\n };\n nonConstructedProto.replaceSync = function () {\n throw new _DOMException(\"Failed to execute 'replaceSync' on 'CSSStyleSheet': Can't call replaceSync on non-constructed CSSStyleSheets.\");\n };\n function isCSSStyleSheetInstance(instance) {\n return typeof instance === 'object'\n ? proto$2.isPrototypeOf(instance) ||\n nonConstructedProto.isPrototypeOf(instance)\n : false;\n }\n function isNonConstructedStyleSheetInstance(instance) {\n return typeof instance === 'object'\n ? nonConstructedProto.isPrototypeOf(instance)\n : false;\n }\n var $basicStyleSheet = new WeakMap();\n var $locations = new WeakMap();\n var $adoptersByLocation = new WeakMap();\n function addAdopterLocation(sheet, location) {\n var adopter = document.createElement('style');\n $adoptersByLocation.get(sheet).set(location, adopter);\n $locations.get(sheet).push(location);\n return adopter;\n }\n function getAdopterByLocation(sheet, location) {\n return $adoptersByLocation.get(sheet).get(location);\n }\n function removeAdopterLocation(sheet, location) {\n $adoptersByLocation.get(sheet).delete(location);\n $locations.set(sheet, $locations.get(sheet).filter(function (_location) { return _location !== location; }));\n }\n function restyleAdopter(sheet, adopter) {\n requestAnimationFrame(function () {\n clearRules(adopter.sheet);\n insertAllRules($basicStyleSheet.get(sheet), adopter.sheet);\n });\n }\n function checkInvocationCorrectness(self) {\n if (!$basicStyleSheet.has(self)) {\n throw new TypeError('Illegal invocation');\n }\n }\n function ConstructedStyleSheet() {\n var self = this;\n var style = document.createElement('style');\n bootstrapper.body.appendChild(style);\n $basicStyleSheet.set(self, style.sheet);\n $locations.set(self, []);\n $adoptersByLocation.set(self, new WeakMap());\n }\n var proto$2 = ConstructedStyleSheet.prototype;\n proto$2.replace = function replace(contents) {\n try {\n this.replaceSync(contents);\n return Promise.resolve(this);\n }\n catch (e) {\n return Promise.reject(e);\n }\n };\n proto$2.replaceSync = function replaceSync(contents) {\n checkInvocationCorrectness(this);\n if (typeof contents === 'string') {\n var self_1 = this;\n var style = $basicStyleSheet.get(self_1).ownerNode;\n style.textContent = rejectImports(contents);\n $basicStyleSheet.set(self_1, style.sheet);\n $locations.get(self_1).forEach(function (location) {\n if (location.isConnected()) {\n restyleAdopter(self_1, getAdopterByLocation(self_1, location));\n }\n });\n }\n };\n defineProperty(proto$2, 'cssRules', {\n configurable: true,\n enumerable: true,\n get: function cssRules() {\n checkInvocationCorrectness(this);\n return $basicStyleSheet.get(this).cssRules;\n },\n });\n cssStyleSheetMethods.forEach(function (method) {\n proto$2[method] = function () {\n var self = this;\n checkInvocationCorrectness(self);\n var args = arguments;\n var basic = $basicStyleSheet.get(self);\n var locations = $locations.get(self);\n var result = basic[method].apply(basic, args);\n locations.forEach(function (location) {\n if (location.isConnected()) {\n var sheet = getAdopterByLocation(self, location).sheet;\n sheet[method].apply(sheet, args);\n }\n });\n return result;\n };\n });\n defineProperty(ConstructedStyleSheet, Symbol.hasInstance, {\n configurable: true,\n value: isCSSStyleSheetInstance,\n });\n\n var defaultObserverOptions = {\n childList: true,\n subtree: true,\n };\n var locations = new WeakMap();\n function getAssociatedLocation(element) {\n var location = locations.get(element);\n if (!location) {\n location = new Location(element);\n locations.set(element, location);\n }\n return location;\n }\n function attachAdoptedStyleSheetProperty(constructor) {\n defineProperty(constructor.prototype, 'adoptedStyleSheets', {\n configurable: true,\n enumerable: true,\n get: function () {\n return getAssociatedLocation(this).sheets;\n },\n set: function (sheets) {\n getAssociatedLocation(this).update(sheets);\n },\n });\n }\n function traverseWebComponents(node, callback) {\n var iter = document.createNodeIterator(node, NodeFilter.SHOW_ELEMENT, function (foundNode) {\n return getShadowRoot(foundNode)\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_REJECT;\n },\n null, false);\n for (var next = void 0; (next = iter.nextNode());) {\n callback(getShadowRoot(next));\n }\n }\n var $element = new WeakMap();\n var $uniqueSheets = new WeakMap();\n var $observer = new WeakMap();\n function isExistingAdopter(self, element) {\n return (element instanceof HTMLStyleElement &&\n $uniqueSheets.get(self).some(function (sheet) { return getAdopterByLocation(sheet, self); }));\n }\n function getAdopterContainer(self) {\n var element = $element.get(self);\n return element instanceof Document ? element.body : element;\n }\n function adopt(self) {\n var styleList = document.createDocumentFragment();\n var sheets = $uniqueSheets.get(self);\n var observer = $observer.get(self);\n var container = getAdopterContainer(self);\n observer.disconnect();\n sheets.forEach(function (sheet) {\n styleList.appendChild(getAdopterByLocation(sheet, self) || addAdopterLocation(sheet, self));\n });\n container.insertBefore(styleList, null);\n observer.observe(container, defaultObserverOptions);\n sheets.forEach(function (sheet) {\n restyleAdopter(sheet, getAdopterByLocation(sheet, self));\n });\n }\n function Location(element) {\n var self = this;\n self.sheets = [];\n $element.set(self, element);\n $uniqueSheets.set(self, []);\n $observer.set(self, new MutationObserver(function (mutations, observer) {\n if (!document) {\n observer.disconnect();\n return;\n }\n mutations.forEach(function (mutation) {\n if (!hasShadyCss) {\n forEach.call(mutation.addedNodes, function (node) {\n if (!(node instanceof Element)) {\n return;\n }\n traverseWebComponents(node, function (root) {\n getAssociatedLocation(root).connect();\n });\n });\n }\n forEach.call(mutation.removedNodes, function (node) {\n if (!(node instanceof Element)) {\n return;\n }\n if (isExistingAdopter(self, node)) {\n adopt(self);\n }\n if (!hasShadyCss) {\n traverseWebComponents(node, function (root) {\n getAssociatedLocation(root).disconnect();\n });\n }\n });\n });\n }));\n }\n var proto$1 = Location.prototype;\n proto$1.isConnected = function isConnected() {\n var element = $element.get(this);\n return element instanceof Document\n ? element.readyState !== 'loading'\n : isElementConnected(element.host);\n };\n proto$1.connect = function connect() {\n var container = getAdopterContainer(this);\n $observer.get(this).observe(container, defaultObserverOptions);\n if ($uniqueSheets.get(this).length > 0) {\n adopt(this);\n }\n traverseWebComponents(container, function (root) {\n getAssociatedLocation(root).connect();\n });\n };\n proto$1.disconnect = function disconnect() {\n $observer.get(this).disconnect();\n };\n proto$1.update = function update(sheets) {\n var self = this;\n var locationType = $element.get(self) === document ? 'Document' : 'ShadowRoot';\n if (!Array.isArray(sheets)) {\n throw new TypeError(\"Failed to set the 'adoptedStyleSheets' property on \" + locationType + \": Iterator getter is not callable.\");\n }\n if (!sheets.every(isCSSStyleSheetInstance)) {\n throw new TypeError(\"Failed to set the 'adoptedStyleSheets' property on \" + locationType + \": Failed to convert value to 'CSSStyleSheet'\");\n }\n if (sheets.some(isNonConstructedStyleSheetInstance)) {\n throw new TypeError(\"Failed to set the 'adoptedStyleSheets' property on \" + locationType + \": Can't adopt non-constructed stylesheets\");\n }\n self.sheets = sheets;\n var oldUniqueSheets = $uniqueSheets.get(self);\n var uniqueSheets = unique(sheets);\n var removedSheets = diff(oldUniqueSheets, uniqueSheets);\n removedSheets.forEach(function (sheet) {\n removeNode(getAdopterByLocation(sheet, self));\n removeAdopterLocation(sheet, self);\n });\n $uniqueSheets.set(self, uniqueSheets);\n if (self.isConnected() && uniqueSheets.length > 0) {\n adopt(self);\n }\n };\n\n window.CSSStyleSheet = ConstructedStyleSheet;\n attachAdoptedStyleSheetProperty(Document);\n if ('ShadowRoot' in window) {\n attachAdoptedStyleSheetProperty(ShadowRoot);\n var proto = Element.prototype;\n var attach_1 = proto.attachShadow;\n proto.attachShadow = function attachShadow(init) {\n var root = attach_1.call(this, init);\n if (init.mode === 'closed') {\n closedShadowRootRegistry.set(this, root);\n }\n return root;\n };\n }\n var documentLocation = getAssociatedLocation(document);\n if (documentLocation.isConnected()) {\n documentLocation.connect();\n }\n else {\n document.addEventListener('DOMContentLoaded', documentLocation.connect.bind(documentLocation));\n }\n\n}());\n","function getGlobal() {\n if (\n typeof global !== 'object' ||\n !global ||\n global.Math !== Math ||\n global.Array !== Array\n ) {\n return (\n self ||\n window ||\n global ||\n (function() {\n return this\n })()\n )\n }\n return global\n}\n\n/** Global options\n * @public\n * @namespace options {Object}\n */\nexport default {\n store: null,\n root: getGlobal(),\n mapping: {}\n}\n","export function o(obj) {\n return JSON.stringify(obj)\n}\n","import { h, h as createElement } from './h'\nimport options from './options'\nimport WeElement from './we-element'\nimport { render } from './render'\nimport { define } from './define'\nimport { tag } from './tag'\nimport { cloneElement } from './clone-element'\nimport { getHost } from './get-host'\nimport { rpx } from './rpx'\nimport { classNames, extractClass } from './class'\nimport { o } from './o'\nimport { extend, get, set, bind, unbind } from './extend'\nimport { Fragment } from './util'\nimport 'construct-style-sheets-polyfill'\n\nh.f = Fragment\n\nfunction createRef() {\n return {}\n}\n\nconst $ = {}\nconst Component = WeElement\nconst defineElement = define\nconst elements = options.mapping\n\nconst omi = {\n tag,\n WeElement,\n Component,\n render,\n h,\n createElement,\n options,\n define,\n cloneElement,\n getHost,\n rpx,\n defineElement,\n classNames,\n extractClass,\n createRef,\n o,\n elements,\n $,\n extend,\n get,\n set,\n bind,\n unbind\n}\n\noptions.root.Omi = omi\noptions.root.omi = omi\noptions.root.Omi.version = '6.25.14'\n\nexport default omi\n\nexport {\n tag,\n WeElement,\n Component,\n render,\n h,\n createElement,\n options,\n define,\n cloneElement,\n getHost,\n rpx,\n defineElement,\n classNames,\n extractClass,\n createRef,\n o,\n elements,\n $,\n extend,\n get,\n set,\n bind,\n unbind\n}\n"]}