bpm-presentation/plugin/zoom/zoom.esm.js
2022-01-19 21:19:28 -05:00

6 lines
16 KiB
JavaScript

var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=function(t){return t&&t.Math==Math&&t},n=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof t&&t)||function(){return this}()||Function("return this")(),r={},o=function(t){try{return!!t()}catch(t){return!0}},i=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u=!o((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),c=u,a=Function.prototype.call,l=c?a.bind(a):function(){return a.apply(a,arguments)},s={},f={}.propertyIsEnumerable,d=Object.getOwnPropertyDescriptor,y=d&&!f.call({1:2},1);s.f=y?function(t){var e=d(this,t);return!!e&&e.enumerable}:f;var m,p,b=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},g=u,v=Function.prototype,h=v.bind,w=v.call,x=g&&h.bind(w,w),O=g?function(t){return t&&x(t)}:function(t){return t&&function(){return w.apply(t,arguments)}},S=O,T=S({}.toString),j=S("".slice),E=function(t){return j(T(t),8,-1)},I=O,P=o,z=E,k=n.Object,C=I("".split),R=P((function(){return!k("z").propertyIsEnumerable(0)}))?function(t){return"String"==z(t)?C(t,""):k(t)}:k,L=n.TypeError,M=function(t){if(null==t)throw L("Can't call method on "+t);return t},_=R,W=M,A=function(t){return _(W(t))},F=function(t){return"function"==typeof t},N=F,D=function(t){return"object"==typeof t?null!==t:N(t)},Y=n,K=F,X=function(t){return K(t)?t:void 0},B=function(t,e){return arguments.length<2?X(Y[t]):Y[t]&&Y[t][e]},H=O({}.isPrototypeOf),U=n,G=B("navigator","userAgent")||"",$=U.process,q=U.Deno,V=$&&$.versions||q&&q.version,J=V&&V.v8;J&&(p=(m=J.split("."))[0]>0&&m[0]<4?1:+(m[0]+m[1])),!p&&G&&(!(m=G.match(/Edge\/(\d+)/))||m[1]>=74)&&(m=G.match(/Chrome\/(\d+)/))&&(p=+m[1]);var Q=p,Z=o,tt=!!Object.getOwnPropertySymbols&&!Z((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Q&&Q<41})),et=tt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,nt=B,rt=F,ot=H,it=et,ut=n.Object,ct=it?function(t){return"symbol"==typeof t}:function(t){var e=nt("Symbol");return rt(e)&&ot(e.prototype,ut(t))},at=n.String,lt=F,st=function(t){try{return at(t)}catch(t){return"Object"}},ft=n.TypeError,dt=function(t){if(lt(t))return t;throw ft(st(t)+" is not a function")},yt=l,mt=F,pt=D,bt=n.TypeError,gt={exports:{}},vt=n,ht=Object.defineProperty,wt=function(t,e){try{ht(vt,t,{value:e,configurable:!0,writable:!0})}catch(n){vt[t]=e}return e},xt=wt,Ot=n["__core-js_shared__"]||xt("__core-js_shared__",{}),St=Ot;(gt.exports=function(t,e){return St[t]||(St[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.20.3",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.20.3/LICENSE",source:"https://github.com/zloirock/core-js"});var Tt=M,jt=n.Object,Et=function(t){return jt(Tt(t))},It=O({}.hasOwnProperty),Pt=Object.hasOwn||function(t,e){return It(Et(t),e)},zt=O,kt=0,Ct=Math.random(),Rt=zt(1..toString),Lt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Rt(++kt+Ct,36)},Mt=n,_t=gt.exports,Wt=Pt,At=Lt,Ft=tt,Nt=et,Dt=_t("wks"),Yt=Mt.Symbol,Kt=Yt&&Yt.for,Xt=Nt?Yt:Yt&&Yt.withoutSetter||At,Bt=function(t){if(!Wt(Dt,t)||!Ft&&"string"!=typeof Dt[t]){var e="Symbol."+t;Ft&&Wt(Yt,t)?Dt[t]=Yt[t]:Dt[t]=Nt&&Kt?Kt(e):Xt(e)}return Dt[t]},Ht=l,Ut=D,Gt=ct,$t=function(t,e){var n=t[e];return null==n?void 0:dt(n)},qt=function(t,e){var n,r;if("string"===e&&mt(n=t.toString)&&!pt(r=yt(n,t)))return r;if(mt(n=t.valueOf)&&!pt(r=yt(n,t)))return r;if("string"!==e&&mt(n=t.toString)&&!pt(r=yt(n,t)))return r;throw bt("Can't convert object to primitive value")},Vt=Bt,Jt=n.TypeError,Qt=Vt("toPrimitive"),Zt=function(t,e){if(!Ut(t)||Gt(t))return t;var n,r=$t(t,Qt);if(r){if(void 0===e&&(e="default"),n=Ht(r,t,e),!Ut(n)||Gt(n))return n;throw Jt("Can't convert object to primitive value")}return void 0===e&&(e="number"),qt(t,e)},te=ct,ee=function(t){var e=Zt(t,"string");return te(e)?e:e+""},ne=D,re=n.document,oe=ne(re)&&ne(re.createElement),ie=function(t){return oe?re.createElement(t):{}},ue=ie,ce=!i&&!o((function(){return 7!=Object.defineProperty(ue("div"),"a",{get:function(){return 7}}).a})),ae=i,le=l,se=s,fe=b,de=A,ye=ee,me=Pt,pe=ce,be=Object.getOwnPropertyDescriptor;r.f=ae?be:function(t,e){if(t=de(t),e=ye(e),pe)try{return be(t,e)}catch(t){}if(me(t,e))return fe(!le(se.f,t,e),t[e])};var ge={},ve=i&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),he=n,we=D,xe=he.String,Oe=he.TypeError,Se=function(t){if(we(t))return t;throw Oe(xe(t)+" is not an object")},Te=i,je=ce,Ee=ve,Ie=Se,Pe=ee,ze=n.TypeError,ke=Object.defineProperty,Ce=Object.getOwnPropertyDescriptor;ge.f=Te?Ee?function(t,e,n){if(Ie(t),e=Pe(e),Ie(n),"function"==typeof t&&"prototype"===e&&"value"in n&&"writable"in n&&!n.writable){var r=Ce(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:"configurable"in n?n.configurable:r.configurable,enumerable:"enumerable"in n?n.enumerable:r.enumerable,writable:!1})}return ke(t,e,n)}:ke:function(t,e,n){if(Ie(t),e=Pe(e),Ie(n),je)try{return ke(t,e,n)}catch(t){}if("get"in n||"set"in n)throw ze("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var Re=ge,Le=b,Me=i?function(t,e,n){return Re.f(t,e,Le(1,n))}:function(t,e,n){return t[e]=n,t},_e={exports:{}},We=F,Ae=Ot,Fe=O(Function.toString);We(Ae.inspectSource)||(Ae.inspectSource=function(t){return Fe(t)});var Ne,De,Ye,Ke=Ae.inspectSource,Xe=F,Be=Ke,He=n.WeakMap,Ue=Xe(He)&&/native code/.test(Be(He)),Ge=gt.exports,$e=Lt,qe=Ge("keys"),Ve=function(t){return qe[t]||(qe[t]=$e(t))},Je={},Qe=Ue,Ze=n,tn=O,en=D,nn=Me,rn=Pt,on=Ot,un=Ve,cn=Je,an=Ze.TypeError,ln=Ze.WeakMap;if(Qe||on.state){var sn=on.state||(on.state=new ln),fn=tn(sn.get),dn=tn(sn.has),yn=tn(sn.set);Ne=function(t,e){if(dn(sn,t))throw new an("Object already initialized");return e.facade=t,yn(sn,t,e),e},De=function(t){return fn(sn,t)||{}},Ye=function(t){return dn(sn,t)}}else{var mn=un("state");cn[mn]=!0,Ne=function(t,e){if(rn(t,mn))throw new an("Object already initialized");return e.facade=t,nn(t,mn,e),e},De=function(t){return rn(t,mn)?t[mn]:{}},Ye=function(t){return rn(t,mn)}}var pn={set:Ne,get:De,has:Ye,enforce:function(t){return Ye(t)?De(t):Ne(t,{})},getterFor:function(t){return function(e){var n;if(!en(e)||(n=De(e)).type!==t)throw an("Incompatible receiver, "+t+" required");return n}}},bn=i,gn=Pt,vn=Function.prototype,hn=bn&&Object.getOwnPropertyDescriptor,wn=gn(vn,"name"),xn=wn&&"something"===function(){}.name,On=wn&&(!bn||bn&&hn(vn,"name").configurable),Sn=n,Tn=F,jn=Pt,En=Me,In=wt,Pn=Ke,zn={EXISTS:wn,PROPER:xn,CONFIGURABLE:On}.CONFIGURABLE,kn=pn.get,Cn=pn.enforce,Rn=String(String).split("String");(_e.exports=function(t,e,n,r){var o,i=!!r&&!!r.unsafe,u=!!r&&!!r.enumerable,c=!!r&&!!r.noTargetGet,a=r&&void 0!==r.name?r.name:e;Tn(n)&&("Symbol("===String(a).slice(0,7)&&(a="["+String(a).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!jn(n,"name")||zn&&n.name!==a)&&En(n,"name",a),(o=Cn(n)).source||(o.source=Rn.join("string"==typeof a?a:""))),t!==Sn?(i?!c&&t[e]&&(u=!0):delete t[e],u?t[e]=n:En(t,e,n)):u?t[e]=n:In(e,n)})(Function.prototype,"toString",(function(){return Tn(this)&&kn(this).source||Pn(this)}));var Ln={},Mn=Math.ceil,_n=Math.floor,Wn=function(t){var e=+t;return e!=e||0===e?0:(e>0?_n:Mn)(e)},An=Wn,Fn=Math.max,Nn=Math.min,Dn=Wn,Yn=Math.min,Kn=function(t){return t>0?Yn(Dn(t),9007199254740991):0},Xn=A,Bn=function(t,e){var n=An(t);return n<0?Fn(n+e,0):Nn(n,e)},Hn=function(t){return Kn(t.length)},Un=function(t){return function(e,n,r){var o,i=Xn(e),u=Hn(i),c=Bn(r,u);if(t&&n!=n){for(;u>c;)if((o=i[c++])!=o)return!0}else for(;u>c;c++)if((t||c in i)&&i[c]===n)return t||c||0;return!t&&-1}},Gn={includes:Un(!0),indexOf:Un(!1)},$n=Pt,qn=A,Vn=Gn.indexOf,Jn=Je,Qn=O([].push),Zn=function(t,e){var n,r=qn(t),o=0,i=[];for(n in r)!$n(Jn,n)&&$n(r,n)&&Qn(i,n);for(;e.length>o;)$n(r,n=e[o++])&&(~Vn(i,n)||Qn(i,n));return i},tr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],er=Zn,nr=tr.concat("length","prototype");Ln.f=Object.getOwnPropertyNames||function(t){return er(t,nr)};var rr={};rr.f=Object.getOwnPropertySymbols;var or=B,ir=Ln,ur=rr,cr=Se,ar=O([].concat),lr=or("Reflect","ownKeys")||function(t){var e=ir.f(cr(t)),n=ur.f;return n?ar(e,n(t)):e},sr=Pt,fr=lr,dr=r,yr=ge,mr=o,pr=F,br=/#|\.prototype\./,gr=function(t,e){var n=hr[vr(t)];return n==xr||n!=wr&&(pr(e)?mr(e):!!e)},vr=gr.normalize=function(t){return String(t).replace(br,".").toLowerCase()},hr=gr.data={},wr=gr.NATIVE="N",xr=gr.POLYFILL="P",Or=gr,Sr=n,Tr=r.f,jr=Me,Er=_e.exports,Ir=wt,Pr=function(t,e,n){for(var r=fr(e),o=yr.f,i=dr.f,u=0;u<r.length;u++){var c=r[u];sr(t,c)||n&&sr(n,c)||o(t,c,i(e,c))}},zr=Or,kr={};kr[Bt("toStringTag")]="z";var Cr=n,Rr="[object z]"===String(kr),Lr=F,Mr=E,_r=Bt("toStringTag"),Wr=Cr.Object,Ar="Arguments"==Mr(function(){return arguments}()),Fr=Rr?Mr:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Wr(t),_r))?n:Ar?Mr(e):"Object"==(r=Mr(e))&&Lr(e.callee)?"Arguments":r},Nr=n.String,Dr=Se,Yr=o,Kr=n.RegExp,Xr=Yr((function(){var t=Kr("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),Br=Xr||Yr((function(){return!Kr("a","y").sticky})),Hr={BROKEN_CARET:Xr||Yr((function(){var t=Kr("^r","gy");return t.lastIndex=2,null!=t.exec("str")})),MISSED_STICKY:Br,UNSUPPORTED_Y:Xr},Ur={},Gr=Zn,$r=tr,qr=Object.keys||function(t){return Gr(t,$r)},Vr=i,Jr=ve,Qr=ge,Zr=Se,to=A,eo=qr;Ur.f=Vr&&!Jr?Object.defineProperties:function(t,e){Zr(t);for(var n,r=to(e),o=eo(e),i=o.length,u=0;i>u;)Qr.f(t,n=o[u++],r[n]);return t};var no,ro=B("document","documentElement"),oo=Se,io=Ur,uo=tr,co=Je,ao=ro,lo=ie,so=Ve("IE_PROTO"),fo=function(){},yo=function(t){return"<script>"+t+"<\/script>"},mo=function(t){t.write(yo("")),t.close();var e=t.parentWindow.Object;return t=null,e},po=function(){try{no=new ActiveXObject("htmlfile")}catch(t){}var t,e;po="undefined"!=typeof document?document.domain&&no?mo(no):((e=lo("iframe")).style.display="none",ao.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(yo("document.F=Object")),t.close(),t.F):mo(no);for(var n=uo.length;n--;)delete po.prototype[uo[n]];return po()};co[so]=!0;var bo,go,vo=Object.create||function(t,e){var n;return null!==t?(fo.prototype=oo(t),n=new fo,fo.prototype=null,n[so]=t):n=po(),void 0===e?n:io.f(n,e)},ho=o,wo=n.RegExp,xo=ho((function(){var t=wo(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),Oo=o,So=n.RegExp,To=Oo((function(){var t=So("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),jo=l,Eo=O,Io=function(t){if("Symbol"===Fr(t))throw TypeError("Cannot convert a Symbol value to a string");return Nr(t)},Po=function(){var t=Dr(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},zo=Hr,ko=gt.exports,Co=vo,Ro=pn.get,Lo=xo,Mo=To,_o=ko("native-string-replace",String.prototype.replace),Wo=RegExp.prototype.exec,Ao=Wo,Fo=Eo("".charAt),No=Eo("".indexOf),Do=Eo("".replace),Yo=Eo("".slice),Ko=(go=/b*/g,jo(Wo,bo=/a/,"a"),jo(Wo,go,"a"),0!==bo.lastIndex||0!==go.lastIndex),Xo=zo.BROKEN_CARET,Bo=void 0!==/()??/.exec("")[1];(Ko||Bo||Xo||Lo||Mo)&&(Ao=function(t){var e,n,r,o,i,u,c,a=this,l=Ro(a),s=Io(t),f=l.raw;if(f)return f.lastIndex=a.lastIndex,e=jo(Ao,f,s),a.lastIndex=f.lastIndex,e;var d=l.groups,y=Xo&&a.sticky,m=jo(Po,a),p=a.source,b=0,g=s;if(y&&(m=Do(m,"y",""),-1===No(m,"g")&&(m+="g"),g=Yo(s,a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==Fo(s,a.lastIndex-1))&&(p="(?: "+p+")",g=" "+g,b++),n=new RegExp("^(?:"+p+")",m)),Bo&&(n=new RegExp("^"+p+"$(?!\\s)",m)),Ko&&(r=a.lastIndex),o=jo(Wo,y?n:a,g),y?o?(o.input=Yo(o.input,b),o[0]=Yo(o[0],b),o.index=a.lastIndex,a.lastIndex+=o[0].length):a.lastIndex=0:Ko&&o&&(a.lastIndex=a.global?o.index+o[0].length:r),Bo&&o&&o.length>1&&jo(_o,o[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&d)for(o.groups=u=Co(null),i=0;i<d.length;i++)u[(c=d[i])[0]]=o[c[1]];return o});(function(t,e){var n,r,o,i,u,c=t.target,a=t.global,l=t.stat;if(n=a?Sr:l?Sr[c]||Ir(c,{}):(Sr[c]||{}).prototype)for(r in e){if(i=e[r],o=t.noTargetGet?(u=Tr(n,r))&&u.value:n[r],!zr(a?r:c+(l?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Pr(i,o)}(t.sham||o&&o.sham)&&jr(i,"sham",!0),Er(n,r,i,t)}})({target:"RegExp",proto:!0,forced:/./.exec!==Ao},{exec:Ao});
/*!
* reveal.js Zoom plugin
*/
var Ho={id:"zoom",init:function(t){t.getRevealElement().addEventListener("mousedown",(function(e){var n=/Linux/.test(window.navigator.platform)?"ctrl":"alt",r=(t.getConfig().zoomKey?t.getConfig().zoomKey:n)+"Key",o=t.getConfig().zoomLevel?t.getConfig().zoomLevel:2;e[r]&&!t.isOverview()&&(e.preventDefault(),Go.to({x:e.clientX,y:e.clientY,scale:o,pan:!1}))}))}},Uo=function(){return Ho},Go=function(){var t=1,e=0,n=0,r=-1,o=-1,i="WebkitTransform"in document.body.style||"MozTransform"in document.body.style||"msTransform"in document.body.style||"OTransform"in document.body.style||"transform"in document.body.style;function u(e,n){var r=a();if(e.width=e.width||1,e.height=e.height||1,e.x-=(window.innerWidth-e.width*n)/2,e.y-=(window.innerHeight-e.height*n)/2,i)if(1===n)document.body.style.transform="",document.body.style.OTransform="",document.body.style.msTransform="",document.body.style.MozTransform="",document.body.style.WebkitTransform="";else{var o=r.x+"px "+r.y+"px",u="translate("+-e.x+"px,"+-e.y+"px) scale("+n+")";document.body.style.transformOrigin=o,document.body.style.OTransformOrigin=o,document.body.style.msTransformOrigin=o,document.body.style.MozTransformOrigin=o,document.body.style.WebkitTransformOrigin=o,document.body.style.transform=u,document.body.style.OTransform=u,document.body.style.msTransform=u,document.body.style.MozTransform=u,document.body.style.WebkitTransform=u}else 1===n?(document.body.style.position="",document.body.style.left="",document.body.style.top="",document.body.style.width="",document.body.style.height="",document.body.style.zoom=""):(document.body.style.position="relative",document.body.style.left=-(r.x+e.x)/n+"px",document.body.style.top=-(r.y+e.y)/n+"px",document.body.style.width=100*n+"%",document.body.style.height=100*n+"%",document.body.style.zoom=n);t=n,document.documentElement.classList&&(1!==t?document.documentElement.classList.add("zoomed"):document.documentElement.classList.remove("zoomed"))}function c(){var r=.12*window.innerWidth,o=.12*window.innerHeight,i=a();n<o?window.scroll(i.x,i.y-14/t*(1-n/o)):n>window.innerHeight-o&&window.scroll(i.x,i.y+(1-(window.innerHeight-n)/o)*(14/t)),e<r?window.scroll(i.x-14/t*(1-e/r),i.y):e>window.innerWidth-r&&window.scroll(i.x+(1-(window.innerWidth-e)/r)*(14/t),i.y)}function a(){return{x:void 0!==window.scrollX?window.scrollX:window.pageXOffset,y:void 0!==window.scrollY?window.scrollY:window.pageYOffset}}return i&&(document.body.style.transition="transform 0.8s ease",document.body.style.OTransition="-o-transform 0.8s ease",document.body.style.msTransition="-ms-transform 0.8s ease",document.body.style.MozTransition="-moz-transform 0.8s ease",document.body.style.WebkitTransition="-webkit-transform 0.8s ease"),document.addEventListener("keyup",(function(e){1!==t&&27===e.keyCode&&Go.out()})),document.addEventListener("mousemove",(function(r){1!==t&&(e=r.clientX,n=r.clientY)})),{to:function(e){if(1!==t)Go.out();else{if(e.x=e.x||0,e.y=e.y||0,e.element){var n=e.element.getBoundingClientRect();e.x=n.left-20,e.y=n.top-20,e.width=n.width+40,e.height=n.height+40}void 0!==e.width&&void 0!==e.height&&(e.scale=Math.max(Math.min(window.innerWidth/e.width,window.innerHeight/e.height),1)),e.scale>1&&(e.x*=e.scale,e.y*=e.scale,u(e,e.scale),!1!==e.pan&&(r=setTimeout((function(){o=setInterval(c,1e3/60)}),800)))}},out:function(){clearTimeout(r),clearInterval(o),u({x:0,y:0},1),t=1},magnify:function(t){this.to(t)},reset:function(){this.out()},zoomLevel:function(){return t}}}();export{Uo as default};