Comparing version 1.21.0-beta.0 to 1.21.0
import { SelectoOptions } from "./types"; | ||
export declare const injector: import("css-styled").StyledInjector; | ||
export declare const CLASS_NAME: string; | ||
export declare const PROPERTIES: readonly ["boundContainer", "selectableTargets", "selectByClick", "selectFromInside", "continueSelect", "continueSelectWithoutDeselect", "toggleContinueSelect", "toggleContinueSelectWithoutDeselect", "keyContainer", "hitRate", "scrollOptions", "checkInput", "preventDefault", "ratio", "getElementRect", "preventDragFromInside", "rootContainer", "dragCondition", "clickBySelectEnd"]; | ||
export declare const OPTIONS: readonly ["dragContainer", "cspNonce", "preventClickEventOnDrag", "preventClickEventOnDragStart", "preventRightClick", "boundContainer", "selectableTargets", "selectByClick", "selectFromInside", "continueSelect", "continueSelectWithoutDeselect", "toggleContinueSelect", "toggleContinueSelectWithoutDeselect", "keyContainer", "hitRate", "scrollOptions", "checkInput", "preventDefault", "ratio", "getElementRect", "preventDragFromInside", "rootContainer", "dragCondition", "clickBySelectEnd"]; | ||
export declare const PROPERTIES: readonly ["boundContainer", "selectableTargets", "selectByClick", "selectFromInside", "continueSelect", "continueSelectWithoutDeselect", "toggleContinueSelect", "toggleContinueSelectWithoutDeselect", "keyContainer", "hitRate", "scrollOptions", "checkInput", "preventDefault", "ratio", "getElementRect", "preventDragFromInside", "rootContainer", "dragCondition", "clickBySelectEnd", "checkOverflow"]; | ||
export declare const OPTIONS: readonly ["dragContainer", "cspNonce", "preventClickEventOnDrag", "preventClickEventOnDragStart", "preventRightClick", "boundContainer", "selectableTargets", "selectByClick", "selectFromInside", "continueSelect", "continueSelectWithoutDeselect", "toggleContinueSelect", "toggleContinueSelectWithoutDeselect", "keyContainer", "hitRate", "scrollOptions", "checkInput", "preventDefault", "ratio", "getElementRect", "preventDragFromInside", "rootContainer", "dragCondition", "clickBySelectEnd", "checkOverflow"]; | ||
export declare const OPTION_TYPES: { | ||
@@ -7,0 +7,0 @@ [key in keyof SelectoOptions]: any; |
@@ -25,3 +25,3 @@ import EventEmitter from "@scena/event-emitter"; | ||
checkScroll(): void; | ||
findSelectableTargets(data?: any): void; | ||
findSelectableTargets(data?: any): Array<HTMLElement | SVGElement>; | ||
clickTarget(e: MouseEvent | TouchEvent, clickedTarget?: Element): this; | ||
@@ -28,0 +28,0 @@ private setKeyController; |
@@ -39,2 +39,3 @@ import { IObject } from "@daybrush/utils"; | ||
portalContainer: HTMLElement | null; | ||
checkOverflow: boolean; | ||
} | ||
@@ -84,2 +85,3 @@ export interface BoundContainer { | ||
data: Record<string, any>; | ||
isTrusted: boolean; | ||
} | ||
@@ -108,2 +110,3 @@ export interface OnSelectEnd<T = Selecto> extends OnSelect<T>, CurrentTarget<T> { | ||
inputEvent: any; | ||
isTrusted: boolean; | ||
} | ||
@@ -156,2 +159,3 @@ export interface OnKeyEvent<T = Selecto> extends CurrentTarget<T> { | ||
points: number[][][]; | ||
inners: boolean[]; | ||
} |
@@ -1,2 +0,2 @@ | ||
import type { Hypertext, Rect } from "./types"; | ||
import type { Hypertext, Point, Rect } from "./types"; | ||
import { IObject } from "@daybrush/utils"; | ||
@@ -15,9 +15,4 @@ export declare function getClient(e: MouseEvent | TouchEvent): { | ||
export declare function getRect(e: any, ratio: number, boundArea?: any): Rect; | ||
export declare function getDefaultElementRect(el: HTMLElement | SVGElement): { | ||
pos1: number[]; | ||
pos2: number[]; | ||
pos3: number[]; | ||
pos4: number[]; | ||
}; | ||
export declare function getDefaultElementRect(el: HTMLElement | SVGElement): Point; | ||
export declare function passTargets(beforeTargets: Array<HTMLElement | SVGElement>, afterTargets: Array<HTMLElement | SVGElement>, continueSelectWithoutDeselect: boolean): (HTMLElement | SVGElement)[]; | ||
export declare function getLineSize(points: number[][]): number; |
@@ -7,3 +7,3 @@ /* | ||
repository: git+https://github.com/daybrush/selecto.git | ||
version: 1.21.0-beta.0 | ||
version: 1.21.0 | ||
*/ | ||
@@ -290,3 +290,3 @@ 'use strict'; | ||
var CLASS_NAME = "selecto-selection ".concat(injector.className); | ||
var PROPERTIES = ["boundContainer", "selectableTargets", "selectByClick", "selectFromInside", "continueSelect", "continueSelectWithoutDeselect", "toggleContinueSelect", "toggleContinueSelectWithoutDeselect", "keyContainer", "hitRate", "scrollOptions", "checkInput", "preventDefault", "ratio", "getElementRect", "preventDragFromInside", "rootContainer", "dragCondition", "clickBySelectEnd"]; | ||
var PROPERTIES = ["boundContainer", "selectableTargets", "selectByClick", "selectFromInside", "continueSelect", "continueSelectWithoutDeselect", "toggleContinueSelect", "toggleContinueSelectWithoutDeselect", "keyContainer", "hitRate", "scrollOptions", "checkInput", "preventDefault", "ratio", "getElementRect", "preventDragFromInside", "rootContainer", "dragCondition", "clickBySelectEnd", "checkOverflow"]; | ||
/** | ||
@@ -323,3 +323,4 @@ * @memberof Selecto | ||
preventClickEventOnDragStart: Boolean, | ||
preventClickEventOnDrag: Boolean | ||
preventClickEventOnDrag: Boolean, | ||
checkOverflow: Boolean | ||
}; | ||
@@ -786,2 +787,3 @@ /** | ||
rootContainer: null, | ||
checkOverflow: false, | ||
getElementRect: getDefaultElementRect, | ||
@@ -998,2 +1000,3 @@ cspNonce: "", | ||
* Find for selectableTargets again during drag event | ||
* You can update selectable targets during an event. | ||
*/ | ||
@@ -1016,3 +1019,58 @@ | ||
if (this.options.checkOverflow) { | ||
var parentMap_1 = new Map(); | ||
data.selectableInners = selectableTargets.map(function (target, i) { | ||
var parentElement = target.parentElement; | ||
var parents = []; | ||
var _loop_1 = function () { | ||
var rect = parentMap_1.get(parentElement); | ||
if (!rect) { | ||
var overflow = getComputedStyle(parentElement).overflow !== "visible"; | ||
if (overflow) { | ||
rect = getDefaultElementRect(parentElement); | ||
parents.forEach(function (prevParentElement) { | ||
parentMap_1.set(prevParentElement, rect); | ||
}); // TODO: multi parent | ||
} | ||
} | ||
if (rect) { | ||
var points1 = selectablePoints[i]; | ||
var points2 = [rect.pos1, rect.pos2, rect.pos4, rect.pos3]; | ||
var overlapPoints = overlapArea.getOverlapPoints(points1, points2); | ||
if (!overlapPoints.length) { | ||
return { | ||
value: false | ||
}; | ||
} | ||
return "break"; | ||
} | ||
parents.push(parentElement); | ||
parentElement = parentElement.parentElement; | ||
}; | ||
while (parentElement && parentElement !== document.body) { | ||
var state_1 = _loop_1(); | ||
if (typeof state_1 === "object") return state_1.value; | ||
if (state_1 === "break") break; | ||
} | ||
return true; | ||
}); | ||
} else { | ||
data.selectableInners = selectableTargets.map(function () { | ||
return true; | ||
}); | ||
} | ||
this._refreshGroups(data); | ||
return selectableTargets; | ||
}; | ||
@@ -1039,2 +1097,3 @@ /** | ||
isClick: true, | ||
isTrusted: false, | ||
stop: function () { | ||
@@ -1182,3 +1241,3 @@ return false; | ||
__proto.hitTest = function (selectRect, data) { | ||
__proto.hitTest = function (selectRect, data, gestoEvent) { | ||
var _a = this.options, | ||
@@ -1194,4 +1253,4 @@ hitRate = _a.hitRate, | ||
var innerHeight = data.innerHeight; | ||
var clientX = data.clientX; | ||
var clientY = data.clientY; | ||
var clientX = gestoEvent === null || gestoEvent === void 0 ? void 0 : gestoEvent.clientX; | ||
var clientY = gestoEvent === null || gestoEvent === void 0 ? void 0 : gestoEvent.clientY; | ||
var ignoreClick = data.ignoreClick; | ||
@@ -1201,3 +1260,3 @@ var rectPoints = [[left, top], [right, top], [right, bottom], [left, bottom]]; | ||
var isHit = function (points) { | ||
var isHit = function (points, el) { | ||
var inArea = ignoreClick ? false : overlapArea.isInside([clientX, clientY], points); | ||
@@ -1235,6 +1294,11 @@ | ||
if (!innerGroups) { | ||
var selectableTargets = data.selectableTargets; | ||
var selectableTargets_1 = data.selectableTargets; | ||
var selectablePoints_1 = data.selectablePoints; | ||
return selectableTargets.filter(function (_, i) { | ||
return isHit(selectablePoints_1[i]); | ||
var selectableInners_1 = data.selectableInners; | ||
return selectableTargets_1.filter(function (_, i) { | ||
if (!selectableInners_1[i]) { | ||
return false; | ||
} | ||
return isHit(selectablePoints_1[i], selectableTargets_1[i]); | ||
}); | ||
@@ -1256,3 +1320,3 @@ } | ||
var _loop_1 = function (y) { | ||
var _loop_2 = function (y) { | ||
var group = yGroups[y]; | ||
@@ -1265,5 +1329,6 @@ | ||
var points = group.points, | ||
targets = group.targets; | ||
targets = group.targets, | ||
inners = group.inners; | ||
points.forEach(function (nextPoints, i) { | ||
if (isHit(nextPoints)) { | ||
if (inners[i] && isHit(nextPoints, targets[i])) { | ||
selectedTargets.push(targets[i]); | ||
@@ -1275,3 +1340,3 @@ } | ||
for (var y = minY; y <= maxY; ++y) { | ||
_loop_1(y); | ||
_loop_2(y); | ||
} | ||
@@ -1368,3 +1433,4 @@ } | ||
inputEvent: inputEvent, | ||
data: data.data | ||
data: data.data, | ||
isTrusted: e.isTrusted | ||
})); | ||
@@ -1400,3 +1466,4 @@ } | ||
inputEvent: inputEvent, | ||
data: data.data | ||
data: data.data, | ||
isTrusted: e.isTrusted | ||
})); | ||
@@ -1477,3 +1544,4 @@ } | ||
inputEvent: inputEvent, | ||
data: data.data | ||
data: data.data, | ||
isTrusted: e.isTrusted | ||
}); | ||
@@ -1502,3 +1570,3 @@ }; | ||
this.target.style.cssText += "display: block;" + "left:0px;top:0px;" + "transform: translate(".concat(offsetPos[0], "px, ").concat(offsetPos[1], "px);") + "width:".concat(offsetSize[0], "px;height:").concat(offsetSize[1], "px;"); | ||
var passedTargets = this.hitTest(rect, data); | ||
var passedTargets = this.hitTest(rect, data, e); | ||
selectedTargets = passTargets(data.startPassedTargets, passedTargets, this.continueSelect && this.continueSelectWithoutDeselect); | ||
@@ -1597,4 +1665,5 @@ } | ||
} else { | ||
var selectableTargets_1 = data.selectableTargets; | ||
var selectableTargets_2 = data.selectableTargets; | ||
var selectablePoints = data.selectablePoints; | ||
var selectableInners_2 = data.selectableInners; | ||
var groups_1 = {}; | ||
@@ -1620,9 +1689,12 @@ selectablePoints.forEach(function (points, i) { | ||
points: [], | ||
targets: [] | ||
targets: [], | ||
inners: [] | ||
}; | ||
var _a = groups_1[x][y], | ||
targets = _a.targets, | ||
inners = _a.inners, | ||
groupPoints = _a.points; | ||
targets.push(selectableTargets_1[i]); | ||
targets.push(selectableTargets_2[i]); | ||
groupPoints.push(points); | ||
inners.push(selectableInners_2[i]); | ||
} | ||
@@ -1629,0 +1701,0 @@ } |
@@ -7,3 +7,3 @@ /* | ||
repository: git+https://github.com/daybrush/selecto.git | ||
version: 1.21.0-beta.0 | ||
version: 1.21.0 | ||
*/ | ||
@@ -17,3 +17,3 @@ import EventEmitter from '@scena/event-emitter'; | ||
import KeyController, { getCombi } from 'keycon'; | ||
import { fitPoints, isInside, getOverlapPoints, getAreaSize } from 'overlap-area'; | ||
import { fitPoints, getOverlapPoints, isInside, getAreaSize } from 'overlap-area'; | ||
import { createMatrix, getDistElementMatrix, calculateMatrixDist } from 'css-to-mat'; | ||
@@ -289,3 +289,3 @@ import styled from 'css-styled'; | ||
var CLASS_NAME = "selecto-selection ".concat(injector.className); | ||
var PROPERTIES = ["boundContainer", "selectableTargets", "selectByClick", "selectFromInside", "continueSelect", "continueSelectWithoutDeselect", "toggleContinueSelect", "toggleContinueSelectWithoutDeselect", "keyContainer", "hitRate", "scrollOptions", "checkInput", "preventDefault", "ratio", "getElementRect", "preventDragFromInside", "rootContainer", "dragCondition", "clickBySelectEnd"]; | ||
var PROPERTIES = ["boundContainer", "selectableTargets", "selectByClick", "selectFromInside", "continueSelect", "continueSelectWithoutDeselect", "toggleContinueSelect", "toggleContinueSelectWithoutDeselect", "keyContainer", "hitRate", "scrollOptions", "checkInput", "preventDefault", "ratio", "getElementRect", "preventDragFromInside", "rootContainer", "dragCondition", "clickBySelectEnd", "checkOverflow"]; | ||
/** | ||
@@ -322,3 +322,4 @@ * @memberof Selecto | ||
preventClickEventOnDragStart: Boolean, | ||
preventClickEventOnDrag: Boolean | ||
preventClickEventOnDrag: Boolean, | ||
checkOverflow: Boolean | ||
}; | ||
@@ -785,2 +786,3 @@ /** | ||
rootContainer: null, | ||
checkOverflow: false, | ||
getElementRect: getDefaultElementRect, | ||
@@ -997,2 +999,3 @@ cspNonce: "", | ||
* Find for selectableTargets again during drag event | ||
* You can update selectable targets during an event. | ||
*/ | ||
@@ -1015,3 +1018,58 @@ | ||
if (this.options.checkOverflow) { | ||
var parentMap_1 = new Map(); | ||
data.selectableInners = selectableTargets.map(function (target, i) { | ||
var parentElement = target.parentElement; | ||
var parents = []; | ||
var _loop_1 = function () { | ||
var rect = parentMap_1.get(parentElement); | ||
if (!rect) { | ||
var overflow = getComputedStyle(parentElement).overflow !== "visible"; | ||
if (overflow) { | ||
rect = getDefaultElementRect(parentElement); | ||
parents.forEach(function (prevParentElement) { | ||
parentMap_1.set(prevParentElement, rect); | ||
}); // TODO: multi parent | ||
} | ||
} | ||
if (rect) { | ||
var points1 = selectablePoints[i]; | ||
var points2 = [rect.pos1, rect.pos2, rect.pos4, rect.pos3]; | ||
var overlapPoints = getOverlapPoints(points1, points2); | ||
if (!overlapPoints.length) { | ||
return { | ||
value: false | ||
}; | ||
} | ||
return "break"; | ||
} | ||
parents.push(parentElement); | ||
parentElement = parentElement.parentElement; | ||
}; | ||
while (parentElement && parentElement !== document.body) { | ||
var state_1 = _loop_1(); | ||
if (typeof state_1 === "object") return state_1.value; | ||
if (state_1 === "break") break; | ||
} | ||
return true; | ||
}); | ||
} else { | ||
data.selectableInners = selectableTargets.map(function () { | ||
return true; | ||
}); | ||
} | ||
this._refreshGroups(data); | ||
return selectableTargets; | ||
}; | ||
@@ -1038,2 +1096,3 @@ /** | ||
isClick: true, | ||
isTrusted: false, | ||
stop: function () { | ||
@@ -1181,3 +1240,3 @@ return false; | ||
__proto.hitTest = function (selectRect, data) { | ||
__proto.hitTest = function (selectRect, data, gestoEvent) { | ||
var _a = this.options, | ||
@@ -1193,4 +1252,4 @@ hitRate = _a.hitRate, | ||
var innerHeight = data.innerHeight; | ||
var clientX = data.clientX; | ||
var clientY = data.clientY; | ||
var clientX = gestoEvent === null || gestoEvent === void 0 ? void 0 : gestoEvent.clientX; | ||
var clientY = gestoEvent === null || gestoEvent === void 0 ? void 0 : gestoEvent.clientY; | ||
var ignoreClick = data.ignoreClick; | ||
@@ -1200,3 +1259,3 @@ var rectPoints = [[left, top], [right, top], [right, bottom], [left, bottom]]; | ||
var isHit = function (points) { | ||
var isHit = function (points, el) { | ||
var inArea = ignoreClick ? false : isInside([clientX, clientY], points); | ||
@@ -1234,6 +1293,11 @@ | ||
if (!innerGroups) { | ||
var selectableTargets = data.selectableTargets; | ||
var selectableTargets_1 = data.selectableTargets; | ||
var selectablePoints_1 = data.selectablePoints; | ||
return selectableTargets.filter(function (_, i) { | ||
return isHit(selectablePoints_1[i]); | ||
var selectableInners_1 = data.selectableInners; | ||
return selectableTargets_1.filter(function (_, i) { | ||
if (!selectableInners_1[i]) { | ||
return false; | ||
} | ||
return isHit(selectablePoints_1[i], selectableTargets_1[i]); | ||
}); | ||
@@ -1255,3 +1319,3 @@ } | ||
var _loop_1 = function (y) { | ||
var _loop_2 = function (y) { | ||
var group = yGroups[y]; | ||
@@ -1264,5 +1328,6 @@ | ||
var points = group.points, | ||
targets = group.targets; | ||
targets = group.targets, | ||
inners = group.inners; | ||
points.forEach(function (nextPoints, i) { | ||
if (isHit(nextPoints)) { | ||
if (inners[i] && isHit(nextPoints, targets[i])) { | ||
selectedTargets.push(targets[i]); | ||
@@ -1274,3 +1339,3 @@ } | ||
for (var y = minY; y <= maxY; ++y) { | ||
_loop_1(y); | ||
_loop_2(y); | ||
} | ||
@@ -1367,3 +1432,4 @@ } | ||
inputEvent: inputEvent, | ||
data: data.data | ||
data: data.data, | ||
isTrusted: e.isTrusted | ||
})); | ||
@@ -1399,3 +1465,4 @@ } | ||
inputEvent: inputEvent, | ||
data: data.data | ||
data: data.data, | ||
isTrusted: e.isTrusted | ||
})); | ||
@@ -1476,3 +1543,4 @@ } | ||
inputEvent: inputEvent, | ||
data: data.data | ||
data: data.data, | ||
isTrusted: e.isTrusted | ||
}); | ||
@@ -1501,3 +1569,3 @@ }; | ||
this.target.style.cssText += "display: block;" + "left:0px;top:0px;" + "transform: translate(".concat(offsetPos[0], "px, ").concat(offsetPos[1], "px);") + "width:".concat(offsetSize[0], "px;height:").concat(offsetSize[1], "px;"); | ||
var passedTargets = this.hitTest(rect, data); | ||
var passedTargets = this.hitTest(rect, data, e); | ||
selectedTargets = passTargets(data.startPassedTargets, passedTargets, this.continueSelect && this.continueSelectWithoutDeselect); | ||
@@ -1596,4 +1664,5 @@ } | ||
} else { | ||
var selectableTargets_1 = data.selectableTargets; | ||
var selectableTargets_2 = data.selectableTargets; | ||
var selectablePoints = data.selectablePoints; | ||
var selectableInners_2 = data.selectableInners; | ||
var groups_1 = {}; | ||
@@ -1619,9 +1688,12 @@ selectablePoints.forEach(function (points, i) { | ||
points: [], | ||
targets: [] | ||
targets: [], | ||
inners: [] | ||
}; | ||
var _a = groups_1[x][y], | ||
targets = _a.targets, | ||
inners = _a.inners, | ||
groupPoints = _a.points; | ||
targets.push(selectableTargets_1[i]); | ||
targets.push(selectableTargets_2[i]); | ||
groupPoints.push(points); | ||
inners.push(selectableInners_2[i]); | ||
} | ||
@@ -1628,0 +1700,0 @@ } |
@@ -7,5 +7,5 @@ /* | ||
repository: git+https://github.com/daybrush/selecto.git | ||
version: 1.21.0-beta.0 | ||
version: 1.21.0 | ||
*/ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Selecto=e()}(this,function(){"use strict";var F=function(t,e){return(F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function K(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}F(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var g=function(){return(g=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function a(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||((i=i||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}var W="function",A="string",R=[{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:'\\"',close:'\\"'},{open:"\\'",close:"\\'"}],B=1e-7;function v(t){return t&&"object"==typeof t}function I(t){return Array.isArray(t)}function m(t){return typeof t===A}function N(t){return typeof t===W}function L(t,e,n,i,r){if(y(t,e,n))return n;for(var o,a=t,c=e,s=i,u=r,l=n+1;l<s;++l){var h=function(t){var e,n,i=c[t].trim();return i!==a.close||y(a,c,t)?(e=t,-1===(e=(n=E(u,function(t){return t.open===i}))?L(n,c,t,s,u):e)?(o=t,"break"):void(o=t=e)):{value:t}}(l);if(l=o,"object"==typeof h)return h.value;if("break"===h)break}return-1}function y(t,e,n){if(!t.ignore)return null;e=e.slice(Math.max(n-3,0),n+3).join("");return new RegExp(t.ignore).exec(e)}function q(t,e){var e=m(e)?{separator:e}:e,n=e.separator,o=void 0===n?",":n,a=e.isSeparateFirst,c=e.isSeparateOnlyOpenClose,n=e.isSeparateOpenClose,s=void 0===n?c:n,n=e.openCloseCharacters,u=void 0===n?R:n,e=u.map(function(t){var e=t.open,t=t.close;return e===t?e:e+"|"+t}).join("|"),n=new RegExp("(\\s*"+o+"\\s*|"+e+"|\\s+)","g"),l=t.split(n).filter(Boolean),h=l.length,f=[],p=[];function d(){return p.length&&(f.push(p.join("")),p=[])}for(var g,i=0;i<h;++i){var r=function(t){var e=l[t].trim(),n=t,i=E(u,function(t){return t.open===e}),r=E(u,function(t){return t.close===e});if(i){if(-1!==(n=L(i,l,t,h,u))&&s)return d()&&a?(g=t,"break"):(f.push(l.slice(t,n+1).join("")),t=n,a?(g=t,"break"):(g=t,"continue"))}else{if(r&&!y(r,l,t))throw new Error("invalid format: "+r.close);if(i=e,!((""!==(r=o)&&" "!=r||""!==i&&" "!=i)&&i!==r||c))return d(),a?(g=t,"break"):(g=t,"continue")}p.push(l.slice(t,(n=-1===n?h-1:n)+1).join("")),g=t=n}(i),i=g;if("break"===r)break}return p.length&&f.push(p.join("")),f}function s(t){return q(t,",")}function G(t){t=/^([^\d|e|\-|\+]*)((?:\d|\.|-|e-|e\+)+)(\S*)$/g.exec(t);if(!t)return{prefix:"",unit:"",value:NaN};var e=t[1],n=t[2];return{prefix:e,unit:t[3],value:parseFloat(n)}}function H(t){return t.replace(/[\s-_]([a-z])/g,function(t,e){return e.toUpperCase()})}function C(){return Date.now?Date.now():(new Date).getTime()}function o(t,e,n){void 0===n&&(n=-1);for(var i=t.length,r=0;r<i;++r)if(e(t[r],r,t))return r;return n}function E(t,e,n){e=o(t,e);return-1<e?t[e]:n}function Z(t,e,n){return Math.max(e,Math.min(t,n))}function U(t,i,r,e){return void 0===e&&(e=t[0]/t[1]),[[j(i[0],B),j(i[0]/e,B)],[j(i[1]*e,B),j(i[1],B)]].filter(function(t){return t.every(function(t,e){var e=i[e],n=j(e,B);return r?t<=e||t<=n:e<=t||n<=t})})[0]||t}function V(t,e){var n=e[0]-t[0],e=e[1]-t[1],t=Math.atan2(e,n);return 0<=t?t:t+2*Math.PI}function z(o){return[0,1].map(function(e){for(var t=o.map(function(t){return t[e]}),n=t.length,i=0,r=n-1;0<=r;--r)i+=t[r];return n?i/n:0})}function $(t){var e=z(t),n=V(e,t[0]),e=V(e,t[1]);return n<e&&e-n<Math.PI||e<n&&e-n<-Math.PI?1:-1}function h(t,e){return Math.sqrt(Math.pow((e?e[0]:0)-t[0],2)+Math.pow((e?e[1]:0)-t[1],2))}function j(t,e){if(!e)return t;var n=1/e;return Math.round(t/e)/n}function S(t,e,n,i){t.addEventListener(e,n,i)}function _(t,e,n,i){t.removeEventListener(e,n,i)}var J=function(){return(J=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};var t=function(){function t(){this._events={}}var e=t.prototype;return e.on=function(t,e){if(v(t))for(var n in t)this.on(n,t[n]);else this._addEvent(t,e,{});return this},e.off=function(t,e){if(t)if(v(t))for(var n in t)this.off(n);else{var i,r;e?(i=this._events[t])&&-1<(r=o(i,function(t){return t.listener===e}))&&i.splice(r,1):this._events[t]=[]}else this._events={};return this},e.once=function(e,t){var n=this;return t&&this._addEvent(e,t,{once:!0}),new Promise(function(t){n._addEvent(e,t,{once:!0})})},e.emit=function(e,n){var i=this,t=(void 0===n&&(n={}),this._events[e]);if(!e||!t)return!0;var r=!1;return n.eventType=e,n.stop=function(){r=!0},n.currentTarget=this,function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var i=Array(t),r=0,e=0;e<n;e++)for(var o=arguments[e],a=0,c=o.length;a<c;a++,r++)i[r]=o[a];return i}(t).forEach(function(t){t.listener(n),t.once&&i.off(e,t.listener)}),!r},e.trigger=function(t,e){return this.emit(t,e=void 0===e?{}:e)},e._addEvent=function(t,e,n){var i=this._events;i[t]=i[t]||[],i[t].push(J({listener:e},n))},t}(),Q=function(t,e){return(Q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var b=function(){return(b=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function n(t){return 180*(e=[t[0].clientX,t[0].clientY],t=[t[1].clientX,t[1].clientY],n=t[0]-e[0],t=t[1]-e[1],(0<=(e=Math.atan2(t,n))?e:e+2*Math.PI)/Math.PI);var e,n}function k(t){if(!t)return[];if(t.touches){for(var e=t.touches,n=Math.min(e.length,2),i=[],r=0;r<n;++r)i.push(et(e[r]));return i}return[et(t)]}function tt(t,e,n){var i=n.length,t=u(t,i),r=t.clientX,o=t.clientY,a=t.originalClientX,t=t.originalClientY,e=u(e,i),c=e.clientX,e=e.clientY,n=u(n,i);return{clientX:a,clientY:t,deltaX:r-c,deltaY:o-e,distX:r-n.clientX,distY:o-n.clientY}}function i(t){return Math.sqrt(Math.pow(t[0].clientX-t[1].clientX,2)+Math.pow(t[0].clientY-t[1].clientY,2))}function et(t){return{clientX:t.clientX,clientY:t.clientY}}function u(t,e){void 0===e&&(e=t.length);for(var n={clientX:0,clientY:0,originalClientX:0,originalClientY:0},i=0;i<e;++i){var r=t[i];n.originalClientX+="originalClientX"in r?r.originalClientX:r.clientX,n.originalClientY+="originalClientY"in r?r.originalClientY:r.clientY,n.clientX+=r.clientX,n.clientY+=r.clientY}return e?{clientX:n.clientX/e,clientY:n.clientY/e,originalClientX:n.originalClientX/e,originalClientY:n.originalClientY/e}:n}var D=function(){function t(t){this.prevClients=[],this.startClients=[],this.movement=0,this.length=0,this.startClients=t,this.prevClients=t,this.length=t.length}var e=t.prototype;return e.getAngle=function(t){return n(t=void 0===t?this.prevClients:t)},e.getRotation=function(t){return n(t=void 0===t?this.prevClients:t)-n(this.startClients)},e.getPosition=function(t,e){var n=tt((t=void 0===t?this.prevClients:t)||this.prevClients,this.prevClients,this.startClients),i=n.deltaX,r=n.deltaY;return this.movement+=Math.sqrt(i*i+r*r),this.prevClients=t,n},e.getPositions=function(n){void 0===n&&(n=this.prevClients);var i=this.prevClients;return this.startClients.map(function(t,e){return tt([n[e]],[i[e]],[t])})},e.getMovement=function(t){var e=this.movement;if(!t)return e;var t=u(t,this.length),n=u(this.prevClients,this.length),i=t.clientX-n.clientX,t=t.clientY-n.clientY;return Math.sqrt(i*i+t*t)+e},e.getDistance=function(t){return i(t=void 0===t?this.prevClients:t)},e.getScale=function(t){return i(t=void 0===t?this.prevClients:t)/i(this.startClients)},e.move=function(e,n){this.startClients.forEach(function(t){t.clientX-=e,t.clientY-=n}),this.prevClients.forEach(function(t){t.clientX-=e,t.clientY-=n})},t}(),nt=["textarea","input"],it=function(o){function t(){this.constructor=e}var e;function n(t,e){void 0===e&&(e={});var n,g=o.call(this)||this,t=(g.options={},g.flag=!1,g.pinchFlag=!1,g.data={},g.isDrag=!1,g.isPinch=!1,g.isMouse=!1,g.isTouch=!1,g.clientStores=[],g.targets=[],g.prevTime=0,g.doubleFlag=!1,g._dragFlag=!1,g._isMouseEvent=!1,g._isSecondaryButton=!1,g._preventMouseEvent=!1,g.onDragStart=function(t,e){if(void 0===e&&(e=!0),g.flag||!1!==t.cancelable){var n=g.options,i=n.container,r=n.pinchOutside,o=n.preventWheelClick,a=n.preventRightClick,c=n.preventDefault,s=n.checkInput,u=n.preventClickEventOnDragStart,l=n.preventClickEventOnDrag,n=n.preventClickEventByCondition,h=g.isTouch,f=!g.flag;if(g._isSecondaryButton=3===t.which||2===t.button,o&&(2===t.which||1===t.button)||a&&(3===t.which||2===t.button))return g.stop(),!1;if(f){o=document.activeElement,a=t.target;if(a){var p=a.tagName.toLowerCase(),p=-1<nt.indexOf(p),d=a.isContentEditable;if(p||d){if(s||o===a)return!1;if(o&&d&&o.isContentEditable&&o.contains(a))return!1}else(c||"touchstart"===t.type)&&o&&(p=o.tagName.toLowerCase(),(o.isContentEditable||-1<nt.indexOf(p))&&o.blur());(u||l||n)&&S(window,"click",g._onClick,!0)}g.clientStores=[new D(k(t))],g.flag=!0,g.isDrag=!1,g._dragFlag=!0,g.data={},g.doubleFlag=C()-g.prevTime<200,g._isMouseEvent=(s=t)&&(-1<s.type.indexOf("mouse")||"button"in s),!g._isMouseEvent&&g._preventMouseEvent&&(g._preventMouseEvent=!1),!1===(g._preventMouseEvent||g.emit("dragStart",b(b({data:g.data,datas:g.data,inputEvent:t,isMouseEvent:g._isMouseEvent,isSecondaryButton:g._isSecondaryButton,isTrusted:e,isDouble:g.doubleFlag},g.getCurrentStore().getPosition()),{preventDefault:function(){t.preventDefault()},preventDrag:function(){g._dragFlag=!1}})))&&g.stop(),g._isMouseEvent&&g.flag&&c&&t.preventDefault()}if(!g.flag)return!1;d=0;f?(g._attchDragEvent(),h&&r&&(d=setTimeout(function(){S(i,"touchstart",g.onDragStart,{passive:!1})}))):h&&r&&_(i,"touchstart",g.onDragStart),g.flag&&((a=t).touches&&2<=a.touches.length)&&(clearTimeout(d),f&&t.touches.length!==t.changedTouches.length||g.pinchFlag||g.onPinchStart(t))}},g.onDrag=function(t,e){if(g.flag){var n=g.options.preventDefault,n=(!g._isMouseEvent&&n&&t.preventDefault(),k(t)),i=g.moveClients(n,t,!1);if(g._dragFlag){if(g.pinchFlag||i.deltaX||i.deltaY)if(!1===(g._preventMouseEvent||g.emit("drag",b(b({},i),{isScroll:!!e,inputEvent:t}))))return void g.stop();g.pinchFlag&&g.onPinch(t,n)}g.getCurrentStore().getPosition(n,!0)}},g.onDragEnd=function(t){var e,n,i,r,o,a;g.flag&&(a=(i=g.options).pinchOutside,e=i.container,o=i.preventClickEventOnDrag,r=i.preventClickEventOnDragStart,i=i.preventClickEventByCondition,n=g.isDrag,(o||r||i)&&requestAnimationFrame(function(){g._allowClickEvent()}),i||r||!o||n||g._allowClickEvent(),g.isTouch&&a&&_(e,"touchstart",g.onDragStart),g.pinchFlag&&g.onPinchEnd(t),0!==(i=null!=t&&t.touches?k(t):[]).length&&g.options.keepDragging?g._addStore(new D(i)):g.flag=!1,r=g._getPosition(),o=C(),a=!n&&g.doubleFlag,g.prevTime=n||a?0:o,g.flag||(g._dettachDragEvent(),g._preventMouseEvent||g.emit("dragEnd",b({data:g.data,datas:g.data,isDouble:a,isDrag:n,isClick:!n,isMouseEvent:g._isMouseEvent,isSecondaryButton:g._isSecondaryButton,inputEvent:t},r)),g.clientStores=[],g._isMouseEvent||(g._preventMouseEvent=!0,requestAnimationFrame(function(){requestAnimationFrame(function(){g._preventMouseEvent=!1})}))))},g.onBlur=function(){g.onDragEnd()},g._allowClickEvent=function(){_(window,"click",g._onClick,!0)},g._onClick=function(t){g._allowClickEvent(),g._preventMouseEvent=!1;var e=g.options.preventClickEventByCondition;null!=e&&e(t)||(t.stopPropagation(),t.preventDefault())},g._onContextMenu=function(t){g.options.preventRightClick?g.onDragEnd(t):t.preventDefault()},g._passCallback=function(){},[].concat(t)),e=(g.options=b({checkInput:!1,container:1<t.length?window:t[0],preventRightClick:!0,preventWheelClick:!0,preventClickEventOnDragStart:!1,preventClickEventOnDrag:!1,preventClickEventByCondition:null,preventDefault:!0,checkWindowBlur:!1,keepDragging:!1,pinchThreshold:0,events:["touch","mouse"]},e),g.options),i=e.container,r=e.events,e=e.checkWindowBlur;return g.isTouch=-1<r.indexOf("touch"),g.isMouse=-1<r.indexOf("mouse"),g.targets=t,g.isMouse&&(t.forEach(function(t){S(t,"mousedown",g.onDragStart),S(t,"mousemove",g._passCallback)}),S(i,"contextmenu",g._onContextMenu)),e&&S(window,"blur",g.onBlur),g.isTouch&&(n={passive:!1},t.forEach(function(t){S(t,"touchstart",g.onDragStart,n),S(t,"touchmove",g._passCallback,n)})),g}Q(e=n,i=o),e.prototype=null===i?Object.create(i):(t.prototype=i.prototype,new t);var i=n.prototype;return i.stop=function(){this.isDrag=!1,this.data={},this.clientStores=[],this.pinchFlag=!1,this.doubleFlag=!1,this.prevTime=0,this.flag=!1,this._allowClickEvent(),this._dettachDragEvent()},i.getMovement=function(t){return this.getCurrentStore().getMovement(t)+this.clientStores.slice(1).reduce(function(t,e){return t+e.movement},0)},i.isDragging=function(){return this.isDrag},i.isFlag=function(){return this.flag},i.isPinchFlag=function(){return this.pinchFlag},i.isDoubleFlag=function(){return this.doubleFlag},i.isPinching=function(){return this.isPinch},i.scrollBy=function(t,e,n,i){void 0===i&&(i=!0),this.flag&&(this.clientStores[0].move(t,e),i&&this.onDrag(n,!0))},i.move=function(t,e){var n=t[0],i=t[1],t=this.getCurrentStore().prevClients;return this.moveClients(t.map(function(t){var e=t.clientX,t=t.clientY;return{clientX:e+n,clientY:t+i,originalClientX:e,originalClientY:t}}),e,!0)},i.triggerDragStart=function(t){this.onDragStart(t,!1)},i.setEventData=function(t){var e,n=this.data;for(e in t)n[e]=t[e];return this},i.setEventDatas=function(t){return this.setEventData(t)},i.getCurrentEvent=function(t){return b(b({data:this.data,datas:this.data},this._getPosition()),{movement:this.getMovement(),isDrag:this.isDrag,isPinch:this.isPinch,isScroll:!1,inputEvent:t})},i.getEventData=function(){return this.data},i.getEventDatas=function(){return this.data},i.unset=function(){var e=this,t=this.targets,n=this.options.container;this.off(),_(window,"blur",this.onBlur),this.isMouse&&(t.forEach(function(t){_(t,"mousedown",e.onDragStart)}),_(n,"contextmenu",this._onContextMenu)),this.isTouch&&(t.forEach(function(t){_(t,"touchstart",e.onDragStart)}),_(n,"touchstart",this.onDragStart)),this._allowClickEvent(),this._dettachDragEvent()},i.onPinchStart=function(t){var e=this.options.pinchThreshold;this.isDrag&&this.getMovement()>e||(e=new D(k(t)),this.pinchFlag=!0,this._addStore(e),!1===this.emit("pinchStart",b(b({data:this.data,datas:this.data,angle:e.getAngle(),touches:this.getCurrentStore().getPositions()},e.getPosition()),{inputEvent:t}))&&(this.pinchFlag=!1))},i.onPinch=function(t,e){var n;!this.flag||!this.pinchFlag||e.length<2||(n=this.getCurrentStore(),this.isPinch=!0,this.emit("pinch",b(b({data:this.data,datas:this.data,movement:this.getMovement(e),angle:n.getAngle(e),rotation:n.getRotation(e),touches:n.getPositions(e),scale:n.getScale(e),distance:n.getDistance(e)},n.getPosition(e)),{inputEvent:t})))},i.onPinchEnd=function(t){var e,n;this.pinchFlag&&(e=this.isPinch,this.isPinch=!1,this.pinchFlag=!1,n=this.getCurrentStore(),this.emit("pinchEnd",b(b({data:this.data,datas:this.data,isPinch:e,touches:n.getPositions()},n.getPosition()),{inputEvent:t})))},i.getCurrentStore=function(){return this.clientStores[0]},i.moveClients=function(t,e,n){n=this._getPosition(t,n);return(n.deltaX||n.deltaY)&&(this.isDrag=!0),b(b({data:this.data,datas:this.data},n),{movement:this.getMovement(t),isDrag:this.isDrag,isPinch:this.isPinch,isScroll:!1,isMouseEvent:this._isMouseEvent,isSecondaryButton:this._isSecondaryButton,inputEvent:e})},i._addStore=function(t){this.clientStores.splice(0,0,t)},i._getPosition=function(t,e){var t=this.getCurrentStore().getPosition(t,e),e=this.clientStores.slice(1).reduce(function(t,e){e=e.getPosition();return t.distX+=e.distX,t.distY+=e.distY,t},t),n=e.distX,e=e.distY;return b(b({},t),{distX:n,distY:e})},i._attchDragEvent=function(){var t=this.options.container,e={passive:!1};this.isMouse&&(S(t,"mousemove",this.onDrag),S(t,"mouseup",this.onDragEnd)),this.isTouch&&(S(t,"touchmove",this.onDrag,e),S(t,"touchend",this.onDragEnd,e),S(t,"touchcancel",this.onDragEnd,e))},i._dettachDragEvent=function(){var t=this.options.container;this.isMouse&&(_(t,"mousemove",this.onDrag),_(t,"mouseup",this.onDragEnd)),this.isTouch&&(_(t,"touchstart",this.onDragStart),_(t,"touchmove",this.onDrag),_(t,"touchend",this.onDragEnd),_(t,"touchcancel",this.onDragEnd))},n}(t);var rt=function(){function t(){this.keys=[],this.values=[]}var e=t.prototype;return e.get=function(t){return this.values[this.keys.indexOf(t)]},e.set=function(t,e){var n=this.keys,i=this.values,r=n.indexOf(t),r=-1===r?n.length:r;n[r]=t,i[r]=e},t}(),ot=function(){function t(){this.object={}}var e=t.prototype;return e.get=function(t){return this.object[t]},e.set=function(t,e){this.object[t]=e},t}(),at="function"==typeof Map,ct=function(){function t(){}var e=t.prototype;return e.connect=function(t,e){this.prev=t,this.next=e,t&&(t.next=this),e&&(e.prev=this)},e.disconnect=function(){var t=this.prev,e=this.next;t&&(t.next=e),e&&(e.prev=t)},e.getIndex=function(){for(var t=this,e=-1;t;)t=t.prev,++e;return e},t}();var st=function(){function t(t,e,n,i,r,o,a,c){this.prevList=t,this.list=e,this.added=n,this.removed=i,this.changed=r,this.maintained=o,this.changedBeforeAdded=a,this.fixed=c}var e=t.prototype;return Object.defineProperty(e,"ordered",{get:function(){return this.cacheOrdered||this.caculateOrdered(),this.cacheOrdered},enumerable:!0,configurable:!0}),Object.defineProperty(e,"pureChanged",{get:function(){return this.cachePureChanged||this.caculateOrdered(),this.cachePureChanged},enumerable:!0,configurable:!0}),e.caculateOrdered=function(){t=this.changedBeforeAdded,n=this.fixed,r=[],o=[],t.forEach(function(t){var e=t[0],t=t[1],n=new ct;r[e]=n,o[t]=n}),r.forEach(function(t,e){t.connect(r[e-1])});var n,r,o,t=t.filter(function(t,e){return!n[e]}).map(function(t,e){var n=t[0],t=t[1];if(n===t)return[0,0];var n=r[n],t=o[t-1],i=n.getIndex();return n.disconnect(),t?n.connect(t,t.next):n.connect(void 0,r[0]),[i,n.getIndex()]}),a=this.changed,c=[];this.cacheOrdered=t.filter(function(t,e){var n=t[0],t=t[1],e=a[e],i=e[0],e=e[1];if(n!==t)return c.push([i,e]),!0}),this.cachePureChanged=c},t}();var ut,lt="function"==typeof Map?void 0:(ut=0,function(t){return t.__DIFF_KEY__||(t.__DIFF_KEY__=++ut)});function w(t,e){return t=t,e=e,n=lt,i=at?Map:n?ot:rt,n=n||function(t){return t},r=[],o=[],a=[],c=t.map(n),n=e.map(n),s=new i,u=new i,l=[],h=[],f={},p=[],g=d=0,c.forEach(function(t,e){s.set(t,e)}),n.forEach(function(t,e){u.set(t,e)}),c.forEach(function(t,e){t=u.get(t);void 0===t?(++g,o.push(e)):f[t]=g}),n.forEach(function(t,e){t=s.get(t);void 0===t?(r.push(e),++d):(a.push([t,e]),g=f[e]||0,l.push([t-g,e-d]),h.push(e===t),t!==e&&p.push([t,e]))}),o.reverse(),new st(t,e,r,o,p,a,l,h);var n,i,r,o,a,c,s,u,l,h,f,p,d,g}var ht=function(t,e){return(ht=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var l=function(){return(l=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function ft(t){t=t.container;return t===document.body?[t.scrollLeft||document.documentElement.scrollLeft,t.scrollTop||document.documentElement.scrollTop]:[t.scrollLeft,t.scrollTop]}function f(t){return t?m(t)?document.querySelector(t):N(t)?t():t instanceof Element?t:"current"in t?t.current:"value"in t?t.value:void 0:null}var pt=function(e){function t(){this.constructor=n}var n;function i(){var t=null!==e&&e.apply(this,arguments)||this;return t._startRect=null,t._startPos=[],t._prevTime=0,t._timer=0,t._prevScrollPos=[0,0],t._isWait=!1,t._flag=!1,t}ht(n=i,r=e),n.prototype=null===r?Object.create(r):(t.prototype=r.prototype,new t);var r=i.prototype;return r.dragStart=function(t,e){var n,i,r,o,a=f(e.container);a?(o=r=i=n=0,o=a===document.body?(r=window.innerWidth,window.innerHeight):(n=(a=a.getBoundingClientRect()).top,i=a.left,r=a.width,a.height),this._flag=!0,this._startPos=[t.clientX,t.clientY],this._startRect={top:n,left:i,width:r,height:o},this._prevScrollPos=this._getScrollPosition([0,0],e)):this._flag=!1},r.drag=function(t,e){var n,i,r,o,a,c;if(clearTimeout(this._timer),this._flag)return n=t.clientX,i=t.clientY,r=e.threshold,r=void 0===r?0:r,o=this._startRect,a=this._startPos,c=[0,0],o.top>i-r?(a[1]>o.top||i<a[1])&&(c[1]=-1):o.top+o.height<i+r&&(a[1]<o.top+o.height||i>a[1])&&(c[1]=1),o.left>n-r?(a[0]>o.left||n<a[0])&&(c[0]=-1):o.left+o.width<n+r&&(a[0]<o.left+o.width||n>a[0])&&(c[0]=1),!(!c[0]&&!c[1])&&this._continueDrag(l(l({},e),{direction:c,inputEvent:t,isDrag:!0}))},r.checkScroll=function(t){var e=this;if(this._isWait)return!1;var n=t.prevScrollPos,n=void 0===n?this._prevScrollPos:n,i=t.direction,r=t.throttleTime,r=void 0===r?0:r,o=t.inputEvent,a=t.isDrag,c=this._getScrollPosition(i||[0,0],t),s=c[0]-n[0],n=c[1]-n[1],i=i||[s?Math.abs(s)/s:0,n?Math.abs(n)/n:0];return this._prevScrollPos=c,!(!s&&!n)&&(this.trigger("move",{offsetX:i[0]?s:0,offsetY:i[1]?n:0,inputEvent:o}),r&&a&&(clearTimeout(this._timer),this._timer=window.setTimeout(function(){e._continueDrag(t)},r)),!0)},r.dragEnd=function(){this._flag=!1,clearTimeout(this._timer)},r._getScrollPosition=function(t,e){var n=e.container,e=e.getScrollPosition;return(void 0===e?ft:e)({container:f(n),direction:t})},r._continueDrag=function(t){var e=this,n=t.container,i=t.direction,r=t.throttleTime,o=t.useScroll,a=t.isDrag,c=t.inputEvent;if(!(!this._flag||a&&this._isWait)){var s=C(),r=Math.max(r+this._prevTime-s,0);if(0<r)return clearTimeout(this._timer),this._timer=window.setTimeout(function(){e._continueDrag(t)},r),!1;this._prevTime=s;r=this._getScrollPosition(i,t),s=(this._prevScrollPos=r,a&&(this._isWait=!0),{container:f(n),direction:i,inputEvent:c});return null!=(a=t.requestScroll)&&a.call(t,s),this.trigger("scroll",s),this._isWait=!1,o||this.checkScroll(l(l({},t),{prevScrollPos:r,direction:i,inputEvent:c}))}},i}(t),dt=function(t,e){return(dt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function gt(t){return t&&"object"==typeof t}function vt(t){return Array.isArray(t)}function mt(t){return"string"==typeof t}function c(t,e,n,i){t.addEventListener(e,n,i)}function p(t,e,n,i){t.removeEventListener(e,n,i)}var yt=function(){return(yt=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};var Ct=function(){function t(){this._events={}}var e=t.prototype;return e.on=function(t,e){if(gt(t))for(var n in t)this.on(n,t[n]);else this._addEvent(t,e,{});return this},e.off=function(t,e){if(t)if(gt(t))for(var n in t)this.off(n);else{var i,r;e?(i=this._events[t])&&-1<(r=function(t,e,n){void 0===n&&(n=-1);for(var i=t.length,r=0;r<i;++r)if(e(t[r],r,t))return r;return n}(i,function(t){return t.listener===e}))&&i.splice(r,1):this._events[t]=[]}else this._events={};return this},e.once=function(e,t){var n=this;return t&&this._addEvent(e,t,{once:!0}),new Promise(function(t){n._addEvent(e,t,{once:!0})})},e.emit=function(e,n){var i=this,t=(void 0===n&&(n={}),this._events[e]);if(!e||!t)return!0;var r=!1;return n.eventType=e,n.stop=function(){r=!0},n.currentTarget=this,function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var i=Array(t),r=0,e=0;e<n;e++)for(var o=arguments[e],a=0,c=o.length;a<c;a++,r++)i[r]=o[a];return i}(t).forEach(function(t){t.listener(n),t.once&&i.off(e,t.listener)}),!r},e.trigger=function(t,e){return this.emit(t,e=void 0===e?{}:e)},e._addEvent=function(t,e,n){var i=this._events;i[t]=i[t]||[],i[t].push(yt({listener:e},n))},t}();(function(t,e){function n(t){if(!t||"object"!=typeof t||(e=t.which||t.keyCode||t.charCode)&&(t=e),"number"==typeof t)return c[t];var e=String(t),t=i[e.toLowerCase()];return t||((t=r[e.toLowerCase()])?t:1===e.length?e.charCodeAt(0):void 0)}n.isEventKey=function(t,e){if(t&&"object"==typeof t){t=t.which||t.keyCode||t.charCode;if(null!=t)if("string"==typeof e){var n=i[e.toLowerCase()];if(n)return n===t;if(n=r[e.toLowerCase()])return n===t}else if("number"==typeof e)return e===t;return!1}};for(var i=(e=t.exports=n).code=e.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},r=e.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91},o=97;o<123;o++)i[String.fromCharCode(o)]=o-32;for(var o=48;o<58;o++)i[o-48]=o;for(o=1;o<13;o++)i["f"+o]=o+111;for(o=0;o<10;o++)i["numpad "+o]=o+96;var a,c=e.names=e.title={};for(o in i)c[i[o]]=o;for(a in r)i[a]=r[a]})(e={exports:{}},e.exports);var Et,e=e.exports,St=(e.code,e.codes,e.aliases,e.names),_t=(e.title,{"+":"plus","left command":"meta","right command":"meta"}),bt={shift:1,ctrl:2,alt:3,meta:4};function kt(t,e){var n,i=(St[t]||e||"").toLowerCase();for(n in _t)i=i.replace(n,_t[n]);return i.replace(/\s/g,"")}function Dt(t,e){void 0===e&&(e=kt(t.keyCode,t.key));t=[t.shiftKey&&"shift",t.ctrlKey&&"ctrl",t.altKey&&"alt",t.metaKey&&"meta"].filter(Boolean);return-1===t.indexOf(e)&&t.push(e),t.filter(Boolean)}function wt(t){t=t.slice();return t.sort(function(t,e){return(bt[t]||5)-(bt[e]||5)}),t}var Mt=function(n){var t=r,e=n;if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}function r(t){void 0===t&&(t=window);var e=n.call(this)||this;return e.container=t,e.ctrlKey=!1,e.altKey=!1,e.shiftKey=!1,e.metaKey=!1,e.clear=function(){return e.ctrlKey=!1,e.altKey=!1,e.shiftKey=!1,e.metaKey=!1,e},e.keydownEvent=function(t){e.triggerEvent("keydown",t)},e.keyupEvent=function(t){e.triggerEvent("keyup",t)},e.blur=function(){e.clear(),e.trigger("blur")},c(t,"blur",e.blur),c(t,"keydown",e.keydownEvent),c(t,"keyup",e.keyupEvent),e}dt(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i);e=r.prototype;return Object.defineProperty(r,"global",{get:function(){return Et=Et||new r},enumerable:!1,configurable:!0}),r.setGlobal=function(){return this.global},e.destroy=function(){var t=this.container;this.clear(),this.off(),p(t,"blur",this.blur),p(t,"keydown",this.keydownEvent),p(t,"keyup",this.keyupEvent)},e.keydown=function(t,e){return this.addEvent("keydown",t,e)},e.offKeydown=function(t,e){return this.removeEvent("keydown",t,e)},e.offKeyup=function(t,e){return this.removeEvent("keyup",t,e)},e.keyup=function(t,e){return this.addEvent("keyup",t,e)},e.addEvent=function(t,e,n){return vt(e)?this.on(t+"."+wt(e).join("."),n):mt(e)?this.on(t+"."+e,n):this.on(t,e),this},e.removeEvent=function(t,e,n){return vt(e)?this.off(t+"."+wt(e).join("."),n):mt(e)?this.off(t+"."+e,n):this.off(t,e),this},e.triggerEvent=function(t,e){this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey;var n=kt(e.keyCode,e.key),i={key:n,isToggle:"ctrl"===n||"shift"===n||"meta"===n||"alt"===n,inputEvent:e,keyCode:e.keyCode,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey},e=(this.trigger(t,i),this.trigger(t+"."+n,i),Dt(e,n));1<e.length&&this.trigger(t+"."+e.join("."),i)},r}(Ct);function d(t){return j(t,B)}function M(n){return n.length<3?0:Math.abs(function(t){for(var e=0,n=t.length-1;0<=n;--n)e+=t[n];return e}(n.map(function(t,e){e=n[e+1]||n[0];return t[0]*e[1]-e[0]*t[1]})))/2}function xt(t){var e=t.map(function(t){return t[0]}),t=t.map(function(t){return t[1]});return{minX:Math.min.apply(Math,e),minY:Math.min.apply(Math,t),maxX:Math.max.apply(Math,e),maxY:Math.max.apply(Math,t)}}function x(r,t,e){var i=r[0],o=r[1],n=xt(t),a=n.minX,n=n.maxX,c=[[a,o],[n,o]],s=P(c[0],c[1]),a=O(t),u=[];if(a.forEach(function(t){var n,e=P(t[0],t[1]),i=t[0];n=e,s.every(function(t,e){return 0===d(t-n[e])})?u.push({pos:r,line:t,type:"line"}):Ot(Pt(s,e),[c,t]).forEach(function(n){t.some(function(t){return e=n,!d((t=t)[0]-e[0])&&!d(t[1]-e[1]);var e})?u.push({pos:n,line:t,type:"point"}):0!==d(i[1]-o)&&u.push({pos:n,line:t,type:"intersection"})})}),!e&&E(u,function(t){return t[0]===i}))return!0;var l=0,h={};return u.forEach(function(t){var e=t.pos,n=t.type,t=t.line;e[0]>i||("intersection"===n?++l:"line"!==n&&"point"===n&&(n=E(t,function(t){return t[1]!==o}),t=h[e[0]],n=n[1]>o?1:-1,t?t!==n&&++l:h[e[0]]=n))}),l%2==1}function P(t,e){var n=t[0],t=t[1],i=e[0]-n,e=e[1]-t,r=(Math.abs(i)<B&&(i=0),Math.abs(e)<B&&(e=0),0),o=0,a=0;return i?a=e?(o=1,-(r=-e/i)*n-t):(o=1,-t):e&&(r=-1,a=n),[r,o,a]}function Pt(t,e){var n,i,r=t[0],o=t[1],t=t[2],a=e[0],c=e[1],e=e[2],s=0===r&&0===a,u=0===o&&0===c;return s&&u?[]:s?(s=-t/o)!=-e/c?[]:[[-1/0,s],[1/0,s]]:u?(s=-t/r)!=-e/a?[]:[[s,-1/0],[s,1/0]]:(0===r?[[n=-(c*(i=-t/o)+e)/a,i]]:0===a?[[n=-(o*(i=-e/c)+t)/r,i]]:0===o?[[n=-t/r,i=-(a*n+e)/c]]:0===c?[[n=-e/a,i=-(r*n+t)/o]]:[[n=(o*e-c*t)/(c*r-o*a),i=-(r*n+t)/o]]).map(function(t){return[t[0],t[1]]})}function Ot(t,e){var i=e.map(function(e){return[0,1].map(function(t){return[Math.min(e[0][t],e[1][t]),Math.max(e[0][t],e[1][t])]})}),e=[];if(2===t.length){var n=t[0],r=n[0],n=n[1];if(d(r-t[1][0])){if(!d(n-t[1][1])){var o=Math.max.apply(Math,i.map(function(t){return t[0][0]})),a=Math.min.apply(Math,i.map(function(t){return t[0][1]}));if(0<d(o-a))return[];e=[[o,n],[a,n]]}}else{o=Math.max.apply(Math,i.map(function(t){return t[1][0]})),a=Math.min.apply(Math,i.map(function(t){return t[1][1]}));if(0<d(o-a))return[];e=[[r,o],[r,a]]}}return(e=e.length?e:t.filter(function(t){var e=t[0],n=t[1];return i.every(function(t){return 0<=d(e-t[0][0])&&0<=d(t[0][1]-e)&&0<=d(n-t[1][0])&&0<=d(t[1][1]-n)})})).map(function(t){return[d(t[0]),d(t[1])]})}function O(n){return function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var i=Array(t),r=0,e=0;e<n;e++)for(var o=arguments[e],a=0,c=o.length;a<c;a++,r++)i[r]=o[a];return i}(n.slice(1),[n[0]]).map(function(t,e){return[n[e],t]})}function Tt(t,e){var r,a,c,s,u,l,n;return e=e,r=(t=t).slice(),a=e.slice(),-1===$(r)&&r.reverse(),-1===$(a)&&a.reverse(),c=O(r),s=O(a),t=c.map(function(t){return P(t[0],t[1])}),u=s.map(function(t){return P(t[0],t[1])}),l=[],t.forEach(function(n,i){var r=c[i],o=[];u.forEach(function(t,e){t=Ot(Pt(n,t),[r,s[e]]);o.push.apply(o,t.map(function(t){return{index1:i,index2:e,pos:t,type:"intersection"}}))}),o.sort(function(t,e){return h(r[0],t.pos)-h(r[0],e.pos)}),l.push.apply(l,o),x(r[1],a)&&l.push({index1:i,index2:-1,pos:r[1],type:"inside"})}),s.forEach(function(t,n){var i,e;x(t[1],r)&&(i=!1,-1===(e=o(l,function(t){if(t.index2!==n)return!!i;i=!0}))&&(i=!1,e=o(l,function(t){var e=t.index1,t=t.index2;if(-1!==e||t+1!==n)return!!i;i=!0})),-1===e?l.push({index1:-1,index2:n,pos:t[1],type:"inside"}):l.splice(e,0,{index1:-1,index2:n,pos:t[1],type:"inside"}))}),n={},l.filter(function(t){t=t.pos,t=t[0]+"x"+t[1];return!n[t]&&(n[t]=!0)}).map(function(t){return t.pos})}function r(t,e,n){void 0===n&&(n=Math.sqrt(t.length));var i=[],r=t.length/n,o=e.length/r;if(!r)return e;if(!o)return t;for(var a=0;a<n;++a)for(var c=0;c<o;++c)for(var s=i[c*n+a]=0;s<r;++s)i[c*n+a]+=t[s*n+a]*e[c*r+s];return i}function Yt(t,e){return r(t,[1,0,0,0,0,Math.cos(e),Math.sin(e),0,0,-Math.sin(e),Math.cos(e),0,0,0,0,1],4)}function Xt(t,e){return r(t,[Math.cos(e),0,-Math.sin(e),0,0,1,0,0,Math.sin(e),0,Math.cos(e),0,0,0,0,1],4)}function Ft(t,e){return r(t,(t=e,e=4,n=Math.cos(t),t=Math.sin(t),(i=Kt(e))[0]=n,i[1]=t,i[e]=-t,i[e+1]=n,i));var n,i}function T(t,e){var n=e[0],i=e[1],e=e[2];return r(t,[void 0===n?1:n,0,0,0,0,void 0===i?1:i,0,0,0,0,void 0===e?1:e,0,0,0,0,1],4)}function Bt(t,e){var n=e[0],i=e[1],e=e[2];return r(t,[1,0,0,0,0,1,0,0,0,0,1,0,void 0===n?0:n,void 0===i?0:i,void 0===e?0:e,1],4)}function jt(t,e){return r(t,e,4)}function Kt(t){for(var e=t*t,n=[],i=0;i<e;++i)n[i]=i%(t+1)?0:1;return n}function Wt(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function At(t){return t=(I(t=t)?t:function(t){return q(t,"")}(t)).map(function(t){var e,n,i,t=!(t=/([^(]*)\(([\s\S]*)\)([\s\S]*)/g.exec(t=t))||t.length<4?{}:{prefix:t[1],value:t[2],suffix:t[3]},r=t.prefix,t=t.value,o=null,a=r,c="";return"translate"===r||"translateX"===r||"translate3d"===r?(o=Bt,c=[(i=s(t).map(function(t){return parseFloat(t)}))[0],void 0===(e=i[1])?0:e,void 0===(e=i[2])?0:e]):"translateY"===r?(o=Bt,c=[0,parseFloat(t),0]):"translateZ"===r?(o=Bt,c=[0,0,parseFloat(t)]):"scale"===r||"scale3d"===r?(o=T,c=[n=(i=s(t).map(function(t){return parseFloat(t)}))[0],void 0===(e=i[1])?n:e,void 0===(e=i[2])?1:e]):"scaleX"===r?(o=T,c=[n=parseFloat(t),1,1]):"scaleY"===r?(o=T,c=[1,parseFloat(t),1]):"scaleZ"===r?(o=T,c=[1,1,parseFloat(t)]):"rotate"===r||"rotateZ"===r||"rotateX"===r||"rotateY"===r?(e=(i=G(t)).unit,n=i.value,"rotate"===r||"rotateZ"===r?(a="rotateZ",o=Ft):"rotateX"===r?o=Yt:"rotateY"===r&&(o=Xt),c="rad"===e?n:n*Math.PI/180):"matrix3d"===r?(o=jt,c=s(t).map(function(t){return parseFloat(t)})):"matrix"===r?(o=jt,c=[(i=s(t).map(function(t){return parseFloat(t)}))[0],i[1],0,0,i[2],i[3],0,0,0,0,1,0,i[4],i[5],0,1]):a="",{name:r,functionName:a,value:t,matrixFunction:o,functionValue:c}}),n=Wt(),t.forEach(function(t){var e=t.matrixFunction,t=t.functionValue;e&&(n=e(n,t))}),n;var n}function Rt(t,e){n=t,e=[e[0],e[1]||0,e[2]||0,1],i=(n=r(t,e,t=void 0===(t=4)?e.length:t))[t-1];var n,i,e=n.map(function(t){return t/i}),t=e[3]||1;return[e[0]/t,e[1]/t,e[2]/t]}function It(t,e){void 0===e&&(e=document.body);for(var n=t,i=Wt();n;){i=jt(At(getComputedStyle(n).transform),i);if(n===e)break;n=n.parentElement}return(i=function(t,e){void 0===e&&(e=Math.sqrt(t.length));for(var n=t.slice(),i=Kt(e),r=0;r<e;++r){var o=e*r+r;if(!j(n[o],B))for(var a=r+1;a<e;++a)if(n[e*r+a]){v=g=d=p=f=h=l=u=s=c=void 0;for(var c=n,s=i,u=r,l=a,h=e,f=0;f<h;++f){var p=u+f*h,d=l+f*h,g=c[p],v=s[p];c[p]=c[d],c[d]=g,s[p]=s[d],s[d]=v}break}if(!j(n[o],B))return[];b=_=S=E=C=y=m=void 0;for(var m=n,y=i,C=r,E=e,S=n[o],_=0;_<E;++_){var b=C+_*E;m[b]/=S,y[b]/=S}for(a=0;a<e;++a){var k=a,D=n[a+r*e];if(j(D,B)&&r!==a){F=X=Y=T=O=P=x=M=w=void 0;for(var w=n,M=i,x=k,P=r,O=e,T=-D,Y=0;Y<O;++Y){var X=x+Y*O,F=P+Y*O;w[X]+=w[F]*T,M[X]+=M[F]*T}}}}return i}(i,4))[12]=0,i[13]=0,i[14]=0,i}function Nt(t,e){return document.elementFromPoint&&document.elementFromPoint(t,e)||null}function Lt(t,e,n){var i=t.tag,r=t.children,o=t.attributes,a=t.className,c=t.style,s=e||document.createElement(i);for(l in o)s.setAttribute(l,o[l]);var u=s.children;if(r.forEach(function(t,e){Lt(t,u[e],s)}),a&&a.split(" ").forEach(function(t){var e,n;n=t,((e=s).classList?e.classList.contains(n):e.className.match(new RegExp("(\\s|^)"+n+"(\\s|$)")))||(e=t,(n=s).classList?n.classList.add(e):n.className+=" "+e)}),c){var l,h=s.style;for(l in c)h[l]=c[l]}return!e&&n&&n.appendChild(s),s}function qt(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var e=e||{},r=e.className,o=e.style;return{tag:t,className:void 0===r?"":r,style:void 0===o?{}:o,attributes:function(t,e){var n={};for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}(e,["className","style"]),children:n}}function Gt(t,e,n){t!==e&&n(t,e)}function Ht(t,e,n){void 0===n&&(n=t.data.boundArea);var i=t.distX,i=void 0===i?0:i,r=t.distY,r=void 0===r?0:r,t=t.data,o=t.startX,t=t.startY;0<e&&(i=(0<=i?1:-1)*(e*(a=Math.sqrt((i*i+r*r)/(1+e*e)))),r=(0<=r?1:-1)*a),i=(0<=i?1:-1)*(n=(a=function(t,n,i,e){if(!e)return t.map(function(t,e){return Z(t,n[e],i[e])});var r=t[0],o=t[1],a=(c=U(t,n,!1,e=!0===e?r/o:e))[0],c=c[1],e=(t=U(t,i,!0,e))[0],t=t[1];return r<a||o<c?(r=a,o=c):(e<r||t<o)&&(r=e,o=t),[r,o]}([Math.abs(i),Math.abs(r)],[0,0],[i<0?o-n.left:n.right-o,r<0?t-n.top:n.bottom-t],!!e))[0]),r=(0<=r?1:-1)*(e=a[1]);var a=o+Math.min(0,i),o=t+Math.min(0,r);return{left:a,top:o,right:a+n,bottom:o+e,width:n,height:e}}function Zt(t){var t=t.getBoundingClientRect(),e=t.left,n=t.top,i=t.width,t=t.height;return{pos1:[e,n],pos2:[e+i,n],pos3:[e,n+t],pos4:[e+i,n+t]}}function Ut(t,e,n){var t=w(t,e),i=t.list,r=t.prevList,e=t.added,o=t.removed,t=t.maintained;return a(a(a([],e.map(function(t){return i[t]}),!0),o.map(function(t){return r[t]}),!0),n?t.map(function(t){t=t[1];return i[t]}):[],!0)}function Vt(t){for(var e=0,n=t.length,i=1;i<n;++i)e=Math.max(h(t[i],t[i-1]),e);return e}function zt(t,e,n,i){var r,o=document.createElement("style");return o.setAttribute("type","text/css"),o.setAttribute("data-styled-id",t),n.nonce&&o.setAttribute("nonce",n.nonce),o.innerHTML=(r=t,t=e,n.original?t:t.replace(/([^};{\s}][^};{]*|^\s*){/gm,function(t,e){e=e.trim();return(e?s(e):[""]).map(function(t){t=t.trim();return 0===t.indexOf("@")?t:-1<t.indexOf(":global")?t.replace(/\:global/g,""):-1<t.indexOf(":host")?""+t.replace(/\:host/g,"."+r):t?"."+r+" "+t:"."+r}).join(", ")+" {"})),(i||document.head||document.body).appendChild(o),o}Jt="rCS"+function(t){for(var e=5381,n=t.length;n;)e=33*e^t.charCodeAt(--n);return e>>>0}($t="\n:host {\n position: fixed;\n display: none;\n border: 1px solid #4af;\n background: rgba(68, 170, 255, 0.5);\n pointer-events: none;\n will-change: transform;\n z-index: 100;\n}\n").toString(36),X=0;var $t,Y,Jt,X,Qt,te={className:Jt,inject:function(t,e){void 0===e&&(e={});var n,i=function(t){if(t&&t.getRootNode){t=t.getRootNode();if(11===t.nodeType)return t}}(t),r=0===X;return(i||r)&&(n=zt(Jt,$t,e,i)),r&&(Y=n),i||++X,{destroy:function(){i?(t.removeChild(n),n=null):(0<X&&--X,0===X&&Y&&(Y.parentNode.removeChild(Y),Y=null))}}}},ee="selecto-selection ".concat(te.className),ne=["boundContainer","selectableTargets","selectByClick","selectFromInside","continueSelect","continueSelectWithoutDeselect","toggleContinueSelect","toggleContinueSelectWithoutDeselect","keyContainer","hitRate","scrollOptions","checkInput","preventDefault","ratio","getElementRect","preventDragFromInside","rootContainer","dragCondition","clickBySelectEnd"],e=a(["dragContainer","cspNonce","preventClickEventOnDrag","preventClickEventOnDragStart","preventRightClick"],ne,!0),Ct={boundContainer:null,portalContainer:null,container:null,dragContainer:null,selectableTargets:Array,selectByClick:Boolean,selectFromInside:Boolean,continueSelect:Boolean,toggleContinueSelect:Array,toggleContinueSelectWithoutDeselect:Array,keyContainer:null,hitRate:Number,scrollOptions:Object,checkInput:Boolean,preventDefault:Boolean,cspNonce:String,ratio:Number,getElementRect:Function,preventDragFromInside:Boolean,rootContainer:Object,dragCondition:Function,clickBySelectEnd:Boolean,continueSelectWithoutDeselect:Boolean,preventClickEventOnDragStart:Boolean,preventClickEventOnDrag:Boolean},ie=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return K(e,t),e}(function(n){function t(t){void 0===t&&(t={});var d=n.call(this)||this,e=(d.selectedTargets=[],d.dragScroll=new pt,d._onDragStart=function(t,e){var n=t.data,i=t.clientX,r=t.clientY,o=t.inputEvent,a=d.options,c=a.selectFromInside,s=a.selectByClick,u=a.rootContainer,l=a.boundContainer,h=a.preventDragFromInside,h=void 0===h||h,f=a.clickBySelectEnd,a=a.dragCondition;if(!a||a(t)){n.data={},n.innerWidth=window.innerWidth,n.innerHeight=window.innerHeight,d.findSelectableTargets(n),n.startSelectedTargets=d.selectedTargets,n.scaleMatrix=Wt(),n.containerX=0;var a={left:-1/(n.containerY=0),top:-1/0,right:1/0,bottom:1/0},p=(u&&(p=d.container.getBoundingClientRect(),n.containerX=p.left,n.containerY=p.top,n.scaleMatrix=It(d.container,u)),l&&((l=(p=v(l)&&"element"in l?g({left:!0,top:!0,bottom:!0,right:!0},l):{element:l,left:!0,top:!0,bottom:!0,right:!0}).element)&&(l=(m(l)?document.querySelector(l):!0===l?d.container:l).getBoundingClientRect(),p.left&&(a.left=l.left),p.top&&(a.top=l.top),p.right&&(a.right=l.right),p.bottom&&(a.bottom=l.bottom))),n.boundArea=a,{left:i,top:r,right:i,bottom:r,width:0,height:0}),l=[],e=0<(l=c&&(!s||f)?l:(a=d._findElement(e||Nt(i,r),n.selectableTargets))?[a]:[]).length,a=!c&&e;if(a&&!s)return t.stop(),!1;c=o.type;return t.isClick||"mousedown"!==c&&"touchstart"!==c||d.emit("dragStart",g(g({},t),{data:n.data}))?(d.continueSelect?(l=Ut(d.selectedTargets,l,d.continueSelectWithoutDeselect),n.startPassedTargets=d.selectedTargets):n.startPassedTargets=[],d._select(l,p,t,!0),n.startX=i,n.startY=r,n.selectFlag=!1,n.preventDragFromInside=!1,o.target&&(e=Rt(n.scaleMatrix,[i-n.containerX,r-n.containerY]),d.target.style.cssText+="position: ".concat(u?"absolute":"fixed",";")+"left:0px;top:0px;"+"transform: translate(".concat(e[0],"px, ").concat(e[1],"px)")),a&&s&&!f?(o.preventDefault(),h&&(d._selectEnd(n.startSelectedTargets,n.startPassedTargets,p,t),n.preventDragFromInside=!0)):(n.selectFlag=!0,"touchstart"===c&&o.preventDefault(),(l=d.options.scrollOptions)&&l.container&&d.dragScroll.dragStart(t,l),f&&(n.selectFlag=!1,t.preventDrag())),!0):(t.stop(),!1)}t.stop()},d._onDrag=function(t){if(t.data.selectFlag){var e=d.scrollOptions;if(null!=e&&e.container&&d.dragScroll.drag(t,e))return}d._checkSelected(t)},d._onDragEnd=function(t){var e=t.data,n=t.inputEvent,i=Ht(t,d.options.ratio),r=e.selectFlag;n&&d.emit("dragEnd",g(g({isDouble:!!t.isDouble,isClick:!!t.isClick,isDrag:!1,isSelect:r},t),{data:e.data,rect:i})),d.target.style.cssText+="display: none;",r?(e.selectFlag=!1,d.dragScroll.dragEnd()):d.selectByClick&&d.clickBySelectEnd&&(n=d._findElement(Nt(t.clientX,t.clientY),e.selectableTargets),d._select(n?[n]:[],i,t)),e.preventDragFromInside||d._selectEnd(e.startSelectedTargets,e.startPassedTargets,i,t)},d._onKeyDown=function(t){var e,n=d.options,i=!1;d._keydownContinueSelect||(e=d._sameCombiKey(t,n.toggleContinueSelect),i=d._keydownContinueSelect=e),d._keydownContinueSelectWithoutDeselection||(e=d._sameCombiKey(t,n.toggleContinueSelectWithoutDeselect),d._keydownContinueSelectWithoutDeselection=e,i=i||e),i&&d.emit("keydown",{keydownContinueSelect:d._keydownContinueSelect,keydownContinueSelectWithoutDeselection:d._keydownContinueSelectWithoutDeselection})},d._onKeyUp=function(t){var e,n=d.options,i=!1;d._keydownContinueSelect&&(e=d._sameCombiKey(t,n.toggleContinueSelect,!0),d._keydownContinueSelect=!e,i=e),d._keydownContinueSelectWithoutDeselection&&(e=d._sameCombiKey(t,n.toggleContinueSelectWithoutDeselect,!0),d._keydownContinueSelectWithoutDeselection=!e,i=i||e),i&&d.emit("keyup",{keydownContinueSelect:d._keydownContinueSelect,keydownContinueSelectWithoutDeselection:d._keydownContinueSelectWithoutDeselection})},d._onBlur=function(){(d._keydownContinueSelect||d._keydownContinueSelectWithoutDeselection)&&(d._keydownContinueSelect=!1,d._keydownContinueSelectWithoutDeselection=!1,d.emit("keyup",{keydownContinueSelect:d._keydownContinueSelect,keydownContinueSelectWithoutDeselection:d._keydownContinueSelectWithoutDeselection}))},d._onDocumentSelectStart=function(e){var t,n;d.gesto.isFlag()&&(t=(t=(t=d.dragContainer)===window?document.documentElement:t)instanceof Element?[t]:[].slice.call(t),n=e.target,t.some(function(t){if(t===n||t.contains(n))return e.preventDefault(),!0}))},d.target=t.portalContainer,t.container),t=(d.options=g({portalContainer:null,container:null,dragContainer:null,selectableTargets:[],selectByClick:!0,selectFromInside:!0,clickBySelectEnd:!1,hitRate:100,continueSelect:!1,continueSelectWithoutDeselect:!1,toggleContinueSelect:null,toggleContinueSelectWithoutDeselect:null,keyContainer:null,scrollOptions:void 0,checkInput:!1,preventDefault:!1,boundContainer:!1,preventDragFromInside:!0,dragCondition:null,rootContainer:null,getElementRect:Zt,cspNonce:"",ratio:0},t),d.options.portalContainer);return t&&(e=t.parentElement),d.container=e||document.body,d.initElement(),d.initDragScroll(),d.setKeyController(),d}K(t,n);var i,r,e=t.prototype;return e.setSelectedTargets=function(t){var e=this.selectedTargets,n=w(e,t),i=n.added,r=n.removed,o=n.prevList,a=n.list;return this.selectedTargets=t,{added:i.map(function(t){return a[t]}),removed:r.map(function(t){return o[t]}),beforeSelected:e,selected:t}},e.setSelectedTargetsByPoints=function(t,e){var n=Math.min(t[0],e[0]),i=Math.min(t[1],e[1]),r=Math.max(t[0],e[0]),t=Math.max(t[1],e[1]),e={left:n,top:i,right:r,bottom:t,width:r-n,height:t-i},r={ignoreClick:!0},n=(this.findSelectableTargets(r),this.hitTest(e,r)),t=this.setSelectedTargets(n);return g(g({},t),{rect:e})},e.selectTargetsByPoints=function(t,e){var t=new MouseEvent("mousedown",{clientX:t[0],clientY:t[1],cancelable:!0,bubbles:!0}),n=new MouseEvent("mousemove",{clientX:e[0],clientY:e[1],cancelable:!0,bubbles:!0}),e=new MouseEvent("mousemove",{clientX:e[0],clientY:e[1],cancelable:!0,bubbles:!0}),i=this.gesto;!1!==i.onDragStart(t)&&(i.onDrag(n),i.onDragEnd(e))},e.getSelectedTargets=function(){return this.selectedTargets},e.triggerDragStart=function(t){return this.gesto.triggerDragStart(t),this},e.destroy=function(){this.off(),this.keycon&&this.keycon.destroy(),this.gesto.unset(),this.injectResult.destroy(),_(document,"selectstart",this._onDocumentSelectStart),this.keycon=null,this.gesto=null,this.injectResult=null,this.target=null,this.container=null,this.options=null},e.getElementPoints=function(t){var e,n,i,r,o,a,c,s,u,l=this.getElementRect||Zt,h=l(t),h=[h.pos1,h.pos2,h.pos4,h.pos3];return l!==Zt?(l=t.getBoundingClientRect(),t=h,e=(l=l).width,n=l.height,i=l.left,r=l.top,o=(l=xt(t)).minX,a=l.minY,c=l.maxX,l=l.maxY,s=e/(c-o),u=n/(l-a),t.map(function(t){return[i+(t[0]-o)*s,r+(t[1]-a)*u]})):h},e.getSelectableElements=function(){var n=[];return this.options.selectableTargets.forEach(function(t){var e;N(t)?(e=t())&&n.push.apply(n,[].slice.call(e)):t instanceof Node?n.push(t):v(t)?n.push(t.value||t.current):(e=[].slice.call(document.querySelectorAll(t)),n.push.apply(n,e))}),n},e.checkScroll=function(){var t;!this.gesto.isFlag()||null!=(t=this.scrollOptions)&&t.container&&this.dragScroll.checkScroll(g({inputEvent:this.gesto.getCurrentEvent()},t))},e.findSelectableTargets=function(t){var e=this,n=(void 0===t&&(t=this.gesto.getEventData()),this.getSelectableElements()),i=n.map(function(t){return e.getElementPoints(t)});t.selectableTargets=n,t.selectablePoints=i,this._refreshGroups(t)},e.clickTarget=function(t,e){var n="touches"in(i=t)?{clientX:(n=i.touches[0]||i.changedTouches[0]).clientX,clientY:n.clientY}:{clientX:i.clientX,clientY:i.clientY},i={data:{selectFlag:!1},clientX:n.clientX,clientY:n.clientY,inputEvent:t,isClick:!0,stop:function(){return!1}};return this._onDragStart(i,e)&&this._onDragEnd(i),this},e.setKeyController=function(){var t=this.options,e=t.keyContainer,n=t.toggleContinueSelect,t=t.toggleContinueSelectWithoutDeselect;this.keycon&&(this.keycon.destroy(),this.keycon=null),(n||t)&&(this.keycon=new Mt(e||window),this.keycon.keydown(this._onKeyDown).keyup(this._onKeyUp).on("blur",this._onBlur))},e.setKeyEvent=function(){var t=this.options,e=t.toggleContinueSelect,t=t.toggleContinueSelectWithoutDeselect;!e&&!t||this.keycon||this.setKeyController()},e.setKeyContainer=function(t){var e=this,n=this.options;Gt(n.keyContainer,t,function(){n.keyContainer=t,e.setKeyController()})},e.getContinueSelect=function(){var t=this.options,e=t.continueSelect;return t.toggleContinueSelect&&this._keydownContinueSelect?!e:e},e.getContinueSelectWithoutDeselect=function(){var t=this.options,e=t.continueSelectWithoutDeselect;return t.toggleContinueSelectWithoutDeselect&&this._keydownContinueSelectWithoutDeselection?!e:e},e.setToggleContinueSelect=function(t){var e=this,n=this.options;Gt(n.toggleContinueSelect,t,function(){n.toggleContinueSelect=t,e.setKeyEvent()})},e.setToggleContinueSelectWithoutDeselect=function(t){var e=this,n=this.options;Gt(n.toggleContinueSelectWithoutDeselect,t,function(){n.toggleContinueSelectWithoutDeselect=t,e.setKeyEvent()})},e.setPreventDefault=function(t){this.gesto.options.preventDefault=t},e.setCheckInput=function(t){this.gesto.options.checkInput=t},e.initElement=function(){this.target=Lt(qt("div",{className:ee}),this.target,this.container);var t=this.target,e=this.options,n=e.dragContainer,i=e.checkInput,r=e.preventDefault,o=e.preventClickEventOnDragStart,a=e.preventClickEventOnDrag,c=e.preventClickEventByCondition,e=e.preventRightClick,e=void 0===e||e;this.dragContainer="string"==typeof n?[].slice.call(document.querySelectorAll(n)):n||this.target.parentNode,this.gesto=new it(this.dragContainer,{checkWindowBlur:!0,container:window,checkInput:i,preventDefault:r,preventClickEventOnDragStart:o,preventClickEventOnDrag:a,preventClickEventByCondition:c,preventRightClick:e}).on({dragStart:this._onDragStart,drag:this._onDrag,dragEnd:this._onDragEnd}),S(document,"selectstart",this._onDocumentSelectStart),this.injectResult=te.inject(t,{nonce:this.options.cspNonce})},e.hitTest=function(t,e){var n,i=this.options,r=i.hitRate,o=i.selectByClick,i=t.left,a=t.top,c=t.right,t=t.bottom,s=e.innerGroups,u=e.innerWidth,l=e.innerHeight,h=e.clientX,f=e.clientY,p=e.ignoreClick,d=[[i,a],[c,a],[c,t],[i,t]],g=G("".concat(r)),v=function(t){var e=!p&&x([h,f],t);if(o&&e)return!0;e=Tt(d,t);if(!e.length)return!1;var n=M(e),i=0;return 0===n&&0===M(t)?(i=Vt(t),n=Vt(e)):i=M(t),"px"===g.unit?n>=g.value:Z(Math.round(n/i*100),0,100)>=Math.min(100,g.value)};if(!s)return r=e.selectableTargets,n=e.selectablePoints,r.filter(function(t,e){return v(n[e])});for(var m=[],e=Math.floor(i/u),y=Math.floor(c/u),C=Math.floor(a/l),E=Math.floor(t/l),S=e;S<=y;++S){var _=s[S];if(_)for(var b=C;b<=E;++b)!function(t){t=_[t];if(!t)return;var e=t.points,n=t.targets;e.forEach(function(t,e){v(t)&&m.push(n[e])})}(b)}var k=m;if("undefined"==typeof Map)return k.filter(function(t,e){return k.indexOf(t)===e});var D=new Map;return k.filter(function(t){return!D.has(t)&&(D.set(t,!0),!0)})},e.initDragScroll=function(){var o=this;this.dragScroll.on("scroll",function(t){var e=t.container,t=t.direction;o.emit("scroll",{container:e,direction:t})}).on("move",function(t){var e,n=t.offsetX,i=t.offsetY,t=t.inputEvent,r=o.gesto;r&&r.isFlag()&&(e=(r=o.gesto.getEventData()).boundArea,r.startX-=n,r.startY-=i,r.selectablePoints.forEach(function(t){t.forEach(function(t){t[0]-=n,t[1]-=i})}),o._refreshGroups(r),e.left-=n,e.right-=n,e.top-=i,e.bottom-=i,o.gesto.scrollBy(n,i,t.inputEvent,!1),o._checkSelected(o.gesto.getCurrentEvent()))})},e._select=function(t,e,n,i){var r=n.inputEvent,n=n.data,t=this.setSelectedTargets(t);i&&this.emit("selectStart",g(g({},t),{rect:e,inputEvent:r,data:n.data})),(t.added.length||t.removed.length)&&this.emit("select",g(g({},t),{rect:e,inputEvent:r,data:n.data}))},e._selectEnd=function(t,e,n,i){var r=i.inputEvent,o=i.isDouble,a=i.data,c=w(t,this.selectedTargets),s=c.added,u=c.removed,l=c.prevList,h=c.list,c=w(e,this.selectedTargets),f=c.added,p=c.removed,d=c.prevList,g=c.list,c=r&&r.type,c="mousedown"===c||"touchstart"===c;this.emit("selectEnd",{startSelected:t,beforeSelected:e,selected:this.selectedTargets,added:s.map(function(t){return h[t]}),removed:u.map(function(t){return l[t]}),afterAdded:f.map(function(t){return g[t]}),afterRemoved:p.map(function(t){return d[t]}),isDragStart:c,isClick:!!i.isClick,isDouble:!!o,rect:n,inputEvent:r,data:a.data})},e._checkSelected=function(t,e){void 0===e&&(e=Ht(t,this.options.ratio));var n=t.data,i=e.top,r=e.left,o=e.width,a=e.height,c=n.selectFlag,s=n.containerX,u=n.containerY,l=n.scaleMatrix,r=Rt(l,[r-s,i-u]),s=Rt(l,[o,a]),i=[];c&&(this.target.style.cssText+="display: block;left:0px;top:0px;"+"transform: translate(".concat(r[0],"px, ").concat(r[1],"px);")+"width:".concat(s[0],"px;height:").concat(s[1],"px;"),u=this.hitTest(e,n),i=Ut(n.startPassedTargets,u,this.continueSelect&&this.continueSelectWithoutDeselect)),!1===this.emit("drag",g(g({},t),{data:n.data,isSelect:c,rect:e}))?(this.target.style.cssText+="display: none;",t.stop()):c&&this._select(i,e,t)},e._sameCombiKey=function(t,e,n){if(!e)return!1;var i,r=Dt(t.inputEvent,t.key),e=[].concat(e),e=I(e[0])?e:[e];return n?(i=t.key,e.some(function(t){return t.some(function(t){return t===i})})):e.some(function(t){return t.every(function(t){return-1<r.indexOf(t)})})},e._findElement=function(t,e){for(var n=t;n&&!(-1<e.indexOf(n));)n=n.parentElement;return n},e._refreshGroups=function(t){var l,e,h,f=t.innerWidth,p=t.innerHeight;f&&p?(l=t.selectableTargets,e=t.selectablePoints,h={},e.forEach(function(t,e){var n=1/0,i=-1/0,r=1/0,o=-1/0;t.forEach(function(t){var e=Math.floor(t[0]/f),t=Math.floor(t[1]/p);n=Math.min(e,n),i=Math.max(e,i),r=Math.min(t,r),o=Math.max(t,o)});for(var a=n;a<=i;++a)for(var c=r;c<=o;++c){h[a]=h[a]||{},h[a][c]=h[a][c]||{points:[],targets:[]};var s=h[a][c],u=s.targets,s=s.points;u.push(l[e]),s.push(t)}}),t.innerGroups=h):t.innerGroups=null},function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var c=t.length-1;0<=c;c--)(r=t[c])&&(a=(o<3?r(a):3<o?r(e,n,a):r(e,n))||a);return 3<o&&a&&Object.defineProperty(e,n,a),a}([(i=ne,r=function(t,e){var n={enumerable:!0,configurable:!0,get:function(){return this.options[e]}},i=H("get ".concat(e)),r=(t[i]?n.get=function(){return this[i]()}:n.get=function(){return this.options[e]},H("set ".concat(e)));t[r]?n.set=function(t){this[r](t)}:n.set=function(t){this.options[e]=t},Object.defineProperty(t,e,n)},function(t){var e=t.prototype;i.forEach(function(t){r(e,t)})})],t)}(t)),re={__proto__:null,default:ie,OPTIONS:e,OPTION_TYPES:Ct,PROPERTIES:ne,EVENTS:["dragStart","drag","dragEnd","selectStart","select","selectEnd","keydown","keyup","scroll"],METHODS:["clickTarget","getSelectableElements","setSelectedTargets","getElementPoints","getSelectedTargets","findSelectableTargets","triggerDragStart","checkScroll","selectTargetsByPoints","setSelectedTargetsByPoints"],CLASS_NAME:ee};for(Qt in re)ie[Qt]=re[Qt];return ie}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Selecto=e()}(this,function(){"use strict";var F=function(t,e){return(F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function K(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}F(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var v=function(){return(v=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function a(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||((i=i||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}var W="function",I="string",A=[{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:'\\"',close:'\\"'},{open:"\\'",close:"\\'"}],B=1e-7;function g(t){return t&&"object"==typeof t}function R(t){return Array.isArray(t)}function m(t){return typeof t===I}function N(t){return typeof t===W}function L(t,e,n,i,r){if(y(t,e,n))return n;for(var o,a=t,s=e,c=i,u=r,l=n+1;l<c;++l){var h=function(t){var e,n,i=s[t].trim();return i!==a.close||y(a,s,t)?(e=t,-1===(e=(n=E(u,function(t){return t.open===i}))?L(n,s,t,c,u):e)?(o=t,"break"):void(o=t=e)):{value:t}}(l);if(l=o,"object"==typeof h)return h.value;if("break"===h)break}return-1}function y(t,e,n){if(!t.ignore)return null;e=e.slice(Math.max(n-3,0),n+3).join("");return new RegExp(t.ignore).exec(e)}function q(t,e){var e=m(e)?{separator:e}:e,n=e.separator,o=void 0===n?",":n,a=e.isSeparateFirst,s=e.isSeparateOnlyOpenClose,n=e.isSeparateOpenClose,c=void 0===n?s:n,n=e.openCloseCharacters,u=void 0===n?A:n,e=u.map(function(t){var e=t.open,t=t.close;return e===t?e:e+"|"+t}).join("|"),n=new RegExp("(\\s*"+o+"\\s*|"+e+"|\\s+)","g"),l=t.split(n).filter(Boolean),h=l.length,f=[],p=[];function d(){return p.length&&(f.push(p.join("")),p=[])}for(var v,i=0;i<h;++i){var r=function(t){var e=l[t].trim(),n=t,i=E(u,function(t){return t.open===e}),r=E(u,function(t){return t.close===e});if(i){if(-1!==(n=L(i,l,t,h,u))&&c)return d()&&a?(v=t,"break"):(f.push(l.slice(t,n+1).join("")),t=n,a?(v=t,"break"):(v=t,"continue"))}else{if(r&&!y(r,l,t))throw new Error("invalid format: "+r.close);if(i=e,!((""!==(r=o)&&" "!=r||""!==i&&" "!=i)&&i!==r||s))return d(),a?(v=t,"break"):(v=t,"continue")}p.push(l.slice(t,(n=-1===n?h-1:n)+1).join("")),v=t=n}(i),i=v;if("break"===r)break}return p.length&&f.push(p.join("")),f}function c(t){return q(t,",")}function G(t){t=/^([^\d|e|\-|\+]*)((?:\d|\.|-|e-|e\+)+)(\S*)$/g.exec(t);if(!t)return{prefix:"",unit:"",value:NaN};var e=t[1],n=t[2];return{prefix:e,unit:t[3],value:parseFloat(n)}}function H(t){return t.replace(/[\s-_]([a-z])/g,function(t,e){return e.toUpperCase()})}function C(){return Date.now?Date.now():(new Date).getTime()}function o(t,e,n){void 0===n&&(n=-1);for(var i=t.length,r=0;r<i;++r)if(e(t[r],r,t))return r;return n}function E(t,e,n){e=o(t,e);return-1<e?t[e]:n}function Z(t,e,n){return Math.max(e,Math.min(t,n))}function U(t,i,r,e){return void 0===e&&(e=t[0]/t[1]),[[j(i[0],B),j(i[0]/e,B)],[j(i[1]*e,B),j(i[1],B)]].filter(function(t){return t.every(function(t,e){var e=i[e],n=j(e,B);return r?t<=e||t<=n:e<=t||n<=t})})[0]||t}function V(t,e){var n=e[0]-t[0],e=e[1]-t[1],t=Math.atan2(e,n);return 0<=t?t:t+2*Math.PI}function z(o){return[0,1].map(function(e){for(var t=o.map(function(t){return t[e]}),n=t.length,i=0,r=n-1;0<=r;--r)i+=t[r];return n?i/n:0})}function $(t){var e=z(t),n=V(e,t[0]),e=V(e,t[1]);return n<e&&e-n<Math.PI||e<n&&e-n<-Math.PI?1:-1}function h(t,e){return Math.sqrt(Math.pow((e?e[0]:0)-t[0],2)+Math.pow((e?e[1]:0)-t[1],2))}function j(t,e){if(!e)return t;var n=1/e;return Math.round(t/e)/n}function _(t,e,n,i){t.addEventListener(e,n,i)}function S(t,e,n,i){t.removeEventListener(e,n,i)}var J=function(){return(J=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};var t=function(){function t(){this._events={}}var e=t.prototype;return e.on=function(t,e){if(g(t))for(var n in t)this.on(n,t[n]);else this._addEvent(t,e,{});return this},e.off=function(t,e){if(t)if(g(t))for(var n in t)this.off(n);else{var i,r;e?(i=this._events[t])&&-1<(r=o(i,function(t){return t.listener===e}))&&i.splice(r,1):this._events[t]=[]}else this._events={};return this},e.once=function(e,t){var n=this;return t&&this._addEvent(e,t,{once:!0}),new Promise(function(t){n._addEvent(e,t,{once:!0})})},e.emit=function(e,n){var i=this,t=(void 0===n&&(n={}),this._events[e]);if(!e||!t)return!0;var r=!1;return n.eventType=e,n.stop=function(){r=!0},n.currentTarget=this,function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var i=Array(t),r=0,e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,r++)i[r]=o[a];return i}(t).forEach(function(t){t.listener(n),t.once&&i.off(e,t.listener)}),!r},e.trigger=function(t,e){return this.emit(t,e=void 0===e?{}:e)},e._addEvent=function(t,e,n){var i=this._events;i[t]=i[t]||[],i[t].push(J({listener:e},n))},t}(),Q=function(t,e){return(Q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var b=function(){return(b=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function e(t){return 180*(e=[t[0].clientX,t[0].clientY],t=[t[1].clientX,t[1].clientY],n=t[0]-e[0],t=t[1]-e[1],(0<=(e=Math.atan2(t,n))?e:e+2*Math.PI)/Math.PI);var e,n}function k(t){if(!t)return[];if(t.touches){for(var e=t.touches,n=Math.min(e.length,2),i=[],r=0;r<n;++r)i.push(et(e[r]));return i}return[et(t)]}function tt(t,e,n){var i=n.length,t=u(t,i),r=t.clientX,o=t.clientY,a=t.originalClientX,t=t.originalClientY,e=u(e,i),s=e.clientX,e=e.clientY,n=u(n,i);return{clientX:a,clientY:t,deltaX:r-s,deltaY:o-e,distX:r-n.clientX,distY:o-n.clientY}}function n(t){return Math.sqrt(Math.pow(t[0].clientX-t[1].clientX,2)+Math.pow(t[0].clientY-t[1].clientY,2))}function et(t){return{clientX:t.clientX,clientY:t.clientY}}function u(t,e){void 0===e&&(e=t.length);for(var n={clientX:0,clientY:0,originalClientX:0,originalClientY:0},i=0;i<e;++i){var r=t[i];n.originalClientX+="originalClientX"in r?r.originalClientX:r.clientX,n.originalClientY+="originalClientY"in r?r.originalClientY:r.clientY,n.clientX+=r.clientX,n.clientY+=r.clientY}return e?{clientX:n.clientX/e,clientY:n.clientY/e,originalClientX:n.originalClientX/e,originalClientY:n.originalClientY/e}:n}var D=function(){function t(t){this.prevClients=[],this.startClients=[],this.movement=0,this.length=0,this.startClients=t,this.prevClients=t,this.length=t.length}return t.prototype.getAngle=function(t){return e(t=void 0===t?this.prevClients:t)},t.prototype.getRotation=function(t){return e(t=void 0===t?this.prevClients:t)-e(this.startClients)},t.prototype.getPosition=function(t,e){var n=tt((t=void 0===t?this.prevClients:t)||this.prevClients,this.prevClients,this.startClients),i=n.deltaX,r=n.deltaY;return this.movement+=Math.sqrt(i*i+r*r),this.prevClients=t,n},t.prototype.getPositions=function(n){void 0===n&&(n=this.prevClients);var i=this.prevClients;return this.startClients.map(function(t,e){return tt([n[e]],[i[e]],[t])})},t.prototype.getMovement=function(t){var e=this.movement;if(!t)return e;var t=u(t,this.length),n=u(this.prevClients,this.length),i=t.clientX-n.clientX,t=t.clientY-n.clientY;return Math.sqrt(i*i+t*t)+e},t.prototype.getDistance=function(t){return n(t=void 0===t?this.prevClients:t)},t.prototype.getScale=function(t){return n(t=void 0===t?this.prevClients:t)/n(this.startClients)},t.prototype.move=function(e,n){this.startClients.forEach(function(t){t.clientX-=e,t.clientY-=n}),this.prevClients.forEach(function(t){t.clientX-=e,t.clientY-=n})},t}(),nt=["textarea","input"],it=function(o){function t(){this.constructor=e}var e,n;function i(t,e){void 0===e&&(e={});var n,v=o.call(this)||this,t=(v.options={},v.flag=!1,v.pinchFlag=!1,v.data={},v.isDrag=!1,v.isPinch=!1,v.isMouse=!1,v.isTouch=!1,v.clientStores=[],v.targets=[],v.prevTime=0,v.doubleFlag=!1,v._dragFlag=!1,v._isTrusted=!1,v._isMouseEvent=!1,v._isSecondaryButton=!1,v._preventMouseEvent=!1,v.onDragStart=function(t,e){if(void 0===e&&(e=!0),v.flag||!1!==t.cancelable){var n=v.options,i=n.container,r=n.pinchOutside,o=n.preventWheelClick,a=n.preventRightClick,s=n.preventDefault,c=n.checkInput,u=n.preventClickEventOnDragStart,l=n.preventClickEventOnDrag,n=n.preventClickEventByCondition,h=v.isTouch,f=!v.flag;if(v._isSecondaryButton=3===t.which||2===t.button,o&&(2===t.which||1===t.button)||a&&(3===t.which||2===t.button))return v.stop(),!1;if(f){o=document.activeElement,a=t.target;if(a){var p=a.tagName.toLowerCase(),p=-1<nt.indexOf(p),d=a.isContentEditable;if(p||d){if(c||o===a)return!1;if(o&&d&&o.isContentEditable&&o.contains(a))return!1}else(s||"touchstart"===t.type)&&o&&(p=o.tagName.toLowerCase(),(o.isContentEditable||-1<nt.indexOf(p))&&o.blur());(u||l||n)&&_(window,"click",v._onClick,!0)}v.clientStores=[new D(k(t))],v.flag=!0,v.isDrag=!1,v._isTrusted=e,v._dragFlag=!0,v.data={},v.doubleFlag=C()-v.prevTime<200,v._isMouseEvent=(c=t)&&(-1<c.type.indexOf("mouse")||"button"in c),!v._isMouseEvent&&v._preventMouseEvent&&(v._preventMouseEvent=!1),!1===(v._preventMouseEvent||v.emit("dragStart",b(b({data:v.data,datas:v.data,inputEvent:t,isMouseEvent:v._isMouseEvent,isSecondaryButton:v._isSecondaryButton,isTrusted:e,isDouble:v.doubleFlag},v.getCurrentStore().getPosition()),{preventDefault:function(){t.preventDefault()},preventDrag:function(){v._dragFlag=!1}})))&&v.stop(),v._isMouseEvent&&v.flag&&s&&t.preventDefault()}if(!v.flag)return!1;d=0;f?(v._attchDragEvent(),h&&r&&(d=setTimeout(function(){_(i,"touchstart",v.onDragStart,{passive:!1})}))):h&&r&&S(i,"touchstart",v.onDragStart),v.flag&&((a=t).touches&&2<=a.touches.length)&&(clearTimeout(d),f&&t.touches.length!==t.changedTouches.length||v.pinchFlag||v.onPinchStart(t))}},v.onDrag=function(t,e){if(v.flag){var n=v.options.preventDefault,n=(!v._isMouseEvent&&n&&t.preventDefault(),k(t)),i=v.moveClients(n,t,!1);if(v._dragFlag){if(v.pinchFlag||i.deltaX||i.deltaY)if(!1===(v._preventMouseEvent||v.emit("drag",b(b({},i),{isScroll:!!e,inputEvent:t}))))return void v.stop();v.pinchFlag&&v.onPinch(t,n)}v.getCurrentStore().getPosition(n,!0)}},v.onDragEnd=function(t){var e,n,i,r,o,a;v.flag&&(a=(i=v.options).pinchOutside,e=i.container,o=i.preventClickEventOnDrag,r=i.preventClickEventOnDragStart,i=i.preventClickEventByCondition,n=v.isDrag,(o||r||i)&&requestAnimationFrame(function(){v._allowClickEvent()}),i||r||!o||n||v._allowClickEvent(),v.isTouch&&a&&S(e,"touchstart",v.onDragStart),v.pinchFlag&&v.onPinchEnd(t),0!==(i=null!=t&&t.touches?k(t):[]).length&&v.options.keepDragging?v._addStore(new D(i)):v.flag=!1,r=v._getPosition(),o=C(),a=!n&&v.doubleFlag,v.prevTime=n||a?0:o,v.flag||(v._dettachDragEvent(),v._preventMouseEvent||v.emit("dragEnd",b({data:v.data,datas:v.data,isDouble:a,isDrag:n,isClick:!n,isMouseEvent:v._isMouseEvent,isSecondaryButton:v._isSecondaryButton,inputEvent:t,isTrusted:v._isTrusted},r)),v.clientStores=[],v._isMouseEvent||(v._preventMouseEvent=!0,requestAnimationFrame(function(){requestAnimationFrame(function(){v._preventMouseEvent=!1})}))))},v.onBlur=function(){v.onDragEnd()},v._allowClickEvent=function(){S(window,"click",v._onClick,!0)},v._onClick=function(t){v._allowClickEvent(),v._preventMouseEvent=!1;var e=v.options.preventClickEventByCondition;null!=e&&e(t)||(t.stopPropagation(),t.preventDefault())},v._onContextMenu=function(t){v.options.preventRightClick?v.onDragEnd(t):t.preventDefault()},v._passCallback=function(){},[].concat(t)),e=(v.options=b({checkInput:!1,container:1<t.length?window:t[0],preventRightClick:!0,preventWheelClick:!0,preventClickEventOnDragStart:!1,preventClickEventOnDrag:!1,preventClickEventByCondition:null,preventDefault:!0,checkWindowBlur:!1,keepDragging:!1,pinchThreshold:0,events:["touch","mouse"]},e),v.options),i=e.container,r=e.events,e=e.checkWindowBlur;return v.isTouch=-1<r.indexOf("touch"),v.isMouse=-1<r.indexOf("mouse"),v.targets=t,v.isMouse&&(t.forEach(function(t){_(t,"mousedown",v.onDragStart),_(t,"mousemove",v._passCallback)}),_(i,"contextmenu",v._onContextMenu)),e&&_(window,"blur",v.onBlur),v.isTouch&&(n={passive:!1},t.forEach(function(t){_(t,"touchstart",v.onDragStart,n),_(t,"touchmove",v._passCallback,n)})),v}return Q(e=i,n=o),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t),i.prototype.stop=function(){this.isDrag=!1,this.data={},this.clientStores=[],this.pinchFlag=!1,this.doubleFlag=!1,this.prevTime=0,this.flag=!1,this._allowClickEvent(),this._dettachDragEvent()},i.prototype.getMovement=function(t){return this.getCurrentStore().getMovement(t)+this.clientStores.slice(1).reduce(function(t,e){return t+e.movement},0)},i.prototype.isDragging=function(){return this.isDrag},i.prototype.isFlag=function(){return this.flag},i.prototype.isPinchFlag=function(){return this.pinchFlag},i.prototype.isDoubleFlag=function(){return this.doubleFlag},i.prototype.isPinching=function(){return this.isPinch},i.prototype.scrollBy=function(t,e,n,i){void 0===i&&(i=!0),this.flag&&(this.clientStores[0].move(t,e),i&&this.onDrag(n,!0))},i.prototype.move=function(t,e){var n=t[0],i=t[1],t=this.getCurrentStore().prevClients;return this.moveClients(t.map(function(t){var e=t.clientX,t=t.clientY;return{clientX:e+n,clientY:t+i,originalClientX:e,originalClientY:t}}),e,!0)},i.prototype.triggerDragStart=function(t){this.onDragStart(t,!1)},i.prototype.setEventData=function(t){var e,n=this.data;for(e in t)n[e]=t[e];return this},i.prototype.setEventDatas=function(t){return this.setEventData(t)},i.prototype.getCurrentEvent=function(t){return b(b({data:this.data,datas:this.data},this._getPosition()),{movement:this.getMovement(),isDrag:this.isDrag,isPinch:this.isPinch,isScroll:!1,inputEvent:t})},i.prototype.getEventData=function(){return this.data},i.prototype.getEventDatas=function(){return this.data},i.prototype.unset=function(){var e=this,t=this.targets,n=this.options.container;this.off(),S(window,"blur",this.onBlur),this.isMouse&&(t.forEach(function(t){S(t,"mousedown",e.onDragStart)}),S(n,"contextmenu",this._onContextMenu)),this.isTouch&&(t.forEach(function(t){S(t,"touchstart",e.onDragStart)}),S(n,"touchstart",this.onDragStart)),this._allowClickEvent(),this._dettachDragEvent()},i.prototype.onPinchStart=function(t){var e=this.options.pinchThreshold;this.isDrag&&this.getMovement()>e||(e=new D(k(t)),this.pinchFlag=!0,this._addStore(e),!1===this.emit("pinchStart",b(b({data:this.data,datas:this.data,angle:e.getAngle(),touches:this.getCurrentStore().getPositions()},e.getPosition()),{inputEvent:t,isTrusted:this._isTrusted}))&&(this.pinchFlag=!1))},i.prototype.onPinch=function(t,e){var n;!this.flag||!this.pinchFlag||e.length<2||(n=this.getCurrentStore(),this.isPinch=!0,this.emit("pinch",b(b({data:this.data,datas:this.data,movement:this.getMovement(e),angle:n.getAngle(e),rotation:n.getRotation(e),touches:n.getPositions(e),scale:n.getScale(e),distance:n.getDistance(e)},n.getPosition(e)),{inputEvent:t,isTrusted:this._isTrusted})))},i.prototype.onPinchEnd=function(t){var e,n;this.pinchFlag&&(e=this.isPinch,this.isPinch=!1,this.pinchFlag=!1,n=this.getCurrentStore(),this.emit("pinchEnd",b(b({data:this.data,datas:this.data,isPinch:e,touches:n.getPositions()},n.getPosition()),{inputEvent:t})))},i.prototype.getCurrentStore=function(){return this.clientStores[0]},i.prototype.moveClients=function(t,e,n){var n=this._getPosition(t,n),i=this.isDrag,r=((n.deltaX||n.deltaY)&&(this.isDrag=!0),!1);return!i&&this.isDrag&&(r=!0),b(b({data:this.data,datas:this.data},n),{movement:this.getMovement(t),isDrag:this.isDrag,isPinch:this.isPinch,isScroll:!1,isMouseEvent:this._isMouseEvent,isSecondaryButton:this._isSecondaryButton,inputEvent:e,isTrusted:this._isTrusted,isFirstDrag:r})},i.prototype._addStore=function(t){this.clientStores.splice(0,0,t)},i.prototype._getPosition=function(t,e){var t=this.getCurrentStore().getPosition(t,e),e=this.clientStores.slice(1).reduce(function(t,e){e=e.getPosition();return t.distX+=e.distX,t.distY+=e.distY,t},t),n=e.distX,e=e.distY;return b(b({},t),{distX:n,distY:e})},i.prototype._attchDragEvent=function(){var t=this.options.container,e={passive:!1};this.isMouse&&(_(t,"mousemove",this.onDrag),_(t,"mouseup",this.onDragEnd)),this.isTouch&&(_(t,"touchmove",this.onDrag,e),_(t,"touchend",this.onDragEnd,e),_(t,"touchcancel",this.onDragEnd,e))},i.prototype._dettachDragEvent=function(){var t=this.options.container;this.isMouse&&(S(t,"mousemove",this.onDrag),S(t,"mouseup",this.onDragEnd)),this.isTouch&&(S(t,"touchstart",this.onDragStart),S(t,"touchmove",this.onDrag),S(t,"touchend",this.onDragEnd),S(t,"touchcancel",this.onDragEnd))},i}(t);var rt=function(){function t(){this.keys=[],this.values=[]}var e=t.prototype;return e.get=function(t){return this.values[this.keys.indexOf(t)]},e.set=function(t,e){var n=this.keys,i=this.values,r=n.indexOf(t),r=-1===r?n.length:r;n[r]=t,i[r]=e},t}(),ot=function(){function t(){this.object={}}var e=t.prototype;return e.get=function(t){return this.object[t]},e.set=function(t,e){this.object[t]=e},t}(),at="function"==typeof Map,st=function(){function t(){}var e=t.prototype;return e.connect=function(t,e){this.prev=t,this.next=e,t&&(t.next=this),e&&(e.prev=this)},e.disconnect=function(){var t=this.prev,e=this.next;t&&(t.next=e),e&&(e.prev=t)},e.getIndex=function(){for(var t=this,e=-1;t;)t=t.prev,++e;return e},t}();var ct=function(){function t(t,e,n,i,r,o,a,s){this.prevList=t,this.list=e,this.added=n,this.removed=i,this.changed=r,this.maintained=o,this.changedBeforeAdded=a,this.fixed=s}var e=t.prototype;return Object.defineProperty(e,"ordered",{get:function(){return this.cacheOrdered||this.caculateOrdered(),this.cacheOrdered},enumerable:!0,configurable:!0}),Object.defineProperty(e,"pureChanged",{get:function(){return this.cachePureChanged||this.caculateOrdered(),this.cachePureChanged},enumerable:!0,configurable:!0}),e.caculateOrdered=function(){t=this.changedBeforeAdded,n=this.fixed,r=[],o=[],t.forEach(function(t){var e=t[0],t=t[1],n=new st;r[e]=n,o[t]=n}),r.forEach(function(t,e){t.connect(r[e-1])});var n,r,o,t=t.filter(function(t,e){return!n[e]}).map(function(t,e){var n=t[0],t=t[1];if(n===t)return[0,0];var n=r[n],t=o[t-1],i=n.getIndex();return n.disconnect(),t?n.connect(t,t.next):n.connect(void 0,r[0]),[i,n.getIndex()]}),a=this.changed,s=[];this.cacheOrdered=t.filter(function(t,e){var n=t[0],t=t[1],e=a[e],i=e[0],e=e[1];if(n!==t)return s.push([i,e]),!0}),this.cachePureChanged=s},t}();var ut,lt="function"==typeof Map?void 0:(ut=0,function(t){return t.__DIFF_KEY__||(t.__DIFF_KEY__=++ut)});function w(t,e){return t=t,e=e,n=lt,i=at?Map:n?ot:rt,n=n||function(t){return t},r=[],o=[],a=[],s=t.map(n),n=e.map(n),c=new i,u=new i,l=[],h=[],f={},p=[],v=d=0,s.forEach(function(t,e){c.set(t,e)}),n.forEach(function(t,e){u.set(t,e)}),s.forEach(function(t,e){t=u.get(t);void 0===t?(++v,o.push(e)):f[t]=v}),n.forEach(function(t,e){t=c.get(t);void 0===t?(r.push(e),++d):(a.push([t,e]),v=f[e]||0,l.push([t-v,e-d]),h.push(e===t),t!==e&&p.push([t,e]))}),o.reverse(),new ct(t,e,r,o,p,a,l,h);var n,i,r,o,a,s,c,u,l,h,f,p,d,v}var ht=function(t,e){return(ht=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var l=function(){return(l=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function ft(t){t=t.container;return t===document.body?[t.scrollLeft||document.documentElement.scrollLeft,t.scrollTop||document.documentElement.scrollTop]:[t.scrollLeft,t.scrollTop]}function f(t){return t?m(t)?document.querySelector(t):N(t)?t():t instanceof Element?t:"current"in t?t.current:"value"in t?t.value:void 0:null}var pt=function(e){function t(){this.constructor=n}var n;function i(){var t=null!==e&&e.apply(this,arguments)||this;return t._startRect=null,t._startPos=[],t._prevTime=0,t._timer=0,t._prevScrollPos=[0,0],t._isWait=!1,t._flag=!1,t}ht(n=i,r=e),n.prototype=null===r?Object.create(r):(t.prototype=r.prototype,new t);var r=i.prototype;return r.dragStart=function(t,e){var n,i,r,o,a=f(e.container);a?(o=r=i=n=0,o=a===document.body?(r=window.innerWidth,window.innerHeight):(n=(a=a.getBoundingClientRect()).top,i=a.left,r=a.width,a.height),this._flag=!0,this._startPos=[t.clientX,t.clientY],this._startRect={top:n,left:i,width:r,height:o},this._prevScrollPos=this._getScrollPosition([0,0],e)):this._flag=!1},r.drag=function(t,e){var n,i,r,o,a,s;if(clearTimeout(this._timer),this._flag)return n=t.clientX,i=t.clientY,r=e.threshold,r=void 0===r?0:r,o=this._startRect,a=this._startPos,s=[0,0],o.top>i-r?(a[1]>o.top||i<a[1])&&(s[1]=-1):o.top+o.height<i+r&&(a[1]<o.top+o.height||i>a[1])&&(s[1]=1),o.left>n-r?(a[0]>o.left||n<a[0])&&(s[0]=-1):o.left+o.width<n+r&&(a[0]<o.left+o.width||n>a[0])&&(s[0]=1),!(!s[0]&&!s[1])&&this._continueDrag(l(l({},e),{direction:s,inputEvent:t,isDrag:!0}))},r.checkScroll=function(t){var e=this;if(this._isWait)return!1;var n=t.prevScrollPos,n=void 0===n?this._prevScrollPos:n,i=t.direction,r=t.throttleTime,r=void 0===r?0:r,o=t.inputEvent,a=t.isDrag,s=this._getScrollPosition(i||[0,0],t),c=s[0]-n[0],n=s[1]-n[1],i=i||[c?Math.abs(c)/c:0,n?Math.abs(n)/n:0];return this._prevScrollPos=s,!(!c&&!n)&&(this.trigger("move",{offsetX:i[0]?c:0,offsetY:i[1]?n:0,inputEvent:o}),r&&a&&(clearTimeout(this._timer),this._timer=window.setTimeout(function(){e._continueDrag(t)},r)),!0)},r.dragEnd=function(){this._flag=!1,clearTimeout(this._timer)},r._getScrollPosition=function(t,e){var n=e.container,e=e.getScrollPosition;return(void 0===e?ft:e)({container:f(n),direction:t})},r._continueDrag=function(t){var e=this,n=t.container,i=t.direction,r=t.throttleTime,o=t.useScroll,a=t.isDrag,s=t.inputEvent;if(!(!this._flag||a&&this._isWait)){var c=C(),r=Math.max(r+this._prevTime-c,0);if(0<r)return clearTimeout(this._timer),this._timer=window.setTimeout(function(){e._continueDrag(t)},r),!1;this._prevTime=c;r=this._getScrollPosition(i,t),c=(this._prevScrollPos=r,a&&(this._isWait=!0),{container:f(n),direction:i,inputEvent:s});return null!=(a=t.requestScroll)&&a.call(t,c),this.trigger("scroll",c),this._isWait=!1,o||this.checkScroll(l(l({},t),{prevScrollPos:r,direction:i,inputEvent:s}))}},i}(t),dt=function(t,e){return(dt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function vt(t){return t&&"object"==typeof t}function gt(t){return Array.isArray(t)}function mt(t){return"string"==typeof t}function s(t,e,n,i){t.addEventListener(e,n,i)}function p(t,e,n,i){t.removeEventListener(e,n,i)}var yt=function(){return(yt=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};var Ct=function(){function t(){this._events={}}var e=t.prototype;return e.on=function(t,e){if(vt(t))for(var n in t)this.on(n,t[n]);else this._addEvent(t,e,{});return this},e.off=function(t,e){if(t)if(vt(t))for(var n in t)this.off(n);else{var i,r;e?(i=this._events[t])&&-1<(r=function(t,e,n){void 0===n&&(n=-1);for(var i=t.length,r=0;r<i;++r)if(e(t[r],r,t))return r;return n}(i,function(t){return t.listener===e}))&&i.splice(r,1):this._events[t]=[]}else this._events={};return this},e.once=function(e,t){var n=this;return t&&this._addEvent(e,t,{once:!0}),new Promise(function(t){n._addEvent(e,t,{once:!0})})},e.emit=function(e,n){var i=this,t=(void 0===n&&(n={}),this._events[e]);if(!e||!t)return!0;var r=!1;return n.eventType=e,n.stop=function(){r=!0},n.currentTarget=this,function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var i=Array(t),r=0,e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,r++)i[r]=o[a];return i}(t).forEach(function(t){t.listener(n),t.once&&i.off(e,t.listener)}),!r},e.trigger=function(t,e){return this.emit(t,e=void 0===e?{}:e)},e._addEvent=function(t,e,n){var i=this._events;i[t]=i[t]||[],i[t].push(yt({listener:e},n))},t}();(function(t,e){function n(t){if(!t||"object"!=typeof t||(e=t.which||t.keyCode||t.charCode)&&(t=e),"number"==typeof t)return s[t];var e=String(t),t=i[e.toLowerCase()];return t||((t=r[e.toLowerCase()])?t:1===e.length?e.charCodeAt(0):void 0)}n.isEventKey=function(t,e){if(t&&"object"==typeof t){t=t.which||t.keyCode||t.charCode;if(null!=t)if("string"==typeof e){var n=i[e.toLowerCase()];if(n)return n===t;if(n=r[e.toLowerCase()])return n===t}else if("number"==typeof e)return e===t;return!1}};for(var i=(e=t.exports=n).code=e.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},r=e.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91},o=97;o<123;o++)i[String.fromCharCode(o)]=o-32;for(var o=48;o<58;o++)i[o-48]=o;for(o=1;o<13;o++)i["f"+o]=o+111;for(o=0;o<10;o++)i["numpad "+o]=o+96;var a,s=e.names=e.title={};for(o in i)s[i[o]]=o;for(a in r)i[a]=r[a]})(i={exports:{}},i.exports);var Et,i=i.exports,_t=(i.code,i.codes,i.aliases,i.names),St=(i.title,{"+":"plus","left command":"meta","right command":"meta"}),bt={shift:1,ctrl:2,alt:3,meta:4};function kt(t,e){var n,i=(_t[t]||e||"").toLowerCase();for(n in St)i=i.replace(n,St[n]);return i.replace(/\s/g,"")}function Dt(t,e){void 0===e&&(e=kt(t.keyCode,t.key));t=[t.shiftKey&&"shift",t.ctrlKey&&"ctrl",t.altKey&&"alt",t.metaKey&&"meta"].filter(Boolean);return-1===t.indexOf(e)&&t.push(e),t.filter(Boolean)}function wt(t){t=t.slice();return t.sort(function(t,e){return(bt[t]||5)-(bt[e]||5)}),t}var Mt=function(n){var t=r,e=n;if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}function r(t){void 0===t&&(t=window);var e=n.call(this)||this;return e.container=t,e.ctrlKey=!1,e.altKey=!1,e.shiftKey=!1,e.metaKey=!1,e.clear=function(){return e.ctrlKey=!1,e.altKey=!1,e.shiftKey=!1,e.metaKey=!1,e},e.keydownEvent=function(t){e.triggerEvent("keydown",t)},e.keyupEvent=function(t){e.triggerEvent("keyup",t)},e.blur=function(){e.clear(),e.trigger("blur")},s(t,"blur",e.blur),s(t,"keydown",e.keydownEvent),s(t,"keyup",e.keyupEvent),e}dt(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i);e=r.prototype;return Object.defineProperty(r,"global",{get:function(){return Et=Et||new r},enumerable:!1,configurable:!0}),r.setGlobal=function(){return this.global},e.destroy=function(){var t=this.container;this.clear(),this.off(),p(t,"blur",this.blur),p(t,"keydown",this.keydownEvent),p(t,"keyup",this.keyupEvent)},e.keydown=function(t,e){return this.addEvent("keydown",t,e)},e.offKeydown=function(t,e){return this.removeEvent("keydown",t,e)},e.offKeyup=function(t,e){return this.removeEvent("keyup",t,e)},e.keyup=function(t,e){return this.addEvent("keyup",t,e)},e.addEvent=function(t,e,n){return gt(e)?this.on(t+"."+wt(e).join("."),n):mt(e)?this.on(t+"."+e,n):this.on(t,e),this},e.removeEvent=function(t,e,n){return gt(e)?this.off(t+"."+wt(e).join("."),n):mt(e)?this.off(t+"."+e,n):this.off(t,e),this},e.triggerEvent=function(t,e){this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey;var n=kt(e.keyCode,e.key),i={key:n,isToggle:"ctrl"===n||"shift"===n||"meta"===n||"alt"===n,inputEvent:e,keyCode:e.keyCode,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey},e=(this.trigger(t,i),this.trigger(t+"."+n,i),Dt(e,n));1<e.length&&this.trigger(t+"."+e.join("."),i)},r}(Ct);function d(t){return j(t,B)}function x(n){return n.length<3?0:Math.abs(function(t){for(var e=0,n=t.length-1;0<=n;--n)e+=t[n];return e}(n.map(function(t,e){e=n[e+1]||n[0];return t[0]*e[1]-e[0]*t[1]})))/2}function Tt(t){var e=t.map(function(t){return t[0]}),t=t.map(function(t){return t[1]});return{minX:Math.min.apply(Math,e),minY:Math.min.apply(Math,t),maxX:Math.max.apply(Math,e),maxY:Math.max.apply(Math,t)}}function P(r,t,e){var i=r[0],o=r[1],n=Tt(t),a=n.minX,n=n.maxX,s=[[a,o],[n,o]],c=M(s[0],s[1]),a=Ot(t),u=[];if(a.forEach(function(t){var n,e=M(t[0],t[1]),i=t[0];n=e,c.every(function(t,e){return 0===d(t-n[e])})?u.push({pos:r,line:t,type:"line"}):Pt(xt(c,e),[s,t]).forEach(function(n){t.some(function(t){return e=n,!d((t=t)[0]-e[0])&&!d(t[1]-e[1]);var e})?u.push({pos:n,line:t,type:"point"}):0!==d(i[1]-o)&&u.push({pos:n,line:t,type:"intersection"})})}),!e&&E(u,function(t){return t[0]===i}))return!0;var l=0,h={};return u.forEach(function(t){var e=t.pos,n=t.type,t=t.line;e[0]>i||("intersection"===n?++l:"line"!==n&&"point"===n&&(n=E(t,function(t){return t[1]!==o}),t=h[e[0]],n=n[1]>o?1:-1,t?t!==n&&++l:h[e[0]]=n))}),l%2==1}function M(t,e){var n=t[0],t=t[1],i=e[0]-n,e=e[1]-t,r=(Math.abs(i)<B&&(i=0),Math.abs(e)<B&&(e=0),0),o=0,a=0;return i?a=e?(o=1,-(r=-e/i)*n-t):(o=1,-t):e&&(r=-1,a=n),[r,o,a]}function xt(t,e){var n,i,r=t[0],o=t[1],t=t[2],a=e[0],s=e[1],e=e[2],c=0===r&&0===a,u=0===o&&0===s;return c&&u?[]:c?(c=-t/o)!=-e/s?[]:[[-1/0,c],[1/0,c]]:u?(c=-t/r)!=-e/a?[]:[[c,-1/0],[c,1/0]]:(0===r?[[n=-(s*(i=-t/o)+e)/a,i]]:0===a?[[n=-(o*(i=-e/s)+t)/r,i]]:0===o?[[n=-t/r,i=-(a*n+e)/s]]:0===s?[[n=-e/a,i=-(r*n+t)/o]]:[[n=(o*e-s*t)/(s*r-o*a),i=-(r*n+t)/o]]).map(function(t){return[t[0],t[1]]})}function Pt(t,e){var i=e.map(function(e){return[0,1].map(function(t){return[Math.min(e[0][t],e[1][t]),Math.max(e[0][t],e[1][t])]})}),e=[];if(2===t.length){var n=t[0],r=n[0],n=n[1];if(d(r-t[1][0])){if(!d(n-t[1][1])){var o=Math.max.apply(Math,i.map(function(t){return t[0][0]})),a=Math.min.apply(Math,i.map(function(t){return t[0][1]}));if(0<d(o-a))return[];e=[[o,n],[a,n]]}}else{o=Math.max.apply(Math,i.map(function(t){return t[1][0]})),a=Math.min.apply(Math,i.map(function(t){return t[1][1]}));if(0<d(o-a))return[];e=[[r,o],[r,a]]}}return(e=e.length?e:t.filter(function(t){var e=t[0],n=t[1];return i.every(function(t){return 0<=d(e-t[0][0])&&0<=d(t[0][1]-e)&&0<=d(n-t[1][0])&&0<=d(t[1][1]-n)})})).map(function(t){return[d(t[0]),d(t[1])]})}function Ot(n){return function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var i=Array(t),r=0,e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,r++)i[r]=o[a];return i}(n.slice(1),[n[0]]).map(function(t,e){return[n[e],t]})}function Yt(t,e){var r,a,s,c,u,l,n;return e=e,r=(t=t).slice(),a=e.slice(),-1===$(r)&&r.reverse(),-1===$(a)&&a.reverse(),s=Ot(r),c=Ot(a),t=s.map(function(t){return M(t[0],t[1])}),u=c.map(function(t){return M(t[0],t[1])}),l=[],t.forEach(function(n,i){var r=s[i],o=[];u.forEach(function(t,e){t=Pt(xt(n,t),[r,c[e]]);o.push.apply(o,t.map(function(t){return{index1:i,index2:e,pos:t,type:"intersection"}}))}),o.sort(function(t,e){return h(r[0],t.pos)-h(r[0],e.pos)}),l.push.apply(l,o),P(r[1],a)&&l.push({index1:i,index2:-1,pos:r[1],type:"inside"})}),c.forEach(function(t,n){var i,e;P(t[1],r)&&(i=!1,-1===(e=o(l,function(t){if(t.index2!==n)return!!i;i=!0}))&&(i=!1,e=o(l,function(t){var e=t.index1,t=t.index2;if(-1!==e||t+1!==n)return!!i;i=!0})),-1===e?l.push({index1:-1,index2:n,pos:t[1],type:"inside"}):l.splice(e,0,{index1:-1,index2:n,pos:t[1],type:"inside"}))}),n={},l.filter(function(t){t=t.pos,t=t[0]+"x"+t[1];return!n[t]&&(n[t]=!0)}).map(function(t){return t.pos})}function r(t,e,n){void 0===n&&(n=Math.sqrt(t.length));var i=[],r=t.length/n,o=e.length/r;if(!r)return e;if(!o)return t;for(var a=0;a<n;++a)for(var s=0;s<o;++s)for(var c=i[s*n+a]=0;c<r;++c)i[s*n+a]+=t[c*n+a]*e[s*r+c];return i}function Xt(t,e){return r(t,[1,0,0,0,0,Math.cos(e),Math.sin(e),0,0,-Math.sin(e),Math.cos(e),0,0,0,0,1],4)}function Ft(t,e){return r(t,[Math.cos(e),0,-Math.sin(e),0,0,1,0,0,Math.sin(e),0,Math.cos(e),0,0,0,0,1],4)}function Bt(t,e){return r(t,(t=e,e=4,n=Math.cos(t),t=Math.sin(t),(i=Wt(e))[0]=n,i[1]=t,i[e]=-t,i[e+1]=n,i));var n,i}function T(t,e){var n=e[0],i=e[1],e=e[2];return r(t,[void 0===n?1:n,0,0,0,0,void 0===i?1:i,0,0,0,0,void 0===e?1:e,0,0,0,0,1],4)}function jt(t,e){var n=e[0],i=e[1],e=e[2];return r(t,[1,0,0,0,0,1,0,0,0,0,1,0,void 0===n?0:n,void 0===i?0:i,void 0===e?0:e,1],4)}function Kt(t,e){return r(t,e,4)}function Wt(t){for(var e=t*t,n=[],i=0;i<e;++i)n[i]=i%(t+1)?0:1;return n}function It(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function At(t){return t=(R(t=t)?t:function(t){return q(t,"")}(t)).map(function(t){var e,n,i,t=!(t=/([^(]*)\(([\s\S]*)\)([\s\S]*)/g.exec(t=t))||t.length<4?{}:{prefix:t[1],value:t[2],suffix:t[3]},r=t.prefix,t=t.value,o=null,a=r,s="";return"translate"===r||"translateX"===r||"translate3d"===r?(o=jt,s=[(i=c(t).map(function(t){return parseFloat(t)}))[0],void 0===(e=i[1])?0:e,void 0===(e=i[2])?0:e]):"translateY"===r?(o=jt,s=[0,parseFloat(t),0]):"translateZ"===r?(o=jt,s=[0,0,parseFloat(t)]):"scale"===r||"scale3d"===r?(o=T,s=[n=(i=c(t).map(function(t){return parseFloat(t)}))[0],void 0===(e=i[1])?n:e,void 0===(e=i[2])?1:e]):"scaleX"===r?(o=T,s=[n=parseFloat(t),1,1]):"scaleY"===r?(o=T,s=[1,parseFloat(t),1]):"scaleZ"===r?(o=T,s=[1,1,parseFloat(t)]):"rotate"===r||"rotateZ"===r||"rotateX"===r||"rotateY"===r?(e=(i=G(t)).unit,n=i.value,"rotate"===r||"rotateZ"===r?(a="rotateZ",o=Bt):"rotateX"===r?o=Xt:"rotateY"===r&&(o=Ft),s="rad"===e?n:n*Math.PI/180):"matrix3d"===r?(o=Kt,s=c(t).map(function(t){return parseFloat(t)})):"matrix"===r?(o=Kt,s=[(i=c(t).map(function(t){return parseFloat(t)}))[0],i[1],0,0,i[2],i[3],0,0,0,0,1,0,i[4],i[5],0,1]):a="",{name:r,functionName:a,value:t,matrixFunction:o,functionValue:s}}),n=It(),t.forEach(function(t){var e=t.matrixFunction,t=t.functionValue;e&&(n=e(n,t))}),n;var n}function Rt(t,e){n=t,e=[e[0],e[1]||0,e[2]||0,1],i=(n=r(t,e,t=void 0===(t=4)?e.length:t))[t-1];var n,i,e=n.map(function(t){return t/i}),t=e[3]||1;return[e[0]/t,e[1]/t,e[2]/t]}function Nt(t,e){void 0===e&&(e=document.body);for(var n=t,i=It();n;){i=Kt(At(getComputedStyle(n).transform),i);if(n===e)break;n=n.parentElement}return(i=function(t,e){void 0===e&&(e=Math.sqrt(t.length));for(var n=t.slice(),i=Wt(e),r=0;r<e;++r){var o=e*r+r;if(!j(n[o],B))for(var a=r+1;a<e;++a)if(n[e*r+a]){g=v=d=p=f=h=l=u=c=s=void 0;for(var s=n,c=i,u=r,l=a,h=e,f=0;f<h;++f){var p=u+f*h,d=l+f*h,v=s[p],g=c[p];s[p]=s[d],s[d]=v,c[p]=c[d],c[d]=g}break}if(!j(n[o],B))return[];b=S=_=E=C=y=m=void 0;for(var m=n,y=i,C=r,E=e,_=n[o],S=0;S<E;++S){var b=C+S*E;m[b]/=_,y[b]/=_}for(a=0;a<e;++a){var k=a,D=n[a+r*e];if(j(D,B)&&r!==a){F=X=Y=O=P=x=T=M=w=void 0;for(var w=n,M=i,T=k,x=r,P=e,O=-D,Y=0;Y<P;++Y){var X=T+Y*P,F=x+Y*P;w[X]+=w[F]*O,M[X]+=M[F]*O}}}}return i}(i,4))[12]=0,i[13]=0,i[14]=0,i}function Lt(t,e){return document.elementFromPoint&&document.elementFromPoint(t,e)||null}function qt(t,e,n){var i=t.tag,r=t.children,o=t.attributes,a=t.className,s=t.style,c=e||document.createElement(i);for(l in o)c.setAttribute(l,o[l]);var u=c.children;if(r.forEach(function(t,e){qt(t,u[e],c)}),a&&a.split(" ").forEach(function(t){var e,n;n=t,((e=c).classList?e.classList.contains(n):e.className.match(new RegExp("(\\s|^)"+n+"(\\s|$)")))||(e=t,(n=c).classList?n.classList.add(e):n.className+=" "+e)}),s){var l,h=c.style;for(l in s)h[l]=s[l]}return!e&&n&&n.appendChild(c),c}function Gt(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var e=e||{},r=e.className,o=e.style;return{tag:t,className:void 0===r?"":r,style:void 0===o?{}:o,attributes:function(t,e){var n={};for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}(e,["className","style"]),children:n}}function Ht(t,e,n){t!==e&&n(t,e)}function Zt(t,e,n){void 0===n&&(n=t.data.boundArea);var i=t.distX,i=void 0===i?0:i,r=t.distY,r=void 0===r?0:r,t=t.data,o=t.startX,t=t.startY;0<e&&(i=(0<=i?1:-1)*(e*(a=Math.sqrt((i*i+r*r)/(1+e*e)))),r=(0<=r?1:-1)*a),i=(0<=i?1:-1)*(n=(a=function(t,n,i,e){if(!e)return t.map(function(t,e){return Z(t,n[e],i[e])});var r=t[0],o=t[1],a=(s=U(t,n,!1,e=!0===e?r/o:e))[0],s=s[1],e=(t=U(t,i,!0,e))[0],t=t[1];return r<a||o<s?(r=a,o=s):(e<r||t<o)&&(r=e,o=t),[r,o]}([Math.abs(i),Math.abs(r)],[0,0],[i<0?o-n.left:n.right-o,r<0?t-n.top:n.bottom-t],!!e))[0]),r=(0<=r?1:-1)*(e=a[1]);var a=o+Math.min(0,i),o=t+Math.min(0,r);return{left:a,top:o,right:a+n,bottom:o+e,width:n,height:e}}function O(t){var t=t.getBoundingClientRect(),e=t.left,n=t.top,i=t.width,t=t.height;return{pos1:[e,n],pos2:[e+i,n],pos3:[e,n+t],pos4:[e+i,n+t]}}function Ut(t,e,n){var t=w(t,e),i=t.list,r=t.prevList,e=t.added,o=t.removed,t=t.maintained;return a(a(a([],e.map(function(t){return i[t]}),!0),o.map(function(t){return r[t]}),!0),n?t.map(function(t){t=t[1];return i[t]}):[],!0)}function Vt(t){for(var e=0,n=t.length,i=1;i<n;++i)e=Math.max(h(t[i],t[i-1]),e);return e}function zt(t,e,n,i){var r,o=document.createElement("style");return o.setAttribute("type","text/css"),o.setAttribute("data-styled-id",t),n.nonce&&o.setAttribute("nonce",n.nonce),o.innerHTML=(r=t,t=e,n.original?t:t.replace(/([^};{\s}][^};{]*|^\s*){/gm,function(t,e){e=e.trim();return(e?c(e):[""]).map(function(t){t=t.trim();return 0===t.indexOf("@")?t:-1<t.indexOf(":global")?t.replace(/\:global/g,""):-1<t.indexOf(":host")?""+t.replace(/\:host/g,"."+r):t?"."+r+" "+t:"."+r}).join(", ")+" {"})),(i||document.head||document.body).appendChild(o),o}Jt="rCS"+function(t){for(var e=5381,n=t.length;n;)e=33*e^t.charCodeAt(--n);return e>>>0}($t="\n:host {\n position: fixed;\n display: none;\n border: 1px solid #4af;\n background: rgba(68, 170, 255, 0.5);\n pointer-events: none;\n will-change: transform;\n z-index: 100;\n}\n").toString(36),X=0;var $t,Y,Jt,X,Qt,te={className:Jt,inject:function(t,e){void 0===e&&(e={});var n,i=function(t){if(t&&t.getRootNode){t=t.getRootNode();if(11===t.nodeType)return t}}(t),r=0===X;return(i||r)&&(n=zt(Jt,$t,e,i)),r&&(Y=n),i||++X,{destroy:function(){i?(t.removeChild(n),n=null):(0<X&&--X,0===X&&Y&&(Y.parentNode.removeChild(Y),Y=null))}}}},ee="selecto-selection ".concat(te.className),ne=["boundContainer","selectableTargets","selectByClick","selectFromInside","continueSelect","continueSelectWithoutDeselect","toggleContinueSelect","toggleContinueSelectWithoutDeselect","keyContainer","hitRate","scrollOptions","checkInput","preventDefault","ratio","getElementRect","preventDragFromInside","rootContainer","dragCondition","clickBySelectEnd","checkOverflow"],i=a(["dragContainer","cspNonce","preventClickEventOnDrag","preventClickEventOnDragStart","preventRightClick"],ne,!0),Ct={boundContainer:null,portalContainer:null,container:null,dragContainer:null,selectableTargets:Array,selectByClick:Boolean,selectFromInside:Boolean,continueSelect:Boolean,toggleContinueSelect:Array,toggleContinueSelectWithoutDeselect:Array,keyContainer:null,hitRate:Number,scrollOptions:Object,checkInput:Boolean,preventDefault:Boolean,cspNonce:String,ratio:Number,getElementRect:Function,preventDragFromInside:Boolean,rootContainer:Object,dragCondition:Function,clickBySelectEnd:Boolean,continueSelectWithoutDeselect:Boolean,preventClickEventOnDragStart:Boolean,preventClickEventOnDrag:Boolean,checkOverflow:Boolean},ie=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return K(e,t),e}(function(n){function t(t){void 0===t&&(t={});var d=n.call(this)||this,e=(d.selectedTargets=[],d.dragScroll=new pt,d._onDragStart=function(t,e){var n=t.data,i=t.clientX,r=t.clientY,o=t.inputEvent,a=d.options,s=a.selectFromInside,c=a.selectByClick,u=a.rootContainer,l=a.boundContainer,h=a.preventDragFromInside,h=void 0===h||h,f=a.clickBySelectEnd,a=a.dragCondition;if(!a||a(t)){n.data={},n.innerWidth=window.innerWidth,n.innerHeight=window.innerHeight,d.findSelectableTargets(n),n.startSelectedTargets=d.selectedTargets,n.scaleMatrix=It(),n.containerX=0;var a={left:-1/(n.containerY=0),top:-1/0,right:1/0,bottom:1/0},p=(u&&(p=d.container.getBoundingClientRect(),n.containerX=p.left,n.containerY=p.top,n.scaleMatrix=Nt(d.container,u)),l&&((l=(p=g(l)&&"element"in l?v({left:!0,top:!0,bottom:!0,right:!0},l):{element:l,left:!0,top:!0,bottom:!0,right:!0}).element)&&(l=(m(l)?document.querySelector(l):!0===l?d.container:l).getBoundingClientRect(),p.left&&(a.left=l.left),p.top&&(a.top=l.top),p.right&&(a.right=l.right),p.bottom&&(a.bottom=l.bottom))),n.boundArea=a,{left:i,top:r,right:i,bottom:r,width:0,height:0}),l=[],e=0<(l=s&&(!c||f)?l:(a=d._findElement(e||Lt(i,r),n.selectableTargets))?[a]:[]).length,a=!s&&e;if(a&&!c)return t.stop(),!1;s=o.type;return t.isClick||"mousedown"!==s&&"touchstart"!==s||d.emit("dragStart",v(v({},t),{data:n.data}))?(d.continueSelect?(l=Ut(d.selectedTargets,l,d.continueSelectWithoutDeselect),n.startPassedTargets=d.selectedTargets):n.startPassedTargets=[],d._select(l,p,t,!0),n.startX=i,n.startY=r,n.selectFlag=!1,n.preventDragFromInside=!1,o.target&&(e=Rt(n.scaleMatrix,[i-n.containerX,r-n.containerY]),d.target.style.cssText+="position: ".concat(u?"absolute":"fixed",";")+"left:0px;top:0px;"+"transform: translate(".concat(e[0],"px, ").concat(e[1],"px)")),a&&c&&!f?(o.preventDefault(),h&&(d._selectEnd(n.startSelectedTargets,n.startPassedTargets,p,t),n.preventDragFromInside=!0)):(n.selectFlag=!0,"touchstart"===s&&o.preventDefault(),(l=d.options.scrollOptions)&&l.container&&d.dragScroll.dragStart(t,l),f&&(n.selectFlag=!1,t.preventDrag())),!0):(t.stop(),!1)}t.stop()},d._onDrag=function(t){if(t.data.selectFlag){var e=d.scrollOptions;if(null!=e&&e.container&&d.dragScroll.drag(t,e))return}d._checkSelected(t)},d._onDragEnd=function(t){var e=t.data,n=t.inputEvent,i=Zt(t,d.options.ratio),r=e.selectFlag;n&&d.emit("dragEnd",v(v({isDouble:!!t.isDouble,isClick:!!t.isClick,isDrag:!1,isSelect:r},t),{data:e.data,rect:i})),d.target.style.cssText+="display: none;",r?(e.selectFlag=!1,d.dragScroll.dragEnd()):d.selectByClick&&d.clickBySelectEnd&&(n=d._findElement(Lt(t.clientX,t.clientY),e.selectableTargets),d._select(n?[n]:[],i,t)),e.preventDragFromInside||d._selectEnd(e.startSelectedTargets,e.startPassedTargets,i,t)},d._onKeyDown=function(t){var e,n=d.options,i=!1;d._keydownContinueSelect||(e=d._sameCombiKey(t,n.toggleContinueSelect),i=d._keydownContinueSelect=e),d._keydownContinueSelectWithoutDeselection||(e=d._sameCombiKey(t,n.toggleContinueSelectWithoutDeselect),d._keydownContinueSelectWithoutDeselection=e,i=i||e),i&&d.emit("keydown",{keydownContinueSelect:d._keydownContinueSelect,keydownContinueSelectWithoutDeselection:d._keydownContinueSelectWithoutDeselection})},d._onKeyUp=function(t){var e,n=d.options,i=!1;d._keydownContinueSelect&&(e=d._sameCombiKey(t,n.toggleContinueSelect,!0),d._keydownContinueSelect=!e,i=e),d._keydownContinueSelectWithoutDeselection&&(e=d._sameCombiKey(t,n.toggleContinueSelectWithoutDeselect,!0),d._keydownContinueSelectWithoutDeselection=!e,i=i||e),i&&d.emit("keyup",{keydownContinueSelect:d._keydownContinueSelect,keydownContinueSelectWithoutDeselection:d._keydownContinueSelectWithoutDeselection})},d._onBlur=function(){(d._keydownContinueSelect||d._keydownContinueSelectWithoutDeselection)&&(d._keydownContinueSelect=!1,d._keydownContinueSelectWithoutDeselection=!1,d.emit("keyup",{keydownContinueSelect:d._keydownContinueSelect,keydownContinueSelectWithoutDeselection:d._keydownContinueSelectWithoutDeselection}))},d._onDocumentSelectStart=function(e){var t,n;d.gesto.isFlag()&&(t=(t=(t=d.dragContainer)===window?document.documentElement:t)instanceof Element?[t]:[].slice.call(t),n=e.target,t.some(function(t){if(t===n||t.contains(n))return e.preventDefault(),!0}))},d.target=t.portalContainer,t.container),t=(d.options=v({portalContainer:null,container:null,dragContainer:null,selectableTargets:[],selectByClick:!0,selectFromInside:!0,clickBySelectEnd:!1,hitRate:100,continueSelect:!1,continueSelectWithoutDeselect:!1,toggleContinueSelect:null,toggleContinueSelectWithoutDeselect:null,keyContainer:null,scrollOptions:void 0,checkInput:!1,preventDefault:!1,boundContainer:!1,preventDragFromInside:!0,dragCondition:null,rootContainer:null,checkOverflow:!1,getElementRect:O,cspNonce:"",ratio:0},t),d.options.portalContainer);return t&&(e=t.parentElement),d.container=e||document.body,d.initElement(),d.initDragScroll(),d.setKeyController(),d}K(t,n);var i,r,e=t.prototype;return e.setSelectedTargets=function(t){var e=this.selectedTargets,n=w(e,t),i=n.added,r=n.removed,o=n.prevList,a=n.list;return this.selectedTargets=t,{added:i.map(function(t){return a[t]}),removed:r.map(function(t){return o[t]}),beforeSelected:e,selected:t}},e.setSelectedTargetsByPoints=function(t,e){var n=Math.min(t[0],e[0]),i=Math.min(t[1],e[1]),r=Math.max(t[0],e[0]),t=Math.max(t[1],e[1]),e={left:n,top:i,right:r,bottom:t,width:r-n,height:t-i},r={ignoreClick:!0},n=(this.findSelectableTargets(r),this.hitTest(e,r)),t=this.setSelectedTargets(n);return v(v({},t),{rect:e})},e.selectTargetsByPoints=function(t,e){var t=new MouseEvent("mousedown",{clientX:t[0],clientY:t[1],cancelable:!0,bubbles:!0}),n=new MouseEvent("mousemove",{clientX:e[0],clientY:e[1],cancelable:!0,bubbles:!0}),e=new MouseEvent("mousemove",{clientX:e[0],clientY:e[1],cancelable:!0,bubbles:!0}),i=this.gesto;!1!==i.onDragStart(t)&&(i.onDrag(n),i.onDragEnd(e))},e.getSelectedTargets=function(){return this.selectedTargets},e.triggerDragStart=function(t){return this.gesto.triggerDragStart(t),this},e.destroy=function(){this.off(),this.keycon&&this.keycon.destroy(),this.gesto.unset(),this.injectResult.destroy(),S(document,"selectstart",this._onDocumentSelectStart),this.keycon=null,this.gesto=null,this.injectResult=null,this.target=null,this.container=null,this.options=null},e.getElementPoints=function(t){var e,n,i,r,o,a,s,c,u,l=this.getElementRect||O,h=l(t),h=[h.pos1,h.pos2,h.pos4,h.pos3];return l!==O?(l=t.getBoundingClientRect(),t=h,e=(l=l).width,n=l.height,i=l.left,r=l.top,o=(l=Tt(t)).minX,a=l.minY,s=l.maxX,l=l.maxY,c=e/(s-o),u=n/(l-a),t.map(function(t){return[i+(t[0]-o)*c,r+(t[1]-a)*u]})):h},e.getSelectableElements=function(){var n=[];return this.options.selectableTargets.forEach(function(t){var e;N(t)?(e=t())&&n.push.apply(n,[].slice.call(e)):t instanceof Node?n.push(t):g(t)?n.push(t.value||t.current):(e=[].slice.call(document.querySelectorAll(t)),n.push.apply(n,e))}),n},e.checkScroll=function(){var t;!this.gesto.isFlag()||null!=(t=this.scrollOptions)&&t.container&&this.dragScroll.checkScroll(v({inputEvent:this.gesto.getCurrentEvent()},t))},e.findSelectableTargets=function(t){var o,e=this,n=(void 0===t&&(t=this.gesto.getEventData()),this.getSelectableElements()),a=n.map(function(t){return e.getElementPoints(t)});return t.selectableTargets=n,t.selectablePoints=a,this.options.checkOverflow?(o=new Map,t.selectableInners=n.map(function(t,n){for(var i=t.parentElement,r=[];i&&i!==document.body;){var e=function(){var e=o.get(i);if(e||"visible"!==getComputedStyle(i).overflow&&(e=O(i),r.forEach(function(t){o.set(t,e)})),e)return Yt(a[n],[e.pos1,e.pos2,e.pos4,e.pos3]).length?"break":{value:!1};r.push(i),i=i.parentElement}();if("object"==typeof e)return e.value;if("break"===e)break}return!0})):t.selectableInners=n.map(function(){return!0}),this._refreshGroups(t),n},e.clickTarget=function(t,e){var n="touches"in(i=t)?{clientX:(n=i.touches[0]||i.changedTouches[0]).clientX,clientY:n.clientY}:{clientX:i.clientX,clientY:i.clientY},i={data:{selectFlag:!1},clientX:n.clientX,clientY:n.clientY,inputEvent:t,isClick:!0,isTrusted:!1,stop:function(){return!1}};return this._onDragStart(i,e)&&this._onDragEnd(i),this},e.setKeyController=function(){var t=this.options,e=t.keyContainer,n=t.toggleContinueSelect,t=t.toggleContinueSelectWithoutDeselect;this.keycon&&(this.keycon.destroy(),this.keycon=null),(n||t)&&(this.keycon=new Mt(e||window),this.keycon.keydown(this._onKeyDown).keyup(this._onKeyUp).on("blur",this._onBlur))},e.setKeyEvent=function(){var t=this.options,e=t.toggleContinueSelect,t=t.toggleContinueSelectWithoutDeselect;!e&&!t||this.keycon||this.setKeyController()},e.setKeyContainer=function(t){var e=this,n=this.options;Ht(n.keyContainer,t,function(){n.keyContainer=t,e.setKeyController()})},e.getContinueSelect=function(){var t=this.options,e=t.continueSelect;return t.toggleContinueSelect&&this._keydownContinueSelect?!e:e},e.getContinueSelectWithoutDeselect=function(){var t=this.options,e=t.continueSelectWithoutDeselect;return t.toggleContinueSelectWithoutDeselect&&this._keydownContinueSelectWithoutDeselection?!e:e},e.setToggleContinueSelect=function(t){var e=this,n=this.options;Ht(n.toggleContinueSelect,t,function(){n.toggleContinueSelect=t,e.setKeyEvent()})},e.setToggleContinueSelectWithoutDeselect=function(t){var e=this,n=this.options;Ht(n.toggleContinueSelectWithoutDeselect,t,function(){n.toggleContinueSelectWithoutDeselect=t,e.setKeyEvent()})},e.setPreventDefault=function(t){this.gesto.options.preventDefault=t},e.setCheckInput=function(t){this.gesto.options.checkInput=t},e.initElement=function(){this.target=qt(Gt("div",{className:ee}),this.target,this.container);var t=this.target,e=this.options,n=e.dragContainer,i=e.checkInput,r=e.preventDefault,o=e.preventClickEventOnDragStart,a=e.preventClickEventOnDrag,s=e.preventClickEventByCondition,e=e.preventRightClick,e=void 0===e||e;this.dragContainer="string"==typeof n?[].slice.call(document.querySelectorAll(n)):n||this.target.parentNode,this.gesto=new it(this.dragContainer,{checkWindowBlur:!0,container:window,checkInput:i,preventDefault:r,preventClickEventOnDragStart:o,preventClickEventOnDrag:a,preventClickEventByCondition:s,preventRightClick:e}).on({dragStart:this._onDragStart,drag:this._onDrag,dragEnd:this._onDragEnd}),_(document,"selectstart",this._onDocumentSelectStart),this.injectResult=te.inject(t,{nonce:this.options.cspNonce})},e.hitTest=function(t,e,n){var i,r,o,a=this.options,s=a.hitRate,c=a.selectByClick,a=t.left,u=t.top,l=t.right,t=t.bottom,h=e.innerGroups,f=e.innerWidth,p=e.innerHeight,d=null==n?void 0:n.clientX,v=null==n?void 0:n.clientY,g=e.ignoreClick,m=[[a,u],[l,u],[l,t],[a,t]],y=G("".concat(s)),C=function(t,e){var n=!g&&P([d,v],t);if(c&&n)return!0;n=Yt(m,t);if(!n.length)return!1;var i=x(n),r=0;return 0===i&&0===x(t)?(r=Vt(t),i=Vt(n)):r=x(t),"px"===y.unit?i>=y.value:Z(Math.round(i/r*100),0,100)>=Math.min(100,y.value)};if(!h)return i=e.selectableTargets,r=e.selectablePoints,o=e.selectableInners,i.filter(function(t,e){return!!o[e]&&C(r[e],i[e])});for(var E=[],n=Math.floor(a/f),_=Math.floor(l/f),S=Math.floor(u/p),b=Math.floor(t/p),k=n;k<=_;++k){var D=h[k];if(D)for(var w=S;w<=b;++w)!function(t){t=D[t];if(!t)return;var e=t.points,n=t.targets,i=t.inners;e.forEach(function(t,e){i[e]&&C(t,n[e])&&E.push(n[e])})}(w)}var M=E;if("undefined"==typeof Map)return M.filter(function(t,e){return M.indexOf(t)===e});var T=new Map;return M.filter(function(t){return!T.has(t)&&(T.set(t,!0),!0)})},e.initDragScroll=function(){var o=this;this.dragScroll.on("scroll",function(t){var e=t.container,t=t.direction;o.emit("scroll",{container:e,direction:t})}).on("move",function(t){var e,n=t.offsetX,i=t.offsetY,t=t.inputEvent,r=o.gesto;r&&r.isFlag()&&(e=(r=o.gesto.getEventData()).boundArea,r.startX-=n,r.startY-=i,r.selectablePoints.forEach(function(t){t.forEach(function(t){t[0]-=n,t[1]-=i})}),o._refreshGroups(r),e.left-=n,e.right-=n,e.top-=i,e.bottom-=i,o.gesto.scrollBy(n,i,t.inputEvent,!1),o._checkSelected(o.gesto.getCurrentEvent()))})},e._select=function(t,e,n,i){var r=n.inputEvent,o=n.data,t=this.setSelectedTargets(t);i&&this.emit("selectStart",v(v({},t),{rect:e,inputEvent:r,data:o.data,isTrusted:n.isTrusted})),(t.added.length||t.removed.length)&&this.emit("select",v(v({},t),{rect:e,inputEvent:r,data:o.data,isTrusted:n.isTrusted}))},e._selectEnd=function(t,e,n,i){var r=i.inputEvent,o=i.isDouble,a=i.data,s=w(t,this.selectedTargets),c=s.added,u=s.removed,l=s.prevList,h=s.list,s=w(e,this.selectedTargets),f=s.added,p=s.removed,d=s.prevList,v=s.list,s=r&&r.type,s="mousedown"===s||"touchstart"===s;this.emit("selectEnd",{startSelected:t,beforeSelected:e,selected:this.selectedTargets,added:c.map(function(t){return h[t]}),removed:u.map(function(t){return l[t]}),afterAdded:f.map(function(t){return v[t]}),afterRemoved:p.map(function(t){return d[t]}),isDragStart:s,isClick:!!i.isClick,isDouble:!!o,rect:n,inputEvent:r,data:a.data,isTrusted:i.isTrusted})},e._checkSelected=function(t,e){void 0===e&&(e=Zt(t,this.options.ratio));var n=t.data,i=e.top,r=e.left,o=e.width,a=e.height,s=n.selectFlag,c=n.containerX,u=n.containerY,l=n.scaleMatrix,r=Rt(l,[r-c,i-u]),c=Rt(l,[o,a]),i=[];s&&(this.target.style.cssText+="display: block;left:0px;top:0px;"+"transform: translate(".concat(r[0],"px, ").concat(r[1],"px);")+"width:".concat(c[0],"px;height:").concat(c[1],"px;"),u=this.hitTest(e,n,t),i=Ut(n.startPassedTargets,u,this.continueSelect&&this.continueSelectWithoutDeselect)),!1===this.emit("drag",v(v({},t),{data:n.data,isSelect:s,rect:e}))?(this.target.style.cssText+="display: none;",t.stop()):s&&this._select(i,e,t)},e._sameCombiKey=function(t,e,n){if(!e)return!1;var i,r=Dt(t.inputEvent,t.key),e=[].concat(e),e=R(e[0])?e:[e];return n?(i=t.key,e.some(function(t){return t.some(function(t){return t===i})})):e.some(function(t){return t.every(function(t){return-1<r.indexOf(t)})})},e._findElement=function(t,e){for(var n=t;n&&!(-1<e.indexOf(n));)n=n.parentElement;return n},e._refreshGroups=function(t){var h,e,f,p,d=t.innerWidth,v=t.innerHeight;d&&v?(h=t.selectableTargets,e=t.selectablePoints,f=t.selectableInners,p={},e.forEach(function(t,e){var n=1/0,i=-1/0,r=1/0,o=-1/0;t.forEach(function(t){var e=Math.floor(t[0]/d),t=Math.floor(t[1]/v);n=Math.min(e,n),i=Math.max(e,i),r=Math.min(t,r),o=Math.max(t,o)});for(var a=n;a<=i;++a)for(var s=r;s<=o;++s){p[a]=p[a]||{},p[a][s]=p[a][s]||{points:[],targets:[],inners:[]};var c=p[a][s],u=c.targets,l=c.inners,c=c.points;u.push(h[e]),c.push(t),l.push(f[e])}}),t.innerGroups=p):t.innerGroups=null},function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;0<=s;s--)(r=t[s])&&(a=(o<3?r(a):3<o?r(e,n,a):r(e,n))||a);return 3<o&&a&&Object.defineProperty(e,n,a),a}([(i=ne,r=function(t,e){var n={enumerable:!0,configurable:!0,get:function(){return this.options[e]}},i=H("get ".concat(e)),r=(t[i]?n.get=function(){return this[i]()}:n.get=function(){return this.options[e]},H("set ".concat(e)));t[r]?n.set=function(t){this[r](t)}:n.set=function(t){this.options[e]=t},Object.defineProperty(t,e,n)},function(t){var e=t.prototype;i.forEach(function(t){r(e,t)})})],t)}(t)),re={__proto__:null,default:ie,OPTIONS:i,OPTION_TYPES:Ct,PROPERTIES:ne,EVENTS:["dragStart","drag","dragEnd","selectStart","select","selectEnd","keydown","keyup","scroll"],METHODS:["clickTarget","getSelectableElements","setSelectedTargets","getElementPoints","getSelectedTargets","findSelectableTargets","triggerDragStart","checkScroll","selectTargetsByPoints","setSelectedTargetsByPoints"],CLASS_NAME:ee};for(Qt in re)ie[Qt]=re[Qt];return ie}); | ||
//# sourceMappingURL=selecto.min.js.map |
{ | ||
"name": "selecto", | ||
"version": "1.21.0-beta.0", | ||
"version": "1.21.0", | ||
"description": "Selecto.js is a component that allows you to select elements in the drag area using the mouse or touch.", | ||
@@ -43,3 +43,3 @@ "main": "./dist/selecto.cjs.js", | ||
"framework-utils": "^1.1.0", | ||
"gesto": "^1.13.1", | ||
"gesto": "^1.15.0", | ||
"keycon": "^1.2.0", | ||
@@ -46,0 +46,0 @@ "overlap-area": "^1.1.0" |
@@ -41,2 +41,3 @@ import styled from "css-styled"; | ||
"clickBySelectEnd", | ||
"checkOverflow", | ||
] as const; | ||
@@ -82,2 +83,3 @@ /** | ||
preventClickEventOnDrag: Boolean, | ||
checkOverflow: Boolean, | ||
}; | ||
@@ -84,0 +86,0 @@ |
@@ -155,2 +155,7 @@ import { IObject } from "@daybrush/utils"; | ||
portalContainer: HTMLElement | null; | ||
/** | ||
* Inspect the overflow area and exclude the outside target from the select. | ||
* @default false | ||
*/ | ||
checkOverflow: boolean; | ||
} | ||
@@ -251,2 +256,6 @@ /** | ||
data: Record<string, any>; | ||
/** | ||
* Whether or not you directly dragged | ||
*/ | ||
isTrusted: boolean; | ||
} | ||
@@ -300,2 +309,3 @@ /** | ||
inputEvent: any; | ||
isTrusted: boolean; | ||
} | ||
@@ -364,2 +374,3 @@ export interface OnKeyEvent<T = Selecto> extends CurrentTarget<T> { | ||
points: number[][][]; | ||
inners: boolean[]; | ||
} |
@@ -1,2 +0,2 @@ | ||
import type { Hypertext, Rect } from "./types"; | ||
import type { Hypertext, Point, Rect } from "./types"; | ||
import { IObject, addClass, hasClass, calculateBoundSize, getDist } from "@daybrush/utils"; | ||
@@ -171,3 +171,3 @@ import { diff } from "@egjs/children-differ"; | ||
export function getDefaultElementRect(el: HTMLElement | SVGElement) { | ||
export function getDefaultElementRect(el: HTMLElement | SVGElement): Point { | ||
const rect = el.getBoundingClientRect(); | ||
@@ -174,0 +174,0 @@ const { left, top, width, height } = rect; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
819377
10858
0
Updatedgesto@^1.15.0