antos-frontend/src/libs/riot.compiler.min.js

3 lines
35 KiB
JavaScript
Raw Normal View History

2018-01-31 15:41:32 +01:00
/* Riot v3.8.1, @license MIT */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.riot=t()}(this,function(){"use strict";function e(e,t){return[].slice.call((t||document).querySelectorAll(e))}function t(e,t){return(t||document).querySelector(e)}function n(){return document.createDocumentFragment()}function r(){return document.createTextNode("")}function i(e){var t=e.ownerSVGElement;return!!t||null===t}function o(e){return"svg"===e?document.createElementNS(Ke,e):document.createElement(e)}function s(e,t,n){if(n){var r=e.ownerDocument.importNode((new DOMParser).parseFromString('<svg xmlns="'+Ke+'">'+t+"</svg>","application/xml").documentElement,!0);e.appendChild(r)}else e.innerHTML=t}function a(e,t){e.style.display=t?"":"none",e.hidden=!t}function u(e,t){e.removeAttribute(t)}function c(e){return Object.keys(e).reduce(function(t,n){return t+" "+n+": "+e[n]+";"},"")}function l(e,t){return e.getAttribute(t)}function f(e,t,n){var r=We.exec(t);r&&r[1]?e.setAttributeNS(Ge,r[1],n):e.setAttribute(t,n)}function p(e,t,n){e.insertBefore(t,n.parentNode&&n)}function d(e,t){if(e)for(var n;n=Xe.exec(e);)t(n[1].toLowerCase(),n[2]||n[3]||n[4])}function h(e,t,n){if(e){var r,i=t(e,n);if(!1===i)return;for(e=e.firstChild;e;)r=e.nextSibling,h(e,t,i),e=r}}function g(e){return et.test(e)}function m(e){return typeof e===Ze}function v(e){return e&&typeof e===qe}function x(e){return typeof e===De}function y(e){return typeof e===Be}function b(e){return _(e)||""===e}function _(e){return x(e)||null===e}function w(e){return Array.isArray(e)||e instanceof Array}function O(e,t){var n=gt(e,t);return x(e[t])||n&&n.writable}function j(e,t){for(var n=e?e.length:0,r=0;r<n;r++)t(e[r],r);return e}function E(e,t){return-1!==e.indexOf(t)}function N(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function C(e,t){return e.slice(0,t.length)===t}function S(e,t,n,r){return Object.defineProperty(e,t,T({value:n,enumerable:!1,writable:!1,configurable:!0},r)),e}function A(e){console&&console.warn&&console.warn(e)}function T(e){for(var t,n=1,r=arguments,i=r.length;n<i;n++)if(t=r[n])for(var o in t)O(e,o)&&(e[o]=t[o]);return e}function k(e,t,n,r){var i,o=function(e,t,n){var r=this.__.parent,i=this.__.item;if(!i)for(;r&&!i;)i=r.__.item,r=r.__.parent;if(O(n,"currentTarget")&&(n.currentTarget=e),O(n,"target")&&(n.target=n.srcElement),O(n,"which")&&(n.which=n.charCode||n.keyCode),n.item=i,t.call(this,n),vt.autoUpdate&&!n.preventUpdate){var o=Y(this);o.isMounted&&o.update()}}.bind(r,n,t);n[e]=null,i=e.replace(Qe,""),E(r.__.listeners,n)||r.__.listeners.push(n),n[Ve]||(n[Ve]={}),n[Ve][e]&&n.removeEventListener(i,n[Ve][e]),n[Ve][e]=o,n.addEventListener(i,o,!1)}function L(e){if(!this.root||!l(this.root,"virtualized")){var t,n=e.dom,i=function(e){return e?(e=e.replace(Ie,""),Ye[e]&&(e=Ye[e]),e):null}(e.attr),o=E([ze,He],i),s=e.root&&"VIRTUAL"===e.root.tagName,p=this.__.isAnonymous,d=n&&(e.parent||n.parentNode),h="style"===i,g="class"===i;if(e._riot_id)e.__.wasCreated?e.update():(e.mount(),s&&oe(e,e.root));else{if(e.update)return e.update();var x=o&&!p?ae.call(this):this,_=!b(t=ft(e.expr,x)),w=v(t);if(w&&(g?t=ft(JSON.stringify(t),this):h&&(t=c(t))),!e.attr||e.wasParsedOnce&&_&&!1!==t||u(n,l(n,e.attr)?e.attr:i),e.bool&&(t=!!t&&i),e.isRtag)return function(e,t,n){var i,o=e.tag||e.dom._tag,s=(o?o.__:{}).head,a="VIRTUAL"===e.dom.tagName;o&&e.tagName===n?o.update():(o&&(a&&(i=r(),s.parentNode.insertBefore(i,s)),o.unmount(!0)),y(n)&&(e.impl=Te[n],e.impl&&(e.tag=o=X(e.impl,{root:e.dom,parent:t,tagName:n},e.dom.innerHTML,t),j(e.attrs,function(e){return f(o.root,e.name,e.value)}),e.tagName=n,o.mount(),a&&oe(o,i||o.root),t.__.onUnmount=function(){var e=o.opts.dataIs;re(o.parent.tags,e,o),re(o.__.parent.tags,e,o),o.unmount()})))}(e,this,t);if((!e.wasParsedOnce||e.value!==t)&&(e.value=t,e.wasParsedOnce=!0,!w||g||h||o)){if(_||(t=""),!i)return t+="",void(d&&(e.parent=d,"TEXTAREA"===d.tagName?(d.value=t,tt||(n.nodeValue=t)):n.nodeValue=t));m(t)?k(i,t,n,this):o?a(n,i===He?!t:t):(e.bool&&(n[i]=t),"value"===i&&n.value!==t?n.value=t