18 lines
209 KiB
JavaScript
18 lines
209 KiB
JavaScript
|
!function t(e,n,o){function i(s,a){if(!n[s]){if(!e[s]){var c="function"==typeof require&&require;if(!a&&c)return c(s,!0);if(r)return r(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[s]={exports:{}};e[s][0].call(l.exports,(function(t){return i(e[s][1][t]||t)}),l,l.exports,t,e,n,o)}return n[s].exports}for(var r="function"==typeof require&&require,s=0;s<o.length;s++)i(o[s]);return i}({1:[function(t,e,n){"use strict";var o=t("./utils");function i(){var t={},e=0,n=0,o=0;return{add:function(i,r){r||(r=i,i=0),i>n?n=i:i<o&&(o=i),t[i]||(t[i]=[]),t[i].push(r),e++},process:function(){for(var e=o;e<=n;e++)for(var i=t[e],r=0;r<i.length;r++){(0,i[r])()}},size:function(){return e}}}e.exports=function(t){var e=(t=t||{}).reporter,n=o.getOption(t,"async",!0),r=o.getOption(t,"auto",!0);r&&!n&&(e&&e.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),n=!0);var s,a=i(),c=!1;function u(){for(c=!0;a.size();){var t=a;a=i(),t.process()}c=!1}function l(){var t;t=u,s=setTimeout(t,0)}return{add:function(t,e){!c&&r&&n&&0===a.size()&&l(),a.add(t,e)},force:function(t){c||(void 0===t&&(t=n),s&&(clearTimeout(s),s=null),t?l():u())}}}},{"./utils":2}],2:[function(t,e,n){"use strict";(e.exports={}).getOption=function(t,e,n){var o=t[e];if(null==o&&void 0!==n)return n;return o}},{}],3:[function(t,e,n){"use strict";var o=e.exports={};o.isIE=function(t){return(-1!==(e=navigator.userAgent.toLowerCase()).indexOf("msie")||-1!==e.indexOf("trident")||-1!==e.indexOf(" edge/"))&&(!t||t===function(){var t=3,e=document.createElement("div"),n=e.getElementsByTagName("i");do{e.innerHTML="\x3c!--[if gt IE "+ ++t+"]><i></i><![endif]--\x3e"}while(n[0]);return t>4?t:undefined}());var e},o.isLegacyOpera=function(){return!!window.opera}},{}],4:[function(t,e,n){"use strict";(e.exports={}).forEach=function(t,e){for(var n=0;n<t.length;n++){var o=e(t[n]);if(o)return o}}},{}],5:[function(t,e,n){"use strict";var o=t("../browser-detector");e.exports=function(t){var e=(t=t||{}).reporter,n=t.batchProcessor,i=t.stateHandler.getState;if(!e)throw new Error("Missing required dependency: reporter.");function r(e){var n=t.important?" !important; ":"; ";return(e.join(n)+n).trim()}function s(t){return i(t).object}return{makeDetectable:function(t,s,a){a||(a=s,s=t,t=null),(t=t||{}).debug,o.isIE(8)?a(s):function(s,a){var c=r(["display: block","position: absolute","top: 0","left: 0","width: 100%","height: 100%","border: none","padding: 0","margin: 0","opacity: 0","z-index: -1000","pointer-events: none"]),u=!1,l=window.getComputedStyle(s),d=s.offsetWidth,h=s.offsetHeight;function p(){function n(){if("static"===l.position){s.style.setProperty("position","relative",t.important?"important":"");var n=function(e,n,o,i){var r=o[i];"auto"!==r&&"0"!==function(t){return t.replace(/[^-\d\.]/g,"")}(r)&&(e.warn("An element that is positioned static has style."+i+"="+r+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+i+" will be set to 0. Element: ",n),n.style.setProperty(i,"0",t.important?"important":""))};n(e,s,l,"top"),n(e,s,l,"right"),n(e,s,l,"bottom"),n(e,s,l,"left")}}""!==l.position&&(n(),u=!0);var r=document.createElement("object");r.style.cssText=c,r.tabIndex=-1,r.type="text/html",r.setAttribute("aria-hidden","true"),r.onload=function(){u||n(),function t(e,n){if(!e.contentDocument){var o=i(e);return o.checkForObjectDocumentTimeoutId&&window.clearTimeout(o.checkForObjectDocumentTimeoutId),void(o.checkForObjectDocumentTimeoutId=setTimeout((function(){o.checkForObjectDocumentTimeoutId=0,t(e,n)}),100))}n(e.contentDocument)}(this,(function(t){a(s)}))},o.isIE()||(r.data="about:blank"),i(s)&&(s.appendChild(r),i(s).object=r,o.isIE()&&(r.data="about:blank"))}i(s).startSize={width:d,height:h},n?n.add(p):p()}(s,a)},addListener:function(t,e){function n(){e(t)}if(o.isIE(8))i(t).object={proxy:n},t.attachEvent("onresize",n);else{var r=s(t);if(!r)throw new Error("Element is not detectable by this strategy.");r.contentDocument.defaultView.addEventListener("resize",n)}}
|
||
|
/*! *****************************************************************************
|
||
|
Copyright (c) Microsoft Corporation.
|
||
|
|
||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
purpose with or without fee is hereby granted.
|
||
|
|
||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
***************************************************************************** */
|
||
|
var o,i=function(){return i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},i.apply(this,arguments)},r=function(){function t(t){this.options=t,this.listeners={}}return t.prototype.on=function(t,e){var n=this.listeners[t]||[];this.listeners[t]=n.concat([e])},t.prototype.triggerEvent=function(t,e){var n=this;(this.listeners[t]||[]).forEach((function(t){return t({target:n,event:e})}))},t}();(o=n.NotyfArrayEvent||(n.NotyfArrayEvent={}))[o.Add=0]="Add",o[o.Remove=1]="Remove";var s,a=function(){function t(){this.notifications=[]}return t.prototype.push=function(t){this.notifications.push(t),this.updateFn(t,n.NotyfArrayEvent.Add,this.notifications)},t.prototype.splice=function(t,e){var o=this.notifications.splice(t,e)[0];return this.updateFn(o,n.NotyfArrayEvent.Remove,this.notifications),o},t.prototype.indexOf=function(t){return this.notifications.indexOf(t)},t.prototype.onUpdate=function(t){this.updateFn=t},t}();(s=n.NotyfEvent||(n.NotyfEvent={})).Dismiss="dismiss",s.Click="click";var c={types:[{type:"success",className:"notyf__toast--success",backgroundColor:"#3dc763",icon:{className:"notyf__icon--success",tagName:"i"}},{type:"error",className:"notyf__toast--error",backgroundColor:"#ed3d3d",icon:{className:"notyf__icon--error",tagName:"i"}}],duration:2e3,ripple:!0,position:{x:"right",y:"bottom"},dismissible:!1},u=function(){function t(){this.notifications=[],this.events={},this.X_POSITION_FLEX_MAP={left:"flex-start",center:"center",right:"flex-end"},this.Y_POSITION_FLEX_MAP={top:"flex-start",center:"center",bottom:"flex-end"};var t=document.createDocumentFragment(),e=this._createHTMLElement({tagName:"div",className:"notyf"});t.appendChild(e),document.body.appendChild(t),this.container=e,this.animationEndEventName=this._getAnimationEndEventName(),this._createA11yContainer()}return t.prototype.on=function(t,e){var n;this.events=i(i({},this.events),((n={})[t]=e,n))},t.prototype.update=function(t,e){e===n.NotyfArrayEvent.Add?this.addNotification(t):e===n.NotyfArrayEvent.Remove&&this.removeNotification(t)},t.prototype.removeNotification=function(t){var e,n,o=this,i=this._popRenderedNotification(t);i&&((e=i.node).classList.add("notyf__toast--disappear"),e.addEventListener(this.animationEndEventName,n=function(t){t.target===e&&(e.removeEventListener(o.animationEndEventName,n),o.container.removeChild(e))}))},t.prototype.addNotification=function(t){var e=this._renderNotification(t);this.notifications.push({notification:t,node:e}),this._announce(t.options.message||"Notification")},t.prototype._renderNotification=function(t){var e,n=this._buildNotificationCard(t),o=t.options.className;return o&&(e=n.classList).add.apply(e,o.split(" ")),this.container.appendChild(n),n},t.prototype._popRenderedNotification=function(t){for(var e=-1,n=0;n<this.notifications.length&&e<0;n++)this.notifications[n].notification===t&&(e=n);if(-1!==e)return this.notifications.splice(e,1)[0]},t.prototype.getXPosition=function(t){var e;return(null===(e=null==t?void 0:t.position)||void 0===e?void 0:e.x)||"right"},t.prototype.getYPosition=function(t){var e;return(null===(e=null==t?void 0:t.position)||void 0===e?void 0:e.y)||"bottom"},t.prototype.adjustContainerAlignment=function(t){var e=this.X_POSITION_FLEX_MAP[this.getXPosition(t)],n=this.Y_POSITION_FLEX_MAP[this.getYPosition(t)],o=this.container.style;o.setProperty("justify-content",n),o.setProperty("align-items",e)},t.prototype._buildNotificationCard=function(t){var e=this,o=t.options,i=o.icon;this.adjustContainerAlignment(o);var r=this._createHTMLElement({tagName:"div",className:"notyf__toast"}),s=this._createHTMLElement({tagName:"div",className:"notyf__ripple"}),a=this._createHTMLElement({tagName:"div",className:"notyf__wrapper"}),c=this._createHTMLElement({tagName:"div",className:"notyf__message"});c.innerHTML=o.message||"";var u=o.background||o.backgroundColor;if(i){var l=this._createHTMLElement({tagName:"div",className:"notyf__icon"});if(("string"==typeof i||i instanceof String)&&(l.innerHTML=new
|
||
|
//# sourceMappingURL=emulators-ui.js.map
|