UNPKG

@tindtechnologies/universalviewer

Version:

The Universal Viewer is a community-developed open source project on a mission to help you share your 📚📜📰📽️📻🗿 with the 🌎

1 lines 2.13 kB
"use strict";(self.webpackChunkUV=self.webpackChunkUV||[]).push([[7854],{7854(n,e,t){t.d(e,{startHardwareBackButton:()=>r});var r=function(){var n=document,e=!1;n.addEventListener("backbutton",(function(){if(!e){var t=[],r=new CustomEvent("ionBackButton",{bubbles:!1,detail:{register:function(n,e){t.push({priority:n,handler:e})}}});if(n.dispatchEvent(r),t.length>0){var a,u=Number.MIN_SAFE_INTEGER;t.forEach((function(n){var e=n.priority,t=n.handler;e>=u&&(u=e,a=t)})),e=!0,o(a).then((function(){return e=!1}))}}}))},o=function(n){return e=void 0,t=void 0,o=function(){var e,t;return function(n,e){var t,r,o,a,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(a){return function(i){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;u;)try{if(t=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,r=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=e.call(n,u)}catch(n){a=[6,n],r=0}finally{t=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,i])}}}(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),n?null==(e=n())?[3,2]:[4,e]:[3,2];case 1:r.sent(),r.label=2;case 2:return[3,4];case 3:return t=r.sent(),console.error(t),[3,4];case 4:return[2]}}))},new((r=void 0)||(r=Promise))((function(n,a){function u(n){try{c(o.next(n))}catch(n){a(n)}}function i(n){try{c(o.throw(n))}catch(n){a(n)}}function c(e){e.done?n(e.value):new r((function(n){n(e.value)})).then(u,i)}c((o=o.apply(e,t||[])).next())}));var e,t,r,o}}}]);