@tindtechnologies/universalviewer
Version:
The Universal Viewer is a community-developed open source project on a mission to help you share your 📚📜📰📽️📻🗿 with the 🌎
2 lines (1 loc) • 3.84 kB
JavaScript
import{a as h,e as u,f as b,l as d,o as v}from"./chunk-VNJCZCB4.js";import"./chunk-L67DAW3A.js";var g=function(o,n,r,i){return new(r||(r=Promise))(function(a,e){function s(t){try{f(i.next(t))}catch(l){e(l)}}function c(t){try{f(i.throw(t))}catch(l){e(l)}}function f(t){t.done?a(t.value):new r(function(l){l(t.value)}).then(s,c)}f((i=i.apply(o,n||[])).next())})},p=function(o,n){var r={label:0,sent:function(){if(e[0]&1)throw e[1];return e[1]},trys:[],ops:[]},i,a,e,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(t){return function(l){return f([t,l])}}function f(t){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,a&&(e=t[0]&2?a.return:t[0]?a.throw||((e=a.return)&&e.call(a),0):a.next)&&!(e=e.call(a,t[1])).done)return e;switch(a=0,e&&(t=[t[0]&2,e.value]),t[0]){case 0:case 1:e=t;break;case 4:return r.label++,{value:t[1],done:!1};case 5:r.label++,a=t[1],t=[0];continue;case 7:t=r.ops.pop(),r.trys.pop();continue;default:if(e=r.trys,!(e=e.length>0&&e[e.length-1])&&(t[0]===6||t[0]===2)){r=0;continue}if(t[0]===3&&(!e||t[1]>e[0]&&t[1]<e[3])){r.label=t[1];break}if(t[0]===6&&r.label<e[1]){r.label=e[1],e=t;break}if(e&&r.label<e[2]){r.label=e[2],r.ops.push(t);break}e[2]&&r.ops.pop(),r.trys.pop();continue}t=n.call(o,r)}catch(l){t=[6,l],a=0}finally{i=e=0}if(t[0]&5)throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}},y=function(){function o(n){var r=this;h(this,n),this.edge=!1,this.activated=!1,this.onClick=function(){var i=!!r.el.querySelector("ion-fab-list"),a=r.getFab(),e=a&&a.disabled;i&&!e&&(r.activated=!r.activated)}}return o.prototype.activatedChanged=function(){var n=this.activated,r=this.getFab();r&&(r.activated=n),Array.from(this.el.querySelectorAll("ion-fab-list")).forEach(function(i){i.activated=n})},o.prototype.componentDidLoad=function(){this.activated&&this.activatedChanged()},o.prototype.close=function(){return g(this,void 0,void 0,function(){return p(this,function(n){return this.activated=!1,[2]})})},o.prototype.getFab=function(){return this.el.querySelector("ion-fab-button")},o.prototype.render=function(){var n,r=this,i=r.horizontal,a=r.vertical,e=r.edge,s=v(this);return u(b,{onClick:this.onClick,class:(n={},n[s]=!0,n["fab-horizontal-"+i]=i!==void 0,n["fab-vertical-"+a]=a!==void 0,n["fab-edge"]=e,n)},u("slot",null))},Object.defineProperty(o.prototype,"el",{get:function(){return d(this)},enumerable:!0,configurable:!0}),Object.defineProperty(o,"watchers",{get:function(){return{activated:["activatedChanged"]}},enumerable:!0,configurable:!0}),Object.defineProperty(o,"style",{get:function(){return":host{position:absolute;z-index:999}:host(.fab-horizontal-center){left:50%;margin-left:-28px}:host-context([dir=rtl]).fab-horizontal-center,:host-context([dir=rtl]):host(.fab-horizontal-center){left:unset;right:unset;right:50%}@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){:host(.fab-horizontal-center){margin-left:unset;-webkit-margin-start:-28px;margin-inline-start:-28px}}:host(.fab-horizontal-start){left:calc(10px + var(--ion-safe-area-left, 0px))}:host-context([dir=rtl]).fab-horizontal-start,:host-context([dir=rtl]):host(.fab-horizontal-start){left:unset;right:unset;right:calc(10px + var(--ion-safe-area-left, 0px))}:host(.fab-horizontal-end){right:calc(10px + var(--ion-safe-area-right, 0px))}:host-context([dir=rtl]).fab-horizontal-end,:host-context([dir=rtl]):host(.fab-horizontal-end){left:unset;right:unset;left:calc(10px + var(--ion-safe-area-right, 0px))}:host(.fab-vertical-top){top:10px}:host(.fab-vertical-top.fab-edge){top:-28px}:host(.fab-vertical-bottom){bottom:10px}:host(.fab-vertical-bottom.fab-edge){bottom:-28px}:host(.fab-vertical-center){margin-top:-28px;top:50%}"},enumerable:!0,configurable:!0}),o}();export{y as ion_fab};