From 011ff91eada201e4302d7c16c13dac9a29cefa93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Ottaviani=20Arag=C3=A3o?= Date: Sun, 9 Sep 2018 16:07:06 -0300 Subject: [PATCH] [Fix] - Specifying title and meta tags to avoid conflicts with another tags in the page --- spa/dist/index.js | 2 +- spa/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spa/dist/index.js b/spa/dist/index.js index a9cbd20..af05f69 100644 --- a/spa/dist/index.js +++ b/spa/dist/index.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("spa",[],t):"object"==typeof exports?exports.spa=t():e.spa=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),a=r(i),u=n(3),c=r(u),l=(0,a.default)({js:"//cdn.jsdelivr.net/npm/pjax@0.2.6/pjax.min.js"});t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=location.href,r=document.querySelector("[data-outlet]"),i=o({},n,{outlet:r}),u=n,f=function(){var n=Object.assign({},e,s);t.pjax=new Pjax(n),t.events.on(document,"pjax:send",function(e){u=e.triggerElement?e.triggerElement.href:location.href})},s={selectors:["title","meta","[data-stylesheet]","[data-script]","[data-outlet]"],switches:{"[data-outlet]":function(t,n,r){var o=this;u in i?e.transition?e.transition(t,function(){t.parentNode.replaceChild(i[u].outlet,t),o.onSwitch()}):(t.parentNode.replaceChild(i[u].outlet,t),this.onSwitch()):(i[u]={outlet:n},e.transition?e.transition(t,function(){t.parentNode.replaceChild(n,t),o.onSwitch()}):(t.parentNode.replaceChild(n,t),this.onSwitch()))},"[data-script]":function(e,n){var r=this;(0,a.default)({js:n.src}).then(function(n){var o=n.js;o.setAttribute("data-script",!0),e.parentNode.replaceChild(o,e),t.extends((0,c.default)()).start(),r.onSwitch()})},"[data-stylesheet]":function(e,t){var n=this;t.onload=function(){e.parentNode.removeChild(e),n.onSwitch()},e.parentNode.appendChild(t)}}};l.then(f).catch(function(e){console.error("Jails.pjax.error",e)})}}},function(e,t,n){var r,o,i;(function(e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(a,u){"object"==n(t)&&"object"==n(e)?e.exports=u():(o=[],r=u,i="function"==typeof r?r.apply(t,o):r,!(void 0!==i&&(e.exports=i)))}(void 0,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.default=function(e){var t=e.html,a=e.css,u=e.js,c=[];return c.push(a?i(a):{}),c.push(u?o(u):{}),c.push(t?r(t):{}),Promise.all(c).then(function(e){var t=n(e,3),r=t[0],o=t[1],i=t[2];return{html:i,css:r,js:o}})};var r=function(e){return new Promise(function(t,n){if(e){var r=new XMLHttpRequest;r.onreadystatechange=function(){4==r.readyState&&(200==r.status?t(r.responseText):n(r))},r.open("get",e),r.send(null)}})},o=function(e){return new Promise(function(t,n){var r=document.createElement("script");r.async=!0,r.onload=function(){return t(r)},r.src=e,document.head.appendChild(r)})},i=function(e){return new Promise(function(t,n){var r=document.createElement("link");r.rel="stylesheet",r.href=e,r.onload=function(){return t(r)},document.head.appendChild(r)})}}])})}).call(t,n(2)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,n){var r,o,i;(function(e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(a,u){"object"==n(t)&&"object"==n(e)?e.exports=u():(o=[],r=u,i="function"==typeof r?r.apply(t,o):r,!(void 0!==i&&(e.exports=i)))}(void 0,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.soda=void 0;var o=n(1),i=r(o),a=n(3),u=r(a);t.soda=a.soda,t.default=function(e){var t=(0,u.default)(e);return function(e){var n=t(e),r=+n.elm.getAttribute(e.reactor.REACTORID),o=n.reactor.model[r];return n.arch=function(e){var t=e.model,r=e.actions,a=e.store,u=e.beforeUpdate;t=o||t;var c=(0,i.default)(Object.assign({},t));if(c.actions(r.call?r(c):r),c.subscribe(function(e){var t=Object.assign({},e);n.reactor(u?u(t):t)}),c.set(function(e){for(var n in t)n in e||(e[n]=t[n])}),a){var l=c.dispatch;c.dispatch=function(e,t){l(e,t),a.dispatch(e,t)}}return c},n}}},function(e,t,r){var o,i,a;(function(e){var r="function"==typeof Symbol&&"symbol"==n(Symbol.iterator)?function(e){return"undefined"==typeof e?"undefined":n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":"undefined"==typeof e?"undefined":n(e)};!function(n,u){"object"==r(t)&&"object"==r(e)?e.exports=u():(i=[],o=u,a="function"==typeof o?o.apply(t,i):o,!(void 0!==a&&(e.exports=a)))}(void 0,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n(),r="__update__";return{get:function(){return e},set:function(n){n(e),t.publish(r,{state:e})},actions:function(n){var r=function(r){t.subscribe(r,function(t){e=Object.assign(e,n[r](e,t))})};for(var o in n)r(o)},dispatch:function(n,o){t.publish(n,o),t.publish(r,{state:e,action:n,payload:o})},subscribe:function(e){return e.call?t.subscribe(r,function(t){var n=t.state,r=t.action,o=t.payload;return e(n,{action:r,payload:o})}):void t.subscribe(r,function(t){var n=t.state,r=t.action,o=t.payload;r in e&&e[r](n,{action:r,payload:o})})}}};var n=function(){var e={};return{publish:function(t,n){t in e&&e[t].map(function(e){return e(n)})},subscribe:function(t,n){return e[t]=e[t]||[],e[t].push(n),function(){e[t]=e[t].filter(function(e){return e==n})}}}}}])})}).call(t,r(2)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,r){var o,i,a;(function(e){var r="function"==typeof Symbol&&"symbol"==n(Symbol.iterator)?function(e){return"undefined"==typeof e?"undefined":n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":"undefined"==typeof e?"undefined":n(e)};!function(n,u){"object"==r(t)&&"object"==r(e)?e.exports=u():(i=[],o=u,a="function"==typeof o?o.apply(t,i):o,!(void 0!==a&&(e.exports=a)))}(void 0,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=document.createElement("div"),n=Array.prototype.slice.call(e.querySelectorAll("[data-component]"));n.forEach(function(e,t){return e.setAttribute(d,l++)}),t.innerHTML=e.innerHTML.replace(//g,"").replace(/<\/template>/g,"");var r=Array.prototype.slice.call(t.querySelectorAll("[data-component]")),o=r.filter(function(e){return!e.getAttribute(d)});o.forEach(function(e){return e.setAttribute(d,l++)}),r.forEach(function(e){var t=+e.getAttribute(d);f[t]||(f[t]=e.outerHTML)})}Object.defineProperty(t,"__esModule",{value:!0}),t.soda=t.morphdom=void 0;var i=n(1),a=r(i),u=n(2),c=r(u);t.morphdom=a.default,t.soda=c.default;var l=0,f={},s={},d="data-reactor-id";t.default=function(e){return o(),function(e){if(e.elm==document.body)e.reactor=function(e){return console.warn("Reactor can`t be used on document.body")};else{var t=+e.elm.getAttribute(d),n=f[t],r=e.elm,o=!0;e.reactor=function(u){var p=Object.assign({},o&&s[t]?s[t]:u),v={hascomponent:!1};r=(0,a.default)(e.elm,(0,c.default)(n,p),i(r,v)),v.hascomponent&&(e.jails.observer||e.jails.start(r),e.elm.getAttribute(d)||(e.elm.setAttribute(d,l++),f[l]=r.outerHTML.replace(//g,"").replace(/<\/template>/g,""))),v.hascomponent=!1,s[t]=p,o=!1}}var i=function(t,n){return{onBeforeElChildrenUpdated:function(e,t){return!(e.getAttribute&&e.getAttribute("data-static"))},onNodeAdded:function(e){e.getAttribute&&e.getAttribute("data-component")&&!e.j&&(n.hascomponent=!0)},onBeforeNodeDiscarded:function(t){if(t.getAttribute&&t.getAttribute("data-component")&&t.j){var n=+t.getAttribute(d);e.jails.destroy(t),delete f[n]}}}};return e.reactor.templates=f,e.reactor.model=s,e.reactor.REACTORID=d,e}}},function(e,t){function n(e){!s&&v.createRange&&(s=v.createRange(),s.selectNode(v.body));var t;return s&&s.createContextualFragment?t=s.createContextualFragment(e):(t=v.createElement("body"),t.innerHTML=e),t.childNodes[0]}function r(e,t){var n=e.nodeName,r=t.nodeName;return n===r||!!(t.actualize&&n.charCodeAt(0)<91&&r.charCodeAt(0)>90)&&n===r.toUpperCase()}function o(e,t){return t&&t!==p?v.createElementNS(t,e):v.createElement(e)}function i(e,t){for(var n=e.firstChild;n;){var r=n.nextSibling;t.appendChild(n),n=r}return t}function a(e,t){var n,r,o,i,a,u,c=t.attributes;for(n=c.length-1;n>=0;--n)r=c[n],o=r.name,i=r.namespaceURI,a=r.value,i?(o=r.localName||o,u=e.getAttributeNS(i,o),u!==a&&e.setAttributeNS(i,o,a)):(u=e.getAttribute(o),u!==a&&e.setAttribute(o,a));for(c=e.attributes,n=c.length-1;n>=0;--n)r=c[n],r.specified!==!1&&(o=r.name,i=r.namespaceURI,i?(o=r.localName||o,y(t,i,o)||e.removeAttributeNS(i,o)):y(t,null,o)||e.removeAttribute(o))}function u(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n,""))}function c(){}function l(e){return e.id}function f(e){return function(t,a,u){function f(e){E?E.push(e):E=[e]}function s(e,t){if(e.nodeType===h)for(var n=e.firstChild;n;){var r=void 0;t&&(r=N(n))?f(r):(C(n),n.firstChild&&s(n,t)),n=n.nextSibling}}function d(e,t,n){R(e)!==!1&&(t&&t.removeChild(e),C(e),s(e,n))}function p(e){if(e.nodeType===h)for(var t=e.firstChild;t;){var n=N(t);n&&(w[n]=t),p(t),t=t.nextSibling}}function m(e){A(e);for(var t=e.firstChild;t;){var n=t.nextSibling,o=N(t);if(o){var i=w[o];i&&r(t,i)&&(t.parentNode.replaceChild(i,t),y(i,t))}m(t),t=n}}function y(n,o,i){var u,c=N(o);if(c&&delete w[c],!a.isSameNode||!a.isSameNode(t)){if(!i){if(T(n,o)===!1)return;if(e(n,o),O(n),j(n,o)===!1)return}if("TEXTAREA"!==n.nodeName){var l,s,p,_,E=o.firstChild,A=n.firstChild;e:for(;E;){for(p=E.nextSibling,l=N(E);A;){if(s=A.nextSibling,E.isSameNode&&E.isSameNode(A)){E=p,A=s;continue e}u=N(A);var R=A.nodeType,C=void 0;if(R===E.nodeType&&(R===h?(l?l!==u&&((_=w[l])?A.nextSibling===_?C=!1:(n.insertBefore(_,A),s=A.nextSibling,u?f(u):d(A,n,!0),A=_):C=!1):u&&(C=!1),C=C!==!1&&r(A,E),C&&y(A,E)):R!==x&&R!=g||(C=!0,A.nodeValue!==E.nodeValue&&(A.nodeValue=E.nodeValue))),C){E=p,A=s;continue e}u?f(u):d(A,n,!0),A=s}if(l&&(_=w[l])&&r(_,E))n.appendChild(_),y(_,E);else{var M=S(E);M!==!1&&(M&&(E=M),E.actualize&&(E=E.actualize(n.ownerDocument||v)),n.appendChild(E),m(E))}E=p,A=s}for(;A;)s=A.nextSibling,(u=N(A))?f(u):d(A,n,!0),A=s}var P=b[n.nodeName];P&&P(n,o)}}if(u||(u={}),"string"==typeof a)if("#document"===t.nodeName||"HTML"===t.nodeName){var _=a;a=v.createElement("html"),a.innerHTML=_}else a=n(a);var E,N=u.getNodeKey||l,S=u.onBeforeNodeAdded||c,A=u.onNodeAdded||c,T=u.onBeforeElUpdated||c,O=u.onElUpdated||c,R=u.onBeforeNodeDiscarded||c,C=u.onNodeDiscarded||c,j=u.onBeforeElChildrenUpdated||c,M=u.childrenOnly===!0,w={};p(t);var P=t,k=P.nodeType,G=a.nodeType;if(!M)if(k===h)G===h?r(t,a)||(C(t),P=i(t,o(a.nodeName,a.namespaceURI))):P=a;else if(k===x||k===g){if(G===k)return P.nodeValue!==a.nodeValue&&(P.nodeValue=a.nodeValue),P;P=a}if(P===a)C(t);else if(y(P,a,M),E)for(var V=0,L=E.length;V0&&void 0!==arguments[0]?arguments[0]:"soda-";o(this,e),this._prefix=t}return a(e,[{key:"setDocument",value:function(e){l=e}},{key:"run",value:function(e,t){var n=this,r=l.createElement("div");l.documentMode<9&&(r.style.display="none",l.body.appendChild(r)),r.innerHTML=e,(0,c.nodes2Arr)(r.childNodes).map(function(e){n.compileNode(e,t)});var o=r.innerHTML;return l.documentMode<9&&l.body.removeChild(r),o}},{key:"prefix",value:function(e){this._prefix=e}},{key:"_getPrefixReg",value:function(){return new RegExp("^"+this._prefix)}},{key:"_getPrefixedDirectiveMap",value:function(){var t=this,n={};return e.sodaDirectives.map(function(e){var r=t._prefix+e.name;n[r]=e}),n}},{key:"_removeSodaMark",value:function(e,t){e.removeAttribute(t)}},{key:"compileNode",value:function(t,n){var r=this,o=this._getPrefixReg(),a=e.sodaDirectives,f=this._getPrefixedDirectiveMap(),s=function e(t,n){t.nodeType===(t.TEXT_NODE||3)&&(t.nodeValue=t.nodeValue.replace(u.VALUE_OUT_REG,function(e,t){var o=r.parseSodaExpression(t,n);return"object"===("undefined"==typeof o?"undefined":i(o))&&(o=JSON.stringify(o,null,2)),o})),t.attributes&&t.attributes.length&&(a.map(function(e){var o=e.name,i=e.opt,a=r._prefix+o;if((0,c.exist)(t.getAttribute(a))){var u=t.getAttribute(a);i.link.bind(r)({expression:u,scope:n,el:t,parseSodaExpression:r.parseSodaExpression.bind(r),getValue:r.getValue.bind(r),compileNode:r.compileNode.bind(r),document:l}),r._removeSodaMark(t,a)}}),(0,c.nodes2Arr)(t.attributes).filter(function(e){return!f[e.name]}).map(function(e){if(o.test(e.name)){var i=e.name.replace(o,"");if(i&&(0,c.exist)(e.value)){var a=r.parseComplexExpression(e.value,n);a!==!1&&(0,c.exist)(a)&&t.setAttribute(i,a),r._removeSodaMark(t,e.name)}}else(0,c.exist)(e.value)&&(e.value=r.parseComplexExpression(e.value,n))})),(0,c.nodes2Arr)(t.childNodes).map(function(t){e(t,n)})};s(t,n)}},{key:"getEvalFunc",value:function(t){var n=new Function("getValue","sodaFilterMap","return function sodaExp(scope){ return "+t+"}")(this.getValue,e.sodaFilterMap);return n}},{key:"getValue",value:function(e,t){if(u.CONST_REGG.lastIndex=0,t.replace(u.CONST_REGG,function(t){return"undefined"==typeof e[t]?t:e[t]}),"true"===t)return!0;if("false"===t)return!1;var n=function t(n,r){var o=r.indexOf(".");if(o>-1){var i=r.substr(0,o);return r=r.substr(o+1),"undefined"!=typeof e[i]&&u.CONST_REG.test(i)&&(i=e[i]),"undefined"!=typeof n[i]&&null!==n[i]?t(n[i],r):""}r=r.trim(),"undefined"!=typeof e[r]&&u.CONST_REG.test(r)&&(r=e[r]);var a;return a="undefined"!=typeof n[r]?n[r]:""};return n(e,t)}},{key:"parseComplexExpression",value:function(e,t){var n=this,r=u.ONLY_VALUE_OUT_REG.exec(e);if(r){var o=r[1];return this.parseSodaExpression(o,t)}return e.replace(u.VALUE_OUT_REG,function(e,r){return n.parseSodaExpression(r,t)})}},{key:"parseSodaExpression",value:function(e,t){var n=this;e=e.replace(u.STRING_REG,function(e,n,r){var o=(0,c.getRandom)();return t[o]=n||r,o}),e=e.replace(u.OR_REG,u.OR_REPLACE).split("|");for(var r=0;r=u)break}this.sodaDirectives.splice(o,0,{name:e,opt:t})}},{key:"discribe",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{compile:!0};this.template[e]={funcOrStr:t,option:n}}},{key:"getTmpl",value:function(e,t){var n=this.template[e],r=n.funcOrStr,o=n.option,i=void 0===o?{}:o,a=void 0;return a="function"==typeof r?r.apply(null,t):r,{template:a,option:i}}}]),e}();f.sodaDirectives=[],f.sodaFilterMap={},f.template={},t.default=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.IDENTOR_REG=/[a-zA-Z_\$]+[\w\$]*/g,t.STRING_REG=/"([^"]*)"|'([^']*)'/g,t.NUMBER_REG=/\d+|\d*\.\d+/g,t.OBJECT_REG=/[a-zA-Z_\$]+[\w\$]*(?:\s*\.\s*(?:[a-zA-Z_\$]+[\w\$]*|\d+))*/g,t.OBJECT_REG_NG=/[a-zA-Z_\$]+[\w\$]*(?:\s*\.\s*(?:[a-zA-Z_\$]+[\w\$]*|\d+))*/,t.ATTR_REG=/\[([^\[\]]*)\]/g,t.ATTR_REG_NG=/\[([^\[\]]*)\]/,t.ATTR_REG_DOT=/\.([a-zA-Z_\$]+[\w\$]*)/g,t.NOT_ATTR_REG=/[^\.|]([a-zA-Z_\$]+[\w\$]*)/g,t.OR_REG=/\|\|/g,t.OR_REPLACE="OR_OPERATOR",t.CONST_PRIFIX="_$C$_",t.CONST_REG=/^_\$C\$_/,t.CONST_REGG=/_\$C\$_[^\.]+/g,t.VALUE_OUT_REG=/\{\{([^\}]*)\}\}/g,t.ONLY_VALUE_OUT_REG=/^\{\{([^\}]*)\}\}$/},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.assign=t.nodes2Arr=t.exist=t.getRandom=t.getAttrVarKey=void 0;var r=n(1),o=(t.getAttrVarKey=function(){return r.CONST_PRIFIX+~~(1e6*Math.random())},t.getRandom=function(){return"$$"+~~(1e6*Math.random())},t.exist=function(e){return null!==e&&void 0!==e&&""!==e&&"undefined"!=typeof e},t.nodes2Arr=function(e){for(var t=[],n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=location.href,r=document.querySelector("[data-outlet]"),i=o({},n,{outlet:r}),u=n,f=function(){var n=Object.assign({},e,s);t.pjax=new Pjax(n),t.events.on(document,"pjax:send",function(e){u=e.triggerElement?e.triggerElement.href:location.href})},s={selectors:["head title","head meta","[data-stylesheet]","[data-script]","[data-outlet]"],switches:{"[data-outlet]":function(t,n,r){var o=this;u in i?e.transition?e.transition(t,function(){t.parentNode.replaceChild(i[u].outlet,t),o.onSwitch()}):(t.parentNode.replaceChild(i[u].outlet,t),this.onSwitch()):(i[u]={outlet:n},e.transition?e.transition(t,function(){t.parentNode.replaceChild(n,t),o.onSwitch()}):(t.parentNode.replaceChild(n,t),this.onSwitch()))},"[data-script]":function(e,n){var r=this;(0,a.default)({js:n.src}).then(function(n){var o=n.js;o.setAttribute("data-script",!0),e.parentNode.replaceChild(o,e),t.extends((0,c.default)()).start(),r.onSwitch()})},"[data-stylesheet]":function(e,t){var n=this;t.onload=function(){e.parentNode.removeChild(e),n.onSwitch()},e.parentNode.appendChild(t)}}};l.then(f).catch(function(e){console.error("Jails.pjax.error",e)})}}},function(e,t,n){var r,o,i;(function(e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(a,u){"object"==n(t)&&"object"==n(e)?e.exports=u():(o=[],r=u,i="function"==typeof r?r.apply(t,o):r,!(void 0!==i&&(e.exports=i)))}(void 0,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.default=function(e){var t=e.html,a=e.css,u=e.js,c=[];return c.push(a?i(a):{}),c.push(u?o(u):{}),c.push(t?r(t):{}),Promise.all(c).then(function(e){var t=n(e,3),r=t[0],o=t[1],i=t[2];return{html:i,css:r,js:o}})};var r=function(e){return new Promise(function(t,n){if(e){var r=new XMLHttpRequest;r.onreadystatechange=function(){4==r.readyState&&(200==r.status?t(r.responseText):n(r))},r.open("get",e),r.send(null)}})},o=function(e){return new Promise(function(t,n){var r=document.createElement("script");r.async=!0,r.onload=function(){return t(r)},r.src=e,document.head.appendChild(r)})},i=function(e){return new Promise(function(t,n){var r=document.createElement("link");r.rel="stylesheet",r.href=e,r.onload=function(){return t(r)},document.head.appendChild(r)})}}])})}).call(t,n(2)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,n){var r,o,i;(function(e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(a,u){"object"==n(t)&&"object"==n(e)?e.exports=u():(o=[],r=u,i="function"==typeof r?r.apply(t,o):r,!(void 0!==i&&(e.exports=i)))}(void 0,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.soda=void 0;var o=n(1),i=r(o),a=n(3),u=r(a);t.soda=a.soda,t.default=function(e){var t=(0,u.default)(e);return function(e){var n=t(e),r=+n.elm.getAttribute(e.reactor.REACTORID),o=n.reactor.model[r];return n.arch=function(e){var t=e.model,r=e.actions,a=e.store,u=e.beforeUpdate;t=o||t;var c=(0,i.default)(Object.assign({},t));if(c.actions(r.call?r(c):r),c.subscribe(function(e){var t=Object.assign({},e);n.reactor(u?u(t):t)}),c.set(function(e){for(var n in t)n in e||(e[n]=t[n])}),a){var l=c.dispatch;c.dispatch=function(e,t){l(e,t),a.dispatch(e,t)}}return c},n}}},function(e,t,r){var o,i,a;(function(e){var r="function"==typeof Symbol&&"symbol"==n(Symbol.iterator)?function(e){return"undefined"==typeof e?"undefined":n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":"undefined"==typeof e?"undefined":n(e)};!function(n,u){"object"==r(t)&&"object"==r(e)?e.exports=u():(i=[],o=u,a="function"==typeof o?o.apply(t,i):o,!(void 0!==a&&(e.exports=a)))}(void 0,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n(),r="__update__";return{get:function(){return e},set:function(n){n(e),t.publish(r,{state:e})},actions:function(n){var r=function(r){t.subscribe(r,function(t){e=Object.assign(e,n[r](e,t))})};for(var o in n)r(o)},dispatch:function(n,o){t.publish(n,o),t.publish(r,{state:e,action:n,payload:o})},subscribe:function(e){return e.call?t.subscribe(r,function(t){var n=t.state,r=t.action,o=t.payload;return e(n,{action:r,payload:o})}):void t.subscribe(r,function(t){var n=t.state,r=t.action,o=t.payload;r in e&&e[r](n,{action:r,payload:o})})}}};var n=function(){var e={};return{publish:function(t,n){t in e&&e[t].map(function(e){return e(n)})},subscribe:function(t,n){return e[t]=e[t]||[],e[t].push(n),function(){e[t]=e[t].filter(function(e){return e==n})}}}}}])})}).call(t,r(2)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,r){var o,i,a;(function(e){var r="function"==typeof Symbol&&"symbol"==n(Symbol.iterator)?function(e){return"undefined"==typeof e?"undefined":n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":"undefined"==typeof e?"undefined":n(e)};!function(n,u){"object"==r(t)&&"object"==r(e)?e.exports=u():(i=[],o=u,a="function"==typeof o?o.apply(t,i):o,!(void 0!==a&&(e.exports=a)))}(void 0,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=document.createElement("div"),n=Array.prototype.slice.call(e.querySelectorAll("[data-component]"));n.forEach(function(e,t){return e.setAttribute(d,l++)}),t.innerHTML=e.innerHTML.replace(//g,"").replace(/<\/template>/g,"");var r=Array.prototype.slice.call(t.querySelectorAll("[data-component]")),o=r.filter(function(e){return!e.getAttribute(d)});o.forEach(function(e){return e.setAttribute(d,l++)}),r.forEach(function(e){var t=+e.getAttribute(d);f[t]||(f[t]=e.outerHTML)})}Object.defineProperty(t,"__esModule",{value:!0}),t.soda=t.morphdom=void 0;var i=n(1),a=r(i),u=n(2),c=r(u);t.morphdom=a.default,t.soda=c.default;var l=0,f={},s={},d="data-reactor-id";t.default=function(e){return o(),function(e){if(e.elm==document.body)e.reactor=function(e){return console.warn("Reactor can`t be used on document.body")};else{var t=+e.elm.getAttribute(d),n=f[t],r=e.elm,o=!0;e.reactor=function(u){var p=Object.assign({},o&&s[t]?s[t]:u),v={hascomponent:!1};r=(0,a.default)(e.elm,(0,c.default)(n,p),i(r,v)),v.hascomponent&&(e.jails.observer||e.jails.start(r),e.elm.getAttribute(d)||(e.elm.setAttribute(d,l++),f[l]=r.outerHTML.replace(//g,"").replace(/<\/template>/g,""))),v.hascomponent=!1,s[t]=p,o=!1}}var i=function(t,n){return{onBeforeElChildrenUpdated:function(e,t){return!(e.getAttribute&&e.getAttribute("data-static"))},onNodeAdded:function(e){e.getAttribute&&e.getAttribute("data-component")&&!e.j&&(n.hascomponent=!0)},onBeforeNodeDiscarded:function(t){if(t.getAttribute&&t.getAttribute("data-component")&&t.j){var n=+t.getAttribute(d);e.jails.destroy(t),delete f[n]}}}};return e.reactor.templates=f,e.reactor.model=s,e.reactor.REACTORID=d,e}}},function(e,t){function n(e){!s&&v.createRange&&(s=v.createRange(),s.selectNode(v.body));var t;return s&&s.createContextualFragment?t=s.createContextualFragment(e):(t=v.createElement("body"),t.innerHTML=e),t.childNodes[0]}function r(e,t){var n=e.nodeName,r=t.nodeName;return n===r||!!(t.actualize&&n.charCodeAt(0)<91&&r.charCodeAt(0)>90)&&n===r.toUpperCase()}function o(e,t){return t&&t!==p?v.createElementNS(t,e):v.createElement(e)}function i(e,t){for(var n=e.firstChild;n;){var r=n.nextSibling;t.appendChild(n),n=r}return t}function a(e,t){var n,r,o,i,a,u,c=t.attributes;for(n=c.length-1;n>=0;--n)r=c[n],o=r.name,i=r.namespaceURI,a=r.value,i?(o=r.localName||o,u=e.getAttributeNS(i,o),u!==a&&e.setAttributeNS(i,o,a)):(u=e.getAttribute(o),u!==a&&e.setAttribute(o,a));for(c=e.attributes,n=c.length-1;n>=0;--n)r=c[n],r.specified!==!1&&(o=r.name,i=r.namespaceURI,i?(o=r.localName||o,y(t,i,o)||e.removeAttributeNS(i,o)):y(t,null,o)||e.removeAttribute(o))}function u(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n,""))}function c(){}function l(e){return e.id}function f(e){return function(t,a,u){function f(e){E?E.push(e):E=[e]}function s(e,t){if(e.nodeType===h)for(var n=e.firstChild;n;){var r=void 0;t&&(r=N(n))?f(r):(C(n),n.firstChild&&s(n,t)),n=n.nextSibling}}function d(e,t,n){R(e)!==!1&&(t&&t.removeChild(e),C(e),s(e,n))}function p(e){if(e.nodeType===h)for(var t=e.firstChild;t;){var n=N(t);n&&(w[n]=t),p(t),t=t.nextSibling}}function m(e){A(e);for(var t=e.firstChild;t;){var n=t.nextSibling,o=N(t);if(o){var i=w[o];i&&r(t,i)&&(t.parentNode.replaceChild(i,t),y(i,t))}m(t),t=n}}function y(n,o,i){var u,c=N(o);if(c&&delete w[c],!a.isSameNode||!a.isSameNode(t)){if(!i){if(T(n,o)===!1)return;if(e(n,o),O(n),j(n,o)===!1)return}if("TEXTAREA"!==n.nodeName){var l,s,p,_,E=o.firstChild,A=n.firstChild;e:for(;E;){for(p=E.nextSibling,l=N(E);A;){if(s=A.nextSibling,E.isSameNode&&E.isSameNode(A)){E=p,A=s;continue e}u=N(A);var R=A.nodeType,C=void 0;if(R===E.nodeType&&(R===h?(l?l!==u&&((_=w[l])?A.nextSibling===_?C=!1:(n.insertBefore(_,A),s=A.nextSibling,u?f(u):d(A,n,!0),A=_):C=!1):u&&(C=!1),C=C!==!1&&r(A,E),C&&y(A,E)):R!==x&&R!=g||(C=!0,A.nodeValue!==E.nodeValue&&(A.nodeValue=E.nodeValue))),C){E=p,A=s;continue e}u?f(u):d(A,n,!0),A=s}if(l&&(_=w[l])&&r(_,E))n.appendChild(_),y(_,E);else{var M=S(E);M!==!1&&(M&&(E=M),E.actualize&&(E=E.actualize(n.ownerDocument||v)),n.appendChild(E),m(E))}E=p,A=s}for(;A;)s=A.nextSibling,(u=N(A))?f(u):d(A,n,!0),A=s}var P=b[n.nodeName];P&&P(n,o)}}if(u||(u={}),"string"==typeof a)if("#document"===t.nodeName||"HTML"===t.nodeName){var _=a;a=v.createElement("html"),a.innerHTML=_}else a=n(a);var E,N=u.getNodeKey||l,S=u.onBeforeNodeAdded||c,A=u.onNodeAdded||c,T=u.onBeforeElUpdated||c,O=u.onElUpdated||c,R=u.onBeforeNodeDiscarded||c,C=u.onNodeDiscarded||c,j=u.onBeforeElChildrenUpdated||c,M=u.childrenOnly===!0,w={};p(t);var P=t,k=P.nodeType,G=a.nodeType;if(!M)if(k===h)G===h?r(t,a)||(C(t),P=i(t,o(a.nodeName,a.namespaceURI))):P=a;else if(k===x||k===g){if(G===k)return P.nodeValue!==a.nodeValue&&(P.nodeValue=a.nodeValue),P;P=a}if(P===a)C(t);else if(y(P,a,M),E)for(var V=0,L=E.length;V0&&void 0!==arguments[0]?arguments[0]:"soda-";o(this,e),this._prefix=t}return a(e,[{key:"setDocument",value:function(e){l=e}},{key:"run",value:function(e,t){var n=this,r=l.createElement("div");l.documentMode<9&&(r.style.display="none",l.body.appendChild(r)),r.innerHTML=e,(0,c.nodes2Arr)(r.childNodes).map(function(e){n.compileNode(e,t)});var o=r.innerHTML;return l.documentMode<9&&l.body.removeChild(r),o}},{key:"prefix",value:function(e){this._prefix=e}},{key:"_getPrefixReg",value:function(){return new RegExp("^"+this._prefix)}},{key:"_getPrefixedDirectiveMap",value:function(){var t=this,n={};return e.sodaDirectives.map(function(e){var r=t._prefix+e.name;n[r]=e}),n}},{key:"_removeSodaMark",value:function(e,t){e.removeAttribute(t)}},{key:"compileNode",value:function(t,n){var r=this,o=this._getPrefixReg(),a=e.sodaDirectives,f=this._getPrefixedDirectiveMap(),s=function e(t,n){t.nodeType===(t.TEXT_NODE||3)&&(t.nodeValue=t.nodeValue.replace(u.VALUE_OUT_REG,function(e,t){var o=r.parseSodaExpression(t,n);return"object"===("undefined"==typeof o?"undefined":i(o))&&(o=JSON.stringify(o,null,2)),o})),t.attributes&&t.attributes.length&&(a.map(function(e){var o=e.name,i=e.opt,a=r._prefix+o;if((0,c.exist)(t.getAttribute(a))){var u=t.getAttribute(a);i.link.bind(r)({expression:u,scope:n,el:t,parseSodaExpression:r.parseSodaExpression.bind(r),getValue:r.getValue.bind(r),compileNode:r.compileNode.bind(r),document:l}),r._removeSodaMark(t,a)}}),(0,c.nodes2Arr)(t.attributes).filter(function(e){return!f[e.name]}).map(function(e){if(o.test(e.name)){var i=e.name.replace(o,"");if(i&&(0,c.exist)(e.value)){var a=r.parseComplexExpression(e.value,n);a!==!1&&(0,c.exist)(a)&&t.setAttribute(i,a),r._removeSodaMark(t,e.name)}}else(0,c.exist)(e.value)&&(e.value=r.parseComplexExpression(e.value,n))})),(0,c.nodes2Arr)(t.childNodes).map(function(t){e(t,n)})};s(t,n)}},{key:"getEvalFunc",value:function(t){var n=new Function("getValue","sodaFilterMap","return function sodaExp(scope){ return "+t+"}")(this.getValue,e.sodaFilterMap);return n}},{key:"getValue",value:function(e,t){if(u.CONST_REGG.lastIndex=0,t.replace(u.CONST_REGG,function(t){return"undefined"==typeof e[t]?t:e[t]}),"true"===t)return!0;if("false"===t)return!1;var n=function t(n,r){var o=r.indexOf(".");if(o>-1){var i=r.substr(0,o);return r=r.substr(o+1),"undefined"!=typeof e[i]&&u.CONST_REG.test(i)&&(i=e[i]),"undefined"!=typeof n[i]&&null!==n[i]?t(n[i],r):""}r=r.trim(),"undefined"!=typeof e[r]&&u.CONST_REG.test(r)&&(r=e[r]);var a;return a="undefined"!=typeof n[r]?n[r]:""};return n(e,t)}},{key:"parseComplexExpression",value:function(e,t){var n=this,r=u.ONLY_VALUE_OUT_REG.exec(e);if(r){var o=r[1];return this.parseSodaExpression(o,t)}return e.replace(u.VALUE_OUT_REG,function(e,r){return n.parseSodaExpression(r,t)})}},{key:"parseSodaExpression",value:function(e,t){var n=this;e=e.replace(u.STRING_REG,function(e,n,r){var o=(0,c.getRandom)();return t[o]=n||r,o}),e=e.replace(u.OR_REG,u.OR_REPLACE).split("|");for(var r=0;r=u)break}this.sodaDirectives.splice(o,0,{name:e,opt:t})}},{key:"discribe",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{compile:!0};this.template[e]={funcOrStr:t,option:n}}},{key:"getTmpl",value:function(e,t){var n=this.template[e],r=n.funcOrStr,o=n.option,i=void 0===o?{}:o,a=void 0;return a="function"==typeof r?r.apply(null,t):r,{template:a,option:i}}}]),e}();f.sodaDirectives=[],f.sodaFilterMap={},f.template={},t.default=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.IDENTOR_REG=/[a-zA-Z_\$]+[\w\$]*/g,t.STRING_REG=/"([^"]*)"|'([^']*)'/g,t.NUMBER_REG=/\d+|\d*\.\d+/g,t.OBJECT_REG=/[a-zA-Z_\$]+[\w\$]*(?:\s*\.\s*(?:[a-zA-Z_\$]+[\w\$]*|\d+))*/g,t.OBJECT_REG_NG=/[a-zA-Z_\$]+[\w\$]*(?:\s*\.\s*(?:[a-zA-Z_\$]+[\w\$]*|\d+))*/,t.ATTR_REG=/\[([^\[\]]*)\]/g,t.ATTR_REG_NG=/\[([^\[\]]*)\]/,t.ATTR_REG_DOT=/\.([a-zA-Z_\$]+[\w\$]*)/g,t.NOT_ATTR_REG=/[^\.|]([a-zA-Z_\$]+[\w\$]*)/g,t.OR_REG=/\|\|/g,t.OR_REPLACE="OR_OPERATOR",t.CONST_PRIFIX="_$C$_",t.CONST_REG=/^_\$C\$_/,t.CONST_REGG=/_\$C\$_[^\.]+/g,t.VALUE_OUT_REG=/\{\{([^\}]*)\}\}/g,t.ONLY_VALUE_OUT_REG=/^\{\{([^\}]*)\}\}$/},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.assign=t.nodes2Arr=t.exist=t.getRandom=t.getAttrVarKey=void 0;var r=n(1),o=(t.getAttrVarKey=function(){return r.CONST_PRIFIX+~~(1e6*Math.random())},t.getRandom=function(){return"$$"+~~(1e6*Math.random())},t.exist=function(e){return null!==e&&void 0!==e&&""!==e&&"undefined"!=typeof e},t.nodes2Arr=function(e){for(var t=[],n=0;n (jails) => { const extendedPjax = { - selectors: ['title', 'meta', '[data-stylesheet]', '[data-script]', '[data-outlet]'], + selectors: ['head title', 'head meta', '[data-stylesheet]', '[data-script]', '[data-outlet]'], switches: { '[data-outlet]'(oldel, newel, options) {