@tradeshift/elements
Advanced tools
Comparing version 0.14.1 to 0.14.2
@@ -14,3 +14,3 @@ function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function e(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}function n(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function r(t){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function i(t,e){return(i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function o(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function s(t,e,n){return(s=o()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&i(o,n.prototype),o}).apply(null,arguments)}function a(t){var e="function"==typeof Map?new Map:void 0;return(a=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,o)}function o(){return s(t,arguments,r(this).constructor)}return o.prototype=Object.create(t.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),i(o,t)})(t)} | ||
* http://polymer.github.io/PATENTS.txt | ||
*/var u=new WeakMap,c=function(t){return"function"==typeof t&&u.has(t)},l=void 0!==window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,h=function(t,e,n){for(void 0===n&&(n=null);e!==n;){var r=e.nextSibling;t.removeChild(e),e=r}},p={},d={},f="{{lit-"+String(Math.random()).slice(2)+"}}",v="\x3c!--"+f+"--\x3e",y=new RegExp(f+"|"+v),m=function(t,e){this.parts=[],this.element=e;for(var n=[],r=[],i=document.createTreeWalker(e.content,133,null,!1),o=0,s=-1,a=0,u=t.strings,c=t.values.length;a<c;){var l=i.nextNode();if(null!==l){if(s++,1===l.nodeType){if(l.hasAttributes()){for(var h=l.attributes,p=h.length,d=0,v=0;v<p;v++)_(h[v].name,"$lit$")&&d++;for(;d-- >0;){var m=u[a],g=b.exec(m)[2],w=g.toLowerCase()+"$lit$",E=l.getAttribute(w);l.removeAttribute(w);var P=E.split(y);this.parts.push({type:"attribute",index:s,name:g,strings:P}),a+=P.length-1}}"TEMPLATE"===l.tagName&&(r.push(l),i.currentNode=l.content)}else if(3===l.nodeType){var x=l.data;if(x.indexOf(f)>=0){for(var C=l.parentNode,A=x.split(y),T=A.length-1,N=0;N<T;N++){var O=void 0,k=A[N];if(""===k)O=S();else{var R=b.exec(k);null!==R&&_(R[2],"$lit$")&&(k=k.slice(0,R.index)+R[1]+R[2].slice(0,-"$lit$".length)+R[3]),O=document.createTextNode(k)}C.insertBefore(O,l),this.parts.push({type:"node",index:++s})}""===A[T]?(C.insertBefore(S(),l),n.push(l)):l.data=A[T],a+=T}}else if(8===l.nodeType)if(l.data===f){var j=l.parentNode;null!==l.previousSibling&&s!==o||(s++,j.insertBefore(S(),l)),o=s,this.parts.push({type:"node",index:s}),null===l.nextSibling?l.data="":(n.push(l),s--),a++}else for(var L=-1;-1!==(L=l.data.indexOf(f,L+1));)this.parts.push({type:"node",index:-1}),a++}else i.currentNode=r.pop()}for(var V=0,U=n;V<U.length;V++){var M=U[V];M.parentNode.removeChild(M)}},_=function(t,e){var n=t.length-e.length;return n>=0&&t.slice(n)===e},g=function(t){return-1!==t.index},S=function(){return document.createComment("")},b=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/,w=function(){function t(t,e,n){this.__parts=[],this.template=t,this.processor=e,this.options=n}var e=t.prototype;return e.update=function(t){var e=0,n=this.__parts,r=Array.isArray(n),i=0;for(n=r?n:n[Symbol.iterator]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}void 0!==o&&o.setValue(t[e]),e++}var s=this.__parts,a=Array.isArray(s),u=0;for(s=a?s:s[Symbol.iterator]();;){var c;if(a){if(u>=s.length)break;c=s[u++]}else{if((u=s.next()).done)break;c=u.value}void 0!==c&&c.commit()}},e._clone=function(){for(var t,e=l?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),n=[],r=this.template.parts,i=document.createTreeWalker(e,133,null,!1),o=0,s=0,a=i.nextNode();o<r.length;)if(t=r[o],g(t)){for(;s<t.index;)s++,"TEMPLATE"===a.nodeName&&(n.push(a),i.currentNode=a.content),null===(a=i.nextNode())&&(i.currentNode=n.pop(),a=i.nextNode());if("node"===t.type){var u=this.processor.handleTextExpression(this.options);u.insertAfterNode(a.previousSibling),this.__parts.push(u)}else{var c;(c=this.__parts).push.apply(c,this.processor.handleAttributeExpressions(a,t.name,t.strings,this.options))}o++}else this.__parts.push(void 0),o++;return l&&(document.adoptNode(e),customElements.upgrade(e)),e},t}(),E=" "+f+" ",P=function(){function t(t,e,n,r){this.strings=t,this.values=e,this.type=n,this.processor=r}var e=t.prototype;return e.getHTML=function(){for(var t=this.strings.length-1,e="",n=!1,r=0;r<t;r++){var i=this.strings[r],o=i.lastIndexOf("\x3c!--");n=(o>-1||n)&&-1===i.indexOf("--\x3e",o+1);var s=b.exec(i);e+=null===s?i+(n?E:v):i.substr(0,s.index)+s[1]+s[2]+"$lit$"+s[3]+f}return e+=this.strings[t]},e.getTemplateElement=function(){var t=document.createElement("template");return t.innerHTML=this.getHTML(),t},t}(),x=function(t){return null===t||!("object"==typeof t||"function"==typeof t)},C=function(t){return Array.isArray(t)||!(!t||!t[Symbol.iterator])},A=function(){function t(t,e,n){this.dirty=!0,this.element=t,this.name=e,this.strings=n,this.parts=[];for(var r=0;r<n.length-1;r++)this.parts[r]=this._createPart()}var e=t.prototype;return e._createPart=function(){return new T(this)},e._getValue=function(){for(var t=this.strings,e=t.length-1,n="",r=0;r<e;r++){n+=t[r];var i=this.parts[r];if(void 0!==i){var o=i.value;if(x(o)||!C(o))n+="string"==typeof o?o:String(o);else{var s=o,a=Array.isArray(s),u=0;for(s=a?s:s[Symbol.iterator]();;){var c;if(a){if(u>=s.length)break;c=s[u++]}else{if((u=s.next()).done)break;c=u.value}n+="string"==typeof c?c:String(c)}}}}return n+=t[e]},e.commit=function(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))},t}(),T=function(){function t(t){this.value=void 0,this.committer=t}var e=t.prototype;return e.setValue=function(t){t===p||x(t)&&t===this.value||(this.value=t,c(t)||(this.committer.dirty=!0))},e.commit=function(){for(;c(this.value);){var t=this.value;this.value=p,t(this)}this.value!==p&&this.committer.commit()},t}(),N=function(){function t(t){this.value=void 0,this.__pendingValue=void 0,this.options=t}var e=t.prototype;return e.appendInto=function(t){this.startNode=t.appendChild(S()),this.endNode=t.appendChild(S())},e.insertAfterNode=function(t){this.startNode=t,this.endNode=t.nextSibling},e.appendIntoPart=function(t){t.__insert(this.startNode=S()),t.__insert(this.endNode=S())},e.insertAfterPart=function(t){t.__insert(this.startNode=S()),this.endNode=t.endNode,t.endNode=this.startNode},e.setValue=function(t){this.__pendingValue=t},e.commit=function(){for(;c(this.__pendingValue);){var t=this.__pendingValue;this.__pendingValue=p,t(this)}var e=this.__pendingValue;e!==p&&(x(e)?e!==this.value&&this.__commitText(e):e instanceof P?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):C(e)?this.__commitIterable(e):e===d?(this.value=d,this.clear()):this.__commitText(e))},e.__insert=function(t){this.endNode.parentNode.insertBefore(t,this.endNode)},e.__commitNode=function(t){this.value!==t&&(this.clear(),this.__insert(t),this.value=t)},e.__commitText=function(t){var e=this.startNode.nextSibling,n="string"==typeof(t=null==t?"":t)?t:String(t);e===this.endNode.previousSibling&&3===e.nodeType?e.data=n:this.__commitNode(document.createTextNode(n)),this.value=t},e.__commitTemplateResult=function(t){var e=this.options.templateFactory(t);if(this.value instanceof w&&this.value.template===e)this.value.update(t.values);else{var n=new w(e,t.processor,this.options),r=n._clone();n.update(t.values),this.__commitNode(r),this.value=n}},e.__commitIterable=function(e){Array.isArray(this.value)||(this.value=[],this.clear());var n,r=this.value,i=0,o=e,s=Array.isArray(o),a=0;for(o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{if((a=o.next()).done)break;u=a.value}var c=u;void 0===(n=r[i])&&(n=new t(this.options),r.push(n),0===i?n.appendIntoPart(this):n.insertAfterPart(r[i-1])),n.setValue(c),n.commit(),i++}i<r.length&&(r.length=i,this.clear(n&&n.endNode))},e.clear=function(t){void 0===t&&(t=this.startNode),h(this.startNode.parentNode,t.nextSibling,this.endNode)},t}(),O=function(){function t(t,e,n){if(this.value=void 0,this.__pendingValue=void 0,2!==n.length||""!==n[0]||""!==n[1])throw new Error("Boolean attributes can only contain a single expression");this.element=t,this.name=e,this.strings=n}var e=t.prototype;return e.setValue=function(t){this.__pendingValue=t},e.commit=function(){for(;c(this.__pendingValue);){var t=this.__pendingValue;this.__pendingValue=p,t(this)}if(this.__pendingValue!==p){var e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=p}},t}(),k=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.single=2===r.length&&""===r[0]&&""===r[1],i}n(e,t);var r=e.prototype;return r._createPart=function(){return new R(this)},r._getValue=function(){return this.single?this.parts[0].value:t.prototype._getValue.call(this)},r.commit=function(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())},e}(A),R=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e}(T),j=!1;try{var L={get capture(){return j=!0,!1}};window.addEventListener("test",L,L),window.removeEventListener("test",L,L)}catch(t){}var V=function(){function t(t,e,n){var r=this;this.value=void 0,this.__pendingValue=void 0,this.element=t,this.eventName=e,this.eventContext=n,this.__boundHandleEvent=function(t){return r.handleEvent(t)}}var e=t.prototype;return e.setValue=function(t){this.__pendingValue=t},e.commit=function(){for(;c(this.__pendingValue);){var t=this.__pendingValue;this.__pendingValue=p,t(this)}if(this.__pendingValue!==p){var e=this.__pendingValue,n=this.value,r=null==e||null!=n&&(e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive);r&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),null==e||null!=n&&!r||(this.__options=U(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=p}},e.handleEvent=function(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)},t}(),U=function(t){return t&&(j?{capture:t.capture,passive:t.passive,once:t.once}:t.capture)},M=new(function(){function t(){}var e=t.prototype;return e.handleAttributeExpressions=function(t,e,n,r){var i=e[0];return"."===i?new k(t,e.slice(1),n).parts:"@"===i?[new V(t,e.slice(1),r.eventContext)]:"?"===i?[new O(t,e.slice(1),n)]:new A(t,e,n).parts},e.handleTextExpression=function(t){return new N(t)},t}()); | ||
*/var u="undefined"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,c=function(t,e,n){for(void 0===n&&(n=null);e!==n;){var r=e.nextSibling;t.removeChild(e),e=r}},l="{{lit-"+String(Math.random()).slice(2)+"}}",h="\x3c!--"+l+"--\x3e",p=new RegExp(l+"|"+h),f=function(t,e){this.parts=[],this.element=e;for(var n=[],r=[],i=document.createTreeWalker(e.content,133,null,!1),o=0,s=-1,a=0,u=t.strings,c=t.values.length;a<c;){var h=i.nextNode();if(null!==h){if(s++,1===h.nodeType){if(h.hasAttributes()){for(var f=h.attributes,v=f.length,_=0,g=0;g<v;g++)d(f[g].name,"$lit$")&&_++;for(;_-- >0;){var b=u[a],w=m.exec(b)[2],S=w.toLowerCase()+"$lit$",E=h.getAttribute(S);h.removeAttribute(S);var P=E.split(p);this.parts.push({type:"attribute",index:s,name:w,strings:P}),a+=P.length-1}}"TEMPLATE"===h.tagName&&(r.push(h),i.currentNode=h.content)}else if(3===h.nodeType){var T=h.data;if(T.indexOf(l)>=0){for(var x=h.parentNode,A=T.split(p),C=A.length-1,N=0;N<C;N++){var O=void 0,j=A[N];if(""===j)O=y();else{var k=m.exec(j);null!==k&&d(k[2],"$lit$")&&(j=j.slice(0,k.index)+k[1]+k[2].slice(0,-"$lit$".length)+k[3]),O=document.createTextNode(j)}x.insertBefore(O,h),this.parts.push({type:"node",index:++s})}""===A[C]?(x.insertBefore(y(),h),n.push(h)):h.data=A[C],a+=C}}else if(8===h.nodeType)if(h.data===l){var R=h.parentNode;null!==h.previousSibling&&s!==o||(s++,R.insertBefore(y(),h)),o=s,this.parts.push({type:"node",index:s}),null===h.nextSibling?h.data="":(n.push(h),s--),a++}else for(var L=-1;-1!==(L=h.data.indexOf(l,L+1));)this.parts.push({type:"node",index:-1}),a++}else i.currentNode=r.pop()}for(var U=0,V=n;U<V.length;U++){var M=V[U];M.parentNode.removeChild(M)}},d=function(t,e){var n=t.length-e.length;return n>=0&&t.slice(n)===e},v=function(t){return-1!==t.index},y=function(){return document.createComment("")},m=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function _(t,e){for(var n=t.element.content,r=t.parts,i=document.createTreeWalker(n,133,null,!1),o=b(r),s=r[o],a=-1,u=0,c=[],l=null;i.nextNode();){a++;var h=i.currentNode;for(h.previousSibling===l&&(l=null),e.has(h)&&(c.push(h),null===l&&(l=h)),null!==l&&u++;void 0!==s&&s.index===a;)s.index=null!==l?-1:s.index-u,s=r[o=b(r,o)]}c.forEach((function(t){return t.parentNode.removeChild(t)}))}var g=function(t){for(var e=11===t.nodeType?0:1,n=document.createTreeWalker(t,133,null,!1);n.nextNode();)e++;return e},b=function(t,e){void 0===e&&(e=-1);for(var n=e+1;n<t.length;n++){var r=t[n];if(v(r))return n}return-1}; | ||
/** | ||
@@ -29,3 +29,3 @@ * @license | ||
*/ | ||
function D(t){var e=z.get(t.type);void 0===e&&(e={stringsArray:new WeakMap,keyString:new Map},z.set(t.type,e));var n=e.stringsArray.get(t.strings);if(void 0!==n)return n;var r=t.strings.join(f);return void 0===(n=e.keyString.get(r))&&(n=new m(t,t.getTemplateElement()),e.keyString.set(r,n)),e.stringsArray.set(t.strings,n),n}var z=new Map,F=new WeakMap; | ||
var w=new WeakMap,S=function(t){return"function"==typeof t&&w.has(t)},E={},P={},T=function(){function t(t,e,n){this.__parts=[],this.template=t,this.processor=e,this.options=n}var e=t.prototype;return e.update=function(t){var e=0,n=this.__parts,r=Array.isArray(n),i=0;for(n=r?n:n[Symbol.iterator]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}void 0!==o&&o.setValue(t[e]),e++}var s=this.__parts,a=Array.isArray(s),u=0;for(s=a?s:s[Symbol.iterator]();;){var c;if(a){if(u>=s.length)break;c=s[u++]}else{if((u=s.next()).done)break;c=u.value}void 0!==c&&c.commit()}},e._clone=function(){for(var t,e=u?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),n=[],r=this.template.parts,i=document.createTreeWalker(e,133,null,!1),o=0,s=0,a=i.nextNode();o<r.length;)if(t=r[o],v(t)){for(;s<t.index;)s++,"TEMPLATE"===a.nodeName&&(n.push(a),i.currentNode=a.content),null===(a=i.nextNode())&&(i.currentNode=n.pop(),a=i.nextNode());if("node"===t.type){var c=this.processor.handleTextExpression(this.options);c.insertAfterNode(a.previousSibling),this.__parts.push(c)}else{var l;(l=this.__parts).push.apply(l,this.processor.handleAttributeExpressions(a,t.name,t.strings,this.options))}o++}else this.__parts.push(void 0),o++;return u&&(document.adoptNode(e),customElements.upgrade(e)),e},t}(),x=" "+l+" ",A=function(){function t(t,e,n,r){this.strings=t,this.values=e,this.type=n,this.processor=r}var e=t.prototype;return e.getHTML=function(){for(var t=this.strings.length-1,e="",n=!1,r=0;r<t;r++){var i=this.strings[r],o=i.lastIndexOf("\x3c!--");n=(o>-1||n)&&-1===i.indexOf("--\x3e",o+1);var s=m.exec(i);e+=null===s?i+(n?x:h):i.substr(0,s.index)+s[1]+s[2]+"$lit$"+s[3]+l}return e+=this.strings[t]},e.getTemplateElement=function(){var t=document.createElement("template");return t.innerHTML=this.getHTML(),t},t}(),C=function(t){return null===t||!("object"==typeof t||"function"==typeof t)},N=function(t){return Array.isArray(t)||!(!t||!t[Symbol.iterator])},O=function(){function t(t,e,n){this.dirty=!0,this.element=t,this.name=e,this.strings=n,this.parts=[];for(var r=0;r<n.length-1;r++)this.parts[r]=this._createPart()}var e=t.prototype;return e._createPart=function(){return new j(this)},e._getValue=function(){for(var t=this.strings,e=t.length-1,n="",r=0;r<e;r++){n+=t[r];var i=this.parts[r];if(void 0!==i){var o=i.value;if(C(o)||!N(o))n+="string"==typeof o?o:String(o);else{var s=o,a=Array.isArray(s),u=0;for(s=a?s:s[Symbol.iterator]();;){var c;if(a){if(u>=s.length)break;c=s[u++]}else{if((u=s.next()).done)break;c=u.value}n+="string"==typeof c?c:String(c)}}}}return n+=t[e]},e.commit=function(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))},t}(),j=function(){function t(t){this.value=void 0,this.committer=t}var e=t.prototype;return e.setValue=function(t){t===E||C(t)&&t===this.value||(this.value=t,S(t)||(this.committer.dirty=!0))},e.commit=function(){for(;S(this.value);){var t=this.value;this.value=E,t(this)}this.value!==E&&this.committer.commit()},t}(),k=function(){function t(t){this.value=void 0,this.__pendingValue=void 0,this.options=t}var e=t.prototype;return e.appendInto=function(t){this.startNode=t.appendChild(y()),this.endNode=t.appendChild(y())},e.insertAfterNode=function(t){this.startNode=t,this.endNode=t.nextSibling},e.appendIntoPart=function(t){t.__insert(this.startNode=y()),t.__insert(this.endNode=y())},e.insertAfterPart=function(t){t.__insert(this.startNode=y()),this.endNode=t.endNode,t.endNode=this.startNode},e.setValue=function(t){this.__pendingValue=t},e.commit=function(){if(null!==this.startNode.parentNode){for(;S(this.__pendingValue);){var t=this.__pendingValue;this.__pendingValue=E,t(this)}var e=this.__pendingValue;e!==E&&(C(e)?e!==this.value&&this.__commitText(e):e instanceof A?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):N(e)?this.__commitIterable(e):e===P?(this.value=P,this.clear()):this.__commitText(e))}},e.__insert=function(t){this.endNode.parentNode.insertBefore(t,this.endNode)},e.__commitNode=function(t){this.value!==t&&(this.clear(),this.__insert(t),this.value=t)},e.__commitText=function(t){var e=this.startNode.nextSibling,n="string"==typeof(t=null==t?"":t)?t:String(t);e===this.endNode.previousSibling&&3===e.nodeType?e.data=n:this.__commitNode(document.createTextNode(n)),this.value=t},e.__commitTemplateResult=function(t){var e=this.options.templateFactory(t);if(this.value instanceof T&&this.value.template===e)this.value.update(t.values);else{var n=new T(e,t.processor,this.options),r=n._clone();n.update(t.values),this.__commitNode(r),this.value=n}},e.__commitIterable=function(e){Array.isArray(this.value)||(this.value=[],this.clear());var n,r=this.value,i=0,o=e,s=Array.isArray(o),a=0;for(o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{if((a=o.next()).done)break;u=a.value}var c=u;void 0===(n=r[i])&&(n=new t(this.options),r.push(n),0===i?n.appendIntoPart(this):n.insertAfterPart(r[i-1])),n.setValue(c),n.commit(),i++}i<r.length&&(r.length=i,this.clear(n&&n.endNode))},e.clear=function(t){void 0===t&&(t=this.startNode),c(this.startNode.parentNode,t.nextSibling,this.endNode)},t}(),R=function(){function t(t,e,n){if(this.value=void 0,this.__pendingValue=void 0,2!==n.length||""!==n[0]||""!==n[1])throw new Error("Boolean attributes can only contain a single expression");this.element=t,this.name=e,this.strings=n}var e=t.prototype;return e.setValue=function(t){this.__pendingValue=t},e.commit=function(){for(;S(this.__pendingValue);){var t=this.__pendingValue;this.__pendingValue=E,t(this)}if(this.__pendingValue!==E){var e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=E}},t}(),L=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.single=2===r.length&&""===r[0]&&""===r[1],i}n(e,t);var r=e.prototype;return r._createPart=function(){return new U(this)},r._getValue=function(){return this.single?this.parts[0].value:t.prototype._getValue.call(this)},r.commit=function(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())},e}(O),U=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e}(j),V=!1;!function(){try{var t={get capture(){return V=!0,!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){}}();var M=function(){function t(t,e,n){var r=this;this.value=void 0,this.__pendingValue=void 0,this.element=t,this.eventName=e,this.eventContext=n,this.__boundHandleEvent=function(t){return r.handleEvent(t)}}var e=t.prototype;return e.setValue=function(t){this.__pendingValue=t},e.commit=function(){for(;S(this.__pendingValue);){var t=this.__pendingValue;this.__pendingValue=E,t(this)}if(this.__pendingValue!==E){var e=this.__pendingValue,n=this.value,r=null==e||null!=n&&(e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive);r&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),null==e||null!=n&&!r||(this.__options=D(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=E}},e.handleEvent=function(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)},t}(),D=function(t){return t&&(V?{capture:t.capture,passive:t.passive,once:t.once}:t.capture)}; | ||
/** | ||
@@ -44,2 +44,3 @@ * @license | ||
*/ | ||
function F(t){var e=z.get(t.type);void 0===e&&(e={stringsArray:new WeakMap,keyString:new Map},z.set(t.type,e));var n=e.stringsArray.get(t.strings);if(void 0!==n)return n;var r=t.strings.join(l);return void 0===(n=e.keyString.get(r))&&(n=new f(t,t.getTemplateElement()),e.keyString.set(r,n)),e.stringsArray.set(t.strings,n),n}var z=new Map,I=new WeakMap,$=new(function(){function t(){}var e=t.prototype;return e.handleAttributeExpressions=function(t,e,n,r){var i=e[0];return"."===i?new L(t,e.slice(1),n).parts:"@"===i?[new M(t,e.slice(1),r.eventContext)]:"?"===i?[new R(t,e.slice(1),n)]:new O(t,e,n).parts},e.handleTextExpression=function(t){return new k(t)},t}()); | ||
/** | ||
@@ -58,3 +59,2 @@ * @license | ||
*/ | ||
(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.1.2");var I=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return new P(t,n,"html",M)}; | ||
/** | ||
@@ -72,3 +72,4 @@ * @license | ||
* http://polymer.github.io/PATENTS.txt | ||
*/function $(t,e){for(var n=t.element.content,r=t.parts,i=document.createTreeWalker(n,133,null,!1),o=H(r),s=r[o],a=-1,u=0,c=[],l=null;i.nextNode();){a++;var h=i.currentNode;for(h.previousSibling===l&&(l=null),e.has(h)&&(c.push(h),null===l&&(l=h)),null!==l&&u++;void 0!==s&&s.index===a;)s.index=null!==l?-1:s.index-u,s=r[o=H(r,o)]}c.forEach((function(t){return t.parentNode.removeChild(t)}))}var W=function(t){for(var e=11===t.nodeType?0:1,n=document.createTreeWalker(t,133,null,!1);n.nextNode();)e++;return e},H=function(t,e){void 0===e&&(e=-1);for(var n=e+1;n<t.length;n++){var r=t[n];if(g(r))return n}return-1}; | ||
*/ | ||
"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.2.1");var W=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return new A(t,n,"html",$)},q=function(t,e){return t+"--"+e},H=!0; | ||
/** | ||
@@ -86,4 +87,3 @@ * @license | ||
* http://polymer.github.io/PATENTS.txt | ||
*/ | ||
var q=function(t,e){return t+"--"+e},B=!0;void 0===window.ShadyCSS?B=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),B=!1);var K=function(t){return function(e){var n=q(e.type,t),r=z.get(n);void 0===r&&(r={stringsArray:new WeakMap,keyString:new Map},z.set(n,r));var i=r.stringsArray.get(e.strings);if(void 0!==i)return i;var o=e.strings.join(f);if(void 0===(i=r.keyString.get(o))){var s=e.getTemplateElement();B&&window.ShadyCSS.prepareTemplateDom(s,t),i=new m(e,s),r.keyString.set(o,i)}return r.stringsArray.set(e.strings,i),i}},G=["html","svg"],J=new Set,Y=function(t,e,n){J.add(t);var r=n?n.element:document.createElement("template"),i=e.querySelectorAll("style"),o=i.length;if(0!==o){for(var s=document.createElement("style"),a=0;a<o;a++){var u=i[a];u.parentNode.removeChild(u),s.textContent+=u.textContent}!function(t){G.forEach((function(e){var n=z.get(q(e,t));void 0!==n&&n.keyString.forEach((function(t){var e=t.element.content,n=new Set;Array.from(e.querySelectorAll("style")).forEach((function(t){n.add(t)})),$(t,n)}))}))}(t);var c=r.content;n?function(t,e,n){void 0===n&&(n=null);var r=t.element.content,i=t.parts;if(null!=n)for(var o=document.createTreeWalker(r,133,null,!1),s=H(i),a=0,u=-1;o.nextNode();){for(u++,o.currentNode===n&&(a=W(e),n.parentNode.insertBefore(e,n));-1!==s&&i[s].index===u;){if(a>0){for(;-1!==s;)i[s].index+=a,s=H(i,s);return}s=H(i,s)}}else r.appendChild(e)}(n,s,c.firstChild):c.insertBefore(s,c.firstChild),window.ShadyCSS.prepareTemplateStyles(r,t);var l=c.querySelector("style");if(window.ShadyCSS.nativeShadow&&null!==l)e.insertBefore(l.cloneNode(!0),e.firstChild);else if(n){c.insertBefore(s,c.firstChild);var h=new Set;h.add(s),$(n,h)}}else window.ShadyCSS.prepareTemplateStyles(r,t)};Function.prototype.$asyncbind=function t(e,n){function r(){return i.apply(e,arguments)}Function.prototype.$asyncbind||Object.defineProperty(Function.prototype,"$asyncbind",{value:t,enumerable:!1,configurable:!0,writable:!0}),t.trampoline||(t.trampoline=function(t,e,n,r,i){return function o(s){for(;s;){if(s.then)return s=s.then(o,r),i?void 0:s;try{if(s.pop){if(s.length)return s.pop()?e.call(t):s;s=n}else s=s.call(t)}catch(t){return r(t)}}}}),t.LazyThenable||(t.LazyThenable=function(){function t(t){return t&&t instanceof Object&&"function"==typeof t.then}function e(n,r,i){try{var o=i?i(r):r;if(n===o)return n.reject(new TypeError("Promise resolution loop"));t(o)?o.then((function(t){e(n,t)}),(function(t){n.reject(t)})):n.resolve(o)}catch(t){n.reject(t)}}function n(){}function r(){}function i(n,i){var o=new r;try{this._resolver((function(r){return t(r)?r.then(n,i):e(o,r,n)}),(function(t){e(o,t,i)}))}catch(t){e(o,t,i)}return o}function o(t){this._resolver=t,this.then=i}return r.prototype={resolve:n,reject:n,then:function(t,e){this.resolve=t,this.reject=e}},o.resolve=function(t){return o.isThenable(t)?t:{then:function(e){return e(t)}}},o.isThenable=t,o}(),t.EagerThenable=t.Thenable=(t.EagerThenableFactory=function(t){t=t||"object"==typeof process&&process.nextTick||"function"==typeof setImmediate&&setImmediate||function(t){setTimeout(t,0)};var e=function(){var e=[],n=0;function r(){for(;e.length-n;){try{e[n]()}catch(t){}e[n++]=void 0,1024===n&&(e.splice(0,1024),n=0)}}return function(i){e.push(i),e.length-n==1&&t(r)}}();function n(t){if(t){var e=this;t((function(t){e.resolve(t)}),(function(t){e.reject(t)}))}}function r(t,e){if("function"==typeof t.y)try{var n=t.y.call(void 0,e);t.p.resolve(n)}catch(e){t.p.reject(e)}else t.p.resolve(e)}function i(t,e){if("function"==typeof t.n)try{var n=t.n.call(void 0,e);t.p.resolve(n)}catch(e){t.p.reject(e)}else t.p.reject(e)}return n.prototype={resolve:function(t){if(void 0===this.state){if(t===this)return this.reject(new TypeError("Attempt to resolve promise with self"));var n=this;if(t&&("function"==typeof t||"object"==typeof t))try{var i=0,o=t.then;if("function"==typeof o)return void o.call(t,(function(t){i++||n.resolve(t)}),(function(t){i++||n.reject(t)}))}catch(t){return void(i||this.reject(t))}this.state=r,this.v=t,n.c&&e((function(){for(var e=0,i=n.c.length;e<i;e++)r(n.c[e],t)}))}},reject:function(t){if(void 0===this.state){this.state=i,this.v=t;var n=this.c;n&&e((function(){for(var e=0,r=n.length;e<r;e++)i(n[e],t)}))}},then:function(t,r){var i=new n,o={y:t,n:r,p:i};if(void 0===this.state)this.c?this.c.push(o):this.c=[o];else{var s=this.state,a=this.v;e((function(){s(o,a)}))}return i}},n.resolve=function(t){if(t&&t instanceof n)return t;var e=new n;return e.resolve(t),e},n.reject=function(t){if(t&&t instanceof n)return t;var e=new n;return e.reject(t),e},n.version="2.3.3-nodent",n})());var i=this;switch(n){case!0:return new t.Thenable(r);case 0:return new t.LazyThenable(r);case void 0:return r.then=r,r;default:return function(){try{return i.apply(e,arguments)}catch(t){return n(t)}}}},window.JSCompiler_renameProperty=function(t){return t};var X={toAttribute:function(t,e){switch(e){case Boolean:return t?"":null;case Object:case Array:return null==t?t:JSON.stringify(t)}return t},fromAttribute:function(t,e){switch(e){case Boolean:return null!==t;case Number:return null===t?null:Number(t);case Object:case Array:return JSON.parse(t)}return t}},Q=function(t,e){return e!==t&&(e==e||t==t)},Z={attribute:!0,type:String,converter:X,reflect:!1,hasChanged:Q},tt=Promise.resolve(!0),et=function(t){function r(){var e=t.call(this)||this;return e._updateState=0,e._instanceProperties=void 0,e._updatePromise=tt,e._hasConnectedResolver=void 0,e._changedProperties=new Map,e._reflectingProperties=void 0,e.initialize(),e}n(r,t),r._ensureClassProperties=function(){var t=this;if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;var e=Object.getPrototypeOf(this)._classProperties;void 0!==e&&e.forEach((function(e,n){return t._classProperties.set(n,e)}))}},r.createProperty=function(t,e){if(void 0===e&&(e=Z),this._ensureClassProperties(),this._classProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){var n="symbol"==typeof t?Symbol():"__"+t;Object.defineProperty(this.prototype,t,{get:function(){return this[n]},set:function(e){var r=this[t];this[n]=e,this._requestUpdate(t,r)},configurable:!0,enumerable:!0})}},r.finalize=function(){var t=Object.getPrototypeOf(this);if(t.hasOwnProperty("finalized")||t.finalize(),this.finalized=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){var e=this.properties,n=[].concat(Object.getOwnPropertyNames(e),"function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]),r=Array.isArray(n),i=0;for(n=r?n:n[Symbol.iterator]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}var s=o;this.createProperty(s,e[s])}}},r._attributeNameForProperty=function(t,e){var n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0},r._valueHasChanged=function(t,e,n){return void 0===n&&(n=Q),n(t,e)},r._propertyValueFromAttribute=function(t,e){var n=e.type,r=e.converter||X,i="function"==typeof r?r:r.fromAttribute;return i?i(t,n):t},r._propertyValueToAttribute=function(t,e){if(void 0!==e.reflect){var n=e.type,r=e.converter;return(r&&r.toAttribute||X.toAttribute)(t,n)}};var i=r.prototype;return i.initialize=function(){this._saveInstanceProperties(),this._requestUpdate()},i._saveInstanceProperties=function(){var t=this;this.constructor._classProperties.forEach((function(e,n){if(t.hasOwnProperty(n)){var r=t[n];delete t[n],t._instanceProperties||(t._instanceProperties=new Map),t._instanceProperties.set(n,r)}}))},i._applyInstanceProperties=function(){var t=this;this._instanceProperties.forEach((function(e,n){return t[n]=e})),this._instanceProperties=void 0},i.connectedCallback=function(){this._updateState=32|this._updateState,this._hasConnectedResolver&&(this._hasConnectedResolver(),this._hasConnectedResolver=void 0)},i.disconnectedCallback=function(){},i.attributeChangedCallback=function(t,e,n){e!==n&&this._attributeToProperty(t,n)},i._propertyToAttribute=function(t,e,n){void 0===n&&(n=Z);var r=this.constructor,i=r._attributeNameForProperty(t,n);if(void 0!==i){var o=r._propertyValueToAttribute(e,n);if(void 0===o)return;this._updateState=8|this._updateState,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._updateState=-9&this._updateState}},i._attributeToProperty=function(t,e){if(!(8&this._updateState)){var n=this.constructor,r=n._attributeToPropertyMap.get(t);if(void 0!==r){var i=n._classProperties.get(r)||Z;this._updateState=16|this._updateState,this[r]=n._propertyValueFromAttribute(e,i),this._updateState=-17&this._updateState}}},i._requestUpdate=function(t,e){var n=!0;if(void 0!==t){var r=this.constructor,i=r._classProperties.get(t)||Z;r._valueHasChanged(this[t],e,i.hasChanged)?(this._changedProperties.has(t)||this._changedProperties.set(t,e),!0!==i.reflect||16&this._updateState||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(t,i))):n=!1}!this._hasRequestedUpdate&&n&&this._enqueueUpdate()},i.requestUpdate=function(t,e){return this._requestUpdate(t,e),this.updateComplete},i._enqueueUpdate=function(){return new Promise(function(t,e){var n,r,i,o,s;n=this,this._updateState=4|this._updateState,o=this._updatePromise,this._updatePromise=new Promise((function(t,e){r=t,i=e}));var a=function(){if(!this._hasConnected)return new Promise((function(t){return n._hasConnectedResolver=t})).then(function(){return o.call(this)}.$asyncbind(this,e),e);function o(){var n=function(){return r(!this._hasRequestedUpdate),t()}.$asyncbind(this,e),o=function(t){return i(t),n()}.$asyncbind(this,e);try{return null!=(s=this.performUpdate())?s.then(function(){return function(){return n()}.call(this)}.$asyncbind(this,o),o):function(){return n()}.call(this)}catch(t){o(t)}}return o.call(this)}.$asyncbind(this,e),u=function(){return a()}.$asyncbind(this,e);try{return o.then(function(){return a()}.$asyncbind(this,u),u)}catch(t){u(t)}}.$asyncbind(this))},i.performUpdate=function(){this._instanceProperties&&this._applyInstanceProperties();var t=!1,e=this._changedProperties;try{(t=this.shouldUpdate(e))&&this.update(e)}catch(e){throw t=!1,e}finally{this._markUpdated()}t&&(1&this._updateState||(this._updateState=1|this._updateState,this.firstUpdated(e)),this.updated(e))},i._markUpdated=function(){this._changedProperties=new Map,this._updateState=-5&this._updateState},i._getUpdateComplete=function(){return this._updatePromise},i.shouldUpdate=function(){return!0},i.update=function(){var t=this;void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach((function(e,n){return t._propertyToAttribute(n,t[n],e)})),this._reflectingProperties=void 0)},i.updated=function(){},i.firstUpdated=function(){},e(r,[{key:"_hasConnected",get:function(){return 32&this._updateState}},{key:"_hasRequestedUpdate",get:function(){return 4&this._updateState}},{key:"hasUpdated",get:function(){return 1&this._updateState}},{key:"updateComplete",get:function(){return this._getUpdateComplete()}}],[{key:"observedAttributes",get:function(){var t=this;this.finalize();var e=[];return this._classProperties.forEach((function(n,r){var i=t._attributeNameForProperty(r,n);void 0!==i&&(t._attributeToPropertyMap.set(i,r),e.push(i))})),e}}]),r}(a(HTMLElement));et.finalized=!0; | ||
*/void 0===window.ShadyCSS?H=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),H=!1);var B=function(t){return function(e){var n=q(e.type,t),r=z.get(n);void 0===r&&(r={stringsArray:new WeakMap,keyString:new Map},z.set(n,r));var i=r.stringsArray.get(e.strings);if(void 0!==i)return i;var o=e.strings.join(l);if(void 0===(i=r.keyString.get(o))){var s=e.getTemplateElement();H&&window.ShadyCSS.prepareTemplateDom(s,t),i=new f(e,s),r.keyString.set(o,i)}return r.stringsArray.set(e.strings,i),i}},K=["html","svg"],G=new Set,J=function(t,e,n){G.add(t);var r=n?n.element:document.createElement("template"),i=e.querySelectorAll("style"),o=i.length;if(0!==o){for(var s=document.createElement("style"),a=0;a<o;a++){var u=i[a];u.parentNode.removeChild(u),s.textContent+=u.textContent}!function(t){K.forEach((function(e){var n=z.get(q(e,t));void 0!==n&&n.keyString.forEach((function(t){var e=t.element.content,n=new Set;Array.from(e.querySelectorAll("style")).forEach((function(t){n.add(t)})),_(t,n)}))}))}(t);var c=r.content;n?function(t,e,n){void 0===n&&(n=null);var r=t.element.content,i=t.parts;if(null!=n)for(var o=document.createTreeWalker(r,133,null,!1),s=b(i),a=0,u=-1;o.nextNode();){for(u++,o.currentNode===n&&(a=g(e),n.parentNode.insertBefore(e,n));-1!==s&&i[s].index===u;){if(a>0){for(;-1!==s;)i[s].index+=a,s=b(i,s);return}s=b(i,s)}}else r.appendChild(e)}(n,s,c.firstChild):c.insertBefore(s,c.firstChild),window.ShadyCSS.prepareTemplateStyles(r,t);var l=c.querySelector("style");if(window.ShadyCSS.nativeShadow&&null!==l)e.insertBefore(l.cloneNode(!0),e.firstChild);else if(n){c.insertBefore(s,c.firstChild);var h=new Set;h.add(s),_(n,h)}}else window.ShadyCSS.prepareTemplateStyles(r,t)};Function.prototype.$asyncbind=function t(e,n){function r(){return i.apply(e,arguments)}Function.prototype.$asyncbind||Object.defineProperty(Function.prototype,"$asyncbind",{value:t,enumerable:!1,configurable:!0,writable:!0}),t.trampoline||(t.trampoline=function(t,e,n,r,i){return function o(s){for(;s;){if(s.then)return s=s.then(o,r),i?void 0:s;try{if(s.pop){if(s.length)return s.pop()?e.call(t):s;s=n}else s=s.call(t)}catch(t){return r(t)}}}}),t.LazyThenable||(t.LazyThenable=function(){function t(t){return t&&t instanceof Object&&"function"==typeof t.then}function e(n,r,i){try{var o=i?i(r):r;if(n===o)return n.reject(new TypeError("Promise resolution loop"));t(o)?o.then((function(t){e(n,t)}),(function(t){n.reject(t)})):n.resolve(o)}catch(t){n.reject(t)}}function n(){}function r(){}function i(n,i){var o=new r;try{this._resolver((function(r){return t(r)?r.then(n,i):e(o,r,n)}),(function(t){e(o,t,i)}))}catch(t){e(o,t,i)}return o}function o(t){this._resolver=t,this.then=i}return r.prototype={resolve:n,reject:n,then:function(t,e){this.resolve=t,this.reject=e}},o.resolve=function(t){return o.isThenable(t)?t:{then:function(e){return e(t)}}},o.isThenable=t,o}(),t.EagerThenable=t.Thenable=(t.EagerThenableFactory=function(t){t=t||"object"==typeof process&&process.nextTick||"function"==typeof setImmediate&&setImmediate||function(t){setTimeout(t,0)};var e=function(){var e=[],n=0;function r(){for(;e.length-n;){try{e[n]()}catch(t){}e[n++]=void 0,1024===n&&(e.splice(0,1024),n=0)}}return function(i){e.push(i),e.length-n==1&&t(r)}}();function n(t){if(t){var e=this;t((function(t){e.resolve(t)}),(function(t){e.reject(t)}))}}function r(t,e){if("function"==typeof t.y)try{var n=t.y.call(void 0,e);t.p.resolve(n)}catch(e){t.p.reject(e)}else t.p.resolve(e)}function i(t,e){if("function"==typeof t.n)try{var n=t.n.call(void 0,e);t.p.resolve(n)}catch(e){t.p.reject(e)}else t.p.reject(e)}return n.prototype={resolve:function(t){if(void 0===this.state){if(t===this)return this.reject(new TypeError("Attempt to resolve promise with self"));var n=this;if(t&&("function"==typeof t||"object"==typeof t))try{var i=0,o=t.then;if("function"==typeof o)return void o.call(t,(function(t){i++||n.resolve(t)}),(function(t){i++||n.reject(t)}))}catch(t){return void(i||this.reject(t))}this.state=r,this.v=t,n.c&&e((function(){for(var e=0,i=n.c.length;e<i;e++)r(n.c[e],t)}))}},reject:function(t){if(void 0===this.state){this.state=i,this.v=t;var n=this.c;n&&e((function(){for(var e=0,r=n.length;e<r;e++)i(n[e],t)}))}},then:function(t,r){var i=new n,o={y:t,n:r,p:i};if(void 0===this.state)this.c?this.c.push(o):this.c=[o];else{var s=this.state,a=this.v;e((function(){s(o,a)}))}return i}},n.resolve=function(t){if(t&&t instanceof n)return t;var e=new n;return e.resolve(t),e},n.reject=function(t){if(t&&t instanceof n)return t;var e=new n;return e.reject(t),e},n.version="2.3.3-nodent",n})());var i=this;switch(n){case!0:return new t.Thenable(r);case 0:return new t.LazyThenable(r);case void 0:return r.then=r,r;default:return function(){try{return i.apply(e,arguments)}catch(t){return n(t)}}}},window.JSCompiler_renameProperty=function(t){return t};var Y={toAttribute:function(t,e){switch(e){case Boolean:return t?"":null;case Object:case Array:return null==t?t:JSON.stringify(t)}return t},fromAttribute:function(t,e){switch(e){case Boolean:return null!==t;case Number:return null===t?null:Number(t);case Object:case Array:return JSON.parse(t)}return t}},X=function(t,e){return e!==t&&(e==e||t==t)},Q={attribute:!0,type:String,converter:Y,reflect:!1,hasChanged:X},Z=function(t){function r(){var e=t.call(this)||this;return e._updateState=0,e._instanceProperties=void 0,e._updatePromise=new Promise((function(t){return e._enableUpdatingResolver=t})),e._changedProperties=new Map,e._reflectingProperties=void 0,e.initialize(),e}n(r,t),r._ensureClassProperties=function(){var t=this;if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;var e=Object.getPrototypeOf(this)._classProperties;void 0!==e&&e.forEach((function(e,n){return t._classProperties.set(n,e)}))}},r.createProperty=function(t,e){if(void 0===e&&(e=Q),this._ensureClassProperties(),this._classProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){var n="symbol"==typeof t?Symbol():"__"+t,r=this.getPropertyDescriptor(t,n,e);void 0!==r&&Object.defineProperty(this.prototype,t,r)}},r.getPropertyDescriptor=function(t,e){return{get:function(){return this[e]},set:function(n){var r=this[t];this[e]=n,this._requestUpdate(t,r)},configurable:!0,enumerable:!0}},r.getPropertyOptions=function(t){return this._classProperties&&this._classProperties.get(t)||Q},r.finalize=function(){var t=Object.getPrototypeOf(this);if(t.hasOwnProperty("finalized")||t.finalize(),this.finalized=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){var e=this.properties,n=[].concat(Object.getOwnPropertyNames(e),"function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]),r=Array.isArray(n),i=0;for(n=r?n:n[Symbol.iterator]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}var s=o;this.createProperty(s,e[s])}}},r._attributeNameForProperty=function(t,e){var n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0},r._valueHasChanged=function(t,e,n){return void 0===n&&(n=X),n(t,e)},r._propertyValueFromAttribute=function(t,e){var n=e.type,r=e.converter||Y,i="function"==typeof r?r:r.fromAttribute;return i?i(t,n):t},r._propertyValueToAttribute=function(t,e){if(void 0!==e.reflect){var n=e.type,r=e.converter;return(r&&r.toAttribute||Y.toAttribute)(t,n)}};var i=r.prototype;return i.initialize=function(){this._saveInstanceProperties(),this._requestUpdate()},i._saveInstanceProperties=function(){var t=this;this.constructor._classProperties.forEach((function(e,n){if(t.hasOwnProperty(n)){var r=t[n];delete t[n],t._instanceProperties||(t._instanceProperties=new Map),t._instanceProperties.set(n,r)}}))},i._applyInstanceProperties=function(){var t=this;this._instanceProperties.forEach((function(e,n){return t[n]=e})),this._instanceProperties=void 0},i.connectedCallback=function(){this.enableUpdating()},i.enableUpdating=function(){void 0!==this._enableUpdatingResolver&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)},i.disconnectedCallback=function(){},i.attributeChangedCallback=function(t,e,n){e!==n&&this._attributeToProperty(t,n)},i._propertyToAttribute=function(t,e,n){void 0===n&&(n=Q);var r=this.constructor,i=r._attributeNameForProperty(t,n);if(void 0!==i){var o=r._propertyValueToAttribute(e,n);if(void 0===o)return;this._updateState=8|this._updateState,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._updateState=-9&this._updateState}},i._attributeToProperty=function(t,e){if(!(8&this._updateState)){var n=this.constructor,r=n._attributeToPropertyMap.get(t);if(void 0!==r){var i=n.getPropertyOptions(r);this._updateState=16|this._updateState,this[r]=n._propertyValueFromAttribute(e,i),this._updateState=-17&this._updateState}}},i._requestUpdate=function(t,e){var n=!0;if(void 0!==t){var r=this.constructor,i=r.getPropertyOptions(t);r._valueHasChanged(this[t],e,i.hasChanged)?(this._changedProperties.has(t)||this._changedProperties.set(t,e),!0!==i.reflect||16&this._updateState||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(t,i))):n=!1}!this._hasRequestedUpdate&&n&&(this._updatePromise=this._enqueueUpdate())},i.requestUpdate=function(t,e){return this._requestUpdate(t,e),this.updateComplete},i._enqueueUpdate=function(){return new Promise(function(t,e){var n;this._updateState=4|this._updateState;var r=function(){return null!=(n=this.performUpdate())?n.then(function(){return function(){return t(!this._hasRequestedUpdate)}.call(this)}.$asyncbind(this,e),e):function(){return t(!this._hasRequestedUpdate)}.call(this)}.$asyncbind(this,e),i=function(){return r()}.$asyncbind(this,e);try{return this._updatePromise.then(function(){return r()}.$asyncbind(this,i),i)}catch(t){i(t)}}.$asyncbind(this))},i.performUpdate=function(){this._instanceProperties&&this._applyInstanceProperties();var t=!1,e=this._changedProperties;try{(t=this.shouldUpdate(e))?this.update(e):this._markUpdated()}catch(e){throw t=!1,this._markUpdated(),e}t&&(1&this._updateState||(this._updateState=1|this._updateState,this.firstUpdated(e)),this.updated(e))},i._markUpdated=function(){this._changedProperties=new Map,this._updateState=-5&this._updateState},i._getUpdateComplete=function(){return this._updatePromise},i.shouldUpdate=function(){return!0},i.update=function(){var t=this;void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach((function(e,n){return t._propertyToAttribute(n,t[n],e)})),this._reflectingProperties=void 0),this._markUpdated()},i.updated=function(){},i.firstUpdated=function(){},e(r,[{key:"_hasRequestedUpdate",get:function(){return 4&this._updateState}},{key:"hasUpdated",get:function(){return 1&this._updateState}},{key:"updateComplete",get:function(){return this._getUpdateComplete()}}],[{key:"observedAttributes",get:function(){var t=this;this.finalize();var e=[];return this._classProperties.forEach((function(n,r){var i=t._attributeNameForProperty(r,n);void 0!==i&&(t._attributeToPropertyMap.set(i,r),e.push(i))})),e}}]),r}(a(HTMLElement));Z.finalized=!0,Function.prototype.$asyncbind=function t(e,n){function r(){return i.apply(e,arguments)}Function.prototype.$asyncbind||Object.defineProperty(Function.prototype,"$asyncbind",{value:t,enumerable:!1,configurable:!0,writable:!0}),t.trampoline||(t.trampoline=function(t,e,n,r,i){return function o(s){for(;s;){if(s.then)return s=s.then(o,r),i?void 0:s;try{if(s.pop){if(s.length)return s.pop()?e.call(t):s;s=n}else s=s.call(t)}catch(t){return r(t)}}}}),t.LazyThenable||(t.LazyThenable=function(){function t(t){return t&&t instanceof Object&&"function"==typeof t.then}function e(n,r,i){try{var o=i?i(r):r;if(n===o)return n.reject(new TypeError("Promise resolution loop"));t(o)?o.then((function(t){e(n,t)}),(function(t){n.reject(t)})):n.resolve(o)}catch(t){n.reject(t)}}function n(){}function r(){}function i(n,i){var o=new r;try{this._resolver((function(r){return t(r)?r.then(n,i):e(o,r,n)}),(function(t){e(o,t,i)}))}catch(t){e(o,t,i)}return o}function o(t){this._resolver=t,this.then=i}return r.prototype={resolve:n,reject:n,then:function(t,e){this.resolve=t,this.reject=e}},o.resolve=function(t){return o.isThenable(t)?t:{then:function(e){return e(t)}}},o.isThenable=t,o}(),t.EagerThenable=t.Thenable=(t.EagerThenableFactory=function(t){t=t||"object"==typeof process&&process.nextTick||"function"==typeof setImmediate&&setImmediate||function(t){setTimeout(t,0)};var e=function(){var e=[],n=0;function r(){for(;e.length-n;){try{e[n]()}catch(t){}e[n++]=void 0,1024===n&&(e.splice(0,1024),n=0)}}return function(i){e.push(i),e.length-n==1&&t(r)}}();function n(t){if(t){var e=this;t((function(t){e.resolve(t)}),(function(t){e.reject(t)}))}}function r(t,e){if("function"==typeof t.y)try{var n=t.y.call(void 0,e);t.p.resolve(n)}catch(e){t.p.reject(e)}else t.p.resolve(e)}function i(t,e){if("function"==typeof t.n)try{var n=t.n.call(void 0,e);t.p.resolve(n)}catch(e){t.p.reject(e)}else t.p.reject(e)}return n.prototype={resolve:function(t){if(void 0===this.state){if(t===this)return this.reject(new TypeError("Attempt to resolve promise with self"));var n=this;if(t&&("function"==typeof t||"object"==typeof t))try{var i=0,o=t.then;if("function"==typeof o)return void o.call(t,(function(t){i++||n.resolve(t)}),(function(t){i++||n.reject(t)}))}catch(t){return void(i||this.reject(t))}this.state=r,this.v=t,n.c&&e((function(){for(var e=0,i=n.c.length;e<i;e++)r(n.c[e],t)}))}},reject:function(t){if(void 0===this.state){this.state=i,this.v=t;var n=this.c;n&&e((function(){for(var e=0,r=n.length;e<r;e++)i(n[e],t)}))}},then:function(t,r){var i=new n,o={y:t,n:r,p:i};if(void 0===this.state)this.c?this.c.push(o):this.c=[o];else{var s=this.state,a=this.v;e((function(){s(o,a)}))}return i}},n.resolve=function(t){if(t&&t instanceof n)return t;var e=new n;return e.resolve(t),e},n.reject=function(t){if(t&&t instanceof n)return t;var e=new n;return e.reject(t),e},n.version="2.3.3-nodent",n})());var i=this;switch(n){case!0:return new t.Thenable(r);case 0:return new t.LazyThenable(r);case void 0:return r.then=r,r;default:return function(){try{return i.apply(e,arguments)}catch(t){return n(t)}}}}; | ||
/** | ||
@@ -99,2 +99,2 @@ @license | ||
*/ | ||
var nt="adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,rt=Symbol(),it=function(){function t(t,e){if(e!==rt)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}return t.prototype.toString=function(){return this.cssText},e(t,[{key:"styleSheet",get:function(){return void 0===this._styleSheet&&(nt?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}}]),t}(),ot=function(t){return new it(String(t),rt)},st=function(t){if(t instanceof it)return t.cssText;if("number"==typeof t)return t;throw new Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.")},at=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=n.reduce((function(e,n,r){return e+st(n)+t[r+1]}),t[0]);return new it(i,rt)};(window.litElementVersions||(window.litElementVersions=[])).push("2.2.1");var ut=function(t){return t.flat?t.flat(1/0):function t(e,n){void 0===n&&(n=[]);for(var r=0,i=e.length;r<i;r++){var o=e[r];Array.isArray(o)?t(o,n):n.push(o)}return n}(t)},ct=function(t){function e(){return t.apply(this,arguments)||this}n(e,t),e.finalize=function(){t.finalize.call(this),this._styles=this.hasOwnProperty(JSCompiler_renameProperty("styles",this))?this._getUniqueStyles():this._styles||[]},e._getUniqueStyles=function(){var t=this.styles,e=[];Array.isArray(t)?ut(t).reduceRight((function(t,e){return t.add(e),t}),new Set).forEach((function(t){return e.unshift(t)})):t&&e.push(t);return e};var r=e.prototype;return r.initialize=function(){t.prototype.initialize.call(this),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()},r.createRenderRoot=function(){return this.attachShadow({mode:"open"})},r.adoptStyles=function(){var t=this.constructor._styles;0!==t.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?nt?this.renderRoot.adoptedStyleSheets=t.map((function(t){return t.styleSheet})):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(t.map((function(t){return t.cssText})),this.localName))},r.connectedCallback=function(){t.prototype.connectedCallback.call(this),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)},r.update=function(e){var n=this;t.prototype.update.call(this,e);var r=this.render();r instanceof P&&this.constructor.render(r,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach((function(t){var e=document.createElement("style");e.textContent=t.cssText,n.renderRoot.appendChild(e)})))},r.render=function(){},e}(et);ct.finalized=!0,ct.render=function(t,e,n){if(!n||"object"!=typeof n||!n.scopeName)throw new Error("The `scopeName` option is required.");var r=n.scopeName,i=F.has(e),o=B&&11===e.nodeType&&!!e.host,s=o&&!J.has(r),a=s?document.createDocumentFragment():e;if(function(t,e,n){var r=F.get(e);void 0===r&&(h(e,e.firstChild),F.set(e,r=new N(Object.assign({templateFactory:D},n))),r.appendInto(e)),r.setValue(t),r.commit()}(t,a,Object.assign({templateFactory:K(r)},n)),s){var u=F.get(a);F.delete(a);var c=u.value instanceof w?u.value.template:void 0;Y(r,a,c),h(e,e.firstChild),e.appendChild(a),F.set(e,u)}!i&&o&&window.ShadyCSS.styleElement(e.host)};var lt={GENERAL:{DELETE:"Delete",REMOVE:"Remove",DOWNLOAD:"Download",UPLOAD:"upload",SELECT:"Select"}},ht={ESCAPE:"Escape",ARROW_RIGHT:"ArrowRight",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown"},pt={ESCAPE:27},dt=function(t){return t.key===ht.ESCAPE||t.keyCode===pt.ESCAPE},ft=Object.freeze({__proto__:null,messages:lt,sizes:{FULL:"full",MEDIUM:"medium",SMALL:"small"},colorModifiers:{LIGHTEST:"-lightest",LIGHTER:"-lighter",LIGHT:"-light",DARK:"-dark",DARKER:"-darker"},colors:{WHITE:"white",BLACK:"black",RED:"red",ORANGE:"orange",YELLOW:"yellow",GREEN:"green",BLUE:"blue",PURPLE:"purple",PINK:"pink",GRAY:"gray",SLATE:"slate"},delay:{NOW:100,FAST:200,SLOW:600},keyboardEventKeys:ht,keyboardEventKeyCodes:pt}),vt=Object.freeze({__proto__:null,classNamesToSelector:function(t){var e={};return Object.keys(t).forEach((function(n){e[n]="."+t[n]})),e},objectKeysChangeCase:function(t,e){return void 0===e&&(e="toLowerCase"),Object.keys(t).reduce((function(n,r){return n[r[e]()]=t[r],n}),{})},debounceEvent:function(t,e){var n;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];clearTimeout(n),n=setTimeout((function(){return t.apply(void 0,i)}),e)}},isEscapeKeyEvent:dt}),yt=function(){function t(t){this.parentElement=t,this.onKeyDown=this.onKeyDown.bind(this)}var e=t.prototype;return e.start=function(){document.addEventListener("keydown",this.onKeyDown)},e.stop=function(){document.removeEventListener("keydown",this.onKeyDown)},e.onKeyDown=function(t){this.parentElement.visible&&!this.parentElement.noCloseOnEscKey&&!t.isComposing&&dt(t)&&this.parentElement.close()},t}();function mt(t,e){window.customElements.get(t)||window.customElements.define(t,e)}var _t=function(t){function r(){return t.apply(this,arguments)||this}return n(r,t),r.prototype.dispatchCustomEvent=function(t,e,n){var r=this;void 0===e&&(e={}),void 0===n&&(n=!1);var i=new CustomEvent(t,{detail:e,bubbles:!0,composed:!0});n?setTimeout((function(){r.dispatchEvent(i)}),ft.delay.FAST):this.dispatchEvent(i)},e(r,[{key:"bodyHasRTL",get:function(){return"rtl"===document.body.getAttribute("dir")}},{key:"bodyDir",get:function(){return document.body.getAttribute("dir")||"ltr"}}],[{key:"styles",get:function(){return[ot(":focus{outline:none}:host{margin:0;padding:0;font-size:14px;font-size:var(--ts-font-size-default)}:host,:host *{box-sizing:border-box;font-family:Open Sans,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;font-family:var(--ts-font-family)}")]}}]),r}(ct);function gt(t,e,n){var r=n.map((function(t){return t.toLowerCase()}));if(e.filter((function(t){if(t.nodeType!==Node.TEXT_NODE)return-1===r.indexOf(t.tagName.toLowerCase())})).length>0){var i=n.map((function(t){return t.toLowerCase()})).join();throw new Error("You can only use "+i+" in "+t.toLowerCase()+" component!")}}export{yt as CloseOnEscBehavior,_t as TSElement,ft as constants,at as css,mt as customElementDefineHelper,vt as helpers,I as html,ot as unsafeCSS,gt as validateSlottedNodes}; | ||
var tt="adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,et=Symbol(),nt=function(){function t(t,e){if(e!==et)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}return t.prototype.toString=function(){return this.cssText},e(t,[{key:"styleSheet",get:function(){return void 0===this._styleSheet&&(tt?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}}]),t}(),rt=function(t){return new nt(String(t),et)},it=function(t){if(t instanceof nt)return t.cssText;if("number"==typeof t)return t;throw new Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.")},ot=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=n.reduce((function(e,n,r){return e+it(n)+t[r+1]}),t[0]);return new nt(i,et)};(window.litElementVersions||(window.litElementVersions=[])).push("2.3.1");var st={},at=function(t){function e(){return t.apply(this,arguments)||this}n(e,t),e.getStyles=function(){return this.styles},e._getUniqueStyles=function(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_styles",this))){var t=this.getStyles();if(void 0===t)this._styles=[];else if(Array.isArray(t)){var e=function(t,n){return t.reduceRight((function(t,n){return Array.isArray(n)?e(n,t):(t.add(n),t)}),n)},n=e(t,new Set),r=[];n.forEach((function(t){return r.unshift(t)})),this._styles=r}else this._styles=[t]}};var r=e.prototype;return r.initialize=function(){t.prototype.initialize.call(this),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()},r.createRenderRoot=function(){return this.attachShadow({mode:"open"})},r.adoptStyles=function(){var t=this.constructor._styles;0!==t.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?tt?this.renderRoot.adoptedStyleSheets=t.map((function(t){return t.styleSheet})):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(t.map((function(t){return t.cssText})),this.localName))},r.connectedCallback=function(){t.prototype.connectedCallback.call(this),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)},r.update=function(e){var n=this,r=this.render();t.prototype.update.call(this,e),r!==st&&this.constructor.render(r,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach((function(t){var e=document.createElement("style");e.textContent=t.cssText,n.renderRoot.appendChild(e)})))},r.render=function(){return st},e}(Z);at.finalized=!0,at.render=function(t,e,n){if(!n||"object"!=typeof n||!n.scopeName)throw new Error("The `scopeName` option is required.");var r=n.scopeName,i=I.has(e),o=H&&11===e.nodeType&&!!e.host,s=o&&!G.has(r),a=s?document.createDocumentFragment():e;if(function(t,e,n){var r=I.get(e);void 0===r&&(c(e,e.firstChild),I.set(e,r=new k(Object.assign({templateFactory:F},n))),r.appendInto(e)),r.setValue(t),r.commit()}(t,a,Object.assign({templateFactory:B(r)},n)),s){var u=I.get(a);I.delete(a);var l=u.value instanceof T?u.value.template:void 0;J(r,a,l),c(e,e.firstChild),e.appendChild(a),I.set(e,u)}!i&&o&&window.ShadyCSS.styleElement(e.host)};var ut={GENERAL:{DELETE:"Delete",REMOVE:"Remove",DOWNLOAD:"Download",UPLOAD:"upload",SELECT:"Select"}},ct={ESCAPE:"Escape",ARROW_RIGHT:"ArrowRight",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown"},lt={ESCAPE:27},ht=function(t){return t.key===ct.ESCAPE||t.keyCode===lt.ESCAPE},pt=Object.freeze({__proto__:null,messages:ut,sizes:{FULL:"full",MEDIUM:"medium",SMALL:"small"},colorModifiers:{LIGHTEST:"-lightest",LIGHTER:"-lighter",LIGHT:"-light",DARK:"-dark",DARKER:"-darker"},colors:{WHITE:"white",BLACK:"black",RED:"red",ORANGE:"orange",YELLOW:"yellow",GREEN:"green",BLUE:"blue",PURPLE:"purple",PINK:"pink",GRAY:"gray",SLATE:"slate"},delay:{NOW:100,FAST:200,SLOW:600},keyboardEventKeys:ct,keyboardEventKeyCodes:lt}),ft=Object.freeze({__proto__:null,classNamesToSelector:function(t){var e={};return Object.keys(t).forEach((function(n){e[n]="."+t[n]})),e},objectKeysChangeCase:function(t,e){return void 0===e&&(e="toLowerCase"),Object.keys(t).reduce((function(n,r){return n[r[e]()]=t[r],n}),{})},debounceEvent:function(t,e){var n;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];clearTimeout(n),n=setTimeout((function(){return t.apply(void 0,i)}),e)}},isEscapeKeyEvent:ht}),dt=function(){function t(t){this.parentElement=t,this.onKeyDown=this.onKeyDown.bind(this)}var e=t.prototype;return e.start=function(){document.addEventListener("keydown",this.onKeyDown)},e.stop=function(){document.removeEventListener("keydown",this.onKeyDown)},e.onKeyDown=function(t){this.parentElement.visible&&!this.parentElement.noCloseOnEscKey&&!t.isComposing&&ht(t)&&this.parentElement.close()},t}();function vt(t,e){window.customElements.get(t)||window.customElements.define(t,e)}var yt=function(t){function r(){return t.apply(this,arguments)||this}return n(r,t),r.prototype.dispatchCustomEvent=function(t,e,n){var r=this;void 0===e&&(e={}),void 0===n&&(n=!1);var i=new CustomEvent(t,{detail:e,bubbles:!0,composed:!0});n?setTimeout((function(){r.dispatchEvent(i)}),pt.delay.FAST):this.dispatchEvent(i)},e(r,[{key:"bodyHasRTL",get:function(){return"rtl"===document.body.getAttribute("dir")}},{key:"bodyDir",get:function(){return document.body.getAttribute("dir")||"ltr"}}],[{key:"styles",get:function(){return[rt(":focus{outline:none}:host{margin:0;padding:0;font-size:14px;font-size:var(--ts-font-size-default)}:host,:host *{box-sizing:border-box;font-family:Open Sans,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;font-family:var(--ts-font-family)}")]}}]),r}(at);function mt(t,e,n){var r=n.map((function(t){return t.toLowerCase()}));if(e.filter((function(t){if(t.nodeType!==Node.TEXT_NODE)return-1===r.indexOf(t.tagName.toLowerCase())})).length>0){var i=n.map((function(t){return t.toLowerCase()})).join();throw new Error("You can only use "+i+" in "+t.toLowerCase()+" component!")}}export{dt as CloseOnEscBehavior,yt as TSElement,pt as constants,ot as css,vt as customElementDefineHelper,ft as helpers,W as html,rt as unsafeCSS,mt as validateSlottedNodes}; |
@@ -14,3 +14,3 @@ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t=t||self).ts=t.ts||{},t.ts.elements=t.ts.elements||{}))}(this,(function(t){"use strict";function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function o(t,e){return(o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function a(t,e,n){return(a=s()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&o(i,n.prototype),i}).apply(null,arguments)}function u(t){var e="function"==typeof Map?new Map:void 0;return(u=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return a(t,arguments,i(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),o(r,t)})(t)} | ||
* http://polymer.github.io/PATENTS.txt | ||
*/var c=new WeakMap,l=function(t){return"function"==typeof t&&c.has(t)},h=void 0!==window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,p=function(t,e,n){for(void 0===n&&(n=null);e!==n;){var r=e.nextSibling;t.removeChild(e),e=r}},d={},f={},v="{{lit-"+String(Math.random()).slice(2)+"}}",y="\x3c!--"+v+"--\x3e",m=new RegExp(v+"|"+y),_=function(t,e){this.parts=[],this.element=e;for(var n=[],r=[],i=document.createTreeWalker(e.content,133,null,!1),o=0,s=-1,a=0,u=t.strings,c=t.values.length;a<c;){var l=i.nextNode();if(null!==l){if(s++,1===l.nodeType){if(l.hasAttributes()){for(var h=l.attributes,p=h.length,d=0,f=0;f<p;f++)g(h[f].name,"$lit$")&&d++;for(;d-- >0;){var y=u[a],_=w.exec(y)[2],S=_.toLowerCase()+"$lit$",E=l.getAttribute(S);l.removeAttribute(S);var x=E.split(m);this.parts.push({type:"attribute",index:s,name:_,strings:x}),a+=x.length-1}}"TEMPLATE"===l.tagName&&(r.push(l),i.currentNode=l.content)}else if(3===l.nodeType){var P=l.data;if(P.indexOf(v)>=0){for(var C=l.parentNode,A=P.split(m),T=A.length-1,N=0;N<T;N++){var O=void 0,k=A[N];if(""===k)O=b();else{var R=w.exec(k);null!==R&&g(R[2],"$lit$")&&(k=k.slice(0,R.index)+R[1]+R[2].slice(0,-"$lit$".length)+R[3]),O=document.createTextNode(k)}C.insertBefore(O,l),this.parts.push({type:"node",index:++s})}""===A[T]?(C.insertBefore(b(),l),n.push(l)):l.data=A[T],a+=T}}else if(8===l.nodeType)if(l.data===v){var j=l.parentNode;null!==l.previousSibling&&s!==o||(s++,j.insertBefore(b(),l)),o=s,this.parts.push({type:"node",index:s}),null===l.nextSibling?l.data="":(n.push(l),s--),a++}else for(var L=-1;-1!==(L=l.data.indexOf(v,L+1));)this.parts.push({type:"node",index:-1}),a++}else i.currentNode=r.pop()}for(var V=0,U=n;V<U.length;V++){var M=U[V];M.parentNode.removeChild(M)}},g=function(t,e){var n=t.length-e.length;return n>=0&&t.slice(n)===e},S=function(t){return-1!==t.index},b=function(){return document.createComment("")},w=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/,E=function(){function t(t,e,n){this.__parts=[],this.template=t,this.processor=e,this.options=n}var e=t.prototype;return e.update=function(t){var e=0,n=this.__parts,r=Array.isArray(n),i=0;for(n=r?n:n[Symbol.iterator]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}void 0!==o&&o.setValue(t[e]),e++}var s=this.__parts,a=Array.isArray(s),u=0;for(s=a?s:s[Symbol.iterator]();;){var c;if(a){if(u>=s.length)break;c=s[u++]}else{if((u=s.next()).done)break;c=u.value}void 0!==c&&c.commit()}},e._clone=function(){for(var t,e=h?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),n=[],r=this.template.parts,i=document.createTreeWalker(e,133,null,!1),o=0,s=0,a=i.nextNode();o<r.length;)if(t=r[o],S(t)){for(;s<t.index;)s++,"TEMPLATE"===a.nodeName&&(n.push(a),i.currentNode=a.content),null===(a=i.nextNode())&&(i.currentNode=n.pop(),a=i.nextNode());if("node"===t.type){var u=this.processor.handleTextExpression(this.options);u.insertAfterNode(a.previousSibling),this.__parts.push(u)}else{var c;(c=this.__parts).push.apply(c,this.processor.handleAttributeExpressions(a,t.name,t.strings,this.options))}o++}else this.__parts.push(void 0),o++;return h&&(document.adoptNode(e),customElements.upgrade(e)),e},t}(),x=" "+v+" ",P=function(){function t(t,e,n,r){this.strings=t,this.values=e,this.type=n,this.processor=r}var e=t.prototype;return e.getHTML=function(){for(var t=this.strings.length-1,e="",n=!1,r=0;r<t;r++){var i=this.strings[r],o=i.lastIndexOf("\x3c!--");n=(o>-1||n)&&-1===i.indexOf("--\x3e",o+1);var s=w.exec(i);e+=null===s?i+(n?x:y):i.substr(0,s.index)+s[1]+s[2]+"$lit$"+s[3]+v}return e+=this.strings[t]},e.getTemplateElement=function(){var t=document.createElement("template");return t.innerHTML=this.getHTML(),t},t}(),C=function(t){return null===t||!("object"==typeof t||"function"==typeof t)},A=function(t){return Array.isArray(t)||!(!t||!t[Symbol.iterator])},T=function(){function t(t,e,n){this.dirty=!0,this.element=t,this.name=e,this.strings=n,this.parts=[];for(var r=0;r<n.length-1;r++)this.parts[r]=this._createPart()}var e=t.prototype;return e._createPart=function(){return new N(this)},e._getValue=function(){for(var t=this.strings,e=t.length-1,n="",r=0;r<e;r++){n+=t[r];var i=this.parts[r];if(void 0!==i){var o=i.value;if(C(o)||!A(o))n+="string"==typeof o?o:String(o);else{var s=o,a=Array.isArray(s),u=0;for(s=a?s:s[Symbol.iterator]();;){var c;if(a){if(u>=s.length)break;c=s[u++]}else{if((u=s.next()).done)break;c=u.value}n+="string"==typeof c?c:String(c)}}}}return n+=t[e]},e.commit=function(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))},t}(),N=function(){function t(t){this.value=void 0,this.committer=t}var e=t.prototype;return e.setValue=function(t){t===d||C(t)&&t===this.value||(this.value=t,l(t)||(this.committer.dirty=!0))},e.commit=function(){for(;l(this.value);){var t=this.value;this.value=d,t(this)}this.value!==d&&this.committer.commit()},t}(),O=function(){function t(t){this.value=void 0,this.__pendingValue=void 0,this.options=t}var e=t.prototype;return e.appendInto=function(t){this.startNode=t.appendChild(b()),this.endNode=t.appendChild(b())},e.insertAfterNode=function(t){this.startNode=t,this.endNode=t.nextSibling},e.appendIntoPart=function(t){t.__insert(this.startNode=b()),t.__insert(this.endNode=b())},e.insertAfterPart=function(t){t.__insert(this.startNode=b()),this.endNode=t.endNode,t.endNode=this.startNode},e.setValue=function(t){this.__pendingValue=t},e.commit=function(){for(;l(this.__pendingValue);){var t=this.__pendingValue;this.__pendingValue=d,t(this)}var e=this.__pendingValue;e!==d&&(C(e)?e!==this.value&&this.__commitText(e):e instanceof P?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):A(e)?this.__commitIterable(e):e===f?(this.value=f,this.clear()):this.__commitText(e))},e.__insert=function(t){this.endNode.parentNode.insertBefore(t,this.endNode)},e.__commitNode=function(t){this.value!==t&&(this.clear(),this.__insert(t),this.value=t)},e.__commitText=function(t){var e=this.startNode.nextSibling,n="string"==typeof(t=null==t?"":t)?t:String(t);e===this.endNode.previousSibling&&3===e.nodeType?e.data=n:this.__commitNode(document.createTextNode(n)),this.value=t},e.__commitTemplateResult=function(t){var e=this.options.templateFactory(t);if(this.value instanceof E&&this.value.template===e)this.value.update(t.values);else{var n=new E(e,t.processor,this.options),r=n._clone();n.update(t.values),this.__commitNode(r),this.value=n}},e.__commitIterable=function(e){Array.isArray(this.value)||(this.value=[],this.clear());var n,r=this.value,i=0,o=e,s=Array.isArray(o),a=0;for(o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{if((a=o.next()).done)break;u=a.value}var c=u;void 0===(n=r[i])&&(n=new t(this.options),r.push(n),0===i?n.appendIntoPart(this):n.insertAfterPart(r[i-1])),n.setValue(c),n.commit(),i++}i<r.length&&(r.length=i,this.clear(n&&n.endNode))},e.clear=function(t){void 0===t&&(t=this.startNode),p(this.startNode.parentNode,t.nextSibling,this.endNode)},t}(),k=function(){function t(t,e,n){if(this.value=void 0,this.__pendingValue=void 0,2!==n.length||""!==n[0]||""!==n[1])throw new Error("Boolean attributes can only contain a single expression");this.element=t,this.name=e,this.strings=n}var e=t.prototype;return e.setValue=function(t){this.__pendingValue=t},e.commit=function(){for(;l(this.__pendingValue);){var t=this.__pendingValue;this.__pendingValue=d,t(this)}if(this.__pendingValue!==d){var e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=d}},t}(),R=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.single=2===r.length&&""===r[0]&&""===r[1],i}r(e,t);var n=e.prototype;return n._createPart=function(){return new j(this)},n._getValue=function(){return this.single?this.parts[0].value:t.prototype._getValue.call(this)},n.commit=function(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())},e}(T),j=function(t){function e(){return t.apply(this,arguments)||this}return r(e,t),e}(N),L=!1;try{var V={get capture(){return L=!0,!1}};window.addEventListener("test",V,V),window.removeEventListener("test",V,V)}catch(t){}var U=function(){function t(t,e,n){var r=this;this.value=void 0,this.__pendingValue=void 0,this.element=t,this.eventName=e,this.eventContext=n,this.__boundHandleEvent=function(t){return r.handleEvent(t)}}var e=t.prototype;return e.setValue=function(t){this.__pendingValue=t},e.commit=function(){for(;l(this.__pendingValue);){var t=this.__pendingValue;this.__pendingValue=d,t(this)}if(this.__pendingValue!==d){var e=this.__pendingValue,n=this.value,r=null==e||null!=n&&(e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive);r&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),null==e||null!=n&&!r||(this.__options=M(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=d}},e.handleEvent=function(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)},t}(),M=function(t){return t&&(L?{capture:t.capture,passive:t.passive,once:t.once}:t.capture)},D=new(function(){function t(){}var e=t.prototype;return e.handleAttributeExpressions=function(t,e,n,r){var i=e[0];return"."===i?new R(t,e.slice(1),n).parts:"@"===i?[new U(t,e.slice(1),r.eventContext)]:"?"===i?[new k(t,e.slice(1),n)]:new T(t,e,n).parts},e.handleTextExpression=function(t){return new O(t)},t}()); | ||
*/var c="undefined"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,l=function(t,e,n){for(void 0===n&&(n=null);e!==n;){var r=e.nextSibling;t.removeChild(e),e=r}},h="{{lit-"+String(Math.random()).slice(2)+"}}",p="\x3c!--"+h+"--\x3e",f=new RegExp(h+"|"+p),d=function(t,e){this.parts=[],this.element=e;for(var n=[],r=[],i=document.createTreeWalker(e.content,133,null,!1),o=0,s=-1,a=0,u=t.strings,c=t.values.length;a<c;){var l=i.nextNode();if(null!==l){if(s++,1===l.nodeType){if(l.hasAttributes()){for(var p=l.attributes,d=p.length,y=0,g=0;g<d;g++)v(p[g].name,"$lit$")&&y++;for(;y-- >0;){var b=u[a],S=_.exec(b)[2],w=S.toLowerCase()+"$lit$",E=l.getAttribute(w);l.removeAttribute(w);var P=E.split(f);this.parts.push({type:"attribute",index:s,name:S,strings:P}),a+=P.length-1}}"TEMPLATE"===l.tagName&&(r.push(l),i.currentNode=l.content)}else if(3===l.nodeType){var T=l.data;if(T.indexOf(h)>=0){for(var x=l.parentNode,A=T.split(f),C=A.length-1,N=0;N<C;N++){var O=void 0,j=A[N];if(""===j)O=m();else{var k=_.exec(j);null!==k&&v(k[2],"$lit$")&&(j=j.slice(0,k.index)+k[1]+k[2].slice(0,-"$lit$".length)+k[3]),O=document.createTextNode(j)}x.insertBefore(O,l),this.parts.push({type:"node",index:++s})}""===A[C]?(x.insertBefore(m(),l),n.push(l)):l.data=A[C],a+=C}}else if(8===l.nodeType)if(l.data===h){var R=l.parentNode;null!==l.previousSibling&&s!==o||(s++,R.insertBefore(m(),l)),o=s,this.parts.push({type:"node",index:s}),null===l.nextSibling?l.data="":(n.push(l),s--),a++}else for(var L=-1;-1!==(L=l.data.indexOf(h,L+1));)this.parts.push({type:"node",index:-1}),a++}else i.currentNode=r.pop()}for(var U=0,V=n;U<V.length;U++){var M=V[U];M.parentNode.removeChild(M)}},v=function(t,e){var n=t.length-e.length;return n>=0&&t.slice(n)===e},y=function(t){return-1!==t.index},m=function(){return document.createComment("")},_=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function g(t,e){for(var n=t.element.content,r=t.parts,i=document.createTreeWalker(n,133,null,!1),o=S(r),s=r[o],a=-1,u=0,c=[],l=null;i.nextNode();){a++;var h=i.currentNode;for(h.previousSibling===l&&(l=null),e.has(h)&&(c.push(h),null===l&&(l=h)),null!==l&&u++;void 0!==s&&s.index===a;)s.index=null!==l?-1:s.index-u,s=r[o=S(r,o)]}c.forEach((function(t){return t.parentNode.removeChild(t)}))}var b=function(t){for(var e=11===t.nodeType?0:1,n=document.createTreeWalker(t,133,null,!1);n.nextNode();)e++;return e},S=function(t,e){void 0===e&&(e=-1);for(var n=e+1;n<t.length;n++){var r=t[n];if(y(r))return n}return-1}; | ||
/** | ||
@@ -29,3 +29,3 @@ * @license | ||
*/ | ||
function z(t){var e=F.get(t.type);void 0===e&&(e={stringsArray:new WeakMap,keyString:new Map},F.set(t.type,e));var n=e.stringsArray.get(t.strings);if(void 0!==n)return n;var r=t.strings.join(v);return void 0===(n=e.keyString.get(r))&&(n=new _(t,t.getTemplateElement()),e.keyString.set(r,n)),e.stringsArray.set(t.strings,n),n}var F=new Map,I=new WeakMap; | ||
var w=new WeakMap,E=function(t){return"function"==typeof t&&w.has(t)},P={},T={},x=function(){function t(t,e,n){this.__parts=[],this.template=t,this.processor=e,this.options=n}var e=t.prototype;return e.update=function(t){var e=0,n=this.__parts,r=Array.isArray(n),i=0;for(n=r?n:n[Symbol.iterator]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}void 0!==o&&o.setValue(t[e]),e++}var s=this.__parts,a=Array.isArray(s),u=0;for(s=a?s:s[Symbol.iterator]();;){var c;if(a){if(u>=s.length)break;c=s[u++]}else{if((u=s.next()).done)break;c=u.value}void 0!==c&&c.commit()}},e._clone=function(){for(var t,e=c?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),n=[],r=this.template.parts,i=document.createTreeWalker(e,133,null,!1),o=0,s=0,a=i.nextNode();o<r.length;)if(t=r[o],y(t)){for(;s<t.index;)s++,"TEMPLATE"===a.nodeName&&(n.push(a),i.currentNode=a.content),null===(a=i.nextNode())&&(i.currentNode=n.pop(),a=i.nextNode());if("node"===t.type){var u=this.processor.handleTextExpression(this.options);u.insertAfterNode(a.previousSibling),this.__parts.push(u)}else{var l;(l=this.__parts).push.apply(l,this.processor.handleAttributeExpressions(a,t.name,t.strings,this.options))}o++}else this.__parts.push(void 0),o++;return c&&(document.adoptNode(e),customElements.upgrade(e)),e},t}(),A=" "+h+" ",C=function(){function t(t,e,n,r){this.strings=t,this.values=e,this.type=n,this.processor=r}var e=t.prototype;return e.getHTML=function(){for(var t=this.strings.length-1,e="",n=!1,r=0;r<t;r++){var i=this.strings[r],o=i.lastIndexOf("\x3c!--");n=(o>-1||n)&&-1===i.indexOf("--\x3e",o+1);var s=_.exec(i);e+=null===s?i+(n?A:p):i.substr(0,s.index)+s[1]+s[2]+"$lit$"+s[3]+h}return e+=this.strings[t]},e.getTemplateElement=function(){var t=document.createElement("template");return t.innerHTML=this.getHTML(),t},t}(),N=function(t){return null===t||!("object"==typeof t||"function"==typeof t)},O=function(t){return Array.isArray(t)||!(!t||!t[Symbol.iterator])},j=function(){function t(t,e,n){this.dirty=!0,this.element=t,this.name=e,this.strings=n,this.parts=[];for(var r=0;r<n.length-1;r++)this.parts[r]=this._createPart()}var e=t.prototype;return e._createPart=function(){return new k(this)},e._getValue=function(){for(var t=this.strings,e=t.length-1,n="",r=0;r<e;r++){n+=t[r];var i=this.parts[r];if(void 0!==i){var o=i.value;if(N(o)||!O(o))n+="string"==typeof o?o:String(o);else{var s=o,a=Array.isArray(s),u=0;for(s=a?s:s[Symbol.iterator]();;){var c;if(a){if(u>=s.length)break;c=s[u++]}else{if((u=s.next()).done)break;c=u.value}n+="string"==typeof c?c:String(c)}}}}return n+=t[e]},e.commit=function(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))},t}(),k=function(){function t(t){this.value=void 0,this.committer=t}var e=t.prototype;return e.setValue=function(t){t===P||N(t)&&t===this.value||(this.value=t,E(t)||(this.committer.dirty=!0))},e.commit=function(){for(;E(this.value);){var t=this.value;this.value=P,t(this)}this.value!==P&&this.committer.commit()},t}(),R=function(){function t(t){this.value=void 0,this.__pendingValue=void 0,this.options=t}var e=t.prototype;return e.appendInto=function(t){this.startNode=t.appendChild(m()),this.endNode=t.appendChild(m())},e.insertAfterNode=function(t){this.startNode=t,this.endNode=t.nextSibling},e.appendIntoPart=function(t){t.__insert(this.startNode=m()),t.__insert(this.endNode=m())},e.insertAfterPart=function(t){t.__insert(this.startNode=m()),this.endNode=t.endNode,t.endNode=this.startNode},e.setValue=function(t){this.__pendingValue=t},e.commit=function(){if(null!==this.startNode.parentNode){for(;E(this.__pendingValue);){var t=this.__pendingValue;this.__pendingValue=P,t(this)}var e=this.__pendingValue;e!==P&&(N(e)?e!==this.value&&this.__commitText(e):e instanceof C?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):O(e)?this.__commitIterable(e):e===T?(this.value=T,this.clear()):this.__commitText(e))}},e.__insert=function(t){this.endNode.parentNode.insertBefore(t,this.endNode)},e.__commitNode=function(t){this.value!==t&&(this.clear(),this.__insert(t),this.value=t)},e.__commitText=function(t){var e=this.startNode.nextSibling,n="string"==typeof(t=null==t?"":t)?t:String(t);e===this.endNode.previousSibling&&3===e.nodeType?e.data=n:this.__commitNode(document.createTextNode(n)),this.value=t},e.__commitTemplateResult=function(t){var e=this.options.templateFactory(t);if(this.value instanceof x&&this.value.template===e)this.value.update(t.values);else{var n=new x(e,t.processor,this.options),r=n._clone();n.update(t.values),this.__commitNode(r),this.value=n}},e.__commitIterable=function(e){Array.isArray(this.value)||(this.value=[],this.clear());var n,r=this.value,i=0,o=e,s=Array.isArray(o),a=0;for(o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{if((a=o.next()).done)break;u=a.value}var c=u;void 0===(n=r[i])&&(n=new t(this.options),r.push(n),0===i?n.appendIntoPart(this):n.insertAfterPart(r[i-1])),n.setValue(c),n.commit(),i++}i<r.length&&(r.length=i,this.clear(n&&n.endNode))},e.clear=function(t){void 0===t&&(t=this.startNode),l(this.startNode.parentNode,t.nextSibling,this.endNode)},t}(),L=function(){function t(t,e,n){if(this.value=void 0,this.__pendingValue=void 0,2!==n.length||""!==n[0]||""!==n[1])throw new Error("Boolean attributes can only contain a single expression");this.element=t,this.name=e,this.strings=n}var e=t.prototype;return e.setValue=function(t){this.__pendingValue=t},e.commit=function(){for(;E(this.__pendingValue);){var t=this.__pendingValue;this.__pendingValue=P,t(this)}if(this.__pendingValue!==P){var e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=P}},t}(),U=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.single=2===r.length&&""===r[0]&&""===r[1],i}r(e,t);var n=e.prototype;return n._createPart=function(){return new V(this)},n._getValue=function(){return this.single?this.parts[0].value:t.prototype._getValue.call(this)},n.commit=function(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())},e}(j),V=function(t){function e(){return t.apply(this,arguments)||this}return r(e,t),e}(k),M=!1;!function(){try{var t={get capture(){return M=!0,!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){}}();var D=function(){function t(t,e,n){var r=this;this.value=void 0,this.__pendingValue=void 0,this.element=t,this.eventName=e,this.eventContext=n,this.__boundHandleEvent=function(t){return r.handleEvent(t)}}var e=t.prototype;return e.setValue=function(t){this.__pendingValue=t},e.commit=function(){for(;E(this.__pendingValue);){var t=this.__pendingValue;this.__pendingValue=P,t(this)}if(this.__pendingValue!==P){var e=this.__pendingValue,n=this.value,r=null==e||null!=n&&(e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive);r&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),null==e||null!=n&&!r||(this.__options=F(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=P}},e.handleEvent=function(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)},t}(),F=function(t){return t&&(M?{capture:t.capture,passive:t.passive,once:t.once}:t.capture)}; | ||
/** | ||
@@ -44,2 +44,3 @@ * @license | ||
*/ | ||
function z(t){var e=I.get(t.type);void 0===e&&(e={stringsArray:new WeakMap,keyString:new Map},I.set(t.type,e));var n=e.stringsArray.get(t.strings);if(void 0!==n)return n;var r=t.strings.join(h);return void 0===(n=e.keyString.get(r))&&(n=new d(t,t.getTemplateElement()),e.keyString.set(r,n)),e.stringsArray.set(t.strings,n),n}var I=new Map,$=new WeakMap,W=new(function(){function t(){}var e=t.prototype;return e.handleAttributeExpressions=function(t,e,n,r){var i=e[0];return"."===i?new U(t,e.slice(1),n).parts:"@"===i?[new D(t,e.slice(1),r.eventContext)]:"?"===i?[new L(t,e.slice(1),n)]:new j(t,e,n).parts},e.handleTextExpression=function(t){return new R(t)},t}()); | ||
/** | ||
@@ -58,3 +59,2 @@ * @license | ||
*/ | ||
(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.1.2");function $(t,e){for(var n=t.element.content,r=t.parts,i=document.createTreeWalker(n,133,null,!1),o=H(r),s=r[o],a=-1,u=0,c=[],l=null;i.nextNode();){a++;var h=i.currentNode;for(h.previousSibling===l&&(l=null),e.has(h)&&(c.push(h),null===l&&(l=h)),null!==l&&u++;void 0!==s&&s.index===a;)s.index=null!==l?-1:s.index-u,s=r[o=H(r,o)]}c.forEach((function(t){return t.parentNode.removeChild(t)}))}var W=function(t){for(var e=11===t.nodeType?0:1,n=document.createTreeWalker(t,133,null,!1);n.nextNode();)e++;return e},H=function(t,e){void 0===e&&(e=-1);for(var n=e+1;n<t.length;n++){var r=t[n];if(S(r))return n}return-1}; | ||
/** | ||
@@ -73,4 +73,17 @@ * @license | ||
*/ | ||
var q=function(t,e){return t+"--"+e},B=!0;void 0===window.ShadyCSS?B=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),B=!1);var K=function(t){return function(e){var n=q(e.type,t),r=F.get(n);void 0===r&&(r={stringsArray:new WeakMap,keyString:new Map},F.set(n,r));var i=r.stringsArray.get(e.strings);if(void 0!==i)return i;var o=e.strings.join(v);if(void 0===(i=r.keyString.get(o))){var s=e.getTemplateElement();B&&window.ShadyCSS.prepareTemplateDom(s,t),i=new _(e,s),r.keyString.set(o,i)}return r.stringsArray.set(e.strings,i),i}},G=["html","svg"],J=new Set,Y=function(t,e,n){J.add(t);var r=n?n.element:document.createElement("template"),i=e.querySelectorAll("style"),o=i.length;if(0!==o){for(var s=document.createElement("style"),a=0;a<o;a++){var u=i[a];u.parentNode.removeChild(u),s.textContent+=u.textContent}!function(t){G.forEach((function(e){var n=F.get(q(e,t));void 0!==n&&n.keyString.forEach((function(t){var e=t.element.content,n=new Set;Array.from(e.querySelectorAll("style")).forEach((function(t){n.add(t)})),$(t,n)}))}))}(t);var c=r.content;n?function(t,e,n){void 0===n&&(n=null);var r=t.element.content,i=t.parts;if(null!=n)for(var o=document.createTreeWalker(r,133,null,!1),s=H(i),a=0,u=-1;o.nextNode();){for(u++,o.currentNode===n&&(a=W(e),n.parentNode.insertBefore(e,n));-1!==s&&i[s].index===u;){if(a>0){for(;-1!==s;)i[s].index+=a,s=H(i,s);return}s=H(i,s)}}else r.appendChild(e)}(n,s,c.firstChild):c.insertBefore(s,c.firstChild),window.ShadyCSS.prepareTemplateStyles(r,t);var l=c.querySelector("style");if(window.ShadyCSS.nativeShadow&&null!==l)e.insertBefore(l.cloneNode(!0),e.firstChild);else if(n){c.insertBefore(s,c.firstChild);var h=new Set;h.add(s),$(n,h)}}else window.ShadyCSS.prepareTemplateStyles(r,t)};Function.prototype.$asyncbind=function t(e,n){function r(){return i.apply(e,arguments)}Function.prototype.$asyncbind||Object.defineProperty(Function.prototype,"$asyncbind",{value:t,enumerable:!1,configurable:!0,writable:!0}),t.trampoline||(t.trampoline=function(t,e,n,r,i){return function o(s){for(;s;){if(s.then)return s=s.then(o,r),i?void 0:s;try{if(s.pop){if(s.length)return s.pop()?e.call(t):s;s=n}else s=s.call(t)}catch(t){return r(t)}}}}),t.LazyThenable||(t.LazyThenable=function(){function t(t){return t&&t instanceof Object&&"function"==typeof t.then}function e(n,r,i){try{var o=i?i(r):r;if(n===o)return n.reject(new TypeError("Promise resolution loop"));t(o)?o.then((function(t){e(n,t)}),(function(t){n.reject(t)})):n.resolve(o)}catch(t){n.reject(t)}}function n(){}function r(){}function i(n,i){var o=new r;try{this._resolver((function(r){return t(r)?r.then(n,i):e(o,r,n)}),(function(t){e(o,t,i)}))}catch(t){e(o,t,i)}return o}function o(t){this._resolver=t,this.then=i}return r.prototype={resolve:n,reject:n,then:function(t,e){this.resolve=t,this.reject=e}},o.resolve=function(t){return o.isThenable(t)?t:{then:function(e){return e(t)}}},o.isThenable=t,o}(),t.EagerThenable=t.Thenable=(t.EagerThenableFactory=function(t){t=t||"object"==typeof process&&process.nextTick||"function"==typeof setImmediate&&setImmediate||function(t){setTimeout(t,0)};var e=function(){var e=[],n=0;function r(){for(;e.length-n;){try{e[n]()}catch(t){}e[n++]=void 0,1024===n&&(e.splice(0,1024),n=0)}}return function(i){e.push(i),e.length-n==1&&t(r)}}();function n(t){if(t){var e=this;t((function(t){e.resolve(t)}),(function(t){e.reject(t)}))}}function r(t,e){if("function"==typeof t.y)try{var n=t.y.call(void 0,e);t.p.resolve(n)}catch(e){t.p.reject(e)}else t.p.resolve(e)}function i(t,e){if("function"==typeof t.n)try{var n=t.n.call(void 0,e);t.p.resolve(n)}catch(e){t.p.reject(e)}else t.p.reject(e)}return n.prototype={resolve:function(t){if(void 0===this.state){if(t===this)return this.reject(new TypeError("Attempt to resolve promise with self"));var n=this;if(t&&("function"==typeof t||"object"==typeof t))try{var i=0,o=t.then;if("function"==typeof o)return void o.call(t,(function(t){i++||n.resolve(t)}),(function(t){i++||n.reject(t)}))}catch(t){return void(i||this.reject(t))}this.state=r,this.v=t,n.c&&e((function(){for(var e=0,i=n.c.length;e<i;e++)r(n.c[e],t)}))}},reject:function(t){if(void 0===this.state){this.state=i,this.v=t;var n=this.c;n&&e((function(){for(var e=0,r=n.length;e<r;e++)i(n[e],t)}))}},then:function(t,r){var i=new n,o={y:t,n:r,p:i};if(void 0===this.state)this.c?this.c.push(o):this.c=[o];else{var s=this.state,a=this.v;e((function(){s(o,a)}))}return i}},n.resolve=function(t){if(t&&t instanceof n)return t;var e=new n;return e.resolve(t),e},n.reject=function(t){if(t&&t instanceof n)return t;var e=new n;return e.reject(t),e},n.version="2.3.3-nodent",n})());var i=this;switch(n){case!0:return new t.Thenable(r);case 0:return new t.LazyThenable(r);case void 0:return r.then=r,r;default:return function(){try{return i.apply(e,arguments)}catch(t){return n(t)}}}},window.JSCompiler_renameProperty=function(t){return t};var X={toAttribute:function(t,e){switch(e){case Boolean:return t?"":null;case Object:case Array:return null==t?t:JSON.stringify(t)}return t},fromAttribute:function(t,e){switch(e){case Boolean:return null!==t;case Number:return null===t?null:Number(t);case Object:case Array:return JSON.parse(t)}return t}},Q=function(t,e){return e!==t&&(e==e||t==t)},Z={attribute:!0,type:String,converter:X,reflect:!1,hasChanged:Q},tt=Promise.resolve(!0),et=function(t){function e(){var e=t.call(this)||this;return e._updateState=0,e._instanceProperties=void 0,e._updatePromise=tt,e._hasConnectedResolver=void 0,e._changedProperties=new Map,e._reflectingProperties=void 0,e.initialize(),e}r(e,t),e._ensureClassProperties=function(){var t=this;if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;var e=Object.getPrototypeOf(this)._classProperties;void 0!==e&&e.forEach((function(e,n){return t._classProperties.set(n,e)}))}},e.createProperty=function(t,e){if(void 0===e&&(e=Z),this._ensureClassProperties(),this._classProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){var n="symbol"==typeof t?Symbol():"__"+t;Object.defineProperty(this.prototype,t,{get:function(){return this[n]},set:function(e){var r=this[t];this[n]=e,this._requestUpdate(t,r)},configurable:!0,enumerable:!0})}},e.finalize=function(){var t=Object.getPrototypeOf(this);if(t.hasOwnProperty("finalized")||t.finalize(),this.finalized=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){var e=this.properties,n=[].concat(Object.getOwnPropertyNames(e),"function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]),r=Array.isArray(n),i=0;for(n=r?n:n[Symbol.iterator]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}var s=o;this.createProperty(s,e[s])}}},e._attributeNameForProperty=function(t,e){var n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0},e._valueHasChanged=function(t,e,n){return void 0===n&&(n=Q),n(t,e)},e._propertyValueFromAttribute=function(t,e){var n=e.type,r=e.converter||X,i="function"==typeof r?r:r.fromAttribute;return i?i(t,n):t},e._propertyValueToAttribute=function(t,e){if(void 0!==e.reflect){var n=e.type,r=e.converter;return(r&&r.toAttribute||X.toAttribute)(t,n)}};var i=e.prototype;return i.initialize=function(){this._saveInstanceProperties(),this._requestUpdate()},i._saveInstanceProperties=function(){var t=this;this.constructor._classProperties.forEach((function(e,n){if(t.hasOwnProperty(n)){var r=t[n];delete t[n],t._instanceProperties||(t._instanceProperties=new Map),t._instanceProperties.set(n,r)}}))},i._applyInstanceProperties=function(){var t=this;this._instanceProperties.forEach((function(e,n){return t[n]=e})),this._instanceProperties=void 0},i.connectedCallback=function(){this._updateState=32|this._updateState,this._hasConnectedResolver&&(this._hasConnectedResolver(),this._hasConnectedResolver=void 0)},i.disconnectedCallback=function(){},i.attributeChangedCallback=function(t,e,n){e!==n&&this._attributeToProperty(t,n)},i._propertyToAttribute=function(t,e,n){void 0===n&&(n=Z);var r=this.constructor,i=r._attributeNameForProperty(t,n);if(void 0!==i){var o=r._propertyValueToAttribute(e,n);if(void 0===o)return;this._updateState=8|this._updateState,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._updateState=-9&this._updateState}},i._attributeToProperty=function(t,e){if(!(8&this._updateState)){var n=this.constructor,r=n._attributeToPropertyMap.get(t);if(void 0!==r){var i=n._classProperties.get(r)||Z;this._updateState=16|this._updateState,this[r]=n._propertyValueFromAttribute(e,i),this._updateState=-17&this._updateState}}},i._requestUpdate=function(t,e){var n=!0;if(void 0!==t){var r=this.constructor,i=r._classProperties.get(t)||Z;r._valueHasChanged(this[t],e,i.hasChanged)?(this._changedProperties.has(t)||this._changedProperties.set(t,e),!0!==i.reflect||16&this._updateState||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(t,i))):n=!1}!this._hasRequestedUpdate&&n&&this._enqueueUpdate()},i.requestUpdate=function(t,e){return this._requestUpdate(t,e),this.updateComplete},i._enqueueUpdate=function(){return new Promise(function(t,e){var n,r,i,o,s;n=this,this._updateState=4|this._updateState,o=this._updatePromise,this._updatePromise=new Promise((function(t,e){r=t,i=e}));var a=function(){if(!this._hasConnected)return new Promise((function(t){return n._hasConnectedResolver=t})).then(function(){return o.call(this)}.$asyncbind(this,e),e);function o(){var n=function(){return r(!this._hasRequestedUpdate),t()}.$asyncbind(this,e),o=function(t){return i(t),n()}.$asyncbind(this,e);try{return null!=(s=this.performUpdate())?s.then(function(){return function(){return n()}.call(this)}.$asyncbind(this,o),o):function(){return n()}.call(this)}catch(t){o(t)}}return o.call(this)}.$asyncbind(this,e),u=function(){return a()}.$asyncbind(this,e);try{return o.then(function(){return a()}.$asyncbind(this,u),u)}catch(t){u(t)}}.$asyncbind(this))},i.performUpdate=function(){this._instanceProperties&&this._applyInstanceProperties();var t=!1,e=this._changedProperties;try{(t=this.shouldUpdate(e))&&this.update(e)}catch(e){throw t=!1,e}finally{this._markUpdated()}t&&(1&this._updateState||(this._updateState=1|this._updateState,this.firstUpdated(e)),this.updated(e))},i._markUpdated=function(){this._changedProperties=new Map,this._updateState=-5&this._updateState},i._getUpdateComplete=function(){return this._updatePromise},i.shouldUpdate=function(){return!0},i.update=function(){var t=this;void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach((function(e,n){return t._propertyToAttribute(n,t[n],e)})),this._reflectingProperties=void 0)},i.updated=function(){},i.firstUpdated=function(){},n(e,[{key:"_hasConnected",get:function(){return 32&this._updateState}},{key:"_hasRequestedUpdate",get:function(){return 4&this._updateState}},{key:"hasUpdated",get:function(){return 1&this._updateState}},{key:"updateComplete",get:function(){return this._getUpdateComplete()}}],[{key:"observedAttributes",get:function(){var t=this;this.finalize();var e=[];return this._classProperties.forEach((function(n,r){var i=t._attributeNameForProperty(r,n);void 0!==i&&(t._attributeToPropertyMap.set(i,r),e.push(i))})),e}}]),e}(u(HTMLElement));et.finalized=!0; | ||
"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.2.1");var H=function(t,e){return t+"--"+e},q=!0; | ||
/** | ||
* @license | ||
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved. | ||
* This code may only be used under the BSD style license found at | ||
* http://polymer.github.io/LICENSE.txt | ||
* The complete set of authors may be found at | ||
* http://polymer.github.io/AUTHORS.txt | ||
* The complete set of contributors may be found at | ||
* http://polymer.github.io/CONTRIBUTORS.txt | ||
* Code distributed by Google as part of the polymer project is also | ||
* subject to an additional IP rights grant found at | ||
* http://polymer.github.io/PATENTS.txt | ||
*/void 0===window.ShadyCSS?q=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),q=!1);var B=function(t){return function(e){var n=H(e.type,t),r=I.get(n);void 0===r&&(r={stringsArray:new WeakMap,keyString:new Map},I.set(n,r));var i=r.stringsArray.get(e.strings);if(void 0!==i)return i;var o=e.strings.join(h);if(void 0===(i=r.keyString.get(o))){var s=e.getTemplateElement();q&&window.ShadyCSS.prepareTemplateDom(s,t),i=new d(e,s),r.keyString.set(o,i)}return r.stringsArray.set(e.strings,i),i}},K=["html","svg"],G=new Set,J=function(t,e,n){G.add(t);var r=n?n.element:document.createElement("template"),i=e.querySelectorAll("style"),o=i.length;if(0!==o){for(var s=document.createElement("style"),a=0;a<o;a++){var u=i[a];u.parentNode.removeChild(u),s.textContent+=u.textContent}!function(t){K.forEach((function(e){var n=I.get(H(e,t));void 0!==n&&n.keyString.forEach((function(t){var e=t.element.content,n=new Set;Array.from(e.querySelectorAll("style")).forEach((function(t){n.add(t)})),g(t,n)}))}))}(t);var c=r.content;n?function(t,e,n){void 0===n&&(n=null);var r=t.element.content,i=t.parts;if(null!=n)for(var o=document.createTreeWalker(r,133,null,!1),s=S(i),a=0,u=-1;o.nextNode();){for(u++,o.currentNode===n&&(a=b(e),n.parentNode.insertBefore(e,n));-1!==s&&i[s].index===u;){if(a>0){for(;-1!==s;)i[s].index+=a,s=S(i,s);return}s=S(i,s)}}else r.appendChild(e)}(n,s,c.firstChild):c.insertBefore(s,c.firstChild),window.ShadyCSS.prepareTemplateStyles(r,t);var l=c.querySelector("style");if(window.ShadyCSS.nativeShadow&&null!==l)e.insertBefore(l.cloneNode(!0),e.firstChild);else if(n){c.insertBefore(s,c.firstChild);var h=new Set;h.add(s),g(n,h)}}else window.ShadyCSS.prepareTemplateStyles(r,t)};Function.prototype.$asyncbind=function t(e,n){function r(){return i.apply(e,arguments)}Function.prototype.$asyncbind||Object.defineProperty(Function.prototype,"$asyncbind",{value:t,enumerable:!1,configurable:!0,writable:!0}),t.trampoline||(t.trampoline=function(t,e,n,r,i){return function o(s){for(;s;){if(s.then)return s=s.then(o,r),i?void 0:s;try{if(s.pop){if(s.length)return s.pop()?e.call(t):s;s=n}else s=s.call(t)}catch(t){return r(t)}}}}),t.LazyThenable||(t.LazyThenable=function(){function t(t){return t&&t instanceof Object&&"function"==typeof t.then}function e(n,r,i){try{var o=i?i(r):r;if(n===o)return n.reject(new TypeError("Promise resolution loop"));t(o)?o.then((function(t){e(n,t)}),(function(t){n.reject(t)})):n.resolve(o)}catch(t){n.reject(t)}}function n(){}function r(){}function i(n,i){var o=new r;try{this._resolver((function(r){return t(r)?r.then(n,i):e(o,r,n)}),(function(t){e(o,t,i)}))}catch(t){e(o,t,i)}return o}function o(t){this._resolver=t,this.then=i}return r.prototype={resolve:n,reject:n,then:function(t,e){this.resolve=t,this.reject=e}},o.resolve=function(t){return o.isThenable(t)?t:{then:function(e){return e(t)}}},o.isThenable=t,o}(),t.EagerThenable=t.Thenable=(t.EagerThenableFactory=function(t){t=t||"object"==typeof process&&process.nextTick||"function"==typeof setImmediate&&setImmediate||function(t){setTimeout(t,0)};var e=function(){var e=[],n=0;function r(){for(;e.length-n;){try{e[n]()}catch(t){}e[n++]=void 0,1024===n&&(e.splice(0,1024),n=0)}}return function(i){e.push(i),e.length-n==1&&t(r)}}();function n(t){if(t){var e=this;t((function(t){e.resolve(t)}),(function(t){e.reject(t)}))}}function r(t,e){if("function"==typeof t.y)try{var n=t.y.call(void 0,e);t.p.resolve(n)}catch(e){t.p.reject(e)}else t.p.resolve(e)}function i(t,e){if("function"==typeof t.n)try{var n=t.n.call(void 0,e);t.p.resolve(n)}catch(e){t.p.reject(e)}else t.p.reject(e)}return n.prototype={resolve:function(t){if(void 0===this.state){if(t===this)return this.reject(new TypeError("Attempt to resolve promise with self"));var n=this;if(t&&("function"==typeof t||"object"==typeof t))try{var i=0,o=t.then;if("function"==typeof o)return void o.call(t,(function(t){i++||n.resolve(t)}),(function(t){i++||n.reject(t)}))}catch(t){return void(i||this.reject(t))}this.state=r,this.v=t,n.c&&e((function(){for(var e=0,i=n.c.length;e<i;e++)r(n.c[e],t)}))}},reject:function(t){if(void 0===this.state){this.state=i,this.v=t;var n=this.c;n&&e((function(){for(var e=0,r=n.length;e<r;e++)i(n[e],t)}))}},then:function(t,r){var i=new n,o={y:t,n:r,p:i};if(void 0===this.state)this.c?this.c.push(o):this.c=[o];else{var s=this.state,a=this.v;e((function(){s(o,a)}))}return i}},n.resolve=function(t){if(t&&t instanceof n)return t;var e=new n;return e.resolve(t),e},n.reject=function(t){if(t&&t instanceof n)return t;var e=new n;return e.reject(t),e},n.version="2.3.3-nodent",n})());var i=this;switch(n){case!0:return new t.Thenable(r);case 0:return new t.LazyThenable(r);case void 0:return r.then=r,r;default:return function(){try{return i.apply(e,arguments)}catch(t){return n(t)}}}},window.JSCompiler_renameProperty=function(t){return t};var Y={toAttribute:function(t,e){switch(e){case Boolean:return t?"":null;case Object:case Array:return null==t?t:JSON.stringify(t)}return t},fromAttribute:function(t,e){switch(e){case Boolean:return null!==t;case Number:return null===t?null:Number(t);case Object:case Array:return JSON.parse(t)}return t}},X=function(t,e){return e!==t&&(e==e||t==t)},Q={attribute:!0,type:String,converter:Y,reflect:!1,hasChanged:X},Z=function(t){function e(){var e=t.call(this)||this;return e._updateState=0,e._instanceProperties=void 0,e._updatePromise=new Promise((function(t){return e._enableUpdatingResolver=t})),e._changedProperties=new Map,e._reflectingProperties=void 0,e.initialize(),e}r(e,t),e._ensureClassProperties=function(){var t=this;if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;var e=Object.getPrototypeOf(this)._classProperties;void 0!==e&&e.forEach((function(e,n){return t._classProperties.set(n,e)}))}},e.createProperty=function(t,e){if(void 0===e&&(e=Q),this._ensureClassProperties(),this._classProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){var n="symbol"==typeof t?Symbol():"__"+t,r=this.getPropertyDescriptor(t,n,e);void 0!==r&&Object.defineProperty(this.prototype,t,r)}},e.getPropertyDescriptor=function(t,e){return{get:function(){return this[e]},set:function(n){var r=this[t];this[e]=n,this._requestUpdate(t,r)},configurable:!0,enumerable:!0}},e.getPropertyOptions=function(t){return this._classProperties&&this._classProperties.get(t)||Q},e.finalize=function(){var t=Object.getPrototypeOf(this);if(t.hasOwnProperty("finalized")||t.finalize(),this.finalized=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){var e=this.properties,n=[].concat(Object.getOwnPropertyNames(e),"function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]),r=Array.isArray(n),i=0;for(n=r?n:n[Symbol.iterator]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}var s=o;this.createProperty(s,e[s])}}},e._attributeNameForProperty=function(t,e){var n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0},e._valueHasChanged=function(t,e,n){return void 0===n&&(n=X),n(t,e)},e._propertyValueFromAttribute=function(t,e){var n=e.type,r=e.converter||Y,i="function"==typeof r?r:r.fromAttribute;return i?i(t,n):t},e._propertyValueToAttribute=function(t,e){if(void 0!==e.reflect){var n=e.type,r=e.converter;return(r&&r.toAttribute||Y.toAttribute)(t,n)}};var i=e.prototype;return i.initialize=function(){this._saveInstanceProperties(),this._requestUpdate()},i._saveInstanceProperties=function(){var t=this;this.constructor._classProperties.forEach((function(e,n){if(t.hasOwnProperty(n)){var r=t[n];delete t[n],t._instanceProperties||(t._instanceProperties=new Map),t._instanceProperties.set(n,r)}}))},i._applyInstanceProperties=function(){var t=this;this._instanceProperties.forEach((function(e,n){return t[n]=e})),this._instanceProperties=void 0},i.connectedCallback=function(){this.enableUpdating()},i.enableUpdating=function(){void 0!==this._enableUpdatingResolver&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)},i.disconnectedCallback=function(){},i.attributeChangedCallback=function(t,e,n){e!==n&&this._attributeToProperty(t,n)},i._propertyToAttribute=function(t,e,n){void 0===n&&(n=Q);var r=this.constructor,i=r._attributeNameForProperty(t,n);if(void 0!==i){var o=r._propertyValueToAttribute(e,n);if(void 0===o)return;this._updateState=8|this._updateState,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._updateState=-9&this._updateState}},i._attributeToProperty=function(t,e){if(!(8&this._updateState)){var n=this.constructor,r=n._attributeToPropertyMap.get(t);if(void 0!==r){var i=n.getPropertyOptions(r);this._updateState=16|this._updateState,this[r]=n._propertyValueFromAttribute(e,i),this._updateState=-17&this._updateState}}},i._requestUpdate=function(t,e){var n=!0;if(void 0!==t){var r=this.constructor,i=r.getPropertyOptions(t);r._valueHasChanged(this[t],e,i.hasChanged)?(this._changedProperties.has(t)||this._changedProperties.set(t,e),!0!==i.reflect||16&this._updateState||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(t,i))):n=!1}!this._hasRequestedUpdate&&n&&(this._updatePromise=this._enqueueUpdate())},i.requestUpdate=function(t,e){return this._requestUpdate(t,e),this.updateComplete},i._enqueueUpdate=function(){return new Promise(function(t,e){var n;this._updateState=4|this._updateState;var r=function(){return null!=(n=this.performUpdate())?n.then(function(){return function(){return t(!this._hasRequestedUpdate)}.call(this)}.$asyncbind(this,e),e):function(){return t(!this._hasRequestedUpdate)}.call(this)}.$asyncbind(this,e),i=function(){return r()}.$asyncbind(this,e);try{return this._updatePromise.then(function(){return r()}.$asyncbind(this,i),i)}catch(t){i(t)}}.$asyncbind(this))},i.performUpdate=function(){this._instanceProperties&&this._applyInstanceProperties();var t=!1,e=this._changedProperties;try{(t=this.shouldUpdate(e))?this.update(e):this._markUpdated()}catch(e){throw t=!1,this._markUpdated(),e}t&&(1&this._updateState||(this._updateState=1|this._updateState,this.firstUpdated(e)),this.updated(e))},i._markUpdated=function(){this._changedProperties=new Map,this._updateState=-5&this._updateState},i._getUpdateComplete=function(){return this._updatePromise},i.shouldUpdate=function(){return!0},i.update=function(){var t=this;void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach((function(e,n){return t._propertyToAttribute(n,t[n],e)})),this._reflectingProperties=void 0),this._markUpdated()},i.updated=function(){},i.firstUpdated=function(){},n(e,[{key:"_hasRequestedUpdate",get:function(){return 4&this._updateState}},{key:"hasUpdated",get:function(){return 1&this._updateState}},{key:"updateComplete",get:function(){return this._getUpdateComplete()}}],[{key:"observedAttributes",get:function(){var t=this;this.finalize();var e=[];return this._classProperties.forEach((function(n,r){var i=t._attributeNameForProperty(r,n);void 0!==i&&(t._attributeToPropertyMap.set(i,r),e.push(i))})),e}}]),e}(u(HTMLElement));Z.finalized=!0,Function.prototype.$asyncbind=function t(e,n){function r(){return i.apply(e,arguments)}Function.prototype.$asyncbind||Object.defineProperty(Function.prototype,"$asyncbind",{value:t,enumerable:!1,configurable:!0,writable:!0}),t.trampoline||(t.trampoline=function(t,e,n,r,i){return function o(s){for(;s;){if(s.then)return s=s.then(o,r),i?void 0:s;try{if(s.pop){if(s.length)return s.pop()?e.call(t):s;s=n}else s=s.call(t)}catch(t){return r(t)}}}}),t.LazyThenable||(t.LazyThenable=function(){function t(t){return t&&t instanceof Object&&"function"==typeof t.then}function e(n,r,i){try{var o=i?i(r):r;if(n===o)return n.reject(new TypeError("Promise resolution loop"));t(o)?o.then((function(t){e(n,t)}),(function(t){n.reject(t)})):n.resolve(o)}catch(t){n.reject(t)}}function n(){}function r(){}function i(n,i){var o=new r;try{this._resolver((function(r){return t(r)?r.then(n,i):e(o,r,n)}),(function(t){e(o,t,i)}))}catch(t){e(o,t,i)}return o}function o(t){this._resolver=t,this.then=i}return r.prototype={resolve:n,reject:n,then:function(t,e){this.resolve=t,this.reject=e}},o.resolve=function(t){return o.isThenable(t)?t:{then:function(e){return e(t)}}},o.isThenable=t,o}(),t.EagerThenable=t.Thenable=(t.EagerThenableFactory=function(t){t=t||"object"==typeof process&&process.nextTick||"function"==typeof setImmediate&&setImmediate||function(t){setTimeout(t,0)};var e=function(){var e=[],n=0;function r(){for(;e.length-n;){try{e[n]()}catch(t){}e[n++]=void 0,1024===n&&(e.splice(0,1024),n=0)}}return function(i){e.push(i),e.length-n==1&&t(r)}}();function n(t){if(t){var e=this;t((function(t){e.resolve(t)}),(function(t){e.reject(t)}))}}function r(t,e){if("function"==typeof t.y)try{var n=t.y.call(void 0,e);t.p.resolve(n)}catch(e){t.p.reject(e)}else t.p.resolve(e)}function i(t,e){if("function"==typeof t.n)try{var n=t.n.call(void 0,e);t.p.resolve(n)}catch(e){t.p.reject(e)}else t.p.reject(e)}return n.prototype={resolve:function(t){if(void 0===this.state){if(t===this)return this.reject(new TypeError("Attempt to resolve promise with self"));var n=this;if(t&&("function"==typeof t||"object"==typeof t))try{var i=0,o=t.then;if("function"==typeof o)return void o.call(t,(function(t){i++||n.resolve(t)}),(function(t){i++||n.reject(t)}))}catch(t){return void(i||this.reject(t))}this.state=r,this.v=t,n.c&&e((function(){for(var e=0,i=n.c.length;e<i;e++)r(n.c[e],t)}))}},reject:function(t){if(void 0===this.state){this.state=i,this.v=t;var n=this.c;n&&e((function(){for(var e=0,r=n.length;e<r;e++)i(n[e],t)}))}},then:function(t,r){var i=new n,o={y:t,n:r,p:i};if(void 0===this.state)this.c?this.c.push(o):this.c=[o];else{var s=this.state,a=this.v;e((function(){s(o,a)}))}return i}},n.resolve=function(t){if(t&&t instanceof n)return t;var e=new n;return e.resolve(t),e},n.reject=function(t){if(t&&t instanceof n)return t;var e=new n;return e.reject(t),e},n.version="2.3.3-nodent",n})());var i=this;switch(n){case!0:return new t.Thenable(r);case 0:return new t.LazyThenable(r);case void 0:return r.then=r,r;default:return function(){try{return i.apply(e,arguments)}catch(t){return n(t)}}}}; | ||
/** | ||
@license | ||
@@ -85,2 +98,2 @@ Copyright (c) 2019 The Polymer Project Authors. All rights reserved. | ||
*/ | ||
var nt="adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,rt=Symbol(),it=function(){function t(t,e){if(e!==rt)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}return t.prototype.toString=function(){return this.cssText},n(t,[{key:"styleSheet",get:function(){return void 0===this._styleSheet&&(nt?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}}]),t}(),ot=function(t){return new it(String(t),rt)},st=function(t){if(t instanceof it)return t.cssText;if("number"==typeof t)return t;throw new Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.")};(window.litElementVersions||(window.litElementVersions=[])).push("2.2.1");var at=function(t){return t.flat?t.flat(1/0):function t(e,n){void 0===n&&(n=[]);for(var r=0,i=e.length;r<i;r++){var o=e[r];Array.isArray(o)?t(o,n):n.push(o)}return n}(t)},ut=function(t){function e(){return t.apply(this,arguments)||this}r(e,t),e.finalize=function(){t.finalize.call(this),this._styles=this.hasOwnProperty(JSCompiler_renameProperty("styles",this))?this._getUniqueStyles():this._styles||[]},e._getUniqueStyles=function(){var t=this.styles,e=[];Array.isArray(t)?at(t).reduceRight((function(t,e){return t.add(e),t}),new Set).forEach((function(t){return e.unshift(t)})):t&&e.push(t);return e};var n=e.prototype;return n.initialize=function(){t.prototype.initialize.call(this),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()},n.createRenderRoot=function(){return this.attachShadow({mode:"open"})},n.adoptStyles=function(){var t=this.constructor._styles;0!==t.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?nt?this.renderRoot.adoptedStyleSheets=t.map((function(t){return t.styleSheet})):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(t.map((function(t){return t.cssText})),this.localName))},n.connectedCallback=function(){t.prototype.connectedCallback.call(this),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)},n.update=function(e){var n=this;t.prototype.update.call(this,e);var r=this.render();r instanceof P&&this.constructor.render(r,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach((function(t){var e=document.createElement("style");e.textContent=t.cssText,n.renderRoot.appendChild(e)})))},n.render=function(){},e}(et);ut.finalized=!0,ut.render=function(t,e,n){if(!n||"object"!=typeof n||!n.scopeName)throw new Error("The `scopeName` option is required.");var r=n.scopeName,i=I.has(e),o=B&&11===e.nodeType&&!!e.host,s=o&&!J.has(r),a=s?document.createDocumentFragment():e;if(function(t,e,n){var r=I.get(e);void 0===r&&(p(e,e.firstChild),I.set(e,r=new O(Object.assign({templateFactory:z},n))),r.appendInto(e)),r.setValue(t),r.commit()}(t,a,Object.assign({templateFactory:K(r)},n)),s){var u=I.get(a);I.delete(a);var c=u.value instanceof E?u.value.template:void 0;Y(r,a,c),p(e,e.firstChild),e.appendChild(a),I.set(e,u)}!i&&o&&window.ShadyCSS.styleElement(e.host)};var ct={GENERAL:{DELETE:"Delete",REMOVE:"Remove",DOWNLOAD:"Download",UPLOAD:"upload",SELECT:"Select"}},lt={ESCAPE:"Escape",ARROW_RIGHT:"ArrowRight",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown"},ht={ESCAPE:27},pt=function(t){return t.key===lt.ESCAPE||t.keyCode===ht.ESCAPE},dt=Object.freeze({__proto__:null,messages:ct,sizes:{FULL:"full",MEDIUM:"medium",SMALL:"small"},colorModifiers:{LIGHTEST:"-lightest",LIGHTER:"-lighter",LIGHT:"-light",DARK:"-dark",DARKER:"-darker"},colors:{WHITE:"white",BLACK:"black",RED:"red",ORANGE:"orange",YELLOW:"yellow",GREEN:"green",BLUE:"blue",PURPLE:"purple",PINK:"pink",GRAY:"gray",SLATE:"slate"},delay:{NOW:100,FAST:200,SLOW:600},keyboardEventKeys:lt,keyboardEventKeyCodes:ht}),ft=Object.freeze({__proto__:null,classNamesToSelector:function(t){var e={};return Object.keys(t).forEach((function(n){e[n]="."+t[n]})),e},objectKeysChangeCase:function(t,e){return void 0===e&&(e="toLowerCase"),Object.keys(t).reduce((function(n,r){return n[r[e]()]=t[r],n}),{})},debounceEvent:function(t,e){var n;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];clearTimeout(n),n=setTimeout((function(){return t.apply(void 0,i)}),e)}},isEscapeKeyEvent:pt}),vt=function(){function t(t){this.parentElement=t,this.onKeyDown=this.onKeyDown.bind(this)}var e=t.prototype;return e.start=function(){document.addEventListener("keydown",this.onKeyDown)},e.stop=function(){document.removeEventListener("keydown",this.onKeyDown)},e.onKeyDown=function(t){this.parentElement.visible&&!this.parentElement.noCloseOnEscKey&&!t.isComposing&&pt(t)&&this.parentElement.close()},t}();var yt=function(t){function e(){return t.apply(this,arguments)||this}return r(e,t),e.prototype.dispatchCustomEvent=function(t,e,n){var r=this;void 0===e&&(e={}),void 0===n&&(n=!1);var i=new CustomEvent(t,{detail:e,bubbles:!0,composed:!0});n?setTimeout((function(){r.dispatchEvent(i)}),dt.delay.FAST):this.dispatchEvent(i)},n(e,[{key:"bodyHasRTL",get:function(){return"rtl"===document.body.getAttribute("dir")}},{key:"bodyDir",get:function(){return document.body.getAttribute("dir")||"ltr"}}],[{key:"styles",get:function(){return[ot(":focus{outline:none}:host{margin:0;padding:0;font-size:14px;font-size:var(--ts-font-size-default)}:host,:host *{box-sizing:border-box;font-family:Open Sans,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;font-family:var(--ts-font-family)}")]}}]),e}(ut);t.CloseOnEscBehavior=vt,t.TSElement=yt,t.constants=dt,t.css=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=n.reduce((function(e,n,r){return e+st(n)+t[r+1]}),t[0]);return new it(i,rt)},t.customElementDefineHelper=function(t,e){window.customElements.get(t)||window.customElements.define(t,e)},t.helpers=ft,t.html=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return new P(t,n,"html",D)},t.unsafeCSS=ot,t.validateSlottedNodes=function(t,e,n){var r=n.map((function(t){return t.toLowerCase()}));if(e.filter((function(t){if(t.nodeType!==Node.TEXT_NODE)return-1===r.indexOf(t.tagName.toLowerCase())})).length>0){var i=n.map((function(t){return t.toLowerCase()})).join();throw new Error("You can only use "+i+" in "+t.toLowerCase()+" component!")}},Object.defineProperty(t,"__esModule",{value:!0})})); | ||
var tt="adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,et=Symbol(),nt=function(){function t(t,e){if(e!==et)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}return t.prototype.toString=function(){return this.cssText},n(t,[{key:"styleSheet",get:function(){return void 0===this._styleSheet&&(tt?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}}]),t}(),rt=function(t){return new nt(String(t),et)},it=function(t){if(t instanceof nt)return t.cssText;if("number"==typeof t)return t;throw new Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.")};(window.litElementVersions||(window.litElementVersions=[])).push("2.3.1");var ot={},st=function(t){function e(){return t.apply(this,arguments)||this}r(e,t),e.getStyles=function(){return this.styles},e._getUniqueStyles=function(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_styles",this))){var t=this.getStyles();if(void 0===t)this._styles=[];else if(Array.isArray(t)){var e=function(t,n){return t.reduceRight((function(t,n){return Array.isArray(n)?e(n,t):(t.add(n),t)}),n)},n=e(t,new Set),r=[];n.forEach((function(t){return r.unshift(t)})),this._styles=r}else this._styles=[t]}};var n=e.prototype;return n.initialize=function(){t.prototype.initialize.call(this),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()},n.createRenderRoot=function(){return this.attachShadow({mode:"open"})},n.adoptStyles=function(){var t=this.constructor._styles;0!==t.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?tt?this.renderRoot.adoptedStyleSheets=t.map((function(t){return t.styleSheet})):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(t.map((function(t){return t.cssText})),this.localName))},n.connectedCallback=function(){t.prototype.connectedCallback.call(this),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)},n.update=function(e){var n=this,r=this.render();t.prototype.update.call(this,e),r!==ot&&this.constructor.render(r,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach((function(t){var e=document.createElement("style");e.textContent=t.cssText,n.renderRoot.appendChild(e)})))},n.render=function(){return ot},e}(Z);st.finalized=!0,st.render=function(t,e,n){if(!n||"object"!=typeof n||!n.scopeName)throw new Error("The `scopeName` option is required.");var r=n.scopeName,i=$.has(e),o=q&&11===e.nodeType&&!!e.host,s=o&&!G.has(r),a=s?document.createDocumentFragment():e;if(function(t,e,n){var r=$.get(e);void 0===r&&(l(e,e.firstChild),$.set(e,r=new R(Object.assign({templateFactory:z},n))),r.appendInto(e)),r.setValue(t),r.commit()}(t,a,Object.assign({templateFactory:B(r)},n)),s){var u=$.get(a);$.delete(a);var c=u.value instanceof x?u.value.template:void 0;J(r,a,c),l(e,e.firstChild),e.appendChild(a),$.set(e,u)}!i&&o&&window.ShadyCSS.styleElement(e.host)};var at={GENERAL:{DELETE:"Delete",REMOVE:"Remove",DOWNLOAD:"Download",UPLOAD:"upload",SELECT:"Select"}},ut={ESCAPE:"Escape",ARROW_RIGHT:"ArrowRight",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown"},ct={ESCAPE:27},lt=function(t){return t.key===ut.ESCAPE||t.keyCode===ct.ESCAPE},ht=Object.freeze({__proto__:null,messages:at,sizes:{FULL:"full",MEDIUM:"medium",SMALL:"small"},colorModifiers:{LIGHTEST:"-lightest",LIGHTER:"-lighter",LIGHT:"-light",DARK:"-dark",DARKER:"-darker"},colors:{WHITE:"white",BLACK:"black",RED:"red",ORANGE:"orange",YELLOW:"yellow",GREEN:"green",BLUE:"blue",PURPLE:"purple",PINK:"pink",GRAY:"gray",SLATE:"slate"},delay:{NOW:100,FAST:200,SLOW:600},keyboardEventKeys:ut,keyboardEventKeyCodes:ct}),pt=Object.freeze({__proto__:null,classNamesToSelector:function(t){var e={};return Object.keys(t).forEach((function(n){e[n]="."+t[n]})),e},objectKeysChangeCase:function(t,e){return void 0===e&&(e="toLowerCase"),Object.keys(t).reduce((function(n,r){return n[r[e]()]=t[r],n}),{})},debounceEvent:function(t,e){var n;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];clearTimeout(n),n=setTimeout((function(){return t.apply(void 0,i)}),e)}},isEscapeKeyEvent:lt}),ft=function(){function t(t){this.parentElement=t,this.onKeyDown=this.onKeyDown.bind(this)}var e=t.prototype;return e.start=function(){document.addEventListener("keydown",this.onKeyDown)},e.stop=function(){document.removeEventListener("keydown",this.onKeyDown)},e.onKeyDown=function(t){this.parentElement.visible&&!this.parentElement.noCloseOnEscKey&&!t.isComposing&<(t)&&this.parentElement.close()},t}();var dt=function(t){function e(){return t.apply(this,arguments)||this}return r(e,t),e.prototype.dispatchCustomEvent=function(t,e,n){var r=this;void 0===e&&(e={}),void 0===n&&(n=!1);var i=new CustomEvent(t,{detail:e,bubbles:!0,composed:!0});n?setTimeout((function(){r.dispatchEvent(i)}),ht.delay.FAST):this.dispatchEvent(i)},n(e,[{key:"bodyHasRTL",get:function(){return"rtl"===document.body.getAttribute("dir")}},{key:"bodyDir",get:function(){return document.body.getAttribute("dir")||"ltr"}}],[{key:"styles",get:function(){return[rt(":focus{outline:none}:host{margin:0;padding:0;font-size:14px;font-size:var(--ts-font-size-default)}:host,:host *{box-sizing:border-box;font-family:Open Sans,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;font-family:var(--ts-font-family)}")]}}]),e}(st);t.CloseOnEscBehavior=ft,t.TSElement=dt,t.constants=ht,t.css=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=n.reduce((function(e,n,r){return e+it(n)+t[r+1]}),t[0]);return new nt(i,et)},t.customElementDefineHelper=function(t,e){window.customElements.get(t)||window.customElements.define(t,e)},t.helpers=pt,t.html=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return new C(t,n,"html",W)},t.unsafeCSS=rt,t.validateSlottedNodes=function(t,e,n){var r=n.map((function(t){return t.toLowerCase()}));if(e.filter((function(t){if(t.nodeType!==Node.TEXT_NODE)return-1===r.indexOf(t.tagName.toLowerCase())})).length>0){var i=n.map((function(t){return t.toLowerCase()})).join();throw new Error("You can only use "+i+" in "+t.toLowerCase()+" component!")}},Object.defineProperty(t,"__esModule",{value:!0})})); |
{ | ||
"name": "@tradeshift/elements", | ||
"version": "0.14.1", | ||
"version": "0.14.2", | ||
"src": "src/core.js", | ||
@@ -20,3 +20,3 @@ "main": "lib/core.umd.js", | ||
}, | ||
"gitHead": "da59c20f1f96ff26f56938302d67c09baf33e80f" | ||
"gitHead": "b66ca5bac61b78456b703fec041b696ed1669234" | ||
} |
Sorry, the diff of this file is not supported yet
888
105556