diff --git a/base/dist/flipbook.d.ts.map b/base/dist/flipbook.d.ts.map index de20b0f..55f57f1 100644 --- a/base/dist/flipbook.d.ts.map +++ b/base/dist/flipbook.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"flipbook.d.ts","sourceRoot":"","sources":["../src/flipbook.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAA;AACrB,OAAO,iBAAiB,CAAA;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAGhD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAMrD,cAAM,QAAQ;IACZ,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,OAAO,CAAC,YAAY,CAAoB;IACxC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAQ;IACnC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAuC;IACvE,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAGhC;IACD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAuB;IACjD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAA6B;IAC5D,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA2B;IACzD,OAAO,CAAC,MAAM,CAAa;IAE3B,OAAO,CAAC,WAAW,CAA8B;IACjD,OAAO,CAAC,aAAa,CAAoC;IACzD,OAAO,CAAC,eAAe,CAAI;IAC3B,OAAO,CAAC,kBAAkB,CAAQ;IAClC,OAAO,CAAC,SAAS,CAAI;IACrB,OAAO,CAAC,gBAAgB,CAAQ;IAChC,gBAAgB;;;MAAiB;IACjC,OAAO,CAAC,sBAAsB,CAAyC;IACvE,OAAO,KAAK,KAAK,GAEhB;IACD,OAAO,KAAK,QAAQ,GAEnB;IACD,OAAO,KAAK,gBAAgB,GAE3B;IACD,OAAO,KAAK,aAAa,GAcxB;IAED,OAAO,KAAK,sBAAsB,GAcjC;gBAEW,OAAO,EAAE,eAAe;IASpC,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,UAA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,gBAAgB,GAE3B;IACD,OAAO,KAAK,aAAa,GAcxB;IAED,OAAO,KAAK,sBAAsB,GAcjC;gBAEW,OAAO,EAAE,eAAe;IASpC,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,UAAQ;IAsHtC,OAAO,CAAC,YAAY;IAqBpB,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,YAAY;YA4DN,SAAS;IA0CvB,OAAO,CAAC,gBAAgB,CAMvB;IAED,OAAO,CAAC,eAAe,CAYtB;IACD,OAAO,CAAC,QAAQ;IAgBhB,UAAU,CAAC,SAAS,EAAE,MAAM;CAM7B;AAED,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAA"} \ No newline at end of file diff --git a/base/dist/flipbook.js b/base/dist/flipbook.js index b40059c..cd40b56 100644 --- a/base/dist/flipbook.js +++ b/base/dist/flipbook.js @@ -1,2 +1,2 @@ /*! For license information please see flipbook.js.LICENSE.txt */ -var t={168:(t,e,i)=>{var n;!function(s,r,o,a){var h,c=["","webkit","Moz","MS","ms","o"],u=r.createElement("div"),l="function",p=Math.round,f=Math.abs,d=Date.now;function v(t,e,i){return setTimeout(w(t,i),e)}function g(t,e,i){return!!Array.isArray(t)&&(m(t,i[e],i),!0)}function m(t,e,i){var n;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==a)for(n=0;n\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=s.console&&(s.console.warn||s.console.log);return r&&r.call(s.console,n,i),t.apply(this,arguments)}}h="function"!=typeof Object.assign?function(t){if(t===a||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i-1}function I(t){return t.trim().split(/\s+/g)}function L(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;ni[e]})):n.sort()),n}function M(t,e){for(var i,n,s=e[0].toUpperCase()+e.slice(1),r=0;r1&&!i.firstMultiple?i.firstMultiple=nt(e):1===s&&(i.firstMultiple=!1);var r=i.firstInput,o=i.firstMultiple,h=o?o.center:r.center,c=e.center=st(n);e.timeStamp=d(),e.deltaTime=e.timeStamp-r.timeStamp,e.angle=ht(h,c),e.distance=at(h,c),function(t,e){var i=e.center,n=t.offsetDelta||{},s=t.prevDelta||{},r=t.prevInput||{};e.eventType!==W&&r.eventType!==$||(s=t.prevDelta={x:r.deltaX||0,y:r.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=s.x+(i.x-n.x),e.deltaY=s.y+(i.y-n.y)}(i,e),e.offsetDirection=ot(e.deltaX,e.deltaY);var u,l,p=rt(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=p.x,e.overallVelocityY=p.y,e.overallVelocity=f(p.x)>f(p.y)?p.x:p.y,e.scale=o?(u=o.pointers,at((l=n)[0],l[1],tt)/at(u[0],u[1],tt)):1,e.rotation=o?function(t,e){return ht(e[1],e[0],tt)+ht(t[1],t[0],tt)}(o.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,n,s,r,o=t.lastInterval||e,h=e.timeStamp-o.timeStamp;if(e.eventType!=H&&(h>q||o.velocity===a)){var c=e.deltaX-o.deltaX,u=e.deltaY-o.deltaY,l=rt(h,c,u);n=l.x,s=l.y,i=f(l.x)>f(l.y)?l.x:l.y,r=ot(c,u),t.lastInterval=e}else i=o.velocity,n=o.velocityX,s=o.velocityY,r=o.direction;e.velocity=i,e.velocityX=n,e.velocityY=s,e.direction=r}(i,e);var v=t.element;S(e.srcEvent.target,v)&&(v=e.srcEvent.target),e.target=v}(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function nt(t){for(var e=[],i=0;i=f(e)?t<0?j:U:e<0?B:G}function at(t,e,i){i||(i=Q);var n=e[i[0]]-t[i[0]],s=e[i[1]]-t[i[1]];return Math.sqrt(n*n+s*s)}function ht(t,e,i){i||(i=Q);var n=e[i[0]]-t[i[0]],s=e[i[1]]-t[i[1]];return 180*Math.atan2(s,n)/Math.PI}et.prototype={handler:function(){},init:function(){this.evEl&&x(this.element,this.evEl,this.domHandler),this.evTarget&&x(this.target,this.evTarget,this.domHandler),this.evWin&&x(_(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&D(this.element,this.evEl,this.domHandler),this.evTarget&&D(this.target,this.evTarget,this.domHandler),this.evWin&&D(_(this.element),this.evWin,this.domHandler)}};var ct={mousedown:W,mousemove:2,mouseup:$},ut="mousedown",lt="mousemove mouseup";function pt(){this.evEl=ut,this.evWin=lt,this.pressed=!1,et.apply(this,arguments)}E(pt,et,{handler:function(t){var e=ct[t.type];e&W&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=$),this.pressed&&(e&$&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:Y,srcEvent:t}))}});var ft={pointerdown:W,pointermove:2,pointerup:$,pointercancel:H,pointerout:H},dt={2:z,3:"pen",4:Y,5:"kinect"},vt="pointerdown",gt="pointermove pointerup pointercancel";function mt(){this.evEl=vt,this.evWin=gt,et.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}s.MSPointerEvent&&!s.PointerEvent&&(vt="MSPointerDown",gt="MSPointerMove MSPointerUp MSPointerCancel"),E(mt,et,{handler:function(t){var e=this.store,i=!1,n=t.type.toLowerCase().replace("ms",""),s=ft[n],r=dt[t.pointerType]||t.pointerType,o=r==z,a=L(e,t.pointerId,"pointerId");s&W&&(0===t.button||o)?a<0&&(e.push(t),a=e.length-1):s&($|H)&&(i=!0),a<0||(e[a]=t,this.callback(this.manager,s,{pointers:e,changedPointers:[t],pointerType:r,srcEvent:t}),i&&e.splice(a,1))}});var Tt={touchstart:W,touchmove:2,touchend:$,touchcancel:H};function yt(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,et.apply(this,arguments)}function bt(t,e){var i=F(t.touches),n=F(t.changedTouches);return e&($|H)&&(i=R(i.concat(n),"identifier",!0)),[i,n]}E(yt,et,{handler:function(t){var e=Tt[t.type];if(e===W&&(this.started=!0),this.started){var i=bt.call(this,t,e);e&($|H)&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:z,srcEvent:t})}}});var Et={touchstart:W,touchmove:2,touchend:$,touchcancel:H},wt="touchstart touchmove touchend touchcancel";function Pt(){this.evTarget=wt,this.targetIds={},et.apply(this,arguments)}function At(t,e){var i=F(t.touches),n=this.targetIds;if(e&(2|W)&&1===i.length)return n[i[0].identifier]=!0,[i,i];var s,r,o=F(t.changedTouches),a=[],h=this.target;if(r=i.filter((function(t){return S(t.target,h)})),e===W)for(s=0;s-1&&n.splice(t,1)}),xt)}}function It(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,i=this.state;function n(i){e.manager.emit(i,t)}i<8&&n(e.options.event+$t(i)),n(e.options.event),t.additionalEvent&&n(t.additionalEvent),i>=8&&n(e.options.event+$t(i))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=qt},canEmit:function(){for(var t=0;te.threshold&&s&e.direction},attrTest:function(t){return jt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Ht(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),E(Bt,jt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[_t]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),E(Gt,Wt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Mt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distancee.time;if(this._input=t,!n||!i||t.eventType&($|H)&&!s)this.reset();else if(t.eventType&W)this.reset(),this._timer=v((function(){this.state=8,this.tryEmit()}),e.time,this);else if(t.eventType&$)return 8;return qt},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&t.eventType&$?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=d(),this.manager.emit(this.options.event,this._input)))}}),E(Zt,jt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[_t]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),E(Jt,jt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Z|J,pointers:1},getTouchAction:function(){return Ut.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(Z|J)?e=t.overallVelocity:i&Z?e=t.overallVelocityX:i&J&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&f(e)>this.options.velocity&&t.eventType&$},emit:function(t){var e=Ht(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),E(Kt,Wt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[kt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance{i.d(e,{A:()=>a});var n=i(645),s=i.n(n),r=i(278),o=i.n(r)()(s());o.push([t.id,".flipbook{height:100%;width:100%;overflow:hidden}.flipbook-debug-bar{position:absolute;bottom:0;left:0;width:100%;background-color:rgba(0,0,0,.5);color:#fff;padding:10px;box-sizing:border-box;display:flex;flex-wrap:wrap;justify-content:space-between;z-index:9999}",""]);const a=o},0:(t,e,i)=>{i.d(e,{A:()=>a});var n=i(645),s=i.n(n),r=i(278),o=i.n(r)()(s());o.push([t.id,".page{position:absolute;backface-visibility:hidden;transform-style:preserve-3d}.page>*{max-width:100%;max-height:100%;height:100%;width:100%;box-sizing:border-box}",""]);const a=o},278:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i="",n=void 0!==e[5];return e[4]&&(i+="@supports (".concat(e[4],") {")),e[2]&&(i+="@media ".concat(e[2]," {")),n&&(i+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),i+=t(e),n&&(i+="}"),e[2]&&(i+="}"),e[4]&&(i+="}"),i})).join("")},e.i=function(t,i,n,s,r){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(n)for(var a=0;a0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=r),i&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=i):u[2]=i),s&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=s):u[4]="".concat(s)),e.push(u))}},e}},645:t=>{t.exports=function(t){return t[1]}},292:t=>{var e=[];function i(t){for(var i=-1,n=0;n{var e={};t.exports=function(t,i){var n=function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}e[t]=i}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(i)}},88:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},884:(t,e,i)=>{t.exports=function(t){var e=i.nc;e&&t.setAttribute("nonce",e)}},893:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(i){!function(t,e,i){var n="";i.supports&&(n+="@supports (".concat(i.supports,") {")),i.media&&(n+="@media ".concat(i.media," {"));var s=void 0!==i.layer;s&&(n+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),n+=i.css,s&&(n+="}"),i.media&&(n+="}"),i.supports&&(n+="}");var r=i.sourceMap;r&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,i)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},997:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function i(n){var s=e[n];if(void 0!==s)return s.exports;var r=e[n]={id:n,exports:{}};return t[n](r,r.exports,i),r.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.nc=void 0;var n={};i.d(n,{$:()=>D});var s=i(292),r=i.n(s),o=i(893),a=i.n(o),h=i(383),c=i.n(h),u=i(884),l=i.n(u),p=i(88),f=i.n(p),d=i(997),v=i.n(d),g=i(0),m={};m.styleTagTransform=v(),m.setAttributes=l(),m.insert=c().bind(null,"head"),m.domAPI=a(),m.insertStyleElement=f(),r()(g.A,m),g.A&&g.A.locals&&g.A.locals;var T=i(970),y={};y.styleTagTransform=v(),y.setAttributes=l(),y.insert=c().bind(null,"head"),y.domAPI=a(),y.insertStyleElement=f(),r()(T.A,y),T.A&&T.A.locals&&T.A.locals;var b,E=i(168),w=i.n(E);!function(t){t.Forward="Forward",t.Backward="Backward",t.None="None"}(b||(b={}));class P{index;pages;bookProperties;onTurned;currentAnimation=null;targetFlipPosition=null;wrappedFlipPosition;constructor(t,e,i,n,s){this.index=t,this.pages=e,this.bookProperties=n,this.onTurned=s,this.wrappedFlipPosition=i?1:0}get isTurned(){return 1===this.flipPosition}get isTurning(){return 0!==this.flipPosition}get isCover(){return this.isFirst||this.isLast}get isFirst(){return 0===this.index}get isLast(){return this.index===this.bookProperties.leavesCount-1}set flipPosition(t){this.wrappedFlipPosition=Math.max(0,Math.min(1,t))}get flipPosition(){return this.wrappedFlipPosition}async flipToPosition(t,e=225){return this.currentAnimation&&await this.currentAnimation,this.flipPosition===t?Promise.resolve():this.targetFlipPosition===t?this.currentAnimation??Promise.resolve():(this.targetFlipPosition=t,this.currentAnimation=new Promise((i=>{const n=this.flipPosition,s=180*Math.abs(t-n)/e*1e3,r=performance.now(),o=e=>{const a=e-r;if(a<0)return void requestAnimationFrame(o);const h=Math.min(a/s,1),c=n+h*(t-n);this.pages.forEach(((t,e)=>{const i=this.bookProperties.isLTR;if(t){const n=e%2+1==1,s=(n?i?c>.5?180-180*c:180*-c:c>.5?-(180-180*c):180*c:i?c<.5?180*-c:180-180*c:c<.5?180*c:-(180-180*c))+"deg",r=n?i?"100%":"-100%":"0px",o=n?c>.5?-1:1:c<.5?-1:1;t.style.transform=`translateX(${r})rotateY(${s})scaleX(${o})`,t.style.transformOrigin=n?i?"left":"right":i?"right":"left",t.style.zIndex=`${c>.5?t.dataset.pageIndex:this.bookProperties.pagesCount-t.dataset.pageIndex}`}})),this.flipPosition=Math.max(0,Math.min(1,c)),1!==this.flipPosition&&0!==this.flipPosition||this.onTurned(1===this.flipPosition?b.Forward:b.Backward),h<1?requestAnimationFrame(o):(this.currentAnimation=null,this.targetFlipPosition=null,i())};requestAnimationFrame(o)})),this.currentAnimation)}async efficientFlipToPosition(t,e=2e4){return function(t,e,i){var n,s=i||{},r=s.noTrailing,o=void 0!==r&&r,a=s.noLeading,h=void 0!==a&&a,c=s.debounceMode,u=void 0===c?void 0:c,l=!1,p=0;function f(){n&&clearTimeout(n)}function d(){for(var i=arguments.length,s=new Array(i),r=0;rt?h?(p=Date.now(),o||(n=setTimeout(u?v:d,t))):d():!0!==o&&(n=setTimeout(u?v:d,void 0===u?t-c:t)))}return d.cancel=function(t){var e=(t||{}).upcomingOnly,i=void 0!==e&&e;f(),l=!i},d}(1,this.flipToPosition.bind(this))(t,e)}}class A{width;height;static from(t){return new A(t.width,t.height)}constructor(t,e){this.width=t,this.height=e}get value(){return this.width/this.height}}class x{width;height;aspectRatio;aspectRatioFit(t){const e=A.from(t).value;return this.aspectRatio.value>e?new x(this.height*e,this.height):new x(this.width,this.width/e)}constructor(t,e){this.width=t,this.height=e,this.aspectRatio=new A(t,e)}get asString(){return`${this.width}x${this.height}`}}class D{bookElement;pageElements=[];pagesCount;leafAspectRatio={width:2,height:3};coverAspectRatio={width:2.15,height:3.15};direction="ltr";onPageChanged;pageSemantics;leaves=[];currentLeaf=void 0;flipDirection=b.None;flipStartingPos=0;isDuringManualFlip=!1;flipDelta=0;isDuringAutoFlip=!1;touchStartingPos={x:0,y:0};prevVisiblePageIndices;get isLTR(){return"ltr"===this.direction}get isClosed(){return!this.currentOrTurningLeaves[0]}get isClosedInverted(){return!this.currentLeaves[1]}get currentLeaves(){let t=-1;for(let e=this.leaves.length-1;e>=0;e--){const i=this.leaves[e];if(i.isTurned){t=i.index+1;break}}return-1==t?[void 0,this.leaves[0]]:t==this.leaves.length?[this.leaves[t-1],void 0]:[this.leaves[t-1],this.leaves[t]]}get currentOrTurningLeaves(){let t=-1;for(let e=this.leaves.length-1;e>=0;e--){const i=this.leaves[e];if(i.isTurned||i.isTurning){t=i.index+1;break}}return-1==t?[void 0,this.leaves[0]]:t==this.leaves.length?[this.leaves[t-1],void 0]:[this.leaves[t-1],this.leaves[t]]}constructor(t){this.pagesCount=t.pagesCount,this.leafAspectRatio=t.leafAspectRatio||this.leafAspectRatio,this.coverAspectRatio=t.coverAspectRatio||this.coverAspectRatio,this.direction=t.direction||this.direction,this.pageSemantics=t.pageSemantics,this.onPageChanged=t.onPageChanged}render(t,e=!1){const i=document.querySelector(t);if(!i)throw new Error(`Couldn't find container with selector: ${t}`);this.bookElement=i,this.bookElement.classList.contains("flipbook")||this.bookElement.classList.add("flipbook");const n=i.querySelectorAll(".page");if(!n.length)throw new Error("No pages found in flipbook");this.pageElements=Array.from(n),this.leaves.splice(0,this.leaves.length);const s=Math.ceil(this.pagesCount/2),r=new x(this.bookElement.clientWidth/2,this.bookElement.clientHeight).aspectRatioFit(this.coverAspectRatio),o=new x(r.width*this.leafAspectRatio.width/this.coverAspectRatio.width,r.height*this.leafAspectRatio.height/this.coverAspectRatio.height);this.bookElement.style.perspective=2*Math.min(2*o.width,o.height)+"px",this.pageElements.forEach(((t,e)=>{t.style.width=`${o.width}px`,t.style.height=`${o.height}px`,t.style.zIndex=""+(this.pagesCount-e),t.dataset.pageIndex=e.toString(),t.style[this.isLTR?"left":"right"]=(i.clientWidth-2*o.width)/2+"px",t.style.top=(i.clientHeight-o.height)/2+"px",t.dataset.pageSemanticName=this.pageSemantics?.indexToSemanticName(e)??"",t.dataset.pageTitle=this.pageSemantics?.indexToTitle(e)??"";const n=Math.floor(e/2),r=(e+1)%2==1;t.classList.add(r?"odd":"even",...0===e?["current-page"]:[]),r?(t.style.transform=`translateX(${this.isLTR?"":"-"}100%)`,this.leaves[n]=new P(n,[t,void 0],!1,{isLTR:this.isLTR,leavesCount:s,pagesCount:this.pagesCount},(t=>{const i=t==b.Forward?e+2===this.pagesCount?[e+1]:[e+1,e+2]:0===e?[e]:[e-1,e];if(this.prevVisiblePageIndices&&this.prevVisiblePageIndices.length===i.length&&i.every(((t,e)=>t===this.prevVisiblePageIndices[e])))return;const n=this.prevVisiblePageIndices;this.prevVisiblePageIndices=i,this.onTurned(i,n)}))):(t.style.transform=`scaleX(-1)translateX(${this.isLTR?"-":""}100%)`,this.leaves[n].pages[1]=t)}));const a=new(w())(this.bookElement);a.on("panstart",this.onDragStart.bind(this)),a.on("panmove",this.onDragUpdate.bind(this)),a.on("panend",this.onDragEnd.bind(this)),this.bookElement.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!1}),this.bookElement.addEventListener("touchmove",this.handleTouchMove.bind(this),{passive:!1}),e&&this.fillDebugBar()}fillDebugBar(){const t=document.createElement("div");t.className="flipbook-debug-bar",this.bookElement?.appendChild(t),setInterval((()=>{t.innerHTML=`\n
Direction: ${this.isLTR?"LTR":"RTL"}
\n
Current Leaf: ${this.currentLeaf?this.currentLeaf.index:"None"}
\n
Flip dir: ${this.flipDirection}
\n
Flip Δ: ${this.flipDelta}
\n
Current Leaf Flip Position: ${this.currentLeaf?.flipPosition.toFixed(3)}
\n
Is During Auto Flip: ${this.isDuringAutoFlip}
\n `}),10)}onDragStart(t){if(console.log("drag start"),this.currentLeaf||this.isDuringAutoFlip)return this.flipDirection=b.None,void(this.flipStartingPos=0);this.flipStartingPos=t.center.x}onDragUpdate(t){if(console.log("drag update"),!this.isDuringAutoFlip&&!this.isDuringManualFlip){this.isDuringManualFlip=!0;try{const e=t.center.x;this.flipDelta=this.isLTR?this.flipStartingPos-e:e-this.flipStartingPos;const i=this.bookElement?.clientWidth??0;if(Math.abs(this.flipDelta)>i)return;if(0===this.flipDelta)return;switch(this.flipDirection=this.flipDirection!==b.None?this.flipDirection:this.flipDelta>0?b.Forward:b.Backward,this.flipDirection){case b.Forward:const t=this.flipDelta/i;if(t>1||this.flipDelta<0)return;if(!this.currentLeaf){if(this.isClosedInverted)return;this.currentLeaf=this.currentOrTurningLeaves[1]}this.currentLeaf.efficientFlipToPosition(t);break;case b.Backward:const e=1-Math.abs(this.flipDelta)/i;if(e<0||this.flipDelta>0)return;if(!this.currentLeaf){if(this.isClosed)return;this.currentLeaf=this.currentOrTurningLeaves[0]}this.currentLeaf.efficientFlipToPosition(e)}}finally{this.isDuringManualFlip=!1}}}async onDragEnd(t){if(console.log("drag end"),!this.currentLeaf||this.isDuringAutoFlip)return this.flipDirection=b.None,void(this.flipStartingPos=0);const e=1e3*t.velocityX;let i;switch(this.flipDirection){case b.Forward:i=(this.isLTR?e<-500:e>500)||this.currentLeaf.flipPosition>=.5?1:0;break;case b.Backward:i=(this.isLTR?e>500:e<-500)||this.currentLeaf.flipPosition<=.5?0:1;break;default:return}this.isDuringAutoFlip=!0,this.flipDirection=b.None,this.flipStartingPos=0,await this.currentLeaf.flipToPosition(i),this.isDuringAutoFlip=!1,this.currentLeaf=void 0}handleTouchStart=t=>{if(t.touches.length>1)return;const e=t.touches[0];this.touchStartingPos={x:e.pageX,y:e.pageY}};handleTouchMove=t=>{if(t.touches.length>1)return;const e=t.touches[0],i=e.pageX-this.touchStartingPos.x,n=e.pageY-this.touchStartingPos.y;Math.abs(i)>Math.abs(n)&&t.preventDefault()};onTurned(t,e){for(let i=0;inull).bind(n.classList)("current-page")}}jumpToPage(t){this.onPageChanged&&this.onPageChanged(t)}}var S=n.$;export{S as FlipBook}; +var t={168:(t,e,i)=>{var n;!function(s,r,o,a){var h,c=["","webkit","Moz","MS","ms","o"],u=r.createElement("div"),l="function",p=Math.round,f=Math.abs,d=Date.now;function v(t,e,i){return setTimeout(w(t,i),e)}function g(t,e,i){return!!Array.isArray(t)&&(m(t,i[e],i),!0)}function m(t,e,i){var n;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==a)for(n=0;n\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=s.console&&(s.console.warn||s.console.log);return r&&r.call(s.console,n,i),t.apply(this,arguments)}}h="function"!=typeof Object.assign?function(t){if(t===a||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i-1}function I(t){return t.trim().split(/\s+/g)}function L(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;ni[e]})):n.sort()),n}function M(t,e){for(var i,n,s=e[0].toUpperCase()+e.slice(1),r=0;r1&&!i.firstMultiple?i.firstMultiple=nt(e):1===s&&(i.firstMultiple=!1);var r=i.firstInput,o=i.firstMultiple,h=o?o.center:r.center,c=e.center=st(n);e.timeStamp=d(),e.deltaTime=e.timeStamp-r.timeStamp,e.angle=ht(h,c),e.distance=at(h,c),function(t,e){var i=e.center,n=t.offsetDelta||{},s=t.prevDelta||{},r=t.prevInput||{};e.eventType!==W&&r.eventType!==$||(s=t.prevDelta={x:r.deltaX||0,y:r.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=s.x+(i.x-n.x),e.deltaY=s.y+(i.y-n.y)}(i,e),e.offsetDirection=ot(e.deltaX,e.deltaY);var u,l,p=rt(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=p.x,e.overallVelocityY=p.y,e.overallVelocity=f(p.x)>f(p.y)?p.x:p.y,e.scale=o?(u=o.pointers,at((l=n)[0],l[1],tt)/at(u[0],u[1],tt)):1,e.rotation=o?function(t,e){return ht(e[1],e[0],tt)+ht(t[1],t[0],tt)}(o.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,n,s,r,o=t.lastInterval||e,h=e.timeStamp-o.timeStamp;if(e.eventType!=H&&(h>q||o.velocity===a)){var c=e.deltaX-o.deltaX,u=e.deltaY-o.deltaY,l=rt(h,c,u);n=l.x,s=l.y,i=f(l.x)>f(l.y)?l.x:l.y,r=ot(c,u),t.lastInterval=e}else i=o.velocity,n=o.velocityX,s=o.velocityY,r=o.direction;e.velocity=i,e.velocityX=n,e.velocityY=s,e.direction=r}(i,e);var v=t.element;S(e.srcEvent.target,v)&&(v=e.srcEvent.target),e.target=v}(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function nt(t){for(var e=[],i=0;i=f(e)?t<0?j:U:e<0?B:G}function at(t,e,i){i||(i=Q);var n=e[i[0]]-t[i[0]],s=e[i[1]]-t[i[1]];return Math.sqrt(n*n+s*s)}function ht(t,e,i){i||(i=Q);var n=e[i[0]]-t[i[0]],s=e[i[1]]-t[i[1]];return 180*Math.atan2(s,n)/Math.PI}et.prototype={handler:function(){},init:function(){this.evEl&&x(this.element,this.evEl,this.domHandler),this.evTarget&&x(this.target,this.evTarget,this.domHandler),this.evWin&&x(_(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&D(this.element,this.evEl,this.domHandler),this.evTarget&&D(this.target,this.evTarget,this.domHandler),this.evWin&&D(_(this.element),this.evWin,this.domHandler)}};var ct={mousedown:W,mousemove:2,mouseup:$},ut="mousedown",lt="mousemove mouseup";function pt(){this.evEl=ut,this.evWin=lt,this.pressed=!1,et.apply(this,arguments)}E(pt,et,{handler:function(t){var e=ct[t.type];e&W&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=$),this.pressed&&(e&$&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:Y,srcEvent:t}))}});var ft={pointerdown:W,pointermove:2,pointerup:$,pointercancel:H,pointerout:H},dt={2:z,3:"pen",4:Y,5:"kinect"},vt="pointerdown",gt="pointermove pointerup pointercancel";function mt(){this.evEl=vt,this.evWin=gt,et.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}s.MSPointerEvent&&!s.PointerEvent&&(vt="MSPointerDown",gt="MSPointerMove MSPointerUp MSPointerCancel"),E(mt,et,{handler:function(t){var e=this.store,i=!1,n=t.type.toLowerCase().replace("ms",""),s=ft[n],r=dt[t.pointerType]||t.pointerType,o=r==z,a=L(e,t.pointerId,"pointerId");s&W&&(0===t.button||o)?a<0&&(e.push(t),a=e.length-1):s&($|H)&&(i=!0),a<0||(e[a]=t,this.callback(this.manager,s,{pointers:e,changedPointers:[t],pointerType:r,srcEvent:t}),i&&e.splice(a,1))}});var Tt={touchstart:W,touchmove:2,touchend:$,touchcancel:H};function yt(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,et.apply(this,arguments)}function bt(t,e){var i=F(t.touches),n=F(t.changedTouches);return e&($|H)&&(i=R(i.concat(n),"identifier",!0)),[i,n]}E(yt,et,{handler:function(t){var e=Tt[t.type];if(e===W&&(this.started=!0),this.started){var i=bt.call(this,t,e);e&($|H)&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:z,srcEvent:t})}}});var Et={touchstart:W,touchmove:2,touchend:$,touchcancel:H},wt="touchstart touchmove touchend touchcancel";function Pt(){this.evTarget=wt,this.targetIds={},et.apply(this,arguments)}function At(t,e){var i=F(t.touches),n=this.targetIds;if(e&(2|W)&&1===i.length)return n[i[0].identifier]=!0,[i,i];var s,r,o=F(t.changedTouches),a=[],h=this.target;if(r=i.filter((function(t){return S(t.target,h)})),e===W)for(s=0;s-1&&n.splice(t,1)}),xt)}}function It(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,i=this.state;function n(i){e.manager.emit(i,t)}i<8&&n(e.options.event+$t(i)),n(e.options.event),t.additionalEvent&&n(t.additionalEvent),i>=8&&n(e.options.event+$t(i))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=qt},canEmit:function(){for(var t=0;te.threshold&&s&e.direction},attrTest:function(t){return jt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Ht(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),E(Bt,jt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[_t]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),E(Gt,Wt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Mt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distancee.time;if(this._input=t,!n||!i||t.eventType&($|H)&&!s)this.reset();else if(t.eventType&W)this.reset(),this._timer=v((function(){this.state=8,this.tryEmit()}),e.time,this);else if(t.eventType&$)return 8;return qt},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&t.eventType&$?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=d(),this.manager.emit(this.options.event,this._input)))}}),E(Zt,jt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[_t]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),E(Jt,jt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Z|J,pointers:1},getTouchAction:function(){return Ut.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(Z|J)?e=t.overallVelocity:i&Z?e=t.overallVelocityX:i&J&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&f(e)>this.options.velocity&&t.eventType&$},emit:function(t){var e=Ht(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),E(Kt,Wt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[kt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance{i.d(e,{A:()=>a});var n=i(645),s=i.n(n),r=i(278),o=i.n(r)()(s());o.push([t.id,".flipbook{height:100%;width:100%;overflow:hidden}.flipbook-debug-bar{position:absolute;bottom:0;left:0;width:100%;background-color:rgba(0,0,0,.5);color:#fff;padding:10px;box-sizing:border-box;display:flex;flex-wrap:wrap;justify-content:space-between;z-index:9999}",""]);const a=o},0:(t,e,i)=>{i.d(e,{A:()=>a});var n=i(645),s=i.n(n),r=i(278),o=i.n(r)()(s());o.push([t.id,".page{position:absolute;backface-visibility:hidden;transform-style:preserve-3d}.page>*{max-width:100%;max-height:100%;height:100%;width:100%;box-sizing:border-box}",""]);const a=o},278:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i="",n=void 0!==e[5];return e[4]&&(i+="@supports (".concat(e[4],") {")),e[2]&&(i+="@media ".concat(e[2]," {")),n&&(i+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),i+=t(e),n&&(i+="}"),e[2]&&(i+="}"),e[4]&&(i+="}"),i})).join("")},e.i=function(t,i,n,s,r){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(n)for(var a=0;a0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=r),i&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=i):u[2]=i),s&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=s):u[4]="".concat(s)),e.push(u))}},e}},645:t=>{t.exports=function(t){return t[1]}},292:t=>{var e=[];function i(t){for(var i=-1,n=0;n{var e={};t.exports=function(t,i){var n=function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}e[t]=i}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(i)}},88:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},884:(t,e,i)=>{t.exports=function(t){var e=i.nc;e&&t.setAttribute("nonce",e)}},893:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(i){!function(t,e,i){var n="";i.supports&&(n+="@supports (".concat(i.supports,") {")),i.media&&(n+="@media ".concat(i.media," {"));var s=void 0!==i.layer;s&&(n+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),n+=i.css,s&&(n+="}"),i.media&&(n+="}"),i.supports&&(n+="}");var r=i.sourceMap;r&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,i)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},997:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function i(n){var s=e[n];if(void 0!==s)return s.exports;var r=e[n]={id:n,exports:{}};return t[n](r,r.exports,i),r.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.nc=void 0;var n={};i.d(n,{$:()=>D});var s=i(292),r=i.n(s),o=i(893),a=i.n(o),h=i(383),c=i.n(h),u=i(884),l=i.n(u),p=i(88),f=i.n(p),d=i(997),v=i.n(d),g=i(0),m={};m.styleTagTransform=v(),m.setAttributes=l(),m.insert=c().bind(null,"head"),m.domAPI=a(),m.insertStyleElement=f(),r()(g.A,m),g.A&&g.A.locals&&g.A.locals;var T=i(970),y={};y.styleTagTransform=v(),y.setAttributes=l(),y.insert=c().bind(null,"head"),y.domAPI=a(),y.insertStyleElement=f(),r()(T.A,y),T.A&&T.A.locals&&T.A.locals;var b,E=i(168),w=i.n(E);!function(t){t.Forward="Forward",t.Backward="Backward",t.None="None"}(b||(b={}));class P{index;pages;bookProperties;onTurned;currentAnimation=null;targetFlipPosition=null;wrappedFlipPosition;constructor(t,e,i,n,s){this.index=t,this.pages=e,this.bookProperties=n,this.onTurned=s,this.wrappedFlipPosition=i?1:0}get isTurned(){return 1===this.flipPosition}get isTurning(){return 0!==this.flipPosition}get isCover(){return this.isFirst||this.isLast}get isFirst(){return 0===this.index}get isLast(){return this.index===this.bookProperties.leavesCount-1}set flipPosition(t){this.wrappedFlipPosition=Math.max(0,Math.min(1,t))}get flipPosition(){return this.wrappedFlipPosition}async flipToPosition(t,e=225){return this.currentAnimation&&await this.currentAnimation,this.flipPosition===t?Promise.resolve():this.targetFlipPosition===t?this.currentAnimation??Promise.resolve():(this.targetFlipPosition=t,this.currentAnimation=new Promise((i=>{const n=this.flipPosition,s=180*Math.abs(t-n)/e*1e3,r=performance.now(),o=e=>{const a=e-r;if(a<0)return void requestAnimationFrame(o);const h=Math.min(a/s,1),c=n+h*(t-n);this.pages.forEach(((t,e)=>{const i=this.bookProperties.isLTR;if(t){const n=e%2+1==1,s=(n?i?c>.5?180-180*c:180*-c:c>.5?-(180-180*c):180*c:i?c<.5?180*-c:180-180*c:c<.5?180*c:-(180-180*c))+"deg",r=n?i?"100%":"-100%":"0px",o=n?c>.5?-1:1:c<.5?-1:1;t.style.transform=`translateX(${r})rotateY(${s})scaleX(${o})`,t.style.transformOrigin=n?i?"left":"right":i?"right":"left",t.style.zIndex=`${c>.5?t.dataset.pageIndex:this.bookProperties.pagesCount-t.dataset.pageIndex}`}})),this.flipPosition=Math.max(0,Math.min(1,c)),1!==this.flipPosition&&0!==this.flipPosition||this.onTurned(1===this.flipPosition?b.Forward:b.Backward),h<1?requestAnimationFrame(o):(this.currentAnimation=null,this.targetFlipPosition=null,i())};requestAnimationFrame(o)})),this.currentAnimation)}async efficientFlipToPosition(t,e=2e4){return function(t,e,i){var n,s=i||{},r=s.noTrailing,o=void 0!==r&&r,a=s.noLeading,h=void 0!==a&&a,c=s.debounceMode,u=void 0===c?void 0:c,l=!1,p=0;function f(){n&&clearTimeout(n)}function d(){for(var i=arguments.length,s=new Array(i),r=0;rt?h?(p=Date.now(),o||(n=setTimeout(u?v:d,t))):d():!0!==o&&(n=setTimeout(u?v:d,void 0===u?t-c:t)))}return d.cancel=function(t){var e=(t||{}).upcomingOnly,i=void 0!==e&&e;f(),l=!i},d}(1,this.flipToPosition.bind(this))(t,e)}}class A{width;height;static from(t){return new A(t.width,t.height)}constructor(t,e){this.width=t,this.height=e}get value(){return this.width/this.height}}class x{width;height;aspectRatio;aspectRatioFit(t){const e=A.from(t).value;return this.aspectRatio.value>e?new x(this.height*e,this.height):new x(this.width,this.width/e)}constructor(t,e){this.width=t,this.height=e,this.aspectRatio=new A(t,e)}get asString(){return`${this.width}x${this.height}`}}class D{bookElement;pageElements=[];pagesCount;leafAspectRatio={width:2,height:3};coverAspectRatio={width:2.15,height:3.15};direction="ltr";onPageChanged;pageSemantics;leaves=[];currentLeaf=void 0;flipDirection=b.None;flipStartingPos=0;isDuringManualFlip=!1;flipDelta=0;isDuringAutoFlip=!1;touchStartingPos={x:0,y:0};prevVisiblePageIndices;get isLTR(){return"ltr"===this.direction}get isClosed(){return!this.currentOrTurningLeaves[0]}get isClosedInverted(){return!this.currentLeaves[1]}get currentLeaves(){let t=-1;for(let e=this.leaves.length-1;e>=0;e--){const i=this.leaves[e];if(i.isTurned){t=i.index+1;break}}return-1==t?[void 0,this.leaves[0]]:t==this.leaves.length?[this.leaves[t-1],void 0]:[this.leaves[t-1],this.leaves[t]]}get currentOrTurningLeaves(){let t=-1;for(let e=this.leaves.length-1;e>=0;e--){const i=this.leaves[e];if(i.isTurned||i.isTurning){t=i.index+1;break}}return-1==t?[void 0,this.leaves[0]]:t==this.leaves.length?[this.leaves[t-1],void 0]:[this.leaves[t-1],this.leaves[t]]}constructor(t){this.pagesCount=t.pagesCount,this.leafAspectRatio=t.leafAspectRatio||this.leafAspectRatio,this.coverAspectRatio=t.coverAspectRatio||this.coverAspectRatio,this.direction=t.direction||this.direction,this.pageSemantics=t.pageSemantics,this.onPageChanged=t.onPageChanged}render(t,e=!1){const i=document.querySelector(t);if(!i)throw new Error(`Couldn't find container with selector: ${t}`);this.bookElement=i,this.bookElement.classList.contains("flipbook")||this.bookElement.classList.add("flipbook");const n=i.querySelectorAll(".page");if(!n.length)throw new Error("No pages found in flipbook");this.pageElements=Array.from(n),this.leaves.splice(0,this.leaves.length);const s=Math.ceil(this.pagesCount/2),r=new x(this.bookElement.clientWidth/2,this.bookElement.clientHeight).aspectRatioFit(this.coverAspectRatio),o=new x(r.width*this.leafAspectRatio.width/this.coverAspectRatio.width,r.height*this.leafAspectRatio.height/this.coverAspectRatio.height);this.bookElement.style.perspective=2*Math.min(2*o.width,o.height)+"px",this.pageElements.forEach(((t,e)=>{t.style.width=`${o.width}px`,t.style.height=`${o.height}px`,t.style.zIndex=""+(this.pagesCount-e),t.dataset.pageIndex=e.toString(),t.style[this.isLTR?"left":"right"]=(i.clientWidth-2*o.width)/2+"px",t.style.top=(i.clientHeight-o.height)/2+"px",t.dataset.pageSemanticName=this.pageSemantics?.indexToSemanticName(e)??"",t.dataset.pageTitle=this.pageSemantics?.indexToTitle(e)??"";const n=Math.floor(e/2),r=(e+1)%2==1;t.classList.add(r?"odd":"even",...0===e?["current-page"]:[]),r?(t.style.transform=`translateX(${this.isLTR?"":"-"}100%)`,this.leaves[n]=new P(n,[t,void 0],!1,{isLTR:this.isLTR,leavesCount:s,pagesCount:this.pagesCount},(t=>{const i=t==b.Forward?e+2===this.pagesCount?[e+1]:[e+1,e+2]:0===e?[e]:[e-1,e];if(this.prevVisiblePageIndices&&this.prevVisiblePageIndices.length===i.length&&i.every(((t,e)=>t===this.prevVisiblePageIndices[e])))return;const n=this.prevVisiblePageIndices;this.prevVisiblePageIndices=i,this.onTurned(i,n)}))):(t.style.transform=`scaleX(-1)translateX(${this.isLTR?"-":""}100%)`,this.leaves[n].pages[1]=t)}));const a=new(w())(this.bookElement);a.on("panstart",this.onDragStart.bind(this)),a.on("panmove",this.onDragUpdate.bind(this)),a.on("panend",this.onDragEnd.bind(this)),this.bookElement.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!1}),this.bookElement.addEventListener("touchmove",this.handleTouchMove.bind(this),{passive:!1}),e&&this.fillDebugBar()}fillDebugBar(){const t=document.createElement("div");t.className="flipbook-debug-bar",this.bookElement?.appendChild(t),setInterval((()=>{t.innerHTML=`\n
Direction: ${this.isLTR?"LTR":"RTL"}
\n
Current Leaf: ${this.currentLeaf?this.currentLeaf.index:"None"}
\n
Flip dir: ${this.flipDirection}
\n
Flip Δ: ${this.flipDelta}
\n
Current Leaf Flip Position: ${this.currentLeaf?.flipPosition.toFixed(3)}
\n
Is During Auto Flip: ${this.isDuringAutoFlip}
\n `}),10)}onDragStart(t){if(console.log("drag start"),this.currentLeaf||this.isDuringAutoFlip)return this.flipDirection=b.None,void(this.flipStartingPos=0);this.flipStartingPos=t.center.x}onDragUpdate(t){if(console.log("drag update"),!this.isDuringAutoFlip&&!this.isDuringManualFlip){this.isDuringManualFlip=!0;try{const e=t.center.x;this.flipDelta=this.isLTR?this.flipStartingPos-e:e-this.flipStartingPos;const i=this.bookElement?.clientWidth??0;if(Math.abs(this.flipDelta)>i)return;if(0===this.flipDelta)return;switch(this.flipDirection=this.flipDirection!==b.None?this.flipDirection:this.flipDelta>0?b.Forward:b.Backward,this.flipDirection){case b.Forward:const t=this.flipDelta/i;if(t>1||this.flipDelta<0)return;if(!this.currentLeaf){if(this.isClosedInverted)return;this.currentLeaf=this.currentOrTurningLeaves[1]}this.currentLeaf.efficientFlipToPosition(t);break;case b.Backward:const e=1-Math.abs(this.flipDelta)/i;if(e<0||this.flipDelta>0)return;if(!this.currentLeaf){if(this.isClosed)return;this.currentLeaf=this.currentOrTurningLeaves[0]}this.currentLeaf.efficientFlipToPosition(e)}}finally{this.isDuringManualFlip=!1}}}async onDragEnd(t){if(console.log("drag end"),!this.currentLeaf||this.isDuringAutoFlip)return this.flipDirection=b.None,void(this.flipStartingPos=0);const e=1e3*t.velocityX;let i;switch(this.flipDirection){case b.Forward:i=(this.isLTR?e<-500:e>500)||this.currentLeaf.flipPosition>=.5?1:0;break;case b.Backward:i=(this.isLTR?e>500:e<-500)||this.currentLeaf.flipPosition<=.5?0:1;break;default:return}this.isDuringAutoFlip=!0,this.flipDirection=b.None,this.flipStartingPos=0,await this.currentLeaf.flipToPosition(i),this.isDuringAutoFlip=!1,this.currentLeaf=void 0}handleTouchStart=t=>{if(t.touches.length>1)return;const e=t.touches[0];this.touchStartingPos={x:e.pageX,y:e.pageY}};handleTouchMove=t=>{if(t.touches.length>1)return;const e=t.touches[0],i=e.pageX-this.touchStartingPos.x,n=e.pageY-this.touchStartingPos.y;Math.abs(i)>Math.abs(n)&&t.preventDefault()};onTurned(t,e){for(let i=0;inull).bind(n.classList)("current-page")}}jumpToPage(t){this.onPageChanged&&this.onPageChanged(t)}}var S=n.$;export{S as FlipBook}; \ No newline at end of file diff --git a/base/src/flipbook.ts b/base/src/flipbook.ts index c2b394d..ff8312f 100644 --- a/base/src/flipbook.ts +++ b/base/src/flipbook.ts @@ -132,6 +132,7 @@ class FlipBook { const leafIndex = Math.floor(pageIndex / 2) const isOddPage = (pageIndex + 1) % 2 === 1 // TODO: set dynamically by parameter and not by hardcoding eq 0 + // TODO: set prev-page / next-page classes for prev/next pages as accordingally pageElement.classList.add( isOddPage ? 'odd' : 'even', ...(pageIndex === 0 ? ['current-page'] : []) @@ -366,6 +367,7 @@ class FlipBook { action.bind(pageElement.classList)('current-page') } // TODO expose to outside using https://github.com/open-draft/strict-event-emitter, and just be a consumer internally. + // TODO: set prev-page / next-page classes for prev/next pages as accordingally } jumpToPage(pageIndex: number) { // TODO: drop as probably totally replaced ith onTurned. maybe change onTurned name to onPageChanged. diff --git a/react/.npmignore b/react/.npmignore new file mode 100644 index 0000000..e618e19 --- /dev/null +++ b/react/.npmignore @@ -0,0 +1,7 @@ +node_modules/ +devops/ +test/ +jest.config.js +html-flip-book-react*.tgz +tsconfig.json +vite.config.ts \ No newline at end of file diff --git a/react/dist/flip-book.js b/react/dist/flip-book.js index 700d5da..9074d8f 100644 --- a/react/dist/flip-book.js +++ b/react/dist/flip-book.js @@ -1,4503 +1,1410 @@ -import require$$0, { useRef, useEffect } from "react"; -var jsxRuntime = { exports: {} }, reactJsxRuntime_production = {}; -var hasRequiredReactJsxRuntime_production; -function requireReactJsxRuntime_production() { - if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production; - hasRequiredReactJsxRuntime_production = 1; - var o = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment"); - function l(v, u, d) { - var g = null; - if (d !== void 0 && (g = "" + d), u.key !== void 0 && (g = "" + u.key), "key" in u) { - d = {}; - for (var p in u) - p !== "key" && (d[p] = u[p]); - } else d = u; - return u = d.ref, { - $$typeof: o, - type: v, - key: g, - ref: u !== void 0 ? u : null, - props: d +var ii = Object.defineProperty; +var ni = (d, r, s) => r in d ? ii(d, r, { enumerable: !0, configurable: !0, writable: !0, value: s }) : d[r] = s; +var x = (d, r, s) => ni(d, typeof r != "symbol" ? r + "" : r, s); +import ri, { useRef as oi, useEffect as si } from "react"; +var Ee = { exports: {} }, Ht = {}; +var je; +function ai() { + if (je) return Ht; + je = 1; + var d = Symbol.for("react.transitional.element"), r = Symbol.for("react.fragment"); + function s(u, c, v) { + var f = null; + if (v !== void 0 && (f = "" + v), c.key !== void 0 && (f = "" + c.key), "key" in c) { + v = {}; + for (var l in c) + l !== "key" && (v[l] = c[l]); + } else v = c; + return c = v.ref, { + $$typeof: d, + type: u, + key: f, + ref: c !== void 0 ? c : null, + props: v }; } - return reactJsxRuntime_production.Fragment = s, reactJsxRuntime_production.jsx = l, reactJsxRuntime_production.jsxs = l, reactJsxRuntime_production; -} -var reactJsxRuntime_development = {}; -var hasRequiredReactJsxRuntime_development; -function requireReactJsxRuntime_development() { - return hasRequiredReactJsxRuntime_development || (hasRequiredReactJsxRuntime_development = 1, process.env.NODE_ENV !== "production" && function() { - function o(n) { - for (var e = arguments.length, t = Array(1 < e ? e - 1 : 0), r = 1; r < e; r++) - t[r - 1] = arguments[r]; - e = n, r = Error("react-stack-top-frame"), h.getCurrentStack && (r = h.getCurrentStack(r), r !== "" && (e += "%s", t = t.concat([r]))), t.unshift(e), Function.prototype.apply.call(console.error, console, t); - } - function s(n) { - if (n == null) return null; - if (typeof n == "function") - return n.$$typeof === gn ? null : n.displayName || n.name || null; - if (typeof n == "string") return n; - switch (n) { - case C: + return Ht.Fragment = r, Ht.jsx = s, Ht.jsxs = s, Ht; +} +var Bt = {}; +var Ye; +function ui() { + return Ye || (Ye = 1, process.env.NODE_ENV !== "production" && function() { + function d(i) { + for (var h = arguments.length, p = Array(1 < h ? h - 1 : 0), T = 1; T < h; T++) + p[T - 1] = arguments[T]; + h = i, T = Error("react-stack-top-frame"), G.getCurrentStack && (T = G.getCurrentStack(T), T !== "" && (h += "%s", p = p.concat([T]))), p.unshift(h), Function.prototype.apply.call(console.error, console, p); + } + function r(i) { + if (i == null) return null; + if (typeof i == "function") + return i.$$typeof === ce ? null : i.displayName || i.name || null; + if (typeof i == "string") return i; + switch (i) { + case at: return "Fragment"; - case mn: + case rt: return "Portal"; - case Y: + case At: return "Profiler"; - case K: + case Pt: return "StrictMode"; - case x: + case st: return "Suspense"; - case M: + case ft: return "SuspenseList"; } - if (typeof n == "object") - switch (typeof n.tag == "number" && o( + if (typeof i == "object") + switch (typeof i.tag == "number" && d( "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue." - ), n.$$typeof) { - case V: - return (n.displayName || "Context") + ".Provider"; - case X: - return (n._context.displayName || "Context") + ".Consumer"; - case N: - var e = n.render; - return n = n.displayName, n || (n = e.displayName || e.name || "", n = n !== "" ? "ForwardRef(" + n + ")" : "ForwardRef"), n; - case S: - return e = n.displayName || null, e !== null ? e : s(n.type) || "Memo"; - case L: - e = n._payload, n = n._init; + ), i.$$typeof) { + case ot: + return (i.displayName || "Context") + ".Provider"; + case Yt: + return (i._context.displayName || "Context") + ".Consumer"; + case ht: + var h = i.render; + return i = i.displayName, i || (i = h.displayName || h.name || "", i = i !== "" ? "ForwardRef(" + i + ")" : "ForwardRef"), i; + case Nt: + return h = i.displayName || null, h !== null ? h : r(i.type) || "Memo"; + case pt: + h = i._payload, i = i._init; try { - return s(n(e)); + return r(i(h)); } catch { } } return null; } - function l(n) { - return "" + n; + function s(i) { + return "" + i; } - function v(n) { + function u(i) { try { - l(n); - var e = !1; + s(i); + var h = !1; } catch { - e = !0; + h = !0; } - if (e) - return e = typeof Symbol == "function" && Symbol.toStringTag && n[Symbol.toStringTag] || n.constructor.name || "Object", o( + if (h) + return h = typeof Symbol == "function" && Symbol.toStringTag && i[Symbol.toStringTag] || i.constructor.name || "Object", d( "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", - e - ), l(n); + h + ), s(i); } - function u() { + function c() { } - function d() { - if (P === 0) { - G = console.log, J = console.info, Z = console.warn, Q = console.error, nn = console.group, en = console.groupCollapsed, tn = console.groupEnd; - var n = { + function v() { + if (I === 0) { + _ = console.log, Y = console.info, xt = console.warn, dt = console.error, vt = console.group, gt = console.groupCollapsed, mt = console.groupEnd; + var i = { configurable: !0, enumerable: !0, - value: u, + value: c, writable: !0 }; Object.defineProperties(console, { - info: n, - log: n, - warn: n, - error: n, - group: n, - groupCollapsed: n, - groupEnd: n + info: i, + log: i, + warn: i, + error: i, + group: i, + groupCollapsed: i, + groupEnd: i }); } - P++; + I++; } - function g() { - if (P--, P === 0) { - var n = { configurable: !0, enumerable: !0, writable: !0 }; + function f() { + if (I--, I === 0) { + var i = { configurable: !0, enumerable: !0, writable: !0 }; Object.defineProperties(console, { - log: E({}, n, { value: G }), - info: E({}, n, { value: J }), - warn: E({}, n, { value: Z }), - error: E({}, n, { value: Q }), - group: E({}, n, { value: nn }), - groupCollapsed: E({}, n, { value: en }), - groupEnd: E({}, n, { value: tn }) + log: B({}, i, { value: _ }), + info: B({}, i, { value: Y }), + warn: B({}, i, { value: xt }), + error: B({}, i, { value: dt }), + group: B({}, i, { value: vt }), + groupCollapsed: B({}, i, { value: gt }), + groupEnd: B({}, i, { value: mt }) }); } - 0 > P && o( + 0 > I && d( "disabledDepth fell below zero. This is a bug in React. Please file an issue." ); } - function p(n) { - if (U === void 0) + function l(i) { + if (V === void 0) try { throw Error(); - } catch (t) { - var e = t.stack.trim().match(/\n( *(at )?)/); - U = e && e[1] || ""; + } catch (p) { + var h = p.stack.trim().match(/\n( *(at )?)/); + V = h && h[1] || ""; } return ` -` + U + n; - } - function F(n, e) { - if (!n || z) return ""; - var t = B.get(n); - if (t !== void 0) return t; - z = !0, t = Error.prepareStackTrace, Error.prepareStackTrace = void 0; - var r = null; - r = h.H, h.H = null, d(); - var c = { +` + V + i; + } + function E(i, h) { + if (!i || J) return ""; + var p = It.get(i); + if (p !== void 0) return p; + J = !0, p = Error.prepareStackTrace, Error.prepareStackTrace = void 0; + var T = null; + T = G.H, G.H = null, v(); + var k = { DetermineComponentFrameRoot: function() { try { - if (e) { - var f = function() { + if (h) { + var Q = function() { throw Error(); }; - if (Object.defineProperty(f.prototype, "props", { + if (Object.defineProperty(Q.prototype, "props", { set: function() { throw Error(); } }), typeof Reflect == "object" && Reflect.construct) { try { - Reflect.construct(f, []); - } catch (m) { - var O = m; + Reflect.construct(Q, []); + } catch (K) { + var Et = K; } - Reflect.construct(n, [], f); + Reflect.construct(i, [], Q); } else { try { - f.call(); - } catch (m) { - O = m; + Q.call(); + } catch (K) { + Et = K; } - n.call(f.prototype); + i.call(Q.prototype); } } else { try { throw Error(); - } catch (m) { - O = m; + } catch (K) { + Et = K; } - (f = n()) && typeof f.catch == "function" && f.catch(function() { + (Q = i()) && typeof Q.catch == "function" && Q.catch(function() { }); } - } catch (m) { - if (m && O && typeof m.stack == "string") - return [m.stack, O.stack]; + } catch (K) { + if (K && Et && typeof K.stack == "string") + return [K.stack, Et.stack]; } return [null, null]; } }; - c.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot"; - var y = Object.getOwnPropertyDescriptor( - c.DetermineComponentFrameRoot, + k.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot"; + var Tt = Object.getOwnPropertyDescriptor( + k.DetermineComponentFrameRoot, "name" ); - y && y.configurable && Object.defineProperty( - c.DetermineComponentFrameRoot, + Tt && Tt.configurable && Object.defineProperty( + k.DetermineComponentFrameRoot, "name", { value: "DetermineComponentFrameRoot" } ); try { - var i = c.DetermineComponentFrameRoot(), a = i[0], b = i[1]; - if (a && b) { - var _ = a.split(` -`), T = b.split(` + var m = k.DetermineComponentFrameRoot(), S = m[0], Z = m[1]; + if (S && Z) { + var z = S.split(` +`), ut = Z.split(` `); - for (a = i = 0; i < _.length && !_[i].includes( + for (S = m = 0; m < z.length && !z[m].includes( "DetermineComponentFrameRoot" ); ) - i++; - for (; a < T.length && !T[a].includes("DetermineComponentFrameRoot"); ) - a++; - if (i === _.length || a === T.length) - for (i = _.length - 1, a = T.length - 1; 1 <= i && 0 <= a && _[i] !== T[a]; ) - a--; - for (; 1 <= i && 0 <= a; i--, a--) - if (_[i] !== T[a]) { - if (i !== 1 || a !== 1) + m++; + for (; S < ut.length && !ut[S].includes("DetermineComponentFrameRoot"); ) + S++; + if (m === z.length || S === ut.length) + for (m = z.length - 1, S = ut.length - 1; 1 <= m && 0 <= S && z[m] !== ut[S]; ) + S--; + for (; 1 <= m && 0 <= S; m--, S--) + if (z[m] !== ut[S]) { + if (m !== 1 || S !== 1) do - if (i--, a--, 0 > a || _[i] !== T[a]) { - var I = ` -` + _[i].replace( + if (m--, S--, 0 > S || z[m] !== ut[S]) { + var yt = ` +` + z[m].replace( " at new ", " at " ); - return n.displayName && I.includes("") && (I = I.replace("", n.displayName)), typeof n == "function" && B.set(n, I), I; + return i.displayName && yt.includes("") && (yt = yt.replace("", i.displayName)), typeof i == "function" && It.set(i, yt), yt; } - while (1 <= i && 0 <= a); + while (1 <= m && 0 <= S); break; } } } finally { - z = !1, h.H = r, g(), Error.prepareStackTrace = t; + J = !1, G.H = T, f(), Error.prepareStackTrace = p; } - return _ = (_ = n ? n.displayName || n.name : "") ? p(_) : "", typeof n == "function" && B.set(n, _), _; + return z = (z = i ? i.displayName || i.name : "") ? l(z) : "", typeof i == "function" && It.set(i, z), z; } - function A(n) { - if (n == null) return ""; - if (typeof n == "function") { - var e = n.prototype; - return F( - n, - !(!e || !e.isReactComponent) + function y(i) { + if (i == null) return ""; + if (typeof i == "function") { + var h = i.prototype; + return E( + i, + !(!h || !h.isReactComponent) ); } - if (typeof n == "string") return p(n); - switch (n) { - case x: - return p("Suspense"); - case M: - return p("SuspenseList"); + if (typeof i == "string") return l(i); + switch (i) { + case st: + return l("Suspense"); + case ft: + return l("SuspenseList"); } - if (typeof n == "object") - switch (n.$$typeof) { - case N: - return n = F(n.render, !1), n; - case S: - return A(n.type); - case L: - e = n._payload, n = n._init; + if (typeof i == "object") + switch (i.$$typeof) { + case ht: + return i = E(i.render, !1), i; + case Nt: + return y(i.type); + case pt: + h = i._payload, i = i._init; try { - return A(n(e)); + return y(i(h)); } catch { } } return ""; } - function R() { - var n = h.A; - return n === null ? null : n.getOwner(); + function w() { + var i = G.A; + return i === null ? null : i.getOwner(); } - function ln(n) { - if (j.call(n, "ref")) { - var e = Object.getOwnPropertyDescriptor(n, "ref").get; - if (e && e.isReactWarning) return !1; + function P(i) { + if (Xt.call(i, "ref")) { + var h = Object.getOwnPropertyDescriptor(i, "ref").get; + if (h && h.isReactWarning) return !1; } - return n.ref !== void 0; + return i.ref !== void 0; } - function _n(n) { - if (j.call(n, "key")) { - var e = Object.getOwnPropertyDescriptor(n, "key").get; - if (e && e.isReactWarning) return !1; + function g(i) { + if (Xt.call(i, "key")) { + var h = Object.getOwnPropertyDescriptor(i, "key").get; + if (h && h.isReactWarning) return !1; } - return n.key !== void 0; + return i.key !== void 0; } - function un(n, e) { - function t() { - rn || (rn = !0, o( + function C(i, h) { + function p() { + Rt || (Rt = !0, d( "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", - e + h )); } - t.isReactWarning = !0, Object.defineProperty(n, "key", { - get: t, + p.isReactWarning = !0, Object.defineProperty(i, "key", { + get: p, configurable: !0 }); } - function cn() { - var n = s(this.type); - return on[n] || (on[n] = !0, o( + function O() { + var i = r(this.type); + return U[i] || (U[i] = !0, d( "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release." - )), n = this.props.ref, n !== void 0 ? n : null; - } - function dn(n, e, t, r, c, y, i) { - return t = i.ref, n = { - $$typeof: D, - type: n, - key: e, - props: i, - _owner: y - }, (t !== void 0 ? t : null) !== null ? Object.defineProperty(n, "ref", { + )), i = this.props.ref, i !== void 0 ? i : null; + } + function F(i, h, p, T, k, Tt, m) { + return p = m.ref, i = { + $$typeof: nt, + type: i, + key: h, + props: m, + _owner: Tt + }, (p !== void 0 ? p : null) !== null ? Object.defineProperty(i, "ref", { enumerable: !1, - get: cn - }) : Object.defineProperty(n, "ref", { enumerable: !1, value: null }), n._store = {}, Object.defineProperty(n._store, "validated", { + get: O + }) : Object.defineProperty(i, "ref", { enumerable: !1, value: null }), i._store = {}, Object.defineProperty(i._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: 0 - }), Object.defineProperty(n, "_debugInfo", { + }), Object.defineProperty(i, "_debugInfo", { configurable: !1, enumerable: !1, writable: !0, value: null - }), Object.freeze && (Object.freeze(n.props), Object.freeze(n)), n; - } - function W(n, e, t, r, c, y) { - if (typeof n == "string" || typeof n == "function" || n === C || n === Y || n === K || n === x || n === M || n === fn || typeof n == "object" && n !== null && (n.$$typeof === L || n.$$typeof === S || n.$$typeof === V || n.$$typeof === X || n.$$typeof === N || n.$$typeof === En || n.getModuleId !== void 0)) { - var i = e.children; - if (i !== void 0) - if (r) - if (k(i)) { - for (r = 0; r < i.length; r++) - q(i[r], n); - Object.freeze && Object.freeze(i); + }), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i; + } + function N(i, h, p, T, k, Tt) { + if (typeof i == "string" || typeof i == "function" || i === at || i === At || i === Pt || i === st || i === ft || i === ue || typeof i == "object" && i !== null && (i.$$typeof === pt || i.$$typeof === Nt || i.$$typeof === ot || i.$$typeof === Yt || i.$$typeof === ht || i.$$typeof === $t || i.getModuleId !== void 0)) { + var m = h.children; + if (m !== void 0) + if (T) + if (Wt(m)) { + for (T = 0; T < m.length; T++) + M(m[T], i); + Object.freeze && Object.freeze(m); } else - o( + d( "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead." ); - else q(i, n); + else M(m, i); } else - i = "", (n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (i += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), n === null ? r = "null" : k(n) ? r = "array" : n !== void 0 && n.$$typeof === D ? (r = "<" + (s(n.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : r = typeof n, o( + m = "", (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (m += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), i === null ? T = "null" : Wt(i) ? T = "array" : i !== void 0 && i.$$typeof === nt ? (T = "<" + (r(i.type) || "Unknown") + " />", m = " Did you accidentally export a JSX literal instead of a component?") : T = typeof i, d( "React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", - r, - i + T, + m ); - if (j.call(e, "key")) { - i = s(n); - var a = Object.keys(e).filter(function(_) { - return _ !== "key"; + if (Xt.call(h, "key")) { + m = r(i); + var S = Object.keys(h).filter(function(z) { + return z !== "key"; }); - r = 0 < a.length ? "{key: someKey, " + a.join(": ..., ") + ": ...}" : "{key: someKey}", sn[i + r] || (a = 0 < a.length ? "{" + a.join(": ..., ") + ": ...}" : "{}", o( + T = 0 < S.length ? "{key: someKey, " + S.join(": ..., ") + ": ...}" : "{key: someKey}", Zt[m + T] || (S = 0 < S.length ? "{" + S.join(": ..., ") + ": ...}" : "{}", d( `A props object containing a "key" prop is being spread into JSX: let props = %s; <%s {...props} /> React keys must be passed directly to JSX without using spread: let props = %s; <%s key={someKey} {...props} />`, - r, - i, - a, - i - ), sn[i + r] = !0); + T, + m, + S, + m + ), Zt[m + T] = !0); } - if (i = null, t !== void 0 && (v(t), i = "" + t), _n(e) && (v(e.key), i = "" + e.key), ln(e), "key" in e) { - t = {}; - for (var b in e) - b !== "key" && (t[b] = e[b]); - } else t = e; - return i && (e = typeof n == "function" ? n.displayName || n.name || "Unknown" : n, i && un(t, e)), dn( - n, + if (m = null, p !== void 0 && (u(p), m = "" + p), g(h) && (u(h.key), m = "" + h.key), P(h), "key" in h) { + p = {}; + for (var Z in h) + Z !== "key" && (p[Z] = h[Z]); + } else p = h; + return m && (h = typeof i == "function" ? i.displayName || i.name || "Unknown" : i, m && C(p, h)), F( i, + m, null, - y, - c, - R(), - t + Tt, + k, + w(), + p ); } - function q(n, e) { - if (typeof n == "object" && n && n.$$typeof !== Tn) { - if (k(n)) - for (var t = 0; t < n.length; t++) { - var r = n[t]; - w(r) && H(r, e); + function M(i, h) { + if (typeof i == "object" && i && i.$$typeof !== Jt) { + if (Wt(i)) + for (var p = 0; p < i.length; p++) { + var T = i[p]; + q(T) && H(T, h); } - else if (w(n)) - n._store && (n._store.validated = 1); - else if (n === null || typeof n != "object" ? t = null : (t = $ && n[$] || n["@@iterator"], t = typeof t == "function" ? t : null), typeof t == "function" && t !== n.entries && (t = t.call(n), t !== n)) - for (; !(n = t.next()).done; ) - w(n.value) && H(n.value, e); + else if (q(i)) + i._store && (i._store.validated = 1); + else if (i === null || typeof i != "object" ? p = null : (p = zt && i[zt] || i["@@iterator"], p = typeof p == "function" ? p : null), typeof p == "function" && p !== i.entries && (p = p.call(i), p !== i)) + for (; !(i = p.next()).done; ) + q(i.value) && H(i.value, h); } } - function w(n) { - return typeof n == "object" && n !== null && n.$$typeof === D; - } - function H(n, e) { - if (n._store && !n._store.validated && n.key == null && (n._store.validated = 1, e = pn(e), !an[e])) { - an[e] = !0; - var t = ""; - n && n._owner != null && n._owner !== R() && (t = null, typeof n._owner.tag == "number" ? t = s(n._owner.type) : typeof n._owner.name == "string" && (t = n._owner.name), t = " It was passed a child from " + t + "."); - var r = h.getCurrentStack; - h.getCurrentStack = function() { - var c = A(n.type); - return r && (c += r() || ""), c; - }, o( + function q(i) { + return typeof i == "object" && i !== null && i.$$typeof === nt; + } + function H(i, h) { + if (i._store && !i._store.validated && i.key == null && (i._store.validated = 1, h = it(h), !qt[h])) { + qt[h] = !0; + var p = ""; + i && i._owner != null && i._owner !== w() && (p = null, typeof i._owner.tag == "number" ? p = r(i._owner.type) : typeof i._owner.name == "string" && (p = i._owner.name), p = " It was passed a child from " + p + "."); + var T = G.getCurrentStack; + G.getCurrentStack = function() { + var k = y(i.type); + return T && (k += T() || ""), k; + }, d( 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.', - e, - t - ), h.getCurrentStack = r; + h, + p + ), G.getCurrentStack = T; } } - function pn(n) { - var e = "", t = R(); - return t && (t = s(t.type)) && (e = ` - -Check the render method of \`` + t + "`."), e || (n = s(n)) && (e = ` - -Check the top-level render call using <` + n + ">."), e; - } - var hn = require$$0, D = Symbol.for("react.transitional.element"), mn = Symbol.for("react.portal"), C = Symbol.for("react.fragment"), K = Symbol.for("react.strict_mode"), Y = Symbol.for("react.profiler"), X = Symbol.for("react.consumer"), V = Symbol.for("react.context"), N = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), M = Symbol.for("react.suspense_list"), S = Symbol.for("react.memo"), L = Symbol.for("react.lazy"), fn = Symbol.for("react.offscreen"), $ = Symbol.iterator, h = hn.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, gn = Symbol.for("react.client.reference"), j = Object.prototype.hasOwnProperty, E = Object.assign, En = Symbol.for("react.client.reference"), k = Array.isArray, P = 0, G, J, Z, Q, nn, en, tn; - u.__reactDisabledLog = !0; - var U, z = !1, B = new (typeof WeakMap == "function" ? WeakMap : Map)(), Tn = Symbol.for("react.client.reference"), rn, on = {}, sn = {}, an = {}; - reactJsxRuntime_development.Fragment = C, reactJsxRuntime_development.jsx = function(n, e, t, r, c) { - return W(n, e, t, !1, r, c); - }, reactJsxRuntime_development.jsxs = function(n, e, t, r, c) { - return W(n, e, t, !0, r, c); - }; - }()), reactJsxRuntime_development; -} -process.env.NODE_ENV === "production" ? jsxRuntime.exports = requireReactJsxRuntime_production() : jsxRuntime.exports = requireReactJsxRuntime_development(); -var jsxRuntimeExports = jsxRuntime.exports, __webpack_modules__ = { - /***/ - "./node_modules/hammerjs/hammer.js": ( - /*!*****************************************!*\ - !*** ./node_modules/hammerjs/hammer.js ***! - \*****************************************/ - /***/ - (module, exports, __webpack_require__) => { - eval(`var __WEBPACK_AMD_DEFINE_RESULT__;/*! Hammer.JS - v2.0.7 - 2016-04-22 - * http://hammerjs.github.io/ - * - * Copyright (c) 2016 Jorik Tangelder; - * Licensed under the MIT license */ -(function(window, document, exportName, undefined) { - 'use strict'; - -var VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o']; -var TEST_ELEMENT = document.createElement('div'); - -var TYPE_FUNCTION = 'function'; - -var round = Math.round; -var abs = Math.abs; -var now = Date.now; - -/** - * set a timeout with a given scope - * @param {Function} fn - * @param {Number} timeout - * @param {Object} context - * @returns {number} - */ -function setTimeoutContext(fn, timeout, context) { - return setTimeout(bindFn(fn, context), timeout); -} - -/** - * if the argument is an array, we want to execute the fn on each entry - * if it aint an array we don't want to do a thing. - * this is used by all the methods that accept a single and array argument. - * @param {*|Array} arg - * @param {String} fn - * @param {Object} [context] - * @returns {Boolean} - */ -function invokeArrayArg(arg, fn, context) { - if (Array.isArray(arg)) { - each(arg, context[fn], context); - return true; - } - return false; -} - -/** - * walk objects and arrays - * @param {Object} obj - * @param {Function} iterator - * @param {Object} context - */ -function each(obj, iterator, context) { - var i; + function it(i) { + var h = "", p = w(); + return p && (p = r(p.type)) && (h = ` - if (!obj) { - return; - } +Check the render method of \`` + p + "`."), h || (i = r(i)) && (h = ` - if (obj.forEach) { - obj.forEach(iterator, context); - } else if (obj.length !== undefined) { - i = 0; - while (i < obj.length) { - iterator.call(context, obj[i], i, obj); - i++; - } - } else { - for (i in obj) { - obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj); - } +Check the top-level render call using <` + i + ">."), h; } -} - -/** - * wrap a method with a deprecation warning and stack trace - * @param {Function} method - * @param {String} name - * @param {String} message - * @returns {Function} A new function wrapping the supplied method. - */ -function deprecate(method, name, message) { - var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\\n' + message + ' AT \\n'; - return function() { - var e = new Error('get-stack-trace'); - var stack = e && e.stack ? e.stack.replace(/^[^\\(]+?[\\n$]/gm, '') - .replace(/^\\s+at\\s+/gm, '') - .replace(/^Object.\\s*\\(/gm, '{anonymous}()@') : 'Unknown Stack Trace'; - - var log = window.console && (window.console.warn || window.console.log); - if (log) { - log.call(window.console, deprecationMessage, stack); - } - return method.apply(this, arguments); - }; -} - -/** - * extend object. - * means that properties in dest will be overwritten by the ones in src. - * @param {Object} target - * @param {...Object} objects_to_assign - * @returns {Object} target - */ -var assign; -if (typeof Object.assign !== 'function') { - assign = function assign(target) { - if (target === undefined || target === null) { - throw new TypeError('Cannot convert undefined or null to object'); - } - - var output = Object(target); - for (var index = 1; index < arguments.length; index++) { - var source = arguments[index]; - if (source !== undefined && source !== null) { - for (var nextKey in source) { - if (source.hasOwnProperty(nextKey)) { - output[nextKey] = source[nextKey]; - } - } - } - } - return output; + var j = ri, nt = Symbol.for("react.transitional.element"), rt = Symbol.for("react.portal"), at = Symbol.for("react.fragment"), Pt = Symbol.for("react.strict_mode"), At = Symbol.for("react.profiler"), Yt = Symbol.for("react.consumer"), ot = Symbol.for("react.context"), ht = Symbol.for("react.forward_ref"), st = Symbol.for("react.suspense"), ft = Symbol.for("react.suspense_list"), Nt = Symbol.for("react.memo"), pt = Symbol.for("react.lazy"), ue = Symbol.for("react.offscreen"), zt = Symbol.iterator, G = j.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ce = Symbol.for("react.client.reference"), Xt = Object.prototype.hasOwnProperty, B = Object.assign, $t = Symbol.for("react.client.reference"), Wt = Array.isArray, I = 0, _, Y, xt, dt, vt, gt, mt; + c.__reactDisabledLog = !0; + var V, J = !1, It = new (typeof WeakMap == "function" ? WeakMap : Map)(), Jt = Symbol.for("react.client.reference"), Rt, U = {}, Zt = {}, qt = {}; + Bt.Fragment = at, Bt.jsx = function(i, h, p, T, k) { + return N(i, h, p, !1, T, k); + }, Bt.jsxs = function(i, h, p, T, k) { + return N(i, h, p, !0, T, k); }; -} else { - assign = Object.assign; -} - -/** - * extend object. - * means that properties in dest will be overwritten by the ones in src. - * @param {Object} dest - * @param {Object} src - * @param {Boolean} [merge=false] - * @returns {Object} dest - */ -var extend = deprecate(function extend(dest, src, merge) { - var keys = Object.keys(src); - var i = 0; - while (i < keys.length) { - if (!merge || (merge && dest[keys[i]] === undefined)) { - dest[keys[i]] = src[keys[i]]; - } - i++; + }()), Bt; +} +process.env.NODE_ENV === "production" ? Ee.exports = ai() : Ee.exports = ui(); +var ze = Ee.exports; +var ci = { 168: (d, r, s) => { + var u; + (function(c, v, f, l) { + var E, y = ["", "webkit", "Moz", "MS", "ms", "o"], w = v.createElement("div"), P = "function", g = Math.round, C = Math.abs, O = Date.now; + function F(t, e, n) { + return setTimeout(nt(t, n), e); + } + function N(t, e, n) { + return !!Array.isArray(t) && (M(t, n[e], n), !0); + } + function M(t, e, n) { + var o; + if (t) if (t.forEach) t.forEach(e, n); + else if (t.length !== l) for (o = 0; o < t.length; ) e.call(n, t[o], o, t), o++; + else for (o in t) t.hasOwnProperty(o) && e.call(n, t[o], o, t); + } + function q(t, e, n) { + var o = "DEPRECATED METHOD: " + e + ` +` + n + ` AT +`; + return function() { + var a = new Error("get-stack-trace"), b = a && a.stack ? a.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace", R = c.console && (c.console.warn || c.console.log); + return R && R.call(c.console, o, b), t.apply(this, arguments); + }; } - return dest; -}, 'extend', 'Use \`assign\`.'); - -/** - * merge the values from src in the dest. - * means that properties that exist in dest will not be overwritten by src - * @param {Object} dest - * @param {Object} src - * @returns {Object} dest - */ -var merge = deprecate(function merge(dest, src) { - return extend(dest, src, true); -}, 'merge', 'Use \`assign\`.'); - -/** - * simple class inheritance - * @param {Function} child - * @param {Function} base - * @param {Object} [properties] - */ -function inherit(child, base, properties) { - var baseP = base.prototype, - childP; - - childP = child.prototype = Object.create(baseP); - childP.constructor = child; - childP._super = baseP; - - if (properties) { - assign(childP, properties); + E = typeof Object.assign != "function" ? function(t) { + if (t === l || t === null) throw new TypeError("Cannot convert undefined or null to object"); + for (var e = Object(t), n = 1; n < arguments.length; n++) { + var o = arguments[n]; + if (o !== l && o !== null) for (var a in o) o.hasOwnProperty(a) && (e[a] = o[a]); + } + return e; + } : Object.assign; + var H = q(function(t, e, n) { + for (var o = Object.keys(e), a = 0; a < o.length; ) (!n || n && t[o[a]] === l) && (t[o[a]] = e[o[a]]), a++; + return t; + }, "extend", "Use `assign`."), it = q(function(t, e) { + return H(t, e, !0); + }, "merge", "Use `assign`."); + function j(t, e, n) { + var o, a = e.prototype; + (o = t.prototype = Object.create(a)).constructor = t, o._super = a, n && E(o, n); + } + function nt(t, e) { + return function() { + return t.apply(e, arguments); + }; } -} - -/** - * simple function bind - * @param {Function} fn - * @param {Object} context - * @returns {Function} - */ -function bindFn(fn, context) { - return function boundFn() { - return fn.apply(context, arguments); - }; -} - -/** - * let a boolean value also be a function that must return a boolean - * this first item in args will be used as the context - * @param {Boolean|Function} val - * @param {Array} [args] - * @returns {Boolean} - */ -function boolOrFn(val, args) { - if (typeof val == TYPE_FUNCTION) { - return val.apply(args ? args[0] || undefined : undefined, args); + function rt(t, e) { + return typeof t == P ? t.apply(e && e[0] || l, e) : t; } - return val; -} - -/** - * use the val2 when val1 is undefined - * @param {*} val1 - * @param {*} val2 - * @returns {*} - */ -function ifUndefined(val1, val2) { - return (val1 === undefined) ? val2 : val1; -} - -/** - * addEventListener with multiple events at once - * @param {EventTarget} target - * @param {String} types - * @param {Function} handler - */ -function addEventListeners(target, types, handler) { - each(splitStr(types), function(type) { - target.addEventListener(type, handler, false); - }); -} - -/** - * removeEventListener with multiple events at once - * @param {EventTarget} target - * @param {String} types - * @param {Function} handler - */ -function removeEventListeners(target, types, handler) { - each(splitStr(types), function(type) { - target.removeEventListener(type, handler, false); - }); -} - -/** - * find if a node is in the given parent - * @method hasParent - * @param {HTMLElement} node - * @param {HTMLElement} parent - * @return {Boolean} found - */ -function hasParent(node, parent) { - while (node) { - if (node == parent) { - return true; - } - node = node.parentNode; + function at(t, e) { + return t === l ? e : t; } - return false; -} - -/** - * small indexOf wrapper - * @param {String} str - * @param {String} find - * @returns {Boolean} found - */ -function inStr(str, find) { - return str.indexOf(find) > -1; -} - -/** - * split string on whitespace - * @param {String} str - * @returns {Array} words - */ -function splitStr(str) { - return str.trim().split(/\\s+/g); -} - -/** - * find if a array contains the object using indexOf or a simple polyFill - * @param {Array} src - * @param {String} find - * @param {String} [findByKey] - * @return {Boolean|Number} false when not found, or the index - */ -function inArray(src, find, findByKey) { - if (src.indexOf && !findByKey) { - return src.indexOf(find); - } else { - var i = 0; - while (i < src.length) { - if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) { - return i; - } - i++; - } - return -1; + function Pt(t, e, n) { + M(ht(e), function(o) { + t.addEventListener(o, n, !1); + }); } -} - -/** - * convert array-like objects to real arrays - * @param {Object} obj - * @returns {Array} - */ -function toArray(obj) { - return Array.prototype.slice.call(obj, 0); -} - -/** - * unique array with objects based on a key (like 'id') or just by the array's value - * @param {Array} src [{id:1},{id:2},{id:1}] - * @param {String} [key] - * @param {Boolean} [sort=False] - * @returns {Array} [{id:1},{id:2}] - */ -function uniqueArray(src, key, sort) { - var results = []; - var values = []; - var i = 0; - - while (i < src.length) { - var val = key ? src[i][key] : src[i]; - if (inArray(values, val) < 0) { - results.push(src[i]); - } - values[i] = val; - i++; + function At(t, e, n) { + M(ht(e), function(o) { + t.removeEventListener(o, n, !1); + }); } - - if (sort) { - if (!key) { - results = results.sort(); - } else { - results = results.sort(function sortUniqueArray(a, b) { - return a[key] > b[key]; - }); - } + function Yt(t, e) { + for (; t; ) { + if (t == e) return !0; + t = t.parentNode; + } + return !1; } - - return results; -} - -/** - * get the prefixed property - * @param {Object} obj - * @param {String} property - * @returns {String|Undefined} prefixed - */ -function prefixed(obj, property) { - var prefix, prop; - var camelProp = property[0].toUpperCase() + property.slice(1); - - var i = 0; - while (i < VENDOR_PREFIXES.length) { - prefix = VENDOR_PREFIXES[i]; - prop = (prefix) ? prefix + camelProp : property; - - if (prop in obj) { - return prop; - } - i++; + function ot(t, e) { + return t.indexOf(e) > -1; } - return undefined; -} - -/** - * get a unique id - * @returns {number} uniqueId - */ -var _uniqueId = 1; -function uniqueId() { - return _uniqueId++; -} - -/** - * get the window object of an element - * @param {HTMLElement} element - * @returns {DocumentView|Window} - */ -function getWindowForElement(element) { - var doc = element.ownerDocument || element; - return (doc.defaultView || doc.parentWindow || window); -} - -var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i; - -var SUPPORT_TOUCH = ('ontouchstart' in window); -var SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined; -var SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent); - -var INPUT_TYPE_TOUCH = 'touch'; -var INPUT_TYPE_PEN = 'pen'; -var INPUT_TYPE_MOUSE = 'mouse'; -var INPUT_TYPE_KINECT = 'kinect'; - -var COMPUTE_INTERVAL = 25; - -var INPUT_START = 1; -var INPUT_MOVE = 2; -var INPUT_END = 4; -var INPUT_CANCEL = 8; - -var DIRECTION_NONE = 1; -var DIRECTION_LEFT = 2; -var DIRECTION_RIGHT = 4; -var DIRECTION_UP = 8; -var DIRECTION_DOWN = 16; - -var DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT; -var DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN; -var DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL; - -var PROPS_XY = ['x', 'y']; -var PROPS_CLIENT_XY = ['clientX', 'clientY']; - -/** - * create new input type manager - * @param {Manager} manager - * @param {Function} callback - * @returns {Input} - * @constructor - */ -function Input(manager, callback) { - var self = this; - this.manager = manager; - this.callback = callback; - this.element = manager.element; - this.target = manager.options.inputTarget; - - // smaller wrapper around the handler, for the scope and the enabled state of the manager, - // so when disabled the input events are completely bypassed. - this.domHandler = function(ev) { - if (boolOrFn(manager.options.enable, [manager])) { - self.handler(ev); - } - }; - - this.init(); - -} - -Input.prototype = { - /** - * should handle the inputEvent data and trigger the callback - * @virtual - */ - handler: function() { }, - - /** - * bind the events - */ - init: function() { - this.evEl && addEventListeners(this.element, this.evEl, this.domHandler); - this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler); - this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); - }, - - /** - * unbind the events - */ - destroy: function() { - this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler); - this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler); - this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); + function ht(t) { + return t.trim().split(/\s+/g); } -}; - -/** - * create new input type manager - * called by the Manager constructor - * @param {Hammer} manager - * @returns {Input} - */ -function createInputInstance(manager) { - var Type; - var inputClass = manager.options.inputClass; - - if (inputClass) { - Type = inputClass; - } else if (SUPPORT_POINTER_EVENTS) { - Type = PointerEventInput; - } else if (SUPPORT_ONLY_TOUCH) { - Type = TouchInput; - } else if (!SUPPORT_TOUCH) { - Type = MouseInput; - } else { - Type = TouchMouseInput; + function st(t, e, n) { + if (t.indexOf && !n) return t.indexOf(e); + for (var o = 0; o < t.length; ) { + if (n && t[o][n] == e || !n && t[o] === e) return o; + o++; + } + return -1; } - return new (Type)(manager, inputHandler); -} - -/** - * handle input events - * @param {Manager} manager - * @param {String} eventType - * @param {Object} input - */ -function inputHandler(manager, eventType, input) { - var pointersLen = input.pointers.length; - var changedPointersLen = input.changedPointers.length; - var isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0)); - var isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0)); - - input.isFirst = !!isFirst; - input.isFinal = !!isFinal; - - if (isFirst) { - manager.session = {}; + function ft(t) { + return Array.prototype.slice.call(t, 0); } - - // source event is the normalized value of the domEvents - // like 'touchstart, mouseup, pointerdown' - input.eventType = eventType; - - // compute scale, rotation etc - computeInputData(manager, input); - - // emit secret event - manager.emit('hammer.input', input); - - manager.recognize(input); - manager.session.prevInput = input; -} - -/** - * extend the data with some usable properties like scale, rotate, velocity etc - * @param {Object} manager - * @param {Object} input - */ -function computeInputData(manager, input) { - var session = manager.session; - var pointers = input.pointers; - var pointersLength = pointers.length; - - // store the first input to calculate the distance and direction - if (!session.firstInput) { - session.firstInput = simpleCloneInputData(input); + function Nt(t, e, n) { + for (var o = [], a = [], b = 0; b < t.length; ) { + var R = t[b][e]; + st(a, R) < 0 && o.push(t[b]), a[b] = R, b++; + } + return o = o.sort(function(X, A) { + return X[e] > A[e]; + }), o; + } + function pt(t, e) { + for (var n, o, a = e[0].toUpperCase() + e.slice(1), b = 0; b < y.length; ) { + if ((o = (n = y[b]) ? n + a : e) in t) return o; + b++; + } + return l; + } + var ue = 1; + function zt(t) { + var e = t.ownerDocument || t; + return e.defaultView || e.parentWindow || c; + } + var G = "ontouchstart" in c, ce = pt(c, "PointerEvent") !== l, Xt = G && /mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent), B = "touch", $t = "mouse", Wt = 25, I = 1, _ = 4, Y = 8, xt = 1, dt = 2, vt = 4, gt = 8, mt = 16, V = dt | vt, J = gt | mt, It = V | J, Jt = ["x", "y"], Rt = ["clientX", "clientY"]; + function U(t, e) { + var n = this; + this.manager = t, this.callback = e, this.element = t.element, this.target = t.options.inputTarget, this.domHandler = function(o) { + rt(t.options.enable, [t]) && n.handler(o); + }, this.init(); + } + function Zt(t, e, n) { + var o = n.pointers.length, a = n.changedPointers.length, b = e & I && o - a == 0, R = e & (_ | Y) && o - a == 0; + n.isFirst = !!b, n.isFinal = !!R, b && (t.session = {}), n.eventType = e, function(X, A) { + var $ = X.session, re = A.pointers, _e = re.length; + $.firstInput || ($.firstInput = qt(A)), _e > 1 && !$.firstMultiple ? $.firstMultiple = qt(A) : _e === 1 && ($.firstMultiple = !1); + var Oe = $.firstInput, Ft = $.firstMultiple, Ne = Ft ? Ft.center : Oe.center, Ie = A.center = i(re); + A.timeStamp = O(), A.deltaTime = A.timeStamp - Oe.timeStamp, A.angle = k(Ne, Ie), A.distance = T(Ne, Ie), function(et, L) { + var bt = L.center, Dt = et.offsetDelta || {}, _t = et.prevDelta || {}, Ot = et.prevInput || {}; + L.eventType !== I && Ot.eventType !== _ || (_t = et.prevDelta = { x: Ot.deltaX || 0, y: Ot.deltaY || 0 }, Dt = et.offsetDelta = { x: bt.x, y: bt.y }), L.deltaX = _t.x + (bt.x - Dt.x), L.deltaY = _t.y + (bt.y - Dt.y); + }($, A), A.offsetDirection = p(A.deltaX, A.deltaY); + var Te, Fe, Mt = h(A.deltaTime, A.deltaX, A.deltaY); + A.overallVelocityX = Mt.x, A.overallVelocityY = Mt.y, A.overallVelocity = C(Mt.x) > C(Mt.y) ? Mt.x : Mt.y, A.scale = Ft ? (Te = Ft.pointers, T((Fe = re)[0], Fe[1], Rt) / T(Te[0], Te[1], Rt)) : 1, A.rotation = Ft ? function(et, L) { + return k(L[1], L[0], Rt) + k(et[1], et[0], Rt); + }(Ft.pointers, re) : 0, A.maxPointers = $.prevInput ? A.pointers.length > $.prevInput.maxPointers ? A.pointers.length : $.prevInput.maxPointers : A.pointers.length, function(et, L) { + var bt, Dt, _t, Ot, wt = et.lastInterval || L, Me = L.timeStamp - wt.timeStamp; + if (L.eventType != Y && (Me > Wt || wt.velocity === l)) { + var ke = L.deltaX - wt.deltaX, Le = L.deltaY - wt.deltaY, kt = h(Me, ke, Le); + Dt = kt.x, _t = kt.y, bt = C(kt.x) > C(kt.y) ? kt.x : kt.y, Ot = p(ke, Le), et.lastInterval = L; + } else bt = wt.velocity, Dt = wt.velocityX, _t = wt.velocityY, Ot = wt.direction; + L.velocity = bt, L.velocityX = Dt, L.velocityY = _t, L.direction = Ot; + }($, A); + var ye = X.element; + Yt(A.srcEvent.target, ye) && (ye = A.srcEvent.target), A.target = ye; + }(t, n), t.emit("hammer.input", n), t.recognize(n), t.session.prevInput = n; + } + function qt(t) { + for (var e = [], n = 0; n < t.pointers.length; ) e[n] = { clientX: g(t.pointers[n].clientX), clientY: g(t.pointers[n].clientY) }, n++; + return { timeStamp: O(), pointers: e, center: i(e), deltaX: t.deltaX, deltaY: t.deltaY }; + } + function i(t) { + var e = t.length; + if (e === 1) return { x: g(t[0].clientX), y: g(t[0].clientY) }; + for (var n = 0, o = 0, a = 0; a < e; ) n += t[a].clientX, o += t[a].clientY, a++; + return { x: g(n / e), y: g(o / e) }; + } + function h(t, e, n) { + return { x: e / t || 0, y: n / t || 0 }; + } + function p(t, e) { + return t === e ? xt : C(t) >= C(e) ? t < 0 ? dt : vt : e < 0 ? gt : mt; + } + function T(t, e, n) { + n || (n = Jt); + var o = e[n[0]] - t[n[0]], a = e[n[1]] - t[n[1]]; + return Math.sqrt(o * o + a * a); + } + function k(t, e, n) { + n || (n = Jt); + var o = e[n[0]] - t[n[0]], a = e[n[1]] - t[n[1]]; + return 180 * Math.atan2(a, o) / Math.PI; + } + U.prototype = { handler: function() { + }, init: function() { + this.evEl && Pt(this.element, this.evEl, this.domHandler), this.evTarget && Pt(this.target, this.evTarget, this.domHandler), this.evWin && Pt(zt(this.element), this.evWin, this.domHandler); + }, destroy: function() { + this.evEl && At(this.element, this.evEl, this.domHandler), this.evTarget && At(this.target, this.evTarget, this.domHandler), this.evWin && At(zt(this.element), this.evWin, this.domHandler); + } }; + var Tt = { mousedown: I, mousemove: 2, mouseup: _ }, m = "mousedown", S = "mousemove mouseup"; + function Z() { + this.evEl = m, this.evWin = S, this.pressed = !1, U.apply(this, arguments); + } + j(Z, U, { handler: function(t) { + var e = Tt[t.type]; + e & I && t.button === 0 && (this.pressed = !0), 2 & e && t.which !== 1 && (e = _), this.pressed && (e & _ && (this.pressed = !1), this.callback(this.manager, e, { pointers: [t], changedPointers: [t], pointerType: $t, srcEvent: t })); + } }); + var z = { pointerdown: I, pointermove: 2, pointerup: _, pointercancel: Y, pointerout: Y }, ut = { 2: B, 3: "pen", 4: $t, 5: "kinect" }, yt = "pointerdown", Q = "pointermove pointerup pointercancel"; + function Et() { + this.evEl = yt, this.evWin = Q, U.apply(this, arguments), this.store = this.manager.session.pointerEvents = []; + } + c.MSPointerEvent && !c.PointerEvent && (yt = "MSPointerDown", Q = "MSPointerMove MSPointerUp MSPointerCancel"), j(Et, U, { handler: function(t) { + var e = this.store, n = !1, o = t.type.toLowerCase().replace("ms", ""), a = z[o], b = ut[t.pointerType] || t.pointerType, R = b == B, X = st(e, t.pointerId, "pointerId"); + a & I && (t.button === 0 || R) ? X < 0 && (e.push(t), X = e.length - 1) : a & (_ | Y) && (n = !0), X < 0 || (e[X] = t, this.callback(this.manager, a, { pointers: e, changedPointers: [t], pointerType: b, srcEvent: t }), n && e.splice(X, 1)); + } }); + var K = { touchstart: I, touchmove: 2, touchend: _, touchcancel: Y }; + function be() { + this.evTarget = "touchstart", this.evWin = "touchstart touchmove touchend touchcancel", this.started = !1, U.apply(this, arguments); + } + function Ge(t, e) { + var n = ft(t.touches), o = ft(t.changedTouches); + return e & (_ | Y) && (n = Nt(n.concat(o), "identifier")), [n, o]; + } + j(be, U, { handler: function(t) { + var e = K[t.type]; + if (e === I && (this.started = !0), this.started) { + var n = Ge.call(this, t, e); + e & (_ | Y) && n[0].length - n[1].length == 0 && (this.started = !1), this.callback(this.manager, e, { pointers: n[0], changedPointers: n[1], pointerType: B, srcEvent: t }); + } + } }); + var Je = { touchstart: I, touchmove: 2, touchend: _, touchcancel: Y }, Ze = "touchstart touchmove touchend touchcancel"; + function Qt() { + this.evTarget = Ze, this.targetIds = {}, U.apply(this, arguments); + } + function Qe(t, e) { + var n = ft(t.touches), o = this.targetIds; + if (e & (2 | I) && n.length === 1) return o[n[0].identifier] = !0, [n, n]; + var a, b, R = ft(t.changedTouches), X = [], A = this.target; + if (b = n.filter(function($) { + return Yt($.target, A); + }), e === I) for (a = 0; a < b.length; ) o[b[a].identifier] = !0, a++; + for (a = 0; a < R.length; ) o[R[a].identifier] && X.push(R[a]), e & (_ | Y) && delete o[R[a].identifier], a++; + return X.length ? [Nt(b.concat(X), "identifier"), X] : void 0; + } + j(Qt, U, { handler: function(t) { + var e = Je[t.type], n = Qe.call(this, t, e); + n && this.callback(this.manager, e, { pointers: n[0], changedPointers: n[1], pointerType: B, srcEvent: t }); + } }); + var Ke = 2500; + function le() { + U.apply(this, arguments); + var t = nt(this.handler, this); + this.touch = new Qt(this.manager, t), this.mouse = new Z(this.manager, t), this.primaryTouch = null, this.lastTouches = []; + } + function ti(t, e) { + t & I ? (this.primaryTouch = e.changedPointers[0].identifier, we.call(this, e)) : t & (_ | Y) && we.call(this, e); + } + function we(t) { + var e = t.changedPointers[0]; + if (e.identifier === this.primaryTouch) { + var n = { x: e.clientX, y: e.clientY }; + this.lastTouches.push(n); + var o = this.lastTouches; + setTimeout(function() { + var a = o.indexOf(n); + a > -1 && o.splice(a, 1); + }, Ke); + } } - - // to compute scale and rotation we need to store the multiple touches - if (pointersLength > 1 && !session.firstMultiple) { - session.firstMultiple = simpleCloneInputData(input); - } else if (pointersLength === 1) { - session.firstMultiple = false; + function ei(t) { + for (var e = t.srcEvent.clientX, n = t.srcEvent.clientY, o = 0; o < this.lastTouches.length; o++) { + var a = this.lastTouches[o], b = Math.abs(e - a.x), R = Math.abs(n - a.y); + if (b <= 25 && R <= 25) return !0; + } + return !1; + } + j(le, U, { handler: function(t, e, n) { + var o = n.pointerType == B, a = n.pointerType == $t; + if (!(a && n.sourceCapabilities && n.sourceCapabilities.firesTouchEvents)) { + if (o) ti.call(this, e, n); + else if (a && ei.call(this, n)) return; + this.callback(t, e, n); + } + }, destroy: function() { + this.touch.destroy(), this.mouse.destroy(); + } }); + var Pe = pt(w.style, "touchAction"), Ae = Pe !== l, xe = "compute", Re = "auto", he = "manipulation", Ct = "none", Ut = "pan-x", Vt = "pan-y", Kt = function() { + if (!Ae) return !1; + var t = {}, e = c.CSS && c.CSS.supports; + return ["auto", "manipulation", "pan-y", "pan-x", "pan-x pan-y", "none"].forEach(function(n) { + t[n] = !e || c.CSS.supports("touch-action", n); + }), t; + }(); + function fe(t, e) { + this.manager = t, this.set(e); + } + fe.prototype = { set: function(t) { + t == xe && (t = this.compute()), Ae && this.manager.element.style && Kt[t] && (this.manager.element.style[Pe] = t), this.actions = t.toLowerCase().trim(); + }, update: function() { + this.set(this.manager.options.touchAction); + }, compute: function() { + var t = []; + return M(this.manager.recognizers, function(e) { + rt(e.options.enable, [e]) && (t = t.concat(e.getTouchAction())); + }), function(e) { + if (ot(e, Ct)) return Ct; + var n = ot(e, Ut), o = ot(e, Vt); + return n && o ? Ct : n || o ? n ? Ut : Vt : ot(e, he) ? he : Re; + }(t.join(" ")); + }, preventDefaults: function(t) { + var e = t.srcEvent, n = t.offsetDirection; + if (this.manager.session.prevented) e.preventDefault(); + else { + var o = this.actions, a = ot(o, Ct) && !Kt[Ct], b = ot(o, Vt) && !Kt[Vt], R = ot(o, Ut) && !Kt[Ut]; + if (a) { + var X = t.pointers.length === 1, A = t.distance < 2, $ = t.deltaTime < 250; + if (X && A && $) return; + } + if (!R || !b) return a || b && n & V || R && n & J ? this.preventSrc(e) : void 0; + } + }, preventSrc: function(t) { + this.manager.session.prevented = !0, t.preventDefault(); + } }; + var te = 1, ct = 32; + function lt(t) { + this.options = E({}, this.defaults, t || {}), this.id = ue++, this.manager = null, this.options.enable = at(this.options.enable, !0), this.state = te, this.simultaneous = {}, this.requireFail = []; + } + function Ce(t) { + return 16 & t ? "cancel" : 8 & t ? "end" : 4 & t ? "move" : 2 & t ? "start" : ""; + } + function Se(t) { + return t == mt ? "down" : t == gt ? "up" : t == dt ? "left" : t == vt ? "right" : ""; + } + function ee(t, e) { + var n = e.manager; + return n ? n.get(t) : t; + } + function tt() { + lt.apply(this, arguments); + } + function ie() { + tt.apply(this, arguments), this.pX = null, this.pY = null; + } + function pe() { + tt.apply(this, arguments); + } + function de() { + lt.apply(this, arguments), this._timer = null, this._input = null; + } + function ve() { + tt.apply(this, arguments); + } + function ge() { + tt.apply(this, arguments); + } + function ne() { + lt.apply(this, arguments), this.pTime = !1, this.pCenter = !1, this._timer = null, this._input = null, this.count = 0; + } + function St(t, e) { + return (e = e || {}).recognizers = at(e.recognizers, St.defaults.preset), new me(t, e); + } + function me(t, e) { + this.options = E({}, St.defaults, e || {}), this.options.inputTarget = this.options.inputTarget || t, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = t, this.input = new (this.options.inputClass || (ce ? Et : Xt ? Qt : G ? le : Z))(this, Zt), this.touchAction = new fe(this, this.options.touchAction), De(this, !0), M(this.options.recognizers, function(n) { + var o = this.add(new n[0](n[1])); + n[2] && o.recognizeWith(n[2]), n[3] && o.requireFailure(n[3]); + }, this); + } + function De(t, e) { + var n, o = t.element; + o.style && (M(t.options.cssProps, function(a, b) { + n = pt(o.style, b), e ? (t.oldCssProps[n] = o.style[n], o.style[n] = a) : o.style[n] = t.oldCssProps[n] || ""; + }), e || (t.oldCssProps = {})); + } + lt.prototype = { defaults: {}, set: function(t) { + return E(this.options, t), this.manager && this.manager.touchAction.update(), this; + }, recognizeWith: function(t) { + if (N(t, "recognizeWith", this)) return this; + var e = this.simultaneous; + return e[(t = ee(t, this)).id] || (e[t.id] = t, t.recognizeWith(this)), this; + }, dropRecognizeWith: function(t) { + return N(t, "dropRecognizeWith", this) || (t = ee(t, this), delete this.simultaneous[t.id]), this; + }, requireFailure: function(t) { + if (N(t, "requireFailure", this)) return this; + var e = this.requireFail; + return st(e, t = ee(t, this)) === -1 && (e.push(t), t.requireFailure(this)), this; + }, dropRequireFailure: function(t) { + if (N(t, "dropRequireFailure", this)) return this; + t = ee(t, this); + var e = st(this.requireFail, t); + return e > -1 && this.requireFail.splice(e, 1), this; + }, hasRequireFailures: function() { + return this.requireFail.length > 0; + }, canRecognizeWith: function(t) { + return !!this.simultaneous[t.id]; + }, emit: function(t) { + var e = this, n = this.state; + function o(a) { + e.manager.emit(a, t); + } + n < 8 && o(e.options.event + Ce(n)), o(e.options.event), t.additionalEvent && o(t.additionalEvent), n >= 8 && o(e.options.event + Ce(n)); + }, tryEmit: function(t) { + if (this.canEmit()) return this.emit(t); + this.state = ct; + }, canEmit: function() { + for (var t = 0; t < this.requireFail.length; ) { + if (!(this.requireFail[t].state & (ct | te))) return !1; + t++; + } + return !0; + }, recognize: function(t) { + var e = E({}, t); + if (!rt(this.options.enable, [this, e])) return this.reset(), void (this.state = ct); + 56 & this.state && (this.state = te), this.state = this.process(e), 30 & this.state && this.tryEmit(e); + }, process: function(t) { + }, getTouchAction: function() { + }, reset: function() { + } }, j(tt, lt, { defaults: { pointers: 1 }, attrTest: function(t) { + var e = this.options.pointers; + return e === 0 || t.pointers.length === e; + }, process: function(t) { + var e = this.state, n = t.eventType, o = 6 & e, a = this.attrTest(t); + return o && (n & Y || !a) ? 16 | e : o || a ? n & _ ? 8 | e : 2 & e ? 4 | e : 2 : ct; + } }), j(ie, tt, { defaults: { event: "pan", threshold: 10, pointers: 1, direction: It }, getTouchAction: function() { + var t = this.options.direction, e = []; + return t & V && e.push(Vt), t & J && e.push(Ut), e; + }, directionTest: function(t) { + var e = this.options, n = !0, o = t.distance, a = t.direction, b = t.deltaX, R = t.deltaY; + return a & e.direction || (e.direction & V ? (a = b === 0 ? xt : b < 0 ? dt : vt, n = b != this.pX, o = Math.abs(t.deltaX)) : (a = R === 0 ? xt : R < 0 ? gt : mt, n = R != this.pY, o = Math.abs(t.deltaY))), t.direction = a, n && o > e.threshold && a & e.direction; + }, attrTest: function(t) { + return tt.prototype.attrTest.call(this, t) && (2 & this.state || !(2 & this.state) && this.directionTest(t)); + }, emit: function(t) { + this.pX = t.deltaX, this.pY = t.deltaY; + var e = Se(t.direction); + e && (t.additionalEvent = this.options.event + e), this._super.emit.call(this, t); + } }), j(pe, tt, { defaults: { event: "pinch", threshold: 0, pointers: 2 }, getTouchAction: function() { + return [Ct]; + }, attrTest: function(t) { + return this._super.attrTest.call(this, t) && (Math.abs(t.scale - 1) > this.options.threshold || 2 & this.state); + }, emit: function(t) { + if (t.scale !== 1) { + var e = t.scale < 1 ? "in" : "out"; + t.additionalEvent = this.options.event + e; + } + this._super.emit.call(this, t); + } }), j(de, lt, { defaults: { event: "press", pointers: 1, time: 251, threshold: 9 }, getTouchAction: function() { + return [Re]; + }, process: function(t) { + var e = this.options, n = t.pointers.length === e.pointers, o = t.distance < e.threshold, a = t.deltaTime > e.time; + if (this._input = t, !o || !n || t.eventType & (_ | Y) && !a) this.reset(); + else if (t.eventType & I) this.reset(), this._timer = F(function() { + this.state = 8, this.tryEmit(); + }, e.time, this); + else if (t.eventType & _) return 8; + return ct; + }, reset: function() { + clearTimeout(this._timer); + }, emit: function(t) { + this.state === 8 && (t && t.eventType & _ ? this.manager.emit(this.options.event + "up", t) : (this._input.timeStamp = O(), this.manager.emit(this.options.event, this._input))); + } }), j(ve, tt, { defaults: { event: "rotate", threshold: 0, pointers: 2 }, getTouchAction: function() { + return [Ct]; + }, attrTest: function(t) { + return this._super.attrTest.call(this, t) && (Math.abs(t.rotation) > this.options.threshold || 2 & this.state); + } }), j(ge, tt, { defaults: { event: "swipe", threshold: 10, velocity: 0.3, direction: V | J, pointers: 1 }, getTouchAction: function() { + return ie.prototype.getTouchAction.call(this); + }, attrTest: function(t) { + var e, n = this.options.direction; + return n & (V | J) ? e = t.overallVelocity : n & V ? e = t.overallVelocityX : n & J && (e = t.overallVelocityY), this._super.attrTest.call(this, t) && n & t.offsetDirection && t.distance > this.options.threshold && t.maxPointers == this.options.pointers && C(e) > this.options.velocity && t.eventType & _; + }, emit: function(t) { + var e = Se(t.offsetDirection); + e && this.manager.emit(this.options.event + e, t), this.manager.emit(this.options.event, t); + } }), j(ne, lt, { defaults: { event: "tap", pointers: 1, taps: 1, interval: 300, time: 250, threshold: 9, posThreshold: 10 }, getTouchAction: function() { + return [he]; + }, process: function(t) { + var e = this.options, n = t.pointers.length === e.pointers, o = t.distance < e.threshold, a = t.deltaTime < e.time; + if (this.reset(), t.eventType & I && this.count === 0) return this.failTimeout(); + if (o && a && n) { + if (t.eventType != _) return this.failTimeout(); + var b = !this.pTime || t.timeStamp - this.pTime < e.interval, R = !this.pCenter || T(this.pCenter, t.center) < e.posThreshold; + if (this.pTime = t.timeStamp, this.pCenter = t.center, R && b ? this.count += 1 : this.count = 1, this._input = t, this.count % e.taps == 0) return this.hasRequireFailures() ? (this._timer = F(function() { + this.state = 8, this.tryEmit(); + }, e.interval, this), 2) : 8; + } + return ct; + }, failTimeout: function() { + return this._timer = F(function() { + this.state = ct; + }, this.options.interval, this), ct; + }, reset: function() { + clearTimeout(this._timer); + }, emit: function() { + this.state == 8 && (this._input.tapCount = this.count, this.manager.emit(this.options.event, this._input)); + } }), St.VERSION = "2.0.7", St.defaults = { domEvents: !1, touchAction: xe, enable: !0, inputTarget: null, inputClass: null, preset: [[ve, { enable: !1 }], [pe, { enable: !1 }, ["rotate"]], [ge, { direction: V }], [ie, { direction: V }, ["swipe"]], [ne], [ne, { event: "doubletap", taps: 2 }, ["tap"]], [de]], cssProps: { userSelect: "none", touchSelect: "none", touchCallout: "none", contentZooming: "none", userDrag: "none", tapHighlightColor: "rgba(0,0,0,0)" } }, me.prototype = { set: function(t) { + return E(this.options, t), t.touchAction && this.touchAction.update(), t.inputTarget && (this.input.destroy(), this.input.target = t.inputTarget, this.input.init()), this; + }, stop: function(t) { + this.session.stopped = t ? 2 : 1; + }, recognize: function(t) { + var e = this.session; + if (!e.stopped) { + var n; + this.touchAction.preventDefaults(t); + var o = this.recognizers, a = e.curRecognizer; + (!a || a && 8 & a.state) && (a = e.curRecognizer = null); + for (var b = 0; b < o.length; ) n = o[b], e.stopped === 2 || a && n != a && !n.canRecognizeWith(a) ? n.reset() : n.recognize(t), !a && 14 & n.state && (a = e.curRecognizer = n), b++; + } + }, get: function(t) { + if (t instanceof lt) return t; + for (var e = this.recognizers, n = 0; n < e.length; n++) if (e[n].options.event == t) return e[n]; + return null; + }, add: function(t) { + if (N(t, "add", this)) return this; + var e = this.get(t.options.event); + return e && this.remove(e), this.recognizers.push(t), t.manager = this, this.touchAction.update(), t; + }, remove: function(t) { + if (N(t, "remove", this)) return this; + if (t = this.get(t)) { + var e = this.recognizers, n = st(e, t); + n !== -1 && (e.splice(n, 1), this.touchAction.update()); + } + return this; + }, on: function(t, e) { + if (t !== l && e !== l) { + var n = this.handlers; + return M(ht(t), function(o) { + n[o] = n[o] || [], n[o].push(e); + }), this; + } + }, off: function(t, e) { + if (t !== l) { + var n = this.handlers; + return M(ht(t), function(o) { + e ? n[o] && n[o].splice(st(n[o], e), 1) : delete n[o]; + }), this; + } + }, emit: function(t, e) { + this.options.domEvents && function(a, b) { + var R = v.createEvent("Event"); + R.initEvent(a, !0, !0), R.gesture = b, b.target.dispatchEvent(R); + }(t, e); + var n = this.handlers[t] && this.handlers[t].slice(); + if (n && n.length) { + e.type = t, e.preventDefault = function() { + e.srcEvent.preventDefault(); + }; + for (var o = 0; o < n.length; ) n[o](e), o++; + } + }, destroy: function() { + this.element && De(this, !1), this.handlers = {}, this.session = {}, this.input.destroy(), this.element = null; + } }, E(St, { INPUT_START: I, INPUT_MOVE: 2, INPUT_END: _, INPUT_CANCEL: Y, STATE_POSSIBLE: te, STATE_BEGAN: 2, STATE_CHANGED: 4, STATE_ENDED: 8, STATE_RECOGNIZED: 8, STATE_CANCELLED: 16, STATE_FAILED: ct, DIRECTION_NONE: xt, DIRECTION_LEFT: dt, DIRECTION_RIGHT: vt, DIRECTION_UP: gt, DIRECTION_DOWN: mt, DIRECTION_HORIZONTAL: V, DIRECTION_VERTICAL: J, DIRECTION_ALL: It, Manager: me, Input: U, TouchAction: fe, TouchInput: Qt, MouseInput: Z, PointerEventInput: Et, TouchMouseInput: le, SingleTouchInput: be, Recognizer: lt, AttrRecognizer: tt, Tap: ne, Pan: ie, Swipe: ge, Pinch: pe, Rotate: ve, Press: de, on: Pt, off: At, each: M, merge: it, extend: H, assign: E, inherit: j, bindFn: nt, prefixed: pt }), (c !== void 0 ? c : typeof self < "u" ? self : {}).Hammer = St, (u = (function() { + return St; + }).call(r, s, r, d)) === l || (d.exports = u); + })(window, document); +}, 970: (d, r, s) => { + s.d(r, { A: () => l }); + var u = s(645), c = s.n(u), v = s(278), f = s.n(v)()(c()); + f.push([d.id, ".flipbook{height:100%;width:100%;overflow:hidden}.flipbook-debug-bar{position:absolute;bottom:0;left:0;width:100%;background-color:rgba(0,0,0,.5);color:#fff;padding:10px;box-sizing:border-box;display:flex;flex-wrap:wrap;justify-content:space-between;z-index:9999}", ""]); + const l = f; +}, 0: (d, r, s) => { + s.d(r, { A: () => l }); + var u = s(645), c = s.n(u), v = s(278), f = s.n(v)()(c()); + f.push([d.id, ".page{position:absolute;backface-visibility:hidden;transform-style:preserve-3d}.page>*{max-width:100%;max-height:100%;height:100%;width:100%;box-sizing:border-box}", ""]); + const l = f; +}, 278: (d) => { + d.exports = function(r) { + var s = []; + return s.toString = function() { + return this.map(function(u) { + var c = "", v = u[5] !== void 0; + return u[4] && (c += "@supports (".concat(u[4], ") {")), u[2] && (c += "@media ".concat(u[2], " {")), v && (c += "@layer".concat(u[5].length > 0 ? " ".concat(u[5]) : "", " {")), c += r(u), v && (c += "}"), u[2] && (c += "}"), u[4] && (c += "}"), c; + }).join(""); + }, s.i = function(u, c, v, f, l) { + typeof u == "string" && (u = [[null, u, void 0]]); + var E = {}; + if (v) for (var y = 0; y < this.length; y++) { + var w = this[y][0]; + w != null && (E[w] = !0); + } + for (var P = 0; P < u.length; P++) { + var g = [].concat(u[P]); + v && E[g[0]] || (l !== void 0 && (g[5] === void 0 || (g[1] = "@layer".concat(g[5].length > 0 ? " ".concat(g[5]) : "", " {").concat(g[1], "}")), g[5] = l), c && (g[2] && (g[1] = "@media ".concat(g[2], " {").concat(g[1], "}")), g[2] = c), f && (g[4] ? (g[1] = "@supports (".concat(g[4], ") {").concat(g[1], "}"), g[4] = f) : g[4] = "".concat(f)), s.push(g)); + } + }, s; + }; +}, 645: (d) => { + d.exports = function(r) { + return r[1]; + }; +}, 292: (d) => { + var r = []; + function s(v) { + for (var f = -1, l = 0; l < r.length; l++) if (r[l].identifier === v) { + f = l; + break; } - - var firstInput = session.firstInput; - var firstMultiple = session.firstMultiple; - var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center; - - var center = input.center = getCenter(pointers); - input.timeStamp = now(); - input.deltaTime = input.timeStamp - firstInput.timeStamp; - - input.angle = getAngle(offsetCenter, center); - input.distance = getDistance(offsetCenter, center); - - computeDeltaXY(session, input); - input.offsetDirection = getDirection(input.deltaX, input.deltaY); - - var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY); - input.overallVelocityX = overallVelocity.x; - input.overallVelocityY = overallVelocity.y; - input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y; - - input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1; - input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0; - - input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length > - session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers); - - computeIntervalInputData(session, input); - - // find the correct target - var target = manager.element; - if (hasParent(input.srcEvent.target, target)) { - target = input.srcEvent.target; + return f; + } + function u(v, f) { + for (var l = {}, E = [], y = 0; y < v.length; y++) { + var w = v[y], P = f.base ? w[0] + f.base : w[0], g = l[P] || 0, C = "".concat(P, " ").concat(g); + l[P] = g + 1; + var O = s(C), F = { css: w[1], media: w[2], sourceMap: w[3], supports: w[4], layer: w[5] }; + if (O !== -1) r[O].references++, r[O].updater(F); + else { + var N = c(F, f); + f.byIndex = y, r.splice(y, 0, { identifier: C, updater: N, references: 1 }); + } + E.push(C); } - input.target = target; -} - -function computeDeltaXY(session, input) { - var center = input.center; - var offset = session.offsetDelta || {}; - var prevDelta = session.prevDelta || {}; - var prevInput = session.prevInput || {}; - - if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) { - prevDelta = session.prevDelta = { - x: prevInput.deltaX || 0, - y: prevInput.deltaY || 0 - }; - - offset = session.offsetDelta = { - x: center.x, - y: center.y - }; + return E; + } + function c(v, f) { + var l = f.domAPI(f); + return l.update(v), function(E) { + if (E) { + if (E.css === v.css && E.media === v.media && E.sourceMap === v.sourceMap && E.supports === v.supports && E.layer === v.layer) return; + l.update(v = E); + } else l.remove(); + }; + } + d.exports = function(v, f) { + var l = u(v = v || [], f = f || {}); + return function(E) { + E = E || []; + for (var y = 0; y < l.length; y++) { + var w = s(l[y]); + r[w].references--; + } + for (var P = u(E, f), g = 0; g < l.length; g++) { + var C = s(l[g]); + r[C].references === 0 && (r[C].updater(), r.splice(C, 1)); + } + l = P; + }; + }; +}, 383: (d) => { + var r = {}; + d.exports = function(s, u) { + var c = function(v) { + if (r[v] === void 0) { + var f = document.querySelector(v); + if (window.HTMLIFrameElement && f instanceof window.HTMLIFrameElement) try { + f = f.contentDocument.head; + } catch { + f = null; + } + r[v] = f; + } + return r[v]; + }(s); + if (!c) throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); + c.appendChild(u); + }; +}, 88: (d) => { + d.exports = function(r) { + var s = document.createElement("style"); + return r.setAttributes(s, r.attributes), r.insert(s, r.options), s; + }; +}, 884: (d, r, s) => { + d.exports = function(u) { + var c = s.nc; + c && u.setAttribute("nonce", c); + }; +}, 893: (d) => { + d.exports = function(r) { + if (typeof document > "u") return { update: function() { + }, remove: function() { + } }; + var s = r.insertStyleElement(r); + return { update: function(u) { + (function(c, v, f) { + var l = ""; + f.supports && (l += "@supports (".concat(f.supports, ") {")), f.media && (l += "@media ".concat(f.media, " {")); + var E = f.layer !== void 0; + E && (l += "@layer".concat(f.layer.length > 0 ? " ".concat(f.layer) : "", " {")), l += f.css, E && (l += "}"), f.media && (l += "}"), f.supports && (l += "}"); + var y = f.sourceMap; + y && typeof btoa < "u" && (l += ` +/*# sourceMappingURL=data:application/json;base64,`.concat(btoa(unescape(encodeURIComponent(JSON.stringify(y)))), " */")), v.styleTagTransform(l, c, v.options); + })(s, r, u); + }, remove: function() { + (function(u) { + if (u.parentNode === null) return !1; + u.parentNode.removeChild(u); + })(s); + } }; + }; +}, 997: (d) => { + d.exports = function(r, s) { + if (s.styleSheet) s.styleSheet.cssText = r; + else { + for (; s.firstChild; ) s.removeChild(s.firstChild); + s.appendChild(document.createTextNode(r)); } - - input.deltaX = prevDelta.x + (center.x - offset.x); - input.deltaY = prevDelta.y + (center.y - offset.y); + }; +} }, Xe = {}; +function D(d) { + var r = Xe[d]; + if (r !== void 0) return r.exports; + var s = Xe[d] = { id: d, exports: {} }; + return ci[d](s, s.exports, D), s.exports; +} +D.n = (d) => { + var r = d && d.__esModule ? () => d.default : () => d; + return D.d(r, { a: r }), r; +}, D.d = (d, r) => { + for (var s in r) D.o(r, s) && !D.o(d, s) && Object.defineProperty(d, s, { enumerable: !0, get: r[s] }); +}, D.o = (d, r) => Object.prototype.hasOwnProperty.call(d, r), D.nc = void 0; +var $e = {}; +D.d($e, { $: () => yi }); +var li = D(292), We = D.n(li), hi = D(893), qe = D.n(hi), fi = D(383), Ue = D.n(fi), pi = D(884), Ve = D.n(pi), di = D(88), He = D.n(di), vi = D(997), Be = D.n(vi), oe = D(0), Lt = {}; +Lt.styleTagTransform = Be(), Lt.setAttributes = Ve(), Lt.insert = Ue().bind(null, "head"), Lt.domAPI = qe(), Lt.insertStyleElement = He(), We()(oe.A, Lt), oe.A && oe.A.locals && oe.A.locals; +var se = D(970), jt = {}; +jt.styleTagTransform = Be(), jt.setAttributes = Ve(), jt.insert = Ue().bind(null, "head"), jt.domAPI = qe(), jt.insertStyleElement = He(), We()(se.A, jt), se.A && se.A.locals && se.A.locals; +var W, gi = D(168), mi = D.n(gi); +(function(d) { + d.Forward = "Forward", d.Backward = "Backward", d.None = "None"; +})(W || (W = {})); +class Ti { + constructor(r, s, u, c, v) { + x(this, "index"); + x(this, "pages"); + x(this, "bookProperties"); + x(this, "onTurned"); + x(this, "currentAnimation", null); + x(this, "targetFlipPosition", null); + x(this, "wrappedFlipPosition"); + this.index = r, this.pages = s, this.bookProperties = c, this.onTurned = v, this.wrappedFlipPosition = u ? 1 : 0; + } + get isTurned() { + return this.flipPosition === 1; + } + get isTurning() { + return this.flipPosition !== 0; + } + get isCover() { + return this.isFirst || this.isLast; + } + get isFirst() { + return this.index === 0; + } + get isLast() { + return this.index === this.bookProperties.leavesCount - 1; + } + set flipPosition(r) { + this.wrappedFlipPosition = Math.max(0, Math.min(1, r)); + } + get flipPosition() { + return this.wrappedFlipPosition; + } + async flipToPosition(r, s = 225) { + return this.currentAnimation && await this.currentAnimation, this.flipPosition === r ? Promise.resolve() : this.targetFlipPosition === r ? this.currentAnimation ?? Promise.resolve() : (this.targetFlipPosition = r, this.currentAnimation = new Promise((u) => { + const c = this.flipPosition, v = 180 * Math.abs(r - c) / s * 1e3, f = performance.now(), l = (E) => { + const y = E - f; + if (y < 0) return void requestAnimationFrame(l); + const w = Math.min(y / v, 1), P = c + w * (r - c); + this.pages.forEach((g, C) => { + const O = this.bookProperties.isLTR; + if (g) { + const F = C % 2 + 1 == 1, N = (F ? O ? P > 0.5 ? 180 - 180 * P : 180 * -P : P > 0.5 ? -(180 - 180 * P) : 180 * P : O ? P < 0.5 ? 180 * -P : 180 - 180 * P : P < 0.5 ? 180 * P : -(180 - 180 * P)) + "deg", M = F ? O ? "100%" : "-100%" : "0px", q = F ? P > 0.5 ? -1 : 1 : P < 0.5 ? -1 : 1; + g.style.transform = `translateX(${M})rotateY(${N})scaleX(${q})`, g.style.transformOrigin = F ? O ? "left" : "right" : O ? "right" : "left", g.style.zIndex = `${P > 0.5 ? g.dataset.pageIndex : this.bookProperties.pagesCount - g.dataset.pageIndex}`; + } + }), this.flipPosition = Math.max(0, Math.min(1, P)), this.flipPosition !== 1 && this.flipPosition !== 0 || this.onTurned(this.flipPosition === 1 ? W.Forward : W.Backward), w < 1 ? requestAnimationFrame(l) : (this.currentAnimation = null, this.targetFlipPosition = null, u()); + }; + requestAnimationFrame(l); + }), this.currentAnimation); + } + async efficientFlipToPosition(r, s = 2e4) { + return function(u, c, v) { + var f, l = {}, E = l.noTrailing, y = E !== void 0 && E, w = l.noLeading, P = w !== void 0 && w, g = l.debounceMode, C = g === void 0 ? void 0 : g, O = !1, F = 0; + function N() { + f && clearTimeout(f); + } + function M() { + for (var q = arguments.length, H = new Array(q), it = 0; it < q; it++) H[it] = arguments[it]; + var j = this, nt = Date.now() - F; + function rt() { + F = Date.now(), c.apply(j, H); + } + function at() { + f = void 0; + } + O || (P || !C || f || rt(), N(), C === void 0 && nt > u ? P ? (F = Date.now(), y || (f = setTimeout(C ? at : rt, u))) : rt() : y !== !0 && (f = setTimeout(C ? at : rt, C === void 0 ? u - nt : u))); + } + return M.cancel = function(q) { + var H = (q || {}).upcomingOnly, it = H !== void 0 && H; + N(), O = !it; + }, M; + }(1, this.flipToPosition.bind(this))(r, s); + } } - -/** - * velocity is calculated every x ms - * @param {Object} session - * @param {Object} input - */ -function computeIntervalInputData(session, input) { - var last = session.lastInterval || input, - deltaTime = input.timeStamp - last.timeStamp, - velocity, velocityX, velocityY, direction; - - if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) { - var deltaX = input.deltaX - last.deltaX; - var deltaY = input.deltaY - last.deltaY; - - var v = getVelocity(deltaTime, deltaX, deltaY); - velocityX = v.x; - velocityY = v.y; - velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y; - direction = getDirection(deltaX, deltaY); - - session.lastInterval = input; - } else { - // use latest velocity info if it doesn't overtake a minimum period - velocity = last.velocity; - velocityX = last.velocityX; - velocityY = last.velocityY; - direction = last.direction; - } - - input.velocity = velocity; - input.velocityX = velocityX; - input.velocityY = velocityY; - input.direction = direction; +class ae { + constructor(r, s) { + x(this, "width"); + x(this, "height"); + this.width = r, this.height = s; + } + static from(r) { + return new ae(r.width, r.height); + } + get value() { + return this.width / this.height; + } } - -/** - * create a simple clone from the input used for storage of firstInput and firstMultiple - * @param {Object} input - * @returns {Object} clonedInputData - */ -function simpleCloneInputData(input) { - // make a simple copy of the pointers because we will get a reference if we don't - // we only need clientXY for the calculations - var pointers = []; - var i = 0; - while (i < input.pointers.length) { - pointers[i] = { - clientX: round(input.pointers[i].clientX), - clientY: round(input.pointers[i].clientY) - }; - i++; - } - - return { - timeStamp: now(), - pointers: pointers, - center: getCenter(pointers), - deltaX: input.deltaX, - deltaY: input.deltaY - }; +class Gt { + constructor(r, s) { + x(this, "width"); + x(this, "height"); + x(this, "aspectRatio"); + this.width = r, this.height = s, this.aspectRatio = new ae(r, s); + } + aspectRatioFit(r) { + const s = ae.from(r).value; + return this.aspectRatio.value > s ? new Gt(this.height * s, this.height) : new Gt(this.width, this.width / s); + } + get asString() { + return `${this.width}x${this.height}`; + } } - -/** - * get the center of all the pointers - * @param {Array} pointers - * @return {Object} center contains \`x\` and \`y\` properties - */ -function getCenter(pointers) { - var pointersLength = pointers.length; - - // no need to loop when only one touch - if (pointersLength === 1) { - return { - x: round(pointers[0].clientX), - y: round(pointers[0].clientY) - }; +class yi { + constructor(r) { + x(this, "bookElement"); + x(this, "pageElements", []); + x(this, "pagesCount"); + x(this, "leafAspectRatio", { width: 2, height: 3 }); + x(this, "coverAspectRatio", { width: 2.15, height: 3.15 }); + x(this, "direction", "ltr"); + x(this, "onPageChanged"); + x(this, "pageSemantics"); + x(this, "leaves", []); + x(this, "currentLeaf"); + x(this, "flipDirection", W.None); + x(this, "flipStartingPos", 0); + x(this, "isDuringManualFlip", !1); + x(this, "flipDelta", 0); + x(this, "isDuringAutoFlip", !1); + x(this, "touchStartingPos", { x: 0, y: 0 }); + x(this, "prevVisiblePageIndices"); + x(this, "handleTouchStart", (r) => { + if (r.touches.length > 1) return; + const s = r.touches[0]; + this.touchStartingPos = { x: s.pageX, y: s.pageY }; + }); + x(this, "handleTouchMove", (r) => { + if (r.touches.length > 1) return; + const s = r.touches[0], u = s.pageX - this.touchStartingPos.x, c = s.pageY - this.touchStartingPos.y; + Math.abs(u) > Math.abs(c) && r.preventDefault(); + }); + this.pagesCount = r.pagesCount, this.leafAspectRatio = r.leafAspectRatio || this.leafAspectRatio, this.coverAspectRatio = r.coverAspectRatio || this.coverAspectRatio, this.direction = r.direction || this.direction, this.pageSemantics = r.pageSemantics, this.onPageChanged = r.onPageChanged; + } + get isLTR() { + return this.direction === "ltr"; + } + get isClosed() { + return !this.currentOrTurningLeaves[0]; + } + get isClosedInverted() { + return !this.currentLeaves[1]; + } + get currentLeaves() { + let r = -1; + for (let s = this.leaves.length - 1; s >= 0; s--) { + const u = this.leaves[s]; + if (u.isTurned) { + r = u.index + 1; + break; + } } - - var x = 0, y = 0, i = 0; - while (i < pointersLength) { - x += pointers[i].clientX; - y += pointers[i].clientY; - i++; + return r == -1 ? [void 0, this.leaves[0]] : r == this.leaves.length ? [this.leaves[r - 1], void 0] : [this.leaves[r - 1], this.leaves[r]]; + } + get currentOrTurningLeaves() { + let r = -1; + for (let s = this.leaves.length - 1; s >= 0; s--) { + const u = this.leaves[s]; + if (u.isTurned || u.isTurning) { + r = u.index + 1; + break; + } } - - return { - x: round(x / pointersLength), - y: round(y / pointersLength) - }; -} - -/** - * calculate the velocity between two points. unit is in px per ms. - * @param {Number} deltaTime - * @param {Number} x - * @param {Number} y - * @return {Object} velocity \`x\` and \`y\` - */ -function getVelocity(deltaTime, x, y) { - return { - x: x / deltaTime || 0, - y: y / deltaTime || 0 - }; -} - -/** - * get the direction between two points - * @param {Number} x - * @param {Number} y - * @return {Number} direction - */ -function getDirection(x, y) { - if (x === y) { - return DIRECTION_NONE; + return r == -1 ? [void 0, this.leaves[0]] : r == this.leaves.length ? [this.leaves[r - 1], void 0] : [this.leaves[r - 1], this.leaves[r]]; + } + render(r, s = !1) { + const u = document.querySelector(r); + if (!u) throw new Error(`Couldn't find container with selector: ${r}`); + this.bookElement = u, this.bookElement.classList.contains("flipbook") || this.bookElement.classList.add("flipbook"); + const c = u.querySelectorAll(".page"); + if (!c.length) throw new Error("No pages found in flipbook"); + this.pageElements = Array.from(c), this.leaves.splice(0, this.leaves.length); + const v = Math.ceil(this.pagesCount / 2), f = new Gt(this.bookElement.clientWidth / 2, this.bookElement.clientHeight).aspectRatioFit(this.coverAspectRatio), l = new Gt(f.width * this.leafAspectRatio.width / this.coverAspectRatio.width, f.height * this.leafAspectRatio.height / this.coverAspectRatio.height); + this.bookElement.style.perspective = 2 * Math.min(2 * l.width, l.height) + "px", this.pageElements.forEach((y, w) => { + var C, O; + y.style.width = `${l.width}px`, y.style.height = `${l.height}px`, y.style.zIndex = "" + (this.pagesCount - w), y.dataset.pageIndex = w.toString(), y.style[this.isLTR ? "left" : "right"] = (u.clientWidth - 2 * l.width) / 2 + "px", y.style.top = (u.clientHeight - l.height) / 2 + "px", y.dataset.pageSemanticName = ((C = this.pageSemantics) == null ? void 0 : C.indexToSemanticName(w)) ?? "", y.dataset.pageTitle = ((O = this.pageSemantics) == null ? void 0 : O.indexToTitle(w)) ?? ""; + const P = Math.floor(w / 2), g = (w + 1) % 2 == 1; + y.classList.add(g ? "odd" : "even", ...w === 0 ? ["current-page"] : []), g ? (y.style.transform = `translateX(${this.isLTR ? "" : "-"}100%)`, this.leaves[P] = new Ti(P, [y, void 0], !1, { isLTR: this.isLTR, leavesCount: v, pagesCount: this.pagesCount }, (F) => { + const N = F == W.Forward ? w + 2 === this.pagesCount ? [w + 1] : [w + 1, w + 2] : w === 0 ? [w] : [w - 1, w]; + if (this.prevVisiblePageIndices && this.prevVisiblePageIndices.length === N.length && N.every((q, H) => q === this.prevVisiblePageIndices[H])) return; + const M = this.prevVisiblePageIndices; + this.prevVisiblePageIndices = N, this.onTurned(N, M); + })) : (y.style.transform = `scaleX(-1)translateX(${this.isLTR ? "-" : ""}100%)`, this.leaves[P].pages[1] = y); + }); + const E = new (mi())(this.bookElement); + E.on("panstart", this.onDragStart.bind(this)), E.on("panmove", this.onDragUpdate.bind(this)), E.on("panend", this.onDragEnd.bind(this)), this.bookElement.addEventListener("touchstart", this.handleTouchStart.bind(this), { passive: !1 }), this.bookElement.addEventListener("touchmove", this.handleTouchMove.bind(this), { passive: !1 }), s && this.fillDebugBar(); + } + fillDebugBar() { + var s; + const r = document.createElement("div"); + r.className = "flipbook-debug-bar", (s = this.bookElement) == null || s.appendChild(r), setInterval(() => { + var u; + r.innerHTML = ` +
Direction: ${this.isLTR ? "LTR" : "RTL"}
+
Current Leaf: ${this.currentLeaf ? this.currentLeaf.index : "None"}
+
Flip dir: ${this.flipDirection}
+
Flip Δ: ${this.flipDelta}
+
Current Leaf Flip Position: ${(u = this.currentLeaf) == null ? void 0 : u.flipPosition.toFixed(3)}
+
Is During Auto Flip: ${this.isDuringAutoFlip}
+ `; + }, 10); + } + onDragStart(r) { + if (console.log("drag start"), this.currentLeaf || this.isDuringAutoFlip) return this.flipDirection = W.None, void (this.flipStartingPos = 0); + this.flipStartingPos = r.center.x; + } + onDragUpdate(r) { + var s; + if (console.log("drag update"), !this.isDuringAutoFlip && !this.isDuringManualFlip) { + this.isDuringManualFlip = !0; + try { + const u = r.center.x; + this.flipDelta = this.isLTR ? this.flipStartingPos - u : u - this.flipStartingPos; + const c = ((s = this.bookElement) == null ? void 0 : s.clientWidth) ?? 0; + if (Math.abs(this.flipDelta) > c || this.flipDelta === 0) return; + switch (this.flipDirection = this.flipDirection !== W.None ? this.flipDirection : this.flipDelta > 0 ? W.Forward : W.Backward, this.flipDirection) { + case W.Forward: + const v = this.flipDelta / c; + if (v > 1 || this.flipDelta < 0) return; + if (!this.currentLeaf) { + if (this.isClosedInverted) return; + this.currentLeaf = this.currentOrTurningLeaves[1]; + } + this.currentLeaf.efficientFlipToPosition(v); + break; + case W.Backward: + const f = 1 - Math.abs(this.flipDelta) / c; + if (f < 0 || this.flipDelta > 0) return; + if (!this.currentLeaf) { + if (this.isClosed) return; + this.currentLeaf = this.currentOrTurningLeaves[0]; + } + this.currentLeaf.efficientFlipToPosition(f); + } + } finally { + this.isDuringManualFlip = !1; + } } - - if (abs(x) >= abs(y)) { - return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT; + } + async onDragEnd(r) { + if (console.log("drag end"), !this.currentLeaf || this.isDuringAutoFlip) return this.flipDirection = W.None, void (this.flipStartingPos = 0); + const s = 1e3 * r.velocityX; + let u; + switch (this.flipDirection) { + case W.Forward: + u = (this.isLTR ? s < -500 : s > 500) || this.currentLeaf.flipPosition >= 0.5 ? 1 : 0; + break; + case W.Backward: + u = (this.isLTR ? s > 500 : s < -500) || this.currentLeaf.flipPosition <= 0.5 ? 0 : 1; + break; + default: + return; } - return y < 0 ? DIRECTION_UP : DIRECTION_DOWN; -} - -/** - * calculate the absolute distance between two points - * @param {Object} p1 {x, y} - * @param {Object} p2 {x, y} - * @param {Array} [props] containing x and y keys - * @return {Number} distance - */ -function getDistance(p1, p2, props) { - if (!props) { - props = PROPS_XY; + this.isDuringAutoFlip = !0, this.flipDirection = W.None, this.flipStartingPos = 0, await this.currentLeaf.flipToPosition(u), this.isDuringAutoFlip = !1, this.currentLeaf = void 0; + } + onTurned(r, s) { + for (let u = 0; u < this.pageElements.length; u++) { + const c = this.pageElements[u]; + (r.includes(u) ? c.classList.add : s && s.includes ? c.classList.remove : () => null).bind(c.classList)("current-page"); } - var x = p2[props[0]] - p1[props[0]], - y = p2[props[1]] - p1[props[1]]; - - return Math.sqrt((x * x) + (y * y)); + } + jumpToPage(r) { + this.onPageChanged && this.onPageChanged(r); + } } - -/** - * calculate the angle between two coordinates - * @param {Object} p1 - * @param {Object} p2 - * @param {Array} [props] containing x and y keys - * @return {Number} angle - */ -function getAngle(p1, p2, props) { - if (!props) { - props = PROPS_XY; - } - var x = p2[props[0]] - p1[props[0]], - y = p2[props[1]] - p1[props[1]]; - return Math.atan2(y, x) * 180 / Math.PI; -} - -/** - * calculate the rotation degrees between two pointersets - * @param {Array} start array of pointers - * @param {Array} end array of pointers - * @return {Number} rotation - */ -function getRotation(start, end) { - return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY); -} - -/** - * calculate the scale factor between two pointersets - * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out - * @param {Array} start array of pointers - * @param {Array} end array of pointers - * @return {Number} scale - */ -function getScale(start, end) { - return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY); -} - -var MOUSE_INPUT_MAP = { - mousedown: INPUT_START, - mousemove: INPUT_MOVE, - mouseup: INPUT_END -}; - -var MOUSE_ELEMENT_EVENTS = 'mousedown'; -var MOUSE_WINDOW_EVENTS = 'mousemove mouseup'; - -/** - * Mouse events input - * @constructor - * @extends Input - */ -function MouseInput() { - this.evEl = MOUSE_ELEMENT_EVENTS; - this.evWin = MOUSE_WINDOW_EVENTS; - - this.pressed = false; // mousedown state - - Input.apply(this, arguments); -} - -inherit(MouseInput, Input, { - /** - * handle mouse events - * @param {Object} ev - */ - handler: function MEhandler(ev) { - var eventType = MOUSE_INPUT_MAP[ev.type]; - - // on start we want to have the left mouse button down - if (eventType & INPUT_START && ev.button === 0) { - this.pressed = true; - } - - if (eventType & INPUT_MOVE && ev.which !== 1) { - eventType = INPUT_END; - } - - // mouse must be down - if (!this.pressed) { - return; - } - - if (eventType & INPUT_END) { - this.pressed = false; - } - - this.callback(this.manager, eventType, { - pointers: [ev], - changedPointers: [ev], - pointerType: INPUT_TYPE_MOUSE, - srcEvent: ev - }); - } -}); - -var POINTER_INPUT_MAP = { - pointerdown: INPUT_START, - pointermove: INPUT_MOVE, - pointerup: INPUT_END, - pointercancel: INPUT_CANCEL, - pointerout: INPUT_CANCEL -}; - -// in IE10 the pointer types is defined as an enum -var IE10_POINTER_TYPE_ENUM = { - 2: INPUT_TYPE_TOUCH, - 3: INPUT_TYPE_PEN, - 4: INPUT_TYPE_MOUSE, - 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816 -}; - -var POINTER_ELEMENT_EVENTS = 'pointerdown'; -var POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel'; - -// IE10 has prefixed support, and case-sensitive -if (window.MSPointerEvent && !window.PointerEvent) { - POINTER_ELEMENT_EVENTS = 'MSPointerDown'; - POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel'; -} - -/** - * Pointer events input - * @constructor - * @extends Input - */ -function PointerEventInput() { - this.evEl = POINTER_ELEMENT_EVENTS; - this.evWin = POINTER_WINDOW_EVENTS; - - Input.apply(this, arguments); - - this.store = (this.manager.session.pointerEvents = []); -} - -inherit(PointerEventInput, Input, { - /** - * handle mouse events - * @param {Object} ev - */ - handler: function PEhandler(ev) { - var store = this.store; - var removePointer = false; - - var eventTypeNormalized = ev.type.toLowerCase().replace('ms', ''); - var eventType = POINTER_INPUT_MAP[eventTypeNormalized]; - var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType; - - var isTouch = (pointerType == INPUT_TYPE_TOUCH); - - // get index of the event in the store - var storeIndex = inArray(store, ev.pointerId, 'pointerId'); - - // start and mouse must be down - if (eventType & INPUT_START && (ev.button === 0 || isTouch)) { - if (storeIndex < 0) { - store.push(ev); - storeIndex = store.length - 1; - } - } else if (eventType & (INPUT_END | INPUT_CANCEL)) { - removePointer = true; - } - - // it not found, so the pointer hasn't been down (so it's probably a hover) - if (storeIndex < 0) { - return; - } - - // update the event in the store - store[storeIndex] = ev; - - this.callback(this.manager, eventType, { - pointers: store, - changedPointers: [ev], - pointerType: pointerType, - srcEvent: ev - }); - - if (removePointer) { - // remove from the store - store.splice(storeIndex, 1); - } - } -}); - -var SINGLE_TOUCH_INPUT_MAP = { - touchstart: INPUT_START, - touchmove: INPUT_MOVE, - touchend: INPUT_END, - touchcancel: INPUT_CANCEL -}; - -var SINGLE_TOUCH_TARGET_EVENTS = 'touchstart'; -var SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel'; - -/** - * Touch events input - * @constructor - * @extends Input - */ -function SingleTouchInput() { - this.evTarget = SINGLE_TOUCH_TARGET_EVENTS; - this.evWin = SINGLE_TOUCH_WINDOW_EVENTS; - this.started = false; - - Input.apply(this, arguments); -} - -inherit(SingleTouchInput, Input, { - handler: function TEhandler(ev) { - var type = SINGLE_TOUCH_INPUT_MAP[ev.type]; - - // should we handle the touch events? - if (type === INPUT_START) { - this.started = true; - } - - if (!this.started) { - return; - } - - var touches = normalizeSingleTouches.call(this, ev, type); - - // when done, reset the started state - if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) { - this.started = false; - } - - this.callback(this.manager, type, { - pointers: touches[0], - changedPointers: touches[1], - pointerType: INPUT_TYPE_TOUCH, - srcEvent: ev - }); - } -}); - -/** - * @this {TouchInput} - * @param {Object} ev - * @param {Number} type flag - * @returns {undefined|Array} [all, changed] - */ -function normalizeSingleTouches(ev, type) { - var all = toArray(ev.touches); - var changed = toArray(ev.changedTouches); - - if (type & (INPUT_END | INPUT_CANCEL)) { - all = uniqueArray(all.concat(changed), 'identifier', true); - } - - return [all, changed]; -} - -var TOUCH_INPUT_MAP = { - touchstart: INPUT_START, - touchmove: INPUT_MOVE, - touchend: INPUT_END, - touchcancel: INPUT_CANCEL -}; - -var TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel'; - -/** - * Multi-user touch events input - * @constructor - * @extends Input - */ -function TouchInput() { - this.evTarget = TOUCH_TARGET_EVENTS; - this.targetIds = {}; - - Input.apply(this, arguments); -} - -inherit(TouchInput, Input, { - handler: function MTEhandler(ev) { - var type = TOUCH_INPUT_MAP[ev.type]; - var touches = getTouches.call(this, ev, type); - if (!touches) { - return; - } - - this.callback(this.manager, type, { - pointers: touches[0], - changedPointers: touches[1], - pointerType: INPUT_TYPE_TOUCH, - srcEvent: ev - }); - } -}); - -/** - * @this {TouchInput} - * @param {Object} ev - * @param {Number} type flag - * @returns {undefined|Array} [all, changed] - */ -function getTouches(ev, type) { - var allTouches = toArray(ev.touches); - var targetIds = this.targetIds; - - // when there is only one touch, the process can be simplified - if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) { - targetIds[allTouches[0].identifier] = true; - return [allTouches, allTouches]; - } - - var i, - targetTouches, - changedTouches = toArray(ev.changedTouches), - changedTargetTouches = [], - target = this.target; - - // get target touches from touches - targetTouches = allTouches.filter(function(touch) { - return hasParent(touch.target, target); - }); - - // collect touches - if (type === INPUT_START) { - i = 0; - while (i < targetTouches.length) { - targetIds[targetTouches[i].identifier] = true; - i++; - } - } - - // filter changed touches to only contain touches that exist in the collected target ids - i = 0; - while (i < changedTouches.length) { - if (targetIds[changedTouches[i].identifier]) { - changedTargetTouches.push(changedTouches[i]); - } - - // cleanup removed touches - if (type & (INPUT_END | INPUT_CANCEL)) { - delete targetIds[changedTouches[i].identifier]; - } - i++; - } - - if (!changedTargetTouches.length) { - return; - } - - return [ - // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel' - uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true), - changedTargetTouches - ]; -} - -/** - * Combined touch and mouse input - * - * Touch has a higher priority then mouse, and while touching no mouse events are allowed. - * This because touch devices also emit mouse events while doing a touch. - * - * @constructor - * @extends Input - */ - -var DEDUP_TIMEOUT = 2500; -var DEDUP_DISTANCE = 25; - -function TouchMouseInput() { - Input.apply(this, arguments); - - var handler = bindFn(this.handler, this); - this.touch = new TouchInput(this.manager, handler); - this.mouse = new MouseInput(this.manager, handler); - - this.primaryTouch = null; - this.lastTouches = []; -} - -inherit(TouchMouseInput, Input, { - /** - * handle mouse and touch events - * @param {Hammer} manager - * @param {String} inputEvent - * @param {Object} inputData - */ - handler: function TMEhandler(manager, inputEvent, inputData) { - var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH), - isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE); - - if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) { - return; - } - - // when we're in a touch event, record touches to de-dupe synthetic mouse event - if (isTouch) { - recordTouches.call(this, inputEvent, inputData); - } else if (isMouse && isSyntheticEvent.call(this, inputData)) { - return; - } - - this.callback(manager, inputEvent, inputData); - }, - - /** - * remove the event listeners - */ - destroy: function destroy() { - this.touch.destroy(); - this.mouse.destroy(); - } -}); - -function recordTouches(eventType, eventData) { - if (eventType & INPUT_START) { - this.primaryTouch = eventData.changedPointers[0].identifier; - setLastTouch.call(this, eventData); - } else if (eventType & (INPUT_END | INPUT_CANCEL)) { - setLastTouch.call(this, eventData); - } -} - -function setLastTouch(eventData) { - var touch = eventData.changedPointers[0]; - - if (touch.identifier === this.primaryTouch) { - var lastTouch = {x: touch.clientX, y: touch.clientY}; - this.lastTouches.push(lastTouch); - var lts = this.lastTouches; - var removeLastTouch = function() { - var i = lts.indexOf(lastTouch); - if (i > -1) { - lts.splice(i, 1); - } - }; - setTimeout(removeLastTouch, DEDUP_TIMEOUT); - } -} - -function isSyntheticEvent(eventData) { - var x = eventData.srcEvent.clientX, y = eventData.srcEvent.clientY; - for (var i = 0; i < this.lastTouches.length; i++) { - var t = this.lastTouches[i]; - var dx = Math.abs(x - t.x), dy = Math.abs(y - t.y); - if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) { - return true; - } - } - return false; -} - -var PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction'); -var NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined; - -// magical touchAction value -var TOUCH_ACTION_COMPUTE = 'compute'; -var TOUCH_ACTION_AUTO = 'auto'; -var TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented -var TOUCH_ACTION_NONE = 'none'; -var TOUCH_ACTION_PAN_X = 'pan-x'; -var TOUCH_ACTION_PAN_Y = 'pan-y'; -var TOUCH_ACTION_MAP = getTouchActionProps(); - -/** - * Touch Action - * sets the touchAction property or uses the js alternative - * @param {Manager} manager - * @param {String} value - * @constructor - */ -function TouchAction(manager, value) { - this.manager = manager; - this.set(value); -} - -TouchAction.prototype = { - /** - * set the touchAction value on the element or enable the polyfill - * @param {String} value - */ - set: function(value) { - // find out the touch-action by the event handlers - if (value == TOUCH_ACTION_COMPUTE) { - value = this.compute(); - } - - if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) { - this.manager.element.style[PREFIXED_TOUCH_ACTION] = value; - } - this.actions = value.toLowerCase().trim(); - }, - - /** - * just re-set the touchAction value - */ - update: function() { - this.set(this.manager.options.touchAction); - }, - - /** - * compute the value for the touchAction property based on the recognizer's settings - * @returns {String} value - */ - compute: function() { - var actions = []; - each(this.manager.recognizers, function(recognizer) { - if (boolOrFn(recognizer.options.enable, [recognizer])) { - actions = actions.concat(recognizer.getTouchAction()); - } - }); - return cleanTouchActions(actions.join(' ')); - }, - - /** - * this method is called on each input cycle and provides the preventing of the browser behavior - * @param {Object} input - */ - preventDefaults: function(input) { - var srcEvent = input.srcEvent; - var direction = input.offsetDirection; - - // if the touch action did prevented once this session - if (this.manager.session.prevented) { - srcEvent.preventDefault(); - return; - } - - var actions = this.actions; - var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE]; - var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y]; - var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X]; - - if (hasNone) { - //do not prevent defaults if this is a tap gesture - - var isTapPointer = input.pointers.length === 1; - var isTapMovement = input.distance < 2; - var isTapTouchTime = input.deltaTime < 250; - - if (isTapPointer && isTapMovement && isTapTouchTime) { - return; - } - } - - if (hasPanX && hasPanY) { - // \`pan-x pan-y\` means browser handles all scrolling/panning, do not prevent - return; - } - - if (hasNone || - (hasPanY && direction & DIRECTION_HORIZONTAL) || - (hasPanX && direction & DIRECTION_VERTICAL)) { - return this.preventSrc(srcEvent); - } - }, - - /** - * call preventDefault to prevent the browser's default behavior (scrolling in most cases) - * @param {Object} srcEvent - */ - preventSrc: function(srcEvent) { - this.manager.session.prevented = true; - srcEvent.preventDefault(); - } -}; - -/** - * when the touchActions are collected they are not a valid value, so we need to clean things up. * - * @param {String} actions - * @returns {*} - */ -function cleanTouchActions(actions) { - // none - if (inStr(actions, TOUCH_ACTION_NONE)) { - return TOUCH_ACTION_NONE; - } - - var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X); - var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); - - // if both pan-x and pan-y are set (different recognizers - // for different directions, e.g. horizontal pan but vertical swipe?) - // we need none (as otherwise with pan-x pan-y combined none of these - // recognizers will work, since the browser would handle all panning - if (hasPanX && hasPanY) { - return TOUCH_ACTION_NONE; - } - - // pan-x OR pan-y - if (hasPanX || hasPanY) { - return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y; - } - - // manipulation - if (inStr(actions, TOUCH_ACTION_MANIPULATION)) { - return TOUCH_ACTION_MANIPULATION; - } - - return TOUCH_ACTION_AUTO; -} - -function getTouchActionProps() { - if (!NATIVE_TOUCH_ACTION) { - return false; - } - var touchMap = {}; - var cssSupports = window.CSS && window.CSS.supports; - ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function(val) { - - // If css.supports is not supported but there is native touch-action assume it supports - // all values. This is the case for IE 10 and 11. - touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true; - }); - return touchMap; -} - -/** - * Recognizer flow explained; * - * All recognizers have the initial state of POSSIBLE when a input session starts. - * The definition of a input session is from the first input until the last input, with all it's movement in it. * - * Example session for mouse-input: mousedown -> mousemove -> mouseup - * - * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed - * which determines with state it should be. - * - * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to - * POSSIBLE to give it another change on the next cycle. - * - * Possible - * | - * +-----+---------------+ - * | | - * +-----+-----+ | - * | | | - * Failed Cancelled | - * +-------+------+ - * | | - * Recognized Began - * | - * Changed - * | - * Ended/Recognized - */ -var STATE_POSSIBLE = 1; -var STATE_BEGAN = 2; -var STATE_CHANGED = 4; -var STATE_ENDED = 8; -var STATE_RECOGNIZED = STATE_ENDED; -var STATE_CANCELLED = 16; -var STATE_FAILED = 32; - -/** - * Recognizer - * Every recognizer needs to extend from this class. - * @constructor - * @param {Object} options - */ -function Recognizer(options) { - this.options = assign({}, this.defaults, options || {}); - - this.id = uniqueId(); - - this.manager = null; - - // default is enable true - this.options.enable = ifUndefined(this.options.enable, true); - - this.state = STATE_POSSIBLE; - - this.simultaneous = {}; - this.requireFail = []; -} - -Recognizer.prototype = { - /** - * @virtual - * @type {Object} - */ - defaults: {}, - - /** - * set options - * @param {Object} options - * @return {Recognizer} - */ - set: function(options) { - assign(this.options, options); - - // also update the touchAction, in case something changed about the directions/enabled state - this.manager && this.manager.touchAction.update(); - return this; - }, - - /** - * recognize simultaneous with an other recognizer. - * @param {Recognizer} otherRecognizer - * @returns {Recognizer} this - */ - recognizeWith: function(otherRecognizer) { - if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) { - return this; - } - - var simultaneous = this.simultaneous; - otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); - if (!simultaneous[otherRecognizer.id]) { - simultaneous[otherRecognizer.id] = otherRecognizer; - otherRecognizer.recognizeWith(this); - } - return this; - }, - - /** - * drop the simultaneous link. it doesnt remove the link on the other recognizer. - * @param {Recognizer} otherRecognizer - * @returns {Recognizer} this - */ - dropRecognizeWith: function(otherRecognizer) { - if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) { - return this; - } - - otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); - delete this.simultaneous[otherRecognizer.id]; - return this; - }, - - /** - * recognizer can only run when an other is failing - * @param {Recognizer} otherRecognizer - * @returns {Recognizer} this - */ - requireFailure: function(otherRecognizer) { - if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) { - return this; - } - - var requireFail = this.requireFail; - otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); - if (inArray(requireFail, otherRecognizer) === -1) { - requireFail.push(otherRecognizer); - otherRecognizer.requireFailure(this); - } - return this; - }, - - /** - * drop the requireFailure link. it does not remove the link on the other recognizer. - * @param {Recognizer} otherRecognizer - * @returns {Recognizer} this - */ - dropRequireFailure: function(otherRecognizer) { - if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) { - return this; - } - - otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); - var index = inArray(this.requireFail, otherRecognizer); - if (index > -1) { - this.requireFail.splice(index, 1); - } - return this; - }, - - /** - * has require failures boolean - * @returns {boolean} - */ - hasRequireFailures: function() { - return this.requireFail.length > 0; - }, - - /** - * if the recognizer can recognize simultaneous with an other recognizer - * @param {Recognizer} otherRecognizer - * @returns {Boolean} - */ - canRecognizeWith: function(otherRecognizer) { - return !!this.simultaneous[otherRecognizer.id]; - }, - - /** - * You should use \`tryEmit\` instead of \`emit\` directly to check - * that all the needed recognizers has failed before emitting. - * @param {Object} input - */ - emit: function(input) { - var self = this; - var state = this.state; - - function emit(event) { - self.manager.emit(event, input); - } - - // 'panstart' and 'panmove' - if (state < STATE_ENDED) { - emit(self.options.event + stateStr(state)); - } - - emit(self.options.event); // simple 'eventName' events - - if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...) - emit(input.additionalEvent); - } - - // panend and pancancel - if (state >= STATE_ENDED) { - emit(self.options.event + stateStr(state)); - } - }, - - /** - * Check that all the require failure recognizers has failed, - * if true, it emits a gesture event, - * otherwise, setup the state to FAILED. - * @param {Object} input - */ - tryEmit: function(input) { - if (this.canEmit()) { - return this.emit(input); - } - // it's failing anyway - this.state = STATE_FAILED; - }, - - /** - * can we emit? - * @returns {boolean} - */ - canEmit: function() { - var i = 0; - while (i < this.requireFail.length) { - if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) { - return false; - } - i++; - } - return true; - }, - - /** - * update the recognizer - * @param {Object} inputData - */ - recognize: function(inputData) { - // make a new copy of the inputData - // so we can change the inputData without messing up the other recognizers - var inputDataClone = assign({}, inputData); - - // is is enabled and allow recognizing? - if (!boolOrFn(this.options.enable, [this, inputDataClone])) { - this.reset(); - this.state = STATE_FAILED; - return; - } - - // reset when we've reached the end - if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) { - this.state = STATE_POSSIBLE; - } - - this.state = this.process(inputDataClone); - - // the recognizer has recognized a gesture - // so trigger an event - if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) { - this.tryEmit(inputDataClone); - } - }, - - /** - * return the state of the recognizer - * the actual recognizing happens in this method - * @virtual - * @param {Object} inputData - * @returns {Const} STATE - */ - process: function(inputData) { }, // jshint ignore:line - - /** - * return the preferred touch-action - * @virtual - * @returns {Array} - */ - getTouchAction: function() { }, - - /** - * called when the gesture isn't allowed to recognize - * like when another is being recognized or it is disabled - * @virtual - */ - reset: function() { } -}; - -/** - * get a usable string, used as event postfix - * @param {Const} state - * @returns {String} state - */ -function stateStr(state) { - if (state & STATE_CANCELLED) { - return 'cancel'; - } else if (state & STATE_ENDED) { - return 'end'; - } else if (state & STATE_CHANGED) { - return 'move'; - } else if (state & STATE_BEGAN) { - return 'start'; - } - return ''; -} - -/** - * direction cons to string - * @param {Const} direction - * @returns {String} - */ -function directionStr(direction) { - if (direction == DIRECTION_DOWN) { - return 'down'; - } else if (direction == DIRECTION_UP) { - return 'up'; - } else if (direction == DIRECTION_LEFT) { - return 'left'; - } else if (direction == DIRECTION_RIGHT) { - return 'right'; - } - return ''; -} - -/** - * get a recognizer by name if it is bound to a manager - * @param {Recognizer|String} otherRecognizer - * @param {Recognizer} recognizer - * @returns {Recognizer} - */ -function getRecognizerByNameIfManager(otherRecognizer, recognizer) { - var manager = recognizer.manager; - if (manager) { - return manager.get(otherRecognizer); - } - return otherRecognizer; -} - -/** - * This recognizer is just used as a base for the simple attribute recognizers. - * @constructor - * @extends Recognizer - */ -function AttrRecognizer() { - Recognizer.apply(this, arguments); -} - -inherit(AttrRecognizer, Recognizer, { - /** - * @namespace - * @memberof AttrRecognizer - */ - defaults: { - /** - * @type {Number} - * @default 1 - */ - pointers: 1 - }, - - /** - * Used to check if it the recognizer receives valid input, like input.distance > 10. - * @memberof AttrRecognizer - * @param {Object} input - * @returns {Boolean} recognized - */ - attrTest: function(input) { - var optionPointers = this.options.pointers; - return optionPointers === 0 || input.pointers.length === optionPointers; - }, - - /** - * Process the input and return the state for the recognizer - * @memberof AttrRecognizer - * @param {Object} input - * @returns {*} State - */ - process: function(input) { - var state = this.state; - var eventType = input.eventType; - - var isRecognized = state & (STATE_BEGAN | STATE_CHANGED); - var isValid = this.attrTest(input); - - // on cancel input and we've recognized before, return STATE_CANCELLED - if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) { - return state | STATE_CANCELLED; - } else if (isRecognized || isValid) { - if (eventType & INPUT_END) { - return state | STATE_ENDED; - } else if (!(state & STATE_BEGAN)) { - return STATE_BEGAN; - } - return state | STATE_CHANGED; - } - return STATE_FAILED; - } -}); - -/** - * Pan - * Recognized when the pointer is down and moved in the allowed direction. - * @constructor - * @extends AttrRecognizer - */ -function PanRecognizer() { - AttrRecognizer.apply(this, arguments); - - this.pX = null; - this.pY = null; -} - -inherit(PanRecognizer, AttrRecognizer, { - /** - * @namespace - * @memberof PanRecognizer - */ - defaults: { - event: 'pan', - threshold: 10, - pointers: 1, - direction: DIRECTION_ALL - }, - - getTouchAction: function() { - var direction = this.options.direction; - var actions = []; - if (direction & DIRECTION_HORIZONTAL) { - actions.push(TOUCH_ACTION_PAN_Y); - } - if (direction & DIRECTION_VERTICAL) { - actions.push(TOUCH_ACTION_PAN_X); - } - return actions; - }, - - directionTest: function(input) { - var options = this.options; - var hasMoved = true; - var distance = input.distance; - var direction = input.direction; - var x = input.deltaX; - var y = input.deltaY; - - // lock to axis? - if (!(direction & options.direction)) { - if (options.direction & DIRECTION_HORIZONTAL) { - direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT; - hasMoved = x != this.pX; - distance = Math.abs(input.deltaX); - } else { - direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN; - hasMoved = y != this.pY; - distance = Math.abs(input.deltaY); - } - } - input.direction = direction; - return hasMoved && distance > options.threshold && direction & options.direction; - }, - - attrTest: function(input) { - return AttrRecognizer.prototype.attrTest.call(this, input) && - (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input))); - }, - - emit: function(input) { - - this.pX = input.deltaX; - this.pY = input.deltaY; - - var direction = directionStr(input.direction); - - if (direction) { - input.additionalEvent = this.options.event + direction; - } - this._super.emit.call(this, input); - } -}); - -/** - * Pinch - * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out). - * @constructor - * @extends AttrRecognizer - */ -function PinchRecognizer() { - AttrRecognizer.apply(this, arguments); -} - -inherit(PinchRecognizer, AttrRecognizer, { - /** - * @namespace - * @memberof PinchRecognizer - */ - defaults: { - event: 'pinch', - threshold: 0, - pointers: 2 - }, - - getTouchAction: function() { - return [TOUCH_ACTION_NONE]; - }, - - attrTest: function(input) { - return this._super.attrTest.call(this, input) && - (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN); - }, - - emit: function(input) { - if (input.scale !== 1) { - var inOut = input.scale < 1 ? 'in' : 'out'; - input.additionalEvent = this.options.event + inOut; - } - this._super.emit.call(this, input); - } -}); - -/** - * Press - * Recognized when the pointer is down for x ms without any movement. - * @constructor - * @extends Recognizer - */ -function PressRecognizer() { - Recognizer.apply(this, arguments); - - this._timer = null; - this._input = null; -} - -inherit(PressRecognizer, Recognizer, { - /** - * @namespace - * @memberof PressRecognizer - */ - defaults: { - event: 'press', - pointers: 1, - time: 251, // minimal time of the pointer to be pressed - threshold: 9 // a minimal movement is ok, but keep it low - }, - - getTouchAction: function() { - return [TOUCH_ACTION_AUTO]; - }, - - process: function(input) { - var options = this.options; - var validPointers = input.pointers.length === options.pointers; - var validMovement = input.distance < options.threshold; - var validTime = input.deltaTime > options.time; - - this._input = input; - - // we only allow little movement - // and we've reached an end event, so a tap is possible - if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) { - this.reset(); - } else if (input.eventType & INPUT_START) { - this.reset(); - this._timer = setTimeoutContext(function() { - this.state = STATE_RECOGNIZED; - this.tryEmit(); - }, options.time, this); - } else if (input.eventType & INPUT_END) { - return STATE_RECOGNIZED; - } - return STATE_FAILED; - }, - - reset: function() { - clearTimeout(this._timer); - }, - - emit: function(input) { - if (this.state !== STATE_RECOGNIZED) { - return; - } - - if (input && (input.eventType & INPUT_END)) { - this.manager.emit(this.options.event + 'up', input); - } else { - this._input.timeStamp = now(); - this.manager.emit(this.options.event, this._input); - } - } -}); - -/** - * Rotate - * Recognized when two or more pointer are moving in a circular motion. - * @constructor - * @extends AttrRecognizer - */ -function RotateRecognizer() { - AttrRecognizer.apply(this, arguments); -} - -inherit(RotateRecognizer, AttrRecognizer, { - /** - * @namespace - * @memberof RotateRecognizer - */ - defaults: { - event: 'rotate', - threshold: 0, - pointers: 2 - }, - - getTouchAction: function() { - return [TOUCH_ACTION_NONE]; - }, - - attrTest: function(input) { - return this._super.attrTest.call(this, input) && - (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN); - } -}); - -/** - * Swipe - * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction. - * @constructor - * @extends AttrRecognizer - */ -function SwipeRecognizer() { - AttrRecognizer.apply(this, arguments); -} - -inherit(SwipeRecognizer, AttrRecognizer, { - /** - * @namespace - * @memberof SwipeRecognizer - */ - defaults: { - event: 'swipe', - threshold: 10, - velocity: 0.3, - direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL, - pointers: 1 - }, - - getTouchAction: function() { - return PanRecognizer.prototype.getTouchAction.call(this); - }, - - attrTest: function(input) { - var direction = this.options.direction; - var velocity; - - if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) { - velocity = input.overallVelocity; - } else if (direction & DIRECTION_HORIZONTAL) { - velocity = input.overallVelocityX; - } else if (direction & DIRECTION_VERTICAL) { - velocity = input.overallVelocityY; - } - - return this._super.attrTest.call(this, input) && - direction & input.offsetDirection && - input.distance > this.options.threshold && - input.maxPointers == this.options.pointers && - abs(velocity) > this.options.velocity && input.eventType & INPUT_END; - }, - - emit: function(input) { - var direction = directionStr(input.offsetDirection); - if (direction) { - this.manager.emit(this.options.event + direction, input); - } - - this.manager.emit(this.options.event, input); - } -}); - -/** - * A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur - * between the given interval and position. The delay option can be used to recognize multi-taps without firing - * a single tap. - * - * The eventData from the emitted event contains the property \`tapCount\`, which contains the amount of - * multi-taps being recognized. - * @constructor - * @extends Recognizer - */ -function TapRecognizer() { - Recognizer.apply(this, arguments); - - // previous time and center, - // used for tap counting - this.pTime = false; - this.pCenter = false; - - this._timer = null; - this._input = null; - this.count = 0; -} - -inherit(TapRecognizer, Recognizer, { - /** - * @namespace - * @memberof PinchRecognizer - */ - defaults: { - event: 'tap', - pointers: 1, - taps: 1, - interval: 300, // max time between the multi-tap taps - time: 250, // max time of the pointer to be down (like finger on the screen) - threshold: 9, // a minimal movement is ok, but keep it low - posThreshold: 10 // a multi-tap can be a bit off the initial position - }, - - getTouchAction: function() { - return [TOUCH_ACTION_MANIPULATION]; - }, - - process: function(input) { - var options = this.options; - - var validPointers = input.pointers.length === options.pointers; - var validMovement = input.distance < options.threshold; - var validTouchTime = input.deltaTime < options.time; - - this.reset(); - - if ((input.eventType & INPUT_START) && (this.count === 0)) { - return this.failTimeout(); - } - - // we only allow little movement - // and we've reached an end event, so a tap is possible - if (validMovement && validTouchTime && validPointers) { - if (input.eventType != INPUT_END) { - return this.failTimeout(); - } - - var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true; - var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold; - - this.pTime = input.timeStamp; - this.pCenter = input.center; - - if (!validMultiTap || !validInterval) { - this.count = 1; - } else { - this.count += 1; - } - - this._input = input; - - // if tap count matches we have recognized it, - // else it has began recognizing... - var tapCount = this.count % options.taps; - if (tapCount === 0) { - // no failing requirements, immediately trigger the tap event - // or wait as long as the multitap interval to trigger - if (!this.hasRequireFailures()) { - return STATE_RECOGNIZED; - } else { - this._timer = setTimeoutContext(function() { - this.state = STATE_RECOGNIZED; - this.tryEmit(); - }, options.interval, this); - return STATE_BEGAN; - } - } - } - return STATE_FAILED; - }, - - failTimeout: function() { - this._timer = setTimeoutContext(function() { - this.state = STATE_FAILED; - }, this.options.interval, this); - return STATE_FAILED; - }, - - reset: function() { - clearTimeout(this._timer); - }, - - emit: function() { - if (this.state == STATE_RECOGNIZED) { - this._input.tapCount = this.count; - this.manager.emit(this.options.event, this._input); - } - } -}); - -/** - * Simple way to create a manager with a default set of recognizers. - * @param {HTMLElement} element - * @param {Object} [options] - * @constructor - */ -function Hammer(element, options) { - options = options || {}; - options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset); - return new Manager(element, options); -} - -/** - * @const {string} - */ -Hammer.VERSION = '2.0.7'; - -/** - * default settings - * @namespace - */ -Hammer.defaults = { - /** - * set if DOM events are being triggered. - * But this is slower and unused by simple implementations, so disabled by default. - * @type {Boolean} - * @default false - */ - domEvents: false, - - /** - * The value for the touchAction property/fallback. - * When set to \`compute\` it will magically set the correct value based on the added recognizers. - * @type {String} - * @default compute - */ - touchAction: TOUCH_ACTION_COMPUTE, - - /** - * @type {Boolean} - * @default true - */ - enable: true, - - /** - * EXPERIMENTAL FEATURE -- can be removed/changed - * Change the parent input target element. - * If Null, then it is being set the to main element. - * @type {Null|EventTarget} - * @default null - */ - inputTarget: null, - - /** - * force an input class - * @type {Null|Function} - * @default null - */ - inputClass: null, - - /** - * Default recognizer setup when calling \`Hammer()\` - * When creating a new Manager these will be skipped. - * @type {Array} - */ - preset: [ - // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...] - [RotateRecognizer, {enable: false}], - [PinchRecognizer, {enable: false}, ['rotate']], - [SwipeRecognizer, {direction: DIRECTION_HORIZONTAL}], - [PanRecognizer, {direction: DIRECTION_HORIZONTAL}, ['swipe']], - [TapRecognizer], - [TapRecognizer, {event: 'doubletap', taps: 2}, ['tap']], - [PressRecognizer] - ], - - /** - * Some CSS properties can be used to improve the working of Hammer. - * Add them to this method and they will be set when creating a new Manager. - * @namespace - */ - cssProps: { - /** - * Disables text selection to improve the dragging gesture. Mainly for desktop browsers. - * @type {String} - * @default 'none' - */ - userSelect: 'none', - - /** - * Disable the Windows Phone grippers when pressing an element. - * @type {String} - * @default 'none' - */ - touchSelect: 'none', - - /** - * Disables the default callout shown when you touch and hold a touch target. - * On iOS, when you touch and hold a touch target such as a link, Safari displays - * a callout containing information about the link. This property allows you to disable that callout. - * @type {String} - * @default 'none' - */ - touchCallout: 'none', - - /** - * Specifies whether zooming is enabled. Used by IE10> - * @type {String} - * @default 'none' - */ - contentZooming: 'none', - - /** - * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers. - * @type {String} - * @default 'none' - */ - userDrag: 'none', - - /** - * Overrides the highlight color shown when the user taps a link or a JavaScript - * clickable element in iOS. This property obeys the alpha value, if specified. - * @type {String} - * @default 'rgba(0,0,0,0)' - */ - tapHighlightColor: 'rgba(0,0,0,0)' - } -}; - -var STOP = 1; -var FORCED_STOP = 2; - -/** - * Manager - * @param {HTMLElement} element - * @param {Object} [options] - * @constructor - */ -function Manager(element, options) { - this.options = assign({}, Hammer.defaults, options || {}); - - this.options.inputTarget = this.options.inputTarget || element; - - this.handlers = {}; - this.session = {}; - this.recognizers = []; - this.oldCssProps = {}; - - this.element = element; - this.input = createInputInstance(this); - this.touchAction = new TouchAction(this, this.options.touchAction); - - toggleCssProps(this, true); - - each(this.options.recognizers, function(item) { - var recognizer = this.add(new (item[0])(item[1])); - item[2] && recognizer.recognizeWith(item[2]); - item[3] && recognizer.requireFailure(item[3]); - }, this); -} - -Manager.prototype = { - /** - * set options - * @param {Object} options - * @returns {Manager} - */ - set: function(options) { - assign(this.options, options); - - // Options that need a little more setup - if (options.touchAction) { - this.touchAction.update(); - } - if (options.inputTarget) { - // Clean up existing event listeners and reinitialize - this.input.destroy(); - this.input.target = options.inputTarget; - this.input.init(); - } - return this; - }, - - /** - * stop recognizing for this session. - * This session will be discarded, when a new [input]start event is fired. - * When forced, the recognizer cycle is stopped immediately. - * @param {Boolean} [force] - */ - stop: function(force) { - this.session.stopped = force ? FORCED_STOP : STOP; - }, - - /** - * run the recognizers! - * called by the inputHandler function on every movement of the pointers (touches) - * it walks through all the recognizers and tries to detect the gesture that is being made - * @param {Object} inputData - */ - recognize: function(inputData) { - var session = this.session; - if (session.stopped) { - return; - } - - // run the touch-action polyfill - this.touchAction.preventDefaults(inputData); - - var recognizer; - var recognizers = this.recognizers; - - // this holds the recognizer that is being recognized. - // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED - // if no recognizer is detecting a thing, it is set to \`null\` - var curRecognizer = session.curRecognizer; - - // reset when the last recognizer is recognized - // or when we're in a new session - if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) { - curRecognizer = session.curRecognizer = null; - } - - var i = 0; - while (i < recognizers.length) { - recognizer = recognizers[i]; - - // find out if we are allowed try to recognize the input for this one. - // 1. allow if the session is NOT forced stopped (see the .stop() method) - // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one - // that is being recognized. - // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer. - // this can be setup with the \`recognizeWith()\` method on the recognizer. - if (session.stopped !== FORCED_STOP && ( // 1 - !curRecognizer || recognizer == curRecognizer || // 2 - recognizer.canRecognizeWith(curRecognizer))) { // 3 - recognizer.recognize(inputData); - } else { - recognizer.reset(); - } - - // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the - // current active recognizer. but only if we don't already have an active recognizer - if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) { - curRecognizer = session.curRecognizer = recognizer; - } - i++; - } - }, - - /** - * get a recognizer by its event name. - * @param {Recognizer|String} recognizer - * @returns {Recognizer|Null} - */ - get: function(recognizer) { - if (recognizer instanceof Recognizer) { - return recognizer; - } - - var recognizers = this.recognizers; - for (var i = 0; i < recognizers.length; i++) { - if (recognizers[i].options.event == recognizer) { - return recognizers[i]; - } - } - return null; - }, - - /** - * add a recognizer to the manager - * existing recognizers with the same event name will be removed - * @param {Recognizer} recognizer - * @returns {Recognizer|Manager} - */ - add: function(recognizer) { - if (invokeArrayArg(recognizer, 'add', this)) { - return this; - } - - // remove existing - var existing = this.get(recognizer.options.event); - if (existing) { - this.remove(existing); - } - - this.recognizers.push(recognizer); - recognizer.manager = this; - - this.touchAction.update(); - return recognizer; - }, - - /** - * remove a recognizer by name or instance - * @param {Recognizer|String} recognizer - * @returns {Manager} - */ - remove: function(recognizer) { - if (invokeArrayArg(recognizer, 'remove', this)) { - return this; - } - - recognizer = this.get(recognizer); - - // let's make sure this recognizer exists - if (recognizer) { - var recognizers = this.recognizers; - var index = inArray(recognizers, recognizer); - - if (index !== -1) { - recognizers.splice(index, 1); - this.touchAction.update(); - } - } - - return this; - }, - - /** - * bind event - * @param {String} events - * @param {Function} handler - * @returns {EventEmitter} this - */ - on: function(events, handler) { - if (events === undefined) { - return; - } - if (handler === undefined) { - return; - } - - var handlers = this.handlers; - each(splitStr(events), function(event) { - handlers[event] = handlers[event] || []; - handlers[event].push(handler); - }); - return this; - }, - - /** - * unbind event, leave emit blank to remove all handlers - * @param {String} events - * @param {Function} [handler] - * @returns {EventEmitter} this - */ - off: function(events, handler) { - if (events === undefined) { - return; - } - - var handlers = this.handlers; - each(splitStr(events), function(event) { - if (!handler) { - delete handlers[event]; - } else { - handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1); - } - }); - return this; - }, - - /** - * emit event to the listeners - * @param {String} event - * @param {Object} data - */ - emit: function(event, data) { - // we also want to trigger dom events - if (this.options.domEvents) { - triggerDomEvent(event, data); - } - - // no handlers, so skip it all - var handlers = this.handlers[event] && this.handlers[event].slice(); - if (!handlers || !handlers.length) { - return; - } - - data.type = event; - data.preventDefault = function() { - data.srcEvent.preventDefault(); - }; - - var i = 0; - while (i < handlers.length) { - handlers[i](data); - i++; - } - }, - - /** - * destroy the manager and unbinds all events - * it doesn't unbind dom events, that is the user own responsibility - */ - destroy: function() { - this.element && toggleCssProps(this, false); - - this.handlers = {}; - this.session = {}; - this.input.destroy(); - this.element = null; - } -}; - -/** - * add/remove the css properties as defined in manager.options.cssProps - * @param {Manager} manager - * @param {Boolean} add - */ -function toggleCssProps(manager, add) { - var element = manager.element; - if (!element.style) { - return; - } - var prop; - each(manager.options.cssProps, function(value, name) { - prop = prefixed(element.style, name); - if (add) { - manager.oldCssProps[prop] = element.style[prop]; - element.style[prop] = value; - } else { - element.style[prop] = manager.oldCssProps[prop] || ''; - } - }); - if (!add) { - manager.oldCssProps = {}; - } -} - -/** - * trigger dom event - * @param {String} event - * @param {Object} data - */ -function triggerDomEvent(event, data) { - var gestureEvent = document.createEvent('Event'); - gestureEvent.initEvent(event, true, true); - gestureEvent.gesture = data; - data.target.dispatchEvent(gestureEvent); -} - -assign(Hammer, { - INPUT_START: INPUT_START, - INPUT_MOVE: INPUT_MOVE, - INPUT_END: INPUT_END, - INPUT_CANCEL: INPUT_CANCEL, - - STATE_POSSIBLE: STATE_POSSIBLE, - STATE_BEGAN: STATE_BEGAN, - STATE_CHANGED: STATE_CHANGED, - STATE_ENDED: STATE_ENDED, - STATE_RECOGNIZED: STATE_RECOGNIZED, - STATE_CANCELLED: STATE_CANCELLED, - STATE_FAILED: STATE_FAILED, - - DIRECTION_NONE: DIRECTION_NONE, - DIRECTION_LEFT: DIRECTION_LEFT, - DIRECTION_RIGHT: DIRECTION_RIGHT, - DIRECTION_UP: DIRECTION_UP, - DIRECTION_DOWN: DIRECTION_DOWN, - DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL, - DIRECTION_VERTICAL: DIRECTION_VERTICAL, - DIRECTION_ALL: DIRECTION_ALL, - - Manager: Manager, - Input: Input, - TouchAction: TouchAction, - - TouchInput: TouchInput, - MouseInput: MouseInput, - PointerEventInput: PointerEventInput, - TouchMouseInput: TouchMouseInput, - SingleTouchInput: SingleTouchInput, - - Recognizer: Recognizer, - AttrRecognizer: AttrRecognizer, - Tap: TapRecognizer, - Pan: PanRecognizer, - Swipe: SwipeRecognizer, - Pinch: PinchRecognizer, - Rotate: RotateRecognizer, - Press: PressRecognizer, - - on: addEventListeners, - off: removeEventListeners, - each: each, - merge: merge, - extend: extend, - assign: assign, - inherit: inherit, - bindFn: bindFn, - prefixed: prefixed -}); - -// this prevents errors when Hammer is loaded in the presence of an AMD -// style loader but by script tag, not by the loader. -var freeGlobal = (typeof window !== 'undefined' ? window : (typeof self !== 'undefined' ? self : {})); // jshint ignore:line -freeGlobal.Hammer = Hammer; - -if (true) { - !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { - return Hammer; - }).call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); -} else {} - -})(window, document, 'Hammer'); - - -//# sourceURL=webpack://html-flip-book-base/./node_modules/hammerjs/hammer.js?`); - } - ), - /***/ - "../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/flipbook.scss": ( - /*!**********************************************************************************************************!*\ - !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/flipbook.scss ***! - \**********************************************************************************************************/ - /***/ - (module, __webpack_exports__, __webpack_require__) => { - eval(`__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ "../node_modules/css-loader/dist/runtime/noSourceMaps.js"); -/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ "../node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - - -var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default())); -// Module -___CSS_LOADER_EXPORT___.push([module.id, \`.flipbook { - height: 100%; - width: 100%; - overflow: hidden; -} - -.flipbook-debug-bar { - position: absolute; - bottom: 0; - left: 0; - width: 100%; - background-color: rgba(0, 0, 0, 0.5); - color: white; - padding: 10px; - box-sizing: border-box; - display: flex; - flex-wrap: wrap; - justify-content: space-between; - z-index: 9999; -}\`, ""]); -// Exports -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); - - -//# sourceURL=webpack://html-flip-book-base/./src/flipbook.scss?../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js`); - } - ), - /***/ - "../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/pages.scss": ( - /*!*******************************************************************************************************!*\ - !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/pages.scss ***! - \*******************************************************************************************************/ - /***/ - (module, __webpack_exports__, __webpack_require__) => { - eval(`__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ "../node_modules/css-loader/dist/runtime/noSourceMaps.js"); -/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ "../node_modules/css-loader/dist/runtime/api.js"); -/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); -// Imports - - -var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default())); -// Module -___CSS_LOADER_EXPORT___.push([module.id, \`.page { - position: absolute; - backface-visibility: hidden; - transform-style: preserve-3d; -} - -.page > * { - max-width: 100%; - max-height: 100%; - height: 100%; - width: 100%; - box-sizing: border-box; -}\`, ""]); -// Exports -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); - - -//# sourceURL=webpack://html-flip-book-base/./src/pages.scss?../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js`); - } - ), - /***/ - "../node_modules/css-loader/dist/runtime/api.js": ( - /*!******************************************************!*\ - !*** ../node_modules/css-loader/dist/runtime/api.js ***! - \******************************************************/ - /***/ - (module) => { - eval(` - -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ -module.exports = function (cssWithMappingToString) { - var list = []; - - // return the list of modules as css string - list.toString = function toString() { - return this.map(function (item) { - var content = ""; - var needLayer = typeof item[5] !== "undefined"; - if (item[4]) { - content += "@supports (".concat(item[4], ") {"); - } - if (item[2]) { - content += "@media ".concat(item[2], " {"); - } - if (needLayer) { - content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {"); - } - content += cssWithMappingToString(item); - if (needLayer) { - content += "}"; - } - if (item[2]) { - content += "}"; - } - if (item[4]) { - content += "}"; - } - return content; - }).join(""); - }; - - // import a list of modules into the list - list.i = function i(modules, media, dedupe, supports, layer) { - if (typeof modules === "string") { - modules = [[null, modules, undefined]]; - } - var alreadyImportedModules = {}; - if (dedupe) { - for (var k = 0; k < this.length; k++) { - var id = this[k][0]; - if (id != null) { - alreadyImportedModules[id] = true; - } - } - } - for (var _k = 0; _k < modules.length; _k++) { - var item = [].concat(modules[_k]); - if (dedupe && alreadyImportedModules[item[0]]) { - continue; - } - if (typeof layer !== "undefined") { - if (typeof item[5] === "undefined") { - item[5] = layer; - } else { - item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}"); - item[5] = layer; - } - } - if (media) { - if (!item[2]) { - item[2] = media; - } else { - item[1] = "@media ".concat(item[2], " {").concat(item[1], "}"); - item[2] = media; - } - } - if (supports) { - if (!item[4]) { - item[4] = "".concat(supports); - } else { - item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}"); - item[4] = supports; - } - } - list.push(item); - } - }; - return list; -}; - -//# sourceURL=webpack://html-flip-book-base/../node_modules/css-loader/dist/runtime/api.js?`); - } - ), - /***/ - "../node_modules/css-loader/dist/runtime/noSourceMaps.js": ( - /*!***************************************************************!*\ - !*** ../node_modules/css-loader/dist/runtime/noSourceMaps.js ***! - \***************************************************************/ - /***/ - (module) => { - eval(` - -module.exports = function (i) { - return i[1]; -}; - -//# sourceURL=webpack://html-flip-book-base/../node_modules/css-loader/dist/runtime/noSourceMaps.js?`); - } - ), - /***/ - "./src/flipbook.scss": ( - /*!***************************!*\ - !*** ./src/flipbook.scss ***! - \***************************/ - /***/ - (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - eval(`__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "../node_modules/style-loader/dist/runtime/styleDomAPI.js"); -/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/insertBySelector.js */ "../node_modules/style-loader/dist/runtime/insertBySelector.js"); -/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"); -/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "../node_modules/style-loader/dist/runtime/insertStyleElement.js"); -/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "../node_modules/style-loader/dist/runtime/styleTagTransform.js"); -/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_flipbook_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js!./flipbook.scss */ "../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/flipbook.scss"); - - - - - - - - - - - -var options = {}; - -options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default()); -options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default()); -options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head"); -options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default()); -options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default()); - -var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_flipbook_scss__WEBPACK_IMPORTED_MODULE_6__["default"], options); - - - - - /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_flipbook_scss__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_flipbook_scss__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_flipbook_scss__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined); - - -//# sourceURL=webpack://html-flip-book-base/./src/flipbook.scss?`); - } - ), - /***/ - "./src/pages.scss": ( - /*!************************!*\ - !*** ./src/pages.scss ***! - \************************/ - /***/ - (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - eval(`__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); -/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "../node_modules/style-loader/dist/runtime/styleDomAPI.js"); -/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/insertBySelector.js */ "../node_modules/style-loader/dist/runtime/insertBySelector.js"); -/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"); -/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "../node_modules/style-loader/dist/runtime/insertStyleElement.js"); -/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "../node_modules/style-loader/dist/runtime/styleTagTransform.js"); -/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_pages_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js!./pages.scss */ "../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/pages.scss"); - - - - - - - - - - - -var options = {}; - -options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default()); -options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default()); -options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head"); -options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default()); -options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default()); - -var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_pages_scss__WEBPACK_IMPORTED_MODULE_6__["default"], options); - - - - - /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_pages_scss__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_pages_scss__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_pages_scss__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined); - - -//# sourceURL=webpack://html-flip-book-base/./src/pages.scss?`); - } - ), - /***/ - "../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js": ( - /*!*****************************************************************************!*\ - !*** ../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***! - \*****************************************************************************/ - /***/ - (module) => { - eval(` - -var stylesInDOM = []; -function getIndexByIdentifier(identifier) { - var result = -1; - for (var i = 0; i < stylesInDOM.length; i++) { - if (stylesInDOM[i].identifier === identifier) { - result = i; - break; - } - } - return result; -} -function modulesToDom(list, options) { - var idCountMap = {}; - var identifiers = []; - for (var i = 0; i < list.length; i++) { - var item = list[i]; - var id = options.base ? item[0] + options.base : item[0]; - var count = idCountMap[id] || 0; - var identifier = "".concat(id, " ").concat(count); - idCountMap[id] = count + 1; - var indexByIdentifier = getIndexByIdentifier(identifier); - var obj = { - css: item[1], - media: item[2], - sourceMap: item[3], - supports: item[4], - layer: item[5] - }; - if (indexByIdentifier !== -1) { - stylesInDOM[indexByIdentifier].references++; - stylesInDOM[indexByIdentifier].updater(obj); - } else { - var updater = addElementStyle(obj, options); - options.byIndex = i; - stylesInDOM.splice(i, 0, { - identifier: identifier, - updater: updater, - references: 1 - }); - } - identifiers.push(identifier); - } - return identifiers; -} -function addElementStyle(obj, options) { - var api = options.domAPI(options); - api.update(obj); - var updater = function updater(newObj) { - if (newObj) { - if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) { - return; - } - api.update(obj = newObj); - } else { - api.remove(); - } - }; - return updater; -} -module.exports = function (list, options) { - options = options || {}; - list = list || []; - var lastIdentifiers = modulesToDom(list, options); - return function update(newList) { - newList = newList || []; - for (var i = 0; i < lastIdentifiers.length; i++) { - var identifier = lastIdentifiers[i]; - var index = getIndexByIdentifier(identifier); - stylesInDOM[index].references--; - } - var newLastIdentifiers = modulesToDom(newList, options); - for (var _i = 0; _i < lastIdentifiers.length; _i++) { - var _identifier = lastIdentifiers[_i]; - var _index = getIndexByIdentifier(_identifier); - if (stylesInDOM[_index].references === 0) { - stylesInDOM[_index].updater(); - stylesInDOM.splice(_index, 1); - } - } - lastIdentifiers = newLastIdentifiers; - }; -}; - -//# sourceURL=webpack://html-flip-book-base/../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js?`); - } - ), - /***/ - "../node_modules/style-loader/dist/runtime/insertBySelector.js": ( - /*!*********************************************************************!*\ - !*** ../node_modules/style-loader/dist/runtime/insertBySelector.js ***! - \*********************************************************************/ - /***/ - (module) => { - eval(` - -var memo = {}; - -/* istanbul ignore next */ -function getTarget(target) { - if (typeof memo[target] === "undefined") { - var styleTarget = document.querySelector(target); - - // Special case to return head of iframe instead of iframe itself - if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { - try { - // This will throw an exception if access to iframe is blocked - // due to cross-origin restrictions - styleTarget = styleTarget.contentDocument.head; - } catch (e) { - // istanbul ignore next - styleTarget = null; - } - } - memo[target] = styleTarget; - } - return memo[target]; -} - -/* istanbul ignore next */ -function insertBySelector(insert, style) { - var target = getTarget(insert); - if (!target) { - throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); - } - target.appendChild(style); -} -module.exports = insertBySelector; - -//# sourceURL=webpack://html-flip-book-base/../node_modules/style-loader/dist/runtime/insertBySelector.js?`); - } - ), - /***/ - "../node_modules/style-loader/dist/runtime/insertStyleElement.js": ( - /*!***********************************************************************!*\ - !*** ../node_modules/style-loader/dist/runtime/insertStyleElement.js ***! - \***********************************************************************/ - /***/ - (module) => { - eval(` - -/* istanbul ignore next */ -function insertStyleElement(options) { - var element = document.createElement("style"); - options.setAttributes(element, options.attributes); - options.insert(element, options.options); - return element; -} -module.exports = insertStyleElement; - -//# sourceURL=webpack://html-flip-book-base/../node_modules/style-loader/dist/runtime/insertStyleElement.js?`); - } - ), - /***/ - "../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js": ( - /*!***********************************************************************************!*\ - !*** ../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js ***! - \***********************************************************************************/ - /***/ - (module, __unused_webpack_exports, __webpack_require__) => { - eval(` - -/* istanbul ignore next */ -function setAttributesWithoutAttributes(styleElement) { - var nonce = true ? __webpack_require__.nc : 0; - if (nonce) { - styleElement.setAttribute("nonce", nonce); - } -} -module.exports = setAttributesWithoutAttributes; - -//# sourceURL=webpack://html-flip-book-base/../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js?`); - } - ), - /***/ - "../node_modules/style-loader/dist/runtime/styleDomAPI.js": ( - /*!****************************************************************!*\ - !*** ../node_modules/style-loader/dist/runtime/styleDomAPI.js ***! - \****************************************************************/ - /***/ - (module) => { - eval(` - -/* istanbul ignore next */ -function apply(styleElement, options, obj) { - var css = ""; - if (obj.supports) { - css += "@supports (".concat(obj.supports, ") {"); - } - if (obj.media) { - css += "@media ".concat(obj.media, " {"); - } - var needLayer = typeof obj.layer !== "undefined"; - if (needLayer) { - css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {"); - } - css += obj.css; - if (needLayer) { - css += "}"; - } - if (obj.media) { - css += "}"; - } - if (obj.supports) { - css += "}"; - } - var sourceMap = obj.sourceMap; - if (sourceMap && typeof btoa !== "undefined") { - css += "\\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */"); - } - - // For old IE - /* istanbul ignore if */ - options.styleTagTransform(css, styleElement, options.options); -} -function removeStyleElement(styleElement) { - // istanbul ignore if - if (styleElement.parentNode === null) { - return false; - } - styleElement.parentNode.removeChild(styleElement); -} - -/* istanbul ignore next */ -function domAPI(options) { - if (typeof document === "undefined") { - return { - update: function update() {}, - remove: function remove() {} - }; - } - var styleElement = options.insertStyleElement(options); - return { - update: function update(obj) { - apply(styleElement, options, obj); - }, - remove: function remove() { - removeStyleElement(styleElement); - } - }; -} -module.exports = domAPI; - -//# sourceURL=webpack://html-flip-book-base/../node_modules/style-loader/dist/runtime/styleDomAPI.js?`); - } - ), - /***/ - "../node_modules/style-loader/dist/runtime/styleTagTransform.js": ( - /*!**********************************************************************!*\ - !*** ../node_modules/style-loader/dist/runtime/styleTagTransform.js ***! - \**********************************************************************/ - /***/ - (module) => { - eval(` - -/* istanbul ignore next */ -function styleTagTransform(css, styleElement) { - if (styleElement.styleSheet) { - styleElement.styleSheet.cssText = css; - } else { - while (styleElement.firstChild) { - styleElement.removeChild(styleElement.firstChild); - } - styleElement.appendChild(document.createTextNode(css)); - } -} -module.exports = styleTagTransform; - -//# sourceURL=webpack://html-flip-book-base/../node_modules/style-loader/dist/runtime/styleTagTransform.js?`); - } - ), - /***/ - "./src/aspect-ratio.ts": ( - /*!*****************************!*\ - !*** ./src/aspect-ratio.ts ***! - \*****************************/ - /***/ - (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - eval(`__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ AspectRatioImpl: () => (/* binding */ AspectRatioImpl) -/* harmony export */ }); -class AspectRatioImpl { - width; - height; - static from(aspectRatio) { - return new AspectRatioImpl(aspectRatio.width, aspectRatio.height); - } - constructor(width, height) { - this.width = width; - this.height = height; - } - get value() { - return this.width / this.height; - } -} - - -//# sourceURL=webpack://html-flip-book-base/./src/aspect-ratio.ts?`); - } - ), - /***/ - "./src/flip-direction.ts": ( - /*!*******************************!*\ - !*** ./src/flip-direction.ts ***! - \*******************************/ - /***/ - (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - eval(`__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ FlipDirection: () => (/* binding */ FlipDirection) -/* harmony export */ }); -var FlipDirection; -(function (FlipDirection) { - FlipDirection["Forward"] = "Forward"; - FlipDirection["Backward"] = "Backward"; - FlipDirection["None"] = "None"; -})(FlipDirection || (FlipDirection = {})); - - -//# sourceURL=webpack://html-flip-book-base/./src/flip-direction.ts?`); - } - ), - /***/ - "./src/flipbook.ts": ( - /*!*************************!*\ - !*** ./src/flipbook.ts ***! - \*************************/ - /***/ - (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - eval(`__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ FlipBook: () => (/* binding */ FlipBook) -/* harmony export */ }); -/* harmony import */ var _pages_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pages.scss */ "./src/pages.scss"); -/* harmony import */ var _flipbook_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./flipbook.scss */ "./src/flipbook.scss"); -/* harmony import */ var hammerjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! hammerjs */ "./node_modules/hammerjs/hammer.js"); -/* harmony import */ var hammerjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(hammerjs__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _leaf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./leaf */ "./src/leaf.ts"); -/* harmony import */ var _flip_direction__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./flip-direction */ "./src/flip-direction.ts"); -/* harmony import */ var _size__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./size */ "./src/size.ts"); - - - - - - -const FAST_DELTA = 500; -class FlipBook { - bookElement; - pageElements = []; - pagesCount; - leafAspectRatio = { width: 2, height: 3 }; - coverAspectRatio = { - width: 2.15, - height: 3.15 - }; - direction = 'ltr'; - onPageChanged; - pageSemantics; - leaves = []; - // flipping state - currentLeaf = undefined; - flipDirection = _flip_direction__WEBPACK_IMPORTED_MODULE_4__.FlipDirection.None; - flipStartingPos = 0; - isDuringManualFlip = false; - flipDelta = 0; - isDuringAutoFlip = false; - touchStartingPos = { x: 0, y: 0 }; - prevVisiblePageIndices; - get isLTR() { - return this.direction === 'ltr'; - } - get isClosed() { - return !this.currentOrTurningLeaves[0]; - } - get isClosedInverted() { - return !this.currentLeaves[1]; - } - get currentLeaves() { - let secondLeafIndex = -1; - for (let i = this.leaves.length - 1; i >= 0; i--) { - const leaf = this.leaves[i]; - if (leaf.isTurned) { - secondLeafIndex = leaf.index + 1; - break; - } - } - return secondLeafIndex == -1 - ? [undefined, this.leaves[0]] - : secondLeafIndex == this.leaves.length - ? [this.leaves[secondLeafIndex - 1], undefined] - : [this.leaves[secondLeafIndex - 1], this.leaves[secondLeafIndex]]; - } - get currentOrTurningLeaves() { - let secondLeafIndex = -1; - for (let i = this.leaves.length - 1; i >= 0; i--) { - const leaf = this.leaves[i]; - if (leaf.isTurned || leaf.isTurning) { - secondLeafIndex = leaf.index + 1; - break; - } - } - return secondLeafIndex == -1 - ? [undefined, this.leaves[0]] - : secondLeafIndex == this.leaves.length - ? [this.leaves[secondLeafIndex - 1], undefined] - : [this.leaves[secondLeafIndex - 1], this.leaves[secondLeafIndex]]; - } - constructor(options) { - this.pagesCount = options.pagesCount; - this.leafAspectRatio = options.leafAspectRatio || this.leafAspectRatio; - this.coverAspectRatio = options.coverAspectRatio || this.coverAspectRatio; - this.direction = options.direction || this.direction; - this.pageSemantics = options.pageSemantics; - this.onPageChanged = options.onPageChanged; - } - render(selector, debug = false) { - const bookElement = document.querySelector(selector); - if (!bookElement) { - throw new Error(\`Couldn't find container with selector: \${selector}\`); - } - this.bookElement = bookElement; - if (!this.bookElement.classList.contains('flipbook')) { - this.bookElement.classList.add('flipbook'); - } - const pageElements = bookElement.querySelectorAll('.page'); - if (!pageElements.length) { - throw new Error('No pages found in flipbook'); - } - this.pageElements = Array.from(pageElements); - this.leaves.splice(0, this.leaves.length); - const leavesCount = Math.ceil(this.pagesCount / 2); - const maxCoverSize = new _size__WEBPACK_IMPORTED_MODULE_5__.Size(this.bookElement.clientWidth / 2, this.bookElement.clientHeight); - const coverSize = maxCoverSize.aspectRatioFit(this.coverAspectRatio); - const leafSize = new _size__WEBPACK_IMPORTED_MODULE_5__.Size((coverSize.width * this.leafAspectRatio.width) / - this.coverAspectRatio.width, (coverSize.height * this.leafAspectRatio.height) / - this.coverAspectRatio.height); - this.bookElement.style.perspective = \`\${Math.min(leafSize.width * 2, leafSize.height) * 2}px\`; - this.pageElements.forEach((pageElement, pageIndex) => { - pageElement.style.width = \`\${leafSize.width}px\`; - pageElement.style.height = \`\${leafSize.height}px\`; - pageElement.style.zIndex = \`\${this.pagesCount - pageIndex}\`; - pageElement.dataset.pageIndex = pageIndex.toString(); - pageElement.style[this.isLTR ? 'left' : 'right'] = \`\${(bookElement.clientWidth - 2 * leafSize.width) / 2}px\`; - pageElement.style.top = \`\${(bookElement.clientHeight - leafSize.height) / 2}px\`; - pageElement.dataset.pageSemanticName = - this.pageSemantics?.indexToSemanticName(pageIndex) ?? ''; - pageElement.dataset.pageTitle = - this.pageSemantics?.indexToTitle(pageIndex) ?? ''; - const leafIndex = Math.floor(pageIndex / 2); - const isOddPage = (pageIndex + 1) % 2 === 1; - // TODO: set dynamically by parameter and not by hardcoding eq 0 - pageElement.classList.add(isOddPage ? 'odd' : 'even', ...(pageIndex === 0 ? ['current-page'] : [])); - if (isOddPage) { - pageElement.style.transform = \`translateX(\${this.isLTR ? \`\` : \`-\`}100%)\`; - this.leaves[leafIndex] = new _leaf__WEBPACK_IMPORTED_MODULE_3__.Leaf(leafIndex, [pageElement, undefined], - // TODO: set turned based on initialized page - _leaf__WEBPACK_IMPORTED_MODULE_3__.NOT_FLIPPED, { - isLTR: this.isLTR, - leavesCount: leavesCount, - pagesCount: this.pagesCount - }, (direction) => { - const currentVisiblePageIndices = direction == _flip_direction__WEBPACK_IMPORTED_MODULE_4__.FlipDirection.Forward - ? pageIndex + 2 === this.pagesCount - ? [pageIndex + 1] - : [pageIndex + 1, pageIndex + 2] - : pageIndex === 0 - ? [pageIndex] - : [pageIndex - 1, pageIndex]; - if (this.prevVisiblePageIndices && - this.prevVisiblePageIndices.length === - currentVisiblePageIndices.length && - currentVisiblePageIndices.every((v, i) => v === this.prevVisiblePageIndices[i])) { - return; - } - const prevVisiblePageIndices = this.prevVisiblePageIndices; - this.prevVisiblePageIndices = currentVisiblePageIndices; - this.onTurned(currentVisiblePageIndices, prevVisiblePageIndices); - }); - } - else { - pageElement.style.transform = \`scaleX(-1)translateX(\${this.isLTR ? \`-\` : \`\`}100%)\`; - this.leaves[leafIndex].pages[1] = pageElement; - } - }); - const hammer = new (hammerjs__WEBPACK_IMPORTED_MODULE_2___default())(this.bookElement); - hammer.on('panstart', this.onDragStart.bind(this)); - hammer.on('panmove', this.onDragUpdate.bind(this)); - hammer.on('panend', this.onDragEnd.bind(this)); - this.bookElement.addEventListener('touchstart', this.handleTouchStart.bind(this), { passive: false }); - this.bookElement.addEventListener('touchmove', this.handleTouchMove.bind(this), { passive: false }); - if (debug) - this.fillDebugBar(); - } - fillDebugBar() { - const debugBar = document.createElement('div'); - debugBar.className = 'flipbook-debug-bar'; - this.bookElement?.appendChild(debugBar); - setInterval(() => { - // Populate debug bar with relevant information - debugBar.innerHTML = \`\r -
Direction: \${this.isLTR ? 'LTR' : 'RTL'}
\r -
Current Leaf: \${this.currentLeaf ? this.currentLeaf.index : 'None'}
\r -
Flip dir: \${this.flipDirection}
\r -
Flip Δ: \${this.flipDelta}
\r -
Current Leaf Flip Position: \${this.currentLeaf?.flipPosition.toFixed(3)}
\r -
Is During Auto Flip: \${this.isDuringAutoFlip}
\r - \`; - }, 10); - } - onDragStart(event) { - console.log('drag start'); - if (this.currentLeaf || this.isDuringAutoFlip) { - this.flipDirection = _flip_direction__WEBPACK_IMPORTED_MODULE_4__.FlipDirection.None; - this.flipStartingPos = 0; - return; - } - this.flipStartingPos = event.center.x; - } - onDragUpdate(event) { - console.log('drag update'); - if (this.isDuringAutoFlip || this.isDuringManualFlip) { - return; - } - this.isDuringManualFlip = true; - try { - const currentPos = event.center.x; - this.flipDelta = this.isLTR - ? this.flipStartingPos - currentPos - : currentPos - this.flipStartingPos; - const bookWidth = this.bookElement?.clientWidth ?? 0; - if (Math.abs(this.flipDelta) > bookWidth) - return; - if (this.flipDelta === 0) - return; - this.flipDirection = - this.flipDirection !== _flip_direction__WEBPACK_IMPORTED_MODULE_4__.FlipDirection.None - ? this.flipDirection - : this.flipDelta > 0 - ? _flip_direction__WEBPACK_IMPORTED_MODULE_4__.FlipDirection.Forward - : _flip_direction__WEBPACK_IMPORTED_MODULE_4__.FlipDirection.Backward; - switch (this.flipDirection) { - case _flip_direction__WEBPACK_IMPORTED_MODULE_4__.FlipDirection.Forward: - const posForward = (this.flipDelta / bookWidth); - if (posForward > 1 || this.flipDelta < 0) { - return; - } - if (!this.currentLeaf) { - if (this.isClosedInverted) { - return; - } - else { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- when \`!this.isClosedInverted\` there will always be a second leaf in \`this.currentOrTurningLeaves\` - this.currentLeaf = this.currentOrTurningLeaves[1]; - } - } - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- at this point \`this.currentLeaf\` is guaranteed to be defined - this.currentLeaf.efficientFlipToPosition(posForward); - break; - case _flip_direction__WEBPACK_IMPORTED_MODULE_4__.FlipDirection.Backward: - const posBackward = (1 - - Math.abs(this.flipDelta) / bookWidth); - if (posBackward < 0 || this.flipDelta > 0) { - return; - } - if (!this.currentLeaf) { - if (this.isClosed) { - return; - } - else { - this.currentLeaf = this.currentOrTurningLeaves[0]; - } - } - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- at this point \`this.currentLeaf\` is guaranteed to be defined - this.currentLeaf.efficientFlipToPosition(posBackward); - break; - } - } - finally { - this.isDuringManualFlip = false; - } - } - async onDragEnd(event) { - console.log('drag end'); - if (!this.currentLeaf || this.isDuringAutoFlip) { - this.flipDirection = _flip_direction__WEBPACK_IMPORTED_MODULE_4__.FlipDirection.None; - this.flipStartingPos = 0; - return; - } - const ppsX = event.velocityX * 1000; // pixels per second - let flipTo; - switch (this.flipDirection) { - case _flip_direction__WEBPACK_IMPORTED_MODULE_4__.FlipDirection.Forward: - if ((this.isLTR ? ppsX < -FAST_DELTA : ppsX > FAST_DELTA) || - this.currentLeaf.flipPosition >= 0.5) { - flipTo = 1; - } - else { - flipTo = 0; - } - break; - case _flip_direction__WEBPACK_IMPORTED_MODULE_4__.FlipDirection.Backward: - if ((this.isLTR ? ppsX > FAST_DELTA : ppsX < -FAST_DELTA) || - this.currentLeaf.flipPosition <= 0.5) { - flipTo = 0; - } - else { - flipTo = 1; - } - break; - default: - return; - } - this.isDuringAutoFlip = true; - this.flipDirection = _flip_direction__WEBPACK_IMPORTED_MODULE_4__.FlipDirection.None; - this.flipStartingPos = 0; - await this.currentLeaf.flipToPosition(flipTo); - this.isDuringAutoFlip = false; - this.currentLeaf = undefined; - } - handleTouchStart = (e) => { - if (e.touches.length > 1) { - return; - } - const touch = e.touches[0]; - this.touchStartingPos = { x: touch.pageX, y: touch.pageY }; - }; - handleTouchMove = (e) => { - if (e.touches.length > 1) { - return; - } - const touch = e.touches[0]; - const deltaX = touch.pageX - this.touchStartingPos.x; - const deltaY = touch.pageY - this.touchStartingPos.y; - // only allow vertical scrolling, as if allowing horizontal scrolling, it will interfere with the flip gesture (for touch devices) - // TODO: allow horizontal scrolling if the user is not trying to flip, say if is scrolling an overflowed element - if (Math.abs(deltaX) > Math.abs(deltaY)) { - e.preventDefault(); - } - }; - onTurned(currentVisiblePageIndices, prevVisibilePageIndices) { - for (let i = 0; i < this.pageElements.length; i++) { - const pageElement = this.pageElements[i]; - const action = currentVisiblePageIndices.includes(i) - ? pageElement.classList.add - : !prevVisibilePageIndices || !prevVisibilePageIndices.includes - ? () => null - : pageElement.classList.remove; - action.bind(pageElement.classList)('current-page'); - } - } - jumpToPage(pageIndex) { - if (this.onPageChanged) { - this.onPageChanged(pageIndex); - } - } -} - - - -//# sourceURL=webpack://html-flip-book-base/./src/flipbook.ts?`); - } - ), - /***/ - "./src/leaf.ts": ( - /*!*********************!*\ - !*** ./src/leaf.ts ***! - \*********************/ - /***/ - (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - eval(`__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ FLIPPED: () => (/* binding */ FLIPPED), -/* harmony export */ Leaf: () => (/* binding */ Leaf), -/* harmony export */ NOT_FLIPPED: () => (/* binding */ NOT_FLIPPED) -/* harmony export */ }); -/* harmony import */ var throttle_debounce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! throttle-debounce */ "./node_modules/throttle-debounce/esm/index.js"); -/* harmony import */ var _flip_direction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./flip-direction */ "./src/flip-direction.ts"); - - -const FLIPPED = true; -const NOT_FLIPPED = false; -class Leaf { - index; - pages; - bookProperties; - onTurned; - currentAnimation = null; - targetFlipPosition = null; - wrappedFlipPosition; - constructor(index, pages, isFlipped, bookProperties, onTurned) { - this.index = index; - this.pages = pages; - this.bookProperties = bookProperties; - this.onTurned = onTurned; - this.wrappedFlipPosition = isFlipped ? 1 : 0; - // TODO: rethink this - // if(isFlipped) { - // // this.flipToPosition(1); - // } - } - get isTurned() { - return this.flipPosition === 1; - } - get isTurning() { - return this.flipPosition !== 0; - } - get isCover() { - return this.isFirst || this.isLast; - } - get isFirst() { - return this.index === 0; - } - get isLast() { - return this.index === this.bookProperties.leavesCount - 1; - } - set flipPosition(value) { - this.wrappedFlipPosition = Math.max(0, Math.min(1, value)); - } - get flipPosition() { - return this.wrappedFlipPosition; - } - async flipToPosition(flipPosition, velocity = 225) { - if (this.currentAnimation) { - await this.currentAnimation; - } - if (this.flipPosition === flipPosition) { - return Promise.resolve(); - } - if (this.targetFlipPosition === flipPosition) { - return this.currentAnimation ?? Promise.resolve(); - } - this.targetFlipPosition = flipPosition; - this.currentAnimation = new Promise(resolve => { - const currentFlipPosition = this.flipPosition; - const distance = Math.abs(flipPosition - currentFlipPosition); - const duration = ((distance * 180) / velocity) * 1000; // duration in milliseconds - const start = performance.now(); - const step = (timestamp) => { - const elapsed = timestamp - start; - if (elapsed < 0) { - requestAnimationFrame(step); - return; - } - const progress = Math.min(elapsed / duration, 1); - const newPosition = currentFlipPosition + progress * (flipPosition - currentFlipPosition); - this.pages.forEach((page, index) => { - const isLTR = this.bookProperties.isLTR; - if (page) { - const isOdd = (index % 2) + 1 === 1; - const degrees = isOdd - ? isLTR - ? newPosition > 0.5 - ? 180 - newPosition * 180 - : -newPosition * 180 - : newPosition > 0.5 - ? -(180 - newPosition * 180) - : newPosition * 180 - : isLTR - ? newPosition < 0.5 - ? -newPosition * 180 - : 180 - newPosition * 180 - : newPosition < 0.5 - ? newPosition * 180 - : -(180 - newPosition * 180); - const rotateY = \`\${degrees}deg\`; - const translateX = \`\${isOdd ? (isLTR ? \`100%\` : \`-100%\`) : isLTR ? \`0px\` : \`0px\`}\`; - const scaleX = isOdd - ? newPosition > 0.5 - ? -1 - : 1 - : newPosition < 0.5 - ? -1 - : 1; - page.style.transform = \`translateX(\${translateX})rotateY(\${rotateY})scaleX(\${scaleX})\`; - // console.log(page.style.transform); - page.style.transformOrigin = isOdd - ? \`\${isLTR ? 'left' : 'right'}\` - : \`\${isLTR ? 'right' : 'left'}\`; - page.style.zIndex = \`\${newPosition > 0.5 - ? page.dataset.pageIndex - : this.bookProperties.pagesCount - - page.dataset.pageIndex}\`; - } - }); - // Ensure the new position is within valid bounds [0, 1] - this.flipPosition = Math.max(0, Math.min(1, newPosition)); - if (this.flipPosition === 1 || this.flipPosition === 0) { - this.onTurned(this.flipPosition === 1 - ? _flip_direction__WEBPACK_IMPORTED_MODULE_1__.FlipDirection.Forward - : _flip_direction__WEBPACK_IMPORTED_MODULE_1__.FlipDirection.Backward); - } - // Detailed log for debugging - // console.log( - // \`Timestamp: \${timestamp}, Elapsed: \${elapsed}, Progress: \${progress}, Current Position: \${currentFlipPosition}, Requested Position: \${flipPosition}, New Position: \${this.flipPosition}\` - // ); - if (progress < 1) { - requestAnimationFrame(step); - } - else { - this.currentAnimation = null; - this.targetFlipPosition = null; - resolve(); - } - }; - requestAnimationFrame(step); - }); - return this.currentAnimation; - } - async efficientFlipToPosition(flipPosition, velocity = 20000) { - return (0,throttle_debounce__WEBPACK_IMPORTED_MODULE_0__.throttle)(1, this.flipToPosition.bind(this))(flipPosition, velocity); - } -} - - -//# sourceURL=webpack://html-flip-book-base/./src/leaf.ts?`); - } - ), - /***/ - "./src/size.ts": ( - /*!*********************!*\ - !*** ./src/size.ts ***! - \*********************/ - /***/ - (__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - eval(`__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ Size: () => (/* binding */ Size) -/* harmony export */ }); -/* harmony import */ var _aspect_ratio__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./aspect-ratio */ "./src/aspect-ratio.ts"); - -class Size { - width; - height; - aspectRatio; - aspectRatioFit(rhsAspectRatio) { - const rhsAspectRatioValue = _aspect_ratio__WEBPACK_IMPORTED_MODULE_0__.AspectRatioImpl.from(rhsAspectRatio).value; - return this.aspectRatio.value > rhsAspectRatioValue - ? new Size(this.height * rhsAspectRatioValue, this.height) - : new Size(this.width, this.width / rhsAspectRatioValue); - } - constructor(width, height) { - this.width = width; - this.height = height; - this.aspectRatio = new _aspect_ratio__WEBPACK_IMPORTED_MODULE_0__.AspectRatioImpl(width, height); - } - get asString() { - return \`\${this.width}x\${this.height}\`; - } -} - - -//# sourceURL=webpack://html-flip-book-base/./src/size.ts?`); - } - ), - /***/ - "./node_modules/throttle-debounce/esm/index.js": ( - /*!*****************************************************!*\ - !*** ./node_modules/throttle-debounce/esm/index.js ***! - \*****************************************************/ - /***/ - (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - eval(`__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ debounce: () => (/* binding */ debounce), -/* harmony export */ throttle: () => (/* binding */ throttle) -/* harmony export */ }); -/* eslint-disable no-undefined,no-param-reassign,no-shadow */ - -/** - * Throttle execution of a function. Especially useful for rate limiting - * execution of handlers on events like resize and scroll. - * - * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) - * are most useful. - * @param {Function} callback - A function to be executed after delay milliseconds. The \`this\` context and all arguments are passed through, - * as-is, to \`callback\` when the throttled-function is executed. - * @param {object} [options] - An object to configure options. - * @param {boolean} [options.noTrailing] - Optional, defaults to false. If noTrailing is true, callback will only execute every \`delay\` milliseconds - * while the throttled-function is being called. If noTrailing is false or unspecified, callback will be executed - * one final time after the last throttled-function call. (After the throttled-function has not been called for - * \`delay\` milliseconds, the internal counter is reset). - * @param {boolean} [options.noLeading] - Optional, defaults to false. If noLeading is false, the first throttled-function call will execute callback - * immediately. If noLeading is true, the first the callback execution will be skipped. It should be noted that - * callback will never executed if both noLeading = true and noTrailing = true. - * @param {boolean} [options.debounceMode] - If \`debounceMode\` is true (at begin), schedule \`clear\` to execute after \`delay\` ms. If \`debounceMode\` is - * false (at end), schedule \`callback\` to execute after \`delay\` ms. - * - * @returns {Function} A new, throttled, function. - */ -function throttle (delay, callback, options) { - var _ref = options || {}, - _ref$noTrailing = _ref.noTrailing, - noTrailing = _ref$noTrailing === void 0 ? false : _ref$noTrailing, - _ref$noLeading = _ref.noLeading, - noLeading = _ref$noLeading === void 0 ? false : _ref$noLeading, - _ref$debounceMode = _ref.debounceMode, - debounceMode = _ref$debounceMode === void 0 ? undefined : _ref$debounceMode; - /* - * After wrapper has stopped being called, this timeout ensures that - * \`callback\` is executed at the proper times in \`throttle\` and \`end\` - * debounce modes. - */ - - - var timeoutID; - var cancelled = false; // Keep track of the last time \`callback\` was executed. - - var lastExec = 0; // Function to clear existing timeout - - function clearExistingTimeout() { - if (timeoutID) { - clearTimeout(timeoutID); - } - } // Function to cancel next exec - - - function cancel(options) { - var _ref2 = options || {}, - _ref2$upcomingOnly = _ref2.upcomingOnly, - upcomingOnly = _ref2$upcomingOnly === void 0 ? false : _ref2$upcomingOnly; - - clearExistingTimeout(); - cancelled = !upcomingOnly; - } - /* - * The \`wrapper\` function encapsulates all of the throttling / debouncing - * functionality and when executed will limit the rate at which \`callback\` - * is executed. - */ - - - function wrapper() { - for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) { - arguments_[_key] = arguments[_key]; - } - - var self = this; - var elapsed = Date.now() - lastExec; - - if (cancelled) { - return; - } // Execute \`callback\` and update the \`lastExec\` timestamp. - - - function exec() { - lastExec = Date.now(); - callback.apply(self, arguments_); - } - /* - * If \`debounceMode\` is true (at begin) this is used to clear the flag - * to allow future \`callback\` executions. - */ - - - function clear() { - timeoutID = undefined; - } - - if (!noLeading && debounceMode && !timeoutID) { - /* - * Since \`wrapper\` is being called for the first time and - * \`debounceMode\` is true (at begin), execute \`callback\` - * and noLeading != true. - */ - exec(); - } - - clearExistingTimeout(); - - if (debounceMode === undefined && elapsed > delay) { - if (noLeading) { - /* - * In throttle mode with noLeading, if \`delay\` time has - * been exceeded, update \`lastExec\` and schedule \`callback\` - * to execute after \`delay\` ms. - */ - lastExec = Date.now(); - - if (!noTrailing) { - timeoutID = setTimeout(debounceMode ? clear : exec, delay); - } - } else { - /* - * In throttle mode without noLeading, if \`delay\` time has been exceeded, execute - * \`callback\`. - */ - exec(); - } - } else if (noTrailing !== true) { - /* - * In trailing throttle mode, since \`delay\` time has not been - * exceeded, schedule \`callback\` to execute \`delay\` ms after most - * recent execution. - * - * If \`debounceMode\` is true (at begin), schedule \`clear\` to execute - * after \`delay\` ms. - * - * If \`debounceMode\` is false (at end), schedule \`callback\` to - * execute after \`delay\` ms. - */ - timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay); - } - } - - wrapper.cancel = cancel; // Return the wrapper function. - - return wrapper; -} - -/* eslint-disable no-undefined */ -/** - * Debounce execution of a function. Debouncing, unlike throttling, - * guarantees that a function is only executed a single time, either at the - * very beginning of a series of calls, or at the very end. - * - * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful. - * @param {Function} callback - A function to be executed after delay milliseconds. The \`this\` context and all arguments are passed through, as-is, - * to \`callback\` when the debounced-function is executed. - * @param {object} [options] - An object to configure options. - * @param {boolean} [options.atBegin] - Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed \`delay\` milliseconds - * after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call. - * (After the throttled-function has not been called for \`delay\` milliseconds, the internal counter is reset). - * - * @returns {Function} A new, debounced function. - */ - -function debounce (delay, callback, options) { - var _ref = options || {}, - _ref$atBegin = _ref.atBegin, - atBegin = _ref$atBegin === void 0 ? false : _ref$atBegin; - - return throttle(delay, callback, { - debounceMode: atBegin !== false - }); -} - - -//# sourceMappingURL=index.js.map - - -//# sourceURL=webpack://html-flip-book-base/./node_modules/throttle-debounce/esm/index.js?`); - } - ) - /******/ -}, __webpack_module_cache__ = {}; -function __webpack_require__(o) { - var s = __webpack_module_cache__[o]; - if (s !== void 0) - return s.exports; - var l = __webpack_module_cache__[o] = { - /******/ - id: o, - /******/ - // no module.loaded needed - /******/ - exports: {} - /******/ - }; - return __webpack_modules__[o](l, l.exports, __webpack_require__), l.exports; -} -__webpack_require__.n = (o) => { - var s = o && o.__esModule ? ( - /******/ - () => o.default - ) : ( - /******/ - () => o - ); - return __webpack_require__.d(s, { a: s }), s; -}; -__webpack_require__.d = (o, s) => { - for (var l in s) - __webpack_require__.o(s, l) && !__webpack_require__.o(o, l) && Object.defineProperty(o, l, { enumerable: !0, get: s[l] }); -}; -__webpack_require__.o = (o, s) => Object.prototype.hasOwnProperty.call(o, s); -__webpack_require__.r = (o) => { - typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(o, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(o, "__esModule", { value: !0 }); -}; -__webpack_require__.nc = void 0; -var __webpack_exports__ = __webpack_require__("./src/flipbook.ts"), __webpack_exports__FlipBook = __webpack_exports__.FlipBook; -const FlipBookReact = ({ - pages: o, - className: s, - debug: l = !1, - direction: v = "ltr", +var Ei = $e.$; +const Pi = ({ + pages: d, + className: r, + debug: s = !1, + direction: u = "ltr", // Add the direction prop - pageSemantics: u = void 0 + pageSemantics: c = void 0 }) => { - const d = useRef( - new __webpack_exports__FlipBook({ - pageSemantics: u, - pagesCount: o.length, - direction: v + const v = oi( + new Ei({ + pageSemantics: c, + pagesCount: d.length, + direction: u }) ); - return useEffect(() => { - d.current.render(`.${s}`, l); - }, []), /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: s, children: o.map((g, p) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "page", children: g }, p)) }); + return si(() => { + v.current.render(`.${r}`, s); + }, []), /* @__PURE__ */ ze.jsx("div", { className: r, children: d.map((f, l) => /* @__PURE__ */ ze.jsx("div", { className: "page", children: f }, l)) }); }; export { - FlipBookReact as FlipBook + Pi as FlipBook }; //# sourceMappingURL=flip-book.js.map diff --git a/react/dist/flip-book.js.map b/react/dist/flip-book.js.map index 9141769..2722aee 100644 --- a/react/dist/flip-book.js.map +++ b/react/dist/flip-book.js.map @@ -1 +1 @@ -{"version":3,"file":"flip-book.js","sources":["../node_modules/react/cjs/react-jsx-runtime.production.js","../node_modules/react/cjs/react-jsx-runtime.development.js","../node_modules/react/jsx-runtime.js","../../base/dist/flipbook.js","../src/FlipBook.tsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function error(format) {\n for (\n var _len2 = arguments.length,\n args = Array(1 < _len2 ? _len2 - 1 : 0),\n _key2 = 1;\n _key2 < _len2;\n _key2++\n )\n args[_key2 - 1] = arguments[_key2];\n _len2 = format;\n _key2 = Error(\"react-stack-top-frame\");\n ReactSharedInternals.getCurrentStack &&\n ((_key2 = ReactSharedInternals.getCurrentStack(_key2)),\n \"\" !== _key2 && ((_len2 += \"%s\"), (args = args.concat([_key2]))));\n args.unshift(_len2);\n Function.prototype.apply.call(console.error, console, args);\n }\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE$2\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_CONTEXT_TYPE:\n return (type.displayName || \"Context\") + \".Provider\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result)\n return (\n (JSCompiler_inline_result =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\"),\n error(\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result\n ),\n testStringCoercion(value)\n );\n }\n function disabledLog() {}\n function disableLogs() {\n if (0 === disabledDepth) {\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd;\n var props = {\n configurable: !0,\n enumerable: !0,\n value: disabledLog,\n writable: !0\n };\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n }\n disabledDepth++;\n }\n function reenableLogs() {\n disabledDepth--;\n if (0 === disabledDepth) {\n var props = { configurable: !0, enumerable: !0, writable: !0 };\n Object.defineProperties(console, {\n log: assign({}, props, { value: prevLog }),\n info: assign({}, props, { value: prevInfo }),\n warn: assign({}, props, { value: prevWarn }),\n error: assign({}, props, { value: prevError }),\n group: assign({}, props, { value: prevGroup }),\n groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),\n groupEnd: assign({}, props, { value: prevGroupEnd })\n });\n }\n 0 > disabledDepth &&\n error(\n \"disabledDepth fell below zero. This is a bug in React. Please file an issue.\"\n );\n }\n function describeBuiltInComponentFrame(name) {\n if (void 0 === prefix)\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = (match && match[1]) || \"\";\n }\n return \"\\n\" + prefix + name;\n }\n function describeNativeComponentFrame(fn, construct) {\n if (!fn || reentry) return \"\";\n var frame = componentFrameCache.get(fn);\n if (void 0 !== frame) return frame;\n reentry = !0;\n frame = Error.prepareStackTrace;\n Error.prepareStackTrace = void 0;\n var previousDispatcher = null;\n previousDispatcher = ReactSharedInternals.H;\n ReactSharedInternals.H = null;\n disableLogs();\n var RunInRootFrame = {\n DetermineComponentFrameRoot: function () {\n try {\n if (construct) {\n var Fake = function () {\n throw Error();\n };\n Object.defineProperty(Fake.prototype, \"props\", {\n set: function () {\n throw Error();\n }\n });\n if (\"object\" === typeof Reflect && Reflect.construct) {\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n var control = x;\n }\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x$0) {\n control = x$0;\n }\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x$1) {\n control = x$1;\n }\n (Fake = fn()) &&\n \"function\" === typeof Fake.catch &&\n Fake.catch(function () {});\n }\n } catch (sample) {\n if (sample && control && \"string\" === typeof sample.stack)\n return [sample.stack, control.stack];\n }\n return [null, null];\n }\n };\n RunInRootFrame.DetermineComponentFrameRoot.displayName =\n \"DetermineComponentFrameRoot\";\n var namePropDescriptor = Object.getOwnPropertyDescriptor(\n RunInRootFrame.DetermineComponentFrameRoot,\n \"name\"\n );\n namePropDescriptor &&\n namePropDescriptor.configurable &&\n Object.defineProperty(\n RunInRootFrame.DetermineComponentFrameRoot,\n \"name\",\n { value: \"DetermineComponentFrameRoot\" }\n );\n try {\n var _RunInRootFrame$Deter =\n RunInRootFrame.DetermineComponentFrameRoot(),\n sampleStack = _RunInRootFrame$Deter[0],\n controlStack = _RunInRootFrame$Deter[1];\n if (sampleStack && controlStack) {\n var sampleLines = sampleStack.split(\"\\n\"),\n controlLines = controlStack.split(\"\\n\");\n for (\n sampleStack = _RunInRootFrame$Deter = 0;\n _RunInRootFrame$Deter < sampleLines.length &&\n !sampleLines[_RunInRootFrame$Deter].includes(\n \"DetermineComponentFrameRoot\"\n );\n\n )\n _RunInRootFrame$Deter++;\n for (\n ;\n sampleStack < controlLines.length &&\n !controlLines[sampleStack].includes(\"DetermineComponentFrameRoot\");\n\n )\n sampleStack++;\n if (\n _RunInRootFrame$Deter === sampleLines.length ||\n sampleStack === controlLines.length\n )\n for (\n _RunInRootFrame$Deter = sampleLines.length - 1,\n sampleStack = controlLines.length - 1;\n 1 <= _RunInRootFrame$Deter &&\n 0 <= sampleStack &&\n sampleLines[_RunInRootFrame$Deter] !== controlLines[sampleStack];\n\n )\n sampleStack--;\n for (\n ;\n 1 <= _RunInRootFrame$Deter && 0 <= sampleStack;\n _RunInRootFrame$Deter--, sampleStack--\n )\n if (\n sampleLines[_RunInRootFrame$Deter] !== controlLines[sampleStack]\n ) {\n if (1 !== _RunInRootFrame$Deter || 1 !== sampleStack) {\n do\n if (\n (_RunInRootFrame$Deter--,\n sampleStack--,\n 0 > sampleStack ||\n sampleLines[_RunInRootFrame$Deter] !==\n controlLines[sampleStack])\n ) {\n var _frame =\n \"\\n\" +\n sampleLines[_RunInRootFrame$Deter].replace(\n \" at new \",\n \" at \"\n );\n fn.displayName &&\n _frame.includes(\"\") &&\n (_frame = _frame.replace(\"\", fn.displayName));\n \"function\" === typeof fn &&\n componentFrameCache.set(fn, _frame);\n return _frame;\n }\n while (1 <= _RunInRootFrame$Deter && 0 <= sampleStack);\n }\n break;\n }\n }\n } finally {\n (reentry = !1),\n (ReactSharedInternals.H = previousDispatcher),\n reenableLogs(),\n (Error.prepareStackTrace = frame);\n }\n sampleLines = (sampleLines = fn ? fn.displayName || fn.name : \"\")\n ? describeBuiltInComponentFrame(sampleLines)\n : \"\";\n \"function\" === typeof fn && componentFrameCache.set(fn, sampleLines);\n return sampleLines;\n }\n function describeUnknownElementTypeFrameInDEV(type) {\n if (null == type) return \"\";\n if (\"function\" === typeof type) {\n var prototype = type.prototype;\n return describeNativeComponentFrame(\n type,\n !(!prototype || !prototype.isReactComponent)\n );\n }\n if (\"string\" === typeof type) return describeBuiltInComponentFrame(type);\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame(\"Suspense\");\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame(\"SuspenseList\");\n }\n if (\"object\" === typeof type)\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return (type = describeNativeComponentFrame(type.render, !1)), type;\n case REACT_MEMO_TYPE:\n return describeUnknownElementTypeFrameInDEV(type.type);\n case REACT_LAZY_TYPE:\n prototype = type._payload;\n type = type._init;\n try {\n return describeUnknownElementTypeFrameInDEV(type(prototype));\n } catch (x) {}\n }\n return \"\";\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function hasValidRef(config) {\n if (hasOwnProperty.call(config, \"ref\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"ref\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.ref;\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, _ref, self, source, owner, props) {\n _ref = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== _ref ? _ref : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n source,\n self\n ) {\n if (\n \"string\" === typeof type ||\n \"function\" === typeof type ||\n type === REACT_FRAGMENT_TYPE ||\n type === REACT_PROFILER_TYPE ||\n type === REACT_STRICT_MODE_TYPE ||\n type === REACT_SUSPENSE_TYPE ||\n type === REACT_SUSPENSE_LIST_TYPE ||\n type === REACT_OFFSCREEN_TYPE ||\n (\"object\" === typeof type &&\n null !== type &&\n (type.$$typeof === REACT_LAZY_TYPE ||\n type.$$typeof === REACT_MEMO_TYPE ||\n type.$$typeof === REACT_CONTEXT_TYPE ||\n type.$$typeof === REACT_CONSUMER_TYPE ||\n type.$$typeof === REACT_FORWARD_REF_TYPE ||\n type.$$typeof === REACT_CLIENT_REFERENCE$1 ||\n void 0 !== type.getModuleId))\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren], type);\n Object.freeze && Object.freeze(children);\n } else\n error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children, type);\n } else {\n children = \"\";\n if (\n void 0 === type ||\n (\"object\" === typeof type &&\n null !== type &&\n 0 === Object.keys(type).length)\n )\n children +=\n \" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.\";\n null === type\n ? (isStaticChildren = \"null\")\n : isArrayImpl(type)\n ? (isStaticChildren = \"array\")\n : void 0 !== type && type.$$typeof === REACT_ELEMENT_TYPE\n ? ((isStaticChildren =\n \"<\" + (getComponentNameFromType(type.type) || \"Unknown\") + \" />\"),\n (children =\n \" Did you accidentally export a JSX literal instead of a component?\"))\n : (isStaticChildren = typeof type);\n error(\n \"React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s\",\n isStaticChildren,\n children\n );\n }\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n hasValidRef(config);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n ((config =\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type),\n children && defineKeyPropWarningGetter(maybeKey, config));\n return ReactElement(\n type,\n children,\n null,\n self,\n source,\n getOwner(),\n maybeKey\n );\n }\n function validateChildKeys(node, parentType) {\n if (\n \"object\" === typeof node &&\n node &&\n node.$$typeof !== REACT_CLIENT_REFERENCE\n )\n if (isArrayImpl(node))\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n isValidElement(child) && validateExplicitKey(child, parentType);\n }\n else if (isValidElement(node))\n node._store && (node._store.validated = 1);\n else if (\n (null === node || \"object\" !== typeof node\n ? (i = null)\n : ((i =\n (MAYBE_ITERATOR_SYMBOL && node[MAYBE_ITERATOR_SYMBOL]) ||\n node[\"@@iterator\"]),\n (i = \"function\" === typeof i ? i : null)),\n \"function\" === typeof i &&\n i !== node.entries &&\n ((i = i.call(node)), i !== node))\n )\n for (; !(node = i.next()).done; )\n isValidElement(node.value) &&\n validateExplicitKey(node.value, parentType);\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n function validateExplicitKey(element, parentType) {\n if (\n element._store &&\n !element._store.validated &&\n null == element.key &&\n ((element._store.validated = 1),\n (parentType = getCurrentComponentErrorInfo(parentType)),\n !ownerHasKeyUseWarning[parentType])\n ) {\n ownerHasKeyUseWarning[parentType] = !0;\n var childOwner = \"\";\n element &&\n null != element._owner &&\n element._owner !== getOwner() &&\n ((childOwner = null),\n \"number\" === typeof element._owner.tag\n ? (childOwner = getComponentNameFromType(element._owner.type))\n : \"string\" === typeof element._owner.name &&\n (childOwner = element._owner.name),\n (childOwner = \" It was passed a child from \" + childOwner + \".\"));\n var prevGetCurrentStack = ReactSharedInternals.getCurrentStack;\n ReactSharedInternals.getCurrentStack = function () {\n var stack = describeUnknownElementTypeFrameInDEV(element.type);\n prevGetCurrentStack && (stack += prevGetCurrentStack() || \"\");\n return stack;\n };\n error(\n 'Each child in a list should have a unique \"key\" prop.%s%s See https://react.dev/link/warning-keys for more information.',\n parentType,\n childOwner\n );\n ReactSharedInternals.getCurrentStack = prevGetCurrentStack;\n }\n }\n function getCurrentComponentErrorInfo(parentType) {\n var info = \"\",\n owner = getOwner();\n owner &&\n (owner = getComponentNameFromType(owner.type)) &&\n (info = \"\\n\\nCheck the render method of `\" + owner + \"`.\");\n info ||\n ((parentType = getComponentNameFromType(parentType)) &&\n (info =\n \"\\n\\nCheck the top-level render call using <\" + parentType + \">.\"));\n return info;\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\");\n Symbol.for(\"react.provider\");\n var REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_OFFSCREEN_TYPE = Symbol.for(\"react.offscreen\"),\n MAYBE_ITERATOR_SYMBOL = Symbol.iterator,\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n REACT_CLIENT_REFERENCE$2 = Symbol.for(\"react.client.reference\"),\n hasOwnProperty = Object.prototype.hasOwnProperty,\n assign = Object.assign,\n REACT_CLIENT_REFERENCE$1 = Symbol.for(\"react.client.reference\"),\n isArrayImpl = Array.isArray,\n disabledDepth = 0,\n prevLog,\n prevInfo,\n prevWarn,\n prevError,\n prevGroup,\n prevGroupCollapsed,\n prevGroupEnd;\n disabledLog.__reactDisabledLog = !0;\n var prefix,\n reentry = !1;\n var componentFrameCache = new (\n \"function\" === typeof WeakMap ? WeakMap : Map\n )();\n var REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var didWarnAboutKeySpread = {},\n ownerHasKeyUseWarning = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey, source, self) {\n return jsxDEVImpl(type, config, maybeKey, !1, source, self);\n };\n exports.jsxs = function (type, config, maybeKey, source, self) {\n return jsxDEVImpl(type, config, maybeKey, !0, source, self);\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","/*\n * ATTENTION: The \"eval\" devtool has been used (maybe by default in mode: \"development\").\n * This devtool is neither made for production nor for readable output files.\n * It uses \"eval()\" calls to create a separate source file in the browser devtools.\n * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)\n * or disable the default devtool with \"devtool: false\".\n * If you are looking for production-ready output files, see mode: \"production\" (https://webpack.js.org/configuration/mode/).\n */\n/******/ var __webpack_modules__ = ({\n\n/***/ \"./node_modules/hammerjs/hammer.js\":\n/*!*****************************************!*\\\n !*** ./node_modules/hammerjs/hammer.js ***!\n \\*****************************************/\n/***/ ((module, exports, __webpack_require__) => {\n\neval(\"var __WEBPACK_AMD_DEFINE_RESULT__;/*! Hammer.JS - v2.0.7 - 2016-04-22\\n * http://hammerjs.github.io/\\n *\\n * Copyright (c) 2016 Jorik Tangelder;\\n * Licensed under the MIT license */\\n(function(window, document, exportName, undefined) {\\n 'use strict';\\n\\nvar VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];\\nvar TEST_ELEMENT = document.createElement('div');\\n\\nvar TYPE_FUNCTION = 'function';\\n\\nvar round = Math.round;\\nvar abs = Math.abs;\\nvar now = Date.now;\\n\\n/**\\n * set a timeout with a given scope\\n * @param {Function} fn\\n * @param {Number} timeout\\n * @param {Object} context\\n * @returns {number}\\n */\\nfunction setTimeoutContext(fn, timeout, context) {\\n return setTimeout(bindFn(fn, context), timeout);\\n}\\n\\n/**\\n * if the argument is an array, we want to execute the fn on each entry\\n * if it aint an array we don't want to do a thing.\\n * this is used by all the methods that accept a single and array argument.\\n * @param {*|Array} arg\\n * @param {String} fn\\n * @param {Object} [context]\\n * @returns {Boolean}\\n */\\nfunction invokeArrayArg(arg, fn, context) {\\n if (Array.isArray(arg)) {\\n each(arg, context[fn], context);\\n return true;\\n }\\n return false;\\n}\\n\\n/**\\n * walk objects and arrays\\n * @param {Object} obj\\n * @param {Function} iterator\\n * @param {Object} context\\n */\\nfunction each(obj, iterator, context) {\\n var i;\\n\\n if (!obj) {\\n return;\\n }\\n\\n if (obj.forEach) {\\n obj.forEach(iterator, context);\\n } else if (obj.length !== undefined) {\\n i = 0;\\n while (i < obj.length) {\\n iterator.call(context, obj[i], i, obj);\\n i++;\\n }\\n } else {\\n for (i in obj) {\\n obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);\\n }\\n }\\n}\\n\\n/**\\n * wrap a method with a deprecation warning and stack trace\\n * @param {Function} method\\n * @param {String} name\\n * @param {String} message\\n * @returns {Function} A new function wrapping the supplied method.\\n */\\nfunction deprecate(method, name, message) {\\n var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\\\\n' + message + ' AT \\\\n';\\n return function() {\\n var e = new Error('get-stack-trace');\\n var stack = e && e.stack ? e.stack.replace(/^[^\\\\(]+?[\\\\n$]/gm, '')\\n .replace(/^\\\\s+at\\\\s+/gm, '')\\n .replace(/^Object.\\\\s*\\\\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';\\n\\n var log = window.console && (window.console.warn || window.console.log);\\n if (log) {\\n log.call(window.console, deprecationMessage, stack);\\n }\\n return method.apply(this, arguments);\\n };\\n}\\n\\n/**\\n * extend object.\\n * means that properties in dest will be overwritten by the ones in src.\\n * @param {Object} target\\n * @param {...Object} objects_to_assign\\n * @returns {Object} target\\n */\\nvar assign;\\nif (typeof Object.assign !== 'function') {\\n assign = function assign(target) {\\n if (target === undefined || target === null) {\\n throw new TypeError('Cannot convert undefined or null to object');\\n }\\n\\n var output = Object(target);\\n for (var index = 1; index < arguments.length; index++) {\\n var source = arguments[index];\\n if (source !== undefined && source !== null) {\\n for (var nextKey in source) {\\n if (source.hasOwnProperty(nextKey)) {\\n output[nextKey] = source[nextKey];\\n }\\n }\\n }\\n }\\n return output;\\n };\\n} else {\\n assign = Object.assign;\\n}\\n\\n/**\\n * extend object.\\n * means that properties in dest will be overwritten by the ones in src.\\n * @param {Object} dest\\n * @param {Object} src\\n * @param {Boolean} [merge=false]\\n * @returns {Object} dest\\n */\\nvar extend = deprecate(function extend(dest, src, merge) {\\n var keys = Object.keys(src);\\n var i = 0;\\n while (i < keys.length) {\\n if (!merge || (merge && dest[keys[i]] === undefined)) {\\n dest[keys[i]] = src[keys[i]];\\n }\\n i++;\\n }\\n return dest;\\n}, 'extend', 'Use `assign`.');\\n\\n/**\\n * merge the values from src in the dest.\\n * means that properties that exist in dest will not be overwritten by src\\n * @param {Object} dest\\n * @param {Object} src\\n * @returns {Object} dest\\n */\\nvar merge = deprecate(function merge(dest, src) {\\n return extend(dest, src, true);\\n}, 'merge', 'Use `assign`.');\\n\\n/**\\n * simple class inheritance\\n * @param {Function} child\\n * @param {Function} base\\n * @param {Object} [properties]\\n */\\nfunction inherit(child, base, properties) {\\n var baseP = base.prototype,\\n childP;\\n\\n childP = child.prototype = Object.create(baseP);\\n childP.constructor = child;\\n childP._super = baseP;\\n\\n if (properties) {\\n assign(childP, properties);\\n }\\n}\\n\\n/**\\n * simple function bind\\n * @param {Function} fn\\n * @param {Object} context\\n * @returns {Function}\\n */\\nfunction bindFn(fn, context) {\\n return function boundFn() {\\n return fn.apply(context, arguments);\\n };\\n}\\n\\n/**\\n * let a boolean value also be a function that must return a boolean\\n * this first item in args will be used as the context\\n * @param {Boolean|Function} val\\n * @param {Array} [args]\\n * @returns {Boolean}\\n */\\nfunction boolOrFn(val, args) {\\n if (typeof val == TYPE_FUNCTION) {\\n return val.apply(args ? args[0] || undefined : undefined, args);\\n }\\n return val;\\n}\\n\\n/**\\n * use the val2 when val1 is undefined\\n * @param {*} val1\\n * @param {*} val2\\n * @returns {*}\\n */\\nfunction ifUndefined(val1, val2) {\\n return (val1 === undefined) ? val2 : val1;\\n}\\n\\n/**\\n * addEventListener with multiple events at once\\n * @param {EventTarget} target\\n * @param {String} types\\n * @param {Function} handler\\n */\\nfunction addEventListeners(target, types, handler) {\\n each(splitStr(types), function(type) {\\n target.addEventListener(type, handler, false);\\n });\\n}\\n\\n/**\\n * removeEventListener with multiple events at once\\n * @param {EventTarget} target\\n * @param {String} types\\n * @param {Function} handler\\n */\\nfunction removeEventListeners(target, types, handler) {\\n each(splitStr(types), function(type) {\\n target.removeEventListener(type, handler, false);\\n });\\n}\\n\\n/**\\n * find if a node is in the given parent\\n * @method hasParent\\n * @param {HTMLElement} node\\n * @param {HTMLElement} parent\\n * @return {Boolean} found\\n */\\nfunction hasParent(node, parent) {\\n while (node) {\\n if (node == parent) {\\n return true;\\n }\\n node = node.parentNode;\\n }\\n return false;\\n}\\n\\n/**\\n * small indexOf wrapper\\n * @param {String} str\\n * @param {String} find\\n * @returns {Boolean} found\\n */\\nfunction inStr(str, find) {\\n return str.indexOf(find) > -1;\\n}\\n\\n/**\\n * split string on whitespace\\n * @param {String} str\\n * @returns {Array} words\\n */\\nfunction splitStr(str) {\\n return str.trim().split(/\\\\s+/g);\\n}\\n\\n/**\\n * find if a array contains the object using indexOf or a simple polyFill\\n * @param {Array} src\\n * @param {String} find\\n * @param {String} [findByKey]\\n * @return {Boolean|Number} false when not found, or the index\\n */\\nfunction inArray(src, find, findByKey) {\\n if (src.indexOf && !findByKey) {\\n return src.indexOf(find);\\n } else {\\n var i = 0;\\n while (i < src.length) {\\n if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) {\\n return i;\\n }\\n i++;\\n }\\n return -1;\\n }\\n}\\n\\n/**\\n * convert array-like objects to real arrays\\n * @param {Object} obj\\n * @returns {Array}\\n */\\nfunction toArray(obj) {\\n return Array.prototype.slice.call(obj, 0);\\n}\\n\\n/**\\n * unique array with objects based on a key (like 'id') or just by the array's value\\n * @param {Array} src [{id:1},{id:2},{id:1}]\\n * @param {String} [key]\\n * @param {Boolean} [sort=False]\\n * @returns {Array} [{id:1},{id:2}]\\n */\\nfunction uniqueArray(src, key, sort) {\\n var results = [];\\n var values = [];\\n var i = 0;\\n\\n while (i < src.length) {\\n var val = key ? src[i][key] : src[i];\\n if (inArray(values, val) < 0) {\\n results.push(src[i]);\\n }\\n values[i] = val;\\n i++;\\n }\\n\\n if (sort) {\\n if (!key) {\\n results = results.sort();\\n } else {\\n results = results.sort(function sortUniqueArray(a, b) {\\n return a[key] > b[key];\\n });\\n }\\n }\\n\\n return results;\\n}\\n\\n/**\\n * get the prefixed property\\n * @param {Object} obj\\n * @param {String} property\\n * @returns {String|Undefined} prefixed\\n */\\nfunction prefixed(obj, property) {\\n var prefix, prop;\\n var camelProp = property[0].toUpperCase() + property.slice(1);\\n\\n var i = 0;\\n while (i < VENDOR_PREFIXES.length) {\\n prefix = VENDOR_PREFIXES[i];\\n prop = (prefix) ? prefix + camelProp : property;\\n\\n if (prop in obj) {\\n return prop;\\n }\\n i++;\\n }\\n return undefined;\\n}\\n\\n/**\\n * get a unique id\\n * @returns {number} uniqueId\\n */\\nvar _uniqueId = 1;\\nfunction uniqueId() {\\n return _uniqueId++;\\n}\\n\\n/**\\n * get the window object of an element\\n * @param {HTMLElement} element\\n * @returns {DocumentView|Window}\\n */\\nfunction getWindowForElement(element) {\\n var doc = element.ownerDocument || element;\\n return (doc.defaultView || doc.parentWindow || window);\\n}\\n\\nvar MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;\\n\\nvar SUPPORT_TOUCH = ('ontouchstart' in window);\\nvar SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined;\\nvar SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);\\n\\nvar INPUT_TYPE_TOUCH = 'touch';\\nvar INPUT_TYPE_PEN = 'pen';\\nvar INPUT_TYPE_MOUSE = 'mouse';\\nvar INPUT_TYPE_KINECT = 'kinect';\\n\\nvar COMPUTE_INTERVAL = 25;\\n\\nvar INPUT_START = 1;\\nvar INPUT_MOVE = 2;\\nvar INPUT_END = 4;\\nvar INPUT_CANCEL = 8;\\n\\nvar DIRECTION_NONE = 1;\\nvar DIRECTION_LEFT = 2;\\nvar DIRECTION_RIGHT = 4;\\nvar DIRECTION_UP = 8;\\nvar DIRECTION_DOWN = 16;\\n\\nvar DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;\\nvar DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;\\nvar DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;\\n\\nvar PROPS_XY = ['x', 'y'];\\nvar PROPS_CLIENT_XY = ['clientX', 'clientY'];\\n\\n/**\\n * create new input type manager\\n * @param {Manager} manager\\n * @param {Function} callback\\n * @returns {Input}\\n * @constructor\\n */\\nfunction Input(manager, callback) {\\n var self = this;\\n this.manager = manager;\\n this.callback = callback;\\n this.element = manager.element;\\n this.target = manager.options.inputTarget;\\n\\n // smaller wrapper around the handler, for the scope and the enabled state of the manager,\\n // so when disabled the input events are completely bypassed.\\n this.domHandler = function(ev) {\\n if (boolOrFn(manager.options.enable, [manager])) {\\n self.handler(ev);\\n }\\n };\\n\\n this.init();\\n\\n}\\n\\nInput.prototype = {\\n /**\\n * should handle the inputEvent data and trigger the callback\\n * @virtual\\n */\\n handler: function() { },\\n\\n /**\\n * bind the events\\n */\\n init: function() {\\n this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);\\n this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);\\n this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\\n },\\n\\n /**\\n * unbind the events\\n */\\n destroy: function() {\\n this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);\\n this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);\\n this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\\n }\\n};\\n\\n/**\\n * create new input type manager\\n * called by the Manager constructor\\n * @param {Hammer} manager\\n * @returns {Input}\\n */\\nfunction createInputInstance(manager) {\\n var Type;\\n var inputClass = manager.options.inputClass;\\n\\n if (inputClass) {\\n Type = inputClass;\\n } else if (SUPPORT_POINTER_EVENTS) {\\n Type = PointerEventInput;\\n } else if (SUPPORT_ONLY_TOUCH) {\\n Type = TouchInput;\\n } else if (!SUPPORT_TOUCH) {\\n Type = MouseInput;\\n } else {\\n Type = TouchMouseInput;\\n }\\n return new (Type)(manager, inputHandler);\\n}\\n\\n/**\\n * handle input events\\n * @param {Manager} manager\\n * @param {String} eventType\\n * @param {Object} input\\n */\\nfunction inputHandler(manager, eventType, input) {\\n var pointersLen = input.pointers.length;\\n var changedPointersLen = input.changedPointers.length;\\n var isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0));\\n var isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0));\\n\\n input.isFirst = !!isFirst;\\n input.isFinal = !!isFinal;\\n\\n if (isFirst) {\\n manager.session = {};\\n }\\n\\n // source event is the normalized value of the domEvents\\n // like 'touchstart, mouseup, pointerdown'\\n input.eventType = eventType;\\n\\n // compute scale, rotation etc\\n computeInputData(manager, input);\\n\\n // emit secret event\\n manager.emit('hammer.input', input);\\n\\n manager.recognize(input);\\n manager.session.prevInput = input;\\n}\\n\\n/**\\n * extend the data with some usable properties like scale, rotate, velocity etc\\n * @param {Object} manager\\n * @param {Object} input\\n */\\nfunction computeInputData(manager, input) {\\n var session = manager.session;\\n var pointers = input.pointers;\\n var pointersLength = pointers.length;\\n\\n // store the first input to calculate the distance and direction\\n if (!session.firstInput) {\\n session.firstInput = simpleCloneInputData(input);\\n }\\n\\n // to compute scale and rotation we need to store the multiple touches\\n if (pointersLength > 1 && !session.firstMultiple) {\\n session.firstMultiple = simpleCloneInputData(input);\\n } else if (pointersLength === 1) {\\n session.firstMultiple = false;\\n }\\n\\n var firstInput = session.firstInput;\\n var firstMultiple = session.firstMultiple;\\n var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;\\n\\n var center = input.center = getCenter(pointers);\\n input.timeStamp = now();\\n input.deltaTime = input.timeStamp - firstInput.timeStamp;\\n\\n input.angle = getAngle(offsetCenter, center);\\n input.distance = getDistance(offsetCenter, center);\\n\\n computeDeltaXY(session, input);\\n input.offsetDirection = getDirection(input.deltaX, input.deltaY);\\n\\n var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);\\n input.overallVelocityX = overallVelocity.x;\\n input.overallVelocityY = overallVelocity.y;\\n input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y;\\n\\n input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;\\n input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;\\n\\n input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length >\\n session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers);\\n\\n computeIntervalInputData(session, input);\\n\\n // find the correct target\\n var target = manager.element;\\n if (hasParent(input.srcEvent.target, target)) {\\n target = input.srcEvent.target;\\n }\\n input.target = target;\\n}\\n\\nfunction computeDeltaXY(session, input) {\\n var center = input.center;\\n var offset = session.offsetDelta || {};\\n var prevDelta = session.prevDelta || {};\\n var prevInput = session.prevInput || {};\\n\\n if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {\\n prevDelta = session.prevDelta = {\\n x: prevInput.deltaX || 0,\\n y: prevInput.deltaY || 0\\n };\\n\\n offset = session.offsetDelta = {\\n x: center.x,\\n y: center.y\\n };\\n }\\n\\n input.deltaX = prevDelta.x + (center.x - offset.x);\\n input.deltaY = prevDelta.y + (center.y - offset.y);\\n}\\n\\n/**\\n * velocity is calculated every x ms\\n * @param {Object} session\\n * @param {Object} input\\n */\\nfunction computeIntervalInputData(session, input) {\\n var last = session.lastInterval || input,\\n deltaTime = input.timeStamp - last.timeStamp,\\n velocity, velocityX, velocityY, direction;\\n\\n if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {\\n var deltaX = input.deltaX - last.deltaX;\\n var deltaY = input.deltaY - last.deltaY;\\n\\n var v = getVelocity(deltaTime, deltaX, deltaY);\\n velocityX = v.x;\\n velocityY = v.y;\\n velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y;\\n direction = getDirection(deltaX, deltaY);\\n\\n session.lastInterval = input;\\n } else {\\n // use latest velocity info if it doesn't overtake a minimum period\\n velocity = last.velocity;\\n velocityX = last.velocityX;\\n velocityY = last.velocityY;\\n direction = last.direction;\\n }\\n\\n input.velocity = velocity;\\n input.velocityX = velocityX;\\n input.velocityY = velocityY;\\n input.direction = direction;\\n}\\n\\n/**\\n * create a simple clone from the input used for storage of firstInput and firstMultiple\\n * @param {Object} input\\n * @returns {Object} clonedInputData\\n */\\nfunction simpleCloneInputData(input) {\\n // make a simple copy of the pointers because we will get a reference if we don't\\n // we only need clientXY for the calculations\\n var pointers = [];\\n var i = 0;\\n while (i < input.pointers.length) {\\n pointers[i] = {\\n clientX: round(input.pointers[i].clientX),\\n clientY: round(input.pointers[i].clientY)\\n };\\n i++;\\n }\\n\\n return {\\n timeStamp: now(),\\n pointers: pointers,\\n center: getCenter(pointers),\\n deltaX: input.deltaX,\\n deltaY: input.deltaY\\n };\\n}\\n\\n/**\\n * get the center of all the pointers\\n * @param {Array} pointers\\n * @return {Object} center contains `x` and `y` properties\\n */\\nfunction getCenter(pointers) {\\n var pointersLength = pointers.length;\\n\\n // no need to loop when only one touch\\n if (pointersLength === 1) {\\n return {\\n x: round(pointers[0].clientX),\\n y: round(pointers[0].clientY)\\n };\\n }\\n\\n var x = 0, y = 0, i = 0;\\n while (i < pointersLength) {\\n x += pointers[i].clientX;\\n y += pointers[i].clientY;\\n i++;\\n }\\n\\n return {\\n x: round(x / pointersLength),\\n y: round(y / pointersLength)\\n };\\n}\\n\\n/**\\n * calculate the velocity between two points. unit is in px per ms.\\n * @param {Number} deltaTime\\n * @param {Number} x\\n * @param {Number} y\\n * @return {Object} velocity `x` and `y`\\n */\\nfunction getVelocity(deltaTime, x, y) {\\n return {\\n x: x / deltaTime || 0,\\n y: y / deltaTime || 0\\n };\\n}\\n\\n/**\\n * get the direction between two points\\n * @param {Number} x\\n * @param {Number} y\\n * @return {Number} direction\\n */\\nfunction getDirection(x, y) {\\n if (x === y) {\\n return DIRECTION_NONE;\\n }\\n\\n if (abs(x) >= abs(y)) {\\n return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\\n }\\n return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\\n}\\n\\n/**\\n * calculate the absolute distance between two points\\n * @param {Object} p1 {x, y}\\n * @param {Object} p2 {x, y}\\n * @param {Array} [props] containing x and y keys\\n * @return {Number} distance\\n */\\nfunction getDistance(p1, p2, props) {\\n if (!props) {\\n props = PROPS_XY;\\n }\\n var x = p2[props[0]] - p1[props[0]],\\n y = p2[props[1]] - p1[props[1]];\\n\\n return Math.sqrt((x * x) + (y * y));\\n}\\n\\n/**\\n * calculate the angle between two coordinates\\n * @param {Object} p1\\n * @param {Object} p2\\n * @param {Array} [props] containing x and y keys\\n * @return {Number} angle\\n */\\nfunction getAngle(p1, p2, props) {\\n if (!props) {\\n props = PROPS_XY;\\n }\\n var x = p2[props[0]] - p1[props[0]],\\n y = p2[props[1]] - p1[props[1]];\\n return Math.atan2(y, x) * 180 / Math.PI;\\n}\\n\\n/**\\n * calculate the rotation degrees between two pointersets\\n * @param {Array} start array of pointers\\n * @param {Array} end array of pointers\\n * @return {Number} rotation\\n */\\nfunction getRotation(start, end) {\\n return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY);\\n}\\n\\n/**\\n * calculate the scale factor between two pointersets\\n * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\\n * @param {Array} start array of pointers\\n * @param {Array} end array of pointers\\n * @return {Number} scale\\n */\\nfunction getScale(start, end) {\\n return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);\\n}\\n\\nvar MOUSE_INPUT_MAP = {\\n mousedown: INPUT_START,\\n mousemove: INPUT_MOVE,\\n mouseup: INPUT_END\\n};\\n\\nvar MOUSE_ELEMENT_EVENTS = 'mousedown';\\nvar MOUSE_WINDOW_EVENTS = 'mousemove mouseup';\\n\\n/**\\n * Mouse events input\\n * @constructor\\n * @extends Input\\n */\\nfunction MouseInput() {\\n this.evEl = MOUSE_ELEMENT_EVENTS;\\n this.evWin = MOUSE_WINDOW_EVENTS;\\n\\n this.pressed = false; // mousedown state\\n\\n Input.apply(this, arguments);\\n}\\n\\ninherit(MouseInput, Input, {\\n /**\\n * handle mouse events\\n * @param {Object} ev\\n */\\n handler: function MEhandler(ev) {\\n var eventType = MOUSE_INPUT_MAP[ev.type];\\n\\n // on start we want to have the left mouse button down\\n if (eventType & INPUT_START && ev.button === 0) {\\n this.pressed = true;\\n }\\n\\n if (eventType & INPUT_MOVE && ev.which !== 1) {\\n eventType = INPUT_END;\\n }\\n\\n // mouse must be down\\n if (!this.pressed) {\\n return;\\n }\\n\\n if (eventType & INPUT_END) {\\n this.pressed = false;\\n }\\n\\n this.callback(this.manager, eventType, {\\n pointers: [ev],\\n changedPointers: [ev],\\n pointerType: INPUT_TYPE_MOUSE,\\n srcEvent: ev\\n });\\n }\\n});\\n\\nvar POINTER_INPUT_MAP = {\\n pointerdown: INPUT_START,\\n pointermove: INPUT_MOVE,\\n pointerup: INPUT_END,\\n pointercancel: INPUT_CANCEL,\\n pointerout: INPUT_CANCEL\\n};\\n\\n// in IE10 the pointer types is defined as an enum\\nvar IE10_POINTER_TYPE_ENUM = {\\n 2: INPUT_TYPE_TOUCH,\\n 3: INPUT_TYPE_PEN,\\n 4: INPUT_TYPE_MOUSE,\\n 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816\\n};\\n\\nvar POINTER_ELEMENT_EVENTS = 'pointerdown';\\nvar POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel';\\n\\n// IE10 has prefixed support, and case-sensitive\\nif (window.MSPointerEvent && !window.PointerEvent) {\\n POINTER_ELEMENT_EVENTS = 'MSPointerDown';\\n POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';\\n}\\n\\n/**\\n * Pointer events input\\n * @constructor\\n * @extends Input\\n */\\nfunction PointerEventInput() {\\n this.evEl = POINTER_ELEMENT_EVENTS;\\n this.evWin = POINTER_WINDOW_EVENTS;\\n\\n Input.apply(this, arguments);\\n\\n this.store = (this.manager.session.pointerEvents = []);\\n}\\n\\ninherit(PointerEventInput, Input, {\\n /**\\n * handle mouse events\\n * @param {Object} ev\\n */\\n handler: function PEhandler(ev) {\\n var store = this.store;\\n var removePointer = false;\\n\\n var eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');\\n var eventType = POINTER_INPUT_MAP[eventTypeNormalized];\\n var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;\\n\\n var isTouch = (pointerType == INPUT_TYPE_TOUCH);\\n\\n // get index of the event in the store\\n var storeIndex = inArray(store, ev.pointerId, 'pointerId');\\n\\n // start and mouse must be down\\n if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {\\n if (storeIndex < 0) {\\n store.push(ev);\\n storeIndex = store.length - 1;\\n }\\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\\n removePointer = true;\\n }\\n\\n // it not found, so the pointer hasn't been down (so it's probably a hover)\\n if (storeIndex < 0) {\\n return;\\n }\\n\\n // update the event in the store\\n store[storeIndex] = ev;\\n\\n this.callback(this.manager, eventType, {\\n pointers: store,\\n changedPointers: [ev],\\n pointerType: pointerType,\\n srcEvent: ev\\n });\\n\\n if (removePointer) {\\n // remove from the store\\n store.splice(storeIndex, 1);\\n }\\n }\\n});\\n\\nvar SINGLE_TOUCH_INPUT_MAP = {\\n touchstart: INPUT_START,\\n touchmove: INPUT_MOVE,\\n touchend: INPUT_END,\\n touchcancel: INPUT_CANCEL\\n};\\n\\nvar SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';\\nvar SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';\\n\\n/**\\n * Touch events input\\n * @constructor\\n * @extends Input\\n */\\nfunction SingleTouchInput() {\\n this.evTarget = SINGLE_TOUCH_TARGET_EVENTS;\\n this.evWin = SINGLE_TOUCH_WINDOW_EVENTS;\\n this.started = false;\\n\\n Input.apply(this, arguments);\\n}\\n\\ninherit(SingleTouchInput, Input, {\\n handler: function TEhandler(ev) {\\n var type = SINGLE_TOUCH_INPUT_MAP[ev.type];\\n\\n // should we handle the touch events?\\n if (type === INPUT_START) {\\n this.started = true;\\n }\\n\\n if (!this.started) {\\n return;\\n }\\n\\n var touches = normalizeSingleTouches.call(this, ev, type);\\n\\n // when done, reset the started state\\n if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {\\n this.started = false;\\n }\\n\\n this.callback(this.manager, type, {\\n pointers: touches[0],\\n changedPointers: touches[1],\\n pointerType: INPUT_TYPE_TOUCH,\\n srcEvent: ev\\n });\\n }\\n});\\n\\n/**\\n * @this {TouchInput}\\n * @param {Object} ev\\n * @param {Number} type flag\\n * @returns {undefined|Array} [all, changed]\\n */\\nfunction normalizeSingleTouches(ev, type) {\\n var all = toArray(ev.touches);\\n var changed = toArray(ev.changedTouches);\\n\\n if (type & (INPUT_END | INPUT_CANCEL)) {\\n all = uniqueArray(all.concat(changed), 'identifier', true);\\n }\\n\\n return [all, changed];\\n}\\n\\nvar TOUCH_INPUT_MAP = {\\n touchstart: INPUT_START,\\n touchmove: INPUT_MOVE,\\n touchend: INPUT_END,\\n touchcancel: INPUT_CANCEL\\n};\\n\\nvar TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';\\n\\n/**\\n * Multi-user touch events input\\n * @constructor\\n * @extends Input\\n */\\nfunction TouchInput() {\\n this.evTarget = TOUCH_TARGET_EVENTS;\\n this.targetIds = {};\\n\\n Input.apply(this, arguments);\\n}\\n\\ninherit(TouchInput, Input, {\\n handler: function MTEhandler(ev) {\\n var type = TOUCH_INPUT_MAP[ev.type];\\n var touches = getTouches.call(this, ev, type);\\n if (!touches) {\\n return;\\n }\\n\\n this.callback(this.manager, type, {\\n pointers: touches[0],\\n changedPointers: touches[1],\\n pointerType: INPUT_TYPE_TOUCH,\\n srcEvent: ev\\n });\\n }\\n});\\n\\n/**\\n * @this {TouchInput}\\n * @param {Object} ev\\n * @param {Number} type flag\\n * @returns {undefined|Array} [all, changed]\\n */\\nfunction getTouches(ev, type) {\\n var allTouches = toArray(ev.touches);\\n var targetIds = this.targetIds;\\n\\n // when there is only one touch, the process can be simplified\\n if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {\\n targetIds[allTouches[0].identifier] = true;\\n return [allTouches, allTouches];\\n }\\n\\n var i,\\n targetTouches,\\n changedTouches = toArray(ev.changedTouches),\\n changedTargetTouches = [],\\n target = this.target;\\n\\n // get target touches from touches\\n targetTouches = allTouches.filter(function(touch) {\\n return hasParent(touch.target, target);\\n });\\n\\n // collect touches\\n if (type === INPUT_START) {\\n i = 0;\\n while (i < targetTouches.length) {\\n targetIds[targetTouches[i].identifier] = true;\\n i++;\\n }\\n }\\n\\n // filter changed touches to only contain touches that exist in the collected target ids\\n i = 0;\\n while (i < changedTouches.length) {\\n if (targetIds[changedTouches[i].identifier]) {\\n changedTargetTouches.push(changedTouches[i]);\\n }\\n\\n // cleanup removed touches\\n if (type & (INPUT_END | INPUT_CANCEL)) {\\n delete targetIds[changedTouches[i].identifier];\\n }\\n i++;\\n }\\n\\n if (!changedTargetTouches.length) {\\n return;\\n }\\n\\n return [\\n // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'\\n uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true),\\n changedTargetTouches\\n ];\\n}\\n\\n/**\\n * Combined touch and mouse input\\n *\\n * Touch has a higher priority then mouse, and while touching no mouse events are allowed.\\n * This because touch devices also emit mouse events while doing a touch.\\n *\\n * @constructor\\n * @extends Input\\n */\\n\\nvar DEDUP_TIMEOUT = 2500;\\nvar DEDUP_DISTANCE = 25;\\n\\nfunction TouchMouseInput() {\\n Input.apply(this, arguments);\\n\\n var handler = bindFn(this.handler, this);\\n this.touch = new TouchInput(this.manager, handler);\\n this.mouse = new MouseInput(this.manager, handler);\\n\\n this.primaryTouch = null;\\n this.lastTouches = [];\\n}\\n\\ninherit(TouchMouseInput, Input, {\\n /**\\n * handle mouse and touch events\\n * @param {Hammer} manager\\n * @param {String} inputEvent\\n * @param {Object} inputData\\n */\\n handler: function TMEhandler(manager, inputEvent, inputData) {\\n var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH),\\n isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE);\\n\\n if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) {\\n return;\\n }\\n\\n // when we're in a touch event, record touches to de-dupe synthetic mouse event\\n if (isTouch) {\\n recordTouches.call(this, inputEvent, inputData);\\n } else if (isMouse && isSyntheticEvent.call(this, inputData)) {\\n return;\\n }\\n\\n this.callback(manager, inputEvent, inputData);\\n },\\n\\n /**\\n * remove the event listeners\\n */\\n destroy: function destroy() {\\n this.touch.destroy();\\n this.mouse.destroy();\\n }\\n});\\n\\nfunction recordTouches(eventType, eventData) {\\n if (eventType & INPUT_START) {\\n this.primaryTouch = eventData.changedPointers[0].identifier;\\n setLastTouch.call(this, eventData);\\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\\n setLastTouch.call(this, eventData);\\n }\\n}\\n\\nfunction setLastTouch(eventData) {\\n var touch = eventData.changedPointers[0];\\n\\n if (touch.identifier === this.primaryTouch) {\\n var lastTouch = {x: touch.clientX, y: touch.clientY};\\n this.lastTouches.push(lastTouch);\\n var lts = this.lastTouches;\\n var removeLastTouch = function() {\\n var i = lts.indexOf(lastTouch);\\n if (i > -1) {\\n lts.splice(i, 1);\\n }\\n };\\n setTimeout(removeLastTouch, DEDUP_TIMEOUT);\\n }\\n}\\n\\nfunction isSyntheticEvent(eventData) {\\n var x = eventData.srcEvent.clientX, y = eventData.srcEvent.clientY;\\n for (var i = 0; i < this.lastTouches.length; i++) {\\n var t = this.lastTouches[i];\\n var dx = Math.abs(x - t.x), dy = Math.abs(y - t.y);\\n if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {\\n return true;\\n }\\n }\\n return false;\\n}\\n\\nvar PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction');\\nvar NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined;\\n\\n// magical touchAction value\\nvar TOUCH_ACTION_COMPUTE = 'compute';\\nvar TOUCH_ACTION_AUTO = 'auto';\\nvar TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented\\nvar TOUCH_ACTION_NONE = 'none';\\nvar TOUCH_ACTION_PAN_X = 'pan-x';\\nvar TOUCH_ACTION_PAN_Y = 'pan-y';\\nvar TOUCH_ACTION_MAP = getTouchActionProps();\\n\\n/**\\n * Touch Action\\n * sets the touchAction property or uses the js alternative\\n * @param {Manager} manager\\n * @param {String} value\\n * @constructor\\n */\\nfunction TouchAction(manager, value) {\\n this.manager = manager;\\n this.set(value);\\n}\\n\\nTouchAction.prototype = {\\n /**\\n * set the touchAction value on the element or enable the polyfill\\n * @param {String} value\\n */\\n set: function(value) {\\n // find out the touch-action by the event handlers\\n if (value == TOUCH_ACTION_COMPUTE) {\\n value = this.compute();\\n }\\n\\n if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) {\\n this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;\\n }\\n this.actions = value.toLowerCase().trim();\\n },\\n\\n /**\\n * just re-set the touchAction value\\n */\\n update: function() {\\n this.set(this.manager.options.touchAction);\\n },\\n\\n /**\\n * compute the value for the touchAction property based on the recognizer's settings\\n * @returns {String} value\\n */\\n compute: function() {\\n var actions = [];\\n each(this.manager.recognizers, function(recognizer) {\\n if (boolOrFn(recognizer.options.enable, [recognizer])) {\\n actions = actions.concat(recognizer.getTouchAction());\\n }\\n });\\n return cleanTouchActions(actions.join(' '));\\n },\\n\\n /**\\n * this method is called on each input cycle and provides the preventing of the browser behavior\\n * @param {Object} input\\n */\\n preventDefaults: function(input) {\\n var srcEvent = input.srcEvent;\\n var direction = input.offsetDirection;\\n\\n // if the touch action did prevented once this session\\n if (this.manager.session.prevented) {\\n srcEvent.preventDefault();\\n return;\\n }\\n\\n var actions = this.actions;\\n var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];\\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];\\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];\\n\\n if (hasNone) {\\n //do not prevent defaults if this is a tap gesture\\n\\n var isTapPointer = input.pointers.length === 1;\\n var isTapMovement = input.distance < 2;\\n var isTapTouchTime = input.deltaTime < 250;\\n\\n if (isTapPointer && isTapMovement && isTapTouchTime) {\\n return;\\n }\\n }\\n\\n if (hasPanX && hasPanY) {\\n // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent\\n return;\\n }\\n\\n if (hasNone ||\\n (hasPanY && direction & DIRECTION_HORIZONTAL) ||\\n (hasPanX && direction & DIRECTION_VERTICAL)) {\\n return this.preventSrc(srcEvent);\\n }\\n },\\n\\n /**\\n * call preventDefault to prevent the browser's default behavior (scrolling in most cases)\\n * @param {Object} srcEvent\\n */\\n preventSrc: function(srcEvent) {\\n this.manager.session.prevented = true;\\n srcEvent.preventDefault();\\n }\\n};\\n\\n/**\\n * when the touchActions are collected they are not a valid value, so we need to clean things up. *\\n * @param {String} actions\\n * @returns {*}\\n */\\nfunction cleanTouchActions(actions) {\\n // none\\n if (inStr(actions, TOUCH_ACTION_NONE)) {\\n return TOUCH_ACTION_NONE;\\n }\\n\\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);\\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);\\n\\n // if both pan-x and pan-y are set (different recognizers\\n // for different directions, e.g. horizontal pan but vertical swipe?)\\n // we need none (as otherwise with pan-x pan-y combined none of these\\n // recognizers will work, since the browser would handle all panning\\n if (hasPanX && hasPanY) {\\n return TOUCH_ACTION_NONE;\\n }\\n\\n // pan-x OR pan-y\\n if (hasPanX || hasPanY) {\\n return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;\\n }\\n\\n // manipulation\\n if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {\\n return TOUCH_ACTION_MANIPULATION;\\n }\\n\\n return TOUCH_ACTION_AUTO;\\n}\\n\\nfunction getTouchActionProps() {\\n if (!NATIVE_TOUCH_ACTION) {\\n return false;\\n }\\n var touchMap = {};\\n var cssSupports = window.CSS && window.CSS.supports;\\n ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function(val) {\\n\\n // If css.supports is not supported but there is native touch-action assume it supports\\n // all values. This is the case for IE 10 and 11.\\n touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true;\\n });\\n return touchMap;\\n}\\n\\n/**\\n * Recognizer flow explained; *\\n * All recognizers have the initial state of POSSIBLE when a input session starts.\\n * The definition of a input session is from the first input until the last input, with all it's movement in it. *\\n * Example session for mouse-input: mousedown -> mousemove -> mouseup\\n *\\n * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed\\n * which determines with state it should be.\\n *\\n * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to\\n * POSSIBLE to give it another change on the next cycle.\\n *\\n * Possible\\n * |\\n * +-----+---------------+\\n * | |\\n * +-----+-----+ |\\n * | | |\\n * Failed Cancelled |\\n * +-------+------+\\n * | |\\n * Recognized Began\\n * |\\n * Changed\\n * |\\n * Ended/Recognized\\n */\\nvar STATE_POSSIBLE = 1;\\nvar STATE_BEGAN = 2;\\nvar STATE_CHANGED = 4;\\nvar STATE_ENDED = 8;\\nvar STATE_RECOGNIZED = STATE_ENDED;\\nvar STATE_CANCELLED = 16;\\nvar STATE_FAILED = 32;\\n\\n/**\\n * Recognizer\\n * Every recognizer needs to extend from this class.\\n * @constructor\\n * @param {Object} options\\n */\\nfunction Recognizer(options) {\\n this.options = assign({}, this.defaults, options || {});\\n\\n this.id = uniqueId();\\n\\n this.manager = null;\\n\\n // default is enable true\\n this.options.enable = ifUndefined(this.options.enable, true);\\n\\n this.state = STATE_POSSIBLE;\\n\\n this.simultaneous = {};\\n this.requireFail = [];\\n}\\n\\nRecognizer.prototype = {\\n /**\\n * @virtual\\n * @type {Object}\\n */\\n defaults: {},\\n\\n /**\\n * set options\\n * @param {Object} options\\n * @return {Recognizer}\\n */\\n set: function(options) {\\n assign(this.options, options);\\n\\n // also update the touchAction, in case something changed about the directions/enabled state\\n this.manager && this.manager.touchAction.update();\\n return this;\\n },\\n\\n /**\\n * recognize simultaneous with an other recognizer.\\n * @param {Recognizer} otherRecognizer\\n * @returns {Recognizer} this\\n */\\n recognizeWith: function(otherRecognizer) {\\n if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {\\n return this;\\n }\\n\\n var simultaneous = this.simultaneous;\\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\\n if (!simultaneous[otherRecognizer.id]) {\\n simultaneous[otherRecognizer.id] = otherRecognizer;\\n otherRecognizer.recognizeWith(this);\\n }\\n return this;\\n },\\n\\n /**\\n * drop the simultaneous link. it doesnt remove the link on the other recognizer.\\n * @param {Recognizer} otherRecognizer\\n * @returns {Recognizer} this\\n */\\n dropRecognizeWith: function(otherRecognizer) {\\n if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {\\n return this;\\n }\\n\\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\\n delete this.simultaneous[otherRecognizer.id];\\n return this;\\n },\\n\\n /**\\n * recognizer can only run when an other is failing\\n * @param {Recognizer} otherRecognizer\\n * @returns {Recognizer} this\\n */\\n requireFailure: function(otherRecognizer) {\\n if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {\\n return this;\\n }\\n\\n var requireFail = this.requireFail;\\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\\n if (inArray(requireFail, otherRecognizer) === -1) {\\n requireFail.push(otherRecognizer);\\n otherRecognizer.requireFailure(this);\\n }\\n return this;\\n },\\n\\n /**\\n * drop the requireFailure link. it does not remove the link on the other recognizer.\\n * @param {Recognizer} otherRecognizer\\n * @returns {Recognizer} this\\n */\\n dropRequireFailure: function(otherRecognizer) {\\n if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {\\n return this;\\n }\\n\\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\\n var index = inArray(this.requireFail, otherRecognizer);\\n if (index > -1) {\\n this.requireFail.splice(index, 1);\\n }\\n return this;\\n },\\n\\n /**\\n * has require failures boolean\\n * @returns {boolean}\\n */\\n hasRequireFailures: function() {\\n return this.requireFail.length > 0;\\n },\\n\\n /**\\n * if the recognizer can recognize simultaneous with an other recognizer\\n * @param {Recognizer} otherRecognizer\\n * @returns {Boolean}\\n */\\n canRecognizeWith: function(otherRecognizer) {\\n return !!this.simultaneous[otherRecognizer.id];\\n },\\n\\n /**\\n * You should use `tryEmit` instead of `emit` directly to check\\n * that all the needed recognizers has failed before emitting.\\n * @param {Object} input\\n */\\n emit: function(input) {\\n var self = this;\\n var state = this.state;\\n\\n function emit(event) {\\n self.manager.emit(event, input);\\n }\\n\\n // 'panstart' and 'panmove'\\n if (state < STATE_ENDED) {\\n emit(self.options.event + stateStr(state));\\n }\\n\\n emit(self.options.event); // simple 'eventName' events\\n\\n if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...)\\n emit(input.additionalEvent);\\n }\\n\\n // panend and pancancel\\n if (state >= STATE_ENDED) {\\n emit(self.options.event + stateStr(state));\\n }\\n },\\n\\n /**\\n * Check that all the require failure recognizers has failed,\\n * if true, it emits a gesture event,\\n * otherwise, setup the state to FAILED.\\n * @param {Object} input\\n */\\n tryEmit: function(input) {\\n if (this.canEmit()) {\\n return this.emit(input);\\n }\\n // it's failing anyway\\n this.state = STATE_FAILED;\\n },\\n\\n /**\\n * can we emit?\\n * @returns {boolean}\\n */\\n canEmit: function() {\\n var i = 0;\\n while (i < this.requireFail.length) {\\n if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {\\n return false;\\n }\\n i++;\\n }\\n return true;\\n },\\n\\n /**\\n * update the recognizer\\n * @param {Object} inputData\\n */\\n recognize: function(inputData) {\\n // make a new copy of the inputData\\n // so we can change the inputData without messing up the other recognizers\\n var inputDataClone = assign({}, inputData);\\n\\n // is is enabled and allow recognizing?\\n if (!boolOrFn(this.options.enable, [this, inputDataClone])) {\\n this.reset();\\n this.state = STATE_FAILED;\\n return;\\n }\\n\\n // reset when we've reached the end\\n if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {\\n this.state = STATE_POSSIBLE;\\n }\\n\\n this.state = this.process(inputDataClone);\\n\\n // the recognizer has recognized a gesture\\n // so trigger an event\\n if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {\\n this.tryEmit(inputDataClone);\\n }\\n },\\n\\n /**\\n * return the state of the recognizer\\n * the actual recognizing happens in this method\\n * @virtual\\n * @param {Object} inputData\\n * @returns {Const} STATE\\n */\\n process: function(inputData) { }, // jshint ignore:line\\n\\n /**\\n * return the preferred touch-action\\n * @virtual\\n * @returns {Array}\\n */\\n getTouchAction: function() { },\\n\\n /**\\n * called when the gesture isn't allowed to recognize\\n * like when another is being recognized or it is disabled\\n * @virtual\\n */\\n reset: function() { }\\n};\\n\\n/**\\n * get a usable string, used as event postfix\\n * @param {Const} state\\n * @returns {String} state\\n */\\nfunction stateStr(state) {\\n if (state & STATE_CANCELLED) {\\n return 'cancel';\\n } else if (state & STATE_ENDED) {\\n return 'end';\\n } else if (state & STATE_CHANGED) {\\n return 'move';\\n } else if (state & STATE_BEGAN) {\\n return 'start';\\n }\\n return '';\\n}\\n\\n/**\\n * direction cons to string\\n * @param {Const} direction\\n * @returns {String}\\n */\\nfunction directionStr(direction) {\\n if (direction == DIRECTION_DOWN) {\\n return 'down';\\n } else if (direction == DIRECTION_UP) {\\n return 'up';\\n } else if (direction == DIRECTION_LEFT) {\\n return 'left';\\n } else if (direction == DIRECTION_RIGHT) {\\n return 'right';\\n }\\n return '';\\n}\\n\\n/**\\n * get a recognizer by name if it is bound to a manager\\n * @param {Recognizer|String} otherRecognizer\\n * @param {Recognizer} recognizer\\n * @returns {Recognizer}\\n */\\nfunction getRecognizerByNameIfManager(otherRecognizer, recognizer) {\\n var manager = recognizer.manager;\\n if (manager) {\\n return manager.get(otherRecognizer);\\n }\\n return otherRecognizer;\\n}\\n\\n/**\\n * This recognizer is just used as a base for the simple attribute recognizers.\\n * @constructor\\n * @extends Recognizer\\n */\\nfunction AttrRecognizer() {\\n Recognizer.apply(this, arguments);\\n}\\n\\ninherit(AttrRecognizer, Recognizer, {\\n /**\\n * @namespace\\n * @memberof AttrRecognizer\\n */\\n defaults: {\\n /**\\n * @type {Number}\\n * @default 1\\n */\\n pointers: 1\\n },\\n\\n /**\\n * Used to check if it the recognizer receives valid input, like input.distance > 10.\\n * @memberof AttrRecognizer\\n * @param {Object} input\\n * @returns {Boolean} recognized\\n */\\n attrTest: function(input) {\\n var optionPointers = this.options.pointers;\\n return optionPointers === 0 || input.pointers.length === optionPointers;\\n },\\n\\n /**\\n * Process the input and return the state for the recognizer\\n * @memberof AttrRecognizer\\n * @param {Object} input\\n * @returns {*} State\\n */\\n process: function(input) {\\n var state = this.state;\\n var eventType = input.eventType;\\n\\n var isRecognized = state & (STATE_BEGAN | STATE_CHANGED);\\n var isValid = this.attrTest(input);\\n\\n // on cancel input and we've recognized before, return STATE_CANCELLED\\n if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {\\n return state | STATE_CANCELLED;\\n } else if (isRecognized || isValid) {\\n if (eventType & INPUT_END) {\\n return state | STATE_ENDED;\\n } else if (!(state & STATE_BEGAN)) {\\n return STATE_BEGAN;\\n }\\n return state | STATE_CHANGED;\\n }\\n return STATE_FAILED;\\n }\\n});\\n\\n/**\\n * Pan\\n * Recognized when the pointer is down and moved in the allowed direction.\\n * @constructor\\n * @extends AttrRecognizer\\n */\\nfunction PanRecognizer() {\\n AttrRecognizer.apply(this, arguments);\\n\\n this.pX = null;\\n this.pY = null;\\n}\\n\\ninherit(PanRecognizer, AttrRecognizer, {\\n /**\\n * @namespace\\n * @memberof PanRecognizer\\n */\\n defaults: {\\n event: 'pan',\\n threshold: 10,\\n pointers: 1,\\n direction: DIRECTION_ALL\\n },\\n\\n getTouchAction: function() {\\n var direction = this.options.direction;\\n var actions = [];\\n if (direction & DIRECTION_HORIZONTAL) {\\n actions.push(TOUCH_ACTION_PAN_Y);\\n }\\n if (direction & DIRECTION_VERTICAL) {\\n actions.push(TOUCH_ACTION_PAN_X);\\n }\\n return actions;\\n },\\n\\n directionTest: function(input) {\\n var options = this.options;\\n var hasMoved = true;\\n var distance = input.distance;\\n var direction = input.direction;\\n var x = input.deltaX;\\n var y = input.deltaY;\\n\\n // lock to axis?\\n if (!(direction & options.direction)) {\\n if (options.direction & DIRECTION_HORIZONTAL) {\\n direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT;\\n hasMoved = x != this.pX;\\n distance = Math.abs(input.deltaX);\\n } else {\\n direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN;\\n hasMoved = y != this.pY;\\n distance = Math.abs(input.deltaY);\\n }\\n }\\n input.direction = direction;\\n return hasMoved && distance > options.threshold && direction & options.direction;\\n },\\n\\n attrTest: function(input) {\\n return AttrRecognizer.prototype.attrTest.call(this, input) &&\\n (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input)));\\n },\\n\\n emit: function(input) {\\n\\n this.pX = input.deltaX;\\n this.pY = input.deltaY;\\n\\n var direction = directionStr(input.direction);\\n\\n if (direction) {\\n input.additionalEvent = this.options.event + direction;\\n }\\n this._super.emit.call(this, input);\\n }\\n});\\n\\n/**\\n * Pinch\\n * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).\\n * @constructor\\n * @extends AttrRecognizer\\n */\\nfunction PinchRecognizer() {\\n AttrRecognizer.apply(this, arguments);\\n}\\n\\ninherit(PinchRecognizer, AttrRecognizer, {\\n /**\\n * @namespace\\n * @memberof PinchRecognizer\\n */\\n defaults: {\\n event: 'pinch',\\n threshold: 0,\\n pointers: 2\\n },\\n\\n getTouchAction: function() {\\n return [TOUCH_ACTION_NONE];\\n },\\n\\n attrTest: function(input) {\\n return this._super.attrTest.call(this, input) &&\\n (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);\\n },\\n\\n emit: function(input) {\\n if (input.scale !== 1) {\\n var inOut = input.scale < 1 ? 'in' : 'out';\\n input.additionalEvent = this.options.event + inOut;\\n }\\n this._super.emit.call(this, input);\\n }\\n});\\n\\n/**\\n * Press\\n * Recognized when the pointer is down for x ms without any movement.\\n * @constructor\\n * @extends Recognizer\\n */\\nfunction PressRecognizer() {\\n Recognizer.apply(this, arguments);\\n\\n this._timer = null;\\n this._input = null;\\n}\\n\\ninherit(PressRecognizer, Recognizer, {\\n /**\\n * @namespace\\n * @memberof PressRecognizer\\n */\\n defaults: {\\n event: 'press',\\n pointers: 1,\\n time: 251, // minimal time of the pointer to be pressed\\n threshold: 9 // a minimal movement is ok, but keep it low\\n },\\n\\n getTouchAction: function() {\\n return [TOUCH_ACTION_AUTO];\\n },\\n\\n process: function(input) {\\n var options = this.options;\\n var validPointers = input.pointers.length === options.pointers;\\n var validMovement = input.distance < options.threshold;\\n var validTime = input.deltaTime > options.time;\\n\\n this._input = input;\\n\\n // we only allow little movement\\n // and we've reached an end event, so a tap is possible\\n if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) {\\n this.reset();\\n } else if (input.eventType & INPUT_START) {\\n this.reset();\\n this._timer = setTimeoutContext(function() {\\n this.state = STATE_RECOGNIZED;\\n this.tryEmit();\\n }, options.time, this);\\n } else if (input.eventType & INPUT_END) {\\n return STATE_RECOGNIZED;\\n }\\n return STATE_FAILED;\\n },\\n\\n reset: function() {\\n clearTimeout(this._timer);\\n },\\n\\n emit: function(input) {\\n if (this.state !== STATE_RECOGNIZED) {\\n return;\\n }\\n\\n if (input && (input.eventType & INPUT_END)) {\\n this.manager.emit(this.options.event + 'up', input);\\n } else {\\n this._input.timeStamp = now();\\n this.manager.emit(this.options.event, this._input);\\n }\\n }\\n});\\n\\n/**\\n * Rotate\\n * Recognized when two or more pointer are moving in a circular motion.\\n * @constructor\\n * @extends AttrRecognizer\\n */\\nfunction RotateRecognizer() {\\n AttrRecognizer.apply(this, arguments);\\n}\\n\\ninherit(RotateRecognizer, AttrRecognizer, {\\n /**\\n * @namespace\\n * @memberof RotateRecognizer\\n */\\n defaults: {\\n event: 'rotate',\\n threshold: 0,\\n pointers: 2\\n },\\n\\n getTouchAction: function() {\\n return [TOUCH_ACTION_NONE];\\n },\\n\\n attrTest: function(input) {\\n return this._super.attrTest.call(this, input) &&\\n (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);\\n }\\n});\\n\\n/**\\n * Swipe\\n * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.\\n * @constructor\\n * @extends AttrRecognizer\\n */\\nfunction SwipeRecognizer() {\\n AttrRecognizer.apply(this, arguments);\\n}\\n\\ninherit(SwipeRecognizer, AttrRecognizer, {\\n /**\\n * @namespace\\n * @memberof SwipeRecognizer\\n */\\n defaults: {\\n event: 'swipe',\\n threshold: 10,\\n velocity: 0.3,\\n direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,\\n pointers: 1\\n },\\n\\n getTouchAction: function() {\\n return PanRecognizer.prototype.getTouchAction.call(this);\\n },\\n\\n attrTest: function(input) {\\n var direction = this.options.direction;\\n var velocity;\\n\\n if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {\\n velocity = input.overallVelocity;\\n } else if (direction & DIRECTION_HORIZONTAL) {\\n velocity = input.overallVelocityX;\\n } else if (direction & DIRECTION_VERTICAL) {\\n velocity = input.overallVelocityY;\\n }\\n\\n return this._super.attrTest.call(this, input) &&\\n direction & input.offsetDirection &&\\n input.distance > this.options.threshold &&\\n input.maxPointers == this.options.pointers &&\\n abs(velocity) > this.options.velocity && input.eventType & INPUT_END;\\n },\\n\\n emit: function(input) {\\n var direction = directionStr(input.offsetDirection);\\n if (direction) {\\n this.manager.emit(this.options.event + direction, input);\\n }\\n\\n this.manager.emit(this.options.event, input);\\n }\\n});\\n\\n/**\\n * A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur\\n * between the given interval and position. The delay option can be used to recognize multi-taps without firing\\n * a single tap.\\n *\\n * The eventData from the emitted event contains the property `tapCount`, which contains the amount of\\n * multi-taps being recognized.\\n * @constructor\\n * @extends Recognizer\\n */\\nfunction TapRecognizer() {\\n Recognizer.apply(this, arguments);\\n\\n // previous time and center,\\n // used for tap counting\\n this.pTime = false;\\n this.pCenter = false;\\n\\n this._timer = null;\\n this._input = null;\\n this.count = 0;\\n}\\n\\ninherit(TapRecognizer, Recognizer, {\\n /**\\n * @namespace\\n * @memberof PinchRecognizer\\n */\\n defaults: {\\n event: 'tap',\\n pointers: 1,\\n taps: 1,\\n interval: 300, // max time between the multi-tap taps\\n time: 250, // max time of the pointer to be down (like finger on the screen)\\n threshold: 9, // a minimal movement is ok, but keep it low\\n posThreshold: 10 // a multi-tap can be a bit off the initial position\\n },\\n\\n getTouchAction: function() {\\n return [TOUCH_ACTION_MANIPULATION];\\n },\\n\\n process: function(input) {\\n var options = this.options;\\n\\n var validPointers = input.pointers.length === options.pointers;\\n var validMovement = input.distance < options.threshold;\\n var validTouchTime = input.deltaTime < options.time;\\n\\n this.reset();\\n\\n if ((input.eventType & INPUT_START) && (this.count === 0)) {\\n return this.failTimeout();\\n }\\n\\n // we only allow little movement\\n // and we've reached an end event, so a tap is possible\\n if (validMovement && validTouchTime && validPointers) {\\n if (input.eventType != INPUT_END) {\\n return this.failTimeout();\\n }\\n\\n var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true;\\n var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;\\n\\n this.pTime = input.timeStamp;\\n this.pCenter = input.center;\\n\\n if (!validMultiTap || !validInterval) {\\n this.count = 1;\\n } else {\\n this.count += 1;\\n }\\n\\n this._input = input;\\n\\n // if tap count matches we have recognized it,\\n // else it has began recognizing...\\n var tapCount = this.count % options.taps;\\n if (tapCount === 0) {\\n // no failing requirements, immediately trigger the tap event\\n // or wait as long as the multitap interval to trigger\\n if (!this.hasRequireFailures()) {\\n return STATE_RECOGNIZED;\\n } else {\\n this._timer = setTimeoutContext(function() {\\n this.state = STATE_RECOGNIZED;\\n this.tryEmit();\\n }, options.interval, this);\\n return STATE_BEGAN;\\n }\\n }\\n }\\n return STATE_FAILED;\\n },\\n\\n failTimeout: function() {\\n this._timer = setTimeoutContext(function() {\\n this.state = STATE_FAILED;\\n }, this.options.interval, this);\\n return STATE_FAILED;\\n },\\n\\n reset: function() {\\n clearTimeout(this._timer);\\n },\\n\\n emit: function() {\\n if (this.state == STATE_RECOGNIZED) {\\n this._input.tapCount = this.count;\\n this.manager.emit(this.options.event, this._input);\\n }\\n }\\n});\\n\\n/**\\n * Simple way to create a manager with a default set of recognizers.\\n * @param {HTMLElement} element\\n * @param {Object} [options]\\n * @constructor\\n */\\nfunction Hammer(element, options) {\\n options = options || {};\\n options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset);\\n return new Manager(element, options);\\n}\\n\\n/**\\n * @const {string}\\n */\\nHammer.VERSION = '2.0.7';\\n\\n/**\\n * default settings\\n * @namespace\\n */\\nHammer.defaults = {\\n /**\\n * set if DOM events are being triggered.\\n * But this is slower and unused by simple implementations, so disabled by default.\\n * @type {Boolean}\\n * @default false\\n */\\n domEvents: false,\\n\\n /**\\n * The value for the touchAction property/fallback.\\n * When set to `compute` it will magically set the correct value based on the added recognizers.\\n * @type {String}\\n * @default compute\\n */\\n touchAction: TOUCH_ACTION_COMPUTE,\\n\\n /**\\n * @type {Boolean}\\n * @default true\\n */\\n enable: true,\\n\\n /**\\n * EXPERIMENTAL FEATURE -- can be removed/changed\\n * Change the parent input target element.\\n * If Null, then it is being set the to main element.\\n * @type {Null|EventTarget}\\n * @default null\\n */\\n inputTarget: null,\\n\\n /**\\n * force an input class\\n * @type {Null|Function}\\n * @default null\\n */\\n inputClass: null,\\n\\n /**\\n * Default recognizer setup when calling `Hammer()`\\n * When creating a new Manager these will be skipped.\\n * @type {Array}\\n */\\n preset: [\\n // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]\\n [RotateRecognizer, {enable: false}],\\n [PinchRecognizer, {enable: false}, ['rotate']],\\n [SwipeRecognizer, {direction: DIRECTION_HORIZONTAL}],\\n [PanRecognizer, {direction: DIRECTION_HORIZONTAL}, ['swipe']],\\n [TapRecognizer],\\n [TapRecognizer, {event: 'doubletap', taps: 2}, ['tap']],\\n [PressRecognizer]\\n ],\\n\\n /**\\n * Some CSS properties can be used to improve the working of Hammer.\\n * Add them to this method and they will be set when creating a new Manager.\\n * @namespace\\n */\\n cssProps: {\\n /**\\n * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.\\n * @type {String}\\n * @default 'none'\\n */\\n userSelect: 'none',\\n\\n /**\\n * Disable the Windows Phone grippers when pressing an element.\\n * @type {String}\\n * @default 'none'\\n */\\n touchSelect: 'none',\\n\\n /**\\n * Disables the default callout shown when you touch and hold a touch target.\\n * On iOS, when you touch and hold a touch target such as a link, Safari displays\\n * a callout containing information about the link. This property allows you to disable that callout.\\n * @type {String}\\n * @default 'none'\\n */\\n touchCallout: 'none',\\n\\n /**\\n * Specifies whether zooming is enabled. Used by IE10>\\n * @type {String}\\n * @default 'none'\\n */\\n contentZooming: 'none',\\n\\n /**\\n * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.\\n * @type {String}\\n * @default 'none'\\n */\\n userDrag: 'none',\\n\\n /**\\n * Overrides the highlight color shown when the user taps a link or a JavaScript\\n * clickable element in iOS. This property obeys the alpha value, if specified.\\n * @type {String}\\n * @default 'rgba(0,0,0,0)'\\n */\\n tapHighlightColor: 'rgba(0,0,0,0)'\\n }\\n};\\n\\nvar STOP = 1;\\nvar FORCED_STOP = 2;\\n\\n/**\\n * Manager\\n * @param {HTMLElement} element\\n * @param {Object} [options]\\n * @constructor\\n */\\nfunction Manager(element, options) {\\n this.options = assign({}, Hammer.defaults, options || {});\\n\\n this.options.inputTarget = this.options.inputTarget || element;\\n\\n this.handlers = {};\\n this.session = {};\\n this.recognizers = [];\\n this.oldCssProps = {};\\n\\n this.element = element;\\n this.input = createInputInstance(this);\\n this.touchAction = new TouchAction(this, this.options.touchAction);\\n\\n toggleCssProps(this, true);\\n\\n each(this.options.recognizers, function(item) {\\n var recognizer = this.add(new (item[0])(item[1]));\\n item[2] && recognizer.recognizeWith(item[2]);\\n item[3] && recognizer.requireFailure(item[3]);\\n }, this);\\n}\\n\\nManager.prototype = {\\n /**\\n * set options\\n * @param {Object} options\\n * @returns {Manager}\\n */\\n set: function(options) {\\n assign(this.options, options);\\n\\n // Options that need a little more setup\\n if (options.touchAction) {\\n this.touchAction.update();\\n }\\n if (options.inputTarget) {\\n // Clean up existing event listeners and reinitialize\\n this.input.destroy();\\n this.input.target = options.inputTarget;\\n this.input.init();\\n }\\n return this;\\n },\\n\\n /**\\n * stop recognizing for this session.\\n * This session will be discarded, when a new [input]start event is fired.\\n * When forced, the recognizer cycle is stopped immediately.\\n * @param {Boolean} [force]\\n */\\n stop: function(force) {\\n this.session.stopped = force ? FORCED_STOP : STOP;\\n },\\n\\n /**\\n * run the recognizers!\\n * called by the inputHandler function on every movement of the pointers (touches)\\n * it walks through all the recognizers and tries to detect the gesture that is being made\\n * @param {Object} inputData\\n */\\n recognize: function(inputData) {\\n var session = this.session;\\n if (session.stopped) {\\n return;\\n }\\n\\n // run the touch-action polyfill\\n this.touchAction.preventDefaults(inputData);\\n\\n var recognizer;\\n var recognizers = this.recognizers;\\n\\n // this holds the recognizer that is being recognized.\\n // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED\\n // if no recognizer is detecting a thing, it is set to `null`\\n var curRecognizer = session.curRecognizer;\\n\\n // reset when the last recognizer is recognized\\n // or when we're in a new session\\n if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) {\\n curRecognizer = session.curRecognizer = null;\\n }\\n\\n var i = 0;\\n while (i < recognizers.length) {\\n recognizer = recognizers[i];\\n\\n // find out if we are allowed try to recognize the input for this one.\\n // 1. allow if the session is NOT forced stopped (see the .stop() method)\\n // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one\\n // that is being recognized.\\n // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.\\n // this can be setup with the `recognizeWith()` method on the recognizer.\\n if (session.stopped !== FORCED_STOP && ( // 1\\n !curRecognizer || recognizer == curRecognizer || // 2\\n recognizer.canRecognizeWith(curRecognizer))) { // 3\\n recognizer.recognize(inputData);\\n } else {\\n recognizer.reset();\\n }\\n\\n // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the\\n // current active recognizer. but only if we don't already have an active recognizer\\n if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {\\n curRecognizer = session.curRecognizer = recognizer;\\n }\\n i++;\\n }\\n },\\n\\n /**\\n * get a recognizer by its event name.\\n * @param {Recognizer|String} recognizer\\n * @returns {Recognizer|Null}\\n */\\n get: function(recognizer) {\\n if (recognizer instanceof Recognizer) {\\n return recognizer;\\n }\\n\\n var recognizers = this.recognizers;\\n for (var i = 0; i < recognizers.length; i++) {\\n if (recognizers[i].options.event == recognizer) {\\n return recognizers[i];\\n }\\n }\\n return null;\\n },\\n\\n /**\\n * add a recognizer to the manager\\n * existing recognizers with the same event name will be removed\\n * @param {Recognizer} recognizer\\n * @returns {Recognizer|Manager}\\n */\\n add: function(recognizer) {\\n if (invokeArrayArg(recognizer, 'add', this)) {\\n return this;\\n }\\n\\n // remove existing\\n var existing = this.get(recognizer.options.event);\\n if (existing) {\\n this.remove(existing);\\n }\\n\\n this.recognizers.push(recognizer);\\n recognizer.manager = this;\\n\\n this.touchAction.update();\\n return recognizer;\\n },\\n\\n /**\\n * remove a recognizer by name or instance\\n * @param {Recognizer|String} recognizer\\n * @returns {Manager}\\n */\\n remove: function(recognizer) {\\n if (invokeArrayArg(recognizer, 'remove', this)) {\\n return this;\\n }\\n\\n recognizer = this.get(recognizer);\\n\\n // let's make sure this recognizer exists\\n if (recognizer) {\\n var recognizers = this.recognizers;\\n var index = inArray(recognizers, recognizer);\\n\\n if (index !== -1) {\\n recognizers.splice(index, 1);\\n this.touchAction.update();\\n }\\n }\\n\\n return this;\\n },\\n\\n /**\\n * bind event\\n * @param {String} events\\n * @param {Function} handler\\n * @returns {EventEmitter} this\\n */\\n on: function(events, handler) {\\n if (events === undefined) {\\n return;\\n }\\n if (handler === undefined) {\\n return;\\n }\\n\\n var handlers = this.handlers;\\n each(splitStr(events), function(event) {\\n handlers[event] = handlers[event] || [];\\n handlers[event].push(handler);\\n });\\n return this;\\n },\\n\\n /**\\n * unbind event, leave emit blank to remove all handlers\\n * @param {String} events\\n * @param {Function} [handler]\\n * @returns {EventEmitter} this\\n */\\n off: function(events, handler) {\\n if (events === undefined) {\\n return;\\n }\\n\\n var handlers = this.handlers;\\n each(splitStr(events), function(event) {\\n if (!handler) {\\n delete handlers[event];\\n } else {\\n handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);\\n }\\n });\\n return this;\\n },\\n\\n /**\\n * emit event to the listeners\\n * @param {String} event\\n * @param {Object} data\\n */\\n emit: function(event, data) {\\n // we also want to trigger dom events\\n if (this.options.domEvents) {\\n triggerDomEvent(event, data);\\n }\\n\\n // no handlers, so skip it all\\n var handlers = this.handlers[event] && this.handlers[event].slice();\\n if (!handlers || !handlers.length) {\\n return;\\n }\\n\\n data.type = event;\\n data.preventDefault = function() {\\n data.srcEvent.preventDefault();\\n };\\n\\n var i = 0;\\n while (i < handlers.length) {\\n handlers[i](data);\\n i++;\\n }\\n },\\n\\n /**\\n * destroy the manager and unbinds all events\\n * it doesn't unbind dom events, that is the user own responsibility\\n */\\n destroy: function() {\\n this.element && toggleCssProps(this, false);\\n\\n this.handlers = {};\\n this.session = {};\\n this.input.destroy();\\n this.element = null;\\n }\\n};\\n\\n/**\\n * add/remove the css properties as defined in manager.options.cssProps\\n * @param {Manager} manager\\n * @param {Boolean} add\\n */\\nfunction toggleCssProps(manager, add) {\\n var element = manager.element;\\n if (!element.style) {\\n return;\\n }\\n var prop;\\n each(manager.options.cssProps, function(value, name) {\\n prop = prefixed(element.style, name);\\n if (add) {\\n manager.oldCssProps[prop] = element.style[prop];\\n element.style[prop] = value;\\n } else {\\n element.style[prop] = manager.oldCssProps[prop] || '';\\n }\\n });\\n if (!add) {\\n manager.oldCssProps = {};\\n }\\n}\\n\\n/**\\n * trigger dom event\\n * @param {String} event\\n * @param {Object} data\\n */\\nfunction triggerDomEvent(event, data) {\\n var gestureEvent = document.createEvent('Event');\\n gestureEvent.initEvent(event, true, true);\\n gestureEvent.gesture = data;\\n data.target.dispatchEvent(gestureEvent);\\n}\\n\\nassign(Hammer, {\\n INPUT_START: INPUT_START,\\n INPUT_MOVE: INPUT_MOVE,\\n INPUT_END: INPUT_END,\\n INPUT_CANCEL: INPUT_CANCEL,\\n\\n STATE_POSSIBLE: STATE_POSSIBLE,\\n STATE_BEGAN: STATE_BEGAN,\\n STATE_CHANGED: STATE_CHANGED,\\n STATE_ENDED: STATE_ENDED,\\n STATE_RECOGNIZED: STATE_RECOGNIZED,\\n STATE_CANCELLED: STATE_CANCELLED,\\n STATE_FAILED: STATE_FAILED,\\n\\n DIRECTION_NONE: DIRECTION_NONE,\\n DIRECTION_LEFT: DIRECTION_LEFT,\\n DIRECTION_RIGHT: DIRECTION_RIGHT,\\n DIRECTION_UP: DIRECTION_UP,\\n DIRECTION_DOWN: DIRECTION_DOWN,\\n DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL,\\n DIRECTION_VERTICAL: DIRECTION_VERTICAL,\\n DIRECTION_ALL: DIRECTION_ALL,\\n\\n Manager: Manager,\\n Input: Input,\\n TouchAction: TouchAction,\\n\\n TouchInput: TouchInput,\\n MouseInput: MouseInput,\\n PointerEventInput: PointerEventInput,\\n TouchMouseInput: TouchMouseInput,\\n SingleTouchInput: SingleTouchInput,\\n\\n Recognizer: Recognizer,\\n AttrRecognizer: AttrRecognizer,\\n Tap: TapRecognizer,\\n Pan: PanRecognizer,\\n Swipe: SwipeRecognizer,\\n Pinch: PinchRecognizer,\\n Rotate: RotateRecognizer,\\n Press: PressRecognizer,\\n\\n on: addEventListeners,\\n off: removeEventListeners,\\n each: each,\\n merge: merge,\\n extend: extend,\\n assign: assign,\\n inherit: inherit,\\n bindFn: bindFn,\\n prefixed: prefixed\\n});\\n\\n// this prevents errors when Hammer is loaded in the presence of an AMD\\n// style loader but by script tag, not by the loader.\\nvar freeGlobal = (typeof window !== 'undefined' ? window : (typeof self !== 'undefined' ? self : {})); // jshint ignore:line\\nfreeGlobal.Hammer = Hammer;\\n\\nif (true) {\\n !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {\\n return Hammer;\\n }).call(exports, __webpack_require__, exports, module),\\n\\t\\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\\n} else {}\\n\\n})(window, document, 'Hammer');\\n\\n\\n//# sourceURL=webpack://html-flip-book-base/./node_modules/hammerjs/hammer.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/flipbook.scss\":\n/*!**********************************************************************************************************!*\\\n !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/flipbook.scss ***!\n \\**********************************************************************************************************/\n/***/ ((module, __webpack_exports__, __webpack_require__) => {\n\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \\\"../node_modules/css-loader/dist/runtime/noSourceMaps.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ \\\"../node_modules/css-loader/dist/runtime/api.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\\n// Imports\\n\\n\\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\\n// Module\\n___CSS_LOADER_EXPORT___.push([module.id, `.flipbook {\\n height: 100%;\\n width: 100%;\\n overflow: hidden;\\n}\\n\\n.flipbook-debug-bar {\\n position: absolute;\\n bottom: 0;\\n left: 0;\\n width: 100%;\\n background-color: rgba(0, 0, 0, 0.5);\\n color: white;\\n padding: 10px;\\n box-sizing: border-box;\\n display: flex;\\n flex-wrap: wrap;\\n justify-content: space-between;\\n z-index: 9999;\\n}`, \\\"\\\"]);\\n// Exports\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\\n\\n\\n//# sourceURL=webpack://html-flip-book-base/./src/flipbook.scss?../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js\");\n\n/***/ }),\n\n/***/ \"../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/pages.scss\":\n/*!*******************************************************************************************************!*\\\n !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/pages.scss ***!\n \\*******************************************************************************************************/\n/***/ ((module, __webpack_exports__, __webpack_require__) => {\n\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \\\"../node_modules/css-loader/dist/runtime/noSourceMaps.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ \\\"../node_modules/css-loader/dist/runtime/api.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\\n// Imports\\n\\n\\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\\n// Module\\n___CSS_LOADER_EXPORT___.push([module.id, `.page {\\n position: absolute;\\n backface-visibility: hidden;\\n transform-style: preserve-3d;\\n}\\n\\n.page > * {\\n max-width: 100%;\\n max-height: 100%;\\n height: 100%;\\n width: 100%;\\n box-sizing: border-box;\\n}`, \\\"\\\"]);\\n// Exports\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\\n\\n\\n//# sourceURL=webpack://html-flip-book-base/./src/pages.scss?../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js\");\n\n/***/ }),\n\n/***/ \"../node_modules/css-loader/dist/runtime/api.js\":\n/*!******************************************************!*\\\n !*** ../node_modules/css-loader/dist/runtime/api.js ***!\n \\******************************************************/\n/***/ ((module) => {\n\neval(\"\\n\\n/*\\n MIT License http://www.opensource.org/licenses/mit-license.php\\n Author Tobias Koppers @sokra\\n*/\\nmodule.exports = function (cssWithMappingToString) {\\n var list = [];\\n\\n // return the list of modules as css string\\n list.toString = function toString() {\\n return this.map(function (item) {\\n var content = \\\"\\\";\\n var needLayer = typeof item[5] !== \\\"undefined\\\";\\n if (item[4]) {\\n content += \\\"@supports (\\\".concat(item[4], \\\") {\\\");\\n }\\n if (item[2]) {\\n content += \\\"@media \\\".concat(item[2], \\\" {\\\");\\n }\\n if (needLayer) {\\n content += \\\"@layer\\\".concat(item[5].length > 0 ? \\\" \\\".concat(item[5]) : \\\"\\\", \\\" {\\\");\\n }\\n content += cssWithMappingToString(item);\\n if (needLayer) {\\n content += \\\"}\\\";\\n }\\n if (item[2]) {\\n content += \\\"}\\\";\\n }\\n if (item[4]) {\\n content += \\\"}\\\";\\n }\\n return content;\\n }).join(\\\"\\\");\\n };\\n\\n // import a list of modules into the list\\n list.i = function i(modules, media, dedupe, supports, layer) {\\n if (typeof modules === \\\"string\\\") {\\n modules = [[null, modules, undefined]];\\n }\\n var alreadyImportedModules = {};\\n if (dedupe) {\\n for (var k = 0; k < this.length; k++) {\\n var id = this[k][0];\\n if (id != null) {\\n alreadyImportedModules[id] = true;\\n }\\n }\\n }\\n for (var _k = 0; _k < modules.length; _k++) {\\n var item = [].concat(modules[_k]);\\n if (dedupe && alreadyImportedModules[item[0]]) {\\n continue;\\n }\\n if (typeof layer !== \\\"undefined\\\") {\\n if (typeof item[5] === \\\"undefined\\\") {\\n item[5] = layer;\\n } else {\\n item[1] = \\\"@layer\\\".concat(item[5].length > 0 ? \\\" \\\".concat(item[5]) : \\\"\\\", \\\" {\\\").concat(item[1], \\\"}\\\");\\n item[5] = layer;\\n }\\n }\\n if (media) {\\n if (!item[2]) {\\n item[2] = media;\\n } else {\\n item[1] = \\\"@media \\\".concat(item[2], \\\" {\\\").concat(item[1], \\\"}\\\");\\n item[2] = media;\\n }\\n }\\n if (supports) {\\n if (!item[4]) {\\n item[4] = \\\"\\\".concat(supports);\\n } else {\\n item[1] = \\\"@supports (\\\".concat(item[4], \\\") {\\\").concat(item[1], \\\"}\\\");\\n item[4] = supports;\\n }\\n }\\n list.push(item);\\n }\\n };\\n return list;\\n};\\n\\n//# sourceURL=webpack://html-flip-book-base/../node_modules/css-loader/dist/runtime/api.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/css-loader/dist/runtime/noSourceMaps.js\":\n/*!***************************************************************!*\\\n !*** ../node_modules/css-loader/dist/runtime/noSourceMaps.js ***!\n \\***************************************************************/\n/***/ ((module) => {\n\neval(\"\\n\\nmodule.exports = function (i) {\\n return i[1];\\n};\\n\\n//# sourceURL=webpack://html-flip-book-base/../node_modules/css-loader/dist/runtime/noSourceMaps.js?\");\n\n/***/ }),\n\n/***/ \"./src/flipbook.scss\":\n/*!***************************!*\\\n !*** ./src/flipbook.scss ***!\n \\***************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \\\"../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \\\"../node_modules/style-loader/dist/runtime/styleDomAPI.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \\\"../node_modules/style-loader/dist/runtime/insertBySelector.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \\\"../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \\\"../node_modules/style-loader/dist/runtime/insertStyleElement.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \\\"../node_modules/style-loader/dist/runtime/styleTagTransform.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_flipbook_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js!./flipbook.scss */ \\\"../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/flipbook.scss\\\");\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\nvar options = {};\\n\\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\\noptions.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \\\"head\\\");\\noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\\n\\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_flipbook_scss__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"], options);\\n\\n\\n\\n\\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_flipbook_scss__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"] && _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_flipbook_scss__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_flipbook_scss__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals : undefined);\\n\\n\\n//# sourceURL=webpack://html-flip-book-base/./src/flipbook.scss?\");\n\n/***/ }),\n\n/***/ \"./src/pages.scss\":\n/*!************************!*\\\n !*** ./src/pages.scss ***!\n \\************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \\\"../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \\\"../node_modules/style-loader/dist/runtime/styleDomAPI.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \\\"../node_modules/style-loader/dist/runtime/insertBySelector.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \\\"../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \\\"../node_modules/style-loader/dist/runtime/insertStyleElement.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \\\"../node_modules/style-loader/dist/runtime/styleTagTransform.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_pages_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js!./pages.scss */ \\\"../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/pages.scss\\\");\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\nvar options = {};\\n\\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\\noptions.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \\\"head\\\");\\noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\\n\\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_pages_scss__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"], options);\\n\\n\\n\\n\\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_pages_scss__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"] && _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_pages_scss__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_pages_scss__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals : undefined);\\n\\n\\n//# sourceURL=webpack://html-flip-book-base/./src/pages.scss?\");\n\n/***/ }),\n\n/***/ \"../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\":\n/*!*****************************************************************************!*\\\n !*** ../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***!\n \\*****************************************************************************/\n/***/ ((module) => {\n\neval(\"\\n\\nvar stylesInDOM = [];\\nfunction getIndexByIdentifier(identifier) {\\n var result = -1;\\n for (var i = 0; i < stylesInDOM.length; i++) {\\n if (stylesInDOM[i].identifier === identifier) {\\n result = i;\\n break;\\n }\\n }\\n return result;\\n}\\nfunction modulesToDom(list, options) {\\n var idCountMap = {};\\n var identifiers = [];\\n for (var i = 0; i < list.length; i++) {\\n var item = list[i];\\n var id = options.base ? item[0] + options.base : item[0];\\n var count = idCountMap[id] || 0;\\n var identifier = \\\"\\\".concat(id, \\\" \\\").concat(count);\\n idCountMap[id] = count + 1;\\n var indexByIdentifier = getIndexByIdentifier(identifier);\\n var obj = {\\n css: item[1],\\n media: item[2],\\n sourceMap: item[3],\\n supports: item[4],\\n layer: item[5]\\n };\\n if (indexByIdentifier !== -1) {\\n stylesInDOM[indexByIdentifier].references++;\\n stylesInDOM[indexByIdentifier].updater(obj);\\n } else {\\n var updater = addElementStyle(obj, options);\\n options.byIndex = i;\\n stylesInDOM.splice(i, 0, {\\n identifier: identifier,\\n updater: updater,\\n references: 1\\n });\\n }\\n identifiers.push(identifier);\\n }\\n return identifiers;\\n}\\nfunction addElementStyle(obj, options) {\\n var api = options.domAPI(options);\\n api.update(obj);\\n var updater = function updater(newObj) {\\n if (newObj) {\\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\\n return;\\n }\\n api.update(obj = newObj);\\n } else {\\n api.remove();\\n }\\n };\\n return updater;\\n}\\nmodule.exports = function (list, options) {\\n options = options || {};\\n list = list || [];\\n var lastIdentifiers = modulesToDom(list, options);\\n return function update(newList) {\\n newList = newList || [];\\n for (var i = 0; i < lastIdentifiers.length; i++) {\\n var identifier = lastIdentifiers[i];\\n var index = getIndexByIdentifier(identifier);\\n stylesInDOM[index].references--;\\n }\\n var newLastIdentifiers = modulesToDom(newList, options);\\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\\n var _identifier = lastIdentifiers[_i];\\n var _index = getIndexByIdentifier(_identifier);\\n if (stylesInDOM[_index].references === 0) {\\n stylesInDOM[_index].updater();\\n stylesInDOM.splice(_index, 1);\\n }\\n }\\n lastIdentifiers = newLastIdentifiers;\\n };\\n};\\n\\n//# sourceURL=webpack://html-flip-book-base/../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/style-loader/dist/runtime/insertBySelector.js\":\n/*!*********************************************************************!*\\\n !*** ../node_modules/style-loader/dist/runtime/insertBySelector.js ***!\n \\*********************************************************************/\n/***/ ((module) => {\n\neval(\"\\n\\nvar memo = {};\\n\\n/* istanbul ignore next */\\nfunction getTarget(target) {\\n if (typeof memo[target] === \\\"undefined\\\") {\\n var styleTarget = document.querySelector(target);\\n\\n // Special case to return head of iframe instead of iframe itself\\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\\n try {\\n // This will throw an exception if access to iframe is blocked\\n // due to cross-origin restrictions\\n styleTarget = styleTarget.contentDocument.head;\\n } catch (e) {\\n // istanbul ignore next\\n styleTarget = null;\\n }\\n }\\n memo[target] = styleTarget;\\n }\\n return memo[target];\\n}\\n\\n/* istanbul ignore next */\\nfunction insertBySelector(insert, style) {\\n var target = getTarget(insert);\\n if (!target) {\\n throw new Error(\\\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\\\");\\n }\\n target.appendChild(style);\\n}\\nmodule.exports = insertBySelector;\\n\\n//# sourceURL=webpack://html-flip-book-base/../node_modules/style-loader/dist/runtime/insertBySelector.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/style-loader/dist/runtime/insertStyleElement.js\":\n/*!***********************************************************************!*\\\n !*** ../node_modules/style-loader/dist/runtime/insertStyleElement.js ***!\n \\***********************************************************************/\n/***/ ((module) => {\n\neval(\"\\n\\n/* istanbul ignore next */\\nfunction insertStyleElement(options) {\\n var element = document.createElement(\\\"style\\\");\\n options.setAttributes(element, options.attributes);\\n options.insert(element, options.options);\\n return element;\\n}\\nmodule.exports = insertStyleElement;\\n\\n//# sourceURL=webpack://html-flip-book-base/../node_modules/style-loader/dist/runtime/insertStyleElement.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\":\n/*!***********************************************************************************!*\\\n !*** ../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js ***!\n \\***********************************************************************************/\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\neval(\"\\n\\n/* istanbul ignore next */\\nfunction setAttributesWithoutAttributes(styleElement) {\\n var nonce = true ? __webpack_require__.nc : 0;\\n if (nonce) {\\n styleElement.setAttribute(\\\"nonce\\\", nonce);\\n }\\n}\\nmodule.exports = setAttributesWithoutAttributes;\\n\\n//# sourceURL=webpack://html-flip-book-base/../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/style-loader/dist/runtime/styleDomAPI.js\":\n/*!****************************************************************!*\\\n !*** ../node_modules/style-loader/dist/runtime/styleDomAPI.js ***!\n \\****************************************************************/\n/***/ ((module) => {\n\neval(\"\\n\\n/* istanbul ignore next */\\nfunction apply(styleElement, options, obj) {\\n var css = \\\"\\\";\\n if (obj.supports) {\\n css += \\\"@supports (\\\".concat(obj.supports, \\\") {\\\");\\n }\\n if (obj.media) {\\n css += \\\"@media \\\".concat(obj.media, \\\" {\\\");\\n }\\n var needLayer = typeof obj.layer !== \\\"undefined\\\";\\n if (needLayer) {\\n css += \\\"@layer\\\".concat(obj.layer.length > 0 ? \\\" \\\".concat(obj.layer) : \\\"\\\", \\\" {\\\");\\n }\\n css += obj.css;\\n if (needLayer) {\\n css += \\\"}\\\";\\n }\\n if (obj.media) {\\n css += \\\"}\\\";\\n }\\n if (obj.supports) {\\n css += \\\"}\\\";\\n }\\n var sourceMap = obj.sourceMap;\\n if (sourceMap && typeof btoa !== \\\"undefined\\\") {\\n css += \\\"\\\\n/*# sourceMappingURL=data:application/json;base64,\\\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \\\" */\\\");\\n }\\n\\n // For old IE\\n /* istanbul ignore if */\\n options.styleTagTransform(css, styleElement, options.options);\\n}\\nfunction removeStyleElement(styleElement) {\\n // istanbul ignore if\\n if (styleElement.parentNode === null) {\\n return false;\\n }\\n styleElement.parentNode.removeChild(styleElement);\\n}\\n\\n/* istanbul ignore next */\\nfunction domAPI(options) {\\n if (typeof document === \\\"undefined\\\") {\\n return {\\n update: function update() {},\\n remove: function remove() {}\\n };\\n }\\n var styleElement = options.insertStyleElement(options);\\n return {\\n update: function update(obj) {\\n apply(styleElement, options, obj);\\n },\\n remove: function remove() {\\n removeStyleElement(styleElement);\\n }\\n };\\n}\\nmodule.exports = domAPI;\\n\\n//# sourceURL=webpack://html-flip-book-base/../node_modules/style-loader/dist/runtime/styleDomAPI.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/style-loader/dist/runtime/styleTagTransform.js\":\n/*!**********************************************************************!*\\\n !*** ../node_modules/style-loader/dist/runtime/styleTagTransform.js ***!\n \\**********************************************************************/\n/***/ ((module) => {\n\neval(\"\\n\\n/* istanbul ignore next */\\nfunction styleTagTransform(css, styleElement) {\\n if (styleElement.styleSheet) {\\n styleElement.styleSheet.cssText = css;\\n } else {\\n while (styleElement.firstChild) {\\n styleElement.removeChild(styleElement.firstChild);\\n }\\n styleElement.appendChild(document.createTextNode(css));\\n }\\n}\\nmodule.exports = styleTagTransform;\\n\\n//# sourceURL=webpack://html-flip-book-base/../node_modules/style-loader/dist/runtime/styleTagTransform.js?\");\n\n/***/ }),\n\n/***/ \"./src/aspect-ratio.ts\":\n/*!*****************************!*\\\n !*** ./src/aspect-ratio.ts ***!\n \\*****************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ AspectRatioImpl: () => (/* binding */ AspectRatioImpl)\\n/* harmony export */ });\\nclass AspectRatioImpl {\\n width;\\n height;\\n static from(aspectRatio) {\\n return new AspectRatioImpl(aspectRatio.width, aspectRatio.height);\\n }\\n constructor(width, height) {\\n this.width = width;\\n this.height = height;\\n }\\n get value() {\\n return this.width / this.height;\\n }\\n}\\n\\n\\n//# sourceURL=webpack://html-flip-book-base/./src/aspect-ratio.ts?\");\n\n/***/ }),\n\n/***/ \"./src/flip-direction.ts\":\n/*!*******************************!*\\\n !*** ./src/flip-direction.ts ***!\n \\*******************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ FlipDirection: () => (/* binding */ FlipDirection)\\n/* harmony export */ });\\nvar FlipDirection;\\n(function (FlipDirection) {\\n FlipDirection[\\\"Forward\\\"] = \\\"Forward\\\";\\n FlipDirection[\\\"Backward\\\"] = \\\"Backward\\\";\\n FlipDirection[\\\"None\\\"] = \\\"None\\\";\\n})(FlipDirection || (FlipDirection = {}));\\n\\n\\n//# sourceURL=webpack://html-flip-book-base/./src/flip-direction.ts?\");\n\n/***/ }),\n\n/***/ \"./src/flipbook.ts\":\n/*!*************************!*\\\n !*** ./src/flipbook.ts ***!\n \\*************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ FlipBook: () => (/* binding */ FlipBook)\\n/* harmony export */ });\\n/* harmony import */ var _pages_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pages.scss */ \\\"./src/pages.scss\\\");\\n/* harmony import */ var _flipbook_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./flipbook.scss */ \\\"./src/flipbook.scss\\\");\\n/* harmony import */ var hammerjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! hammerjs */ \\\"./node_modules/hammerjs/hammer.js\\\");\\n/* harmony import */ var hammerjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(hammerjs__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _leaf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./leaf */ \\\"./src/leaf.ts\\\");\\n/* harmony import */ var _flip_direction__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./flip-direction */ \\\"./src/flip-direction.ts\\\");\\n/* harmony import */ var _size__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./size */ \\\"./src/size.ts\\\");\\n\\n\\n\\n\\n\\n\\nconst FAST_DELTA = 500;\\nclass FlipBook {\\n bookElement;\\n pageElements = [];\\n pagesCount;\\n leafAspectRatio = { width: 2, height: 3 };\\n coverAspectRatio = {\\n width: 2.15,\\n height: 3.15\\n };\\n direction = 'ltr';\\n onPageChanged;\\n pageSemantics;\\n leaves = [];\\n // flipping state\\n currentLeaf = undefined;\\n flipDirection = _flip_direction__WEBPACK_IMPORTED_MODULE_4__.FlipDirection.None;\\n flipStartingPos = 0;\\n isDuringManualFlip = false;\\n flipDelta = 0;\\n isDuringAutoFlip = false;\\n touchStartingPos = { x: 0, y: 0 };\\n prevVisiblePageIndices;\\n get isLTR() {\\n return this.direction === 'ltr';\\n }\\n get isClosed() {\\n return !this.currentOrTurningLeaves[0];\\n }\\n get isClosedInverted() {\\n return !this.currentLeaves[1];\\n }\\n get currentLeaves() {\\n let secondLeafIndex = -1;\\n for (let i = this.leaves.length - 1; i >= 0; i--) {\\n const leaf = this.leaves[i];\\n if (leaf.isTurned) {\\n secondLeafIndex = leaf.index + 1;\\n break;\\n }\\n }\\n return secondLeafIndex == -1\\n ? [undefined, this.leaves[0]]\\n : secondLeafIndex == this.leaves.length\\n ? [this.leaves[secondLeafIndex - 1], undefined]\\n : [this.leaves[secondLeafIndex - 1], this.leaves[secondLeafIndex]];\\n }\\n get currentOrTurningLeaves() {\\n let secondLeafIndex = -1;\\n for (let i = this.leaves.length - 1; i >= 0; i--) {\\n const leaf = this.leaves[i];\\n if (leaf.isTurned || leaf.isTurning) {\\n secondLeafIndex = leaf.index + 1;\\n break;\\n }\\n }\\n return secondLeafIndex == -1\\n ? [undefined, this.leaves[0]]\\n : secondLeafIndex == this.leaves.length\\n ? [this.leaves[secondLeafIndex - 1], undefined]\\n : [this.leaves[secondLeafIndex - 1], this.leaves[secondLeafIndex]];\\n }\\n constructor(options) {\\n this.pagesCount = options.pagesCount;\\n this.leafAspectRatio = options.leafAspectRatio || this.leafAspectRatio;\\n this.coverAspectRatio = options.coverAspectRatio || this.coverAspectRatio;\\n this.direction = options.direction || this.direction;\\n this.pageSemantics = options.pageSemantics;\\n this.onPageChanged = options.onPageChanged;\\n }\\n render(selector, debug = false) {\\n const bookElement = document.querySelector(selector);\\n if (!bookElement) {\\n throw new Error(`Couldn't find container with selector: ${selector}`);\\n }\\n this.bookElement = bookElement;\\n if (!this.bookElement.classList.contains('flipbook')) {\\n this.bookElement.classList.add('flipbook');\\n }\\n const pageElements = bookElement.querySelectorAll('.page');\\n if (!pageElements.length) {\\n throw new Error('No pages found in flipbook');\\n }\\n this.pageElements = Array.from(pageElements);\\n this.leaves.splice(0, this.leaves.length);\\n const leavesCount = Math.ceil(this.pagesCount / 2);\\n const maxCoverSize = new _size__WEBPACK_IMPORTED_MODULE_5__.Size(this.bookElement.clientWidth / 2, this.bookElement.clientHeight);\\n const coverSize = maxCoverSize.aspectRatioFit(this.coverAspectRatio);\\n const leafSize = new _size__WEBPACK_IMPORTED_MODULE_5__.Size((coverSize.width * this.leafAspectRatio.width) /\\n this.coverAspectRatio.width, (coverSize.height * this.leafAspectRatio.height) /\\n this.coverAspectRatio.height);\\n this.bookElement.style.perspective = `${Math.min(leafSize.width * 2, leafSize.height) * 2}px`;\\n this.pageElements.forEach((pageElement, pageIndex) => {\\n pageElement.style.width = `${leafSize.width}px`;\\n pageElement.style.height = `${leafSize.height}px`;\\n pageElement.style.zIndex = `${this.pagesCount - pageIndex}`;\\n pageElement.dataset.pageIndex = pageIndex.toString();\\n pageElement.style[this.isLTR ? 'left' : 'right'] = `${(bookElement.clientWidth - 2 * leafSize.width) / 2}px`;\\n pageElement.style.top = `${(bookElement.clientHeight - leafSize.height) / 2}px`;\\n pageElement.dataset.pageSemanticName =\\n this.pageSemantics?.indexToSemanticName(pageIndex) ?? '';\\n pageElement.dataset.pageTitle =\\n this.pageSemantics?.indexToTitle(pageIndex) ?? '';\\n const leafIndex = Math.floor(pageIndex / 2);\\n const isOddPage = (pageIndex + 1) % 2 === 1;\\n // TODO: set dynamically by parameter and not by hardcoding eq 0\\n pageElement.classList.add(isOddPage ? 'odd' : 'even', ...(pageIndex === 0 ? ['current-page'] : []));\\n if (isOddPage) {\\n pageElement.style.transform = `translateX(${this.isLTR ? `` : `-`}100%)`;\\n this.leaves[leafIndex] = new _leaf__WEBPACK_IMPORTED_MODULE_3__.Leaf(leafIndex, [pageElement, undefined], \\n // TODO: set turned based on initialized page\\n _leaf__WEBPACK_IMPORTED_MODULE_3__.NOT_FLIPPED, {\\n isLTR: this.isLTR,\\n leavesCount: leavesCount,\\n pagesCount: this.pagesCount\\n }, (direction) => {\\n const currentVisiblePageIndices = direction == _flip_direction__WEBPACK_IMPORTED_MODULE_4__.FlipDirection.Forward\\n ? pageIndex + 2 === this.pagesCount\\n ? [pageIndex + 1]\\n : [pageIndex + 1, pageIndex + 2]\\n : pageIndex === 0\\n ? [pageIndex]\\n : [pageIndex - 1, pageIndex];\\n if (this.prevVisiblePageIndices &&\\n this.prevVisiblePageIndices.length ===\\n currentVisiblePageIndices.length &&\\n currentVisiblePageIndices.every((v, i) => v === this.prevVisiblePageIndices[i])) {\\n return;\\n }\\n const prevVisiblePageIndices = this.prevVisiblePageIndices;\\n this.prevVisiblePageIndices = currentVisiblePageIndices;\\n this.onTurned(currentVisiblePageIndices, prevVisiblePageIndices);\\n });\\n }\\n else {\\n pageElement.style.transform = `scaleX(-1)translateX(${this.isLTR ? `-` : ``}100%)`;\\n this.leaves[leafIndex].pages[1] = pageElement;\\n }\\n });\\n const hammer = new (hammerjs__WEBPACK_IMPORTED_MODULE_2___default())(this.bookElement);\\n hammer.on('panstart', this.onDragStart.bind(this));\\n hammer.on('panmove', this.onDragUpdate.bind(this));\\n hammer.on('panend', this.onDragEnd.bind(this));\\n this.bookElement.addEventListener('touchstart', this.handleTouchStart.bind(this), { passive: false });\\n this.bookElement.addEventListener('touchmove', this.handleTouchMove.bind(this), { passive: false });\\n if (debug)\\n this.fillDebugBar();\\n }\\n fillDebugBar() {\\n const debugBar = document.createElement('div');\\n debugBar.className = 'flipbook-debug-bar';\\n this.bookElement?.appendChild(debugBar);\\n setInterval(() => {\\n // Populate debug bar with relevant information\\n debugBar.innerHTML = `\\r\\n
Direction: ${this.isLTR ? 'LTR' : 'RTL'}
\\r\\n
Current Leaf: ${this.currentLeaf ? this.currentLeaf.index : 'None'}
\\r\\n
Flip dir: ${this.flipDirection}
\\r\\n
Flip Δ: ${this.flipDelta}
\\r\\n
Current Leaf Flip Position: ${this.currentLeaf?.flipPosition.toFixed(3)}
\\r\\n
Is During Auto Flip: ${this.isDuringAutoFlip}
\\r\\n `;\\n }, 10);\\n }\\n onDragStart(event) {\\n console.log('drag start');\\n if (this.currentLeaf || this.isDuringAutoFlip) {\\n this.flipDirection = _flip_direction__WEBPACK_IMPORTED_MODULE_4__.FlipDirection.None;\\n this.flipStartingPos = 0;\\n return;\\n }\\n this.flipStartingPos = event.center.x;\\n }\\n onDragUpdate(event) {\\n console.log('drag update');\\n if (this.isDuringAutoFlip || this.isDuringManualFlip) {\\n return;\\n }\\n this.isDuringManualFlip = true;\\n try {\\n const currentPos = event.center.x;\\n this.flipDelta = this.isLTR\\n ? this.flipStartingPos - currentPos\\n : currentPos - this.flipStartingPos;\\n const bookWidth = this.bookElement?.clientWidth ?? 0;\\n if (Math.abs(this.flipDelta) > bookWidth)\\n return;\\n if (this.flipDelta === 0)\\n return;\\n this.flipDirection =\\n this.flipDirection !== _flip_direction__WEBPACK_IMPORTED_MODULE_4__.FlipDirection.None\\n ? this.flipDirection\\n : this.flipDelta > 0\\n ? _flip_direction__WEBPACK_IMPORTED_MODULE_4__.FlipDirection.Forward\\n : _flip_direction__WEBPACK_IMPORTED_MODULE_4__.FlipDirection.Backward;\\n switch (this.flipDirection) {\\n case _flip_direction__WEBPACK_IMPORTED_MODULE_4__.FlipDirection.Forward:\\n const posForward = (this.flipDelta / bookWidth);\\n if (posForward > 1 || this.flipDelta < 0) {\\n return;\\n }\\n if (!this.currentLeaf) {\\n if (this.isClosedInverted) {\\n return;\\n }\\n else {\\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- when `!this.isClosedInverted` there will always be a second leaf in `this.currentOrTurningLeaves`\\n this.currentLeaf = this.currentOrTurningLeaves[1];\\n }\\n }\\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- at this point `this.currentLeaf` is guaranteed to be defined\\n this.currentLeaf.efficientFlipToPosition(posForward);\\n break;\\n case _flip_direction__WEBPACK_IMPORTED_MODULE_4__.FlipDirection.Backward:\\n const posBackward = (1 -\\n Math.abs(this.flipDelta) / bookWidth);\\n if (posBackward < 0 || this.flipDelta > 0) {\\n return;\\n }\\n if (!this.currentLeaf) {\\n if (this.isClosed) {\\n return;\\n }\\n else {\\n this.currentLeaf = this.currentOrTurningLeaves[0];\\n }\\n }\\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- at this point `this.currentLeaf` is guaranteed to be defined\\n this.currentLeaf.efficientFlipToPosition(posBackward);\\n break;\\n }\\n }\\n finally {\\n this.isDuringManualFlip = false;\\n }\\n }\\n async onDragEnd(event) {\\n console.log('drag end');\\n if (!this.currentLeaf || this.isDuringAutoFlip) {\\n this.flipDirection = _flip_direction__WEBPACK_IMPORTED_MODULE_4__.FlipDirection.None;\\n this.flipStartingPos = 0;\\n return;\\n }\\n const ppsX = event.velocityX * 1000; // pixels per second\\n let flipTo;\\n switch (this.flipDirection) {\\n case _flip_direction__WEBPACK_IMPORTED_MODULE_4__.FlipDirection.Forward:\\n if ((this.isLTR ? ppsX < -FAST_DELTA : ppsX > FAST_DELTA) ||\\n this.currentLeaf.flipPosition >= 0.5) {\\n flipTo = 1;\\n }\\n else {\\n flipTo = 0;\\n }\\n break;\\n case _flip_direction__WEBPACK_IMPORTED_MODULE_4__.FlipDirection.Backward:\\n if ((this.isLTR ? ppsX > FAST_DELTA : ppsX < -FAST_DELTA) ||\\n this.currentLeaf.flipPosition <= 0.5) {\\n flipTo = 0;\\n }\\n else {\\n flipTo = 1;\\n }\\n break;\\n default:\\n return;\\n }\\n this.isDuringAutoFlip = true;\\n this.flipDirection = _flip_direction__WEBPACK_IMPORTED_MODULE_4__.FlipDirection.None;\\n this.flipStartingPos = 0;\\n await this.currentLeaf.flipToPosition(flipTo);\\n this.isDuringAutoFlip = false;\\n this.currentLeaf = undefined;\\n }\\n handleTouchStart = (e) => {\\n if (e.touches.length > 1) {\\n return;\\n }\\n const touch = e.touches[0];\\n this.touchStartingPos = { x: touch.pageX, y: touch.pageY };\\n };\\n handleTouchMove = (e) => {\\n if (e.touches.length > 1) {\\n return;\\n }\\n const touch = e.touches[0];\\n const deltaX = touch.pageX - this.touchStartingPos.x;\\n const deltaY = touch.pageY - this.touchStartingPos.y;\\n // only allow vertical scrolling, as if allowing horizontal scrolling, it will interfere with the flip gesture (for touch devices)\\n // TODO: allow horizontal scrolling if the user is not trying to flip, say if is scrolling an overflowed element\\n if (Math.abs(deltaX) > Math.abs(deltaY)) {\\n e.preventDefault();\\n }\\n };\\n onTurned(currentVisiblePageIndices, prevVisibilePageIndices) {\\n for (let i = 0; i < this.pageElements.length; i++) {\\n const pageElement = this.pageElements[i];\\n const action = currentVisiblePageIndices.includes(i)\\n ? pageElement.classList.add\\n : !prevVisibilePageIndices || !prevVisibilePageIndices.includes\\n ? () => null\\n : pageElement.classList.remove;\\n action.bind(pageElement.classList)('current-page');\\n }\\n }\\n jumpToPage(pageIndex) {\\n if (this.onPageChanged) {\\n this.onPageChanged(pageIndex);\\n }\\n }\\n}\\n\\n\\n\\n//# sourceURL=webpack://html-flip-book-base/./src/flipbook.ts?\");\n\n/***/ }),\n\n/***/ \"./src/leaf.ts\":\n/*!*********************!*\\\n !*** ./src/leaf.ts ***!\n \\*********************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ FLIPPED: () => (/* binding */ FLIPPED),\\n/* harmony export */ Leaf: () => (/* binding */ Leaf),\\n/* harmony export */ NOT_FLIPPED: () => (/* binding */ NOT_FLIPPED)\\n/* harmony export */ });\\n/* harmony import */ var throttle_debounce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! throttle-debounce */ \\\"./node_modules/throttle-debounce/esm/index.js\\\");\\n/* harmony import */ var _flip_direction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./flip-direction */ \\\"./src/flip-direction.ts\\\");\\n\\n\\nconst FLIPPED = true;\\nconst NOT_FLIPPED = false;\\nclass Leaf {\\n index;\\n pages;\\n bookProperties;\\n onTurned;\\n currentAnimation = null;\\n targetFlipPosition = null;\\n wrappedFlipPosition;\\n constructor(index, pages, isFlipped, bookProperties, onTurned) {\\n this.index = index;\\n this.pages = pages;\\n this.bookProperties = bookProperties;\\n this.onTurned = onTurned;\\n this.wrappedFlipPosition = isFlipped ? 1 : 0;\\n // TODO: rethink this\\n // if(isFlipped) {\\n // // this.flipToPosition(1);\\n // }\\n }\\n get isTurned() {\\n return this.flipPosition === 1;\\n }\\n get isTurning() {\\n return this.flipPosition !== 0;\\n }\\n get isCover() {\\n return this.isFirst || this.isLast;\\n }\\n get isFirst() {\\n return this.index === 0;\\n }\\n get isLast() {\\n return this.index === this.bookProperties.leavesCount - 1;\\n }\\n set flipPosition(value) {\\n this.wrappedFlipPosition = Math.max(0, Math.min(1, value));\\n }\\n get flipPosition() {\\n return this.wrappedFlipPosition;\\n }\\n async flipToPosition(flipPosition, velocity = 225) {\\n if (this.currentAnimation) {\\n await this.currentAnimation;\\n }\\n if (this.flipPosition === flipPosition) {\\n return Promise.resolve();\\n }\\n if (this.targetFlipPosition === flipPosition) {\\n return this.currentAnimation ?? Promise.resolve();\\n }\\n this.targetFlipPosition = flipPosition;\\n this.currentAnimation = new Promise(resolve => {\\n const currentFlipPosition = this.flipPosition;\\n const distance = Math.abs(flipPosition - currentFlipPosition);\\n const duration = ((distance * 180) / velocity) * 1000; // duration in milliseconds\\n const start = performance.now();\\n const step = (timestamp) => {\\n const elapsed = timestamp - start;\\n if (elapsed < 0) {\\n requestAnimationFrame(step);\\n return;\\n }\\n const progress = Math.min(elapsed / duration, 1);\\n const newPosition = currentFlipPosition + progress * (flipPosition - currentFlipPosition);\\n this.pages.forEach((page, index) => {\\n const isLTR = this.bookProperties.isLTR;\\n if (page) {\\n const isOdd = (index % 2) + 1 === 1;\\n const degrees = isOdd\\n ? isLTR\\n ? newPosition > 0.5\\n ? 180 - newPosition * 180\\n : -newPosition * 180\\n : newPosition > 0.5\\n ? -(180 - newPosition * 180)\\n : newPosition * 180\\n : isLTR\\n ? newPosition < 0.5\\n ? -newPosition * 180\\n : 180 - newPosition * 180\\n : newPosition < 0.5\\n ? newPosition * 180\\n : -(180 - newPosition * 180);\\n const rotateY = `${degrees}deg`;\\n const translateX = `${isOdd ? (isLTR ? `100%` : `-100%`) : isLTR ? `0px` : `0px`}`;\\n const scaleX = isOdd\\n ? newPosition > 0.5\\n ? -1\\n : 1\\n : newPosition < 0.5\\n ? -1\\n : 1;\\n page.style.transform = `translateX(${translateX})rotateY(${rotateY})scaleX(${scaleX})`;\\n // console.log(page.style.transform);\\n page.style.transformOrigin = isOdd\\n ? `${isLTR ? 'left' : 'right'}`\\n : `${isLTR ? 'right' : 'left'}`;\\n page.style.zIndex = `${newPosition > 0.5\\n ? page.dataset.pageIndex\\n : this.bookProperties.pagesCount -\\n page.dataset.pageIndex}`;\\n }\\n });\\n // Ensure the new position is within valid bounds [0, 1]\\n this.flipPosition = Math.max(0, Math.min(1, newPosition));\\n if (this.flipPosition === 1 || this.flipPosition === 0) {\\n this.onTurned(this.flipPosition === 1\\n ? _flip_direction__WEBPACK_IMPORTED_MODULE_1__.FlipDirection.Forward\\n : _flip_direction__WEBPACK_IMPORTED_MODULE_1__.FlipDirection.Backward);\\n }\\n // Detailed log for debugging\\n // console.log(\\n // `Timestamp: ${timestamp}, Elapsed: ${elapsed}, Progress: ${progress}, Current Position: ${currentFlipPosition}, Requested Position: ${flipPosition}, New Position: ${this.flipPosition}`\\n // );\\n if (progress < 1) {\\n requestAnimationFrame(step);\\n }\\n else {\\n this.currentAnimation = null;\\n this.targetFlipPosition = null;\\n resolve();\\n }\\n };\\n requestAnimationFrame(step);\\n });\\n return this.currentAnimation;\\n }\\n async efficientFlipToPosition(flipPosition, velocity = 20000) {\\n return (0,throttle_debounce__WEBPACK_IMPORTED_MODULE_0__.throttle)(1, this.flipToPosition.bind(this))(flipPosition, velocity);\\n }\\n}\\n\\n\\n//# sourceURL=webpack://html-flip-book-base/./src/leaf.ts?\");\n\n/***/ }),\n\n/***/ \"./src/size.ts\":\n/*!*********************!*\\\n !*** ./src/size.ts ***!\n \\*********************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ Size: () => (/* binding */ Size)\\n/* harmony export */ });\\n/* harmony import */ var _aspect_ratio__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./aspect-ratio */ \\\"./src/aspect-ratio.ts\\\");\\n\\nclass Size {\\n width;\\n height;\\n aspectRatio;\\n aspectRatioFit(rhsAspectRatio) {\\n const rhsAspectRatioValue = _aspect_ratio__WEBPACK_IMPORTED_MODULE_0__.AspectRatioImpl.from(rhsAspectRatio).value;\\n return this.aspectRatio.value > rhsAspectRatioValue\\n ? new Size(this.height * rhsAspectRatioValue, this.height)\\n : new Size(this.width, this.width / rhsAspectRatioValue);\\n }\\n constructor(width, height) {\\n this.width = width;\\n this.height = height;\\n this.aspectRatio = new _aspect_ratio__WEBPACK_IMPORTED_MODULE_0__.AspectRatioImpl(width, height);\\n }\\n get asString() {\\n return `${this.width}x${this.height}`;\\n }\\n}\\n\\n\\n//# sourceURL=webpack://html-flip-book-base/./src/size.ts?\");\n\n/***/ }),\n\n/***/ \"./node_modules/throttle-debounce/esm/index.js\":\n/*!*****************************************************!*\\\n !*** ./node_modules/throttle-debounce/esm/index.js ***!\n \\*****************************************************/\n/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {\n\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ debounce: () => (/* binding */ debounce),\\n/* harmony export */ throttle: () => (/* binding */ throttle)\\n/* harmony export */ });\\n/* eslint-disable no-undefined,no-param-reassign,no-shadow */\\n\\n/**\\n * Throttle execution of a function. Especially useful for rate limiting\\n * execution of handlers on events like resize and scroll.\\n *\\n * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher)\\n * are most useful.\\n * @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through,\\n * as-is, to `callback` when the throttled-function is executed.\\n * @param {object} [options] - An object to configure options.\\n * @param {boolean} [options.noTrailing] - Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds\\n * while the throttled-function is being called. If noTrailing is false or unspecified, callback will be executed\\n * one final time after the last throttled-function call. (After the throttled-function has not been called for\\n * `delay` milliseconds, the internal counter is reset).\\n * @param {boolean} [options.noLeading] - Optional, defaults to false. If noLeading is false, the first throttled-function call will execute callback\\n * immediately. If noLeading is true, the first the callback execution will be skipped. It should be noted that\\n * callback will never executed if both noLeading = true and noTrailing = true.\\n * @param {boolean} [options.debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is\\n * false (at end), schedule `callback` to execute after `delay` ms.\\n *\\n * @returns {Function} A new, throttled, function.\\n */\\nfunction throttle (delay, callback, options) {\\n var _ref = options || {},\\n _ref$noTrailing = _ref.noTrailing,\\n noTrailing = _ref$noTrailing === void 0 ? false : _ref$noTrailing,\\n _ref$noLeading = _ref.noLeading,\\n noLeading = _ref$noLeading === void 0 ? false : _ref$noLeading,\\n _ref$debounceMode = _ref.debounceMode,\\n debounceMode = _ref$debounceMode === void 0 ? undefined : _ref$debounceMode;\\n /*\\n * After wrapper has stopped being called, this timeout ensures that\\n * `callback` is executed at the proper times in `throttle` and `end`\\n * debounce modes.\\n */\\n\\n\\n var timeoutID;\\n var cancelled = false; // Keep track of the last time `callback` was executed.\\n\\n var lastExec = 0; // Function to clear existing timeout\\n\\n function clearExistingTimeout() {\\n if (timeoutID) {\\n clearTimeout(timeoutID);\\n }\\n } // Function to cancel next exec\\n\\n\\n function cancel(options) {\\n var _ref2 = options || {},\\n _ref2$upcomingOnly = _ref2.upcomingOnly,\\n upcomingOnly = _ref2$upcomingOnly === void 0 ? false : _ref2$upcomingOnly;\\n\\n clearExistingTimeout();\\n cancelled = !upcomingOnly;\\n }\\n /*\\n * The `wrapper` function encapsulates all of the throttling / debouncing\\n * functionality and when executed will limit the rate at which `callback`\\n * is executed.\\n */\\n\\n\\n function wrapper() {\\n for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {\\n arguments_[_key] = arguments[_key];\\n }\\n\\n var self = this;\\n var elapsed = Date.now() - lastExec;\\n\\n if (cancelled) {\\n return;\\n } // Execute `callback` and update the `lastExec` timestamp.\\n\\n\\n function exec() {\\n lastExec = Date.now();\\n callback.apply(self, arguments_);\\n }\\n /*\\n * If `debounceMode` is true (at begin) this is used to clear the flag\\n * to allow future `callback` executions.\\n */\\n\\n\\n function clear() {\\n timeoutID = undefined;\\n }\\n\\n if (!noLeading && debounceMode && !timeoutID) {\\n /*\\n * Since `wrapper` is being called for the first time and\\n * `debounceMode` is true (at begin), execute `callback`\\n * and noLeading != true.\\n */\\n exec();\\n }\\n\\n clearExistingTimeout();\\n\\n if (debounceMode === undefined && elapsed > delay) {\\n if (noLeading) {\\n /*\\n * In throttle mode with noLeading, if `delay` time has\\n * been exceeded, update `lastExec` and schedule `callback`\\n * to execute after `delay` ms.\\n */\\n lastExec = Date.now();\\n\\n if (!noTrailing) {\\n timeoutID = setTimeout(debounceMode ? clear : exec, delay);\\n }\\n } else {\\n /*\\n * In throttle mode without noLeading, if `delay` time has been exceeded, execute\\n * `callback`.\\n */\\n exec();\\n }\\n } else if (noTrailing !== true) {\\n /*\\n * In trailing throttle mode, since `delay` time has not been\\n * exceeded, schedule `callback` to execute `delay` ms after most\\n * recent execution.\\n *\\n * If `debounceMode` is true (at begin), schedule `clear` to execute\\n * after `delay` ms.\\n *\\n * If `debounceMode` is false (at end), schedule `callback` to\\n * execute after `delay` ms.\\n */\\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\\n }\\n }\\n\\n wrapper.cancel = cancel; // Return the wrapper function.\\n\\n return wrapper;\\n}\\n\\n/* eslint-disable no-undefined */\\n/**\\n * Debounce execution of a function. Debouncing, unlike throttling,\\n * guarantees that a function is only executed a single time, either at the\\n * very beginning of a series of calls, or at the very end.\\n *\\n * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\\n * @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\\n * to `callback` when the debounced-function is executed.\\n * @param {object} [options] - An object to configure options.\\n * @param {boolean} [options.atBegin] - Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds\\n * after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.\\n * (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).\\n *\\n * @returns {Function} A new, debounced function.\\n */\\n\\nfunction debounce (delay, callback, options) {\\n var _ref = options || {},\\n _ref$atBegin = _ref.atBegin,\\n atBegin = _ref$atBegin === void 0 ? false : _ref$atBegin;\\n\\n return throttle(delay, callback, {\\n debounceMode: atBegin !== false\\n });\\n}\\n\\n\\n//# sourceMappingURL=index.js.map\\n\\n\\n//# sourceURL=webpack://html-flip-book-base/./node_modules/throttle-debounce/esm/index.js?\");\n\n/***/ })\n\n/******/ });\n/************************************************************************/\n/******/ // The module cache\n/******/ var __webpack_module_cache__ = {};\n/******/ \n/******/ // The require function\n/******/ function __webpack_require__(moduleId) {\n/******/ \t// Check if module is in cache\n/******/ \tvar cachedModule = __webpack_module_cache__[moduleId];\n/******/ \tif (cachedModule !== undefined) {\n/******/ \t\treturn cachedModule.exports;\n/******/ \t}\n/******/ \t// Create a new module (and put it into the cache)\n/******/ \tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\tid: moduleId,\n/******/ \t\t// no module.loaded needed\n/******/ \t\texports: {}\n/******/ \t};\n/******/ \n/******/ \t// Execute the module function\n/******/ \t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n/******/ \n/******/ \t// Return the exports of the module\n/******/ \treturn module.exports;\n/******/ }\n/******/ \n/************************************************************************/\n/******/ /* webpack/runtime/compat get default export */\n/******/ (() => {\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = (module) => {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\t() => (module['default']) :\n/******/ \t\t\t() => (module);\n/******/ \t\t__webpack_require__.d(getter, { a: getter });\n/******/ \t\treturn getter;\n/******/ \t};\n/******/ })();\n/******/ \n/******/ /* webpack/runtime/define property getters */\n/******/ (() => {\n/******/ \t// define getter functions for harmony exports\n/******/ \t__webpack_require__.d = (exports, definition) => {\n/******/ \t\tfor(var key in definition) {\n/******/ \t\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n/******/ \t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n/******/ \t\t\t}\n/******/ \t\t}\n/******/ \t};\n/******/ })();\n/******/ \n/******/ /* webpack/runtime/hasOwnProperty shorthand */\n/******/ (() => {\n/******/ \t__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))\n/******/ })();\n/******/ \n/******/ /* webpack/runtime/make namespace object */\n/******/ (() => {\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = (exports) => {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/ })();\n/******/ \n/******/ /* webpack/runtime/nonce */\n/******/ (() => {\n/******/ \t__webpack_require__.nc = undefined;\n/******/ })();\n/******/ \n/************************************************************************/\n/******/ \n/******/ // startup\n/******/ // Load entry module and return exports\n/******/ // This entry module can't be inlined because the eval devtool is used.\n/******/ var __webpack_exports__ = __webpack_require__(\"./src/flipbook.ts\");\n/******/ var __webpack_exports__FlipBook = __webpack_exports__.FlipBook;\n/******/ export { __webpack_exports__FlipBook as FlipBook };\n/******/ \n","import React, { useEffect, useRef } from 'react'\nimport { FlipBook as FlipBookBase, PageSemantics } from 'html-flip-book-base'\n\ninterface FlipBookWrapperProps {\n pages: React.ReactNode[]\n className: string\n pageSemantics?: PageSemantics\n debug?: boolean\n direction?: 'rtl' | 'ltr' // Add the direction property to the interface\n // Add any other props that the wrapper might need\n}\n\nconst FlipBookReact: React.FC = ({\n pages,\n className,\n debug = false,\n direction = 'ltr', // Add the direction prop\n pageSemantics = undefined\n}) => {\n const flipBook = useRef(\n new FlipBookBase({\n pageSemantics: pageSemantics,\n pagesCount: pages.length,\n direction: direction\n })\n )\n\n useEffect(() => {\n flipBook.current.render(`.${className}`, debug)\n // Do any other necessary setup here\n }, [])\n\n return (\n
\n {pages.map((page, index) => (\n
\n {page}\n
\n ))}\n
\n )\n}\n\nexport { FlipBookReact as FlipBook }\nexport type { PageSemantics }\n"],"names":["REACT_ELEMENT_TYPE","REACT_FRAGMENT_TYPE","jsxProd","type","config","maybeKey","key","propName","error","format","_len2","args","_key2","ReactSharedInternals","getComponentNameFromType","REACT_CLIENT_REFERENCE$2","REACT_PORTAL_TYPE","REACT_PROFILER_TYPE","REACT_STRICT_MODE_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_CONTEXT_TYPE","REACT_CONSUMER_TYPE","REACT_FORWARD_REF_TYPE","innerType","REACT_MEMO_TYPE","REACT_LAZY_TYPE","testStringCoercion","value","checkKeyStringCoercion","JSCompiler_inline_result","disabledLog","disableLogs","disabledDepth","prevLog","prevInfo","prevWarn","prevError","prevGroup","prevGroupCollapsed","prevGroupEnd","props","reenableLogs","assign","describeBuiltInComponentFrame","name","prefix","x","match","describeNativeComponentFrame","fn","construct","reentry","frame","componentFrameCache","previousDispatcher","RunInRootFrame","Fake","control","x$0","x$1","sample","namePropDescriptor","_RunInRootFrame$Deter","sampleStack","controlStack","sampleLines","controlLines","_frame","describeUnknownElementTypeFrameInDEV","prototype","getOwner","dispatcher","hasValidRef","hasOwnProperty","getter","hasValidKey","defineKeyPropWarningGetter","displayName","warnAboutAccessingKey","specialPropKeyWarningShown","elementRefGetterWithDeprecationWarning","componentName","didWarnAboutElementRef","ReactElement","_ref","self","source","owner","jsxDEVImpl","isStaticChildren","REACT_OFFSCREEN_TYPE","REACT_CLIENT_REFERENCE$1","children","isArrayImpl","validateChildKeys","keys","k","didWarnAboutKeySpread","node","parentType","REACT_CLIENT_REFERENCE","i","child","isValidElement","validateExplicitKey","MAYBE_ITERATOR_SYMBOL","object","element","getCurrentComponentErrorInfo","ownerHasKeyUseWarning","childOwner","prevGetCurrentStack","stack","info","React","jsxRuntimeModule","require$$0","require$$1","moduleId","cachedModule","module","exports","definition","obj","prop","pages","className","debug","direction","pageSemantics","flipBook","FlipBookBase","jsx","page","index"],"mappings":";;;;;;AAWA,MAAIA,IAAqB,OAAO,IAAI,4BAA4B,GAC9DC,IAAsB,OAAO,IAAI,gBAAgB;AACnD,WAASC,EAAQC,GAAMC,GAAQC,GAAU;AACvC,QAAIC,IAAM;AAGV,QAFWD,MAAX,WAAwBC,IAAM,KAAKD,IACxBD,EAAO,QAAlB,WAA0BE,IAAM,KAAKF,EAAO,MACxC,SAASA,GAAQ;AACnB,MAAAC,IAAW,CAAA;AACX,eAASE,KAAYH;AACnB,QAAUG,MAAV,UAAuBF,EAASE,CAAQ,IAAIH,EAAOG,CAAQ;AAAA,IACjE,MAAS,CAAAF,IAAWD;AAClB,WAAAA,IAASC,EAAS,KACX;AAAA,MACL,UAAUL;AAAA,MACV,MAAMG;AAAA,MACN,KAAKG;AAAA,MACL,KAAgBF,MAAX,SAAoBA,IAAS;AAAA,MAClC,OAAOC;AAAA,IACX;AAAA,EACC;AACe,oCAAA,WAAGJ,GACR,2BAAA,MAAGC,GACd,2BAAA,OAAeA;;;;;gGCtBE,QAAQ,IAAI,aAA7B,gBACG,WAAY;AACX,aAASM,EAAMC,GAAQ;AACrB,eAC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AAgD,CAAC;AAAA,EACrD,OAAAI;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,WAAAC,IAAY;AAAA;AAAA,EACZ,eAAAC,IAAgB;AAClB,MAAM;AACJ,QAAMC,IAAW;AAAA,IACf,IAAIC,4BAAa;AAAA,MACf,eAAAF;AAAA,MACA,YAAYJ,EAAM;AAAA,MAClB,WAAAG;AAAA,IAAA,CACD;AAAA,EAAA;AAGH,mBAAU,MAAM;AACd,IAAAE,EAAS,QAAQ,OAAO,IAAIJ,CAAS,IAAIC,CAAK;AAAA,EAEhD,GAAG,CAAE,CAAA,GAGFK,kCAAA,IAAA,OAAA,EAAI,WAAAN,GACF,UAAAD,EAAM,IAAI,CAACQ,GAAMC,MAChBF,kCAAA,IAAC,SAAgB,WAAU,QACxB,UADOC,KAAAC,CAEV,CACD,EACH,CAAA;AAEJ;","x_google_ignoreList":[0,1,2]} \ No newline at end of file +{"version":3,"file":"flip-book.js","sources":["../node_modules/react/cjs/react-jsx-runtime.production.js","../node_modules/react/cjs/react-jsx-runtime.development.js","../node_modules/react/jsx-runtime.js","../../base/dist/flipbook.js","../src/FlipBook.tsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function error(format) {\n for (\n var _len2 = arguments.length,\n args = Array(1 < _len2 ? _len2 - 1 : 0),\n _key2 = 1;\n _key2 < _len2;\n _key2++\n )\n args[_key2 - 1] = arguments[_key2];\n _len2 = format;\n _key2 = Error(\"react-stack-top-frame\");\n ReactSharedInternals.getCurrentStack &&\n ((_key2 = ReactSharedInternals.getCurrentStack(_key2)),\n \"\" !== _key2 && ((_len2 += \"%s\"), (args = args.concat([_key2]))));\n args.unshift(_len2);\n Function.prototype.apply.call(console.error, console, args);\n }\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE$2\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_CONTEXT_TYPE:\n return (type.displayName || \"Context\") + \".Provider\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result)\n return (\n (JSCompiler_inline_result =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\"),\n error(\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result\n ),\n testStringCoercion(value)\n );\n }\n function disabledLog() {}\n function disableLogs() {\n if (0 === disabledDepth) {\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd;\n var props = {\n configurable: !0,\n enumerable: !0,\n value: disabledLog,\n writable: !0\n };\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n }\n disabledDepth++;\n }\n function reenableLogs() {\n disabledDepth--;\n if (0 === disabledDepth) {\n var props = { configurable: !0, enumerable: !0, writable: !0 };\n Object.defineProperties(console, {\n log: assign({}, props, { value: prevLog }),\n info: assign({}, props, { value: prevInfo }),\n warn: assign({}, props, { value: prevWarn }),\n error: assign({}, props, { value: prevError }),\n group: assign({}, props, { value: prevGroup }),\n groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),\n groupEnd: assign({}, props, { value: prevGroupEnd })\n });\n }\n 0 > disabledDepth &&\n error(\n \"disabledDepth fell below zero. This is a bug in React. Please file an issue.\"\n );\n }\n function describeBuiltInComponentFrame(name) {\n if (void 0 === prefix)\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = (match && match[1]) || \"\";\n }\n return \"\\n\" + prefix + name;\n }\n function describeNativeComponentFrame(fn, construct) {\n if (!fn || reentry) return \"\";\n var frame = componentFrameCache.get(fn);\n if (void 0 !== frame) return frame;\n reentry = !0;\n frame = Error.prepareStackTrace;\n Error.prepareStackTrace = void 0;\n var previousDispatcher = null;\n previousDispatcher = ReactSharedInternals.H;\n ReactSharedInternals.H = null;\n disableLogs();\n var RunInRootFrame = {\n DetermineComponentFrameRoot: function () {\n try {\n if (construct) {\n var Fake = function () {\n throw Error();\n };\n Object.defineProperty(Fake.prototype, \"props\", {\n set: function () {\n throw Error();\n }\n });\n if (\"object\" === typeof Reflect && Reflect.construct) {\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n var control = x;\n }\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x$0) {\n control = x$0;\n }\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x$1) {\n control = x$1;\n }\n (Fake = fn()) &&\n \"function\" === typeof Fake.catch &&\n Fake.catch(function () {});\n }\n } catch (sample) {\n if (sample && control && \"string\" === typeof sample.stack)\n return [sample.stack, control.stack];\n }\n return [null, null];\n }\n };\n RunInRootFrame.DetermineComponentFrameRoot.displayName =\n \"DetermineComponentFrameRoot\";\n var namePropDescriptor = Object.getOwnPropertyDescriptor(\n RunInRootFrame.DetermineComponentFrameRoot,\n \"name\"\n );\n namePropDescriptor &&\n namePropDescriptor.configurable &&\n Object.defineProperty(\n RunInRootFrame.DetermineComponentFrameRoot,\n \"name\",\n { value: \"DetermineComponentFrameRoot\" }\n );\n try {\n var _RunInRootFrame$Deter =\n RunInRootFrame.DetermineComponentFrameRoot(),\n sampleStack = _RunInRootFrame$Deter[0],\n controlStack = _RunInRootFrame$Deter[1];\n if (sampleStack && controlStack) {\n var sampleLines = sampleStack.split(\"\\n\"),\n controlLines = controlStack.split(\"\\n\");\n for (\n sampleStack = _RunInRootFrame$Deter = 0;\n _RunInRootFrame$Deter < sampleLines.length &&\n !sampleLines[_RunInRootFrame$Deter].includes(\n \"DetermineComponentFrameRoot\"\n );\n\n )\n _RunInRootFrame$Deter++;\n for (\n ;\n sampleStack < controlLines.length &&\n !controlLines[sampleStack].includes(\"DetermineComponentFrameRoot\");\n\n )\n sampleStack++;\n if (\n _RunInRootFrame$Deter === sampleLines.length ||\n sampleStack === controlLines.length\n )\n for (\n _RunInRootFrame$Deter = sampleLines.length - 1,\n sampleStack = controlLines.length - 1;\n 1 <= _RunInRootFrame$Deter &&\n 0 <= sampleStack &&\n sampleLines[_RunInRootFrame$Deter] !== controlLines[sampleStack];\n\n )\n sampleStack--;\n for (\n ;\n 1 <= _RunInRootFrame$Deter && 0 <= sampleStack;\n _RunInRootFrame$Deter--, sampleStack--\n )\n if (\n sampleLines[_RunInRootFrame$Deter] !== controlLines[sampleStack]\n ) {\n if (1 !== _RunInRootFrame$Deter || 1 !== sampleStack) {\n do\n if (\n (_RunInRootFrame$Deter--,\n sampleStack--,\n 0 > sampleStack ||\n sampleLines[_RunInRootFrame$Deter] !==\n controlLines[sampleStack])\n ) {\n var _frame =\n \"\\n\" +\n sampleLines[_RunInRootFrame$Deter].replace(\n \" at new \",\n \" at \"\n );\n fn.displayName &&\n _frame.includes(\"\") &&\n (_frame = _frame.replace(\"\", fn.displayName));\n \"function\" === typeof fn &&\n componentFrameCache.set(fn, _frame);\n return _frame;\n }\n while (1 <= _RunInRootFrame$Deter && 0 <= sampleStack);\n }\n break;\n }\n }\n } finally {\n (reentry = !1),\n (ReactSharedInternals.H = previousDispatcher),\n reenableLogs(),\n (Error.prepareStackTrace = frame);\n }\n sampleLines = (sampleLines = fn ? fn.displayName || fn.name : \"\")\n ? describeBuiltInComponentFrame(sampleLines)\n : \"\";\n \"function\" === typeof fn && componentFrameCache.set(fn, sampleLines);\n return sampleLines;\n }\n function describeUnknownElementTypeFrameInDEV(type) {\n if (null == type) return \"\";\n if (\"function\" === typeof type) {\n var prototype = type.prototype;\n return describeNativeComponentFrame(\n type,\n !(!prototype || !prototype.isReactComponent)\n );\n }\n if (\"string\" === typeof type) return describeBuiltInComponentFrame(type);\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame(\"Suspense\");\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame(\"SuspenseList\");\n }\n if (\"object\" === typeof type)\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return (type = describeNativeComponentFrame(type.render, !1)), type;\n case REACT_MEMO_TYPE:\n return describeUnknownElementTypeFrameInDEV(type.type);\n case REACT_LAZY_TYPE:\n prototype = type._payload;\n type = type._init;\n try {\n return describeUnknownElementTypeFrameInDEV(type(prototype));\n } catch (x) {}\n }\n return \"\";\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function hasValidRef(config) {\n if (hasOwnProperty.call(config, \"ref\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"ref\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.ref;\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, _ref, self, source, owner, props) {\n _ref = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== _ref ? _ref : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n source,\n self\n ) {\n if (\n \"string\" === typeof type ||\n \"function\" === typeof type ||\n type === REACT_FRAGMENT_TYPE ||\n type === REACT_PROFILER_TYPE ||\n type === REACT_STRICT_MODE_TYPE ||\n type === REACT_SUSPENSE_TYPE ||\n type === REACT_SUSPENSE_LIST_TYPE ||\n type === REACT_OFFSCREEN_TYPE ||\n (\"object\" === typeof type &&\n null !== type &&\n (type.$$typeof === REACT_LAZY_TYPE ||\n type.$$typeof === REACT_MEMO_TYPE ||\n type.$$typeof === REACT_CONTEXT_TYPE ||\n type.$$typeof === REACT_CONSUMER_TYPE ||\n type.$$typeof === REACT_FORWARD_REF_TYPE ||\n type.$$typeof === REACT_CLIENT_REFERENCE$1 ||\n void 0 !== type.getModuleId))\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren], type);\n Object.freeze && Object.freeze(children);\n } else\n error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children, type);\n } else {\n children = \"\";\n if (\n void 0 === type ||\n (\"object\" === typeof type &&\n null !== type &&\n 0 === Object.keys(type).length)\n )\n children +=\n \" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.\";\n null === type\n ? (isStaticChildren = \"null\")\n : isArrayImpl(type)\n ? (isStaticChildren = \"array\")\n : void 0 !== type && type.$$typeof === REACT_ELEMENT_TYPE\n ? ((isStaticChildren =\n \"<\" + (getComponentNameFromType(type.type) || \"Unknown\") + \" />\"),\n (children =\n \" Did you accidentally export a JSX literal instead of a component?\"))\n : (isStaticChildren = typeof type);\n error(\n \"React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s\",\n isStaticChildren,\n children\n );\n }\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n hasValidRef(config);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n ((config =\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type),\n children && defineKeyPropWarningGetter(maybeKey, config));\n return ReactElement(\n type,\n children,\n null,\n self,\n source,\n getOwner(),\n maybeKey\n );\n }\n function validateChildKeys(node, parentType) {\n if (\n \"object\" === typeof node &&\n node &&\n node.$$typeof !== REACT_CLIENT_REFERENCE\n )\n if (isArrayImpl(node))\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n isValidElement(child) && validateExplicitKey(child, parentType);\n }\n else if (isValidElement(node))\n node._store && (node._store.validated = 1);\n else if (\n (null === node || \"object\" !== typeof node\n ? (i = null)\n : ((i =\n (MAYBE_ITERATOR_SYMBOL && node[MAYBE_ITERATOR_SYMBOL]) ||\n node[\"@@iterator\"]),\n (i = \"function\" === typeof i ? i : null)),\n \"function\" === typeof i &&\n i !== node.entries &&\n ((i = i.call(node)), i !== node))\n )\n for (; !(node = i.next()).done; )\n isValidElement(node.value) &&\n validateExplicitKey(node.value, parentType);\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n function validateExplicitKey(element, parentType) {\n if (\n element._store &&\n !element._store.validated &&\n null == element.key &&\n ((element._store.validated = 1),\n (parentType = getCurrentComponentErrorInfo(parentType)),\n !ownerHasKeyUseWarning[parentType])\n ) {\n ownerHasKeyUseWarning[parentType] = !0;\n var childOwner = \"\";\n element &&\n null != element._owner &&\n element._owner !== getOwner() &&\n ((childOwner = null),\n \"number\" === typeof element._owner.tag\n ? (childOwner = getComponentNameFromType(element._owner.type))\n : \"string\" === typeof element._owner.name &&\n (childOwner = element._owner.name),\n (childOwner = \" It was passed a child from \" + childOwner + \".\"));\n var prevGetCurrentStack = ReactSharedInternals.getCurrentStack;\n ReactSharedInternals.getCurrentStack = function () {\n var stack = describeUnknownElementTypeFrameInDEV(element.type);\n prevGetCurrentStack && (stack += prevGetCurrentStack() || \"\");\n return stack;\n };\n error(\n 'Each child in a list should have a unique \"key\" prop.%s%s See https://react.dev/link/warning-keys for more information.',\n parentType,\n childOwner\n );\n ReactSharedInternals.getCurrentStack = prevGetCurrentStack;\n }\n }\n function getCurrentComponentErrorInfo(parentType) {\n var info = \"\",\n owner = getOwner();\n owner &&\n (owner = getComponentNameFromType(owner.type)) &&\n (info = \"\\n\\nCheck the render method of `\" + owner + \"`.\");\n info ||\n ((parentType = getComponentNameFromType(parentType)) &&\n (info =\n \"\\n\\nCheck the top-level render call using <\" + parentType + \">.\"));\n return info;\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\");\n Symbol.for(\"react.provider\");\n var REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_OFFSCREEN_TYPE = Symbol.for(\"react.offscreen\"),\n MAYBE_ITERATOR_SYMBOL = Symbol.iterator,\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n REACT_CLIENT_REFERENCE$2 = Symbol.for(\"react.client.reference\"),\n hasOwnProperty = Object.prototype.hasOwnProperty,\n assign = Object.assign,\n REACT_CLIENT_REFERENCE$1 = Symbol.for(\"react.client.reference\"),\n isArrayImpl = Array.isArray,\n disabledDepth = 0,\n prevLog,\n prevInfo,\n prevWarn,\n prevError,\n prevGroup,\n prevGroupCollapsed,\n prevGroupEnd;\n disabledLog.__reactDisabledLog = !0;\n var prefix,\n reentry = !1;\n var componentFrameCache = new (\n \"function\" === typeof WeakMap ? WeakMap : Map\n )();\n var REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var didWarnAboutKeySpread = {},\n ownerHasKeyUseWarning = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey, source, self) {\n return jsxDEVImpl(type, config, maybeKey, !1, source, self);\n };\n exports.jsxs = function (type, config, maybeKey, source, self) {\n return jsxDEVImpl(type, config, maybeKey, !0, source, self);\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","/*! For license information please see flipbook.js.LICENSE.txt */\nvar t={168:(t,e,i)=>{var n;!function(s,r,o,a){var h,c=[\"\",\"webkit\",\"Moz\",\"MS\",\"ms\",\"o\"],u=r.createElement(\"div\"),l=\"function\",p=Math.round,f=Math.abs,d=Date.now;function v(t,e,i){return setTimeout(w(t,i),e)}function g(t,e,i){return!!Array.isArray(t)&&(m(t,i[e],i),!0)}function m(t,e,i){var n;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==a)for(n=0;n\\s*\\(/gm,\"{anonymous}()@\"):\"Unknown Stack Trace\",r=s.console&&(s.console.warn||s.console.log);return r&&r.call(s.console,n,i),t.apply(this,arguments)}}h=\"function\"!=typeof Object.assign?function(t){if(t===a||null===t)throw new TypeError(\"Cannot convert undefined or null to object\");for(var e=Object(t),i=1;i-1}function I(t){return t.trim().split(/\\s+/g)}function L(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;ni[e]})):n.sort()),n}function M(t,e){for(var i,n,s=e[0].toUpperCase()+e.slice(1),r=0;r1&&!i.firstMultiple?i.firstMultiple=nt(e):1===s&&(i.firstMultiple=!1);var r=i.firstInput,o=i.firstMultiple,h=o?o.center:r.center,c=e.center=st(n);e.timeStamp=d(),e.deltaTime=e.timeStamp-r.timeStamp,e.angle=ht(h,c),e.distance=at(h,c),function(t,e){var i=e.center,n=t.offsetDelta||{},s=t.prevDelta||{},r=t.prevInput||{};e.eventType!==W&&r.eventType!==$||(s=t.prevDelta={x:r.deltaX||0,y:r.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=s.x+(i.x-n.x),e.deltaY=s.y+(i.y-n.y)}(i,e),e.offsetDirection=ot(e.deltaX,e.deltaY);var u,l,p=rt(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=p.x,e.overallVelocityY=p.y,e.overallVelocity=f(p.x)>f(p.y)?p.x:p.y,e.scale=o?(u=o.pointers,at((l=n)[0],l[1],tt)/at(u[0],u[1],tt)):1,e.rotation=o?function(t,e){return ht(e[1],e[0],tt)+ht(t[1],t[0],tt)}(o.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,n,s,r,o=t.lastInterval||e,h=e.timeStamp-o.timeStamp;if(e.eventType!=H&&(h>q||o.velocity===a)){var c=e.deltaX-o.deltaX,u=e.deltaY-o.deltaY,l=rt(h,c,u);n=l.x,s=l.y,i=f(l.x)>f(l.y)?l.x:l.y,r=ot(c,u),t.lastInterval=e}else i=o.velocity,n=o.velocityX,s=o.velocityY,r=o.direction;e.velocity=i,e.velocityX=n,e.velocityY=s,e.direction=r}(i,e);var v=t.element;S(e.srcEvent.target,v)&&(v=e.srcEvent.target),e.target=v}(t,i),t.emit(\"hammer.input\",i),t.recognize(i),t.session.prevInput=i}function nt(t){for(var e=[],i=0;i=f(e)?t<0?j:U:e<0?B:G}function at(t,e,i){i||(i=Q);var n=e[i[0]]-t[i[0]],s=e[i[1]]-t[i[1]];return Math.sqrt(n*n+s*s)}function ht(t,e,i){i||(i=Q);var n=e[i[0]]-t[i[0]],s=e[i[1]]-t[i[1]];return 180*Math.atan2(s,n)/Math.PI}et.prototype={handler:function(){},init:function(){this.evEl&&x(this.element,this.evEl,this.domHandler),this.evTarget&&x(this.target,this.evTarget,this.domHandler),this.evWin&&x(_(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&D(this.element,this.evEl,this.domHandler),this.evTarget&&D(this.target,this.evTarget,this.domHandler),this.evWin&&D(_(this.element),this.evWin,this.domHandler)}};var ct={mousedown:W,mousemove:2,mouseup:$},ut=\"mousedown\",lt=\"mousemove mouseup\";function pt(){this.evEl=ut,this.evWin=lt,this.pressed=!1,et.apply(this,arguments)}E(pt,et,{handler:function(t){var e=ct[t.type];e&W&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=$),this.pressed&&(e&$&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:Y,srcEvent:t}))}});var ft={pointerdown:W,pointermove:2,pointerup:$,pointercancel:H,pointerout:H},dt={2:z,3:\"pen\",4:Y,5:\"kinect\"},vt=\"pointerdown\",gt=\"pointermove pointerup pointercancel\";function mt(){this.evEl=vt,this.evWin=gt,et.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}s.MSPointerEvent&&!s.PointerEvent&&(vt=\"MSPointerDown\",gt=\"MSPointerMove MSPointerUp MSPointerCancel\"),E(mt,et,{handler:function(t){var e=this.store,i=!1,n=t.type.toLowerCase().replace(\"ms\",\"\"),s=ft[n],r=dt[t.pointerType]||t.pointerType,o=r==z,a=L(e,t.pointerId,\"pointerId\");s&W&&(0===t.button||o)?a<0&&(e.push(t),a=e.length-1):s&($|H)&&(i=!0),a<0||(e[a]=t,this.callback(this.manager,s,{pointers:e,changedPointers:[t],pointerType:r,srcEvent:t}),i&&e.splice(a,1))}});var Tt={touchstart:W,touchmove:2,touchend:$,touchcancel:H};function yt(){this.evTarget=\"touchstart\",this.evWin=\"touchstart touchmove touchend touchcancel\",this.started=!1,et.apply(this,arguments)}function bt(t,e){var i=F(t.touches),n=F(t.changedTouches);return e&($|H)&&(i=R(i.concat(n),\"identifier\",!0)),[i,n]}E(yt,et,{handler:function(t){var e=Tt[t.type];if(e===W&&(this.started=!0),this.started){var i=bt.call(this,t,e);e&($|H)&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:z,srcEvent:t})}}});var Et={touchstart:W,touchmove:2,touchend:$,touchcancel:H},wt=\"touchstart touchmove touchend touchcancel\";function Pt(){this.evTarget=wt,this.targetIds={},et.apply(this,arguments)}function At(t,e){var i=F(t.touches),n=this.targetIds;if(e&(2|W)&&1===i.length)return n[i[0].identifier]=!0,[i,i];var s,r,o=F(t.changedTouches),a=[],h=this.target;if(r=i.filter((function(t){return S(t.target,h)})),e===W)for(s=0;s-1&&n.splice(t,1)}),xt)}}function It(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,i=this.state;function n(i){e.manager.emit(i,t)}i<8&&n(e.options.event+$t(i)),n(e.options.event),t.additionalEvent&&n(t.additionalEvent),i>=8&&n(e.options.event+$t(i))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=qt},canEmit:function(){for(var t=0;te.threshold&&s&e.direction},attrTest:function(t){return jt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Ht(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),E(Bt,jt,{defaults:{event:\"pinch\",threshold:0,pointers:2},getTouchAction:function(){return[_t]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?\"in\":\"out\";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),E(Gt,Wt,{defaults:{event:\"press\",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Mt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distancee.time;if(this._input=t,!n||!i||t.eventType&($|H)&&!s)this.reset();else if(t.eventType&W)this.reset(),this._timer=v((function(){this.state=8,this.tryEmit()}),e.time,this);else if(t.eventType&$)return 8;return qt},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&t.eventType&$?this.manager.emit(this.options.event+\"up\",t):(this._input.timeStamp=d(),this.manager.emit(this.options.event,this._input)))}}),E(Zt,jt,{defaults:{event:\"rotate\",threshold:0,pointers:2},getTouchAction:function(){return[_t]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),E(Jt,jt,{defaults:{event:\"swipe\",threshold:10,velocity:.3,direction:Z|J,pointers:1},getTouchAction:function(){return Ut.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(Z|J)?e=t.overallVelocity:i&Z?e=t.overallVelocityX:i&J&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&f(e)>this.options.velocity&&t.eventType&$},emit:function(t){var e=Ht(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),E(Kt,Wt,{defaults:{event:\"tap\",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[kt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance{i.d(e,{A:()=>a});var n=i(645),s=i.n(n),r=i(278),o=i.n(r)()(s());o.push([t.id,\".flipbook{height:100%;width:100%;overflow:hidden}.flipbook-debug-bar{position:absolute;bottom:0;left:0;width:100%;background-color:rgba(0,0,0,.5);color:#fff;padding:10px;box-sizing:border-box;display:flex;flex-wrap:wrap;justify-content:space-between;z-index:9999}\",\"\"]);const a=o},0:(t,e,i)=>{i.d(e,{A:()=>a});var n=i(645),s=i.n(n),r=i(278),o=i.n(r)()(s());o.push([t.id,\".page{position:absolute;backface-visibility:hidden;transform-style:preserve-3d}.page>*{max-width:100%;max-height:100%;height:100%;width:100%;box-sizing:border-box}\",\"\"]);const a=o},278:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=\"\",n=void 0!==e[5];return e[4]&&(i+=\"@supports (\".concat(e[4],\") {\")),e[2]&&(i+=\"@media \".concat(e[2],\" {\")),n&&(i+=\"@layer\".concat(e[5].length>0?\" \".concat(e[5]):\"\",\" {\")),i+=t(e),n&&(i+=\"}\"),e[2]&&(i+=\"}\"),e[4]&&(i+=\"}\"),i})).join(\"\")},e.i=function(t,i,n,s,r){\"string\"==typeof t&&(t=[[null,t,void 0]]);var o={};if(n)for(var a=0;a0?\" \".concat(u[5]):\"\",\" {\").concat(u[1],\"}\")),u[5]=r),i&&(u[2]?(u[1]=\"@media \".concat(u[2],\" {\").concat(u[1],\"}\"),u[2]=i):u[2]=i),s&&(u[4]?(u[1]=\"@supports (\".concat(u[4],\") {\").concat(u[1],\"}\"),u[4]=s):u[4]=\"\".concat(s)),e.push(u))}},e}},645:t=>{t.exports=function(t){return t[1]}},292:t=>{var e=[];function i(t){for(var i=-1,n=0;n{var e={};t.exports=function(t,i){var n=function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}e[t]=i}return e[t]}(t);if(!n)throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");n.appendChild(i)}},88:t=>{t.exports=function(t){var e=document.createElement(\"style\");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},884:(t,e,i)=>{t.exports=function(t){var e=i.nc;e&&t.setAttribute(\"nonce\",e)}},893:t=>{t.exports=function(t){if(\"undefined\"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(i){!function(t,e,i){var n=\"\";i.supports&&(n+=\"@supports (\".concat(i.supports,\") {\")),i.media&&(n+=\"@media \".concat(i.media,\" {\"));var s=void 0!==i.layer;s&&(n+=\"@layer\".concat(i.layer.length>0?\" \".concat(i.layer):\"\",\" {\")),n+=i.css,s&&(n+=\"}\"),i.media&&(n+=\"}\"),i.supports&&(n+=\"}\");var r=i.sourceMap;r&&\"undefined\"!=typeof btoa&&(n+=\"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r)))),\" */\")),e.styleTagTransform(n,t,e.options)}(e,t,i)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},997:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function i(n){var s=e[n];if(void 0!==s)return s.exports;var r=e[n]={id:n,exports:{}};return t[n](r,r.exports,i),r.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.nc=void 0;var n={};i.d(n,{$:()=>D});var s=i(292),r=i.n(s),o=i(893),a=i.n(o),h=i(383),c=i.n(h),u=i(884),l=i.n(u),p=i(88),f=i.n(p),d=i(997),v=i.n(d),g=i(0),m={};m.styleTagTransform=v(),m.setAttributes=l(),m.insert=c().bind(null,\"head\"),m.domAPI=a(),m.insertStyleElement=f(),r()(g.A,m),g.A&&g.A.locals&&g.A.locals;var T=i(970),y={};y.styleTagTransform=v(),y.setAttributes=l(),y.insert=c().bind(null,\"head\"),y.domAPI=a(),y.insertStyleElement=f(),r()(T.A,y),T.A&&T.A.locals&&T.A.locals;var b,E=i(168),w=i.n(E);!function(t){t.Forward=\"Forward\",t.Backward=\"Backward\",t.None=\"None\"}(b||(b={}));class P{index;pages;bookProperties;onTurned;currentAnimation=null;targetFlipPosition=null;wrappedFlipPosition;constructor(t,e,i,n,s){this.index=t,this.pages=e,this.bookProperties=n,this.onTurned=s,this.wrappedFlipPosition=i?1:0}get isTurned(){return 1===this.flipPosition}get isTurning(){return 0!==this.flipPosition}get isCover(){return this.isFirst||this.isLast}get isFirst(){return 0===this.index}get isLast(){return this.index===this.bookProperties.leavesCount-1}set flipPosition(t){this.wrappedFlipPosition=Math.max(0,Math.min(1,t))}get flipPosition(){return this.wrappedFlipPosition}async flipToPosition(t,e=225){return this.currentAnimation&&await this.currentAnimation,this.flipPosition===t?Promise.resolve():this.targetFlipPosition===t?this.currentAnimation??Promise.resolve():(this.targetFlipPosition=t,this.currentAnimation=new Promise((i=>{const n=this.flipPosition,s=180*Math.abs(t-n)/e*1e3,r=performance.now(),o=e=>{const a=e-r;if(a<0)return void requestAnimationFrame(o);const h=Math.min(a/s,1),c=n+h*(t-n);this.pages.forEach(((t,e)=>{const i=this.bookProperties.isLTR;if(t){const n=e%2+1==1,s=(n?i?c>.5?180-180*c:180*-c:c>.5?-(180-180*c):180*c:i?c<.5?180*-c:180-180*c:c<.5?180*c:-(180-180*c))+\"deg\",r=n?i?\"100%\":\"-100%\":\"0px\",o=n?c>.5?-1:1:c<.5?-1:1;t.style.transform=`translateX(${r})rotateY(${s})scaleX(${o})`,t.style.transformOrigin=n?i?\"left\":\"right\":i?\"right\":\"left\",t.style.zIndex=`${c>.5?t.dataset.pageIndex:this.bookProperties.pagesCount-t.dataset.pageIndex}`}})),this.flipPosition=Math.max(0,Math.min(1,c)),1!==this.flipPosition&&0!==this.flipPosition||this.onTurned(1===this.flipPosition?b.Forward:b.Backward),h<1?requestAnimationFrame(o):(this.currentAnimation=null,this.targetFlipPosition=null,i())};requestAnimationFrame(o)})),this.currentAnimation)}async efficientFlipToPosition(t,e=2e4){return function(t,e,i){var n,s=i||{},r=s.noTrailing,o=void 0!==r&&r,a=s.noLeading,h=void 0!==a&&a,c=s.debounceMode,u=void 0===c?void 0:c,l=!1,p=0;function f(){n&&clearTimeout(n)}function d(){for(var i=arguments.length,s=new Array(i),r=0;rt?h?(p=Date.now(),o||(n=setTimeout(u?v:d,t))):d():!0!==o&&(n=setTimeout(u?v:d,void 0===u?t-c:t)))}return d.cancel=function(t){var e=(t||{}).upcomingOnly,i=void 0!==e&&e;f(),l=!i},d}(1,this.flipToPosition.bind(this))(t,e)}}class A{width;height;static from(t){return new A(t.width,t.height)}constructor(t,e){this.width=t,this.height=e}get value(){return this.width/this.height}}class x{width;height;aspectRatio;aspectRatioFit(t){const e=A.from(t).value;return this.aspectRatio.value>e?new x(this.height*e,this.height):new x(this.width,this.width/e)}constructor(t,e){this.width=t,this.height=e,this.aspectRatio=new A(t,e)}get asString(){return`${this.width}x${this.height}`}}class D{bookElement;pageElements=[];pagesCount;leafAspectRatio={width:2,height:3};coverAspectRatio={width:2.15,height:3.15};direction=\"ltr\";onPageChanged;pageSemantics;leaves=[];currentLeaf=void 0;flipDirection=b.None;flipStartingPos=0;isDuringManualFlip=!1;flipDelta=0;isDuringAutoFlip=!1;touchStartingPos={x:0,y:0};prevVisiblePageIndices;get isLTR(){return\"ltr\"===this.direction}get isClosed(){return!this.currentOrTurningLeaves[0]}get isClosedInverted(){return!this.currentLeaves[1]}get currentLeaves(){let t=-1;for(let e=this.leaves.length-1;e>=0;e--){const i=this.leaves[e];if(i.isTurned){t=i.index+1;break}}return-1==t?[void 0,this.leaves[0]]:t==this.leaves.length?[this.leaves[t-1],void 0]:[this.leaves[t-1],this.leaves[t]]}get currentOrTurningLeaves(){let t=-1;for(let e=this.leaves.length-1;e>=0;e--){const i=this.leaves[e];if(i.isTurned||i.isTurning){t=i.index+1;break}}return-1==t?[void 0,this.leaves[0]]:t==this.leaves.length?[this.leaves[t-1],void 0]:[this.leaves[t-1],this.leaves[t]]}constructor(t){this.pagesCount=t.pagesCount,this.leafAspectRatio=t.leafAspectRatio||this.leafAspectRatio,this.coverAspectRatio=t.coverAspectRatio||this.coverAspectRatio,this.direction=t.direction||this.direction,this.pageSemantics=t.pageSemantics,this.onPageChanged=t.onPageChanged}render(t,e=!1){const i=document.querySelector(t);if(!i)throw new Error(`Couldn't find container with selector: ${t}`);this.bookElement=i,this.bookElement.classList.contains(\"flipbook\")||this.bookElement.classList.add(\"flipbook\");const n=i.querySelectorAll(\".page\");if(!n.length)throw new Error(\"No pages found in flipbook\");this.pageElements=Array.from(n),this.leaves.splice(0,this.leaves.length);const s=Math.ceil(this.pagesCount/2),r=new x(this.bookElement.clientWidth/2,this.bookElement.clientHeight).aspectRatioFit(this.coverAspectRatio),o=new x(r.width*this.leafAspectRatio.width/this.coverAspectRatio.width,r.height*this.leafAspectRatio.height/this.coverAspectRatio.height);this.bookElement.style.perspective=2*Math.min(2*o.width,o.height)+\"px\",this.pageElements.forEach(((t,e)=>{t.style.width=`${o.width}px`,t.style.height=`${o.height}px`,t.style.zIndex=\"\"+(this.pagesCount-e),t.dataset.pageIndex=e.toString(),t.style[this.isLTR?\"left\":\"right\"]=(i.clientWidth-2*o.width)/2+\"px\",t.style.top=(i.clientHeight-o.height)/2+\"px\",t.dataset.pageSemanticName=this.pageSemantics?.indexToSemanticName(e)??\"\",t.dataset.pageTitle=this.pageSemantics?.indexToTitle(e)??\"\";const n=Math.floor(e/2),r=(e+1)%2==1;t.classList.add(r?\"odd\":\"even\",...0===e?[\"current-page\"]:[]),r?(t.style.transform=`translateX(${this.isLTR?\"\":\"-\"}100%)`,this.leaves[n]=new P(n,[t,void 0],!1,{isLTR:this.isLTR,leavesCount:s,pagesCount:this.pagesCount},(t=>{const i=t==b.Forward?e+2===this.pagesCount?[e+1]:[e+1,e+2]:0===e?[e]:[e-1,e];if(this.prevVisiblePageIndices&&this.prevVisiblePageIndices.length===i.length&&i.every(((t,e)=>t===this.prevVisiblePageIndices[e])))return;const n=this.prevVisiblePageIndices;this.prevVisiblePageIndices=i,this.onTurned(i,n)}))):(t.style.transform=`scaleX(-1)translateX(${this.isLTR?\"-\":\"\"}100%)`,this.leaves[n].pages[1]=t)}));const a=new(w())(this.bookElement);a.on(\"panstart\",this.onDragStart.bind(this)),a.on(\"panmove\",this.onDragUpdate.bind(this)),a.on(\"panend\",this.onDragEnd.bind(this)),this.bookElement.addEventListener(\"touchstart\",this.handleTouchStart.bind(this),{passive:!1}),this.bookElement.addEventListener(\"touchmove\",this.handleTouchMove.bind(this),{passive:!1}),e&&this.fillDebugBar()}fillDebugBar(){const t=document.createElement(\"div\");t.className=\"flipbook-debug-bar\",this.bookElement?.appendChild(t),setInterval((()=>{t.innerHTML=`\\n
Direction: ${this.isLTR?\"LTR\":\"RTL\"}
\\n
Current Leaf: ${this.currentLeaf?this.currentLeaf.index:\"None\"}
\\n
Flip dir: ${this.flipDirection}
\\n
Flip Δ: ${this.flipDelta}
\\n
Current Leaf Flip Position: ${this.currentLeaf?.flipPosition.toFixed(3)}
\\n
Is During Auto Flip: ${this.isDuringAutoFlip}
\\n `}),10)}onDragStart(t){if(console.log(\"drag start\"),this.currentLeaf||this.isDuringAutoFlip)return this.flipDirection=b.None,void(this.flipStartingPos=0);this.flipStartingPos=t.center.x}onDragUpdate(t){if(console.log(\"drag update\"),!this.isDuringAutoFlip&&!this.isDuringManualFlip){this.isDuringManualFlip=!0;try{const e=t.center.x;this.flipDelta=this.isLTR?this.flipStartingPos-e:e-this.flipStartingPos;const i=this.bookElement?.clientWidth??0;if(Math.abs(this.flipDelta)>i)return;if(0===this.flipDelta)return;switch(this.flipDirection=this.flipDirection!==b.None?this.flipDirection:this.flipDelta>0?b.Forward:b.Backward,this.flipDirection){case b.Forward:const t=this.flipDelta/i;if(t>1||this.flipDelta<0)return;if(!this.currentLeaf){if(this.isClosedInverted)return;this.currentLeaf=this.currentOrTurningLeaves[1]}this.currentLeaf.efficientFlipToPosition(t);break;case b.Backward:const e=1-Math.abs(this.flipDelta)/i;if(e<0||this.flipDelta>0)return;if(!this.currentLeaf){if(this.isClosed)return;this.currentLeaf=this.currentOrTurningLeaves[0]}this.currentLeaf.efficientFlipToPosition(e)}}finally{this.isDuringManualFlip=!1}}}async onDragEnd(t){if(console.log(\"drag end\"),!this.currentLeaf||this.isDuringAutoFlip)return this.flipDirection=b.None,void(this.flipStartingPos=0);const e=1e3*t.velocityX;let i;switch(this.flipDirection){case b.Forward:i=(this.isLTR?e<-500:e>500)||this.currentLeaf.flipPosition>=.5?1:0;break;case b.Backward:i=(this.isLTR?e>500:e<-500)||this.currentLeaf.flipPosition<=.5?0:1;break;default:return}this.isDuringAutoFlip=!0,this.flipDirection=b.None,this.flipStartingPos=0,await this.currentLeaf.flipToPosition(i),this.isDuringAutoFlip=!1,this.currentLeaf=void 0}handleTouchStart=t=>{if(t.touches.length>1)return;const e=t.touches[0];this.touchStartingPos={x:e.pageX,y:e.pageY}};handleTouchMove=t=>{if(t.touches.length>1)return;const e=t.touches[0],i=e.pageX-this.touchStartingPos.x,n=e.pageY-this.touchStartingPos.y;Math.abs(i)>Math.abs(n)&&t.preventDefault()};onTurned(t,e){for(let i=0;inull).bind(n.classList)(\"current-page\")}}jumpToPage(t){this.onPageChanged&&this.onPageChanged(t)}}var S=n.$;export{S as FlipBook};","import React, { useEffect, useRef } from 'react'\nimport { FlipBook as FlipBookBase, PageSemantics } from 'html-flip-book-base'\n\ninterface FlipBookWrapperProps {\n pages: React.ReactNode[]\n className: string\n pageSemantics?: PageSemantics\n debug?: boolean\n direction?: 'rtl' | 'ltr' // Add the direction property to the interface\n // Add any other props that the wrapper might need\n}\n\nconst FlipBookReact: React.FC = ({\n pages,\n className,\n debug = false,\n direction = 'ltr', // Add the direction prop\n pageSemantics = undefined\n}) => {\n const flipBook = useRef(\n new FlipBookBase({\n pageSemantics: pageSemantics,\n pagesCount: pages.length,\n direction: direction\n })\n )\n\n useEffect(() => {\n flipBook.current.render(`.${className}`, debug)\n // Do any other necessary setup here\n }, [])\n\n return (\n
\n {pages.map((page, index) => (\n
\n {page}\n
\n ))}\n
\n )\n}\n\nexport { FlipBookReact as FlipBook }\nexport type { PageSemantics }\n"],"names":["REACT_ELEMENT_TYPE","REACT_FRAGMENT_TYPE","jsxProd","type","config","maybeKey","key","propName","reactJsxRuntime_production","error","format","_len2","args","_key2","ReactSharedInternals","getComponentNameFromType","REACT_CLIENT_REFERENCE$2","REACT_PORTAL_TYPE","REACT_PROFILER_TYPE","REACT_STRICT_MODE_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_CONTEXT_TYPE","REACT_CONSUMER_TYPE","REACT_FORWARD_REF_TYPE","innerType","REACT_MEMO_TYPE","REACT_LAZY_TYPE","testStringCoercion","value","checkKeyStringCoercion","JSCompiler_inline_result","disabledLog","disableLogs","disabledDepth","prevLog","prevInfo","prevWarn","prevError","prevGroup","prevGroupCollapsed","prevGroupEnd","props","reenableLogs","assign","describeBuiltInComponentFrame","name","prefix","x","match","describeNativeComponentFrame","fn","construct","reentry","frame","componentFrameCache","previousDispatcher","RunInRootFrame","Fake","control","x$0","x$1","sample","namePropDescriptor","_RunInRootFrame$Deter","sampleStack","controlStack","sampleLines","controlLines","_frame","describeUnknownElementTypeFrameInDEV","prototype","getOwner","dispatcher","hasValidRef","hasOwnProperty","getter","hasValidKey","defineKeyPropWarningGetter","displayName","warnAboutAccessingKey","specialPropKeyWarningShown","elementRefGetterWithDeprecationWarning","componentName","didWarnAboutElementRef","ReactElement","_ref","self","source","owner","jsxDEVImpl","isStaticChildren","REACT_OFFSCREEN_TYPE","REACT_CLIENT_REFERENCE$1","children","isArrayImpl","validateChildKeys","keys","k","didWarnAboutKeySpread","node","parentType","REACT_CLIENT_REFERENCE","i","child","isValidElement","validateExplicitKey","MAYBE_ITERATOR_SYMBOL","object","element","getCurrentComponentErrorInfo","ownerHasKeyUseWarning","childOwner","prevGetCurrentStack","stack","info","React","require$$0","reactJsxRuntime_development","jsxRuntimeModule","require$$1","t","e","n","s","r","o","a","h","c","u","l","p","f","d","v","w","g","m","T","y","b","E","P","A","I","D","S","C","L","F","R","M","_","N","O","X","z","Y","q","W","$","H","V","j","U","B","G","Z","K","Q","tt","et","it","nt","st","ht","at","ot","rt","ct","ut","lt","pt","ft","dt","vt","gt","mt","Tt","yt","bt","Et","wt","Pt","At","xt","Dt","St","Ct","It","Lt","Ft","Rt","Mt","kt","_t","Nt","Ot","Xt","zt","Yt","qt","Wt","$t","Ht","Vt","jt","Ut","Bt","Gt","Zt","Jt","Kt","Qt","te","ee","__publicField","_a","_b","FlipBookReact","pages","className","debug","direction","pageSemantics","flipBook","useRef","FlipBookBase","useEffect","jsx","page","index"],"mappings":";;;;;;;;;AAWA,MAAIA,IAAqB,OAAO,IAAI,4BAA4B,GAC9DC,IAAsB,OAAO,IAAI,gBAAgB;AACnD,WAASC,EAAQC,GAAMC,GAAQC,GAAU;AACvC,QAAIC,IAAM;AAGV,QAFWD,MAAX,WAAwBC,IAAM,KAAKD,IACxBD,EAAO,QAAlB,WAA0BE,IAAM,KAAKF,EAAO,MACxC,SAASA,GAAQ;AACnB,MAAAC,IAAW,CAAA;AACX,eAASE,KAAYH;AACnB,QAAUG,MAAV,UAAuBF,EAASE,CAAQ,IAAIH,EAAOG,CAAQ;AAAA,IACjE,MAAS,CAAAF,IAAWD;AAClB,WAAAA,IAASC,EAAS,KACX;AAAA,MACL,UAAUL;AAAA,MACV,MAAMG;AAAA,MACN,KAAKG;AAAA,MACL,KAAgBF,MAAX,SAAoBA,IAAS;AAAA,MAClC,OAAOC;AAAA,IACX;AAAA,EACC;AACe,SAAAG,GAAA,WAAGP,GACRO,GAAA,MA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AC;AAAC,IAAI0B,KAAExB,GAAE;ACWz+iC,MAAM2G,KAAgD,CAAC;AAAA,EACrD,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,WAAAC,IAAY;AAAA;AAAA,EACZ,eAAAC,IAAgB;AAClB,MAAM;AACJ,QAAMC,IAAWC;AAAA,IACf,IAAIC,GAAa;AAAA,MACf,eAAAH;AAAA,MACA,YAAYJ,EAAM;AAAA,MAClB,WAAAG;AAAA,IAAA,CACD;AAAA,EAAA;AAGH,SAAAK,GAAU,MAAM;AACd,IAAAH,EAAS,QAAQ,OAAO,IAAIJ,CAAS,IAAIC,CAAK;AAAA,EAEhD,GAAG,CAAE,CAAA,GAGFO,gBAAAA,GAAA,IAAA,OAAA,EAAI,WAAAR,GACF,UAAAD,EAAM,IAAI,CAACU,GAAMC,MAChBF,gBAAAA,GAAA,IAAC,SAAgB,WAAU,QACxB,UADOC,KAAAC,CAEV,CACD,EACH,CAAA;AAEJ;","x_google_ignoreList":[0,1,2]} \ No newline at end of file diff --git a/react/package.json b/react/package.json index de10e6d..8dbb6d4 100644 --- a/react/package.json +++ b/react/package.json @@ -9,7 +9,7 @@ "homepage": "https://github.com/doradsoft/html-flip-book", "repository": { "type": "git", - "url": "https://github.com/doradsoft/html-flip-book.git" + "url": "git+https://github.com/doradsoft/html-flip-book.git" }, "bugs": { "url": "https://github.com/doradsoft/html-flip-book/issues"