UNPKG

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) 2.34 kB
import{a as d}from"./chunk-EIU4BEDT.js";import{a as h}from"./chunk-RQUDVHEA.js";import"./chunk-47FI7OS3.js";import"./chunk-4DAZ7WDM.js";import{a as b,e as f,f as y,o as v}from"./chunk-VNJCZCB4.js";import"./chunk-L67DAW3A.js";var m=function(u,i,n,a){return new(n||(n=Promise))(function(r,e){function s(t){try{c(a.next(t))}catch(l){e(l)}}function o(t){try{c(a.throw(t))}catch(l){e(l)}}function c(t){t.done?r(t.value):new n(function(l){l(t.value)}).then(s,o)}c((a=a.apply(u,i||[])).next())})},g=function(u,i){var n={label:0,sent:function(){if(e[0]&1)throw e[1];return e[1]},trys:[],ops:[]},a,r,e,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(t){return function(l){return c([t,l])}}function c(t){if(a)throw new TypeError("Generator is already executing.");for(;n;)try{if(a=1,r&&(e=t[0]&2?r.return:t[0]?r.throw||((e=r.return)&&e.call(r),0):r.next)&&!(e=e.call(r,t[1])).done)return e;switch(r=0,e&&(t=[t[0]&2,e.value]),t[0]){case 0:case 1:e=t;break;case 4:return n.label++,{value:t[1],done:!1};case 5:n.label++,r=t[1],t=[0];continue;case 7:t=n.ops.pop(),n.trys.pop();continue;default:if(e=n.trys,!(e=e.length>0&&e[e.length-1])&&(t[0]===6||t[0]===2)){n=0;continue}if(t[0]===3&&(!e||t[1]>e[0]&&t[1]<e[3])){n.label=t[1];break}if(t[0]===6&&n.label<e[1]){n.label=e[1],e=t;break}if(e&&n.label<e[2]){n.label=e[2],n.ops.push(t);break}e[2]&&n.ops.pop(),n.trys.pop();continue}t=i.call(u,n)}catch(l){t=[6,l],r=0}finally{a=e=0}if(t[0]&5)throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}},x=function(){function u(i){var n=this;b(this,i),this.visible=!1,this.autoHide=!0,this.onClick=function(){return h.toggle(n.menu)}}return u.prototype.connectedCallback=function(){this.visibilityChanged()},u.prototype.visibilityChanged=function(){return m(this,void 0,void 0,function(){var i;return g(this,function(n){switch(n.label){case 0:return i=this,[4,d(this.menu)];case 1:return i.visible=n.sent(),[2]}})})},u.prototype.render=function(){var i,n=v(this),a=this.autoHide&&!this.visible;return f(y,{onClick:this.onClick,"aria-hidden":a?"true":null,class:(i={},i[n]=!0,i["menu-toggle-hidden"]=a,i)},f("slot",null))},Object.defineProperty(u,"style",{get:function(){return":host(.menu-toggle-hidden){display:none}"},enumerable:!0,configurable:!0}),u}();export{x as ion_menu_toggle};