diff --git a/packages/omi/dist/omi.dev.js b/packages/omi/dist/omi.dev.js index f8a2f0551..5f8d17819 100644 --- a/packages/omi/dist/omi.dev.js +++ b/packages/omi/dist/omi.dev.js @@ -1,5 +1,5 @@ /** - * Omi v6.22.2 http://omijs.org + * Omi v6.23.0 http://omijs.org * Front End Cross-Frameworks Framework. * By dntzhang https://github.com/dntzhang * Github: https://github.com/Tencent/omi @@ -797,26 +797,31 @@ } } - var css = this.constructor.css; - if (css) { - if (typeof css === 'string') { - var styleSheet = new CSSStyleSheet(); - styleSheet.replaceSync(css); - shadowRoot.adoptedStyleSheets = [styleSheet]; - } else if (Object.prototype.toString.call(css) === '[object Array]') { - var styleSheets = []; - css.forEach(function (styleSheet) { - if (typeof styleSheet === 'string') { - var adoptedStyleSheet = new CSSStyleSheet(); - adoptedStyleSheet.replaceSync(styleSheet); - styleSheets.push(adoptedStyleSheet); - } else { - styleSheets.push(styleSheet); - } - shadowRoot.adoptedStyleSheets = styleSheets; - }); - } else { - shadowRoot.adoptedStyleSheets = [css]; + if (this.constructor.elementStyles) { + shadowRoot.adoptedStyleSheets = this.constructor.elementStyles; + } else { + var css = this.constructor.css; + if (css) { + if (typeof css === 'string') { + var styleSheet = new CSSStyleSheet(); + styleSheet.replaceSync(css); + shadowRoot.adoptedStyleSheets = [styleSheet]; + } else if (Object.prototype.toString.call(css) === '[object Array]') { + var styleSheets = []; + css.forEach(function (styleSheet) { + if (typeof styleSheet === 'string') { + var adoptedStyleSheet = new CSSStyleSheet(); + adoptedStyleSheet.replaceSync(styleSheet); + styleSheets.push(adoptedStyleSheet); + } else { + styleSheets.push(styleSheet); + } + shadowRoot.adoptedStyleSheets = styleSheets; + }); + } else { + shadowRoot.adoptedStyleSheets = [css]; + } + this.constructor.elementStyles = shadowRoot.adoptedStyleSheets; } } @@ -1549,7 +1554,7 @@ options.root.Omi = omi; options.root.omi = omi; - options.root.Omi.version = '6.22.2'; + options.root.Omi.version = '6.23.0'; if (typeof module != 'undefined') module.exports = omi;else self.Omi = omi; }()); diff --git a/packages/omi/dist/omi.dev.js.map b/packages/omi/dist/omi.dev.js.map index b3f0d2508..baa78f5aa 100644 --- a/packages/omi/dist/omi.dev.js.map +++ b/packages/omi/dist/omi.dev.js.map @@ -1 +1 @@ -{"version":3,"file":"omi.dev.js","sources":["../src/options.js","../src/util.js","../src/h.js","../src/constants.js","../src/vdom/index.js","../src/extend.js","../src/dom/index.js","../src/vdom/diff.js","../src/we-element.js","../src/render.js","../src/define.js","../src/tag.js","../src/clone-element.js","../src/get-host.js","../src/rpx.js","../src/class.js","../src/o.js","../node_modules/construct-style-sheets-polyfill/dist/adoptedStyleSheets.js","../src/omi.js","../src/omi.js"],"sourcesContent":["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","/**\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","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","// render modes\n\nexport const NO_RENDER = 0\nexport const SYNC_RENDER = 1\nexport const FORCE_RENDER = 2\nexport const ASYNC_RENDER = 3\n\nexport const ATTR_KEY = 'prevProps'\n\n// DOM properties that should NOT have \"px\" added when numeric\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i\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) {\n /** @type {Element} */\n let node = isSvg\n ? document.createElementNS('http://www.w3.org/2000/svg', nodeName)\n : document.createElement(nodeName)\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 === '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 } from '../dom/index'\nimport { camelCase, isArray, Fragment } from '../util'\nimport { removeNode } from '../dom/index'\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 innerDiffNode(parent, vnode, hydrating, component, updateSelf)\n } else {\n ret = []\n vnode.forEach((item, index) => {\n let ele = idiff(index === 0 ? dom : null, item, component, updateSelf)\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","import { cssToDom, isArray, hyphenate, getValByPath, capitalize } from './util'\nimport { diff } from './vdom/diff'\nimport options from './options'\n\nlet id = 0\n\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 const css = this.constructor.css\n if (css) {\n if (typeof css === 'string') {\n const styleSheet = new CSSStyleSheet()\n styleSheet.replaceSync(css)\n shadowRoot.adoptedStyleSheets = [styleSheet]\n } else if (Object.prototype.toString.call(css) === '[object Array]') {\n const styleSheets = []\n css.forEach(styleSheet => {\n if (typeof styleSheet === 'string') {\n const adoptedStyleSheet = new CSSStyleSheet()\n adoptedStyleSheet.replaceSync(styleSheet)\n styleSheets.push(adoptedStyleSheet)\n } else {\n styleSheets.push(styleSheet)\n }\n shadowRoot.adoptedStyleSheets = styleSheets\n })\n } else {\n shadowRoot.adoptedStyleSheets = [css]\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 this._customStyleElement.textContent = this._customStyleContent\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 type = attrs[key]\n const val = ele.getAttribute(hyphenate(key))\n if (val !== null) {\n switch (type) {\n case String:\n ele.props[key] = val\n break\n case Number:\n ele.props[key] = Number(val)\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 break\n case Array:\n case Object:\n if (val[0] === ':') {\n ele.props[key] = getValByPath(val.substr(1), Omi.$)\n } else {\n ele.props[key] = JSON.parse(\n val\n .replace(/(['\"])?([a-zA-Z0-9_-]+)(['\"])?:([^\\/])/g, '\"$2\":$4')\n .replace(/'([\\s\\S]*?)'/g, '\"$1\"')\n .replace(/,(\\s*})/g, '$1')\n )\n }\n 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 { define } from './define'\n\nexport function tag(name) {\n return function(target) {\n define(name, target)\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 p = ele.parentNode\n while (p) {\n if (p.host) {\n return p.host\n } else if (p.shadowRoot && p.shadowRoot.host) {\n return p.shadowRoot.host\n } else {\n p = p.parentNode\n }\n }\n}\n","export function rpx(css) {\n return css.replace(/([1-9]\\d*|0)(\\.\\d*)*rpx/g, (a, b) => {\n return (window.innerWidth * Number(b)) / 750 + 'px'\n })\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","export function o(obj) {\n return JSON.stringify(obj)\n}\n","(function () {\n 'use strict';\n\n if ('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","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.22.2'\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","\n\t\t\t\timport Omi from './omi';\n\t\t\t\tif (typeof module!='undefined') module.exports = Omi;\n\t\t\t\telse self.Omi = Omi;\n\t\t\t"],"names":["getGlobal","global","Math","Array","self","window","store","root","mapping","Reflect","undefined","customElements","hasOwnProperty","BuiltInHTMLElement","HTMLElement","construct","constructor","prototype","Object","setPrototypeOf","cssToDom","css","node","document","createElement","textContent","camelCase","str","replace","$","$1","toUpperCase","Fragment","props","children","extend","obj","i","applyRef","ref","value","current","defer","Promise","resolve","then","bind","setTimeout","isArray","toString","call","pathToArr","path","split","hyphenateRE","hyphenate","toLowerCase","capitalize","name","all","letter","s","getValByPath","arr","forEach","prop","stack","h","nodeName","attributes","lastSimple","child","simple","arguments","length","push","pop","String","p","key","options","vnode","ATTR_KEY","IS_NON_DIMENSIONAL","isSameNodeType","hydrating","splitText","_componentConstructor","isNamedNode","normalizedNodeName","extension","handler","set","origin","len","get","eventProxy","e","_listeners","type","el","addEventListener","unbind","removeEventListener","createNode","isSvg","createElementNS","removeNode","parentNode","removeChild","setAccessor","old","component","className","style","cssText","test","innerHTML","__html","bindEvent","pureRemoveAttribute","removeAttribute","ns","removeAttributeNS","setAttributeNS","pureSetAttribute","setAttribute","event","useCapture","nameLower","slice","diffLevel","isSvgMode","diff","dom","parent","updateSelf","ret","ownerSVGElement","innerDiffNode","item","index","ele","idiff","one","recollectNodeTree","appendChild","out","prevSvgMode","_component","nodeValue","createTextNode","replaceChild","vnodeName","firstChild","fc","vchildren","a","nextSibling","is","noSlot","dangerouslySetInnerHTML","diffAttributes","isHydrating","originalChildren","childNodes","keyed","keyedLen","min","childrenLen","vlen","j","c","f","vchild","__key","trim","insertBefore","unmountOnly","removeChildren","lastChild","next","previousSibling","attrs","isWeElement","update","oldClone","receiveProps","assign","ccName","indexOf","id","WeElement","defaultProps","elementId","computed","isInstalled","connectedCallback","host","inject","injection","provide","injectKey","attrsToProps","beforeInstall","install","afterInstall","shadowRoot","isLightDom","attachShadow","mode","styleSheet","CSSStyleSheet","replaceSync","adoptedStyleSheets","styleSheets","adoptedStyleSheet","beforeRender","rendered","render","rootNode","_customStyleElement","_customStyleContent","installed","disconnectedCallback","uninstall","ignoreAttrs","_willUpdate","beforeUpdate","updated","forceUpdate","updateProps","keys","prevProps","val","JSON","stringify","getAttribute","propTypes","Number","Boolean","substr","Omi","parse","fire","data","CustomEvent","detail","dispatchEvent","querySelector","storeHelpers","define","ctor","config","Ele","compute","apply","func","tag","target","cloneElement","getHost","rpx","b","innerWidth","hasOwn","classNames","classes","arg","argType","inner","join","extractClass","args","class","unshift","o","createRef","Component","defineElement","elements","omi","version","module","exports"],"mappings":";;;;;;;;;;;EAAA,SAASA,SAAT,GAAqB;EACnB,MACE,OAAOC,MAAP,KAAkB,QAAlB,IACA,CAACA,MADD,IAEAA,OAAOC,IAAP,KAAgBA,IAFhB,IAGAD,OAAOE,KAAP,KAAiBA,KAJnB,EAKE;EACA,WACEC,QACAC,MADA,IAEAJ,MAFA,IAGC,YAAW;EACV,aAAO,IAAP;EACD,KAFD,EAJF;EAQD;EACD,SAAOA,MAAP;EACD;;EAED;;;;AAIA,gBAAe;EACbK,SAAO,IADM;EAEbC,QAAMP,WAFO;EAGbQ,WAAS;EAHI,CAAf;;ECvBA;;;;;;;;;EAgBC,C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,YAtBU;EAuBVwD;EAvBU,CAAZ;;EA0BAtB,QAAQzE,IAAR,CAAa2O,GAAb,GAAmBuC,GAAnB;EACAzM,QAAQzE,IAAR,CAAakR,GAAb,GAAmBA,GAAnB;EACAzM,QAAQzE,IAAR,CAAa2O,GAAb,CAAiBwC,OAAjB,GAA2B,QAA3B;;ECpDI,IAAI,OAAOC,MAAP,IAAe,WAAnB,EAAgCA,OAAOC,OAAP,GAAiB1C,GAAjB,CAAhC,KACK9O,KAAK8O,GAAL,GAAWA,GAAX;;"} \ No newline at end of file +{"version":3,"file":"omi.dev.js","sources":["../src/options.js","../src/util.js","../src/h.js","../src/constants.js","../src/vdom/index.js","../src/extend.js","../src/dom/index.js","../src/vdom/diff.js","../src/we-element.js","../src/render.js","../src/define.js","../src/tag.js","../src/clone-element.js","../src/get-host.js","../src/rpx.js","../src/class.js","../src/o.js","../node_modules/construct-style-sheets-polyfill/dist/adoptedStyleSheets.js","../src/omi.js","../src/omi.js"],"sourcesContent":["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","/**\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","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","// render modes\n\nexport const NO_RENDER = 0\nexport const SYNC_RENDER = 1\nexport const FORCE_RENDER = 2\nexport const ASYNC_RENDER = 3\n\nexport const ATTR_KEY = 'prevProps'\n\n// DOM properties that should NOT have \"px\" added when numeric\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i\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) {\n /** @type {Element} */\n let node = isSvg\n ? document.createElementNS('http://www.w3.org/2000/svg', nodeName)\n : document.createElement(nodeName)\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 === '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 } from '../dom/index'\nimport { camelCase, isArray, Fragment } from '../util'\nimport { removeNode } from '../dom/index'\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 innerDiffNode(parent, vnode, hydrating, component, updateSelf)\n } else {\n ret = []\n vnode.forEach((item, index) => {\n let ele = idiff(index === 0 ? dom : null, item, component, updateSelf)\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","import { cssToDom, isArray, hyphenate, getValByPath, capitalize } from './util'\nimport { diff } from './vdom/diff'\nimport options from './options'\n\nlet id = 0\n\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 (this.constructor.elementStyles) {\n shadowRoot.adoptedStyleSheets = this.constructor.elementStyles\n } else {\n const css = this.constructor.css\n if (css) {\n if (typeof css === 'string') {\n const styleSheet = new CSSStyleSheet()\n styleSheet.replaceSync(css)\n shadowRoot.adoptedStyleSheets = [styleSheet]\n } else if (Object.prototype.toString.call(css) === '[object Array]') {\n const styleSheets = []\n css.forEach(styleSheet => {\n if (typeof styleSheet === 'string') {\n const adoptedStyleSheet = new CSSStyleSheet()\n adoptedStyleSheet.replaceSync(styleSheet)\n styleSheets.push(adoptedStyleSheet)\n } else {\n styleSheets.push(styleSheet)\n }\n shadowRoot.adoptedStyleSheets = styleSheets\n })\n } else {\n shadowRoot.adoptedStyleSheets = [css]\n }\n this.constructor.elementStyles = shadowRoot.adoptedStyleSheets\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 this._customStyleElement.textContent = this._customStyleContent\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 type = attrs[key]\n const val = ele.getAttribute(hyphenate(key))\n if (val !== null) {\n switch (type) {\n case String:\n ele.props[key] = val\n break\n case Number:\n ele.props[key] = Number(val)\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 break\n case Array:\n case Object:\n if (val[0] === ':') {\n ele.props[key] = getValByPath(val.substr(1), Omi.$)\n } else {\n ele.props[key] = JSON.parse(\n val\n .replace(/(['\"])?([a-zA-Z0-9_-]+)(['\"])?:([^\\/])/g, '\"$2\":$4')\n .replace(/'([\\s\\S]*?)'/g, '\"$1\"')\n .replace(/,(\\s*})/g, '$1')\n )\n }\n 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 { define } from './define'\n\nexport function tag(name) {\n return function(target) {\n define(name, target)\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 p = ele.parentNode\n while (p) {\n if (p.host) {\n return p.host\n } else if (p.shadowRoot && p.shadowRoot.host) {\n return p.shadowRoot.host\n } else {\n p = p.parentNode\n }\n }\n}\n","export function rpx(css) {\n return css.replace(/([1-9]\\d*|0)(\\.\\d*)*rpx/g, (a, b) => {\n return (window.innerWidth * Number(b)) / 750 + 'px'\n })\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","export function o(obj) {\n return JSON.stringify(obj)\n}\n","(function () {\n 'use strict';\n\n if ('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","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.23.0'\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","\n\t\t\t\timport Omi from './omi';\n\t\t\t\tif (typeof module!='undefined') module.exports = Omi;\n\t\t\t\telse self.Omi = Omi;\n\t\t\t"],"names":["getGlobal","global","Math","Array","self","window","store","root","mapping","Reflect","undefined","customElements","hasOwnProperty","BuiltInHTMLElement","HTMLElement","construct","constructor","prototype","Object","setPrototypeOf","cssToDom","css","node","document","createElement","textContent","camelCase","str","replace","$","$1","toUpperCase","Fragment","props","children","extend","obj","i","applyRef","ref","value","current","defer","Promise","resolve","then","bind","setTimeout","isArray","toString","call","pathToArr","path","split","hyphenateRE","hyphenate","toLowerCase","capitalize","name","all","letter","s","getValByPath","arr","forEach","prop","stack","h","nodeName","attributes","lastSimple","child","simple","arguments","length","push","pop","String","p","key","options","vnode","ATTR_KEY","IS_NON_DIMENSIONAL","isSameNodeType","hydrating","splitText","_componentConstructor","isNamedNode","normalizedNodeName","extension","handler","set","origin","len","get","eventProxy","e","_listeners","type","el","addEventListener","unbind","removeEventListener","createNode","isSvg","createElementNS","removeNode","parentNode","removeChild","setAccessor","old","component","className","style","cssText","test","innerHTML","__html","bindEvent","pureRemoveAttribute","removeAttribute","ns","removeAttributeNS","setAttributeNS","pureSetAttribute","setAttribute","event","useCapture","nameLower","slice","diffLevel","isSvgMode","diff","dom","parent","updateSelf","ret","ownerSVGElement","innerDiffNode","item","index","ele","idiff","one","recollectNodeTree","appendChild","out","prevSvgMode","_component","nodeValue","createTextNode","replaceChild","vnodeName","firstChild","fc","vchildren","a","nextSibling","is","noSlot","dangerouslySetInnerHTML","diffAttributes","isHydrating","originalChildren","childNodes","keyed","keyedLen","min","childrenLen","vlen","j","c","f","vchild","__key","trim","insertBefore","unmountOnly","removeChildren","lastChild","next","previousSibling","attrs","isWeElement","update","oldClone","receiveProps","assign","ccName","indexOf","id","WeElement","defaultProps","elementId","computed","isInstalled","connectedCallback","host","inject","injection","provide","injectKey","attrsToProps","beforeInstall","install","afterInstall","shadowRoot","isLightDom","attachShadow","mode","elementStyles","adoptedStyleSheets","styleSheet","CSSStyleSheet","replaceSync","styleSheets","adoptedStyleSheet","beforeRender","rendered","render","rootNode","_customStyleElement","_customStyleContent","installed","disconnectedCallback","uninstall","ignoreAttrs","_willUpdate","beforeUpdate","updated","forceUpdate","updateProps","keys","prevProps","val","JSON","stringify","getAttribute","propTypes","Number","Boolean","substr","Omi","parse","fire","data","CustomEvent","detail","dispatchEvent","querySelector","storeHelpers","define","ctor","config","Ele","compute","apply","func","tag","target","cloneElement","getHost","rpx","b","innerWidth","hasOwn","classNames","classes","arg","argType","inner","join","extractClass","args","class","unshift","o","createRef","Component","defineElement","elements","omi","version","module","exports"],"mappings":";;;;;;;;;;;EAAA,SAASA,SAAT,GAAqB;EACnB,MACE,OAAOC,MAAP,KAAkB,QAAlB,IACA,CAACA,MADD,IAEAA,OAAOC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O,EAAP;EACD;;EAED,IAAMzP,IAAI,EAAV;EACA,IAAM0P,YAAYvF,SAAlB;EACA,IAAMwF,gBAAgB5B,MAAtB;EACA,IAAM6B,WAAWzM,QAAQxE,OAAzB;;EAEA,IAAMkR,MAAM;EACVvB,UADU;EAEVnE,sBAFU;EAGVuF,sBAHU;EAIV3D,gBAJU;EAKVzJ,MALU;EAMV3C,kBANU;EAOVwD,kBAPU;EAQV4K,gBARU;EASVS,4BATU;EAUVC,kBAVU;EAWVC,UAXU;EAYViB,8BAZU;EAaVb,wBAbU;EAcVM,4BAdU;EAeVK,sBAfU;EAgBVD,MAhBU;EAiBVI,oBAjBU;EAkBV5P,MAlBU;EAmBVM,kBAnBU;EAoBV4D,UApBU;EAqBVH,UArBU;EAsBV9C,YAtBU;EAuBVwD;EAvBU,CAAZ;;EA0BAtB,QAAQzE,IAAR,CAAa4O,GAAb,GAAmBuC,GAAnB;EACA1M,QAAQzE,IAAR,CAAamR,GAAb,GAAmBA,GAAnB;EACA1M,QAAQzE,IAAR,CAAa4O,GAAb,CAAiBwC,OAAjB,GAA2B,QAA3B;;ECpDI,IAAI,OAAOC,MAAP,IAAe,WAAnB,EAAgCA,OAAOC,OAAP,GAAiB1C,GAAjB,CAAhC,KACK/O,KAAK+O,GAAL,GAAWA,GAAX;;"} \ No newline at end of file diff --git a/packages/omi/dist/omi.esm.js b/packages/omi/dist/omi.esm.js index c76941351..28423fc03 100644 --- a/packages/omi/dist/omi.esm.js +++ b/packages/omi/dist/omi.esm.js @@ -1,5 +1,5 @@ /** - * Omi v6.22.2 http://omijs.org + * Omi v6.23.0 http://omijs.org * Front End Cross-Frameworks Framework. * By dntzhang https://github.com/dntzhang * Github: https://github.com/Tencent/omi @@ -794,26 +794,31 @@ var WeElement = function (_HTMLElement) { } } - var css = this.constructor.css; - if (css) { - if (typeof css === 'string') { - var styleSheet = new CSSStyleSheet(); - styleSheet.replaceSync(css); - shadowRoot.adoptedStyleSheets = [styleSheet]; - } else if (Object.prototype.toString.call(css) === '[object Array]') { - var styleSheets = []; - css.forEach(function (styleSheet) { - if (typeof styleSheet === 'string') { - var adoptedStyleSheet = new CSSStyleSheet(); - adoptedStyleSheet.replaceSync(styleSheet); - styleSheets.push(adoptedStyleSheet); - } else { - styleSheets.push(styleSheet); - } - shadowRoot.adoptedStyleSheets = styleSheets; - }); - } else { - shadowRoot.adoptedStyleSheets = [css]; + if (this.constructor.elementStyles) { + shadowRoot.adoptedStyleSheets = this.constructor.elementStyles; + } else { + var css = this.constructor.css; + if (css) { + if (typeof css === 'string') { + var styleSheet = new CSSStyleSheet(); + styleSheet.replaceSync(css); + shadowRoot.adoptedStyleSheets = [styleSheet]; + } else if (Object.prototype.toString.call(css) === '[object Array]') { + var styleSheets = []; + css.forEach(function (styleSheet) { + if (typeof styleSheet === 'string') { + var adoptedStyleSheet = new CSSStyleSheet(); + adoptedStyleSheet.replaceSync(styleSheet); + styleSheets.push(adoptedStyleSheet); + } else { + styleSheets.push(styleSheet); + } + shadowRoot.adoptedStyleSheets = styleSheets; + }); + } else { + shadowRoot.adoptedStyleSheets = [css]; + } + this.constructor.elementStyles = shadowRoot.adoptedStyleSheets; } } @@ -1546,7 +1551,7 @@ var omi = { options.root.Omi = omi; options.root.omi = omi; -options.root.Omi.version = '6.22.2'; +options.root.Omi.version = '6.23.0'; export default omi; export { tag, WeElement, Component, render, h, h as createElement, options, define, cloneElement, getHost, rpx, defineElement, classNames, extractClass, createRef, o, elements, $, extend$1 as extend, get, set, bind, unbind }; diff --git a/packages/omi/dist/omi.esm.js.map b/packages/omi/dist/omi.esm.js.map index e5c28da66..6b0e1b06e 100644 --- a/packages/omi/dist/omi.esm.js.map +++ b/packages/omi/dist/omi.esm.js.map @@ -1 +1 @@ -{"version":3,"file":"omi.esm.js","sources":["../src/options.js","../src/util.js","../src/h.js","../src/constants.js","../src/vdom/index.js","../src/extend.js","../src/dom/index.js","../src/vdom/diff.js","../src/we-element.js","../src/render.js","../src/define.js","../src/tag.js","../src/clone-element.js","../src/get-host.js","../src/rpx.js","../src/class.js","../src/o.js","../node_modules/construct-style-sheets-polyfill/dist/adoptedStyleSheets.js","../src/omi.js"],"sourcesContent":["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","/**\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","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","// render modes\n\nexport const NO_RENDER = 0\nexport const SYNC_RENDER = 1\nexport const FORCE_RENDER = 2\nexport const ASYNC_RENDER = 3\n\nexport const ATTR_KEY = 'prevProps'\n\n// DOM properties that should NOT have \"px\" added when numeric\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i\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) {\n /** @type {Element} */\n let node = isSvg\n ? document.createElementNS('http://www.w3.org/2000/svg', nodeName)\n : document.createElement(nodeName)\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 === '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 } from '../dom/index'\nimport { camelCase, isArray, Fragment } from '../util'\nimport { removeNode } from '../dom/index'\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 innerDiffNode(parent, vnode, hydrating, component, updateSelf)\n } else {\n ret = []\n vnode.forEach((item, index) => {\n let ele = idiff(index === 0 ? dom : null, item, component, updateSelf)\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","import { cssToDom, isArray, hyphenate, getValByPath, capitalize } from './util'\nimport { diff } from './vdom/diff'\nimport options from './options'\n\nlet id = 0\n\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 const css = this.constructor.css\n if (css) {\n if (typeof css === 'string') {\n const styleSheet = new CSSStyleSheet()\n styleSheet.replaceSync(css)\n shadowRoot.adoptedStyleSheets = [styleSheet]\n } else if (Object.prototype.toString.call(css) === '[object Array]') {\n const styleSheets = []\n css.forEach(styleSheet => {\n if (typeof styleSheet === 'string') {\n const adoptedStyleSheet = new CSSStyleSheet()\n adoptedStyleSheet.replaceSync(styleSheet)\n styleSheets.push(adoptedStyleSheet)\n } else {\n styleSheets.push(styleSheet)\n }\n shadowRoot.adoptedStyleSheets = styleSheets\n })\n } else {\n shadowRoot.adoptedStyleSheets = [css]\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 this._customStyleElement.textContent = this._customStyleContent\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 type = attrs[key]\n const val = ele.getAttribute(hyphenate(key))\n if (val !== null) {\n switch (type) {\n case String:\n ele.props[key] = val\n break\n case Number:\n ele.props[key] = Number(val)\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 break\n case Array:\n case Object:\n if (val[0] === ':') {\n ele.props[key] = getValByPath(val.substr(1), Omi.$)\n } else {\n ele.props[key] = JSON.parse(\n val\n .replace(/(['\"])?([a-zA-Z0-9_-]+)(['\"])?:([^\\/])/g, '\"$2\":$4')\n .replace(/'([\\s\\S]*?)'/g, '\"$1\"')\n .replace(/,(\\s*})/g, '$1')\n )\n }\n 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 { define } from './define'\n\nexport function tag(name) {\n return function(target) {\n define(name, target)\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 p = ele.parentNode\n while (p) {\n if (p.host) {\n return p.host\n } else if (p.shadowRoot && p.shadowRoot.host) {\n return p.shadowRoot.host\n } else {\n p = p.parentNode\n }\n }\n}\n","export function rpx(css) {\n return css.replace(/([1-9]\\d*|0)(\\.\\d*)*rpx/g, (a, b) => {\n return (window.innerWidth * Number(b)) / 750 + 'px'\n })\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","export function o(obj) {\n return JSON.stringify(obj)\n}\n","(function () {\n 'use strict';\n\n if ('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","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.22.2'\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"],"names":["getGlobal","global","Math","Array","self","window","Reflect","undefined","customElements","hasOwnProperty","BuiltInHTMLElement","HTMLElement","construct","constructor","prototype","setPrototypeOf","cssToDom","css","node","document","createElement","textContent","camelCase","str","replace","$","$1","toUpperCase","Fragment","props","children","extend","obj","i","applyRef","ref","value","current","defer","Promise","resolve","then","bind","setTimeout","isArray","Object","toString","call","pathToArr","path","split","hyphenateRE","hyphenate","toLowerCase","capitalize","name","all","letter","s","getValByPath","arr","forEach","prop","stack","h","nodeName","attributes","lastSimple","child","simple","arguments","length","push","pop","String","p","key","options","vnode","ATTR_KEY","IS_NON_DIMENSIONAL","isSameNodeType","hydrating","splitText","_componentConstructor","isNamedNode","mapping","normalizedNodeName","extension","handler","set","origin","len","get","eventProxy","e","_listeners","type","el","addEventListener","unbind","removeEventListener","createNode","isSvg","createElementNS","removeNode","parentNode","removeChild","setAccessor","old","component","className","style","cssText","test","innerHTML","__html","pureRemoveAttribute","removeAttribute","ns","removeAttributeNS","setAttributeNS","pureSetAttribute","setAttribute","event","bindEvent","useCapture","nameLower","slice","diffLevel","isSvgMode","diff","dom","parent","updateSelf","ret","ownerSVGElement","item","index","ele","idiff","one","appendChild","out","prevSvgMode","_component","nodeValue","createTextNode","replaceChild","vnodeName","firstChild","fc","vchildren","a","nextSibling","is","noSlot","dangerouslySetInnerHTML","innerDiffNode","isHydrating","originalChildren","childNodes","keyed","keyedLen","min","childrenLen","vlen","j","c","f","vchild","__key","trim","insertBefore","recollectNodeTree","unmountOnly","removeChildren","lastChild","next","previousSibling","diffAttributes","attrs","isWeElement","update","oldClone","receiveProps","assign","ccName","indexOf","id","WeElement","defaultProps","elementId","computed","isInstalled","connectedCallback","store","host","inject","injection","provide","injectKey","attrsToProps","beforeInstall","install","afterInstall","shadowRoot","isLightDom","attachShadow","styleSheet","CSSStyleSheet","replaceSync","adoptedStyleSheets","styleSheets","adoptedStyleSheet","beforeRender","rendered","render","rootNode","_customStyleElement","_customStyleContent","installed","disconnectedCallback","uninstall","ignoreAttrs","_willUpdate","beforeUpdate","updated","forceUpdate","updateProps","keys","prevProps","val","JSON","stringify","getAttribute","propTypes","Number","Boolean","substr","Omi","parse","fire","data","CustomEvent","dispatchEvent","querySelector","storeHelpers","define","ctor","config","Ele","compute","apply","func","tag","target","cloneElement","getHost","rpx","b","innerWidth","hasOwn","classNames","classes","arg","argType","inner","join","extractClass","args","class","unshift","o","createRef","Component","defineElement","elements","omi","root","version"],"mappings":";;;;;;;;AAAA,SAASA,SAAT,GAAqB;MAEjB,OAAOC,MAAP,KAAkB,QAAlB,IACA,CAACA,MADD,IAEAA,OAAOC,IAAP,KAAgBA,IAFhB,IAGAD,OAAOE,KAAP,KAAiBA,KAJnB,EAKE;WAEEC,QACAC,MADA,IAEAJ,MAFA,IAGC,YAAW;aACH,IAAP;KADF,EAJF;;SASKA,MAAP;;;;;;;AAOF,cAAe;SACN,IADM;QAEPD,WAFO;WAGJ;CAHX;;ACvBA;;;;;;;;;CAgBE,YAAW;;;;SAIFM,OAAP,KAAmBC,SAAnB,IACAF,OAAOG,cAAP,KAA0BD,SAD1B;;;SAIOC,cAAP,CAAsBC,cAAtB,CAAqC,2BAArC,CAPF,EAQE;;;MAGIC,qBAAqBC,WAA3B;SACOA,WAAP,GAAqB,SAASA,WAAT,GAAuB;WACnCL,QAAQM,SAAR,CAAkBF,kBAAlB,EAAsC,EAAtC,EAA0C,KAAKG,WAA/C,CAAP;GADF;cAGYC,SAAZ,GAAwBJ,mBAAmBI,SAA3C;cACYA,SAAZ,CAAsBD,WAAtB,GAAoCF,WAApC;SACOI,cAAP,CAAsBJ,WAAtB,EAAmCD,kBAAnC;CAlBD;;AAqBD,SAAgBM,QAAT,CAAkBC,GAAlB,EAAuB;MACtBC,OAAOC,SAASC,aAAT,CAAuB,OAAvB,CAAb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end of file +{"version":3,"file":"omi.esm.js","sources":["../src/options.js","../src/util.js","../src/h.js","../src/constants.js","../src/vdom/index.js","../src/extend.js","../src/dom/index.js","../src/vdom/diff.js","../src/we-element.js","../src/render.js","../src/define.js","../src/tag.js","../src/clone-element.js","../src/get-host.js","../src/rpx.js","../src/class.js","../src/o.js","../node_modules/construct-style-sheets-polyfill/dist/adoptedStyleSheets.js","../src/omi.js"],"sourcesContent":["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","/**\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","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","// render modes\n\nexport const NO_RENDER = 0\nexport const SYNC_RENDER = 1\nexport const FORCE_RENDER = 2\nexport const ASYNC_RENDER = 3\n\nexport const ATTR_KEY = 'prevProps'\n\n// DOM properties that should NOT have \"px\" added when numeric\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i\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) {\n /** @type {Element} */\n let node = isSvg\n ? document.createElementNS('http://www.w3.org/2000/svg', nodeName)\n : document.createElement(nodeName)\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 === '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 } from '../dom/index'\nimport { camelCase, isArray, Fragment } from '../util'\nimport { removeNode } from '../dom/index'\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 innerDiffNode(parent, vnode, hydrating, component, updateSelf)\n } else {\n ret = []\n vnode.forEach((item, index) => {\n let ele = idiff(index === 0 ? dom : null, item, component, updateSelf)\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","import { cssToDom, isArray, hyphenate, getValByPath, capitalize } from './util'\nimport { diff } from './vdom/diff'\nimport options from './options'\n\nlet id = 0\n\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 (this.constructor.elementStyles) {\n shadowRoot.adoptedStyleSheets = this.constructor.elementStyles\n } else {\n const css = this.constructor.css\n if (css) {\n if (typeof css === 'string') {\n const styleSheet = new CSSStyleSheet()\n styleSheet.replaceSync(css)\n shadowRoot.adoptedStyleSheets = [styleSheet]\n } else if (Object.prototype.toString.call(css) === '[object Array]') {\n const styleSheets = []\n css.forEach(styleSheet => {\n if (typeof styleSheet === 'string') {\n const adoptedStyleSheet = new CSSStyleSheet()\n adoptedStyleSheet.replaceSync(styleSheet)\n styleSheets.push(adoptedStyleSheet)\n } else {\n styleSheets.push(styleSheet)\n }\n shadowRoot.adoptedStyleSheets = styleSheets\n })\n } else {\n shadowRoot.adoptedStyleSheets = [css]\n }\n this.constructor.elementStyles = shadowRoot.adoptedStyleSheets\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 this._customStyleElement.textContent = this._customStyleContent\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 type = attrs[key]\n const val = ele.getAttribute(hyphenate(key))\n if (val !== null) {\n switch (type) {\n case String:\n ele.props[key] = val\n break\n case Number:\n ele.props[key] = Number(val)\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 break\n case Array:\n case Object:\n if (val[0] === ':') {\n ele.props[key] = getValByPath(val.substr(1), Omi.$)\n } else {\n ele.props[key] = JSON.parse(\n val\n .replace(/(['\"])?([a-zA-Z0-9_-]+)(['\"])?:([^\\/])/g, '\"$2\":$4')\n .replace(/'([\\s\\S]*?)'/g, '\"$1\"')\n .replace(/,(\\s*})/g, '$1')\n )\n }\n 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 { define } from './define'\n\nexport function tag(name) {\n return function(target) {\n define(name, target)\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 p = ele.parentNode\n while (p) {\n if (p.host) {\n return p.host\n } else if (p.shadowRoot && p.shadowRoot.host) {\n return p.shadowRoot.host\n } else {\n p = p.parentNode\n }\n }\n}\n","export function rpx(css) {\n return css.replace(/([1-9]\\d*|0)(\\.\\d*)*rpx/g, (a, b) => {\n return (window.innerWidth * Number(b)) / 750 + 'px'\n })\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","export function o(obj) {\n return JSON.stringify(obj)\n}\n","(function () {\n 'use strict';\n\n if ('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","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.23.0'\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"],"names":["getGlobal","global","Math","Array","self","window","Reflect","undefined","customElements","hasOwnProperty","BuiltInHTMLElement","HTMLElement","construct","constructor","prototype","setPrototypeOf","cssToDom","css","node","document","createElement","textContent","camelCase","str","replace","$","$1","toUpperCase","Fragment","props","children","extend","obj","i","applyRef","ref","value","current","defer","Promise","resolve","then","bind","setTimeout","isArray","Object","toString","call","pathToArr","path","split","hyphenateRE","hyphenate","toLowerCase","capitalize","name","all","letter","s","getValByPath","arr","forEach","prop","stack","h","nodeName","attributes","lastSimple","child","simple","arguments","length","push","pop","String","p","key","options","vnode","ATTR_KEY","IS_NON_DIMENSIONAL","isSameNodeType","hydrating","splitText","_componentConstructor","isNamedNode","mapping","normalizedNodeName","extension","handler","set","origin","len","get","eventProxy","e","_listeners","type","el","addEventListener","unbind","removeEventListener","createNode","isSvg","createElementNS","removeNode","parentNode","removeChild","setAccessor","old","component","className","style","cssText","test","innerHTML","__html","pureRemoveAttribute","removeAttribute","ns","removeAttributeNS","setAttributeNS","pureSetAttribute","setAttribute","event","bindEvent","useCapture","nameLower","slice","diffLevel","isSvgMode","diff","dom","parent","updateSelf","ret","ownerSVGElement","item","index","ele","idiff","one","appendChild","out","prevSvgMode","_component","nodeValue","createTextNode","replaceChild","vnodeName","firstChild","fc","vchildren","a","nextSibling","is","noSlot","dangerouslySetInnerHTML","innerDiffNode","isHydrating","originalChildren","childNodes","keyed","keyedLen","min","childrenLen","vlen","j","c","f","vchild","__key","trim","insertBefore","recollectNodeTree","unmountOnly","removeChildren","lastChild","next","previousSibling","diffAttributes","attrs","isWeElement","update","oldClone","receiveProps","assign","ccName","indexOf","id","WeElement","defaultProps","elementId","computed","isInstalled","connectedCallback","store","host","inject","injection","provide","injectKey","attrsToProps","beforeInstall","install","afterInstall","shadowRoot","isLightDom","attachShadow","elementStyles","adoptedStyleSheets","styleSheet","CSSStyleSheet","replaceSync","styleSheets","adoptedStyleSheet","beforeRender","rendered","render","rootNode","_customStyleElement","_customStyleContent","installed","disconnectedCallback","uninstall","ignoreAttrs","_willUpdate","beforeUpdate","updated","forceUpdate","updateProps","keys","prevProps","val","JSON","stringify","getAttribute","propTypes","Number","Boolean","substr","Omi","parse","fire","data","CustomEvent","dispatchEvent","querySelector","storeHelpers","define","ctor","config","Ele","compute","apply","func","tag","target","cloneElement","getHost","rpx","b","innerWidth","hasOwn","classNames","classes","arg","argType","inner","join","extractClass","args","class","unshift","o","createRef","Component","defineElement","elements","omi","root","version"],"mappings":";;;;;;;;AAAA,SAASA,SAAT,GAAqB;MAEjB,OAAOC,MAAP,KAAkB,QAAlB,IACA,CAACA,MADD,IAEAA,OAAOC,IAAP,KAAgBA,IAFhB,IAGAD,OAAOE,KAAP,KAAiBA,KAJnB,EAKE;WAEEC,QACAC,MADA,IAEAJ,MAFA,IAGC,YAAW;aACH,IAAP;KADF,EAJF;;SASKA,MAAP;;;;;;;AAOF,cAAe;SACN,IADM;QAEPD,WAFO;WAGJ;CAHX;;ACvBA;;;;;;;;;CAgBE,YAAW;;;;SAIFM,OAAP,KAAmBC,SAAnB,IACAF,OAAOG,cAAP,KAA0BD,SAD1B;;;SAIOC,cAAP,CAAsBC,cAAtB,CAAqC,2BAArC,CAPF,EAQE;;;MAGIC,qBAAqBC,WAA3B;SACOA,WAAP,GAAqB,SAASA,WAAT,GAAuB;WACnCL,QAAQM,SAAR,CAAkBF,kBAAlB,EAAsC,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,IAAMuF,gBAAgB5B,MAAtB;AACA,IAAM6B,WAAWzM,QAAQS,OAAzB;;AAEA,IAAMiM,MAAM;UAAA;sBAAA;sBAAA;gBAAA;MAAA;kBAAA;kBAAA;gBAAA;4BAAA;kBAAA;UAAA;8BAAA;wBAAA;4BAAA;sBAAA;MAAA;oBAAA;MAAA;kBAAA;UAAA;UAAA;YAAA;;CAAZ;;AA0BA1M,QAAQ2M,IAAR,CAAavC,GAAb,GAAmBsC,GAAnB;AACA1M,QAAQ2M,IAAR,CAAaD,GAAb,GAAmBA,GAAnB;AACA1M,QAAQ2M,IAAR,CAAavC,GAAb,CAAiBwC,OAAjB,GAA2B,QAA3B;;;"} \ No newline at end of file diff --git a/packages/omi/dist/omi.js b/packages/omi/dist/omi.js index 22e11757d..409a71fd1 100644 --- a/packages/omi/dist/omi.js +++ b/packages/omi/dist/omi.js @@ -490,22 +490,27 @@ var fc; while (fc = shadowRoot.firstChild) shadowRoot.removeChild(fc); } - var css = this.constructor.css; - if (css) if ('string' == typeof css) { - var styleSheet = new CSSStyleSheet(); - styleSheet.replaceSync(css); - shadowRoot.adoptedStyleSheets = [ styleSheet ]; - } else if ('[object Array]' === Object.prototype.toString.call(css)) { - var styleSheets = []; - css.forEach(function(styleSheet) { - if ('string' == typeof styleSheet) { - var adoptedStyleSheet = new CSSStyleSheet(); - adoptedStyleSheet.replaceSync(styleSheet); - styleSheets.push(adoptedStyleSheet); - } else styleSheets.push(styleSheet); - shadowRoot.adoptedStyleSheets = styleSheets; - }); - } else shadowRoot.adoptedStyleSheets = [ css ]; + if (this.constructor.elementStyles) shadowRoot.adoptedStyleSheets = this.constructor.elementStyles; else { + var css = this.constructor.css; + if (css) { + if ('string' == typeof css) { + var styleSheet = new CSSStyleSheet(); + styleSheet.replaceSync(css); + shadowRoot.adoptedStyleSheets = [ styleSheet ]; + } else if ('[object Array]' === Object.prototype.toString.call(css)) { + var styleSheets = []; + css.forEach(function(styleSheet) { + if ('string' == typeof styleSheet) { + var adoptedStyleSheet = new CSSStyleSheet(); + adoptedStyleSheet.replaceSync(styleSheet); + styleSheets.push(adoptedStyleSheet); + } else styleSheets.push(styleSheet); + shadowRoot.adoptedStyleSheets = styleSheets; + }); + } else shadowRoot.adoptedStyleSheets = [ css ]; + this.constructor.elementStyles = shadowRoot.adoptedStyleSheets; + } + } this.beforeRender(); options.afterInstall && options.afterInstall(this); var rendered = this.render(this.props, this.store); @@ -924,7 +929,7 @@ }; options.root.Omi = omi; options.root.omi = omi; - options.root.Omi.version = '6.22.2'; + options.root.Omi.version = '6.23.0'; if ('undefined' != typeof module) module.exports = omi; else self.Omi = omi; }(); //# sourceMappingURL=omi.js.map \ No newline at end of file diff --git a/packages/omi/dist/omi.js.map b/packages/omi/dist/omi.js.map index 0efd8e7eb..39837567a 100644 --- a/packages/omi/dist/omi.js.map +++ b/packages/omi/dist/omi.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/util.js","../src/h.js","../src/vdom/index.js","../src/extend.js","../src/dom/index.js","../src/vdom/diff.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","arr","forEach","prop","h","nodeName","attributes","lastSimple","child","simple","arguments","length","stack","push","pop","undefined","String","p","key","options","vnode","isSameNodeType","splitText","mapping","hydrating","_componentConstructor","isNamedNode","extend$1","handler","extension","origin","get","e","type","eventProxy","el","_listeners","addEventListener","createNode","removeNode","setAccessor","component","old","isSvg","className","style","cssText","IS_NON_DIMENSIONAL","test","bindEvent","innerHTML","__html","pureRemoveAttribute","removeAttribute","ns","removeAttributeNS","pureSetAttribute","setAttribute","useCapture","event","nameLower","eventProxy$1","ret","diffLevel","isSvgMode","parent","ownerSVGElement","dom","innerDiffNode","updateSelf","item","index","ele","one","idiff","recollectNodeTree","parentNode","appendChild","out","nodeValue","createTextNode","replaceChild","vnodeName","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","getHost","shadowRoot","host","rpx","b","window","innerWidth","Number","arg","classNames","classes","argType","inner","join","_Array$prototype$slic","slice","class","unshift","o","JSON","stringify","createRef","store","root","global","Math","Reflect","hasOwnProperty","BuiltInHTMLElement","construct","setPrototypeOf","Promise","resolve","then","bind","setTimeout","_HTMLElement","elementId","id","computed","isInstalled","connectedCallback","_this2","inject","provide","injection","injectKey","attrsToProps","beforeInstall","install","afterInstall","attachShadow","mode","removeChild","adoptedStyleSheets","styleSheet","replaceSync","adoptedStyleSheet","styleSheets","_customStyleContent","_customStyleElement","rootNode","installed","disconnectedCallback","uninstall","update","ignoreAttrs","beforeUpdate","_willUpdate","beforeRender","rendered","forceUpdate","updated","_this3","updateProps","prevProps","val","getAttribute","Boolean","substr","Omi","parse","fire","data","CustomEvent","detail","_contents","contents","importPattern","console","warn","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","set","$locations","getAdopterByLocation","removeAdopterLocation","delete","_location","restyleAdopter","requestAnimationFrame","$basicStyleSheet","checkInvocationCorrectness","has","ConstructedStyleSheet","bootstrapper","body","WeakMap","getAssociatedLocation","locations","Location","attachAdoptedStyleSheetProperty","defineProperty","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","CSSStyleSheet","reject","_DOMException","self_1","ownerNode","rejectImports","method","basic","result","Symbol","hasInstance","childList","subtree","proto$1","readyState","locationType","every","oldUniqueSheets","uniqueSheets","removedSheets","proto","attach_1","init","documentLocation","Component","defineElement","tag","elements","render","extractClass","omi","unbind","version","module","exports"],"mappings":";;IAqCO,SAASA,SAASC;QACvB,IAAMC,OAAOC,SAASC,cAAc;QACpCF,KAAKG,cAAcJ;QACnB,OAAOC;;IAGF,SAASI,UAAUC;QACxB,OAAOA,IAAIC,QAAQ,UAAU,SAACC,GAAGC;YAC/B,OAAOA,GAAGC;;;IAIP,SAASC,SAASC;QACvB,OAAOA,MAAMC;;IAGR,SAASC,OAAOC,KAAKH;QAC1B,KAAK,IAAII,KAAKJ,OAAOG,IAAIC,KAAKJ,MAAMI;QACpC,OAAOD;;IAOF,SAASE,SAASC,KAAKC;QAC5B,IAAW,QAAPD,KACF,IAAkB,qBAAPA,KAAmBA,IAAIC,aAC7BD,IAAIE,UAAUD;;IAehB,SAASE,QAAQN;QACtB,OAA+C,qBAAxCO,OAAOC,UAAUC,SAASC,KAAKV;;IAGj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,SAAQ4J;oBACxB,IAAAxL,OAAAuL,SAAApX,KAAA2J,MAAgC0N;oBAC5B,IAAgB,aAAhBA,KAAQ3J,MACR0D,yBAA6BU,IAACnI,MAAAkC;oBAE9B,OAAIA;;;YAGhB,IAAAyL,mBAAazE,sBAAApU;YACb,IAAA6Y,iBAAwB1G,eACxB0G,iBAAU/B,gBAGF9W,SAAAwE,iBAAiB,oBAAeqU,iBAAA/B,QAAA/I,KAAA8K;;;IAKxCtW,EAAAwG,IAAKtI;IGzTL,IAAAH;IACE,IAAAwY,YAAA3O;IACD,IAAA4O,gBAAAzO;;IAGD,IAAMwO;QACNE,KAAMD;QACN5O,WAAM8O;;QAENC,QAAYA;QACVF,GAAAA;QACA7O,eAAAA;QACA2O,SAAAA;QACAI,QAAAA;QACA3W,cALUqJ;QAMV3L,SAAAA;QACAqD,KAAAA;QACAgH,eARUyO;QASVnN,YAAAA;QACAC,cAAAA;QACAG,WAXUkB;QAYV6L,GAAAA;QACAzM,UAAAA;QACA6M,GAAAA;QACAjM,QAAAA;QACAH,KAhBU7I;QAiBV+U,KAAAA;QACA3Y,MAlBUyN;QAmBVnN,QAAAA;;IAGAmN,QAAAA,KAtBU8C,MAAAuI;IAuBVC,QAAAA,KAAAA,MAAAA;IAvBU/V,QAAZ8J,KAAAyD,IAAAyI,UAAA;IA0BAhW,IAAmB8V,sBAAXhM,QAARmM,OAAAC,UAAAJ,UAAApP,KAAA6G,MAAAuI","file":"omi.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","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) {\n /** @type {Element} */\n let node = isSvg\n ? document.createElementNS('http://www.w3.org/2000/svg', nodeName)\n : document.createElement(nodeName)\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 === '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 } from '../dom/index'\nimport { camelCase, isArray, Fragment } from '../util'\nimport { removeNode } from '../dom/index'\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 innerDiffNode(parent, vnode, hydrating, component, updateSelf)\n } else {\n ret = []\n vnode.forEach((item, index) => {\n let ele = idiff(index === 0 ? dom : null, item, component, updateSelf)\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","import { cssToDom, isArray, hyphenate, getValByPath, capitalize } from './util'\nimport { diff } from './vdom/diff'\nimport options from './options'\n\nlet id = 0\n\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 const css = this.constructor.css\n if (css) {\n if (typeof css === 'string') {\n const styleSheet = new CSSStyleSheet()\n styleSheet.replaceSync(css)\n shadowRoot.adoptedStyleSheets = [styleSheet]\n } else if (Object.prototype.toString.call(css) === '[object Array]') {\n const styleSheets = []\n css.forEach(styleSheet => {\n if (typeof styleSheet === 'string') {\n const adoptedStyleSheet = new CSSStyleSheet()\n adoptedStyleSheet.replaceSync(styleSheet)\n styleSheets.push(adoptedStyleSheet)\n } else {\n styleSheets.push(styleSheet)\n }\n shadowRoot.adoptedStyleSheets = styleSheets\n })\n } else {\n shadowRoot.adoptedStyleSheets = [css]\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 this._customStyleElement.textContent = this._customStyleContent\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 type = attrs[key]\n const val = ele.getAttribute(hyphenate(key))\n if (val !== null) {\n switch (type) {\n case String:\n ele.props[key] = val\n break\n case Number:\n ele.props[key] = Number(val)\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 break\n case Array:\n case Object:\n if (val[0] === ':') {\n ele.props[key] = getValByPath(val.substr(1), Omi.$)\n } else {\n ele.props[key] = JSON.parse(\n val\n .replace(/(['\"])?([a-zA-Z0-9_-]+)(['\"])?:([^\\/])/g, '\"$2\":$4')\n .replace(/'([\\s\\S]*?)'/g, '\"$1\"')\n .replace(/,(\\s*})/g, '$1')\n )\n }\n 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 p = ele.parentNode\n while (p) {\n if (p.host) {\n return p.host\n } else if (p.shadowRoot && p.shadowRoot.host) {\n return p.shadowRoot.host\n } else {\n p = p.parentNode\n }\n }\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 ('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.22.2'\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"]} \ No newline at end of file +{"version":3,"sources":["../src/util.js","../src/h.js","../src/vdom/index.js","../src/extend.js","../src/dom/index.js","../src/vdom/diff.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","arr","forEach","prop","h","nodeName","attributes","lastSimple","child","simple","arguments","length","stack","push","pop","undefined","String","p","key","options","vnode","isSameNodeType","splitText","mapping","hydrating","_componentConstructor","isNamedNode","extend$1","handler","extension","origin","get","e","type","eventProxy","el","_listeners","addEventListener","createNode","removeNode","setAccessor","component","old","isSvg","className","style","cssText","IS_NON_DIMENSIONAL","test","bindEvent","innerHTML","__html","pureRemoveAttribute","removeAttribute","ns","removeAttributeNS","pureSetAttribute","setAttribute","useCapture","event","nameLower","eventProxy$1","ret","diffLevel","isSvgMode","parent","ownerSVGElement","dom","innerDiffNode","updateSelf","item","index","ele","one","idiff","recollectNodeTree","parentNode","appendChild","out","nodeValue","createTextNode","replaceChild","vnodeName","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","getHost","shadowRoot","host","rpx","b","window","innerWidth","Number","arg","classNames","classes","argType","inner","join","_Array$prototype$slic","slice","class","unshift","o","JSON","stringify","createRef","store","root","global","Math","Reflect","hasOwnProperty","BuiltInHTMLElement","construct","setPrototypeOf","Promise","resolve","then","bind","setTimeout","_HTMLElement","elementId","id","computed","isInstalled","connectedCallback","_this2","inject","provide","injection","injectKey","attrsToProps","beforeInstall","install","afterInstall","attachShadow","mode","removeChild","elementStyles","adoptedStyleSheets","styleSheet","CSSStyleSheet","replaceSync","adoptedStyleSheet","styleSheets","beforeRender","_customStyleContent","_customStyleElement","rootNode","installed","disconnectedCallback","uninstall","update","ignoreAttrs","beforeUpdate","_willUpdate","rendered","forceUpdate","updated","_this3","updateProps","prevProps","val","getAttribute","Boolean","substr","Omi","parse","fire","data","CustomEvent","detail","_contents","contents","importPattern","console","warn","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","set","$locations","getAdopterByLocation","removeAdopterLocation","delete","_location","restyleAdopter","requestAnimationFrame","$basicStyleSheet","checkInvocationCorrectness","has","ConstructedStyleSheet","bootstrapper","body","WeakMap","getAssociatedLocation","locations","Location","attachAdoptedStyleSheetProperty","defineProperty","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","removedSheets","proto","attach_1","init","documentLocation","Component","defineElement","tag","elements","render","extractClass","omi","unbind","version","module","exports"],"mappings":";;IAqCO,SAASA,SAASC;QACvB,IAAMC,OAAOC,SAASC,cAAc;QACpCF,KAAKG,cAAcJ;QACnB,OAAOC;;IAGF,SAASI,UAAUC;QACxB,OAAOA,IAAIC,QAAQ,UAAU,SAACC,GAAGC;YAC/B,OAAOA,GAAGC;;;IAIP,SAASC,SAASC;QACvB,OAAOA,MAAMC;;IAGR,SAASC,OAAOC,KAAKH;QAC1B,KAAK,IAAII,KAAKJ,OAAOG,IAAIC,KAAKJ,MAAMI;QACpC,OAAOD;;IAOF,SAASE,SAASC,KAAKC;QAC5B,IAAW,QAAPD,KACF,IAAkB,qBAAPA,KAAmBA,IAAIC,aAC7BD,IAAIE,UAAUD;;IAehB,SAASE,QAAQN;QACtB,OAA+C,qBAAxCO,OAAOC,UAAUC,SAASC,KAAKV;;IAGjC,SAASW,UA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B;YACT,IAAM,gBAAA7J,QAAA;;gBAEF,IAAOyM,QAAA5B,QAAgB1V;gBACvB,IAAAuX,WAAAD,MAAA3J;gBACI2J,MAAA3J,eAAgB,SAAQ6J;oBACxB,IAAAzL,OAAAwL,SAAArX,KAAA2J,MAAgC2N;oBAC5B,IAAgB,aAAhBA,KAAQ5J,MACR4D,yBAA6BU,IAACrI,MAAAkC;oBAE9B,OAAIA;;;YAGhB,IAAA0L,mBAAaxE,sBAAAtU;YACb,IAAA8Y,iBAAwBzG,eACxByG,iBAAU9B,gBAGFhX,SAAAwE,iBAAiB,oBAAesU,iBAAA9B,QAAAjJ,KAAA+K;;;IAKxCvW,EAAAwG,IAAKtI;IGzTL,IAAAH;IACE,IAAAyY,YAAA5O;IACD,IAAA6O,gBAAA1O;;IAGD,IAAMyO;QACNE,KAAMD;QACN7O,WAAM+O;;QAENC,QAAYA;QACVF,GAAAA;QACA9O,eAAAA;QACA4O,SAAAA;QACAI,QAAAA;QACA5W,cALUqJ;QAMV3L,SAAAA;QACAqD,KAAAA;QACAgH,eARU0O;QASVpN,YAAAA;QACAC,cAAAA;QACAG,WAXUkB;QAYV8L,GAAAA;QACA1M,UAAAA;QACA8M,GAAAA;QACAlM,QAAAA;QACAH,KAhBU7I;QAiBVgV,KAAAA;QACA5Y,MAlBUyN;QAmBVnN,QAAAA;;IAGAmN,QAAAA,KAtBUgD,MAAAsI;IAuBVC,QAAAA,KAAAA,MAAAA;IAvBUhW,QAAZ8J,KAAA2D,IAAAwI,UAAA;IA0BAjW,IAAmB+V,sBAAXjM,QAARoM,OAAAC,UAAAJ,UAAArP,KAAA+G,MAAAsI","file":"omi.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","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) {\n /** @type {Element} */\n let node = isSvg\n ? document.createElementNS('http://www.w3.org/2000/svg', nodeName)\n : document.createElement(nodeName)\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 === '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 } from '../dom/index'\nimport { camelCase, isArray, Fragment } from '../util'\nimport { removeNode } from '../dom/index'\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 innerDiffNode(parent, vnode, hydrating, component, updateSelf)\n } else {\n ret = []\n vnode.forEach((item, index) => {\n let ele = idiff(index === 0 ? dom : null, item, component, updateSelf)\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","import { cssToDom, isArray, hyphenate, getValByPath, capitalize } from './util'\nimport { diff } from './vdom/diff'\nimport options from './options'\n\nlet id = 0\n\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 (this.constructor.elementStyles) {\n shadowRoot.adoptedStyleSheets = this.constructor.elementStyles\n } else {\n const css = this.constructor.css\n if (css) {\n if (typeof css === 'string') {\n const styleSheet = new CSSStyleSheet()\n styleSheet.replaceSync(css)\n shadowRoot.adoptedStyleSheets = [styleSheet]\n } else if (Object.prototype.toString.call(css) === '[object Array]') {\n const styleSheets = []\n css.forEach(styleSheet => {\n if (typeof styleSheet === 'string') {\n const adoptedStyleSheet = new CSSStyleSheet()\n adoptedStyleSheet.replaceSync(styleSheet)\n styleSheets.push(adoptedStyleSheet)\n } else {\n styleSheets.push(styleSheet)\n }\n shadowRoot.adoptedStyleSheets = styleSheets\n })\n } else {\n shadowRoot.adoptedStyleSheets = [css]\n }\n this.constructor.elementStyles = shadowRoot.adoptedStyleSheets\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 this._customStyleElement.textContent = this._customStyleContent\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 type = attrs[key]\n const val = ele.getAttribute(hyphenate(key))\n if (val !== null) {\n switch (type) {\n case String:\n ele.props[key] = val\n break\n case Number:\n ele.props[key] = Number(val)\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 break\n case Array:\n case Object:\n if (val[0] === ':') {\n ele.props[key] = getValByPath(val.substr(1), Omi.$)\n } else {\n ele.props[key] = JSON.parse(\n val\n .replace(/(['\"])?([a-zA-Z0-9_-]+)(['\"])?:([^\\/])/g, '\"$2\":$4')\n .replace(/'([\\s\\S]*?)'/g, '\"$1\"')\n .replace(/,(\\s*})/g, '$1')\n )\n }\n 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 p = ele.parentNode\n while (p) {\n if (p.host) {\n return p.host\n } else if (p.shadowRoot && p.shadowRoot.host) {\n return p.shadowRoot.host\n } else {\n p = p.parentNode\n }\n }\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 ('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.23.0'\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"]} \ No newline at end of file diff --git a/packages/omi/dist/omi.min.js b/packages/omi/dist/omi.min.js index 2caf40eb6..510ba0fd4 100644 --- a/packages/omi/dist/omi.min.js +++ b/packages/omi/dist/omi.min.js @@ -1,2 +1,2 @@ -!function(){"use strict";function e(e){var t=document.createElement("style");return t.textContent=e,t}function t(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function n(e){return e.children}function o(e,t){for(var n in t)e[n]=t[n];return e}function r(e,t){null!=e&&("function"==typeof e?e(t):e.current=t)}function i(e){return"[object Array]"===Object.prototype.toString.call(e)}function s(e){return"string"==typeof e&&e?e.replace(/]/g,"").replace(/\[/g,".").split("."):[]}function c(e){return e.replace(q,"-$1").toLowerCase()}function l(e){return e.replace(/\-(\w)/g,function(e,t){return t.toUpperCase()}).replace(/^\S/,function(e){return e.toUpperCase()})}function a(e,t){return s(e).forEach(function(e){t=t[e]}),t}function p(e,t){var o,r,i,s,c=[];for(s=arguments.length;s-- >2;)G.push(arguments[s]);t&&null!=t.children&&(G.length||G.push(t.children),delete t.children);while(G.length)if((r=G.pop())&&void 0!==r.pop)for(s=r.length;s--;)G.push(r[s]);else"boolean"==typeof r&&(r=null),(i="function"!=typeof e)&&(null==r?r="":"number"==typeof r?r+="":"string"!=typeof r&&(i=!1)),i&&o?c[c.length-1]+=r:0===c.length?c=[r]:c.push(r),o=i;if(e===n)return c;var l={nodeName:e,children:c,attributes:null==t?void 0:t,key:null==t?void 0:t.key};return void 0!==B.vnode&&B.vnode(l),l}function u(e,t,n){return"string"==typeof t||"number"==typeof t?void 0!==e.splitText:"string"==typeof t.nodeName?!e._componentConstructor&&f(e,t.nodeName):"function"==typeof t.nodeName?B.mapping[e.nodeName.toLowerCase()]===t.nodeName:n||e._componentConstructor===t.nodeName}function f(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function h(e,t){K["o-"+e]=t}function d(e,t,n){for(var o=s(t),r=e,i=0,c=o.length;i2?[].slice.call(arguments,2):e.children)}function F(e){var t=e.parentNode;while(t){if(t.host)return t.host;if(t.shadowRoot&&t.shadowRoot.host)return t.shadowRoot.host;t=t.parentNode}}function $(e){return e.replace(/([1-9]\d*|0)(\.\d*)*rpx/g,function(e,t){return window.innerWidth*+t/750+"px"})}function U(){for(var e=[],t=0;t0)return{class:U.apply(null,n)}}function V(e){return JSON.stringify(e)}function z(){return{}}var B={store:null,root:function(){return"object"==typeof global&&global&&global.Math===Math&&global.Array===Array?global:self||window||global||function(){return this}()}(),mapping:{}};!function(){if(void 0!==window.Reflect&&void 0!==window.customElements&&!window.customElements.hasOwnProperty("polyfillWrapFlushCallback")){var e=HTMLElement;window.HTMLElement=function(){return Reflect.construct(e,[],this.constructor)},HTMLElement.prototype=e.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,e)}}(),"function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;var q=/\B([A-Z])/g,G=[],Z=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,K={},Q=0,X=!1,Y=!1,ee=0,te=function(t){function n(){j(this,n);var e=_(this,t.call(this));return e.props=Object.assign({},e.constructor.defaultProps,e.props),e.elementId=ee++,e.computed={},e.isInstalled=!1,e}return L(n,t),n.prototype.connectedCallback=function(){var t=this,n=this.parentNode;while(n&&!this.store)this.store=n.store,n=n.parentNode||n.host;if(this.inject){this.injection={},n=this.parentNode;var o;while(n&&!o)o=n.provide,n=n.parentNode||n.host;if(!o)throw"The provide prop was not found on the parent node or the provide type is incorrect.";this.inject.forEach(function(e){t.injection[e]=o[e]})}this.attrsToProps(),this.beforeInstall(),this.install(),this.afterInstall();var r;if(this.constructor.isLightDom)r=this;else if(this.shadowRoot){r=this.shadowRoot;var s;while(s=r.firstChild)r.removeChild(s)}else r=this.attachShadow({mode:"open"});var c=this.constructor.css;if(c)if("string"==typeof c){var l=new CSSStyleSheet;l.replaceSync(c),r.adoptedStyleSheets=[l]}else if("[object Array]"===Object.prototype.toString.call(c)){var a=[];c.forEach(function(e){if("string"==typeof e){var t=new CSSStyleSheet;t.replaceSync(e),a.push(t)}else a.push(e);r.adoptedStyleSheets=a})}else r.adoptedStyleSheets=[c];this.beforeRender(),B.afterInstall&&B.afterInstall(this),this.rootNode=N(null,this.render(this.props,this.store),null,this),this.rendered(),this.css&&r.appendChild(e("function"==typeof this.css?this.css():this.css)),this.props.css&&(this.N=e(this.props.css),this.O=this.props.css,r.appendChild(this.N)),i(this.rootNode)?this.rootNode.forEach(function(e){r.appendChild(e)}):this.rootNode&&r.appendChild(this.rootNode),this.installed(),this.isInstalled=!0},n.prototype.disconnectedCallback=function(){this.uninstall(),this.isInstalled=!1},n.prototype.update=function(e,t){this.J=!0,this.beforeUpdate(),this.beforeRender(),this.O!=this.props.css&&(this.O=this.props.css,this.N.textContent=this.O),this.attrsToProps(e);var n=this.render(this.props,this.store);this.rendered(),this.rootNode=N(this.rootNode,n,this.constructor.isLightDom?this:this.shadowRoot,this,t),this.J=!1,this.updated()},n.prototype.forceUpdate=function(){this.update(!0)},n.prototype.updateProps=function(e){var t=this;Object.keys(e).forEach(function(n){t.props[n]=e[n],t.prevProps&&(t.prevProps[n]=e[n])}),this.forceUpdate()},n.prototype.updateSelf=function(e){this.update(e,!0)},n.prototype.removeAttribute=function(e){t.prototype.removeAttribute.call(this,e),this.isInstalled&&this.update()},n.prototype.setAttribute=function(e,n){n&&"object"==typeof n?t.prototype.setAttribute.call(this,e,JSON.stringify(n)):t.prototype.setAttribute.call(this,e,n),this.isInstalled&&this.update()},n.prototype.pureRemoveAttribute=function(e){t.prototype.removeAttribute.call(this,e)},n.prototype.pureSetAttribute=function(e,n){t.prototype.setAttribute.call(this,e,n)},n.prototype.attrsToProps=function(e){if(!(e||this.store&&this.store.ignoreAttrs||this.props.ignoreAttrs)){var t=this;t.props.css=t.getAttribute("css");var n=this.constructor.propTypes;n&&Object.keys(n).forEach(function(e){var o=n[e],r=t.getAttribute(c(e));if(null!==r)switch(o){case String:t.props[e]=r;break;case Number:t.props[e]=+r;break;case Boolean:t.props[e]="false"!==r&&"0"!==r;break;case Array:case Object:t.props[e]=":"===r[0]?a(r.substr(1),Omi.$):JSON.parse(r.replace(/(['"])?([a-zA-Z0-9_-]+)(['"])?:([^\/])/g,'"$2":$4').replace(/'([\s\S]*?)'/g,'"$1"').replace(/,(\s*})/g,"$1"))}else t.props[e]=t.constructor.defaultProps&&t.constructor.defaultProps.hasOwnProperty(e)?t.constructor.defaultProps[e]:null})}},n.prototype.fire=function(e,t){var n=this.props["on"+l(e)];n?n(new CustomEvent(e,{detail:t})):this.dispatchEvent(new CustomEvent(e,{detail:t}))},n.prototype.beforeInstall=function(){},n.prototype.install=function(){},n.prototype.afterInstall=function(){},n.prototype.installed=function(){},n.prototype.uninstall=function(){},n.prototype.beforeUpdate=function(){},n.prototype.updated=function(){},n.prototype.beforeRender=function(){},n.prototype.rendered=function(){},n.prototype.receiveProps=function(){},n}(HTMLElement);te.is="WeElement";var ne=["use","useSelf"],oe={}.hasOwnProperty;!function(){function e(e){var t=e.replace(R,"");return t!==e&&console.warn("@import rules are not allowed here. See https://github.com/WICG/construct-stylesheets/issues/119#issuecomment-588352418"),t.trim()}function t(e){for(var t=0;t0&&S(this),g(e,function(e){v(e).connect()})},U.disconnect=function(){$.get(this).disconnect()},U.update=function(e){var t=this,n=D.get(t)===document?"Document":"ShadowRoot";if(!Array.isArray(e))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+n+": Iterator getter is not callable.");if(!e.every(l))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+n+": Failed to convert value to 'CSSStyleSheet'");if(e.some(a))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+n+": Can't adopt non-constructed stylesheets");t.sheets=e;var o=F.get(t),c=r(e);i(o,c).forEach(function(e){s(u(e,t)),f(e,t)}),F.set(t,c),t.isConnected()&&c.length>0&&S(t)},window.CSSStyleSheet=y,m(Document),"ShadowRoot"in window){m(ShadowRoot);var J=Element.prototype,V=J.attachShadow;J.attachShadow=function(e){var t=V.call(this,e);return"closed"===e.mode&&P.set(this,t),t}}var z=v(document);z.isConnected()?z.connect():document.addEventListener("DOMContentLoaded",z.connect.bind(z))}}(),p.f=n;var re={},ie=te,se=W,ce=B.mapping,le={tag:H,WeElement:te,Component:ie,render:x,h:p,createElement:p,options:B,define:W,cloneElement:D,getHost:F,rpx:$,defineElement:se,classNames:U,extractClass:J,createRef:z,o:V,elements:ce,$:re,extend:h,get:y,set:d,bind:m,unbind:g};B.root.Omi=le,B.root.omi=le,B.root.Omi.version="6.22.2","undefined"!=typeof module?module.exports=le:self.Omi=le}(); +!function(){"use strict";function e(e){var t=document.createElement("style");return t.textContent=e,t}function t(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function n(e){return e.children}function o(e,t){for(var n in t)e[n]=t[n];return e}function r(e,t){null!=e&&("function"==typeof e?e(t):e.current=t)}function i(e){return"[object Array]"===Object.prototype.toString.call(e)}function s(e){return"string"==typeof e&&e?e.replace(/]/g,"").replace(/\[/g,".").split("."):[]}function c(e){return e.replace(q,"-$1").toLowerCase()}function l(e){return e.replace(/\-(\w)/g,function(e,t){return t.toUpperCase()}).replace(/^\S/,function(e){return e.toUpperCase()})}function a(e,t){return s(e).forEach(function(e){t=t[e]}),t}function p(e,t){var o,r,i,s,c=[];for(s=arguments.length;s-- >2;)G.push(arguments[s]);t&&null!=t.children&&(G.length||G.push(t.children),delete t.children);while(G.length)if((r=G.pop())&&void 0!==r.pop)for(s=r.length;s--;)G.push(r[s]);else"boolean"==typeof r&&(r=null),(i="function"!=typeof e)&&(null==r?r="":"number"==typeof r?r+="":"string"!=typeof r&&(i=!1)),i&&o?c[c.length-1]+=r:0===c.length?c=[r]:c.push(r),o=i;if(e===n)return c;var l={nodeName:e,children:c,attributes:null==t?void 0:t,key:null==t?void 0:t.key};return void 0!==B.vnode&&B.vnode(l),l}function u(e,t,n){return"string"==typeof t||"number"==typeof t?void 0!==e.splitText:"string"==typeof t.nodeName?!e._componentConstructor&&f(e,t.nodeName):"function"==typeof t.nodeName?B.mapping[e.nodeName.toLowerCase()]===t.nodeName:n||e._componentConstructor===t.nodeName}function f(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function h(e,t){K["o-"+e]=t}function d(e,t,n){for(var o=s(t),r=e,i=0,c=o.length;i2?[].slice.call(arguments,2):e.children)}function F(e){var t=e.parentNode;while(t){if(t.host)return t.host;if(t.shadowRoot&&t.shadowRoot.host)return t.shadowRoot.host;t=t.parentNode}}function $(e){return e.replace(/([1-9]\d*|0)(\.\d*)*rpx/g,function(e,t){return window.innerWidth*+t/750+"px"})}function U(){for(var e=[],t=0;t0)return{class:U.apply(null,n)}}function V(e){return JSON.stringify(e)}function z(){return{}}var B={store:null,root:function(){return"object"==typeof global&&global&&global.Math===Math&&global.Array===Array?global:self||window||global||function(){return this}()}(),mapping:{}};!function(){if(void 0!==window.Reflect&&void 0!==window.customElements&&!window.customElements.hasOwnProperty("polyfillWrapFlushCallback")){var e=HTMLElement;window.HTMLElement=function(){return Reflect.construct(e,[],this.constructor)},HTMLElement.prototype=e.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,e)}}(),"function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;var q=/\B([A-Z])/g,G=[],Z=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,K={},Q=0,X=!1,Y=!1,ee=0,te=function(t){function n(){j(this,n);var e=_(this,t.call(this));return e.props=Object.assign({},e.constructor.defaultProps,e.props),e.elementId=ee++,e.computed={},e.isInstalled=!1,e}return L(n,t),n.prototype.connectedCallback=function(){var t=this,n=this.parentNode;while(n&&!this.store)this.store=n.store,n=n.parentNode||n.host;if(this.inject){this.injection={},n=this.parentNode;var o;while(n&&!o)o=n.provide,n=n.parentNode||n.host;if(!o)throw"The provide prop was not found on the parent node or the provide type is incorrect.";this.inject.forEach(function(e){t.injection[e]=o[e]})}this.attrsToProps(),this.beforeInstall(),this.install(),this.afterInstall();var r;if(this.constructor.isLightDom)r=this;else if(this.shadowRoot){r=this.shadowRoot;var s;while(s=r.firstChild)r.removeChild(s)}else r=this.attachShadow({mode:"open"});if(this.constructor.elementStyles)r.adoptedStyleSheets=this.constructor.elementStyles;else{var c=this.constructor.css;if(c){if("string"==typeof c){var l=new CSSStyleSheet;l.replaceSync(c),r.adoptedStyleSheets=[l]}else if("[object Array]"===Object.prototype.toString.call(c)){var a=[];c.forEach(function(e){if("string"==typeof e){var t=new CSSStyleSheet;t.replaceSync(e),a.push(t)}else a.push(e);r.adoptedStyleSheets=a})}else r.adoptedStyleSheets=[c];this.constructor.elementStyles=r.adoptedStyleSheets}}this.beforeRender(),B.afterInstall&&B.afterInstall(this),this.rootNode=N(null,this.render(this.props,this.store),null,this),this.rendered(),this.css&&r.appendChild(e("function"==typeof this.css?this.css():this.css)),this.props.css&&(this.N=e(this.props.css),this.O=this.props.css,r.appendChild(this.N)),i(this.rootNode)?this.rootNode.forEach(function(e){r.appendChild(e)}):this.rootNode&&r.appendChild(this.rootNode),this.installed(),this.isInstalled=!0},n.prototype.disconnectedCallback=function(){this.uninstall(),this.isInstalled=!1},n.prototype.update=function(e,t){this.J=!0,this.beforeUpdate(),this.beforeRender(),this.O!=this.props.css&&(this.O=this.props.css,this.N.textContent=this.O),this.attrsToProps(e);var n=this.render(this.props,this.store);this.rendered(),this.rootNode=N(this.rootNode,n,this.constructor.isLightDom?this:this.shadowRoot,this,t),this.J=!1,this.updated()},n.prototype.forceUpdate=function(){this.update(!0)},n.prototype.updateProps=function(e){var t=this;Object.keys(e).forEach(function(n){t.props[n]=e[n],t.prevProps&&(t.prevProps[n]=e[n])}),this.forceUpdate()},n.prototype.updateSelf=function(e){this.update(e,!0)},n.prototype.removeAttribute=function(e){t.prototype.removeAttribute.call(this,e),this.isInstalled&&this.update()},n.prototype.setAttribute=function(e,n){n&&"object"==typeof n?t.prototype.setAttribute.call(this,e,JSON.stringify(n)):t.prototype.setAttribute.call(this,e,n),this.isInstalled&&this.update()},n.prototype.pureRemoveAttribute=function(e){t.prototype.removeAttribute.call(this,e)},n.prototype.pureSetAttribute=function(e,n){t.prototype.setAttribute.call(this,e,n)},n.prototype.attrsToProps=function(e){if(!(e||this.store&&this.store.ignoreAttrs||this.props.ignoreAttrs)){var t=this;t.props.css=t.getAttribute("css");var n=this.constructor.propTypes;n&&Object.keys(n).forEach(function(e){var o=n[e],r=t.getAttribute(c(e));if(null!==r)switch(o){case String:t.props[e]=r;break;case Number:t.props[e]=+r;break;case Boolean:t.props[e]="false"!==r&&"0"!==r;break;case Array:case Object:t.props[e]=":"===r[0]?a(r.substr(1),Omi.$):JSON.parse(r.replace(/(['"])?([a-zA-Z0-9_-]+)(['"])?:([^\/])/g,'"$2":$4').replace(/'([\s\S]*?)'/g,'"$1"').replace(/,(\s*})/g,"$1"))}else t.props[e]=t.constructor.defaultProps&&t.constructor.defaultProps.hasOwnProperty(e)?t.constructor.defaultProps[e]:null})}},n.prototype.fire=function(e,t){var n=this.props["on"+l(e)];n?n(new CustomEvent(e,{detail:t})):this.dispatchEvent(new CustomEvent(e,{detail:t}))},n.prototype.beforeInstall=function(){},n.prototype.install=function(){},n.prototype.afterInstall=function(){},n.prototype.installed=function(){},n.prototype.uninstall=function(){},n.prototype.beforeUpdate=function(){},n.prototype.updated=function(){},n.prototype.beforeRender=function(){},n.prototype.rendered=function(){},n.prototype.receiveProps=function(){},n}(HTMLElement);te.is="WeElement";var ne=["use","useSelf"],oe={}.hasOwnProperty;!function(){function e(e){var t=e.replace(R,"");return t!==e&&console.warn("@import rules are not allowed here. See https://github.com/WICG/construct-stylesheets/issues/119#issuecomment-588352418"),t.trim()}function t(e){for(var t=0;t0&&S(this),g(e,function(e){m(e).connect()})},U.disconnect=function(){$.get(this).disconnect()},U.update=function(e){var t=this,n=D.get(t)===document?"Document":"ShadowRoot";if(!Array.isArray(e))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+n+": Iterator getter is not callable.");if(!e.every(l))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+n+": Failed to convert value to 'CSSStyleSheet'");if(e.some(a))throw new TypeError("Failed to set the 'adoptedStyleSheets' property on "+n+": Can't adopt non-constructed stylesheets");t.sheets=e;var o=F.get(t),c=r(e);i(o,c).forEach(function(e){s(u(e,t)),f(e,t)}),F.set(t,c),t.isConnected()&&c.length>0&&S(t)},window.CSSStyleSheet=y,v(Document),"ShadowRoot"in window){v(ShadowRoot);var J=Element.prototype,V=J.attachShadow;J.attachShadow=function(e){var t=V.call(this,e);return"closed"===e.mode&&P.set(this,t),t}}var z=m(document);z.isConnected()?z.connect():document.addEventListener("DOMContentLoaded",z.connect.bind(z))}}(),p.f=n;var re={},ie=te,se=W,ce=B.mapping,le={tag:H,WeElement:te,Component:ie,render:x,h:p,createElement:p,options:B,define:W,cloneElement:D,getHost:F,rpx:$,defineElement:se,classNames:U,extractClass:J,createRef:z,o:V,elements:ce,$:re,extend:h,get:y,set:d,bind:v,unbind:g};B.root.Omi=le,B.root.omi=le,B.root.Omi.version="6.23.0","undefined"!=typeof module?module.exports=le:self.Omi=le}(); //# sourceMappingURL=omi.min.js.map \ No newline at end of file diff --git a/packages/omi/dist/omi.min.js.map b/packages/omi/dist/omi.min.js.map index aba3877d5..ba6d338dd 100644 --- a/packages/omi/dist/omi.min.js.map +++ b/packages/omi/dist/omi.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/util.js","../src/h.js","../src/vdom/index.js","../src/extend.js","../src/dom/index.js","../src/vdom/diff.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","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","style","cssText","IS_NON_DIMENSIONAL","test","bindEvent","innerHTML","__html","pureRemoveAttribute","removeAttribute","ns","removeAttributeNS","pureSetAttribute","setAttribute","className","useCapture","event","nameLower","eventProxy$1","ret","diffLevel","isSvgMode","parent","ownerSVGElement","dom","innerDiffNode","updateSelf","item","index","ele","one","idiff","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","getHost","shadowRoot","host","rpx","b","window","innerWidth","arg","classNames","classes","argType","inner","join","_Array$prototype$slic","slice","class","unshift","o","JSON","stringify","createRef","store","root","global","Math","Reflect","hasOwnProperty","BuiltInHTMLElement","construct","setPrototypeOf","Promise","resolve","then","bind","setTimeout","_HTMLElement","elementId","id","computed","isInstalled","connectedCallback","_this2","inject","provide","injection","injectKey","attrsToProps","beforeInstall","install","afterInstall","attachShadow","mode","removeChild","adoptedStyleSheets","styleSheet","replaceSync","adoptedStyleSheet","styleSheets","_customStyleContent","_customStyleElement","rootNode","installed","disconnectedCallback","uninstall","update","ignoreAttrs","beforeUpdate","_willUpdate","beforeRender","rendered","forceUpdate","updated","_this3","updateProps","val","getAttribute","Number","Boolean","substr","Omi","parse","fire","data","CustomEvent","detail","_contents","contents","importPattern","console","warn","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","set","$locations","getAdopterByLocation","removeAdopterLocation","delete","_location","restyleAdopter","requestAnimationFrame","$basicStyleSheet","checkInvocationCorrectness","has","ConstructedStyleSheet","bootstrapper","body","WeakMap","getAssociatedLocation","locations","Location","attachAdoptedStyleSheetProperty","defineProperty","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","CSSStyleSheet","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","render","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,MAA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xE,EAAAnU,SACb2Y,GAAwBzG,cACxByG,EAAU9B,UAGF7W,SAAAuE,iBAAiB,mBAAeoU,EAAA9B,QAAA/I,KAAA6K,QAKxCrW,EAAAyG,EAAKtI,CGzTL,IAAAH,OACEsY,GAAAzO,GACD0O,GAAAvO,eAGKsO,IACNE,IAAMD,EACN1O,UAAM4O,gBAENC,OAAYA,EACVF,EAAAA,EACA3O,cAAAA,EACAyO,QAAAA,EACAI,OAAAA,EACA1W,aALUsJ,EAMV3L,QAAAA,EACAmD,IAAAA,EACAkH,cARUuO,GASVjN,WAAAA,EACAC,aAAAA,EACAG,UAXUiB,EAYV4L,EAAAA,EACAxM,SAAAA,GACA4M,EAAAA,GACAhM,OAAAA,EACAH,IAhBU7I,EAiBV8U,IAAAA,EACAzY,KAlBUwN,EAmBVlN,OAAAA,EAGAkN,GAAAA,KAtBU8C,IAAAsI,GAuBVC,EAAAA,KAAAA,IAAAA,GAvBU/V,EAAZ+J,KAAAyD,IAAAwI,QAAA,SA0BmBF,mBAAX/L,QAARkM,OAAAC,QAAAJ,GAAAlP,KAAA4G,IAAAsI","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","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) {\n /** @type {Element} */\n let node = isSvg\n ? document.createElementNS('http://www.w3.org/2000/svg', nodeName)\n : document.createElement(nodeName)\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 === '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 } from '../dom/index'\nimport { camelCase, isArray, Fragment } from '../util'\nimport { removeNode } from '../dom/index'\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 innerDiffNode(parent, vnode, hydrating, component, updateSelf)\n } else {\n ret = []\n vnode.forEach((item, index) => {\n let ele = idiff(index === 0 ? dom : null, item, component, updateSelf)\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","import { cssToDom, isArray, hyphenate, getValByPath, capitalize } from './util'\nimport { diff } from './vdom/diff'\nimport options from './options'\n\nlet id = 0\n\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 const css = this.constructor.css\n if (css) {\n if (typeof css === 'string') {\n const styleSheet = new CSSStyleSheet()\n styleSheet.replaceSync(css)\n shadowRoot.adoptedStyleSheets = [styleSheet]\n } else if (Object.prototype.toString.call(css) === '[object Array]') {\n const styleSheets = []\n css.forEach(styleSheet => {\n if (typeof styleSheet === 'string') {\n const adoptedStyleSheet = new CSSStyleSheet()\n adoptedStyleSheet.replaceSync(styleSheet)\n styleSheets.push(adoptedStyleSheet)\n } else {\n styleSheets.push(styleSheet)\n }\n shadowRoot.adoptedStyleSheets = styleSheets\n })\n } else {\n shadowRoot.adoptedStyleSheets = [css]\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 this._customStyleElement.textContent = this._customStyleContent\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 type = attrs[key]\n const val = ele.getAttribute(hyphenate(key))\n if (val !== null) {\n switch (type) {\n case String:\n ele.props[key] = val\n break\n case Number:\n ele.props[key] = Number(val)\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 break\n case Array:\n case Object:\n if (val[0] === ':') {\n ele.props[key] = getValByPath(val.substr(1), Omi.$)\n } else {\n ele.props[key] = JSON.parse(\n val\n .replace(/(['\"])?([a-zA-Z0-9_-]+)(['\"])?:([^\\/])/g, '\"$2\":$4')\n .replace(/'([\\s\\S]*?)'/g, '\"$1\"')\n .replace(/,(\\s*})/g, '$1')\n )\n }\n 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 p = ele.parentNode\n while (p) {\n if (p.host) {\n return p.host\n } else if (p.shadowRoot && p.shadowRoot.host) {\n return p.shadowRoot.host\n } else {\n p = p.parentNode\n }\n }\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 ('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.22.2'\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"]} \ No newline at end of file +{"version":3,"sources":["../src/util.js","../src/h.js","../src/vdom/index.js","../src/extend.js","../src/dom/index.js","../src/vdom/diff.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","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","style","cssText","IS_NON_DIMENSIONAL","test","bindEvent","innerHTML","__html","pureRemoveAttribute","removeAttribute","ns","removeAttributeNS","pureSetAttribute","setAttribute","className","useCapture","event","nameLower","eventProxy$1","ret","diffLevel","isSvgMode","parent","ownerSVGElement","dom","innerDiffNode","updateSelf","item","index","ele","one","idiff","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","getHost","shadowRoot","host","rpx","b","window","innerWidth","arg","classNames","classes","argType","inner","join","_Array$prototype$slic","slice","class","unshift","o","JSON","stringify","createRef","store","root","global","Math","Reflect","hasOwnProperty","BuiltInHTMLElement","construct","setPrototypeOf","Promise","resolve","then","bind","setTimeout","_HTMLElement","elementId","id","computed","isInstalled","connectedCallback","_this2","inject","provide","injection","injectKey","attrsToProps","beforeInstall","install","afterInstall","attachShadow","mode","removeChild","elementStyles","adoptedStyleSheets","styleSheet","CSSStyleSheet","replaceSync","adoptedStyleSheet","styleSheets","beforeRender","_customStyleContent","_customStyleElement","rootNode","installed","disconnectedCallback","uninstall","update","ignoreAttrs","beforeUpdate","_willUpdate","rendered","forceUpdate","updated","_this3","updateProps","val","getAttribute","Number","Boolean","substr","Omi","parse","fire","data","CustomEvent","detail","_contents","contents","importPattern","console","warn","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","set","$locations","getAdopterByLocation","removeAdopterLocation","delete","_location","restyleAdopter","requestAnimationFrame","$basicStyleSheet","checkInvocationCorrectness","has","ConstructedStyleSheet","bootstrapper","body","WeakMap","getAssociatedLocation","locations","Location","attachAdoptedStyleSheetProperty","defineProperty","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","render","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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AavE,EAAArU,SACb4Y,GAAwBxG,cACxBwG,EAAU7B,UAGF/W,SAAAuE,iBAAiB,mBAAeqU,EAAA7B,QAAAjJ,KAAA8K,QAKxCtW,EAAAyG,EAAKtI,CGzTL,IAAAH,OACEuY,GAAA1O,GACD2O,GAAAxO,eAGKuO,IACNE,IAAMD,EACN3O,UAAM6O,gBAENC,OAAYA,EACVF,EAAAA,EACA5O,cAAAA,EACA0O,QAAAA,EACAI,OAAAA,EACA3W,aALUsJ,EAMV3L,QAAAA,EACAmD,IAAAA,EACAkH,cARUwO,GASVlN,WAAAA,EACAC,aAAAA,EACAG,UAXUiB,EAYV6L,EAAAA,EACAzM,SAAAA,GACA6M,EAAAA,GACAjM,OAAAA,EACAH,IAhBU7I,EAiBV+U,IAAAA,EACA1Y,KAlBUwN,EAmBVlN,OAAAA,EAGAkN,GAAAA,KAtBUgD,IAAAqI,GAuBVC,EAAAA,KAAAA,IAAAA,GAvBUhW,EAAZ+J,KAAA2D,IAAAuI,QAAA,SA0BmBF,mBAAXhM,QAARmM,OAAAC,QAAAJ,GAAAnP,KAAA8G,IAAAqI","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","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) {\n /** @type {Element} */\n let node = isSvg\n ? document.createElementNS('http://www.w3.org/2000/svg', nodeName)\n : document.createElement(nodeName)\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 === '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 } from '../dom/index'\nimport { camelCase, isArray, Fragment } from '../util'\nimport { removeNode } from '../dom/index'\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 innerDiffNode(parent, vnode, hydrating, component, updateSelf)\n } else {\n ret = []\n vnode.forEach((item, index) => {\n let ele = idiff(index === 0 ? dom : null, item, component, updateSelf)\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","import { cssToDom, isArray, hyphenate, getValByPath, capitalize } from './util'\nimport { diff } from './vdom/diff'\nimport options from './options'\n\nlet id = 0\n\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 (this.constructor.elementStyles) {\n shadowRoot.adoptedStyleSheets = this.constructor.elementStyles\n } else {\n const css = this.constructor.css\n if (css) {\n if (typeof css === 'string') {\n const styleSheet = new CSSStyleSheet()\n styleSheet.replaceSync(css)\n shadowRoot.adoptedStyleSheets = [styleSheet]\n } else if (Object.prototype.toString.call(css) === '[object Array]') {\n const styleSheets = []\n css.forEach(styleSheet => {\n if (typeof styleSheet === 'string') {\n const adoptedStyleSheet = new CSSStyleSheet()\n adoptedStyleSheet.replaceSync(styleSheet)\n styleSheets.push(adoptedStyleSheet)\n } else {\n styleSheets.push(styleSheet)\n }\n shadowRoot.adoptedStyleSheets = styleSheets\n })\n } else {\n shadowRoot.adoptedStyleSheets = [css]\n }\n this.constructor.elementStyles = shadowRoot.adoptedStyleSheets\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 this._customStyleElement.textContent = this._customStyleContent\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 type = attrs[key]\n const val = ele.getAttribute(hyphenate(key))\n if (val !== null) {\n switch (type) {\n case String:\n ele.props[key] = val\n break\n case Number:\n ele.props[key] = Number(val)\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 break\n case Array:\n case Object:\n if (val[0] === ':') {\n ele.props[key] = getValByPath(val.substr(1), Omi.$)\n } else {\n ele.props[key] = JSON.parse(\n val\n .replace(/(['\"])?([a-zA-Z0-9_-]+)(['\"])?:([^\\/])/g, '\"$2\":$4')\n .replace(/'([\\s\\S]*?)'/g, '\"$1\"')\n .replace(/,(\\s*})/g, '$1')\n )\n }\n 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 p = ele.parentNode\n while (p) {\n if (p.host) {\n return p.host\n } else if (p.shadowRoot && p.shadowRoot.host) {\n return p.shadowRoot.host\n } else {\n p = p.parentNode\n }\n }\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 ('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.23.0'\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"]} \ No newline at end of file diff --git a/packages/omi/examples/simple/index.html b/packages/omi/examples/simple/index.html index a554919cb..46646c52c 100644 --- a/packages/omi/examples/simple/index.html +++ b/packages/omi/examples/simple/index.html @@ -8,4 +8,4 @@ - + \ No newline at end of file diff --git a/packages/omi/package.json b/packages/omi/package.json index 4cfb49baf..820c2f276 100644 --- a/packages/omi/package.json +++ b/packages/omi/package.json @@ -1,6 +1,6 @@ { "name": "omi", - "version": "6.22.2", + "version": "6.23.0", "description": "Front End Cross-Frameworks Framework.", "main": "dist/omi.js", "jsnext:main": "dist/omi.esm.js", diff --git a/packages/omi/src/omi.js b/packages/omi/src/omi.js index 0209bd120..705aacf35 100644 --- a/packages/omi/src/omi.js +++ b/packages/omi/src/omi.js @@ -52,7 +52,7 @@ const omi = { options.root.Omi = omi options.root.omi = omi -options.root.Omi.version = '6.22.2' +options.root.Omi.version = '6.23.0' export default omi diff --git a/packages/omi/src/we-element.js b/packages/omi/src/we-element.js index f0d844b4e..b90a0e63c 100644 --- a/packages/omi/src/we-element.js +++ b/packages/omi/src/we-element.js @@ -63,26 +63,31 @@ export default class WeElement extends HTMLElement { } } - const css = this.constructor.css - if (css) { - if (typeof css === 'string') { - const styleSheet = new CSSStyleSheet() - styleSheet.replaceSync(css) - shadowRoot.adoptedStyleSheets = [styleSheet] - } else if (Object.prototype.toString.call(css) === '[object Array]') { - const styleSheets = [] - css.forEach(styleSheet => { - if (typeof styleSheet === 'string') { - const adoptedStyleSheet = new CSSStyleSheet() - adoptedStyleSheet.replaceSync(styleSheet) - styleSheets.push(adoptedStyleSheet) - } else { - styleSheets.push(styleSheet) - } - shadowRoot.adoptedStyleSheets = styleSheets - }) - } else { - shadowRoot.adoptedStyleSheets = [css] + if (this.constructor.elementStyles) { + shadowRoot.adoptedStyleSheets = this.constructor.elementStyles + } else { + const css = this.constructor.css + if (css) { + if (typeof css === 'string') { + const styleSheet = new CSSStyleSheet() + styleSheet.replaceSync(css) + shadowRoot.adoptedStyleSheets = [styleSheet] + } else if (Object.prototype.toString.call(css) === '[object Array]') { + const styleSheets = [] + css.forEach(styleSheet => { + if (typeof styleSheet === 'string') { + const adoptedStyleSheet = new CSSStyleSheet() + adoptedStyleSheet.replaceSync(styleSheet) + styleSheets.push(adoptedStyleSheet) + } else { + styleSheets.push(styleSheet) + } + shadowRoot.adoptedStyleSheets = styleSheets + }) + } else { + shadowRoot.adoptedStyleSheets = [css] + } + this.constructor.elementStyles = shadowRoot.adoptedStyleSheets } }