mirror of
https://github.com/swc-project/swc.git
synced 2024-12-19 11:42:13 +03:00
2 lines
131 KiB
JavaScript
2 lines
131 KiB
JavaScript
|
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[785],{840:function(a,b,c){var d;!function(e,f,g,h){"use strict";var i,j=["","webkit","Moz","MS","ms","o"],k=f.createElement("div"),l=Math.round,m=Math.abs,n=Date.now;function o(a,b,c){return setTimeout(v(a,c),b)}function p(a,b,c){return!!Array.isArray(a)&&(q(a,c[b],c),!0)}function q(a,b,c){var d;if(a)if(a.forEach)a.forEach(b,c);else if(h!==a.length)for(d=0;d<a.length;)b.call(c,a[d],d,a),d++;else for(d in a)a.hasOwnProperty(d)&&b.call(c,a[d],d,a)}function r(a,b,c){var d="DEPRECATED METHOD: "+b+"\n"+c+" AT \n";return function(){var b=new Error("get-stack-trace"),c=b&&b.stack?b.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",f=e.console&&(e.console.warn||e.console.log);return f&&f.call(e.console,d,c),a.apply(this,arguments)}}i="function"!=typeof Object.assign?function(a){if(a===h||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c<arguments.length;c++){var d=arguments[c];if(d!==h&&null!==d)for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])}return b}:Object.assign;var s=r(function(a,b,c){for(var d=Object.keys(b),e=0;e<d.length;)(!c||c&&h===a[d[e]])&&(a[d[e]]=b[d[e]]),e++;return a},"extend","Use `assign`."),t=r(function(a,b){return s(a,b,!0)},"merge","Use `assign`.");function u(a,b,c){var d,e=b.prototype;(d=a.prototype=Object.create(e)).constructor=a,d._super=e,c&&i(d,c)}function v(a,b){return function(){return a.apply(b,arguments)}}function w(a,b){return"function"==typeof a?a.apply(b?b[0]||h:h,b):a}function x(a,b){return a===h?b:a}function y(a,b,c){q(C(b),function(b){a.addEventListener(b,c,!1)})}function z(a,b,c){q(C(b),function(b){a.removeEventListener(b,c,!1)})}function A(a,b){for(;a;){if(a==b)return!0;a=a.parentNode}return!1}function B(a,b){return a.indexOf(b)> -1}function C(a){return a.trim().split(/\s+/g)}function D(a,b,c){if(a.indexOf&&!c)return a.indexOf(b);for(var d=0;d<a.length;){if(c&&a[d][c]==b|| !c&&a[d]===b)return d;d++}return -1}function E(a){return Array.prototype.slice.call(a,0)}function F(a,b,c){for(var d=[],e=[],f=0;f<a.length;){var g=b?a[f][b]:a[f];0>D(e,g)&&d.push(a[f]),e[f]=g,f++}return c&&(d=b?d.sort(function(a,c){return a[b]>c[b]}):d.sort()),d}function G(a,b){for(var c,d,e=b[0].toUpperCase()+b.slice(1),f=0;f<j.length;){if((d=(c=j[f])?c+e:b)in a)return d;f++}}var H=1;function I(a){var b=a.ownerDocument||a;return b.defaultView||b.parentWindow||e}var J="ontouchstart"in e,K=h!==G(e,"PointerEvent"),L=J&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),M="touch",N="mouse",O=["x","y"],P=["clientX","clientY"];function Q(a,b){var c=this;this.manager=a,this.callback=b,this.element=a.element,this.target=a.options.inputTarget,this.domHandler=function(b){w(a.options.enable,[a])&&c.handler(b)},this.init()}function R(a,b,c){var d=c.pointers.length,e=c.changedPointers.length,f=1&b&&d-e==0;c.isFirst=!!f,c.isFinal=!!(12&b&&d-e==0),f&&(a.session={}),c.eventType=b,S(a,c),a.emit("hammer.input",c),a.recognize(c),a.session.prevInput=c}function S(a,b){var c=a.session,d=b.pointers,e=d.length;c.firstInput||(c.firstInput=V(b)),e>1&&!c.firstMultiple?c.firstMultiple=V(b):1===e&&(c.firstMultiple=!1);var f=c.firstInput,g=c.firstMultiple,h=g?g.center:f.center,i=b.center=W(d);b.timeStamp=n(),b.deltaTime=b.timeStamp-f.timeStamp,b.angle=$(h,i),b.distance=Z(h,i),T(c,b),b.offsetDirection=Y(b.deltaX,b.deltaY);var j=X(b.deltaTime,b.deltaX,b.deltaY);b.overallVelocityX=j.x,b.overallVelocityY=j.y,b.overallVelocity=m(j.x)>m(j.y)?j.x:j.y,b.scale=g?aa(g.pointers,d):1,b.rotation=g?_(g.pointers,d):0,b.maxPointers=c.prevInput?b.pointers.length>c.prevInput.maxPointers?b.pointers.length:c.prevInput.maxPointers:b.pointers.length,U(c,b);var k=a.element;A(b.srcEvent.target,k)&&(k=b.srcEvent.target),b.target=k}function T(a,b){var c=b.center,d=a.offsetDelta||{},e=a.prevDelta||{},f=a.prevInput||{};(1===b.eventType||4===f.eventType)&&(e=a.prevDelta={x:f.deltaX||0,y:f.deltaY||0},d=a.offsetDelta={x:c.x,y:c.y}),b.deltaX=e.x+(c.x-d.x),b.deltaY=e.y+(c.y-
|