@react-aria/dnd 3.0.0-alpha.3 → 3.0.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.js CHANGED
@@ -1,2371 +1,1795 @@
1
- import { useMessageFormatter } from "@react-aria/i18n";
2
- import _reactDom from "react-dom";
3
- import { useId, useDescription, mergeProps, getScrollParent, isIOS, isWebKit, chain } from "@react-aria/utils";
4
- import { getInteractionModality, useInteractionModality, setInteractionModality, useFocus } from "@react-aria/interactions";
5
- import _babelRuntimeHelpersEsmWrapAsyncGenerator from "@babel/runtime/helpers/esm/wrapAsyncGenerator";
6
- import _babelRuntimeHelpersEsmAwaitAsyncGenerator from "@babel/runtime/helpers/esm/awaitAsyncGenerator";
7
- import { ariaHideOutside } from "@react-aria/overlays";
8
- import { announce } from "@react-aria/live-announcer";
9
- import { useRef, useState, useEffect, useLayoutEffect, useCallback } from "react";
10
- import _babelRuntimeHelpersEsmInteropRequireDefault from "@babel/runtime/helpers/esm/interopRequireDefault";
11
- import _babelRuntimeHelpersEsmExtends from "@babel/runtime/helpers/esm/extends";
12
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/src/constants.ts
13
- var $cd2dc9b4103e6936caca05e2d05$var$_temp;
14
-
15
- /*
16
- * Copyright 2020 Adobe. All rights reserved.
17
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
18
- * you may not use this file except in compliance with the License. You may obtain a copy
19
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
20
- *
21
- * Unless required by applicable law or agreed to in writing, software distributed under
22
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
23
- * OF ANY KIND, either express or implied. See the License for the specific language
24
- * governing permissions and limitations under the License.
25
- */
26
- let $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION; // See https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/effectAllowed
27
-
28
- (function (DROP_OPERATION) {
29
- DROP_OPERATION[DROP_OPERATION["none"] = 0] = "none";
30
- DROP_OPERATION[DROP_OPERATION["cancel"] = 0] = "cancel";
31
- DROP_OPERATION[DROP_OPERATION["move"] = 1] = "move";
32
- DROP_OPERATION[DROP_OPERATION["copy"] = 2] = "copy";
33
- DROP_OPERATION[DROP_OPERATION["link"] = 4] = "link";
34
- DROP_OPERATION[DROP_OPERATION["all"] = 7] = "all";
35
- })($cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION || ($cd2dc9b4103e6936caca05e2d05$var$_temp = $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION = {}, $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION, $cd2dc9b4103e6936caca05e2d05$var$_temp));
36
-
37
- const $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION_ALLOWED = _babelRuntimeHelpersEsmExtends({}, $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION, {
38
- copyMove: $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION.copy | $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION.move,
39
- copyLink: $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION.copy | $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION.link,
40
- linkMove: $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION.link | $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION.move,
41
- all: $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION.all,
42
- uninitialized: $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION.all
43
- });
44
-
45
- const $cd2dc9b4103e6936caca05e2d05$export$EFFECT_ALLOWED = $cd2dc9b4103e6936caca05e2d05$var$invert($cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION_ALLOWED);
46
- const $cd2dc9b4103e6936caca05e2d05$export$DROP_EFFECT = $cd2dc9b4103e6936caca05e2d05$var$invert($cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION);
47
- const $cd2dc9b4103e6936caca05e2d05$export$DROP_EFFECT_TO_DROP_OPERATION = {
48
- none: 'cancel',
49
- link: 'link',
50
- copy: 'copy',
51
- move: 'move'
1
+ import {useRef as $3kwX1$useRef, useState as $3kwX1$useState, useEffect as $3kwX1$useEffect, useCallback as $3kwX1$useCallback} from "react";
2
+ import $3kwX1$reactdom from "react-dom";
3
+ import {useDescription as $3kwX1$useDescription, useId as $3kwX1$useId, useLayoutEffect as $3kwX1$useLayoutEffect, mergeProps as $3kwX1$mergeProps, getScrollParent as $3kwX1$getScrollParent, isWebKit as $3kwX1$isWebKit, isIOS as $3kwX1$isIOS, chain as $3kwX1$chain} from "@react-aria/utils";
4
+ import {useMessageFormatter as $3kwX1$useMessageFormatter} from "@react-aria/i18n";
5
+ import {announce as $3kwX1$announce} from "@react-aria/live-announcer";
6
+ import {ariaHideOutside as $3kwX1$ariaHideOutside} from "@react-aria/overlays";
7
+ import {useInteractionModality as $3kwX1$useInteractionModality, getInteractionModality as $3kwX1$getInteractionModality, setInteractionModality as $3kwX1$setInteractionModality, useFocus as $3kwX1$useFocus} from "@react-aria/interactions";
8
+
9
+ function $parcel$interopDefault(a) {
10
+ return a && a.__esModule ? a.default : a;
11
+ }
12
+ function $parcel$export(e, n, v, s) {
13
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
14
+ }
15
+ var $98f744b02c510da7$exports = {};
16
+
17
+ $parcel$export($98f744b02c510da7$exports, "useDrag", () => $98f744b02c510da7$export$7941f8aafa4b6021);
18
+
19
+
20
+
21
+ let $b412d65e07c8d230$export$60b7b4bcf3903d8e;
22
+ (function($b412d65e07c8d230$export$60b7b4bcf3903d8e) {
23
+ $b412d65e07c8d230$export$60b7b4bcf3903d8e[$b412d65e07c8d230$export$60b7b4bcf3903d8e["none"] = 0] = "none";
24
+ $b412d65e07c8d230$export$60b7b4bcf3903d8e[$b412d65e07c8d230$export$60b7b4bcf3903d8e["cancel"] = 0] = "cancel";
25
+ $b412d65e07c8d230$export$60b7b4bcf3903d8e[$b412d65e07c8d230$export$60b7b4bcf3903d8e["move"] = 1] = "move";
26
+ $b412d65e07c8d230$export$60b7b4bcf3903d8e[$b412d65e07c8d230$export$60b7b4bcf3903d8e["copy"] = 2] = "copy";
27
+ $b412d65e07c8d230$export$60b7b4bcf3903d8e[$b412d65e07c8d230$export$60b7b4bcf3903d8e["link"] = 4] = "link";
28
+ $b412d65e07c8d230$export$60b7b4bcf3903d8e[$b412d65e07c8d230$export$60b7b4bcf3903d8e["all"] = 7] = "all";
29
+ })($b412d65e07c8d230$export$60b7b4bcf3903d8e || ($b412d65e07c8d230$export$60b7b4bcf3903d8e = {
30
+ }));
31
+ const $b412d65e07c8d230$export$9bbdfc78cf083e16 = {
32
+ ...$b412d65e07c8d230$export$60b7b4bcf3903d8e,
33
+ copyMove: $b412d65e07c8d230$export$60b7b4bcf3903d8e.copy | $b412d65e07c8d230$export$60b7b4bcf3903d8e.move,
34
+ copyLink: $b412d65e07c8d230$export$60b7b4bcf3903d8e.copy | $b412d65e07c8d230$export$60b7b4bcf3903d8e.link,
35
+ linkMove: $b412d65e07c8d230$export$60b7b4bcf3903d8e.link | $b412d65e07c8d230$export$60b7b4bcf3903d8e.move,
36
+ all: $b412d65e07c8d230$export$60b7b4bcf3903d8e.all,
37
+ uninitialized: $b412d65e07c8d230$export$60b7b4bcf3903d8e.all
52
38
  };
53
- const $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION_TO_DROP_EFFECT = $cd2dc9b4103e6936caca05e2d05$var$invert($cd2dc9b4103e6936caca05e2d05$export$DROP_EFFECT_TO_DROP_OPERATION);
54
-
55
- function $cd2dc9b4103e6936caca05e2d05$var$invert(object) {
56
- let res = {};
57
-
58
- for (let key in object) {
59
- res[object[key]] = key;
60
- }
61
-
62
- return res;
39
+ const $b412d65e07c8d230$export$dd0165308d8bff45 = $b412d65e07c8d230$var$invert($b412d65e07c8d230$export$9bbdfc78cf083e16);
40
+ const $b412d65e07c8d230$export$d7ebf00f36b7a95e = $b412d65e07c8d230$var$invert($b412d65e07c8d230$export$60b7b4bcf3903d8e);
41
+ const $b412d65e07c8d230$export$608ecc6f1b23c35d = {
42
+ none: 'cancel',
43
+ link: 'link',
44
+ copy: 'copy',
45
+ move: 'move'
46
+ };
47
+ const $b412d65e07c8d230$export$5eacb0769d26d3b2 = $b412d65e07c8d230$var$invert($b412d65e07c8d230$export$608ecc6f1b23c35d);
48
+ function $b412d65e07c8d230$var$invert(object) {
49
+ let res = {
50
+ };
51
+ for(let key in object)res[object[key]] = key;
52
+ return res;
63
53
  }
54
+ const $b412d65e07c8d230$export$4a7729b856e9a690 = new Set([
55
+ 'text/plain',
56
+ 'text/uri-list',
57
+ 'text/html'
58
+ ]);
59
+ const $b412d65e07c8d230$export$fd9f9fc120c5402d = 'application/vnd.react-aria.items+json';
60
+ const $b412d65e07c8d230$export$f8fc6581787339b3 = 'application/octet-stream';
64
61
 
65
- const $cd2dc9b4103e6936caca05e2d05$export$NATIVE_DRAG_TYPES = new Set(['text/plain', 'text/uri-list', 'text/html']);
66
- const $cd2dc9b4103e6936caca05e2d05$export$CUSTOM_DRAG_TYPE = 'application/vnd.react-aria.items+json';
67
- const $cd2dc9b4103e6936caca05e2d05$export$GENERIC_TYPE = 'application/octet-stream';
68
- const $daf765036c8e081b3420fc4f613ad96$var$droppableCollectionIds = new WeakMap();
69
62
 
70
- function $daf765036c8e081b3420fc4f613ad96$export$useDroppableCollectionId(state) {
71
- let id = useId();
72
- $daf765036c8e081b3420fc4f613ad96$var$droppableCollectionIds.set(state, id);
73
- return id;
74
- }
75
-
76
- function $daf765036c8e081b3420fc4f613ad96$export$getDroppableCollectionId(state) {
77
- let id = $daf765036c8e081b3420fc4f613ad96$var$droppableCollectionIds.get(state);
78
63
 
79
- if (!id) {
80
- throw new Error('Droppable item outside a droppable collection');
81
- }
82
64
 
83
- return id;
65
+ const $6d32ba78df89e8ed$var$droppableCollectionIds = new WeakMap();
66
+ function $6d32ba78df89e8ed$export$b1601eb39394a581(state) {
67
+ let id = $3kwX1$useId();
68
+ $6d32ba78df89e8ed$var$droppableCollectionIds.set(state, id);
69
+ return id;
84
70
  }
85
-
86
- function $daf765036c8e081b3420fc4f613ad96$export$getTypes(items) {
87
- let types = new Set();
88
-
89
- for (let item of items) {
90
- for (let type of Object.keys(item)) {
91
- types.add(type);
92
- }
93
- }
94
-
95
- return types;
71
+ function $6d32ba78df89e8ed$export$3093291712f09a77(state) {
72
+ let id = $6d32ba78df89e8ed$var$droppableCollectionIds.get(state);
73
+ if (!id) throw new Error('Droppable item outside a droppable collection');
74
+ return id;
96
75
  }
97
-
98
- function $daf765036c8e081b3420fc4f613ad96$var$mapModality(modality) {
99
- if (!modality) {
100
- modality = 'virtual';
101
- }
102
-
103
- if (modality === 'pointer') {
104
- modality = 'virtual';
105
- }
106
-
107
- if (modality === 'virtual' && 'ontouchstart' in window) {
108
- modality = 'touch';
109
- }
110
-
111
- return modality;
76
+ function $6d32ba78df89e8ed$export$e1d41611756c6326(items) {
77
+ let types = new Set();
78
+ for (let item of items)for (let type of Object.keys(item))types.add(type);
79
+ return types;
112
80
  }
113
-
114
- function $daf765036c8e081b3420fc4f613ad96$export$useDragModality() {
115
- return $daf765036c8e081b3420fc4f613ad96$var$mapModality(useInteractionModality());
81
+ function $6d32ba78df89e8ed$var$mapModality(modality) {
82
+ if (!modality) modality = 'virtual';
83
+ if (modality === 'pointer') modality = 'virtual';
84
+ if (modality === 'virtual' && 'ontouchstart' in window) modality = 'touch';
85
+ return modality;
116
86
  }
117
-
118
- function $daf765036c8e081b3420fc4f613ad96$export$getDragModality() {
119
- return $daf765036c8e081b3420fc4f613ad96$var$mapModality(getInteractionModality());
87
+ function $6d32ba78df89e8ed$export$49bac5d6d4b352ea() {
88
+ return $6d32ba78df89e8ed$var$mapModality($3kwX1$useInteractionModality());
120
89
  }
121
-
122
- function $daf765036c8e081b3420fc4f613ad96$export$writeToDataTransfer(dataTransfer, items) {
123
- // The data transfer API doesn't support more than one item of a given type at once.
124
- // In addition, only a small set of types are supported natively for transfer between applications.
125
- // We allow for both multiple items, as well as multiple representations of a single item.
126
- // In order to make our API work with the native API, we serialize all items to JSON and
127
- // store as a single native item. We only need to do this if there is more than one item
128
- // of the same type, or if an item has more than one representation. Otherwise the native
129
- // API is sufficient.
130
- //
131
- // The DataTransferItemList API also theoretically supports adding files, which would enable
132
- // dragging binary data out of the browser onto the user's desktop for example. Unfortunately,
133
- // this does not currently work in any browser, so it is not currently supported by our API.
134
- // See e.g. https://bugs.chromium.org/p/chromium/issues/detail?id=438479.
135
- let groupedByType = new Map();
136
- let needsCustomData = false;
137
- let customData = [];
138
-
139
- for (let item of items) {
140
- let types = Object.keys(item);
141
-
142
- if (types.length > 1) {
143
- needsCustomData = true;
144
- }
145
-
146
- let dataByType = {};
147
-
148
- for (let type of types) {
149
- let typeItems = groupedByType.get(type);
150
-
151
- if (!typeItems) {
152
- typeItems = [];
153
- groupedByType.set(type, typeItems);
154
- } else {
155
- needsCustomData = true;
156
- }
157
-
158
- let data = item[type];
159
- dataByType[type] = data;
160
- typeItems.push(data);
161
- }
162
-
163
- customData.push(dataByType);
164
- }
165
-
166
- for (let [type, items] of groupedByType) {
167
- if ($cd2dc9b4103e6936caca05e2d05$export$NATIVE_DRAG_TYPES.has(type)) {
168
- // Only one item of a given type can be set on a data transfer.
169
- // Join all of the items together separated by newlines.
170
- let data = items.join('\n');
171
- dataTransfer.items.add(data, type);
172
- } else {
173
- // Set data to the first item so we have access to the list of types.
174
- dataTransfer.items.add(items[0], type);
175
- }
176
- }
177
-
178
- if (needsCustomData) {
179
- let data = JSON.stringify(customData);
180
- dataTransfer.items.add(data, $cd2dc9b4103e6936caca05e2d05$export$CUSTOM_DRAG_TYPE);
181
- }
90
+ function $6d32ba78df89e8ed$export$1fb2158d224b542c() {
91
+ return $6d32ba78df89e8ed$var$mapModality($3kwX1$getInteractionModality());
182
92
  }
183
-
184
- class $daf765036c8e081b3420fc4f613ad96$export$DragTypes {
185
- constructor(dataTransfer) {
186
- this.types = void 0;
187
- this.includesUnknownTypes = void 0;
188
- this.types = new Set();
189
- let hasFiles = false;
190
-
191
- for (let item of dataTransfer.items) {
192
- if (item.type !== $cd2dc9b4103e6936caca05e2d05$export$CUSTOM_DRAG_TYPE) {
193
- if (item.kind === 'file') {
194
- hasFiles = true;
93
+ function $6d32ba78df89e8ed$export$f9c1490890ddd063(dataTransfer, items) {
94
+ // The data transfer API doesn't support more than one item of a given type at once.
95
+ // In addition, only a small set of types are supported natively for transfer between applications.
96
+ // We allow for both multiple items, as well as multiple representations of a single item.
97
+ // In order to make our API work with the native API, we serialize all items to JSON and
98
+ // store as a single native item. We only need to do this if there is more than one item
99
+ // of the same type, or if an item has more than one representation. Otherwise the native
100
+ // API is sufficient.
101
+ //
102
+ // The DataTransferItemList API also theoretically supports adding files, which would enable
103
+ // dragging binary data out of the browser onto the user's desktop for example. Unfortunately,
104
+ // this does not currently work in any browser, so it is not currently supported by our API.
105
+ // See e.g. https://bugs.chromium.org/p/chromium/issues/detail?id=438479.
106
+ let groupedByType = new Map();
107
+ let needsCustomData = false;
108
+ let customData = [];
109
+ for (let item of items){
110
+ let types = Object.keys(item);
111
+ if (types.length > 1) needsCustomData = true;
112
+ let dataByType = {
113
+ };
114
+ for (let type of types){
115
+ let typeItems = groupedByType.get(type);
116
+ if (!typeItems) {
117
+ typeItems = [];
118
+ groupedByType.set(type, typeItems);
119
+ } else needsCustomData = true;
120
+ let data = item[type];
121
+ dataByType[type] = data;
122
+ typeItems.push(data);
195
123
  }
196
-
197
- if (item.type) {
198
- this.types.add(item.type);
199
- } else {
200
- // Files with unknown types or extensions that don't map to a known mime type
201
- // are sometimes exposed as an empty string by the browser. Map to a generic
202
- // mime type instead. Note that this could also be a directory as there's no
203
- // way to determine if something is a file or directory until drop.
204
- this.types.add($cd2dc9b4103e6936caca05e2d05$export$GENERIC_TYPE);
124
+ customData.push(dataByType);
125
+ }
126
+ for (let [type, items1] of groupedByType)if ($b412d65e07c8d230$export$4a7729b856e9a690.has(type)) {
127
+ // Only one item of a given type can be set on a data transfer.
128
+ // Join all of the items together separated by newlines.
129
+ let data = items1.join('\n');
130
+ dataTransfer.items.add(data, type);
131
+ } else // Set data to the first item so we have access to the list of types.
132
+ dataTransfer.items.add(items1[0], type);
133
+ if (needsCustomData) {
134
+ let data = JSON.stringify(customData);
135
+ dataTransfer.items.add(data, $b412d65e07c8d230$export$fd9f9fc120c5402d);
136
+ }
137
+ }
138
+ class $6d32ba78df89e8ed$export$7f04ce188c91447c {
139
+ constructor(dataTransfer){
140
+ this.types = new Set();
141
+ let hasFiles = false;
142
+ for (let item of dataTransfer.items)if (item.type !== $b412d65e07c8d230$export$fd9f9fc120c5402d) {
143
+ if (item.kind === 'file') hasFiles = true;
144
+ if (item.type) this.types.add(item.type);
145
+ else // Files with unknown types or extensions that don't map to a known mime type
146
+ // are sometimes exposed as an empty string by the browser. Map to a generic
147
+ // mime type instead. Note that this could also be a directory as there's no
148
+ // way to determine if something is a file or directory until drop.
149
+ this.types.add($b412d65e07c8d230$export$f8fc6581787339b3);
205
150
  }
206
- }
207
- } // In Safari, when dragging files, the dataTransfer.items list is empty, but dataTransfer.types contains "Files".
208
- // Unfortunately, this doesn't tell us what types of files the user is dragging, so we need to assume that any
209
- // type the user checks for is included. See https://bugs.webkit.org/show_bug.cgi?id=223517.
210
-
211
-
212
- this.includesUnknownTypes = !hasFiles && dataTransfer.types.includes('Files');
213
- }
214
-
215
- has(type) {
216
- if (this.includesUnknownTypes) {
217
- return true;
151
+ // In Safari, when dragging files, the dataTransfer.items list is empty, but dataTransfer.types contains "Files".
152
+ // Unfortunately, this doesn't tell us what types of files the user is dragging, so we need to assume that any
153
+ // type the user checks for is included. See https://bugs.webkit.org/show_bug.cgi?id=223517.
154
+ this.includesUnknownTypes = !hasFiles && dataTransfer.types.includes('Files');
155
+ }
156
+ has(type) {
157
+ if (this.includesUnknownTypes) return true;
158
+ return this.types.has(type);
218
159
  }
219
-
220
- return this.types.has(type);
221
- }
222
-
223
160
  }
224
-
225
- function $daf765036c8e081b3420fc4f613ad96$export$readFromDataTransfer(dataTransfer) {
226
- let items = []; // If our custom drag type is available, use that. This is a JSON serialized
227
- // representation of all items in the drag, set when there are multiple items
228
- // of the same type, or an individual item has multiple representations.
229
-
230
- let hasCustomType = false;
231
-
232
- if (dataTransfer.types.includes($cd2dc9b4103e6936caca05e2d05$export$CUSTOM_DRAG_TYPE)) {
233
- try {
234
- let data = dataTransfer.getData($cd2dc9b4103e6936caca05e2d05$export$CUSTOM_DRAG_TYPE);
235
- let parsed = JSON.parse(data);
236
-
237
- for (let item of parsed) {
238
- items.push({
239
- kind: 'text',
240
- types: new Set(Object.keys(item)),
241
- getText: type => Promise.resolve(item[type])
161
+ function $6d32ba78df89e8ed$export$d9e760437831f8b3(dataTransfer) {
162
+ let items = [];
163
+ // If our custom drag type is available, use that. This is a JSON serialized
164
+ // representation of all items in the drag, set when there are multiple items
165
+ // of the same type, or an individual item has multiple representations.
166
+ let hasCustomType = false;
167
+ if (dataTransfer.types.includes($b412d65e07c8d230$export$fd9f9fc120c5402d)) try {
168
+ let data = dataTransfer.getData($b412d65e07c8d230$export$fd9f9fc120c5402d);
169
+ let parsed = JSON.parse(data);
170
+ for (let item of parsed)items.push({
171
+ kind: 'text',
172
+ types: new Set(Object.keys(item)),
173
+ getText: (type)=>Promise.resolve(item[type])
242
174
  });
243
- }
244
-
245
- hasCustomType = true;
246
- } catch (e) {// ignore
247
- }
248
- } // Otherwise, map native drag items to items of a single representation.
249
-
250
-
251
- if (!hasCustomType) {
252
- let stringItems = new Map();
253
-
254
- for (let item of dataTransfer.items) {
255
- if (item.kind === 'string') {
256
- // The data for all formats must be read here because the data transfer gets
257
- // cleared out after the event handler finishes. If the item has an empty string
258
- // as a type, the mime type is unknown. Map to a generic mime type instead.
259
- stringItems.set(item.type || $cd2dc9b4103e6936caca05e2d05$export$GENERIC_TYPE, dataTransfer.getData(item.type));
260
- } else if (item.kind === 'file') {
261
- // Despite the name, webkitGetAsEntry is also implemented in Firefox and Edge.
262
- // In the future, we may use getAsFileSystemHandle instead, but that's currently
263
- // only implemented in Chrome.
264
- if (typeof item.webkitGetAsEntry === 'function') {
265
- let entry = item.webkitGetAsEntry();
266
-
267
- if (!entry) {
268
- // For some reason, Firefox includes an item with type image/png when copy
269
- // and pasting any file or directory (no matter the type), but returns `null` for both
270
- // item.getAsFile() and item.webkitGetAsEntry(). Safari works as expected. Ignore this
271
- // item if this happens. See https://bugzilla.mozilla.org/show_bug.cgi?id=1699743.
272
- // This was recently fixed in Chrome Canary: https://bugs.chromium.org/p/chromium/issues/detail?id=1175483.
273
- continue;
274
- }
275
-
276
- if (entry.isFile) {
277
- items.push($daf765036c8e081b3420fc4f613ad96$var$createFileItem(item.getAsFile()));
278
- } else if (entry.isDirectory) {
279
- items.push($daf765036c8e081b3420fc4f613ad96$var$createDirectoryItem(entry));
280
- }
281
- } else {
282
- // Assume it's a file.
283
- items.push($daf765036c8e081b3420fc4f613ad96$var$createFileItem(item.getAsFile()));
175
+ hasCustomType = true;
176
+ } catch (e) {
177
+ // ignore
178
+ }
179
+ // Otherwise, map native drag items to items of a single representation.
180
+ if (!hasCustomType) {
181
+ let stringItems = new Map();
182
+ for (let item of dataTransfer.items){
183
+ if (item.kind === 'string') // The data for all formats must be read here because the data transfer gets
184
+ // cleared out after the event handler finishes. If the item has an empty string
185
+ // as a type, the mime type is unknown. Map to a generic mime type instead.
186
+ stringItems.set(item.type || $b412d65e07c8d230$export$f8fc6581787339b3, dataTransfer.getData(item.type));
187
+ else if (item.kind === 'file') {
188
+ // Despite the name, webkitGetAsEntry is also implemented in Firefox and Edge.
189
+ // In the future, we may use getAsFileSystemHandle instead, but that's currently
190
+ // only implemented in Chrome.
191
+ if (typeof item.webkitGetAsEntry === 'function') {
192
+ let entry = item.webkitGetAsEntry();
193
+ if (!entry) continue;
194
+ if (entry.isFile) items.push($6d32ba78df89e8ed$var$createFileItem(item.getAsFile()));
195
+ else if (entry.isDirectory) items.push($6d32ba78df89e8ed$var$createDirectoryItem(entry));
196
+ } else // Assume it's a file.
197
+ items.push($6d32ba78df89e8ed$var$createFileItem(item.getAsFile()));
198
+ }
284
199
  }
285
- }
286
- } // All string items are different representations of the same item. There's no way to have
287
- // multiple string items at once in the current DataTransfer API.
288
-
289
-
290
- if (stringItems.size > 0) {
291
- items.push({
292
- kind: 'text',
293
- types: new Set(stringItems.keys()),
294
- getText: type => Promise.resolve(stringItems.get(type))
295
- });
200
+ // All string items are different representations of the same item. There's no way to have
201
+ // multiple string items at once in the current DataTransfer API.
202
+ if (stringItems.size > 0) items.push({
203
+ kind: 'text',
204
+ types: new Set(stringItems.keys()),
205
+ getText: (type)=>Promise.resolve(stringItems.get(type))
206
+ });
296
207
  }
297
- }
298
-
299
- return items;
300
- }
301
-
302
- function $daf765036c8e081b3420fc4f613ad96$var$blobToString(blob) {
303
- if (typeof blob.text === 'function') {
304
- return blob.text();
305
- } // Safari doesn't have the Blob#text() method yet...
306
-
307
-
308
- return new Promise((resolve, reject) => {
309
- let reader = new FileReader();
310
-
311
- reader.onload = () => {
312
- resolve(reader.result);
313
- };
314
-
315
- reader.onerror = reject;
316
- reader.readAsText(blob);
317
- });
208
+ return items;
318
209
  }
319
-
320
- function $daf765036c8e081b3420fc4f613ad96$var$createFileItem(file) {
321
- return {
322
- kind: 'file',
323
- type: file.type || $cd2dc9b4103e6936caca05e2d05$export$GENERIC_TYPE,
324
- name: file.name,
325
- getText: () => $daf765036c8e081b3420fc4f613ad96$var$blobToString(file),
326
- getFile: () => Promise.resolve(file)
327
- };
210
+ function $6d32ba78df89e8ed$var$blobToString(blob) {
211
+ if (typeof blob.text === 'function') return blob.text();
212
+ // Safari doesn't have the Blob#text() method yet...
213
+ return new Promise((resolve, reject)=>{
214
+ let reader = new FileReader;
215
+ reader.onload = ()=>{
216
+ resolve(reader.result);
217
+ };
218
+ reader.onerror = reject;
219
+ reader.readAsText(blob);
220
+ });
328
221
  }
329
-
330
- function $daf765036c8e081b3420fc4f613ad96$var$createDirectoryItem(entry) {
331
- return {
332
- kind: 'directory',
333
- name: entry.name,
334
- getEntries: () => $daf765036c8e081b3420fc4f613ad96$var$_getEntries2(entry)
335
- };
222
+ function $6d32ba78df89e8ed$var$createFileItem(file) {
223
+ return {
224
+ kind: 'file',
225
+ type: file.type || $b412d65e07c8d230$export$f8fc6581787339b3,
226
+ name: file.name,
227
+ getText: ()=>$6d32ba78df89e8ed$var$blobToString(file)
228
+ ,
229
+ getFile: ()=>Promise.resolve(file)
230
+ };
336
231
  }
337
-
338
- function $daf765036c8e081b3420fc4f613ad96$var$_getEntries2(_x) {
339
- return $daf765036c8e081b3420fc4f613ad96$var$_getEntries.apply(this, arguments);
232
+ function $6d32ba78df89e8ed$var$createDirectoryItem(entry) {
233
+ return {
234
+ kind: 'directory',
235
+ name: entry.name,
236
+ getEntries: ()=>$6d32ba78df89e8ed$var$getEntries(entry)
237
+ };
340
238
  }
341
-
342
- function $daf765036c8e081b3420fc4f613ad96$var$_getEntries() {
343
- $daf765036c8e081b3420fc4f613ad96$var$_getEntries = _babelRuntimeHelpersEsmWrapAsyncGenerator(function* (item) {
344
- let reader = item.createReader(); // We must call readEntries repeatedly because there may be a limit to the
239
+ async function* $6d32ba78df89e8ed$var$getEntries(item) {
240
+ let reader = item.createReader();
241
+ // We must call readEntries repeatedly because there may be a limit to the
345
242
  // number of entries that are returned at once.
346
-
347
243
  let entries;
348
-
349
244
  do {
350
- entries = yield _babelRuntimeHelpersEsmAwaitAsyncGenerator(new Promise((resolve, reject) => {
351
- reader.readEntries(resolve, reject);
352
- }));
353
-
354
- for (let entry of entries) {
355
- if (entry.isFile) {
356
- let file = yield _babelRuntimeHelpersEsmAwaitAsyncGenerator($daf765036c8e081b3420fc4f613ad96$var$getEntryFile(entry));
357
- yield $daf765036c8e081b3420fc4f613ad96$var$createFileItem(file);
358
- } else if (entry.isDirectory) {
359
- yield $daf765036c8e081b3420fc4f613ad96$var$createDirectoryItem(entry);
245
+ entries = await new Promise((resolve, reject)=>{
246
+ reader.readEntries(resolve, reject);
247
+ });
248
+ for (let entry of entries){
249
+ if (entry.isFile) {
250
+ let file = await $6d32ba78df89e8ed$var$getEntryFile(entry);
251
+ yield $6d32ba78df89e8ed$var$createFileItem(file);
252
+ } else if (entry.isDirectory) yield $6d32ba78df89e8ed$var$createDirectoryItem(entry);
360
253
  }
361
- }
362
- } while (entries.length > 0);
363
- });
364
- return $daf765036c8e081b3420fc4f613ad96$var$_getEntries.apply(this, arguments);
254
+ }while (entries.length > 0)
365
255
  }
366
-
367
- function $daf765036c8e081b3420fc4f613ad96$var$getEntryFile(entry) {
368
- return new Promise((resolve, reject) => entry.file(resolve, reject));
256
+ function $6d32ba78df89e8ed$var$getEntryFile(entry) {
257
+ return new Promise((resolve, reject)=>entry.file(resolve, reject)
258
+ );
369
259
  }
370
260
 
371
- let $f2f44a26f7541d104d10e68c115a897a$var$dropTargets = new Map();
372
- let $f2f44a26f7541d104d10e68c115a897a$var$dropItems = new Map();
373
- let $f2f44a26f7541d104d10e68c115a897a$var$dragSession = null;
374
- let $f2f44a26f7541d104d10e68c115a897a$var$subscriptions = new Set();
375
-
376
- function $f2f44a26f7541d104d10e68c115a897a$export$registerDropTarget(target) {
377
- var _dragSession;
378
261
 
379
- $f2f44a26f7541d104d10e68c115a897a$var$dropTargets.set(target.element, target);
380
- (_dragSession = $f2f44a26f7541d104d10e68c115a897a$var$dragSession) == null ? void 0 : _dragSession.updateValidDropTargets();
381
- return () => {
382
- var _dragSession2;
383
262
 
384
- $f2f44a26f7541d104d10e68c115a897a$var$dropTargets.delete(target.element);
385
- (_dragSession2 = $f2f44a26f7541d104d10e68c115a897a$var$dragSession) == null ? void 0 : _dragSession2.updateValidDropTargets();
386
- };
263
+ let $3f1be781b0a897ea$var$dropTargets = new Map();
264
+ let $3f1be781b0a897ea$var$dropItems = new Map();
265
+ let $3f1be781b0a897ea$var$dragSession = null;
266
+ let $3f1be781b0a897ea$var$subscriptions = new Set();
267
+ function $3f1be781b0a897ea$export$c28d9fb4a54e471a(target) {
268
+ $3f1be781b0a897ea$var$dropTargets.set(target.element, target);
269
+ $3f1be781b0a897ea$var$dragSession?.updateValidDropTargets();
270
+ return ()=>{
271
+ $3f1be781b0a897ea$var$dropTargets.delete(target.element);
272
+ $3f1be781b0a897ea$var$dragSession?.updateValidDropTargets();
273
+ };
387
274
  }
388
-
389
- function $f2f44a26f7541d104d10e68c115a897a$export$registerDropItem(item) {
390
- $f2f44a26f7541d104d10e68c115a897a$var$dropItems.set(item.element, item);
391
- return () => {
392
- $f2f44a26f7541d104d10e68c115a897a$var$dropItems.delete(item.element);
393
- };
275
+ function $3f1be781b0a897ea$export$aef80212ac99c003(item) {
276
+ $3f1be781b0a897ea$var$dropItems.set(item.element, item);
277
+ return ()=>{
278
+ $3f1be781b0a897ea$var$dropItems.delete(item.element);
279
+ };
394
280
  }
395
-
396
- function $f2f44a26f7541d104d10e68c115a897a$export$beginDragging(target, formatMessage) {
397
- if ($f2f44a26f7541d104d10e68c115a897a$var$dragSession) {
398
- throw new Error('Cannot begin dragging while already dragging');
399
- }
400
-
401
- $f2f44a26f7541d104d10e68c115a897a$var$dragSession = new $f2f44a26f7541d104d10e68c115a897a$var$DragSession(target, formatMessage);
402
- requestAnimationFrame(() => {
403
- $f2f44a26f7541d104d10e68c115a897a$var$dragSession.setup();
404
-
405
- if ($daf765036c8e081b3420fc4f613ad96$export$getDragModality() === 'keyboard') {
406
- $f2f44a26f7541d104d10e68c115a897a$var$dragSession.next();
407
- }
408
- });
409
-
410
- for (let cb of $f2f44a26f7541d104d10e68c115a897a$var$subscriptions) {
411
- cb();
412
- }
281
+ function $3f1be781b0a897ea$export$549dbcf8649bf3b2(target, formatMessage) {
282
+ if ($3f1be781b0a897ea$var$dragSession) throw new Error('Cannot begin dragging while already dragging');
283
+ $3f1be781b0a897ea$var$dragSession = new $3f1be781b0a897ea$var$DragSession(target, formatMessage);
284
+ requestAnimationFrame(()=>{
285
+ $3f1be781b0a897ea$var$dragSession.setup();
286
+ if ($6d32ba78df89e8ed$export$1fb2158d224b542c() === 'keyboard') $3f1be781b0a897ea$var$dragSession.next();
287
+ });
288
+ for (let cb of $3f1be781b0a897ea$var$subscriptions)cb();
413
289
  }
414
-
415
- function $f2f44a26f7541d104d10e68c115a897a$export$useDragSession() {
416
- let [session, setSession] = useState($f2f44a26f7541d104d10e68c115a897a$var$dragSession);
417
- useEffect(() => {
418
- let cb = () => setSession($f2f44a26f7541d104d10e68c115a897a$var$dragSession);
419
-
420
- $f2f44a26f7541d104d10e68c115a897a$var$subscriptions.add(cb);
421
- return () => {
422
- $f2f44a26f7541d104d10e68c115a897a$var$subscriptions.delete(cb);
423
- };
424
- }, []);
425
- return session;
290
+ function $3f1be781b0a897ea$export$418e185dd3f1b968() {
291
+ let [session, setSession] = $3kwX1$useState($3f1be781b0a897ea$var$dragSession);
292
+ $3kwX1$useEffect(()=>{
293
+ let cb = ()=>setSession($3f1be781b0a897ea$var$dragSession)
294
+ ;
295
+ $3f1be781b0a897ea$var$subscriptions.add(cb);
296
+ return ()=>{
297
+ $3f1be781b0a897ea$var$subscriptions.delete(cb);
298
+ };
299
+ }, []);
300
+ return session;
426
301
  }
427
-
428
- function $f2f44a26f7541d104d10e68c115a897a$var$endDragging() {
429
- $f2f44a26f7541d104d10e68c115a897a$var$dragSession = null;
430
-
431
- for (let cb of $f2f44a26f7541d104d10e68c115a897a$var$subscriptions) {
432
- cb();
433
- }
302
+ function $3f1be781b0a897ea$var$endDragging() {
303
+ $3f1be781b0a897ea$var$dragSession = null;
304
+ for (let cb of $3f1be781b0a897ea$var$subscriptions)cb();
434
305
  }
435
-
436
- const $f2f44a26f7541d104d10e68c115a897a$var$CANCELED_EVENTS = ['pointerdown', 'pointermove', 'pointerenter', 'pointerleave', 'pointerover', 'pointerout', 'pointerup', 'mousedown', 'mousemove', 'mouseenter', 'mouseleave', 'mouseover', 'mouseout', 'mouseup', 'touchstart', 'touchmove', 'touchend', 'keyup', 'focusin', 'focusout'];
437
- const $f2f44a26f7541d104d10e68c115a897a$var$CLICK_EVENTS = ['pointerup', 'mouseup', 'touchend'];
438
- const $f2f44a26f7541d104d10e68c115a897a$var$MESSAGES = {
439
- keyboard: 'dragStartedKeyboard',
440
- touch: 'dragStartedTouch',
441
- virtual: 'dragStartedVirtual'
306
+ const $3f1be781b0a897ea$var$CANCELED_EVENTS = [
307
+ 'pointerdown',
308
+ 'pointermove',
309
+ 'pointerenter',
310
+ 'pointerleave',
311
+ 'pointerover',
312
+ 'pointerout',
313
+ 'pointerup',
314
+ 'mousedown',
315
+ 'mousemove',
316
+ 'mouseenter',
317
+ 'mouseleave',
318
+ 'mouseover',
319
+ 'mouseout',
320
+ 'mouseup',
321
+ 'touchstart',
322
+ 'touchmove',
323
+ 'touchend',
324
+ 'keyup',
325
+ 'focusin',
326
+ 'focusout'
327
+ ];
328
+ const $3f1be781b0a897ea$var$CLICK_EVENTS = [
329
+ 'pointerup',
330
+ 'mouseup',
331
+ 'touchend'
332
+ ];
333
+ const $3f1be781b0a897ea$var$MESSAGES = {
334
+ keyboard: 'dragStartedKeyboard',
335
+ touch: 'dragStartedTouch',
336
+ virtual: 'dragStartedVirtual'
442
337
  };
443
-
444
- class $f2f44a26f7541d104d10e68c115a897a$var$DragSession {
445
- constructor(target, formatMessage) {
446
- this.dragTarget = void 0;
447
- this.validDropTargets = void 0;
448
- this.currentDropTarget = void 0;
449
- this.currentDropItem = void 0;
450
- this.dropOperation = void 0;
451
- this.mutationObserver = void 0;
452
- this.mutationImmediate = void 0;
453
- this.restoreAriaHidden = void 0;
454
- this.formatMessage = void 0;
455
- this.dragTarget = target;
456
- this.formatMessage = formatMessage;
457
- this.onKeyDown = this.onKeyDown.bind(this);
458
- this.onFocus = this.onFocus.bind(this);
459
- this.onBlur = this.onBlur.bind(this);
460
- this.onClick = this.onClick.bind(this);
461
- this.cancelEvent = this.cancelEvent.bind(this);
462
- }
463
-
464
- setup() {
465
- document.addEventListener('keydown', this.onKeyDown, true);
466
- window.addEventListener('focus', this.onFocus, true);
467
- window.addEventListener('blur', this.onBlur, true);
468
- document.addEventListener('click', this.onClick, true);
469
-
470
- for (let event of $f2f44a26f7541d104d10e68c115a897a$var$CANCELED_EVENTS) {
471
- document.addEventListener(event, this.cancelEvent, true);
472
- }
473
-
474
- this.mutationObserver = new MutationObserver(() => {
475
- // JSDOM has a bug where MutationObserver enters an infinite loop if mutations
476
- // occur inside a MutationObserver callback. If running in Node, wait until
477
- // the next tick to update valid drop targets.
478
- // See https://github.com/jsdom/jsdom/issues/3096
479
- if (typeof setImmediate === 'function') {
480
- this.mutationImmediate = setImmediate(() => this.updateValidDropTargets());
481
- } else {
338
+ class $3f1be781b0a897ea$var$DragSession {
339
+ constructor(target, formatMessage){
340
+ this.dragTarget = target;
341
+ this.formatMessage = formatMessage;
342
+ this.onKeyDown = this.onKeyDown.bind(this);
343
+ this.onFocus = this.onFocus.bind(this);
344
+ this.onBlur = this.onBlur.bind(this);
345
+ this.onClick = this.onClick.bind(this);
346
+ this.cancelEvent = this.cancelEvent.bind(this);
347
+ }
348
+ setup() {
349
+ document.addEventListener('keydown', this.onKeyDown, true);
350
+ window.addEventListener('focus', this.onFocus, true);
351
+ window.addEventListener('blur', this.onBlur, true);
352
+ document.addEventListener('click', this.onClick, true);
353
+ for (let event of $3f1be781b0a897ea$var$CANCELED_EVENTS)document.addEventListener(event, this.cancelEvent, true);
354
+ this.mutationObserver = new MutationObserver(()=>this.updateValidDropTargets()
355
+ );
482
356
  this.updateValidDropTargets();
483
- }
484
- });
485
- this.updateValidDropTargets();
486
- announce(this.formatMessage($f2f44a26f7541d104d10e68c115a897a$var$MESSAGES[$daf765036c8e081b3420fc4f613ad96$export$getDragModality()]));
487
- }
488
-
489
- teardown() {
490
- document.removeEventListener('keydown', this.onKeyDown, true);
491
- window.removeEventListener('focus', this.onFocus, true);
492
- window.removeEventListener('blur', this.onBlur, true);
493
- document.removeEventListener('click', this.onClick, true);
494
-
495
- for (let event of $f2f44a26f7541d104d10e68c115a897a$var$CANCELED_EVENTS) {
496
- document.removeEventListener(event, this.cancelEvent, true);
497
- }
498
-
499
- this.mutationObserver.disconnect();
500
- this.restoreAriaHidden();
501
-
502
- if (this.mutationImmediate) {
503
- clearImmediate(this.mutationImmediate);
504
- }
505
- }
506
-
507
- onKeyDown(e) {
508
- var _this$currentDropTarg;
509
-
510
- this.cancelEvent(e);
511
-
512
- if (e.key === 'Escape') {
513
- this.cancel();
514
- return;
515
- }
516
-
517
- if (e.key === 'Enter') {
518
- if (e.altKey) {
519
- this.activate();
520
- } else {
521
- this.drop();
522
- }
523
-
524
- return;
525
- }
526
-
527
- if (e.key === 'Tab' && !(e.metaKey || e.altKey || e.ctrlKey)) {
528
- if (e.shiftKey) {
529
- this.previous();
530
- } else {
531
- this.next();
532
- }
533
- }
534
-
535
- if (typeof ((_this$currentDropTarg = this.currentDropTarget) == null ? void 0 : _this$currentDropTarg.onKeyDown) === 'function') {
536
- this.currentDropTarget.onKeyDown(e, this.dragTarget);
357
+ $3kwX1$announce(this.formatMessage($3f1be781b0a897ea$var$MESSAGES[$6d32ba78df89e8ed$export$1fb2158d224b542c()]));
358
+ }
359
+ teardown() {
360
+ document.removeEventListener('keydown', this.onKeyDown, true);
361
+ window.removeEventListener('focus', this.onFocus, true);
362
+ window.removeEventListener('blur', this.onBlur, true);
363
+ document.removeEventListener('click', this.onClick, true);
364
+ for (let event of $3f1be781b0a897ea$var$CANCELED_EVENTS)document.removeEventListener(event, this.cancelEvent, true);
365
+ this.mutationObserver.disconnect();
366
+ this.restoreAriaHidden();
367
+ if (this.mutationImmediate) clearImmediate(this.mutationImmediate);
368
+ }
369
+ onKeyDown(e) {
370
+ this.cancelEvent(e);
371
+ if (e.key === 'Escape') {
372
+ this.cancel();
373
+ return;
374
+ }
375
+ if (e.key === 'Enter') {
376
+ if (e.altKey) this.activate();
377
+ else this.drop();
378
+ return;
379
+ }
380
+ if (e.key === 'Tab' && !(e.metaKey || e.altKey || e.ctrlKey)) {
381
+ if (e.shiftKey) this.previous();
382
+ else this.next();
383
+ }
384
+ if (typeof this.currentDropTarget?.onKeyDown === 'function') this.currentDropTarget.onKeyDown(e, this.dragTarget);
385
+ }
386
+ onFocus(e) {
387
+ // Prevent focus events, except to the original drag target.
388
+ if (e.target !== this.dragTarget.element) this.cancelEvent(e);
389
+ // Ignore focus events on the window/document (JSDOM). Will be handled in onBlur, below.
390
+ if (!(e.target instanceof HTMLElement) || e.target === this.dragTarget.element) return;
391
+ let dropTarget = this.validDropTargets.find((target)=>target.element.contains(e.target)
392
+ );
393
+ if (!dropTarget) {
394
+ if (this.currentDropTarget) this.currentDropTarget.element.focus();
395
+ else this.dragTarget.element.focus();
396
+ return;
397
+ }
398
+ let item = $3f1be781b0a897ea$var$dropItems.get(e.target);
399
+ this.setCurrentDropTarget(dropTarget, item);
400
+ }
401
+ onBlur(e) {
402
+ if (e.target !== this.dragTarget.element) this.cancelEvent(e);
403
+ // If nothing is gaining focus, or e.relatedTarget is the window/document (JSDOM),
404
+ // restore focus back to the current drop target if any, or the original drag target.
405
+ if (!e.relatedTarget || !(e.relatedTarget instanceof HTMLElement)) {
406
+ if (this.currentDropTarget) this.currentDropTarget.element.focus();
407
+ else this.dragTarget.element.focus();
408
+ }
537
409
  }
538
- }
539
-
540
- onFocus(e) {
541
- // Prevent focus events, except to the original drag target.
542
- if (e.target !== this.dragTarget.element) {
543
- this.cancelEvent(e);
544
- } // Ignore focus events on the window/document (JSDOM). Will be handled in onBlur, below.
545
-
546
-
547
- if (!(e.target instanceof HTMLElement) || e.target === this.dragTarget.element) {
548
- return;
410
+ onClick(e) {
411
+ this.cancelEvent(e);
412
+ if (e.detail !== 0) return;
413
+ if (e.target === this.dragTarget.element) {
414
+ this.cancel();
415
+ return;
416
+ }
417
+ let dropTarget = this.validDropTargets.find((target)=>target.element.contains(e.target)
418
+ );
419
+ if (dropTarget) {
420
+ let item = $3f1be781b0a897ea$var$dropItems.get(e.target);
421
+ this.setCurrentDropTarget(dropTarget, item);
422
+ this.drop(item);
423
+ }
549
424
  }
550
-
551
- let dropTarget = this.validDropTargets.find(target => target.element.contains(e.target));
552
-
553
- if (!dropTarget) {
554
- if (this.currentDropTarget) {
555
- this.currentDropTarget.element.focus();
556
- } else {
557
- this.dragTarget.element.focus();
558
- }
559
-
560
- return;
425
+ cancelEvent(e) {
426
+ // Allow default for events that might cancel a click event
427
+ if (!$3f1be781b0a897ea$var$CLICK_EVENTS.includes(e.type)) e.preventDefault();
428
+ e.stopPropagation();
429
+ e.stopImmediatePropagation();
430
+ }
431
+ updateValidDropTargets() {
432
+ if (!this.mutationObserver) return;
433
+ this.mutationObserver.disconnect();
434
+ if (this.restoreAriaHidden) this.restoreAriaHidden();
435
+ this.validDropTargets = $3f1be781b0a897ea$var$findValidDropTargets(this.dragTarget);
436
+ if (this.currentDropTarget && !this.validDropTargets.includes(this.currentDropTarget)) this.setCurrentDropTarget(this.validDropTargets[0]);
437
+ // Find valid drop items within collections
438
+ let types = $6d32ba78df89e8ed$export$e1d41611756c6326(this.dragTarget.items);
439
+ let validDropItems = [
440
+ ...$3f1be781b0a897ea$var$dropItems.values()
441
+ ].filter((item)=>{
442
+ if (typeof item.getDropOperation === 'function') return item.getDropOperation(types, this.dragTarget.allowedDropOperations) !== 'cancel';
443
+ return true;
444
+ });
445
+ // Filter out drop targets that contain valid items. We don't want to stop hiding elements
446
+ // other than the drop items that exist inside the collection.
447
+ let visibleDropTargets = this.validDropTargets.filter((target)=>!validDropItems.some((item)=>target.element.contains(item.element)
448
+ )
449
+ );
450
+ this.restoreAriaHidden = $3kwX1$ariaHideOutside([
451
+ this.dragTarget.element,
452
+ ...validDropItems.map((item)=>item.element
453
+ ),
454
+ ...visibleDropTargets.map((target)=>target.element
455
+ )
456
+ ]);
457
+ this.mutationObserver.observe(document.body, {
458
+ subtree: true,
459
+ attributes: true,
460
+ attributeFilter: [
461
+ 'aria-hidden'
462
+ ]
463
+ });
561
464
  }
562
-
563
- let item = $f2f44a26f7541d104d10e68c115a897a$var$dropItems.get(e.target);
564
- this.setCurrentDropTarget(dropTarget, item);
565
- }
566
-
567
- onBlur(e) {
568
- if (e.target !== this.dragTarget.element) {
569
- this.cancelEvent(e);
570
- } // If nothing is gaining focus, or e.relatedTarget is the window/document (JSDOM),
571
- // restore focus back to the current drop target if any, or the original drag target.
572
-
573
-
574
- if (!e.relatedTarget || !(e.relatedTarget instanceof HTMLElement)) {
575
- if (this.currentDropTarget) {
576
- this.currentDropTarget.element.focus();
577
- } else {
578
- this.dragTarget.element.focus();
579
- }
465
+ next() {
466
+ if (!this.currentDropTarget) {
467
+ this.setCurrentDropTarget(this.validDropTargets[0]);
468
+ return;
469
+ }
470
+ let index = this.validDropTargets.indexOf(this.currentDropTarget);
471
+ if (index < 0) {
472
+ this.setCurrentDropTarget(this.validDropTargets[0]);
473
+ return;
474
+ }
475
+ // If we've reached the end of the valid drop targets, cycle back to the original drag target.
476
+ // This lets the user cancel the drag in case they don't have an Escape key (e.g. iPad keyboard case).
477
+ if (index === this.validDropTargets.length - 1) {
478
+ if (!this.dragTarget.element.closest('[aria-hidden="true"]')) {
479
+ this.setCurrentDropTarget(null);
480
+ this.dragTarget.element.focus();
481
+ } else this.setCurrentDropTarget(this.validDropTargets[0]);
482
+ } else this.setCurrentDropTarget(this.validDropTargets[index + 1]);
483
+ }
484
+ previous() {
485
+ if (!this.currentDropTarget) {
486
+ this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);
487
+ return;
488
+ }
489
+ let index = this.validDropTargets.indexOf(this.currentDropTarget);
490
+ if (index < 0) {
491
+ this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);
492
+ return;
493
+ }
494
+ // If we've reached the start of the valid drop targets, cycle back to the original drag target.
495
+ // This lets the user cancel the drag in case they don't have an Escape key (e.g. iPad keyboard case).
496
+ if (index === 0) {
497
+ if (!this.dragTarget.element.closest('[aria-hidden="true"]')) {
498
+ this.setCurrentDropTarget(null);
499
+ this.dragTarget.element.focus();
500
+ } else this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);
501
+ } else this.setCurrentDropTarget(this.validDropTargets[index - 1]);
502
+ }
503
+ setCurrentDropTarget(dropTarget, item) {
504
+ if (dropTarget !== this.currentDropTarget) {
505
+ if (this.currentDropTarget && typeof this.currentDropTarget.onDropExit === 'function') {
506
+ let rect = this.currentDropTarget.element.getBoundingClientRect();
507
+ this.currentDropTarget.onDropExit({
508
+ type: 'dropexit',
509
+ x: rect.left + rect.width / 2,
510
+ y: rect.top + rect.height / 2
511
+ });
512
+ }
513
+ this.currentDropTarget = dropTarget;
514
+ if (dropTarget) {
515
+ if (typeof dropTarget.onDropEnter === 'function') {
516
+ let rect = dropTarget.element.getBoundingClientRect();
517
+ dropTarget.onDropEnter({
518
+ type: 'dropenter',
519
+ x: rect.left + rect.width / 2,
520
+ y: rect.top + rect.height / 2
521
+ }, this.dragTarget);
522
+ }
523
+ if (!item) dropTarget?.element.focus();
524
+ }
525
+ }
526
+ if (item !== this.currentDropItem) {
527
+ if (item && typeof this.currentDropTarget.onDropTargetEnter === 'function') this.currentDropTarget.onDropTargetEnter(item?.target);
528
+ item?.element.focus();
529
+ this.currentDropItem = item;
530
+ }
580
531
  }
581
- }
582
-
583
- onClick(e) {
584
- this.cancelEvent(e);
585
-
586
- if (e.detail !== 0) {
587
- return;
532
+ end() {
533
+ this.teardown();
534
+ if (typeof this.dragTarget.onDragEnd === 'function') {
535
+ let target = this.currentDropTarget && this.dropOperation !== 'cancel' ? this.currentDropTarget : this.dragTarget;
536
+ let rect = target.element.getBoundingClientRect();
537
+ this.dragTarget.onDragEnd({
538
+ type: 'dragend',
539
+ x: rect.x + rect.width / 2,
540
+ y: rect.y + rect.height / 2,
541
+ dropOperation: this.dropOperation
542
+ });
543
+ }
544
+ this.setCurrentDropTarget(null);
545
+ $3f1be781b0a897ea$var$endDragging();
588
546
  }
589
-
590
- if (e.target === this.dragTarget.element) {
591
- this.cancel();
592
- return;
547
+ cancel() {
548
+ this.end();
549
+ if (!this.dragTarget.element.closest('[aria-hidden="true"]')) this.dragTarget.element.focus();
550
+ $3kwX1$announce(this.formatMessage('dropCanceled'));
593
551
  }
594
-
595
- let dropTarget = this.validDropTargets.find(target => target.element.contains(e.target));
596
-
597
- if (dropTarget) {
598
- let item = $f2f44a26f7541d104d10e68c115a897a$var$dropItems.get(e.target);
599
- this.setCurrentDropTarget(dropTarget, item);
600
- this.drop(item);
552
+ drop(item1) {
553
+ if (!this.currentDropTarget) {
554
+ this.cancel();
555
+ return;
556
+ }
557
+ if (typeof item1?.getDropOperation === 'function') {
558
+ let types = $6d32ba78df89e8ed$export$e1d41611756c6326(this.dragTarget.items);
559
+ this.dropOperation = item1.getDropOperation(types, this.dragTarget.allowedDropOperations);
560
+ } else if (typeof this.currentDropTarget.getDropOperation === 'function') {
561
+ let types = $6d32ba78df89e8ed$export$e1d41611756c6326(this.dragTarget.items);
562
+ this.dropOperation = this.currentDropTarget.getDropOperation(types, this.dragTarget.allowedDropOperations);
563
+ } else // TODO: show menu ??
564
+ this.dropOperation = this.dragTarget.allowedDropOperations[0];
565
+ if (typeof this.currentDropTarget.onDrop === 'function') {
566
+ let items = this.dragTarget.items.map((item)=>({
567
+ kind: 'text',
568
+ types: new Set(Object.keys(item)),
569
+ getText: (type)=>Promise.resolve(item[type])
570
+ })
571
+ );
572
+ let rect = this.currentDropTarget.element.getBoundingClientRect();
573
+ this.currentDropTarget.onDrop({
574
+ type: 'drop',
575
+ x: rect.left + rect.width / 2,
576
+ y: rect.top + rect.height / 2,
577
+ items: items,
578
+ dropOperation: this.dropOperation
579
+ }, item1?.target);
580
+ }
581
+ this.end();
582
+ $3kwX1$announce(this.formatMessage('dropComplete'));
583
+ }
584
+ activate() {
585
+ if (this.currentDropTarget && typeof this.currentDropTarget.onDropActivate === 'function') {
586
+ let rect = this.currentDropTarget.element.getBoundingClientRect();
587
+ this.currentDropTarget.onDropActivate({
588
+ type: 'dropactivate',
589
+ x: rect.left + rect.width / 2,
590
+ y: rect.top + rect.height / 2
591
+ });
592
+ }
601
593
  }
602
- }
594
+ }
595
+ function $3f1be781b0a897ea$var$findValidDropTargets(options) {
596
+ let types = $6d32ba78df89e8ed$export$e1d41611756c6326(options.items);
597
+ return [
598
+ ...$3f1be781b0a897ea$var$dropTargets.values()
599
+ ].filter((target)=>{
600
+ if (target.element.closest('[aria-hidden="true"]')) return false;
601
+ if (typeof target.getDropOperation === 'function') return target.getDropOperation(types, options.allowedDropOperations) !== 'cancel';
602
+ return true;
603
+ });
604
+ }
603
605
 
604
- cancelEvent(e) {
605
- // Allow default for events that might cancel a click event
606
- if (!$f2f44a26f7541d104d10e68c115a897a$var$CLICK_EVENTS.includes(e.type)) {
607
- e.preventDefault();
608
- }
609
606
 
610
- e.stopPropagation();
611
- e.stopImmediatePropagation();
612
- }
613
607
 
614
- updateValidDropTargets() {
615
- if (!this.mutationObserver) {
616
- return;
617
- }
608
+ var $56fb93a531e5f155$exports = {};
609
+ var $88a889d9d1ce17bb$exports = {};
610
+ $88a889d9d1ce17bb$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"اضغط Enter لبدء السحب.\",\"dragDescriptionTouch\":\"اضغط مرتين لبدء السحب.\",\"dragDescriptionVirtual\":\"انقر لبدء السحب.\",\"dragItem\":\"اسحب {itemText}\",\"dragSelectedItems\":\"اسحب {count, plural, one {# عنصر محدد} other {# عناصر محددة}}\",\"dragStartedKeyboard\":\"بدأ السحب. اضغط Tab للانتقال إلى موضع الإفلات، ثم اضغط Enter للإفلات، أو اضغط Escape للإلغاء.\",\"dragStartedTouch\":\"بدأ السحب. انتقل إلى موضع الإفلات، ثم اضغط مرتين للإفلات.\",\"dragStartedVirtual\":\"بدأ السحب. انتقل إلى مكان الإفلات، ثم انقر أو اضغط Enter للإفلات.\",\"dropCanceled\":\"تم إلغاء الإفلات.\",\"dropComplete\":\"اكتمل الإفلات.\",\"dropDescriptionKeyboard\":\"اضغط Enter للإفلات. اضغط Escape لإلغاء السحب.\",\"dropDescriptionTouch\":\"اضغط مرتين للإفلات.\",\"dropDescriptionVirtual\":\"انقر للإفلات.\",\"dropIndicator\":\"مؤشر الإفلات\",\"dropOnItem\":\"إفلات {itemText}\",\"dropOnRoot\":\"الإفلات\",\"endDragKeyboard\":\"السحب. اضغط Enter لإلغاء السحب.\",\"endDragTouch\":\"السحب. اضغط مرتين لإلغاء السحب.\",\"endDragVirtual\":\"السحب. انقر لإلغاء السحب.\",\"insertAfter\":\"أدخل بعد {itemText}\",\"insertBefore\":\"أدخل قبل {itemText}\",\"insertBetween\":\"أدخل بين {beforeItemText} و {afterItemText}\"}");
618
611
 
619
- this.mutationObserver.disconnect();
620
612
 
621
- if (this.restoreAriaHidden) {
622
- this.restoreAriaHidden();
623
- }
613
+ var $b4a2d41921029d13$exports = {};
614
+ $b4a2d41921029d13$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Натиснете „Enter“, за да започнете да плъзгате.\",\"dragDescriptionTouch\":\"Натиснете двукратно, за да започнете да плъзгате.\",\"dragDescriptionVirtual\":\"Щракнете, за да започнете да плъзгате.\",\"dragItem\":\"Плъзни {itemText}\",\"dragSelectedItems\":\"Плъзни {count, plural, one {# избран елемент} other {# избрани елемента}}\",\"dragStartedKeyboard\":\"Започна плъзгане. Натиснете „Tab“, за да се придвижите до целта, след което натиснете „Enter“ за пускане или натиснете „Escape“ за отмяна.\",\"dragStartedTouch\":\"Започна плъзгане. Придвижете се до целта, след което натиснете двукратно, за да пуснете.\",\"dragStartedVirtual\":\"Започна плъзгане. Придвижете се до целта, след което щракнете или натиснете „Enter“ за пускане.\",\"dropCanceled\":\"Пускането е отменено.\",\"dropComplete\":\"Пускането е завършено.\",\"dropDescriptionKeyboard\":\"Натиснете „Enter“ за пускане. Натиснете „Escape“ за отмяна на плъзгането.\",\"dropDescriptionTouch\":\"Натиснете двукратно за пускане.\",\"dropDescriptionVirtual\":\"Щракнете за пускане.\",\"dropIndicator\":\"индикатор за пускане\",\"dropOnItem\":\"Пусни върху {itemText}\",\"dropOnRoot\":\"Пусни върху\",\"endDragKeyboard\":\"Плъзгане. Натиснете „Enter“ за отмяна на плъзгането.\",\"endDragTouch\":\"Плъзгане. Натиснете двукратно за отмяна на плъзгането.\",\"endDragVirtual\":\"Плъзгане. Щракнете за отмяна.\",\"insertAfter\":\"Вмъкни след {itemText}\",\"insertBefore\":\"Вмъкни преди {itemText}\",\"insertBetween\":\"Вмъкни между {beforeItemText} и {afterItemText}\"}");
624
615
 
625
- this.validDropTargets = $f2f44a26f7541d104d10e68c115a897a$var$findValidDropTargets(this.dragTarget);
626
616
 
627
- if (this.currentDropTarget && !this.validDropTargets.includes(this.currentDropTarget)) {
628
- this.setCurrentDropTarget(this.validDropTargets[0]);
629
- } // Find valid drop items within collections
617
+ var $c92509b451788ced$exports = {};
618
+ $c92509b451788ced$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Stisknutím klávesy Enter začnete s přetahováním.\",\"dragDescriptionTouch\":\"Poklepáním začnete s přetahováním.\",\"dragDescriptionVirtual\":\"Kliknutím začnete s přetahováním.\",\"dragItem\":\"Přetáhnout {itemText}\",\"dragSelectedItems\":\"Přetáhnout {count, plural, one {# vybranou položku} few {# vybrané položky} other {# vybraných položek}}\",\"dragStartedKeyboard\":\"Začněte s přetahováním. Po stisknutí klávesy Tab najděte požadovaný cíl a stisknutím klávesy Enter přetažení dokončete nebo stisknutím klávesy Esc akci zrušte.\",\"dragStartedTouch\":\"Začněte s přetahováním. Najděte požadovaný cíl a poklepáním přetažení dokončete.\",\"dragStartedVirtual\":\"Začněte s přetahováním. Najděte požadovaný cíl a kliknutím nebo stisknutím klávesy Enter přetažení dokončete.\",\"dropCanceled\":\"Přetažení bylo zrušeno.\",\"dropComplete\":\"Přetažení bylo dokončeno.\",\"dropDescriptionKeyboard\":\"Stisknutím klávesy Enter přetažení dokončete nebo stisknutím klávesy Esc akci zrušte.\",\"dropDescriptionTouch\":\"Poklepáním přetažení dokončete.\",\"dropDescriptionVirtual\":\"Kliknutím objekt přetáhněte.\",\"dropIndicator\":\"indikátor přetažení\",\"dropOnItem\":\"Přetáhnout na {itemText}\",\"dropOnRoot\":\"Přetáhnout na\",\"endDragKeyboard\":\"Probíhá přetahování. Stisknutím klávesy Enter přetažení zrušíte.\",\"endDragTouch\":\"Probíhá přetahování. Poklepáním přetažení zrušíte.\",\"endDragVirtual\":\"Probíhá přetahování. Kliknutím přetažení zrušíte.\",\"insertAfter\":\"Vložit za {itemText}\",\"insertBefore\":\"Vložit před {itemText}\",\"insertBetween\":\"Vložit mezi {beforeItemText} a {afterItemText}\"}");
630
619
 
631
620
 
632
- let types = $daf765036c8e081b3420fc4f613ad96$export$getTypes(this.dragTarget.items);
633
- let validDropItems = [...$f2f44a26f7541d104d10e68c115a897a$var$dropItems.values()].filter(item => {
634
- if (typeof item.getDropOperation === 'function') {
635
- return item.getDropOperation(types, this.dragTarget.allowedDropOperations) !== 'cancel';
636
- }
621
+ var $6c18f30f421d184d$exports = {};
622
+ $6c18f30f421d184d$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Tryk på Enter for at starte med at trække.\",\"dragDescriptionTouch\":\"Dobbelttryk for at starte med at trække.\",\"dragDescriptionVirtual\":\"Klik for at starte med at trække.\",\"dragItem\":\"Træk {itemText}\",\"dragSelectedItems\":\"Træk {count, plural, one {# valgt element} other {# valgte elementer}}\",\"dragStartedKeyboard\":\"Startet med at trække. Tryk på Tab for at gå til et slip-mål, tryk derefter på Enter for at slippe, eller tryk på Escape for at annullere.\",\"dragStartedTouch\":\"Startet med at trække. Gå til et slip-mål, og dobbelttryk derefter for at slippe.\",\"dragStartedVirtual\":\"Startet med at trække. Gå til et slip-mål, og klik eller tryk derefter på enter for at slippe.\",\"dropCanceled\":\"Slip annulleret.\",\"dropComplete\":\"Slip fuldført.\",\"dropDescriptionKeyboard\":\"Tryk på Enter for at slippe. Tryk på Escape for at annullere trækning.\",\"dropDescriptionTouch\":\"Dobbelttryk for at slippe.\",\"dropDescriptionVirtual\":\"Klik for at slippe.\",\"dropIndicator\":\"slip-indikator\",\"dropOnItem\":\"Slip på {itemText}\",\"dropOnRoot\":\"Slip på\",\"endDragKeyboard\":\"Trækning. Tryk på enter for at annullere træk.\",\"endDragTouch\":\"Trækning. Dobbelttryk for at annullere træk.\",\"endDragVirtual\":\"Trækning. Klik for at annullere trækning.\",\"insertAfter\":\"Indsæt efter {itemText}\",\"insertBefore\":\"Indsæt før {itemText}\",\"insertBetween\":\"Indsæt mellem {beforeItemText} og {afterItemText}\"}");
637
623
 
638
- return true;
639
- }); // Filter out drop targets that contain valid items. We don't want to stop hiding elements
640
- // other than the drop items that exist inside the collection.
641
624
 
642
- let visibleDropTargets = this.validDropTargets.filter(target => !validDropItems.some(item => target.element.contains(item.element)));
643
- this.restoreAriaHidden = ariaHideOutside([this.dragTarget.element, ...validDropItems.map(item => item.element), ...visibleDropTargets.map(target => target.element)]);
644
- this.mutationObserver.observe(document.body, {
645
- subtree: true,
646
- attributes: true,
647
- attributeFilter: ['aria-hidden']
648
- });
649
- }
625
+ var $7987d696b5027c45$exports = {};
626
+ $7987d696b5027c45$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Drücken Sie die Eingabetaste, um den Ziehvorgang zu starten.\",\"dragDescriptionTouch\":\"Tippen Sie doppelt, um den Ziehvorgang zu starten.\",\"dragDescriptionVirtual\":\"Zum Starten des Ziehvorgangs klicken.\",\"dragItem\":\"{itemText} ziehen\",\"dragSelectedItems\":\"{count, plural, one {# ausgewähltes Objekt} other {# ausgewählte Objekte}} ziehen\",\"dragStartedKeyboard\":\"Ziehvorgang gestartet. Drücken Sie die Tabulatortaste, um zu einem Ablegeziel zu navigieren und drücken Sie dann die Eingabetaste, um das Objekt abzulegen, oder Escape, um den Vorgang abzubrechen.\",\"dragStartedTouch\":\"Ziehvorgang gestartet. Navigieren Sie zu einem Ablegeziel und tippen Sie doppelt, um das Objekt abzulegen.\",\"dragStartedVirtual\":\"Ziehvorgang gestartet. Navigieren Sie zu einem Ablegeziel und klicken Sie oder drücken Sie die Eingabetaste, um das Objekt abzulegen.\",\"dropCanceled\":\"Ablegen abgebrochen.\",\"dropComplete\":\"Ablegen abgeschlossen.\",\"dropDescriptionKeyboard\":\"Drücken Sie die Eingabetaste, um das Objekt abzulegen. Drücken Sie Escape, um den Vorgang abzubrechen.\",\"dropDescriptionTouch\":\"Tippen Sie doppelt, um das Objekt abzulegen.\",\"dropDescriptionVirtual\":\"Zum Ablegen klicken.\",\"dropIndicator\":\"Ablegeanzeiger\",\"dropOnItem\":\"Auf {itemText} ablegen\",\"dropOnRoot\":\"Ablegen auf\",\"endDragKeyboard\":\"Ziehvorgang läuft. Drücken Sie die Eingabetaste, um den Vorgang abzubrechen.\",\"endDragTouch\":\"Ziehvorgang läuft. Tippen Sie doppelt, um den Vorgang abzubrechen.\",\"endDragVirtual\":\"Ziehvorgang läuft. Klicken Sie, um den Vorgang abzubrechen.\",\"insertAfter\":\"Nach {itemText} einfügen\",\"insertBefore\":\"Vor {itemText} einfügen\",\"insertBetween\":\"Zwischen {beforeItemText} und {afterItemText} einfügen\"}");
650
627
 
651
- next() {
652
- if (!this.currentDropTarget) {
653
- this.setCurrentDropTarget(this.validDropTargets[0]);
654
- return;
655
- }
656
628
 
657
- let index = this.validDropTargets.indexOf(this.currentDropTarget);
629
+ var $3b67bfbf2edbb86f$exports = {};
630
+ $3b67bfbf2edbb86f$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Πατήστε Enter για έναρξη της μεταφοράς.\",\"dragDescriptionTouch\":\"Πατήστε δύο φορές για έναρξη της μεταφοράς.\",\"dragDescriptionVirtual\":\"Κάντε κλικ για να ξεκινήσετε τη μεταφορά.\",\"dragItem\":\"Μεταφορά {itemText}\",\"dragSelectedItems\":\"Μεταφορά σε {count, plural, one {# επιλεγμένο στοιχείο} other {# επιλεγμένα στοιχεία}}\",\"dragStartedKeyboard\":\"Η μεταφορά ξεκίνησε. Πατήστε το πλήκτρο Tab για να μεταβείτε σε έναν προορισμό απόθεσης και, στη συνέχεια, πατήστε Enter για απόθεση ή πατήστε Escape για ακύρωση.\",\"dragStartedTouch\":\"Η μεταφορά ξεκίνησε. Μεταβείτε σε έναν προορισμό απόθεσης και, στη συνέχεια, πατήστε δύο φορές για απόθεση.\",\"dragStartedVirtual\":\"Η μεταφορά ξεκίνησε. Μεταβείτε σε έναν προορισμό απόθεσης και, στη συνέχεια, κάντε κλικ ή πατήστε Enter για απόθεση.\",\"dropCanceled\":\"Η απόθεση ακυρώθηκε.\",\"dropComplete\":\"Η απόθεση ολοκληρώθηκε.\",\"dropDescriptionKeyboard\":\"Πατήστε Enter για απόθεση. Πατήστε Escape για ακύρωση της μεταφοράς.\",\"dropDescriptionTouch\":\"Πατήστε δύο φορές για απόθεση.\",\"dropDescriptionVirtual\":\"Κάντε κλικ για απόθεση.\",\"dropIndicator\":\"δείκτης απόθεσης\",\"dropOnItem\":\"Απόθεση σε {itemText}\",\"dropOnRoot\":\"Απόθεση σε\",\"endDragKeyboard\":\"Μεταφορά σε εξέλιξη. Πατήστε Enter για ακύρωση της μεταφοράς.\",\"endDragTouch\":\"Μεταφορά σε εξέλιξη. Πατήστε δύο φορές για ακύρωση της μεταφοράς.\",\"endDragVirtual\":\"Μεταφορά σε εξέλιξη. Κάντε κλικ για ακύρωση της μεταφοράς.\",\"insertAfter\":\"Εισαγωγή μετά από {itemText}\",\"insertBefore\":\"Εισαγωγή πριν από {itemText}\",\"insertBetween\":\"Εισαγωγή μεταξύ {beforeItemText} και {afterItemText}\"}");
658
631
 
659
- if (index < 0) {
660
- this.setCurrentDropTarget(this.validDropTargets[0]);
661
- return;
662
- } // If we've reached the end of the valid drop targets, cycle back to the original drag target.
663
- // This lets the user cancel the drag in case they don't have an Escape key (e.g. iPad keyboard case).
664
632
 
633
+ var $ae79b0f4b3d53376$exports = {};
634
+ $ae79b0f4b3d53376$exports = JSON.parse("{\"dragItem\":\"Drag {itemText}\",\"dragSelectedItems\":\"Drag {count, plural, one {# selected item} other {# selected items}}\",\"dragDescriptionKeyboard\":\"Press Enter to start dragging.\",\"dragDescriptionTouch\":\"Double tap to start dragging.\",\"dragDescriptionVirtual\":\"Click to start dragging.\",\"dragStartedKeyboard\":\"Started dragging. Press Tab to navigate to a drop target, then press Enter to drop, or press Escape to cancel.\",\"dragStartedTouch\":\"Started dragging. Navigate to a drop target, then double tap to drop.\",\"dragStartedVirtual\":\"Started dragging. Navigate to a drop target, then click or press Enter to drop.\",\"endDragKeyboard\":\"Dragging. Press Enter to cancel drag.\",\"endDragTouch\":\"Dragging. Double tap to cancel drag.\",\"endDragVirtual\":\"Dragging. Click to cancel drag.\",\"dropDescriptionKeyboard\":\"Press Enter to drop. Press Escape to cancel drag.\",\"dropDescriptionTouch\":\"Double tap to drop.\",\"dropDescriptionVirtual\":\"Click to drop.\",\"dropCanceled\":\"Drop canceled.\",\"dropComplete\":\"Drop complete.\",\"dropIndicator\":\"drop indicator\",\"dropOnRoot\":\"Drop on\",\"dropOnItem\":\"Drop on {itemText}\",\"insertBefore\":\"Insert before {itemText}\",\"insertBetween\":\"Insert between {beforeItemText} and {afterItemText}\",\"insertAfter\":\"Insert after {itemText}\"}");
665
635
 
666
- if (index === this.validDropTargets.length - 1) {
667
- if (!this.dragTarget.element.closest('[aria-hidden="true"]')) {
668
- this.setCurrentDropTarget(null);
669
- this.dragTarget.element.focus();
670
- } else {
671
- this.setCurrentDropTarget(this.validDropTargets[0]);
672
- }
673
- } else {
674
- this.setCurrentDropTarget(this.validDropTargets[index + 1]);
675
- }
676
- }
677
636
 
678
- previous() {
679
- if (!this.currentDropTarget) {
680
- this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);
681
- return;
682
- }
637
+ var $39d872fb80474481$exports = {};
638
+ $39d872fb80474481$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Pulse Intro para empezar a arrastrar.\",\"dragDescriptionTouch\":\"Pulse dos veces para iniciar el arrastre.\",\"dragDescriptionVirtual\":\"Haga clic para iniciar el arrastre.\",\"dragItem\":\"Arrastrar {itemText}\",\"dragSelectedItems\":\"Arrastrar {count, plural, one {# elemento seleccionado} other {# elementos seleccionados}}\",\"dragStartedKeyboard\":\"Se ha empezado a arrastrar. Pulse el tabulador para ir al destino de colocación y, a continuación, pulse Intro para soltar, o pulse Escape para cancelar.\",\"dragStartedTouch\":\"Se ha empezado a arrastrar. Vaya al destino de colocación y, a continuación, pulse dos veces para soltar.\",\"dragStartedVirtual\":\"Se ha empezado a arrastrar. Vaya al destino de colocación y, a continuación, haga clic o pulse Intro para soltar.\",\"dropCanceled\":\"Se ha cancelado la colocación.\",\"dropComplete\":\"Colocación finalizada.\",\"dropDescriptionKeyboard\":\"Pulse Intro para soltar. Pulse Escape para cancelar el arrastre.\",\"dropDescriptionTouch\":\"Pulse dos veces para soltar.\",\"dropDescriptionVirtual\":\"Haga clic para soltar.\",\"dropIndicator\":\"indicador de colocación\",\"dropOnItem\":\"Soltar en {itemText}\",\"dropOnRoot\":\"Soltar en\",\"endDragKeyboard\":\"Arrastrando. Pulse Intro para cancelar el arrastre.\",\"endDragTouch\":\"Arrastrando. Pulse dos veces para cancelar el arrastre.\",\"endDragVirtual\":\"Arrastrando. Haga clic para cancelar el arrastre.\",\"insertAfter\":\"Insertar después de {itemText}\",\"insertBefore\":\"Insertar antes de {itemText}\",\"insertBetween\":\"Insertar entre {beforeItemText} y {afterItemText}\"}");
683
639
 
684
- let index = this.validDropTargets.indexOf(this.currentDropTarget);
685
640
 
686
- if (index < 0) {
687
- this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);
688
- return;
689
- } // If we've reached the start of the valid drop targets, cycle back to the original drag target.
690
- // This lets the user cancel the drag in case they don't have an Escape key (e.g. iPad keyboard case).
641
+ var $5f0b0131ace2c05f$exports = {};
642
+ $5f0b0131ace2c05f$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Lohistamise alustamiseks vajutage klahvi Enter.\",\"dragDescriptionTouch\":\"Topeltpuudutage lohistamise alustamiseks.\",\"dragDescriptionVirtual\":\"Klõpsake lohistamise alustamiseks.\",\"dragItem\":\"Lohista {itemText}\",\"dragSelectedItems\":\"Lohista {count, plural, one {# valitud üksust} other {# valitud üksust}}\",\"dragStartedKeyboard\":\"Alustati lohistamist. Kukutamise sihtmärgi juurde navigeerimiseks vajutage klahvi Tab, seejärel vajutage kukutamiseks klahvi Enter või loobumiseks klahvi Escape.\",\"dragStartedTouch\":\"Alustati lohistamist. Navigeerige kukutamise sihtmärgi juurde ja topeltpuudutage kukutamiseks.\",\"dragStartedVirtual\":\"Alustati lohistamist. Navigeerige kukutamise sihtmärgi juurde ja kukutamiseks klõpsake või vajutage klahvi Enter.\",\"dropCanceled\":\"Lohistamisest loobuti.\",\"dropComplete\":\"Lohistamine on tehtud.\",\"dropDescriptionKeyboard\":\"Kukutamiseks vajutage klahvi Enter. Lohistamisest loobumiseks vajutage klahvi Escape.\",\"dropDescriptionTouch\":\"Kukutamiseks topeltpuudutage.\",\"dropDescriptionVirtual\":\"Kukutamiseks klõpsake.\",\"dropIndicator\":\"lohistamise indikaator\",\"dropOnItem\":\"Kukuta asukohta {itemText}\",\"dropOnRoot\":\"Kukuta asukohta\",\"endDragKeyboard\":\"Lohistamine. Lohistamisest loobumiseks vajutage klahvi Enter.\",\"endDragTouch\":\"Lohistamine. Lohistamisest loobumiseks topeltpuudutage.\",\"endDragVirtual\":\"Lohistamine. Lohistamisest loobumiseks klõpsake.\",\"insertAfter\":\"Sisesta {itemText} järele\",\"insertBefore\":\"Sisesta {itemText} ette\",\"insertBetween\":\"Sisesta {beforeItemText} ja {afterItemText} vahele\"}");
691
643
 
692
644
 
693
- if (index === 0) {
694
- if (!this.dragTarget.element.closest('[aria-hidden="true"]')) {
695
- this.setCurrentDropTarget(null);
696
- this.dragTarget.element.focus();
697
- } else {
698
- this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);
699
- }
700
- } else {
701
- this.setCurrentDropTarget(this.validDropTargets[index - 1]);
702
- }
703
- }
704
-
705
- setCurrentDropTarget(dropTarget, item) {
706
- if (dropTarget !== this.currentDropTarget) {
707
- if (this.currentDropTarget && typeof this.currentDropTarget.onDropExit === 'function') {
708
- let rect = this.currentDropTarget.element.getBoundingClientRect();
709
- this.currentDropTarget.onDropExit({
710
- type: 'dropexit',
711
- x: rect.left + rect.width / 2,
712
- y: rect.top + rect.height / 2
713
- });
714
- }
715
-
716
- this.currentDropTarget = dropTarget;
717
-
718
- if (dropTarget) {
719
- if (typeof dropTarget.onDropEnter === 'function') {
720
- let rect = dropTarget.element.getBoundingClientRect();
721
- dropTarget.onDropEnter({
722
- type: 'dropenter',
723
- x: rect.left + rect.width / 2,
724
- y: rect.top + rect.height / 2
725
- }, this.dragTarget);
726
- }
645
+ var $b4e2c75ef9526cbe$exports = {};
646
+ $b4e2c75ef9526cbe$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Aloita vetäminen painamalla Enter-näppäintä.\",\"dragDescriptionTouch\":\"Aloita vetäminen kaksoisnapauttamalla.\",\"dragDescriptionVirtual\":\"Aloita vetäminen napsauttamalla.\",\"dragItem\":\"Vedä kohdetta {itemText}\",\"dragSelectedItems\":\"Vedä {count, plural, one {# valittua kohdetta} other {# valittua kohdetta}}\",\"dragStartedKeyboard\":\"Vetäminen aloitettu. Siirry pudotuskohteeseen painamalla sarkainnäppäintä ja sitten pudota painamalla Enter-näppäintä tai peruuta painamalla Escape-näppäintä.\",\"dragStartedTouch\":\"Vetäminen aloitettu. Siirry pudotuskohteeseen ja pudota kaksoisnapauttamalla.\",\"dragStartedVirtual\":\"Vetäminen aloitettu. Siirry pudotuskohteeseen ja pudota napsauttamalla tai painamalla Enter-näppäintä.\",\"dropCanceled\":\"Pudotus peruutettu.\",\"dropComplete\":\"Pudotus suoritettu.\",\"dropDescriptionKeyboard\":\"Pudota painamalla Enter-näppäintä. Peruuta vetäminen painamalla Escape-näppäintä.\",\"dropDescriptionTouch\":\"Pudota kaksoisnapauttamalla.\",\"dropDescriptionVirtual\":\"Pudota napsauttamalla.\",\"dropIndicator\":\"pudotuksen ilmaisin\",\"dropOnItem\":\"Pudota kohteeseen {itemText}\",\"dropOnRoot\":\"Pudota kohteeseen\",\"endDragKeyboard\":\"Vedetään. Peruuta vetäminen painamalla Enter-näppäintä.\",\"endDragTouch\":\"Vedetään. Peruuta vetäminen kaksoisnapauttamalla.\",\"endDragVirtual\":\"Vedetään. Peruuta vetäminen napsauttamalla.\",\"insertAfter\":\"Lisää kohteen {itemText} jälkeen\",\"insertBefore\":\"Lisää ennen kohdetta {itemText}\",\"insertBetween\":\"Lisää kohteiden {beforeItemText} ja {afterItemText} väliin\"}");
727
647
 
728
- if (!item) {
729
- dropTarget == null ? void 0 : dropTarget.element.focus();
730
- }
731
- }
732
- }
733
648
 
734
- if (item !== this.currentDropItem) {
735
- if (item && typeof this.currentDropTarget.onDropTargetEnter === 'function') {
736
- this.currentDropTarget.onDropTargetEnter(item == null ? void 0 : item.target);
737
- }
649
+ var $4e3ebb56380a458f$exports = {};
650
+ $4e3ebb56380a458f$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Appuyez sur Entrée pour commencer le déplacement.\",\"dragDescriptionTouch\":\"Touchez deux fois pour commencer le déplacement.\",\"dragDescriptionVirtual\":\"Cliquez pour commencer le déplacement.\",\"dragItem\":\"Déplacer {itemText}\",\"dragSelectedItems\":\"Déplacer {count, plural, one {# élément sélectionné} other {# éléments sélectionnés}}\",\"dragStartedKeyboard\":\"Déplacement commencé. Appuyez sur Tabulation pour accéder à une cible de dépôt, puis appuyez sur Entrée pour déposer, ou appuyez sur Échap pour annuler.\",\"dragStartedTouch\":\"Déplacement commencé. Accédez à une cible de dépôt, puis touchez deux fois pour déposer.\",\"dragStartedVirtual\":\"Déplacement commencé. Accédez à une cible de dépôt, puis cliquez ou appuyez sur Entrée pour déposer.\",\"dropCanceled\":\"Dépôt annulé.\",\"dropComplete\":\"Dépôt terminé.\",\"dropDescriptionKeyboard\":\"Appuyez sur Entrée pour déposer. Appuyez sur Échap pour annuler le déplacement.\",\"dropDescriptionTouch\":\"Touchez deux fois pour déposer.\",\"dropDescriptionVirtual\":\"Cliquez pour déposer.\",\"dropIndicator\":\"indicateur de dépôt\",\"dropOnItem\":\"Déposer sur {itemText}\",\"dropOnRoot\":\"Déposer sur\",\"endDragKeyboard\":\"Déplacement. Appuyez sur Entrée pour annuler le déplacement.\",\"endDragTouch\":\"Déplacement. Touchez deux fois pour annuler le déplacement.\",\"endDragVirtual\":\"Déplacement. Cliquez pour annuler le déplacement.\",\"insertAfter\":\"Insérer après {itemText}\",\"insertBefore\":\"Insérer avant {itemText}\",\"insertBetween\":\"Insérer entre {beforeItemText} et {afterItemText}\"}");
738
651
 
739
- item == null ? void 0 : item.element.focus();
740
- this.currentDropItem = item;
741
- }
742
- }
743
-
744
- end() {
745
- this.teardown();
746
-
747
- if (typeof this.dragTarget.onDragEnd === 'function') {
748
- let target = this.currentDropTarget && this.dropOperation !== 'cancel' ? this.currentDropTarget : this.dragTarget;
749
- let rect = target.element.getBoundingClientRect();
750
- this.dragTarget.onDragEnd({
751
- type: 'dragend',
752
- x: rect.x + rect.width / 2,
753
- y: rect.y + rect.height / 2,
754
- dropOperation: this.dropOperation
755
- });
756
- }
757
652
 
758
- this.setCurrentDropTarget(null);
759
- $f2f44a26f7541d104d10e68c115a897a$var$endDragging();
760
- }
653
+ var $d63e7745e6a50656$exports = {};
654
+ $d63e7745e6a50656$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"הקש על Enter כדי להתחיל לגרור.\",\"dragDescriptionTouch\":\"הקש פעמיים כדי להתחיל בגרירה.\",\"dragDescriptionVirtual\":\"לחץ כדי להתחיל לגרור.\",\"dragItem\":\"גרור את {itemText}\",\"dragSelectedItems\":\"גרור {count, plural, one {פריט נבחר #} other {# פריטים שנבחרו}}\",\"dragStartedKeyboard\":\"התחלת לגרור. הקש על Tab כדי לנווט לנקודת הגרירה ולאחר מכן הקש על Enter כדי לשחרר או על Escape כדי לבטל.\",\"dragStartedTouch\":\"התחלת לגרור. נווט לנקודת השחרור ולאחר מכן הקש פעמיים כדי לשחרר.\",\"dragStartedVirtual\":\"התחלת לגרור. נווט לנקודת השחרור ולאחר מכן לחץ או הקש על Enter כדי לשחרר.\",\"dropCanceled\":\"השחרור בוטל.\",\"dropComplete\":\"השחרור הושלם.\",\"dropDescriptionKeyboard\":\"הקש על Enter כדי לשחרר. הקש על Escape כדי לבטל את הגרירה.\",\"dropDescriptionTouch\":\"הקש פעמיים כדי לשחרר.\",\"dropDescriptionVirtual\":\"לחץ כדי לשחרר.\",\"dropIndicator\":\"מחוון שחרור\",\"dropOnItem\":\"שחרר על {itemText}\",\"dropOnRoot\":\"שחרר על\",\"endDragKeyboard\":\"גורר. הקש על Enter כדי לבטל את הגרירה.\",\"endDragTouch\":\"גורר. הקש פעמיים כדי לבטל את הגרירה.\",\"endDragVirtual\":\"גורר. לחץ כדי לבטל את הגרירה.\",\"insertAfter\":\"הוסף אחרי {itemText}\",\"insertBefore\":\"הוסף לפני {itemText}\",\"insertBetween\":\"הוסף בין {beforeItemText} לבין {afterItemText}\"}");
761
655
 
762
- cancel() {
763
- this.end();
764
656
 
765
- if (!this.dragTarget.element.closest('[aria-hidden="true"]')) {
766
- this.dragTarget.element.focus();
767
- }
657
+ var $0fe4553f82accac7$exports = {};
658
+ $0fe4553f82accac7$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Pritisnite Enter da biste počeli povlačiti.\",\"dragDescriptionTouch\":\"Dvaput dodirnite da biste počeli povlačiti.\",\"dragDescriptionVirtual\":\"Kliknite da biste počeli povlačiti.\",\"dragItem\":\"Povucite stavku {itemText}\",\"dragSelectedItems\":\"Povucite {count, plural, one {# odabranu stavku} other {ovoliko odabranih stavki: #}}\",\"dragStartedKeyboard\":\"Počeli ste povlačiti. Pritisnite tipku tabulatora da biste došli do cilja ispuštanja, a zatim Enter da biste ispustili stavku ili Escape da biste prekinuli povlačenje.\",\"dragStartedTouch\":\"Počeli ste povlačiti. Dođite do cilja ispuštanja, a zatim dvaput dodirnite da biste ispustili stavku.\",\"dragStartedVirtual\":\"Počeli ste povlačiti. Dođite do cilja ispuštanja, a zatim kliknite ili pritisnite Enter da biste ispustili stavku.\",\"dropCanceled\":\"Povlačenje je prekinuto.\",\"dropComplete\":\"Ispuštanje je dovršeno.\",\"dropDescriptionKeyboard\":\"Pritisnite Enter da biste ispustili stavku. Pritisnite Escape da biste prekinuli povlačenje.\",\"dropDescriptionTouch\":\"Dvaput dodirnite da biste ispustili stavku.\",\"dropDescriptionVirtual\":\"Kliknite da biste ispustili stavku.\",\"dropIndicator\":\"pokazatelj ispuštanja\",\"dropOnItem\":\"Ispustite na stavku {itemText}\",\"dropOnRoot\":\"Ispustite na\",\"endDragKeyboard\":\"Povlačenje. Pritisnite Enter da biste prekinuli povlačenje.\",\"endDragTouch\":\"Povlačenje. Dvaput dodirnite da biste prekinuli povlačenje.\",\"endDragVirtual\":\"Povlačenje. Kliknite da biste prekinuli povlačenje.\",\"insertAfter\":\"Umetnite iza stavke {itemText}\",\"insertBefore\":\"Ispustite ispred stavke {itemText}\",\"insertBetween\":\"Umetnite između stavki {beforeItemText} i {afterItemText}\"}");
768
659
 
769
- announce(this.formatMessage('dropCanceled'));
770
- }
771
660
 
772
- drop(item) {
773
- if (!this.currentDropTarget) {
774
- this.cancel();
775
- return;
776
- }
661
+ var $28bc13d671ad7ca4$exports = {};
662
+ $28bc13d671ad7ca4$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Nyomja le az Enter billentyűt a húzás megkezdéséhez.\",\"dragDescriptionTouch\":\"Koppintson duplán a húzás megkezdéséhez.\",\"dragDescriptionVirtual\":\"Kattintson a húzás megkezdéséhez.\",\"dragItem\":\"{itemText} húzása\",\"dragSelectedItems\":\"{count, plural, one {# kijelölt elem} other {# kijelölt elem}} húzása\",\"dragStartedKeyboard\":\"Húzás megkezdve. Nyomja le a Tab billentyűt az elengedési célhoz navigálásához, majd nyomja le az Enter billentyűt az elengedéshez, vagy nyomja le az Escape billentyűt a megszakításhoz.\",\"dragStartedTouch\":\"Húzás megkezdve. Navigáljon egy elengedési célhoz, majd koppintson duplán az elengedéshez.\",\"dragStartedVirtual\":\"Húzás megkezdve. Navigáljon egy elengedési célhoz, majd kattintson vagy nyomja le az Enter billentyűt az elengedéshez.\",\"dropCanceled\":\"Elengedés megszakítva.\",\"dropComplete\":\"Elengedés teljesítve.\",\"dropDescriptionKeyboard\":\"Nyomja le az Enter billentyűt az elengedéshez. Nyomja le az Escape billentyűt a húzás megszakításához.\",\"dropDescriptionTouch\":\"Koppintson duplán az elengedéshez.\",\"dropDescriptionVirtual\":\"Kattintson az elengedéshez.\",\"dropIndicator\":\"elengedésjelző\",\"dropOnItem\":\"Elengedés erre: {itemText}\",\"dropOnRoot\":\"Elengedés erre:\",\"endDragKeyboard\":\"Húzás folyamatban. Nyomja le az Enter billentyűt a húzás megszakításához.\",\"endDragTouch\":\"Húzás folyamatban. Koppintson duplán a húzás megszakításához.\",\"endDragVirtual\":\"Húzás folyamatban. Kattintson a húzás megszakításához.\",\"insertAfter\":\"Beszúrás {itemText} után\",\"insertBefore\":\"Beszúrás {itemText} elé\",\"insertBetween\":\"Beszúrás {beforeItemText} és {afterItemText} közé\"}");
777
663
 
778
- if (typeof (item == null ? void 0 : item.getDropOperation) === 'function') {
779
- let types = $daf765036c8e081b3420fc4f613ad96$export$getTypes(this.dragTarget.items);
780
- this.dropOperation = item.getDropOperation(types, this.dragTarget.allowedDropOperations);
781
- } else if (typeof this.currentDropTarget.getDropOperation === 'function') {
782
- let types = $daf765036c8e081b3420fc4f613ad96$export$getTypes(this.dragTarget.items);
783
- this.dropOperation = this.currentDropTarget.getDropOperation(types, this.dragTarget.allowedDropOperations);
784
- } else {
785
- // TODO: show menu ??
786
- this.dropOperation = this.dragTarget.allowedDropOperations[0];
787
- }
788
664
 
789
- if (typeof this.currentDropTarget.onDrop === 'function') {
790
- let items = this.dragTarget.items.map(item => ({
791
- kind: 'text',
792
- types: new Set(Object.keys(item)),
793
- getText: type => Promise.resolve(item[type])
794
- }));
795
- let rect = this.currentDropTarget.element.getBoundingClientRect();
796
- this.currentDropTarget.onDrop({
797
- type: 'drop',
798
- x: rect.left + rect.width / 2,
799
- y: rect.top + rect.height / 2,
800
- items,
801
- dropOperation: this.dropOperation
802
- }, item == null ? void 0 : item.target);
803
- }
665
+ var $0055dc944ad39707$exports = {};
666
+ $0055dc944ad39707$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Premi Invio per iniziare a trascinare.\",\"dragDescriptionTouch\":\"Tocca due volte per iniziare a trascinare.\",\"dragDescriptionVirtual\":\"Fai clic per iniziare a trascinare.\",\"dragItem\":\"Trascina {itemText}\",\"dragSelectedItems\":\"Trascina {count, plural, one {# altro elemento selezionato} other {# altri elementi selezionati}}\",\"dragStartedKeyboard\":\"Hai iniziato a trascinare. Premi Tab per arrivare sull’area di destinazione, quindi premi Invio per rilasciare o Esc per annullare.\",\"dragStartedTouch\":\"Hai iniziato a trascinare. Arriva sull’area di destinazione, quindi tocca due volte per rilasciare.\",\"dragStartedVirtual\":\"Hai iniziato a trascinare. Arriva sull’area di destinazione, quindi fai clic o premi Invio per rilasciare.\",\"dropCanceled\":\"Rilascio annullato.\",\"dropComplete\":\"Rilascio completato.\",\"dropDescriptionKeyboard\":\"Premi Invio per rilasciare. Premi Esc per annullare.\",\"dropDescriptionTouch\":\"Tocca due volte per rilasciare.\",\"dropDescriptionVirtual\":\"Fai clic per rilasciare.\",\"dropIndicator\":\"indicatore di rilascio\",\"dropOnItem\":\"Rilascia su {itemText}\",\"dropOnRoot\":\"Rilascia su\",\"endDragKeyboard\":\"Trascinamento. Premi Invio per annullare.\",\"endDragTouch\":\"Trascinamento. Tocca due volte per annullare.\",\"endDragVirtual\":\"Trascinamento. Fai clic per annullare.\",\"insertAfter\":\"Inserisci dopo {itemText}\",\"insertBefore\":\"Inserisci prima di {itemText}\",\"insertBetween\":\"Inserisci tra {beforeItemText} e {afterItemText}\"}");
804
667
 
805
- this.end();
806
- announce(this.formatMessage('dropComplete'));
807
- }
808
-
809
- activate() {
810
- if (this.currentDropTarget && typeof this.currentDropTarget.onDropActivate === 'function') {
811
- let rect = this.currentDropTarget.element.getBoundingClientRect();
812
- this.currentDropTarget.onDropActivate({
813
- type: 'dropactivate',
814
- x: rect.left + rect.width / 2,
815
- y: rect.top + rect.height / 2
816
- });
817
- }
818
- }
819
668
 
820
- }
669
+ var $fcc46ef57077923e$exports = {};
670
+ $fcc46ef57077923e$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Enter キーを押してドラッグを開始してください。\",\"dragDescriptionTouch\":\"ダブルタップしてドラッグを開始します。\",\"dragDescriptionVirtual\":\"クリックしてドラッグを開始します。\",\"dragItem\":\"{itemText} をドラッグ\",\"dragSelectedItems\":\"{count, plural, one {# 個の選択項目} other {# 個の選択項目}} をドラッグ\",\"dragStartedKeyboard\":\"ドラッグを開始します。Tab キーを押してドロップターゲットにいどうし、Enter キーを押してドロップするか、Esc キーを押してキャンセルします。\",\"dragStartedTouch\":\"ドラッグを開始しました。ドロップのターゲットに移動し、ダブルタップしてドロップします。\",\"dragStartedVirtual\":\"ドラッグを開始しました。ドロップのターゲットに移動し、クリックまたは Enter キーを押してドロップします。\",\"dropCanceled\":\"ドロップがキャンセルされました。\",\"dropComplete\":\"ドロップが完了しました。\",\"dropDescriptionKeyboard\":\"Enter キーを押してドロップします。Esc キーを押してドラッグをキャンセルします。\",\"dropDescriptionTouch\":\"ダブルタップしてドロップします。\",\"dropDescriptionVirtual\":\"クリックしてドロップします。\",\"dropIndicator\":\"ドロップインジケーター\",\"dropOnItem\":\"{itemText} にドロップ\",\"dropOnRoot\":\"ドロップ場所\",\"endDragKeyboard\":\"ドラッグしています。Enter キーを押してドラッグをキャンセルします。\",\"endDragTouch\":\"ドラッグしています。ダブルタップしてドラッグをキャンセルします。\",\"endDragVirtual\":\"ドラッグしています。クリックしてドラッグをキャンセルします。\",\"insertAfter\":\"{itemText} の後に挿入\",\"insertBefore\":\"{itemText} の前に挿入\",\"insertBetween\":\"{beforeItemText} と {afterItemText} の間に挿入\"}");
821
671
 
822
- function $f2f44a26f7541d104d10e68c115a897a$var$findValidDropTargets(options) {
823
- let types = $daf765036c8e081b3420fc4f613ad96$export$getTypes(options.items);
824
- return [...$f2f44a26f7541d104d10e68c115a897a$var$dropTargets.values()].filter(target => {
825
- if (target.element.closest('[aria-hidden="true"]')) {
826
- return false;
827
- }
828
672
 
829
- if (typeof target.getDropOperation === 'function') {
830
- return target.getDropOperation(types, options.allowedDropOperations) !== 'cancel';
831
- }
673
+ var $364583e1d6b3ac37$exports = {};
674
+ $364583e1d6b3ac37$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"드래그를 시작하려면 Enter를 누르세요.\",\"dragDescriptionTouch\":\"드래그를 시작하려면 더블 탭하세요.\",\"dragDescriptionVirtual\":\"드래그를 시작하려면 클릭하세요.\",\"dragItem\":\"{itemText} 드래그\",\"dragSelectedItems\":\"{count, plural, one {#개 선택 항목} other {#개 선택 항목}} 드래그\",\"dragStartedKeyboard\":\"드래그가 시작되었습니다. Tab을 눌러 드롭 대상으로 이동한 다음 Enter를 눌러 드롭하거나 Esc를 눌러 취소하세요.\",\"dragStartedTouch\":\"드래그가 시작되었습니다. 드롭 대상으로 이동한 다음 더블 탭하여 드롭하세요.\",\"dragStartedVirtual\":\"드래그가 시작되었습니다. 드롭 대상으로 이동한 다음 클릭하거나 Enter를 눌러 드롭하세요.\",\"dropCanceled\":\"드롭이 취소되었습니다.\",\"dropComplete\":\"드롭이 완료되었습니다.\",\"dropDescriptionKeyboard\":\"드롭하려면 Enter를 누르세요. 드래그를 취소하려면 Esc를 누르세요.\",\"dropDescriptionTouch\":\"더블 탭하여 드롭하세요.\",\"dropDescriptionVirtual\":\"드롭하려면 클릭하세요.\",\"dropIndicator\":\"드롭 표시기\",\"dropOnItem\":\"{itemText}에 드롭\",\"dropOnRoot\":\"드롭 대상\",\"endDragKeyboard\":\"드래그 중입니다. 드래그를 취소하려면 Enter를 누르세요.\",\"endDragTouch\":\"드래그 중입니다. 드래그를 취소하려면 더블 탭하세요.\",\"endDragVirtual\":\"드래그 중입니다. 드래그를 취소하려면 클릭하세요.\",\"insertAfter\":\"{itemText} 이후에 삽입\",\"insertBefore\":\"{itemText} 이전에 삽입\",\"insertBetween\":\"{beforeItemText} 및 {afterItemText} 사이에 삽입\"}");
832
675
 
833
- return true;
834
- });
835
- }
836
676
 
837
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/ar-AE.json
838
- var $ea65b45ad5e7d0aed23c128bf8ad1ea2$exports = {};
839
- $ea65b45ad5e7d0aed23c128bf8ad1ea2$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"اضغط Enter لبدء السحب.\",\"dragDescriptionTouch\":\"اضغط مرتين لبدء السحب.\",\"dragDescriptionVirtual\":\"انقر لبدء السحب.\",\"dragItem\":\"اسحب {itemText}\",\"dragSelectedItems\":\"اسحب {count, plural, one {# عنصر محدد} other {# عناصر محددة}}\",\"dragStartedKeyboard\":\"بدأ السحب. اضغط Tab للانتقال إلى موضع الإفلات، ثم اضغط Enter للإفلات، أو اضغط Escape للإلغاء.\",\"dragStartedTouch\":\"بدأ السحب. انتقل إلى موضع الإفلات، ثم اضغط مرتين للإفلات.\",\"dragStartedVirtual\":\"بدأ السحب. انتقل إلى مكان الإفلات، ثم انقر أو اضغط Enter للإفلات.\",\"dropCanceled\":\"تم إلغاء الإفلات.\",\"dropComplete\":\"اكتمل الإفلات.\",\"dropDescriptionKeyboard\":\"اضغط Enter للإفلات. اضغط Escape لإلغاء السحب.\",\"dropDescriptionTouch\":\"اضغط مرتين للإفلات.\",\"dropDescriptionVirtual\":\"انقر للإفلات.\",\"dropIndicator\":\"مؤشر الإفلات\",\"dropOnItem\":\"إفلات {itemText}\",\"dropOnRoot\":\"الإفلات\",\"endDragKeyboard\":\"السحب. اضغط Enter لإلغاء السحب.\",\"endDragTouch\":\"السحب. اضغط مرتين لإلغاء السحب.\",\"endDragVirtual\":\"السحب. انقر لإلغاء السحب.\",\"insertAfter\":\"أدخل بعد {itemText}\",\"insertBefore\":\"أدخل قبل {itemText}\",\"insertBetween\":\"أدخل بين {beforeItemText} و {afterItemText}\"}");
840
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/bg-BG.json
841
- var $c92ee777c2aef6235da0efaaab60dc61$exports = {};
842
- $c92ee777c2aef6235da0efaaab60dc61$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Натиснете „Enter“, за да започнете да плъзгате.\",\"dragDescriptionTouch\":\"Натиснете двукратно, за да започнете да плъзгате.\",\"dragDescriptionVirtual\":\"Щракнете, за да започнете да плъзгате.\",\"dragItem\":\"Плъзни {itemText}\",\"dragSelectedItems\":\"Плъзни {count, plural, one {# избран елемент} other {# избрани елемента}}\",\"dragStartedKeyboard\":\"Започна плъзгане. Натиснете „Tab“, за да се придвижите до целта, след което натиснете „Enter“ за пускане или натиснете „Escape“ за отмяна.\",\"dragStartedTouch\":\"Започна плъзгане. Придвижете се до целта, след което натиснете двукратно, за да пуснете.\",\"dragStartedVirtual\":\"Започна плъзгане. Придвижете се до целта, след което щракнете или натиснете „Enter“ за пускане.\",\"dropCanceled\":\"Пускането е отменено.\",\"dropComplete\":\"Пускането е завършено.\",\"dropDescriptionKeyboard\":\"Натиснете „Enter“ за пускане. Натиснете „Escape“ за отмяна на плъзгането.\",\"dropDescriptionTouch\":\"Натиснете двукратно за пускане.\",\"dropDescriptionVirtual\":\"Щракнете за пускане.\",\"dropIndicator\":\"индикатор за пускане\",\"dropOnItem\":\"Пусни върху {itemText}\",\"dropOnRoot\":\"Пусни върху\",\"endDragKeyboard\":\"Плъзгане. Натиснете „Enter“ за отмяна на плъзгането.\",\"endDragTouch\":\"Плъзгане. Натиснете двукратно за отмяна на плъзгането.\",\"endDragVirtual\":\"Плъзгане. Щракнете за отмяна.\",\"insertAfter\":\"Вмъкни след {itemText}\",\"insertBefore\":\"Вмъкни преди {itemText}\",\"insertBetween\":\"Вмъкни между {beforeItemText} и {afterItemText}\"}");
843
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/cs-CZ.json
844
- var $c9e276469924972853a3320763f673d$exports = {};
845
- $c9e276469924972853a3320763f673d$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Stisknutím klávesy Enter začnete s přetahováním.\",\"dragDescriptionTouch\":\"Poklepáním začnete s přetahováním.\",\"dragDescriptionVirtual\":\"Kliknutím začnete s přetahováním.\",\"dragItem\":\"Přetáhnout {itemText}\",\"dragSelectedItems\":\"Přetáhnout {count, plural, one {# vybranou položku} few {# vybrané položky} other {# vybraných položek}}\",\"dragStartedKeyboard\":\"Začněte s přetahováním. Po stisknutí klávesy Tab najděte požadovaný cíl a stisknutím klávesy Enter přetažení dokončete nebo stisknutím klávesy Esc akci zrušte.\",\"dragStartedTouch\":\"Začněte s přetahováním. Najděte požadovaný cíl a poklepáním přetažení dokončete.\",\"dragStartedVirtual\":\"Začněte s přetahováním. Najděte požadovaný cíl a kliknutím nebo stisknutím klávesy Enter přetažení dokončete.\",\"dropCanceled\":\"Přetažení bylo zrušeno.\",\"dropComplete\":\"Přetažení bylo dokončeno.\",\"dropDescriptionKeyboard\":\"Stisknutím klávesy Enter přetažení dokončete nebo stisknutím klávesy Esc akci zrušte.\",\"dropDescriptionTouch\":\"Poklepáním přetažení dokončete.\",\"dropDescriptionVirtual\":\"Kliknutím objekt přetáhněte.\",\"dropIndicator\":\"indikátor přetažení\",\"dropOnItem\":\"Přetáhnout na {itemText}\",\"dropOnRoot\":\"Přetáhnout na\",\"endDragKeyboard\":\"Probíhá přetahování. Stisknutím klávesy Enter přetažení zrušíte.\",\"endDragTouch\":\"Probíhá přetahování. Poklepáním přetažení zrušíte.\",\"endDragVirtual\":\"Probíhá přetahování. Kliknutím přetažení zrušíte.\",\"insertAfter\":\"Vložit za {itemText}\",\"insertBefore\":\"Vložit před {itemText}\",\"insertBetween\":\"Vložit mezi {beforeItemText} a {afterItemText}\"}");
846
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/da-DK.json
847
- var $b0325b2aec14df95ab943ec14d3bec3b$exports = {};
848
- $b0325b2aec14df95ab943ec14d3bec3b$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Tryk på Enter for at starte med at trække.\",\"dragDescriptionTouch\":\"Dobbelttryk for at starte med at trække.\",\"dragDescriptionVirtual\":\"Klik for at starte med at trække.\",\"dragItem\":\"Træk {itemText}\",\"dragSelectedItems\":\"Træk {count, plural, one {# valgt element} other {# valgte elementer}}\",\"dragStartedKeyboard\":\"Startet med at trække. Tryk på Tab for at gå til et slip-mål, tryk derefter på Enter for at slippe, eller tryk på Escape for at annullere.\",\"dragStartedTouch\":\"Startet med at trække. Gå til et slip-mål, og dobbelttryk derefter for at slippe.\",\"dragStartedVirtual\":\"Startet med at trække. Gå til et slip-mål, og klik eller tryk derefter på enter for at slippe.\",\"dropCanceled\":\"Slip annulleret.\",\"dropComplete\":\"Slip fuldført.\",\"dropDescriptionKeyboard\":\"Tryk på Enter for at slippe. Tryk på Escape for at annullere trækning.\",\"dropDescriptionTouch\":\"Dobbelttryk for at slippe.\",\"dropDescriptionVirtual\":\"Klik for at slippe.\",\"dropIndicator\":\"slip-indikator\",\"dropOnItem\":\"Slip på {itemText}\",\"dropOnRoot\":\"Slip på\",\"endDragKeyboard\":\"Trækning. Tryk på enter for at annullere træk.\",\"endDragTouch\":\"Trækning. Dobbelttryk for at annullere træk.\",\"endDragVirtual\":\"Trækning. Klik for at annullere trækning.\",\"insertAfter\":\"Indsæt efter {itemText}\",\"insertBefore\":\"Indsæt før {itemText}\",\"insertBetween\":\"Indsæt mellem {beforeItemText} og {afterItemText}\"}");
849
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/de-DE.json
850
- var $f367814043f59b69a839ff097fd4adb8$exports = {};
851
- $f367814043f59b69a839ff097fd4adb8$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Drücken Sie die Eingabetaste, um den Ziehvorgang zu starten.\",\"dragDescriptionTouch\":\"Tippen Sie doppelt, um den Ziehvorgang zu starten.\",\"dragDescriptionVirtual\":\"Zum Starten des Ziehvorgangs klicken.\",\"dragItem\":\"{itemText} ziehen\",\"dragSelectedItems\":\"{count, plural, one {# ausgewähltes Objekt} other {# ausgewählte Objekte}} ziehen\",\"dragStartedKeyboard\":\"Ziehvorgang gestartet. Drücken Sie die Tabulatortaste, um zu einem Ablegeziel zu navigieren und drücken Sie dann die Eingabetaste, um das Objekt abzulegen, oder Escape, um den Vorgang abzubrechen.\",\"dragStartedTouch\":\"Ziehvorgang gestartet. Navigieren Sie zu einem Ablegeziel und tippen Sie doppelt, um das Objekt abzulegen.\",\"dragStartedVirtual\":\"Ziehvorgang gestartet. Navigieren Sie zu einem Ablegeziel und klicken Sie oder drücken Sie die Eingabetaste, um das Objekt abzulegen.\",\"dropCanceled\":\"Ablegen abgebrochen.\",\"dropComplete\":\"Ablegen abgeschlossen.\",\"dropDescriptionKeyboard\":\"Drücken Sie die Eingabetaste, um das Objekt abzulegen. Drücken Sie Escape, um den Vorgang abzubrechen.\",\"dropDescriptionTouch\":\"Tippen Sie doppelt, um das Objekt abzulegen.\",\"dropDescriptionVirtual\":\"Zum Ablegen klicken.\",\"dropIndicator\":\"Ablegeanzeiger\",\"dropOnItem\":\"Auf {itemText} ablegen\",\"dropOnRoot\":\"Ablegen auf\",\"endDragKeyboard\":\"Ziehvorgang läuft. Drücken Sie die Eingabetaste, um den Vorgang abzubrechen.\",\"endDragTouch\":\"Ziehvorgang läuft. Tippen Sie doppelt, um den Vorgang abzubrechen.\",\"endDragVirtual\":\"Ziehvorgang läuft. Klicken Sie, um den Vorgang abzubrechen.\",\"insertAfter\":\"Nach {itemText} einfügen\",\"insertBefore\":\"Vor {itemText} einfügen\",\"insertBetween\":\"Zwischen {beforeItemText} und {afterItemText} einfügen\"}");
852
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/el-GR.json
853
- var $fe8897a7011951cab52f7814c2c9684$exports = {};
854
- $fe8897a7011951cab52f7814c2c9684$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Πατήστε Enter για έναρξη της μεταφοράς.\",\"dragDescriptionTouch\":\"Πατήστε δύο φορές για έναρξη της μεταφοράς.\",\"dragDescriptionVirtual\":\"Κάντε κλικ για να ξεκινήσετε τη μεταφορά.\",\"dragItem\":\"Μεταφορά {itemText}\",\"dragSelectedItems\":\"Μεταφορά σε {count, plural, one {# επιλεγμένο στοιχείο} other {# επιλεγμένα στοιχεία}}\",\"dragStartedKeyboard\":\"Η μεταφορά ξεκίνησε. Πατήστε το πλήκτρο Tab για να μεταβείτε σε έναν προορισμό απόθεσης και, στη συνέχεια, πατήστε Enter για απόθεση ή πατήστε Escape για ακύρωση.\",\"dragStartedTouch\":\"Η μεταφορά ξεκίνησε. Μεταβείτε σε έναν προορισμό απόθεσης και, στη συνέχεια, πατήστε δύο φορές για απόθεση.\",\"dragStartedVirtual\":\"Η μεταφορά ξεκίνησε. Μεταβείτε σε έναν προορισμό απόθεσης και, στη συνέχεια, κάντε κλικ ή πατήστε Enter για απόθεση.\",\"dropCanceled\":\"Η απόθεση ακυρώθηκε.\",\"dropComplete\":\"Η απόθεση ολοκληρώθηκε.\",\"dropDescriptionKeyboard\":\"Πατήστε Enter για απόθεση. Πατήστε Escape για ακύρωση της μεταφοράς.\",\"dropDescriptionTouch\":\"Πατήστε δύο φορές για απόθεση.\",\"dropDescriptionVirtual\":\"Κάντε κλικ για απόθεση.\",\"dropIndicator\":\"δείκτης απόθεσης\",\"dropOnItem\":\"Απόθεση σε {itemText}\",\"dropOnRoot\":\"Απόθεση σε\",\"endDragKeyboard\":\"Μεταφορά σε εξέλιξη. Πατήστε Enter για ακύρωση της μεταφοράς.\",\"endDragTouch\":\"Μεταφορά σε εξέλιξη. Πατήστε δύο φορές για ακύρωση της μεταφοράς.\",\"endDragVirtual\":\"Μεταφορά σε εξέλιξη. Κάντε κλικ για ακύρωση της μεταφοράς.\",\"insertAfter\":\"Εισαγωγή μετά από {itemText}\",\"insertBefore\":\"Εισαγωγή πριν από {itemText}\",\"insertBetween\":\"Εισαγωγή μεταξύ {beforeItemText} και {afterItemText}\"}");
855
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/en-US.json
856
- var $aea68b9c3ace3526527e1fc930d35d$exports = {};
857
- $aea68b9c3ace3526527e1fc930d35d$exports = JSON.parse("{\"dragItem\":\"Drag {itemText}\",\"dragSelectedItems\":\"Drag {count, plural, one {# selected item} other {# selected items}}\",\"dragDescriptionKeyboard\":\"Press Enter to start dragging.\",\"dragDescriptionTouch\":\"Double tap to start dragging.\",\"dragDescriptionVirtual\":\"Click to start dragging.\",\"dragStartedKeyboard\":\"Started dragging. Press Tab to navigate to a drop target, then press Enter to drop, or press Escape to cancel.\",\"dragStartedTouch\":\"Started dragging. Navigate to a drop target, then double tap to drop.\",\"dragStartedVirtual\":\"Started dragging. Navigate to a drop target, then click or press Enter to drop.\",\"endDragKeyboard\":\"Dragging. Press Enter to cancel drag.\",\"endDragTouch\":\"Dragging. Double tap to cancel drag.\",\"endDragVirtual\":\"Dragging. Click to cancel drag.\",\"dropDescriptionKeyboard\":\"Press Enter to drop. Press Escape to cancel drag.\",\"dropDescriptionTouch\":\"Double tap to drop.\",\"dropDescriptionVirtual\":\"Click to drop.\",\"dropCanceled\":\"Drop canceled.\",\"dropComplete\":\"Drop complete.\",\"dropIndicator\":\"drop indicator\",\"dropOnRoot\":\"Drop on\",\"dropOnItem\":\"Drop on {itemText}\",\"insertBefore\":\"Insert before {itemText}\",\"insertBetween\":\"Insert between {beforeItemText} and {afterItemText}\",\"insertAfter\":\"Insert after {itemText}\"}");
858
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/es-ES.json
859
- var $a4319d93c8291b23c0d42dea$exports = {};
860
- $a4319d93c8291b23c0d42dea$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Pulse Intro para empezar a arrastrar.\",\"dragDescriptionTouch\":\"Pulse dos veces para iniciar el arrastre.\",\"dragDescriptionVirtual\":\"Haga clic para iniciar el arrastre.\",\"dragItem\":\"Arrastrar {itemText}\",\"dragSelectedItems\":\"Arrastrar {count, plural, one {# elemento seleccionado} other {# elementos seleccionados}}\",\"dragStartedKeyboard\":\"Se ha empezado a arrastrar. Pulse el tabulador para ir al destino de colocación y, a continuación, pulse Intro para soltar, o pulse Escape para cancelar.\",\"dragStartedTouch\":\"Se ha empezado a arrastrar. Vaya al destino de colocación y, a continuación, pulse dos veces para soltar.\",\"dragStartedVirtual\":\"Se ha empezado a arrastrar. Vaya al destino de colocación y, a continuación, haga clic o pulse Intro para soltar.\",\"dropCanceled\":\"Se ha cancelado la colocación.\",\"dropComplete\":\"Colocación finalizada.\",\"dropDescriptionKeyboard\":\"Pulse Intro para soltar. Pulse Escape para cancelar el arrastre.\",\"dropDescriptionTouch\":\"Pulse dos veces para soltar.\",\"dropDescriptionVirtual\":\"Haga clic para soltar.\",\"dropIndicator\":\"indicador de colocación\",\"dropOnItem\":\"Soltar en {itemText}\",\"dropOnRoot\":\"Soltar en\",\"endDragKeyboard\":\"Arrastrando. Pulse Intro para cancelar el arrastre.\",\"endDragTouch\":\"Arrastrando. Pulse dos veces para cancelar el arrastre.\",\"endDragVirtual\":\"Arrastrando. Haga clic para cancelar el arrastre.\",\"insertAfter\":\"Insertar después de {itemText}\",\"insertBefore\":\"Insertar antes de {itemText}\",\"insertBetween\":\"Insertar entre {beforeItemText} y {afterItemText}\"}");
861
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/et-EE.json
862
- var $aa30228da98b6306a72b40036f345b$exports = {};
863
- $aa30228da98b6306a72b40036f345b$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Lohistamise alustamiseks vajutage klahvi Enter.\",\"dragDescriptionTouch\":\"Topeltpuudutage lohistamise alustamiseks.\",\"dragDescriptionVirtual\":\"Klõpsake lohistamise alustamiseks.\",\"dragItem\":\"Lohista {itemText}\",\"dragSelectedItems\":\"Lohista {count, plural, one {# valitud üksust} other {# valitud üksust}}\",\"dragStartedKeyboard\":\"Alustati lohistamist. Kukutamise sihtmärgi juurde navigeerimiseks vajutage klahvi Tab, seejärel vajutage kukutamiseks klahvi Enter või loobumiseks klahvi Escape.\",\"dragStartedTouch\":\"Alustati lohistamist. Navigeerige kukutamise sihtmärgi juurde ja topeltpuudutage kukutamiseks.\",\"dragStartedVirtual\":\"Alustati lohistamist. Navigeerige kukutamise sihtmärgi juurde ja kukutamiseks klõpsake või vajutage klahvi Enter.\",\"dropCanceled\":\"Lohistamisest loobuti.\",\"dropComplete\":\"Lohistamine on tehtud.\",\"dropDescriptionKeyboard\":\"Kukutamiseks vajutage klahvi Enter. Lohistamisest loobumiseks vajutage klahvi Escape.\",\"dropDescriptionTouch\":\"Kukutamiseks topeltpuudutage.\",\"dropDescriptionVirtual\":\"Kukutamiseks klõpsake.\",\"dropIndicator\":\"lohistamise indikaator\",\"dropOnItem\":\"Kukuta asukohta {itemText}\",\"dropOnRoot\":\"Kukuta asukohta\",\"endDragKeyboard\":\"Lohistamine. Lohistamisest loobumiseks vajutage klahvi Enter.\",\"endDragTouch\":\"Lohistamine. Lohistamisest loobumiseks topeltpuudutage.\",\"endDragVirtual\":\"Lohistamine. Lohistamisest loobumiseks klõpsake.\",\"insertAfter\":\"Sisesta {itemText} järele\",\"insertBefore\":\"Sisesta {itemText} ette\",\"insertBetween\":\"Sisesta {beforeItemText} ja {afterItemText} vahele\"}");
864
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/fi-FI.json
865
- var $a5a5afea8782a33461a527d7c4a$exports = {};
866
- $a5a5afea8782a33461a527d7c4a$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Aloita vetäminen painamalla Enter-näppäintä.\",\"dragDescriptionTouch\":\"Aloita vetäminen kaksoisnapauttamalla.\",\"dragDescriptionVirtual\":\"Aloita vetäminen napsauttamalla.\",\"dragItem\":\"Vedä kohdetta {itemText}\",\"dragSelectedItems\":\"Vedä {count, plural, one {# valittua kohdetta} other {# valittua kohdetta}}\",\"dragStartedKeyboard\":\"Vetäminen aloitettu. Siirry pudotuskohteeseen painamalla sarkainnäppäintä ja sitten pudota painamalla Enter-näppäintä tai peruuta painamalla Escape-näppäintä.\",\"dragStartedTouch\":\"Vetäminen aloitettu. Siirry pudotuskohteeseen ja pudota kaksoisnapauttamalla.\",\"dragStartedVirtual\":\"Vetäminen aloitettu. Siirry pudotuskohteeseen ja pudota napsauttamalla tai painamalla Enter-näppäintä.\",\"dropCanceled\":\"Pudotus peruutettu.\",\"dropComplete\":\"Pudotus suoritettu.\",\"dropDescriptionKeyboard\":\"Pudota painamalla Enter-näppäintä. Peruuta vetäminen painamalla Escape-näppäintä.\",\"dropDescriptionTouch\":\"Pudota kaksoisnapauttamalla.\",\"dropDescriptionVirtual\":\"Pudota napsauttamalla.\",\"dropIndicator\":\"pudotuksen ilmaisin\",\"dropOnItem\":\"Pudota kohteeseen {itemText}\",\"dropOnRoot\":\"Pudota kohteeseen\",\"endDragKeyboard\":\"Vedetään. Peruuta vetäminen painamalla Enter-näppäintä.\",\"endDragTouch\":\"Vedetään. Peruuta vetäminen kaksoisnapauttamalla.\",\"endDragVirtual\":\"Vedetään. Peruuta vetäminen napsauttamalla.\",\"insertAfter\":\"Lisää kohteen {itemText} jälkeen\",\"insertBefore\":\"Lisää ennen kohdetta {itemText}\",\"insertBetween\":\"Lisää kohteiden {beforeItemText} ja {afterItemText} väliin\"}");
867
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/fr-FR.json
868
- var $b32fceb28c2b8e8e846140594714351f$exports = {};
869
- $b32fceb28c2b8e8e846140594714351f$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Appuyez sur Entrée pour commencer le déplacement.\",\"dragDescriptionTouch\":\"Touchez deux fois pour commencer le déplacement.\",\"dragDescriptionVirtual\":\"Cliquez pour commencer le déplacement.\",\"dragItem\":\"Déplacer {itemText}\",\"dragSelectedItems\":\"Déplacer {count, plural, one {# élément sélectionné} other {# éléments sélectionnés}}\",\"dragStartedKeyboard\":\"Déplacement commencé. Appuyez sur Tabulation pour accéder à une cible de dépôt, puis appuyez sur Entrée pour déposer, ou appuyez sur Échap pour annuler.\",\"dragStartedTouch\":\"Déplacement commencé. Accédez à une cible de dépôt, puis touchez deux fois pour déposer.\",\"dragStartedVirtual\":\"Déplacement commencé. Accédez à une cible de dépôt, puis cliquez ou appuyez sur Entrée pour déposer.\",\"dropCanceled\":\"Dépôt annulé.\",\"dropComplete\":\"Dépôt terminé.\",\"dropDescriptionKeyboard\":\"Appuyez sur Entrée pour déposer. Appuyez sur Échap pour annuler le déplacement.\",\"dropDescriptionTouch\":\"Touchez deux fois pour déposer.\",\"dropDescriptionVirtual\":\"Cliquez pour déposer.\",\"dropIndicator\":\"indicateur de dépôt\",\"dropOnItem\":\"Déposer sur {itemText}\",\"dropOnRoot\":\"Déposer sur\",\"endDragKeyboard\":\"Déplacement. Appuyez sur Entrée pour annuler le déplacement.\",\"endDragTouch\":\"Déplacement. Touchez deux fois pour annuler le déplacement.\",\"endDragVirtual\":\"Déplacement. Cliquez pour annuler le déplacement.\",\"insertAfter\":\"Insérer après {itemText}\",\"insertBefore\":\"Insérer avant {itemText}\",\"insertBetween\":\"Insérer entre {beforeItemText} et {afterItemText}\"}");
870
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/he-IL.json
871
- var $d9bdb7d78ee35d20ae60007d2accaf5$exports = {};
872
- $d9bdb7d78ee35d20ae60007d2accaf5$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"הקש על Enter כדי להתחיל לגרור.\",\"dragDescriptionTouch\":\"הקש פעמיים כדי להתחיל בגרירה.\",\"dragDescriptionVirtual\":\"לחץ כדי להתחיל לגרור.\",\"dragItem\":\"גרור את {itemText}\",\"dragSelectedItems\":\"גרור {count, plural, one {פריט נבחר #} other {# פריטים שנבחרו}}\",\"dragStartedKeyboard\":\"התחלת לגרור. הקש על Tab כדי לנווט לנקודת הגרירה ולאחר מכן הקש על Enter כדי לשחרר או על Escape כדי לבטל.\",\"dragStartedTouch\":\"התחלת לגרור. נווט לנקודת השחרור ולאחר מכן הקש פעמיים כדי לשחרר.\",\"dragStartedVirtual\":\"התחלת לגרור. נווט לנקודת השחרור ולאחר מכן לחץ או הקש על Enter כדי לשחרר.\",\"dropCanceled\":\"השחרור בוטל.\",\"dropComplete\":\"השחרור הושלם.\",\"dropDescriptionKeyboard\":\"הקש על Enter כדי לשחרר. הקש על Escape כדי לבטל את הגרירה.\",\"dropDescriptionTouch\":\"הקש פעמיים כדי לשחרר.\",\"dropDescriptionVirtual\":\"לחץ כדי לשחרר.\",\"dropIndicator\":\"מחוון שחרור\",\"dropOnItem\":\"שחרר על {itemText}\",\"dropOnRoot\":\"שחרר על\",\"endDragKeyboard\":\"גורר. הקש על Enter כדי לבטל את הגרירה.\",\"endDragTouch\":\"גורר. הקש פעמיים כדי לבטל את הגרירה.\",\"endDragVirtual\":\"גורר. לחץ כדי לבטל את הגרירה.\",\"insertAfter\":\"הוסף אחרי {itemText}\",\"insertBefore\":\"הוסף לפני {itemText}\",\"insertBetween\":\"הוסף בין {beforeItemText} לבין {afterItemText}\"}");
873
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/hr-HR.json
874
- var $c14894ae7d558e9dc3011ecae5f8a96b$exports = {};
875
- $c14894ae7d558e9dc3011ecae5f8a96b$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Pritisnite Enter da biste počeli povlačiti.\",\"dragDescriptionTouch\":\"Dvaput dodirnite da biste počeli povlačiti.\",\"dragDescriptionVirtual\":\"Kliknite da biste počeli povlačiti.\",\"dragItem\":\"Povucite stavku {itemText}\",\"dragSelectedItems\":\"Povucite {count, plural, one {# odabranu stavku} other {ovoliko odabranih stavki: #}}\",\"dragStartedKeyboard\":\"Počeli ste povlačiti. Pritisnite tipku tabulatora da biste došli do cilja ispuštanja, a zatim Enter da biste ispustili stavku ili Escape da biste prekinuli povlačenje.\",\"dragStartedTouch\":\"Počeli ste povlačiti. Dođite do cilja ispuštanja, a zatim dvaput dodirnite da biste ispustili stavku.\",\"dragStartedVirtual\":\"Počeli ste povlačiti. Dođite do cilja ispuštanja, a zatim kliknite ili pritisnite Enter da biste ispustili stavku.\",\"dropCanceled\":\"Povlačenje je prekinuto.\",\"dropComplete\":\"Ispuštanje je dovršeno.\",\"dropDescriptionKeyboard\":\"Pritisnite Enter da biste ispustili stavku. Pritisnite Escape da biste prekinuli povlačenje.\",\"dropDescriptionTouch\":\"Dvaput dodirnite da biste ispustili stavku.\",\"dropDescriptionVirtual\":\"Kliknite da biste ispustili stavku.\",\"dropIndicator\":\"pokazatelj ispuštanja\",\"dropOnItem\":\"Ispustite na stavku {itemText}\",\"dropOnRoot\":\"Ispustite na\",\"endDragKeyboard\":\"Povlačenje. Pritisnite Enter da biste prekinuli povlačenje.\",\"endDragTouch\":\"Povlačenje. Dvaput dodirnite da biste prekinuli povlačenje.\",\"endDragVirtual\":\"Povlačenje. Kliknite da biste prekinuli povlačenje.\",\"insertAfter\":\"Umetnite iza stavke {itemText}\",\"insertBefore\":\"Ispustite ispred stavke {itemText}\",\"insertBetween\":\"Umetnite između stavki {beforeItemText} i {afterItemText}\"}");
876
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/hu-HU.json
877
- var $f194e25a9c86722f6a3826e7ad96c717$exports = {};
878
- $f194e25a9c86722f6a3826e7ad96c717$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Nyomja le az Enter billentyűt a húzás megkezdéséhez.\",\"dragDescriptionTouch\":\"Koppintson duplán a húzás megkezdéséhez.\",\"dragDescriptionVirtual\":\"Kattintson a húzás megkezdéséhez.\",\"dragItem\":\"{itemText} húzása\",\"dragSelectedItems\":\"{count, plural, one {# kijelölt elem} other {# kijelölt elem}} húzása\",\"dragStartedKeyboard\":\"Húzás megkezdve. Nyomja le a Tab billentyűt az elengedési célhoz navigálásához, majd nyomja le az Enter billentyűt az elengedéshez, vagy nyomja le az Escape billentyűt a megszakításhoz.\",\"dragStartedTouch\":\"Húzás megkezdve. Navigáljon egy elengedési célhoz, majd koppintson duplán az elengedéshez.\",\"dragStartedVirtual\":\"Húzás megkezdve. Navigáljon egy elengedési célhoz, majd kattintson vagy nyomja le az Enter billentyűt az elengedéshez.\",\"dropCanceled\":\"Elengedés megszakítva.\",\"dropComplete\":\"Elengedés teljesítve.\",\"dropDescriptionKeyboard\":\"Nyomja le az Enter billentyűt az elengedéshez. Nyomja le az Escape billentyűt a húzás megszakításához.\",\"dropDescriptionTouch\":\"Koppintson duplán az elengedéshez.\",\"dropDescriptionVirtual\":\"Kattintson az elengedéshez.\",\"dropIndicator\":\"elengedésjelző\",\"dropOnItem\":\"Elengedés erre: {itemText}\",\"dropOnRoot\":\"Elengedés erre:\",\"endDragKeyboard\":\"Húzás folyamatban. Nyomja le az Enter billentyűt a húzás megszakításához.\",\"endDragTouch\":\"Húzás folyamatban. Koppintson duplán a húzás megszakításához.\",\"endDragVirtual\":\"Húzás folyamatban. Kattintson a húzás megszakításához.\",\"insertAfter\":\"Beszúrás {itemText} után\",\"insertBefore\":\"Beszúrás {itemText} elé\",\"insertBetween\":\"Beszúrás {beforeItemText} és {afterItemText} közé\"}");
879
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/it-IT.json
880
- var $cae04c9878c1e24b1bce5348e54e95a4$exports = {};
881
- $cae04c9878c1e24b1bce5348e54e95a4$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Premi Invio per iniziare a trascinare.\",\"dragDescriptionTouch\":\"Tocca due volte per iniziare a trascinare.\",\"dragDescriptionVirtual\":\"Fai clic per iniziare a trascinare.\",\"dragItem\":\"Trascina {itemText}\",\"dragSelectedItems\":\"Trascina {count, plural, one {# altro elemento selezionato} other {# altri elementi selezionati}}\",\"dragStartedKeyboard\":\"Hai iniziato a trascinare. Premi Tab per arrivare sull’area di destinazione, quindi premi Invio per rilasciare o Esc per annullare.\",\"dragStartedTouch\":\"Hai iniziato a trascinare. Arriva sull’area di destinazione, quindi tocca due volte per rilasciare.\",\"dragStartedVirtual\":\"Hai iniziato a trascinare. Arriva sull’area di destinazione, quindi fai clic o premi Invio per rilasciare.\",\"dropCanceled\":\"Rilascio annullato.\",\"dropComplete\":\"Rilascio completato.\",\"dropDescriptionKeyboard\":\"Premi Invio per rilasciare. Premi Esc per annullare.\",\"dropDescriptionTouch\":\"Tocca due volte per rilasciare.\",\"dropDescriptionVirtual\":\"Fai clic per rilasciare.\",\"dropIndicator\":\"indicatore di rilascio\",\"dropOnItem\":\"Rilascia su {itemText}\",\"dropOnRoot\":\"Rilascia su\",\"endDragKeyboard\":\"Trascinamento. Premi Invio per annullare.\",\"endDragTouch\":\"Trascinamento. Tocca due volte per annullare.\",\"endDragVirtual\":\"Trascinamento. Fai clic per annullare.\",\"insertAfter\":\"Inserisci dopo {itemText}\",\"insertBefore\":\"Inserisci prima di {itemText}\",\"insertBetween\":\"Inserisci tra {beforeItemText} e {afterItemText}\"}");
882
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/ja-JP.json
883
- var $b9679eb29e949e5727cbdcf506da08c1$exports = {};
884
- $b9679eb29e949e5727cbdcf506da08c1$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Enter キーを押してドラッグを開始してください。\",\"dragDescriptionTouch\":\"ダブルタップしてドラッグを開始します。\",\"dragDescriptionVirtual\":\"クリックしてドラッグを開始します。\",\"dragItem\":\"{itemText} をドラッグ\",\"dragSelectedItems\":\"{count, plural, one {# 個の選択項目} other {# 個の選択項目}} をドラッグ\",\"dragStartedKeyboard\":\"ドラッグを開始します。Tab キーを押してドロップターゲットにいどうし、Enter キーを押してドロップするか、Esc キーを押してキャンセルします。\",\"dragStartedTouch\":\"ドラッグを開始しました。ドロップのターゲットに移動し、ダブルタップしてドロップします。\",\"dragStartedVirtual\":\"ドラッグを開始しました。ドロップのターゲットに移動し、クリックまたは Enter キーを押してドロップします。\",\"dropCanceled\":\"ドロップがキャンセルされました。\",\"dropComplete\":\"ドロップが完了しました。\",\"dropDescriptionKeyboard\":\"Enter キーを押してドロップします。Esc キーを押してドラッグをキャンセルします。\",\"dropDescriptionTouch\":\"ダブルタップしてドロップします。\",\"dropDescriptionVirtual\":\"クリックしてドロップします。\",\"dropIndicator\":\"ドロップインジケーター\",\"dropOnItem\":\"{itemText} にドロップ\",\"dropOnRoot\":\"ドロップ場所\",\"endDragKeyboard\":\"ドラッグしています。Enter キーを押してドラッグをキャンセルします。\",\"endDragTouch\":\"ドラッグしています。ダブルタップしてドラッグをキャンセルします。\",\"endDragVirtual\":\"ドラッグしています。クリックしてドラッグをキャンセルします。\",\"insertAfter\":\"{itemText} の後に挿入\",\"insertBefore\":\"{itemText} の前に挿入\",\"insertBetween\":\"{beforeItemText} と {afterItemText} の間に挿入\"}");
885
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/ko-KR.json
886
- var $c663d68cc7455025fffd92332e200be$exports = {};
887
- $c663d68cc7455025fffd92332e200be$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"드래그를 시작하려면 Enter를 누르세요.\",\"dragDescriptionTouch\":\"드래그를 시작하려면 더블 탭하세요.\",\"dragDescriptionVirtual\":\"드래그를 시작하려면 클릭하세요.\",\"dragItem\":\"{itemText} 드래그\",\"dragSelectedItems\":\"{count, plural, one {#개 선택 항목} other {#개 선택 항목}} 드래그\",\"dragStartedKeyboard\":\"드래그가 시작되었습니다. Tab을 눌러 드롭 대상으로 이동한 다음 Enter를 눌러 드롭하거나 Esc를 눌러 취소하세요.\",\"dragStartedTouch\":\"드래그가 시작되었습니다. 드롭 대상으로 이동한 다음 더블 탭하여 드롭하세요.\",\"dragStartedVirtual\":\"드래그가 시작되었습니다. 드롭 대상으로 이동한 다음 클릭하거나 Enter를 눌러 드롭하세요.\",\"dropCanceled\":\"드롭이 취소되었습니다.\",\"dropComplete\":\"드롭이 완료되었습니다.\",\"dropDescriptionKeyboard\":\"드롭하려면 Enter를 누르세요. 드래그를 취소하려면 Esc를 누르세요.\",\"dropDescriptionTouch\":\"더블 탭하여 드롭하세요.\",\"dropDescriptionVirtual\":\"드롭하려면 클릭하세요.\",\"dropIndicator\":\"드롭 표시기\",\"dropOnItem\":\"{itemText}에 드롭\",\"dropOnRoot\":\"드롭 대상\",\"endDragKeyboard\":\"드래그 중입니다. 드래그를 취소하려면 Enter를 누르세요.\",\"endDragTouch\":\"드래그 중입니다. 드래그를 취소하려면 더블 탭하세요.\",\"endDragVirtual\":\"드래그 중입니다. 드래그를 취소하려면 클릭하세요.\",\"insertAfter\":\"{itemText} 이후에 삽입\",\"insertBefore\":\"{itemText} 이전에 삽입\",\"insertBetween\":\"{beforeItemText} 및 {afterItemText} 사이에 삽입\"}");
888
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/lt-LT.json
889
- var $d454665d97cf724871a9c3eb05$exports = {};
890
- $d454665d97cf724871a9c3eb05$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Paspauskite „Enter“, kad pradėtumėte vilkti.\",\"dragDescriptionTouch\":\"Palieskite dukart, kad pradėtumėte vilkti.\",\"dragDescriptionVirtual\":\"Spustelėkite, kad pradėtumėte vilkti.\",\"dragItem\":\"Vilkti {itemText}\",\"dragSelectedItems\":\"Vilkti {count, plural, one {# pasirinktą elementą} other {# pasirinktus elementus}}\",\"dragStartedKeyboard\":\"Pradėta vilkti. Paspauskite „Tab“, kad pereitumėte į tiesioginę paskirties vietą, tada paspauskite „Enter“, kad numestumėte, arba „Escape“, kad atšauktumėte.\",\"dragStartedTouch\":\"Pradėta vilkti. Eikite į tiesioginę paskirties vietą, tada palieskite dukart, kad numestumėte.\",\"dragStartedVirtual\":\"Pradėta vilkti. Eikite į tiesioginę paskirties vietą ir spustelėkite arba paspauskite „Enter“, kad numestumėte.\",\"dropCanceled\":\"Numetimas atšauktas.\",\"dropComplete\":\"Numesta.\",\"dropDescriptionKeyboard\":\"Paspauskite „Enter“, kad numestumėte. Paspauskite „Escape“, kad atšauktumėte vilkimą.\",\"dropDescriptionTouch\":\"Palieskite dukart, kad numestumėte.\",\"dropDescriptionVirtual\":\"Spustelėkite, kad numestumėte.\",\"dropIndicator\":\"numetimo indikatorius\",\"dropOnItem\":\"Numesti ant {itemText}\",\"dropOnRoot\":\"Numesti ant\",\"endDragKeyboard\":\"Velkama. Paspauskite „Enter“, kad atšauktumėte vilkimą.\",\"endDragTouch\":\"Velkama. Spustelėkite dukart, kad atšauktumėte vilkimą.\",\"endDragVirtual\":\"Velkama. Spustelėkite, kad atšauktumėte vilkimą.\",\"insertAfter\":\"Įterpti po {itemText}\",\"insertBefore\":\"Įterpti prieš {itemText}\",\"insertBetween\":\"Įterpti tarp {beforeItemText} ir {afterItemText}\"}");
891
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/lv-LV.json
892
- var $ca66a3bcdd44dae4665871a98bb416e3$exports = {};
893
- $ca66a3bcdd44dae4665871a98bb416e3$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Nospiediet Enter, lai sāktu vilkšanu.\",\"dragDescriptionTouch\":\"Veiciet dubultskārienu, lai sāktu vilkšanu.\",\"dragDescriptionVirtual\":\"Noklikšķiniet, lai sāktu vilkšanu.\",\"dragItem\":\"Velciet {itemText}\",\"dragSelectedItems\":\"Velciet {count, plural, one {# atlasīto vienumu} other {# atlasītos vienumus}}\",\"dragStartedKeyboard\":\"Uzsākta vilkšana. Nospiediet taustiņu Tab, lai pārietu uz nomešanas mērķi, pēc tam nospiediet Enter, lai nomestu, vai nospiediet Escape, lai atceltu.\",\"dragStartedTouch\":\"Uzsākta vilkšana. Pārejiet uz nomešanas mērķi, pēc tam veiciet dubultskārienu, lai nomestu.\",\"dragStartedVirtual\":\"Uzsākta vilkšana. Pārejiet uz nomešanas mērķi, pēc tam nospiediet Enter, lai nomestu.\",\"dropCanceled\":\"Nomešana atcelta.\",\"dropComplete\":\"Nomešana pabeigta.\",\"dropDescriptionKeyboard\":\"Nospiediet Enter, lai nomestu. Nospiediet Escape, lai atceltu vilkšanu.\",\"dropDescriptionTouch\":\"Veiciet dubultskārienu, lai nomestu.\",\"dropDescriptionVirtual\":\"Noklikšķiniet, lai nomestu.\",\"dropIndicator\":\"nomešanas indikators\",\"dropOnItem\":\"Nometiet uz {itemText}\",\"dropOnRoot\":\"Nometiet uz\",\"endDragKeyboard\":\"Notiek vilkšana. Nospiediet Enter, lai atceltu vilkšanu.\",\"endDragTouch\":\"Notiek vilkšana. Veiciet dubultskārienu, lai atceltu vilkšanu.\",\"endDragVirtual\":\"Notiek vilkšana. Noklikšķiniet, lai atceltu vilkšanu.\",\"insertAfter\":\"Ievietojiet pēc {itemText}\",\"insertBefore\":\"Ievietojiet pirms {itemText}\",\"insertBetween\":\"Ievietojiet starp {beforeItemText} un {afterItemText}\"}");
894
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/nb-NO.json
895
- var $cb7e072c8b2f7c15a7e06a7ac99163$exports = {};
896
- $cb7e072c8b2f7c15a7e06a7ac99163$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Trykk på Enter for å begynne å dra.\",\"dragDescriptionTouch\":\"Dobbelttrykk for å begynne å dra.\",\"dragDescriptionVirtual\":\"Klikk for å begynne å dra.\",\"dragItem\":\"Dra {itemText}\",\"dragSelectedItems\":\"Dra {count, plural, one {# merket element} other {# merkede elementer}}\",\"dragStartedKeyboard\":\"Begynte å dra. Trykk på Tab for å navigere til et mål, og trykk deretter på Enter for å slippe eller på Esc for å avbryte.\",\"dragStartedTouch\":\"Begynte å dra. Naviger til et mål, og dobbelttrykk for å slippe.\",\"dragStartedVirtual\":\"Begynte å dra. Naviger til et mål, og klikk eller trykk på Enter for å slippe.\",\"dropCanceled\":\"Avbrøt slipping.\",\"dropComplete\":\"Slippingen er fullført.\",\"dropDescriptionKeyboard\":\"Trykk på Enter for å slippe. Trykk på Esc hvis du vil avbryte draingen.\",\"dropDescriptionTouch\":\"Dobbelttrykk for å slippe.\",\"dropDescriptionVirtual\":\"Klikk for å slippe.\",\"dropIndicator\":\"slippeindikator\",\"dropOnItem\":\"Slipp på {itemText}\",\"dropOnRoot\":\"Slipp på\",\"endDragKeyboard\":\"Drar. Trykk på Enter hvis du vil avbryte.\",\"endDragTouch\":\"Drar. Dobbelttrykk hvis du vil avbryte.\",\"endDragVirtual\":\"Drar. Klikk hvis du vil avbryte.\",\"insertAfter\":\"Sett inn etter {itemText}\",\"insertBefore\":\"Sett inn før {itemText}\",\"insertBetween\":\"Sett inn mellom {beforeItemText} og {afterItemText}\"}");
897
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/nl-NL.json
898
- var $f9d8bf1245c4a4f581c7966119af7c$exports = {};
899
- $f9d8bf1245c4a4f581c7966119af7c$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Druk op Enter om te slepen.\",\"dragDescriptionTouch\":\"Dubbeltik om te slepen.\",\"dragDescriptionVirtual\":\"Klik om met slepen te starten.\",\"dragItem\":\"{itemText} slepen\",\"dragSelectedItems\":\"{count, plural, one {# geselecteerd item} other {# geselecteerde items}} slepen\",\"dragStartedKeyboard\":\"Begonnen met slepen. Druk op Tab om naar een locatie te gaan. Druk dan op Enter om neer te zetten, of op Esc om te annuleren.\",\"dragStartedTouch\":\"Begonnen met slepen. Ga naar de gewenste locatie en dubbeltik om neer te zetten.\",\"dragStartedVirtual\":\"Begonnen met slepen. Ga naar de gewenste locatie en klik of druk op Enter om neer te zetten.\",\"dropCanceled\":\"Neerzetten geannuleerd.\",\"dropComplete\":\"Neerzetten voltooid.\",\"dropDescriptionKeyboard\":\"Druk op Enter om neer te zetten. Druk op Esc om het slepen te annuleren.\",\"dropDescriptionTouch\":\"Dubbeltik om neer te zetten.\",\"dropDescriptionVirtual\":\"Klik om neer te zetten.\",\"dropIndicator\":\"aanwijzer voor neerzetten\",\"dropOnItem\":\"Neerzetten op {itemText}\",\"dropOnRoot\":\"Neerzetten op\",\"endDragKeyboard\":\"Bezig met slepen. Druk op Enter om te annuleren.\",\"endDragTouch\":\"Bezig met slepen. Dubbeltik om te annuleren.\",\"endDragVirtual\":\"Bezig met slepen. Klik om te annuleren.\",\"insertAfter\":\"Plaatsen na {itemText}\",\"insertBefore\":\"Plaatsen vóór {itemText}\",\"insertBetween\":\"Plaatsen tussen {beforeItemText} en {afterItemText}\"}");
900
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/pl-PL.json
901
- var $cd07a56ec0cb160ba15542c10691829d$exports = {};
902
- $cd07a56ec0cb160ba15542c10691829d$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Naciśnij Enter, aby rozpocząć przeciąganie.\",\"dragDescriptionTouch\":\"Dotknij dwukrotnie, aby rozpocząć przeciąganie.\",\"dragDescriptionVirtual\":\"Kliknij, aby rozpocząć przeciąganie.\",\"dragItem\":\"Przeciągnij {itemText}\",\"dragSelectedItems\":\"Przeciągnij {count, plural, one {# wybrany element} other {# wybranych elementów}}\",\"dragStartedKeyboard\":\"Rozpoczęto przeciąganie. Naciśnij Tab, aby wybrać miejsce docelowe, a następnie naciśnij Enter, aby upuścić, lub Escape, aby anulować.\",\"dragStartedTouch\":\"Rozpoczęto przeciąganie. Wybierz miejsce, w którym chcesz upuścić element, a następnie dotknij dwukrotnie, aby upuścić.F\",\"dragStartedVirtual\":\"Rozpoczęto przeciąganie. Wybierz miejsce, w którym chcesz upuścić element, a następnie kliknij lub naciśnij Enter, aby upuścić.\",\"dropCanceled\":\"Anulowano upuszczenie.\",\"dropComplete\":\"Zakończono upuszczanie.\",\"dropDescriptionKeyboard\":\"Naciśnij Enter, aby upuścić. Naciśnij Escape, aby anulować przeciągnięcie.\",\"dropDescriptionTouch\":\"Dotknij dwukrotnie, aby upuścić.\",\"dropDescriptionVirtual\":\"Kliknij, aby upuścić.\",\"dropIndicator\":\"wskaźnik upuszczenia\",\"dropOnItem\":\"Upuść na {itemText}\",\"dropOnRoot\":\"Upuść\",\"endDragKeyboard\":\"Przeciąganie. Naciśnij Enter, aby anulować przeciągnięcie.\",\"endDragTouch\":\"Przeciąganie. Kliknij dwukrotnie, aby anulować przeciągnięcie.\",\"endDragVirtual\":\"Przeciąganie. Kliknij, aby anulować przeciąganie.\",\"insertAfter\":\"Umieść za {itemText}\",\"insertBefore\":\"Umieść przed {itemText}\",\"insertBetween\":\"Umieść między {beforeItemText} i {afterItemText}\"}");
903
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/pt-BR.json
904
- var $a70fe1fa67e039d2646076dfb78cee1$exports = {};
905
- $a70fe1fa67e039d2646076dfb78cee1$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Pressione Enter para começar a arrastar.\",\"dragDescriptionTouch\":\"Toque duas vezes para começar a arrastar.\",\"dragDescriptionVirtual\":\"Clique para começar a arrastar.\",\"dragItem\":\"Arrastar {itemText}\",\"dragSelectedItems\":\"Arrastar {count, plural, one {# item selecionado} other {# itens selecionados}}\",\"dragStartedKeyboard\":\"Comece a arrastar. Pressione Tab para navegar até um alvo e, em seguida, pressione Enter para soltar ou pressione Escape para cancelar.\",\"dragStartedTouch\":\"Comece a arrastar. Navegue até um alvo e toque duas vezes para soltar.\",\"dragStartedVirtual\":\"Comece a arrastar. Navegue até um alvo e clique ou pressione Enter para soltar.\",\"dropCanceled\":\"Liberação cancelada.\",\"dropComplete\":\"Liberação concluída.\",\"dropDescriptionKeyboard\":\"Pressione Enter para soltar. Pressione Escape para cancelar.\",\"dropDescriptionTouch\":\"Toque duas vezes para soltar.\",\"dropDescriptionVirtual\":\"Clique para soltar.\",\"dropIndicator\":\"indicador de liberação\",\"dropOnItem\":\"Soltar em {itemText}\",\"dropOnRoot\":\"Soltar\",\"endDragKeyboard\":\"Arrastando. Pressione Enter para cancelar.\",\"endDragTouch\":\"Arrastando. Toque duas vezes para cancelar.\",\"endDragVirtual\":\"Arrastando. Clique para cancelar.\",\"insertAfter\":\"Inserir após {itemText}\",\"insertBefore\":\"Inserir antes de {itemText}\",\"insertBetween\":\"Inserir entre {beforeItemText} e {afterItemText}\"}");
906
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/pt-PT.json
907
- var $e37cb9bf759f35580e0f57d85e98be4b$exports = {};
908
- $e37cb9bf759f35580e0f57d85e98be4b$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Prima Enter para iniciar o arrasto.\",\"dragDescriptionTouch\":\"Faça duplo toque para começar a arrastar.\",\"dragDescriptionVirtual\":\"Clique para iniciar o arrasto.\",\"dragItem\":\"Arrastar {itemText}\",\"dragSelectedItems\":\"Arrastar {count, plural, one {# item selecionado} outro {# itens selecionados}}\",\"dragStartedKeyboard\":\"Arrasto iniciado. Prima a tecla de tabulação para navegar para um destino para largar, e em seguida prima Enter para largar ou prima Escape para cancelar.\",\"dragStartedTouch\":\"Arrasto iniciado. Navegue para um destino para largar, e em seguida faça duplo toque para largar.\",\"dragStartedVirtual\":\"Arrasto iniciado. Navegue para um destino para largar, e em seguida clique ou prima Enter para largar.\",\"dropCanceled\":\"Largar cancelado.\",\"dropComplete\":\"Largar completo.\",\"dropDescriptionKeyboard\":\"Prima Enter para largar. Prima Escape para cancelar o arrasto.\",\"dropDescriptionTouch\":\"Faça duplo toque para largar.\",\"dropDescriptionVirtual\":\"Clique para largar.\",\"dropIndicator\":\"Indicador de largar\",\"dropOnItem\":\"Largar em {itemText}\",\"dropOnRoot\":\"Largar em\",\"endDragKeyboard\":\"A arrastar. Prima Enter para cancelar o arrasto.\",\"endDragTouch\":\"A arrastar. Faça duplo toque para cancelar o arrasto.\",\"endDragVirtual\":\"A arrastar. Clique para cancelar o arrasto.\",\"insertAfter\":\"Inserir depois de {itemText}\",\"insertBefore\":\"Inserir antes de {itemText}\",\"insertBetween\":\"Inserir entre {beforeItemText} e {afterItemText}\"}");
909
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/ro-RO.json
910
- var $f4cf63884707eedcbdf4eae0b61ef1bf$exports = {};
911
- $f4cf63884707eedcbdf4eae0b61ef1bf$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Apăsați pe Enter pentru a începe glisarea.\",\"dragDescriptionTouch\":\"Atingeți de două ori pentru a începe să glisați.\",\"dragDescriptionVirtual\":\"Faceți clic pentru a începe glisarea.\",\"dragItem\":\"Glisați {itemText}\",\"dragSelectedItems\":\"Glisați {count, plural, one {# element selectat} other {# elemente selectate}}\",\"dragStartedKeyboard\":\"A început glisarea. Apăsați pe Tab pentru a naviga la o țintă de fixare, apoi apăsați pe Enter pentru a fixa sau apăsați pe Escape pentru a anula glisarea.\",\"dragStartedTouch\":\"A început glisarea. Navigați la o țintă de fixare, apoi atingeți de două ori pentru a fixa.\",\"dragStartedVirtual\":\"A început glisarea. Navigați la o țintă de fixare, apoi faceți clic sau apăsați pe Enter pentru a fixa.\",\"dropCanceled\":\"Fixare anulată.\",\"dropComplete\":\"Fixare finalizată.\",\"dropDescriptionKeyboard\":\"Apăsați pe Enter pentru a fixa. Apăsați pe Escape pentru a anula glisarea.\",\"dropDescriptionTouch\":\"Atingeți de două ori pentru a fixa.\",\"dropDescriptionVirtual\":\"Faceți clic pentru a fixa.\",\"dropIndicator\":\"indicator de fixare\",\"dropOnItem\":\"Fixați pe {itemText}\",\"dropOnRoot\":\"Fixare pe\",\"endDragKeyboard\":\"Se glisează. Apăsați pe Enter pentru a anula glisarea.\",\"endDragTouch\":\"Se glisează. Atingeți de două ori pentru a anula glisarea.\",\"endDragVirtual\":\"Se glisează. Faceți clic pentru a anula glisarea.\",\"insertAfter\":\"Inserați după {itemText}\",\"insertBefore\":\"Inserați înainte de {itemText}\",\"insertBetween\":\"Inserați între {beforeItemText} și {afterItemText}\"}");
912
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/ru-RU.json
913
- var $e2321eb9f531b07389bd6bfcdd631256$exports = {};
914
- $e2321eb9f531b07389bd6bfcdd631256$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Нажмите клавишу Enter для начала перетаскивания.\",\"dragDescriptionTouch\":\"Дважды нажмите для начала перетаскивания.\",\"dragDescriptionVirtual\":\"Щелкните для начала перетаскивания.\",\"dragItem\":\"Перетащить {itemText}\",\"dragSelectedItems\":\"Перетащить {count, plural, one {# выбранный элемент} other {# выбранных элем}}\",\"dragStartedKeyboard\":\"Начато перетаскивание. Нажмите клавишу Tab для выбора цели, затем нажмите клавишу Enter, чтобы применить перетаскивание, или клавишу Escape для отмены действия.\",\"dragStartedTouch\":\"Начато перетаскивание. Выберите цель, затем дважды нажмите, чтобы применить перетаскивание.\",\"dragStartedVirtual\":\"Начато перетаскивание. Нажмите клавишу Tab для выбора цели, затем нажмите клавишу Enter, чтобы применить перетаскивание.\",\"dropCanceled\":\"Перетаскивание отменено.\",\"dropComplete\":\"Перетаскивание завершено.\",\"dropDescriptionKeyboard\":\"Нажмите клавишу Enter, чтобы применить перетаскивание. Нажмите клавишу Escape для отмены.\",\"dropDescriptionTouch\":\"Дважды нажмите, чтобы применить перетаскивание.\",\"dropDescriptionVirtual\":\"Щелкните, чтобы применить перетаскивание.\",\"dropIndicator\":\"индикатор перетаскивания\",\"dropOnItem\":\"Перетащить на {itemText}\",\"dropOnRoot\":\"Перетащить на\",\"endDragKeyboard\":\"Перетаскивание. Нажмите клавишу Enter для отмены.\",\"endDragTouch\":\"Перетаскивание. Дважды нажмите для отмены.\",\"endDragVirtual\":\"Перетаскивание. Щелкните для отмены.\",\"insertAfter\":\"Вставить после {itemText}\",\"insertBefore\":\"Вставить перед {itemText}\",\"insertBetween\":\"Вставить между {beforeItemText} и {afterItemText}\"}");
915
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/sk-SK.json
916
- var $ef19e5833adeee78e3c34d0f68fa9f31$exports = {};
917
- $ef19e5833adeee78e3c34d0f68fa9f31$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Stlačením klávesu Enter začnete presúvanie.\",\"dragDescriptionTouch\":\"Dvojitým kliknutím začnete presúvanie.\",\"dragDescriptionVirtual\":\"Kliknutím začnete presúvanie.\",\"dragItem\":\"Presunúť položku {itemText}\",\"dragSelectedItems\":\"Presunúť {count, plural, one {# vybratú položku} other {# vybraté položky}}\",\"dragStartedKeyboard\":\"Presúvanie sa začalo. Do cieľového umiestnenia prejdete stlačením klávesu Tab. Ak chcete položku umiestniť, stlačte kláves Enter alebo stlačte kláves Esc, ak chcete presúvanie zrušiť.\",\"dragStartedTouch\":\"Presúvanie sa začalo. Prejdite na cieľové umiestnenie a dvojitým kliknutím umiestnite položku.\",\"dragStartedVirtual\":\"Presúvanie sa začalo. Prejdite na cieľové umiestnenie a kliknutím alebo stlačením klávesu Enter umiestnite položku.\",\"dropCanceled\":\"Umiestnenie zrušené.\",\"dropComplete\":\"Umiestnenie dokončené.\",\"dropDescriptionKeyboard\":\"Stlačením klávesu Enter umiestnite položku. Stlačením klávesu Esc zrušíte presúvanie.\",\"dropDescriptionTouch\":\"Dvojitým kliknutím umiestnite položku.\",\"dropDescriptionVirtual\":\"Kliknutím umiestnite položku.\",\"dropIndicator\":\"indikátor umiestnenia\",\"dropOnItem\":\"Umiestniť na položku {itemText}\",\"dropOnRoot\":\"Umiestniť na\",\"endDragKeyboard\":\"Prebieha presúvanie. Ak ho chcete zrušiť, stlačte kláves Enter.\",\"endDragTouch\":\"Prebieha presúvanie. Dvojitým kliknutím ho môžete zrušiť.\",\"endDragVirtual\":\"Prebieha presúvanie.\",\"insertAfter\":\"Vložiť za položku {itemText}\",\"insertBefore\":\"Vložiť pred položku {itemText}\",\"insertBetween\":\"Vložiť medzi položky {beforeItemText} a {afterItemText}\"}");
918
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/sl-SI.json
919
- var $b895c4fbc849f3dcfcdb2d8899ed32b4$exports = {};
920
- $b895c4fbc849f3dcfcdb2d8899ed32b4$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Pritisnite tipko Enter za začetek vlečenja.\",\"dragDescriptionTouch\":\"Dvotapnite za začetek vlečenja.\",\"dragDescriptionVirtual\":\"Kliknite za začetek vlečenja.\",\"dragItem\":\"Povleci {itemText}\",\"dragSelectedItems\":\"Povlecite {count, plural, one {# izbran element} other {izbrane elemente (#)}}\",\"dragStartedKeyboard\":\"Vlečenje se je začelo. Pritisnite tipko Tab za pomik na mesto, kamor želite spustiti elemente, in pritisnite tipko Enter, da jih spustite, ali tipko Escape, da prekličete postopek.\",\"dragStartedTouch\":\"Vlečenje se je začelo. Pomaknite se na mesto, kamor želite spustiti elemente, in dvotapnite, da jih spustite.\",\"dragStartedVirtual\":\"Vlečenje se je začelo. Pomaknite se na mesto, kamor želite spustiti elemente, in kliknite ali pritisnite tipko Enter, da jih spustite.\",\"dropCanceled\":\"Spust je preklican.\",\"dropComplete\":\"Spust je končan.\",\"dropDescriptionKeyboard\":\"Pritisnite tipko Enter, da spustite. Pritisnite tipko Escape, da prekličete vlečenje.\",\"dropDescriptionTouch\":\"Dvotapnite, da spustite.\",\"dropDescriptionVirtual\":\"Kliknite, da spustite.\",\"dropIndicator\":\"indikator spusta\",\"dropOnItem\":\"Spusti na mesto {itemText}\",\"dropOnRoot\":\"Spusti na mesto\",\"endDragKeyboard\":\"Vlečenje. Pritisnite tipko Enter za preklic vlečenja.\",\"endDragTouch\":\"Vlečenje. Dvotapnite za preklic vlečenja.\",\"endDragVirtual\":\"Vlečenje. Kliknite, da prekličete vlečenje.\",\"insertAfter\":\"Vstavi za {itemText}\",\"insertBefore\":\"Vstavi pred {itemText}\",\"insertBetween\":\"Vstavi med {beforeItemText} in {afterItemText}\"}");
921
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/sr-SP.json
922
- var $b75ddb34dcfa290a634852a820c90c5$exports = {};
923
- $b75ddb34dcfa290a634852a820c90c5$exports = JSON.parse("{\"dragItem\":\"Prevucite {itemText}\",\"dragSelectedItems\":\"Prevucite {count, plural, one {# izabranu stavku} other {# izabrane stavke}}\",\"dragDescriptionKeyboard\":\"Pritisnite Enter da biste započeli prevlačenje..\",\"dragDescriptionTouch\":\"Dvaput dodirnite za otpuštanje.\",\"dragDescriptionVirtual\":\"Kliknite da biste započeli prevlačenje.\",\"dragStartedKeyboard\":\"Prevlačenje je započeto. Pritisnite Tab da biste otišli do cilja za otpuštanje, zatim pritisnite Enter za ispuštanje ili pritisnite Escape za otkazivanje.\",\"dragStartedTouch\":\"Prevlačenje je započeto. Idite do cilja za otpuštanje, a zatim dvaput dodirnite za otpuštanje.\",\"dragStartedVirtual\":\"Prevlačenje je započeto. Idite do cilja za otpuštanje, a zatim kliknite ili pritinite Enter za otpuštanje.\",\"endDragKeyboard\":\"Prevlačenje u toku. Pritisnite Enter da biste otkazali prevlačenje.\",\"endDragTouch\":\"Prevlačenje u toku. Dvaput dodirnite da biste otkazali prevlačenje.\",\"endDragVirtual\":\"Prevlačenje u toku. Kliknite da biste otkazali prevlačenje.\",\"dropDescriptionKeyboard\":\"Pritisnite Enter da biste otpustili. Pritisnite Escape da biste otkazali prevlačenje.\",\"dropDescriptionTouch\":\"Dvaput dodirnite za otpuštanje.\",\"dropDescriptionVirtual\":\"Kliknite za otpuštanje.\",\"dropCanceled\":\"Otpuštanje je otkazano.\",\"dropComplete\":\"Prevlačenje je završeno.\",\"dropIndicator\":\"Indikator otpuštanja\",\"dropOnRoot\":\"Otpusti na\",\"dropOnItem\":\"Otpusti na {itemText}\",\"insertBefore\":\"Umetnite ispred {itemText}\",\"insertBetween\":\"Umetnite između {beforeItemText} i {afterItemText}\",\"insertAfter\":\"Umetnite posle {itemText}\"}");
924
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/sv-SE.json
925
- var $f010cb5a3a37b4733a80a1d1f871$exports = {};
926
- $f010cb5a3a37b4733a80a1d1f871$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Tryck på enter för att börja dra.\",\"dragDescriptionTouch\":\"Dubbeltryck för att börja dra.\",\"dragDescriptionVirtual\":\"Klicka för att börja dra.\",\"dragItem\":\"Dra {itemText}\",\"dragSelectedItems\":\"Dra {count, plural, one {# valt objekt} other {# valda objekt}}\",\"dragStartedKeyboard\":\"Börja dra. Tryck på tabb för att navigera till målet, tryck på enter för att släppa eller på escape för att avbryta.\",\"dragStartedTouch\":\"Börja dra. Navigera till ett mål och dubbeltryck för att släppa.\",\"dragStartedVirtual\":\"Börja dra. Navigera till ett mål och klicka eller tryck på enter för att släppa.\",\"dropCanceled\":\"Släppåtgärd avbröts.\",\"dropComplete\":\"Släppåtgärd klar.\",\"dropDescriptionKeyboard\":\"Tryck på enter för att släppa. Tryck på escape för att avbryta dragåtgärd.\",\"dropDescriptionTouch\":\"Dubbeltryck för att släppa.\",\"dropDescriptionVirtual\":\"Klicka för att släppa.\",\"dropIndicator\":\"släppindikator\",\"dropOnItem\":\"Släpp på {itemText}\",\"dropOnRoot\":\"Släpp på\",\"endDragKeyboard\":\"Drar. Tryck på enter för att avbryta dragåtgärd.\",\"endDragTouch\":\"Drar. Dubbeltryck för att avbryta dragåtgärd.\",\"endDragVirtual\":\"Drar. Klicka för att avbryta dragåtgärd.\",\"insertAfter\":\"Infoga efter {itemText}\",\"insertBefore\":\"Infoga före {itemText}\",\"insertBetween\":\"Infoga mellan {beforeItemText} och {afterItemText}\"}");
927
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/tr-TR.json
928
- var $a8e9337c82319ec72dd3b41245c71e1e$exports = {};
929
- $a8e9337c82319ec72dd3b41245c71e1e$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Sürüklemeyi başlatmak için Enter'a basın.\",\"dragDescriptionTouch\":\"Sürüklemeyi başlatmak için çift tıklayın.\",\"dragDescriptionVirtual\":\"Sürüklemeyi başlatmak için tıklayın.\",\"dragItem\":\"{itemText}’i sürükle\",\"dragSelectedItems\":\"Sürükle {count, plural, one {# seçili öge} other {# seçili öge}}\",\"dragStartedKeyboard\":\"Sürükleme başlatıldı. Bir bırakma hedefine gitmek için Tab’a basın, ardından bırakmak için Enter’a basın veya iptal etmek için Escape’e basın.\",\"dragStartedTouch\":\"Sürükleme başlatıldı. Bir bırakma hedefine gidin, ardından bırakmak için çift tıklayın.\",\"dragStartedVirtual\":\"Sürükleme başlatıldı. Bir bırakma hedefine gidin, ardından bırakmak için Enter’a tıklayın veya basın.\",\"dropCanceled\":\"Bırakma iptal edildi.\",\"dropComplete\":\"Bırakma tamamlandı.\",\"dropDescriptionKeyboard\":\"Bırakmak için Enter'a basın. Sürüklemeyi iptal etmek için Escape'e basın.\",\"dropDescriptionTouch\":\"Bırakmak için çift tıklayın.\",\"dropDescriptionVirtual\":\"Bırakmak için tıklayın.\",\"dropIndicator\":\"bırakma göstergesi\",\"dropOnItem\":\"{itemText} üzerine bırak\",\"dropOnRoot\":\"Bırakın\",\"endDragKeyboard\":\"Sürükleme. Sürüklemeyi iptal etmek için Enter'a basın.\",\"endDragTouch\":\"Sürükleme. Sürüklemeyi iptal etmek için çift tıklayın.\",\"endDragVirtual\":\"Sürükleme. Sürüklemeyi iptal etmek için tıklayın.\",\"insertAfter\":\"{itemText}’den sonra gir\",\"insertBefore\":\"{itemText}’den önce gir\",\"insertBetween\":\"{beforeItemText} ve {afterItemText} arasına gir\"}");
930
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/uk-UA.json
931
- var $e74f5b955cc9ed1ca9994fc3460$exports = {};
932
- $e74f5b955cc9ed1ca9994fc3460$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Натисніть Enter, щоб почати перетягування.\",\"dragDescriptionTouch\":\"Натисніть двічі, щоб почати перетягування.\",\"dragDescriptionVirtual\":\"Натисніть, щоб почати перетягування.\",\"dragItem\":\"Перетягнути {itemText}\",\"dragSelectedItems\":\"Перетягніть {count, plural, one {# вибраний елемент} other {# вибраних елем}}\",\"dragStartedKeyboard\":\"Перетягування почалося. Натисніть Tab, щоб перейти до цілі перетягування, потім натисніть Enter, щоб перетягнути, або Escape, щоб скасувати.\",\"dragStartedTouch\":\"Перетягування почалося. Перейдіть до цілі перетягування, потім натисніть двічі, щоб перетягнути.\",\"dragStartedVirtual\":\"Перетягування почалося. Перейдіть до цілі перетягування, потім натисніть Enter, щоб перетягнути.\",\"dropCanceled\":\"Перетягування скасовано.\",\"dropComplete\":\"Перетягування завершено.\",\"dropDescriptionKeyboard\":\"Натисніть Enter, щоб перетягнути. Натисніть Escape, щоб скасувати перетягування.\",\"dropDescriptionTouch\":\"Натисніть двічі, щоб перетягнути.\",\"dropDescriptionVirtual\":\"Натисніть, щоб перетягнути.\",\"dropIndicator\":\"індикатор перетягування\",\"dropOnItem\":\"Перетягнути на {itemText}\",\"dropOnRoot\":\"Перетягнути на\",\"endDragKeyboard\":\"Триває перетягування. Натисніть Enter, щоб скасувати перетягування.\",\"endDragTouch\":\"Триває перетягування. Натисніть двічі, щоб скасувати перетягування.\",\"endDragVirtual\":\"Триває перетягування. Натисніть, щоб скасувати перетягування.\",\"insertAfter\":\"Вставити після {itemText}\",\"insertBefore\":\"Вставити перед {itemText}\",\"insertBetween\":\"Вставити між {beforeItemText} і {afterItemText}\"}");
933
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/zh-CN.json
934
- var $b007023265925d07a3d47c3d12f09c5$exports = {};
935
- $b007023265925d07a3d47c3d12f09c5$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"按 Enter 开始拖动。\",\"dragDescriptionTouch\":\"双击开始拖动。\",\"dragDescriptionVirtual\":\"单击开始拖动。\",\"dragItem\":\"拖动 {itemText}\",\"dragSelectedItems\":\"拖动 {count, plural, one {# 选中项目} other {# 选中项目}}\",\"dragStartedKeyboard\":\"已开始拖动。按 Tab 导航到放置目标,然后按 Enter 放置或按 Escape 取消。\",\"dragStartedTouch\":\"已开始拖动。导航到放置目标,然后双击放置。\",\"dragStartedVirtual\":\"已开始拖动。导航到放置目标,然后单击或按 Enter 放置。\",\"dropCanceled\":\"放置已取消。\",\"dropComplete\":\"放置已完成。\",\"dropDescriptionKeyboard\":\"按 Enter 放置。按 Escape 取消拖动。\",\"dropDescriptionTouch\":\"双击放置。\",\"dropDescriptionVirtual\":\"单击放置。\",\"dropIndicator\":\"放置标记\",\"dropOnItem\":\"放置于 {itemText}\",\"dropOnRoot\":\"放置于\",\"endDragKeyboard\":\"正在拖动。按 Enter 取消拖动。\",\"endDragTouch\":\"正在拖动。双击取消拖动。\",\"endDragVirtual\":\"正在拖动。单击取消拖动。\",\"insertAfter\":\"插入到 {itemText} 之后\",\"insertBefore\":\"插入到 {itemText} 之前\",\"insertBetween\":\"插入到 {beforeItemText} 和 {afterItemText} 之间\"}");
936
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/zh-TW.json
937
- var $f4995277bc73b497cd1257981bc3$exports = {};
938
- $f4995277bc73b497cd1257981bc3$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"按 Enter 鍵以開始拖曳。\",\"dragDescriptionTouch\":\"輕點兩下以開始拖曳。\",\"dragDescriptionVirtual\":\"按一下滑鼠以開始拖曳。\",\"dragItem\":\"拖曳「{itemText}」\",\"dragSelectedItems\":\"拖曳 {count, plural, one {# 個選定項目} other {# 個選定項目}}\",\"dragStartedKeyboard\":\"已開始拖曳。按 Tab 鍵以瀏覽至放置目標,然後按 Enter 鍵以放置,或按 Escape 鍵以取消。\",\"dragStartedTouch\":\"已開始拖曳。瀏覽至放置目標,然後輕點兩下以放置。\",\"dragStartedVirtual\":\"已開始拖曳。瀏覽至放置目標,然後按一下滑鼠或按 Enter 鍵以放置。\",\"dropCanceled\":\"放置已取消。\",\"dropComplete\":\"放置已完成。\",\"dropDescriptionKeyboard\":\"按 Enter 鍵以放置。按 Escape 鍵以取消拖曳。\",\"dropDescriptionTouch\":\"輕點兩下以放置。\",\"dropDescriptionVirtual\":\"按一下滑鼠以放置。\",\"dropIndicator\":\"放置指示器\",\"dropOnItem\":\"放置在「{itemText}」上\",\"dropOnRoot\":\"放置在\",\"endDragKeyboard\":\"拖曳中。按 Enter 鍵以取消拖曳。\",\"endDragTouch\":\"拖曳中。輕點兩下以取消拖曳。\",\"endDragVirtual\":\"拖曳中。按一下滑鼠以取消拖曳。\",\"insertAfter\":\"插入至「{itemText}」之後\",\"insertBefore\":\"插入至「{itemText}」之前\",\"insertBetween\":\"插入至「{beforeItemText}」和「{afterItemText}」之間\"}");
939
- // @ts-ignore
940
- const $f99d7f1872611f5fbbb2d18deb9a89$var$intlMessages = {
941
- "ar-AE": _babelRuntimeHelpersEsmInteropRequireDefault($ea65b45ad5e7d0aed23c128bf8ad1ea2$exports).default,
942
- "bg-BG": _babelRuntimeHelpersEsmInteropRequireDefault($c92ee777c2aef6235da0efaaab60dc61$exports).default,
943
- "cs-CZ": _babelRuntimeHelpersEsmInteropRequireDefault($c9e276469924972853a3320763f673d$exports).default,
944
- "da-DK": _babelRuntimeHelpersEsmInteropRequireDefault($b0325b2aec14df95ab943ec14d3bec3b$exports).default,
945
- "de-DE": _babelRuntimeHelpersEsmInteropRequireDefault($f367814043f59b69a839ff097fd4adb8$exports).default,
946
- "el-GR": _babelRuntimeHelpersEsmInteropRequireDefault($fe8897a7011951cab52f7814c2c9684$exports).default,
947
- "en-US": _babelRuntimeHelpersEsmInteropRequireDefault($aea68b9c3ace3526527e1fc930d35d$exports).default,
948
- "es-ES": _babelRuntimeHelpersEsmInteropRequireDefault($a4319d93c8291b23c0d42dea$exports).default,
949
- "et-EE": _babelRuntimeHelpersEsmInteropRequireDefault($aa30228da98b6306a72b40036f345b$exports).default,
950
- "fi-FI": _babelRuntimeHelpersEsmInteropRequireDefault($a5a5afea8782a33461a527d7c4a$exports).default,
951
- "fr-FR": _babelRuntimeHelpersEsmInteropRequireDefault($b32fceb28c2b8e8e846140594714351f$exports).default,
952
- "he-IL": _babelRuntimeHelpersEsmInteropRequireDefault($d9bdb7d78ee35d20ae60007d2accaf5$exports).default,
953
- "hr-HR": _babelRuntimeHelpersEsmInteropRequireDefault($c14894ae7d558e9dc3011ecae5f8a96b$exports).default,
954
- "hu-HU": _babelRuntimeHelpersEsmInteropRequireDefault($f194e25a9c86722f6a3826e7ad96c717$exports).default,
955
- "it-IT": _babelRuntimeHelpersEsmInteropRequireDefault($cae04c9878c1e24b1bce5348e54e95a4$exports).default,
956
- "ja-JP": _babelRuntimeHelpersEsmInteropRequireDefault($b9679eb29e949e5727cbdcf506da08c1$exports).default,
957
- "ko-KR": _babelRuntimeHelpersEsmInteropRequireDefault($c663d68cc7455025fffd92332e200be$exports).default,
958
- "lt-LT": _babelRuntimeHelpersEsmInteropRequireDefault($d454665d97cf724871a9c3eb05$exports).default,
959
- "lv-LV": _babelRuntimeHelpersEsmInteropRequireDefault($ca66a3bcdd44dae4665871a98bb416e3$exports).default,
960
- "nb-NO": _babelRuntimeHelpersEsmInteropRequireDefault($cb7e072c8b2f7c15a7e06a7ac99163$exports).default,
961
- "nl-NL": _babelRuntimeHelpersEsmInteropRequireDefault($f9d8bf1245c4a4f581c7966119af7c$exports).default,
962
- "pl-PL": _babelRuntimeHelpersEsmInteropRequireDefault($cd07a56ec0cb160ba15542c10691829d$exports).default,
963
- "pt-BR": _babelRuntimeHelpersEsmInteropRequireDefault($a70fe1fa67e039d2646076dfb78cee1$exports).default,
964
- "pt-PT": _babelRuntimeHelpersEsmInteropRequireDefault($e37cb9bf759f35580e0f57d85e98be4b$exports).default,
965
- "ro-RO": _babelRuntimeHelpersEsmInteropRequireDefault($f4cf63884707eedcbdf4eae0b61ef1bf$exports).default,
966
- "ru-RU": _babelRuntimeHelpersEsmInteropRequireDefault($e2321eb9f531b07389bd6bfcdd631256$exports).default,
967
- "sk-SK": _babelRuntimeHelpersEsmInteropRequireDefault($ef19e5833adeee78e3c34d0f68fa9f31$exports).default,
968
- "sl-SI": _babelRuntimeHelpersEsmInteropRequireDefault($b895c4fbc849f3dcfcdb2d8899ed32b4$exports).default,
969
- "sr-SP": _babelRuntimeHelpersEsmInteropRequireDefault($b75ddb34dcfa290a634852a820c90c5$exports).default,
970
- "sv-SE": _babelRuntimeHelpersEsmInteropRequireDefault($f010cb5a3a37b4733a80a1d1f871$exports).default,
971
- "tr-TR": _babelRuntimeHelpersEsmInteropRequireDefault($a8e9337c82319ec72dd3b41245c71e1e$exports).default,
972
- "uk-UA": _babelRuntimeHelpersEsmInteropRequireDefault($e74f5b955cc9ed1ca9994fc3460$exports).default,
973
- "zh-CN": _babelRuntimeHelpersEsmInteropRequireDefault($b007023265925d07a3d47c3d12f09c5$exports).default,
974
- "zh-TW": _babelRuntimeHelpersEsmInteropRequireDefault($f4995277bc73b497cd1257981bc3$exports).default
975
- };
976
- const $f99d7f1872611f5fbbb2d18deb9a89$var$MESSAGES = {
977
- keyboard: {
978
- start: 'dragDescriptionKeyboard',
979
- end: 'endDragKeyboard'
980
- },
981
- touch: {
982
- start: 'dragDescriptionTouch',
983
- end: 'endDragTouch'
984
- },
985
- virtual: {
986
- start: 'dragDescriptionVirtual',
987
- end: 'endDragVirtual'
988
- }
989
- };
990
- export function useDrag(options) {
991
- let formatMessage = useMessageFormatter($f99d7f1872611f5fbbb2d18deb9a89$var$intlMessages);
992
- let state = useRef({
993
- options,
994
- x: 0,
995
- y: 0
996
- }).current;
997
- state.options = options;
998
- let [isDragging, setDragging] = useState(false);
999
-
1000
- let onDragStart = e => {
1001
- let items = options.getItems();
1002
- $daf765036c8e081b3420fc4f613ad96$export$writeToDataTransfer(e.dataTransfer, items);
1003
-
1004
- if (typeof options.getAllowedDropOperations === 'function') {
1005
- let allowedOperations = options.getAllowedDropOperations();
1006
- let allowed = $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION.none;
1007
-
1008
- for (let operation of allowedOperations) {
1009
- allowed |= $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION[operation] || $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION.none;
1010
- }
1011
-
1012
- e.dataTransfer.effectAllowed = $cd2dc9b4103e6936caca05e2d05$export$EFFECT_ALLOWED[allowed] || 'none';
1013
- } // If there is a renderPreview function, use it to render a custom preview image that will
1014
- // appear under the pointer while dragging. If not, the element itself is dragged by the browser.
1015
-
1016
-
1017
- if (typeof options.renderPreview === 'function') {
1018
- let preview = options.renderPreview(items);
1019
-
1020
- if (preview) {
1021
- // Create an off-screen div to render the preview into.
1022
- let node = document.createElement('div');
1023
- node.style.zIndex = '-100';
1024
- node.style.position = 'absolute';
1025
- node.style.top = '0';
1026
- node.style.left = '-100000px';
1027
- document.body.appendChild(node); // Call renderPreview to get a JSX element, and render it into the div with React DOM.
1028
-
1029
- _reactDom.render(preview, node); // Compute the offset that the preview will appear under the mouse.
1030
- // If possible, this is based on the point the user clicked on the target.
1031
- // If the preview is much smaller, then just use the center point of the preview.
1032
-
1033
-
1034
- let size = node.getBoundingClientRect();
1035
- let rect = e.currentTarget.getBoundingClientRect();
1036
- let x = e.clientX - rect.x;
1037
- let y = e.clientY - rect.y;
1038
-
1039
- if (x > size.width || y > size.height) {
1040
- x = size.width / 2;
1041
- y = size.height / 2;
1042
- }
677
+ var $1cb9a6b961974e20$exports = {};
678
+ $1cb9a6b961974e20$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Paspauskite „Enter“, kad pradėtumėte vilkti.\",\"dragDescriptionTouch\":\"Palieskite dukart, kad pradėtumėte vilkti.\",\"dragDescriptionVirtual\":\"Spustelėkite, kad pradėtumėte vilkti.\",\"dragItem\":\"Vilkti {itemText}\",\"dragSelectedItems\":\"Vilkti {count, plural, one {# pasirinktą elementą} other {# pasirinktus elementus}}\",\"dragStartedKeyboard\":\"Pradėta vilkti. Paspauskite „Tab“, kad pereitumėte į tiesioginę paskirties vietą, tada paspauskite „Enter“, kad numestumėte, arba „Escape“, kad atšauktumėte.\",\"dragStartedTouch\":\"Pradėta vilkti. Eikite į tiesioginę paskirties vietą, tada palieskite dukart, kad numestumėte.\",\"dragStartedVirtual\":\"Pradėta vilkti. Eikite į tiesioginę paskirties vietą ir spustelėkite arba paspauskite „Enter“, kad numestumėte.\",\"dropCanceled\":\"Numetimas atšauktas.\",\"dropComplete\":\"Numesta.\",\"dropDescriptionKeyboard\":\"Paspauskite „Enter“, kad numestumėte. Paspauskite „Escape“, kad atšauktumėte vilkimą.\",\"dropDescriptionTouch\":\"Palieskite dukart, kad numestumėte.\",\"dropDescriptionVirtual\":\"Spustelėkite, kad numestumėte.\",\"dropIndicator\":\"numetimo indikatorius\",\"dropOnItem\":\"Numesti ant {itemText}\",\"dropOnRoot\":\"Numesti ant\",\"endDragKeyboard\":\"Velkama. Paspauskite „Enter“, kad atšauktumėte vilkimą.\",\"endDragTouch\":\"Velkama. Spustelėkite dukart, kad atšauktumėte vilkimą.\",\"endDragVirtual\":\"Velkama. Spustelėkite, kad atšauktumėte vilkimą.\",\"insertAfter\":\"Įterpti po {itemText}\",\"insertBefore\":\"Įterpti prieš {itemText}\",\"insertBetween\":\"Įterpti tarp {beforeItemText} ir {afterItemText}\"}");
1043
679
 
1044
- e.dataTransfer.setDragImage(node, x, y); // Remove the preview from the DOM after a frame so the browser has time to paint.
1045
680
 
1046
- requestAnimationFrame(() => {
1047
- document.body.removeChild(node);
1048
- });
1049
- }
1050
- }
681
+ var $eb24e849f46b3b29$exports = {};
682
+ $eb24e849f46b3b29$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Nospiediet Enter, lai sāktu vilkšanu.\",\"dragDescriptionTouch\":\"Veiciet dubultskārienu, lai sāktu vilkšanu.\",\"dragDescriptionVirtual\":\"Noklikšķiniet, lai sāktu vilkšanu.\",\"dragItem\":\"Velciet {itemText}\",\"dragSelectedItems\":\"Velciet {count, plural, one {# atlasīto vienumu} other {# atlasītos vienumus}}\",\"dragStartedKeyboard\":\"Uzsākta vilkšana. Nospiediet taustiņu Tab, lai pārietu uz nomešanas mērķi, pēc tam nospiediet Enter, lai nomestu, vai nospiediet Escape, lai atceltu.\",\"dragStartedTouch\":\"Uzsākta vilkšana. Pārejiet uz nomešanas mērķi, pēc tam veiciet dubultskārienu, lai nomestu.\",\"dragStartedVirtual\":\"Uzsākta vilkšana. Pārejiet uz nomešanas mērķi, pēc tam nospiediet Enter, lai nomestu.\",\"dropCanceled\":\"Nomešana atcelta.\",\"dropComplete\":\"Nomešana pabeigta.\",\"dropDescriptionKeyboard\":\"Nospiediet Enter, lai nomestu. Nospiediet Escape, lai atceltu vilkšanu.\",\"dropDescriptionTouch\":\"Veiciet dubultskārienu, lai nomestu.\",\"dropDescriptionVirtual\":\"Noklikšķiniet, lai nomestu.\",\"dropIndicator\":\"nomešanas indikators\",\"dropOnItem\":\"Nometiet uz {itemText}\",\"dropOnRoot\":\"Nometiet uz\",\"endDragKeyboard\":\"Notiek vilkšana. Nospiediet Enter, lai atceltu vilkšanu.\",\"endDragTouch\":\"Notiek vilkšana. Veiciet dubultskārienu, lai atceltu vilkšanu.\",\"endDragVirtual\":\"Notiek vilkšana. Noklikšķiniet, lai atceltu vilkšanu.\",\"insertAfter\":\"Ievietojiet pēc {itemText}\",\"insertBefore\":\"Ievietojiet pirms {itemText}\",\"insertBetween\":\"Ievietojiet starp {beforeItemText} un {afterItemText}\"}");
1051
683
 
1052
- if (typeof options.onDragStart === 'function') {
1053
- options.onDragStart({
1054
- type: 'dragstart',
1055
- x: e.clientX,
1056
- y: e.clientY
1057
- });
1058
- }
1059
684
 
1060
- state.x = e.clientX;
1061
- state.y = e.clientY; // Wait a frame before we set dragging to true so that the browser has time to
1062
- // render the preview image before we update the element that has been dragged.
685
+ var $c6c9c2c3709eb556$exports = {};
686
+ $c6c9c2c3709eb556$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Trykk Enter for å begynne å dra.\",\"dragDescriptionTouch\":\"Dobbelttrykk for å begynne å dra.\",\"dragDescriptionVirtual\":\"Klikk for å begynne å dra.\",\"dragItem\":\"Dra {itemText}\",\"dragSelectedItems\":\"Dra {count, plural, one {# merket element} other {# merkede elementer}}\",\"dragStartedKeyboard\":\"Begynte å dra. Trykk på Tab for å navigere til et mål, og trykk deretter på Enter for å slippe eller på Esc for å avbryte.\",\"dragStartedTouch\":\"Begynte å dra. Naviger til et mål, og dobbelttrykk for å slippe.\",\"dragStartedVirtual\":\"Begynte å dra. Naviger til et mål, og klikk eller trykk på Enter for å slippe.\",\"dropCanceled\":\"Avbrøt slipping.\",\"dropComplete\":\"Slippingen er fullført.\",\"dropDescriptionKeyboard\":\"Trykk på Enter for å slippe. Trykk på Esc hvis du vil avbryte draingen.\",\"dropDescriptionTouch\":\"Dobbelttrykk for å slippe.\",\"dropDescriptionVirtual\":\"Klikk for å slippe.\",\"dropIndicator\":\"slippeindikator\",\"dropOnItem\":\"Slipp på {itemText}\",\"dropOnRoot\":\"Slipp på\",\"endDragKeyboard\":\"Drar. Trykk på Enter hvis du vil avbryte.\",\"endDragTouch\":\"Drar. Dobbelttrykk hvis du vil avbryte.\",\"endDragVirtual\":\"Drar. Klikk hvis du vil avbryte.\",\"insertAfter\":\"Sett inn etter {itemText}\",\"insertBefore\":\"Sett inn før {itemText}\",\"insertBetween\":\"Sett inn mellom {beforeItemText} og {afterItemText}\"}");
1063
687
 
1064
- requestAnimationFrame(() => {
1065
- setDragging(true);
1066
- });
1067
- };
1068
688
 
1069
- let onDrag = e => {
1070
- if (e.clientX === state.x && e.clientY === state.y) {
1071
- return;
1072
- }
689
+ var $ee6013090ec94b17$exports = {};
690
+ $ee6013090ec94b17$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Druk op Enter om te slepen.\",\"dragDescriptionTouch\":\"Dubbeltik om te slepen.\",\"dragDescriptionVirtual\":\"Klik om met slepen te starten.\",\"dragItem\":\"{itemText} slepen\",\"dragSelectedItems\":\"{count, plural, one {# geselecteerd item} other {# geselecteerde items}} slepen\",\"dragStartedKeyboard\":\"Begonnen met slepen. Druk op Tab om naar een locatie te gaan. Druk dan op Enter om neer te zetten, of op Esc om te annuleren.\",\"dragStartedTouch\":\"Begonnen met slepen. Ga naar de gewenste locatie en dubbeltik om neer te zetten.\",\"dragStartedVirtual\":\"Begonnen met slepen. Ga naar de gewenste locatie en klik of druk op Enter om neer te zetten.\",\"dropCanceled\":\"Neerzetten geannuleerd.\",\"dropComplete\":\"Neerzetten voltooid.\",\"dropDescriptionKeyboard\":\"Druk op Enter om neer te zetten. Druk op Esc om het slepen te annuleren.\",\"dropDescriptionTouch\":\"Dubbeltik om neer te zetten.\",\"dropDescriptionVirtual\":\"Klik om neer te zetten.\",\"dropIndicator\":\"aanwijzer voor neerzetten\",\"dropOnItem\":\"Neerzetten op {itemText}\",\"dropOnRoot\":\"Neerzetten op\",\"endDragKeyboard\":\"Bezig met slepen. Druk op Enter om te annuleren.\",\"endDragTouch\":\"Bezig met slepen. Dubbeltik om te annuleren.\",\"endDragVirtual\":\"Bezig met slepen. Klik om te annuleren.\",\"insertAfter\":\"Plaatsen na {itemText}\",\"insertBefore\":\"Plaatsen vóór {itemText}\",\"insertBetween\":\"Plaatsen tussen {beforeItemText} en {afterItemText}\"}");
1073
691
 
1074
- if (typeof options.onDragMove === 'function') {
1075
- options.onDragMove({
1076
- type: 'dragmove',
1077
- x: e.clientX,
1078
- y: e.clientY
1079
- });
1080
- }
1081
692
 
1082
- state.x = e.clientX;
1083
- state.y = e.clientY;
1084
- };
1085
-
1086
- let onDragEnd = e => {
1087
- if (typeof options.onDragEnd === 'function') {
1088
- options.onDragEnd({
1089
- type: 'dragend',
1090
- x: e.clientX,
1091
- y: e.clientY,
1092
- dropOperation: $cd2dc9b4103e6936caca05e2d05$export$DROP_EFFECT_TO_DROP_OPERATION[e.dataTransfer.dropEffect]
1093
- });
1094
- }
693
+ var $5e774077b08841aa$exports = {};
694
+ $5e774077b08841aa$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Naciśnij Enter, aby rozpocząć przeciąganie.\",\"dragDescriptionTouch\":\"Dotknij dwukrotnie, aby rozpocząć przeciąganie.\",\"dragDescriptionVirtual\":\"Kliknij, aby rozpocząć przeciąganie.\",\"dragItem\":\"Przeciągnij {itemText}\",\"dragSelectedItems\":\"Przeciągnij {count, plural, one {# wybrany element} other {# wybranych elementów}}\",\"dragStartedKeyboard\":\"Rozpoczęto przeciąganie. Naciśnij Tab, aby wybrać miejsce docelowe, a następnie naciśnij Enter, aby upuścić, lub Escape, aby anulować.\",\"dragStartedTouch\":\"Rozpoczęto przeciąganie. Wybierz miejsce, w którym chcesz upuścić element, a następnie dotknij dwukrotnie, aby upuścić.F\",\"dragStartedVirtual\":\"Rozpoczęto przeciąganie. Wybierz miejsce, w którym chcesz upuścić element, a następnie kliknij lub naciśnij Enter, aby upuścić.\",\"dropCanceled\":\"Anulowano upuszczenie.\",\"dropComplete\":\"Zakończono upuszczanie.\",\"dropDescriptionKeyboard\":\"Naciśnij Enter, aby upuścić. Naciśnij Escape, aby anulować przeciągnięcie.\",\"dropDescriptionTouch\":\"Dotknij dwukrotnie, aby upuścić.\",\"dropDescriptionVirtual\":\"Kliknij, aby upuścić.\",\"dropIndicator\":\"wskaźnik upuszczenia\",\"dropOnItem\":\"Upuść na {itemText}\",\"dropOnRoot\":\"Upuść\",\"endDragKeyboard\":\"Przeciąganie. Naciśnij Enter, aby anulować przeciągnięcie.\",\"endDragTouch\":\"Przeciąganie. Kliknij dwukrotnie, aby anulować przeciągnięcie.\",\"endDragVirtual\":\"Przeciąganie. Kliknij, aby anulować przeciąganie.\",\"insertAfter\":\"Umieść za {itemText}\",\"insertBefore\":\"Umieść przed {itemText}\",\"insertBetween\":\"Umieść między {beforeItemText} i {afterItemText}\"}");
1095
695
 
1096
- setDragging(false);
1097
- };
1098
696
 
1099
- let onPress = e => {
1100
- if (e.pointerType !== 'keyboard' && e.pointerType !== 'virtual') {
1101
- return;
1102
- }
697
+ var $9ac756f6082c573d$exports = {};
698
+ $9ac756f6082c573d$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Pressione Enter para começar a arrastar.\",\"dragDescriptionTouch\":\"Toque duas vezes para começar a arrastar.\",\"dragDescriptionVirtual\":\"Clique para começar a arrastar.\",\"dragItem\":\"Arrastar {itemText}\",\"dragSelectedItems\":\"Arrastar {count, plural, one {# item selecionado} other {# itens selecionados}}\",\"dragStartedKeyboard\":\"Comece a arrastar. Pressione Tab para navegar até um alvo e, em seguida, pressione Enter para soltar ou pressione Escape para cancelar.\",\"dragStartedTouch\":\"Comece a arrastar. Navegue até um alvo e toque duas vezes para soltar.\",\"dragStartedVirtual\":\"Comece a arrastar. Navegue até um alvo e clique ou pressione Enter para soltar.\",\"dropCanceled\":\"Liberação cancelada.\",\"dropComplete\":\"Liberação concluída.\",\"dropDescriptionKeyboard\":\"Pressione Enter para soltar. Pressione Escape para cancelar.\",\"dropDescriptionTouch\":\"Toque duas vezes para soltar.\",\"dropDescriptionVirtual\":\"Clique para soltar.\",\"dropIndicator\":\"indicador de liberação\",\"dropOnItem\":\"Soltar em {itemText}\",\"dropOnRoot\":\"Soltar\",\"endDragKeyboard\":\"Arrastando. Pressione Enter para cancelar.\",\"endDragTouch\":\"Arrastando. Toque duas vezes para cancelar.\",\"endDragVirtual\":\"Arrastando. Clique para cancelar.\",\"insertAfter\":\"Inserir após {itemText}\",\"insertBefore\":\"Inserir antes de {itemText}\",\"insertBetween\":\"Inserir entre {beforeItemText} e {afterItemText}\"}");
1103
699
 
1104
- if (typeof state.options.onDragStart === 'function') {
1105
- let rect = e.target.getBoundingClientRect();
1106
- state.options.onDragStart({
1107
- type: 'dragstart',
1108
- x: rect.x + rect.width / 2,
1109
- y: rect.y + rect.height / 2
1110
- });
1111
- }
1112
700
 
1113
- $f2f44a26f7541d104d10e68c115a897a$export$beginDragging({
1114
- element: e.target,
1115
- items: state.options.getItems(),
1116
- allowedDropOperations: typeof state.options.getAllowedDropOperations === 'function' ? state.options.getAllowedDropOperations() : ['move', 'copy', 'link'],
701
+ var $d0200f21f7dbe795$exports = {};
702
+ $d0200f21f7dbe795$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Prima Enter para iniciar o arrasto.\",\"dragDescriptionTouch\":\"Faça duplo toque para começar a arrastar.\",\"dragDescriptionVirtual\":\"Clique para iniciar o arrasto.\",\"dragItem\":\"Arrastar {itemText}\",\"dragSelectedItems\":\"Arrastar {count, plural, one {# item selecionado} outro {# itens selecionados}}\",\"dragStartedKeyboard\":\"Arrasto iniciado. Prima a tecla de tabulação para navegar para um destino para largar, e em seguida prima Enter para largar ou prima Escape para cancelar.\",\"dragStartedTouch\":\"Arrasto iniciado. Navegue para um destino para largar, e em seguida faça duplo toque para largar.\",\"dragStartedVirtual\":\"Arrasto iniciado. Navegue para um destino para largar, e em seguida clique ou prima Enter para largar.\",\"dropCanceled\":\"Largar cancelado.\",\"dropComplete\":\"Largar completo.\",\"dropDescriptionKeyboard\":\"Prima Enter para largar. Prima Escape para cancelar o arrasto.\",\"dropDescriptionTouch\":\"Faça duplo toque para largar.\",\"dropDescriptionVirtual\":\"Clique para largar.\",\"dropIndicator\":\"Indicador de largar\",\"dropOnItem\":\"Largar em {itemText}\",\"dropOnRoot\":\"Largar em\",\"endDragKeyboard\":\"A arrastar. Prima Enter para cancelar o arrasto.\",\"endDragTouch\":\"A arrastar. Faça duplo toque para cancelar o arrasto.\",\"endDragVirtual\":\"A arrastar. Clique para cancelar o arrasto.\",\"insertAfter\":\"Inserir depois de {itemText}\",\"insertBefore\":\"Inserir antes de {itemText}\",\"insertBetween\":\"Inserir entre {beforeItemText} e {afterItemText}\"}");
1117
703
 
1118
- onDragEnd(e) {
1119
- setDragging(false);
1120
704
 
1121
- if (typeof state.options.onDragEnd === 'function') {
1122
- state.options.onDragEnd(e);
1123
- }
1124
- }
1125
-
1126
- }, formatMessage);
1127
- setDragging(true);
1128
- };
1129
-
1130
- let modality = $daf765036c8e081b3420fc4f613ad96$export$useDragModality();
1131
- let descriptionProps = useDescription(formatMessage(!isDragging ? $f99d7f1872611f5fbbb2d18deb9a89$var$MESSAGES[modality].start : $f99d7f1872611f5fbbb2d18deb9a89$var$MESSAGES[modality].end));
1132
- return {
1133
- dragProps: {
1134
- draggable: 'true',
1135
- onDragStart,
1136
- onDrag,
1137
- onDragEnd
1138
- },
1139
- dragButtonProps: _babelRuntimeHelpersEsmExtends({}, descriptionProps, {
1140
- onPress
1141
- }),
1142
- isDragging
1143
- };
1144
- }
1145
- // @ts-ignore
1146
- const $c50618638a6eda91cf58d6698d439d4$var$intlMessages = {
1147
- "ar-AE": _babelRuntimeHelpersEsmInteropRequireDefault($ea65b45ad5e7d0aed23c128bf8ad1ea2$exports).default,
1148
- "bg-BG": _babelRuntimeHelpersEsmInteropRequireDefault($c92ee777c2aef6235da0efaaab60dc61$exports).default,
1149
- "cs-CZ": _babelRuntimeHelpersEsmInteropRequireDefault($c9e276469924972853a3320763f673d$exports).default,
1150
- "da-DK": _babelRuntimeHelpersEsmInteropRequireDefault($b0325b2aec14df95ab943ec14d3bec3b$exports).default,
1151
- "de-DE": _babelRuntimeHelpersEsmInteropRequireDefault($f367814043f59b69a839ff097fd4adb8$exports).default,
1152
- "el-GR": _babelRuntimeHelpersEsmInteropRequireDefault($fe8897a7011951cab52f7814c2c9684$exports).default,
1153
- "en-US": _babelRuntimeHelpersEsmInteropRequireDefault($aea68b9c3ace3526527e1fc930d35d$exports).default,
1154
- "es-ES": _babelRuntimeHelpersEsmInteropRequireDefault($a4319d93c8291b23c0d42dea$exports).default,
1155
- "et-EE": _babelRuntimeHelpersEsmInteropRequireDefault($aa30228da98b6306a72b40036f345b$exports).default,
1156
- "fi-FI": _babelRuntimeHelpersEsmInteropRequireDefault($a5a5afea8782a33461a527d7c4a$exports).default,
1157
- "fr-FR": _babelRuntimeHelpersEsmInteropRequireDefault($b32fceb28c2b8e8e846140594714351f$exports).default,
1158
- "he-IL": _babelRuntimeHelpersEsmInteropRequireDefault($d9bdb7d78ee35d20ae60007d2accaf5$exports).default,
1159
- "hr-HR": _babelRuntimeHelpersEsmInteropRequireDefault($c14894ae7d558e9dc3011ecae5f8a96b$exports).default,
1160
- "hu-HU": _babelRuntimeHelpersEsmInteropRequireDefault($f194e25a9c86722f6a3826e7ad96c717$exports).default,
1161
- "it-IT": _babelRuntimeHelpersEsmInteropRequireDefault($cae04c9878c1e24b1bce5348e54e95a4$exports).default,
1162
- "ja-JP": _babelRuntimeHelpersEsmInteropRequireDefault($b9679eb29e949e5727cbdcf506da08c1$exports).default,
1163
- "ko-KR": _babelRuntimeHelpersEsmInteropRequireDefault($c663d68cc7455025fffd92332e200be$exports).default,
1164
- "lt-LT": _babelRuntimeHelpersEsmInteropRequireDefault($d454665d97cf724871a9c3eb05$exports).default,
1165
- "lv-LV": _babelRuntimeHelpersEsmInteropRequireDefault($ca66a3bcdd44dae4665871a98bb416e3$exports).default,
1166
- "nb-NO": _babelRuntimeHelpersEsmInteropRequireDefault($cb7e072c8b2f7c15a7e06a7ac99163$exports).default,
1167
- "nl-NL": _babelRuntimeHelpersEsmInteropRequireDefault($f9d8bf1245c4a4f581c7966119af7c$exports).default,
1168
- "pl-PL": _babelRuntimeHelpersEsmInteropRequireDefault($cd07a56ec0cb160ba15542c10691829d$exports).default,
1169
- "pt-BR": _babelRuntimeHelpersEsmInteropRequireDefault($a70fe1fa67e039d2646076dfb78cee1$exports).default,
1170
- "pt-PT": _babelRuntimeHelpersEsmInteropRequireDefault($e37cb9bf759f35580e0f57d85e98be4b$exports).default,
1171
- "ro-RO": _babelRuntimeHelpersEsmInteropRequireDefault($f4cf63884707eedcbdf4eae0b61ef1bf$exports).default,
1172
- "ru-RU": _babelRuntimeHelpersEsmInteropRequireDefault($e2321eb9f531b07389bd6bfcdd631256$exports).default,
1173
- "sk-SK": _babelRuntimeHelpersEsmInteropRequireDefault($ef19e5833adeee78e3c34d0f68fa9f31$exports).default,
1174
- "sl-SI": _babelRuntimeHelpersEsmInteropRequireDefault($b895c4fbc849f3dcfcdb2d8899ed32b4$exports).default,
1175
- "sr-SP": _babelRuntimeHelpersEsmInteropRequireDefault($b75ddb34dcfa290a634852a820c90c5$exports).default,
1176
- "sv-SE": _babelRuntimeHelpersEsmInteropRequireDefault($f010cb5a3a37b4733a80a1d1f871$exports).default,
1177
- "tr-TR": _babelRuntimeHelpersEsmInteropRequireDefault($a8e9337c82319ec72dd3b41245c71e1e$exports).default,
1178
- "uk-UA": _babelRuntimeHelpersEsmInteropRequireDefault($e74f5b955cc9ed1ca9994fc3460$exports).default,
1179
- "zh-CN": _babelRuntimeHelpersEsmInteropRequireDefault($b007023265925d07a3d47c3d12f09c5$exports).default,
1180
- "zh-TW": _babelRuntimeHelpersEsmInteropRequireDefault($f4995277bc73b497cd1257981bc3$exports).default
1181
- };
1182
- const $c50618638a6eda91cf58d6698d439d4$var$MESSAGES = {
1183
- keyboard: 'dropDescriptionKeyboard',
1184
- touch: 'dropDescriptionTouch',
1185
- virtual: 'dropDescriptionVirtual'
1186
- };
705
+ var $c239bef16a49abe4$exports = {};
706
+ $c239bef16a49abe4$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Apăsați pe Enter pentru a începe glisarea.\",\"dragDescriptionTouch\":\"Atingeți de două ori pentru a începe să glisați.\",\"dragDescriptionVirtual\":\"Faceți clic pentru a începe glisarea.\",\"dragItem\":\"Glisați {itemText}\",\"dragSelectedItems\":\"Glisați {count, plural, one {# element selectat} other {# elemente selectate}}\",\"dragStartedKeyboard\":\"A început glisarea. Apăsați pe Tab pentru a naviga la o țintă de fixare, apoi apăsați pe Enter pentru a fixa sau apăsați pe Escape pentru a anula glisarea.\",\"dragStartedTouch\":\"A început glisarea. Navigați la o țintă de fixare, apoi atingeți de două ori pentru a fixa.\",\"dragStartedVirtual\":\"A început glisarea. Navigați la o țintă de fixare, apoi faceți clic sau apăsați pe Enter pentru a fixa.\",\"dropCanceled\":\"Fixare anulată.\",\"dropComplete\":\"Fixare finalizată.\",\"dropDescriptionKeyboard\":\"Apăsați pe Enter pentru a fixa. Apăsați pe Escape pentru a anula glisarea.\",\"dropDescriptionTouch\":\"Atingeți de două ori pentru a fixa.\",\"dropDescriptionVirtual\":\"Faceți clic pentru a fixa.\",\"dropIndicator\":\"indicator de fixare\",\"dropOnItem\":\"Fixați pe {itemText}\",\"dropOnRoot\":\"Fixare pe\",\"endDragKeyboard\":\"Se glisează. Apăsați pe Enter pentru a anula glisarea.\",\"endDragTouch\":\"Se glisează. Atingeți de două ori pentru a anula glisarea.\",\"endDragVirtual\":\"Se glisează. Faceți clic pentru a anula glisarea.\",\"insertAfter\":\"Inserați după {itemText}\",\"insertBefore\":\"Inserați înainte de {itemText}\",\"insertBetween\":\"Inserați între {beforeItemText} și {afterItemText}\"}");
1187
707
 
1188
- function $c50618638a6eda91cf58d6698d439d4$export$useVirtualDrop() {
1189
- let formatMessage = useMessageFormatter($c50618638a6eda91cf58d6698d439d4$var$intlMessages);
1190
- let modality = $daf765036c8e081b3420fc4f613ad96$export$useDragModality();
1191
- let dragSession = $f2f44a26f7541d104d10e68c115a897a$export$useDragSession();
1192
- let descriptionProps = useDescription(dragSession ? formatMessage($c50618638a6eda91cf58d6698d439d4$var$MESSAGES[modality]) : '');
1193
- return {
1194
- dropProps: _babelRuntimeHelpersEsmExtends({}, descriptionProps, {
1195
- // Mobile Safari does not properly bubble click events on elements except links or inputs
1196
- // unless there is an onclick handler bound directly to the element itself. By adding this
1197
- // handler, React will take care of adding that for us, and we are able to handle document
1198
- // level click events in the DragManager.
1199
- // See https://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
1200
- onClick: () => {}
1201
- })
1202
- };
1203
- }
1204
708
 
1205
- const $d8fbdabc9bf5e02249691efe73c6554$var$DROP_ACTIVATE_TIMEOUT = 800;
1206
- export function useDrop(options) {
1207
- let [isDropTarget, setDropTarget] = useState(false);
1208
- let state = useRef({
1209
- x: 0,
1210
- y: 0,
1211
- dragEnterCount: 0,
1212
- dropEffect: 'none',
1213
- dropActivateTimer: null
1214
- }).current;
1215
-
1216
- let onDragOver = e => {
1217
- e.preventDefault();
1218
- e.stopPropagation();
1219
-
1220
- if (e.clientX === state.x && e.clientY === state.y) {
1221
- e.dataTransfer.dropEffect = state.dropEffect;
1222
- return;
1223
- }
709
+ var $8032d1fd9d257920$exports = {};
710
+ $8032d1fd9d257920$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Нажмите клавишу Enter для начала перетаскивания.\",\"dragDescriptionTouch\":\"Дважды нажмите для начала перетаскивания.\",\"dragDescriptionVirtual\":\"Щелкните для начала перетаскивания.\",\"dragItem\":\"Перетащить {itemText}\",\"dragSelectedItems\":\"Перетащить {count, plural, one {# выбранный элемент} other {# выбранных элем}}\",\"dragStartedKeyboard\":\"Начато перетаскивание. Нажмите клавишу Tab для выбора цели, затем нажмите клавишу Enter, чтобы применить перетаскивание, или клавишу Escape для отмены действия.\",\"dragStartedTouch\":\"Начато перетаскивание. Выберите цель, затем дважды нажмите, чтобы применить перетаскивание.\",\"dragStartedVirtual\":\"Начато перетаскивание. Нажмите клавишу Tab для выбора цели, затем нажмите клавишу Enter, чтобы применить перетаскивание.\",\"dropCanceled\":\"Перетаскивание отменено.\",\"dropComplete\":\"Перетаскивание завершено.\",\"dropDescriptionKeyboard\":\"Нажмите клавишу Enter, чтобы применить перетаскивание. Нажмите клавишу Escape для отмены.\",\"dropDescriptionTouch\":\"Дважды нажмите, чтобы применить перетаскивание.\",\"dropDescriptionVirtual\":\"Щелкните, чтобы применить перетаскивание.\",\"dropIndicator\":\"индикатор перетаскивания\",\"dropOnItem\":\"Перетащить на {itemText}\",\"dropOnRoot\":\"Перетащить на\",\"endDragKeyboard\":\"Перетаскивание. Нажмите клавишу Enter для отмены.\",\"endDragTouch\":\"Перетаскивание. Дважды нажмите для отмены.\",\"endDragVirtual\":\"Перетаскивание. Щелкните для отмены.\",\"insertAfter\":\"Вставить после {itemText}\",\"insertBefore\":\"Вставить перед {itemText}\",\"insertBetween\":\"Вставить между {beforeItemText} и {afterItemText}\"}");
1224
711
 
1225
- state.x = e.clientX;
1226
- state.y = e.clientY;
1227
712
 
1228
- if (typeof options.getDropOperationForPoint === 'function') {
1229
- let allowedOperations = $d8fbdabc9bf5e02249691efe73c6554$var$effectAllowedToOperations(e.dataTransfer.effectAllowed);
1230
- let types = new $daf765036c8e081b3420fc4f613ad96$export$DragTypes(e.dataTransfer);
1231
- let rect = e.currentTarget.getBoundingClientRect();
1232
- let dropOperation = options.getDropOperationForPoint(types, allowedOperations, state.x - rect.x, state.y - rect.y);
1233
- state.dropEffect = $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION_TO_DROP_EFFECT[dropOperation] || 'none';
1234
- }
713
+ var $68ce121f19daa71f$exports = {};
714
+ $68ce121f19daa71f$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Stlačením klávesu Enter začnete presúvanie.\",\"dragDescriptionTouch\":\"Dvojitým kliknutím začnete presúvanie.\",\"dragDescriptionVirtual\":\"Kliknutím začnete presúvanie.\",\"dragItem\":\"Presunúť položku {itemText}\",\"dragSelectedItems\":\"Presunúť {count, plural, one {# vybratú položku} other {# vybraté položky}}\",\"dragStartedKeyboard\":\"Presúvanie sa začalo. Do cieľového umiestnenia prejdete stlačením klávesu Tab. Ak chcete položku umiestniť, stlačte kláves Enter alebo stlačte kláves Esc, ak chcete presúvanie zrušiť.\",\"dragStartedTouch\":\"Presúvanie sa začalo. Prejdite na cieľové umiestnenie a dvojitým kliknutím umiestnite položku.\",\"dragStartedVirtual\":\"Presúvanie sa začalo. Prejdite na cieľové umiestnenie a kliknutím alebo stlačením klávesu Enter umiestnite položku.\",\"dropCanceled\":\"Umiestnenie zrušené.\",\"dropComplete\":\"Umiestnenie dokončené.\",\"dropDescriptionKeyboard\":\"Stlačením klávesu Enter umiestnite položku. Stlačením klávesu Esc zrušíte presúvanie.\",\"dropDescriptionTouch\":\"Dvojitým kliknutím umiestnite položku.\",\"dropDescriptionVirtual\":\"Kliknutím umiestnite položku.\",\"dropIndicator\":\"indikátor umiestnenia\",\"dropOnItem\":\"Umiestniť na položku {itemText}\",\"dropOnRoot\":\"Umiestniť na\",\"endDragKeyboard\":\"Prebieha presúvanie. Ak ho chcete zrušiť, stlačte kláves Enter.\",\"endDragTouch\":\"Prebieha presúvanie. Dvojitým kliknutím ho môžete zrušiť.\",\"endDragVirtual\":\"Prebieha presúvanie.\",\"insertAfter\":\"Vložiť za položku {itemText}\",\"insertBefore\":\"Vložiť pred položku {itemText}\",\"insertBetween\":\"Vložiť medzi položky {beforeItemText} a {afterItemText}\"}");
1235
715
 
1236
- e.dataTransfer.dropEffect = state.dropEffect;
1237
716
 
1238
- if (typeof options.onDropMove === 'function') {
1239
- let rect = e.currentTarget.getBoundingClientRect();
1240
- options.onDropMove({
1241
- type: 'dropmove',
1242
- x: state.x - rect.x,
1243
- y: state.y - rect.y
1244
- });
1245
- }
717
+ var $4cdd78dc3258b520$exports = {};
718
+ $4cdd78dc3258b520$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Pritisnite tipko Enter za začetek vlečenja.\",\"dragDescriptionTouch\":\"Dvotapnite za začetek vlečenja.\",\"dragDescriptionVirtual\":\"Kliknite za začetek vlečenja.\",\"dragItem\":\"Povleci {itemText}\",\"dragSelectedItems\":\"Povlecite {count, plural, one {# izbran element} other {izbrane elemente (#)}}\",\"dragStartedKeyboard\":\"Vlečenje se je začelo. Pritisnite tipko Tab za pomik na mesto, kamor želite spustiti elemente, in pritisnite tipko Enter, da jih spustite, ali tipko Escape, da prekličete postopek.\",\"dragStartedTouch\":\"Vlečenje se je začelo. Pomaknite se na mesto, kamor želite spustiti elemente, in dvotapnite, da jih spustite.\",\"dragStartedVirtual\":\"Vlečenje se je začelo. Pomaknite se na mesto, kamor želite spustiti elemente, in kliknite ali pritisnite tipko Enter, da jih spustite.\",\"dropCanceled\":\"Spust je preklican.\",\"dropComplete\":\"Spust je končan.\",\"dropDescriptionKeyboard\":\"Pritisnite tipko Enter, da spustite. Pritisnite tipko Escape, da prekličete vlečenje.\",\"dropDescriptionTouch\":\"Dvotapnite, da spustite.\",\"dropDescriptionVirtual\":\"Kliknite, da spustite.\",\"dropIndicator\":\"indikator spusta\",\"dropOnItem\":\"Spusti na mesto {itemText}\",\"dropOnRoot\":\"Spusti na mesto\",\"endDragKeyboard\":\"Vlečenje. Pritisnite tipko Enter za preklic vlečenja.\",\"endDragTouch\":\"Vlečenje. Dvotapnite za preklic vlečenja.\",\"endDragVirtual\":\"Vlečenje. Kliknite, da prekličete vlečenje.\",\"insertAfter\":\"Vstavi za {itemText}\",\"insertBefore\":\"Vstavi pred {itemText}\",\"insertBetween\":\"Vstavi med {beforeItemText} in {afterItemText}\"}");
1246
719
 
1247
- clearTimeout(state.dropActivateTimer);
1248
720
 
1249
- if (typeof options.onDropActivate === 'function' && state.dropEffect !== 'none') {
1250
- let rect = e.currentTarget.getBoundingClientRect();
1251
- state.dropActivateTimer = setTimeout(() => {
1252
- options.onDropActivate({
1253
- type: 'dropactivate',
1254
- x: state.x - rect.x,
1255
- y: state.y - rect.y
1256
- });
1257
- }, $d8fbdabc9bf5e02249691efe73c6554$var$DROP_ACTIVATE_TIMEOUT);
1258
- }
1259
- };
721
+ var $86f04216bbd4817a$exports = {};
722
+ $86f04216bbd4817a$exports = JSON.parse("{\"dragItem\":\"Prevucite {itemText}\",\"dragSelectedItems\":\"Prevucite {count, plural, one {# izabranu stavku} other {# izabrane stavke}}\",\"dragDescriptionKeyboard\":\"Pritisnite Enter da biste započeli prevlačenje..\",\"dragDescriptionTouch\":\"Dvaput dodirnite za otpuštanje.\",\"dragDescriptionVirtual\":\"Kliknite da biste započeli prevlačenje.\",\"dragStartedKeyboard\":\"Prevlačenje je započeto. Pritisnite Tab da biste otišli do cilja za otpuštanje, zatim pritisnite Enter za ispuštanje ili pritisnite Escape za otkazivanje.\",\"dragStartedTouch\":\"Prevlačenje je započeto. Idite do cilja za otpuštanje, a zatim dvaput dodirnite za otpuštanje.\",\"dragStartedVirtual\":\"Prevlačenje je započeto. Idite do cilja za otpuštanje, a zatim kliknite ili pritinite Enter za otpuštanje.\",\"endDragKeyboard\":\"Prevlačenje u toku. Pritisnite Enter da biste otkazali prevlačenje.\",\"endDragTouch\":\"Prevlačenje u toku. Dvaput dodirnite da biste otkazali prevlačenje.\",\"endDragVirtual\":\"Prevlačenje u toku. Kliknite da biste otkazali prevlačenje.\",\"dropDescriptionKeyboard\":\"Pritisnite Enter da biste otpustili. Pritisnite Escape da biste otkazali prevlačenje.\",\"dropDescriptionTouch\":\"Dvaput dodirnite za otpuštanje.\",\"dropDescriptionVirtual\":\"Kliknite za otpuštanje.\",\"dropCanceled\":\"Otpuštanje je otkazano.\",\"dropComplete\":\"Prevlačenje je završeno.\",\"dropIndicator\":\"Indikator otpuštanja\",\"dropOnRoot\":\"Otpusti na\",\"dropOnItem\":\"Otpusti na {itemText}\",\"insertBefore\":\"Umetnite ispred {itemText}\",\"insertBetween\":\"Umetnite između {beforeItemText} i {afterItemText}\",\"insertAfter\":\"Umetnite posle {itemText}\"}");
1260
723
 
1261
- let onDragEnter = e => {
1262
- e.stopPropagation();
1263
- state.dragEnterCount++;
1264
724
 
1265
- if (state.dragEnterCount > 1) {
1266
- return;
1267
- }
1268
-
1269
- let allowedOperations = $d8fbdabc9bf5e02249691efe73c6554$var$effectAllowedToOperations(e.dataTransfer.effectAllowed);
1270
- let dropOperation = allowedOperations[0];
725
+ var $7be58aaf3779c874$exports = {};
726
+ $7be58aaf3779c874$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Tryck på enter för att börja dra.\",\"dragDescriptionTouch\":\"Dubbeltryck för att börja dra.\",\"dragDescriptionVirtual\":\"Klicka för att börja dra.\",\"dragItem\":\"Dra {itemText}\",\"dragSelectedItems\":\"Dra {count, plural, one {# valt objekt} other {# valda objekt}}\",\"dragStartedKeyboard\":\"Börja dra. Tryck på tabb för att navigera till målet, tryck på enter för att släppa eller på escape för att avbryta.\",\"dragStartedTouch\":\"Börja dra. Navigera till ett mål och dubbeltryck för att släppa.\",\"dragStartedVirtual\":\"Börja dra. Navigera till ett mål och klicka eller tryck på enter för att släppa.\",\"dropCanceled\":\"Släppåtgärd avbröts.\",\"dropComplete\":\"Släppåtgärd klar.\",\"dropDescriptionKeyboard\":\"Tryck på enter för att släppa. Tryck på escape för att avbryta dragåtgärd.\",\"dropDescriptionTouch\":\"Dubbeltryck för att släppa.\",\"dropDescriptionVirtual\":\"Klicka för att släppa.\",\"dropIndicator\":\"släppindikator\",\"dropOnItem\":\"Släpp på {itemText}\",\"dropOnRoot\":\"Släpp på\",\"endDragKeyboard\":\"Drar. Tryck på enter för att avbryta dragåtgärd.\",\"endDragTouch\":\"Drar. Dubbeltryck för att avbryta dragåtgärd.\",\"endDragVirtual\":\"Drar. Klicka för att avbryta dragåtgärd.\",\"insertAfter\":\"Infoga efter {itemText}\",\"insertBefore\":\"Infoga före {itemText}\",\"insertBetween\":\"Infoga mellan {beforeItemText} och {afterItemText}\"}");
1271
727
 
1272
- if (typeof options.getDropOperation === 'function') {
1273
- let types = new $daf765036c8e081b3420fc4f613ad96$export$DragTypes(e.dataTransfer);
1274
- dropOperation = options.getDropOperation(types, allowedOperations);
1275
- }
1276
728
 
1277
- if (dropOperation !== 'cancel') {
1278
- setDropTarget(true);
1279
- }
729
+ var $ec05018bbd8232dd$exports = {};
730
+ $ec05018bbd8232dd$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Sürüklemeyi başlatmak için Enter'a basın.\",\"dragDescriptionTouch\":\"Sürüklemeyi başlatmak için çift tıklayın.\",\"dragDescriptionVirtual\":\"Sürüklemeyi başlatmak için tıklayın.\",\"dragItem\":\"{itemText}’i sürükle\",\"dragSelectedItems\":\"Sürükle {count, plural, one {# seçili öge} other {# seçili öge}}\",\"dragStartedKeyboard\":\"Sürükleme başlatıldı. Bir bırakma hedefine gitmek için Tab’a basın, ardından bırakmak için Enter’a basın veya iptal etmek için Escape’e basın.\",\"dragStartedTouch\":\"Sürükleme başlatıldı. Bir bırakma hedefine gidin, ardından bırakmak için çift tıklayın.\",\"dragStartedVirtual\":\"Sürükleme başlatıldı. Bir bırakma hedefine gidin, ardından bırakmak için Enter’a tıklayın veya basın.\",\"dropCanceled\":\"Bırakma iptal edildi.\",\"dropComplete\":\"Bırakma tamamlandı.\",\"dropDescriptionKeyboard\":\"Bırakmak için Enter'a basın. Sürüklemeyi iptal etmek için Escape'e basın.\",\"dropDescriptionTouch\":\"Bırakmak için çift tıklayın.\",\"dropDescriptionVirtual\":\"Bırakmak için tıklayın.\",\"dropIndicator\":\"bırakma göstergesi\",\"dropOnItem\":\"{itemText} üzerine bırak\",\"dropOnRoot\":\"Bırakın\",\"endDragKeyboard\":\"Sürükleme. Sürüklemeyi iptal etmek için Enter'a basın.\",\"endDragTouch\":\"Sürükleme. Sürüklemeyi iptal etmek için çift tıklayın.\",\"endDragVirtual\":\"Sürükleme. Sürüklemeyi iptal etmek için tıklayın.\",\"insertAfter\":\"{itemText}’den sonra gir\",\"insertBefore\":\"{itemText}’den önce gir\",\"insertBetween\":\"{beforeItemText} ve {afterItemText} arasına gir\"}");
1280
731
 
1281
- if (typeof options.getDropOperationForPoint === 'function') {
1282
- let types = new $daf765036c8e081b3420fc4f613ad96$export$DragTypes(e.dataTransfer);
1283
- let rect = e.currentTarget.getBoundingClientRect();
1284
- dropOperation = options.getDropOperationForPoint(types, allowedOperations, e.clientX - rect.x, e.clientY - rect.y);
1285
- }
1286
732
 
1287
- state.dropEffect = $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION_TO_DROP_EFFECT[dropOperation] || 'none';
1288
- e.dataTransfer.dropEffect = state.dropEffect;
733
+ var $cd0c7445e4a803a4$exports = {};
734
+ $cd0c7445e4a803a4$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Натисніть Enter, щоб почати перетягування.\",\"dragDescriptionTouch\":\"Натисніть двічі, щоб почати перетягування.\",\"dragDescriptionVirtual\":\"Натисніть, щоб почати перетягування.\",\"dragItem\":\"Перетягнути {itemText}\",\"dragSelectedItems\":\"Перетягніть {count, plural, one {# вибраний елемент} other {# вибраних елем}}\",\"dragStartedKeyboard\":\"Перетягування почалося. Натисніть Tab, щоб перейти до цілі перетягування, потім натисніть Enter, щоб перетягнути, або Escape, щоб скасувати.\",\"dragStartedTouch\":\"Перетягування почалося. Перейдіть до цілі перетягування, потім натисніть двічі, щоб перетягнути.\",\"dragStartedVirtual\":\"Перетягування почалося. Перейдіть до цілі перетягування, потім натисніть Enter, щоб перетягнути.\",\"dropCanceled\":\"Перетягування скасовано.\",\"dropComplete\":\"Перетягування завершено.\",\"dropDescriptionKeyboard\":\"Натисніть Enter, щоб перетягнути. Натисніть Escape, щоб скасувати перетягування.\",\"dropDescriptionTouch\":\"Натисніть двічі, щоб перетягнути.\",\"dropDescriptionVirtual\":\"Натисніть, щоб перетягнути.\",\"dropIndicator\":\"індикатор перетягування\",\"dropOnItem\":\"Перетягнути на {itemText}\",\"dropOnRoot\":\"Перетягнути на\",\"endDragKeyboard\":\"Триває перетягування. Натисніть Enter, щоб скасувати перетягування.\",\"endDragTouch\":\"Триває перетягування. Натисніть двічі, щоб скасувати перетягування.\",\"endDragVirtual\":\"Триває перетягування. Натисніть, щоб скасувати перетягування.\",\"insertAfter\":\"Вставити після {itemText}\",\"insertBefore\":\"Вставити перед {itemText}\",\"insertBetween\":\"Вставити між {beforeItemText} і {afterItemText}\"}");
1289
735
 
1290
- if (typeof options.onDropEnter === 'function' && dropOperation !== 'cancel') {
1291
- let rect = e.currentTarget.getBoundingClientRect();
1292
- options.onDropEnter({
1293
- type: 'dropenter',
1294
- x: e.clientX - rect.x,
1295
- y: e.clientY - rect.y
1296
- });
1297
- }
1298
736
 
1299
- state.x = e.clientX;
1300
- state.y = e.clientY;
1301
- };
737
+ var $3997d91275761a65$exports = {};
738
+ $3997d91275761a65$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"按 Enter 开始拖动。\",\"dragDescriptionTouch\":\"双击开始拖动。\",\"dragDescriptionVirtual\":\"单击开始拖动。\",\"dragItem\":\"拖动 {itemText}\",\"dragSelectedItems\":\"拖动 {count, plural, one {# 选中项目} other {# 选中项目}}\",\"dragStartedKeyboard\":\"已开始拖动。按 Tab 导航到放置目标,然后按 Enter 放置或按 Escape 取消。\",\"dragStartedTouch\":\"已开始拖动。导航到放置目标,然后双击放置。\",\"dragStartedVirtual\":\"已开始拖动。导航到放置目标,然后单击或按 Enter 放置。\",\"dropCanceled\":\"放置已取消。\",\"dropComplete\":\"放置已完成。\",\"dropDescriptionKeyboard\":\"按 Enter 放置。按 Escape 取消拖动。\",\"dropDescriptionTouch\":\"双击放置。\",\"dropDescriptionVirtual\":\"单击放置。\",\"dropIndicator\":\"放置标记\",\"dropOnItem\":\"放置于 {itemText}\",\"dropOnRoot\":\"放置于\",\"endDragKeyboard\":\"正在拖动。按 Enter 取消拖动。\",\"endDragTouch\":\"正在拖动。双击取消拖动。\",\"endDragVirtual\":\"正在拖动。单击取消拖动。\",\"insertAfter\":\"插入到 {itemText} 之后\",\"insertBefore\":\"插入到 {itemText} 之前\",\"insertBetween\":\"插入到 {beforeItemText} 和 {afterItemText} 之间\"}");
1302
739
 
1303
- let onDragLeave = e => {
1304
- e.stopPropagation();
1305
- state.dragEnterCount--;
1306
740
 
1307
- if (state.dragEnterCount > 0) {
1308
- return;
1309
- }
741
+ var $e68ac031996a1009$exports = {};
742
+ $e68ac031996a1009$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"按 Enter 鍵以開始拖曳。\",\"dragDescriptionTouch\":\"輕點兩下以開始拖曳。\",\"dragDescriptionVirtual\":\"按一下滑鼠以開始拖曳。\",\"dragItem\":\"拖曳「{itemText}」\",\"dragSelectedItems\":\"拖曳 {count, plural, one {# 個選定項目} other {# 個選定項目}}\",\"dragStartedKeyboard\":\"已開始拖曳。按 Tab 鍵以瀏覽至放置目標,然後按 Enter 鍵以放置,或按 Escape 鍵以取消。\",\"dragStartedTouch\":\"已開始拖曳。瀏覽至放置目標,然後輕點兩下以放置。\",\"dragStartedVirtual\":\"已開始拖曳。瀏覽至放置目標,然後按一下滑鼠或按 Enter 鍵以放置。\",\"dropCanceled\":\"放置已取消。\",\"dropComplete\":\"放置已完成。\",\"dropDescriptionKeyboard\":\"按 Enter 鍵以放置。按 Escape 鍵以取消拖曳。\",\"dropDescriptionTouch\":\"輕點兩下以放置。\",\"dropDescriptionVirtual\":\"按一下滑鼠以放置。\",\"dropIndicator\":\"放置指示器\",\"dropOnItem\":\"放置在「{itemText}」上\",\"dropOnRoot\":\"放置在\",\"endDragKeyboard\":\"拖曳中。按 Enter 鍵以取消拖曳。\",\"endDragTouch\":\"拖曳中。輕點兩下以取消拖曳。\",\"endDragVirtual\":\"拖曳中。按一下滑鼠以取消拖曳。\",\"insertAfter\":\"插入至「{itemText}」之後\",\"insertBefore\":\"插入至「{itemText}」之前\",\"insertBetween\":\"插入至「{beforeItemText}」和「{afterItemText}」之間\"}");
1310
743
 
1311
- if (typeof options.onDropExit === 'function' && state.dropEffect !== 'none') {
1312
- let rect = e.currentTarget.getBoundingClientRect();
1313
- options.onDropExit({
1314
- type: 'dropexit',
1315
- x: e.clientX - rect.x,
1316
- y: e.clientY - rect.y
1317
- });
1318
- }
1319
744
 
1320
- setDropTarget(false);
1321
- clearTimeout(state.dropActivateTimer);
1322
- };
1323
-
1324
- let onDrop = e => {
1325
- e.preventDefault();
1326
- e.stopPropagation();
1327
-
1328
- if (typeof options.onDrop === 'function') {
1329
- let dropOperation = $cd2dc9b4103e6936caca05e2d05$export$DROP_EFFECT_TO_DROP_OPERATION[state.dropEffect];
1330
- let items = $daf765036c8e081b3420fc4f613ad96$export$readFromDataTransfer(e.dataTransfer);
1331
- let rect = e.currentTarget.getBoundingClientRect();
1332
- let event = {
1333
- type: 'drop',
1334
- x: e.clientX - rect.x,
1335
- y: e.clientY - rect.y,
1336
- items,
1337
- dropOperation
1338
- }; // Wait a frame to dispatch the drop event so that we ensure the dragend event fires first.
1339
- // Otherwise, if onDrop removes the original dragged element from the DOM, dragend will never be fired.
1340
- // This behavior is consistent across browsers, but see this issue for details:
1341
- // https://bugzilla.mozilla.org/show_bug.cgi?id=460801
1342
-
1343
- setTimeout(() => {
1344
- options.onDrop(event);
1345
- }, 0);
1346
- }
745
+ $56fb93a531e5f155$exports = {
746
+ "ar-AE": $88a889d9d1ce17bb$exports,
747
+ "bg-BG": $b4a2d41921029d13$exports,
748
+ "cs-CZ": $c92509b451788ced$exports,
749
+ "da-DK": $6c18f30f421d184d$exports,
750
+ "de-DE": $7987d696b5027c45$exports,
751
+ "el-GR": $3b67bfbf2edbb86f$exports,
752
+ "en-US": $ae79b0f4b3d53376$exports,
753
+ "es-ES": $39d872fb80474481$exports,
754
+ "et-EE": $5f0b0131ace2c05f$exports,
755
+ "fi-FI": $b4e2c75ef9526cbe$exports,
756
+ "fr-FR": $4e3ebb56380a458f$exports,
757
+ "he-IL": $d63e7745e6a50656$exports,
758
+ "hr-HR": $0fe4553f82accac7$exports,
759
+ "hu-HU": $28bc13d671ad7ca4$exports,
760
+ "it-IT": $0055dc944ad39707$exports,
761
+ "ja-JP": $fcc46ef57077923e$exports,
762
+ "ko-KR": $364583e1d6b3ac37$exports,
763
+ "lt-LT": $1cb9a6b961974e20$exports,
764
+ "lv-LV": $eb24e849f46b3b29$exports,
765
+ "nb-NO": $c6c9c2c3709eb556$exports,
766
+ "nl-NL": $ee6013090ec94b17$exports,
767
+ "pl-PL": $5e774077b08841aa$exports,
768
+ "pt-BR": $9ac756f6082c573d$exports,
769
+ "pt-PT": $d0200f21f7dbe795$exports,
770
+ "ro-RO": $c239bef16a49abe4$exports,
771
+ "ru-RU": $8032d1fd9d257920$exports,
772
+ "sk-SK": $68ce121f19daa71f$exports,
773
+ "sl-SI": $4cdd78dc3258b520$exports,
774
+ "sr-SP": $86f04216bbd4817a$exports,
775
+ "sv-SE": $7be58aaf3779c874$exports,
776
+ "tr-TR": $ec05018bbd8232dd$exports,
777
+ "uk-UA": $cd0c7445e4a803a4$exports,
778
+ "zh-CN": $3997d91275761a65$exports,
779
+ "zh-TW": $e68ac031996a1009$exports
780
+ };
1347
781
 
1348
- if (typeof options.onDropExit === 'function') {
1349
- let rect = e.currentTarget.getBoundingClientRect();
1350
- options.onDropExit({
1351
- type: 'dropexit',
1352
- x: e.clientX - rect.x,
1353
- y: e.clientY - rect.y
1354
- });
1355
- }
1356
782
 
1357
- state.dragEnterCount = 0;
1358
- setDropTarget(false);
1359
- clearTimeout(state.dropActivateTimer);
1360
- };
1361
783
 
1362
- let optionsRef = useRef(options);
1363
- optionsRef.current = options;
1364
- useLayoutEffect(() => $f2f44a26f7541d104d10e68c115a897a$export$registerDropTarget({
1365
- element: optionsRef.current.ref.current,
1366
- getDropOperation: optionsRef.current.getDropOperation,
1367
784
 
1368
- onDropEnter(e) {
1369
- setDropTarget(true);
1370
785
 
1371
- if (typeof optionsRef.current.onDropEnter === 'function') {
1372
- optionsRef.current.onDropEnter(e);
1373
- }
1374
- },
1375
786
 
1376
- onDropExit(e) {
1377
- setDropTarget(false);
1378
787
 
1379
- if (typeof optionsRef.current.onDropExit === 'function') {
1380
- optionsRef.current.onDropExit(e);
1381
- }
788
+ const $98f744b02c510da7$var$MESSAGES = {
789
+ keyboard: {
790
+ start: 'dragDescriptionKeyboard',
791
+ end: 'endDragKeyboard'
1382
792
  },
1383
-
1384
- onDrop(e) {
1385
- if (typeof optionsRef.current.onDrop === 'function') {
1386
- optionsRef.current.onDrop(e);
1387
- }
793
+ touch: {
794
+ start: 'dragDescriptionTouch',
795
+ end: 'endDragTouch'
1388
796
  },
1389
-
1390
- onDropActivate(e) {
1391
- if (typeof optionsRef.current.onDropActivate === 'function') {
1392
- optionsRef.current.onDropActivate(e);
1393
- }
1394
- }
1395
-
1396
- }), [optionsRef]);
1397
- let {
1398
- dropProps
1399
- } = $c50618638a6eda91cf58d6698d439d4$export$useVirtualDrop();
1400
- return {
1401
- dropProps: _babelRuntimeHelpersEsmExtends({}, dropProps, {
1402
- onDragEnter,
1403
- onDragOver,
1404
- onDragLeave,
1405
- onDrop
1406
- }),
1407
- isDropTarget
1408
- };
1409
- }
1410
-
1411
- function $d8fbdabc9bf5e02249691efe73c6554$var$effectAllowedToOperations(effectAllowed) {
1412
- let allowedOperationsBits = $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION_ALLOWED[effectAllowed];
1413
- let allowedOperations = [];
1414
-
1415
- if (allowedOperationsBits & $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION.move) {
1416
- allowedOperations.push('move');
1417
- }
1418
-
1419
- if (allowedOperationsBits & $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION.copy) {
1420
- allowedOperations.push('copy');
1421
- }
1422
-
1423
- if (allowedOperationsBits & $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION.link) {
1424
- allowedOperations.push('link');
1425
- }
1426
-
1427
- return allowedOperations;
1428
- }
1429
-
1430
- const $fc185692b5b48db744e326077771d19$var$AUTOSCROLL_AREA_SIZE = 20;
1431
-
1432
- function $fc185692b5b48db744e326077771d19$export$useAutoScroll(ref) {
1433
- let scrollableRef = useRef(null);
1434
- useEffect(() => {
1435
- if (ref.current) {
1436
- scrollableRef.current = getScrollParent(ref.current);
797
+ virtual: {
798
+ start: 'dragDescriptionVirtual',
799
+ end: 'endDragVirtual'
1437
800
  }
1438
- }, [ref]);
1439
- let state = useRef({
1440
- timer: null,
1441
- dx: 0,
1442
- dy: 0
1443
- }).current;
1444
- let scroll = useCallback(() => {
1445
- scrollableRef.current.scrollLeft += state.dx;
1446
- scrollableRef.current.scrollTop += state.dy;
1447
-
1448
- if (state.timer) {
1449
- state.timer = requestAnimationFrame(scroll);
1450
- }
1451
- }, [scrollableRef, state]);
1452
- return {
1453
- move(x, y) {
1454
- // Most browsers auto scroll natively, but WebKit on macOS does not (iOS does 🤷‍♂️).
1455
- // https://bugs.webkit.org/show_bug.cgi?id=222636
1456
- if (!isWebKit() || isIOS() || !scrollableRef.current) {
1457
- return;
1458
- }
1459
-
1460
- let box = scrollableRef.current.getBoundingClientRect();
1461
- let left = $fc185692b5b48db744e326077771d19$var$AUTOSCROLL_AREA_SIZE;
1462
- let top = $fc185692b5b48db744e326077771d19$var$AUTOSCROLL_AREA_SIZE;
1463
- let bottom = box.height - $fc185692b5b48db744e326077771d19$var$AUTOSCROLL_AREA_SIZE;
1464
- let right = box.width - $fc185692b5b48db744e326077771d19$var$AUTOSCROLL_AREA_SIZE;
1465
-
1466
- if (x < left || x > right || y < top || y > bottom) {
1467
- if (x < left) {
1468
- state.dx = x - left;
1469
- } else if (x > right) {
1470
- state.dx = x - right;
801
+ };
802
+ function $98f744b02c510da7$export$7941f8aafa4b6021(options) {
803
+ let formatMessage = $3kwX1$useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($56fb93a531e5f155$exports)));
804
+ let state = $3kwX1$useRef({
805
+ options: options,
806
+ x: 0,
807
+ y: 0
808
+ }).current;
809
+ state.options = options;
810
+ let [isDragging, setDragging] = $3kwX1$useState(false);
811
+ let onDragStart = (e)=>{
812
+ let items = options.getItems();
813
+ $6d32ba78df89e8ed$export$f9c1490890ddd063(e.dataTransfer, items);
814
+ if (typeof options.getAllowedDropOperations === 'function') {
815
+ let allowedOperations = options.getAllowedDropOperations();
816
+ let allowed = $b412d65e07c8d230$export$60b7b4bcf3903d8e.none;
817
+ for (let operation of allowedOperations)allowed |= $b412d65e07c8d230$export$60b7b4bcf3903d8e[operation] || $b412d65e07c8d230$export$60b7b4bcf3903d8e.none;
818
+ e.dataTransfer.effectAllowed = $b412d65e07c8d230$export$dd0165308d8bff45[allowed] || 'none';
1471
819
  }
1472
-
1473
- if (y < top) {
1474
- state.dy = y - top;
1475
- } else if (y > bottom) {
1476
- state.dy = y - bottom;
820
+ // If there is a renderPreview function, use it to render a custom preview image that will
821
+ // appear under the pointer while dragging. If not, the element itself is dragged by the browser.
822
+ if (typeof options.renderPreview === 'function') {
823
+ let preview = options.renderPreview(items);
824
+ if (preview) {
825
+ // Create an off-screen div to render the preview into.
826
+ let node = document.createElement('div');
827
+ node.style.zIndex = '-100';
828
+ node.style.position = 'absolute';
829
+ node.style.top = '0';
830
+ node.style.left = '-100000px';
831
+ document.body.appendChild(node);
832
+ // Call renderPreview to get a JSX element, and render it into the div with React DOM.
833
+ $3kwX1$reactdom.render(preview, node);
834
+ // Compute the offset that the preview will appear under the mouse.
835
+ // If possible, this is based on the point the user clicked on the target.
836
+ // If the preview is much smaller, then just use the center point of the preview.
837
+ let size = node.getBoundingClientRect();
838
+ let rect = e.currentTarget.getBoundingClientRect();
839
+ let x = e.clientX - rect.x;
840
+ let y = e.clientY - rect.y;
841
+ if (x > size.width || y > size.height) {
842
+ x = size.width / 2;
843
+ y = size.height / 2;
844
+ }
845
+ e.dataTransfer.setDragImage(node, x, y);
846
+ // Remove the preview from the DOM after a frame so the browser has time to paint.
847
+ requestAnimationFrame(()=>{
848
+ document.body.removeChild(node);
849
+ });
850
+ }
1477
851
  }
1478
-
1479
- if (!state.timer) {
1480
- state.timer = requestAnimationFrame(scroll);
852
+ if (typeof options.onDragStart === 'function') options.onDragStart({
853
+ type: 'dragstart',
854
+ x: e.clientX,
855
+ y: e.clientY
856
+ });
857
+ state.x = e.clientX;
858
+ state.y = e.clientY;
859
+ // Wait a frame before we set dragging to true so that the browser has time to
860
+ // render the preview image before we update the element that has been dragged.
861
+ requestAnimationFrame(()=>{
862
+ setDragging(true);
863
+ });
864
+ };
865
+ let onDrag = (e)=>{
866
+ if (e.clientX === state.x && e.clientY === state.y) return;
867
+ if (typeof options.onDragMove === 'function') options.onDragMove({
868
+ type: 'dragmove',
869
+ x: e.clientX,
870
+ y: e.clientY
871
+ });
872
+ state.x = e.clientX;
873
+ state.y = e.clientY;
874
+ };
875
+ let onDragEnd = (e)=>{
876
+ if (typeof options.onDragEnd === 'function') options.onDragEnd({
877
+ type: 'dragend',
878
+ x: e.clientX,
879
+ y: e.clientY,
880
+ dropOperation: $b412d65e07c8d230$export$608ecc6f1b23c35d[e.dataTransfer.dropEffect]
881
+ });
882
+ setDragging(false);
883
+ };
884
+ let onPress = (e1)=>{
885
+ if (e1.pointerType !== 'keyboard' && e1.pointerType !== 'virtual') return;
886
+ if (typeof state.options.onDragStart === 'function') {
887
+ let rect = e1.target.getBoundingClientRect();
888
+ state.options.onDragStart({
889
+ type: 'dragstart',
890
+ x: rect.x + rect.width / 2,
891
+ y: rect.y + rect.height / 2
892
+ });
1481
893
  }
1482
- } else {
1483
- this.stop();
1484
- }
1485
- },
1486
-
1487
- stop() {
1488
- if (state.timer) {
1489
- cancelAnimationFrame(state.timer);
1490
- state.timer = null;
1491
- }
1492
- }
1493
-
1494
- };
894
+ $3f1be781b0a897ea$export$549dbcf8649bf3b2({
895
+ element: e1.target,
896
+ items: state.options.getItems(),
897
+ allowedDropOperations: typeof state.options.getAllowedDropOperations === 'function' ? state.options.getAllowedDropOperations() : [
898
+ 'move',
899
+ 'copy',
900
+ 'link'
901
+ ],
902
+ onDragEnd (e) {
903
+ setDragging(false);
904
+ if (typeof state.options.onDragEnd === 'function') state.options.onDragEnd(e);
905
+ }
906
+ }, formatMessage);
907
+ setDragging(true);
908
+ };
909
+ let modality = $6d32ba78df89e8ed$export$49bac5d6d4b352ea();
910
+ let descriptionProps = $3kwX1$useDescription(formatMessage(!isDragging ? $98f744b02c510da7$var$MESSAGES[modality].start : $98f744b02c510da7$var$MESSAGES[modality].end));
911
+ return {
912
+ dragProps: {
913
+ draggable: 'true',
914
+ onDragStart: onDragStart,
915
+ onDrag: onDrag,
916
+ onDragEnd: onDragEnd
917
+ },
918
+ dragButtonProps: {
919
+ ...descriptionProps,
920
+ onPress: onPress
921
+ },
922
+ isDragging: isDragging
923
+ };
1495
924
  }
1496
925
 
1497
- const $a51d66e59f7aa4342b5a89c7c961bedc$var$DROP_POSITIONS = ['before', 'on', 'after'];
1498
- export function useDroppableCollection(props, state, ref) {
1499
- let localState = useRef({
1500
- props,
1501
- state,
1502
- nextTarget: null,
1503
- dropOperation: null
1504
- }).current;
1505
- localState.props = props;
1506
- localState.state = state;
1507
- let autoScroll = $fc185692b5b48db744e326077771d19$export$useAutoScroll(ref);
1508
- let {
1509
- dropProps
1510
- } = useDrop({
1511
- ref,
1512
-
1513
- onDropEnter(e) {
1514
- let target = props.getDropTargetFromPoint(e.x, e.y);
1515
- state.setTarget(target);
1516
- },
1517
-
1518
- onDropMove(e) {
1519
- state.setTarget(localState.nextTarget);
1520
- autoScroll.move(e.x, e.y);
1521
- },
1522
926
 
1523
- getDropOperationForPoint(types, allowedOperations, x, y) {
1524
- let target = props.getDropTargetFromPoint(x, y);
927
+ var $0da183e6051d30ca$exports = {};
1525
928
 
1526
- if (!target) {
1527
- localState.dropOperation = 'cancel';
1528
- localState.nextTarget = null;
1529
- return 'cancel';
1530
- }
929
+ $parcel$export($0da183e6051d30ca$exports, "useDrop", () => $0da183e6051d30ca$export$ccdee5eaf73cf661);
1531
930
 
1532
- if (state.isDropTarget(target)) {
1533
- localState.nextTarget = target;
1534
- return localState.dropOperation;
1535
- }
1536
931
 
1537
- localState.dropOperation = state.getDropOperation(target, types, allowedOperations); // If the target doesn't accept the drop, see if the root accepts it instead.
1538
932
 
1539
- if (localState.dropOperation === 'cancel') {
1540
- let rootTarget = {
1541
- type: 'root'
1542
- };
1543
- let dropOperation = state.getDropOperation(rootTarget, types, allowedOperations);
1544
933
 
1545
- if (dropOperation !== 'cancel') {
1546
- target = rootTarget;
1547
- localState.dropOperation = dropOperation;
1548
- }
1549
- }
1550
934
 
1551
- localState.nextTarget = localState.dropOperation === 'cancel' ? null : target;
1552
- return localState.dropOperation;
1553
- },
1554
935
 
1555
- onDropExit() {
1556
- state.setTarget(null);
1557
- autoScroll.stop();
1558
- },
1559
936
 
1560
- onDropActivate(e) {
1561
- var _state$target, _state$target2;
1562
937
 
1563
- if (((_state$target = state.target) == null ? void 0 : _state$target.type) === 'item' && ((_state$target2 = state.target) == null ? void 0 : _state$target2.dropPosition) === 'on' && typeof props.onDropActivate === 'function') {
1564
- props.onDropActivate({
1565
- type: 'dropactivate',
1566
- x: e.x,
1567
- // todo
1568
- y: e.y,
1569
- target: state.target
1570
- });
1571
- }
1572
- },
1573
938
 
1574
- onDrop(e) {
1575
- if (state.target && typeof props.onDrop === 'function') {
1576
- onDrop(e, state.target);
1577
- }
1578
- }
1579
939
 
1580
- });
1581
- let droppingState = useRef(null);
1582
- let onDrop = useCallback((e, target) => {
1583
- let {
1584
- state
1585
- } = localState; // Focus the collection.
1586
-
1587
- state.selectionManager.setFocused(true); // Save some state of the collection/selection before the drop occurs so we can compare later.
1588
-
1589
- let focusedKey = state.selectionManager.focusedKey;
1590
- droppingState.current = {
1591
- timeout: null,
1592
- focusedKey,
1593
- collection: state.collection,
1594
- selectedKeys: state.selectionManager.selectedKeys
1595
- };
1596
- localState.props.onDrop({
1597
- type: 'drop',
1598
- x: e.x,
1599
- // todo
1600
- y: e.y,
1601
- target,
1602
- items: e.items,
1603
- dropOperation: e.dropOperation
1604
- }); // Wait for a short time period after the onDrop is called to allow the data to be read asynchronously
1605
- // and for React to re-render. If an insert occurs during this time, it will be selected/focused below.
1606
- // If items are not "immediately" inserted by the onDrop handler, the application will need to handle
1607
- // selecting and focusing those items themselves.
1608
-
1609
- droppingState.current.timeout = setTimeout(() => {
1610
- // If focus didn't move already (e.g. due to an insert), and the user dropped on an item,
1611
- // focus that item and show the focus ring to give the user feedback that the drop occurred.
1612
- // Also show the focus ring if the focused key is not selected, e.g. in case of a reorder.
1613
- let {
1614
- state
1615
- } = localState;
1616
-
1617
- if (state.selectionManager.focusedKey === focusedKey) {
1618
- if (target.type === 'item' && target.dropPosition === 'on' && state.collection.getItem(target.key) != null) {
1619
- state.selectionManager.setFocusedKey(target.key);
1620
- state.selectionManager.setFocused(true);
1621
- setInteractionModality('keyboard');
1622
- } else if (!state.selectionManager.isSelected(focusedKey)) {
1623
- setInteractionModality('keyboard');
940
+ const $354c3dcb83b4da5c$var$MESSAGES = {
941
+ keyboard: 'dropDescriptionKeyboard',
942
+ touch: 'dropDescriptionTouch',
943
+ virtual: 'dropDescriptionVirtual'
944
+ };
945
+ function $354c3dcb83b4da5c$export$62447ad3d2ec7da6() {
946
+ let formatMessage = $3kwX1$useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($56fb93a531e5f155$exports)));
947
+ let modality = $6d32ba78df89e8ed$export$49bac5d6d4b352ea();
948
+ let dragSession = $3f1be781b0a897ea$export$418e185dd3f1b968();
949
+ let descriptionProps = $3kwX1$useDescription(dragSession ? formatMessage($354c3dcb83b4da5c$var$MESSAGES[modality]) : '');
950
+ return {
951
+ dropProps: {
952
+ ...descriptionProps,
953
+ // Mobile Safari does not properly bubble click events on elements except links or inputs
954
+ // unless there is an onclick handler bound directly to the element itself. By adding this
955
+ // handler, React will take care of adding that for us, and we are able to handle document
956
+ // level click events in the DragManager.
957
+ // See https://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
958
+ onClick: ()=>{
959
+ }
1624
960
  }
1625
- }
1626
-
1627
- droppingState.current = null;
1628
- }, 50);
1629
- }, [localState]); // eslint-disable-next-line arrow-body-style
1630
-
1631
- useEffect(() => {
1632
- return () => {
1633
- if (droppingState.current) {
1634
- clearTimeout(droppingState.current.timeout);
1635
- }
1636
961
  };
1637
- }, []);
1638
- useLayoutEffect(() => {
1639
- // If an insert occurs during a drop, we want to immediately select these items to give
1640
- // feedback to the user that a drop occurred. Only do this if the selection didn't change
1641
- // since the drop started so we don't override if the user or application did something.
1642
- if (droppingState.current && state.selectionManager.isFocused && state.collection.size > droppingState.current.collection.size && state.selectionManager.isSelectionEqual(droppingState.current.selectedKeys)) {
1643
- let newKeys = new Set();
1644
-
1645
- for (let key of state.collection.getKeys()) {
1646
- if (!droppingState.current.collection.getItem(key)) {
1647
- newKeys.add(key);
1648
- }
1649
- }
1650
-
1651
- state.selectionManager.setSelectedKeys(newKeys); // If the focused item didn't change since the drop occurred, also focus the first
1652
- // inserted item. If selection is disabled, then also show the focus ring so there
1653
- // is some indication that items were added.
962
+ }
1654
963
 
1655
- if (state.selectionManager.focusedKey === droppingState.current.focusedKey) {
1656
- let first = newKeys.keys().next().value;
1657
- state.selectionManager.setFocusedKey(first);
1658
964
 
1659
- if (state.selectionManager.selectionMode === 'none') {
1660
- setInteractionModality('keyboard');
965
+ const $0da183e6051d30ca$var$DROP_ACTIVATE_TIMEOUT = 800;
966
+ function $0da183e6051d30ca$export$ccdee5eaf73cf661(options) {
967
+ let [isDropTarget, setDropTarget] = $3kwX1$useState(false);
968
+ let state = $3kwX1$useRef({
969
+ x: 0,
970
+ y: 0,
971
+ dragEnterCount: 0,
972
+ dropEffect: 'none',
973
+ dropActivateTimer: null
974
+ }).current;
975
+ let onDragOver = (e)=>{
976
+ e.preventDefault();
977
+ e.stopPropagation();
978
+ if (e.clientX === state.x && e.clientY === state.y) {
979
+ e.dataTransfer.dropEffect = state.dropEffect;
980
+ return;
1661
981
  }
1662
- }
1663
-
1664
- droppingState.current = null;
1665
- }
1666
- });
1667
- useEffect(() => {
1668
- let getNextTarget = function getNextTarget(target, wrap) {
1669
- if (wrap === void 0) {
1670
- wrap = true;
1671
- }
1672
-
1673
- if (!target) {
1674
- return {
1675
- type: 'root'
1676
- };
1677
- }
1678
-
1679
- let {
1680
- keyboardDelegate
1681
- } = localState.props;
1682
- let nextKey = target.type === 'item' ? keyboardDelegate.getKeyBelow(target.key) : keyboardDelegate.getFirstKey();
1683
- let dropPosition = 'before';
1684
-
1685
- if (target.type === 'item') {
1686
- let positionIndex = $a51d66e59f7aa4342b5a89c7c961bedc$var$DROP_POSITIONS.indexOf(target.dropPosition);
1687
- let nextDropPosition = $a51d66e59f7aa4342b5a89c7c961bedc$var$DROP_POSITIONS[positionIndex + 1];
1688
-
1689
- if (positionIndex < $a51d66e59f7aa4342b5a89c7c961bedc$var$DROP_POSITIONS.length - 1 && !(nextDropPosition === 'after' && nextKey != null)) {
1690
- return {
1691
- type: 'item',
1692
- key: target.key,
1693
- dropPosition: nextDropPosition
1694
- };
1695
- } // If the last drop position was 'after', then 'before' on the next key is equivalent.
1696
- // Switch to 'on' instead.
1697
-
1698
-
1699
- if (target.dropPosition === 'after') {
1700
- dropPosition = 'on';
982
+ state.x = e.clientX;
983
+ state.y = e.clientY;
984
+ if (typeof options.getDropOperationForPoint === 'function') {
985
+ let allowedOperations = $0da183e6051d30ca$var$effectAllowedToOperations(e.dataTransfer.effectAllowed);
986
+ let types = new $6d32ba78df89e8ed$export$7f04ce188c91447c(e.dataTransfer);
987
+ let rect = e.currentTarget.getBoundingClientRect();
988
+ let dropOperation = options.getDropOperationForPoint(types, allowedOperations, state.x - rect.x, state.y - rect.y);
989
+ state.dropEffect = $b412d65e07c8d230$export$5eacb0769d26d3b2[dropOperation] || 'none';
1701
990
  }
1702
- }
1703
-
1704
- if (nextKey == null) {
1705
- if (wrap) {
1706
- return {
1707
- type: 'root'
1708
- };
991
+ e.dataTransfer.dropEffect = state.dropEffect;
992
+ if (typeof options.onDropMove === 'function') {
993
+ let rect = e.currentTarget.getBoundingClientRect();
994
+ options.onDropMove({
995
+ type: 'dropmove',
996
+ x: state.x - rect.x,
997
+ y: state.y - rect.y
998
+ });
999
+ }
1000
+ clearTimeout(state.dropActivateTimer);
1001
+ if (typeof options.onDropActivate === 'function' && state.dropEffect !== 'none') {
1002
+ let rect = e.currentTarget.getBoundingClientRect();
1003
+ state.dropActivateTimer = setTimeout(()=>{
1004
+ options.onDropActivate({
1005
+ type: 'dropactivate',
1006
+ x: state.x - rect.x,
1007
+ y: state.y - rect.y
1008
+ });
1009
+ }, $0da183e6051d30ca$var$DROP_ACTIVATE_TIMEOUT);
1709
1010
  }
1710
-
1711
- return null;
1712
- }
1713
-
1714
- return {
1715
- type: 'item',
1716
- key: nextKey,
1717
- dropPosition
1718
- };
1719
1011
  };
1720
-
1721
- let getPreviousTarget = function getPreviousTarget(target, wrap) {
1722
- if (wrap === void 0) {
1723
- wrap = true;
1724
- }
1725
-
1726
- let {
1727
- keyboardDelegate
1728
- } = localState.props;
1729
- let nextKey = (target == null ? void 0 : target.type) === 'item' ? keyboardDelegate.getKeyAbove(target.key) : keyboardDelegate.getLastKey();
1730
- let dropPosition = !target || target.type === 'root' ? 'after' : 'on';
1731
-
1732
- if ((target == null ? void 0 : target.type) === 'item') {
1733
- let positionIndex = $a51d66e59f7aa4342b5a89c7c961bedc$var$DROP_POSITIONS.indexOf(target.dropPosition);
1734
- let nextDropPosition = $a51d66e59f7aa4342b5a89c7c961bedc$var$DROP_POSITIONS[positionIndex - 1];
1735
-
1736
- if (positionIndex > 0 && nextDropPosition !== 'after') {
1737
- return {
1738
- type: 'item',
1739
- key: target.key,
1740
- dropPosition: nextDropPosition
1741
- };
1742
- } // If the last drop position was 'before', then 'after' on the previous key is equivalent.
1743
- // Switch to 'on' instead.
1744
-
1745
-
1746
- if (target.dropPosition === 'before') {
1747
- dropPosition = 'on';
1012
+ let onDragEnter = (e)=>{
1013
+ e.stopPropagation();
1014
+ state.dragEnterCount++;
1015
+ if (state.dragEnterCount > 1) return;
1016
+ let allowedOperations = $0da183e6051d30ca$var$effectAllowedToOperations(e.dataTransfer.effectAllowed);
1017
+ let dropOperation = allowedOperations[0];
1018
+ if (typeof options.getDropOperation === 'function') {
1019
+ let types = new $6d32ba78df89e8ed$export$7f04ce188c91447c(e.dataTransfer);
1020
+ dropOperation = options.getDropOperation(types, allowedOperations);
1748
1021
  }
1749
- }
1750
-
1751
- if (nextKey == null) {
1752
- if (wrap) {
1753
- return {
1754
- type: 'root'
1755
- };
1022
+ if (dropOperation !== 'cancel') setDropTarget(true);
1023
+ if (typeof options.getDropOperationForPoint === 'function') {
1024
+ let types = new $6d32ba78df89e8ed$export$7f04ce188c91447c(e.dataTransfer);
1025
+ let rect = e.currentTarget.getBoundingClientRect();
1026
+ dropOperation = options.getDropOperationForPoint(types, allowedOperations, e.clientX - rect.x, e.clientY - rect.y);
1756
1027
  }
1757
-
1758
- return null;
1759
- }
1760
-
1761
- return {
1762
- type: 'item',
1763
- key: nextKey,
1764
- dropPosition
1765
- };
1028
+ state.dropEffect = $b412d65e07c8d230$export$5eacb0769d26d3b2[dropOperation] || 'none';
1029
+ e.dataTransfer.dropEffect = state.dropEffect;
1030
+ if (typeof options.onDropEnter === 'function' && dropOperation !== 'cancel') {
1031
+ let rect = e.currentTarget.getBoundingClientRect();
1032
+ options.onDropEnter({
1033
+ type: 'dropenter',
1034
+ x: e.clientX - rect.x,
1035
+ y: e.clientY - rect.y
1036
+ });
1037
+ }
1038
+ state.x = e.clientX;
1039
+ state.y = e.clientY;
1766
1040
  };
1767
-
1768
- let nextValidTarget = function nextValidTarget(target, types, allowedDropOperations, getNextTarget, wrap) {
1769
- if (wrap === void 0) {
1770
- wrap = true;
1771
- }
1772
-
1773
- let seenRoot = 0;
1774
- let operation;
1775
-
1776
- do {
1777
- let nextTarget = getNextTarget(target, wrap);
1778
-
1779
- if (!nextTarget) {
1780
- return null;
1041
+ let onDragLeave = (e)=>{
1042
+ e.stopPropagation();
1043
+ state.dragEnterCount--;
1044
+ if (state.dragEnterCount > 0) return;
1045
+ if (typeof options.onDropExit === 'function' && state.dropEffect !== 'none') {
1046
+ let rect = e.currentTarget.getBoundingClientRect();
1047
+ options.onDropExit({
1048
+ type: 'dropexit',
1049
+ x: e.clientX - rect.x,
1050
+ y: e.clientY - rect.y
1051
+ });
1781
1052
  }
1782
-
1783
- target = nextTarget;
1784
- operation = localState.state.getDropOperation(nextTarget, types, allowedDropOperations);
1785
-
1786
- if (target.type === 'root') {
1787
- seenRoot++;
1053
+ setDropTarget(false);
1054
+ clearTimeout(state.dropActivateTimer);
1055
+ };
1056
+ let onDrop = (e)=>{
1057
+ e.preventDefault();
1058
+ e.stopPropagation();
1059
+ if (typeof options.onDrop === 'function') {
1060
+ let dropOperation = $b412d65e07c8d230$export$608ecc6f1b23c35d[state.dropEffect];
1061
+ let items = $6d32ba78df89e8ed$export$d9e760437831f8b3(e.dataTransfer);
1062
+ let rect = e.currentTarget.getBoundingClientRect();
1063
+ let event = {
1064
+ type: 'drop',
1065
+ x: e.clientX - rect.x,
1066
+ y: e.clientY - rect.y,
1067
+ items: items,
1068
+ dropOperation: dropOperation
1069
+ };
1070
+ // Wait a frame to dispatch the drop event so that we ensure the dragend event fires first.
1071
+ // Otherwise, if onDrop removes the original dragged element from the DOM, dragend will never be fired.
1072
+ // This behavior is consistent across browsers, but see this issue for details:
1073
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=460801
1074
+ setTimeout(()=>{
1075
+ options.onDrop(event);
1076
+ }, 0);
1788
1077
  }
1789
- } while (operation === 'cancel' && !localState.state.isDropTarget(target) && seenRoot < 2);
1790
-
1791
- if (operation === 'cancel') {
1792
- return null;
1793
- }
1794
-
1795
- return target;
1078
+ if (typeof options.onDropExit === 'function') {
1079
+ let rect = e.currentTarget.getBoundingClientRect();
1080
+ options.onDropExit({
1081
+ type: 'dropexit',
1082
+ x: e.clientX - rect.x,
1083
+ y: e.clientY - rect.y
1084
+ });
1085
+ }
1086
+ state.dragEnterCount = 0;
1087
+ setDropTarget(false);
1088
+ clearTimeout(state.dropActivateTimer);
1089
+ };
1090
+ let optionsRef = $3kwX1$useRef(options);
1091
+ optionsRef.current = options;
1092
+ $3kwX1$useLayoutEffect(()=>$3f1be781b0a897ea$export$c28d9fb4a54e471a({
1093
+ element: optionsRef.current.ref.current,
1094
+ getDropOperation: optionsRef.current.getDropOperation,
1095
+ onDropEnter (e) {
1096
+ setDropTarget(true);
1097
+ if (typeof optionsRef.current.onDropEnter === 'function') optionsRef.current.onDropEnter(e);
1098
+ },
1099
+ onDropExit (e) {
1100
+ setDropTarget(false);
1101
+ if (typeof optionsRef.current.onDropExit === 'function') optionsRef.current.onDropExit(e);
1102
+ },
1103
+ onDrop (e) {
1104
+ if (typeof optionsRef.current.onDrop === 'function') optionsRef.current.onDrop(e);
1105
+ },
1106
+ onDropActivate (e) {
1107
+ if (typeof optionsRef.current.onDropActivate === 'function') optionsRef.current.onDropActivate(e);
1108
+ }
1109
+ })
1110
+ , [
1111
+ optionsRef
1112
+ ]);
1113
+ let { dropProps: dropProps } = $354c3dcb83b4da5c$export$62447ad3d2ec7da6();
1114
+ return {
1115
+ dropProps: {
1116
+ ...dropProps,
1117
+ onDragEnter: onDragEnter,
1118
+ onDragOver: onDragOver,
1119
+ onDragLeave: onDragLeave,
1120
+ onDrop: onDrop
1121
+ },
1122
+ isDropTarget: isDropTarget
1796
1123
  };
1124
+ }
1125
+ function $0da183e6051d30ca$var$effectAllowedToOperations(effectAllowed) {
1126
+ let allowedOperationsBits = $b412d65e07c8d230$export$9bbdfc78cf083e16[effectAllowed];
1127
+ let allowedOperations = [];
1128
+ if (allowedOperationsBits & $b412d65e07c8d230$export$60b7b4bcf3903d8e.move) allowedOperations.push('move');
1129
+ if (allowedOperationsBits & $b412d65e07c8d230$export$60b7b4bcf3903d8e.copy) allowedOperations.push('copy');
1130
+ if (allowedOperationsBits & $b412d65e07c8d230$export$60b7b4bcf3903d8e.link) allowedOperations.push('link');
1131
+ return allowedOperations;
1132
+ }
1797
1133
 
1798
- return $f2f44a26f7541d104d10e68c115a897a$export$registerDropTarget({
1799
- element: ref.current,
1800
1134
 
1801
- getDropOperation(types, allowedOperations) {
1802
- if (localState.state.target) {
1803
- return localState.state.getDropOperation(localState.state.target, types, allowedOperations);
1804
- } // Check if any of the targets accept the drop.
1805
- // TODO: should we have a faster way of doing this or e.g. for pagination?
1135
+ var $84a095b08b269050$exports = {};
1806
1136
 
1137
+ $parcel$export($84a095b08b269050$exports, "useDroppableCollection", () => $84a095b08b269050$export$f4e2f423c21f7b04);
1807
1138
 
1808
- let target = nextValidTarget(null, types, allowedOperations, getNextTarget);
1809
- return target ? 'move' : 'cancel';
1810
- },
1811
1139
 
1812
- onDropEnter(e, drag) {
1813
- let types = $daf765036c8e081b3420fc4f613ad96$export$getTypes(drag.items);
1814
- let selectionManager = localState.state.selectionManager;
1815
- let target; // When entering the droppable collection for the first time, the default drop target
1816
- // is after the focused key.
1817
1140
 
1818
- let key = selectionManager.focusedKey;
1819
- let dropPosition = 'after'; // If the focused key is a cell, get the parent item instead.
1820
- // For now, we assume that individual cells cannot be dropped on.
1821
1141
 
1822
- let item = localState.state.collection.getItem(key);
1823
1142
 
1824
- if ((item == null ? void 0 : item.type) === 'cell') {
1825
- key = item.parentKey;
1826
- } // If the focused item is also selected, the default drop target is after the last selected item.
1827
- // But if the focused key is the first selected item, then default to before the first selected item.
1828
- // This is to make reordering lists slightly easier. If you select top down, we assume you want to
1829
- // move the items down. If you select bottom up, we assume you want to move the items up.
1830
1143
 
1831
1144
 
1832
- if (selectionManager.isSelected(key)) {
1833
- if (selectionManager.selectedKeys.size > 1 && selectionManager.firstSelectedKey === key) {
1834
- dropPosition = 'before';
1835
- } else {
1836
- key = selectionManager.lastSelectedKey;
1837
- }
1145
+ const $643307e080d84be7$var$AUTOSCROLL_AREA_SIZE = 20;
1146
+ function $643307e080d84be7$export$6323452ca4533ed8(ref) {
1147
+ let scrollableRef = $3kwX1$useRef(null);
1148
+ $3kwX1$useEffect(()=>{
1149
+ if (ref.current) scrollableRef.current = $3kwX1$getScrollParent(ref.current);
1150
+ }, [
1151
+ ref
1152
+ ]);
1153
+ let state = $3kwX1$useRef({
1154
+ timer: null,
1155
+ dx: 0,
1156
+ dy: 0
1157
+ }).current;
1158
+ let scroll = $3kwX1$useCallback(()=>{
1159
+ scrollableRef.current.scrollLeft += state.dx;
1160
+ scrollableRef.current.scrollTop += state.dy;
1161
+ if (state.timer) state.timer = requestAnimationFrame(scroll);
1162
+ }, [
1163
+ scrollableRef,
1164
+ state
1165
+ ]);
1166
+ return {
1167
+ move (x, y) {
1168
+ // Most browsers auto scroll natively, but WebKit on macOS does not (iOS does 🤷‍♂️).
1169
+ // https://bugs.webkit.org/show_bug.cgi?id=222636
1170
+ if (!$3kwX1$isWebKit() || $3kwX1$isIOS() || !scrollableRef.current) return;
1171
+ let box = scrollableRef.current.getBoundingClientRect();
1172
+ let left = $643307e080d84be7$var$AUTOSCROLL_AREA_SIZE;
1173
+ let top = $643307e080d84be7$var$AUTOSCROLL_AREA_SIZE;
1174
+ let bottom = box.height - $643307e080d84be7$var$AUTOSCROLL_AREA_SIZE;
1175
+ let right = box.width - $643307e080d84be7$var$AUTOSCROLL_AREA_SIZE;
1176
+ if (x < left || x > right || y < top || y > bottom) {
1177
+ if (x < left) state.dx = x - left;
1178
+ else if (x > right) state.dx = x - right;
1179
+ if (y < top) state.dy = y - top;
1180
+ else if (y > bottom) state.dy = y - bottom;
1181
+ if (!state.timer) state.timer = requestAnimationFrame(scroll);
1182
+ } else this.stop();
1183
+ },
1184
+ stop () {
1185
+ if (state.timer) {
1186
+ cancelAnimationFrame(state.timer);
1187
+ state.timer = null;
1188
+ }
1838
1189
  }
1190
+ };
1191
+ }
1839
1192
 
1840
- if (key != null) {
1841
- target = {
1842
- type: 'item',
1843
- key,
1844
- dropPosition
1845
- }; // If the default target is not valid, find the next one that is.
1846
-
1847
- if (localState.state.getDropOperation(target, types, drag.allowedDropOperations) === 'cancel') {
1848
- var _nextValidTarget;
1849
1193
 
1850
- target = (_nextValidTarget = nextValidTarget(target, types, drag.allowedDropOperations, getNextTarget, false)) != null ? _nextValidTarget : nextValidTarget(target, types, drag.allowedDropOperations, getPreviousTarget, false);
1851
- }
1852
- } // If no focused key, then start from the root.
1853
1194
 
1854
1195
 
1855
- if (!target) {
1856
- target = nextValidTarget(null, types, drag.allowedDropOperations, getNextTarget);
1196
+ const $84a095b08b269050$var$DROP_POSITIONS = [
1197
+ 'before',
1198
+ 'on',
1199
+ 'after'
1200
+ ];
1201
+ function $84a095b08b269050$export$f4e2f423c21f7b04(props, state1, ref) {
1202
+ let localState = $3kwX1$useRef({
1203
+ props: props,
1204
+ state: state1,
1205
+ nextTarget: null,
1206
+ dropOperation: null
1207
+ }).current;
1208
+ localState.props = props;
1209
+ localState.state = state1;
1210
+ let autoScroll = $643307e080d84be7$export$6323452ca4533ed8(ref);
1211
+ let { dropProps: dropProps } = $0da183e6051d30ca$export$ccdee5eaf73cf661({
1212
+ ref: ref,
1213
+ onDropEnter (e) {
1214
+ let target = props.getDropTargetFromPoint(e.x, e.y);
1215
+ state1.setTarget(target);
1216
+ },
1217
+ onDropMove (e) {
1218
+ state1.setTarget(localState.nextTarget);
1219
+ autoScroll.move(e.x, e.y);
1220
+ },
1221
+ getDropOperationForPoint (types, allowedOperations, x, y) {
1222
+ let target = props.getDropTargetFromPoint(x, y);
1223
+ if (!target) {
1224
+ localState.dropOperation = 'cancel';
1225
+ localState.nextTarget = null;
1226
+ return 'cancel';
1227
+ }
1228
+ if (state1.isDropTarget(target)) {
1229
+ localState.nextTarget = target;
1230
+ return localState.dropOperation;
1231
+ }
1232
+ localState.dropOperation = state1.getDropOperation(target, types, allowedOperations);
1233
+ // If the target doesn't accept the drop, see if the root accepts it instead.
1234
+ if (localState.dropOperation === 'cancel') {
1235
+ let rootTarget = {
1236
+ type: 'root'
1237
+ };
1238
+ let dropOperation = state1.getDropOperation(rootTarget, types, allowedOperations);
1239
+ if (dropOperation !== 'cancel') {
1240
+ target = rootTarget;
1241
+ localState.dropOperation = dropOperation;
1242
+ }
1243
+ }
1244
+ localState.nextTarget = localState.dropOperation === 'cancel' ? null : target;
1245
+ return localState.dropOperation;
1246
+ },
1247
+ onDropExit () {
1248
+ state1.setTarget(null);
1249
+ autoScroll.stop();
1250
+ },
1251
+ onDropActivate (e) {
1252
+ if (state1.target?.type === 'item' && state1.target?.dropPosition === 'on' && typeof props.onDropActivate === 'function') props.onDropActivate({
1253
+ type: 'dropactivate',
1254
+ x: e.x,
1255
+ y: e.y,
1256
+ target: state1.target
1257
+ });
1258
+ },
1259
+ onDrop (e) {
1260
+ if (state1.target && typeof props.onDrop === 'function') onDrop(e, state1.target);
1857
1261
  }
1858
-
1859
- localState.state.setTarget(target);
1860
- },
1861
-
1862
- onDropExit() {
1863
- localState.state.setTarget(null);
1864
- },
1865
-
1866
- onDropTargetEnter(target) {
1867
- localState.state.setTarget(target);
1868
- },
1869
-
1870
- onDropActivate(e) {
1871
- var _localState$state$tar, _localState$state$tar2;
1872
-
1873
- if (((_localState$state$tar = localState.state.target) == null ? void 0 : _localState$state$tar.type) === 'item' && ((_localState$state$tar2 = localState.state.target) == null ? void 0 : _localState$state$tar2.dropPosition) === 'on' && typeof localState.props.onDropActivate === 'function') {
1874
- localState.props.onDropActivate({
1875
- type: 'dropactivate',
1262
+ });
1263
+ let droppingState = $3kwX1$useRef(null);
1264
+ let onDrop = $3kwX1$useCallback((e, target)=>{
1265
+ let { state: state2 } = localState;
1266
+ // Focus the collection.
1267
+ state2.selectionManager.setFocused(true);
1268
+ // Save some state of the collection/selection before the drop occurs so we can compare later.
1269
+ let focusedKey = state2.selectionManager.focusedKey;
1270
+ droppingState.current = {
1271
+ timeout: null,
1272
+ focusedKey: focusedKey,
1273
+ collection: state2.collection,
1274
+ selectedKeys: state2.selectionManager.selectedKeys
1275
+ };
1276
+ localState.props.onDrop({
1277
+ type: 'drop',
1876
1278
  x: e.x,
1877
- // todo
1878
1279
  y: e.y,
1879
- target: localState.state.target
1880
- });
1881
- }
1882
- },
1883
-
1884
- onDrop(e, target) {
1885
- if (localState.state.target && typeof localState.props.onDrop === 'function') {
1886
- onDrop(e, target || localState.state.target);
1280
+ target: target,
1281
+ items: e.items,
1282
+ dropOperation: e.dropOperation
1283
+ });
1284
+ // Wait for a short time period after the onDrop is called to allow the data to be read asynchronously
1285
+ // and for React to re-render. If an insert occurs during this time, it will be selected/focused below.
1286
+ // If items are not "immediately" inserted by the onDrop handler, the application will need to handle
1287
+ // selecting and focusing those items themselves.
1288
+ droppingState.current.timeout = setTimeout(()=>{
1289
+ // If focus didn't move already (e.g. due to an insert), and the user dropped on an item,
1290
+ // focus that item and show the focus ring to give the user feedback that the drop occurred.
1291
+ // Also show the focus ring if the focused key is not selected, e.g. in case of a reorder.
1292
+ let { state: state } = localState;
1293
+ if (state.selectionManager.focusedKey === focusedKey) {
1294
+ if (target.type === 'item' && target.dropPosition === 'on' && state.collection.getItem(target.key) != null) {
1295
+ state.selectionManager.setFocusedKey(target.key);
1296
+ state.selectionManager.setFocused(true);
1297
+ $3kwX1$setInteractionModality('keyboard');
1298
+ } else if (!state.selectionManager.isSelected(focusedKey)) $3kwX1$setInteractionModality('keyboard');
1299
+ }
1300
+ droppingState.current = null;
1301
+ }, 50);
1302
+ }, [
1303
+ localState
1304
+ ]);
1305
+ // eslint-disable-next-line arrow-body-style
1306
+ $3kwX1$useEffect(()=>{
1307
+ return ()=>{
1308
+ if (droppingState.current) clearTimeout(droppingState.current.timeout);
1309
+ };
1310
+ }, []);
1311
+ $3kwX1$useLayoutEffect(()=>{
1312
+ // If an insert occurs during a drop, we want to immediately select these items to give
1313
+ // feedback to the user that a drop occurred. Only do this if the selection didn't change
1314
+ // since the drop started so we don't override if the user or application did something.
1315
+ if (droppingState.current && state1.selectionManager.isFocused && state1.collection.size > droppingState.current.collection.size && state1.selectionManager.isSelectionEqual(droppingState.current.selectedKeys)) {
1316
+ let newKeys = new Set();
1317
+ for (let key of state1.collection.getKeys())if (!droppingState.current.collection.getItem(key)) newKeys.add(key);
1318
+ state1.selectionManager.setSelectedKeys(newKeys);
1319
+ // If the focused item didn't change since the drop occurred, also focus the first
1320
+ // inserted item. If selection is disabled, then also show the focus ring so there
1321
+ // is some indication that items were added.
1322
+ if (state1.selectionManager.focusedKey === droppingState.current.focusedKey) {
1323
+ let first = newKeys.keys().next().value;
1324
+ state1.selectionManager.setFocusedKey(first);
1325
+ if (state1.selectionManager.selectionMode === 'none') $3kwX1$setInteractionModality('keyboard');
1326
+ }
1327
+ droppingState.current = null;
1887
1328
  }
1888
- },
1889
-
1890
- onKeyDown(e, drag) {
1891
- let {
1892
- keyboardDelegate
1893
- } = localState.props;
1894
- let types = $daf765036c8e081b3420fc4f613ad96$export$getTypes(drag.items);
1895
-
1896
- switch (e.key) {
1897
- case 'ArrowDown':
1898
- {
1899
- if (keyboardDelegate.getKeyBelow) {
1900
- let target = nextValidTarget(localState.state.target, types, drag.allowedDropOperations, getNextTarget);
1901
- localState.state.setTarget(target);
1902
- }
1903
-
1904
- break;
1329
+ });
1330
+ $3kwX1$useEffect(()=>{
1331
+ let getNextTarget1 = (target, wrap = true)=>{
1332
+ if (!target) return {
1333
+ type: 'root'
1334
+ };
1335
+ let { keyboardDelegate: keyboardDelegate } = localState.props;
1336
+ let nextKey = target.type === 'item' ? keyboardDelegate.getKeyBelow(target.key) : keyboardDelegate.getFirstKey();
1337
+ let dropPosition = 'before';
1338
+ if (target.type === 'item') {
1339
+ let positionIndex = $84a095b08b269050$var$DROP_POSITIONS.indexOf(target.dropPosition);
1340
+ let nextDropPosition = $84a095b08b269050$var$DROP_POSITIONS[positionIndex + 1];
1341
+ if (positionIndex < $84a095b08b269050$var$DROP_POSITIONS.length - 1 && !(nextDropPosition === 'after' && nextKey != null)) return {
1342
+ type: 'item',
1343
+ key: target.key,
1344
+ dropPosition: nextDropPosition
1345
+ };
1346
+ // If the last drop position was 'after', then 'before' on the next key is equivalent.
1347
+ // Switch to 'on' instead.
1348
+ if (target.dropPosition === 'after') dropPosition = 'on';
1905
1349
  }
1906
-
1907
- case 'ArrowUp':
1908
- {
1909
- if (keyboardDelegate.getKeyAbove) {
1910
- let target = nextValidTarget(localState.state.target, types, drag.allowedDropOperations, getPreviousTarget);
1911
- localState.state.setTarget(target);
1912
- }
1913
-
1914
- break;
1350
+ if (nextKey == null) {
1351
+ if (wrap) return {
1352
+ type: 'root'
1353
+ };
1354
+ return null;
1915
1355
  }
1916
-
1917
- case 'Home':
1918
- {
1919
- if (keyboardDelegate.getFirstKey) {
1920
- let target = nextValidTarget(null, types, drag.allowedDropOperations, getNextTarget);
1921
- localState.state.setTarget(target);
1922
- }
1923
-
1924
- break;
1356
+ return {
1357
+ type: 'item',
1358
+ key: nextKey,
1359
+ dropPosition: dropPosition
1360
+ };
1361
+ };
1362
+ let getPreviousTarget = (target, wrap = true)=>{
1363
+ let { keyboardDelegate: keyboardDelegate } = localState.props;
1364
+ let nextKey = target?.type === 'item' ? keyboardDelegate.getKeyAbove(target.key) : keyboardDelegate.getLastKey();
1365
+ let dropPosition = !target || target.type === 'root' ? 'after' : 'on';
1366
+ if (target?.type === 'item') {
1367
+ let positionIndex = $84a095b08b269050$var$DROP_POSITIONS.indexOf(target.dropPosition);
1368
+ let nextDropPosition = $84a095b08b269050$var$DROP_POSITIONS[positionIndex - 1];
1369
+ if (positionIndex > 0 && nextDropPosition !== 'after') return {
1370
+ type: 'item',
1371
+ key: target.key,
1372
+ dropPosition: nextDropPosition
1373
+ };
1374
+ // If the last drop position was 'before', then 'after' on the previous key is equivalent.
1375
+ // Switch to 'on' instead.
1376
+ if (target.dropPosition === 'before') dropPosition = 'on';
1925
1377
  }
1926
-
1927
- case 'End':
1928
- {
1929
- if (keyboardDelegate.getLastKey) {
1930
- let target = nextValidTarget(null, types, drag.allowedDropOperations, getPreviousTarget);
1378
+ if (nextKey == null) {
1379
+ if (wrap) return {
1380
+ type: 'root'
1381
+ };
1382
+ return null;
1383
+ }
1384
+ return {
1385
+ type: 'item',
1386
+ key: nextKey,
1387
+ dropPosition: dropPosition
1388
+ };
1389
+ };
1390
+ let nextValidTarget = (target, types, allowedDropOperations, getNextTarget, wrap = true)=>{
1391
+ let seenRoot = 0;
1392
+ let operation;
1393
+ do {
1394
+ let nextTarget = getNextTarget(target, wrap);
1395
+ if (!nextTarget) return null;
1396
+ target = nextTarget;
1397
+ operation = localState.state.getDropOperation(nextTarget, types, allowedDropOperations);
1398
+ if (target.type === 'root') seenRoot++;
1399
+ }while (operation === 'cancel' && !localState.state.isDropTarget(target) && seenRoot < 2)
1400
+ if (operation === 'cancel') return null;
1401
+ return target;
1402
+ };
1403
+ return $3f1be781b0a897ea$export$c28d9fb4a54e471a({
1404
+ element: ref.current,
1405
+ getDropOperation (types, allowedOperations) {
1406
+ if (localState.state.target) return localState.state.getDropOperation(localState.state.target, types, allowedOperations);
1407
+ // Check if any of the targets accept the drop.
1408
+ // TODO: should we have a faster way of doing this or e.g. for pagination?
1409
+ let target = nextValidTarget(null, types, allowedOperations, getNextTarget1);
1410
+ return target ? 'move' : 'cancel';
1411
+ },
1412
+ onDropEnter (e, drag) {
1413
+ let types = $6d32ba78df89e8ed$export$e1d41611756c6326(drag.items);
1414
+ let selectionManager = localState.state.selectionManager;
1415
+ let target;
1416
+ // When entering the droppable collection for the first time, the default drop target
1417
+ // is after the focused key.
1418
+ let key = selectionManager.focusedKey;
1419
+ let dropPosition = 'after';
1420
+ // If the focused key is a cell, get the parent item instead.
1421
+ // For now, we assume that individual cells cannot be dropped on.
1422
+ let item = localState.state.collection.getItem(key);
1423
+ if (item?.type === 'cell') key = item.parentKey;
1424
+ // If the focused item is also selected, the default drop target is after the last selected item.
1425
+ // But if the focused key is the first selected item, then default to before the first selected item.
1426
+ // This is to make reordering lists slightly easier. If you select top down, we assume you want to
1427
+ // move the items down. If you select bottom up, we assume you want to move the items up.
1428
+ if (selectionManager.isSelected(key)) {
1429
+ if (selectionManager.selectedKeys.size > 1 && selectionManager.firstSelectedKey === key) dropPosition = 'before';
1430
+ else key = selectionManager.lastSelectedKey;
1431
+ }
1432
+ if (key != null) {
1433
+ target = {
1434
+ type: 'item',
1435
+ key: key,
1436
+ dropPosition: dropPosition
1437
+ };
1438
+ // If the default target is not valid, find the next one that is.
1439
+ if (localState.state.getDropOperation(target, types, drag.allowedDropOperations) === 'cancel') target = nextValidTarget(target, types, drag.allowedDropOperations, getNextTarget1, false) ?? nextValidTarget(target, types, drag.allowedDropOperations, getPreviousTarget, false);
1440
+ }
1441
+ // If no focused key, then start from the root.
1442
+ if (!target) target = nextValidTarget(null, types, drag.allowedDropOperations, getNextTarget1);
1931
1443
  localState.state.setTarget(target);
1932
- }
1933
-
1934
- break;
1444
+ },
1445
+ onDropExit () {
1446
+ localState.state.setTarget(null);
1447
+ },
1448
+ onDropTargetEnter (target) {
1449
+ localState.state.setTarget(target);
1450
+ },
1451
+ onDropActivate (e) {
1452
+ if (localState.state.target?.type === 'item' && localState.state.target?.dropPosition === 'on' && typeof localState.props.onDropActivate === 'function') localState.props.onDropActivate({
1453
+ type: 'dropactivate',
1454
+ x: e.x,
1455
+ y: e.y,
1456
+ target: localState.state.target
1457
+ });
1458
+ },
1459
+ onDrop (e, target) {
1460
+ if (localState.state.target && typeof localState.props.onDrop === 'function') onDrop(e, target || localState.state.target);
1461
+ },
1462
+ onKeyDown (e, drag) {
1463
+ let { keyboardDelegate: keyboardDelegate } = localState.props;
1464
+ let types = $6d32ba78df89e8ed$export$e1d41611756c6326(drag.items);
1465
+ switch(e.key){
1466
+ case 'ArrowDown':
1467
+ if (keyboardDelegate.getKeyBelow) {
1468
+ let target = nextValidTarget(localState.state.target, types, drag.allowedDropOperations, getNextTarget1);
1469
+ localState.state.setTarget(target);
1470
+ }
1471
+ break;
1472
+ case 'ArrowUp':
1473
+ if (keyboardDelegate.getKeyAbove) {
1474
+ let target = nextValidTarget(localState.state.target, types, drag.allowedDropOperations, getPreviousTarget);
1475
+ localState.state.setTarget(target);
1476
+ }
1477
+ break;
1478
+ case 'Home':
1479
+ if (keyboardDelegate.getFirstKey) {
1480
+ let target = nextValidTarget(null, types, drag.allowedDropOperations, getNextTarget1);
1481
+ localState.state.setTarget(target);
1482
+ }
1483
+ break;
1484
+ case 'End':
1485
+ if (keyboardDelegate.getLastKey) {
1486
+ let target = nextValidTarget(null, types, drag.allowedDropOperations, getPreviousTarget);
1487
+ localState.state.setTarget(target);
1488
+ }
1489
+ break;
1490
+ case 'PageDown':
1491
+ if (keyboardDelegate.getKeyPageBelow) {
1492
+ let target = localState.state.target;
1493
+ if (!target) target = nextValidTarget(null, types, drag.allowedDropOperations, getNextTarget1);
1494
+ else {
1495
+ // If on the root, go to the item a page below the top. Otherwise a page below the current item.
1496
+ let nextKey = keyboardDelegate.getKeyPageBelow(target.type === 'item' ? target.key : keyboardDelegate.getFirstKey());
1497
+ let dropPosition = target.type === 'item' ? target.dropPosition : 'after';
1498
+ // If there is no next key, or we are starting on the last key, jump to the last possible position.
1499
+ if (nextKey == null || target.type === 'item' && target.key === keyboardDelegate.getLastKey()) {
1500
+ nextKey = keyboardDelegate.getLastKey();
1501
+ dropPosition = 'after';
1502
+ }
1503
+ target = {
1504
+ type: 'item',
1505
+ key: nextKey,
1506
+ dropPosition: dropPosition
1507
+ };
1508
+ // If the target does not accept the drop, find the next valid target.
1509
+ // If no next valid target, find the previous valid target.
1510
+ let operation = localState.state.getDropOperation(target, types, drag.allowedDropOperations);
1511
+ if (operation === 'cancel') target = nextValidTarget(target, types, drag.allowedDropOperations, getNextTarget1, false) ?? nextValidTarget(target, types, drag.allowedDropOperations, getPreviousTarget, false);
1512
+ }
1513
+ localState.state.setTarget(target ?? localState.state.target);
1514
+ }
1515
+ break;
1516
+ case 'PageUp':
1517
+ {
1518
+ if (!keyboardDelegate.getKeyPageAbove) break;
1519
+ let target = localState.state.target;
1520
+ if (!target) target = nextValidTarget(null, types, drag.allowedDropOperations, getPreviousTarget);
1521
+ else if (target.type === 'item') {
1522
+ // If at the top already, switch to the root. Otherwise navigate a page up.
1523
+ if (target.key === keyboardDelegate.getFirstKey()) target = {
1524
+ type: 'root'
1525
+ };
1526
+ else {
1527
+ let nextKey = keyboardDelegate.getKeyPageAbove(target.key);
1528
+ let dropPosition = target.dropPosition;
1529
+ if (nextKey == null) {
1530
+ nextKey = keyboardDelegate.getFirstKey();
1531
+ dropPosition = 'before';
1532
+ }
1533
+ target = {
1534
+ type: 'item',
1535
+ key: nextKey,
1536
+ dropPosition: dropPosition
1537
+ };
1538
+ }
1539
+ // If the target does not accept the drop, find the previous valid target.
1540
+ // If no next valid target, find the next valid target.
1541
+ let operation = localState.state.getDropOperation(target, types, drag.allowedDropOperations);
1542
+ if (operation === 'cancel') target = nextValidTarget(target, types, drag.allowedDropOperations, getPreviousTarget, false) ?? nextValidTarget(target, types, drag.allowedDropOperations, getNextTarget1, false);
1543
+ }
1544
+ localState.state.setTarget(target ?? localState.state.target);
1545
+ break;
1546
+ }
1547
+ }
1935
1548
  }
1549
+ });
1550
+ }, [
1551
+ localState,
1552
+ ref,
1553
+ onDrop
1554
+ ]);
1555
+ let id = $6d32ba78df89e8ed$export$b1601eb39394a581(state1);
1556
+ return {
1557
+ collectionProps: $3kwX1$mergeProps(dropProps, {
1558
+ id: id,
1559
+ // Remove description from collection element. If dropping on the entire collection,
1560
+ // there should be a drop indicator that has this description, so no need to double announce.
1561
+ 'aria-describedby': null
1562
+ })
1563
+ };
1564
+ }
1936
1565
 
1937
- case 'PageDown':
1938
- {
1939
- if (keyboardDelegate.getKeyPageBelow) {
1940
- var _target;
1941
-
1942
- let target = localState.state.target;
1943
-
1944
- if (!target) {
1945
- target = nextValidTarget(null, types, drag.allowedDropOperations, getNextTarget);
1946
- } else {
1947
- // If on the root, go to the item a page below the top. Otherwise a page below the current item.
1948
- let nextKey = keyboardDelegate.getKeyPageBelow(target.type === 'item' ? target.key : keyboardDelegate.getFirstKey());
1949
- let dropPosition = target.type === 'item' ? target.dropPosition : 'after'; // If there is no next key, or we are starting on the last key, jump to the last possible position.
1950
-
1951
- if (nextKey == null || target.type === 'item' && target.key === keyboardDelegate.getLastKey()) {
1952
- nextKey = keyboardDelegate.getLastKey();
1953
- dropPosition = 'after';
1954
- }
1955
1566
 
1956
- target = {
1957
- type: 'item',
1958
- key: nextKey,
1959
- dropPosition
1960
- }; // If the target does not accept the drop, find the next valid target.
1961
- // If no next valid target, find the previous valid target.
1567
+ var $45684752568fdb26$exports = {};
1962
1568
 
1963
- let operation = localState.state.getDropOperation(target, types, drag.allowedDropOperations);
1569
+ $parcel$export($45684752568fdb26$exports, "useDroppableItem", () => $45684752568fdb26$export$f7b0c5d28b66b6a5);
1964
1570
 
1965
- if (operation === 'cancel') {
1966
- var _nextValidTarget2;
1967
1571
 
1968
- target = (_nextValidTarget2 = nextValidTarget(target, types, drag.allowedDropOperations, getNextTarget, false)) != null ? _nextValidTarget2 : nextValidTarget(target, types, drag.allowedDropOperations, getPreviousTarget, false);
1969
- }
1970
- }
1971
1572
 
1972
- localState.state.setTarget((_target = target) != null ? _target : localState.state.target);
1973
- }
1974
1573
 
1975
- break;
1574
+ function $45684752568fdb26$export$f7b0c5d28b66b6a5(options, state, ref) {
1575
+ let { dropProps: dropProps } = $354c3dcb83b4da5c$export$62447ad3d2ec7da6();
1576
+ $3kwX1$useEffect(()=>{
1577
+ if (ref.current) return $3f1be781b0a897ea$export$aef80212ac99c003({
1578
+ element: ref.current,
1579
+ target: options.target,
1580
+ getDropOperation (types, allowedOperations) {
1581
+ return state.getDropOperation(options.target, types, allowedOperations);
1976
1582
  }
1583
+ });
1584
+ }, [
1585
+ ref,
1586
+ options.target,
1587
+ state
1588
+ ]);
1589
+ let dragSession = $3f1be781b0a897ea$export$418e185dd3f1b968();
1590
+ let isValidDropTarget = dragSession && state.getDropOperation(options.target, $6d32ba78df89e8ed$export$e1d41611756c6326(dragSession.dragTarget.items), dragSession.dragTarget.allowedDropOperations) !== 'cancel';
1591
+ let isDropTarget = state.isDropTarget(options.target);
1592
+ $3kwX1$useEffect(()=>{
1593
+ if (dragSession && isDropTarget && ref.current) ref.current.focus();
1594
+ }, [
1595
+ isDropTarget,
1596
+ dragSession,
1597
+ ref
1598
+ ]);
1599
+ return {
1600
+ dropProps: {
1601
+ ...dropProps,
1602
+ 'aria-hidden': !dragSession || isValidDropTarget ? undefined : 'true'
1603
+ }
1604
+ };
1605
+ }
1977
1606
 
1978
- case 'PageUp':
1979
- {
1980
- var _target2;
1981
-
1982
- if (!keyboardDelegate.getKeyPageAbove) {
1983
- break;
1984
- }
1985
-
1986
- let target = localState.state.target;
1987
-
1988
- if (!target) {
1989
- target = nextValidTarget(null, types, drag.allowedDropOperations, getPreviousTarget);
1990
- } else if (target.type === 'item') {
1991
- // If at the top already, switch to the root. Otherwise navigate a page up.
1992
- if (target.key === keyboardDelegate.getFirstKey()) {
1993
- target = {
1994
- type: 'root'
1995
- };
1996
- } else {
1997
- let nextKey = keyboardDelegate.getKeyPageAbove(target.key);
1998
- let dropPosition = target.dropPosition;
1999
-
2000
- if (nextKey == null) {
2001
- nextKey = keyboardDelegate.getFirstKey();
2002
- dropPosition = 'before';
2003
- }
2004
1607
 
2005
- target = {
2006
- type: 'item',
2007
- key: nextKey,
2008
- dropPosition
2009
- };
2010
- } // If the target does not accept the drop, find the previous valid target.
2011
- // If no next valid target, find the next valid target.
1608
+ var $2daf78ecd1d9c0e9$exports = {};
2012
1609
 
1610
+ $parcel$export($2daf78ecd1d9c0e9$exports, "useDropIndicator", () => $2daf78ecd1d9c0e9$export$8d0e41d2815afac5);
2013
1611
 
2014
- let operation = localState.state.getDropOperation(target, types, drag.allowedDropOperations);
2015
1612
 
2016
- if (operation === 'cancel') {
2017
- var _nextValidTarget3;
2018
1613
 
2019
- target = (_nextValidTarget3 = nextValidTarget(target, types, drag.allowedDropOperations, getPreviousTarget, false)) != null ? _nextValidTarget3 : nextValidTarget(target, types, drag.allowedDropOperations, getNextTarget, false);
2020
- }
2021
- }
2022
1614
 
2023
- localState.state.setTarget((_target2 = target) != null ? _target2 : localState.state.target);
2024
- break;
2025
- }
2026
- }
2027
- }
2028
1615
 
2029
- });
2030
- }, [localState, ref, onDrop]);
2031
- let id = $daf765036c8e081b3420fc4f613ad96$export$useDroppableCollectionId(state);
2032
- return {
2033
- collectionProps: mergeProps(dropProps, {
2034
- id,
2035
- // Remove description from collection element. If dropping on the entire collection,
2036
- // there should be a drop indicator that has this description, so no need to double announce.
2037
- 'aria-describedby': null
2038
- })
2039
- };
2040
- }
2041
- export function useDroppableItem(options, state, ref) {
2042
- let {
2043
- dropProps
2044
- } = $c50618638a6eda91cf58d6698d439d4$export$useVirtualDrop();
2045
- useEffect(() => {
2046
- if (ref.current) {
2047
- return $f2f44a26f7541d104d10e68c115a897a$export$registerDropItem({
2048
- element: ref.current,
2049
- target: options.target,
2050
-
2051
- getDropOperation(types, allowedOperations) {
2052
- return state.getDropOperation(options.target, types, allowedOperations);
2053
- }
2054
1616
 
2055
- });
2056
- }
2057
- }, [ref, options.target, state]);
2058
- let dragSession = $f2f44a26f7541d104d10e68c115a897a$export$useDragSession();
2059
- let isValidDropTarget = dragSession && state.getDropOperation(options.target, $daf765036c8e081b3420fc4f613ad96$export$getTypes(dragSession.dragTarget.items), dragSession.dragTarget.allowedDropOperations) !== 'cancel';
2060
- let isDropTarget = state.isDropTarget(options.target);
2061
- useEffect(() => {
2062
- if (dragSession && isDropTarget && ref.current) {
2063
- ref.current.focus();
2064
- }
2065
- }, [isDropTarget, dragSession, ref]);
2066
- return {
2067
- dropProps: _babelRuntimeHelpersEsmExtends({}, dropProps, {
2068
- 'aria-hidden': !dragSession || isValidDropTarget ? undefined : 'true'
2069
- })
2070
- };
2071
- }
2072
- // @ts-ignore
2073
- const $e65309df38042ad25da81b54d9192642$var$intlMessages = {
2074
- "ar-AE": _babelRuntimeHelpersEsmInteropRequireDefault($ea65b45ad5e7d0aed23c128bf8ad1ea2$exports).default,
2075
- "bg-BG": _babelRuntimeHelpersEsmInteropRequireDefault($c92ee777c2aef6235da0efaaab60dc61$exports).default,
2076
- "cs-CZ": _babelRuntimeHelpersEsmInteropRequireDefault($c9e276469924972853a3320763f673d$exports).default,
2077
- "da-DK": _babelRuntimeHelpersEsmInteropRequireDefault($b0325b2aec14df95ab943ec14d3bec3b$exports).default,
2078
- "de-DE": _babelRuntimeHelpersEsmInteropRequireDefault($f367814043f59b69a839ff097fd4adb8$exports).default,
2079
- "el-GR": _babelRuntimeHelpersEsmInteropRequireDefault($fe8897a7011951cab52f7814c2c9684$exports).default,
2080
- "en-US": _babelRuntimeHelpersEsmInteropRequireDefault($aea68b9c3ace3526527e1fc930d35d$exports).default,
2081
- "es-ES": _babelRuntimeHelpersEsmInteropRequireDefault($a4319d93c8291b23c0d42dea$exports).default,
2082
- "et-EE": _babelRuntimeHelpersEsmInteropRequireDefault($aa30228da98b6306a72b40036f345b$exports).default,
2083
- "fi-FI": _babelRuntimeHelpersEsmInteropRequireDefault($a5a5afea8782a33461a527d7c4a$exports).default,
2084
- "fr-FR": _babelRuntimeHelpersEsmInteropRequireDefault($b32fceb28c2b8e8e846140594714351f$exports).default,
2085
- "he-IL": _babelRuntimeHelpersEsmInteropRequireDefault($d9bdb7d78ee35d20ae60007d2accaf5$exports).default,
2086
- "hr-HR": _babelRuntimeHelpersEsmInteropRequireDefault($c14894ae7d558e9dc3011ecae5f8a96b$exports).default,
2087
- "hu-HU": _babelRuntimeHelpersEsmInteropRequireDefault($f194e25a9c86722f6a3826e7ad96c717$exports).default,
2088
- "it-IT": _babelRuntimeHelpersEsmInteropRequireDefault($cae04c9878c1e24b1bce5348e54e95a4$exports).default,
2089
- "ja-JP": _babelRuntimeHelpersEsmInteropRequireDefault($b9679eb29e949e5727cbdcf506da08c1$exports).default,
2090
- "ko-KR": _babelRuntimeHelpersEsmInteropRequireDefault($c663d68cc7455025fffd92332e200be$exports).default,
2091
- "lt-LT": _babelRuntimeHelpersEsmInteropRequireDefault($d454665d97cf724871a9c3eb05$exports).default,
2092
- "lv-LV": _babelRuntimeHelpersEsmInteropRequireDefault($ca66a3bcdd44dae4665871a98bb416e3$exports).default,
2093
- "nb-NO": _babelRuntimeHelpersEsmInteropRequireDefault($cb7e072c8b2f7c15a7e06a7ac99163$exports).default,
2094
- "nl-NL": _babelRuntimeHelpersEsmInteropRequireDefault($f9d8bf1245c4a4f581c7966119af7c$exports).default,
2095
- "pl-PL": _babelRuntimeHelpersEsmInteropRequireDefault($cd07a56ec0cb160ba15542c10691829d$exports).default,
2096
- "pt-BR": _babelRuntimeHelpersEsmInteropRequireDefault($a70fe1fa67e039d2646076dfb78cee1$exports).default,
2097
- "pt-PT": _babelRuntimeHelpersEsmInteropRequireDefault($e37cb9bf759f35580e0f57d85e98be4b$exports).default,
2098
- "ro-RO": _babelRuntimeHelpersEsmInteropRequireDefault($f4cf63884707eedcbdf4eae0b61ef1bf$exports).default,
2099
- "ru-RU": _babelRuntimeHelpersEsmInteropRequireDefault($e2321eb9f531b07389bd6bfcdd631256$exports).default,
2100
- "sk-SK": _babelRuntimeHelpersEsmInteropRequireDefault($ef19e5833adeee78e3c34d0f68fa9f31$exports).default,
2101
- "sl-SI": _babelRuntimeHelpersEsmInteropRequireDefault($b895c4fbc849f3dcfcdb2d8899ed32b4$exports).default,
2102
- "sr-SP": _babelRuntimeHelpersEsmInteropRequireDefault($b75ddb34dcfa290a634852a820c90c5$exports).default,
2103
- "sv-SE": _babelRuntimeHelpersEsmInteropRequireDefault($f010cb5a3a37b4733a80a1d1f871$exports).default,
2104
- "tr-TR": _babelRuntimeHelpersEsmInteropRequireDefault($a8e9337c82319ec72dd3b41245c71e1e$exports).default,
2105
- "uk-UA": _babelRuntimeHelpersEsmInteropRequireDefault($e74f5b955cc9ed1ca9994fc3460$exports).default,
2106
- "zh-CN": _babelRuntimeHelpersEsmInteropRequireDefault($b007023265925d07a3d47c3d12f09c5$exports).default,
2107
- "zh-TW": _babelRuntimeHelpersEsmInteropRequireDefault($f4995277bc73b497cd1257981bc3$exports).default
2108
- };
2109
- export function useDropIndicator(props, state, ref) {
2110
- let {
2111
- target
2112
- } = props;
2113
- let {
2114
- collection
2115
- } = state;
2116
- let formatMessage = useMessageFormatter($e65309df38042ad25da81b54d9192642$var$intlMessages);
2117
- let dragSession = $f2f44a26f7541d104d10e68c115a897a$export$useDragSession();
2118
- let {
2119
- dropProps
2120
- } = useDroppableItem(props, state, ref);
2121
- let id = useId();
2122
-
2123
- let getText = key => {
2124
- var _collection$getItem;
2125
-
2126
- return (_collection$getItem = collection.getItem(key)) == null ? void 0 : _collection$getItem.textValue;
2127
- };
2128
-
2129
- let label = '';
2130
- let labelledBy;
2131
-
2132
- if (target.type === 'root') {
2133
- label = formatMessage('dropOnRoot');
2134
- labelledBy = id + " " + $daf765036c8e081b3420fc4f613ad96$export$getDroppableCollectionId(state);
2135
- } else if (target.dropPosition === 'on') {
2136
- label = formatMessage('dropOnItem', {
2137
- itemText: getText(target.key)
1617
+ function $2daf78ecd1d9c0e9$export$8d0e41d2815afac5(props, state, ref) {
1618
+ let { target: target } = props;
1619
+ let { collection: collection } = state;
1620
+ let formatMessage = $3kwX1$useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($56fb93a531e5f155$exports)));
1621
+ let dragSession = $3f1be781b0a897ea$export$418e185dd3f1b968();
1622
+ let { dropProps: dropProps } = $45684752568fdb26$export$f7b0c5d28b66b6a5(props, state, ref);
1623
+ let id = $3kwX1$useId();
1624
+ let getText = (key)=>collection.getItem(key)?.textValue
1625
+ ;
1626
+ let label = '';
1627
+ let labelledBy;
1628
+ if (target.type === 'root') {
1629
+ label = formatMessage('dropOnRoot');
1630
+ labelledBy = `${id} ${$6d32ba78df89e8ed$export$3093291712f09a77(state)}`;
1631
+ } else if (target.dropPosition === 'on') label = formatMessage('dropOnItem', {
1632
+ itemText: getText(target.key)
2138
1633
  });
2139
- } else {
2140
- let before = target.dropPosition === 'before' ? collection.getKeyBefore(target.key) : target.key;
2141
- let after = target.dropPosition === 'after' ? collection.getKeyAfter(target.key) : target.key;
2142
-
2143
- if (before && after) {
2144
- label = formatMessage('insertBetween', {
2145
- beforeItemText: getText(before),
2146
- afterItemText: getText(after)
2147
- });
2148
- } else if (before) {
2149
- label = formatMessage('insertAfter', {
2150
- itemText: getText(before)
2151
- });
2152
- } else if (after) {
2153
- label = formatMessage('insertBefore', {
2154
- itemText: getText(after)
2155
- });
1634
+ else {
1635
+ let before = target.dropPosition === 'before' ? collection.getKeyBefore(target.key) : target.key;
1636
+ let after = target.dropPosition === 'after' ? collection.getKeyAfter(target.key) : target.key;
1637
+ if (before && after) label = formatMessage('insertBetween', {
1638
+ beforeItemText: getText(before),
1639
+ afterItemText: getText(after)
1640
+ });
1641
+ else if (before) label = formatMessage('insertAfter', {
1642
+ itemText: getText(before)
1643
+ });
1644
+ else if (after) label = formatMessage('insertBefore', {
1645
+ itemText: getText(after)
1646
+ });
2156
1647
  }
2157
- }
2158
-
2159
- return {
2160
- dropIndicatorProps: _babelRuntimeHelpersEsmExtends({}, dropProps, {
2161
- id,
2162
- 'aria-roledescription': formatMessage('dropIndicator'),
2163
- 'aria-label': label,
2164
- 'aria-labelledby': labelledBy,
2165
- 'aria-hidden': !dragSession ? 'true' : dropProps['aria-hidden'],
2166
- tabIndex: -1
2167
- })
2168
- };
1648
+ return {
1649
+ dropIndicatorProps: {
1650
+ ...dropProps,
1651
+ id: id,
1652
+ 'aria-roledescription': formatMessage('dropIndicator'),
1653
+ 'aria-label': label,
1654
+ 'aria-labelledby': labelledBy,
1655
+ 'aria-hidden': !dragSession ? 'true' : dropProps['aria-hidden'],
1656
+ tabIndex: -1
1657
+ }
1658
+ };
2169
1659
  }
2170
- // @ts-ignore
2171
- const $c31f32db0058c09f3d7ccaba0e954c$var$intlMessages = {
2172
- "ar-AE": _babelRuntimeHelpersEsmInteropRequireDefault($ea65b45ad5e7d0aed23c128bf8ad1ea2$exports).default,
2173
- "bg-BG": _babelRuntimeHelpersEsmInteropRequireDefault($c92ee777c2aef6235da0efaaab60dc61$exports).default,
2174
- "cs-CZ": _babelRuntimeHelpersEsmInteropRequireDefault($c9e276469924972853a3320763f673d$exports).default,
2175
- "da-DK": _babelRuntimeHelpersEsmInteropRequireDefault($b0325b2aec14df95ab943ec14d3bec3b$exports).default,
2176
- "de-DE": _babelRuntimeHelpersEsmInteropRequireDefault($f367814043f59b69a839ff097fd4adb8$exports).default,
2177
- "el-GR": _babelRuntimeHelpersEsmInteropRequireDefault($fe8897a7011951cab52f7814c2c9684$exports).default,
2178
- "en-US": _babelRuntimeHelpersEsmInteropRequireDefault($aea68b9c3ace3526527e1fc930d35d$exports).default,
2179
- "es-ES": _babelRuntimeHelpersEsmInteropRequireDefault($a4319d93c8291b23c0d42dea$exports).default,
2180
- "et-EE": _babelRuntimeHelpersEsmInteropRequireDefault($aa30228da98b6306a72b40036f345b$exports).default,
2181
- "fi-FI": _babelRuntimeHelpersEsmInteropRequireDefault($a5a5afea8782a33461a527d7c4a$exports).default,
2182
- "fr-FR": _babelRuntimeHelpersEsmInteropRequireDefault($b32fceb28c2b8e8e846140594714351f$exports).default,
2183
- "he-IL": _babelRuntimeHelpersEsmInteropRequireDefault($d9bdb7d78ee35d20ae60007d2accaf5$exports).default,
2184
- "hr-HR": _babelRuntimeHelpersEsmInteropRequireDefault($c14894ae7d558e9dc3011ecae5f8a96b$exports).default,
2185
- "hu-HU": _babelRuntimeHelpersEsmInteropRequireDefault($f194e25a9c86722f6a3826e7ad96c717$exports).default,
2186
- "it-IT": _babelRuntimeHelpersEsmInteropRequireDefault($cae04c9878c1e24b1bce5348e54e95a4$exports).default,
2187
- "ja-JP": _babelRuntimeHelpersEsmInteropRequireDefault($b9679eb29e949e5727cbdcf506da08c1$exports).default,
2188
- "ko-KR": _babelRuntimeHelpersEsmInteropRequireDefault($c663d68cc7455025fffd92332e200be$exports).default,
2189
- "lt-LT": _babelRuntimeHelpersEsmInteropRequireDefault($d454665d97cf724871a9c3eb05$exports).default,
2190
- "lv-LV": _babelRuntimeHelpersEsmInteropRequireDefault($ca66a3bcdd44dae4665871a98bb416e3$exports).default,
2191
- "nb-NO": _babelRuntimeHelpersEsmInteropRequireDefault($cb7e072c8b2f7c15a7e06a7ac99163$exports).default,
2192
- "nl-NL": _babelRuntimeHelpersEsmInteropRequireDefault($f9d8bf1245c4a4f581c7966119af7c$exports).default,
2193
- "pl-PL": _babelRuntimeHelpersEsmInteropRequireDefault($cd07a56ec0cb160ba15542c10691829d$exports).default,
2194
- "pt-BR": _babelRuntimeHelpersEsmInteropRequireDefault($a70fe1fa67e039d2646076dfb78cee1$exports).default,
2195
- "pt-PT": _babelRuntimeHelpersEsmInteropRequireDefault($e37cb9bf759f35580e0f57d85e98be4b$exports).default,
2196
- "ro-RO": _babelRuntimeHelpersEsmInteropRequireDefault($f4cf63884707eedcbdf4eae0b61ef1bf$exports).default,
2197
- "ru-RU": _babelRuntimeHelpersEsmInteropRequireDefault($e2321eb9f531b07389bd6bfcdd631256$exports).default,
2198
- "sk-SK": _babelRuntimeHelpersEsmInteropRequireDefault($ef19e5833adeee78e3c34d0f68fa9f31$exports).default,
2199
- "sl-SI": _babelRuntimeHelpersEsmInteropRequireDefault($b895c4fbc849f3dcfcdb2d8899ed32b4$exports).default,
2200
- "sr-SP": _babelRuntimeHelpersEsmInteropRequireDefault($b75ddb34dcfa290a634852a820c90c5$exports).default,
2201
- "sv-SE": _babelRuntimeHelpersEsmInteropRequireDefault($f010cb5a3a37b4733a80a1d1f871$exports).default,
2202
- "tr-TR": _babelRuntimeHelpersEsmInteropRequireDefault($a8e9337c82319ec72dd3b41245c71e1e$exports).default,
2203
- "uk-UA": _babelRuntimeHelpersEsmInteropRequireDefault($e74f5b955cc9ed1ca9994fc3460$exports).default,
2204
- "zh-CN": _babelRuntimeHelpersEsmInteropRequireDefault($b007023265925d07a3d47c3d12f09c5$exports).default,
2205
- "zh-TW": _babelRuntimeHelpersEsmInteropRequireDefault($f4995277bc73b497cd1257981bc3$exports).default
2206
- };
2207
- export function useDraggableItem(props, state) {
2208
- let formatMessage = useMessageFormatter($c31f32db0058c09f3d7ccaba0e954c$var$intlMessages);
2209
- let {
2210
- dragProps,
2211
- dragButtonProps
2212
- } = useDrag({
2213
- getItems() {
2214
- return state.getItems(props.key);
2215
- },
2216
1660
 
2217
- renderPreview() {
2218
- return state.renderPreview(props.key);
2219
- },
2220
1661
 
2221
- onDragStart(e) {
2222
- state.startDrag(props.key, e);
2223
- },
1662
+ var $7df0dba56fe89d49$exports = {};
2224
1663
 
2225
- onDragMove(e) {
2226
- state.moveDrag(e);
2227
- },
1664
+ $parcel$export($7df0dba56fe89d49$exports, "useDraggableItem", () => $7df0dba56fe89d49$export$b35afafff42da2d9);
2228
1665
 
2229
- onDragEnd(e) {
2230
- state.endDrag(e);
2231
- }
2232
1666
 
2233
- });
2234
- let item = state.collection.getItem(props.key);
2235
- let numSelectedKeys = state.selectionManager.selectedKeys.size;
2236
- let isSelected = state.selectionManager.isSelected(props.key);
2237
- let message;
2238
1667
 
2239
- if (isSelected && numSelectedKeys > 1) {
2240
- message = formatMessage('dragSelectedItems', {
2241
- count: numSelectedKeys
1668
+ function $7df0dba56fe89d49$export$b35afafff42da2d9(props, state) {
1669
+ let formatMessage = $3kwX1$useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($56fb93a531e5f155$exports)));
1670
+ let { dragProps: dragProps , dragButtonProps: dragButtonProps } = $98f744b02c510da7$export$7941f8aafa4b6021({
1671
+ getItems () {
1672
+ return state.getItems(props.key);
1673
+ },
1674
+ renderPreview () {
1675
+ return state.renderPreview(props.key);
1676
+ },
1677
+ onDragStart (e) {
1678
+ state.startDrag(props.key, e);
1679
+ },
1680
+ onDragMove (e) {
1681
+ state.moveDrag(e);
1682
+ },
1683
+ onDragEnd (e) {
1684
+ state.endDrag(e);
1685
+ }
2242
1686
  });
2243
- } else {
2244
- var _item$textValue;
2245
-
2246
- message = formatMessage('dragItem', {
2247
- itemText: (_item$textValue = item == null ? void 0 : item.textValue) != null ? _item$textValue : ''
1687
+ let item = state.collection.getItem(props.key);
1688
+ let numSelectedKeys = state.selectionManager.selectedKeys.size;
1689
+ let isSelected = state.selectionManager.isSelected(props.key);
1690
+ let message;
1691
+ if (isSelected && numSelectedKeys > 1) message = formatMessage('dragSelectedItems', {
1692
+ count: numSelectedKeys
2248
1693
  });
2249
- }
2250
-
2251
- return {
2252
- dragProps,
2253
- dragButtonProps: _babelRuntimeHelpersEsmExtends({}, dragButtonProps, {
2254
- 'aria-label': message
2255
- })
2256
- };
2257
- }
2258
- const $c53884c4f6104c585fa0d7b24981b682$var$globalEvents = new Map();
2259
-
2260
- function $c53884c4f6104c585fa0d7b24981b682$var$addGlobalEventListener(event, fn) {
2261
- let eventData = $c53884c4f6104c585fa0d7b24981b682$var$globalEvents.get(event);
2262
-
2263
- if (!eventData) {
2264
- let handlers = new Set();
2265
-
2266
- let listener = e => {
2267
- for (let handler of handlers) {
2268
- handler(e);
2269
- }
2270
- };
2271
-
2272
- eventData = {
2273
- listener,
2274
- handlers
1694
+ else message = formatMessage('dragItem', {
1695
+ itemText: item?.textValue ?? ''
1696
+ });
1697
+ return {
1698
+ dragProps: dragProps,
1699
+ dragButtonProps: {
1700
+ ...dragButtonProps,
1701
+ 'aria-label': message
1702
+ }
2275
1703
  };
2276
- $c53884c4f6104c585fa0d7b24981b682$var$globalEvents.set(event, eventData);
2277
- document.addEventListener(event, listener);
2278
- }
2279
-
2280
- eventData.handlers.add(fn);
2281
- return () => {
2282
- eventData.handlers.delete(fn);
2283
-
2284
- if (eventData.handlers.size === 0) {
2285
- document.removeEventListener(event, eventData.listener);
2286
- $c53884c4f6104c585fa0d7b24981b682$var$globalEvents.delete(event);
2287
- }
2288
- };
2289
1704
  }
2290
1705
 
2291
- export function useClipboard(options) {
2292
- let ref = useRef(options);
2293
- ref.current = options;
2294
- let isFocusedRef = useRef(false);
2295
- let {
2296
- focusProps
2297
- } = useFocus({
2298
- onFocusChange: isFocused => {
2299
- isFocusedRef.current = isFocused;
2300
- }
2301
- });
2302
- useEffect(() => {
2303
- let onBeforeCopy = e => {
2304
- // Enable the "Copy" menu item in Safari if this element is focused and copying is supported.
2305
- let options = ref.current;
2306
1706
 
2307
- if (isFocusedRef.current && options.getItems) {
2308
- e.preventDefault();
2309
- }
2310
- };
2311
-
2312
- let onCopy = e => {
2313
- let options = ref.current;
1707
+ var $fb085ab411a33dd1$exports = {};
2314
1708
 
2315
- if (!isFocusedRef.current || !options.getItems) {
2316
- return;
2317
- }
2318
-
2319
- e.preventDefault();
2320
- $daf765036c8e081b3420fc4f613ad96$export$writeToDataTransfer(e.clipboardData, options.getItems());
2321
- options.onCopy == null ? void 0 : options.onCopy();
2322
- };
1709
+ $parcel$export($fb085ab411a33dd1$exports, "useClipboard", () => $fb085ab411a33dd1$export$2314ca2a3e892862);
2323
1710
 
2324
- let onBeforeCut = e => {
2325
- let options = ref.current;
2326
-
2327
- if (isFocusedRef.current && options.onCut && options.getItems) {
2328
- e.preventDefault();
2329
- }
2330
- };
2331
1711
 
2332
- let onCut = e => {
2333
- let options = ref.current;
2334
1712
 
2335
- if (!isFocusedRef.current || !options.onCut || !options.getItems) {
2336
- return;
2337
- }
2338
1713
 
2339
- e.preventDefault();
2340
- $daf765036c8e081b3420fc4f613ad96$export$writeToDataTransfer(e.clipboardData, options.getItems());
2341
- options.onCut();
1714
+ const $fb085ab411a33dd1$var$globalEvents = new Map();
1715
+ function $fb085ab411a33dd1$var$addGlobalEventListener(event, fn) {
1716
+ let eventData = $fb085ab411a33dd1$var$globalEvents.get(event);
1717
+ if (!eventData) {
1718
+ let handlers = new Set();
1719
+ let listener = (e)=>{
1720
+ for (let handler of handlers)handler(e);
1721
+ };
1722
+ eventData = {
1723
+ listener: listener,
1724
+ handlers: handlers
1725
+ };
1726
+ $fb085ab411a33dd1$var$globalEvents.set(event, eventData);
1727
+ document.addEventListener(event, listener);
1728
+ }
1729
+ eventData.handlers.add(fn);
1730
+ return ()=>{
1731
+ eventData.handlers.delete(fn);
1732
+ if (eventData.handlers.size === 0) {
1733
+ document.removeEventListener(event, eventData.listener);
1734
+ $fb085ab411a33dd1$var$globalEvents.delete(event);
1735
+ }
2342
1736
  };
2343
-
2344
- let onBeforePaste = e => {
2345
- let options = ref.current; // Unfortunately, e.clipboardData.types is not available in this event so we always
2346
- // have to enable the Paste menu item even if the type of data is unsupported.
2347
-
2348
- if (isFocusedRef.current && options.onPaste) {
2349
- e.preventDefault();
2350
- }
1737
+ }
1738
+ function $fb085ab411a33dd1$export$2314ca2a3e892862(options1) {
1739
+ let ref = $3kwX1$useRef(options1);
1740
+ ref.current = options1;
1741
+ let isFocusedRef = $3kwX1$useRef(false);
1742
+ let { focusProps: focusProps } = $3kwX1$useFocus({
1743
+ onFocusChange: (isFocused)=>{
1744
+ isFocusedRef.current = isFocused;
1745
+ }
1746
+ });
1747
+ $3kwX1$useEffect(()=>{
1748
+ let onBeforeCopy = (e)=>{
1749
+ // Enable the "Copy" menu item in Safari if this element is focused and copying is supported.
1750
+ let options = ref.current;
1751
+ if (isFocusedRef.current && options.getItems) e.preventDefault();
1752
+ };
1753
+ let onCopy = (e)=>{
1754
+ let options = ref.current;
1755
+ if (!isFocusedRef.current || !options.getItems) return;
1756
+ e.preventDefault();
1757
+ $6d32ba78df89e8ed$export$f9c1490890ddd063(e.clipboardData, options.getItems());
1758
+ options.onCopy?.();
1759
+ };
1760
+ let onBeforeCut = (e)=>{
1761
+ let options = ref.current;
1762
+ if (isFocusedRef.current && options.onCut && options.getItems) e.preventDefault();
1763
+ };
1764
+ let onCut = (e)=>{
1765
+ let options = ref.current;
1766
+ if (!isFocusedRef.current || !options.onCut || !options.getItems) return;
1767
+ e.preventDefault();
1768
+ $6d32ba78df89e8ed$export$f9c1490890ddd063(e.clipboardData, options.getItems());
1769
+ options.onCut();
1770
+ };
1771
+ let onBeforePaste = (e)=>{
1772
+ let options = ref.current;
1773
+ // Unfortunately, e.clipboardData.types is not available in this event so we always
1774
+ // have to enable the Paste menu item even if the type of data is unsupported.
1775
+ if (isFocusedRef.current && options.onPaste) e.preventDefault();
1776
+ };
1777
+ let onPaste = (e)=>{
1778
+ let options = ref.current;
1779
+ if (!isFocusedRef.current || !options.onPaste) return;
1780
+ e.preventDefault();
1781
+ let items = $6d32ba78df89e8ed$export$d9e760437831f8b3(e.clipboardData);
1782
+ options.onPaste(items);
1783
+ };
1784
+ return $3kwX1$chain($fb085ab411a33dd1$var$addGlobalEventListener('beforecopy', onBeforeCopy), $fb085ab411a33dd1$var$addGlobalEventListener('copy', onCopy), $fb085ab411a33dd1$var$addGlobalEventListener('beforecut', onBeforeCut), $fb085ab411a33dd1$var$addGlobalEventListener('cut', onCut), $fb085ab411a33dd1$var$addGlobalEventListener('beforepaste', onBeforePaste), $fb085ab411a33dd1$var$addGlobalEventListener('paste', onPaste));
1785
+ }, []);
1786
+ return {
1787
+ clipboardProps: focusProps
2351
1788
  };
1789
+ }
2352
1790
 
2353
- let onPaste = e => {
2354
- let options = ref.current;
2355
1791
 
2356
- if (!isFocusedRef.current || !options.onPaste) {
2357
- return;
2358
- }
2359
1792
 
2360
- e.preventDefault();
2361
- let items = $daf765036c8e081b3420fc4f613ad96$export$readFromDataTransfer(e.clipboardData);
2362
- options.onPaste(items);
2363
- };
2364
1793
 
2365
- return chain($c53884c4f6104c585fa0d7b24981b682$var$addGlobalEventListener('beforecopy', onBeforeCopy), $c53884c4f6104c585fa0d7b24981b682$var$addGlobalEventListener('copy', onCopy), $c53884c4f6104c585fa0d7b24981b682$var$addGlobalEventListener('beforecut', onBeforeCut), $c53884c4f6104c585fa0d7b24981b682$var$addGlobalEventListener('cut', onCut), $c53884c4f6104c585fa0d7b24981b682$var$addGlobalEventListener('beforepaste', onBeforePaste), $c53884c4f6104c585fa0d7b24981b682$var$addGlobalEventListener('paste', onPaste));
2366
- }, []);
2367
- return {
2368
- clipboardProps: focusProps
2369
- };
2370
- }
1794
+ export {$98f744b02c510da7$export$7941f8aafa4b6021 as useDrag, $0da183e6051d30ca$export$ccdee5eaf73cf661 as useDrop, $84a095b08b269050$export$f4e2f423c21f7b04 as useDroppableCollection, $45684752568fdb26$export$f7b0c5d28b66b6a5 as useDroppableItem, $2daf78ecd1d9c0e9$export$8d0e41d2815afac5 as useDropIndicator, $7df0dba56fe89d49$export$b35afafff42da2d9 as useDraggableItem, $fb085ab411a33dd1$export$2314ca2a3e892862 as useClipboard};
2371
1795
  //# sourceMappingURL=module.js.map