@kolserdav/swiper 4.3.1 → 4.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Swiper.d.ts +1 -2
- package/dist/Swiper.js +1122 -2
- package/dist/Swiper.js.map +1 -0
- package/dist/styles.css +144 -0
- package/dist/styles.css.map +1 -0
- package/package.json +10 -13
- package/dist/Swiper.js.LICENSE.txt +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
package/dist/Swiper.js
CHANGED
|
@@ -1,2 +1,1122 @@
|
|
|
1
|
-
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ReactSwiper=t(require("react")):e.ReactSwiper=t(e.react)}(this,(e=>(()=>{"use strict";var t={324:(e,t,n)=>{n.d(t,{Ay:()=>u});var r=n(601),o=n.n(r),i=n(314),a=n.n(i)()(o());a.push([e.id,".iYsMDZwYoSyzozPjEz5J {\n position: relative;\n overflow: hidden;\n min-width: 320px;\n width: 100%;\n height: 100%;\n min-height: 20vh;\n max-width: 100vw;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.pqKG7OPYfDyQqVLqU9XB {\n background-color: #fff;\n border-radius: 1rem;\n}\n\n.eLNE2IZaVxAthGkzoysU {\n position: relative;\n width: 100%;\n height: 100%;\n}\n\n.HROHJaN0RPwx5AAjEGrH {\n position: absolute;\n max-width: inherit;\n top: 0;\n left: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n}\n.fjkZBkJ7DRA58T6wJLwI {\n left: -100%;\n}\n.KD5jXJ7nuM20VA1IDPkY {\n left: 100%;\n}\n.omd2aHIJEIptucY7mx6y {\n transition: left 0.4s ease-in 0s;\n}\n.z3V7MHLxGPgzoAclF6WC {\n transition: left 0.4s ease-out 0s;\n}\n\n.XofRheLHw9Ng7TOhyHjk {\n width: 100%;\n height: 100%;\n position: relative;\n}\n\n.N0DK67z7b9n1uZhV4XBd {\n border-radius: 2px;\n position: relative;\n width: calc(100% - 48px);\n height: calc(100% - 48px);\n -webkit-box-shadow: 0px 0px 5px 1px rgba(34, 60, 80, 0.14);\n -moz-box-shadow: 0px 0px 5px 1px rgba(34, 60, 80, 0.14);\n box-shadow: 0px 0px 5px 1px rgba(34, 60, 80, 0.14);\n}\n\n._y51GMhoRcds9oqSwCnH {\n cursor: pointer;\n position: absolute;\n width: auto;\n height: auto;\n display: flex;\n align-items: center;\n z-index: 12;\n}\n\n.IWpO6LYjiJSfWSEh9X_l {\n right: 0;\n}\n\n.o1hoKJ6OSu3zOjkDLiJH {\n left: 0;\n transform: rotate(180deg);\n}\n\n.pWqHBVewaJNmAfi96NlO {\n display: -webkit-inline-box;\n display: -webkit-inline-flex;\n display: -ms-inline-flexbox;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n box-sizing: border-box;\n background-color: transparent;\n outline: 0;\n border: 0;\n margin: 0;\n border-radius: 0;\n padding: 0;\n cursor: pointer;\n user-select: none;\n vertical-align: middle;\n text-decoration: none;\n color: inherit;\n text-align: center;\n flex: 0 0 auto;\n font-size: 1.5rem;\n padding: 8px;\n border-radius: 50%;\n overflow: visible;\n color: rgba(0, 0, 0, 0.54);\n transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n}\n.pWqHBVewaJNmAfi96NlO:hover {\n background-color: rgba(0, 0, 0, 0.054);\n}\n.pWqHBVewaJNmAfi96NlO:active {\n background-color: rgba(0, 0, 0, 0.007);\n}\n\n.JEvfD7_cycab43UB7lC1 {\n position: absolute;\n display: flex;\n flex-direction: row;\n bottom: 0;\n}\n\n.QDEdEYsr59gcip7aNmnF {\n cursor: pointer;\n position: relative;\n width: 8px;\n height: 8px;\n margin: 2px;\n border: 1px solid gray;\n border-radius: 50%;\n}\n\n.QDEdEYsr59gcip7aNmnF.cHM1daB82vtAGSVhkiF8 {\n cursor: default;\n background-color: gray;\n}",""]);const u=a},314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var u=0;u<this.length;u++){var c=this[u][0];null!=c&&(a[c]=!0)}for(var l=0;l<e.length;l++){var s=[].concat(e[l]);r&&a[s[0]]||(void 0!==i&&(void 0===s[5]||(s[1]="@layer".concat(s[5].length>0?" ".concat(s[5]):""," {").concat(s[1],"}")),s[5]=i),n&&(s[2]?(s[1]="@media ".concat(s[2]," {").concat(s[1],"}"),s[2]=n):s[2]=n),o&&(s[4]?(s[1]="@supports (".concat(s[4],") {").concat(s[1],"}"),s[4]=o):s[4]="".concat(o)),t.push(s))}},t}},601:e=>{e.exports=function(e){return e[1]}},72:e=>{var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var i={},a=[],u=0;u<e.length;u++){var c=e[u],l=r.base?c[0]+r.base:c[0],s=i[l]||0,d="".concat(l," ").concat(s);i[l]=s+1;var f=n(d),v={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==f)t[f].references++,t[f].updater(v);else{var p=o(v,r);r.byIndex=u,t.splice(u,0,{identifier:d,updater:p,references:1})}a.push(d)}return a}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var i=r(e=e||[],o=o||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var u=n(i[a]);t[u].references--}for(var c=r(e,o),l=0;l<i.length;l++){var s=n(i[l]);0===t[s].references&&(t[s].updater(),t.splice(s,1))}i=c}}},659:e=>{var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},56:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},825:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},155:t=>{t.exports=e}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={id:e,exports:{}};return t[e](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nc=void 0;var o={};r.r(o),r.d(o,{SWIPE_ON_EVENT_SPEED:()=>D,SWIPE_TRANSITION_TIMEOUT:()=>R,default:()=>W});var i=r(155),a=r.n(i);function u(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=u(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}const c=function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=u(e))&&(r&&(r+=" "),r+=t);return r};var l=r(72),s=r.n(l),d=r(825),f=r.n(d),v=r(659),p=r.n(v),h=r(56),m=r.n(h),y=r(540),b=r.n(y),g=r(113),x=r.n(g),w=r(324),E={};E.styleTagTransform=x(),E.setAttributes=m(),E.insert=p().bind(null,"head"),E.domAPI=f(),E.insertStyleElement=b(),s()(w.Ay,E);const k=w.Ay&&w.Ay.locals?w.Ay.locals:void 0;function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(e)}function S(){S=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var i=t&&t.prototype instanceof y?t:y,a=Object.create(i.prototype),u=new T(r||[]);return o(a,"_invoke",{value:_(e,n,u)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var f="suspendedStart",v="suspendedYield",p="executing",h="completed",m={};function y(){}function b(){}function g(){}var x={};l(x,a,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(A([])));E&&E!==n&&r.call(E,a)&&(x=E);var k=g.prototype=y.prototype=Object.create(x);function O(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(o,i,a,u){var c=d(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==L(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,n,r){var o=f;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var u=r.delegate;if(u){var c=M(u,r);if(c){if(c===m)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var l=d(t,n,r);if("normal"===l.type){if(o=r.done?h:v,l.arg===m)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=h,r.method="throw",r.arg=l.arg)}}}function M(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,M(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=d(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function A(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(L(t)+" is not iterable")}return b.prototype=g,o(k,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=l(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},O(j.prototype),l(j.prototype,u,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new j(s(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},O(k),l(k,c,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=A,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return u.type="throw",u.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function O(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function j(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){O(i,r,o,a,u,"next",e)}function u(e){O(i,r,o,a,u,"throw",e)}a(void 0)}))}}function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return M(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function T(e,t,n){return(t=function(e){var t=function(e){if("object"!=L(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=L(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==L(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var A,I,C,z,R=400,D=.7,H=function(e,t,n,r){return(null==e?void 0:e.id)!==(null==t?void 0:t.id)&&(null==t?void 0:t.id)!==(null==n?void 0:n.id)&&(null==n?void 0:n.id)!==(null==e?void 0:e.id)||!r.length?[1,2,3].map((function(r){var o=1===r?P({},e):2===r?t:P({},n);return o.type=1===r?"prev":2===r?"current":"next",o})):r},B=function(){return{id:Math.ceil(1e3*Math.random()),children:a().createElement("div",null)}},G={},J=!1,V=[],F=(new Date).getTime();function W(e){var t=e.defaultCurrent,n=e.getNext,r=e.getPrev,o=e.onSwipe,u=e.className,l=e.invitationAnimation,s=e.durationAnimation,d=e.blockSwipe,f=e.dots,v=_((0,i.useState)(),2),p=v[0],h=v[1],m=_((0,i.useState)(),2),y=m[0],b=m[1],g=_((0,i.useState)(),2),x=g[0],w=g[1],E=_((0,i.useState)(),2),L=E[0],O=E[1],M=_((0,i.useState)(),2),N=M[0],P=M[1],T=_((0,i.useState)(0),2),W=T[0],Y=T[1],q=_((0,i.useState)(0),2),U=q[0],X=q[1],K=_((0,i.useState)(0),2),Z=K[0],Q=K[1],$=_((0,i.useState)(0),2),ee=$[0],te=$[1],ne=_((0,i.useState)(0),2),re=ne[0],oe=ne[1],ie=_((0,i.useState)(),2),ae=ie[0],ue=ie[1],ce=_((0,i.useState)(!1),2),le=ce[0],se=ce[1],de=(0,i.useRef)(null);void 0===z&&(z=t);var fe=(0,i.useMemo)((function(){return H(y||B(),p||t,x||B(),V)}),[x,y,p]);V=fe;var ve=function(e){return G[e]=G[e]?G[e]:(0,i.createRef)(),G[e]},pe=(0,i.useMemo)((function(){return function(e,t){var n,r,o;null===(n=ve((null==e?void 0:e.id)||(null==x?void 0:x.id)||0).current)||void 0===n||n.classList.add(k.go),null===(r=ve((null==t?void 0:t.id)||(null==y?void 0:y.id)||0).current)||void 0===r||r.classList.add(k.go),null===(o=ve((null==p?void 0:p.id)||0).current)||void 0===o||o.classList.add(k.go),setTimeout((function(){var n,r,o;null===(n=ve((null==e?void 0:e.id)||(null==x?void 0:x.id)||0).current)||void 0===n||n.classList.remove(k.go),null===(r=ve((null==t?void 0:t.id)||(null==y?void 0:y.id)||0).current)||void 0===r||r.classList.remove(k.go),null===(o=ve((null==p?void 0:p.id)||0).current)||void 0===o||o.classList.remove(k.go)}),R)}}),[null==p?void 0:p.id,null==x?void 0:x.id,null==y?void 0:y.id]),he=(0,i.useMemo)((function(){return function(){var e,t,n;null===(e=ve((null==x?void 0:x.id)||0).current)||void 0===e||e.classList.add(k.back),null===(t=ve((null==y?void 0:y.id)||0).current)||void 0===t||t.classList.add(k.back),null===(n=ve((null==p?void 0:p.id)||0).current)||void 0===n||n.classList.add(k.back),setTimeout((function(){var e,t,n;null===(e=ve((null==x?void 0:x.id)||0).current)||void 0===e||e.classList.remove(k.back),null===(t=ve((null==y?void 0:y.id)||0).current)||void 0===t||t.classList.remove(k.back),null===(n=ve((null==p?void 0:p.id)||0).current)||void 0===n||n.classList.remove(k.back)}),R)}}),[null==p?void 0:p.id,null==x?void 0:x.id,null==y?void 0:y.id]),me=function(){var e=j(S().mark((function e(t){return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){setTimeout((function(){e(0)}),t)}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ye=(0,i.useMemo)((function(){return function(e,t){e&&r((null==e?void 0:e.id)||0).then((function(e){O(e)})),t&&n((null==t?void 0:t.id)||0).then((function(e){P(e)}))}}),[n,r]),be=(0,i.useMemo)((function(){return function(){he(),oe(0),se(!1)}}),[he,oe,se]),ge=(0,i.useMemo)((function(){return function(e,t,n){pe(e,t),oe(n)}}),[pe]),xe=(0,i.useMemo)((function(){return function(e){var t=e._prev,n=e._current,r=e._next;oe(0),b(t),h(n),w(r)}}),[]),we=(0,i.useMemo)((function(){return function(){var e=j(S().mark((function e(t,n,r){var i,a,u;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.newNext,a=t.newPrev,u=t.coeff,null!==(null==n?void 0:n.id)&&null!==(null==r?void 0:r.id)){e.next=4;break}return be(),e.abrupt("return",1);case 4:return void 0!==o&&o((null==n?void 0:n.id)||(null==r?void 0:r.id)),ge(n,r,W*u),e.next=8,me(R);case 8:return xe({_prev:a,_current:n||r,_next:i}),e.abrupt("return",0);case 10:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}()}),[xe,be,o,ge,W]),Ee=(0,i.useMemo)((function(){return function(){var e=j(S().mark((function e(t){var n,r,o,i;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t._lastLeft,r=t._next,o=t._prev,i=t.speed,se(!0),!(Math.abs(n)>Z/3||void 0!==i&&i>D)){e.next=12;break}if(!(n<0)){e.next=8;break}return e.next=6,we({newPrev:p,newNext:N,coeff:-1},r,void 0);case 6:e.next=10;break;case 8:return e.next=10,we({newPrev:L,newNext:p,coeff:1},void 0,o);case 10:e.next=13;break;case 12:be();case 13:return se(!1),e.abrupt("return",0);case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),[p,be,Z,L,N,we]),ke=(0,i.useMemo)((function(){return function(){var e=j(S().mark((function e(t,n){var r,o,i,a,u,c;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=n.touches,a=null===(r=i[0])||void 0===r?void 0:r.clientX,u=null===(o=i[0])||void 0===o?void 0:o.clientY,A=A||0,I=I||0,c=0,e.t0=t,e.next="onTouchStart"===e.t0?10:"onTouchMove"===e.t0?15:"onTouchEnd"===e.t0?17:21;break;case 10:return A=a,I=u,C=ee,F=(new Date).getTime(),e.abrupt("break",21);case 15:return d||(c=Math.abs(I-u),Math.abs(A-a)>c&&oe(C=ee-(A-a))),e.abrupt("break",21);case 17:if(d){e.next=20;break}return e.next=20,Ee({_lastLeft:C,speed:Math.abs(C/((new Date).getTime()-F)),_next:x,_prev:y});case 20:return e.abrupt("break",21);case 21:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()}),[ee,d,Ee,x,y]),Le=function(e){return function(t){ke(e,t)}},Se=(0,i.useMemo)((function(){return function(e){var t="next"===e;return j(S().mark((function e(){var n;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Z*(t?-1:1),t?pe():he(),e.next=5,me(R);case 5:return e.next=7,Ee({_lastLeft:n,_next:x,_prev:y});case 7:return e.abrupt("return",0);case 8:case"end":return e.stop()}}),e)})))}}),[he,pe,Ee,Z,x,y]),Oe=Se("next"),je=Se("prev"),_e=(0,i.useMemo)((function(){return function(){var e=j(S().mark((function e(t){return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t<0?pe():he(),oe(t),e.next=4,me(R);case 4:return t<0?he():pe(),oe(0),e.next=8,me(R);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),[he,pe]),Me=(0,i.useMemo)((function(){return j(S().mark((function e(){var o,i;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n(t.id||0);case 2:return o=e.sent,e.next=5,r(t.id||0);case 5:i=e.sent,h(t),b(i),w(o),z=t,se(!1);case 11:case"end":return e.stop()}}),e)})))}),[t,n,r]),Ne=(0,i.useMemo)((function(){return function(){var e=j(S().mark((function e(t,n){return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.id){e.next=3;break}return e.next=3,_e(W/5.5);case 3:if(!n.id){e.next=6;break}return e.next=6,_e(W/5.5*-1);case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()}),[_e,W]),Pe=(0,i.useMemo)((function(){return function(){var e=j(S().mark((function e(t){var o,i,a,u,c,l,s,d,f;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.target,i=null==o?void 0:o.getAttribute("tabindex"),a=parseInt(i,10),(u=(null==p?void 0:p.id)||0)!==(null==x?void 0:x.id)){e.next=10;break}c=x,s=N,l=p,e.next=41;break;case 10:if(u!==(null==y?void 0:y.id)){e.next=16;break}c=y,s=p,l=L,e.next=41;break;case 16:if(u!==(null==L?void 0:L.id)){e.next=24;break}return c=L,s=y,e.next=21,r(null==L?void 0:L.id);case 21:l=e.sent,e.next=41;break;case 24:if(u!==(null==N?void 0:N.id)){e.next=32;break}return c=N,l=x,e.next=29,r(null==N?void 0:N.id);case 29:s=e.sent,e.next=41;break;case 32:return e.next=34,n(a-1);case 34:return c=e.sent,e.next=37,n((null===(d=c)||void 0===d?void 0:d.id)||0);case 37:return s=e.sent,e.next=40,r((null===(f=c)||void 0===f?void 0:f.id)||0);case 40:l=e.sent;case 41:if(!(u<a)){e.next=46;break}return e.next=44,we({newPrev:l,newNext:s,coeff:-1},c,void 0);case 44:e.next=48;break;case 46:return e.next=48,we({newPrev:l,newNext:s,coeff:1},void 0,c);case 48:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),[n,r,we,p,x,N,L,y]);return(0,i.useEffect)((function(){var e,t,n=null==p||null===(e=p.nextRef)||void 0===e?void 0:e.current,r=null==p||null===(t=p.closeRef)||void 0===t?void 0:t.current;return null==n||n.addEventListener("click",Oe),null==r||r.addEventListener("click",Oe),function(){null==n||n.removeEventListener("click",Oe),null==r||r.removeEventListener("click",Oe)}}),[Oe,p]),(0,i.useEffect)((function(){var e,t,n=null==de||null===(e=de.current)||void 0===e||null===(e=e.parentElement)||void 0===e||null===(e=e.getBoundingClientRect())||void 0===e?void 0:e.width,r=null==de||null===(t=de.current)||void 0===t||null===(t=t.parentElement)||void 0===t||null===(t=t.getBoundingClientRect())||void 0===t?void 0:t.height;n&&!Z&&r&&!U&&(Q(n),X(r))}),[de,Z,U]),(0,i.useEffect)((function(){var e,t=null==de||null===(e=de.current)||void 0===e||null===(e=e.parentElement)||void 0===e||null===(e=e.getBoundingClientRect())||void 0===e?void 0:e.left;t&&!re&&te(t)}),[de,re]),(0,i.useEffect)((function(){var e;return s&&(e=setInterval((function(){Oe()}),s)),function(){e&&clearInterval(e)}}),[s,Oe]),(0,i.useEffect)((function(){p&&y&&x&&z===t||Me()}),[p,x,y,t,Me]),(0,i.useEffect)((function(){var e=document.body.clientWidth;!W&&e&&Y(e)}),[W]),(0,i.useEffect)((function(){l&&Z&&!J&&y&&x&&(J=!0,Ne(y,x))}),[l,x,y,Ne,Z]),(0,i.useEffect)((function(){var e=function(){var e,t,n,r=null==de||null===(e=de.current)||void 0===e||null===(e=e.parentElement)||void 0===e||null===(e=e.getBoundingClientRect())||void 0===e?void 0:e.width,o=null==de||null===(t=de.current)||void 0===t||null===(t=t.parentElement)||void 0===t||null===(t=t.getBoundingClientRect())||void 0===t?void 0:t.height,i=null==de||null===(n=de.current)||void 0===n||null===(n=n.parentElement)||void 0===n||null===(n=n.getBoundingClientRect())||void 0===n?void 0:n.left,a=document.body.clientWidth;r&&o&&(Q(r),X(o)),i&&oe(i),a&&Y(a)};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),(0,i.useEffect)((function(){var e;void 0===ae&&ue("ontouchstart"in window||void 0!==(null===(e=navigator)||void 0===e?void 0:e.msMaxTouchPoints))}),[ae]),(0,i.useEffect)((function(){ye(y,x)}),[y,x,ye]),a().createElement("div",{className:k.container,ref:de},fe.map((function(e){var t;return a().createElement(i.Fragment,{key:e.id},null!==e.id&&null!==e.children&&Z&&a().createElement("div",{onTouchMove:Le("onTouchMove"),onTouchStart:Le("onTouchStart"),onTouchEnd:Le("onTouchEnd"),id:null===(t=e.id)||void 0===t?void 0:t.toString(),style:"current"===e.type?{width:Z,height:U,left:re}:"prev"===e.type?{width:Z,height:U,left:re-window.innerWidth}:{width:Z,height:U,left:re+window.innerWidth},className:c(k.card,"prev"===e.type?k.prev:"next"===e.type?k.next:""),ref:ve(e.id)},a().createElement("div",{className:c(k.content,u)},e.children)),null===e.id&&a().createElement("div",{style:"current"===e.type?{width:Z,height:U,left:re}:"prev"===e.type?{width:Z,height:U,left:re-W}:{width:Z,height:U,left:re+W},className:c(k.card,"prev"===e.type?k.prev:"next"===e.type?k.next:"")},a().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",fill:"#000000"},a().createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),a().createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8z"}))))})),void 0!==ae&&!ae&&null!==(null==y?void 0:y.id)&&a().createElement("div",{className:c(k.button,k.button__prev)},a().createElement("button",{className:k.icon__button,type:"button",disabled:le||ae,onClick:je},a().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",fill:"#000000"},a().createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),a().createElement("path",{d:"M10.02 6L8.61 7.41 13.19 12l-4.58 4.59L10.02 18l6-6-6-6z"})))),void 0!==ae&&!ae&&null!==(null==x?void 0:x.id)&&a().createElement("div",{className:c(k.button,k.button__next)},a().createElement("button",{className:k.icon__button,type:"button",disabled:le||ae,onClick:Oe},a().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",fill:"#000000"},a().createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),a().createElement("path",{d:"M10.02 6L8.61 7.41 13.19 12l-4.58 4.59L10.02 18l6-6-6-6z"})))),f&&a().createElement("div",{className:k.dots},f.list.map((function(e){return a().createElement("div",{role:"button",onClick:Pe,tabIndex:e,key:e,className:c(k.dot,(null==p?void 0:p.id)===e?k.active:"")})}))))}return o})()));
|
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
+
module.exports = factory(require("react"));
|
|
4
|
+
else if(typeof define === 'function' && define.amd)
|
|
5
|
+
define(["react"], factory);
|
|
6
|
+
else if(typeof exports === 'object')
|
|
7
|
+
exports["ReactSwiper"] = factory(require("react"));
|
|
8
|
+
else
|
|
9
|
+
root["ReactSwiper"] = factory(root["react"]);
|
|
10
|
+
})(this, (__WEBPACK_EXTERNAL_MODULE_react__) => {
|
|
11
|
+
return /******/ (() => { // webpackBootstrap
|
|
12
|
+
/******/ "use strict";
|
|
13
|
+
/******/ var __webpack_modules__ = ({
|
|
14
|
+
|
|
15
|
+
/***/ "./src/Swiper.module.css":
|
|
16
|
+
/*!*******************************!*\
|
|
17
|
+
!*** ./src/Swiper.module.css ***!
|
|
18
|
+
\*******************************/
|
|
19
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
20
|
+
|
|
21
|
+
__webpack_require__.r(__webpack_exports__);
|
|
22
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23
|
+
/* harmony export */ active: () => (/* binding */ active),
|
|
24
|
+
/* harmony export */ back: () => (/* binding */ back),
|
|
25
|
+
/* harmony export */ button: () => (/* binding */ button),
|
|
26
|
+
/* harmony export */ button__next: () => (/* binding */ button__next),
|
|
27
|
+
/* harmony export */ button__prev: () => (/* binding */ button__prev),
|
|
28
|
+
/* harmony export */ card: () => (/* binding */ card),
|
|
29
|
+
/* harmony export */ card__stop: () => (/* binding */ card__stop),
|
|
30
|
+
/* harmony export */ container: () => (/* binding */ container),
|
|
31
|
+
/* harmony export */ content: () => (/* binding */ content),
|
|
32
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
33
|
+
/* harmony export */ dot: () => (/* binding */ dot),
|
|
34
|
+
/* harmony export */ dots: () => (/* binding */ dots),
|
|
35
|
+
/* harmony export */ go: () => (/* binding */ go),
|
|
36
|
+
/* harmony export */ icon__button: () => (/* binding */ icon__button),
|
|
37
|
+
/* harmony export */ next: () => (/* binding */ next),
|
|
38
|
+
/* harmony export */ paper: () => (/* binding */ paper),
|
|
39
|
+
/* harmony export */ pipe: () => (/* binding */ pipe),
|
|
40
|
+
/* harmony export */ prev: () => (/* binding */ prev)
|
|
41
|
+
/* harmony export */ });
|
|
42
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
|
|
43
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
44
|
+
/* 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");
|
|
45
|
+
/* 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__);
|
|
46
|
+
// Imports
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
50
|
+
// Module
|
|
51
|
+
___CSS_LOADER_EXPORT___.push([module.id, `._E0DSvpd_pOhPwEcOESk {
|
|
52
|
+
position: relative;
|
|
53
|
+
overflow: hidden;
|
|
54
|
+
min-width: 320px;
|
|
55
|
+
width: 100%;
|
|
56
|
+
height: 100%;
|
|
57
|
+
min-height: 20vh;
|
|
58
|
+
max-width: 100vw;
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
justify-content: center;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.MNKZLOwtKAYuGRPioWg5 {
|
|
65
|
+
background-color: #fff;
|
|
66
|
+
border-radius: 1rem;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.fZGJ3LJ3vksT7z_W2Xbj {
|
|
70
|
+
position: relative;
|
|
71
|
+
width: 100%;
|
|
72
|
+
height: 100%;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.PZLGxXxVQxNBPdUxCzZF {
|
|
76
|
+
position: absolute;
|
|
77
|
+
max-width: inherit;
|
|
78
|
+
top: 0;
|
|
79
|
+
left: 0;
|
|
80
|
+
display: flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
justify-content: center;
|
|
83
|
+
flex-direction: column;
|
|
84
|
+
}
|
|
85
|
+
.fdHrMcOmTUvG2ylUYYCo {
|
|
86
|
+
left: -100%;
|
|
87
|
+
}
|
|
88
|
+
.yHDVaCXbXJXsAleBINaZ {
|
|
89
|
+
left: 100%;
|
|
90
|
+
}
|
|
91
|
+
.P07Z5eTTJ3p2fjOfBFbZ {
|
|
92
|
+
transition: left 0.4s ease-in 0s;
|
|
93
|
+
}
|
|
94
|
+
.okENlLNDDujMLgzN2KUI {
|
|
95
|
+
transition: left 0.4s ease-out 0s;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.xqRTwQcqLpSHYzXUn7Qo {
|
|
99
|
+
width: 100%;
|
|
100
|
+
height: 100%;
|
|
101
|
+
position: relative;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.Ypi0iAw66HoFXrF10npO {
|
|
105
|
+
border-radius: 2px;
|
|
106
|
+
position: relative;
|
|
107
|
+
width: calc(100% - 48px);
|
|
108
|
+
height: calc(100% - 48px);
|
|
109
|
+
-webkit-box-shadow: 0px 0px 5px 1px rgba(34, 60, 80, 0.14);
|
|
110
|
+
-moz-box-shadow: 0px 0px 5px 1px rgba(34, 60, 80, 0.14);
|
|
111
|
+
box-shadow: 0px 0px 5px 1px rgba(34, 60, 80, 0.14);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.BFZzBGGo1DZSlo_VO3S6 {
|
|
115
|
+
cursor: pointer;
|
|
116
|
+
position: absolute;
|
|
117
|
+
width: auto;
|
|
118
|
+
height: auto;
|
|
119
|
+
display: flex;
|
|
120
|
+
align-items: center;
|
|
121
|
+
z-index: 12;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.I78h4QcRoZnFJkvhRspX {
|
|
125
|
+
right: 0;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.nlzCTOpb1QyxySkPPncw {
|
|
129
|
+
left: 0;
|
|
130
|
+
transform: rotate(180deg);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.D2v6zUbfWAotXYTbrWUW {
|
|
134
|
+
display: -webkit-inline-box;
|
|
135
|
+
display: -webkit-inline-flex;
|
|
136
|
+
display: -ms-inline-flexbox;
|
|
137
|
+
display: inline-flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
justify-content: center;
|
|
140
|
+
position: relative;
|
|
141
|
+
box-sizing: border-box;
|
|
142
|
+
background-color: transparent;
|
|
143
|
+
outline: 0;
|
|
144
|
+
border: 0;
|
|
145
|
+
margin: 0;
|
|
146
|
+
border-radius: 0;
|
|
147
|
+
padding: 0;
|
|
148
|
+
cursor: pointer;
|
|
149
|
+
user-select: none;
|
|
150
|
+
vertical-align: middle;
|
|
151
|
+
text-decoration: none;
|
|
152
|
+
color: inherit;
|
|
153
|
+
text-align: center;
|
|
154
|
+
flex: 0 0 auto;
|
|
155
|
+
font-size: 1.5rem;
|
|
156
|
+
padding: 8px;
|
|
157
|
+
border-radius: 50%;
|
|
158
|
+
overflow: visible;
|
|
159
|
+
color: rgba(0, 0, 0, 0.54);
|
|
160
|
+
transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
161
|
+
}
|
|
162
|
+
.D2v6zUbfWAotXYTbrWUW:hover {
|
|
163
|
+
background-color: rgba(0, 0, 0, 0.054);
|
|
164
|
+
}
|
|
165
|
+
.D2v6zUbfWAotXYTbrWUW:active {
|
|
166
|
+
background-color: rgba(0, 0, 0, 0.007);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.Zxb5JskRkhBuUYyMGjU2 {
|
|
170
|
+
position: absolute;
|
|
171
|
+
display: flex;
|
|
172
|
+
flex-direction: row;
|
|
173
|
+
bottom: 0;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.CEsncB7BTaSWKBlqUDJt {
|
|
177
|
+
cursor: pointer;
|
|
178
|
+
position: relative;
|
|
179
|
+
width: 8px;
|
|
180
|
+
height: 8px;
|
|
181
|
+
margin: 2px;
|
|
182
|
+
border: 1px solid gray;
|
|
183
|
+
border-radius: 50%;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.CEsncB7BTaSWKBlqUDJt.KZrnFwcKg0Ux8MF4udTr {
|
|
187
|
+
cursor: default;
|
|
188
|
+
background-color: gray;
|
|
189
|
+
}`, "",{"version":3,"sources":["webpack://./src/Swiper.module.css"],"names":[],"mappings":"AAAA;EACE,kBAAkB;EAClB,gBAAgB;EAChB,gBAAgB;EAChB,WAAW;EACX,YAAY;EACZ,gBAAgB;EAChB,gBAAgB;EAChB,aAAa;EACb,mBAAmB;EACnB,uBAAuB;AACzB;;AAEA;EACE,sBAAsB;EACtB,mBAAmB;AACrB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,YAAY;AACd;;AAEA;EACE,kBAAkB;EAClB,kBAAkB;EAClB,MAAM;EACN,OAAO;EACP,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,sBAAsB;AACxB;AACA;EACE,WAAW;AACb;AACA;EACE,UAAU;AACZ;AACA;EACE,gCAAgC;AAClC;AACA;EACE,iCAAiC;AACnC;;AAEA;EACE,WAAW;EACX,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,kBAAkB;EAClB,kBAAkB;EAClB,wBAAwB;EACxB,yBAAyB;EACzB,0DAA0D;EAC1D,uDAAuD;EACvD,kDAAkD;AACpD;;AAEA;EACE,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,YAAY;EACZ,aAAa;EACb,mBAAmB;EACnB,WAAW;AACb;;AAEA;EACE,QAAQ;AACV;;AAEA;EACE,OAAO;EACP,yBAAyB;AAC3B;;AAEA;EACE,2BAA2B;EAC3B,4BAA4B;EAC5B,2BAA2B;EAC3B,oBAAoB;EACpB,mBAAmB;EACnB,uBAAuB;EACvB,kBAAkB;EAClB,sBAAsB;EACtB,6BAA6B;EAC7B,UAAU;EACV,SAAS;EACT,SAAS;EACT,gBAAgB;EAChB,UAAU;EACV,eAAe;EACf,iBAAiB;EACjB,sBAAsB;EACtB,qBAAqB;EACrB,cAAc;EACd,kBAAkB;EAClB,cAAc;EACd,iBAAiB;EACjB,YAAY;EACZ,kBAAkB;EAClB,iBAAiB;EACjB,0BAA0B;EAC1B,mEAAmE;AACrE;AACA;EACE,sCAAsC;AACxC;AACA;EACE,sCAAsC;AACxC;;AAEA;EACE,kBAAkB;EAClB,aAAa;EACb,mBAAmB;EACnB,SAAS;AACX;;AAEA;EACE,eAAe;EACf,kBAAkB;EAClB,UAAU;EACV,WAAW;EACX,WAAW;EACX,sBAAsB;EACtB,kBAAkB;AACpB;;AAEA;EACE,eAAe;EACf,sBAAsB;AACxB","sourcesContent":[".container {\n position: relative;\n overflow: hidden;\n min-width: 320px;\n width: 100%;\n height: 100%;\n min-height: 20vh;\n max-width: 100vw;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.paper {\n background-color: #fff;\n border-radius: 1rem;\n}\n\n.pipe {\n position: relative;\n width: 100%;\n height: 100%;\n}\n\n.card {\n position: absolute;\n max-width: inherit;\n top: 0;\n left: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n}\n.prev {\n left: -100%;\n}\n.next {\n left: 100%;\n}\n.back {\n transition: left 0.4s ease-in 0s;\n}\n.go {\n transition: left 0.4s ease-out 0s;\n}\n\n.card__stop {\n width: 100%;\n height: 100%;\n position: relative;\n}\n\n.content {\n border-radius: 2px;\n position: relative;\n width: calc(100% - 48px);\n height: calc(100% - 48px);\n -webkit-box-shadow: 0px 0px 5px 1px rgba(34, 60, 80, 0.14);\n -moz-box-shadow: 0px 0px 5px 1px rgba(34, 60, 80, 0.14);\n box-shadow: 0px 0px 5px 1px rgba(34, 60, 80, 0.14);\n}\n\n.button {\n cursor: pointer;\n position: absolute;\n width: auto;\n height: auto;\n display: flex;\n align-items: center;\n z-index: 12;\n}\n\n.button__next {\n right: 0;\n}\n\n.button__prev {\n left: 0;\n transform: rotate(180deg);\n}\n\n.icon__button {\n display: -webkit-inline-box;\n display: -webkit-inline-flex;\n display: -ms-inline-flexbox;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n box-sizing: border-box;\n background-color: transparent;\n outline: 0;\n border: 0;\n margin: 0;\n border-radius: 0;\n padding: 0;\n cursor: pointer;\n user-select: none;\n vertical-align: middle;\n text-decoration: none;\n color: inherit;\n text-align: center;\n flex: 0 0 auto;\n font-size: 1.5rem;\n padding: 8px;\n border-radius: 50%;\n overflow: visible;\n color: rgba(0, 0, 0, 0.54);\n transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n}\n.icon__button:hover {\n background-color: rgba(0, 0, 0, 0.054);\n}\n.icon__button:active {\n background-color: rgba(0, 0, 0, 0.007);\n}\n\n.dots {\n position: absolute;\n display: flex;\n flex-direction: row;\n bottom: 0;\n}\n\n.dot {\n cursor: pointer;\n position: relative;\n width: 8px;\n height: 8px;\n margin: 2px;\n border: 1px solid gray;\n border-radius: 50%;\n}\n\n.dot.active {\n cursor: default;\n background-color: gray;\n}"],"sourceRoot":""}]);
|
|
190
|
+
// Exports
|
|
191
|
+
var container = `_E0DSvpd_pOhPwEcOESk`;
|
|
192
|
+
var paper = `MNKZLOwtKAYuGRPioWg5`;
|
|
193
|
+
var pipe = `fZGJ3LJ3vksT7z_W2Xbj`;
|
|
194
|
+
var card = `PZLGxXxVQxNBPdUxCzZF`;
|
|
195
|
+
var prev = `fdHrMcOmTUvG2ylUYYCo`;
|
|
196
|
+
var next = `yHDVaCXbXJXsAleBINaZ`;
|
|
197
|
+
var back = `P07Z5eTTJ3p2fjOfBFbZ`;
|
|
198
|
+
var go = `okENlLNDDujMLgzN2KUI`;
|
|
199
|
+
var card__stop = `xqRTwQcqLpSHYzXUn7Qo`;
|
|
200
|
+
var content = `Ypi0iAw66HoFXrF10npO`;
|
|
201
|
+
var button = `BFZzBGGo1DZSlo_VO3S6`;
|
|
202
|
+
var button__next = `I78h4QcRoZnFJkvhRspX`;
|
|
203
|
+
var button__prev = `nlzCTOpb1QyxySkPPncw`;
|
|
204
|
+
var icon__button = `D2v6zUbfWAotXYTbrWUW`;
|
|
205
|
+
var dots = `Zxb5JskRkhBuUYyMGjU2`;
|
|
206
|
+
var dot = `CEsncB7BTaSWKBlqUDJt`;
|
|
207
|
+
var active = `KZrnFwcKg0Ux8MF4udTr`;
|
|
208
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
/***/ }),
|
|
212
|
+
|
|
213
|
+
/***/ "./node_modules/css-loader/dist/runtime/api.js":
|
|
214
|
+
/*!*****************************************************!*\
|
|
215
|
+
!*** ./node_modules/css-loader/dist/runtime/api.js ***!
|
|
216
|
+
\*****************************************************/
|
|
217
|
+
/***/ ((module) => {
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
/*
|
|
222
|
+
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
223
|
+
Author Tobias Koppers @sokra
|
|
224
|
+
*/
|
|
225
|
+
module.exports = function (cssWithMappingToString) {
|
|
226
|
+
var list = [];
|
|
227
|
+
|
|
228
|
+
// return the list of modules as css string
|
|
229
|
+
list.toString = function toString() {
|
|
230
|
+
return this.map(function (item) {
|
|
231
|
+
var content = "";
|
|
232
|
+
var needLayer = typeof item[5] !== "undefined";
|
|
233
|
+
if (item[4]) {
|
|
234
|
+
content += "@supports (".concat(item[4], ") {");
|
|
235
|
+
}
|
|
236
|
+
if (item[2]) {
|
|
237
|
+
content += "@media ".concat(item[2], " {");
|
|
238
|
+
}
|
|
239
|
+
if (needLayer) {
|
|
240
|
+
content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
|
|
241
|
+
}
|
|
242
|
+
content += cssWithMappingToString(item);
|
|
243
|
+
if (needLayer) {
|
|
244
|
+
content += "}";
|
|
245
|
+
}
|
|
246
|
+
if (item[2]) {
|
|
247
|
+
content += "}";
|
|
248
|
+
}
|
|
249
|
+
if (item[4]) {
|
|
250
|
+
content += "}";
|
|
251
|
+
}
|
|
252
|
+
return content;
|
|
253
|
+
}).join("");
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
// import a list of modules into the list
|
|
257
|
+
list.i = function i(modules, media, dedupe, supports, layer) {
|
|
258
|
+
if (typeof modules === "string") {
|
|
259
|
+
modules = [[null, modules, undefined]];
|
|
260
|
+
}
|
|
261
|
+
var alreadyImportedModules = {};
|
|
262
|
+
if (dedupe) {
|
|
263
|
+
for (var k = 0; k < this.length; k++) {
|
|
264
|
+
var id = this[k][0];
|
|
265
|
+
if (id != null) {
|
|
266
|
+
alreadyImportedModules[id] = true;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
for (var _k = 0; _k < modules.length; _k++) {
|
|
271
|
+
var item = [].concat(modules[_k]);
|
|
272
|
+
if (dedupe && alreadyImportedModules[item[0]]) {
|
|
273
|
+
continue;
|
|
274
|
+
}
|
|
275
|
+
if (typeof layer !== "undefined") {
|
|
276
|
+
if (typeof item[5] === "undefined") {
|
|
277
|
+
item[5] = layer;
|
|
278
|
+
} else {
|
|
279
|
+
item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
|
|
280
|
+
item[5] = layer;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
if (media) {
|
|
284
|
+
if (!item[2]) {
|
|
285
|
+
item[2] = media;
|
|
286
|
+
} else {
|
|
287
|
+
item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
|
|
288
|
+
item[2] = media;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
if (supports) {
|
|
292
|
+
if (!item[4]) {
|
|
293
|
+
item[4] = "".concat(supports);
|
|
294
|
+
} else {
|
|
295
|
+
item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
|
|
296
|
+
item[4] = supports;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
list.push(item);
|
|
300
|
+
}
|
|
301
|
+
};
|
|
302
|
+
return list;
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
/***/ }),
|
|
306
|
+
|
|
307
|
+
/***/ "./node_modules/css-loader/dist/runtime/sourceMaps.js":
|
|
308
|
+
/*!************************************************************!*\
|
|
309
|
+
!*** ./node_modules/css-loader/dist/runtime/sourceMaps.js ***!
|
|
310
|
+
\************************************************************/
|
|
311
|
+
/***/ ((module) => {
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
module.exports = function (item) {
|
|
316
|
+
var content = item[1];
|
|
317
|
+
var cssMapping = item[3];
|
|
318
|
+
if (!cssMapping) {
|
|
319
|
+
return content;
|
|
320
|
+
}
|
|
321
|
+
if (typeof btoa === "function") {
|
|
322
|
+
var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));
|
|
323
|
+
var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
|
|
324
|
+
var sourceMapping = "/*# ".concat(data, " */");
|
|
325
|
+
return [content].concat([sourceMapping]).join("\n");
|
|
326
|
+
}
|
|
327
|
+
return [content].join("\n");
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
/***/ }),
|
|
331
|
+
|
|
332
|
+
/***/ "react":
|
|
333
|
+
/*!************************!*\
|
|
334
|
+
!*** external "react" ***!
|
|
335
|
+
\************************/
|
|
336
|
+
/***/ ((module) => {
|
|
337
|
+
|
|
338
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_react__;
|
|
339
|
+
|
|
340
|
+
/***/ }),
|
|
341
|
+
|
|
342
|
+
/***/ "./node_modules/clsx/dist/clsx.mjs":
|
|
343
|
+
/*!*****************************************!*\
|
|
344
|
+
!*** ./node_modules/clsx/dist/clsx.mjs ***!
|
|
345
|
+
\*****************************************/
|
|
346
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
347
|
+
|
|
348
|
+
__webpack_require__.r(__webpack_exports__);
|
|
349
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
350
|
+
/* harmony export */ clsx: () => (/* binding */ clsx),
|
|
351
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
352
|
+
/* harmony export */ });
|
|
353
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (clsx);
|
|
354
|
+
|
|
355
|
+
/***/ })
|
|
356
|
+
|
|
357
|
+
/******/ });
|
|
358
|
+
/************************************************************************/
|
|
359
|
+
/******/ // The module cache
|
|
360
|
+
/******/ var __webpack_module_cache__ = {};
|
|
361
|
+
/******/
|
|
362
|
+
/******/ // The require function
|
|
363
|
+
/******/ function __webpack_require__(moduleId) {
|
|
364
|
+
/******/ // Check if module is in cache
|
|
365
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
366
|
+
/******/ if (cachedModule !== undefined) {
|
|
367
|
+
/******/ return cachedModule.exports;
|
|
368
|
+
/******/ }
|
|
369
|
+
/******/ // Create a new module (and put it into the cache)
|
|
370
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
371
|
+
/******/ id: moduleId,
|
|
372
|
+
/******/ // no module.loaded needed
|
|
373
|
+
/******/ exports: {}
|
|
374
|
+
/******/ };
|
|
375
|
+
/******/
|
|
376
|
+
/******/ // Execute the module function
|
|
377
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
378
|
+
/******/
|
|
379
|
+
/******/ // Return the exports of the module
|
|
380
|
+
/******/ return module.exports;
|
|
381
|
+
/******/ }
|
|
382
|
+
/******/
|
|
383
|
+
/************************************************************************/
|
|
384
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
385
|
+
/******/ (() => {
|
|
386
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
387
|
+
/******/ __webpack_require__.n = (module) => {
|
|
388
|
+
/******/ var getter = module && module.__esModule ?
|
|
389
|
+
/******/ () => (module['default']) :
|
|
390
|
+
/******/ () => (module);
|
|
391
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
392
|
+
/******/ return getter;
|
|
393
|
+
/******/ };
|
|
394
|
+
/******/ })();
|
|
395
|
+
/******/
|
|
396
|
+
/******/ /* webpack/runtime/define property getters */
|
|
397
|
+
/******/ (() => {
|
|
398
|
+
/******/ // define getter functions for harmony exports
|
|
399
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
400
|
+
/******/ for(var key in definition) {
|
|
401
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
402
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
403
|
+
/******/ }
|
|
404
|
+
/******/ }
|
|
405
|
+
/******/ };
|
|
406
|
+
/******/ })();
|
|
407
|
+
/******/
|
|
408
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
409
|
+
/******/ (() => {
|
|
410
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
411
|
+
/******/ })();
|
|
412
|
+
/******/
|
|
413
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
414
|
+
/******/ (() => {
|
|
415
|
+
/******/ // define __esModule on exports
|
|
416
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
417
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
418
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
419
|
+
/******/ }
|
|
420
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
421
|
+
/******/ };
|
|
422
|
+
/******/ })();
|
|
423
|
+
/******/
|
|
424
|
+
/************************************************************************/
|
|
425
|
+
var __webpack_exports__ = {};
|
|
426
|
+
/*!************************!*\
|
|
427
|
+
!*** ./src/Swiper.tsx ***!
|
|
428
|
+
\************************/
|
|
429
|
+
__webpack_require__.r(__webpack_exports__);
|
|
430
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
431
|
+
/* harmony export */ SWIPE_ON_EVENT_SPEED: () => (/* binding */ SWIPE_ON_EVENT_SPEED),
|
|
432
|
+
/* harmony export */ SWIPE_TRANSITION_TIMEOUT: () => (/* binding */ SWIPE_TRANSITION_TIMEOUT),
|
|
433
|
+
/* harmony export */ "default": () => (/* binding */ ReactSwiper)
|
|
434
|
+
/* harmony export */ });
|
|
435
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
436
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
437
|
+
/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! clsx */ "./node_modules/clsx/dist/clsx.mjs");
|
|
438
|
+
/* harmony import */ var _Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Swiper.module.css */ "./src/Swiper.module.css");
|
|
439
|
+
var __assign = (undefined && undefined.__assign) || function () {
|
|
440
|
+
__assign = Object.assign || function(t) {
|
|
441
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
442
|
+
s = arguments[i];
|
|
443
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
444
|
+
t[p] = s[p];
|
|
445
|
+
}
|
|
446
|
+
return t;
|
|
447
|
+
};
|
|
448
|
+
return __assign.apply(this, arguments);
|
|
449
|
+
};
|
|
450
|
+
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
451
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
452
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
453
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
454
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
455
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
456
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
457
|
+
});
|
|
458
|
+
};
|
|
459
|
+
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
|
|
460
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
461
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
462
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
463
|
+
function step(op) {
|
|
464
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
465
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
466
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
467
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
468
|
+
switch (op[0]) {
|
|
469
|
+
case 0: case 1: t = op; break;
|
|
470
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
471
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
472
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
473
|
+
default:
|
|
474
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
475
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
476
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
477
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
478
|
+
if (t[2]) _.ops.pop();
|
|
479
|
+
_.trys.pop(); continue;
|
|
480
|
+
}
|
|
481
|
+
op = body.call(thisArg, _);
|
|
482
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
483
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
484
|
+
}
|
|
485
|
+
};
|
|
486
|
+
/******************************************************************************************
|
|
487
|
+
* Repository: https://github.com/kolserdav/react-swiper.git
|
|
488
|
+
* File name: Swiper.tsx
|
|
489
|
+
* Author: Sergey Kolmiller
|
|
490
|
+
* Email: <kolserdav@conhos.ru>
|
|
491
|
+
* License: MIT
|
|
492
|
+
* License text: The code is distributed as is. There are no guarantees regarding the functionality of the code or parts of it.
|
|
493
|
+
* Copyright: kolserdav, All rights reserved (c)
|
|
494
|
+
* Create Date: Fri Sep 06 2024 18:44:44 GMT+0700 (Krasnoyarsk Standard Time)
|
|
495
|
+
******************************************************************************************/
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Time to miliseconds of change animation by card left value
|
|
501
|
+
*/
|
|
502
|
+
var SWIPE_TRANSITION_TIMEOUT = 400;
|
|
503
|
+
/**
|
|
504
|
+
* Minimum swipe speed regardless of distance
|
|
505
|
+
*/
|
|
506
|
+
var SWIPE_ON_EVENT_SPEED = 0.7;
|
|
507
|
+
/**
|
|
508
|
+
* Create swipe list from values
|
|
509
|
+
*/
|
|
510
|
+
var getSwipes = function (prev, current, next, swipes) {
|
|
511
|
+
if (((prev === null || prev === void 0 ? void 0 : prev.id) === (current === null || current === void 0 ? void 0 : current.id) || (current === null || current === void 0 ? void 0 : current.id) === (next === null || next === void 0 ? void 0 : next.id) || (next === null || next === void 0 ? void 0 : next.id) === (prev === null || prev === void 0 ? void 0 : prev.id)) &&
|
|
512
|
+
swipes.length) {
|
|
513
|
+
return swipes;
|
|
514
|
+
}
|
|
515
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
516
|
+
var result = [1, 2, 3].map(function (id) {
|
|
517
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
518
|
+
var item = id === 1 ? __assign({}, prev) : id === 2 ? current : __assign({}, next);
|
|
519
|
+
item.type = id === 1 ? 'prev' : id === 2 ? 'current' : 'next';
|
|
520
|
+
return item;
|
|
521
|
+
});
|
|
522
|
+
return result;
|
|
523
|
+
};
|
|
524
|
+
/**
|
|
525
|
+
* Get default swipe with random id
|
|
526
|
+
*/
|
|
527
|
+
var getDefaultSwipe = function () { return ({
|
|
528
|
+
id: Math.ceil(Math.random() * 1000),
|
|
529
|
+
children: react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null),
|
|
530
|
+
}); };
|
|
531
|
+
var refs = {};
|
|
532
|
+
var startClientX;
|
|
533
|
+
var startClientY;
|
|
534
|
+
var lastLeft;
|
|
535
|
+
var animated = false;
|
|
536
|
+
var _defaultCurrent;
|
|
537
|
+
var oldSwipes = [];
|
|
538
|
+
var startTime = new Date().getTime();
|
|
539
|
+
/**
|
|
540
|
+
* Swiper component
|
|
541
|
+
*/
|
|
542
|
+
function ReactSwiper(props) {
|
|
543
|
+
var _this = this;
|
|
544
|
+
var defaultCurrent = props.defaultCurrent, getNext = props.getNext, getPrev = props.getPrev, onSwipe = props.onSwipe, className = props.className, invitationAnimation = props.invitationAnimation, durationAnimation = props.durationAnimation, blockSwipe = props.blockSwipe, dots = props.dots;
|
|
545
|
+
var _a = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(), current = _a[0], setCurrent = _a[1];
|
|
546
|
+
var _b = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(), prev = _b[0], setPrev = _b[1];
|
|
547
|
+
var _c = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(), next = _c[0], setNext = _c[1];
|
|
548
|
+
var _d = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(), prePrev = _d[0], setPrePrev = _d[1];
|
|
549
|
+
var _e = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(), postNext = _e[0], setPostNext = _e[1];
|
|
550
|
+
var _f = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0), windowWidth = _f[0], setWindowWidth = _f[1];
|
|
551
|
+
var _g = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0), height = _g[0], setHeight = _g[1];
|
|
552
|
+
var _h = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0), width = _h[0], setWidth = _h[1];
|
|
553
|
+
var _j = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0), _left = _j[0], _setLeft = _j[1];
|
|
554
|
+
var _k = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0), left = _k[0], setLeft = _k[1];
|
|
555
|
+
var _l = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(), isMobile = _l[0], setIsMobile = _l[1];
|
|
556
|
+
var _m = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false), load = _m[0], setLoad = _m[1];
|
|
557
|
+
var containerRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
558
|
+
if (typeof _defaultCurrent === 'undefined') {
|
|
559
|
+
_defaultCurrent = defaultCurrent;
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* Create memoized swipes
|
|
563
|
+
*/
|
|
564
|
+
var swipes = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
|
565
|
+
return getSwipes(prev || getDefaultSwipe(), current || defaultCurrent, next || getDefaultSwipe(), oldSwipes);
|
|
566
|
+
}, [next, prev, current]);
|
|
567
|
+
oldSwipes = swipes;
|
|
568
|
+
/**
|
|
569
|
+
* Get new or exists ref by id
|
|
570
|
+
*/
|
|
571
|
+
var getRef = function (id) {
|
|
572
|
+
refs[id] = refs[id] ? refs[id] : (0,react__WEBPACK_IMPORTED_MODULE_0__.createRef)();
|
|
573
|
+
return refs[id];
|
|
574
|
+
};
|
|
575
|
+
/**
|
|
576
|
+
* Set to cards classes for in animation
|
|
577
|
+
*/
|
|
578
|
+
var setGoClassHandler = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
|
579
|
+
return function (_next, _prev) {
|
|
580
|
+
var _a, _b, _c;
|
|
581
|
+
(_a = getRef((_next === null || _next === void 0 ? void 0 : _next.id) || (next === null || next === void 0 ? void 0 : next.id) || 0).current) === null || _a === void 0 ? void 0 : _a.classList.add(_Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].go);
|
|
582
|
+
(_b = getRef((_prev === null || _prev === void 0 ? void 0 : _prev.id) || (prev === null || prev === void 0 ? void 0 : prev.id) || 0).current) === null || _b === void 0 ? void 0 : _b.classList.add(_Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].go);
|
|
583
|
+
(_c = getRef((current === null || current === void 0 ? void 0 : current.id) || 0).current) === null || _c === void 0 ? void 0 : _c.classList.add(_Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].go);
|
|
584
|
+
setTimeout(function () {
|
|
585
|
+
var _a, _b, _c;
|
|
586
|
+
(_a = getRef((_next === null || _next === void 0 ? void 0 : _next.id) || (next === null || next === void 0 ? void 0 : next.id) || 0).current) === null || _a === void 0 ? void 0 : _a.classList.remove(_Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].go);
|
|
587
|
+
(_b = getRef((_prev === null || _prev === void 0 ? void 0 : _prev.id) || (prev === null || prev === void 0 ? void 0 : prev.id) || 0).current) === null || _b === void 0 ? void 0 : _b.classList.remove(_Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].go);
|
|
588
|
+
(_c = getRef((current === null || current === void 0 ? void 0 : current.id) || 0).current) === null || _c === void 0 ? void 0 : _c.classList.remove(_Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].go);
|
|
589
|
+
}, SWIPE_TRANSITION_TIMEOUT);
|
|
590
|
+
};
|
|
591
|
+
}, [current === null || current === void 0 ? void 0 : current.id, next === null || next === void 0 ? void 0 : next.id, prev === null || prev === void 0 ? void 0 : prev.id]);
|
|
592
|
+
/**
|
|
593
|
+
* Set to cards classes for out animation
|
|
594
|
+
*/
|
|
595
|
+
var setBackClassHandler = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () { return function () {
|
|
596
|
+
var _a, _b, _c;
|
|
597
|
+
(_a = getRef((next === null || next === void 0 ? void 0 : next.id) || 0).current) === null || _a === void 0 ? void 0 : _a.classList.add(_Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].back);
|
|
598
|
+
(_b = getRef((prev === null || prev === void 0 ? void 0 : prev.id) || 0).current) === null || _b === void 0 ? void 0 : _b.classList.add(_Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].back);
|
|
599
|
+
(_c = getRef((current === null || current === void 0 ? void 0 : current.id) || 0).current) === null || _c === void 0 ? void 0 : _c.classList.add(_Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].back);
|
|
600
|
+
setTimeout(function () {
|
|
601
|
+
var _a, _b, _c;
|
|
602
|
+
(_a = getRef((next === null || next === void 0 ? void 0 : next.id) || 0).current) === null || _a === void 0 ? void 0 : _a.classList.remove(_Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].back);
|
|
603
|
+
(_b = getRef((prev === null || prev === void 0 ? void 0 : prev.id) || 0).current) === null || _b === void 0 ? void 0 : _b.classList.remove(_Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].back);
|
|
604
|
+
(_c = getRef((current === null || current === void 0 ? void 0 : current.id) || 0).current) === null || _c === void 0 ? void 0 : _c.classList.remove(_Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].back);
|
|
605
|
+
}, SWIPE_TRANSITION_TIMEOUT);
|
|
606
|
+
}; }, [current === null || current === void 0 ? void 0 : current.id, next === null || next === void 0 ? void 0 : next.id, prev === null || prev === void 0 ? void 0 : prev.id]);
|
|
607
|
+
/**
|
|
608
|
+
* Wait helper
|
|
609
|
+
*/
|
|
610
|
+
var wait = function (miliseconds) { return __awaiter(_this, void 0, void 0, function () {
|
|
611
|
+
return __generator(this, function (_a) {
|
|
612
|
+
switch (_a.label) {
|
|
613
|
+
case 0: return [4 /*yield*/, new Promise(function (resolve) {
|
|
614
|
+
setTimeout(function () {
|
|
615
|
+
resolve(0);
|
|
616
|
+
}, miliseconds);
|
|
617
|
+
})];
|
|
618
|
+
case 1:
|
|
619
|
+
_a.sent();
|
|
620
|
+
return [2 /*return*/];
|
|
621
|
+
}
|
|
622
|
+
});
|
|
623
|
+
}); };
|
|
624
|
+
/**
|
|
625
|
+
* Set pre previos or post next values
|
|
626
|
+
*/
|
|
627
|
+
var setPreValues = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
|
628
|
+
return function (_p, _n) {
|
|
629
|
+
if (_p) {
|
|
630
|
+
getPrev((_p === null || _p === void 0 ? void 0 : _p.id) || 0).then(function (d) {
|
|
631
|
+
setPrePrev(d);
|
|
632
|
+
});
|
|
633
|
+
}
|
|
634
|
+
if (_n) {
|
|
635
|
+
getNext((_n === null || _n === void 0 ? void 0 : _n.id) || 0).then(function (d) {
|
|
636
|
+
setPostNext(d);
|
|
637
|
+
});
|
|
638
|
+
}
|
|
639
|
+
};
|
|
640
|
+
}, [getNext, getPrev]);
|
|
641
|
+
var goSwipeBack = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () { return function () {
|
|
642
|
+
setBackClassHandler();
|
|
643
|
+
setLeft(0);
|
|
644
|
+
setLoad(false);
|
|
645
|
+
}; }, [setBackClassHandler, setLeft, setLoad]);
|
|
646
|
+
var startSwipe = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () { return function (_next, _prev, _left) {
|
|
647
|
+
setGoClassHandler(_next, _prev);
|
|
648
|
+
setLeft(_left);
|
|
649
|
+
}; }, [setGoClassHandler]);
|
|
650
|
+
var endSwipe = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
|
651
|
+
return function (_a) {
|
|
652
|
+
var _prev = _a._prev, _current = _a._current, _next = _a._next;
|
|
653
|
+
setLeft(0);
|
|
654
|
+
setPrev(_prev);
|
|
655
|
+
setCurrent(_current);
|
|
656
|
+
setNext(_next);
|
|
657
|
+
};
|
|
658
|
+
}, []);
|
|
659
|
+
var goSwipe = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
|
660
|
+
return function (_a, _next_1, _prev_1) { return __awaiter(_this, [_a, _next_1, _prev_1], void 0, function (_b, _next, _prev) {
|
|
661
|
+
var newNext = _b.newNext, newPrev = _b.newPrev, coeff = _b.coeff;
|
|
662
|
+
return __generator(this, function (_c) {
|
|
663
|
+
switch (_c.label) {
|
|
664
|
+
case 0:
|
|
665
|
+
if ((_next === null || _next === void 0 ? void 0 : _next.id) === null || (_prev === null || _prev === void 0 ? void 0 : _prev.id) === null) {
|
|
666
|
+
goSwipeBack();
|
|
667
|
+
return [2 /*return*/, 1];
|
|
668
|
+
}
|
|
669
|
+
if (onSwipe !== undefined) {
|
|
670
|
+
onSwipe((_next === null || _next === void 0 ? void 0 : _next.id) || (_prev === null || _prev === void 0 ? void 0 : _prev.id));
|
|
671
|
+
}
|
|
672
|
+
startSwipe(_next, _prev, windowWidth * coeff);
|
|
673
|
+
return [4 /*yield*/, wait(SWIPE_TRANSITION_TIMEOUT)];
|
|
674
|
+
case 1:
|
|
675
|
+
_c.sent();
|
|
676
|
+
endSwipe({ _prev: newPrev, _current: _next || _prev, _next: newNext });
|
|
677
|
+
return [2 /*return*/, 0];
|
|
678
|
+
}
|
|
679
|
+
});
|
|
680
|
+
}); };
|
|
681
|
+
}, [endSwipe, goSwipeBack, onSwipe, startSwipe, windowWidth]);
|
|
682
|
+
/**
|
|
683
|
+
* Run swipe animation
|
|
684
|
+
*/
|
|
685
|
+
var swipe = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
|
686
|
+
return function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
|
|
687
|
+
var _lastLeft = _b._lastLeft, _next = _b._next, _prev = _b._prev, speed = _b.speed;
|
|
688
|
+
return __generator(this, function (_c) {
|
|
689
|
+
switch (_c.label) {
|
|
690
|
+
case 0:
|
|
691
|
+
setLoad(true);
|
|
692
|
+
if (!(Math.abs(_lastLeft) > width / 3 ||
|
|
693
|
+
(speed !== undefined && speed > SWIPE_ON_EVENT_SPEED))) return [3 /*break*/, 5];
|
|
694
|
+
if (!(_lastLeft < 0)) return [3 /*break*/, 2];
|
|
695
|
+
return [4 /*yield*/, goSwipe({ newPrev: current, newNext: postNext, coeff: -1 }, _next, undefined)];
|
|
696
|
+
case 1:
|
|
697
|
+
_c.sent();
|
|
698
|
+
return [3 /*break*/, 4];
|
|
699
|
+
case 2: return [4 /*yield*/, goSwipe({ newPrev: prePrev, newNext: current, coeff: 1 }, undefined, _prev)];
|
|
700
|
+
case 3:
|
|
701
|
+
_c.sent();
|
|
702
|
+
_c.label = 4;
|
|
703
|
+
case 4: return [3 /*break*/, 6];
|
|
704
|
+
case 5:
|
|
705
|
+
goSwipeBack();
|
|
706
|
+
_c.label = 6;
|
|
707
|
+
case 6:
|
|
708
|
+
setLoad(false);
|
|
709
|
+
return [2 /*return*/, 0];
|
|
710
|
+
}
|
|
711
|
+
});
|
|
712
|
+
}); };
|
|
713
|
+
}, [current, goSwipeBack, width, prePrev, postNext, goSwipe]);
|
|
714
|
+
/**
|
|
715
|
+
* Touch event handler
|
|
716
|
+
*/
|
|
717
|
+
var onTouchHandler = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
|
718
|
+
return function (name, e) { return __awaiter(_this, void 0, void 0, function () {
|
|
719
|
+
var touches, clientX, clientY, absX, absY, _a;
|
|
720
|
+
var _b, _c;
|
|
721
|
+
return __generator(this, function (_d) {
|
|
722
|
+
switch (_d.label) {
|
|
723
|
+
case 0:
|
|
724
|
+
touches = e.touches;
|
|
725
|
+
clientX = (_b = touches[0]) === null || _b === void 0 ? void 0 : _b.clientX;
|
|
726
|
+
clientY = (_c = touches[0]) === null || _c === void 0 ? void 0 : _c.clientY;
|
|
727
|
+
startClientX = startClientX || 0;
|
|
728
|
+
startClientY = startClientY || 0;
|
|
729
|
+
absX = 0;
|
|
730
|
+
absY = 0;
|
|
731
|
+
_a = name;
|
|
732
|
+
switch (_a) {
|
|
733
|
+
case 'onTouchStart': return [3 /*break*/, 1];
|
|
734
|
+
case 'onTouchMove': return [3 /*break*/, 2];
|
|
735
|
+
case 'onTouchEnd': return [3 /*break*/, 3];
|
|
736
|
+
}
|
|
737
|
+
return [3 /*break*/, 6];
|
|
738
|
+
case 1:
|
|
739
|
+
startClientX = clientX;
|
|
740
|
+
startClientY = clientY;
|
|
741
|
+
lastLeft = _left;
|
|
742
|
+
startTime = new Date().getTime();
|
|
743
|
+
return [3 /*break*/, 6];
|
|
744
|
+
case 2:
|
|
745
|
+
if (!blockSwipe) {
|
|
746
|
+
absY = Math.abs(startClientY - clientY);
|
|
747
|
+
absX = Math.abs(startClientX - clientX);
|
|
748
|
+
if (absX > absY) {
|
|
749
|
+
lastLeft = _left - (startClientX - clientX);
|
|
750
|
+
setLeft(lastLeft);
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
return [3 /*break*/, 6];
|
|
754
|
+
case 3:
|
|
755
|
+
if (!!blockSwipe) return [3 /*break*/, 5];
|
|
756
|
+
return [4 /*yield*/, swipe({
|
|
757
|
+
_lastLeft: lastLeft,
|
|
758
|
+
speed: Math.abs(lastLeft / (new Date().getTime() - startTime)),
|
|
759
|
+
_next: next,
|
|
760
|
+
_prev: prev,
|
|
761
|
+
})];
|
|
762
|
+
case 4:
|
|
763
|
+
_d.sent();
|
|
764
|
+
_d.label = 5;
|
|
765
|
+
case 5: return [3 /*break*/, 6];
|
|
766
|
+
case 6: return [2 /*return*/];
|
|
767
|
+
}
|
|
768
|
+
});
|
|
769
|
+
}); };
|
|
770
|
+
}, [_left, blockSwipe, swipe, next, prev]);
|
|
771
|
+
/**
|
|
772
|
+
* Touch event wrapper
|
|
773
|
+
*/
|
|
774
|
+
var onTouchWrapper = function (name) {
|
|
775
|
+
return function (e) {
|
|
776
|
+
onTouchHandler(name, e);
|
|
777
|
+
};
|
|
778
|
+
};
|
|
779
|
+
/**
|
|
780
|
+
* On next or previous button click handler
|
|
781
|
+
*/
|
|
782
|
+
var clickHandler = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
|
783
|
+
return function (origin) {
|
|
784
|
+
var isNext = origin === 'next';
|
|
785
|
+
return function () { return __awaiter(_this, void 0, void 0, function () {
|
|
786
|
+
var coeff, leftVal;
|
|
787
|
+
return __generator(this, function (_a) {
|
|
788
|
+
switch (_a.label) {
|
|
789
|
+
case 0:
|
|
790
|
+
coeff = isNext ? -1 : 1;
|
|
791
|
+
leftVal = width * coeff;
|
|
792
|
+
if (isNext) {
|
|
793
|
+
setGoClassHandler();
|
|
794
|
+
}
|
|
795
|
+
else {
|
|
796
|
+
setBackClassHandler();
|
|
797
|
+
}
|
|
798
|
+
return [4 /*yield*/, wait(SWIPE_TRANSITION_TIMEOUT)];
|
|
799
|
+
case 1:
|
|
800
|
+
_a.sent();
|
|
801
|
+
return [4 /*yield*/, swipe({
|
|
802
|
+
_lastLeft: leftVal,
|
|
803
|
+
_next: next,
|
|
804
|
+
_prev: prev,
|
|
805
|
+
})];
|
|
806
|
+
case 2:
|
|
807
|
+
_a.sent();
|
|
808
|
+
return [2 /*return*/, 0];
|
|
809
|
+
}
|
|
810
|
+
});
|
|
811
|
+
}); };
|
|
812
|
+
};
|
|
813
|
+
}, [setBackClassHandler, setGoClassHandler, swipe, width, next, prev]);
|
|
814
|
+
/**
|
|
815
|
+
* Wrapper for next button click handler
|
|
816
|
+
*/
|
|
817
|
+
var clickNextHandler = clickHandler('next');
|
|
818
|
+
/**
|
|
819
|
+
* Wrapper for previous button click handler
|
|
820
|
+
*/
|
|
821
|
+
var clickPrevHandler = clickHandler('prev');
|
|
822
|
+
/**
|
|
823
|
+
* optional animation handler
|
|
824
|
+
*/
|
|
825
|
+
var infitationAnimationHandler = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
|
826
|
+
return function (shift) { return __awaiter(_this, void 0, void 0, function () {
|
|
827
|
+
return __generator(this, function (_a) {
|
|
828
|
+
switch (_a.label) {
|
|
829
|
+
case 0:
|
|
830
|
+
if (shift < 0) {
|
|
831
|
+
setGoClassHandler();
|
|
832
|
+
}
|
|
833
|
+
else {
|
|
834
|
+
setBackClassHandler();
|
|
835
|
+
}
|
|
836
|
+
setLeft(shift);
|
|
837
|
+
return [4 /*yield*/, wait(SWIPE_TRANSITION_TIMEOUT)];
|
|
838
|
+
case 1:
|
|
839
|
+
_a.sent();
|
|
840
|
+
if (shift < 0) {
|
|
841
|
+
setBackClassHandler();
|
|
842
|
+
}
|
|
843
|
+
else {
|
|
844
|
+
setGoClassHandler();
|
|
845
|
+
}
|
|
846
|
+
setLeft(0);
|
|
847
|
+
return [4 /*yield*/, wait(SWIPE_TRANSITION_TIMEOUT)];
|
|
848
|
+
case 2:
|
|
849
|
+
_a.sent();
|
|
850
|
+
return [2 /*return*/];
|
|
851
|
+
}
|
|
852
|
+
});
|
|
853
|
+
}); };
|
|
854
|
+
}, [setBackClassHandler, setGoClassHandler]);
|
|
855
|
+
/**
|
|
856
|
+
* Initial start cards
|
|
857
|
+
*/
|
|
858
|
+
var setStartCards = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () { return function () { return __awaiter(_this, void 0, void 0, function () {
|
|
859
|
+
var _n, _p;
|
|
860
|
+
return __generator(this, function (_a) {
|
|
861
|
+
switch (_a.label) {
|
|
862
|
+
case 0: return [4 /*yield*/, getNext(defaultCurrent.id || 0)];
|
|
863
|
+
case 1:
|
|
864
|
+
_n = _a.sent();
|
|
865
|
+
return [4 /*yield*/, getPrev(defaultCurrent.id || 0)];
|
|
866
|
+
case 2:
|
|
867
|
+
_p = _a.sent();
|
|
868
|
+
setCurrent(defaultCurrent);
|
|
869
|
+
setPrev(_p);
|
|
870
|
+
setNext(_n);
|
|
871
|
+
_defaultCurrent = defaultCurrent;
|
|
872
|
+
setLoad(false);
|
|
873
|
+
return [2 /*return*/];
|
|
874
|
+
}
|
|
875
|
+
});
|
|
876
|
+
}); }; }, [defaultCurrent, getNext, getPrev]);
|
|
877
|
+
/**
|
|
878
|
+
* Invitation animation
|
|
879
|
+
*/
|
|
880
|
+
var startInvitationAnimation = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
|
881
|
+
return function (prev, next) { return __awaiter(_this, void 0, void 0, function () {
|
|
882
|
+
return __generator(this, function (_a) {
|
|
883
|
+
switch (_a.label) {
|
|
884
|
+
case 0:
|
|
885
|
+
if (!prev.id) return [3 /*break*/, 2];
|
|
886
|
+
return [4 /*yield*/, infitationAnimationHandler(windowWidth / 5.5)];
|
|
887
|
+
case 1:
|
|
888
|
+
_a.sent();
|
|
889
|
+
_a.label = 2;
|
|
890
|
+
case 2:
|
|
891
|
+
if (!next.id) return [3 /*break*/, 4];
|
|
892
|
+
return [4 /*yield*/, infitationAnimationHandler((windowWidth / 5.5) * -1)];
|
|
893
|
+
case 3:
|
|
894
|
+
_a.sent();
|
|
895
|
+
_a.label = 4;
|
|
896
|
+
case 4: return [2 /*return*/];
|
|
897
|
+
}
|
|
898
|
+
});
|
|
899
|
+
}); };
|
|
900
|
+
}, [infitationAnimationHandler, windowWidth]);
|
|
901
|
+
/**
|
|
902
|
+
* Handler on click by dot
|
|
903
|
+
*/
|
|
904
|
+
var clickDotHandler = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () { return function (e) { return __awaiter(_this, void 0, void 0, function () {
|
|
905
|
+
var target, tabindex, active, currentId, newCurrent, newPrev, newNext;
|
|
906
|
+
return __generator(this, function (_a) {
|
|
907
|
+
switch (_a.label) {
|
|
908
|
+
case 0:
|
|
909
|
+
target = e.target;
|
|
910
|
+
tabindex = target === null || target === void 0 ? void 0 : target.getAttribute('tabindex');
|
|
911
|
+
active = parseInt(tabindex, 10);
|
|
912
|
+
currentId = (current === null || current === void 0 ? void 0 : current.id) || 0;
|
|
913
|
+
if (!(currentId === (next === null || next === void 0 ? void 0 : next.id))) return [3 /*break*/, 1];
|
|
914
|
+
newCurrent = next;
|
|
915
|
+
newNext = postNext;
|
|
916
|
+
newPrev = current;
|
|
917
|
+
return [3 /*break*/, 10];
|
|
918
|
+
case 1:
|
|
919
|
+
if (!(currentId === (prev === null || prev === void 0 ? void 0 : prev.id))) return [3 /*break*/, 2];
|
|
920
|
+
newCurrent = prev;
|
|
921
|
+
newNext = current;
|
|
922
|
+
newPrev = prePrev;
|
|
923
|
+
return [3 /*break*/, 10];
|
|
924
|
+
case 2:
|
|
925
|
+
if (!(currentId === (prePrev === null || prePrev === void 0 ? void 0 : prePrev.id))) return [3 /*break*/, 4];
|
|
926
|
+
newCurrent = prePrev;
|
|
927
|
+
newNext = prev;
|
|
928
|
+
return [4 /*yield*/, getPrev(prePrev === null || prePrev === void 0 ? void 0 : prePrev.id)];
|
|
929
|
+
case 3:
|
|
930
|
+
newPrev = _a.sent();
|
|
931
|
+
return [3 /*break*/, 10];
|
|
932
|
+
case 4:
|
|
933
|
+
if (!(currentId === (postNext === null || postNext === void 0 ? void 0 : postNext.id))) return [3 /*break*/, 6];
|
|
934
|
+
newCurrent = postNext;
|
|
935
|
+
newPrev = next;
|
|
936
|
+
return [4 /*yield*/, getPrev(postNext === null || postNext === void 0 ? void 0 : postNext.id)];
|
|
937
|
+
case 5:
|
|
938
|
+
newNext = _a.sent();
|
|
939
|
+
return [3 /*break*/, 10];
|
|
940
|
+
case 6: return [4 /*yield*/, getNext(active - 1)];
|
|
941
|
+
case 7:
|
|
942
|
+
newCurrent = _a.sent();
|
|
943
|
+
return [4 /*yield*/, getNext((newCurrent === null || newCurrent === void 0 ? void 0 : newCurrent.id) || 0)];
|
|
944
|
+
case 8:
|
|
945
|
+
newNext = _a.sent();
|
|
946
|
+
return [4 /*yield*/, getPrev((newCurrent === null || newCurrent === void 0 ? void 0 : newCurrent.id) || 0)];
|
|
947
|
+
case 9:
|
|
948
|
+
newPrev = _a.sent();
|
|
949
|
+
_a.label = 10;
|
|
950
|
+
case 10:
|
|
951
|
+
if (!(currentId < active)) return [3 /*break*/, 12];
|
|
952
|
+
return [4 /*yield*/, goSwipe({ newPrev: newPrev, newNext: newNext, coeff: -1 }, newCurrent, undefined)];
|
|
953
|
+
case 11:
|
|
954
|
+
_a.sent();
|
|
955
|
+
return [3 /*break*/, 14];
|
|
956
|
+
case 12: return [4 /*yield*/, goSwipe({ newPrev: newPrev, newNext: newNext, coeff: 1 }, undefined, newCurrent)];
|
|
957
|
+
case 13:
|
|
958
|
+
_a.sent();
|
|
959
|
+
_a.label = 14;
|
|
960
|
+
case 14: return [2 /*return*/];
|
|
961
|
+
}
|
|
962
|
+
});
|
|
963
|
+
}); }; }, [getNext, getPrev, goSwipe, current, next, postNext, prePrev, prev]);
|
|
964
|
+
/**
|
|
965
|
+
* Set button listeners
|
|
966
|
+
*/
|
|
967
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
968
|
+
var _a, _b;
|
|
969
|
+
var buttonNext = (_a = current === null || current === void 0 ? void 0 : current.nextRef) === null || _a === void 0 ? void 0 : _a.current;
|
|
970
|
+
var buttonClose = (_b = current === null || current === void 0 ? void 0 : current.closeRef) === null || _b === void 0 ? void 0 : _b.current;
|
|
971
|
+
buttonNext === null || buttonNext === void 0 ? void 0 : buttonNext.addEventListener('click', clickNextHandler);
|
|
972
|
+
buttonClose === null || buttonClose === void 0 ? void 0 : buttonClose.addEventListener('click', clickNextHandler);
|
|
973
|
+
return function () {
|
|
974
|
+
buttonNext === null || buttonNext === void 0 ? void 0 : buttonNext.removeEventListener('click', clickNextHandler);
|
|
975
|
+
buttonClose === null || buttonClose === void 0 ? void 0 : buttonClose.removeEventListener('click', clickNextHandler);
|
|
976
|
+
};
|
|
977
|
+
}, [clickNextHandler, current]);
|
|
978
|
+
/**
|
|
979
|
+
* Set width and height
|
|
980
|
+
*/
|
|
981
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
982
|
+
var _a, _b, _c, _d, _e, _f;
|
|
983
|
+
var _width = (_c = (_b = (_a = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect()) === null || _c === void 0 ? void 0 : _c.width;
|
|
984
|
+
var _height = (_f = (_e = (_d = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) === null || _d === void 0 ? void 0 : _d.parentElement) === null || _e === void 0 ? void 0 : _e.getBoundingClientRect()) === null || _f === void 0 ? void 0 : _f.height;
|
|
985
|
+
if (_width && !width && _height && !height) {
|
|
986
|
+
setWidth(_width);
|
|
987
|
+
setHeight(_height);
|
|
988
|
+
}
|
|
989
|
+
}, [containerRef, width, height]);
|
|
990
|
+
/**
|
|
991
|
+
* Save container left
|
|
992
|
+
*/
|
|
993
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
994
|
+
var _a, _b, _c;
|
|
995
|
+
var __left = (_c = (_b = (_a = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect()) === null || _c === void 0 ? void 0 : _c.left;
|
|
996
|
+
if (__left && !left) {
|
|
997
|
+
_setLeft(__left);
|
|
998
|
+
}
|
|
999
|
+
}, [containerRef, left]);
|
|
1000
|
+
/**
|
|
1001
|
+
* Auto slide
|
|
1002
|
+
*/
|
|
1003
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
1004
|
+
var clearAnimate;
|
|
1005
|
+
if (durationAnimation) {
|
|
1006
|
+
clearAnimate = setInterval(function () {
|
|
1007
|
+
clickNextHandler();
|
|
1008
|
+
}, durationAnimation);
|
|
1009
|
+
}
|
|
1010
|
+
return function () {
|
|
1011
|
+
if (clearAnimate) {
|
|
1012
|
+
clearInterval(clearAnimate);
|
|
1013
|
+
}
|
|
1014
|
+
};
|
|
1015
|
+
}, [durationAnimation, clickNextHandler]);
|
|
1016
|
+
/**
|
|
1017
|
+
* Set start cards
|
|
1018
|
+
*/
|
|
1019
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
1020
|
+
if (!current || !prev || !next || _defaultCurrent !== defaultCurrent) {
|
|
1021
|
+
setStartCards();
|
|
1022
|
+
}
|
|
1023
|
+
}, [current, next, prev, defaultCurrent, setStartCards]);
|
|
1024
|
+
/**
|
|
1025
|
+
* Save window width
|
|
1026
|
+
*/
|
|
1027
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
1028
|
+
var _windowWidth = document.body.clientWidth;
|
|
1029
|
+
if (!windowWidth && _windowWidth) {
|
|
1030
|
+
setWindowWidth(_windowWidth);
|
|
1031
|
+
}
|
|
1032
|
+
}, [windowWidth]);
|
|
1033
|
+
/**
|
|
1034
|
+
* Run invitation animation
|
|
1035
|
+
*/
|
|
1036
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
1037
|
+
if (invitationAnimation && width && !animated) {
|
|
1038
|
+
if (prev && next) {
|
|
1039
|
+
animated = true;
|
|
1040
|
+
startInvitationAnimation(prev, next);
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
}, [invitationAnimation, next, prev, startInvitationAnimation, width]);
|
|
1044
|
+
/**
|
|
1045
|
+
* Listen resize
|
|
1046
|
+
*/
|
|
1047
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
1048
|
+
var resizeHandler = function () {
|
|
1049
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1050
|
+
var _width = (_c = (_b = (_a = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect()) === null || _c === void 0 ? void 0 : _c.width;
|
|
1051
|
+
var _height = (_f = (_e = (_d = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) === null || _d === void 0 ? void 0 : _d.parentElement) === null || _e === void 0 ? void 0 : _e.getBoundingClientRect()) === null || _f === void 0 ? void 0 : _f.height;
|
|
1052
|
+
var __left = (_j = (_h = (_g = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) === null || _g === void 0 ? void 0 : _g.parentElement) === null || _h === void 0 ? void 0 : _h.getBoundingClientRect()) === null || _j === void 0 ? void 0 : _j.left;
|
|
1053
|
+
var _windowWidth = document.body.clientWidth;
|
|
1054
|
+
if (_width && _height) {
|
|
1055
|
+
setWidth(_width);
|
|
1056
|
+
setHeight(_height);
|
|
1057
|
+
}
|
|
1058
|
+
if (__left) {
|
|
1059
|
+
setLeft(__left);
|
|
1060
|
+
}
|
|
1061
|
+
if (_windowWidth) {
|
|
1062
|
+
setWindowWidth(_windowWidth);
|
|
1063
|
+
}
|
|
1064
|
+
};
|
|
1065
|
+
window.addEventListener('resize', resizeHandler);
|
|
1066
|
+
return function () {
|
|
1067
|
+
window.removeEventListener('resize', resizeHandler);
|
|
1068
|
+
};
|
|
1069
|
+
}, []);
|
|
1070
|
+
/**
|
|
1071
|
+
* Set is mobile
|
|
1072
|
+
*/
|
|
1073
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
1074
|
+
if (typeof isMobile === 'undefined') {
|
|
1075
|
+
// @ts-ignore
|
|
1076
|
+
setIsMobile('ontouchstart' in window || typeof (navigator === null || navigator === void 0 ? void 0 : navigator.msMaxTouchPoints) !== 'undefined');
|
|
1077
|
+
}
|
|
1078
|
+
}, [isMobile]);
|
|
1079
|
+
/**
|
|
1080
|
+
* Set pre values
|
|
1081
|
+
*/
|
|
1082
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
1083
|
+
setPreValues(prev, next);
|
|
1084
|
+
}, [prev, next, setPreValues]);
|
|
1085
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: _Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].container, ref: containerRef },
|
|
1086
|
+
swipes.map(function (item) {
|
|
1087
|
+
var _a;
|
|
1088
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, { key: item.id },
|
|
1089
|
+
item.id !== null && item.children !== null && width && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { onTouchMove: onTouchWrapper('onTouchMove'), onTouchStart: onTouchWrapper('onTouchStart'), onTouchEnd: onTouchWrapper('onTouchEnd'), id: (_a = item.id) === null || _a === void 0 ? void 0 : _a.toString(), style: item.type === 'current'
|
|
1090
|
+
? { width: width, height: height, left: left }
|
|
1091
|
+
: item.type === 'prev'
|
|
1092
|
+
? { width: width, height: height, left: left - window.innerWidth }
|
|
1093
|
+
: { width: width, height: height, left: left + window.innerWidth }, className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])(_Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].card, item.type === 'prev' ? _Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].prev : item.type === 'next' ? _Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].next : ''), ref: getRef(item.id) },
|
|
1094
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])(_Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].content, className) }, item.children))),
|
|
1095
|
+
item.id === null && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { style: item.type === 'current'
|
|
1096
|
+
? { width: width, height: height, left: left }
|
|
1097
|
+
: item.type === 'prev'
|
|
1098
|
+
? { width: width, height: height, left: left - windowWidth }
|
|
1099
|
+
: { width: width, height: height, left: left + windowWidth }, className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])(_Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].card, item.type === 'prev' ? _Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].prev : item.type === 'next' ? _Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].next : '') },
|
|
1100
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" },
|
|
1101
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
1102
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8z" }))))));
|
|
1103
|
+
}),
|
|
1104
|
+
typeof isMobile !== 'undefined' && !isMobile && (prev === null || prev === void 0 ? void 0 : prev.id) !== null && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])(_Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].button, _Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].button__prev) },
|
|
1105
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: _Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].icon__button, type: "button", disabled: load || isMobile, onClick: clickPrevHandler },
|
|
1106
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" },
|
|
1107
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
1108
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M10.02 6L8.61 7.41 13.19 12l-4.58 4.59L10.02 18l6-6-6-6z" }))))),
|
|
1109
|
+
typeof isMobile !== 'undefined' && !isMobile && (next === null || next === void 0 ? void 0 : next.id) !== null && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])(_Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].button, _Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].button__next) },
|
|
1110
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: _Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].icon__button, type: "button", disabled: load || isMobile, onClick: clickNextHandler },
|
|
1111
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" },
|
|
1112
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
1113
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M10.02 6L8.61 7.41 13.19 12l-4.58 4.59L10.02 18l6-6-6-6z" }))))),
|
|
1114
|
+
dots && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: _Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].dots }, dots.list.map(function (item) { return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { role: "button", onClick: clickDotHandler, tabIndex: item, key: item, className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])(_Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].dot, (current === null || current === void 0 ? void 0 : current.id) === item ? _Swiper_module_css__WEBPACK_IMPORTED_MODULE_2__["default"].active : '') })); })))));
|
|
1115
|
+
}
|
|
1116
|
+
;
|
|
1117
|
+
|
|
1118
|
+
/******/ return __webpack_exports__;
|
|
1119
|
+
/******/ })()
|
|
1120
|
+
;
|
|
1121
|
+
});
|
|
1122
|
+
//# sourceMappingURL=Swiper.js.map
|