tao_on_rails 0.6.6 → 0.6.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/assets/javascripts/tao.coffee +1 -0
- data/lib/assets/javascripts/tao/application.coffee +4 -0
- data/lib/assets/javascripts/tao/component.coffee +0 -2
- data/lib/assets/stylesheets/tao.scss +4 -0
- data/lib/tao_on_rails/version.rb +1 -1
- data/vendor/assets/javascripts/polyfills/custom-elements.js +58 -44
- data/vendor/assets/javascripts/polyfills/polyfills.coffee +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3951f63d32ee6125282a6212b317023454b740dd
|
4
|
+
data.tar.gz: 0a88b7cdba22bc7d393642c29d81d0c1b0b17e35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7de5eae660dcb9a6fb34330a4fb3f027f4f18a803d5e05da5257f0eed1bca7dcfe7ce883666395ce9bcfb323608558fb4e6124c407d975e7a1b01f70eb59d0bd
|
7
|
+
data.tar.gz: 9765583417da4fb8ba6a69426fdcaa1c8b7eb24d84c8cd302235e56b24c377a2cca3e731ca708461efe8262aaff534eaa5e3e34eb016718f8d37bfbbacb57a49
|
@@ -58,6 +58,10 @@ class TaoApplication extends TaoModule
|
|
58
58
|
@trigger 'before-page-render', [$ e.originalEvent?.data.newBody]
|
59
59
|
|
60
60
|
.on 'turbolinks:render', (e) =>
|
61
|
+
# turbolinks render won't trigger patching of customElements polyfills
|
62
|
+
if customElements._internals
|
63
|
+
customElements._internals.connectTree document.body
|
64
|
+
|
61
65
|
@trigger 'page-render', [$('body > .tao-page')]
|
62
66
|
|
63
67
|
.on 'turbolinks:load', (e) =>
|
data/lib/tao_on_rails/version.rb
CHANGED
@@ -1,47 +1,61 @@
|
|
1
1
|
(function(){
|
2
|
-
'use strict';var
|
3
|
-
function
|
4
|
-
function
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
function(){this.
|
11
|
-
c.
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
function(){
|
21
|
-
function
|
22
|
-
function
|
23
|
-
|
24
|
-
function
|
25
|
-
d
|
26
|
-
function
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
b
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
"
|
44
|
-
|
2
|
+
'use strict';var g={scope:{}};g.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,f){if(f.get||f.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=f.value)};g.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};g.global=g.getGlobal(this);g.SYMBOL_PREFIX="jscomp_symbol_";
|
3
|
+
g.initSymbol=function(){g.initSymbol=function(){};g.global.Symbol||(g.global.Symbol=g.Symbol)};g.symbolCounter_=0;g.Symbol=function(a){return g.SYMBOL_PREFIX+(a||"")+g.symbolCounter_++};g.initSymbolIterator=function(){g.initSymbol();var a=g.global.Symbol.iterator;a||(a=g.global.Symbol.iterator=g.global.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&g.defineProperty(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return g.arrayIterator(this)}});g.initSymbolIterator=function(){}};
|
4
|
+
g.arrayIterator=function(a){var b=0;return g.iteratorPrototype(function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}})};g.iteratorPrototype=function(a){g.initSymbolIterator();a={next:a};a[g.global.Symbol.iterator]=function(){return this};return a};g.makeIterator=function(a){g.initSymbolIterator();var b=a[Symbol.iterator];return b?b.call(a):g.arrayIterator(a)};g.owns=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};
|
5
|
+
g.polyfill=function(a,b){if(b){var f=g.global;a=a.split(".");for(var e=0;e<a.length-1;e++){var c=a[e];c in f||(f[c]={});f=f[c]}a=a[a.length-1];e=f[a];b=b(e);b!=e&&null!=b&&g.defineProperty(f,a,{configurable:!0,writable:!0,value:b})}};
|
6
|
+
g.polyfill("WeakMap",function(a){function b(a){this.id_=(d+=Math.random()+1).toString();if(a){g.initSymbol();g.initSymbolIterator();a=g.makeIterator(a);for(var b;!(b=a.next()).done;)b=b.value,this.set(b[0],b[1])}}function f(a){g.owns(a,c)||g.defineProperty(a,c,{value:{}})}function e(a){var b=Object[a];b&&(Object[a]=function(a){f(a);return b(a)})}if(function(){if(!a||!Object.seal)return!1;try{var b=Object.seal({}),d=Object.seal({}),c=new a([[b,2],[d,3]]);if(2!=c.get(b)||3!=c.get(d))return!1;c.delete(b);
|
7
|
+
c.set(d,4);return!c.has(b)&&4==c.get(d)}catch(v){return!1}}())return a;var c="$jscomp_hidden_"+Math.random().toString().substring(2);e("freeze");e("preventExtensions");e("seal");var d=0;b.prototype.set=function(a,b){f(a);if(!g.owns(a,c))throw Error("WeakMap key fail: "+a);a[c][this.id_]=b;return this};b.prototype.get=function(a){return g.owns(a,c)?a[c][this.id_]:void 0};b.prototype.has=function(a){return g.owns(a,c)&&g.owns(a[c],this.id_)};b.prototype.delete=function(a){return g.owns(a,c)&&g.owns(a[c],
|
8
|
+
this.id_)?delete a[c][this.id_]:!1};return b},"es6-impl","es3");g.ASSUME_NO_NATIVE_MAP=!1;
|
9
|
+
g.polyfill("Map",function(a){function b(){var a={};return a.previous=a.next=a.head=a}function f(a,b){var d=a.head_;return g.iteratorPrototype(function(){if(d){for(;d.head!=a.head_;)d=d.previous;for(;d.next!=d.head;)return d=d.next,{done:!1,value:b(d)};d=null}return{done:!0,value:void 0}})}function e(a,b){var c;c=b&&typeof b;"object"==c||"function"==c?d.has(b)?c=d.get(b):(c=""+ ++m,d.set(b,c)):c="p_"+b;var f=a.data_[c];if(f&&g.owns(a.data_,c))for(a=0;a<f.length;a++){var e=f[a];if(b!==b&&e.key!==e.key||
|
10
|
+
b===e.key)return{id:c,list:f,index:a,entry:e}}return{id:c,list:f,index:-1,entry:void 0}}function c(a){this.data_={};this.head_=b();this.size=0;if(a){a=g.makeIterator(a);for(var d;!(d=a.next()).done;)d=d.value,this.set(d[0],d[1])}}if(!g.ASSUME_NO_NATIVE_MAP&&function(){if(!a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var b=Object.seal({x:4}),d=new a(g.makeIterator([[b,"s"]]));if("s"!=d.get(b)||1!=d.size||d.get({x:4})||d.set({x:4},"t")!=d||2!=d.size)return!1;var c=d.entries(),
|
11
|
+
f=c.next();if(f.done||f.value[0]!=b||"s"!=f.value[1])return!1;f=c.next();return f.done||4!=f.value[0].x||"t"!=f.value[1]||!c.next().done?!1:!0}catch(R){return!1}}())return a;g.initSymbol();g.initSymbolIterator();var d=new WeakMap;c.prototype.set=function(a,b){var d=e(this,a);d.list||(d.list=this.data_[d.id]=[]);d.entry?d.entry.value=b:(d.entry={next:this.head_,previous:this.head_.previous,head:this.head_,key:a,value:b},d.list.push(d.entry),this.head_.previous.next=d.entry,this.head_.previous=d.entry,
|
12
|
+
this.size++);return this};c.prototype.delete=function(a){a=e(this,a);return a.entry&&a.list?(a.list.splice(a.index,1),a.list.length||delete this.data_[a.id],a.entry.previous.next=a.entry.next,a.entry.next.previous=a.entry.previous,a.entry.head=null,this.size--,!0):!1};c.prototype.clear=function(){this.data_={};this.head_=this.head_.previous=b();this.size=0};c.prototype.has=function(a){return!!e(this,a).entry};c.prototype.get=function(a){return(a=e(this,a).entry)&&a.value};c.prototype.entries=function(){return f(this,
|
13
|
+
function(a){return[a.key,a.value]})};c.prototype.keys=function(){return f(this,function(a){return a.key})};c.prototype.values=function(){return f(this,function(a){return a.value})};c.prototype.forEach=function(a,b){for(var d=this.entries(),c;!(c=d.next()).done;)c=c.value,a.call(b,c[1],c[0],this)};c.prototype[Symbol.iterator]=c.prototype.entries;var m=0;return c},"es6-impl","es3");g.ASSUME_NO_NATIVE_SET=!1;
|
14
|
+
g.polyfill("Set",function(a){function b(a){this.map_=new Map;if(a){a=g.makeIterator(a);for(var b;!(b=a.next()).done;)this.add(b.value)}this.size=this.map_.size}if(!g.ASSUME_NO_NATIVE_SET&&function(){if(!a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var b=Object.seal({x:4}),e=new a(g.makeIterator([b]));if(!e.has(b)||1!=e.size||e.add(b)!=e||1!=e.size||e.add({x:4})!=e||2!=e.size)return!1;var c=e.entries(),d=c.next();if(d.done||d.value[0]!=b||d.value[1]!=b)return!1;d=c.next();return d.done||
|
15
|
+
d.value[0]==b||4!=d.value[0].x||d.value[1]!=d.value[0]?!1:c.next().done}catch(m){return!1}}())return a;g.initSymbol();g.initSymbolIterator();b.prototype.add=function(a){this.map_.set(a,a);this.size=this.map_.size;return this};b.prototype.delete=function(a){a=this.map_.delete(a);this.size=this.map_.size;return a};b.prototype.clear=function(){this.map_.clear();this.size=0};b.prototype.has=function(a){return this.map_.has(a)};b.prototype.entries=function(){return this.map_.entries()};b.prototype.values=
|
16
|
+
function(){return this.map_.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(a,b){var c=this;this.map_.forEach(function(d){return a.call(b,d,d,c)})};return b},"es6-impl","es3");g.EXPOSE_ASYNC_EXECUTOR=!0;g.FORCE_POLYFILL_PROMISE=!1;
|
17
|
+
g.polyfill("Promise",function(a){function b(a){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];var b=this.createResolveAndReject_();try{a(b.resolve,b.reject)}catch(l){b.reject(l)}}function f(){this.batch_=null}if(a&&!g.FORCE_POLYFILL_PROMISE)return a;f.prototype.asyncExecute=function(a){null==this.batch_&&(this.batch_=[],this.asyncExecuteBatch_());this.batch_.push(a);return this};f.prototype.asyncExecuteBatch_=function(){var a=this;this.asyncExecuteFunction(function(){a.executeBatch_()})};
|
18
|
+
var e=g.global.setTimeout;f.prototype.asyncExecuteFunction=function(a){e(a,0)};f.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var a=this.batch_;this.batch_=[];for(var b=0;b<a.length;++b){var c=a[b];delete a[b];try{c()}catch(q){this.asyncThrow_(q)}}}this.batch_=null};f.prototype.asyncThrow_=function(a){this.asyncExecuteFunction(function(){throw a;})};b.prototype.createResolveAndReject_=function(){function a(a){return function(d){c||(c=!0,a.call(b,d))}}var b=this,c=!1;return{resolve:a(this.resolveTo_),
|
19
|
+
reject:a(this.reject_)}};b.prototype.resolveTo_=function(a){if(a===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(a instanceof b)this.settleSameAsPromise_(a);else{var d;a:switch(typeof a){case "object":d=null!=a;break a;case "function":d=!0;break a;default:d=!1}d?this.resolveToNonPromiseObj_(a):this.fulfill_(a)}};b.prototype.resolveToNonPromiseObj_=function(a){var b=void 0;try{b=a.then}catch(l){this.reject_(l);return}"function"==typeof b?this.settleSameAsThenable_(b,
|
20
|
+
a):this.fulfill_(a)};b.prototype.reject_=function(a){this.settle_(2,a)};b.prototype.fulfill_=function(a){this.settle_(1,a)};b.prototype.settle_=function(a,b){if(0!=this.state_)throw Error("Cannot settle("+a+", "+b|"): Promise already settled in state"+this.state_);this.state_=a;this.result_=b;this.executeOnSettledCallbacks_()};b.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var a=this.onSettledCallbacks_,b=0;b<a.length;++b)a[b].call(),a[b]=null;this.onSettledCallbacks_=
|
21
|
+
null}};var c=new f;b.prototype.settleSameAsPromise_=function(a){var b=this.createResolveAndReject_();a.callWhenSettled_(b.resolve,b.reject)};b.prototype.settleSameAsThenable_=function(a,b){var c=this.createResolveAndReject_();try{a.call(b,c.resolve,c.reject)}catch(q){c.reject(q)}};b.prototype.then=function(a,c){function d(a,b){return"function"==typeof a?function(b){try{f(a(b))}catch(G){e(G)}}:b}var f,e,m=new b(function(a,b){f=a;e=b});this.callWhenSettled_(d(a,f),d(c,e));return m};b.prototype.catch=
|
22
|
+
function(a){return this.then(void 0,a)};b.prototype.callWhenSettled_=function(a,b){function d(){switch(f.state_){case 1:a(f.result_);break;case 2:b(f.result_);break;default:throw Error("Unexpected state: "+f.state_);}}var f=this;null==this.onSettledCallbacks_?c.asyncExecute(d):this.onSettledCallbacks_.push(function(){c.asyncExecute(d)})};b.resolve=function(a){return a instanceof b?a:new b(function(b){b(a)})};b.reject=function(a){return new b(function(b,c){c(a)})};b.race=function(a){return new b(function(c,
|
23
|
+
d){for(var f=g.makeIterator(a),e=f.next();!e.done;e=f.next())b.resolve(e.value).callWhenSettled_(c,d)})};b.all=function(a){var c=g.makeIterator(a),d=c.next();return d.done?b.resolve([]):new b(function(a,f){function e(b){return function(c){m[b]=c;l--;0==l&&a(m)}}var m=[],l=0;do m.push(void 0),l++,b.resolve(d.value).callWhenSettled_(e(m.length-1),f),d=c.next();while(!d.done)})};g.EXPOSE_ASYNC_EXECUTOR&&(b.$jscomp$new$AsyncExecutor=function(){return new f});return b},"es6-impl","es3");
|
24
|
+
g.polyfill("Object.setPrototypeOf",function(a){return a?a:"object"!=typeof"".__proto__?null:function(a,f){a.__proto__=f;if(a.__proto__!==f)throw new TypeError(a+" is not extensible");return a}},"es6","es5");var h={},k=new function(){};h.default=k;var n={},p=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function r(a,b){for(;b&&b!==a&&!b.nextSibling;)b=b.parentNode;return b&&b!==a?b.nextSibling:null}
|
25
|
+
function t(a,b,f){f=void 0===f?new Set:f;for(var e=a;e;){if(e.nodeType===Node.ELEMENT_NODE){var c=e;b(c);var d=c.localName;if("link"===d&&"import"===c.getAttribute("rel")){e=c.import;if(e instanceof Node&&!f.has(e))for(f.add(e),e=e.firstChild;e;e=e.nextSibling)t(e,b,f);e=r(a,c);continue}else if("template"===d){e=r(a,c);continue}if(c=c.__CE_shadowRoot)for(c=c.firstChild;c;c=c.nextSibling)t(c,b,f)}e=e.firstChild?e.firstChild:r(a,e)}}
|
26
|
+
n.isValidCustomElementName=function(a){var b=p.has(a);a=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(a);return!b&&a};n.isConnected=function(a){var b=a.isConnected;if(void 0!==b)return b;for(;a&&!(a.__CE_isImportDocument||a instanceof Document);)a=a.parentNode||(window.ShadowRoot&&a instanceof ShadowRoot?a.host:void 0);return!(!a||!(a.__CE_isImportDocument||a instanceof Document))};n.walkDeepDescendantElements=t;n.setPropertyUnchecked=function(a,b,f){a[b]=f};var u={default:{custom:1,failed:2}};var w={};function x(){this._localNameToDefinition=new Map;this._constructorToDefinition=new Map;this._patches=[];this._hasPatches=!1}x.prototype.setDefinition=function(a,b){this._localNameToDefinition.set(a,b);this._constructorToDefinition.set(b.constructor,b)};x.prototype.localNameToDefinition=function(a){return this._localNameToDefinition.get(a)};x.prototype.constructorToDefinition=function(a){return this._constructorToDefinition.get(a)};x.prototype.addPatch=function(a){this._hasPatches=!0;this._patches.push(a)};
|
27
|
+
x.prototype.patchTree=function(a){var b=this;this._hasPatches&&n.walkDeepDescendantElements(a,function(a){return b.patch(a)})};x.prototype.patch=function(a){if(this._hasPatches&&!a.__CE_patched){a.__CE_patched=!0;for(var b=0;b<this._patches.length;b++)this._patches[b](a)}};x.prototype.connectTree=function(a){var b=[];n.walkDeepDescendantElements(a,function(a){return b.push(a)});for(a=0;a<b.length;a++){var f=b[a];f.__CE_state===u.default.custom?this.connectedCallback(f):this.upgradeElement(f)}};
|
28
|
+
x.prototype.disconnectTree=function(a){var b=[];n.walkDeepDescendantElements(a,function(a){return b.push(a)});for(a=0;a<b.length;a++){var f=b[a];f.__CE_state===u.default.custom&&this.disconnectedCallback(f)}};
|
29
|
+
x.prototype.patchAndUpgradeTree=function(a,b){b=void 0===b?new Set:b;var f=this,e=[];n.walkDeepDescendantElements(a,function(a){if("link"===a.localName&&"import"===a.getAttribute("rel")){var c=a.import;c instanceof Node&&"complete"===c.readyState?(c.__CE_isImportDocument=!0,c.__CE_hasRegistry=!0):a.addEventListener("load",function(){var c=a.import;c.__CE_documentLoadHandled||(c.__CE_documentLoadHandled=!0,c.__CE_isImportDocument=!0,c.__CE_hasRegistry=!0,new Set(b),b.delete(c),f.patchAndUpgradeTree(c,
|
30
|
+
b))})}else e.push(a)},b);if(this._hasPatches)for(a=0;a<e.length;a++)this.patch(e[a]);for(a=0;a<e.length;a++)this.upgradeElement(e[a])};
|
31
|
+
x.prototype.upgradeElement=function(a){if(void 0===a.__CE_state){var b=this.localNameToDefinition(a.localName);if(b){b.constructionStack.push(a);var f=b.constructor;try{try{if(new f!==a)throw Error("The custom element constructor did not produce the element being upgraded.");}finally{b.constructionStack.pop()}}catch(d){throw a.__CE_state=u.default.failed,d;}a.__CE_state=u.default.custom;a.__CE_definition=b;if(b.attributeChangedCallback)for(b=b.observedAttributes,f=0;f<b.length;f++){var e=b[f],c=a.getAttribute(e);
|
32
|
+
null!==c&&this.attributeChangedCallback(a,e,null,c,null)}n.isConnected(a)&&this.connectedCallback(a)}}};x.prototype.connectedCallback=function(a){var b=a.__CE_definition;b.connectedCallback&&b.connectedCallback.call(a)};x.prototype.disconnectedCallback=function(a){var b=a.__CE_definition;b.disconnectedCallback&&b.disconnectedCallback.call(a)};
|
33
|
+
x.prototype.attributeChangedCallback=function(a,b,f,e,c){var d=a.__CE_definition;d.attributeChangedCallback&&-1<d.observedAttributes.indexOf(b)&&d.attributeChangedCallback.call(a,b,f,e,c)};w.default=x;var y={};function z(a,b){this._internals=a;this._document=b;this._observer=void 0;this._internals.patchAndUpgradeTree(this._document);"loading"===this._document.readyState&&(this._observer=new MutationObserver(this._handleMutations.bind(this)),this._observer.observe(this._document,{childList:!0,subtree:!0}))}z.prototype.disconnect=function(){this._observer&&this._observer.disconnect()};
|
34
|
+
z.prototype._handleMutations=function(a){var b=this._document.readyState;"interactive"!==b&&"complete"!==b||this.disconnect();for(b=0;b<a.length;b++)for(var f=a[b].addedNodes,e=0;e<f.length;e++)this._internals.patchAndUpgradeTree(f[e])};y.default=z;var A={};function B(){var a=this;this._resolve=this._value=void 0;this._promise=new Promise(function(b){a._resolve=b;a._value&&b(a._value)})}B.prototype.resolve=function(a){if(this._value)throw Error("Already resolved.");this._value=a;this._resolve&&this._resolve(a)};B.prototype.toPromise=function(){return this._promise};A.default=B;var C={};function D(a){this._elementDefinitionIsRunning=!1;this._internals=a;this._whenDefinedDeferred=new Map;this._flushCallback=function(a){return a()};this._flushPending=!1;this._unflushedLocalNames=[];this._documentConstructionObserver=new y.default(a,document)}
|
35
|
+
D.prototype.define=function(a,b){var f=this;if(!(b instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!n.isValidCustomElementName(a))throw new SyntaxError("The element name '"+a+"' is not valid.");if(this._internals.localNameToDefinition(a))throw Error("A custom element with name '"+a+"' has already been defined.");if(this._elementDefinitionIsRunning)throw Error("A custom element is already being defined.");this._elementDefinitionIsRunning=!0;var e,c,d,m,
|
36
|
+
l;try{var q=function(a){var b=v[a];if(void 0!==b&&!(b instanceof Function))throw Error("The '"+a+"' callback must be a function.");return b},v=b.prototype;if(!(v instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");e=q("connectedCallback");c=q("disconnectedCallback");d=q("adoptedCallback");m=q("attributeChangedCallback");l=b.observedAttributes||[]}catch(Q){return}finally{this._elementDefinitionIsRunning=!1}this._internals.setDefinition(a,{localName:a,
|
37
|
+
constructor:b,connectedCallback:e,disconnectedCallback:c,adoptedCallback:d,attributeChangedCallback:m,observedAttributes:l,constructionStack:[]});this._unflushedLocalNames.push(a);this._flushPending||(this._flushPending=!0,this._flushCallback(function(){return f._flush()}))};
|
38
|
+
D.prototype._flush=function(){if(!1!==this._flushPending)for(this._flushPending=!1,this._internals.patchAndUpgradeTree(document);0<this._unflushedLocalNames.length;){var a=this._unflushedLocalNames.shift();(a=this._whenDefinedDeferred.get(a))&&a.resolve(void 0)}};D.prototype.get=function(a){if(a=this._internals.localNameToDefinition(a))return a.constructor};
|
39
|
+
D.prototype.whenDefined=function(a){if(!n.isValidCustomElementName(a))return Promise.reject(new SyntaxError("'"+a+"' is not a valid custom element name."));var b=this._whenDefinedDeferred.get(a);if(b)return b.toPromise();b=new A.default;this._whenDefinedDeferred.set(a,b);this._internals.localNameToDefinition(a)&&-1===this._unflushedLocalNames.indexOf(a)&&b.resolve(void 0);return b.toPromise()};
|
40
|
+
D.prototype.polyfillWrapFlushCallback=function(a){this._documentConstructionObserver.disconnect();var b=this._flushCallback;this._flushCallback=function(f){return a(function(){return b(f)})}};window.CustomElementRegistry=D;D.prototype.define=D.prototype.define;D.prototype.get=D.prototype.get;D.prototype.whenDefined=D.prototype.whenDefined;D.prototype.polyfillWrapFlushCallback=D.prototype.polyfillWrapFlushCallback;C.default=D;var E={},F={Document_createElement:window.Document.prototype.createElement,Document_createElementNS:window.Document.prototype.createElementNS,Document_importNode:window.Document.prototype.importNode,Document_prepend:window.Document.prototype.prepend,Document_append:window.Document.prototype.append,Node_cloneNode:window.Node.prototype.cloneNode,Node_appendChild:window.Node.prototype.appendChild,Node_insertBefore:window.Node.prototype.insertBefore,Node_removeChild:window.Node.prototype.removeChild,
|
41
|
+
Node_replaceChild:window.Node.prototype.replaceChild,Node_textContent:Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),Element_attachShadow:window.Element.prototype.attachShadow,Element_innerHTML:Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),Element_getAttribute:window.Element.prototype.getAttribute,Element_setAttribute:window.Element.prototype.setAttribute,Element_removeAttribute:window.Element.prototype.removeAttribute,Element_getAttributeNS:window.Element.prototype.getAttributeNS,
|
42
|
+
Element_setAttributeNS:window.Element.prototype.setAttributeNS,Element_removeAttributeNS:window.Element.prototype.removeAttributeNS,Element_insertAdjacentElement:window.Element.prototype.insertAdjacentElement,Element_prepend:window.Element.prototype.prepend,Element_append:window.Element.prototype.append,Element_before:window.Element.prototype.before,Element_after:window.Element.prototype.after,Element_replaceWith:window.Element.prototype.replaceWith,Element_remove:window.Element.prototype.remove,
|
43
|
+
HTMLElement:window.HTMLElement,HTMLElement_innerHTML:Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),HTMLElement_insertAdjacentElement:window.HTMLElement.prototype.insertAdjacentElement};E.default=F;var H={default:function(a){window.HTMLElement=function(){function b(){var b=this.constructor,e=a.constructorToDefinition(b);if(!e)throw Error("The custom element being constructed was not registered with `customElements`.");var c=e.constructionStack;if(0===c.length)return c=E.default.Document_createElement.call(document,e.localName),Object.setPrototypeOf(c,b.prototype),c.__CE_state=u.default.custom,c.__CE_definition=e,a.patch(c),c;var e=c.length-1,d=c[e];if(d===h.default)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");
|
44
|
+
c[e]=h.default;Object.setPrototypeOf(d,b.prototype);a.patch(d);return d}b.prototype=E.default.HTMLElement.prototype;return b}()}};var I={default:function(a,b,f){b.prepend=function(b){for(var c=[],d=0;d<arguments.length;++d)c[d-0]=arguments[d];d=c.filter(function(a){return a instanceof Node&&n.isConnected(a)});f.prepend.apply(this,c);for(var e=0;e<d.length;e++)a.disconnectTree(d[e]);if(n.isConnected(this))for(d=0;d<c.length;d++)e=c[d],e instanceof Element&&a.connectTree(e)};b.append=function(b){for(var c=[],d=0;d<arguments.length;++d)c[d-0]=arguments[d];d=c.filter(function(a){return a instanceof Node&&n.isConnected(a)});f.append.apply(this,
|
45
|
+
c);for(var e=0;e<d.length;e++)a.disconnectTree(d[e]);if(n.isConnected(this))for(d=0;d<c.length;d++)e=c[d],e instanceof Element&&a.connectTree(e)}}};var J={default:function(a){n.setPropertyUnchecked(Document.prototype,"createElement",function(b){if(this.__CE_hasRegistry){var f=a.localNameToDefinition(b);if(f)return new f.constructor}b=E.default.Document_createElement.call(this,b);a.patch(b);return b});n.setPropertyUnchecked(Document.prototype,"importNode",function(b,f){b=E.default.Document_importNode.call(this,b,f);this.__CE_hasRegistry?a.patchAndUpgradeTree(b):a.patchTree(b);return b});n.setPropertyUnchecked(Document.prototype,"createElementNS",
|
46
|
+
function(b,f){if(this.__CE_hasRegistry&&(null===b||"http://www.w3.org/1999/xhtml"===b)){var e=a.localNameToDefinition(f);if(e)return new e.constructor}b=E.default.Document_createElementNS.call(this,b,f);a.patch(b);return b});I.default(a,Document.prototype,{prepend:E.default.Document_prepend,append:E.default.Document_append})}};var K={default:function(a){function b(b,e){Object.defineProperty(b,"textContent",{enumerable:e.enumerable,configurable:!0,get:e.get,set:function(b){if(this.nodeType===Node.TEXT_NODE)e.set.call(this,b);else{var c=void 0;if(this.firstChild){var f=this.childNodes,l=f.length;if(0<l&&n.isConnected(this))for(var c=Array(l),q=0;q<l;q++)c[q]=f[q]}e.set.call(this,b);if(c)for(b=0;b<c.length;b++)a.disconnectTree(c[b])}}})}n.setPropertyUnchecked(Node.prototype,"insertBefore",function(b,e){if(b instanceof DocumentFragment){var c=
|
47
|
+
Array.prototype.slice.apply(b.childNodes);b=E.default.Node_insertBefore.call(this,b,e);if(n.isConnected(this))for(e=0;e<c.length;e++)a.connectTree(c[e]);return b}c=n.isConnected(b);e=E.default.Node_insertBefore.call(this,b,e);c&&a.disconnectTree(b);n.isConnected(this)&&a.connectTree(b);return e});n.setPropertyUnchecked(Node.prototype,"appendChild",function(b){if(b instanceof DocumentFragment){var e=Array.prototype.slice.apply(b.childNodes);b=E.default.Node_appendChild.call(this,b);if(n.isConnected(this))for(var c=
|
48
|
+
0;c<e.length;c++)a.connectTree(e[c]);return b}e=n.isConnected(b);c=E.default.Node_appendChild.call(this,b);e&&a.disconnectTree(b);n.isConnected(this)&&a.connectTree(b);return c});n.setPropertyUnchecked(Node.prototype,"cloneNode",function(b){b=E.default.Node_cloneNode.call(this,b);this.ownerDocument.__CE_hasRegistry?a.patchAndUpgradeTree(b):a.patchTree(b);return b});n.setPropertyUnchecked(Node.prototype,"removeChild",function(b){var e=n.isConnected(b),c=E.default.Node_removeChild.call(this,b);e&&a.disconnectTree(b);
|
49
|
+
return c});n.setPropertyUnchecked(Node.prototype,"replaceChild",function(b,e){if(b instanceof DocumentFragment){var c=Array.prototype.slice.apply(b.childNodes);b=E.default.Node_replaceChild.call(this,b,e);if(n.isConnected(this))for(a.disconnectTree(e),e=0;e<c.length;e++)a.connectTree(c[e]);return b}var c=n.isConnected(b),d=E.default.Node_replaceChild.call(this,b,e),f=n.isConnected(this);f&&a.disconnectTree(e);c&&a.disconnectTree(b);f&&a.connectTree(b);return d});E.default.Node_textContent&&E.default.Node_textContent.get?
|
50
|
+
b(Node.prototype,E.default.Node_textContent):a.addPatch(function(a){b(a,{enumerable:!0,configurable:!0,get:function(){for(var a=[],b=0;b<this.childNodes.length;b++)a.push(this.childNodes[b].textContent);return a.join("")},set:function(a){for(;this.firstChild;)E.default.Node_removeChild.call(this,this.firstChild);E.default.Node_appendChild.call(this,document.createTextNode(a))}})})}};var L={default:function(a,b,f){b.before=function(b){for(var c=[],d=0;d<arguments.length;++d)c[d-0]=arguments[d];d=c.filter(function(a){return a instanceof Node&&n.isConnected(a)});f.before.apply(this,c);for(var e=0;e<d.length;e++)a.disconnectTree(d[e]);if(n.isConnected(this))for(d=0;d<c.length;d++)e=c[d],e instanceof Element&&a.connectTree(e)};b.after=function(b){for(var c=[],d=0;d<arguments.length;++d)c[d-0]=arguments[d];d=c.filter(function(a){return a instanceof Node&&n.isConnected(a)});f.after.apply(this,
|
51
|
+
c);for(var e=0;e<d.length;e++)a.disconnectTree(d[e]);if(n.isConnected(this))for(d=0;d<c.length;d++)e=c[d],e instanceof Element&&a.connectTree(e)};b.replaceWith=function(b){for(var c=[],d=0;d<arguments.length;++d)c[d-0]=arguments[d];var d=c.filter(function(a){return a instanceof Node&&n.isConnected(a)}),e=n.isConnected(this);f.replaceWith.apply(this,c);for(var l=0;l<d.length;l++)a.disconnectTree(d[l]);if(e)for(a.disconnectTree(this),d=0;d<c.length;d++)e=c[d],e instanceof Element&&a.connectTree(e)};
|
52
|
+
b.remove=function(){var b=n.isConnected(this);f.remove.call(this);b&&a.disconnectTree(this)}}};var M={default:function(a){function b(b,d){Object.defineProperty(b,"innerHTML",{enumerable:d.enumerable,configurable:!0,get:d.get,set:function(b){var c=this,e=void 0;n.isConnected(this)&&(e=[],n.walkDeepDescendantElements(this,function(a){a!==c&&e.push(a)}));d.set.call(this,b);if(e)for(var f=0;f<e.length;f++){var m=e[f];m.__CE_state===u.default.custom&&a.disconnectedCallback(m)}this.ownerDocument.__CE_hasRegistry?a.patchAndUpgradeTree(this):a.patchTree(this);return b}})}function f(b,d){n.setPropertyUnchecked(b,
|
53
|
+
"insertAdjacentElement",function(b,c){var e=n.isConnected(c);b=d.call(this,b,c);e&&a.disconnectTree(c);n.isConnected(b)&&a.connectTree(c);return b})}E.default.Element_attachShadow?n.setPropertyUnchecked(Element.prototype,"attachShadow",function(a){return this.__CE_shadowRoot=a=E.default.Element_attachShadow.call(this,a)}):console.warn("Custom Elements: `Element#attachShadow` was not patched.");if(E.default.Element_innerHTML&&E.default.Element_innerHTML.get)b(Element.prototype,E.default.Element_innerHTML);
|
54
|
+
else if(E.default.HTMLElement_innerHTML&&E.default.HTMLElement_innerHTML.get)b(HTMLElement.prototype,E.default.HTMLElement_innerHTML);else{var e=E.default.Document_createElement.call(document,"div");a.addPatch(function(a){b(a,{enumerable:!0,configurable:!0,get:function(){return E.default.Node_cloneNode.call(this,!0).innerHTML},set:function(a){var b="template"===this.localName?this.content:this;for(e.innerHTML=a;0<b.childNodes.length;)E.default.Node_removeChild.call(b,b.childNodes[0]);for(;0<e.childNodes.length;)E.default.Node_appendChild.call(b,
|
55
|
+
e.childNodes[0])}})})}n.setPropertyUnchecked(Element.prototype,"setAttribute",function(b,d){if(this.__CE_state!==u.default.custom)return E.default.Element_setAttribute.call(this,b,d);var c=E.default.Element_getAttribute.call(this,b);E.default.Element_setAttribute.call(this,b,d);d=E.default.Element_getAttribute.call(this,b);c!==d&&a.attributeChangedCallback(this,b,c,d,null)});n.setPropertyUnchecked(Element.prototype,"setAttributeNS",function(b,d,e){if(this.__CE_state!==u.default.custom)return E.default.Element_setAttributeNS.call(this,
|
56
|
+
b,d,e);var c=E.default.Element_getAttributeNS.call(this,b,d);E.default.Element_setAttributeNS.call(this,b,d,e);e=E.default.Element_getAttributeNS.call(this,b,d);c!==e&&a.attributeChangedCallback(this,d,c,e,b)});n.setPropertyUnchecked(Element.prototype,"removeAttribute",function(b){if(this.__CE_state!==u.default.custom)return E.default.Element_removeAttribute.call(this,b);var c=E.default.Element_getAttribute.call(this,b);E.default.Element_removeAttribute.call(this,b);null!==c&&a.attributeChangedCallback(this,
|
57
|
+
b,c,null,null)});n.setPropertyUnchecked(Element.prototype,"removeAttributeNS",function(b,d){if(this.__CE_state!==u.default.custom)return E.default.Element_removeAttributeNS.call(this,b,d);var c=E.default.Element_getAttributeNS.call(this,b,d);E.default.Element_removeAttributeNS.call(this,b,d);var e=E.default.Element_getAttributeNS.call(this,b,d);c!==e&&a.attributeChangedCallback(this,d,c,e,b)});E.default.HTMLElement_insertAdjacentElement?f(HTMLElement.prototype,E.default.HTMLElement_insertAdjacentElement):
|
58
|
+
E.default.Element_insertAdjacentElement?f(Element.prototype,E.default.Element_insertAdjacentElement):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched.");I.default(a,Element.prototype,{prepend:E.default.Element_prepend,append:E.default.Element_append});L.default(a,Element.prototype,{before:E.default.Element_before,after:E.default.Element_after,replaceWith:E.default.Element_replaceWith,remove:E.default.Element_remove})}};/*
|
45
59
|
|
46
60
|
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
47
61
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
@@ -50,5 +64,5 @@ Aa(a,Element.prototype,{u:ra,append:sa});Da(a)};/*
|
|
50
64
|
Code distributed by Google as part of the polymer project is also
|
51
65
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
52
66
|
*/
|
53
|
-
var
|
67
|
+
var N=window.customElements;if(!N||N.forcePolyfill||"function"!=typeof N.define||"function"!=typeof N.get){var O=new w.default;H.default(O);J.default(O);K.default(O);M.default(O);document.__CE_hasRegistry=!0;var P=new C.default(O);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:P})};
|
54
68
|
}).call(self);
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tao_on_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Siyuan Liu
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-02
|
12
|
+
date: 2017-03-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: turbolinks
|