From d15bc3b6417cbb1e8e14673b07d0df10cb623f36 Mon Sep 17 00:00:00 2001 From: dntzhang Date: Tue, 15 Oct 2019 19:23:03 +0800 Subject: [PATCH] publish: omiv 6.15.5 --- packages/omi/dist/omi.dev.js | 13 +++++++++++-- packages/omi/dist/omi.dev.js.map | 2 +- packages/omi/dist/omi.esm.js | 13 +++++++++++-- packages/omi/dist/omi.esm.js.map | 2 +- packages/omi/dist/omi.js | 7 ++++++- packages/omi/dist/omi.js.map | 2 +- packages/omi/dist/omi.min.js | 2 +- packages/omi/dist/omi.min.js.map | 2 +- packages/omi/package.json | 2 +- packages/omi/src/omi.js | 2 +- 10 files changed, 35 insertions(+), 12 deletions(-) diff --git a/packages/omi/dist/omi.dev.js b/packages/omi/dist/omi.dev.js index 53f660bba1..89c32504af 100644 --- a/packages/omi/dist/omi.dev.js +++ b/packages/omi/dist/omi.dev.js @@ -1,5 +1,5 @@ /** - * omi v6.15.4 http://omijs.org + * omi v6.15.5 http://omijs.org * Omi === Preact + Scoped CSS + Store System + Native Support in 3kb javascript. * By dntzhang https://github.com/dntzhang * Github: https://github.com/Tencent/omi @@ -123,6 +123,10 @@ }); } + function Fragment(props) { + return props.children; + } + function extend(obj, props) { for (var i in props) { obj[i] = props[i]; @@ -475,6 +479,9 @@ // hydration is indicated by the existing element to be diffed not having a prop cache hydrating = dom != null && !('prevProps' in dom); } + if (vnode.nodeName === Fragment) { + vnode = vnode.children; + } if (isArray(vnode)) { if (parent) { var styles = parent.querySelectorAll('style'); @@ -1745,6 +1752,8 @@ var n=function(t,r,u,e){for(var p=1;p"===t?(a(), u=1):u&&("="===t?(u=4, r=e, e=""):"/"===t?(a(), 3===u&&(s=s[0]), u=s, (s=s[0]).push(u,4), u=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(a(), u=2):e+=t);}return a(), s},r="function"==typeof Map,u=r?new Map:{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)), r}:function(n){for(var r="",e=0;e1?r:r[0]} + h.f = Fragment; + var html = htm.bind(h); function createRef() { @@ -1787,7 +1796,7 @@ options.root.Omi = omi; options.root.omi = omi; - options.root.Omi.version = '6.15.4'; + options.root.Omi.version = '6.15.5'; 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 094b3e020f..9f3f12654f 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/vnode.js","../src/options.js","../src/h.js","../src/util.js","../src/constants.js","../src/vdom/index.js","../src/extend.js","../src/dom/index.js","../src/vdom/diff.js","../src/we-element.js","../src/proxy.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/htm/dist/htm.mjs","../src/omi.js","../src/omi.js"],"sourcesContent":["/** Virtual DOM Node */\nexport function VNode() {}\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 *\t@public\n *\t@namespace options {Object}\n */\nexport default {\n store: null,\n root: getGlobal(),\n\tmapping: {},\n\tisMultiStore: false\n}\n","import { VNode } from './vnode'\nimport options from './options'\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 let p = new VNode()\n p.nodeName = nodeName\n p.children = children\n p.attributes = attributes == null ? undefined : attributes\n p.key = attributes == null ? undefined : attributes.key\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","/**\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 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\n\nexport function getUse(data, paths, out, name) {\n const obj = []\n paths.forEach((path, index) => {\n const isPath = typeof path === 'string'\n if (isPath) {\n obj[index] = getTargetByPath(data, path)\n } else {\n const key = Object.keys(path)[0]\n const value = path[key]\n if (typeof value === 'string') {\n obj[index] = getTargetByPath(data, value)\n } else {\n const tempPath = value[0]\n if (typeof tempPath === 'string') {\n const tempVal = getTargetByPath(data, tempPath)\n obj[index] = value[1] ? value[1](tempVal) : tempVal\n } else {\n const args = []\n tempPath.forEach(path =>{\n args.push(getTargetByPath(data, path))\n })\n obj[index] = value[1].apply(null, args)\n }\n }\n obj[key] = obj[index]\n }\n\t})\n\tif(out) out[name] = obj\n return obj\n}\n\nexport function pathToArr(path) {\n\tif(typeof path !== 'string' || !path) return []\n\t// return path.split(/\\.|\\[|\\]/).filter(name => !!name)\n\treturn path.replace(/]/g, '').replace(/\\[/g, '.').split('.')\n}\n\nexport function getTargetByPath(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 return current\n}\n\nconst hyphenateRE = /\\B([A-Z])/g\nexport function hyphenate(str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase()\n}\n\nexport function getValByPath(path, current) {\n\tconst arr = pathToArr(path)\n\tarr.forEach(prop => {\n\t\tcurrent = current[prop]\n\t})\n\treturn current\n}\n\nexport function getPath(obj, out, name) {\n\tconst result = {}\n\tobj.forEach(item => {\n\t\tif (typeof item === 'string') {\n\t\t\tresult[item] = true\n\t\t} else {\n\t\t\tconst tempPath = item[Object.keys(item)[0]]\n\t\t\tif (typeof tempPath === 'string') {\n\t\t\t\tresult[tempPath] = true\n\t\t\t} else {\n\t\t\t\tif (typeof tempPath[0] === 'string') {\n\t\t\t\t\tresult[tempPath[0]] = true\n\t\t\t\t} else {\n\t\t\t\t\ttempPath[0].forEach(path => (result[path] = true))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\tif(out) out[name] = result\n\treturn result\n}\n\nexport function removeItem(item, arr){\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}","// 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\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf 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\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized 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\textension['o-' + name] = handler\n}\n\nexport function set(origin, path, value) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\t\tif (i === len - 1) {\n\t\t\t\t\tcurrent[arr[i]] = value\n\t\t\t} else {\n\t\t\t\t\tcurrent = current[arr[i]]\n\t\t\t}\n\t}\n}\n\nexport function get(origin, path) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\n\treturn current\n}\n\nfunction eventProxy(e) {\n return this._listeners[e.type](e)\n}\n\nexport function bind(el, type, handler){\n\tel._listeners = el._listeners || {}\n\tel._listeners[type] = handler\n\tel.addEventListener(type, eventProxy)\n}\n\nexport function unbind(el, type){\n\tel.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 let useCapture = name !== (name = name.replace(/Capture$/, ''))\n name = name.toLowerCase().substring(2)\n if (value) {\n if (!old) {\n node.addEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.addEventListener('touchstart', touchStart, useCapture)\n node.addEventListener('touchend', touchEnd, useCapture)\n }\n }\n } else {\n node.removeEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.removeEventListener('touchstart', touchStart, useCapture)\n node.removeEventListener('touchend', touchEnd, useCapture)\n }\n }\n ;(node._listeners || (node._listeners = {}))[name] = value\n } else if (node.nodeName === 'INPUT' && name === 'value'){\n node[name] = value == null ? '' : value\n } else if (name !== 'list' && name !== 'type' && name !== 'css' && !isSvg && name in node && value !== '') { //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 ? node.pureRemoveAttribute(name) : 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 node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : 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 ? node.pureSetAttribute(name, value) : 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 touchStart(e) {\n this.___touchX = e.touches[0].pageX\n this.___touchY = e.touches[0].pageY\n this.___scrollTop = document.body.scrollTop\n}\n\nfunction touchEnd(e) {\n if (\n Math.abs(e.changedTouches[0].pageX - this.___touchX) < 30 &&\n Math.abs(e.changedTouches[0].pageY - this.___touchY) < 30 &&\n Math.abs(document.body.scrollTop - this.___scrollTop) < 30\n ) {\n this.dispatchEvent(new CustomEvent('tap', { detail: e }))\n }\n}\n","import { ATTR_KEY } from '../constants'\nimport { isSameNodeType, isNamedNode } from './index'\nimport { createNode, setAccessor } from '../dom/index'\nimport { camelCase, isArray } 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 *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\n *\t@returns {Element} dom\t\t\tThe created/mutated element\n *\t@private\n */\nexport function diff(dom, vnode, parent, component, updateSelf) {\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 (isArray(vnode)) {\n if (parent) {\n const styles = parent.querySelectorAll('style')\n styles.forEach(s => {\n parent.removeChild(s)\n })\n innerDiffNode(parent, vnode, hydrating, component, updateSelf)\n\n for (let i = styles.length - 1; i >= 0; i--) {\n parent.firstChild ? parent.insertBefore(styles[i], parent.firstChild) : parent.appendChild(style[i])\n }\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 *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\n *\t@param {Boolean} isHydrating\tIf `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 // 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 // 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 *\t@param {Node} node\t\t\t\t\t\tDOM node to start unmount/removal from\n *\t@param {Boolean} [unmountOnly=false]\tIf `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 *\t- we use .lastChild here because it causes less reflow than .firstChild\n *\t- 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 *\t@param {Element} dom\t\tElement with attributes to diff `attrs` against\n *\t@param {Object} attrs\t\tThe desired end-state key-value attribute pairs\n *\t@param {Object} old\t\t\tCurrent/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(dom, name, old[name], (old[name] = undefined), isSvgMode, component)\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(dom, name, old[name], (old[name] = attrs[name]), isSvgMode, component)\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 if (isWeElement) {\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 {\n\tcssToDom,\n\tisArray,\n\tgetUse,\n\thyphenate,\n\tgetValByPath,\n\tremoveItem\n} from './util'\nimport { diff } from './vdom/diff'\nimport options from './options'\nimport { getPath } from './util'\n\nlet id = 0\n\nexport default class WeElement extends HTMLElement {\n\tstatic is = 'WeElement'\n\n\tconstructor() {\n\t\tsuper()\n\t\tthis.props = Object.assign({},\n\t\t\tthis.constructor.defaultProps\n\t\t)\n\t\tthis.elementId = id++\n\t}\n\n\tconnectedCallback() {\n\t\tlet p = this.parentNode\n\t\twhile (p && !this.store) {\n\t\t\tthis.store = p.store\n\t\t\tp = p.parentNode || p.host\n\t\t}\n\n\t\tif (this.use) {\n\t\t\tlet use\n\t\t\tif (typeof this.use === 'function') {\n\t\t\t\tuse = this.use()\n\t\t\t} else {\n\t\t\t\tuse = this.use\n\t\t\t}\n\n\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\t_updatePath[storeName] = {}\n\t\t\t\t\tusing[storeName] = {}\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].instances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.using = using\n\t\t\t\tthis._updatePath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updatePath = getPath(use)\n\t\t\t\tthis.using = getUse(this.store.data, use)\n\t\t\t\tthis.store.instances.push(this)\n\t\t\t}\n\t\t}\n\t\tif (this.useSelf) {\n\t\t\tconst use = typeof this.useSelf === 'function' ? this.useSelf() : this.useSelf\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].updateSelfInstances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.usingSelf = using\n\t\t\t\tthis._updateSelfPath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updateSelfPath = getPath(use)\n\t\t\t\tthis.usingSelf = getUse(this.store.data, use)\n\t\t\t\tthis.store.updateSelfInstances.push(this)\n\t\t\t}\n\t\t}\n\t\tthis.attrsToProps()\n\t\tthis.beforeInstall()\n\t\tthis.install()\n\t\tthis.afterInstall()\n\n\t\tlet shadowRoot\n\t\tif (!this.shadowRoot) {\n\t\t\tshadowRoot = this.attachShadow({\n\t\t\t\tmode: 'open'\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot = this.shadowRoot\n\t\t\tlet fc\n\t\t\twhile ((fc = shadowRoot.firstChild)) {\n\t\t\t\tshadowRoot.removeChild(fc)\n\t\t\t}\n\t\t}\n\n\t\tif (this.constructor.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(this.constructor.css))\n\t\t} else if (this.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(typeof this.css === 'function' ? this.css() : this.css))\n\t\t}\n\t\tthis.beforeRender()\n\t\toptions.afterInstall && options.afterInstall(this)\n\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.__hasChildren = Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0\n\n\t\tthis.rootNode = diff(\n\t\t\tnull,\n\t\t\trendered,\n\t\t\tnull,\n\t\t\tthis\n\t\t)\n\t\tthis.rendered()\n\n\t\tif (this.props.css) {\n\t\t\tthis._customStyleElement = cssToDom(this.props.css)\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tshadowRoot.appendChild(this._customStyleElement)\n\t\t}\n\n\t\tif (isArray(this.rootNode)) {\n\t\t\tthis.rootNode.forEach(function (item) {\n\t\t\t\tshadowRoot.appendChild(item)\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot.appendChild(this.rootNode)\n\t\t}\n\t\tthis.installed()\n\t\tthis._isInstalled = true\n\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.uninstall()\n\t\tthis._isInstalled = false\n\t\tif (this.store) {\n\t\t\tif(options.isMultiStore){\n\t\t\t\tfor(let key in this.store){\n\t\t\t\t\tconst current = this.store[key]\n\t\t\t\t\tremoveItem(this, current.instances)\n\t\t\t\t removeItem(this, current.updateSelfInstances)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tremoveItem(this, this.store.instances)\n\t\t\t\tremoveItem(this, this.store.updateSelfInstances)\n\t\t\t}\n\t\t}\n\t}\n\n\tupdate(ignoreAttrs, updateSelf) {\n\t\tthis._willUpdate = true\n\t\tthis.beforeUpdate()\n\t\tthis.beforeRender()\n\t\t//fix null !== undefined\n\t\tif (this._customStyleContent != this.props.css) {\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tthis._customStyleElement.textContent = this._customStyleContent\n\t\t}\n\t\tthis.attrsToProps(ignoreAttrs)\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.rendered()\n\t\tthis.__hasChildren = this.__hasChildren || (Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0)\n\n\t\tthis.rootNode = diff(\n\t\t\tthis.rootNode,\n\t\t\trendered,\n\t\t\tthis.shadowRoot,\n\t\t\tthis,\n\t\t\tupdateSelf\n\t\t)\n\t\tthis._willUpdate = false\n\t\tthis.updated()\n\n\t}\n\n\tupdateSelf(ignoreAttrs) {\n\t\tthis.update(ignoreAttrs, true)\n\t}\n\n\tremoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t\t//Avoid executing removeAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tsetAttribute(key, val) {\n\t\tif (val && typeof val === 'object') {\n\t\t\tsuper.setAttribute(key, JSON.stringify(val))\n\t\t} else {\n\t\t\tsuper.setAttribute(key, val)\n\t\t}\n\t\t//Avoid executing setAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tpureRemoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t}\n\n\tpureSetAttribute(key, val) {\n\t\tsuper.setAttribute(key, val)\n\t}\n\n\tattrsToProps(ignoreAttrs) {\n\t\tconst ele = this\n\t\tif (ele.normalizedNodeName || ignoreAttrs) return\n\t\tele.props['css'] = ele.getAttribute('css')\n\t\tconst attrs = this.constructor.propTypes\n\t\tif (!attrs) return\n\t\tObject.keys(attrs).forEach(key => {\n\t\t\tconst type = attrs[key]\n\t\t\tconst val = ele.getAttribute(hyphenate(key))\n\t\t\tif (val !== null) {\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase String:\n\t\t\t\t\t\tele.props[key] = val\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Number:\n\t\t\t\t\t\tele.props[key] = Number(val)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Boolean:\n\t\t\t\t\t\tif (val === 'false' || val === '0') {\n\t\t\t\t\t\t\tele.props[key] = false\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = true\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Array:\n\t\t\t\t\tcase Object:\n\t\t\t\t\t\tif (val[0] === ':') {\n\t\t\t\t\t\t\tele.props[key] = getValByPath(val.substr(1), Omi.$)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = JSON.parse(val\n\t\t\t\t\t\t\t\t.replace(/(['\"])?([a-zA-Z0-9_-]+)(['\"])?:([^\\/])/g, '\"$2\":$4')\n\t\t\t\t\t\t\t\t.replace(/'([\\s\\S]*?)'/g, '\"$1\"')\n\t\t\t\t\t\t\t\t.replace(/,(\\s*})/g, '$1')\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (ele.constructor.defaultProps && ele.constructor.defaultProps.hasOwnProperty(key)) {\n\t\t\t\t\tele.props[key] = ele.constructor.defaultProps[key]\n\t\t\t\t} else {\n\t\t\t\t\tele.props[key] = null\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tfire(name, data) {\n\t\tthis.dispatchEvent(new CustomEvent(name, {\n\t\t\tdetail: data\n\t\t}))\n\t}\n\n\tbeforeInstall() {}\n\n\tinstall() {}\n\n\tafterInstall() {}\n\n\tinstalled() {}\n\n\tuninstall() {}\n\n\tbeforeUpdate() {}\n\n\tupdated() {}\n\n\tbeforeRender() {}\n\n\trendered() {}\n\n\treceiveProps() {}\n\n}\n","/*!\n * https://github.com/Palindrom/JSONPatcherProxy\n * (c) 2017 Starcounter\n * MIT license\n */\n\n/** Class representing a JS Object observer */\nconst JSONPatcherProxy = (function() {\n /**\n * Deep clones your object and returns a new object.\n */\n function deepClone(obj) {\n switch (typeof obj) {\n case 'object':\n return JSON.parse(JSON.stringify(obj)) //Faster than ES5 clone - http://jsperf.com/deep-cloning-of-objects/5\n case 'undefined':\n return null //this is how JSON.stringify behaves for array items\n default:\n return obj //no need to clone primitives\n }\n }\n JSONPatcherProxy.deepClone = deepClone\n\n function escapePathComponent(str) {\n if (str.indexOf('/') == -1 && str.indexOf('~') == -1) return str\n return str.replace(/~/g, '~0').replace(/\\//g, '~1')\n }\n JSONPatcherProxy.escapePathComponent = escapePathComponent\n\n /**\n * Walk up the parenthood tree to get the path\n * @param {JSONPatcherProxy} instance\n * @param {Object} obj the object you need to find its path\n */\n function findObjectPath(instance, obj) {\n const pathComponents = []\n let parentAndPath = instance.parenthoodMap.get(obj)\n while (parentAndPath && parentAndPath.path) {\n // because we're walking up-tree, we need to use the array as a stack\n pathComponents.unshift(parentAndPath.path)\n parentAndPath = instance.parenthoodMap.get(parentAndPath.parent)\n }\n if (pathComponents.length) {\n const path = pathComponents.join('/')\n return '/' + path\n }\n return ''\n }\n /**\n * A callback to be used as th proxy set trap callback.\n * It updates parenthood map if needed, proxifies nested newly-added objects, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the affected object\n * @param {String} key the effect property's name\n * @param {Any} newValue the value being set\n */\n function setTrap(instance, target, key, newValue) {\n const parentPath = findObjectPath(instance, target)\n\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n if (instance.proxifiedObjectsMap.has(newValue)) {\n const newValueOriginalObject = instance.proxifiedObjectsMap.get(newValue)\n\n instance.parenthoodMap.set(newValueOriginalObject.originalObject, {\n parent: target,\n path: key\n })\n }\n /*\n mark already proxified values as inherited.\n rationale: proxy.arr.shift()\n will emit\n {op: replace, path: '/arr/1', value: arr_2}\n {op: remove, path: '/arr/2'}\n\n by default, the second operation would revoke the proxy, and this renders arr revoked.\n That's why we need to remember the proxies that are inherited.\n */\n const revokableInstance = instance.proxifiedObjectsMap.get(newValue)\n /*\n Why do we need to check instance.isProxifyingTreeNow?\n\n We need to make sure we mark revokables as inherited ONLY when we're observing,\n because throughout the first proxification, a sub-object is proxified and then assigned to\n its parent object. This assignment of a pre-proxified object can fool us into thinking\n that it's a proxified object moved around, while in fact it's the first assignment ever.\n\n Checking isProxifyingTreeNow ensures this is not happening in the first proxification,\n but in fact is is a proxified object moved around the tree\n */\n if (revokableInstance && !instance.isProxifyingTreeNow) {\n revokableInstance.inherited = true\n }\n\n // if the new value is an object, make sure to watch it\n if (\n newValue &&\n typeof newValue == 'object' &&\n !instance.proxifiedObjectsMap.has(newValue)\n ) {\n instance.parenthoodMap.set(newValue, {\n parent: target,\n path: key\n })\n newValue = instance._proxifyObjectTreeRecursively(target, newValue, key)\n }\n // let's start with this operation, and may or may not update it later\n const operation = {\n op: 'remove',\n path: destinationPropKey\n }\n if (typeof newValue == 'undefined') {\n // applying De Morgan's laws would be a tad faster, but less readable\n if (!Array.isArray(target) && !target.hasOwnProperty(key)) {\n // `undefined` is being set to an already undefined value, keep silent\n return Reflect.set(target, key, newValue)\n }\n // when array element is set to `undefined`, should generate replace to `null`\n if (Array.isArray(target)) {\n // undefined array elements are JSON.stringified to `null`\n ;(operation.op = 'replace'), (operation.value = null)\n }\n const oldValue = instance.proxifiedObjectsMap.get(target[key])\n // was the deleted a proxified object?\n if (oldValue) {\n instance.parenthoodMap.delete(target[key])\n instance.disableTrapsForProxy(oldValue)\n instance.proxifiedObjectsMap.delete(oldValue)\n }\n } else {\n if (Array.isArray(target) && !Number.isInteger(+key.toString())) {\n /* array props (as opposed to indices) don't emit any patches, to avoid needless `length` patches */\n if (key != 'length') {\n console.warn(\n 'JSONPatcherProxy noticed a non-integer prop was set for an array. This will not emit a patch'\n )\n }\n return Reflect.set(target, key, newValue)\n }\n operation.op = 'add'\n if (target.hasOwnProperty(key)) {\n if (typeof target[key] !== 'undefined' || Array.isArray(target)) {\n operation.op = 'replace' // setting `undefined` array elements is a `replace` op\n }\n }\n operation.value = newValue\n }\n operation.oldValue = target[key]\n const reflectionResult = Reflect.set(target, key, newValue)\n instance.defaultCallback(operation)\n return reflectionResult\n }\n /**\n * A callback to be used as th proxy delete trap callback.\n * It updates parenthood map if needed, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the effected object\n * @param {String} key the effected property's name\n */\n function deleteTrap(instance, target, key) {\n if (typeof target[key] !== 'undefined') {\n const parentPath = findObjectPath(instance, target)\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n const revokableProxyInstance = instance.proxifiedObjectsMap.get(\n target[key]\n )\n\n if (revokableProxyInstance) {\n if (revokableProxyInstance.inherited) {\n /*\n this is an inherited proxy (an already proxified object that was moved around),\n we shouldn't revoke it, because even though it was removed from path1, it is still used in path2.\n And we know that because we mark moved proxies with `inherited` flag when we move them\n\n it is a good idea to remove this flag if we come across it here, in deleteProperty trap.\n We DO want to revoke the proxy if it was removed again.\n */\n revokableProxyInstance.inherited = false\n } else {\n instance.parenthoodMap.delete(revokableProxyInstance.originalObject)\n instance.disableTrapsForProxy(revokableProxyInstance)\n instance.proxifiedObjectsMap.delete(target[key])\n }\n }\n const reflectionResult = Reflect.deleteProperty(target, key)\n\n instance.defaultCallback({\n op: 'remove',\n path: destinationPropKey\n })\n\n return reflectionResult\n }\n }\n /* pre-define resume and pause functions to enhance constructors performance */\n function resume() {\n this.defaultCallback = operation => {\n this.isRecording && this.patches.push(operation)\n this.userCallback && this.userCallback(operation)\n }\n this.isObserving = true\n }\n function pause() {\n this.defaultCallback = () => {}\n this.isObserving = false\n }\n /**\n * Creates an instance of JSONPatcherProxy around your object of interest `root`.\n * @param {Object|Array} root - the object you want to wrap\n * @param {Boolean} [showDetachedWarning = true] - whether to log a warning when a detached sub-object is modified @see {@link https://github.com/Palindrom/JSONPatcherProxy#detached-objects}\n * @returns {JSONPatcherProxy}\n * @constructor\n */\n function JSONPatcherProxy(root, showDetachedWarning) {\n this.isProxifyingTreeNow = false\n this.isObserving = false\n this.proxifiedObjectsMap = new Map()\n this.parenthoodMap = new Map()\n // default to true\n if (typeof showDetachedWarning !== 'boolean') {\n showDetachedWarning = true\n }\n\n this.showDetachedWarning = showDetachedWarning\n this.originalObject = root\n this.cachedProxy = null\n this.isRecording = false\n this.userCallback\n /**\n * @memberof JSONPatcherProxy\n * Restores callback back to the original one provided to `observe`.\n */\n this.resume = resume.bind(this)\n /**\n * @memberof JSONPatcherProxy\n * Replaces your callback with a noop function.\n */\n this.pause = pause.bind(this)\n }\n\n JSONPatcherProxy.prototype.generateProxyAtPath = function(parent, obj, path) {\n if (!obj) {\n return obj\n }\n const traps = {\n set: (target, key, value, receiver) =>\n setTrap(this, target, key, value, receiver),\n deleteProperty: (target, key) => deleteTrap(this, target, key)\n }\n const revocableInstance = Proxy.revocable(obj, traps)\n // cache traps object to disable them later.\n revocableInstance.trapsInstance = traps\n revocableInstance.originalObject = obj\n\n /* keeping track of object's parent and path */\n\n this.parenthoodMap.set(obj, { parent, path })\n\n /* keeping track of all the proxies to be able to revoke them later */\n this.proxifiedObjectsMap.set(revocableInstance.proxy, revocableInstance)\n return revocableInstance.proxy\n }\n // grab tree's leaves one by one, encapsulate them into a proxy and return\n JSONPatcherProxy.prototype._proxifyObjectTreeRecursively = function(\n parent,\n root,\n path\n ) {\n for (let key in root) {\n if (root.hasOwnProperty(key)) {\n if (root[key] instanceof Object) {\n root[key] = this._proxifyObjectTreeRecursively(\n root,\n root[key],\n escapePathComponent(key)\n )\n }\n }\n }\n return this.generateProxyAtPath(parent, root, path)\n }\n // this function is for aesthetic purposes\n JSONPatcherProxy.prototype.proxifyObjectTree = function(root) {\n /*\n while proxyifying object tree,\n the proxyifying operation itself is being\n recorded, which in an unwanted behavior,\n that's why we disable recording through this\n initial process;\n */\n this.pause()\n this.isProxifyingTreeNow = true\n const proxifiedObject = this._proxifyObjectTreeRecursively(\n undefined,\n root,\n ''\n )\n /* OK you can record now */\n this.isProxifyingTreeNow = false\n this.resume()\n return proxifiedObject\n }\n /**\n * Turns a proxified object into a forward-proxy object; doesn't emit any patches anymore, like a normal object\n * @param {Proxy} proxy - The target proxy object\n */\n JSONPatcherProxy.prototype.disableTrapsForProxy = function(\n revokableProxyInstance\n ) {\n if (this.showDetachedWarning) {\n const message =\n \"You're accessing an object that is detached from the observedObject tree, see https://github.com/Palindrom/JSONPatcherProxy#detached-objects\"\n\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.deleteProperty = (\n targetObject,\n propKey\n ) => {\n return Reflect.deleteProperty(targetObject, propKey)\n }\n } else {\n delete revokableProxyInstance.trapsInstance.set\n delete revokableProxyInstance.trapsInstance.get\n delete revokableProxyInstance.trapsInstance.deleteProperty\n }\n }\n /**\n * Proxifies the object that was passed in the constructor and returns a proxified mirror of it. Even though both parameters are options. You need to pass at least one of them.\n * @param {Boolean} [record] - whether to record object changes to a later-retrievable patches array.\n * @param {Function} [callback] - this will be synchronously called with every object change with a single `patch` as the only parameter.\n */\n JSONPatcherProxy.prototype.observe = function(record, callback) {\n if (!record && !callback) {\n throw new Error('You need to either record changes or pass a callback')\n }\n this.isRecording = record\n this.userCallback = callback\n /*\n I moved it here to remove it from `unobserve`,\n this will also make the constructor faster, why initiate\n the array before they decide to actually observe with recording?\n They might need to use only a callback.\n */\n if (record) this.patches = []\n this.cachedProxy = this.proxifyObjectTree(this.originalObject)\n return this.cachedProxy\n }\n /**\n * If the observed is set to record, it will synchronously return all the patches and empties patches array.\n */\n JSONPatcherProxy.prototype.generate = function() {\n if (!this.isRecording) {\n throw new Error('You should set record to true to get patches later')\n }\n return this.patches.splice(0, this.patches.length)\n }\n /**\n * Revokes all proxies rendering the observed object useless and good for garbage collection @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/revocable}\n */\n JSONPatcherProxy.prototype.revoke = function() {\n this.proxifiedObjectsMap.forEach(el => {\n el.revoke()\n })\n }\n /**\n * Disables all proxies' traps, turning the observed object into a forward-proxy object, like a normal object that you can modify silently.\n */\n JSONPatcherProxy.prototype.disableTraps = function() {\n this.proxifiedObjectsMap.forEach(this.disableTrapsForProxy, this)\n }\n return JSONPatcherProxy\n})()\n\nexport default JSONPatcherProxy\n","import { diff } from './vdom/diff'\nimport JSONProxy from './proxy'\nimport { getUse } from './util'\nimport options from './options'\n\nexport function render(vnode, parent, store) {\n\tparent = typeof parent === 'string' ? document.querySelector(parent) : parent\n\tif (store) {\n\t\tif (store.data) {\n\t\t\tobserveStore(store)\n\t\t} else {\n\t\t\toptions.isMultiStore = true\n\t\t\t//Multi-store injection\n\t\t\tfor (let key in store) {\n\t\t\t\tobserveStore(store[key], key)\n\t\t\t}\n\t\t}\n\t\tparent.store = store\n\t}\n\treturn diff(null, vnode, parent, false)\n}\n\nfunction observeStore(store, key) {\n\tstore.instances = []\n\tstore.updateSelfInstances = []\n\textendStoreUpate(store, key)\n\n\tstore.data = new JSONProxy(store.data).observe(false, function (patch) {\n\t\tconst patchs = {}\n\t\tif (patch.op === 'remove') {\n\t\t\t// fix arr splice\n\t\t\tconst kv = getArrayPatch(patch.path, store)\n\t\t\tpatchs[kv.k] = kv.v\n\n\t\t\tupdate(patchs, store)\n\n\t\t} else {\n\t\t\tconst key = fixPath(patch.path)\n\t\t\tpatchs[key] = patch.value\n\n\t\t\tupdate(patchs, store)\n\n\t\t}\n\t})\n}\n\nfunction update(patch, store) {\n\tstore.update(patch)\n}\n\nfunction extendStoreUpate(store, key) {\n\tstore.update = function (patch) {\n\t\tif (Object.keys(patch).length > 0) {\n\t\t\tthis.instances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && instance._updatePath[key] && needUpdate(patch, instance._updatePath[key]))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.use === 'function' ? instance.use() : instance.use)[key], instance.using, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && needUpdate(patch, instance._updatePath))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tinstance.using = getUse(store.data, typeof instance.use === 'function' ? instance.use() : instance.use)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t})\n\n\t\t\tthis.updateSelfInstances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updateSelfPath && instance._updateSelfPath[key] && needUpdate(patch, instance._updateSelfPath[key]))) {\n\t\t\t\t\t\tif (instance.useSelf) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)[key], instance.usingSelf, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (instance._updateSelfPath && needUpdate(patch, instance._updateSelfPath)) {\n\t\t\t\t\t\tinstance.usingSelf = getUse(store.data, typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\tthis.onChange && this.onChange(patch)\n\t\t}\n\t}\n}\n\n\nexport function needUpdate(diffResult, updatePath) {\n\tfor (let keyA in diffResult) {\n\t\tif (updatePath[keyA]) {\n\t\t\treturn true\n\t\t}\n\t\tfor (let keyB in updatePath) {\n\t\t\tif (includePath(keyA, keyB)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\treturn false\n}\n\nfunction includePath(pathA, pathB) {\n\tif (pathA.indexOf(pathB) === 0) {\n\t\tconst next = pathA.substr(pathB.length, 1)\n\t\tif (next === '[' || next === '.') {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nexport function fixPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tarr.forEach((item, index) => {\n\t\tif (index) {\n\t\t\tif (isNaN(Number(item))) {\n\t\t\t\tmpPath += '.' + item\n\t\t\t} else {\n\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t}\n\t\t} else {\n\t\t\tmpPath += item\n\t\t}\n\t})\n\treturn mpPath\n}\n\nfunction getArrayPatch(path, store) {\n\tconst arr = path.replace('/', '').split('/')\n\tlet current = store.data[arr[0]]\n\tfor (let i = 1, len = arr.length; i < len - 1; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\treturn {\n\t\tk: fixArrPath(path),\n\t\tv: current\n\t}\n}\n\nfunction fixArrPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tconst len = arr.length\n\tarr.forEach((item, index) => {\n\t\tif (index < len - 1) {\n\t\t\tif (index) {\n\t\t\t\tif (isNaN(Number(item))) {\n\t\t\t\t\tmpPath += '.' + item\n\t\t\t\t} else {\n\t\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmpPath += item\n\t\t\t}\n\t\t}\n\t})\n\treturn mpPath\n}\n","import WeElement from './we-element'\nimport options from './options'\n\nexport function define(name, ctor, config) {\n if (options.mapping[name]) {\n return\n }\n if (ctor.is === 'WeElement') {\n customElements.define(name, ctor)\n options.mapping[name] = ctor\n\n } else {\n \n if (typeof config === 'string') {\n config = { css: config }\n } else {\n config = config || { }\n }\n\n class Ele extends WeElement {\n\n static css = config.css\n\n static propTypes = config.propTypes\n\n static defaultProps = config.defaultProps\n\n render() {\n return ctor.call(this, this)\n }\n\n receiveProps() {\n if (config.receiveProps) {\n return config.receiveProps.apply(this, arguments)\n }\n }\n }\n\n const eleHooks = ['install', 'installed', 'uninstall', 'beforeUpdate', 'updated', 'beforeRender', 'rendered'],\n storeHelpers = ['use', 'useSelf']\n\n eleHooks.forEach(hook => {\n if (config[hook]) {\n Ele.prototype[hook] = function () {\n config[hook].apply(this, arguments)\n }\n }\n })\n\n storeHelpers.forEach(func => {\n if (config[func]) {\n Ele.prototype[func] = function () {\n return typeof config[func] === 'function'\n ? config[func].apply(this, arguments)\n : config[func]\n }\n }\n })\n\n customElements.define(name, Ele)\n options.mapping[name] = Ele\n }\n}\n\n\n\n","import { define } from './define'\n\nexport function tag(name, pure) {\n return function(target) {\n target.pure = pure\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\t\tThe virtual DOM element to clone\n * @param {Object} props\tAttributes/props to add when cloning\n * @param {VNode} rest\t\tAny 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(str) {\n return str.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}","var n=function(t,r,u,e){for(var p=1;p\"===t?(a(),u=1):u&&(\"=\"===t?(u=4,r=e,e=\"\"):\"/\"===t?(a(),3===u&&(s=s[0]),u=s,(s=s[0]).push(u,4),u=0):\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t?(a(),u=2):e+=t)}return a(),s},r=\"function\"==typeof Map,u=r?new Map:{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)),r}:function(n){for(var r=\"\",e=0;e1?r:r[0]}\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 htm from 'htm'\nimport { extend, get, set, bind, unbind } from './extend'\nimport JSONProxy from './proxy'\n\nconst html = htm.bind(h)\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 html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n\tJSONProxy\n}\n\noptions.root.Omi = omi\noptions.root.omi = omi\noptions.root.Omi.version = '6.15.4'\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 html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n\tJSONProxy\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":["VNode","getGlobal","global","Math","Array","self","window","store","root","mapping","isMultiStore","stack","h","nodeName","attributes","children","lastSimple","child","simple","i","arguments","length","push","pop","undefined","String","p","key","options","vnode","Reflect","customElements","hasOwnProperty","BuiltInHTMLElement","HTMLElement","construct","constructor","prototype","Object","setPrototypeOf","cssToDom","css","node","document","createElement","textContent","camelCase","str","replace","$","$1","toUpperCase","extend","obj","props","applyRef","ref","value","current","defer","Promise","resolve","then","bind","setTimeout","isArray","toString","call","getUse","data","paths","out","name","forEach","path","index","isPath","getTargetByPath","keys","tempPath","tempVal","args","apply","pathToArr","split","origin","arr","len","hyphenateRE","hyphenate","toLowerCase","getValByPath","prop","getPath","result","item","removeItem","splice","ATTR_KEY","IS_NON_DIMENSIONAL","isSameNodeType","hydrating","splitText","_componentConstructor","isNamedNode","normalizedNodeName","extension","handler","set","get","eventProxy","e","_listeners","type","el","addEventListener","unbind","removeEventListener","createNode","isSvg","createElementNS","removeNode","parentNode","removeChild","setAccessor","old","component","className","style","cssText","test","innerHTML","__html","useCapture","substring","touchStart","touchEnd","pureRemoveAttribute","removeAttribute","ns","removeAttributeNS","setAttributeNS","pureSetAttribute","setAttribute","event","___touchX","touches","pageX","___touchY","pageY","___scrollTop","body","scrollTop","abs","changedTouches","dispatchEvent","CustomEvent","detail","diffLevel","isSvgMode","diff","dom","parent","updateSelf","ret","ownerSVGElement","styles","querySelectorAll","s","innerDiffNode","firstChild","insertBefore","appendChild","ele","idiff","one","recollectNodeTree","prevSvgMode","_component","nodeValue","createTextNode","replaceChild","vnodeName","fc","vchildren","a","nextSibling","is","noSlot","dangerouslySetInnerHTML","diffAttributes","isHydrating","originalChildren","childNodes","keyed","keyedLen","min","childrenLen","vlen","j","c","f","vchild","__key","trim","unmountOnly","removeChildren","lastChild","next","previousSibling","attrs","isWeElement","update","oldClone","receiveProps","assign","ccName","id","WeElement","defaultProps","elementId","connectedCallback","host","use","_updatePath","using","storeName","instances","useSelf","updateSelfInstances","usingSelf","_updateSelfPath","attrsToProps","beforeInstall","install","afterInstall","shadowRoot","attachShadow","mode","beforeRender","rendered","render","__hasChildren","rootNode","_customStyleElement","_customStyleContent","installed","_isInstalled","disconnectedCallback","uninstall","ignoreAttrs","_willUpdate","beforeUpdate","updated","val","JSON","stringify","getAttribute","propTypes","Number","Boolean","substr","Omi","parse","fire","JSONPatcherProxy","deepClone","escapePathComponent","indexOf","findObjectPath","instance","pathComponents","parentAndPath","parenthoodMap","unshift","join","setTrap","target","newValue","parentPath","destinationPropKey","proxifiedObjectsMap","has","newValueOriginalObject","originalObject","revokableInstance","isProxifyingTreeNow","inherited","_proxifyObjectTreeRecursively","operation","op","oldValue","delete","disableTrapsForProxy","isInteger","console","warn","reflectionResult","defaultCallback","deleteTrap","revokableProxyInstance","deleteProperty","resume","isRecording","patches","userCallback","isObserving","pause","showDetachedWarning","Map","cachedProxy","generateProxyAtPath","traps","receiver","revocableInstance","Proxy","revocable","trapsInstance","proxy","proxifyObjectTree","proxifiedObject","message","targetObject","propKey","observe","record","callback","Error","generate","revoke","disableTraps","querySelector","observeStore","extendStoreUpate","JSONProxy","patch","patchs","kv","getArrayPatch","k","v","fixPath","needUpdate","onChange","diffResult","updatePath","keyA","keyB","includePath","pathA","pathB","mpPath","isNaN","fixArrPath","define","ctor","config","Ele","eleHooks","storeHelpers","hook","func","tag","pure","cloneElement","slice","getHost","rpx","b","innerWidth","hasOwn","classNames","classes","arg","argType","inner","extractClass","class","o","html","htm","createRef","Component","defineElement","elements","omi","version","module","exports"],"mappings":";;;;;;;;;;;EAAA;AACA,EAAO,SAASA,KAAT,GAAiB;;ECDxB,SAASC,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;EAGdQ,WAAS,EAHK;EAIdC,gBAAc;EAJA,CAAf;;MCpBMC,QAAQ,EAAd;;AAEA,EAAO,SAASC,CAAT,CAAWC,QAAX,EAAqBC,UAArB,EAAiC;EACtC,MAAIC,WAAW,EAAf;EAAA,MACEC,mBADF;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"} \ No newline at end of file +{"version":3,"file":"omi.dev.js","sources":["../src/vnode.js","../src/options.js","../src/h.js","../src/util.js","../src/constants.js","../src/vdom/index.js","../src/extend.js","../src/dom/index.js","../src/vdom/diff.js","../src/we-element.js","../src/proxy.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/htm/dist/htm.mjs","../src/omi.js","../src/omi.js"],"sourcesContent":["/** Virtual DOM Node */\nexport function VNode() {}\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 *\t@public\n *\t@namespace options {Object}\n */\nexport default {\n store: null,\n root: getGlobal(),\n\tmapping: {},\n\tisMultiStore: false\n}\n","import { VNode } from './vnode'\nimport options from './options'\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 let p = new VNode()\n p.nodeName = nodeName\n p.children = children\n p.attributes = attributes == null ? undefined : attributes\n p.key = attributes == null ? undefined : attributes.key\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","/**\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\n\nexport function getUse(data, paths, out, name) {\n const obj = []\n paths.forEach((path, index) => {\n const isPath = typeof path === 'string'\n if (isPath) {\n obj[index] = getTargetByPath(data, path)\n } else {\n const key = Object.keys(path)[0]\n const value = path[key]\n if (typeof value === 'string') {\n obj[index] = getTargetByPath(data, value)\n } else {\n const tempPath = value[0]\n if (typeof tempPath === 'string') {\n const tempVal = getTargetByPath(data, tempPath)\n obj[index] = value[1] ? value[1](tempVal) : tempVal\n } else {\n const args = []\n tempPath.forEach(path =>{\n args.push(getTargetByPath(data, path))\n })\n obj[index] = value[1].apply(null, args)\n }\n }\n obj[key] = obj[index]\n }\n\t})\n\tif(out) out[name] = obj\n return obj\n}\n\nexport function pathToArr(path) {\n\tif(typeof path !== 'string' || !path) return []\n\t// return path.split(/\\.|\\[|\\]/).filter(name => !!name)\n\treturn path.replace(/]/g, '').replace(/\\[/g, '.').split('.')\n}\n\nexport function getTargetByPath(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 return current\n}\n\nconst hyphenateRE = /\\B([A-Z])/g\nexport function hyphenate(str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase()\n}\n\nexport function getValByPath(path, current) {\n\tconst arr = pathToArr(path)\n\tarr.forEach(prop => {\n\t\tcurrent = current[prop]\n\t})\n\treturn current\n}\n\nexport function getPath(obj, out, name) {\n\tconst result = {}\n\tobj.forEach(item => {\n\t\tif (typeof item === 'string') {\n\t\t\tresult[item] = true\n\t\t} else {\n\t\t\tconst tempPath = item[Object.keys(item)[0]]\n\t\t\tif (typeof tempPath === 'string') {\n\t\t\t\tresult[tempPath] = true\n\t\t\t} else {\n\t\t\t\tif (typeof tempPath[0] === 'string') {\n\t\t\t\t\tresult[tempPath[0]] = true\n\t\t\t\t} else {\n\t\t\t\t\ttempPath[0].forEach(path => (result[path] = true))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\tif(out) out[name] = result\n\treturn result\n}\n\nexport function removeItem(item, arr){\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}","// 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\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf 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\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized 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\textension['o-' + name] = handler\n}\n\nexport function set(origin, path, value) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\t\tif (i === len - 1) {\n\t\t\t\t\tcurrent[arr[i]] = value\n\t\t\t} else {\n\t\t\t\t\tcurrent = current[arr[i]]\n\t\t\t}\n\t}\n}\n\nexport function get(origin, path) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\n\treturn current\n}\n\nfunction eventProxy(e) {\n return this._listeners[e.type](e)\n}\n\nexport function bind(el, type, handler){\n\tel._listeners = el._listeners || {}\n\tel._listeners[type] = handler\n\tel.addEventListener(type, eventProxy)\n}\n\nexport function unbind(el, type){\n\tel.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 let useCapture = name !== (name = name.replace(/Capture$/, ''))\n name = name.toLowerCase().substring(2)\n if (value) {\n if (!old) {\n node.addEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.addEventListener('touchstart', touchStart, useCapture)\n node.addEventListener('touchend', touchEnd, useCapture)\n }\n }\n } else {\n node.removeEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.removeEventListener('touchstart', touchStart, useCapture)\n node.removeEventListener('touchend', touchEnd, useCapture)\n }\n }\n ;(node._listeners || (node._listeners = {}))[name] = value\n } else if (node.nodeName === 'INPUT' && name === 'value'){\n node[name] = value == null ? '' : value\n } else if (name !== 'list' && name !== 'type' && name !== 'css' && !isSvg && name in node && value !== '') { //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 ? node.pureRemoveAttribute(name) : 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 node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : 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 ? node.pureSetAttribute(name, value) : 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 touchStart(e) {\n this.___touchX = e.touches[0].pageX\n this.___touchY = e.touches[0].pageY\n this.___scrollTop = document.body.scrollTop\n}\n\nfunction touchEnd(e) {\n if (\n Math.abs(e.changedTouches[0].pageX - this.___touchX) < 30 &&\n Math.abs(e.changedTouches[0].pageY - this.___touchY) < 30 &&\n Math.abs(document.body.scrollTop - this.___scrollTop) < 30\n ) {\n this.dispatchEvent(new CustomEvent('tap', { detail: e }))\n }\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 *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\n *\t@returns {Element} dom\t\t\tThe created/mutated element\n *\t@private\n */\nexport function diff(dom, vnode, parent, component, updateSelf) {\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.nodeName === Fragment){\n vnode = vnode.children\n }\n if (isArray(vnode)) {\n if (parent) {\n const styles = parent.querySelectorAll('style')\n styles.forEach(s => {\n parent.removeChild(s)\n })\n innerDiffNode(parent, vnode, hydrating, component, updateSelf)\n\n for (let i = styles.length - 1; i >= 0; i--) {\n parent.firstChild ? parent.insertBefore(styles[i], parent.firstChild) : parent.appendChild(style[i])\n }\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 *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\n *\t@param {Boolean} isHydrating\tIf `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 // 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 // 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 *\t@param {Node} node\t\t\t\t\t\tDOM node to start unmount/removal from\n *\t@param {Boolean} [unmountOnly=false]\tIf `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 *\t- we use .lastChild here because it causes less reflow than .firstChild\n *\t- 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 *\t@param {Element} dom\t\tElement with attributes to diff `attrs` against\n *\t@param {Object} attrs\t\tThe desired end-state key-value attribute pairs\n *\t@param {Object} old\t\t\tCurrent/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(dom, name, old[name], (old[name] = undefined), isSvgMode, component)\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(dom, name, old[name], (old[name] = attrs[name]), isSvgMode, component)\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 if (isWeElement) {\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 {\n\tcssToDom,\n\tisArray,\n\tgetUse,\n\thyphenate,\n\tgetValByPath,\n\tremoveItem\n} from './util'\nimport { diff } from './vdom/diff'\nimport options from './options'\nimport { getPath } from './util'\n\nlet id = 0\n\nexport default class WeElement extends HTMLElement {\n\tstatic is = 'WeElement'\n\n\tconstructor() {\n\t\tsuper()\n\t\tthis.props = Object.assign({},\n\t\t\tthis.constructor.defaultProps\n\t\t)\n\t\tthis.elementId = id++\n\t}\n\n\tconnectedCallback() {\n\t\tlet p = this.parentNode\n\t\twhile (p && !this.store) {\n\t\t\tthis.store = p.store\n\t\t\tp = p.parentNode || p.host\n\t\t}\n\n\t\tif (this.use) {\n\t\t\tlet use\n\t\t\tif (typeof this.use === 'function') {\n\t\t\t\tuse = this.use()\n\t\t\t} else {\n\t\t\t\tuse = this.use\n\t\t\t}\n\n\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\t_updatePath[storeName] = {}\n\t\t\t\t\tusing[storeName] = {}\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].instances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.using = using\n\t\t\t\tthis._updatePath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updatePath = getPath(use)\n\t\t\t\tthis.using = getUse(this.store.data, use)\n\t\t\t\tthis.store.instances.push(this)\n\t\t\t}\n\t\t}\n\t\tif (this.useSelf) {\n\t\t\tconst use = typeof this.useSelf === 'function' ? this.useSelf() : this.useSelf\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].updateSelfInstances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.usingSelf = using\n\t\t\t\tthis._updateSelfPath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updateSelfPath = getPath(use)\n\t\t\t\tthis.usingSelf = getUse(this.store.data, use)\n\t\t\t\tthis.store.updateSelfInstances.push(this)\n\t\t\t}\n\t\t}\n\t\tthis.attrsToProps()\n\t\tthis.beforeInstall()\n\t\tthis.install()\n\t\tthis.afterInstall()\n\n\t\tlet shadowRoot\n\t\tif (!this.shadowRoot) {\n\t\t\tshadowRoot = this.attachShadow({\n\t\t\t\tmode: 'open'\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot = this.shadowRoot\n\t\t\tlet fc\n\t\t\twhile ((fc = shadowRoot.firstChild)) {\n\t\t\t\tshadowRoot.removeChild(fc)\n\t\t\t}\n\t\t}\n\n\t\tif (this.constructor.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(this.constructor.css))\n\t\t} else if (this.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(typeof this.css === 'function' ? this.css() : this.css))\n\t\t}\n\t\tthis.beforeRender()\n\t\toptions.afterInstall && options.afterInstall(this)\n\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.__hasChildren = Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0\n\n\t\tthis.rootNode = diff(\n\t\t\tnull,\n\t\t\trendered,\n\t\t\tnull,\n\t\t\tthis\n\t\t)\n\t\tthis.rendered()\n\n\t\tif (this.props.css) {\n\t\t\tthis._customStyleElement = cssToDom(this.props.css)\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tshadowRoot.appendChild(this._customStyleElement)\n\t\t}\n\n\t\tif (isArray(this.rootNode)) {\n\t\t\tthis.rootNode.forEach(function (item) {\n\t\t\t\tshadowRoot.appendChild(item)\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot.appendChild(this.rootNode)\n\t\t}\n\t\tthis.installed()\n\t\tthis._isInstalled = true\n\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.uninstall()\n\t\tthis._isInstalled = false\n\t\tif (this.store) {\n\t\t\tif(options.isMultiStore){\n\t\t\t\tfor(let key in this.store){\n\t\t\t\t\tconst current = this.store[key]\n\t\t\t\t\tremoveItem(this, current.instances)\n\t\t\t\t removeItem(this, current.updateSelfInstances)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tremoveItem(this, this.store.instances)\n\t\t\t\tremoveItem(this, this.store.updateSelfInstances)\n\t\t\t}\n\t\t}\n\t}\n\n\tupdate(ignoreAttrs, updateSelf) {\n\t\tthis._willUpdate = true\n\t\tthis.beforeUpdate()\n\t\tthis.beforeRender()\n\t\t//fix null !== undefined\n\t\tif (this._customStyleContent != this.props.css) {\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tthis._customStyleElement.textContent = this._customStyleContent\n\t\t}\n\t\tthis.attrsToProps(ignoreAttrs)\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.rendered()\n\t\tthis.__hasChildren = this.__hasChildren || (Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0)\n\n\t\tthis.rootNode = diff(\n\t\t\tthis.rootNode,\n\t\t\trendered,\n\t\t\tthis.shadowRoot,\n\t\t\tthis,\n\t\t\tupdateSelf\n\t\t)\n\t\tthis._willUpdate = false\n\t\tthis.updated()\n\n\t}\n\n\tupdateSelf(ignoreAttrs) {\n\t\tthis.update(ignoreAttrs, true)\n\t}\n\n\tremoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t\t//Avoid executing removeAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tsetAttribute(key, val) {\n\t\tif (val && typeof val === 'object') {\n\t\t\tsuper.setAttribute(key, JSON.stringify(val))\n\t\t} else {\n\t\t\tsuper.setAttribute(key, val)\n\t\t}\n\t\t//Avoid executing setAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tpureRemoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t}\n\n\tpureSetAttribute(key, val) {\n\t\tsuper.setAttribute(key, val)\n\t}\n\n\tattrsToProps(ignoreAttrs) {\n\t\tconst ele = this\n\t\tif (ele.normalizedNodeName || ignoreAttrs) return\n\t\tele.props['css'] = ele.getAttribute('css')\n\t\tconst attrs = this.constructor.propTypes\n\t\tif (!attrs) return\n\t\tObject.keys(attrs).forEach(key => {\n\t\t\tconst type = attrs[key]\n\t\t\tconst val = ele.getAttribute(hyphenate(key))\n\t\t\tif (val !== null) {\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase String:\n\t\t\t\t\t\tele.props[key] = val\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Number:\n\t\t\t\t\t\tele.props[key] = Number(val)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Boolean:\n\t\t\t\t\t\tif (val === 'false' || val === '0') {\n\t\t\t\t\t\t\tele.props[key] = false\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = true\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Array:\n\t\t\t\t\tcase Object:\n\t\t\t\t\t\tif (val[0] === ':') {\n\t\t\t\t\t\t\tele.props[key] = getValByPath(val.substr(1), Omi.$)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = JSON.parse(val\n\t\t\t\t\t\t\t\t.replace(/(['\"])?([a-zA-Z0-9_-]+)(['\"])?:([^\\/])/g, '\"$2\":$4')\n\t\t\t\t\t\t\t\t.replace(/'([\\s\\S]*?)'/g, '\"$1\"')\n\t\t\t\t\t\t\t\t.replace(/,(\\s*})/g, '$1')\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (ele.constructor.defaultProps && ele.constructor.defaultProps.hasOwnProperty(key)) {\n\t\t\t\t\tele.props[key] = ele.constructor.defaultProps[key]\n\t\t\t\t} else {\n\t\t\t\t\tele.props[key] = null\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tfire(name, data) {\n\t\tthis.dispatchEvent(new CustomEvent(name, {\n\t\t\tdetail: data\n\t\t}))\n\t}\n\n\tbeforeInstall() {}\n\n\tinstall() {}\n\n\tafterInstall() {}\n\n\tinstalled() {}\n\n\tuninstall() {}\n\n\tbeforeUpdate() {}\n\n\tupdated() {}\n\n\tbeforeRender() {}\n\n\trendered() {}\n\n\treceiveProps() {}\n\n}\n","/*!\n * https://github.com/Palindrom/JSONPatcherProxy\n * (c) 2017 Starcounter\n * MIT license\n */\n\n/** Class representing a JS Object observer */\nconst JSONPatcherProxy = (function() {\n /**\n * Deep clones your object and returns a new object.\n */\n function deepClone(obj) {\n switch (typeof obj) {\n case 'object':\n return JSON.parse(JSON.stringify(obj)) //Faster than ES5 clone - http://jsperf.com/deep-cloning-of-objects/5\n case 'undefined':\n return null //this is how JSON.stringify behaves for array items\n default:\n return obj //no need to clone primitives\n }\n }\n JSONPatcherProxy.deepClone = deepClone\n\n function escapePathComponent(str) {\n if (str.indexOf('/') == -1 && str.indexOf('~') == -1) return str\n return str.replace(/~/g, '~0').replace(/\\//g, '~1')\n }\n JSONPatcherProxy.escapePathComponent = escapePathComponent\n\n /**\n * Walk up the parenthood tree to get the path\n * @param {JSONPatcherProxy} instance\n * @param {Object} obj the object you need to find its path\n */\n function findObjectPath(instance, obj) {\n const pathComponents = []\n let parentAndPath = instance.parenthoodMap.get(obj)\n while (parentAndPath && parentAndPath.path) {\n // because we're walking up-tree, we need to use the array as a stack\n pathComponents.unshift(parentAndPath.path)\n parentAndPath = instance.parenthoodMap.get(parentAndPath.parent)\n }\n if (pathComponents.length) {\n const path = pathComponents.join('/')\n return '/' + path\n }\n return ''\n }\n /**\n * A callback to be used as th proxy set trap callback.\n * It updates parenthood map if needed, proxifies nested newly-added objects, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the affected object\n * @param {String} key the effect property's name\n * @param {Any} newValue the value being set\n */\n function setTrap(instance, target, key, newValue) {\n const parentPath = findObjectPath(instance, target)\n\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n if (instance.proxifiedObjectsMap.has(newValue)) {\n const newValueOriginalObject = instance.proxifiedObjectsMap.get(newValue)\n\n instance.parenthoodMap.set(newValueOriginalObject.originalObject, {\n parent: target,\n path: key\n })\n }\n /*\n mark already proxified values as inherited.\n rationale: proxy.arr.shift()\n will emit\n {op: replace, path: '/arr/1', value: arr_2}\n {op: remove, path: '/arr/2'}\n\n by default, the second operation would revoke the proxy, and this renders arr revoked.\n That's why we need to remember the proxies that are inherited.\n */\n const revokableInstance = instance.proxifiedObjectsMap.get(newValue)\n /*\n Why do we need to check instance.isProxifyingTreeNow?\n\n We need to make sure we mark revokables as inherited ONLY when we're observing,\n because throughout the first proxification, a sub-object is proxified and then assigned to\n its parent object. This assignment of a pre-proxified object can fool us into thinking\n that it's a proxified object moved around, while in fact it's the first assignment ever.\n\n Checking isProxifyingTreeNow ensures this is not happening in the first proxification,\n but in fact is is a proxified object moved around the tree\n */\n if (revokableInstance && !instance.isProxifyingTreeNow) {\n revokableInstance.inherited = true\n }\n\n // if the new value is an object, make sure to watch it\n if (\n newValue &&\n typeof newValue == 'object' &&\n !instance.proxifiedObjectsMap.has(newValue)\n ) {\n instance.parenthoodMap.set(newValue, {\n parent: target,\n path: key\n })\n newValue = instance._proxifyObjectTreeRecursively(target, newValue, key)\n }\n // let's start with this operation, and may or may not update it later\n const operation = {\n op: 'remove',\n path: destinationPropKey\n }\n if (typeof newValue == 'undefined') {\n // applying De Morgan's laws would be a tad faster, but less readable\n if (!Array.isArray(target) && !target.hasOwnProperty(key)) {\n // `undefined` is being set to an already undefined value, keep silent\n return Reflect.set(target, key, newValue)\n }\n // when array element is set to `undefined`, should generate replace to `null`\n if (Array.isArray(target)) {\n // undefined array elements are JSON.stringified to `null`\n ;(operation.op = 'replace'), (operation.value = null)\n }\n const oldValue = instance.proxifiedObjectsMap.get(target[key])\n // was the deleted a proxified object?\n if (oldValue) {\n instance.parenthoodMap.delete(target[key])\n instance.disableTrapsForProxy(oldValue)\n instance.proxifiedObjectsMap.delete(oldValue)\n }\n } else {\n if (Array.isArray(target) && !Number.isInteger(+key.toString())) {\n /* array props (as opposed to indices) don't emit any patches, to avoid needless `length` patches */\n if (key != 'length') {\n console.warn(\n 'JSONPatcherProxy noticed a non-integer prop was set for an array. This will not emit a patch'\n )\n }\n return Reflect.set(target, key, newValue)\n }\n operation.op = 'add'\n if (target.hasOwnProperty(key)) {\n if (typeof target[key] !== 'undefined' || Array.isArray(target)) {\n operation.op = 'replace' // setting `undefined` array elements is a `replace` op\n }\n }\n operation.value = newValue\n }\n operation.oldValue = target[key]\n const reflectionResult = Reflect.set(target, key, newValue)\n instance.defaultCallback(operation)\n return reflectionResult\n }\n /**\n * A callback to be used as th proxy delete trap callback.\n * It updates parenthood map if needed, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the effected object\n * @param {String} key the effected property's name\n */\n function deleteTrap(instance, target, key) {\n if (typeof target[key] !== 'undefined') {\n const parentPath = findObjectPath(instance, target)\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n const revokableProxyInstance = instance.proxifiedObjectsMap.get(\n target[key]\n )\n\n if (revokableProxyInstance) {\n if (revokableProxyInstance.inherited) {\n /*\n this is an inherited proxy (an already proxified object that was moved around),\n we shouldn't revoke it, because even though it was removed from path1, it is still used in path2.\n And we know that because we mark moved proxies with `inherited` flag when we move them\n\n it is a good idea to remove this flag if we come across it here, in deleteProperty trap.\n We DO want to revoke the proxy if it was removed again.\n */\n revokableProxyInstance.inherited = false\n } else {\n instance.parenthoodMap.delete(revokableProxyInstance.originalObject)\n instance.disableTrapsForProxy(revokableProxyInstance)\n instance.proxifiedObjectsMap.delete(target[key])\n }\n }\n const reflectionResult = Reflect.deleteProperty(target, key)\n\n instance.defaultCallback({\n op: 'remove',\n path: destinationPropKey\n })\n\n return reflectionResult\n }\n }\n /* pre-define resume and pause functions to enhance constructors performance */\n function resume() {\n this.defaultCallback = operation => {\n this.isRecording && this.patches.push(operation)\n this.userCallback && this.userCallback(operation)\n }\n this.isObserving = true\n }\n function pause() {\n this.defaultCallback = () => {}\n this.isObserving = false\n }\n /**\n * Creates an instance of JSONPatcherProxy around your object of interest `root`.\n * @param {Object|Array} root - the object you want to wrap\n * @param {Boolean} [showDetachedWarning = true] - whether to log a warning when a detached sub-object is modified @see {@link https://github.com/Palindrom/JSONPatcherProxy#detached-objects}\n * @returns {JSONPatcherProxy}\n * @constructor\n */\n function JSONPatcherProxy(root, showDetachedWarning) {\n this.isProxifyingTreeNow = false\n this.isObserving = false\n this.proxifiedObjectsMap = new Map()\n this.parenthoodMap = new Map()\n // default to true\n if (typeof showDetachedWarning !== 'boolean') {\n showDetachedWarning = true\n }\n\n this.showDetachedWarning = showDetachedWarning\n this.originalObject = root\n this.cachedProxy = null\n this.isRecording = false\n this.userCallback\n /**\n * @memberof JSONPatcherProxy\n * Restores callback back to the original one provided to `observe`.\n */\n this.resume = resume.bind(this)\n /**\n * @memberof JSONPatcherProxy\n * Replaces your callback with a noop function.\n */\n this.pause = pause.bind(this)\n }\n\n JSONPatcherProxy.prototype.generateProxyAtPath = function(parent, obj, path) {\n if (!obj) {\n return obj\n }\n const traps = {\n set: (target, key, value, receiver) =>\n setTrap(this, target, key, value, receiver),\n deleteProperty: (target, key) => deleteTrap(this, target, key)\n }\n const revocableInstance = Proxy.revocable(obj, traps)\n // cache traps object to disable them later.\n revocableInstance.trapsInstance = traps\n revocableInstance.originalObject = obj\n\n /* keeping track of object's parent and path */\n\n this.parenthoodMap.set(obj, { parent, path })\n\n /* keeping track of all the proxies to be able to revoke them later */\n this.proxifiedObjectsMap.set(revocableInstance.proxy, revocableInstance)\n return revocableInstance.proxy\n }\n // grab tree's leaves one by one, encapsulate them into a proxy and return\n JSONPatcherProxy.prototype._proxifyObjectTreeRecursively = function(\n parent,\n root,\n path\n ) {\n for (let key in root) {\n if (root.hasOwnProperty(key)) {\n if (root[key] instanceof Object) {\n root[key] = this._proxifyObjectTreeRecursively(\n root,\n root[key],\n escapePathComponent(key)\n )\n }\n }\n }\n return this.generateProxyAtPath(parent, root, path)\n }\n // this function is for aesthetic purposes\n JSONPatcherProxy.prototype.proxifyObjectTree = function(root) {\n /*\n while proxyifying object tree,\n the proxyifying operation itself is being\n recorded, which in an unwanted behavior,\n that's why we disable recording through this\n initial process;\n */\n this.pause()\n this.isProxifyingTreeNow = true\n const proxifiedObject = this._proxifyObjectTreeRecursively(\n undefined,\n root,\n ''\n )\n /* OK you can record now */\n this.isProxifyingTreeNow = false\n this.resume()\n return proxifiedObject\n }\n /**\n * Turns a proxified object into a forward-proxy object; doesn't emit any patches anymore, like a normal object\n * @param {Proxy} proxy - The target proxy object\n */\n JSONPatcherProxy.prototype.disableTrapsForProxy = function(\n revokableProxyInstance\n ) {\n if (this.showDetachedWarning) {\n const message =\n \"You're accessing an object that is detached from the observedObject tree, see https://github.com/Palindrom/JSONPatcherProxy#detached-objects\"\n\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.deleteProperty = (\n targetObject,\n propKey\n ) => {\n return Reflect.deleteProperty(targetObject, propKey)\n }\n } else {\n delete revokableProxyInstance.trapsInstance.set\n delete revokableProxyInstance.trapsInstance.get\n delete revokableProxyInstance.trapsInstance.deleteProperty\n }\n }\n /**\n * Proxifies the object that was passed in the constructor and returns a proxified mirror of it. Even though both parameters are options. You need to pass at least one of them.\n * @param {Boolean} [record] - whether to record object changes to a later-retrievable patches array.\n * @param {Function} [callback] - this will be synchronously called with every object change with a single `patch` as the only parameter.\n */\n JSONPatcherProxy.prototype.observe = function(record, callback) {\n if (!record && !callback) {\n throw new Error('You need to either record changes or pass a callback')\n }\n this.isRecording = record\n this.userCallback = callback\n /*\n I moved it here to remove it from `unobserve`,\n this will also make the constructor faster, why initiate\n the array before they decide to actually observe with recording?\n They might need to use only a callback.\n */\n if (record) this.patches = []\n this.cachedProxy = this.proxifyObjectTree(this.originalObject)\n return this.cachedProxy\n }\n /**\n * If the observed is set to record, it will synchronously return all the patches and empties patches array.\n */\n JSONPatcherProxy.prototype.generate = function() {\n if (!this.isRecording) {\n throw new Error('You should set record to true to get patches later')\n }\n return this.patches.splice(0, this.patches.length)\n }\n /**\n * Revokes all proxies rendering the observed object useless and good for garbage collection @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/revocable}\n */\n JSONPatcherProxy.prototype.revoke = function() {\n this.proxifiedObjectsMap.forEach(el => {\n el.revoke()\n })\n }\n /**\n * Disables all proxies' traps, turning the observed object into a forward-proxy object, like a normal object that you can modify silently.\n */\n JSONPatcherProxy.prototype.disableTraps = function() {\n this.proxifiedObjectsMap.forEach(this.disableTrapsForProxy, this)\n }\n return JSONPatcherProxy\n})()\n\nexport default JSONPatcherProxy\n","import { diff } from './vdom/diff'\nimport JSONProxy from './proxy'\nimport { getUse } from './util'\nimport options from './options'\n\nexport function render(vnode, parent, store) {\n\tparent = typeof parent === 'string' ? document.querySelector(parent) : parent\n\tif (store) {\n\t\tif (store.data) {\n\t\t\tobserveStore(store)\n\t\t} else {\n\t\t\toptions.isMultiStore = true\n\t\t\t//Multi-store injection\n\t\t\tfor (let key in store) {\n\t\t\t\tobserveStore(store[key], key)\n\t\t\t}\n\t\t}\n\t\tparent.store = store\n\t}\n\treturn diff(null, vnode, parent, false)\n}\n\nfunction observeStore(store, key) {\n\tstore.instances = []\n\tstore.updateSelfInstances = []\n\textendStoreUpate(store, key)\n\n\tstore.data = new JSONProxy(store.data).observe(false, function (patch) {\n\t\tconst patchs = {}\n\t\tif (patch.op === 'remove') {\n\t\t\t// fix arr splice\n\t\t\tconst kv = getArrayPatch(patch.path, store)\n\t\t\tpatchs[kv.k] = kv.v\n\n\t\t\tupdate(patchs, store)\n\n\t\t} else {\n\t\t\tconst key = fixPath(patch.path)\n\t\t\tpatchs[key] = patch.value\n\n\t\t\tupdate(patchs, store)\n\n\t\t}\n\t})\n}\n\nfunction update(patch, store) {\n\tstore.update(patch)\n}\n\nfunction extendStoreUpate(store, key) {\n\tstore.update = function (patch) {\n\t\tif (Object.keys(patch).length > 0) {\n\t\t\tthis.instances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && instance._updatePath[key] && needUpdate(patch, instance._updatePath[key]))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.use === 'function' ? instance.use() : instance.use)[key], instance.using, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && needUpdate(patch, instance._updatePath))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tinstance.using = getUse(store.data, typeof instance.use === 'function' ? instance.use() : instance.use)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t})\n\n\t\t\tthis.updateSelfInstances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updateSelfPath && instance._updateSelfPath[key] && needUpdate(patch, instance._updateSelfPath[key]))) {\n\t\t\t\t\t\tif (instance.useSelf) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)[key], instance.usingSelf, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (instance._updateSelfPath && needUpdate(patch, instance._updateSelfPath)) {\n\t\t\t\t\t\tinstance.usingSelf = getUse(store.data, typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\tthis.onChange && this.onChange(patch)\n\t\t}\n\t}\n}\n\n\nexport function needUpdate(diffResult, updatePath) {\n\tfor (let keyA in diffResult) {\n\t\tif (updatePath[keyA]) {\n\t\t\treturn true\n\t\t}\n\t\tfor (let keyB in updatePath) {\n\t\t\tif (includePath(keyA, keyB)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\treturn false\n}\n\nfunction includePath(pathA, pathB) {\n\tif (pathA.indexOf(pathB) === 0) {\n\t\tconst next = pathA.substr(pathB.length, 1)\n\t\tif (next === '[' || next === '.') {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nexport function fixPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tarr.forEach((item, index) => {\n\t\tif (index) {\n\t\t\tif (isNaN(Number(item))) {\n\t\t\t\tmpPath += '.' + item\n\t\t\t} else {\n\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t}\n\t\t} else {\n\t\t\tmpPath += item\n\t\t}\n\t})\n\treturn mpPath\n}\n\nfunction getArrayPatch(path, store) {\n\tconst arr = path.replace('/', '').split('/')\n\tlet current = store.data[arr[0]]\n\tfor (let i = 1, len = arr.length; i < len - 1; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\treturn {\n\t\tk: fixArrPath(path),\n\t\tv: current\n\t}\n}\n\nfunction fixArrPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tconst len = arr.length\n\tarr.forEach((item, index) => {\n\t\tif (index < len - 1) {\n\t\t\tif (index) {\n\t\t\t\tif (isNaN(Number(item))) {\n\t\t\t\t\tmpPath += '.' + item\n\t\t\t\t} else {\n\t\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmpPath += item\n\t\t\t}\n\t\t}\n\t})\n\treturn mpPath\n}\n","import WeElement from './we-element'\nimport options from './options'\n\nexport function define(name, ctor, config) {\n if (options.mapping[name]) {\n return\n }\n if (ctor.is === 'WeElement') {\n customElements.define(name, ctor)\n options.mapping[name] = ctor\n\n } else {\n \n if (typeof config === 'string') {\n config = { css: config }\n } else {\n config = config || { }\n }\n\n class Ele extends WeElement {\n\n static css = config.css\n\n static propTypes = config.propTypes\n\n static defaultProps = config.defaultProps\n\n render() {\n return ctor.call(this, this)\n }\n\n receiveProps() {\n if (config.receiveProps) {\n return config.receiveProps.apply(this, arguments)\n }\n }\n }\n\n const eleHooks = ['install', 'installed', 'uninstall', 'beforeUpdate', 'updated', 'beforeRender', 'rendered'],\n storeHelpers = ['use', 'useSelf']\n\n eleHooks.forEach(hook => {\n if (config[hook]) {\n Ele.prototype[hook] = function () {\n config[hook].apply(this, arguments)\n }\n }\n })\n\n storeHelpers.forEach(func => {\n if (config[func]) {\n Ele.prototype[func] = function () {\n return typeof config[func] === 'function'\n ? config[func].apply(this, arguments)\n : config[func]\n }\n }\n })\n\n customElements.define(name, Ele)\n options.mapping[name] = Ele\n }\n}\n\n\n\n","import { define } from './define'\n\nexport function tag(name, pure) {\n return function(target) {\n target.pure = pure\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\t\tThe virtual DOM element to clone\n * @param {Object} props\tAttributes/props to add when cloning\n * @param {VNode} rest\t\tAny 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(str) {\n return str.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}","var n=function(t,r,u,e){for(var p=1;p\"===t?(a(),u=1):u&&(\"=\"===t?(u=4,r=e,e=\"\"):\"/\"===t?(a(),3===u&&(s=s[0]),u=s,(s=s[0]).push(u,4),u=0):\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t?(a(),u=2):e+=t)}return a(),s},r=\"function\"==typeof Map,u=r?new Map:{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)),r}:function(n){for(var r=\"\",e=0;e1?r:r[0]}\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 htm from 'htm'\nimport { extend, get, set, bind, unbind } from './extend'\nimport JSONProxy from './proxy'\nimport { Fragment } from './util'\n\nh.f = Fragment\n\nconst html = htm.bind(h)\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 html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n JSONProxy\n}\n\noptions.root.Omi = omi\noptions.root.omi = omi\noptions.root.Omi.version = '6.15.5'\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 html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n JSONProxy\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":["VNode","getGlobal","global","Math","Array","self","window","store","root","mapping","isMultiStore","stack","h","nodeName","attributes","children","lastSimple","child","simple","i","arguments","length","push","pop","undefined","String","p","key","options","vnode","Reflect","customElements","hasOwnProperty","BuiltInHTMLElement","HTMLElement","construct","constructor","prototype","Object","setPrototypeOf","cssToDom","css","node","document","createElement","textContent","camelCase","str","replace","$","$1","toUpperCase","Fragment","props","extend","obj","applyRef","ref","value","current","defer","Promise","resolve","then","bind","setTimeout","isArray","toString","call","getUse","data","paths","out","name","forEach","path","index","isPath","getTargetByPath","keys","tempPath","tempVal","args","apply","pathToArr","split","origin","arr","len","hyphenateRE","hyphenate","toLowerCase","getValByPath","prop","getPath","result","item","removeItem","splice","ATTR_KEY","IS_NON_DIMENSIONAL","isSameNodeType","hydrating","splitText","_componentConstructor","isNamedNode","normalizedNodeName","extension","handler","set","get","eventProxy","e","_listeners","type","el","addEventListener","unbind","removeEventListener","createNode","isSvg","createElementNS","removeNode","parentNode","removeChild","setAccessor","old","component","className","style","cssText","test","innerHTML","__html","useCapture","substring","touchStart","touchEnd","pureRemoveAttribute","removeAttribute","ns","removeAttributeNS","setAttributeNS","pureSetAttribute","setAttribute","event","___touchX","touches","pageX","___touchY","pageY","___scrollTop","body","scrollTop","abs","changedTouches","dispatchEvent","CustomEvent","detail","diffLevel","isSvgMode","diff","dom","parent","updateSelf","ret","ownerSVGElement","styles","querySelectorAll","s","innerDiffNode","firstChild","insertBefore","appendChild","ele","idiff","one","recollectNodeTree","prevSvgMode","_component","nodeValue","createTextNode","replaceChild","vnodeName","fc","vchildren","a","nextSibling","is","noSlot","dangerouslySetInnerHTML","diffAttributes","isHydrating","originalChildren","childNodes","keyed","keyedLen","min","childrenLen","vlen","j","c","f","vchild","__key","trim","unmountOnly","removeChildren","lastChild","next","previousSibling","attrs","isWeElement","update","oldClone","receiveProps","assign","ccName","id","WeElement","defaultProps","elementId","connectedCallback","host","use","_updatePath","using","storeName","instances","useSelf","updateSelfInstances","usingSelf","_updateSelfPath","attrsToProps","beforeInstall","install","afterInstall","shadowRoot","attachShadow","mode","beforeRender","rendered","render","__hasChildren","rootNode","_customStyleElement","_customStyleContent","installed","_isInstalled","disconnectedCallback","uninstall","ignoreAttrs","_willUpdate","beforeUpdate","updated","val","JSON","stringify","getAttribute","propTypes","Number","Boolean","substr","Omi","parse","fire","JSONPatcherProxy","deepClone","escapePathComponent","indexOf","findObjectPath","instance","pathComponents","parentAndPath","parenthoodMap","unshift","join","setTrap","target","newValue","parentPath","destinationPropKey","proxifiedObjectsMap","has","newValueOriginalObject","originalObject","revokableInstance","isProxifyingTreeNow","inherited","_proxifyObjectTreeRecursively","operation","op","oldValue","delete","disableTrapsForProxy","isInteger","console","warn","reflectionResult","defaultCallback","deleteTrap","revokableProxyInstance","deleteProperty","resume","isRecording","patches","userCallback","isObserving","pause","showDetachedWarning","Map","cachedProxy","generateProxyAtPath","traps","receiver","revocableInstance","Proxy","revocable","trapsInstance","proxy","proxifyObjectTree","proxifiedObject","message","targetObject","propKey","observe","record","callback","Error","generate","revoke","disableTraps","querySelector","observeStore","extendStoreUpate","JSONProxy","patch","patchs","kv","getArrayPatch","k","v","fixPath","needUpdate","onChange","diffResult","updatePath","keyA","keyB","includePath","pathA","pathB","mpPath","isNaN","fixArrPath","define","ctor","config","Ele","eleHooks","storeHelpers","hook","func","tag","pure","cloneElement","slice","getHost","rpx","b","innerWidth","hasOwn","classNames","classes","arg","argType","inner","extractClass","class","o","html","htm","createRef","Component","defineElement","elements","omi","version","module","exports"],"mappings":";;;;;;;;;;;EAAA;AACA,EAAO,SAASA,KAAT,GAAiB;;ECDxB,SAASC,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;EAGdQ,WAAS,EAHK;EAIdC,gBAAc;EAJA,CAAf;;MCpBMC,QAAQ,EAAd;;AAEA,EAAO,SAASC,CAAT,CAAWC,QAAX,EAAqBC,UAArB,EAAiC;EACtC,MAAIC,WAAW,EAAf;EAAA,MACEC,mBADF;EAAA,MAEEC,cAFF;EAAA,MAGEC,eAHF;EAAA,MAIEC,UAJF;EAKA,OAAKA,IAAIC,UAAUC,MAAnB,EAA2BF,MAAM,CAAjC,GAAsC;EACpCR,UAAMW,IAAN,CAAWF,UAAUD,CAAV,CAAX;EACD;EACD,MAAIL,cAA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lQ,KAAKkQ,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 edfddd678f..190790d3e2 100644 --- a/packages/omi/dist/omi.esm.js +++ b/packages/omi/dist/omi.esm.js @@ -1,5 +1,5 @@ /** - * omi v6.15.4 http://omijs.org + * omi v6.15.5 http://omijs.org * Omi === Preact + Scoped CSS + Store System + Native Support in 3kb javascript. * By dntzhang https://github.com/dntzhang * Github: https://github.com/Tencent/omi @@ -120,6 +120,10 @@ function camelCase(str) { }); } +function Fragment(props) { + return props.children; +} + function extend(obj, props) { for (var i in props) { obj[i] = props[i]; @@ -472,6 +476,9 @@ function diff(dom, vnode, parent, component, updateSelf) { // hydration is indicated by the existing element to be diffed not having a prop cache hydrating = dom != null && !('prevProps' in dom); } + if (vnode.nodeName === Fragment) { + vnode = vnode.children; + } if (isArray(vnode)) { if (parent) { var styles = parent.querySelectorAll('style'); @@ -1742,6 +1749,8 @@ function o(obj) { var n=function(t,r,u,e){for(var p=1;p"===t?(a(), u=1):u&&("="===t?(u=4, r=e, e=""):"/"===t?(a(), 3===u&&(s=s[0]), u=s, (s=s[0]).push(u,4), u=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(a(), u=2):e+=t);}return a(), s},r="function"==typeof Map,u=r?new Map:{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)), r}:function(n){for(var r="",e=0;e1?r:r[0]} +h.f = Fragment; + var html = htm.bind(h); function createRef() { @@ -1784,7 +1793,7 @@ var omi = { options.root.Omi = omi; options.root.omi = omi; -options.root.Omi.version = '6.15.4'; +options.root.Omi.version = '6.15.5'; export default omi; export { tag, WeElement, Component, render, h, h as createElement, options, define, cloneElement, getHost, rpx, defineElement, classNames, extractClass, createRef, html, htm, o, elements, $, extend$1 as extend, get, set, bind, unbind, JSONPatcherProxy as JSONProxy }; diff --git a/packages/omi/dist/omi.esm.js.map b/packages/omi/dist/omi.esm.js.map index 67bad280ca..65bd2ed883 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/vnode.js","../src/options.js","../src/h.js","../src/util.js","../src/constants.js","../src/vdom/index.js","../src/extend.js","../src/dom/index.js","../src/vdom/diff.js","../src/we-element.js","../src/proxy.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/htm/dist/htm.mjs","../src/omi.js"],"sourcesContent":["/** Virtual DOM Node */\nexport function VNode() {}\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 *\t@public\n *\t@namespace options {Object}\n */\nexport default {\n store: null,\n root: getGlobal(),\n\tmapping: {},\n\tisMultiStore: false\n}\n","import { VNode } from './vnode'\nimport options from './options'\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 let p = new VNode()\n p.nodeName = nodeName\n p.children = children\n p.attributes = attributes == null ? undefined : attributes\n p.key = attributes == null ? undefined : attributes.key\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","/**\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 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\n\nexport function getUse(data, paths, out, name) {\n const obj = []\n paths.forEach((path, index) => {\n const isPath = typeof path === 'string'\n if (isPath) {\n obj[index] = getTargetByPath(data, path)\n } else {\n const key = Object.keys(path)[0]\n const value = path[key]\n if (typeof value === 'string') {\n obj[index] = getTargetByPath(data, value)\n } else {\n const tempPath = value[0]\n if (typeof tempPath === 'string') {\n const tempVal = getTargetByPath(data, tempPath)\n obj[index] = value[1] ? value[1](tempVal) : tempVal\n } else {\n const args = []\n tempPath.forEach(path =>{\n args.push(getTargetByPath(data, path))\n })\n obj[index] = value[1].apply(null, args)\n }\n }\n obj[key] = obj[index]\n }\n\t})\n\tif(out) out[name] = obj\n return obj\n}\n\nexport function pathToArr(path) {\n\tif(typeof path !== 'string' || !path) return []\n\t// return path.split(/\\.|\\[|\\]/).filter(name => !!name)\n\treturn path.replace(/]/g, '').replace(/\\[/g, '.').split('.')\n}\n\nexport function getTargetByPath(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 return current\n}\n\nconst hyphenateRE = /\\B([A-Z])/g\nexport function hyphenate(str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase()\n}\n\nexport function getValByPath(path, current) {\n\tconst arr = pathToArr(path)\n\tarr.forEach(prop => {\n\t\tcurrent = current[prop]\n\t})\n\treturn current\n}\n\nexport function getPath(obj, out, name) {\n\tconst result = {}\n\tobj.forEach(item => {\n\t\tif (typeof item === 'string') {\n\t\t\tresult[item] = true\n\t\t} else {\n\t\t\tconst tempPath = item[Object.keys(item)[0]]\n\t\t\tif (typeof tempPath === 'string') {\n\t\t\t\tresult[tempPath] = true\n\t\t\t} else {\n\t\t\t\tif (typeof tempPath[0] === 'string') {\n\t\t\t\t\tresult[tempPath[0]] = true\n\t\t\t\t} else {\n\t\t\t\t\ttempPath[0].forEach(path => (result[path] = true))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\tif(out) out[name] = result\n\treturn result\n}\n\nexport function removeItem(item, arr){\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}","// 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\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf 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\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized 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\textension['o-' + name] = handler\n}\n\nexport function set(origin, path, value) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\t\tif (i === len - 1) {\n\t\t\t\t\tcurrent[arr[i]] = value\n\t\t\t} else {\n\t\t\t\t\tcurrent = current[arr[i]]\n\t\t\t}\n\t}\n}\n\nexport function get(origin, path) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\n\treturn current\n}\n\nfunction eventProxy(e) {\n return this._listeners[e.type](e)\n}\n\nexport function bind(el, type, handler){\n\tel._listeners = el._listeners || {}\n\tel._listeners[type] = handler\n\tel.addEventListener(type, eventProxy)\n}\n\nexport function unbind(el, type){\n\tel.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 let useCapture = name !== (name = name.replace(/Capture$/, ''))\n name = name.toLowerCase().substring(2)\n if (value) {\n if (!old) {\n node.addEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.addEventListener('touchstart', touchStart, useCapture)\n node.addEventListener('touchend', touchEnd, useCapture)\n }\n }\n } else {\n node.removeEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.removeEventListener('touchstart', touchStart, useCapture)\n node.removeEventListener('touchend', touchEnd, useCapture)\n }\n }\n ;(node._listeners || (node._listeners = {}))[name] = value\n } else if (node.nodeName === 'INPUT' && name === 'value'){\n node[name] = value == null ? '' : value\n } else if (name !== 'list' && name !== 'type' && name !== 'css' && !isSvg && name in node && value !== '') { //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 ? node.pureRemoveAttribute(name) : 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 node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : 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 ? node.pureSetAttribute(name, value) : 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 touchStart(e) {\n this.___touchX = e.touches[0].pageX\n this.___touchY = e.touches[0].pageY\n this.___scrollTop = document.body.scrollTop\n}\n\nfunction touchEnd(e) {\n if (\n Math.abs(e.changedTouches[0].pageX - this.___touchX) < 30 &&\n Math.abs(e.changedTouches[0].pageY - this.___touchY) < 30 &&\n Math.abs(document.body.scrollTop - this.___scrollTop) < 30\n ) {\n this.dispatchEvent(new CustomEvent('tap', { detail: e }))\n }\n}\n","import { ATTR_KEY } from '../constants'\nimport { isSameNodeType, isNamedNode } from './index'\nimport { createNode, setAccessor } from '../dom/index'\nimport { camelCase, isArray } 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 *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\n *\t@returns {Element} dom\t\t\tThe created/mutated element\n *\t@private\n */\nexport function diff(dom, vnode, parent, component, updateSelf) {\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 (isArray(vnode)) {\n if (parent) {\n const styles = parent.querySelectorAll('style')\n styles.forEach(s => {\n parent.removeChild(s)\n })\n innerDiffNode(parent, vnode, hydrating, component, updateSelf)\n\n for (let i = styles.length - 1; i >= 0; i--) {\n parent.firstChild ? parent.insertBefore(styles[i], parent.firstChild) : parent.appendChild(style[i])\n }\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 *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\n *\t@param {Boolean} isHydrating\tIf `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 // 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 // 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 *\t@param {Node} node\t\t\t\t\t\tDOM node to start unmount/removal from\n *\t@param {Boolean} [unmountOnly=false]\tIf `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 *\t- we use .lastChild here because it causes less reflow than .firstChild\n *\t- 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 *\t@param {Element} dom\t\tElement with attributes to diff `attrs` against\n *\t@param {Object} attrs\t\tThe desired end-state key-value attribute pairs\n *\t@param {Object} old\t\t\tCurrent/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(dom, name, old[name], (old[name] = undefined), isSvgMode, component)\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(dom, name, old[name], (old[name] = attrs[name]), isSvgMode, component)\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 if (isWeElement) {\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 {\n\tcssToDom,\n\tisArray,\n\tgetUse,\n\thyphenate,\n\tgetValByPath,\n\tremoveItem\n} from './util'\nimport { diff } from './vdom/diff'\nimport options from './options'\nimport { getPath } from './util'\n\nlet id = 0\n\nexport default class WeElement extends HTMLElement {\n\tstatic is = 'WeElement'\n\n\tconstructor() {\n\t\tsuper()\n\t\tthis.props = Object.assign({},\n\t\t\tthis.constructor.defaultProps\n\t\t)\n\t\tthis.elementId = id++\n\t}\n\n\tconnectedCallback() {\n\t\tlet p = this.parentNode\n\t\twhile (p && !this.store) {\n\t\t\tthis.store = p.store\n\t\t\tp = p.parentNode || p.host\n\t\t}\n\n\t\tif (this.use) {\n\t\t\tlet use\n\t\t\tif (typeof this.use === 'function') {\n\t\t\t\tuse = this.use()\n\t\t\t} else {\n\t\t\t\tuse = this.use\n\t\t\t}\n\n\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\t_updatePath[storeName] = {}\n\t\t\t\t\tusing[storeName] = {}\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].instances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.using = using\n\t\t\t\tthis._updatePath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updatePath = getPath(use)\n\t\t\t\tthis.using = getUse(this.store.data, use)\n\t\t\t\tthis.store.instances.push(this)\n\t\t\t}\n\t\t}\n\t\tif (this.useSelf) {\n\t\t\tconst use = typeof this.useSelf === 'function' ? this.useSelf() : this.useSelf\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].updateSelfInstances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.usingSelf = using\n\t\t\t\tthis._updateSelfPath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updateSelfPath = getPath(use)\n\t\t\t\tthis.usingSelf = getUse(this.store.data, use)\n\t\t\t\tthis.store.updateSelfInstances.push(this)\n\t\t\t}\n\t\t}\n\t\tthis.attrsToProps()\n\t\tthis.beforeInstall()\n\t\tthis.install()\n\t\tthis.afterInstall()\n\n\t\tlet shadowRoot\n\t\tif (!this.shadowRoot) {\n\t\t\tshadowRoot = this.attachShadow({\n\t\t\t\tmode: 'open'\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot = this.shadowRoot\n\t\t\tlet fc\n\t\t\twhile ((fc = shadowRoot.firstChild)) {\n\t\t\t\tshadowRoot.removeChild(fc)\n\t\t\t}\n\t\t}\n\n\t\tif (this.constructor.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(this.constructor.css))\n\t\t} else if (this.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(typeof this.css === 'function' ? this.css() : this.css))\n\t\t}\n\t\tthis.beforeRender()\n\t\toptions.afterInstall && options.afterInstall(this)\n\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.__hasChildren = Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0\n\n\t\tthis.rootNode = diff(\n\t\t\tnull,\n\t\t\trendered,\n\t\t\tnull,\n\t\t\tthis\n\t\t)\n\t\tthis.rendered()\n\n\t\tif (this.props.css) {\n\t\t\tthis._customStyleElement = cssToDom(this.props.css)\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tshadowRoot.appendChild(this._customStyleElement)\n\t\t}\n\n\t\tif (isArray(this.rootNode)) {\n\t\t\tthis.rootNode.forEach(function (item) {\n\t\t\t\tshadowRoot.appendChild(item)\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot.appendChild(this.rootNode)\n\t\t}\n\t\tthis.installed()\n\t\tthis._isInstalled = true\n\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.uninstall()\n\t\tthis._isInstalled = false\n\t\tif (this.store) {\n\t\t\tif(options.isMultiStore){\n\t\t\t\tfor(let key in this.store){\n\t\t\t\t\tconst current = this.store[key]\n\t\t\t\t\tremoveItem(this, current.instances)\n\t\t\t\t removeItem(this, current.updateSelfInstances)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tremoveItem(this, this.store.instances)\n\t\t\t\tremoveItem(this, this.store.updateSelfInstances)\n\t\t\t}\n\t\t}\n\t}\n\n\tupdate(ignoreAttrs, updateSelf) {\n\t\tthis._willUpdate = true\n\t\tthis.beforeUpdate()\n\t\tthis.beforeRender()\n\t\t//fix null !== undefined\n\t\tif (this._customStyleContent != this.props.css) {\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tthis._customStyleElement.textContent = this._customStyleContent\n\t\t}\n\t\tthis.attrsToProps(ignoreAttrs)\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.rendered()\n\t\tthis.__hasChildren = this.__hasChildren || (Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0)\n\n\t\tthis.rootNode = diff(\n\t\t\tthis.rootNode,\n\t\t\trendered,\n\t\t\tthis.shadowRoot,\n\t\t\tthis,\n\t\t\tupdateSelf\n\t\t)\n\t\tthis._willUpdate = false\n\t\tthis.updated()\n\n\t}\n\n\tupdateSelf(ignoreAttrs) {\n\t\tthis.update(ignoreAttrs, true)\n\t}\n\n\tremoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t\t//Avoid executing removeAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tsetAttribute(key, val) {\n\t\tif (val && typeof val === 'object') {\n\t\t\tsuper.setAttribute(key, JSON.stringify(val))\n\t\t} else {\n\t\t\tsuper.setAttribute(key, val)\n\t\t}\n\t\t//Avoid executing setAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tpureRemoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t}\n\n\tpureSetAttribute(key, val) {\n\t\tsuper.setAttribute(key, val)\n\t}\n\n\tattrsToProps(ignoreAttrs) {\n\t\tconst ele = this\n\t\tif (ele.normalizedNodeName || ignoreAttrs) return\n\t\tele.props['css'] = ele.getAttribute('css')\n\t\tconst attrs = this.constructor.propTypes\n\t\tif (!attrs) return\n\t\tObject.keys(attrs).forEach(key => {\n\t\t\tconst type = attrs[key]\n\t\t\tconst val = ele.getAttribute(hyphenate(key))\n\t\t\tif (val !== null) {\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase String:\n\t\t\t\t\t\tele.props[key] = val\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Number:\n\t\t\t\t\t\tele.props[key] = Number(val)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Boolean:\n\t\t\t\t\t\tif (val === 'false' || val === '0') {\n\t\t\t\t\t\t\tele.props[key] = false\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = true\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Array:\n\t\t\t\t\tcase Object:\n\t\t\t\t\t\tif (val[0] === ':') {\n\t\t\t\t\t\t\tele.props[key] = getValByPath(val.substr(1), Omi.$)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = JSON.parse(val\n\t\t\t\t\t\t\t\t.replace(/(['\"])?([a-zA-Z0-9_-]+)(['\"])?:([^\\/])/g, '\"$2\":$4')\n\t\t\t\t\t\t\t\t.replace(/'([\\s\\S]*?)'/g, '\"$1\"')\n\t\t\t\t\t\t\t\t.replace(/,(\\s*})/g, '$1')\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (ele.constructor.defaultProps && ele.constructor.defaultProps.hasOwnProperty(key)) {\n\t\t\t\t\tele.props[key] = ele.constructor.defaultProps[key]\n\t\t\t\t} else {\n\t\t\t\t\tele.props[key] = null\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tfire(name, data) {\n\t\tthis.dispatchEvent(new CustomEvent(name, {\n\t\t\tdetail: data\n\t\t}))\n\t}\n\n\tbeforeInstall() {}\n\n\tinstall() {}\n\n\tafterInstall() {}\n\n\tinstalled() {}\n\n\tuninstall() {}\n\n\tbeforeUpdate() {}\n\n\tupdated() {}\n\n\tbeforeRender() {}\n\n\trendered() {}\n\n\treceiveProps() {}\n\n}\n","/*!\n * https://github.com/Palindrom/JSONPatcherProxy\n * (c) 2017 Starcounter\n * MIT license\n */\n\n/** Class representing a JS Object observer */\nconst JSONPatcherProxy = (function() {\n /**\n * Deep clones your object and returns a new object.\n */\n function deepClone(obj) {\n switch (typeof obj) {\n case 'object':\n return JSON.parse(JSON.stringify(obj)) //Faster than ES5 clone - http://jsperf.com/deep-cloning-of-objects/5\n case 'undefined':\n return null //this is how JSON.stringify behaves for array items\n default:\n return obj //no need to clone primitives\n }\n }\n JSONPatcherProxy.deepClone = deepClone\n\n function escapePathComponent(str) {\n if (str.indexOf('/') == -1 && str.indexOf('~') == -1) return str\n return str.replace(/~/g, '~0').replace(/\\//g, '~1')\n }\n JSONPatcherProxy.escapePathComponent = escapePathComponent\n\n /**\n * Walk up the parenthood tree to get the path\n * @param {JSONPatcherProxy} instance\n * @param {Object} obj the object you need to find its path\n */\n function findObjectPath(instance, obj) {\n const pathComponents = []\n let parentAndPath = instance.parenthoodMap.get(obj)\n while (parentAndPath && parentAndPath.path) {\n // because we're walking up-tree, we need to use the array as a stack\n pathComponents.unshift(parentAndPath.path)\n parentAndPath = instance.parenthoodMap.get(parentAndPath.parent)\n }\n if (pathComponents.length) {\n const path = pathComponents.join('/')\n return '/' + path\n }\n return ''\n }\n /**\n * A callback to be used as th proxy set trap callback.\n * It updates parenthood map if needed, proxifies nested newly-added objects, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the affected object\n * @param {String} key the effect property's name\n * @param {Any} newValue the value being set\n */\n function setTrap(instance, target, key, newValue) {\n const parentPath = findObjectPath(instance, target)\n\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n if (instance.proxifiedObjectsMap.has(newValue)) {\n const newValueOriginalObject = instance.proxifiedObjectsMap.get(newValue)\n\n instance.parenthoodMap.set(newValueOriginalObject.originalObject, {\n parent: target,\n path: key\n })\n }\n /*\n mark already proxified values as inherited.\n rationale: proxy.arr.shift()\n will emit\n {op: replace, path: '/arr/1', value: arr_2}\n {op: remove, path: '/arr/2'}\n\n by default, the second operation would revoke the proxy, and this renders arr revoked.\n That's why we need to remember the proxies that are inherited.\n */\n const revokableInstance = instance.proxifiedObjectsMap.get(newValue)\n /*\n Why do we need to check instance.isProxifyingTreeNow?\n\n We need to make sure we mark revokables as inherited ONLY when we're observing,\n because throughout the first proxification, a sub-object is proxified and then assigned to\n its parent object. This assignment of a pre-proxified object can fool us into thinking\n that it's a proxified object moved around, while in fact it's the first assignment ever.\n\n Checking isProxifyingTreeNow ensures this is not happening in the first proxification,\n but in fact is is a proxified object moved around the tree\n */\n if (revokableInstance && !instance.isProxifyingTreeNow) {\n revokableInstance.inherited = true\n }\n\n // if the new value is an object, make sure to watch it\n if (\n newValue &&\n typeof newValue == 'object' &&\n !instance.proxifiedObjectsMap.has(newValue)\n ) {\n instance.parenthoodMap.set(newValue, {\n parent: target,\n path: key\n })\n newValue = instance._proxifyObjectTreeRecursively(target, newValue, key)\n }\n // let's start with this operation, and may or may not update it later\n const operation = {\n op: 'remove',\n path: destinationPropKey\n }\n if (typeof newValue == 'undefined') {\n // applying De Morgan's laws would be a tad faster, but less readable\n if (!Array.isArray(target) && !target.hasOwnProperty(key)) {\n // `undefined` is being set to an already undefined value, keep silent\n return Reflect.set(target, key, newValue)\n }\n // when array element is set to `undefined`, should generate replace to `null`\n if (Array.isArray(target)) {\n // undefined array elements are JSON.stringified to `null`\n ;(operation.op = 'replace'), (operation.value = null)\n }\n const oldValue = instance.proxifiedObjectsMap.get(target[key])\n // was the deleted a proxified object?\n if (oldValue) {\n instance.parenthoodMap.delete(target[key])\n instance.disableTrapsForProxy(oldValue)\n instance.proxifiedObjectsMap.delete(oldValue)\n }\n } else {\n if (Array.isArray(target) && !Number.isInteger(+key.toString())) {\n /* array props (as opposed to indices) don't emit any patches, to avoid needless `length` patches */\n if (key != 'length') {\n console.warn(\n 'JSONPatcherProxy noticed a non-integer prop was set for an array. This will not emit a patch'\n )\n }\n return Reflect.set(target, key, newValue)\n }\n operation.op = 'add'\n if (target.hasOwnProperty(key)) {\n if (typeof target[key] !== 'undefined' || Array.isArray(target)) {\n operation.op = 'replace' // setting `undefined` array elements is a `replace` op\n }\n }\n operation.value = newValue\n }\n operation.oldValue = target[key]\n const reflectionResult = Reflect.set(target, key, newValue)\n instance.defaultCallback(operation)\n return reflectionResult\n }\n /**\n * A callback to be used as th proxy delete trap callback.\n * It updates parenthood map if needed, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the effected object\n * @param {String} key the effected property's name\n */\n function deleteTrap(instance, target, key) {\n if (typeof target[key] !== 'undefined') {\n const parentPath = findObjectPath(instance, target)\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n const revokableProxyInstance = instance.proxifiedObjectsMap.get(\n target[key]\n )\n\n if (revokableProxyInstance) {\n if (revokableProxyInstance.inherited) {\n /*\n this is an inherited proxy (an already proxified object that was moved around),\n we shouldn't revoke it, because even though it was removed from path1, it is still used in path2.\n And we know that because we mark moved proxies with `inherited` flag when we move them\n\n it is a good idea to remove this flag if we come across it here, in deleteProperty trap.\n We DO want to revoke the proxy if it was removed again.\n */\n revokableProxyInstance.inherited = false\n } else {\n instance.parenthoodMap.delete(revokableProxyInstance.originalObject)\n instance.disableTrapsForProxy(revokableProxyInstance)\n instance.proxifiedObjectsMap.delete(target[key])\n }\n }\n const reflectionResult = Reflect.deleteProperty(target, key)\n\n instance.defaultCallback({\n op: 'remove',\n path: destinationPropKey\n })\n\n return reflectionResult\n }\n }\n /* pre-define resume and pause functions to enhance constructors performance */\n function resume() {\n this.defaultCallback = operation => {\n this.isRecording && this.patches.push(operation)\n this.userCallback && this.userCallback(operation)\n }\n this.isObserving = true\n }\n function pause() {\n this.defaultCallback = () => {}\n this.isObserving = false\n }\n /**\n * Creates an instance of JSONPatcherProxy around your object of interest `root`.\n * @param {Object|Array} root - the object you want to wrap\n * @param {Boolean} [showDetachedWarning = true] - whether to log a warning when a detached sub-object is modified @see {@link https://github.com/Palindrom/JSONPatcherProxy#detached-objects}\n * @returns {JSONPatcherProxy}\n * @constructor\n */\n function JSONPatcherProxy(root, showDetachedWarning) {\n this.isProxifyingTreeNow = false\n this.isObserving = false\n this.proxifiedObjectsMap = new Map()\n this.parenthoodMap = new Map()\n // default to true\n if (typeof showDetachedWarning !== 'boolean') {\n showDetachedWarning = true\n }\n\n this.showDetachedWarning = showDetachedWarning\n this.originalObject = root\n this.cachedProxy = null\n this.isRecording = false\n this.userCallback\n /**\n * @memberof JSONPatcherProxy\n * Restores callback back to the original one provided to `observe`.\n */\n this.resume = resume.bind(this)\n /**\n * @memberof JSONPatcherProxy\n * Replaces your callback with a noop function.\n */\n this.pause = pause.bind(this)\n }\n\n JSONPatcherProxy.prototype.generateProxyAtPath = function(parent, obj, path) {\n if (!obj) {\n return obj\n }\n const traps = {\n set: (target, key, value, receiver) =>\n setTrap(this, target, key, value, receiver),\n deleteProperty: (target, key) => deleteTrap(this, target, key)\n }\n const revocableInstance = Proxy.revocable(obj, traps)\n // cache traps object to disable them later.\n revocableInstance.trapsInstance = traps\n revocableInstance.originalObject = obj\n\n /* keeping track of object's parent and path */\n\n this.parenthoodMap.set(obj, { parent, path })\n\n /* keeping track of all the proxies to be able to revoke them later */\n this.proxifiedObjectsMap.set(revocableInstance.proxy, revocableInstance)\n return revocableInstance.proxy\n }\n // grab tree's leaves one by one, encapsulate them into a proxy and return\n JSONPatcherProxy.prototype._proxifyObjectTreeRecursively = function(\n parent,\n root,\n path\n ) {\n for (let key in root) {\n if (root.hasOwnProperty(key)) {\n if (root[key] instanceof Object) {\n root[key] = this._proxifyObjectTreeRecursively(\n root,\n root[key],\n escapePathComponent(key)\n )\n }\n }\n }\n return this.generateProxyAtPath(parent, root, path)\n }\n // this function is for aesthetic purposes\n JSONPatcherProxy.prototype.proxifyObjectTree = function(root) {\n /*\n while proxyifying object tree,\n the proxyifying operation itself is being\n recorded, which in an unwanted behavior,\n that's why we disable recording through this\n initial process;\n */\n this.pause()\n this.isProxifyingTreeNow = true\n const proxifiedObject = this._proxifyObjectTreeRecursively(\n undefined,\n root,\n ''\n )\n /* OK you can record now */\n this.isProxifyingTreeNow = false\n this.resume()\n return proxifiedObject\n }\n /**\n * Turns a proxified object into a forward-proxy object; doesn't emit any patches anymore, like a normal object\n * @param {Proxy} proxy - The target proxy object\n */\n JSONPatcherProxy.prototype.disableTrapsForProxy = function(\n revokableProxyInstance\n ) {\n if (this.showDetachedWarning) {\n const message =\n \"You're accessing an object that is detached from the observedObject tree, see https://github.com/Palindrom/JSONPatcherProxy#detached-objects\"\n\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.deleteProperty = (\n targetObject,\n propKey\n ) => {\n return Reflect.deleteProperty(targetObject, propKey)\n }\n } else {\n delete revokableProxyInstance.trapsInstance.set\n delete revokableProxyInstance.trapsInstance.get\n delete revokableProxyInstance.trapsInstance.deleteProperty\n }\n }\n /**\n * Proxifies the object that was passed in the constructor and returns a proxified mirror of it. Even though both parameters are options. You need to pass at least one of them.\n * @param {Boolean} [record] - whether to record object changes to a later-retrievable patches array.\n * @param {Function} [callback] - this will be synchronously called with every object change with a single `patch` as the only parameter.\n */\n JSONPatcherProxy.prototype.observe = function(record, callback) {\n if (!record && !callback) {\n throw new Error('You need to either record changes or pass a callback')\n }\n this.isRecording = record\n this.userCallback = callback\n /*\n I moved it here to remove it from `unobserve`,\n this will also make the constructor faster, why initiate\n the array before they decide to actually observe with recording?\n They might need to use only a callback.\n */\n if (record) this.patches = []\n this.cachedProxy = this.proxifyObjectTree(this.originalObject)\n return this.cachedProxy\n }\n /**\n * If the observed is set to record, it will synchronously return all the patches and empties patches array.\n */\n JSONPatcherProxy.prototype.generate = function() {\n if (!this.isRecording) {\n throw new Error('You should set record to true to get patches later')\n }\n return this.patches.splice(0, this.patches.length)\n }\n /**\n * Revokes all proxies rendering the observed object useless and good for garbage collection @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/revocable}\n */\n JSONPatcherProxy.prototype.revoke = function() {\n this.proxifiedObjectsMap.forEach(el => {\n el.revoke()\n })\n }\n /**\n * Disables all proxies' traps, turning the observed object into a forward-proxy object, like a normal object that you can modify silently.\n */\n JSONPatcherProxy.prototype.disableTraps = function() {\n this.proxifiedObjectsMap.forEach(this.disableTrapsForProxy, this)\n }\n return JSONPatcherProxy\n})()\n\nexport default JSONPatcherProxy\n","import { diff } from './vdom/diff'\nimport JSONProxy from './proxy'\nimport { getUse } from './util'\nimport options from './options'\n\nexport function render(vnode, parent, store) {\n\tparent = typeof parent === 'string' ? document.querySelector(parent) : parent\n\tif (store) {\n\t\tif (store.data) {\n\t\t\tobserveStore(store)\n\t\t} else {\n\t\t\toptions.isMultiStore = true\n\t\t\t//Multi-store injection\n\t\t\tfor (let key in store) {\n\t\t\t\tobserveStore(store[key], key)\n\t\t\t}\n\t\t}\n\t\tparent.store = store\n\t}\n\treturn diff(null, vnode, parent, false)\n}\n\nfunction observeStore(store, key) {\n\tstore.instances = []\n\tstore.updateSelfInstances = []\n\textendStoreUpate(store, key)\n\n\tstore.data = new JSONProxy(store.data).observe(false, function (patch) {\n\t\tconst patchs = {}\n\t\tif (patch.op === 'remove') {\n\t\t\t// fix arr splice\n\t\t\tconst kv = getArrayPatch(patch.path, store)\n\t\t\tpatchs[kv.k] = kv.v\n\n\t\t\tupdate(patchs, store)\n\n\t\t} else {\n\t\t\tconst key = fixPath(patch.path)\n\t\t\tpatchs[key] = patch.value\n\n\t\t\tupdate(patchs, store)\n\n\t\t}\n\t})\n}\n\nfunction update(patch, store) {\n\tstore.update(patch)\n}\n\nfunction extendStoreUpate(store, key) {\n\tstore.update = function (patch) {\n\t\tif (Object.keys(patch).length > 0) {\n\t\t\tthis.instances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && instance._updatePath[key] && needUpdate(patch, instance._updatePath[key]))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.use === 'function' ? instance.use() : instance.use)[key], instance.using, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && needUpdate(patch, instance._updatePath))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tinstance.using = getUse(store.data, typeof instance.use === 'function' ? instance.use() : instance.use)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t})\n\n\t\t\tthis.updateSelfInstances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updateSelfPath && instance._updateSelfPath[key] && needUpdate(patch, instance._updateSelfPath[key]))) {\n\t\t\t\t\t\tif (instance.useSelf) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)[key], instance.usingSelf, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (instance._updateSelfPath && needUpdate(patch, instance._updateSelfPath)) {\n\t\t\t\t\t\tinstance.usingSelf = getUse(store.data, typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\tthis.onChange && this.onChange(patch)\n\t\t}\n\t}\n}\n\n\nexport function needUpdate(diffResult, updatePath) {\n\tfor (let keyA in diffResult) {\n\t\tif (updatePath[keyA]) {\n\t\t\treturn true\n\t\t}\n\t\tfor (let keyB in updatePath) {\n\t\t\tif (includePath(keyA, keyB)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\treturn false\n}\n\nfunction includePath(pathA, pathB) {\n\tif (pathA.indexOf(pathB) === 0) {\n\t\tconst next = pathA.substr(pathB.length, 1)\n\t\tif (next === '[' || next === '.') {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nexport function fixPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tarr.forEach((item, index) => {\n\t\tif (index) {\n\t\t\tif (isNaN(Number(item))) {\n\t\t\t\tmpPath += '.' + item\n\t\t\t} else {\n\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t}\n\t\t} else {\n\t\t\tmpPath += item\n\t\t}\n\t})\n\treturn mpPath\n}\n\nfunction getArrayPatch(path, store) {\n\tconst arr = path.replace('/', '').split('/')\n\tlet current = store.data[arr[0]]\n\tfor (let i = 1, len = arr.length; i < len - 1; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\treturn {\n\t\tk: fixArrPath(path),\n\t\tv: current\n\t}\n}\n\nfunction fixArrPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tconst len = arr.length\n\tarr.forEach((item, index) => {\n\t\tif (index < len - 1) {\n\t\t\tif (index) {\n\t\t\t\tif (isNaN(Number(item))) {\n\t\t\t\t\tmpPath += '.' + item\n\t\t\t\t} else {\n\t\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmpPath += item\n\t\t\t}\n\t\t}\n\t})\n\treturn mpPath\n}\n","import WeElement from './we-element'\nimport options from './options'\n\nexport function define(name, ctor, config) {\n if (options.mapping[name]) {\n return\n }\n if (ctor.is === 'WeElement') {\n customElements.define(name, ctor)\n options.mapping[name] = ctor\n\n } else {\n \n if (typeof config === 'string') {\n config = { css: config }\n } else {\n config = config || { }\n }\n\n class Ele extends WeElement {\n\n static css = config.css\n\n static propTypes = config.propTypes\n\n static defaultProps = config.defaultProps\n\n render() {\n return ctor.call(this, this)\n }\n\n receiveProps() {\n if (config.receiveProps) {\n return config.receiveProps.apply(this, arguments)\n }\n }\n }\n\n const eleHooks = ['install', 'installed', 'uninstall', 'beforeUpdate', 'updated', 'beforeRender', 'rendered'],\n storeHelpers = ['use', 'useSelf']\n\n eleHooks.forEach(hook => {\n if (config[hook]) {\n Ele.prototype[hook] = function () {\n config[hook].apply(this, arguments)\n }\n }\n })\n\n storeHelpers.forEach(func => {\n if (config[func]) {\n Ele.prototype[func] = function () {\n return typeof config[func] === 'function'\n ? config[func].apply(this, arguments)\n : config[func]\n }\n }\n })\n\n customElements.define(name, Ele)\n options.mapping[name] = Ele\n }\n}\n\n\n\n","import { define } from './define'\n\nexport function tag(name, pure) {\n return function(target) {\n target.pure = pure\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\t\tThe virtual DOM element to clone\n * @param {Object} props\tAttributes/props to add when cloning\n * @param {VNode} rest\t\tAny 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(str) {\n return str.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}","var n=function(t,r,u,e){for(var p=1;p\"===t?(a(),u=1):u&&(\"=\"===t?(u=4,r=e,e=\"\"):\"/\"===t?(a(),3===u&&(s=s[0]),u=s,(s=s[0]).push(u,4),u=0):\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t?(a(),u=2):e+=t)}return a(),s},r=\"function\"==typeof Map,u=r?new Map:{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)),r}:function(n){for(var r=\"\",e=0;e1?r:r[0]}\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 htm from 'htm'\nimport { extend, get, set, bind, unbind } from './extend'\nimport JSONProxy from './proxy'\n\nconst html = htm.bind(h)\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 html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n\tJSONProxy\n}\n\noptions.root.Omi = omi\noptions.root.omi = omi\noptions.root.Omi.version = '6.15.4'\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 html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n\tJSONProxy\n}\n"],"names":["VNode","getGlobal","global","Math","Array","self","window","stack","h","nodeName","attributes","children","lastSimple","child","simple","i","arguments","length","push","pop","undefined","String","p","key","options","vnode","Reflect","customElements","hasOwnProperty","BuiltInHTMLElement","HTMLElement","construct","constructor","prototype","setPrototypeOf","cssToDom","css","node","document","createElement","textContent","camelCase","str","replace","$","$1","toUpperCase","extend","obj","props","applyRef","ref","value","current","defer","Promise","resolve","then","bind","setTimeout","isArray","Object","toString","call","getUse","data","paths","out","name","forEach","path","index","isPath","getTargetByPath","keys","tempPath","tempVal","args","apply","pathToArr","split","origin","arr","len","hyphenateRE","hyphenate","toLowerCase","getValByPath","prop","getPath","result","item","removeItem","splice","ATTR_KEY","IS_NON_DIMENSIONAL","isSameNodeType","hydrating","splitText","_componentConstructor","isNamedNode","mapping","normalizedNodeName","extension","handler","set","get","eventProxy","e","_listeners","type","el","addEventListener","unbind","removeEventListener","createNode","isSvg","createElementNS","removeNode","parentNode","removeChild","setAccessor","old","component","className","style","cssText","test","innerHTML","__html","useCapture","substring","touchStart","touchEnd","pureRemoveAttribute","removeAttribute","ns","removeAttributeNS","setAttributeNS","pureSetAttribute","setAttribute","event","___touchX","touches","pageX","___touchY","pageY","___scrollTop","body","scrollTop","abs","changedTouches","dispatchEvent","CustomEvent","detail","diffLevel","isSvgMode","diff","dom","parent","updateSelf","ret","ownerSVGElement","styles","querySelectorAll","s","firstChild","insertBefore","appendChild","ele","idiff","one","prevSvgMode","_component","nodeValue","createTextNode","replaceChild","vnodeName","fc","vchildren","a","nextSibling","is","noSlot","dangerouslySetInnerHTML","innerDiffNode","isHydrating","originalChildren","childNodes","keyed","keyedLen","min","childrenLen","vlen","j","c","f","vchild","__key","trim","recollectNodeTree","unmountOnly","removeChildren","lastChild","next","previousSibling","diffAttributes","attrs","isWeElement","update","oldClone","receiveProps","assign","ccName","id","WeElement","defaultProps","elementId","connectedCallback","store","host","use","isMultiStore","_updatePath","using","storeName","instances","useSelf","updateSelfInstances","usingSelf","_updateSelfPath","attrsToProps","beforeInstall","install","afterInstall","shadowRoot","attachShadow","beforeRender","rendered","render","__hasChildren","rootNode","_customStyleElement","_customStyleContent","installed","_isInstalled","disconnectedCallback","uninstall","ignoreAttrs","_willUpdate","beforeUpdate","updated","val","JSON","stringify","getAttribute","propTypes","Number","Boolean","substr","Omi","parse","fire","JSONPatcherProxy","deepClone","escapePathComponent","indexOf","findObjectPath","instance","pathComponents","parentAndPath","parenthoodMap","unshift","join","setTrap","target","newValue","parentPath","destinationPropKey","proxifiedObjectsMap","has","newValueOriginalObject","originalObject","revokableInstance","isProxifyingTreeNow","inherited","_proxifyObjectTreeRecursively","operation","op","oldValue","delete","disableTrapsForProxy","isInteger","warn","reflectionResult","defaultCallback","deleteTrap","revokableProxyInstance","deleteProperty","resume","isRecording","patches","userCallback","isObserving","pause","root","showDetachedWarning","Map","cachedProxy","generateProxyAtPath","traps","receiver","revocableInstance","Proxy","revocable","trapsInstance","proxy","proxifyObjectTree","proxifiedObject","message","targetObject","propKey","observe","record","callback","Error","generate","revoke","disableTraps","querySelector","observeStore","JSONProxy","patch","patchs","kv","getArrayPatch","k","v","fixPath","extendStoreUpate","needUpdate","onChange","diffResult","updatePath","keyA","keyB","includePath","pathA","pathB","mpPath","isNaN","fixArrPath","define","ctor","config","Ele","eleHooks","storeHelpers","hook","func","tag","pure","cloneElement","slice","getHost","rpx","b","innerWidth","hasOwn","classNames","classes","arg","argType","inner","extractClass","class","o","html","htm","createRef","Component","defineElement","elements","omi","version"],"mappings":";;;;;;;;AAAA;AACA,SAAgBA,KAAT,GAAiB;;ACDxB,SAASC,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;WAGL,EAHK;gBAIA;CAJf;;ICpBMM,QAAQ,EAAd;;AAEA,SAAgBC,CAAT,CAAWC,QAAX,EAAqBC,UAArB,EAAiC;MAClCC,WAAW,EAAf;MACEC,mBADF;MAEEC,cAFF;MAGEC,eAHF;MAIEC,UAJF;OAKKA,IAAIC,UAAUC,MAAnB,EAA2BF,MAAM,CAAjC,GAAsC;UAC9BG,IAAN,CAAWF,UAAUD,CAAV,CAAX;;MAEEL,cAAcA,WAAWC,QAAX,IAAuB,IAAzC,EAA+C;QACzC,CAACJ,MAAMU,MAAX,EAAmBV,MAAMW,IAAN,CAAWR,WAAWC,QAAtB;WACZD,WAAWC,QAAlB;;SAEKJ,MAAMU,MAAb,EAAqB;QACf,CAACJ,QAAQN,MAAMY,GAAN,EAAT,KAAyBN,MAAMM,GAAN,KAAcC,SAA3C,EAAsD;WAC/CL,IAAIF,MAAMI,MAAf,EAAuBF,GAAvB;cAAoCG,I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gV,YAAYrK,SAAlB;AACA,IAAMsK,gBAAgB7B,MAAtB;AACA,IAAM8B,WAAWtW,QAAQ6E,OAAzB;;AAEA,IAAM0R,MAAM;UAAA;sBAAA;sBAAA;gBAAA;MAAA;kBAAA;kBAAA;gBAAA;4BAAA;kBAAA;UAAA;8BAAA;wBAAA;4BAAA;sBAAA;YAAA;UAAA;MAAA;oBAAA;MAAA;kBAAA;UAAA;UAAA;YAAA;gBAAA;;CAAZ;;AA6BAvW,QAAQyR,IAAR,CAAa7C,GAAb,GAAmB2H,GAAnB;AACAvW,QAAQyR,IAAR,CAAa8E,GAAb,GAAmBA,GAAnB;AACAvW,QAAQyR,IAAR,CAAa7C,GAAb,CAAiB4H,OAAjB,GAA2B,QAA3B;;;"} \ No newline at end of file +{"version":3,"file":"omi.esm.js","sources":["../src/vnode.js","../src/options.js","../src/h.js","../src/util.js","../src/constants.js","../src/vdom/index.js","../src/extend.js","../src/dom/index.js","../src/vdom/diff.js","../src/we-element.js","../src/proxy.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/htm/dist/htm.mjs","../src/omi.js"],"sourcesContent":["/** Virtual DOM Node */\nexport function VNode() {}\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 *\t@public\n *\t@namespace options {Object}\n */\nexport default {\n store: null,\n root: getGlobal(),\n\tmapping: {},\n\tisMultiStore: false\n}\n","import { VNode } from './vnode'\nimport options from './options'\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 let p = new VNode()\n p.nodeName = nodeName\n p.children = children\n p.attributes = attributes == null ? undefined : attributes\n p.key = attributes == null ? undefined : attributes.key\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","/**\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\n\nexport function getUse(data, paths, out, name) {\n const obj = []\n paths.forEach((path, index) => {\n const isPath = typeof path === 'string'\n if (isPath) {\n obj[index] = getTargetByPath(data, path)\n } else {\n const key = Object.keys(path)[0]\n const value = path[key]\n if (typeof value === 'string') {\n obj[index] = getTargetByPath(data, value)\n } else {\n const tempPath = value[0]\n if (typeof tempPath === 'string') {\n const tempVal = getTargetByPath(data, tempPath)\n obj[index] = value[1] ? value[1](tempVal) : tempVal\n } else {\n const args = []\n tempPath.forEach(path =>{\n args.push(getTargetByPath(data, path))\n })\n obj[index] = value[1].apply(null, args)\n }\n }\n obj[key] = obj[index]\n }\n\t})\n\tif(out) out[name] = obj\n return obj\n}\n\nexport function pathToArr(path) {\n\tif(typeof path !== 'string' || !path) return []\n\t// return path.split(/\\.|\\[|\\]/).filter(name => !!name)\n\treturn path.replace(/]/g, '').replace(/\\[/g, '.').split('.')\n}\n\nexport function getTargetByPath(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 return current\n}\n\nconst hyphenateRE = /\\B([A-Z])/g\nexport function hyphenate(str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase()\n}\n\nexport function getValByPath(path, current) {\n\tconst arr = pathToArr(path)\n\tarr.forEach(prop => {\n\t\tcurrent = current[prop]\n\t})\n\treturn current\n}\n\nexport function getPath(obj, out, name) {\n\tconst result = {}\n\tobj.forEach(item => {\n\t\tif (typeof item === 'string') {\n\t\t\tresult[item] = true\n\t\t} else {\n\t\t\tconst tempPath = item[Object.keys(item)[0]]\n\t\t\tif (typeof tempPath === 'string') {\n\t\t\t\tresult[tempPath] = true\n\t\t\t} else {\n\t\t\t\tif (typeof tempPath[0] === 'string') {\n\t\t\t\t\tresult[tempPath[0]] = true\n\t\t\t\t} else {\n\t\t\t\t\ttempPath[0].forEach(path => (result[path] = true))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\tif(out) out[name] = result\n\treturn result\n}\n\nexport function removeItem(item, arr){\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}","// 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\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf 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\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized 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\textension['o-' + name] = handler\n}\n\nexport function set(origin, path, value) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\t\tif (i === len - 1) {\n\t\t\t\t\tcurrent[arr[i]] = value\n\t\t\t} else {\n\t\t\t\t\tcurrent = current[arr[i]]\n\t\t\t}\n\t}\n}\n\nexport function get(origin, path) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\n\treturn current\n}\n\nfunction eventProxy(e) {\n return this._listeners[e.type](e)\n}\n\nexport function bind(el, type, handler){\n\tel._listeners = el._listeners || {}\n\tel._listeners[type] = handler\n\tel.addEventListener(type, eventProxy)\n}\n\nexport function unbind(el, type){\n\tel.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 let useCapture = name !== (name = name.replace(/Capture$/, ''))\n name = name.toLowerCase().substring(2)\n if (value) {\n if (!old) {\n node.addEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.addEventListener('touchstart', touchStart, useCapture)\n node.addEventListener('touchend', touchEnd, useCapture)\n }\n }\n } else {\n node.removeEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.removeEventListener('touchstart', touchStart, useCapture)\n node.removeEventListener('touchend', touchEnd, useCapture)\n }\n }\n ;(node._listeners || (node._listeners = {}))[name] = value\n } else if (node.nodeName === 'INPUT' && name === 'value'){\n node[name] = value == null ? '' : value\n } else if (name !== 'list' && name !== 'type' && name !== 'css' && !isSvg && name in node && value !== '') { //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 ? node.pureRemoveAttribute(name) : 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 node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : 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 ? node.pureSetAttribute(name, value) : 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 touchStart(e) {\n this.___touchX = e.touches[0].pageX\n this.___touchY = e.touches[0].pageY\n this.___scrollTop = document.body.scrollTop\n}\n\nfunction touchEnd(e) {\n if (\n Math.abs(e.changedTouches[0].pageX - this.___touchX) < 30 &&\n Math.abs(e.changedTouches[0].pageY - this.___touchY) < 30 &&\n Math.abs(document.body.scrollTop - this.___scrollTop) < 30\n ) {\n this.dispatchEvent(new CustomEvent('tap', { detail: e }))\n }\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 *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\n *\t@returns {Element} dom\t\t\tThe created/mutated element\n *\t@private\n */\nexport function diff(dom, vnode, parent, component, updateSelf) {\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.nodeName === Fragment){\n vnode = vnode.children\n }\n if (isArray(vnode)) {\n if (parent) {\n const styles = parent.querySelectorAll('style')\n styles.forEach(s => {\n parent.removeChild(s)\n })\n innerDiffNode(parent, vnode, hydrating, component, updateSelf)\n\n for (let i = styles.length - 1; i >= 0; i--) {\n parent.firstChild ? parent.insertBefore(styles[i], parent.firstChild) : parent.appendChild(style[i])\n }\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 *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\n *\t@param {Boolean} isHydrating\tIf `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 // 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 // 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 *\t@param {Node} node\t\t\t\t\t\tDOM node to start unmount/removal from\n *\t@param {Boolean} [unmountOnly=false]\tIf `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 *\t- we use .lastChild here because it causes less reflow than .firstChild\n *\t- 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 *\t@param {Element} dom\t\tElement with attributes to diff `attrs` against\n *\t@param {Object} attrs\t\tThe desired end-state key-value attribute pairs\n *\t@param {Object} old\t\t\tCurrent/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(dom, name, old[name], (old[name] = undefined), isSvgMode, component)\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(dom, name, old[name], (old[name] = attrs[name]), isSvgMode, component)\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 if (isWeElement) {\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 {\n\tcssToDom,\n\tisArray,\n\tgetUse,\n\thyphenate,\n\tgetValByPath,\n\tremoveItem\n} from './util'\nimport { diff } from './vdom/diff'\nimport options from './options'\nimport { getPath } from './util'\n\nlet id = 0\n\nexport default class WeElement extends HTMLElement {\n\tstatic is = 'WeElement'\n\n\tconstructor() {\n\t\tsuper()\n\t\tthis.props = Object.assign({},\n\t\t\tthis.constructor.defaultProps\n\t\t)\n\t\tthis.elementId = id++\n\t}\n\n\tconnectedCallback() {\n\t\tlet p = this.parentNode\n\t\twhile (p && !this.store) {\n\t\t\tthis.store = p.store\n\t\t\tp = p.parentNode || p.host\n\t\t}\n\n\t\tif (this.use) {\n\t\t\tlet use\n\t\t\tif (typeof this.use === 'function') {\n\t\t\t\tuse = this.use()\n\t\t\t} else {\n\t\t\t\tuse = this.use\n\t\t\t}\n\n\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\t_updatePath[storeName] = {}\n\t\t\t\t\tusing[storeName] = {}\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].instances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.using = using\n\t\t\t\tthis._updatePath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updatePath = getPath(use)\n\t\t\t\tthis.using = getUse(this.store.data, use)\n\t\t\t\tthis.store.instances.push(this)\n\t\t\t}\n\t\t}\n\t\tif (this.useSelf) {\n\t\t\tconst use = typeof this.useSelf === 'function' ? this.useSelf() : this.useSelf\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].updateSelfInstances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.usingSelf = using\n\t\t\t\tthis._updateSelfPath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updateSelfPath = getPath(use)\n\t\t\t\tthis.usingSelf = getUse(this.store.data, use)\n\t\t\t\tthis.store.updateSelfInstances.push(this)\n\t\t\t}\n\t\t}\n\t\tthis.attrsToProps()\n\t\tthis.beforeInstall()\n\t\tthis.install()\n\t\tthis.afterInstall()\n\n\t\tlet shadowRoot\n\t\tif (!this.shadowRoot) {\n\t\t\tshadowRoot = this.attachShadow({\n\t\t\t\tmode: 'open'\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot = this.shadowRoot\n\t\t\tlet fc\n\t\t\twhile ((fc = shadowRoot.firstChild)) {\n\t\t\t\tshadowRoot.removeChild(fc)\n\t\t\t}\n\t\t}\n\n\t\tif (this.constructor.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(this.constructor.css))\n\t\t} else if (this.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(typeof this.css === 'function' ? this.css() : this.css))\n\t\t}\n\t\tthis.beforeRender()\n\t\toptions.afterInstall && options.afterInstall(this)\n\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.__hasChildren = Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0\n\n\t\tthis.rootNode = diff(\n\t\t\tnull,\n\t\t\trendered,\n\t\t\tnull,\n\t\t\tthis\n\t\t)\n\t\tthis.rendered()\n\n\t\tif (this.props.css) {\n\t\t\tthis._customStyleElement = cssToDom(this.props.css)\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tshadowRoot.appendChild(this._customStyleElement)\n\t\t}\n\n\t\tif (isArray(this.rootNode)) {\n\t\t\tthis.rootNode.forEach(function (item) {\n\t\t\t\tshadowRoot.appendChild(item)\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot.appendChild(this.rootNode)\n\t\t}\n\t\tthis.installed()\n\t\tthis._isInstalled = true\n\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.uninstall()\n\t\tthis._isInstalled = false\n\t\tif (this.store) {\n\t\t\tif(options.isMultiStore){\n\t\t\t\tfor(let key in this.store){\n\t\t\t\t\tconst current = this.store[key]\n\t\t\t\t\tremoveItem(this, current.instances)\n\t\t\t\t removeItem(this, current.updateSelfInstances)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tremoveItem(this, this.store.instances)\n\t\t\t\tremoveItem(this, this.store.updateSelfInstances)\n\t\t\t}\n\t\t}\n\t}\n\n\tupdate(ignoreAttrs, updateSelf) {\n\t\tthis._willUpdate = true\n\t\tthis.beforeUpdate()\n\t\tthis.beforeRender()\n\t\t//fix null !== undefined\n\t\tif (this._customStyleContent != this.props.css) {\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tthis._customStyleElement.textContent = this._customStyleContent\n\t\t}\n\t\tthis.attrsToProps(ignoreAttrs)\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.rendered()\n\t\tthis.__hasChildren = this.__hasChildren || (Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0)\n\n\t\tthis.rootNode = diff(\n\t\t\tthis.rootNode,\n\t\t\trendered,\n\t\t\tthis.shadowRoot,\n\t\t\tthis,\n\t\t\tupdateSelf\n\t\t)\n\t\tthis._willUpdate = false\n\t\tthis.updated()\n\n\t}\n\n\tupdateSelf(ignoreAttrs) {\n\t\tthis.update(ignoreAttrs, true)\n\t}\n\n\tremoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t\t//Avoid executing removeAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tsetAttribute(key, val) {\n\t\tif (val && typeof val === 'object') {\n\t\t\tsuper.setAttribute(key, JSON.stringify(val))\n\t\t} else {\n\t\t\tsuper.setAttribute(key, val)\n\t\t}\n\t\t//Avoid executing setAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tpureRemoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t}\n\n\tpureSetAttribute(key, val) {\n\t\tsuper.setAttribute(key, val)\n\t}\n\n\tattrsToProps(ignoreAttrs) {\n\t\tconst ele = this\n\t\tif (ele.normalizedNodeName || ignoreAttrs) return\n\t\tele.props['css'] = ele.getAttribute('css')\n\t\tconst attrs = this.constructor.propTypes\n\t\tif (!attrs) return\n\t\tObject.keys(attrs).forEach(key => {\n\t\t\tconst type = attrs[key]\n\t\t\tconst val = ele.getAttribute(hyphenate(key))\n\t\t\tif (val !== null) {\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase String:\n\t\t\t\t\t\tele.props[key] = val\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Number:\n\t\t\t\t\t\tele.props[key] = Number(val)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Boolean:\n\t\t\t\t\t\tif (val === 'false' || val === '0') {\n\t\t\t\t\t\t\tele.props[key] = false\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = true\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Array:\n\t\t\t\t\tcase Object:\n\t\t\t\t\t\tif (val[0] === ':') {\n\t\t\t\t\t\t\tele.props[key] = getValByPath(val.substr(1), Omi.$)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = JSON.parse(val\n\t\t\t\t\t\t\t\t.replace(/(['\"])?([a-zA-Z0-9_-]+)(['\"])?:([^\\/])/g, '\"$2\":$4')\n\t\t\t\t\t\t\t\t.replace(/'([\\s\\S]*?)'/g, '\"$1\"')\n\t\t\t\t\t\t\t\t.replace(/,(\\s*})/g, '$1')\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (ele.constructor.defaultProps && ele.constructor.defaultProps.hasOwnProperty(key)) {\n\t\t\t\t\tele.props[key] = ele.constructor.defaultProps[key]\n\t\t\t\t} else {\n\t\t\t\t\tele.props[key] = null\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tfire(name, data) {\n\t\tthis.dispatchEvent(new CustomEvent(name, {\n\t\t\tdetail: data\n\t\t}))\n\t}\n\n\tbeforeInstall() {}\n\n\tinstall() {}\n\n\tafterInstall() {}\n\n\tinstalled() {}\n\n\tuninstall() {}\n\n\tbeforeUpdate() {}\n\n\tupdated() {}\n\n\tbeforeRender() {}\n\n\trendered() {}\n\n\treceiveProps() {}\n\n}\n","/*!\n * https://github.com/Palindrom/JSONPatcherProxy\n * (c) 2017 Starcounter\n * MIT license\n */\n\n/** Class representing a JS Object observer */\nconst JSONPatcherProxy = (function() {\n /**\n * Deep clones your object and returns a new object.\n */\n function deepClone(obj) {\n switch (typeof obj) {\n case 'object':\n return JSON.parse(JSON.stringify(obj)) //Faster than ES5 clone - http://jsperf.com/deep-cloning-of-objects/5\n case 'undefined':\n return null //this is how JSON.stringify behaves for array items\n default:\n return obj //no need to clone primitives\n }\n }\n JSONPatcherProxy.deepClone = deepClone\n\n function escapePathComponent(str) {\n if (str.indexOf('/') == -1 && str.indexOf('~') == -1) return str\n return str.replace(/~/g, '~0').replace(/\\//g, '~1')\n }\n JSONPatcherProxy.escapePathComponent = escapePathComponent\n\n /**\n * Walk up the parenthood tree to get the path\n * @param {JSONPatcherProxy} instance\n * @param {Object} obj the object you need to find its path\n */\n function findObjectPath(instance, obj) {\n const pathComponents = []\n let parentAndPath = instance.parenthoodMap.get(obj)\n while (parentAndPath && parentAndPath.path) {\n // because we're walking up-tree, we need to use the array as a stack\n pathComponents.unshift(parentAndPath.path)\n parentAndPath = instance.parenthoodMap.get(parentAndPath.parent)\n }\n if (pathComponents.length) {\n const path = pathComponents.join('/')\n return '/' + path\n }\n return ''\n }\n /**\n * A callback to be used as th proxy set trap callback.\n * It updates parenthood map if needed, proxifies nested newly-added objects, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the affected object\n * @param {String} key the effect property's name\n * @param {Any} newValue the value being set\n */\n function setTrap(instance, target, key, newValue) {\n const parentPath = findObjectPath(instance, target)\n\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n if (instance.proxifiedObjectsMap.has(newValue)) {\n const newValueOriginalObject = instance.proxifiedObjectsMap.get(newValue)\n\n instance.parenthoodMap.set(newValueOriginalObject.originalObject, {\n parent: target,\n path: key\n })\n }\n /*\n mark already proxified values as inherited.\n rationale: proxy.arr.shift()\n will emit\n {op: replace, path: '/arr/1', value: arr_2}\n {op: remove, path: '/arr/2'}\n\n by default, the second operation would revoke the proxy, and this renders arr revoked.\n That's why we need to remember the proxies that are inherited.\n */\n const revokableInstance = instance.proxifiedObjectsMap.get(newValue)\n /*\n Why do we need to check instance.isProxifyingTreeNow?\n\n We need to make sure we mark revokables as inherited ONLY when we're observing,\n because throughout the first proxification, a sub-object is proxified and then assigned to\n its parent object. This assignment of a pre-proxified object can fool us into thinking\n that it's a proxified object moved around, while in fact it's the first assignment ever.\n\n Checking isProxifyingTreeNow ensures this is not happening in the first proxification,\n but in fact is is a proxified object moved around the tree\n */\n if (revokableInstance && !instance.isProxifyingTreeNow) {\n revokableInstance.inherited = true\n }\n\n // if the new value is an object, make sure to watch it\n if (\n newValue &&\n typeof newValue == 'object' &&\n !instance.proxifiedObjectsMap.has(newValue)\n ) {\n instance.parenthoodMap.set(newValue, {\n parent: target,\n path: key\n })\n newValue = instance._proxifyObjectTreeRecursively(target, newValue, key)\n }\n // let's start with this operation, and may or may not update it later\n const operation = {\n op: 'remove',\n path: destinationPropKey\n }\n if (typeof newValue == 'undefined') {\n // applying De Morgan's laws would be a tad faster, but less readable\n if (!Array.isArray(target) && !target.hasOwnProperty(key)) {\n // `undefined` is being set to an already undefined value, keep silent\n return Reflect.set(target, key, newValue)\n }\n // when array element is set to `undefined`, should generate replace to `null`\n if (Array.isArray(target)) {\n // undefined array elements are JSON.stringified to `null`\n ;(operation.op = 'replace'), (operation.value = null)\n }\n const oldValue = instance.proxifiedObjectsMap.get(target[key])\n // was the deleted a proxified object?\n if (oldValue) {\n instance.parenthoodMap.delete(target[key])\n instance.disableTrapsForProxy(oldValue)\n instance.proxifiedObjectsMap.delete(oldValue)\n }\n } else {\n if (Array.isArray(target) && !Number.isInteger(+key.toString())) {\n /* array props (as opposed to indices) don't emit any patches, to avoid needless `length` patches */\n if (key != 'length') {\n console.warn(\n 'JSONPatcherProxy noticed a non-integer prop was set for an array. This will not emit a patch'\n )\n }\n return Reflect.set(target, key, newValue)\n }\n operation.op = 'add'\n if (target.hasOwnProperty(key)) {\n if (typeof target[key] !== 'undefined' || Array.isArray(target)) {\n operation.op = 'replace' // setting `undefined` array elements is a `replace` op\n }\n }\n operation.value = newValue\n }\n operation.oldValue = target[key]\n const reflectionResult = Reflect.set(target, key, newValue)\n instance.defaultCallback(operation)\n return reflectionResult\n }\n /**\n * A callback to be used as th proxy delete trap callback.\n * It updates parenthood map if needed, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the effected object\n * @param {String} key the effected property's name\n */\n function deleteTrap(instance, target, key) {\n if (typeof target[key] !== 'undefined') {\n const parentPath = findObjectPath(instance, target)\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n const revokableProxyInstance = instance.proxifiedObjectsMap.get(\n target[key]\n )\n\n if (revokableProxyInstance) {\n if (revokableProxyInstance.inherited) {\n /*\n this is an inherited proxy (an already proxified object that was moved around),\n we shouldn't revoke it, because even though it was removed from path1, it is still used in path2.\n And we know that because we mark moved proxies with `inherited` flag when we move them\n\n it is a good idea to remove this flag if we come across it here, in deleteProperty trap.\n We DO want to revoke the proxy if it was removed again.\n */\n revokableProxyInstance.inherited = false\n } else {\n instance.parenthoodMap.delete(revokableProxyInstance.originalObject)\n instance.disableTrapsForProxy(revokableProxyInstance)\n instance.proxifiedObjectsMap.delete(target[key])\n }\n }\n const reflectionResult = Reflect.deleteProperty(target, key)\n\n instance.defaultCallback({\n op: 'remove',\n path: destinationPropKey\n })\n\n return reflectionResult\n }\n }\n /* pre-define resume and pause functions to enhance constructors performance */\n function resume() {\n this.defaultCallback = operation => {\n this.isRecording && this.patches.push(operation)\n this.userCallback && this.userCallback(operation)\n }\n this.isObserving = true\n }\n function pause() {\n this.defaultCallback = () => {}\n this.isObserving = false\n }\n /**\n * Creates an instance of JSONPatcherProxy around your object of interest `root`.\n * @param {Object|Array} root - the object you want to wrap\n * @param {Boolean} [showDetachedWarning = true] - whether to log a warning when a detached sub-object is modified @see {@link https://github.com/Palindrom/JSONPatcherProxy#detached-objects}\n * @returns {JSONPatcherProxy}\n * @constructor\n */\n function JSONPatcherProxy(root, showDetachedWarning) {\n this.isProxifyingTreeNow = false\n this.isObserving = false\n this.proxifiedObjectsMap = new Map()\n this.parenthoodMap = new Map()\n // default to true\n if (typeof showDetachedWarning !== 'boolean') {\n showDetachedWarning = true\n }\n\n this.showDetachedWarning = showDetachedWarning\n this.originalObject = root\n this.cachedProxy = null\n this.isRecording = false\n this.userCallback\n /**\n * @memberof JSONPatcherProxy\n * Restores callback back to the original one provided to `observe`.\n */\n this.resume = resume.bind(this)\n /**\n * @memberof JSONPatcherProxy\n * Replaces your callback with a noop function.\n */\n this.pause = pause.bind(this)\n }\n\n JSONPatcherProxy.prototype.generateProxyAtPath = function(parent, obj, path) {\n if (!obj) {\n return obj\n }\n const traps = {\n set: (target, key, value, receiver) =>\n setTrap(this, target, key, value, receiver),\n deleteProperty: (target, key) => deleteTrap(this, target, key)\n }\n const revocableInstance = Proxy.revocable(obj, traps)\n // cache traps object to disable them later.\n revocableInstance.trapsInstance = traps\n revocableInstance.originalObject = obj\n\n /* keeping track of object's parent and path */\n\n this.parenthoodMap.set(obj, { parent, path })\n\n /* keeping track of all the proxies to be able to revoke them later */\n this.proxifiedObjectsMap.set(revocableInstance.proxy, revocableInstance)\n return revocableInstance.proxy\n }\n // grab tree's leaves one by one, encapsulate them into a proxy and return\n JSONPatcherProxy.prototype._proxifyObjectTreeRecursively = function(\n parent,\n root,\n path\n ) {\n for (let key in root) {\n if (root.hasOwnProperty(key)) {\n if (root[key] instanceof Object) {\n root[key] = this._proxifyObjectTreeRecursively(\n root,\n root[key],\n escapePathComponent(key)\n )\n }\n }\n }\n return this.generateProxyAtPath(parent, root, path)\n }\n // this function is for aesthetic purposes\n JSONPatcherProxy.prototype.proxifyObjectTree = function(root) {\n /*\n while proxyifying object tree,\n the proxyifying operation itself is being\n recorded, which in an unwanted behavior,\n that's why we disable recording through this\n initial process;\n */\n this.pause()\n this.isProxifyingTreeNow = true\n const proxifiedObject = this._proxifyObjectTreeRecursively(\n undefined,\n root,\n ''\n )\n /* OK you can record now */\n this.isProxifyingTreeNow = false\n this.resume()\n return proxifiedObject\n }\n /**\n * Turns a proxified object into a forward-proxy object; doesn't emit any patches anymore, like a normal object\n * @param {Proxy} proxy - The target proxy object\n */\n JSONPatcherProxy.prototype.disableTrapsForProxy = function(\n revokableProxyInstance\n ) {\n if (this.showDetachedWarning) {\n const message =\n \"You're accessing an object that is detached from the observedObject tree, see https://github.com/Palindrom/JSONPatcherProxy#detached-objects\"\n\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.deleteProperty = (\n targetObject,\n propKey\n ) => {\n return Reflect.deleteProperty(targetObject, propKey)\n }\n } else {\n delete revokableProxyInstance.trapsInstance.set\n delete revokableProxyInstance.trapsInstance.get\n delete revokableProxyInstance.trapsInstance.deleteProperty\n }\n }\n /**\n * Proxifies the object that was passed in the constructor and returns a proxified mirror of it. Even though both parameters are options. You need to pass at least one of them.\n * @param {Boolean} [record] - whether to record object changes to a later-retrievable patches array.\n * @param {Function} [callback] - this will be synchronously called with every object change with a single `patch` as the only parameter.\n */\n JSONPatcherProxy.prototype.observe = function(record, callback) {\n if (!record && !callback) {\n throw new Error('You need to either record changes or pass a callback')\n }\n this.isRecording = record\n this.userCallback = callback\n /*\n I moved it here to remove it from `unobserve`,\n this will also make the constructor faster, why initiate\n the array before they decide to actually observe with recording?\n They might need to use only a callback.\n */\n if (record) this.patches = []\n this.cachedProxy = this.proxifyObjectTree(this.originalObject)\n return this.cachedProxy\n }\n /**\n * If the observed is set to record, it will synchronously return all the patches and empties patches array.\n */\n JSONPatcherProxy.prototype.generate = function() {\n if (!this.isRecording) {\n throw new Error('You should set record to true to get patches later')\n }\n return this.patches.splice(0, this.patches.length)\n }\n /**\n * Revokes all proxies rendering the observed object useless and good for garbage collection @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/revocable}\n */\n JSONPatcherProxy.prototype.revoke = function() {\n this.proxifiedObjectsMap.forEach(el => {\n el.revoke()\n })\n }\n /**\n * Disables all proxies' traps, turning the observed object into a forward-proxy object, like a normal object that you can modify silently.\n */\n JSONPatcherProxy.prototype.disableTraps = function() {\n this.proxifiedObjectsMap.forEach(this.disableTrapsForProxy, this)\n }\n return JSONPatcherProxy\n})()\n\nexport default JSONPatcherProxy\n","import { diff } from './vdom/diff'\nimport JSONProxy from './proxy'\nimport { getUse } from './util'\nimport options from './options'\n\nexport function render(vnode, parent, store) {\n\tparent = typeof parent === 'string' ? document.querySelector(parent) : parent\n\tif (store) {\n\t\tif (store.data) {\n\t\t\tobserveStore(store)\n\t\t} else {\n\t\t\toptions.isMultiStore = true\n\t\t\t//Multi-store injection\n\t\t\tfor (let key in store) {\n\t\t\t\tobserveStore(store[key], key)\n\t\t\t}\n\t\t}\n\t\tparent.store = store\n\t}\n\treturn diff(null, vnode, parent, false)\n}\n\nfunction observeStore(store, key) {\n\tstore.instances = []\n\tstore.updateSelfInstances = []\n\textendStoreUpate(store, key)\n\n\tstore.data = new JSONProxy(store.data).observe(false, function (patch) {\n\t\tconst patchs = {}\n\t\tif (patch.op === 'remove') {\n\t\t\t// fix arr splice\n\t\t\tconst kv = getArrayPatch(patch.path, store)\n\t\t\tpatchs[kv.k] = kv.v\n\n\t\t\tupdate(patchs, store)\n\n\t\t} else {\n\t\t\tconst key = fixPath(patch.path)\n\t\t\tpatchs[key] = patch.value\n\n\t\t\tupdate(patchs, store)\n\n\t\t}\n\t})\n}\n\nfunction update(patch, store) {\n\tstore.update(patch)\n}\n\nfunction extendStoreUpate(store, key) {\n\tstore.update = function (patch) {\n\t\tif (Object.keys(patch).length > 0) {\n\t\t\tthis.instances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && instance._updatePath[key] && needUpdate(patch, instance._updatePath[key]))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.use === 'function' ? instance.use() : instance.use)[key], instance.using, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && needUpdate(patch, instance._updatePath))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tinstance.using = getUse(store.data, typeof instance.use === 'function' ? instance.use() : instance.use)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t})\n\n\t\t\tthis.updateSelfInstances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updateSelfPath && instance._updateSelfPath[key] && needUpdate(patch, instance._updateSelfPath[key]))) {\n\t\t\t\t\t\tif (instance.useSelf) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)[key], instance.usingSelf, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (instance._updateSelfPath && needUpdate(patch, instance._updateSelfPath)) {\n\t\t\t\t\t\tinstance.usingSelf = getUse(store.data, typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\tthis.onChange && this.onChange(patch)\n\t\t}\n\t}\n}\n\n\nexport function needUpdate(diffResult, updatePath) {\n\tfor (let keyA in diffResult) {\n\t\tif (updatePath[keyA]) {\n\t\t\treturn true\n\t\t}\n\t\tfor (let keyB in updatePath) {\n\t\t\tif (includePath(keyA, keyB)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\treturn false\n}\n\nfunction includePath(pathA, pathB) {\n\tif (pathA.indexOf(pathB) === 0) {\n\t\tconst next = pathA.substr(pathB.length, 1)\n\t\tif (next === '[' || next === '.') {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nexport function fixPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tarr.forEach((item, index) => {\n\t\tif (index) {\n\t\t\tif (isNaN(Number(item))) {\n\t\t\t\tmpPath += '.' + item\n\t\t\t} else {\n\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t}\n\t\t} else {\n\t\t\tmpPath += item\n\t\t}\n\t})\n\treturn mpPath\n}\n\nfunction getArrayPatch(path, store) {\n\tconst arr = path.replace('/', '').split('/')\n\tlet current = store.data[arr[0]]\n\tfor (let i = 1, len = arr.length; i < len - 1; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\treturn {\n\t\tk: fixArrPath(path),\n\t\tv: current\n\t}\n}\n\nfunction fixArrPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tconst len = arr.length\n\tarr.forEach((item, index) => {\n\t\tif (index < len - 1) {\n\t\t\tif (index) {\n\t\t\t\tif (isNaN(Number(item))) {\n\t\t\t\t\tmpPath += '.' + item\n\t\t\t\t} else {\n\t\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmpPath += item\n\t\t\t}\n\t\t}\n\t})\n\treturn mpPath\n}\n","import WeElement from './we-element'\nimport options from './options'\n\nexport function define(name, ctor, config) {\n if (options.mapping[name]) {\n return\n }\n if (ctor.is === 'WeElement') {\n customElements.define(name, ctor)\n options.mapping[name] = ctor\n\n } else {\n \n if (typeof config === 'string') {\n config = { css: config }\n } else {\n config = config || { }\n }\n\n class Ele extends WeElement {\n\n static css = config.css\n\n static propTypes = config.propTypes\n\n static defaultProps = config.defaultProps\n\n render() {\n return ctor.call(this, this)\n }\n\n receiveProps() {\n if (config.receiveProps) {\n return config.receiveProps.apply(this, arguments)\n }\n }\n }\n\n const eleHooks = ['install', 'installed', 'uninstall', 'beforeUpdate', 'updated', 'beforeRender', 'rendered'],\n storeHelpers = ['use', 'useSelf']\n\n eleHooks.forEach(hook => {\n if (config[hook]) {\n Ele.prototype[hook] = function () {\n config[hook].apply(this, arguments)\n }\n }\n })\n\n storeHelpers.forEach(func => {\n if (config[func]) {\n Ele.prototype[func] = function () {\n return typeof config[func] === 'function'\n ? config[func].apply(this, arguments)\n : config[func]\n }\n }\n })\n\n customElements.define(name, Ele)\n options.mapping[name] = Ele\n }\n}\n\n\n\n","import { define } from './define'\n\nexport function tag(name, pure) {\n return function(target) {\n target.pure = pure\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\t\tThe virtual DOM element to clone\n * @param {Object} props\tAttributes/props to add when cloning\n * @param {VNode} rest\t\tAny 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(str) {\n return str.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}","var n=function(t,r,u,e){for(var p=1;p\"===t?(a(),u=1):u&&(\"=\"===t?(u=4,r=e,e=\"\"):\"/\"===t?(a(),3===u&&(s=s[0]),u=s,(s=s[0]).push(u,4),u=0):\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t?(a(),u=2):e+=t)}return a(),s},r=\"function\"==typeof Map,u=r?new Map:{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)),r}:function(n){for(var r=\"\",e=0;e1?r:r[0]}\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 htm from 'htm'\nimport { extend, get, set, bind, unbind } from './extend'\nimport JSONProxy from './proxy'\nimport { Fragment } from './util'\n\nh.f = Fragment\n\nconst html = htm.bind(h)\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 html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n JSONProxy\n}\n\noptions.root.Omi = omi\noptions.root.omi = omi\noptions.root.Omi.version = '6.15.5'\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 html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n JSONProxy\n}\n"],"names":["VNode","getGlobal","global","Math","Array","self","window","stack","h","nodeName","attributes","children","lastSimple","child","simple","i","arguments","length","push","pop","undefined","String","p","key","options","vnode","Reflect","customElements","hasOwnProperty","BuiltInHTMLElement","HTMLElement","construct","constructor","prototype","setPrototypeOf","cssToDom","css","node","document","createElement","textContent","camelCase","str","replace","$","$1","toUpperCase","Fragment","props","extend","obj","applyRef","ref","value","current","defer","Promise","resolve","then","bind","setTimeout","isArray","Object","toString","call","getUse","data","paths","out","name","forEach","path","index","isPath","getTargetByPath","keys","tempPath","tempVal","args","apply","pathToArr","split","origin","arr","len","hyphenateRE","hyphenate","toLowerCase","getValByPath","prop","getPath","result","item","removeItem","splice","ATTR_KEY","IS_NON_DIMENSIONAL","isSameNodeType","hydrating","splitText","_componentConstructor","isNamedNode","mapping","normalizedNodeName","extension","handler","set","get","eventProxy","e","_listeners","type","el","addEventListener","unbind","removeEventListener","createNode","isSvg","createElementNS","removeNode","parentNode","removeChild","setAccessor","old","component","className","style","cssText","test","innerHTML","__html","useCapture","substring","touchStart","touchEnd","pureRemoveAttribute","removeAttribute","ns","removeAttributeNS","setAttributeNS","pureSetAttribute","setAttribute","event","___touchX","touches","pageX","___touchY","pageY","___scrollTop","body","scrollTop","abs","changedTouches","dispatchEvent","CustomEvent","detail","diffLevel","isSvgMode","diff","dom","parent","updateSelf","ret","ownerSVGElement","styles","querySelectorAll","s","firstChild","insertBefore","appendChild","ele","idiff","one","prevSvgMode","_component","nodeValue","createTextNode","replaceChild","vnodeName","fc","vchildren","a","nextSibling","is","noSlot","dangerouslySetInnerHTML","innerDiffNode","isHydrating","originalChildren","childNodes","keyed","keyedLen","min","childrenLen","vlen","j","c","f","vchild","__key","trim","recollectNodeTree","unmountOnly","removeChildren","lastChild","next","previousSibling","diffAttributes","attrs","isWeElement","update","oldClone","receiveProps","assign","ccName","id","WeElement","defaultProps","elementId","connectedCallback","store","host","use","isMultiStore","_updatePath","using","storeName","instances","useSelf","updateSelfInstances","usingSelf","_updateSelfPath","attrsToProps","beforeInstall","install","afterInstall","shadowRoot","attachShadow","beforeRender","rendered","render","__hasChildren","rootNode","_customStyleElement","_customStyleContent","installed","_isInstalled","disconnectedCallback","uninstall","ignoreAttrs","_willUpdate","beforeUpdate","updated","val","JSON","stringify","getAttribute","propTypes","Number","Boolean","substr","Omi","parse","fire","JSONPatcherProxy","deepClone","escapePathComponent","indexOf","findObjectPath","instance","pathComponents","parentAndPath","parenthoodMap","unshift","join","setTrap","target","newValue","parentPath","destinationPropKey","proxifiedObjectsMap","has","newValueOriginalObject","originalObject","revokableInstance","isProxifyingTreeNow","inherited","_proxifyObjectTreeRecursively","operation","op","oldValue","delete","disableTrapsForProxy","isInteger","warn","reflectionResult","defaultCallback","deleteTrap","revokableProxyInstance","deleteProperty","resume","isRecording","patches","userCallback","isObserving","pause","root","showDetachedWarning","Map","cachedProxy","generateProxyAtPath","traps","receiver","revocableInstance","Proxy","revocable","trapsInstance","proxy","proxifyObjectTree","proxifiedObject","message","targetObject","propKey","observe","record","callback","Error","generate","revoke","disableTraps","querySelector","observeStore","JSONProxy","patch","patchs","kv","getArrayPatch","k","v","fixPath","extendStoreUpate","needUpdate","onChange","diffResult","updatePath","keyA","keyB","includePath","pathA","pathB","mpPath","isNaN","fixArrPath","define","ctor","config","Ele","eleHooks","storeHelpers","hook","func","tag","pure","cloneElement","slice","getHost","rpx","b","innerWidth","hasOwn","classNames","classes","arg","argType","inner","extractClass","class","o","html","htm","createRef","Component","defineElement","elements","omi","version"],"mappings":";;;;;;;;AAAA;AACA,SAAgBA,KAAT,GAAiB;;ACDxB,SAASC,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;WAGL,EAHK;gBAIA;CAJf;;ICpBMM,QAAQ,EAAd;;AAEA,SAAgBC,CAAT,CAAW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bf274..80412f0969 100644 --- a/packages/omi/dist/omi.js +++ b/packages/omi/dist/omi.js @@ -32,6 +32,9 @@ return $1.toUpperCase(); }); } + function Fragment(props) { + return props.children; + } function extend(obj, props) { for (var i in props) obj[i] = props[i]; return obj; @@ -211,6 +214,7 @@ isSvgMode = null != parent && void 0 !== parent.ownerSVGElement; hydrating = null != dom && !('prevProps' in dom); } + if (vnode.nodeName === Fragment) vnode = vnode.children; if (isArray(vnode)) if (parent) { var styles = parent.querySelectorAll('style'); styles.forEach(function(s) { @@ -1007,6 +1011,7 @@ for (var r = "", e = 0; e < n.length; e++) r += n[e].length + "-" + n[e]; return u[r] || (u[r] = t(n)); }; + h.f = Fragment; var html = htm.bind(h); var $ = {}; var Component = WeElement; @@ -1042,7 +1047,7 @@ }; options.root.Omi = omi; options.root.omi = omi; - options.root.Omi.version = '6.15.4'; + options.root.Omi.version = '6.15.5'; 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 8968774e59..ebcd3764f2 100644 --- a/packages/omi/dist/omi.js.map +++ b/packages/omi/dist/omi.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/vnode.js","../src/h.js","../src/util.js","../src/vdom/index.js","../src/extend.js","../src/dom/index.js","../src/vdom/diff.js","../src/proxy.js","../src/render.js","../src/define.js","../src/clone-element.js","../src/get-host.js","../src/class.js","../src/o.js","../node_modules/htm/dist/htm.mjs","../src/options.js","../src/we-element.js","../src/omi.js"],"names":["VNode","h","nodeName","attributes","lastSimple","child","simple","i","children","arguments","length","stack","push","pop","undefined","String","p","key","options","vnode","cssToDom","css","node","document","createElement","textContent","camelCase","str","replace","$","$1","toUpperCase","extend","obj","props","applyRef","ref","value","current","isArray","Object","prototype","toString","call","getUse","data","paths","out","name","forEach","path","index","isPath","getTargetByPath","keys","tempPath","tempVal","args","apply","pathToArr","split","origin","arr","len","hyphenate","hyphenateRE","toLowerCase","getValByPath","prop","getPath","result","item","removeItem","splice","isSameNodeType","splitText","mapping","hydrating","_componentConstructor","isNamedNode","extend$1","handler","extension","get","e","type","eventProxy","el","_listeners","addEventListener","createNode","removeNode","setAccessor","component","old","isSvg","className","style","cssText","IS_NON_DIMENSIONAL","test","useCapture","substring","touchStart","touchEnd","eventProxy$1","removeEventListener","pureRemoveAttribute","removeAttribute","ns","removeAttributeNS","pureSetAttribute","setAttribute","this","___touchX","pageX","___touchY","touches","pageY","Math","___scrollTop","body","scrollTop","abs","changedTouches","dispatchEvent","CustomEvent","detail","isSvgMode","parent","ownerSVGElement","dom","querySelectorAll","ATTR_KEY","styles","s","innerDiffNode","updateSelf","removeChild","firstChild","insertBefore","appendChild","ret","ele","idiff","one","recollectNodeTree","parentNode","nodeValue","createTextNode","replaceChild","vnodeName","vchildren","fc","a","nextSibling","constructor","is","noSlot","dangerouslySetInnerHTML","diffAttributes","min","childrenLen","vlen","j","keyedLen","originalChildren","keyed","vchild","_child","_component","__key","trim","isHydrating","c","f","unmountOnly","removeChildren","oldClone","assign","receiveProps","isWeElement","attrs","ccName","_ccName","_classCallCheck","instance","Constructor","TypeError","_possibleConstructorReturn","self","ReferenceError","render","store","JSONPatcherProxy","querySelector","observeStore","isMultiStore","diff","instances","updateSelfInstances","observe","patch","extendStoreUpate","getArrayPatch","JSONProxy","patchs","kv","v","update","k","_updatePath","needUpdate","use","using","_updateSelfPath","useSelf","usingSelf","onChange","diffResult","updatePath","keyA","keyB","includePath","pathA","pathB","indexOf","next","substr","fixPath","mpPath","fixArrPath","_classCallCheck$1","_possibleConstructorReturn$1","ctor","define","config","customElements","Ele","_WeElement","WeElement","propTypes","defaultProps","eleHooks","storeHelpers","func","pure","target","cloneElement","getHost","shadowRoot","host","rpx","b","window","innerWidth","Number","arg","classNames","classes","argType","inner","join","_Array$prototype$slic","Array","slice","class","unshift","o","JSON","stringify","htm","t","r","n","createRef","root","global","Reflect","hasOwnProperty","BuiltInHTMLElement","HTMLElement","construct","setPrototypeOf","Promise","resolve","then","bind","setTimeout","diffLevel","_this","elementId","id","connectedCallback","storeName","_use","_updatePath2","_using","_storeName","attrsToProps","beforeInstall","install","afterInstall","attachShadow","mode","rendered","beforeRender","rootNode","_customStyleContent","_customStyleElement","installed","_isInstalled","disconnectedCallback","uninstall","ignoreAttrs","_willUpdate","beforeUpdate","__hasChildren","updated","_HTMLElement","val","normalizedNodeName","getAttribute","Boolean","Omi","parse","fire","deepClone","escapePathComponent","pathComponents","parentAndPath","parenthoodMap","parentPath","newValueOriginalObject","revokableInstance","inherited","proxifiedObjectsMap","has","newValue","set","operation","destinationPropKey","op","oldValue","delete","disableTrapsForProxy","console","warn","reflectionResult","revokableProxyInstance","defaultCallback","resume","patches","userCallback","pause","isObserving","showDetachedWarning","cachedProxy","_this2","receiver","deleteProperty","deleteTrap","Proxy","revocable","revocableInstance","trapsInstance","traps","originalObject","_proxifyObjectTreeRecursively","proxifyObjectTree","isProxifyingTreeNow","proxifiedObject","targetObject","message","propKey","record","callback","generate","isRecording","revoke","disableTraps","u","Map","html","Component","defineElement","tag","elements","extractClass","unbind","omi","version","module","exports"],"mappings":";;IACO,SAASA;ICIT,SAASC,EAAEC,UAAUC;QAC1B,IACEC,YACAC,OACAC,QACAC,GAJEC;QAKJ,KAAKD,IAAIE,UAAUC,QAAQH,MAAM,KAC/BI,MAAMC,KAAKH,UAAUF;QAEvB,IAAIJ,cAAqC,QAAvBA,WAAWK,UAAkB;YAC7C,KAAKG,MAAMD,QAAQC,MAAMC,KAAKT,WAAWK;mBAClCL,WAAWK;;QAEpB,OAAOG,MAAMD,QACX,KAAKL,QAAQM,MAAME,eAAwBC,MAAdT,MAAMQ,KACjC,KAAKN,IAAIF,MAAMK,QAAQH,OAAOI,MAAMC,KAAKP,MAAME,UAC1C;YACL,IAAqB,oBAAVF,OAAqBA,QAAQ;YAExC,IAAKC,SAA6B,qBAAbJ,UACnB,IAAa,QAATG,OAAeA,QAAQ,SACtB,I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,MAAAA;IA1BW3L,QAAZkQ,KAAAgD,IAAAmE,UAAA;IA6BArX,IAAmBoX,sBAAXlH,QAARoH,OAAAC,UAAAH,UAAAxM,KAAAsI,MAAAkE","file":"omi.js","sourcesContent":["/** Virtual DOM Node */\nexport function VNode() {}\n","import { VNode } from './vnode'\nimport options from './options'\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 let p = new VNode()\n p.nodeName = nodeName\n p.children = children\n p.attributes = attributes == null ? undefined : attributes\n p.key = attributes == null ? undefined : attributes.key\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","/**\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 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\n\nexport function getUse(data, paths, out, name) {\n const obj = []\n paths.forEach((path, index) => {\n const isPath = typeof path === 'string'\n if (isPath) {\n obj[index] = getTargetByPath(data, path)\n } else {\n const key = Object.keys(path)[0]\n const value = path[key]\n if (typeof value === 'string') {\n obj[index] = getTargetByPath(data, value)\n } else {\n const tempPath = value[0]\n if (typeof tempPath === 'string') {\n const tempVal = getTargetByPath(data, tempPath)\n obj[index] = value[1] ? value[1](tempVal) : tempVal\n } else {\n const args = []\n tempPath.forEach(path =>{\n args.push(getTargetByPath(data, path))\n })\n obj[index] = value[1].apply(null, args)\n }\n }\n obj[key] = obj[index]\n }\n\t})\n\tif(out) out[name] = obj\n return obj\n}\n\nexport function pathToArr(path) {\n\tif(typeof path !== 'string' || !path) return []\n\t// return path.split(/\\.|\\[|\\]/).filter(name => !!name)\n\treturn path.replace(/]/g, '').replace(/\\[/g, '.').split('.')\n}\n\nexport function getTargetByPath(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 return current\n}\n\nconst hyphenateRE = /\\B([A-Z])/g\nexport function hyphenate(str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase()\n}\n\nexport function getValByPath(path, current) {\n\tconst arr = pathToArr(path)\n\tarr.forEach(prop => {\n\t\tcurrent = current[prop]\n\t})\n\treturn current\n}\n\nexport function getPath(obj, out, name) {\n\tconst result = {}\n\tobj.forEach(item => {\n\t\tif (typeof item === 'string') {\n\t\t\tresult[item] = true\n\t\t} else {\n\t\t\tconst tempPath = item[Object.keys(item)[0]]\n\t\t\tif (typeof tempPath === 'string') {\n\t\t\t\tresult[tempPath] = true\n\t\t\t} else {\n\t\t\t\tif (typeof tempPath[0] === 'string') {\n\t\t\t\t\tresult[tempPath[0]] = true\n\t\t\t\t} else {\n\t\t\t\t\ttempPath[0].forEach(path => (result[path] = true))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\tif(out) out[name] = result\n\treturn result\n}\n\nexport function removeItem(item, arr){\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}","import { extend } from '../util'\nimport options from '../options'\n/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf 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\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized 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\textension['o-' + name] = handler\n}\n\nexport function set(origin, path, value) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\t\tif (i === len - 1) {\n\t\t\t\t\tcurrent[arr[i]] = value\n\t\t\t} else {\n\t\t\t\t\tcurrent = current[arr[i]]\n\t\t\t}\n\t}\n}\n\nexport function get(origin, path) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\n\treturn current\n}\n\nfunction eventProxy(e) {\n return this._listeners[e.type](e)\n}\n\nexport function bind(el, type, handler){\n\tel._listeners = el._listeners || {}\n\tel._listeners[type] = handler\n\tel.addEventListener(type, eventProxy)\n}\n\nexport function unbind(el, type){\n\tel.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 let useCapture = name !== (name = name.replace(/Capture$/, ''))\n name = name.toLowerCase().substring(2)\n if (value) {\n if (!old) {\n node.addEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.addEventListener('touchstart', touchStart, useCapture)\n node.addEventListener('touchend', touchEnd, useCapture)\n }\n }\n } else {\n node.removeEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.removeEventListener('touchstart', touchStart, useCapture)\n node.removeEventListener('touchend', touchEnd, useCapture)\n }\n }\n ;(node._listeners || (node._listeners = {}))[name] = value\n } else if (node.nodeName === 'INPUT' && name === 'value'){\n node[name] = value == null ? '' : value\n } else if (name !== 'list' && name !== 'type' && name !== 'css' && !isSvg && name in node && value !== '') { //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 ? node.pureRemoveAttribute(name) : 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 node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : 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 ? node.pureSetAttribute(name, value) : 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 touchStart(e) {\n this.___touchX = e.touches[0].pageX\n this.___touchY = e.touches[0].pageY\n this.___scrollTop = document.body.scrollTop\n}\n\nfunction touchEnd(e) {\n if (\n Math.abs(e.changedTouches[0].pageX - this.___touchX) < 30 &&\n Math.abs(e.changedTouches[0].pageY - this.___touchY) < 30 &&\n Math.abs(document.body.scrollTop - this.___scrollTop) < 30\n ) {\n this.dispatchEvent(new CustomEvent('tap', { detail: e }))\n }\n}\n","import { ATTR_KEY } from '../constants'\nimport { isSameNodeType, isNamedNode } from './index'\nimport { createNode, setAccessor } from '../dom/index'\nimport { camelCase, isArray } 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 *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\n *\t@returns {Element} dom\t\t\tThe created/mutated element\n *\t@private\n */\nexport function diff(dom, vnode, parent, component, updateSelf) {\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 (isArray(vnode)) {\n if (parent) {\n const styles = parent.querySelectorAll('style')\n styles.forEach(s => {\n parent.removeChild(s)\n })\n innerDiffNode(parent, vnode, hydrating, component, updateSelf)\n\n for (let i = styles.length - 1; i >= 0; i--) {\n parent.firstChild ? parent.insertBefore(styles[i], parent.firstChild) : parent.appendChild(style[i])\n }\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 *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\n *\t@param {Boolean} isHydrating\tIf `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 // 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 // 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 *\t@param {Node} node\t\t\t\t\t\tDOM node to start unmount/removal from\n *\t@param {Boolean} [unmountOnly=false]\tIf `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 *\t- we use .lastChild here because it causes less reflow than .firstChild\n *\t- 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 *\t@param {Element} dom\t\tElement with attributes to diff `attrs` against\n *\t@param {Object} attrs\t\tThe desired end-state key-value attribute pairs\n *\t@param {Object} old\t\t\tCurrent/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(dom, name, old[name], (old[name] = undefined), isSvgMode, component)\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(dom, name, old[name], (old[name] = attrs[name]), isSvgMode, component)\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 if (isWeElement) {\n let ccName = camelCase(name)\n dom.props[ccName] = old[ccName] = attrs[name]\n //update = true\n } else {\n old[name] = attrs[name]\n }\n }\n }\n\n if (isWeElement && !updateSelf && dom.parentNode) {\n //__hasChildren is not accuracy when it was empty at first, so add dom.children.length > 0 condition\n //if (update || dom.__hasChildren || dom.children.length > 0 || (dom.store && !dom.store.data)) {\n if (dom.receiveProps(dom.props, oldClone) !== false) {\n dom.update()\n }\n //}\n }\n}\n","/*!\n * https://github.com/Palindrom/JSONPatcherProxy\n * (c) 2017 Starcounter\n * MIT license\n */\n\n/** Class representing a JS Object observer */\nconst JSONPatcherProxy = (function() {\n /**\n * Deep clones your object and returns a new object.\n */\n function deepClone(obj) {\n switch (typeof obj) {\n case 'object':\n return JSON.parse(JSON.stringify(obj)) //Faster than ES5 clone - http://jsperf.com/deep-cloning-of-objects/5\n case 'undefined':\n return null //this is how JSON.stringify behaves for array items\n default:\n return obj //no need to clone primitives\n }\n }\n JSONPatcherProxy.deepClone = deepClone\n\n function escapePathComponent(str) {\n if (str.indexOf('/') == -1 && str.indexOf('~') == -1) return str\n return str.replace(/~/g, '~0').replace(/\\//g, '~1')\n }\n JSONPatcherProxy.escapePathComponent = escapePathComponent\n\n /**\n * Walk up the parenthood tree to get the path\n * @param {JSONPatcherProxy} instance\n * @param {Object} obj the object you need to find its path\n */\n function findObjectPath(instance, obj) {\n const pathComponents = []\n let parentAndPath = instance.parenthoodMap.get(obj)\n while (parentAndPath && parentAndPath.path) {\n // because we're walking up-tree, we need to use the array as a stack\n pathComponents.unshift(parentAndPath.path)\n parentAndPath = instance.parenthoodMap.get(parentAndPath.parent)\n }\n if (pathComponents.length) {\n const path = pathComponents.join('/')\n return '/' + path\n }\n return ''\n }\n /**\n * A callback to be used as th proxy set trap callback.\n * It updates parenthood map if needed, proxifies nested newly-added objects, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the affected object\n * @param {String} key the effect property's name\n * @param {Any} newValue the value being set\n */\n function setTrap(instance, target, key, newValue) {\n const parentPath = findObjectPath(instance, target)\n\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n if (instance.proxifiedObjectsMap.has(newValue)) {\n const newValueOriginalObject = instance.proxifiedObjectsMap.get(newValue)\n\n instance.parenthoodMap.set(newValueOriginalObject.originalObject, {\n parent: target,\n path: key\n })\n }\n /*\n mark already proxified values as inherited.\n rationale: proxy.arr.shift()\n will emit\n {op: replace, path: '/arr/1', value: arr_2}\n {op: remove, path: '/arr/2'}\n\n by default, the second operation would revoke the proxy, and this renders arr revoked.\n That's why we need to remember the proxies that are inherited.\n */\n const revokableInstance = instance.proxifiedObjectsMap.get(newValue)\n /*\n Why do we need to check instance.isProxifyingTreeNow?\n\n We need to make sure we mark revokables as inherited ONLY when we're observing,\n because throughout the first proxification, a sub-object is proxified and then assigned to\n its parent object. This assignment of a pre-proxified object can fool us into thinking\n that it's a proxified object moved around, while in fact it's the first assignment ever.\n\n Checking isProxifyingTreeNow ensures this is not happening in the first proxification,\n but in fact is is a proxified object moved around the tree\n */\n if (revokableInstance && !instance.isProxifyingTreeNow) {\n revokableInstance.inherited = true\n }\n\n // if the new value is an object, make sure to watch it\n if (\n newValue &&\n typeof newValue == 'object' &&\n !instance.proxifiedObjectsMap.has(newValue)\n ) {\n instance.parenthoodMap.set(newValue, {\n parent: target,\n path: key\n })\n newValue = instance._proxifyObjectTreeRecursively(target, newValue, key)\n }\n // let's start with this operation, and may or may not update it later\n const operation = {\n op: 'remove',\n path: destinationPropKey\n }\n if (typeof newValue == 'undefined') {\n // applying De Morgan's laws would be a tad faster, but less readable\n if (!Array.isArray(target) && !target.hasOwnProperty(key)) {\n // `undefined` is being set to an already undefined value, keep silent\n return Reflect.set(target, key, newValue)\n }\n // when array element is set to `undefined`, should generate replace to `null`\n if (Array.isArray(target)) {\n // undefined array elements are JSON.stringified to `null`\n ;(operation.op = 'replace'), (operation.value = null)\n }\n const oldValue = instance.proxifiedObjectsMap.get(target[key])\n // was the deleted a proxified object?\n if (oldValue) {\n instance.parenthoodMap.delete(target[key])\n instance.disableTrapsForProxy(oldValue)\n instance.proxifiedObjectsMap.delete(oldValue)\n }\n } else {\n if (Array.isArray(target) && !Number.isInteger(+key.toString())) {\n /* array props (as opposed to indices) don't emit any patches, to avoid needless `length` patches */\n if (key != 'length') {\n console.warn(\n 'JSONPatcherProxy noticed a non-integer prop was set for an array. This will not emit a patch'\n )\n }\n return Reflect.set(target, key, newValue)\n }\n operation.op = 'add'\n if (target.hasOwnProperty(key)) {\n if (typeof target[key] !== 'undefined' || Array.isArray(target)) {\n operation.op = 'replace' // setting `undefined` array elements is a `replace` op\n }\n }\n operation.value = newValue\n }\n operation.oldValue = target[key]\n const reflectionResult = Reflect.set(target, key, newValue)\n instance.defaultCallback(operation)\n return reflectionResult\n }\n /**\n * A callback to be used as th proxy delete trap callback.\n * It updates parenthood map if needed, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the effected object\n * @param {String} key the effected property's name\n */\n function deleteTrap(instance, target, key) {\n if (typeof target[key] !== 'undefined') {\n const parentPath = findObjectPath(instance, target)\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n const revokableProxyInstance = instance.proxifiedObjectsMap.get(\n target[key]\n )\n\n if (revokableProxyInstance) {\n if (revokableProxyInstance.inherited) {\n /*\n this is an inherited proxy (an already proxified object that was moved around),\n we shouldn't revoke it, because even though it was removed from path1, it is still used in path2.\n And we know that because we mark moved proxies with `inherited` flag when we move them\n\n it is a good idea to remove this flag if we come across it here, in deleteProperty trap.\n We DO want to revoke the proxy if it was removed again.\n */\n revokableProxyInstance.inherited = false\n } else {\n instance.parenthoodMap.delete(revokableProxyInstance.originalObject)\n instance.disableTrapsForProxy(revokableProxyInstance)\n instance.proxifiedObjectsMap.delete(target[key])\n }\n }\n const reflectionResult = Reflect.deleteProperty(target, key)\n\n instance.defaultCallback({\n op: 'remove',\n path: destinationPropKey\n })\n\n return reflectionResult\n }\n }\n /* pre-define resume and pause functions to enhance constructors performance */\n function resume() {\n this.defaultCallback = operation => {\n this.isRecording && this.patches.push(operation)\n this.userCallback && this.userCallback(operation)\n }\n this.isObserving = true\n }\n function pause() {\n this.defaultCallback = () => {}\n this.isObserving = false\n }\n /**\n * Creates an instance of JSONPatcherProxy around your object of interest `root`.\n * @param {Object|Array} root - the object you want to wrap\n * @param {Boolean} [showDetachedWarning = true] - whether to log a warning when a detached sub-object is modified @see {@link https://github.com/Palindrom/JSONPatcherProxy#detached-objects}\n * @returns {JSONPatcherProxy}\n * @constructor\n */\n function JSONPatcherProxy(root, showDetachedWarning) {\n this.isProxifyingTreeNow = false\n this.isObserving = false\n this.proxifiedObjectsMap = new Map()\n this.parenthoodMap = new Map()\n // default to true\n if (typeof showDetachedWarning !== 'boolean') {\n showDetachedWarning = true\n }\n\n this.showDetachedWarning = showDetachedWarning\n this.originalObject = root\n this.cachedProxy = null\n this.isRecording = false\n this.userCallback\n /**\n * @memberof JSONPatcherProxy\n * Restores callback back to the original one provided to `observe`.\n */\n this.resume = resume.bind(this)\n /**\n * @memberof JSONPatcherProxy\n * Replaces your callback with a noop function.\n */\n this.pause = pause.bind(this)\n }\n\n JSONPatcherProxy.prototype.generateProxyAtPath = function(parent, obj, path) {\n if (!obj) {\n return obj\n }\n const traps = {\n set: (target, key, value, receiver) =>\n setTrap(this, target, key, value, receiver),\n deleteProperty: (target, key) => deleteTrap(this, target, key)\n }\n const revocableInstance = Proxy.revocable(obj, traps)\n // cache traps object to disable them later.\n revocableInstance.trapsInstance = traps\n revocableInstance.originalObject = obj\n\n /* keeping track of object's parent and path */\n\n this.parenthoodMap.set(obj, { parent, path })\n\n /* keeping track of all the proxies to be able to revoke them later */\n this.proxifiedObjectsMap.set(revocableInstance.proxy, revocableInstance)\n return revocableInstance.proxy\n }\n // grab tree's leaves one by one, encapsulate them into a proxy and return\n JSONPatcherProxy.prototype._proxifyObjectTreeRecursively = function(\n parent,\n root,\n path\n ) {\n for (let key in root) {\n if (root.hasOwnProperty(key)) {\n if (root[key] instanceof Object) {\n root[key] = this._proxifyObjectTreeRecursively(\n root,\n root[key],\n escapePathComponent(key)\n )\n }\n }\n }\n return this.generateProxyAtPath(parent, root, path)\n }\n // this function is for aesthetic purposes\n JSONPatcherProxy.prototype.proxifyObjectTree = function(root) {\n /*\n while proxyifying object tree,\n the proxyifying operation itself is being\n recorded, which in an unwanted behavior,\n that's why we disable recording through this\n initial process;\n */\n this.pause()\n this.isProxifyingTreeNow = true\n const proxifiedObject = this._proxifyObjectTreeRecursively(\n undefined,\n root,\n ''\n )\n /* OK you can record now */\n this.isProxifyingTreeNow = false\n this.resume()\n return proxifiedObject\n }\n /**\n * Turns a proxified object into a forward-proxy object; doesn't emit any patches anymore, like a normal object\n * @param {Proxy} proxy - The target proxy object\n */\n JSONPatcherProxy.prototype.disableTrapsForProxy = function(\n revokableProxyInstance\n ) {\n if (this.showDetachedWarning) {\n const message =\n \"You're accessing an object that is detached from the observedObject tree, see https://github.com/Palindrom/JSONPatcherProxy#detached-objects\"\n\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.deleteProperty = (\n targetObject,\n propKey\n ) => {\n return Reflect.deleteProperty(targetObject, propKey)\n }\n } else {\n delete revokableProxyInstance.trapsInstance.set\n delete revokableProxyInstance.trapsInstance.get\n delete revokableProxyInstance.trapsInstance.deleteProperty\n }\n }\n /**\n * Proxifies the object that was passed in the constructor and returns a proxified mirror of it. Even though both parameters are options. You need to pass at least one of them.\n * @param {Boolean} [record] - whether to record object changes to a later-retrievable patches array.\n * @param {Function} [callback] - this will be synchronously called with every object change with a single `patch` as the only parameter.\n */\n JSONPatcherProxy.prototype.observe = function(record, callback) {\n if (!record && !callback) {\n throw new Error('You need to either record changes or pass a callback')\n }\n this.isRecording = record\n this.userCallback = callback\n /*\n I moved it here to remove it from `unobserve`,\n this will also make the constructor faster, why initiate\n the array before they decide to actually observe with recording?\n They might need to use only a callback.\n */\n if (record) this.patches = []\n this.cachedProxy = this.proxifyObjectTree(this.originalObject)\n return this.cachedProxy\n }\n /**\n * If the observed is set to record, it will synchronously return all the patches and empties patches array.\n */\n JSONPatcherProxy.prototype.generate = function() {\n if (!this.isRecording) {\n throw new Error('You should set record to true to get patches later')\n }\n return this.patches.splice(0, this.patches.length)\n }\n /**\n * Revokes all proxies rendering the observed object useless and good for garbage collection @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/revocable}\n */\n JSONPatcherProxy.prototype.revoke = function() {\n this.proxifiedObjectsMap.forEach(el => {\n el.revoke()\n })\n }\n /**\n * Disables all proxies' traps, turning the observed object into a forward-proxy object, like a normal object that you can modify silently.\n */\n JSONPatcherProxy.prototype.disableTraps = function() {\n this.proxifiedObjectsMap.forEach(this.disableTrapsForProxy, this)\n }\n return JSONPatcherProxy\n})()\n\nexport default JSONPatcherProxy\n","import { diff } from './vdom/diff'\nimport JSONProxy from './proxy'\nimport { getUse } from './util'\nimport options from './options'\n\nexport function render(vnode, parent, store) {\n\tparent = typeof parent === 'string' ? document.querySelector(parent) : parent\n\tif (store) {\n\t\tif (store.data) {\n\t\t\tobserveStore(store)\n\t\t} else {\n\t\t\toptions.isMultiStore = true\n\t\t\t//Multi-store injection\n\t\t\tfor (let key in store) {\n\t\t\t\tobserveStore(store[key], key)\n\t\t\t}\n\t\t}\n\t\tparent.store = store\n\t}\n\treturn diff(null, vnode, parent, false)\n}\n\nfunction observeStore(store, key) {\n\tstore.instances = []\n\tstore.updateSelfInstances = []\n\textendStoreUpate(store, key)\n\n\tstore.data = new JSONProxy(store.data).observe(false, function (patch) {\n\t\tconst patchs = {}\n\t\tif (patch.op === 'remove') {\n\t\t\t// fix arr splice\n\t\t\tconst kv = getArrayPatch(patch.path, store)\n\t\t\tpatchs[kv.k] = kv.v\n\n\t\t\tupdate(patchs, store)\n\n\t\t} else {\n\t\t\tconst key = fixPath(patch.path)\n\t\t\tpatchs[key] = patch.value\n\n\t\t\tupdate(patchs, store)\n\n\t\t}\n\t})\n}\n\nfunction update(patch, store) {\n\tstore.update(patch)\n}\n\nfunction extendStoreUpate(store, key) {\n\tstore.update = function (patch) {\n\t\tif (Object.keys(patch).length > 0) {\n\t\t\tthis.instances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && instance._updatePath[key] && needUpdate(patch, instance._updatePath[key]))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.use === 'function' ? instance.use() : instance.use)[key], instance.using, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && needUpdate(patch, instance._updatePath))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tinstance.using = getUse(store.data, typeof instance.use === 'function' ? instance.use() : instance.use)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t})\n\n\t\t\tthis.updateSelfInstances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updateSelfPath && instance._updateSelfPath[key] && needUpdate(patch, instance._updateSelfPath[key]))) {\n\t\t\t\t\t\tif (instance.useSelf) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)[key], instance.usingSelf, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (instance._updateSelfPath && needUpdate(patch, instance._updateSelfPath)) {\n\t\t\t\t\t\tinstance.usingSelf = getUse(store.data, typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\tthis.onChange && this.onChange(patch)\n\t\t}\n\t}\n}\n\n\nexport function needUpdate(diffResult, updatePath) {\n\tfor (let keyA in diffResult) {\n\t\tif (updatePath[keyA]) {\n\t\t\treturn true\n\t\t}\n\t\tfor (let keyB in updatePath) {\n\t\t\tif (includePath(keyA, keyB)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\treturn false\n}\n\nfunction includePath(pathA, pathB) {\n\tif (pathA.indexOf(pathB) === 0) {\n\t\tconst next = pathA.substr(pathB.length, 1)\n\t\tif (next === '[' || next === '.') {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nexport function fixPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tarr.forEach((item, index) => {\n\t\tif (index) {\n\t\t\tif (isNaN(Number(item))) {\n\t\t\t\tmpPath += '.' + item\n\t\t\t} else {\n\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t}\n\t\t} else {\n\t\t\tmpPath += item\n\t\t}\n\t})\n\treturn mpPath\n}\n\nfunction getArrayPatch(path, store) {\n\tconst arr = path.replace('/', '').split('/')\n\tlet current = store.data[arr[0]]\n\tfor (let i = 1, len = arr.length; i < len - 1; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\treturn {\n\t\tk: fixArrPath(path),\n\t\tv: current\n\t}\n}\n\nfunction fixArrPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tconst len = arr.length\n\tarr.forEach((item, index) => {\n\t\tif (index < len - 1) {\n\t\t\tif (index) {\n\t\t\t\tif (isNaN(Number(item))) {\n\t\t\t\t\tmpPath += '.' + item\n\t\t\t\t} else {\n\t\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmpPath += item\n\t\t\t}\n\t\t}\n\t})\n\treturn mpPath\n}\n","import WeElement from './we-element'\nimport options from './options'\n\nexport function define(name, ctor, config) {\n if (options.mapping[name]) {\n return\n }\n if (ctor.is === 'WeElement') {\n customElements.define(name, ctor)\n options.mapping[name] = ctor\n\n } else {\n \n if (typeof config === 'string') {\n config = { css: config }\n } else {\n config = config || { }\n }\n\n class Ele extends WeElement {\n\n static css = config.css\n\n static propTypes = config.propTypes\n\n static defaultProps = config.defaultProps\n\n render() {\n return ctor.call(this, this)\n }\n\n receiveProps() {\n if (config.receiveProps) {\n return config.receiveProps.apply(this, arguments)\n }\n }\n }\n\n const eleHooks = ['install', 'installed', 'uninstall', 'beforeUpdate', 'updated', 'beforeRender', 'rendered'],\n storeHelpers = ['use', 'useSelf']\n\n eleHooks.forEach(hook => {\n if (config[hook]) {\n Ele.prototype[hook] = function () {\n config[hook].apply(this, arguments)\n }\n }\n })\n\n storeHelpers.forEach(func => {\n if (config[func]) {\n Ele.prototype[func] = function () {\n return typeof config[func] === 'function'\n ? config[func].apply(this, arguments)\n : config[func]\n }\n }\n })\n\n customElements.define(name, Ele)\n options.mapping[name] = Ele\n }\n}\n\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\t\tThe virtual DOM element to clone\n * @param {Object} props\tAttributes/props to add when cloning\n * @param {VNode} rest\t\tAny 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","export function o(obj){\n return JSON.stringify(obj)\n}","var n=function(t,r,u,e){for(var p=1;p\"===t?(a(),u=1):u&&(\"=\"===t?(u=4,r=e,e=\"\"):\"/\"===t?(a(),3===u&&(s=s[0]),u=s,(s=s[0]).push(u,4),u=0):\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t?(a(),u=2):e+=t)}return a(),s},r=\"function\"==typeof Map,u=r?new Map:{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)),r}:function(n){for(var r=\"\",e=0;e1?r:r[0]}\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 *\t@public\n *\t@namespace options {Object}\n */\nexport default {\n store: null,\n root: getGlobal(),\n\tmapping: {},\n\tisMultiStore: false\n}\n","import {\n\tcssToDom,\n\tisArray,\n\tgetUse,\n\thyphenate,\n\tgetValByPath,\n\tremoveItem\n} from './util'\nimport { diff } from './vdom/diff'\nimport options from './options'\nimport { getPath } from './util'\n\nlet id = 0\n\nexport default class WeElement extends HTMLElement {\n\tstatic is = 'WeElement'\n\n\tconstructor() {\n\t\tsuper()\n\t\tthis.props = Object.assign({},\n\t\t\tthis.constructor.defaultProps\n\t\t)\n\t\tthis.elementId = id++\n\t}\n\n\tconnectedCallback() {\n\t\tlet p = this.parentNode\n\t\twhile (p && !this.store) {\n\t\t\tthis.store = p.store\n\t\t\tp = p.parentNode || p.host\n\t\t}\n\n\t\tif (this.use) {\n\t\t\tlet use\n\t\t\tif (typeof this.use === 'function') {\n\t\t\t\tuse = this.use()\n\t\t\t} else {\n\t\t\t\tuse = this.use\n\t\t\t}\n\n\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\t_updatePath[storeName] = {}\n\t\t\t\t\tusing[storeName] = {}\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].instances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.using = using\n\t\t\t\tthis._updatePath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updatePath = getPath(use)\n\t\t\t\tthis.using = getUse(this.store.data, use)\n\t\t\t\tthis.store.instances.push(this)\n\t\t\t}\n\t\t}\n\t\tif (this.useSelf) {\n\t\t\tconst use = typeof this.useSelf === 'function' ? this.useSelf() : this.useSelf\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].updateSelfInstances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.usingSelf = using\n\t\t\t\tthis._updateSelfPath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updateSelfPath = getPath(use)\n\t\t\t\tthis.usingSelf = getUse(this.store.data, use)\n\t\t\t\tthis.store.updateSelfInstances.push(this)\n\t\t\t}\n\t\t}\n\t\tthis.attrsToProps()\n\t\tthis.beforeInstall()\n\t\tthis.install()\n\t\tthis.afterInstall()\n\n\t\tlet shadowRoot\n\t\tif (!this.shadowRoot) {\n\t\t\tshadowRoot = this.attachShadow({\n\t\t\t\tmode: 'open'\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot = this.shadowRoot\n\t\t\tlet fc\n\t\t\twhile ((fc = shadowRoot.firstChild)) {\n\t\t\t\tshadowRoot.removeChild(fc)\n\t\t\t}\n\t\t}\n\n\t\tif (this.constructor.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(this.constructor.css))\n\t\t} else if (this.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(typeof this.css === 'function' ? this.css() : this.css))\n\t\t}\n\t\tthis.beforeRender()\n\t\toptions.afterInstall && options.afterInstall(this)\n\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.__hasChildren = Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0\n\n\t\tthis.rootNode = diff(\n\t\t\tnull,\n\t\t\trendered,\n\t\t\tnull,\n\t\t\tthis\n\t\t)\n\t\tthis.rendered()\n\n\t\tif (this.props.css) {\n\t\t\tthis._customStyleElement = cssToDom(this.props.css)\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tshadowRoot.appendChild(this._customStyleElement)\n\t\t}\n\n\t\tif (isArray(this.rootNode)) {\n\t\t\tthis.rootNode.forEach(function (item) {\n\t\t\t\tshadowRoot.appendChild(item)\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot.appendChild(this.rootNode)\n\t\t}\n\t\tthis.installed()\n\t\tthis._isInstalled = true\n\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.uninstall()\n\t\tthis._isInstalled = false\n\t\tif (this.store) {\n\t\t\tif(options.isMultiStore){\n\t\t\t\tfor(let key in this.store){\n\t\t\t\t\tconst current = this.store[key]\n\t\t\t\t\tremoveItem(this, current.instances)\n\t\t\t\t removeItem(this, current.updateSelfInstances)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tremoveItem(this, this.store.instances)\n\t\t\t\tremoveItem(this, this.store.updateSelfInstances)\n\t\t\t}\n\t\t}\n\t}\n\n\tupdate(ignoreAttrs, updateSelf) {\n\t\tthis._willUpdate = true\n\t\tthis.beforeUpdate()\n\t\tthis.beforeRender()\n\t\t//fix null !== undefined\n\t\tif (this._customStyleContent != this.props.css) {\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tthis._customStyleElement.textContent = this._customStyleContent\n\t\t}\n\t\tthis.attrsToProps(ignoreAttrs)\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.rendered()\n\t\tthis.__hasChildren = this.__hasChildren || (Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0)\n\n\t\tthis.rootNode = diff(\n\t\t\tthis.rootNode,\n\t\t\trendered,\n\t\t\tthis.shadowRoot,\n\t\t\tthis,\n\t\t\tupdateSelf\n\t\t)\n\t\tthis._willUpdate = false\n\t\tthis.updated()\n\n\t}\n\n\tupdateSelf(ignoreAttrs) {\n\t\tthis.update(ignoreAttrs, true)\n\t}\n\n\tremoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t\t//Avoid executing removeAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tsetAttribute(key, val) {\n\t\tif (val && typeof val === 'object') {\n\t\t\tsuper.setAttribute(key, JSON.stringify(val))\n\t\t} else {\n\t\t\tsuper.setAttribute(key, val)\n\t\t}\n\t\t//Avoid executing setAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tpureRemoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t}\n\n\tpureSetAttribute(key, val) {\n\t\tsuper.setAttribute(key, val)\n\t}\n\n\tattrsToProps(ignoreAttrs) {\n\t\tconst ele = this\n\t\tif (ele.normalizedNodeName || ignoreAttrs) return\n\t\tele.props['css'] = ele.getAttribute('css')\n\t\tconst attrs = this.constructor.propTypes\n\t\tif (!attrs) return\n\t\tObject.keys(attrs).forEach(key => {\n\t\t\tconst type = attrs[key]\n\t\t\tconst val = ele.getAttribute(hyphenate(key))\n\t\t\tif (val !== null) {\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase String:\n\t\t\t\t\t\tele.props[key] = val\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Number:\n\t\t\t\t\t\tele.props[key] = Number(val)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Boolean:\n\t\t\t\t\t\tif (val === 'false' || val === '0') {\n\t\t\t\t\t\t\tele.props[key] = false\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = true\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Array:\n\t\t\t\t\tcase Object:\n\t\t\t\t\t\tif (val[0] === ':') {\n\t\t\t\t\t\t\tele.props[key] = getValByPath(val.substr(1), Omi.$)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = JSON.parse(val\n\t\t\t\t\t\t\t\t.replace(/(['\"])?([a-zA-Z0-9_-]+)(['\"])?:([^\\/])/g, '\"$2\":$4')\n\t\t\t\t\t\t\t\t.replace(/'([\\s\\S]*?)'/g, '\"$1\"')\n\t\t\t\t\t\t\t\t.replace(/,(\\s*})/g, '$1')\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (ele.constructor.defaultProps && ele.constructor.defaultProps.hasOwnProperty(key)) {\n\t\t\t\t\tele.props[key] = ele.constructor.defaultProps[key]\n\t\t\t\t} else {\n\t\t\t\t\tele.props[key] = null\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tfire(name, data) {\n\t\tthis.dispatchEvent(new CustomEvent(name, {\n\t\t\tdetail: data\n\t\t}))\n\t}\n\n\tbeforeInstall() {}\n\n\tinstall() {}\n\n\tafterInstall() {}\n\n\tinstalled() {}\n\n\tuninstall() {}\n\n\tbeforeUpdate() {}\n\n\tupdated() {}\n\n\tbeforeRender() {}\n\n\trendered() {}\n\n\treceiveProps() {}\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 htm from 'htm'\nimport { extend, get, set, bind, unbind } from './extend'\nimport JSONProxy from './proxy'\n\nconst html = htm.bind(h)\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 html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n\tJSONProxy\n}\n\noptions.root.Omi = omi\noptions.root.omi = omi\noptions.root.Omi.version = '6.15.4'\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 html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n\tJSONProxy\n}\n"]} \ No newline at end of file +{"version":3,"sources":["../src/vnode.js","../src/h.js","../src/util.js","../src/vdom/index.js","../src/extend.js","../src/dom/index.js","../src/vdom/diff.js","../src/proxy.js","../src/render.js","../src/define.js","../src/clone-element.js","../src/get-host.js","../src/class.js","../src/o.js","../src/omi.js","../src/options.js","../src/we-element.js","../node_modules/htm/dist/htm.mjs"],"names":["VNode","h","nodeName","attributes","lastSimple","child","simple","i","children","arguments","length","stack","push","pop","undefined","String","p","key","options","vnode","cssToDom","css","node","document","createElement","textContent","camelCase","str","replace","$","$1","toUpperCase","Fragment","props","extend","obj","applyRef","ref","value","current","isArray","Object","prototype","toString","call","getUse","data","paths","out","name","forEach","path","index","isPath","getTargetByPath","keys","tempPath","tempVal","args","apply","pathToArr","split","origin","arr","len","hyphenate","hyphenateRE","toLowerCase","getValByPath","prop","getPath","result","item","removeItem","splice","isSameNodeType","splitText","mapping","hydrating","_componentConstructor","isNamedNode","extend$1","handler","extension","get","e","type","eventProxy","el","_listeners","addEventListener","createNode","removeNode","setAccessor","component","old","isSvg","className","style","cssText","IS_NON_DIMENSIONAL","test","useCapture","substring","touchStart","touchEnd","eventProxy$1","removeEventListener","pureRemoveAttribute","removeAttribute","ns","removeAttributeNS","pureSetAttribute","setAttribute","this","___touchX","pageX","___touchY","touches","pageY","Math","___scrollTop","body","scrollTop","abs","changedTouches","dispatchEvent","CustomEvent","detail","isSvgMode","parent","ownerSVGElement","dom","querySelectorAll","styles","s","innerDiffNode","updateSelf","removeChild","firstChild","insertBefore","appendChild","ret","ele","idiff","one","recollectNodeTree","parentNode","nodeValue","createTextNode","replaceChild","vnodeName","vchildren","fc","a","nextSibling","constructor","is","noSlot","dangerouslySetInnerHTML","diffAttributes","min","childrenLen","vlen","j","keyedLen","originalChildren","keyed","vchild","_child","_component","__key","trim","isHydrating","c","f","unmountOnly","ATTR_KEY","removeChildren","oldClone","assign","receiveProps","isWeElement","attrs","ccName","_ccName","_classCallCheck","instance","Constructor","TypeError","_possibleConstructorReturn","self","ReferenceError","render","store","JSONPatcherProxy","querySelector","observeStore","isMultiStore","diff","instances","updateSelfInstances","observe","patch","extendStoreUpate","getArrayPatch","JSONProxy","patchs","kv","v","update","k","_updatePath","needUpdate","use","using","_updateSelfPath","useSelf","usingSelf","onChange","diffResult","updatePath","keyA","keyB","includePath","pathA","pathB","indexOf","next","substr","fixPath","mpPath","fixArrPath","_classCallCheck$1","_possibleConstructorReturn$1","ctor","define","config","customElements","Ele","_WeElement","WeElement","propTypes","defaultProps","eleHooks","storeHelpers","func","pure","target","cloneElement","getHost","shadowRoot","host","rpx","b","window","innerWidth","Number","arg","classNames","classes","argType","inner","join","_Array$prototype$slic","Array","slice","class","unshift","o","JSON","stringify","htm","t","r","n","root","global","Reflect","hasOwnProperty","BuiltInHTMLElement","HTMLElement","construct","setPrototypeOf","Promise","resolve","then","bind","setTimeout","diffLevel","_this","elementId","id","connectedCallback","storeName","_use","_updatePath2","_using","_storeName","attrsToProps","beforeInstall","install","afterInstall","attachShadow","mode","rendered","beforeRender","rootNode","_customStyleContent","_customStyleElement","installed","_isInstalled","disconnectedCallback","uninstall","ignoreAttrs","_willUpdate","beforeUpdate","__hasChildren","updated","_HTMLElement","val","normalizedNodeName","getAttribute","Boolean","Omi","parse","fire","deepClone","escapePathComponent","pathComponents","parentAndPath","parenthoodMap","parentPath","newValueOriginalObject","revokableInstance","inherited","proxifiedObjectsMap","has","newValue","set","operation","destinationPropKey","op","oldValue","delete","disableTrapsForProxy","console","warn","reflectionResult","revokableProxyInstance","defaultCallback","resume","patches","userCallback","pause","isObserving","showDetachedWarning","cachedProxy","_this2","receiver","deleteProperty","deleteTrap","Proxy","revocable","revocableInstance","trapsInstance","traps","originalObject","_proxifyObjectTreeRecursively","proxifyObjectTree","isProxifyingTreeNow","proxifiedObject","targetObject","message","propKey","record","callback","generate","isRecording","revoke","disableTraps","u","Map","html","Component","defineElement","tag","elements","createRef","extractClass","unbind","omi","version","module","exports"],"m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3G,OAAA2G,EAAA3G,KAAAD,EAAAE;;IAErBlR,EAAA8K,IAAA/I;IIFD,IAAI+V,OAAE/G,IAASe,KAAK9R;IHoBpB,IAAA4B;IACE,IAAAmW,YAAA/I;IACD,IAAAgJ,gBAAArJ;;IAGD,IAAMoJ;QACNE,KAAMD;QACNhJ,WAAMkJ;;QAENlM,QAAYA;QACViM,GAAAA;QACAjJ,eAAAA;QACA+I,SAAAA;QACA/L,QAAAA;QACAhM,cALUwP;QAMVjO,SAAAA;QACAN,KAAAA;QACA0N,eARUqJ;QASVxI,YAAAA;QACAC,cAAAA;QACAG,WAXUuI;QAYVH,MAAAA;QACA9H,KAAAA;QACAkI,GAAAA;QACAD,UAAAA;QACAL,GAAAA;QACA/G,QAjBU/L;QAkBV4L,KAlBUzL;QAmBX+S,KAAAA;QACAtW,MApBWkQ;QAqBX7P,QAAAA;QACAkD,WAtBW+G;;IAyBXmM,QAAAA,KAAAA,MAzBWC;IA0BVzL,QAAAA,KAAAA,MAAAA;IA1BU5L,QAAZkQ,KAAAgD,IAAAoE,UAAA;IA6BAtX,IAAmBqX,sBAAXnH,QAARqH,OAAAC,UAAAH,UAAAxM,KAAAqI,MAAAmE","file":"omi.js","sourcesContent":["/** Virtual DOM Node */\nexport function VNode() {}\n","import { VNode } from './vnode'\nimport options from './options'\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 let p = new VNode()\n p.nodeName = nodeName\n p.children = children\n p.attributes = attributes == null ? undefined : attributes\n p.key = attributes == null ? undefined : attributes.key\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","/**\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\n\nexport function getUse(data, paths, out, name) {\n const obj = []\n paths.forEach((path, index) => {\n const isPath = typeof path === 'string'\n if (isPath) {\n obj[index] = getTargetByPath(data, path)\n } else {\n const key = Object.keys(path)[0]\n const value = path[key]\n if (typeof value === 'string') {\n obj[index] = getTargetByPath(data, value)\n } else {\n const tempPath = value[0]\n if (typeof tempPath === 'string') {\n const tempVal = getTargetByPath(data, tempPath)\n obj[index] = value[1] ? value[1](tempVal) : tempVal\n } else {\n const args = []\n tempPath.forEach(path =>{\n args.push(getTargetByPath(data, path))\n })\n obj[index] = value[1].apply(null, args)\n }\n }\n obj[key] = obj[index]\n }\n\t})\n\tif(out) out[name] = obj\n return obj\n}\n\nexport function pathToArr(path) {\n\tif(typeof path !== 'string' || !path) return []\n\t// return path.split(/\\.|\\[|\\]/).filter(name => !!name)\n\treturn path.replace(/]/g, '').replace(/\\[/g, '.').split('.')\n}\n\nexport function getTargetByPath(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 return current\n}\n\nconst hyphenateRE = /\\B([A-Z])/g\nexport function hyphenate(str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase()\n}\n\nexport function getValByPath(path, current) {\n\tconst arr = pathToArr(path)\n\tarr.forEach(prop => {\n\t\tcurrent = current[prop]\n\t})\n\treturn current\n}\n\nexport function getPath(obj, out, name) {\n\tconst result = {}\n\tobj.forEach(item => {\n\t\tif (typeof item === 'string') {\n\t\t\tresult[item] = true\n\t\t} else {\n\t\t\tconst tempPath = item[Object.keys(item)[0]]\n\t\t\tif (typeof tempPath === 'string') {\n\t\t\t\tresult[tempPath] = true\n\t\t\t} else {\n\t\t\t\tif (typeof tempPath[0] === 'string') {\n\t\t\t\t\tresult[tempPath[0]] = true\n\t\t\t\t} else {\n\t\t\t\t\ttempPath[0].forEach(path => (result[path] = true))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\tif(out) out[name] = result\n\treturn result\n}\n\nexport function removeItem(item, arr){\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}","import { extend } from '../util'\nimport options from '../options'\n/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf 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\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized 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\textension['o-' + name] = handler\n}\n\nexport function set(origin, path, value) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\t\tif (i === len - 1) {\n\t\t\t\t\tcurrent[arr[i]] = value\n\t\t\t} else {\n\t\t\t\t\tcurrent = current[arr[i]]\n\t\t\t}\n\t}\n}\n\nexport function get(origin, path) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\n\treturn current\n}\n\nfunction eventProxy(e) {\n return this._listeners[e.type](e)\n}\n\nexport function bind(el, type, handler){\n\tel._listeners = el._listeners || {}\n\tel._listeners[type] = handler\n\tel.addEventListener(type, eventProxy)\n}\n\nexport function unbind(el, type){\n\tel.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 let useCapture = name !== (name = name.replace(/Capture$/, ''))\n name = name.toLowerCase().substring(2)\n if (value) {\n if (!old) {\n node.addEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.addEventListener('touchstart', touchStart, useCapture)\n node.addEventListener('touchend', touchEnd, useCapture)\n }\n }\n } else {\n node.removeEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.removeEventListener('touchstart', touchStart, useCapture)\n node.removeEventListener('touchend', touchEnd, useCapture)\n }\n }\n ;(node._listeners || (node._listeners = {}))[name] = value\n } else if (node.nodeName === 'INPUT' && name === 'value'){\n node[name] = value == null ? '' : value\n } else if (name !== 'list' && name !== 'type' && name !== 'css' && !isSvg && name in node && value !== '') { //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 ? node.pureRemoveAttribute(name) : 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 node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : 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 ? node.pureSetAttribute(name, value) : 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 touchStart(e) {\n this.___touchX = e.touches[0].pageX\n this.___touchY = e.touches[0].pageY\n this.___scrollTop = document.body.scrollTop\n}\n\nfunction touchEnd(e) {\n if (\n Math.abs(e.changedTouches[0].pageX - this.___touchX) < 30 &&\n Math.abs(e.changedTouches[0].pageY - this.___touchY) < 30 &&\n Math.abs(document.body.scrollTop - this.___scrollTop) < 30\n ) {\n this.dispatchEvent(new CustomEvent('tap', { detail: e }))\n }\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 *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\n *\t@returns {Element} dom\t\t\tThe created/mutated element\n *\t@private\n */\nexport function diff(dom, vnode, parent, component, updateSelf) {\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.nodeName === Fragment){\n vnode = vnode.children\n }\n if (isArray(vnode)) {\n if (parent) {\n const styles = parent.querySelectorAll('style')\n styles.forEach(s => {\n parent.removeChild(s)\n })\n innerDiffNode(parent, vnode, hydrating, component, updateSelf)\n\n for (let i = styles.length - 1; i >= 0; i--) {\n parent.firstChild ? parent.insertBefore(styles[i], parent.firstChild) : parent.appendChild(style[i])\n }\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 *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\n *\t@param {Boolean} isHydrating\tIf `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 // 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 // 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 *\t@param {Node} node\t\t\t\t\t\tDOM node to start unmount/removal from\n *\t@param {Boolean} [unmountOnly=false]\tIf `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 *\t- we use .lastChild here because it causes less reflow than .firstChild\n *\t- 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 *\t@param {Element} dom\t\tElement with attributes to diff `attrs` against\n *\t@param {Object} attrs\t\tThe desired end-state key-value attribute pairs\n *\t@param {Object} old\t\t\tCurrent/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(dom, name, old[name], (old[name] = undefined), isSvgMode, component)\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(dom, name, old[name], (old[name] = attrs[name]), isSvgMode, component)\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 if (isWeElement) {\n let ccName = camelCase(name)\n dom.props[ccName] = old[ccName] = attrs[name]\n //update = true\n } else {\n old[name] = attrs[name]\n }\n }\n }\n\n if (isWeElement && !updateSelf && dom.parentNode) {\n //__hasChildren is not accuracy when it was empty at first, so add dom.children.length > 0 condition\n //if (update || dom.__hasChildren || dom.children.length > 0 || (dom.store && !dom.store.data)) {\n if (dom.receiveProps(dom.props, oldClone) !== false) {\n dom.update()\n }\n //}\n }\n}\n","/*!\n * https://github.com/Palindrom/JSONPatcherProxy\n * (c) 2017 Starcounter\n * MIT license\n */\n\n/** Class representing a JS Object observer */\nconst JSONPatcherProxy = (function() {\n /**\n * Deep clones your object and returns a new object.\n */\n function deepClone(obj) {\n switch (typeof obj) {\n case 'object':\n return JSON.parse(JSON.stringify(obj)) //Faster than ES5 clone - http://jsperf.com/deep-cloning-of-objects/5\n case 'undefined':\n return null //this is how JSON.stringify behaves for array items\n default:\n return obj //no need to clone primitives\n }\n }\n JSONPatcherProxy.deepClone = deepClone\n\n function escapePathComponent(str) {\n if (str.indexOf('/') == -1 && str.indexOf('~') == -1) return str\n return str.replace(/~/g, '~0').replace(/\\//g, '~1')\n }\n JSONPatcherProxy.escapePathComponent = escapePathComponent\n\n /**\n * Walk up the parenthood tree to get the path\n * @param {JSONPatcherProxy} instance\n * @param {Object} obj the object you need to find its path\n */\n function findObjectPath(instance, obj) {\n const pathComponents = []\n let parentAndPath = instance.parenthoodMap.get(obj)\n while (parentAndPath && parentAndPath.path) {\n // because we're walking up-tree, we need to use the array as a stack\n pathComponents.unshift(parentAndPath.path)\n parentAndPath = instance.parenthoodMap.get(parentAndPath.parent)\n }\n if (pathComponents.length) {\n const path = pathComponents.join('/')\n return '/' + path\n }\n return ''\n }\n /**\n * A callback to be used as th proxy set trap callback.\n * It updates parenthood map if needed, proxifies nested newly-added objects, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the affected object\n * @param {String} key the effect property's name\n * @param {Any} newValue the value being set\n */\n function setTrap(instance, target, key, newValue) {\n const parentPath = findObjectPath(instance, target)\n\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n if (instance.proxifiedObjectsMap.has(newValue)) {\n const newValueOriginalObject = instance.proxifiedObjectsMap.get(newValue)\n\n instance.parenthoodMap.set(newValueOriginalObject.originalObject, {\n parent: target,\n path: key\n })\n }\n /*\n mark already proxified values as inherited.\n rationale: proxy.arr.shift()\n will emit\n {op: replace, path: '/arr/1', value: arr_2}\n {op: remove, path: '/arr/2'}\n\n by default, the second operation would revoke the proxy, and this renders arr revoked.\n That's why we need to remember the proxies that are inherited.\n */\n const revokableInstance = instance.proxifiedObjectsMap.get(newValue)\n /*\n Why do we need to check instance.isProxifyingTreeNow?\n\n We need to make sure we mark revokables as inherited ONLY when we're observing,\n because throughout the first proxification, a sub-object is proxified and then assigned to\n its parent object. This assignment of a pre-proxified object can fool us into thinking\n that it's a proxified object moved around, while in fact it's the first assignment ever.\n\n Checking isProxifyingTreeNow ensures this is not happening in the first proxification,\n but in fact is is a proxified object moved around the tree\n */\n if (revokableInstance && !instance.isProxifyingTreeNow) {\n revokableInstance.inherited = true\n }\n\n // if the new value is an object, make sure to watch it\n if (\n newValue &&\n typeof newValue == 'object' &&\n !instance.proxifiedObjectsMap.has(newValue)\n ) {\n instance.parenthoodMap.set(newValue, {\n parent: target,\n path: key\n })\n newValue = instance._proxifyObjectTreeRecursively(target, newValue, key)\n }\n // let's start with this operation, and may or may not update it later\n const operation = {\n op: 'remove',\n path: destinationPropKey\n }\n if (typeof newValue == 'undefined') {\n // applying De Morgan's laws would be a tad faster, but less readable\n if (!Array.isArray(target) && !target.hasOwnProperty(key)) {\n // `undefined` is being set to an already undefined value, keep silent\n return Reflect.set(target, key, newValue)\n }\n // when array element is set to `undefined`, should generate replace to `null`\n if (Array.isArray(target)) {\n // undefined array elements are JSON.stringified to `null`\n ;(operation.op = 'replace'), (operation.value = null)\n }\n const oldValue = instance.proxifiedObjectsMap.get(target[key])\n // was the deleted a proxified object?\n if (oldValue) {\n instance.parenthoodMap.delete(target[key])\n instance.disableTrapsForProxy(oldValue)\n instance.proxifiedObjectsMap.delete(oldValue)\n }\n } else {\n if (Array.isArray(target) && !Number.isInteger(+key.toString())) {\n /* array props (as opposed to indices) don't emit any patches, to avoid needless `length` patches */\n if (key != 'length') {\n console.warn(\n 'JSONPatcherProxy noticed a non-integer prop was set for an array. This will not emit a patch'\n )\n }\n return Reflect.set(target, key, newValue)\n }\n operation.op = 'add'\n if (target.hasOwnProperty(key)) {\n if (typeof target[key] !== 'undefined' || Array.isArray(target)) {\n operation.op = 'replace' // setting `undefined` array elements is a `replace` op\n }\n }\n operation.value = newValue\n }\n operation.oldValue = target[key]\n const reflectionResult = Reflect.set(target, key, newValue)\n instance.defaultCallback(operation)\n return reflectionResult\n }\n /**\n * A callback to be used as th proxy delete trap callback.\n * It updates parenthood map if needed, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the effected object\n * @param {String} key the effected property's name\n */\n function deleteTrap(instance, target, key) {\n if (typeof target[key] !== 'undefined') {\n const parentPath = findObjectPath(instance, target)\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n const revokableProxyInstance = instance.proxifiedObjectsMap.get(\n target[key]\n )\n\n if (revokableProxyInstance) {\n if (revokableProxyInstance.inherited) {\n /*\n this is an inherited proxy (an already proxified object that was moved around),\n we shouldn't revoke it, because even though it was removed from path1, it is still used in path2.\n And we know that because we mark moved proxies with `inherited` flag when we move them\n\n it is a good idea to remove this flag if we come across it here, in deleteProperty trap.\n We DO want to revoke the proxy if it was removed again.\n */\n revokableProxyInstance.inherited = false\n } else {\n instance.parenthoodMap.delete(revokableProxyInstance.originalObject)\n instance.disableTrapsForProxy(revokableProxyInstance)\n instance.proxifiedObjectsMap.delete(target[key])\n }\n }\n const reflectionResult = Reflect.deleteProperty(target, key)\n\n instance.defaultCallback({\n op: 'remove',\n path: destinationPropKey\n })\n\n return reflectionResult\n }\n }\n /* pre-define resume and pause functions to enhance constructors performance */\n function resume() {\n this.defaultCallback = operation => {\n this.isRecording && this.patches.push(operation)\n this.userCallback && this.userCallback(operation)\n }\n this.isObserving = true\n }\n function pause() {\n this.defaultCallback = () => {}\n this.isObserving = false\n }\n /**\n * Creates an instance of JSONPatcherProxy around your object of interest `root`.\n * @param {Object|Array} root - the object you want to wrap\n * @param {Boolean} [showDetachedWarning = true] - whether to log a warning when a detached sub-object is modified @see {@link https://github.com/Palindrom/JSONPatcherProxy#detached-objects}\n * @returns {JSONPatcherProxy}\n * @constructor\n */\n function JSONPatcherProxy(root, showDetachedWarning) {\n this.isProxifyingTreeNow = false\n this.isObserving = false\n this.proxifiedObjectsMap = new Map()\n this.parenthoodMap = new Map()\n // default to true\n if (typeof showDetachedWarning !== 'boolean') {\n showDetachedWarning = true\n }\n\n this.showDetachedWarning = showDetachedWarning\n this.originalObject = root\n this.cachedProxy = null\n this.isRecording = false\n this.userCallback\n /**\n * @memberof JSONPatcherProxy\n * Restores callback back to the original one provided to `observe`.\n */\n this.resume = resume.bind(this)\n /**\n * @memberof JSONPatcherProxy\n * Replaces your callback with a noop function.\n */\n this.pause = pause.bind(this)\n }\n\n JSONPatcherProxy.prototype.generateProxyAtPath = function(parent, obj, path) {\n if (!obj) {\n return obj\n }\n const traps = {\n set: (target, key, value, receiver) =>\n setTrap(this, target, key, value, receiver),\n deleteProperty: (target, key) => deleteTrap(this, target, key)\n }\n const revocableInstance = Proxy.revocable(obj, traps)\n // cache traps object to disable them later.\n revocableInstance.trapsInstance = traps\n revocableInstance.originalObject = obj\n\n /* keeping track of object's parent and path */\n\n this.parenthoodMap.set(obj, { parent, path })\n\n /* keeping track of all the proxies to be able to revoke them later */\n this.proxifiedObjectsMap.set(revocableInstance.proxy, revocableInstance)\n return revocableInstance.proxy\n }\n // grab tree's leaves one by one, encapsulate them into a proxy and return\n JSONPatcherProxy.prototype._proxifyObjectTreeRecursively = function(\n parent,\n root,\n path\n ) {\n for (let key in root) {\n if (root.hasOwnProperty(key)) {\n if (root[key] instanceof Object) {\n root[key] = this._proxifyObjectTreeRecursively(\n root,\n root[key],\n escapePathComponent(key)\n )\n }\n }\n }\n return this.generateProxyAtPath(parent, root, path)\n }\n // this function is for aesthetic purposes\n JSONPatcherProxy.prototype.proxifyObjectTree = function(root) {\n /*\n while proxyifying object tree,\n the proxyifying operation itself is being\n recorded, which in an unwanted behavior,\n that's why we disable recording through this\n initial process;\n */\n this.pause()\n this.isProxifyingTreeNow = true\n const proxifiedObject = this._proxifyObjectTreeRecursively(\n undefined,\n root,\n ''\n )\n /* OK you can record now */\n this.isProxifyingTreeNow = false\n this.resume()\n return proxifiedObject\n }\n /**\n * Turns a proxified object into a forward-proxy object; doesn't emit any patches anymore, like a normal object\n * @param {Proxy} proxy - The target proxy object\n */\n JSONPatcherProxy.prototype.disableTrapsForProxy = function(\n revokableProxyInstance\n ) {\n if (this.showDetachedWarning) {\n const message =\n \"You're accessing an object that is detached from the observedObject tree, see https://github.com/Palindrom/JSONPatcherProxy#detached-objects\"\n\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.deleteProperty = (\n targetObject,\n propKey\n ) => {\n return Reflect.deleteProperty(targetObject, propKey)\n }\n } else {\n delete revokableProxyInstance.trapsInstance.set\n delete revokableProxyInstance.trapsInstance.get\n delete revokableProxyInstance.trapsInstance.deleteProperty\n }\n }\n /**\n * Proxifies the object that was passed in the constructor and returns a proxified mirror of it. Even though both parameters are options. You need to pass at least one of them.\n * @param {Boolean} [record] - whether to record object changes to a later-retrievable patches array.\n * @param {Function} [callback] - this will be synchronously called with every object change with a single `patch` as the only parameter.\n */\n JSONPatcherProxy.prototype.observe = function(record, callback) {\n if (!record && !callback) {\n throw new Error('You need to either record changes or pass a callback')\n }\n this.isRecording = record\n this.userCallback = callback\n /*\n I moved it here to remove it from `unobserve`,\n this will also make the constructor faster, why initiate\n the array before they decide to actually observe with recording?\n They might need to use only a callback.\n */\n if (record) this.patches = []\n this.cachedProxy = this.proxifyObjectTree(this.originalObject)\n return this.cachedProxy\n }\n /**\n * If the observed is set to record, it will synchronously return all the patches and empties patches array.\n */\n JSONPatcherProxy.prototype.generate = function() {\n if (!this.isRecording) {\n throw new Error('You should set record to true to get patches later')\n }\n return this.patches.splice(0, this.patches.length)\n }\n /**\n * Revokes all proxies rendering the observed object useless and good for garbage collection @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/revocable}\n */\n JSONPatcherProxy.prototype.revoke = function() {\n this.proxifiedObjectsMap.forEach(el => {\n el.revoke()\n })\n }\n /**\n * Disables all proxies' traps, turning the observed object into a forward-proxy object, like a normal object that you can modify silently.\n */\n JSONPatcherProxy.prototype.disableTraps = function() {\n this.proxifiedObjectsMap.forEach(this.disableTrapsForProxy, this)\n }\n return JSONPatcherProxy\n})()\n\nexport default JSONPatcherProxy\n","import { diff } from './vdom/diff'\nimport JSONProxy from './proxy'\nimport { getUse } from './util'\nimport options from './options'\n\nexport function render(vnode, parent, store) {\n\tparent = typeof parent === 'string' ? document.querySelector(parent) : parent\n\tif (store) {\n\t\tif (store.data) {\n\t\t\tobserveStore(store)\n\t\t} else {\n\t\t\toptions.isMultiStore = true\n\t\t\t//Multi-store injection\n\t\t\tfor (let key in store) {\n\t\t\t\tobserveStore(store[key], key)\n\t\t\t}\n\t\t}\n\t\tparent.store = store\n\t}\n\treturn diff(null, vnode, parent, false)\n}\n\nfunction observeStore(store, key) {\n\tstore.instances = []\n\tstore.updateSelfInstances = []\n\textendStoreUpate(store, key)\n\n\tstore.data = new JSONProxy(store.data).observe(false, function (patch) {\n\t\tconst patchs = {}\n\t\tif (patch.op === 'remove') {\n\t\t\t// fix arr splice\n\t\t\tconst kv = getArrayPatch(patch.path, store)\n\t\t\tpatchs[kv.k] = kv.v\n\n\t\t\tupdate(patchs, store)\n\n\t\t} else {\n\t\t\tconst key = fixPath(patch.path)\n\t\t\tpatchs[key] = patch.value\n\n\t\t\tupdate(patchs, store)\n\n\t\t}\n\t})\n}\n\nfunction update(patch, store) {\n\tstore.update(patch)\n}\n\nfunction extendStoreUpate(store, key) {\n\tstore.update = function (patch) {\n\t\tif (Object.keys(patch).length > 0) {\n\t\t\tthis.instances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && instance._updatePath[key] && needUpdate(patch, instance._updatePath[key]))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.use === 'function' ? instance.use() : instance.use)[key], instance.using, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && needUpdate(patch, instance._updatePath))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tinstance.using = getUse(store.data, typeof instance.use === 'function' ? instance.use() : instance.use)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t})\n\n\t\t\tthis.updateSelfInstances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updateSelfPath && instance._updateSelfPath[key] && needUpdate(patch, instance._updateSelfPath[key]))) {\n\t\t\t\t\t\tif (instance.useSelf) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)[key], instance.usingSelf, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (instance._updateSelfPath && needUpdate(patch, instance._updateSelfPath)) {\n\t\t\t\t\t\tinstance.usingSelf = getUse(store.data, typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\tthis.onChange && this.onChange(patch)\n\t\t}\n\t}\n}\n\n\nexport function needUpdate(diffResult, updatePath) {\n\tfor (let keyA in diffResult) {\n\t\tif (updatePath[keyA]) {\n\t\t\treturn true\n\t\t}\n\t\tfor (let keyB in updatePath) {\n\t\t\tif (includePath(keyA, keyB)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\treturn false\n}\n\nfunction includePath(pathA, pathB) {\n\tif (pathA.indexOf(pathB) === 0) {\n\t\tconst next = pathA.substr(pathB.length, 1)\n\t\tif (next === '[' || next === '.') {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nexport function fixPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tarr.forEach((item, index) => {\n\t\tif (index) {\n\t\t\tif (isNaN(Number(item))) {\n\t\t\t\tmpPath += '.' + item\n\t\t\t} else {\n\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t}\n\t\t} else {\n\t\t\tmpPath += item\n\t\t}\n\t})\n\treturn mpPath\n}\n\nfunction getArrayPatch(path, store) {\n\tconst arr = path.replace('/', '').split('/')\n\tlet current = store.data[arr[0]]\n\tfor (let i = 1, len = arr.length; i < len - 1; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\treturn {\n\t\tk: fixArrPath(path),\n\t\tv: current\n\t}\n}\n\nfunction fixArrPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tconst len = arr.length\n\tarr.forEach((item, index) => {\n\t\tif (index < len - 1) {\n\t\t\tif (index) {\n\t\t\t\tif (isNaN(Number(item))) {\n\t\t\t\t\tmpPath += '.' + item\n\t\t\t\t} else {\n\t\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmpPath += item\n\t\t\t}\n\t\t}\n\t})\n\treturn mpPath\n}\n","import WeElement from './we-element'\nimport options from './options'\n\nexport function define(name, ctor, config) {\n if (options.mapping[name]) {\n return\n }\n if (ctor.is === 'WeElement') {\n customElements.define(name, ctor)\n options.mapping[name] = ctor\n\n } else {\n \n if (typeof config === 'string') {\n config = { css: config }\n } else {\n config = config || { }\n }\n\n class Ele extends WeElement {\n\n static css = config.css\n\n static propTypes = config.propTypes\n\n static defaultProps = config.defaultProps\n\n render() {\n return ctor.call(this, this)\n }\n\n receiveProps() {\n if (config.receiveProps) {\n return config.receiveProps.apply(this, arguments)\n }\n }\n }\n\n const eleHooks = ['install', 'installed', 'uninstall', 'beforeUpdate', 'updated', 'beforeRender', 'rendered'],\n storeHelpers = ['use', 'useSelf']\n\n eleHooks.forEach(hook => {\n if (config[hook]) {\n Ele.prototype[hook] = function () {\n config[hook].apply(this, arguments)\n }\n }\n })\n\n storeHelpers.forEach(func => {\n if (config[func]) {\n Ele.prototype[func] = function () {\n return typeof config[func] === 'function'\n ? config[func].apply(this, arguments)\n : config[func]\n }\n }\n })\n\n customElements.define(name, Ele)\n options.mapping[name] = Ele\n }\n}\n\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\t\tThe virtual DOM element to clone\n * @param {Object} props\tAttributes/props to add when cloning\n * @param {VNode} rest\t\tAny 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","export function o(obj){\n return JSON.stringify(obj)\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 htm from 'htm'\nimport { extend, get, set, bind, unbind } from './extend'\nimport JSONProxy from './proxy'\nimport { Fragment } from './util'\n\nh.f = Fragment\n\nconst html = htm.bind(h)\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 html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n JSONProxy\n}\n\noptions.root.Omi = omi\noptions.root.omi = omi\noptions.root.Omi.version = '6.15.5'\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 html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n JSONProxy\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 *\t@public\n *\t@namespace options {Object}\n */\nexport default {\n store: null,\n root: getGlobal(),\n\tmapping: {},\n\tisMultiStore: false\n}\n","import {\n\tcssToDom,\n\tisArray,\n\tgetUse,\n\thyphenate,\n\tgetValByPath,\n\tremoveItem\n} from './util'\nimport { diff } from './vdom/diff'\nimport options from './options'\nimport { getPath } from './util'\n\nlet id = 0\n\nexport default class WeElement extends HTMLElement {\n\tstatic is = 'WeElement'\n\n\tconstructor() {\n\t\tsuper()\n\t\tthis.props = Object.assign({},\n\t\t\tthis.constructor.defaultProps\n\t\t)\n\t\tthis.elementId = id++\n\t}\n\n\tconnectedCallback() {\n\t\tlet p = this.parentNode\n\t\twhile (p && !this.store) {\n\t\t\tthis.store = p.store\n\t\t\tp = p.parentNode || p.host\n\t\t}\n\n\t\tif (this.use) {\n\t\t\tlet use\n\t\t\tif (typeof this.use === 'function') {\n\t\t\t\tuse = this.use()\n\t\t\t} else {\n\t\t\t\tuse = this.use\n\t\t\t}\n\n\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\t_updatePath[storeName] = {}\n\t\t\t\t\tusing[storeName] = {}\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].instances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.using = using\n\t\t\t\tthis._updatePath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updatePath = getPath(use)\n\t\t\t\tthis.using = getUse(this.store.data, use)\n\t\t\t\tthis.store.instances.push(this)\n\t\t\t}\n\t\t}\n\t\tif (this.useSelf) {\n\t\t\tconst use = typeof this.useSelf === 'function' ? this.useSelf() : this.useSelf\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].updateSelfInstances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.usingSelf = using\n\t\t\t\tthis._updateSelfPath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updateSelfPath = getPath(use)\n\t\t\t\tthis.usingSelf = getUse(this.store.data, use)\n\t\t\t\tthis.store.updateSelfInstances.push(this)\n\t\t\t}\n\t\t}\n\t\tthis.attrsToProps()\n\t\tthis.beforeInstall()\n\t\tthis.install()\n\t\tthis.afterInstall()\n\n\t\tlet shadowRoot\n\t\tif (!this.shadowRoot) {\n\t\t\tshadowRoot = this.attachShadow({\n\t\t\t\tmode: 'open'\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot = this.shadowRoot\n\t\t\tlet fc\n\t\t\twhile ((fc = shadowRoot.firstChild)) {\n\t\t\t\tshadowRoot.removeChild(fc)\n\t\t\t}\n\t\t}\n\n\t\tif (this.constructor.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(this.constructor.css))\n\t\t} else if (this.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(typeof this.css === 'function' ? this.css() : this.css))\n\t\t}\n\t\tthis.beforeRender()\n\t\toptions.afterInstall && options.afterInstall(this)\n\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.__hasChildren = Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0\n\n\t\tthis.rootNode = diff(\n\t\t\tnull,\n\t\t\trendered,\n\t\t\tnull,\n\t\t\tthis\n\t\t)\n\t\tthis.rendered()\n\n\t\tif (this.props.css) {\n\t\t\tthis._customStyleElement = cssToDom(this.props.css)\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tshadowRoot.appendChild(this._customStyleElement)\n\t\t}\n\n\t\tif (isArray(this.rootNode)) {\n\t\t\tthis.rootNode.forEach(function (item) {\n\t\t\t\tshadowRoot.appendChild(item)\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot.appendChild(this.rootNode)\n\t\t}\n\t\tthis.installed()\n\t\tthis._isInstalled = true\n\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.uninstall()\n\t\tthis._isInstalled = false\n\t\tif (this.store) {\n\t\t\tif(options.isMultiStore){\n\t\t\t\tfor(let key in this.store){\n\t\t\t\t\tconst current = this.store[key]\n\t\t\t\t\tremoveItem(this, current.instances)\n\t\t\t\t removeItem(this, current.updateSelfInstances)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tremoveItem(this, this.store.instances)\n\t\t\t\tremoveItem(this, this.store.updateSelfInstances)\n\t\t\t}\n\t\t}\n\t}\n\n\tupdate(ignoreAttrs, updateSelf) {\n\t\tthis._willUpdate = true\n\t\tthis.beforeUpdate()\n\t\tthis.beforeRender()\n\t\t//fix null !== undefined\n\t\tif (this._customStyleContent != this.props.css) {\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tthis._customStyleElement.textContent = this._customStyleContent\n\t\t}\n\t\tthis.attrsToProps(ignoreAttrs)\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.rendered()\n\t\tthis.__hasChildren = this.__hasChildren || (Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0)\n\n\t\tthis.rootNode = diff(\n\t\t\tthis.rootNode,\n\t\t\trendered,\n\t\t\tthis.shadowRoot,\n\t\t\tthis,\n\t\t\tupdateSelf\n\t\t)\n\t\tthis._willUpdate = false\n\t\tthis.updated()\n\n\t}\n\n\tupdateSelf(ignoreAttrs) {\n\t\tthis.update(ignoreAttrs, true)\n\t}\n\n\tremoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t\t//Avoid executing removeAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tsetAttribute(key, val) {\n\t\tif (val && typeof val === 'object') {\n\t\t\tsuper.setAttribute(key, JSON.stringify(val))\n\t\t} else {\n\t\t\tsuper.setAttribute(key, val)\n\t\t}\n\t\t//Avoid executing setAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tpureRemoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t}\n\n\tpureSetAttribute(key, val) {\n\t\tsuper.setAttribute(key, val)\n\t}\n\n\tattrsToProps(ignoreAttrs) {\n\t\tconst ele = this\n\t\tif (ele.normalizedNodeName || ignoreAttrs) return\n\t\tele.props['css'] = ele.getAttribute('css')\n\t\tconst attrs = this.constructor.propTypes\n\t\tif (!attrs) return\n\t\tObject.keys(attrs).forEach(key => {\n\t\t\tconst type = attrs[key]\n\t\t\tconst val = ele.getAttribute(hyphenate(key))\n\t\t\tif (val !== null) {\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase String:\n\t\t\t\t\t\tele.props[key] = val\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Number:\n\t\t\t\t\t\tele.props[key] = Number(val)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Boolean:\n\t\t\t\t\t\tif (val === 'false' || val === '0') {\n\t\t\t\t\t\t\tele.props[key] = false\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = true\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Array:\n\t\t\t\t\tcase Object:\n\t\t\t\t\t\tif (val[0] === ':') {\n\t\t\t\t\t\t\tele.props[key] = getValByPath(val.substr(1), Omi.$)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = JSON.parse(val\n\t\t\t\t\t\t\t\t.replace(/(['\"])?([a-zA-Z0-9_-]+)(['\"])?:([^\\/])/g, '\"$2\":$4')\n\t\t\t\t\t\t\t\t.replace(/'([\\s\\S]*?)'/g, '\"$1\"')\n\t\t\t\t\t\t\t\t.replace(/,(\\s*})/g, '$1')\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (ele.constructor.defaultProps && ele.constructor.defaultProps.hasOwnProperty(key)) {\n\t\t\t\t\tele.props[key] = ele.constructor.defaultProps[key]\n\t\t\t\t} else {\n\t\t\t\t\tele.props[key] = null\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tfire(name, data) {\n\t\tthis.dispatchEvent(new CustomEvent(name, {\n\t\t\tdetail: data\n\t\t}))\n\t}\n\n\tbeforeInstall() {}\n\n\tinstall() {}\n\n\tafterInstall() {}\n\n\tinstalled() {}\n\n\tuninstall() {}\n\n\tbeforeUpdate() {}\n\n\tupdated() {}\n\n\tbeforeRender() {}\n\n\trendered() {}\n\n\treceiveProps() {}\n\n}\n","var n=function(t,r,u,e){for(var p=1;p\"===t?(a(),u=1):u&&(\"=\"===t?(u=4,r=e,e=\"\"):\"/\"===t?(a(),3===u&&(s=s[0]),u=s,(s=s[0]).push(u,4),u=0):\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t?(a(),u=2):e+=t)}return a(),s},r=\"function\"==typeof Map,u=r?new Map:{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)),r}:function(n){for(var r=\"\",e=0;e1?r:r[0]}\n"]} \ No newline at end of file diff --git a/packages/omi/dist/omi.min.js b/packages/omi/dist/omi.min.js index 4b7e36bde9..4028e71963 100644 --- a/packages/omi/dist/omi.min.js +++ b/packages/omi/dist/omi.min.js @@ -1,2 +1,2 @@ -!function(){"use strict";function e(){}function t(t,n){var r,o,i,s,a=[];for(s=arguments.length;s-- >2;)se.push(arguments[s]);n&&null!=n.children&&(se.length||se.push(n.children),delete n.children);while(se.length)if((o=se.pop())&&void 0!==o.pop)for(s=o.length;s--;)se.push(o[s]);else"boolean"==typeof o&&(o=null),(i="function"!=typeof t)&&(null==o?o="":"number"==typeof o?o+="":"string"!=typeof o&&(i=!1)),i&&r?a[a.length-1]+=o:0===a.length?a=[o]:a.push(o),r=i;var l=new e;return l.nodeName=t,l.children=a,l.attributes=null==n?void 0:n,l.key=null==n?void 0:n.key,void 0!==ie.vnode&&ie.vnode(l),l}function n(e){var t=document.createElement("style");return t.textContent=e,t}function r(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function o(e,t){for(var n in t)e[n]=t[n];return e}function i(e,t){null!=e&&("function"==typeof e?e(t):e.current=t)}function s(e){return"[object Array]"===Object.prototype.toString.call(e)}function a(e,t,n,r){var o=[];return t.forEach(function(t,n){if("string"==typeof t)o[n]=p(e,t);else{var r=Object.keys(t)[0],i=t[r];if("string"==typeof i)o[n]=p(e,i);else{var s=i[0];if("string"==typeof s){var a=p(e,s);o[n]=i[1]?i[1](a):a}else{var l=[];s.forEach(function(t){l.push(p(e,t))}),o[n]=i[1].apply(null,l)}}o[r]=o[n]}}),n&&(n[r]=o),o}function l(e){return"string"==typeof e&&e?e.replace(/]/g,"").replace(/\[/g,".").split("."):[]}function p(e,t){for(var n=l(t),r=e,o=0,i=n.length;o=0;l--)n.firstChild?n.insertBefore(a[l],n.firstChild):n.appendChild(style[l])}else i=[],t.forEach(function(t,n){var s=_(0===n?e:null,t,r,o);i.push(s)});else s(e)?e.forEach(function(e,n){0===n?i=_(e,t,r,o):A(e,!1)}):i=_(e,t,r,o),n&&i.parentNode!==n&&n.appendChild(i);return--ue||(fe=!1),i}function _(e,t,n,r){e&&t&&e.props&&(e.props.children=t.children);var o=e,i=ce;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||n)?e.nodeValue!=t&&(e.nodeValue=t):(o=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(o,e),A(e,!0))),o.__p=!0,o;var s=t.nodeName;if("function"==typeof s)for(var a in ie.mapping)if(ie.mapping[a]===s){s=a,t.nodeName=a;break}if(ce="svg"===s||"foreignObject"!==s&&ce,s+="",(!e||!y(e,s))&&(o=N(s,ce),e)){while(e.firstChild)o.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(o,e),A(e,!0)}var l=o.firstChild,p=o.__p,u=t.children;if(null==p){p=o.__p={};for(var c=o.attributes,f=c.length;f--;)p[c[f].name]=c[f].value}return!fe&&u&&1===u.length&&"string"==typeof u[0]&&null!=l&&void 0!==l.splitText&&null==l.nextSibling?l.nodeValue!=u[0]&&(l.nodeValue=u[0]):(u&&u.length||null!=l)&&("WeElement"==o.constructor.is&&o.constructor.noSlot||M(o,u,fe||null!=p.dangerouslySetInnerHTML,n,r)),R(o,t.attributes,p,n,r),o.props&&(o.props.children=t.children),ce=i,o}function M(e,t,n,r,o){var i,s,a,l,p,u=e.childNodes,c=[],f={},h=0,y=0,v=u.length,b=0,g=t?t.length:0;if(0!==v)for(var m=0;m0&&(this.instances.forEach(function(r){t?r.M&&r.M[t]&&W(n,r.M[t])&&(r.use&&a(e.data,("function"==typeof r.use?r.use():r.use)[t],r.using,t),r.update()):r.M&&W(n,r.M)&&(r.use&&(r.using=a(e.data,"function"==typeof r.use?r.use():r.use)),r.update())}),this.updateSelfInstances.forEach(function(r){t?r.R&&r.R[t]&&W(n,r.R[t])&&(r.useSelf&&a(e.data,("function"==typeof r.useSelf?r.useSelf():r.useSelf)[t],r.usingSelf,t),r.updateSelf()):r.R&&W(n,r.R)&&(r.usingSelf=a(e.data,"function"==typeof r.useSelf?r.useSelf():r.useSelf),r.updateSelf())}),this.onChange&&this.onChange(n))}}function W(e,t){for(var n in e){if(t[n])return!0;for(var r in t)if(F(n,r))return!0}return!1}function F(e,t){if(0===e.indexOf(t)){var n=e.substr(t.length,1);if("["===n||"."===n)return!0}return!1}function V(e){var t="";return e.replace("/","").split("/").forEach(function(e,n){n?isNaN(+e)?t+="."+e:t+="["+e+"]":t+=e}),t}function z(e,t){for(var n=e.replace("/","").split("/"),r=t.data[n[0]],o=1,i=n.length;o2?[].slice.call(arguments,2):e.children)}function K(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 Q(e){return e.replace(/([1-9]\d*|0)(\.\d*)*rpx/g,function(e,t){return window.innerWidth*+t/750+"px"})}function ee(){for(var e=[],t=0;t0)return{class:ee.apply(null,n)}}function ne(e){return JSON.stringify(e)}function re(e){var t=be(this,Oe(e),arguments,[]);return t.length>1?t:t[0]}function oe(){return{}}var ie={store:null,root:function(){return"object"==typeof global&&global&&global.Math===Math&&global.Array===Array?global:self||window||global||function(){return this}()}(),mapping:{},isMultiStore:!1},se=[];!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 ae=/\B([A-Z])/g,le=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,pe={},ue=0,ce=!1,fe=!1,he=0,de=function(e){function t(){k(this,t);var n=L(this,e.call(this));return n.props=Object.assign({},n.constructor.defaultProps),n.elementId=he++,n}return I(t,e),t.prototype.connectedCallback=function(){var e=this.parentNode;while(e&&!this.store)this.store=e.store,e=e.parentNode||e.host;if(this.use){var t;if(t="function"==typeof this.use?this.use():this.use,ie.isMultiStore){var r={},o={};for(var i in t)r[i]={},o[i]={},f(t[i],r,i),a(this.store[i].data,t[i],o,i),this.store[i].instances.push(this);this.using=o,this.M=r}else this.M=f(t),this.using=a(this.store.data,t),this.store.instances.push(this)}if(this.useSelf){var l="function"==typeof this.useSelf?this.useSelf():this.useSelf;if(ie.isMultiStore){var p={},u={};for(var c in l)f(l[c],p,c),a(this.store[c].data,l[c],u,c),this.store[c].updateSelfInstances.push(this);this.usingSelf=u,this.R=p}else this.R=f(l),this.usingSelf=a(this.store.data,l),this.store.updateSelfInstances.push(this)}this.attrsToProps(),this.beforeInstall(),this.install(),this.afterInstall();var h;if(this.shadowRoot){h=this.shadowRoot;var d;while(d=h.firstChild)h.removeChild(d)}else h=this.attachShadow({mode:"open"});this.constructor.css?h.appendChild(n(this.constructor.css)):this.css&&h.appendChild(n("function"==typeof this.css?this.css():this.css)),this.beforeRender(),ie.afterInstall&&ie.afterInstall(this);var y=this.render(this.props,this.store);this.P="[object Array]"===Object.prototype.toString.call(y)&&y.length>0,this.rootNode=C(null,y,null,this),this.rendered(),this.props.css&&(this.N=n(this.props.css),this.O=this.props.css,h.appendChild(this.N)),s(this.rootNode)?this.rootNode.forEach(function(e){h.appendChild(e)}):h.appendChild(this.rootNode),this.installed(),this.B=!0},t.prototype.disconnectedCallback=function(){if(this.uninstall(),this.B=!1,this.store)if(ie.isMultiStore)for(var e in this.store){var t=this.store[e];h(this,t.instances),h(this,t.updateSelfInstances)}else h(this,this.store.instances),h(this,this.store.updateSelfInstances)},t.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.P=this.P||"[object Array]"===Object.prototype.toString.call(n)&&n.length>0,this.rootNode=C(this.rootNode,n,this.shadowRoot,this,t),this.J=!1,this.updated()},t.prototype.updateSelf=function(e){this.update(e,!0)},t.prototype.removeAttribute=function(t){e.prototype.removeAttribute.call(this,t),this.B&&this.update()},t.prototype.setAttribute=function(t,n){n&&"object"==typeof n?e.prototype.setAttribute.call(this,t,JSON.stringify(n)):e.prototype.setAttribute.call(this,t,n),this.B&&this.update()},t.prototype.pureRemoveAttribute=function(t){e.prototype.removeAttribute.call(this,t)},t.prototype.pureSetAttribute=function(t,n){e.prototype.setAttribute.call(this,t,n)},t.prototype.attrsToProps=function(e){var t=this;if(!t.normalizedNodeName&&!e){t.props.css=t.getAttribute("css");var n=this.constructor.propTypes;n&&Object.keys(n).forEach(function(e){var r=n[e],o=t.getAttribute(u(e));if(null!==o)switch(r){case String:t.props[e]=o;break;case Number:t.props[e]=+o;break;case Boolean:t.props[e]="false"!==o&&"0"!==o;break;case Array:case Object:t.props[e]=":"===o[0]?c(o.substr(1),Omi.$):JSON.parse(o.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})}},t.prototype.fire=function(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t}))},t.prototype.beforeInstall=function(){},t.prototype.install=function(){},t.prototype.afterInstall=function(){},t.prototype.installed=function(){},t.prototype.uninstall=function(){},t.prototype.beforeUpdate=function(){},t.prototype.updated=function(){},t.prototype.beforeRender=function(){},t.prototype.rendered=function(){},t.prototype.receiveProps=function(){},t}(HTMLElement);de.is="WeElement";var ye=function(){function e(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function t(e){return-1==e.indexOf("/")&&-1==e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function n(e,t){var n=[],r=e.parenthoodMap.get(t);while(r&&r.path)n.unshift(r.path),r=e.parenthoodMap.get(r.parent);if(n.length){return"/"+n.join("/")}return""}function r(e,r,o,i){var s=n(e,r),a=s+"/"+t(o);if(e.proxifiedObjectsMap.has(i)){e.parenthoodMap.set(e.proxifiedObjectsMap.get(i).originalObject,{parent:r,path:o})}var l=e.proxifiedObjectsMap.get(i);l&&!e.isProxifyingTreeNow&&(l.inherited=!0),i&&"object"==typeof i&&!e.proxifiedObjectsMap.has(i)&&(e.parenthoodMap.set(i,{parent:r,path:o}),i=e.A(r,i,o));var p={op:"remove",path:a};if(void 0===i){if(!Array.isArray(r)&&!r.hasOwnProperty(o))return Reflect.set(r,o,i);Array.isArray(r)&&(p.op="replace",p.value=null);var u=e.proxifiedObjectsMap.get(r[o]);u&&(e.parenthoodMap.delete(r[o]),e.disableTrapsForProxy(u),e.proxifiedObjectsMap.delete(u))}else{if(Array.isArray(r)&&!Number.isInteger(+(""+o)))return"length"!=o&&console.warn("JSONPatcherProxy noticed a non-integer prop was set for an array. This will not emit a patch"),Reflect.set(r,o,i);p.op="add",r.hasOwnProperty(o)&&(void 0!==r[o]||Array.isArray(r))&&(p.op="replace"),p.value=i}p.oldValue=r[o];var c=Reflect.set(r,o,i);return e.defaultCallback(p),c}function o(e,r,o){if(void 0!==r[o]){var i=n(e,r),s=i+"/"+t(o),a=e.proxifiedObjectsMap.get(r[o]);a&&(a.inherited?a.inherited=!1:(e.parenthoodMap.delete(a.originalObject),e.disableTrapsForProxy(a),e.proxifiedObjectsMap.delete(r[o])));var l=Reflect.deleteProperty(r,o);return e.defaultCallback({op:"remove",path:s}),l}}function i(){var e=this;this.defaultCallback=function(t){e.isRecording&&e.patches.push(t),e.userCallback&&e.userCallback(t)},this.isObserving=!0}function s(){this.defaultCallback=function(){},this.isObserving=!1}function a(e,t){this.isProxifyingTreeNow=!1,this.isObserving=!1,this.proxifiedObjectsMap=new Map,this.parenthoodMap=new Map,"boolean"!=typeof t&&(t=!0),this.showDetachedWarning=t,this.originalObject=e,this.cachedProxy=null,this.isRecording=!1,this.resume=i.bind(this),this.pause=s.bind(this)}return a.deepClone=e,a.escapePathComponent=t,a.prototype.generateProxyAtPath=function(e,t,n){var i=this;if(!t)return t;var s={set:function(e,t,n){return r(i,e,t,n)},deleteProperty:function(e,t){return o(i,e,t)}},a=Proxy.revocable(t,s);return a.trapsInstance=s,a.originalObject=t,this.parenthoodMap.set(t,{parent:e,path:n}),this.proxifiedObjectsMap.set(a.proxy,a),a.proxy},a.prototype.A=function(e,n,r){for(var o in n)n.hasOwnProperty(o)&&n[o]instanceof Object&&(n[o]=this.A(n,n[o],t(o)));return this.generateProxyAtPath(e,n,r)},a.prototype.proxifyObjectTree=function(e){this.pause(),this.isProxifyingTreeNow=!0;var t=this.A(void 0,e,"");return this.isProxifyingTreeNow=!1,this.resume(),t},a.prototype.disableTrapsForProxy=function(e){if(this.showDetachedWarning){var t="You're accessing an object that is detached from the observedObject tree, see https://github.com/Palindrom/JSONPatcherProxy#detached-objects";e.trapsInstance.set=function(e,n,r){return console.warn(t),Reflect.set(e,n,r)},e.trapsInstance.set=function(e,n,r){return console.warn(t),Reflect.set(e,n,r)},e.trapsInstance.deleteProperty=function(e,t){return Reflect.deleteProperty(e,t)}}else delete e.trapsInstance.set,delete e.trapsInstance.get,delete e.trapsInstance.deleteProperty},a.prototype.observe=function(e,t){if(!e&&!t)throw Error("You need to either record changes or pass a callback");return this.isRecording=e,this.userCallback=t,e&&(this.patches=[]),this.cachedProxy=this.proxifyObjectTree(this.originalObject)},a.prototype.generate=function(){if(!this.isRecording)throw Error("You should set record to true to get patches later");return this.patches.splice(0,this.patches.length)},a.prototype.revoke=function(){this.proxifiedObjectsMap.forEach(function(e){e.revoke()})},a.prototype.disableTraps=function(){this.proxifiedObjectsMap.forEach(this.disableTrapsForProxy,this)},a}(),ve={}.hasOwnProperty,be=function(e,t,n,r){for(var o=1;o"===t?(a(),r=1):r&&("="===t?(r=4,n=o,o=""):"/"===t?(a(),3===r&&(s=s[0]),r=s,(s=s[0]).push(r,4),r=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(a(),r=2):o+=t)}return a(),s},me="function"==typeof Map,we=me?new Map:{},Oe=me?function(e){var t=we.get(e);return t||we.set(e,t=ge(e)),t}:function(e){for(var t="",n=0;n2;)ae.push(arguments[s]);n&&null!=n.children&&(ae.length||ae.push(n.children),delete n.children);while(ae.length)if((o=ae.pop())&&void 0!==o.pop)for(s=o.length;s--;)ae.push(o[s]);else"boolean"==typeof o&&(o=null),(i="function"!=typeof t)&&(null==o?o="":"number"==typeof o?o+="":"string"!=typeof o&&(i=!1)),i&&r?a[a.length-1]+=o:0===a.length?a=[o]:a.push(o),r=i;var l=new e;return l.nodeName=t,l.children=a,l.attributes=null==n?void 0:n,l.key=null==n?void 0:n.key,void 0!==se.vnode&&se.vnode(l),l}function n(e){var t=document.createElement("style");return t.textContent=e,t}function r(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function o(e){return e.children}function i(e,t){for(var n in t)e[n]=t[n];return e}function s(e,t){null!=e&&("function"==typeof e?e(t):e.current=t)}function a(e){return"[object Array]"===Object.prototype.toString.call(e)}function l(e,t,n,r){var o=[];return t.forEach(function(t,n){if("string"==typeof t)o[n]=u(e,t);else{var r=Object.keys(t)[0],i=t[r];if("string"==typeof i)o[n]=u(e,i);else{var s=i[0];if("string"==typeof s){var a=u(e,s);o[n]=i[1]?i[1](a):a}else{var l=[];s.forEach(function(t){l.push(u(e,t))}),o[n]=i[1].apply(null,l)}}o[r]=o[n]}}),n&&(n[r]=o),o}function p(e){return"string"==typeof e&&e?e.replace(/]/g,"").replace(/\[/g,".").split("."):[]}function u(e,t){for(var n=p(t),r=e,o=0,i=n.length;o=0;p--)n.firstChild?n.insertBefore(l[p],n.firstChild):n.appendChild(style[p])}else s=[],t.forEach(function(t,n){var o=M(0===n?e:null,t,r,i);s.push(o)});else a(e)?e.forEach(function(e,n){0===n?s=M(e,t,r,i):T(e,!1)}):s=M(e,t,r,i),n&&s.parentNode!==n&&n.appendChild(s);return--ce||(he=!1),s}function M(e,t,n,r){e&&t&&e.props&&(e.props.children=t.children);var o=e,i=fe;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||n)?e.nodeValue!=t&&(e.nodeValue=t):(o=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(o,e),T(e,!0))),o.__p=!0,o;var s=t.nodeName;if("function"==typeof s)for(var a in se.mapping)if(se.mapping[a]===s){s=a,t.nodeName=a;break}if(fe="svg"===s||"foreignObject"!==s&&fe,s+="",(!e||!v(e,s))&&(o=P(s,fe),e)){while(e.firstChild)o.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(o,e),T(e,!0)}var l=o.firstChild,p=o.__p,u=t.children;if(null==p){p=o.__p={};for(var c=o.attributes,f=c.length;f--;)p[c[f].name]=c[f].value}return!he&&u&&1===u.length&&"string"==typeof u[0]&&null!=l&&void 0!==l.splitText&&null==l.nextSibling?l.nodeValue!=u[0]&&(l.nodeValue=u[0]):(u&&u.length||null!=l)&&("WeElement"==o.constructor.is&&o.constructor.noSlot||A(o,u,he||null!=p.dangerouslySetInnerHTML,n,r)),k(o,t.attributes,p,n,r),o.props&&(o.props.children=t.children),fe=i,o}function A(e,t,n,r,o){var i,s,a,l,p,u=e.childNodes,c=[],f={},h=0,d=0,v=u.length,b=0,g=t?t.length:0;if(0!==v)for(var m=0;m0&&(this.instances.forEach(function(r){t?r.M&&r.M[t]&&F(n,r.M[t])&&(r.use&&l(e.data,("function"==typeof r.use?r.use():r.use)[t],r.using,t),r.update()):r.M&&F(n,r.M)&&(r.use&&(r.using=l(e.data,"function"==typeof r.use?r.use():r.use)),r.update())}),this.updateSelfInstances.forEach(function(r){t?r.R&&r.R[t]&&F(n,r.R[t])&&(r.useSelf&&l(e.data,("function"==typeof r.useSelf?r.useSelf():r.useSelf)[t],r.usingSelf,t),r.updateSelf()):r.R&&F(n,r.R)&&(r.usingSelf=l(e.data,"function"==typeof r.useSelf?r.useSelf():r.useSelf),r.updateSelf())}),this.onChange&&this.onChange(n))}}function F(e,t){for(var n in e){if(t[n])return!0;for(var r in t)if(V(n,r))return!0}return!1}function V(e,t){if(0===e.indexOf(t)){var n=e.substr(t.length,1);if("["===n||"."===n)return!0}return!1}function z(e){var t="";return e.replace("/","").split("/").forEach(function(e,n){n?isNaN(+e)?t+="."+e:t+="["+e+"]":t+=e}),t}function U(e,t){for(var n=e.replace("/","").split("/"),r=t.data[n[0]],o=1,i=n.length;o2?[].slice.call(arguments,2):e.children)}function Q(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 ee(e){return e.replace(/([1-9]\d*|0)(\.\d*)*rpx/g,function(e,t){return window.innerWidth*+t/750+"px"})}function te(){for(var e=[],t=0;t0)return{class:te.apply(null,n)}}function re(e){return JSON.stringify(e)}function oe(e){var t=ge(this,Ne(e),arguments,[]);return t.length>1?t:t[0]}function ie(){return{}}var se={store:null,root:function(){return"object"==typeof global&&global&&global.Math===Math&&global.Array===Array?global:self||window||global||function(){return this}()}(),mapping:{},isMultiStore:!1},ae=[];!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 le=/\B([A-Z])/g,pe=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,ue={},ce=0,fe=!1,he=!1,de=0,ye=function(e){function t(){L(this,t);var n=I(this,e.call(this));return n.props=Object.assign({},n.constructor.defaultProps),n.elementId=de++,n}return H(t,e),t.prototype.connectedCallback=function(){var e=this.parentNode;while(e&&!this.store)this.store=e.store,e=e.parentNode||e.host;if(this.use){var t;if(t="function"==typeof this.use?this.use():this.use,se.isMultiStore){var r={},o={};for(var i in t)r[i]={},o[i]={},h(t[i],r,i),l(this.store[i].data,t[i],o,i),this.store[i].instances.push(this);this.using=o,this.M=r}else this.M=h(t),this.using=l(this.store.data,t),this.store.instances.push(this)}if(this.useSelf){var s="function"==typeof this.useSelf?this.useSelf():this.useSelf;if(se.isMultiStore){var p={},u={};for(var c in s)h(s[c],p,c),l(this.store[c].data,s[c],u,c),this.store[c].updateSelfInstances.push(this);this.usingSelf=u,this.R=p}else this.R=h(s),this.usingSelf=l(this.store.data,s),this.store.updateSelfInstances.push(this)}this.attrsToProps(),this.beforeInstall(),this.install(),this.afterInstall();var f;if(this.shadowRoot){f=this.shadowRoot;var d;while(d=f.firstChild)f.removeChild(d)}else f=this.attachShadow({mode:"open"});this.constructor.css?f.appendChild(n(this.constructor.css)):this.css&&f.appendChild(n("function"==typeof this.css?this.css():this.css)),this.beforeRender(),se.afterInstall&&se.afterInstall(this);var y=this.render(this.props,this.store);this.P="[object Array]"===Object.prototype.toString.call(y)&&y.length>0,this.rootNode=_(null,y,null,this),this.rendered(),this.props.css&&(this.N=n(this.props.css),this.O=this.props.css,f.appendChild(this.N)),a(this.rootNode)?this.rootNode.forEach(function(e){f.appendChild(e)}):f.appendChild(this.rootNode),this.installed(),this.B=!0},t.prototype.disconnectedCallback=function(){if(this.uninstall(),this.B=!1,this.store)if(se.isMultiStore)for(var e in this.store){var t=this.store[e];d(this,t.instances),d(this,t.updateSelfInstances)}else d(this,this.store.instances),d(this,this.store.updateSelfInstances)},t.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.P=this.P||"[object Array]"===Object.prototype.toString.call(n)&&n.length>0,this.rootNode=_(this.rootNode,n,this.shadowRoot,this,t),this.J=!1,this.updated()},t.prototype.updateSelf=function(e){this.update(e,!0)},t.prototype.removeAttribute=function(t){e.prototype.removeAttribute.call(this,t),this.B&&this.update()},t.prototype.setAttribute=function(t,n){n&&"object"==typeof n?e.prototype.setAttribute.call(this,t,JSON.stringify(n)):e.prototype.setAttribute.call(this,t,n),this.B&&this.update()},t.prototype.pureRemoveAttribute=function(t){e.prototype.removeAttribute.call(this,t)},t.prototype.pureSetAttribute=function(t,n){e.prototype.setAttribute.call(this,t,n)},t.prototype.attrsToProps=function(e){var t=this;if(!t.normalizedNodeName&&!e){t.props.css=t.getAttribute("css");var n=this.constructor.propTypes;n&&Object.keys(n).forEach(function(e){var r=n[e],o=t.getAttribute(c(e));if(null!==o)switch(r){case String:t.props[e]=o;break;case Number:t.props[e]=+o;break;case Boolean:t.props[e]="false"!==o&&"0"!==o;break;case Array:case Object:t.props[e]=":"===o[0]?f(o.substr(1),Omi.$):JSON.parse(o.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})}},t.prototype.fire=function(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t}))},t.prototype.beforeInstall=function(){},t.prototype.install=function(){},t.prototype.afterInstall=function(){},t.prototype.installed=function(){},t.prototype.uninstall=function(){},t.prototype.beforeUpdate=function(){},t.prototype.updated=function(){},t.prototype.beforeRender=function(){},t.prototype.rendered=function(){},t.prototype.receiveProps=function(){},t}(HTMLElement);ye.is="WeElement";var ve=function(){function e(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function t(e){return-1==e.indexOf("/")&&-1==e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function n(e,t){var n=[],r=e.parenthoodMap.get(t);while(r&&r.path)n.unshift(r.path),r=e.parenthoodMap.get(r.parent);if(n.length){return"/"+n.join("/")}return""}function r(e,r,o,i){var s=n(e,r),a=s+"/"+t(o);if(e.proxifiedObjectsMap.has(i)){e.parenthoodMap.set(e.proxifiedObjectsMap.get(i).originalObject,{parent:r,path:o})}var l=e.proxifiedObjectsMap.get(i);l&&!e.isProxifyingTreeNow&&(l.inherited=!0),i&&"object"==typeof i&&!e.proxifiedObjectsMap.has(i)&&(e.parenthoodMap.set(i,{parent:r,path:o}),i=e.A(r,i,o));var p={op:"remove",path:a};if(void 0===i){if(!Array.isArray(r)&&!r.hasOwnProperty(o))return Reflect.set(r,o,i);Array.isArray(r)&&(p.op="replace",p.value=null);var u=e.proxifiedObjectsMap.get(r[o]);u&&(e.parenthoodMap.delete(r[o]),e.disableTrapsForProxy(u),e.proxifiedObjectsMap.delete(u))}else{if(Array.isArray(r)&&!Number.isInteger(+(""+o)))return"length"!=o&&console.warn("JSONPatcherProxy noticed a non-integer prop was set for an array. This will not emit a patch"),Reflect.set(r,o,i);p.op="add",r.hasOwnProperty(o)&&(void 0!==r[o]||Array.isArray(r))&&(p.op="replace"),p.value=i}p.oldValue=r[o];var c=Reflect.set(r,o,i);return e.defaultCallback(p),c}function o(e,r,o){if(void 0!==r[o]){var i=n(e,r),s=i+"/"+t(o),a=e.proxifiedObjectsMap.get(r[o]);a&&(a.inherited?a.inherited=!1:(e.parenthoodMap.delete(a.originalObject),e.disableTrapsForProxy(a),e.proxifiedObjectsMap.delete(r[o])));var l=Reflect.deleteProperty(r,o);return e.defaultCallback({op:"remove",path:s}),l}}function i(){var e=this;this.defaultCallback=function(t){e.isRecording&&e.patches.push(t),e.userCallback&&e.userCallback(t)},this.isObserving=!0}function s(){this.defaultCallback=function(){},this.isObserving=!1}function a(e,t){this.isProxifyingTreeNow=!1,this.isObserving=!1,this.proxifiedObjectsMap=new Map,this.parenthoodMap=new Map,"boolean"!=typeof t&&(t=!0),this.showDetachedWarning=t,this.originalObject=e,this.cachedProxy=null,this.isRecording=!1,this.resume=i.bind(this),this.pause=s.bind(this)}return a.deepClone=e,a.escapePathComponent=t,a.prototype.generateProxyAtPath=function(e,t,n){var i=this;if(!t)return t;var s={set:function(e,t,n){return r(i,e,t,n)},deleteProperty:function(e,t){return o(i,e,t)}},a=Proxy.revocable(t,s);return a.trapsInstance=s,a.originalObject=t,this.parenthoodMap.set(t,{parent:e,path:n}),this.proxifiedObjectsMap.set(a.proxy,a),a.proxy},a.prototype.A=function(e,n,r){for(var o in n)n.hasOwnProperty(o)&&n[o]instanceof Object&&(n[o]=this.A(n,n[o],t(o)));return this.generateProxyAtPath(e,n,r)},a.prototype.proxifyObjectTree=function(e){this.pause(),this.isProxifyingTreeNow=!0;var t=this.A(void 0,e,"");return this.isProxifyingTreeNow=!1,this.resume(),t},a.prototype.disableTrapsForProxy=function(e){if(this.showDetachedWarning){var t="You're accessing an object that is detached from the observedObject tree, see https://github.com/Palindrom/JSONPatcherProxy#detached-objects";e.trapsInstance.set=function(e,n,r){return console.warn(t),Reflect.set(e,n,r)},e.trapsInstance.set=function(e,n,r){return console.warn(t),Reflect.set(e,n,r)},e.trapsInstance.deleteProperty=function(e,t){return Reflect.deleteProperty(e,t)}}else delete e.trapsInstance.set,delete e.trapsInstance.get,delete e.trapsInstance.deleteProperty},a.prototype.observe=function(e,t){if(!e&&!t)throw Error("You need to either record changes or pass a callback");return this.isRecording=e,this.userCallback=t,e&&(this.patches=[]),this.cachedProxy=this.proxifyObjectTree(this.originalObject)},a.prototype.generate=function(){if(!this.isRecording)throw Error("You should set record to true to get patches later");return this.patches.splice(0,this.patches.length)},a.prototype.revoke=function(){this.proxifiedObjectsMap.forEach(function(e){e.revoke()})},a.prototype.disableTraps=function(){this.proxifiedObjectsMap.forEach(this.disableTrapsForProxy,this)},a}(),be={}.hasOwnProperty,ge=function(e,t,n,r){for(var o=1;o"===t?(a(),r=1):r&&("="===t?(r=4,n=o,o=""):"/"===t?(a(),3===r&&(s=s[0]),r=s,(s=s[0]).push(r,4),r=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(a(),r=2):o+=t)}return a(),s},we="function"==typeof Map,Oe=we?new Map:{},Ne=we?function(e){var t=Oe.get(e);return t||Oe.set(e,t=me(e)),t}:function(e){for(var t="",n=0;n 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 let p = new VNode()\n p.nodeName = nodeName\n p.children = children\n p.attributes = attributes == null ? undefined : attributes\n p.key = attributes == null ? undefined : attributes.key\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","/**\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 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\n\nexport function getUse(data, paths, out, name) {\n const obj = []\n paths.forEach((path, index) => {\n const isPath = typeof path === 'string'\n if (isPath) {\n obj[index] = getTargetByPath(data, path)\n } else {\n const key = Object.keys(path)[0]\n const value = path[key]\n if (typeof value === 'string') {\n obj[index] = getTargetByPath(data, value)\n } else {\n const tempPath = value[0]\n if (typeof tempPath === 'string') {\n const tempVal = getTargetByPath(data, tempPath)\n obj[index] = value[1] ? value[1](tempVal) : tempVal\n } else {\n const args = []\n tempPath.forEach(path =>{\n args.push(getTargetByPath(data, path))\n })\n obj[index] = value[1].apply(null, args)\n }\n }\n obj[key] = obj[index]\n }\n\t})\n\tif(out) out[name] = obj\n return obj\n}\n\nexport function pathToArr(path) {\n\tif(typeof path !== 'string' || !path) return []\n\t// return path.split(/\\.|\\[|\\]/).filter(name => !!name)\n\treturn path.replace(/]/g, '').replace(/\\[/g, '.').split('.')\n}\n\nexport function getTargetByPath(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 return current\n}\n\nconst hyphenateRE = /\\B([A-Z])/g\nexport function hyphenate(str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase()\n}\n\nexport function getValByPath(path, current) {\n\tconst arr = pathToArr(path)\n\tarr.forEach(prop => {\n\t\tcurrent = current[prop]\n\t})\n\treturn current\n}\n\nexport function getPath(obj, out, name) {\n\tconst result = {}\n\tobj.forEach(item => {\n\t\tif (typeof item === 'string') {\n\t\t\tresult[item] = true\n\t\t} else {\n\t\t\tconst tempPath = item[Object.keys(item)[0]]\n\t\t\tif (typeof tempPath === 'string') {\n\t\t\t\tresult[tempPath] = true\n\t\t\t} else {\n\t\t\t\tif (typeof tempPath[0] === 'string') {\n\t\t\t\t\tresult[tempPath[0]] = true\n\t\t\t\t} else {\n\t\t\t\t\ttempPath[0].forEach(path => (result[path] = true))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\tif(out) out[name] = result\n\treturn result\n}\n\nexport function removeItem(item, arr){\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}","import { extend } from '../util'\nimport options from '../options'\n/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf 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\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized 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\textension['o-' + name] = handler\n}\n\nexport function set(origin, path, value) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\t\tif (i === len - 1) {\n\t\t\t\t\tcurrent[arr[i]] = value\n\t\t\t} else {\n\t\t\t\t\tcurrent = current[arr[i]]\n\t\t\t}\n\t}\n}\n\nexport function get(origin, path) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\n\treturn current\n}\n\nfunction eventProxy(e) {\n return this._listeners[e.type](e)\n}\n\nexport function bind(el, type, handler){\n\tel._listeners = el._listeners || {}\n\tel._listeners[type] = handler\n\tel.addEventListener(type, eventProxy)\n}\n\nexport function unbind(el, type){\n\tel.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 let useCapture = name !== (name = name.replace(/Capture$/, ''))\n name = name.toLowerCase().substring(2)\n if (value) {\n if (!old) {\n node.addEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.addEventListener('touchstart', touchStart, useCapture)\n node.addEventListener('touchend', touchEnd, useCapture)\n }\n }\n } else {\n node.removeEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.removeEventListener('touchstart', touchStart, useCapture)\n node.removeEventListener('touchend', touchEnd, useCapture)\n }\n }\n ;(node._listeners || (node._listeners = {}))[name] = value\n } else if (node.nodeName === 'INPUT' && name === 'value'){\n node[name] = value == null ? '' : value\n } else if (name !== 'list' && name !== 'type' && name !== 'css' && !isSvg && name in node && value !== '') { //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 ? node.pureRemoveAttribute(name) : 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 node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : 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 ? node.pureSetAttribute(name, value) : 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 touchStart(e) {\n this.___touchX = e.touches[0].pageX\n this.___touchY = e.touches[0].pageY\n this.___scrollTop = document.body.scrollTop\n}\n\nfunction touchEnd(e) {\n if (\n Math.abs(e.changedTouches[0].pageX - this.___touchX) < 30 &&\n Math.abs(e.changedTouches[0].pageY - this.___touchY) < 30 &&\n Math.abs(document.body.scrollTop - this.___scrollTop) < 30\n ) {\n this.dispatchEvent(new CustomEvent('tap', { detail: e }))\n }\n}\n","import { ATTR_KEY } from '../constants'\nimport { isSameNodeType, isNamedNode } from './index'\nimport { createNode, setAccessor } from '../dom/index'\nimport { camelCase, isArray } 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 *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\n *\t@returns {Element} dom\t\t\tThe created/mutated element\n *\t@private\n */\nexport function diff(dom, vnode, parent, component, updateSelf) {\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 (isArray(vnode)) {\n if (parent) {\n const styles = parent.querySelectorAll('style')\n styles.forEach(s => {\n parent.removeChild(s)\n })\n innerDiffNode(parent, vnode, hydrating, component, updateSelf)\n\n for (let i = styles.length - 1; i >= 0; i--) {\n parent.firstChild ? parent.insertBefore(styles[i], parent.firstChild) : parent.appendChild(style[i])\n }\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 *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\n *\t@param {Boolean} isHydrating\tIf `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 // 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 // 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 *\t@param {Node} node\t\t\t\t\t\tDOM node to start unmount/removal from\n *\t@param {Boolean} [unmountOnly=false]\tIf `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 *\t- we use .lastChild here because it causes less reflow than .firstChild\n *\t- 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 *\t@param {Element} dom\t\tElement with attributes to diff `attrs` against\n *\t@param {Object} attrs\t\tThe desired end-state key-value attribute pairs\n *\t@param {Object} old\t\t\tCurrent/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(dom, name, old[name], (old[name] = undefined), isSvgMode, component)\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(dom, name, old[name], (old[name] = attrs[name]), isSvgMode, component)\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 if (isWeElement) {\n let ccName = camelCase(name)\n dom.props[ccName] = old[ccName] = attrs[name]\n //update = true\n } else {\n old[name] = attrs[name]\n }\n }\n }\n\n if (isWeElement && !updateSelf && dom.parentNode) {\n //__hasChildren is not accuracy when it was empty at first, so add dom.children.length > 0 condition\n //if (update || dom.__hasChildren || dom.children.length > 0 || (dom.store && !dom.store.data)) {\n if (dom.receiveProps(dom.props, oldClone) !== false) {\n dom.update()\n }\n //}\n }\n}\n","/*!\n * https://github.com/Palindrom/JSONPatcherProxy\n * (c) 2017 Starcounter\n * MIT license\n */\n\n/** Class representing a JS Object observer */\nconst JSONPatcherProxy = (function() {\n /**\n * Deep clones your object and returns a new object.\n */\n function deepClone(obj) {\n switch (typeof obj) {\n case 'object':\n return JSON.parse(JSON.stringify(obj)) //Faster than ES5 clone - http://jsperf.com/deep-cloning-of-objects/5\n case 'undefined':\n return null //this is how JSON.stringify behaves for array items\n default:\n return obj //no need to clone primitives\n }\n }\n JSONPatcherProxy.deepClone = deepClone\n\n function escapePathComponent(str) {\n if (str.indexOf('/') == -1 && str.indexOf('~') == -1) return str\n return str.replace(/~/g, '~0').replace(/\\//g, '~1')\n }\n JSONPatcherProxy.escapePathComponent = escapePathComponent\n\n /**\n * Walk up the parenthood tree to get the path\n * @param {JSONPatcherProxy} instance\n * @param {Object} obj the object you need to find its path\n */\n function findObjectPath(instance, obj) {\n const pathComponents = []\n let parentAndPath = instance.parenthoodMap.get(obj)\n while (parentAndPath && parentAndPath.path) {\n // because we're walking up-tree, we need to use the array as a stack\n pathComponents.unshift(parentAndPath.path)\n parentAndPath = instance.parenthoodMap.get(parentAndPath.parent)\n }\n if (pathComponents.length) {\n const path = pathComponents.join('/')\n return '/' + path\n }\n return ''\n }\n /**\n * A callback to be used as th proxy set trap callback.\n * It updates parenthood map if needed, proxifies nested newly-added objects, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the affected object\n * @param {String} key the effect property's name\n * @param {Any} newValue the value being set\n */\n function setTrap(instance, target, key, newValue) {\n const parentPath = findObjectPath(instance, target)\n\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n if (instance.proxifiedObjectsMap.has(newValue)) {\n const newValueOriginalObject = instance.proxifiedObjectsMap.get(newValue)\n\n instance.parenthoodMap.set(newValueOriginalObject.originalObject, {\n parent: target,\n path: key\n })\n }\n /*\n mark already proxified values as inherited.\n rationale: proxy.arr.shift()\n will emit\n {op: replace, path: '/arr/1', value: arr_2}\n {op: remove, path: '/arr/2'}\n\n by default, the second operation would revoke the proxy, and this renders arr revoked.\n That's why we need to remember the proxies that are inherited.\n */\n const revokableInstance = instance.proxifiedObjectsMap.get(newValue)\n /*\n Why do we need to check instance.isProxifyingTreeNow?\n\n We need to make sure we mark revokables as inherited ONLY when we're observing,\n because throughout the first proxification, a sub-object is proxified and then assigned to\n its parent object. This assignment of a pre-proxified object can fool us into thinking\n that it's a proxified object moved around, while in fact it's the first assignment ever.\n\n Checking isProxifyingTreeNow ensures this is not happening in the first proxification,\n but in fact is is a proxified object moved around the tree\n */\n if (revokableInstance && !instance.isProxifyingTreeNow) {\n revokableInstance.inherited = true\n }\n\n // if the new value is an object, make sure to watch it\n if (\n newValue &&\n typeof newValue == 'object' &&\n !instance.proxifiedObjectsMap.has(newValue)\n ) {\n instance.parenthoodMap.set(newValue, {\n parent: target,\n path: key\n })\n newValue = instance._proxifyObjectTreeRecursively(target, newValue, key)\n }\n // let's start with this operation, and may or may not update it later\n const operation = {\n op: 'remove',\n path: destinationPropKey\n }\n if (typeof newValue == 'undefined') {\n // applying De Morgan's laws would be a tad faster, but less readable\n if (!Array.isArray(target) && !target.hasOwnProperty(key)) {\n // `undefined` is being set to an already undefined value, keep silent\n return Reflect.set(target, key, newValue)\n }\n // when array element is set to `undefined`, should generate replace to `null`\n if (Array.isArray(target)) {\n // undefined array elements are JSON.stringified to `null`\n ;(operation.op = 'replace'), (operation.value = null)\n }\n const oldValue = instance.proxifiedObjectsMap.get(target[key])\n // was the deleted a proxified object?\n if (oldValue) {\n instance.parenthoodMap.delete(target[key])\n instance.disableTrapsForProxy(oldValue)\n instance.proxifiedObjectsMap.delete(oldValue)\n }\n } else {\n if (Array.isArray(target) && !Number.isInteger(+key.toString())) {\n /* array props (as opposed to indices) don't emit any patches, to avoid needless `length` patches */\n if (key != 'length') {\n console.warn(\n 'JSONPatcherProxy noticed a non-integer prop was set for an array. This will not emit a patch'\n )\n }\n return Reflect.set(target, key, newValue)\n }\n operation.op = 'add'\n if (target.hasOwnProperty(key)) {\n if (typeof target[key] !== 'undefined' || Array.isArray(target)) {\n operation.op = 'replace' // setting `undefined` array elements is a `replace` op\n }\n }\n operation.value = newValue\n }\n operation.oldValue = target[key]\n const reflectionResult = Reflect.set(target, key, newValue)\n instance.defaultCallback(operation)\n return reflectionResult\n }\n /**\n * A callback to be used as th proxy delete trap callback.\n * It updates parenthood map if needed, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the effected object\n * @param {String} key the effected property's name\n */\n function deleteTrap(instance, target, key) {\n if (typeof target[key] !== 'undefined') {\n const parentPath = findObjectPath(instance, target)\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n const revokableProxyInstance = instance.proxifiedObjectsMap.get(\n target[key]\n )\n\n if (revokableProxyInstance) {\n if (revokableProxyInstance.inherited) {\n /*\n this is an inherited proxy (an already proxified object that was moved around),\n we shouldn't revoke it, because even though it was removed from path1, it is still used in path2.\n And we know that because we mark moved proxies with `inherited` flag when we move them\n\n it is a good idea to remove this flag if we come across it here, in deleteProperty trap.\n We DO want to revoke the proxy if it was removed again.\n */\n revokableProxyInstance.inherited = false\n } else {\n instance.parenthoodMap.delete(revokableProxyInstance.originalObject)\n instance.disableTrapsForProxy(revokableProxyInstance)\n instance.proxifiedObjectsMap.delete(target[key])\n }\n }\n const reflectionResult = Reflect.deleteProperty(target, key)\n\n instance.defaultCallback({\n op: 'remove',\n path: destinationPropKey\n })\n\n return reflectionResult\n }\n }\n /* pre-define resume and pause functions to enhance constructors performance */\n function resume() {\n this.defaultCallback = operation => {\n this.isRecording && this.patches.push(operation)\n this.userCallback && this.userCallback(operation)\n }\n this.isObserving = true\n }\n function pause() {\n this.defaultCallback = () => {}\n this.isObserving = false\n }\n /**\n * Creates an instance of JSONPatcherProxy around your object of interest `root`.\n * @param {Object|Array} root - the object you want to wrap\n * @param {Boolean} [showDetachedWarning = true] - whether to log a warning when a detached sub-object is modified @see {@link https://github.com/Palindrom/JSONPatcherProxy#detached-objects}\n * @returns {JSONPatcherProxy}\n * @constructor\n */\n function JSONPatcherProxy(root, showDetachedWarning) {\n this.isProxifyingTreeNow = false\n this.isObserving = false\n this.proxifiedObjectsMap = new Map()\n this.parenthoodMap = new Map()\n // default to true\n if (typeof showDetachedWarning !== 'boolean') {\n showDetachedWarning = true\n }\n\n this.showDetachedWarning = showDetachedWarning\n this.originalObject = root\n this.cachedProxy = null\n this.isRecording = false\n this.userCallback\n /**\n * @memberof JSONPatcherProxy\n * Restores callback back to the original one provided to `observe`.\n */\n this.resume = resume.bind(this)\n /**\n * @memberof JSONPatcherProxy\n * Replaces your callback with a noop function.\n */\n this.pause = pause.bind(this)\n }\n\n JSONPatcherProxy.prototype.generateProxyAtPath = function(parent, obj, path) {\n if (!obj) {\n return obj\n }\n const traps = {\n set: (target, key, value, receiver) =>\n setTrap(this, target, key, value, receiver),\n deleteProperty: (target, key) => deleteTrap(this, target, key)\n }\n const revocableInstance = Proxy.revocable(obj, traps)\n // cache traps object to disable them later.\n revocableInstance.trapsInstance = traps\n revocableInstance.originalObject = obj\n\n /* keeping track of object's parent and path */\n\n this.parenthoodMap.set(obj, { parent, path })\n\n /* keeping track of all the proxies to be able to revoke them later */\n this.proxifiedObjectsMap.set(revocableInstance.proxy, revocableInstance)\n return revocableInstance.proxy\n }\n // grab tree's leaves one by one, encapsulate them into a proxy and return\n JSONPatcherProxy.prototype._proxifyObjectTreeRecursively = function(\n parent,\n root,\n path\n ) {\n for (let key in root) {\n if (root.hasOwnProperty(key)) {\n if (root[key] instanceof Object) {\n root[key] = this._proxifyObjectTreeRecursively(\n root,\n root[key],\n escapePathComponent(key)\n )\n }\n }\n }\n return this.generateProxyAtPath(parent, root, path)\n }\n // this function is for aesthetic purposes\n JSONPatcherProxy.prototype.proxifyObjectTree = function(root) {\n /*\n while proxyifying object tree,\n the proxyifying operation itself is being\n recorded, which in an unwanted behavior,\n that's why we disable recording through this\n initial process;\n */\n this.pause()\n this.isProxifyingTreeNow = true\n const proxifiedObject = this._proxifyObjectTreeRecursively(\n undefined,\n root,\n ''\n )\n /* OK you can record now */\n this.isProxifyingTreeNow = false\n this.resume()\n return proxifiedObject\n }\n /**\n * Turns a proxified object into a forward-proxy object; doesn't emit any patches anymore, like a normal object\n * @param {Proxy} proxy - The target proxy object\n */\n JSONPatcherProxy.prototype.disableTrapsForProxy = function(\n revokableProxyInstance\n ) {\n if (this.showDetachedWarning) {\n const message =\n \"You're accessing an object that is detached from the observedObject tree, see https://github.com/Palindrom/JSONPatcherProxy#detached-objects\"\n\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.deleteProperty = (\n targetObject,\n propKey\n ) => {\n return Reflect.deleteProperty(targetObject, propKey)\n }\n } else {\n delete revokableProxyInstance.trapsInstance.set\n delete revokableProxyInstance.trapsInstance.get\n delete revokableProxyInstance.trapsInstance.deleteProperty\n }\n }\n /**\n * Proxifies the object that was passed in the constructor and returns a proxified mirror of it. Even though both parameters are options. You need to pass at least one of them.\n * @param {Boolean} [record] - whether to record object changes to a later-retrievable patches array.\n * @param {Function} [callback] - this will be synchronously called with every object change with a single `patch` as the only parameter.\n */\n JSONPatcherProxy.prototype.observe = function(record, callback) {\n if (!record && !callback) {\n throw new Error('You need to either record changes or pass a callback')\n }\n this.isRecording = record\n this.userCallback = callback\n /*\n I moved it here to remove it from `unobserve`,\n this will also make the constructor faster, why initiate\n the array before they decide to actually observe with recording?\n They might need to use only a callback.\n */\n if (record) this.patches = []\n this.cachedProxy = this.proxifyObjectTree(this.originalObject)\n return this.cachedProxy\n }\n /**\n * If the observed is set to record, it will synchronously return all the patches and empties patches array.\n */\n JSONPatcherProxy.prototype.generate = function() {\n if (!this.isRecording) {\n throw new Error('You should set record to true to get patches later')\n }\n return this.patches.splice(0, this.patches.length)\n }\n /**\n * Revokes all proxies rendering the observed object useless and good for garbage collection @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/revocable}\n */\n JSONPatcherProxy.prototype.revoke = function() {\n this.proxifiedObjectsMap.forEach(el => {\n el.revoke()\n })\n }\n /**\n * Disables all proxies' traps, turning the observed object into a forward-proxy object, like a normal object that you can modify silently.\n */\n JSONPatcherProxy.prototype.disableTraps = function() {\n this.proxifiedObjectsMap.forEach(this.disableTrapsForProxy, this)\n }\n return JSONPatcherProxy\n})()\n\nexport default JSONPatcherProxy\n","import { diff } from './vdom/diff'\nimport JSONProxy from './proxy'\nimport { getUse } from './util'\nimport options from './options'\n\nexport function render(vnode, parent, store) {\n\tparent = typeof parent === 'string' ? document.querySelector(parent) : parent\n\tif (store) {\n\t\tif (store.data) {\n\t\t\tobserveStore(store)\n\t\t} else {\n\t\t\toptions.isMultiStore = true\n\t\t\t//Multi-store injection\n\t\t\tfor (let key in store) {\n\t\t\t\tobserveStore(store[key], key)\n\t\t\t}\n\t\t}\n\t\tparent.store = store\n\t}\n\treturn diff(null, vnode, parent, false)\n}\n\nfunction observeStore(store, key) {\n\tstore.instances = []\n\tstore.updateSelfInstances = []\n\textendStoreUpate(store, key)\n\n\tstore.data = new JSONProxy(store.data).observe(false, function (patch) {\n\t\tconst patchs = {}\n\t\tif (patch.op === 'remove') {\n\t\t\t// fix arr splice\n\t\t\tconst kv = getArrayPatch(patch.path, store)\n\t\t\tpatchs[kv.k] = kv.v\n\n\t\t\tupdate(patchs, store)\n\n\t\t} else {\n\t\t\tconst key = fixPath(patch.path)\n\t\t\tpatchs[key] = patch.value\n\n\t\t\tupdate(patchs, store)\n\n\t\t}\n\t})\n}\n\nfunction update(patch, store) {\n\tstore.update(patch)\n}\n\nfunction extendStoreUpate(store, key) {\n\tstore.update = function (patch) {\n\t\tif (Object.keys(patch).length > 0) {\n\t\t\tthis.instances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && instance._updatePath[key] && needUpdate(patch, instance._updatePath[key]))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.use === 'function' ? instance.use() : instance.use)[key], instance.using, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && needUpdate(patch, instance._updatePath))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tinstance.using = getUse(store.data, typeof instance.use === 'function' ? instance.use() : instance.use)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t})\n\n\t\t\tthis.updateSelfInstances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updateSelfPath && instance._updateSelfPath[key] && needUpdate(patch, instance._updateSelfPath[key]))) {\n\t\t\t\t\t\tif (instance.useSelf) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)[key], instance.usingSelf, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (instance._updateSelfPath && needUpdate(patch, instance._updateSelfPath)) {\n\t\t\t\t\t\tinstance.usingSelf = getUse(store.data, typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\tthis.onChange && this.onChange(patch)\n\t\t}\n\t}\n}\n\n\nexport function needUpdate(diffResult, updatePath) {\n\tfor (let keyA in diffResult) {\n\t\tif (updatePath[keyA]) {\n\t\t\treturn true\n\t\t}\n\t\tfor (let keyB in updatePath) {\n\t\t\tif (includePath(keyA, keyB)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\treturn false\n}\n\nfunction includePath(pathA, pathB) {\n\tif (pathA.indexOf(pathB) === 0) {\n\t\tconst next = pathA.substr(pathB.length, 1)\n\t\tif (next === '[' || next === '.') {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nexport function fixPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tarr.forEach((item, index) => {\n\t\tif (index) {\n\t\t\tif (isNaN(Number(item))) {\n\t\t\t\tmpPath += '.' + item\n\t\t\t} else {\n\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t}\n\t\t} else {\n\t\t\tmpPath += item\n\t\t}\n\t})\n\treturn mpPath\n}\n\nfunction getArrayPatch(path, store) {\n\tconst arr = path.replace('/', '').split('/')\n\tlet current = store.data[arr[0]]\n\tfor (let i = 1, len = arr.length; i < len - 1; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\treturn {\n\t\tk: fixArrPath(path),\n\t\tv: current\n\t}\n}\n\nfunction fixArrPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tconst len = arr.length\n\tarr.forEach((item, index) => {\n\t\tif (index < len - 1) {\n\t\t\tif (index) {\n\t\t\t\tif (isNaN(Number(item))) {\n\t\t\t\t\tmpPath += '.' + item\n\t\t\t\t} else {\n\t\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmpPath += item\n\t\t\t}\n\t\t}\n\t})\n\treturn mpPath\n}\n","import WeElement from './we-element'\nimport options from './options'\n\nexport function define(name, ctor, config) {\n if (options.mapping[name]) {\n return\n }\n if (ctor.is === 'WeElement') {\n customElements.define(name, ctor)\n options.mapping[name] = ctor\n\n } else {\n \n if (typeof config === 'string') {\n config = { css: config }\n } else {\n config = config || { }\n }\n\n class Ele extends WeElement {\n\n static css = config.css\n\n static propTypes = config.propTypes\n\n static defaultProps = config.defaultProps\n\n render() {\n return ctor.call(this, this)\n }\n\n receiveProps() {\n if (config.receiveProps) {\n return config.receiveProps.apply(this, arguments)\n }\n }\n }\n\n const eleHooks = ['install', 'installed', 'uninstall', 'beforeUpdate', 'updated', 'beforeRender', 'rendered'],\n storeHelpers = ['use', 'useSelf']\n\n eleHooks.forEach(hook => {\n if (config[hook]) {\n Ele.prototype[hook] = function () {\n config[hook].apply(this, arguments)\n }\n }\n })\n\n storeHelpers.forEach(func => {\n if (config[func]) {\n Ele.prototype[func] = function () {\n return typeof config[func] === 'function'\n ? config[func].apply(this, arguments)\n : config[func]\n }\n }\n })\n\n customElements.define(name, Ele)\n options.mapping[name] = Ele\n }\n}\n\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\t\tThe virtual DOM element to clone\n * @param {Object} props\tAttributes/props to add when cloning\n * @param {VNode} rest\t\tAny 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","export function o(obj){\n return JSON.stringify(obj)\n}","var n=function(t,r,u,e){for(var p=1;p\"===t?(a(),u=1):u&&(\"=\"===t?(u=4,r=e,e=\"\"):\"/\"===t?(a(),3===u&&(s=s[0]),u=s,(s=s[0]).push(u,4),u=0):\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t?(a(),u=2):e+=t)}return a(),s},r=\"function\"==typeof Map,u=r?new Map:{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)),r}:function(n){for(var r=\"\",e=0;e1?r:r[0]}\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 *\t@public\n *\t@namespace options {Object}\n */\nexport default {\n store: null,\n root: getGlobal(),\n\tmapping: {},\n\tisMultiStore: false\n}\n","import {\n\tcssToDom,\n\tisArray,\n\tgetUse,\n\thyphenate,\n\tgetValByPath,\n\tremoveItem\n} from './util'\nimport { diff } from './vdom/diff'\nimport options from './options'\nimport { getPath } from './util'\n\nlet id = 0\n\nexport default class WeElement extends HTMLElement {\n\tstatic is = 'WeElement'\n\n\tconstructor() {\n\t\tsuper()\n\t\tthis.props = Object.assign({},\n\t\t\tthis.constructor.defaultProps\n\t\t)\n\t\tthis.elementId = id++\n\t}\n\n\tconnectedCallback() {\n\t\tlet p = this.parentNode\n\t\twhile (p && !this.store) {\n\t\t\tthis.store = p.store\n\t\t\tp = p.parentNode || p.host\n\t\t}\n\n\t\tif (this.use) {\n\t\t\tlet use\n\t\t\tif (typeof this.use === 'function') {\n\t\t\t\tuse = this.use()\n\t\t\t} else {\n\t\t\t\tuse = this.use\n\t\t\t}\n\n\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\t_updatePath[storeName] = {}\n\t\t\t\t\tusing[storeName] = {}\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].instances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.using = using\n\t\t\t\tthis._updatePath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updatePath = getPath(use)\n\t\t\t\tthis.using = getUse(this.store.data, use)\n\t\t\t\tthis.store.instances.push(this)\n\t\t\t}\n\t\t}\n\t\tif (this.useSelf) {\n\t\t\tconst use = typeof this.useSelf === 'function' ? this.useSelf() : this.useSelf\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].updateSelfInstances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.usingSelf = using\n\t\t\t\tthis._updateSelfPath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updateSelfPath = getPath(use)\n\t\t\t\tthis.usingSelf = getUse(this.store.data, use)\n\t\t\t\tthis.store.updateSelfInstances.push(this)\n\t\t\t}\n\t\t}\n\t\tthis.attrsToProps()\n\t\tthis.beforeInstall()\n\t\tthis.install()\n\t\tthis.afterInstall()\n\n\t\tlet shadowRoot\n\t\tif (!this.shadowRoot) {\n\t\t\tshadowRoot = this.attachShadow({\n\t\t\t\tmode: 'open'\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot = this.shadowRoot\n\t\t\tlet fc\n\t\t\twhile ((fc = shadowRoot.firstChild)) {\n\t\t\t\tshadowRoot.removeChild(fc)\n\t\t\t}\n\t\t}\n\n\t\tif (this.constructor.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(this.constructor.css))\n\t\t} else if (this.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(typeof this.css === 'function' ? this.css() : this.css))\n\t\t}\n\t\tthis.beforeRender()\n\t\toptions.afterInstall && options.afterInstall(this)\n\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.__hasChildren = Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0\n\n\t\tthis.rootNode = diff(\n\t\t\tnull,\n\t\t\trendered,\n\t\t\tnull,\n\t\t\tthis\n\t\t)\n\t\tthis.rendered()\n\n\t\tif (this.props.css) {\n\t\t\tthis._customStyleElement = cssToDom(this.props.css)\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tshadowRoot.appendChild(this._customStyleElement)\n\t\t}\n\n\t\tif (isArray(this.rootNode)) {\n\t\t\tthis.rootNode.forEach(function (item) {\n\t\t\t\tshadowRoot.appendChild(item)\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot.appendChild(this.rootNode)\n\t\t}\n\t\tthis.installed()\n\t\tthis._isInstalled = true\n\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.uninstall()\n\t\tthis._isInstalled = false\n\t\tif (this.store) {\n\t\t\tif(options.isMultiStore){\n\t\t\t\tfor(let key in this.store){\n\t\t\t\t\tconst current = this.store[key]\n\t\t\t\t\tremoveItem(this, current.instances)\n\t\t\t\t removeItem(this, current.updateSelfInstances)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tremoveItem(this, this.store.instances)\n\t\t\t\tremoveItem(this, this.store.updateSelfInstances)\n\t\t\t}\n\t\t}\n\t}\n\n\tupdate(ignoreAttrs, updateSelf) {\n\t\tthis._willUpdate = true\n\t\tthis.beforeUpdate()\n\t\tthis.beforeRender()\n\t\t//fix null !== undefined\n\t\tif (this._customStyleContent != this.props.css) {\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tthis._customStyleElement.textContent = this._customStyleContent\n\t\t}\n\t\tthis.attrsToProps(ignoreAttrs)\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.rendered()\n\t\tthis.__hasChildren = this.__hasChildren || (Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0)\n\n\t\tthis.rootNode = diff(\n\t\t\tthis.rootNode,\n\t\t\trendered,\n\t\t\tthis.shadowRoot,\n\t\t\tthis,\n\t\t\tupdateSelf\n\t\t)\n\t\tthis._willUpdate = false\n\t\tthis.updated()\n\n\t}\n\n\tupdateSelf(ignoreAttrs) {\n\t\tthis.update(ignoreAttrs, true)\n\t}\n\n\tremoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t\t//Avoid executing removeAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tsetAttribute(key, val) {\n\t\tif (val && typeof val === 'object') {\n\t\t\tsuper.setAttribute(key, JSON.stringify(val))\n\t\t} else {\n\t\t\tsuper.setAttribute(key, val)\n\t\t}\n\t\t//Avoid executing setAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tpureRemoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t}\n\n\tpureSetAttribute(key, val) {\n\t\tsuper.setAttribute(key, val)\n\t}\n\n\tattrsToProps(ignoreAttrs) {\n\t\tconst ele = this\n\t\tif (ele.normalizedNodeName || ignoreAttrs) return\n\t\tele.props['css'] = ele.getAttribute('css')\n\t\tconst attrs = this.constructor.propTypes\n\t\tif (!attrs) return\n\t\tObject.keys(attrs).forEach(key => {\n\t\t\tconst type = attrs[key]\n\t\t\tconst val = ele.getAttribute(hyphenate(key))\n\t\t\tif (val !== null) {\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase String:\n\t\t\t\t\t\tele.props[key] = val\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Number:\n\t\t\t\t\t\tele.props[key] = Number(val)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Boolean:\n\t\t\t\t\t\tif (val === 'false' || val === '0') {\n\t\t\t\t\t\t\tele.props[key] = false\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = true\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Array:\n\t\t\t\t\tcase Object:\n\t\t\t\t\t\tif (val[0] === ':') {\n\t\t\t\t\t\t\tele.props[key] = getValByPath(val.substr(1), Omi.$)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = JSON.parse(val\n\t\t\t\t\t\t\t\t.replace(/(['\"])?([a-zA-Z0-9_-]+)(['\"])?:([^\\/])/g, '\"$2\":$4')\n\t\t\t\t\t\t\t\t.replace(/'([\\s\\S]*?)'/g, '\"$1\"')\n\t\t\t\t\t\t\t\t.replace(/,(\\s*})/g, '$1')\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (ele.constructor.defaultProps && ele.constructor.defaultProps.hasOwnProperty(key)) {\n\t\t\t\t\tele.props[key] = ele.constructor.defaultProps[key]\n\t\t\t\t} else {\n\t\t\t\t\tele.props[key] = null\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tfire(name, data) {\n\t\tthis.dispatchEvent(new CustomEvent(name, {\n\t\t\tdetail: data\n\t\t}))\n\t}\n\n\tbeforeInstall() {}\n\n\tinstall() {}\n\n\tafterInstall() {}\n\n\tinstalled() {}\n\n\tuninstall() {}\n\n\tbeforeUpdate() {}\n\n\tupdated() {}\n\n\tbeforeRender() {}\n\n\trendered() {}\n\n\treceiveProps() {}\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 htm from 'htm'\nimport { extend, get, set, bind, unbind } from './extend'\nimport JSONProxy from './proxy'\n\nconst html = htm.bind(h)\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 html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n\tJSONProxy\n}\n\noptions.root.Omi = omi\noptions.root.omi = omi\noptions.root.Omi.version = '6.15.4'\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 html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n\tJSONProxy\n}\n"]} \ No newline at end of file +{"version":3,"sources":["../src/vnode.js","../src/h.js","../src/util.js","../src/vdom/index.js","../src/extend.js","../src/dom/index.js","../src/vdom/diff.js","../src/proxy.js","../src/render.js","../src/define.js","../src/clone-element.js","../src/get-host.js","../src/class.js","../src/o.js","../src/omi.js","../src/options.js","../src/we-element.js","../node_modules/htm/dist/htm.mjs"],"names":["VNode","h","nodeName","attributes","lastSimple","child","simple","i","children","arguments","length","stack","push","pop","String","p","key","options","vnode","cssToDom","css","node","document","createElement","textContent","camelCase","str","replace","$","$1","toUpperCase","Fragment","props","extend","obj","applyRef","ref","value","current","isArray","Object","prototype","toString","call","getUse","data","paths","out","name","forEach","path","index","getTargetByPath","keys","tempPath","tempVal","args","apply","pathToArr","split","origin","arr","len","hyphenate","hyphenateRE","toLowerCase","getValByPath","prop","getPath","result","item","removeItem","splice","isSameNodeType","splitText","mapping","hydrating","_componentConstructor","isNamedNode","extend$1","handler","extension","get","e","type","eventProxy","el","_listeners","addEventListener","createNode","removeNode","setAccessor","component","old","isSvg","style","cssText","IS_NON_DIMENSIONAL","test","useCapture","substring","touchStart","touchEnd","eventProxy$1","removeEventListener","pureRemoveAttribute","removeAttribute","ns","removeAttributeNS","pureSetAttribute","setAttribute","className","this","___touchX","pageX","___touchY","touches","pageY","Math","___scrollTop","body","scrollTop","abs","changedTouches","dispatchEvent","CustomEvent","detail","isSvgMode","parent","ownerSVGElement","dom","querySelectorAll","styles","s","innerDiffNode","updateSelf","removeChild","firstChild","insertBefore","appendChild","ret","ele","idiff","one","recollectNodeTree","parentNode","nodeValue","createTextNode","replaceChild","vnodeName","__p","vchildren","fc","a","nextSibling","constructor","is","noSlot","dangerouslySetInnerHTML","diffAttributes","min","childrenLen","vlen","j","keyedLen","originalChildren","keyed","vchild","_child","_component","__key","trim","isHydrating","c","f","unmountOnly","ATTR_KEY","removeChildren","oldClone","assign","receiveProps","isWeElement","attrs","ccName","_ccName","_classCallCheck","instance","Constructor","TypeError","_possibleConstructorReturn","self","ReferenceError","render","store","JSONPatcherProxy","querySelector","observeStore","isMultiStore","diff","instances","updateSelfInstances","observe","patch","extendStoreUpate","getArrayPatch","JSONProxy","patchs","kv","v","update","k","_updatePath","needUpdate","use","using","_updateSelfPath","useSelf","usingSelf","onChange","diffResult","updatePath","keyA","keyB","includePath","pathA","pathB","indexOf","next","substr","fixPath","mpPath","fixArrPath","_classCallCheck$1","_possibleConstructorReturn$1","ctor","define","customElements","Ele","_WeElement","config","WeElement","propTypes","defaultProps","eleHooks","storeHelpers","func","pure","target","cloneElement","getHost","shadowRoot","host","rpx","b","window","innerWidth","arg","classNames","classes","argType","inner","join","_Array$prototype$slic","Array","slice","class","unshift","o","JSON","stringify","htm","t","r","n","root","global","Reflect","hasOwnProperty","BuiltInHTMLElement","HTMLElement","construct","setPrototypeOf","Promise","resolve","then","bind","setTimeout","diffLevel","_this","elementId","id","connectedCallback","storeName","_use","_updatePath2","_using","_storeName","attrsToProps","beforeInstall","install","afterInstall","attachShadow","mode","rendered","beforeRender","rootNode","_customStyleContent","_customStyleElement","installed","_isInstalled","disconnectedCallback","uninstall","ignoreAttrs","_willUpdate","beforeUpdate","__hasChildren","updated","_HTMLElement","val","normalizedNodeName","getAttribute","Number","Boolean","Omi","parse","fire","deepClone","escapePathComponent","pathComponents","parentAndPath","parenthoodMap","parentPath","newValueOriginalObject","revokableInstance","inherited","proxifiedObjectsMap","has","newValue","set","operation","destinationPropKey","op","oldValue","delete","disableTrapsForProxy","console","warn","reflectionResult","revokableProxyInstance","defaultCallback","resume","patches","userCallback","pause","isObserving","showDetachedWarning","cachedProxy","_this2","deleteProperty","deleteTrap","Proxy","revocable","revocableInstance","trapsInstance","traps","originalObject","_proxifyObjectTreeRecursively","proxifyObjectTree","isProxifyingTreeNow","proxifiedObject","targetObject","message","propKey","record","callback","generate","isRecording","revoke","disableTraps","u","Map","html","Component","defineElement","tag","elements","createRef","extractClass","unbind","omi","version","module","exports"],"mappings":"wBACO,SAASA,MCIT,QAASC,GAAEC,EAAUC,GAC1B,GACEC,GACAC,EACAC,EACAC,EAJEC,IAKJ,KAAKD,EAAIE,UAAUC,OAAQH,KAAM,GAC/BI,GAAMC,KAAKH,UAAUF,GAEnBJ,IAAqC,MAAvBA,EAAWK,WACtBG,GAAMD,QAAQC,GAAMC,KAAKT,EAAWK,gBAClCL,GAAWK,SAEpB,OAAOG,GAAMD,OACX,IAAKL,EAAQM,GAAME,YAAAA,KAAUR,EAAMQ,IACjC,IAAKN,EAAIF,EAAMK,OAAQH,KAAOI,GAAMC,KAAKP,EAAME,QAE1B,iBAAVF,KAAqBA,EAAQ,OAEnCC,EAA6B,kBAAbJ,MACN,MAATG,EAAeA,EAAQ,GACD,gBAAVA,GAAoBA,GAAQS,GAClB,gBAAVT,KAAoBC,GAAAA,IAGlCA,GAAUF,EACZI,EAASA,EAASE,OAAS,IAAML,EACJ,IAApBG,EAASE,OAClBF,GAAYH,GAEZG,EAASI,KAAKP,G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ual DOM Node */\nexport function VNode() {}\n","import { VNode } from './vnode'\nimport options from './options'\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 let p = new VNode()\n p.nodeName = nodeName\n p.children = children\n p.attributes = attributes == null ? undefined : attributes\n p.key = attributes == null ? undefined : attributes.key\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","/**\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\n\nexport function getUse(data, paths, out, name) {\n const obj = []\n paths.forEach((path, index) => {\n const isPath = typeof path === 'string'\n if (isPath) {\n obj[index] = getTargetByPath(data, path)\n } else {\n const key = Object.keys(path)[0]\n const value = path[key]\n if (typeof value === 'string') {\n obj[index] = getTargetByPath(data, value)\n } else {\n const tempPath = value[0]\n if (typeof tempPath === 'string') {\n const tempVal = getTargetByPath(data, tempPath)\n obj[index] = value[1] ? value[1](tempVal) : tempVal\n } else {\n const args = []\n tempPath.forEach(path =>{\n args.push(getTargetByPath(data, path))\n })\n obj[index] = value[1].apply(null, args)\n }\n }\n obj[key] = obj[index]\n }\n\t})\n\tif(out) out[name] = obj\n return obj\n}\n\nexport function pathToArr(path) {\n\tif(typeof path !== 'string' || !path) return []\n\t// return path.split(/\\.|\\[|\\]/).filter(name => !!name)\n\treturn path.replace(/]/g, '').replace(/\\[/g, '.').split('.')\n}\n\nexport function getTargetByPath(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 return current\n}\n\nconst hyphenateRE = /\\B([A-Z])/g\nexport function hyphenate(str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase()\n}\n\nexport function getValByPath(path, current) {\n\tconst arr = pathToArr(path)\n\tarr.forEach(prop => {\n\t\tcurrent = current[prop]\n\t})\n\treturn current\n}\n\nexport function getPath(obj, out, name) {\n\tconst result = {}\n\tobj.forEach(item => {\n\t\tif (typeof item === 'string') {\n\t\t\tresult[item] = true\n\t\t} else {\n\t\t\tconst tempPath = item[Object.keys(item)[0]]\n\t\t\tif (typeof tempPath === 'string') {\n\t\t\t\tresult[tempPath] = true\n\t\t\t} else {\n\t\t\t\tif (typeof tempPath[0] === 'string') {\n\t\t\t\t\tresult[tempPath[0]] = true\n\t\t\t\t} else {\n\t\t\t\t\ttempPath[0].forEach(path => (result[path] = true))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\tif(out) out[name] = result\n\treturn result\n}\n\nexport function removeItem(item, arr){\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}","import { extend } from '../util'\nimport options from '../options'\n/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hydrating=false]\tIf 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\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized 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\textension['o-' + name] = handler\n}\n\nexport function set(origin, path, value) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\t\tif (i === len - 1) {\n\t\t\t\t\tcurrent[arr[i]] = value\n\t\t\t} else {\n\t\t\t\t\tcurrent = current[arr[i]]\n\t\t\t}\n\t}\n}\n\nexport function get(origin, path) {\n\tconst arr = pathToArr(path)\n\tlet current = origin\n\tfor (let i = 0, len = arr.length; i < len; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\n\treturn current\n}\n\nfunction eventProxy(e) {\n return this._listeners[e.type](e)\n}\n\nexport function bind(el, type, handler){\n\tel._listeners = el._listeners || {}\n\tel._listeners[type] = handler\n\tel.addEventListener(type, eventProxy)\n}\n\nexport function unbind(el, type){\n\tel.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 let useCapture = name !== (name = name.replace(/Capture$/, ''))\n name = name.toLowerCase().substring(2)\n if (value) {\n if (!old) {\n node.addEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.addEventListener('touchstart', touchStart, useCapture)\n node.addEventListener('touchend', touchEnd, useCapture)\n }\n }\n } else {\n node.removeEventListener(name, eventProxy, useCapture)\n if (name == 'tap') {\n node.removeEventListener('touchstart', touchStart, useCapture)\n node.removeEventListener('touchend', touchEnd, useCapture)\n }\n }\n ;(node._listeners || (node._listeners = {}))[name] = value\n } else if (node.nodeName === 'INPUT' && name === 'value'){\n node[name] = value == null ? '' : value\n } else if (name !== 'list' && name !== 'type' && name !== 'css' && !isSvg && name in node && value !== '') { //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 ? node.pureRemoveAttribute(name) : 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 node.pureRemoveAttribute ? node.pureRemoveAttribute(name) : 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 ? node.pureSetAttribute(name, value) : 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 touchStart(e) {\n this.___touchX = e.touches[0].pageX\n this.___touchY = e.touches[0].pageY\n this.___scrollTop = document.body.scrollTop\n}\n\nfunction touchEnd(e) {\n if (\n Math.abs(e.changedTouches[0].pageX - this.___touchX) < 30 &&\n Math.abs(e.changedTouches[0].pageY - this.___touchY) < 30 &&\n Math.abs(document.body.scrollTop - this.___scrollTop) < 30\n ) {\n this.dispatchEvent(new CustomEvent('tap', { detail: e }))\n }\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 *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\n *\t@returns {Element} dom\t\t\tThe created/mutated element\n *\t@private\n */\nexport function diff(dom, vnode, parent, component, updateSelf) {\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.nodeName === Fragment){\n vnode = vnode.children\n }\n if (isArray(vnode)) {\n if (parent) {\n const styles = parent.querySelectorAll('style')\n styles.forEach(s => {\n parent.removeChild(s)\n })\n innerDiffNode(parent, vnode, hydrating, component, updateSelf)\n\n for (let i = styles.length - 1; i >= 0; i--) {\n parent.firstChild ? parent.insertBefore(styles[i], parent.firstChild) : parent.appendChild(style[i])\n }\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 *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\n *\t@param {Boolean} isHydrating\tIf `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 // 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 // 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 *\t@param {Node} node\t\t\t\t\t\tDOM node to start unmount/removal from\n *\t@param {Boolean} [unmountOnly=false]\tIf `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 *\t- we use .lastChild here because it causes less reflow than .firstChild\n *\t- 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 *\t@param {Element} dom\t\tElement with attributes to diff `attrs` against\n *\t@param {Object} attrs\t\tThe desired end-state key-value attribute pairs\n *\t@param {Object} old\t\t\tCurrent/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(dom, name, old[name], (old[name] = undefined), isSvgMode, component)\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(dom, name, old[name], (old[name] = attrs[name]), isSvgMode, component)\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 if (isWeElement) {\n let ccName = camelCase(name)\n dom.props[ccName] = old[ccName] = attrs[name]\n //update = true\n } else {\n old[name] = attrs[name]\n }\n }\n }\n\n if (isWeElement && !updateSelf && dom.parentNode) {\n //__hasChildren is not accuracy when it was empty at first, so add dom.children.length > 0 condition\n //if (update || dom.__hasChildren || dom.children.length > 0 || (dom.store && !dom.store.data)) {\n if (dom.receiveProps(dom.props, oldClone) !== false) {\n dom.update()\n }\n //}\n }\n}\n","/*!\n * https://github.com/Palindrom/JSONPatcherProxy\n * (c) 2017 Starcounter\n * MIT license\n */\n\n/** Class representing a JS Object observer */\nconst JSONPatcherProxy = (function() {\n /**\n * Deep clones your object and returns a new object.\n */\n function deepClone(obj) {\n switch (typeof obj) {\n case 'object':\n return JSON.parse(JSON.stringify(obj)) //Faster than ES5 clone - http://jsperf.com/deep-cloning-of-objects/5\n case 'undefined':\n return null //this is how JSON.stringify behaves for array items\n default:\n return obj //no need to clone primitives\n }\n }\n JSONPatcherProxy.deepClone = deepClone\n\n function escapePathComponent(str) {\n if (str.indexOf('/') == -1 && str.indexOf('~') == -1) return str\n return str.replace(/~/g, '~0').replace(/\\//g, '~1')\n }\n JSONPatcherProxy.escapePathComponent = escapePathComponent\n\n /**\n * Walk up the parenthood tree to get the path\n * @param {JSONPatcherProxy} instance\n * @param {Object} obj the object you need to find its path\n */\n function findObjectPath(instance, obj) {\n const pathComponents = []\n let parentAndPath = instance.parenthoodMap.get(obj)\n while (parentAndPath && parentAndPath.path) {\n // because we're walking up-tree, we need to use the array as a stack\n pathComponents.unshift(parentAndPath.path)\n parentAndPath = instance.parenthoodMap.get(parentAndPath.parent)\n }\n if (pathComponents.length) {\n const path = pathComponents.join('/')\n return '/' + path\n }\n return ''\n }\n /**\n * A callback to be used as th proxy set trap callback.\n * It updates parenthood map if needed, proxifies nested newly-added objects, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the affected object\n * @param {String} key the effect property's name\n * @param {Any} newValue the value being set\n */\n function setTrap(instance, target, key, newValue) {\n const parentPath = findObjectPath(instance, target)\n\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n if (instance.proxifiedObjectsMap.has(newValue)) {\n const newValueOriginalObject = instance.proxifiedObjectsMap.get(newValue)\n\n instance.parenthoodMap.set(newValueOriginalObject.originalObject, {\n parent: target,\n path: key\n })\n }\n /*\n mark already proxified values as inherited.\n rationale: proxy.arr.shift()\n will emit\n {op: replace, path: '/arr/1', value: arr_2}\n {op: remove, path: '/arr/2'}\n\n by default, the second operation would revoke the proxy, and this renders arr revoked.\n That's why we need to remember the proxies that are inherited.\n */\n const revokableInstance = instance.proxifiedObjectsMap.get(newValue)\n /*\n Why do we need to check instance.isProxifyingTreeNow?\n\n We need to make sure we mark revokables as inherited ONLY when we're observing,\n because throughout the first proxification, a sub-object is proxified and then assigned to\n its parent object. This assignment of a pre-proxified object can fool us into thinking\n that it's a proxified object moved around, while in fact it's the first assignment ever.\n\n Checking isProxifyingTreeNow ensures this is not happening in the first proxification,\n but in fact is is a proxified object moved around the tree\n */\n if (revokableInstance && !instance.isProxifyingTreeNow) {\n revokableInstance.inherited = true\n }\n\n // if the new value is an object, make sure to watch it\n if (\n newValue &&\n typeof newValue == 'object' &&\n !instance.proxifiedObjectsMap.has(newValue)\n ) {\n instance.parenthoodMap.set(newValue, {\n parent: target,\n path: key\n })\n newValue = instance._proxifyObjectTreeRecursively(target, newValue, key)\n }\n // let's start with this operation, and may or may not update it later\n const operation = {\n op: 'remove',\n path: destinationPropKey\n }\n if (typeof newValue == 'undefined') {\n // applying De Morgan's laws would be a tad faster, but less readable\n if (!Array.isArray(target) && !target.hasOwnProperty(key)) {\n // `undefined` is being set to an already undefined value, keep silent\n return Reflect.set(target, key, newValue)\n }\n // when array element is set to `undefined`, should generate replace to `null`\n if (Array.isArray(target)) {\n // undefined array elements are JSON.stringified to `null`\n ;(operation.op = 'replace'), (operation.value = null)\n }\n const oldValue = instance.proxifiedObjectsMap.get(target[key])\n // was the deleted a proxified object?\n if (oldValue) {\n instance.parenthoodMap.delete(target[key])\n instance.disableTrapsForProxy(oldValue)\n instance.proxifiedObjectsMap.delete(oldValue)\n }\n } else {\n if (Array.isArray(target) && !Number.isInteger(+key.toString())) {\n /* array props (as opposed to indices) don't emit any patches, to avoid needless `length` patches */\n if (key != 'length') {\n console.warn(\n 'JSONPatcherProxy noticed a non-integer prop was set for an array. This will not emit a patch'\n )\n }\n return Reflect.set(target, key, newValue)\n }\n operation.op = 'add'\n if (target.hasOwnProperty(key)) {\n if (typeof target[key] !== 'undefined' || Array.isArray(target)) {\n operation.op = 'replace' // setting `undefined` array elements is a `replace` op\n }\n }\n operation.value = newValue\n }\n operation.oldValue = target[key]\n const reflectionResult = Reflect.set(target, key, newValue)\n instance.defaultCallback(operation)\n return reflectionResult\n }\n /**\n * A callback to be used as th proxy delete trap callback.\n * It updates parenthood map if needed, calls default callbacks with the changes occurred.\n * @param {JSONPatcherProxy} instance JSONPatcherProxy instance\n * @param {Object} target the effected object\n * @param {String} key the effected property's name\n */\n function deleteTrap(instance, target, key) {\n if (typeof target[key] !== 'undefined') {\n const parentPath = findObjectPath(instance, target)\n const destinationPropKey = parentPath + '/' + escapePathComponent(key)\n\n const revokableProxyInstance = instance.proxifiedObjectsMap.get(\n target[key]\n )\n\n if (revokableProxyInstance) {\n if (revokableProxyInstance.inherited) {\n /*\n this is an inherited proxy (an already proxified object that was moved around),\n we shouldn't revoke it, because even though it was removed from path1, it is still used in path2.\n And we know that because we mark moved proxies with `inherited` flag when we move them\n\n it is a good idea to remove this flag if we come across it here, in deleteProperty trap.\n We DO want to revoke the proxy if it was removed again.\n */\n revokableProxyInstance.inherited = false\n } else {\n instance.parenthoodMap.delete(revokableProxyInstance.originalObject)\n instance.disableTrapsForProxy(revokableProxyInstance)\n instance.proxifiedObjectsMap.delete(target[key])\n }\n }\n const reflectionResult = Reflect.deleteProperty(target, key)\n\n instance.defaultCallback({\n op: 'remove',\n path: destinationPropKey\n })\n\n return reflectionResult\n }\n }\n /* pre-define resume and pause functions to enhance constructors performance */\n function resume() {\n this.defaultCallback = operation => {\n this.isRecording && this.patches.push(operation)\n this.userCallback && this.userCallback(operation)\n }\n this.isObserving = true\n }\n function pause() {\n this.defaultCallback = () => {}\n this.isObserving = false\n }\n /**\n * Creates an instance of JSONPatcherProxy around your object of interest `root`.\n * @param {Object|Array} root - the object you want to wrap\n * @param {Boolean} [showDetachedWarning = true] - whether to log a warning when a detached sub-object is modified @see {@link https://github.com/Palindrom/JSONPatcherProxy#detached-objects}\n * @returns {JSONPatcherProxy}\n * @constructor\n */\n function JSONPatcherProxy(root, showDetachedWarning) {\n this.isProxifyingTreeNow = false\n this.isObserving = false\n this.proxifiedObjectsMap = new Map()\n this.parenthoodMap = new Map()\n // default to true\n if (typeof showDetachedWarning !== 'boolean') {\n showDetachedWarning = true\n }\n\n this.showDetachedWarning = showDetachedWarning\n this.originalObject = root\n this.cachedProxy = null\n this.isRecording = false\n this.userCallback\n /**\n * @memberof JSONPatcherProxy\n * Restores callback back to the original one provided to `observe`.\n */\n this.resume = resume.bind(this)\n /**\n * @memberof JSONPatcherProxy\n * Replaces your callback with a noop function.\n */\n this.pause = pause.bind(this)\n }\n\n JSONPatcherProxy.prototype.generateProxyAtPath = function(parent, obj, path) {\n if (!obj) {\n return obj\n }\n const traps = {\n set: (target, key, value, receiver) =>\n setTrap(this, target, key, value, receiver),\n deleteProperty: (target, key) => deleteTrap(this, target, key)\n }\n const revocableInstance = Proxy.revocable(obj, traps)\n // cache traps object to disable them later.\n revocableInstance.trapsInstance = traps\n revocableInstance.originalObject = obj\n\n /* keeping track of object's parent and path */\n\n this.parenthoodMap.set(obj, { parent, path })\n\n /* keeping track of all the proxies to be able to revoke them later */\n this.proxifiedObjectsMap.set(revocableInstance.proxy, revocableInstance)\n return revocableInstance.proxy\n }\n // grab tree's leaves one by one, encapsulate them into a proxy and return\n JSONPatcherProxy.prototype._proxifyObjectTreeRecursively = function(\n parent,\n root,\n path\n ) {\n for (let key in root) {\n if (root.hasOwnProperty(key)) {\n if (root[key] instanceof Object) {\n root[key] = this._proxifyObjectTreeRecursively(\n root,\n root[key],\n escapePathComponent(key)\n )\n }\n }\n }\n return this.generateProxyAtPath(parent, root, path)\n }\n // this function is for aesthetic purposes\n JSONPatcherProxy.prototype.proxifyObjectTree = function(root) {\n /*\n while proxyifying object tree,\n the proxyifying operation itself is being\n recorded, which in an unwanted behavior,\n that's why we disable recording through this\n initial process;\n */\n this.pause()\n this.isProxifyingTreeNow = true\n const proxifiedObject = this._proxifyObjectTreeRecursively(\n undefined,\n root,\n ''\n )\n /* OK you can record now */\n this.isProxifyingTreeNow = false\n this.resume()\n return proxifiedObject\n }\n /**\n * Turns a proxified object into a forward-proxy object; doesn't emit any patches anymore, like a normal object\n * @param {Proxy} proxy - The target proxy object\n */\n JSONPatcherProxy.prototype.disableTrapsForProxy = function(\n revokableProxyInstance\n ) {\n if (this.showDetachedWarning) {\n const message =\n \"You're accessing an object that is detached from the observedObject tree, see https://github.com/Palindrom/JSONPatcherProxy#detached-objects\"\n\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.set = (\n targetObject,\n propKey,\n newValue\n ) => {\n console.warn(message)\n return Reflect.set(targetObject, propKey, newValue)\n }\n revokableProxyInstance.trapsInstance.deleteProperty = (\n targetObject,\n propKey\n ) => {\n return Reflect.deleteProperty(targetObject, propKey)\n }\n } else {\n delete revokableProxyInstance.trapsInstance.set\n delete revokableProxyInstance.trapsInstance.get\n delete revokableProxyInstance.trapsInstance.deleteProperty\n }\n }\n /**\n * Proxifies the object that was passed in the constructor and returns a proxified mirror of it. Even though both parameters are options. You need to pass at least one of them.\n * @param {Boolean} [record] - whether to record object changes to a later-retrievable patches array.\n * @param {Function} [callback] - this will be synchronously called with every object change with a single `patch` as the only parameter.\n */\n JSONPatcherProxy.prototype.observe = function(record, callback) {\n if (!record && !callback) {\n throw new Error('You need to either record changes or pass a callback')\n }\n this.isRecording = record\n this.userCallback = callback\n /*\n I moved it here to remove it from `unobserve`,\n this will also make the constructor faster, why initiate\n the array before they decide to actually observe with recording?\n They might need to use only a callback.\n */\n if (record) this.patches = []\n this.cachedProxy = this.proxifyObjectTree(this.originalObject)\n return this.cachedProxy\n }\n /**\n * If the observed is set to record, it will synchronously return all the patches and empties patches array.\n */\n JSONPatcherProxy.prototype.generate = function() {\n if (!this.isRecording) {\n throw new Error('You should set record to true to get patches later')\n }\n return this.patches.splice(0, this.patches.length)\n }\n /**\n * Revokes all proxies rendering the observed object useless and good for garbage collection @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/revocable}\n */\n JSONPatcherProxy.prototype.revoke = function() {\n this.proxifiedObjectsMap.forEach(el => {\n el.revoke()\n })\n }\n /**\n * Disables all proxies' traps, turning the observed object into a forward-proxy object, like a normal object that you can modify silently.\n */\n JSONPatcherProxy.prototype.disableTraps = function() {\n this.proxifiedObjectsMap.forEach(this.disableTrapsForProxy, this)\n }\n return JSONPatcherProxy\n})()\n\nexport default JSONPatcherProxy\n","import { diff } from './vdom/diff'\nimport JSONProxy from './proxy'\nimport { getUse } from './util'\nimport options from './options'\n\nexport function render(vnode, parent, store) {\n\tparent = typeof parent === 'string' ? document.querySelector(parent) : parent\n\tif (store) {\n\t\tif (store.data) {\n\t\t\tobserveStore(store)\n\t\t} else {\n\t\t\toptions.isMultiStore = true\n\t\t\t//Multi-store injection\n\t\t\tfor (let key in store) {\n\t\t\t\tobserveStore(store[key], key)\n\t\t\t}\n\t\t}\n\t\tparent.store = store\n\t}\n\treturn diff(null, vnode, parent, false)\n}\n\nfunction observeStore(store, key) {\n\tstore.instances = []\n\tstore.updateSelfInstances = []\n\textendStoreUpate(store, key)\n\n\tstore.data = new JSONProxy(store.data).observe(false, function (patch) {\n\t\tconst patchs = {}\n\t\tif (patch.op === 'remove') {\n\t\t\t// fix arr splice\n\t\t\tconst kv = getArrayPatch(patch.path, store)\n\t\t\tpatchs[kv.k] = kv.v\n\n\t\t\tupdate(patchs, store)\n\n\t\t} else {\n\t\t\tconst key = fixPath(patch.path)\n\t\t\tpatchs[key] = patch.value\n\n\t\t\tupdate(patchs, store)\n\n\t\t}\n\t})\n}\n\nfunction update(patch, store) {\n\tstore.update(patch)\n}\n\nfunction extendStoreUpate(store, key) {\n\tstore.update = function (patch) {\n\t\tif (Object.keys(patch).length > 0) {\n\t\t\tthis.instances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && instance._updatePath[key] && needUpdate(patch, instance._updatePath[key]))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.use === 'function' ? instance.use() : instance.use)[key], instance.using, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updatePath && needUpdate(patch, instance._updatePath))) {\n\t\t\t\t\t\tif (instance.use) {\n\t\t\t\t\t\t\tinstance.using = getUse(store.data, typeof instance.use === 'function' ? instance.use() : instance.use)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.update()\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t})\n\n\t\t\tthis.updateSelfInstances.forEach(instance => {\n\t\t\t\tif (key) {\n\t\t\t\t\tif ((\n\t\t\t\t\t\t\tinstance._updateSelfPath && instance._updateSelfPath[key] && needUpdate(patch, instance._updateSelfPath[key]))) {\n\t\t\t\t\t\tif (instance.useSelf) {\n\t\t\t\t\t\t\tgetUse(store.data, (typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)[key], instance.usingSelf, key)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (instance._updateSelfPath && needUpdate(patch, instance._updateSelfPath)) {\n\t\t\t\t\t\tinstance.usingSelf = getUse(store.data, typeof instance.useSelf === 'function' ? instance.useSelf() : instance.useSelf)\n\t\t\t\t\t\tinstance.updateSelf()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\tthis.onChange && this.onChange(patch)\n\t\t}\n\t}\n}\n\n\nexport function needUpdate(diffResult, updatePath) {\n\tfor (let keyA in diffResult) {\n\t\tif (updatePath[keyA]) {\n\t\t\treturn true\n\t\t}\n\t\tfor (let keyB in updatePath) {\n\t\t\tif (includePath(keyA, keyB)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\treturn false\n}\n\nfunction includePath(pathA, pathB) {\n\tif (pathA.indexOf(pathB) === 0) {\n\t\tconst next = pathA.substr(pathB.length, 1)\n\t\tif (next === '[' || next === '.') {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nexport function fixPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tarr.forEach((item, index) => {\n\t\tif (index) {\n\t\t\tif (isNaN(Number(item))) {\n\t\t\t\tmpPath += '.' + item\n\t\t\t} else {\n\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t}\n\t\t} else {\n\t\t\tmpPath += item\n\t\t}\n\t})\n\treturn mpPath\n}\n\nfunction getArrayPatch(path, store) {\n\tconst arr = path.replace('/', '').split('/')\n\tlet current = store.data[arr[0]]\n\tfor (let i = 1, len = arr.length; i < len - 1; i++) {\n\t\tcurrent = current[arr[i]]\n\t}\n\treturn {\n\t\tk: fixArrPath(path),\n\t\tv: current\n\t}\n}\n\nfunction fixArrPath(path) {\n\tlet mpPath = ''\n\tconst arr = path.replace('/', '').split('/')\n\tconst len = arr.length\n\tarr.forEach((item, index) => {\n\t\tif (index < len - 1) {\n\t\t\tif (index) {\n\t\t\t\tif (isNaN(Number(item))) {\n\t\t\t\t\tmpPath += '.' + item\n\t\t\t\t} else {\n\t\t\t\t\tmpPath += '[' + item + ']'\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmpPath += item\n\t\t\t}\n\t\t}\n\t})\n\treturn mpPath\n}\n","import WeElement from './we-element'\nimport options from './options'\n\nexport function define(name, ctor, config) {\n if (options.mapping[name]) {\n return\n }\n if (ctor.is === 'WeElement') {\n customElements.define(name, ctor)\n options.mapping[name] = ctor\n\n } else {\n \n if (typeof config === 'string') {\n config = { css: config }\n } else {\n config = config || { }\n }\n\n class Ele extends WeElement {\n\n static css = config.css\n\n static propTypes = config.propTypes\n\n static defaultProps = config.defaultProps\n\n render() {\n return ctor.call(this, this)\n }\n\n receiveProps() {\n if (config.receiveProps) {\n return config.receiveProps.apply(this, arguments)\n }\n }\n }\n\n const eleHooks = ['install', 'installed', 'uninstall', 'beforeUpdate', 'updated', 'beforeRender', 'rendered'],\n storeHelpers = ['use', 'useSelf']\n\n eleHooks.forEach(hook => {\n if (config[hook]) {\n Ele.prototype[hook] = function () {\n config[hook].apply(this, arguments)\n }\n }\n })\n\n storeHelpers.forEach(func => {\n if (config[func]) {\n Ele.prototype[func] = function () {\n return typeof config[func] === 'function'\n ? config[func].apply(this, arguments)\n : config[func]\n }\n }\n })\n\n customElements.define(name, Ele)\n options.mapping[name] = Ele\n }\n}\n\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\t\tThe virtual DOM element to clone\n * @param {Object} props\tAttributes/props to add when cloning\n * @param {VNode} rest\t\tAny 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","export function o(obj){\n return JSON.stringify(obj)\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 htm from 'htm'\nimport { extend, get, set, bind, unbind } from './extend'\nimport JSONProxy from './proxy'\nimport { Fragment } from './util'\n\nh.f = Fragment\n\nconst html = htm.bind(h)\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 html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n JSONProxy\n}\n\noptions.root.Omi = omi\noptions.root.omi = omi\noptions.root.Omi.version = '6.15.5'\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 html,\n htm,\n o,\n\telements,\n\t$,\n\textend,\n\tget,\n\tset,\n\tbind,\n\tunbind,\n JSONProxy\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 *\t@public\n *\t@namespace options {Object}\n */\nexport default {\n store: null,\n root: getGlobal(),\n\tmapping: {},\n\tisMultiStore: false\n}\n","import {\n\tcssToDom,\n\tisArray,\n\tgetUse,\n\thyphenate,\n\tgetValByPath,\n\tremoveItem\n} from './util'\nimport { diff } from './vdom/diff'\nimport options from './options'\nimport { getPath } from './util'\n\nlet id = 0\n\nexport default class WeElement extends HTMLElement {\n\tstatic is = 'WeElement'\n\n\tconstructor() {\n\t\tsuper()\n\t\tthis.props = Object.assign({},\n\t\t\tthis.constructor.defaultProps\n\t\t)\n\t\tthis.elementId = id++\n\t}\n\n\tconnectedCallback() {\n\t\tlet p = this.parentNode\n\t\twhile (p && !this.store) {\n\t\t\tthis.store = p.store\n\t\t\tp = p.parentNode || p.host\n\t\t}\n\n\t\tif (this.use) {\n\t\t\tlet use\n\t\t\tif (typeof this.use === 'function') {\n\t\t\t\tuse = this.use()\n\t\t\t} else {\n\t\t\t\tuse = this.use\n\t\t\t}\n\n\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\t_updatePath[storeName] = {}\n\t\t\t\t\tusing[storeName] = {}\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].instances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.using = using\n\t\t\t\tthis._updatePath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updatePath = getPath(use)\n\t\t\t\tthis.using = getUse(this.store.data, use)\n\t\t\t\tthis.store.instances.push(this)\n\t\t\t}\n\t\t}\n\t\tif (this.useSelf) {\n\t\t\tconst use = typeof this.useSelf === 'function' ? this.useSelf() : this.useSelf\n\t\t\tif (options.isMultiStore) {\n\t\t\t\tlet _updatePath = {}\n\t\t\t\tlet using = {}\n\t\t\t\tfor (let storeName in use) {\n\t\t\t\t\tgetPath(use[storeName], _updatePath, storeName)\n\t\t\t\t\tgetUse(this.store[storeName].data, use[storeName], using, storeName)\n\t\t\t\t\tthis.store[storeName].updateSelfInstances.push(this)\n\t\t\t\t}\n\t\t\t\tthis.usingSelf = using\n\t\t\t\tthis._updateSelfPath = _updatePath\n\t\t\t} else {\n\t\t\t\tthis._updateSelfPath = getPath(use)\n\t\t\t\tthis.usingSelf = getUse(this.store.data, use)\n\t\t\t\tthis.store.updateSelfInstances.push(this)\n\t\t\t}\n\t\t}\n\t\tthis.attrsToProps()\n\t\tthis.beforeInstall()\n\t\tthis.install()\n\t\tthis.afterInstall()\n\n\t\tlet shadowRoot\n\t\tif (!this.shadowRoot) {\n\t\t\tshadowRoot = this.attachShadow({\n\t\t\t\tmode: 'open'\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot = this.shadowRoot\n\t\t\tlet fc\n\t\t\twhile ((fc = shadowRoot.firstChild)) {\n\t\t\t\tshadowRoot.removeChild(fc)\n\t\t\t}\n\t\t}\n\n\t\tif (this.constructor.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(this.constructor.css))\n\t\t} else if (this.css) {\n\t\t\tshadowRoot.appendChild(cssToDom(typeof this.css === 'function' ? this.css() : this.css))\n\t\t}\n\t\tthis.beforeRender()\n\t\toptions.afterInstall && options.afterInstall(this)\n\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.__hasChildren = Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0\n\n\t\tthis.rootNode = diff(\n\t\t\tnull,\n\t\t\trendered,\n\t\t\tnull,\n\t\t\tthis\n\t\t)\n\t\tthis.rendered()\n\n\t\tif (this.props.css) {\n\t\t\tthis._customStyleElement = cssToDom(this.props.css)\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tshadowRoot.appendChild(this._customStyleElement)\n\t\t}\n\n\t\tif (isArray(this.rootNode)) {\n\t\t\tthis.rootNode.forEach(function (item) {\n\t\t\t\tshadowRoot.appendChild(item)\n\t\t\t})\n\t\t} else {\n\t\t\tshadowRoot.appendChild(this.rootNode)\n\t\t}\n\t\tthis.installed()\n\t\tthis._isInstalled = true\n\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.uninstall()\n\t\tthis._isInstalled = false\n\t\tif (this.store) {\n\t\t\tif(options.isMultiStore){\n\t\t\t\tfor(let key in this.store){\n\t\t\t\t\tconst current = this.store[key]\n\t\t\t\t\tremoveItem(this, current.instances)\n\t\t\t\t removeItem(this, current.updateSelfInstances)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tremoveItem(this, this.store.instances)\n\t\t\t\tremoveItem(this, this.store.updateSelfInstances)\n\t\t\t}\n\t\t}\n\t}\n\n\tupdate(ignoreAttrs, updateSelf) {\n\t\tthis._willUpdate = true\n\t\tthis.beforeUpdate()\n\t\tthis.beforeRender()\n\t\t//fix null !== undefined\n\t\tif (this._customStyleContent != this.props.css) {\n\t\t\tthis._customStyleContent = this.props.css\n\t\t\tthis._customStyleElement.textContent = this._customStyleContent\n\t\t}\n\t\tthis.attrsToProps(ignoreAttrs)\n\n\t\tconst rendered = this.render(this.props, this.store)\n\t\tthis.rendered()\n\t\tthis.__hasChildren = this.__hasChildren || (Object.prototype.toString.call(rendered) === '[object Array]' && rendered.length > 0)\n\n\t\tthis.rootNode = diff(\n\t\t\tthis.rootNode,\n\t\t\trendered,\n\t\t\tthis.shadowRoot,\n\t\t\tthis,\n\t\t\tupdateSelf\n\t\t)\n\t\tthis._willUpdate = false\n\t\tthis.updated()\n\n\t}\n\n\tupdateSelf(ignoreAttrs) {\n\t\tthis.update(ignoreAttrs, true)\n\t}\n\n\tremoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t\t//Avoid executing removeAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tsetAttribute(key, val) {\n\t\tif (val && typeof val === 'object') {\n\t\t\tsuper.setAttribute(key, JSON.stringify(val))\n\t\t} else {\n\t\t\tsuper.setAttribute(key, val)\n\t\t}\n\t\t//Avoid executing setAttribute methods before connectedCallback\n\t\tthis._isInstalled && this.update()\n\t}\n\n\tpureRemoveAttribute(key) {\n\t\tsuper.removeAttribute(key)\n\t}\n\n\tpureSetAttribute(key, val) {\n\t\tsuper.setAttribute(key, val)\n\t}\n\n\tattrsToProps(ignoreAttrs) {\n\t\tconst ele = this\n\t\tif (ele.normalizedNodeName || ignoreAttrs) return\n\t\tele.props['css'] = ele.getAttribute('css')\n\t\tconst attrs = this.constructor.propTypes\n\t\tif (!attrs) return\n\t\tObject.keys(attrs).forEach(key => {\n\t\t\tconst type = attrs[key]\n\t\t\tconst val = ele.getAttribute(hyphenate(key))\n\t\t\tif (val !== null) {\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase String:\n\t\t\t\t\t\tele.props[key] = val\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Number:\n\t\t\t\t\t\tele.props[key] = Number(val)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Boolean:\n\t\t\t\t\t\tif (val === 'false' || val === '0') {\n\t\t\t\t\t\t\tele.props[key] = false\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = true\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase Array:\n\t\t\t\t\tcase Object:\n\t\t\t\t\t\tif (val[0] === ':') {\n\t\t\t\t\t\t\tele.props[key] = getValByPath(val.substr(1), Omi.$)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tele.props[key] = JSON.parse(val\n\t\t\t\t\t\t\t\t.replace(/(['\"])?([a-zA-Z0-9_-]+)(['\"])?:([^\\/])/g, '\"$2\":$4')\n\t\t\t\t\t\t\t\t.replace(/'([\\s\\S]*?)'/g, '\"$1\"')\n\t\t\t\t\t\t\t\t.replace(/,(\\s*})/g, '$1')\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (ele.constructor.defaultProps && ele.constructor.defaultProps.hasOwnProperty(key)) {\n\t\t\t\t\tele.props[key] = ele.constructor.defaultProps[key]\n\t\t\t\t} else {\n\t\t\t\t\tele.props[key] = null\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tfire(name, data) {\n\t\tthis.dispatchEvent(new CustomEvent(name, {\n\t\t\tdetail: data\n\t\t}))\n\t}\n\n\tbeforeInstall() {}\n\n\tinstall() {}\n\n\tafterInstall() {}\n\n\tinstalled() {}\n\n\tuninstall() {}\n\n\tbeforeUpdate() {}\n\n\tupdated() {}\n\n\tbeforeRender() {}\n\n\trendered() {}\n\n\treceiveProps() {}\n\n}\n","var n=function(t,r,u,e){for(var p=1;p\"===t?(a(),u=1):u&&(\"=\"===t?(u=4,r=e,e=\"\"):\"/\"===t?(a(),3===u&&(s=s[0]),u=s,(s=s[0]).push(u,4),u=0):\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t?(a(),u=2):e+=t)}return a(),s},r=\"function\"==typeof Map,u=r?new Map:{},e=r?function(n){var r=u.get(n);return r||u.set(n,r=t(n)),r}:function(n){for(var r=\"\",e=0;e1?r:r[0]}\n"]} \ No newline at end of file diff --git a/packages/omi/package.json b/packages/omi/package.json index 0bfc987088..3bac81215a 100644 --- a/packages/omi/package.json +++ b/packages/omi/package.json @@ -1,6 +1,6 @@ { "name": "omi", - "version": "6.15.4", + "version": "6.15.5", "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 4576d51fa1..df2e3bf50b 100644 --- a/packages/omi/src/omi.js +++ b/packages/omi/src/omi.js @@ -58,7 +58,7 @@ const omi = { options.root.Omi = omi options.root.omi = omi -options.root.Omi.version = '6.15.4' +options.root.Omi.version = '6.15.5' export default omi