@measured/puck-plugin-heading-analyzer 0.14.2-canary.e6e01c6 → 0.14.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/dist/index.js +1538 -74
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -34978,36 +34978,33 @@ function querySelectorAll(parentNode, selector) {
34978
34978
  function getOptions(shared2, fromBinding) {
34979
34979
  return __spreadValues(__spreadValues({}, shared2), fromBinding);
34980
34980
  }
34981
- function bindEvent(el, binding, options) {
34981
+ function bindEvent(win, binding, options) {
34982
34982
  let timer;
34983
- if (el.nodeName === "IFRAME") {
34983
+ if (!loaded) {
34984
34984
  timer = setInterval(() => {
34985
- const currentWin = getWin(el);
34986
- if ((currentWin == null ? void 0 : currentWin.document.readyState) === "complete") {
34987
- currentWin.addEventListener(binding.eventName, binding.fn, options);
34988
- clearInterval(timer);
34985
+ if (win.document.readyState === "complete") {
34986
+ win.addEventListener(binding.eventName, binding.fn, options);
34987
+ loaded = true;
34989
34988
  }
34990
34989
  }, 100);
34991
- return timer;
34990
+ } else {
34991
+ win.addEventListener(binding.eventName, binding.fn, options);
34992
34992
  }
34993
- const win = getWin(el);
34994
- win == null ? void 0 : win.addEventListener(binding.eventName, binding.fn, options);
34995
34993
  return timer;
34996
34994
  }
34997
34995
  function bindEvents(el, bindings, sharedOptions) {
34998
34996
  const unbindings = bindings.flatMap((binding) => {
34999
34997
  const iframes = querySelectorAll(window.document, "[data-rfd-iframe]");
35000
- const els = [el, ...iframes];
35001
- return els.map((currentEl) => {
35002
- if (!currentEl)
34998
+ const windows = [el, ...iframes.map((iframe) => iframe.contentWindow)];
34999
+ return windows.map((win) => {
35000
+ if (!win)
35003
35001
  return function unbind() {
35004
35002
  };
35005
35003
  const options = getOptions(sharedOptions, binding.options);
35006
- const timer = bindEvent(currentEl, binding, options);
35004
+ const timer = bindEvent(win, binding, options);
35007
35005
  return function unbind() {
35008
35006
  clearInterval(timer);
35009
- const win = getWin(currentEl);
35010
- win == null ? void 0 : win.removeEventListener(binding.eventName, binding.fn, options);
35007
+ win.removeEventListener(binding.eventName, binding.fn, options);
35011
35008
  };
35012
35009
  });
35013
35010
  });
@@ -35207,6 +35204,26 @@ function getFurthestAway({
35207
35204
  }).sort((a2, b) => b.distance - a2.distance);
35208
35205
  return sorted[0] ? sorted[0].id : null;
35209
35206
  }
35207
+ function normalizeFamilies(pageBorderBox, candidates) {
35208
+ const families = candidates.reduce((acc, candidate) => {
35209
+ var _a3;
35210
+ const familyName = ((_a3 = candidate.parents[0]) == null ? void 0 : _a3.id) || candidate.descriptor.id;
35211
+ const family = acc[familyName] || [];
35212
+ const generation = candidate.parents.length;
35213
+ family[generation] = [...family[generation] || [], candidate];
35214
+ return __spreadProps(__spreadValues({}, acc), {
35215
+ [familyName]: family
35216
+ });
35217
+ }, {});
35218
+ return Object.keys(families).map((familyName) => {
35219
+ const family = families[familyName].flat();
35220
+ const reversedFamily = [...family].reverse();
35221
+ const chosenMember = reversedFamily.find((member) => {
35222
+ return pageBorderBox.center.x < member.page.borderBox.right && pageBorderBox.center.x > member.page.borderBox.left && pageBorderBox.center.y > member.page.borderBox.top && pageBorderBox.center.y < member.page.borderBox.bottom;
35223
+ });
35224
+ return chosenMember || family[0];
35225
+ });
35226
+ }
35210
35227
  function getDroppableOver({
35211
35228
  pageBorderBox,
35212
35229
  draggable: draggable2,
@@ -35247,10 +35264,14 @@ function getDroppableOver({
35247
35264
  if (candidates.length === 1) {
35248
35265
  return candidates[0].descriptor.id;
35249
35266
  }
35267
+ const normalizedCandidates = normalizeFamilies(pageBorderBox, candidates);
35268
+ if (normalizedCandidates.length === 1) {
35269
+ return normalizedCandidates[0].descriptor.id;
35270
+ }
35250
35271
  return getFurthestAway({
35251
35272
  pageBorderBox,
35252
35273
  draggable: draggable2,
35253
- candidates
35274
+ candidates: normalizedCandidates
35254
35275
  });
35255
35276
  }
35256
35277
  function getIsDisplaced({
@@ -35935,20 +35956,22 @@ function offsetPoint(x, y, win) {
35935
35956
  let offsetY = 0;
35936
35957
  if (win.parent !== win.self) {
35937
35958
  const iframe = win.frameElement;
35938
- const rect = iframe.getBoundingClientRect();
35939
- const transform = getTransform(iframe);
35940
- offsetX = rect.left;
35941
- offsetY = rect.top;
35942
- if (transform) {
35943
- const {
35944
- x: transformedX,
35945
- y: transformedY
35946
- } = applyTransformPoint(x, y, transform.matrix, transform.origin);
35947
- const point2 = {
35948
- x: transformedX + offsetX,
35949
- y: transformedY + offsetY
35950
- };
35951
- return point2;
35959
+ if (iframe) {
35960
+ const rect = iframe.getBoundingClientRect();
35961
+ const transform = getTransform(iframe);
35962
+ offsetX = rect.left;
35963
+ offsetY = rect.top;
35964
+ if (transform) {
35965
+ const {
35966
+ x: transformedX,
35967
+ y: transformedY
35968
+ } = applyTransformPoint(x, y, transform.matrix, transform.origin);
35969
+ const point2 = {
35970
+ x: transformedX + offsetX,
35971
+ y: transformedY + offsetY
35972
+ };
35973
+ return point2;
35974
+ }
35952
35975
  }
35953
35976
  }
35954
35977
  const point = {
@@ -37621,7 +37644,7 @@ function getBody() {
37621
37644
  !document.body ? process.env.NODE_ENV !== "production" ? invariant2(false, "document.body is not ready") : invariant2(false) : void 0;
37622
37645
  return document.body;
37623
37646
  }
37624
- var import_react5, import_react_dom2, isProduction$1, spacesAndTabs, lineStartWithSpaces, clean$2, getDevMessage, getFormattedMessage, isDisabledFlag, warning2, error, getWin, isProduction2, prefix$1, RbdInvariant, ErrorBoundary, dragHandleUsageInstructions, position, onDragStart, withLocation, withCombine, onDragUpdate, returnedToStart, onDragEnd, preset, preset$1, origin, add, subtract, isEqual$1, negate, patch, distance2, closest$1, apply, executeClip, offsetByPosition, getCorners, noSpacing2, scroll$1, increase, clip2, getSubject, scrollDroppable, toDroppableMap, toDraggableMap, toDroppableList, toDraggableList, getDraggablesInsideDroppable, removeDraggableFromList, moveToNextCombine, isHomeOf, noDisplacedBy, emptyGroups, noImpact, noImpact$1, isWithin, isPartiallyVisibleThroughFrame, isTotallyVisibleThroughFrame, vertical, horizontal, isTotallyVisibleThroughFrameOnAxis, getDroppableDisplaced, isVisibleInDroppable, isVisibleInViewport, isVisible$1, isPartiallyVisible, isTotallyVisible, isTotallyVisibleOnAxis, getShouldAnimate, fromCombine, fromReorder, moveToNextIndex, getCombinedItemDisplacement, whenCombining, distanceFromStartToBorderBoxCenter, distanceFromEndToBorderBoxCenter, getCrossAxisBorderBoxCenter, goAfter, goBefore, goIntoStart, whenReordering, withDroppableDisplacement, getResultWithoutDroppableDisplacement, getPageBorderBoxCenterFromImpact, scrollViewport, speculativelyIncrease, withViewportDisplacement, getClientFromPageBorderBoxCenter, isTotallyVisibleInNewLocation, moveToNextPlace, getKnownActive, getBestCrossAxisDroppable, getCurrentPageBorderBoxCenter, getCurrentPageBorderBox, getClosestDraggable, getDisplacedBy, getRequiredGrowthForPlaceholder, withMaxScroll, addPlaceholder, removePlaceholder, moveToNewDroppable, moveCrossAxis, whatIsDraggedOver, getDroppableOver$1, moveInDirection, offsetRectByPosition, withDroppableScroll, getReorderImpact, combineThresholdDivisor, getCombineImpact, getDragImpact, patchDroppableMap, clearUnusedPlaceholder, recomputePlaceholders, update, recompute, getClientBorderBoxCenter, refreshSnap, getHomeLocation, getLiftEffect, patchDimensionMap, start, finish, offsetDraggable, getFrame, adjustAdditionsForScrollChanges, timingsKey, publishWhileDraggingInVirtual, isSnapping, postDroppableChange, idle$2, reducer, beforeInitialCapture, lift$1, initialPublish, publishWhileDragging, collectionStarting, updateDroppableScroll, updateDroppableIsEnabled, updateDroppableIsCombineEnabled, move, moveByWindowScroll, updateViewportMaxScroll, moveUp, moveDown, moveRight, moveLeft, flush, animateDrop, completeDrop, drop$1, dropPending, dropAnimationFinished, lift, style, curves, combine, timings, outOfTheWayTiming, transitions, moveTo, transforms, minDropTime, maxDropTime, dropTimeRange, maxDropTimeAtDistance, cancelDropModifier, getDropDuration, getNewHomeClientOffset, getDropImpact, dropMiddleware, drop, getWindowScroll3, shouldEnd, scrollListener, scrollListener$1, getExpiringAnnounce, getAsyncMarshal, areLocationsEqual, isCombineEqual, isCriticalEqual, withTimings, getDragStart, getPublisher, responders, dropAnimationFinishMiddleware, dropAnimationFinish, dropAnimationFlushOnScrollMiddleware, dropAnimationFlushOnScroll, dimensionMarshalStopper, focus, shouldStop, autoScroll, pendingDrop, pendingDrop$1, composeEnhancers, createStore2, clean$1, getMaxScroll, getDocumentElement, getMaxWindowScroll, getViewport, getInitialPublish, createDimensionMarshal, canStartDrag, scrollWindow, getScrollableDroppables, getScrollableDroppableOver, getBestScrollableDroppable, defaultAutoScrollerOptions, getDistanceThresholds, getPercentage, minScroll, getValueFromDistance, dampenValueByTime, getValue, getScrollOnAxis, adjustForSizeLimits, clean, getScroll$1, smallestSigned, getOverlap, canPartiallyScroll, canScrollWindow, getWindowOverlap, canScrollDroppable, getDroppableOverlap, getWindowScrollChange, getDroppableScrollChange, iframeCache, createCol, matrixPattern, getMatrix, getOrigin, findNearestTransform, defaultTransform, getTransform, applyTransformPoint, applyTransformRect, applyTransformSpacing, applyTransformBox, resetToOrigin, getIframeScroll, scroll, createFluidScroller, createJumpScroller, createAutoScroller, prefix2, dragHandle, draggable, droppable, scrollContainer, makeGetSelector, getStyles, noPointerEvents, getStyles$1, useIsomorphicLayoutEffect2, useLayoutEffect2, getHead, createStyleEl, alwaysDataAttr, dynamicDataAttr, getWindowFromEl, dragHandleCache, StoreContext, getBodyElement, visuallyHidden, visuallyHidden$1, getId, count$1, defaults, useUniqueId$1, AppContext, peerDependencies, semver, getVersion, isSatisfied, checkReactVersion, suffix, checkDoctype, tab, enter, escape, space, pageUp, pageDown, end, home, arrowLeft, arrowUp, arrowRight, arrowDown, preventedKeys, preventStandardKeyEvents, supportedEventName, supportedPageVisibilityEventName, primaryButton, sloppyClickThreshold, idle$1, scrollJumpKeys, idle, timeForLongPress, forcePressThreshold, interactiveTagNames, getBorderBoxCenterPosition, supportedMatchesName, defaultSensors, createResponders, createAutoScrollerOptions, count, useUniqueContextId$1, zIndexOptions, getDraggingTransition, getDraggingOpacity, getShouldDraggingAnimate, applyOffsetBox, DroppableContext, Draggable, Draggable$1, isStrictEqual, whatIsDraggedOverFromResult, getCombineWithFromResult, getCombineWithFromImpact, atRest, makeMapStateToProps$1, mapDispatchToProps$1, ConnectedDraggable, ConnectedDraggable$1, getScroll, isEqual2, isScroll, isAuto, isVisible, isEither, isBoth, isElementScrollable, isBodyScrollable, getClosestScrollable, getClosestScrollable$1, getIsFixed, getEnv, getDroppableDimension, getClient, getDimension, immediate, delayed, getListenerOptions, getScrollable, getClosestScrollableFromDrag, empty, getSize, getStyle, Placeholder, Placeholder$1, shared, standard, virtual, AnimateInOut, Droppable, Droppable$1, defaultProps, attachDefaultPropsToOwnProps, isMatchingType, getDraggable, makeMapStateToProps, mapDispatchToProps, ConnectedDroppable, ConnectedDroppable$1;
37647
+ var import_react5, import_react_dom2, isProduction$1, spacesAndTabs, lineStartWithSpaces, clean$2, getDevMessage, getFormattedMessage, isDisabledFlag, warning2, error, loaded, isProduction2, prefix$1, RbdInvariant, ErrorBoundary, dragHandleUsageInstructions, position, onDragStart, withLocation, withCombine, onDragUpdate, returnedToStart, onDragEnd, preset, preset$1, origin, add, subtract, isEqual$1, negate, patch, distance2, closest$1, apply, executeClip, offsetByPosition, getCorners, noSpacing2, scroll$1, increase, clip2, getSubject, scrollDroppable, toDroppableMap, toDraggableMap, toDroppableList, toDraggableList, getDraggablesInsideDroppable, removeDraggableFromList, moveToNextCombine, isHomeOf, noDisplacedBy, emptyGroups, noImpact, noImpact$1, isWithin, isPartiallyVisibleThroughFrame, isTotallyVisibleThroughFrame, vertical, horizontal, isTotallyVisibleThroughFrameOnAxis, getDroppableDisplaced, isVisibleInDroppable, isVisibleInViewport, isVisible$1, isPartiallyVisible, isTotallyVisible, isTotallyVisibleOnAxis, getShouldAnimate, fromCombine, fromReorder, moveToNextIndex, getCombinedItemDisplacement, whenCombining, distanceFromStartToBorderBoxCenter, distanceFromEndToBorderBoxCenter, getCrossAxisBorderBoxCenter, goAfter, goBefore, goIntoStart, whenReordering, withDroppableDisplacement, getResultWithoutDroppableDisplacement, getPageBorderBoxCenterFromImpact, scrollViewport, speculativelyIncrease, withViewportDisplacement, getClientFromPageBorderBoxCenter, isTotallyVisibleInNewLocation, moveToNextPlace, getKnownActive, getBestCrossAxisDroppable, getCurrentPageBorderBoxCenter, getCurrentPageBorderBox, getClosestDraggable, getDisplacedBy, getRequiredGrowthForPlaceholder, withMaxScroll, addPlaceholder, removePlaceholder, moveToNewDroppable, moveCrossAxis, whatIsDraggedOver, getDroppableOver$1, moveInDirection, offsetRectByPosition, withDroppableScroll, getReorderImpact, combineThresholdDivisor, getCombineImpact, getDragImpact, patchDroppableMap, clearUnusedPlaceholder, recomputePlaceholders, update, recompute, getClientBorderBoxCenter, refreshSnap, getHomeLocation, getLiftEffect, patchDimensionMap, start, finish, offsetDraggable, getFrame, adjustAdditionsForScrollChanges, timingsKey, publishWhileDraggingInVirtual, isSnapping, postDroppableChange, idle$2, reducer, beforeInitialCapture, lift$1, initialPublish, publishWhileDragging, collectionStarting, updateDroppableScroll, updateDroppableIsEnabled, updateDroppableIsCombineEnabled, move, moveByWindowScroll, updateViewportMaxScroll, moveUp, moveDown, moveRight, moveLeft, flush, animateDrop, completeDrop, drop$1, dropPending, dropAnimationFinished, lift, style, curves, combine, timings, outOfTheWayTiming, transitions, moveTo, transforms, minDropTime, maxDropTime, dropTimeRange, maxDropTimeAtDistance, cancelDropModifier, getDropDuration, getNewHomeClientOffset, getDropImpact, dropMiddleware, drop, getWindowScroll3, shouldEnd, scrollListener, scrollListener$1, getExpiringAnnounce, getAsyncMarshal, areLocationsEqual, isCombineEqual, isCriticalEqual, withTimings, getDragStart, getPublisher, responders, dropAnimationFinishMiddleware, dropAnimationFinish, dropAnimationFlushOnScrollMiddleware, dropAnimationFlushOnScroll, dimensionMarshalStopper, focus, shouldStop, autoScroll, pendingDrop, pendingDrop$1, composeEnhancers, createStore2, clean$1, getMaxScroll, getDocumentElement, getMaxWindowScroll, getViewport, getInitialPublish, createDimensionMarshal, canStartDrag, scrollWindow, getScrollableDroppables, getScrollableDroppableOver, getBestScrollableDroppable, defaultAutoScrollerOptions, getDistanceThresholds, getPercentage, minScroll, getValueFromDistance, dampenValueByTime, getValue, getScrollOnAxis, adjustForSizeLimits, clean, getScroll$1, smallestSigned, getOverlap, canPartiallyScroll, canScrollWindow, getWindowOverlap, canScrollDroppable, getDroppableOverlap, getWindowScrollChange, getDroppableScrollChange, iframeCache, createCol, matrixPattern, getMatrix, getOrigin, findNearestTransform, defaultTransform, getTransform, applyTransformPoint, applyTransformRect, applyTransformSpacing, applyTransformBox, resetToOrigin, getIframeScroll, scroll, createFluidScroller, createJumpScroller, createAutoScroller, prefix2, dragHandle, draggable, droppable, scrollContainer, makeGetSelector, getStyles, noPointerEvents, getStyles$1, useIsomorphicLayoutEffect2, useLayoutEffect2, getHead, createStyleEl, alwaysDataAttr, dynamicDataAttr, getWindowFromEl, dragHandleCache, StoreContext, getBodyElement, visuallyHidden, visuallyHidden$1, getId, count$1, defaults, useUniqueId$1, AppContext, peerDependencies, semver, getVersion, isSatisfied, checkReactVersion, suffix, checkDoctype, tab, enter, escape, space, pageUp, pageDown, end, home, arrowLeft, arrowUp, arrowRight, arrowDown, preventedKeys, preventStandardKeyEvents, supportedEventName, supportedPageVisibilityEventName, primaryButton, sloppyClickThreshold, idle$1, scrollJumpKeys, idle, timeForLongPress, forcePressThreshold, interactiveTagNames, getBorderBoxCenterPosition, supportedMatchesName, defaultSensors, createResponders, createAutoScrollerOptions, count, useUniqueContextId$1, zIndexOptions, getDraggingTransition, getDraggingOpacity, getShouldDraggingAnimate, applyOffsetBox, DroppableContext, Draggable, Draggable$1, isStrictEqual, whatIsDraggedOverFromResult, getCombineWithFromResult, getCombineWithFromImpact, atRest, makeMapStateToProps$1, mapDispatchToProps$1, ConnectedDraggable, ConnectedDraggable$1, getScroll, isEqual2, isScroll, isAuto, isVisible, isEither, isBoth, isElementScrollable, isBodyScrollable, getClosestScrollable, getClosestScrollable$1, getIsFixed, getEnv, getDroppableDimension, getClient, getParents, getDimension, immediate, delayed, getListenerOptions, getScrollable, getClosestScrollableFromDrag, empty, getSize, getStyle, Placeholder, Placeholder$1, shared, standard, virtual, AnimateInOut, Droppable, Droppable$1, defaultProps, attachDefaultPropsToOwnProps, isMatchingType, getDraggable, makeMapStateToProps, mapDispatchToProps, ConnectedDroppable, ConnectedDroppable$1;
37625
37648
  var init_dnd_esm = __esm({
37626
37649
  "../../node_modules/@measured/dnd/dist/dnd.esm.js"() {
37627
37650
  init_react_import();
@@ -37650,13 +37673,7 @@ var init_dnd_esm = __esm({
37650
37673
  isDisabledFlag = "__@hello-pangea/dnd-disable-dev-warnings";
37651
37674
  warning2 = log.bind(null, "warn");
37652
37675
  error = log.bind(null, "error");
37653
- getWin = (el) => {
37654
- let win = el;
37655
- if (el.nodeName === "IFRAME") {
37656
- win = el.contentWindow;
37657
- }
37658
- return win;
37659
- };
37676
+ loaded = false;
37660
37677
  isProduction2 = process.env.NODE_ENV === "production";
37661
37678
  prefix$1 = "Invariant failed";
37662
37679
  RbdInvariant = class extends Error {
@@ -41035,7 +41052,7 @@ var init_dnd_esm = __esm({
41035
41052
  }
41036
41053
  if (!el.parentElement) {
41037
41054
  const refWindow = el.ownerDocument.defaultView;
41038
- if (refWindow && refWindow.self !== refWindow.parent) {
41055
+ if (refWindow && refWindow.self !== refWindow.parent && refWindow.frameElement) {
41039
41056
  const iframe = refWindow.frameElement;
41040
41057
  return findNearestTransform(iframe);
41041
41058
  }
@@ -41157,7 +41174,7 @@ var init_dnd_esm = __esm({
41157
41174
  }) => {
41158
41175
  const el = querySelectorAllIframe(`[data-rfd-draggable-id="${state.critical.draggable.id}"]`)[0];
41159
41176
  const win = (el == null ? void 0 : el.ownerDocument.defaultView) || window;
41160
- const isInIframe = win !== window;
41177
+ const isInIframe = win !== window && win.frameElement;
41161
41178
  if (isInIframe) {
41162
41179
  const iframe = win.frameElement;
41163
41180
  const viewportBox = getBox(iframe);
@@ -41996,7 +42013,8 @@ var init_dnd_esm = __esm({
41996
42013
  client,
41997
42014
  page,
41998
42015
  closest: closest2,
41999
- transform
42016
+ transform,
42017
+ parents
42000
42018
  }) => {
42001
42019
  const frame = (() => {
42002
42020
  if (!closest2) {
@@ -42045,7 +42063,8 @@ var init_dnd_esm = __esm({
42045
42063
  page,
42046
42064
  frame,
42047
42065
  subject,
42048
- transform
42066
+ transform,
42067
+ parents
42049
42068
  };
42050
42069
  return dimension;
42051
42070
  };
@@ -42082,6 +42101,27 @@ var init_dnd_esm = __esm({
42082
42101
  });
42083
42102
  return client;
42084
42103
  };
42104
+ getParents = (ref2) => {
42105
+ var _a3;
42106
+ const contextId = ref2.getAttribute(`${prefix2}-droppable-context-id`);
42107
+ const parentDescriptors = [];
42108
+ if (!contextId)
42109
+ return [];
42110
+ let currentEl = ref2;
42111
+ while (currentEl) {
42112
+ currentEl = (_a3 = currentEl.parentElement) == null ? void 0 : _a3.closest(`[${prefix2}-droppable-context-id="${contextId}"]`);
42113
+ const id = currentEl == null ? void 0 : currentEl.getAttribute(`${prefix2}-droppable-id`);
42114
+ if (id) {
42115
+ parentDescriptors.push({
42116
+ id,
42117
+ mode: "standard",
42118
+ type: "DEFAULT"
42119
+ });
42120
+ }
42121
+ }
42122
+ parentDescriptors.reverse();
42123
+ return parentDescriptors;
42124
+ };
42085
42125
  getDimension = ({
42086
42126
  ref: ref2,
42087
42127
  descriptor,
@@ -42117,6 +42157,7 @@ var init_dnd_esm = __esm({
42117
42157
  shouldClipSubject
42118
42158
  };
42119
42159
  })();
42160
+ const parents = getParents(ref2);
42120
42161
  const dimension = getDroppableDimension({
42121
42162
  descriptor,
42122
42163
  isEnabled: !isDropDisabled,
@@ -42126,7 +42167,8 @@ var init_dnd_esm = __esm({
42126
42167
  client,
42127
42168
  page,
42128
42169
  closest: closest2,
42129
- transform
42170
+ transform,
42171
+ parents
42130
42172
  });
42131
42173
  return dimension;
42132
42174
  };
@@ -42597,6 +42639,1291 @@ var init_dnd_esm = __esm({
42597
42639
  }
42598
42640
  });
42599
42641
 
42642
+ // ../../node_modules/ua-parser-js/src/ua-parser.js
42643
+ var require_ua_parser = __commonJS({
42644
+ "../../node_modules/ua-parser-js/src/ua-parser.js"(exports, module2) {
42645
+ init_react_import();
42646
+ (function(window2, undefined2) {
42647
+ "use strict";
42648
+ var LIBVERSION = "1.0.37", EMPTY = "", UNKNOWN = "?", FUNC_TYPE = "function", UNDEF_TYPE = "undefined", OBJ_TYPE = "object", STR_TYPE = "string", MAJOR = "major", MODEL = "model", NAME = "name", TYPE2 = "type", VENDOR = "vendor", VERSION = "version", ARCHITECTURE = "architecture", CONSOLE = "console", MOBILE = "mobile", TABLET = "tablet", SMARTTV = "smarttv", WEARABLE = "wearable", EMBEDDED = "embedded", UA_MAX_LENGTH = 500;
42649
+ var AMAZON = "Amazon", APPLE = "Apple", ASUS = "ASUS", BLACKBERRY = "BlackBerry", BROWSER = "Browser", CHROME = "Chrome", EDGE = "Edge", FIREFOX = "Firefox", GOOGLE = "Google", HUAWEI = "Huawei", LG = "LG", MICROSOFT = "Microsoft", MOTOROLA = "Motorola", OPERA = "Opera", SAMSUNG = "Samsung", SHARP = "Sharp", SONY = "Sony", XIAOMI = "Xiaomi", ZEBRA = "Zebra", FACEBOOK = "Facebook", CHROMIUM_OS = "Chromium OS", MAC_OS = "Mac OS";
42650
+ var extend = function(regexes2, extensions) {
42651
+ var mergedRegexes = {};
42652
+ for (var i2 in regexes2) {
42653
+ if (extensions[i2] && extensions[i2].length % 2 === 0) {
42654
+ mergedRegexes[i2] = extensions[i2].concat(regexes2[i2]);
42655
+ } else {
42656
+ mergedRegexes[i2] = regexes2[i2];
42657
+ }
42658
+ }
42659
+ return mergedRegexes;
42660
+ }, enumerize = function(arr) {
42661
+ var enums = {};
42662
+ for (var i2 = 0; i2 < arr.length; i2++) {
42663
+ enums[arr[i2].toUpperCase()] = arr[i2];
42664
+ }
42665
+ return enums;
42666
+ }, has = function(str1, str2) {
42667
+ return typeof str1 === STR_TYPE ? lowerize(str2).indexOf(lowerize(str1)) !== -1 : false;
42668
+ }, lowerize = function(str) {
42669
+ return str.toLowerCase();
42670
+ }, majorize = function(version2) {
42671
+ return typeof version2 === STR_TYPE ? version2.replace(/[^\d\.]/g, EMPTY).split(".")[0] : undefined2;
42672
+ }, trim = function(str, len) {
42673
+ if (typeof str === STR_TYPE) {
42674
+ str = str.replace(/^\s\s*/, EMPTY);
42675
+ return typeof len === UNDEF_TYPE ? str : str.substring(0, UA_MAX_LENGTH);
42676
+ }
42677
+ };
42678
+ var rgxMapper = function(ua, arrays) {
42679
+ var i2 = 0, j, k, p, q, matches, match;
42680
+ while (i2 < arrays.length && !matches) {
42681
+ var regex = arrays[i2], props = arrays[i2 + 1];
42682
+ j = k = 0;
42683
+ while (j < regex.length && !matches) {
42684
+ if (!regex[j]) {
42685
+ break;
42686
+ }
42687
+ matches = regex[j++].exec(ua);
42688
+ if (!!matches) {
42689
+ for (p = 0; p < props.length; p++) {
42690
+ match = matches[++k];
42691
+ q = props[p];
42692
+ if (typeof q === OBJ_TYPE && q.length > 0) {
42693
+ if (q.length === 2) {
42694
+ if (typeof q[1] == FUNC_TYPE) {
42695
+ this[q[0]] = q[1].call(this, match);
42696
+ } else {
42697
+ this[q[0]] = q[1];
42698
+ }
42699
+ } else if (q.length === 3) {
42700
+ if (typeof q[1] === FUNC_TYPE && !(q[1].exec && q[1].test)) {
42701
+ this[q[0]] = match ? q[1].call(this, match, q[2]) : undefined2;
42702
+ } else {
42703
+ this[q[0]] = match ? match.replace(q[1], q[2]) : undefined2;
42704
+ }
42705
+ } else if (q.length === 4) {
42706
+ this[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined2;
42707
+ }
42708
+ } else {
42709
+ this[q] = match ? match : undefined2;
42710
+ }
42711
+ }
42712
+ }
42713
+ }
42714
+ i2 += 2;
42715
+ }
42716
+ }, strMapper = function(str, map) {
42717
+ for (var i2 in map) {
42718
+ if (typeof map[i2] === OBJ_TYPE && map[i2].length > 0) {
42719
+ for (var j = 0; j < map[i2].length; j++) {
42720
+ if (has(map[i2][j], str)) {
42721
+ return i2 === UNKNOWN ? undefined2 : i2;
42722
+ }
42723
+ }
42724
+ } else if (has(map[i2], str)) {
42725
+ return i2 === UNKNOWN ? undefined2 : i2;
42726
+ }
42727
+ }
42728
+ return str;
42729
+ };
42730
+ var oldSafariMap = {
42731
+ "1.0": "/8",
42732
+ "1.2": "/1",
42733
+ "1.3": "/3",
42734
+ "2.0": "/412",
42735
+ "2.0.2": "/416",
42736
+ "2.0.3": "/417",
42737
+ "2.0.4": "/419",
42738
+ "?": "/"
42739
+ }, windowsVersionMap = {
42740
+ "ME": "4.90",
42741
+ "NT 3.11": "NT3.51",
42742
+ "NT 4.0": "NT4.0",
42743
+ "2000": "NT 5.0",
42744
+ "XP": ["NT 5.1", "NT 5.2"],
42745
+ "Vista": "NT 6.0",
42746
+ "7": "NT 6.1",
42747
+ "8": "NT 6.2",
42748
+ "8.1": "NT 6.3",
42749
+ "10": ["NT 6.4", "NT 10.0"],
42750
+ "RT": "ARM"
42751
+ };
42752
+ var regexes = {
42753
+ browser: [
42754
+ [
42755
+ /\b(?:crmo|crios)\/([\w\.]+)/i
42756
+ // Chrome for Android/iOS
42757
+ ],
42758
+ [VERSION, [NAME, "Chrome"]],
42759
+ [
42760
+ /edg(?:e|ios|a)?\/([\w\.]+)/i
42761
+ // Microsoft Edge
42762
+ ],
42763
+ [VERSION, [NAME, "Edge"]],
42764
+ [
42765
+ // Presto based
42766
+ /(opera mini)\/([-\w\.]+)/i,
42767
+ // Opera Mini
42768
+ /(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,
42769
+ // Opera Mobi/Tablet
42770
+ /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i
42771
+ // Opera
42772
+ ],
42773
+ [NAME, VERSION],
42774
+ [
42775
+ /opios[\/ ]+([\w\.]+)/i
42776
+ // Opera mini on iphone >= 8.0
42777
+ ],
42778
+ [VERSION, [NAME, OPERA + " Mini"]],
42779
+ [
42780
+ /\bopr\/([\w\.]+)/i
42781
+ // Opera Webkit
42782
+ ],
42783
+ [VERSION, [NAME, OPERA]],
42784
+ [
42785
+ // Mixed
42786
+ /\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i
42787
+ // Baidu
42788
+ ],
42789
+ [VERSION, [NAME, "Baidu"]],
42790
+ [
42791
+ /(kindle)\/([\w\.]+)/i,
42792
+ // Kindle
42793
+ /(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,
42794
+ // Lunascape/Maxthon/Netfront/Jasmine/Blazer
42795
+ // Trident based
42796
+ /(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,
42797
+ // Avant/IEMobile/SlimBrowser
42798
+ /(?:ms|\()(ie) ([\w\.]+)/i,
42799
+ // Internet Explorer
42800
+ // Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon
42801
+ /(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,
42802
+ // Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ, aka ShouQ
42803
+ /(heytap|ovi)browser\/([\d\.]+)/i,
42804
+ // Heytap/Ovi
42805
+ /(weibo)__([\d\.]+)/i
42806
+ // Weibo
42807
+ ],
42808
+ [NAME, VERSION],
42809
+ [
42810
+ /(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i
42811
+ // UCBrowser
42812
+ ],
42813
+ [VERSION, [NAME, "UC" + BROWSER]],
42814
+ [
42815
+ /microm.+\bqbcore\/([\w\.]+)/i,
42816
+ // WeChat Desktop for Windows Built-in Browser
42817
+ /\bqbcore\/([\w\.]+).+microm/i,
42818
+ /micromessenger\/([\w\.]+)/i
42819
+ // WeChat
42820
+ ],
42821
+ [VERSION, [NAME, "WeChat"]],
42822
+ [
42823
+ /konqueror\/([\w\.]+)/i
42824
+ // Konqueror
42825
+ ],
42826
+ [VERSION, [NAME, "Konqueror"]],
42827
+ [
42828
+ /trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i
42829
+ // IE11
42830
+ ],
42831
+ [VERSION, [NAME, "IE"]],
42832
+ [
42833
+ /ya(?:search)?browser\/([\w\.]+)/i
42834
+ // Yandex
42835
+ ],
42836
+ [VERSION, [NAME, "Yandex"]],
42837
+ [
42838
+ /slbrowser\/([\w\.]+)/i
42839
+ // Smart Lenovo Browser
42840
+ ],
42841
+ [VERSION, [NAME, "Smart Lenovo " + BROWSER]],
42842
+ [
42843
+ /(avast|avg)\/([\w\.]+)/i
42844
+ // Avast/AVG Secure Browser
42845
+ ],
42846
+ [[NAME, /(.+)/, "$1 Secure " + BROWSER], VERSION],
42847
+ [
42848
+ /\bfocus\/([\w\.]+)/i
42849
+ // Firefox Focus
42850
+ ],
42851
+ [VERSION, [NAME, FIREFOX + " Focus"]],
42852
+ [
42853
+ /\bopt\/([\w\.]+)/i
42854
+ // Opera Touch
42855
+ ],
42856
+ [VERSION, [NAME, OPERA + " Touch"]],
42857
+ [
42858
+ /coc_coc\w+\/([\w\.]+)/i
42859
+ // Coc Coc Browser
42860
+ ],
42861
+ [VERSION, [NAME, "Coc Coc"]],
42862
+ [
42863
+ /dolfin\/([\w\.]+)/i
42864
+ // Dolphin
42865
+ ],
42866
+ [VERSION, [NAME, "Dolphin"]],
42867
+ [
42868
+ /coast\/([\w\.]+)/i
42869
+ // Opera Coast
42870
+ ],
42871
+ [VERSION, [NAME, OPERA + " Coast"]],
42872
+ [
42873
+ /miuibrowser\/([\w\.]+)/i
42874
+ // MIUI Browser
42875
+ ],
42876
+ [VERSION, [NAME, "MIUI " + BROWSER]],
42877
+ [
42878
+ /fxios\/([-\w\.]+)/i
42879
+ // Firefox for iOS
42880
+ ],
42881
+ [VERSION, [NAME, FIREFOX]],
42882
+ [
42883
+ /\bqihu|(qi?ho?o?|360)browser/i
42884
+ // 360
42885
+ ],
42886
+ [[NAME, "360 " + BROWSER]],
42887
+ [
42888
+ /(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i
42889
+ ],
42890
+ [[NAME, /(.+)/, "$1 " + BROWSER], VERSION],
42891
+ [
42892
+ // Oculus/Sailfish/HuaweiBrowser/VivoBrowser
42893
+ /samsungbrowser\/([\w\.]+)/i
42894
+ // Samsung Internet
42895
+ ],
42896
+ [VERSION, [NAME, SAMSUNG + " Internet"]],
42897
+ [
42898
+ /(comodo_dragon)\/([\w\.]+)/i
42899
+ // Comodo Dragon
42900
+ ],
42901
+ [[NAME, /_/g, " "], VERSION],
42902
+ [
42903
+ /metasr[\/ ]?([\d\.]+)/i
42904
+ // Sogou Explorer
42905
+ ],
42906
+ [VERSION, [NAME, "Sogou Explorer"]],
42907
+ [
42908
+ /(sogou)mo\w+\/([\d\.]+)/i
42909
+ // Sogou Mobile
42910
+ ],
42911
+ [[NAME, "Sogou Mobile"], VERSION],
42912
+ [
42913
+ /(electron)\/([\w\.]+) safari/i,
42914
+ // Electron-based App
42915
+ /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,
42916
+ // Tesla
42917
+ /m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i
42918
+ // QQBrowser/2345 Browser
42919
+ ],
42920
+ [NAME, VERSION],
42921
+ [
42922
+ /(lbbrowser)/i,
42923
+ // LieBao Browser
42924
+ /\[(linkedin)app\]/i
42925
+ // LinkedIn App for iOS & Android
42926
+ ],
42927
+ [NAME],
42928
+ [
42929
+ // WebView
42930
+ /((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i
42931
+ // Facebook App for iOS & Android
42932
+ ],
42933
+ [[NAME, FACEBOOK], VERSION],
42934
+ [
42935
+ /(Klarna)\/([\w\.]+)/i,
42936
+ // Klarna Shopping Browser for iOS & Android
42937
+ /(kakao(?:talk|story))[\/ ]([\w\.]+)/i,
42938
+ // Kakao App
42939
+ /(naver)\(.*?(\d+\.[\w\.]+).*\)/i,
42940
+ // Naver InApp
42941
+ /safari (line)\/([\w\.]+)/i,
42942
+ // Line App for iOS
42943
+ /\b(line)\/([\w\.]+)\/iab/i,
42944
+ // Line App for Android
42945
+ /(alipay)client\/([\w\.]+)/i,
42946
+ // Alipay
42947
+ /(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i
42948
+ // Chromium/Instagram/Snapchat
42949
+ ],
42950
+ [NAME, VERSION],
42951
+ [
42952
+ /\bgsa\/([\w\.]+) .*safari\//i
42953
+ // Google Search Appliance on iOS
42954
+ ],
42955
+ [VERSION, [NAME, "GSA"]],
42956
+ [
42957
+ /musical_ly(?:.+app_?version\/|_)([\w\.]+)/i
42958
+ // TikTok
42959
+ ],
42960
+ [VERSION, [NAME, "TikTok"]],
42961
+ [
42962
+ /headlesschrome(?:\/([\w\.]+)| )/i
42963
+ // Chrome Headless
42964
+ ],
42965
+ [VERSION, [NAME, CHROME + " Headless"]],
42966
+ [
42967
+ / wv\).+(chrome)\/([\w\.]+)/i
42968
+ // Chrome WebView
42969
+ ],
42970
+ [[NAME, CHROME + " WebView"], VERSION],
42971
+ [
42972
+ /droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i
42973
+ // Android Browser
42974
+ ],
42975
+ [VERSION, [NAME, "Android " + BROWSER]],
42976
+ [
42977
+ /(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i
42978
+ // Chrome/OmniWeb/Arora/Tizen/Nokia
42979
+ ],
42980
+ [NAME, VERSION],
42981
+ [
42982
+ /version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i
42983
+ // Mobile Safari
42984
+ ],
42985
+ [VERSION, [NAME, "Mobile Safari"]],
42986
+ [
42987
+ /version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i
42988
+ // Safari & Safari Mobile
42989
+ ],
42990
+ [VERSION, NAME],
42991
+ [
42992
+ /webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i
42993
+ // Safari < 3.0
42994
+ ],
42995
+ [NAME, [VERSION, strMapper, oldSafariMap]],
42996
+ [
42997
+ /(webkit|khtml)\/([\w\.]+)/i
42998
+ ],
42999
+ [NAME, VERSION],
43000
+ [
43001
+ // Gecko based
43002
+ /(navigator|netscape\d?)\/([-\w\.]+)/i
43003
+ // Netscape
43004
+ ],
43005
+ [[NAME, "Netscape"], VERSION],
43006
+ [
43007
+ /mobile vr; rv:([\w\.]+)\).+firefox/i
43008
+ // Firefox Reality
43009
+ ],
43010
+ [VERSION, [NAME, FIREFOX + " Reality"]],
43011
+ [
43012
+ /ekiohf.+(flow)\/([\w\.]+)/i,
43013
+ // Flow
43014
+ /(swiftfox)/i,
43015
+ // Swiftfox
43016
+ /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,
43017
+ // IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror/Klar
43018
+ /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,
43019
+ // Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix
43020
+ /(firefox)\/([\w\.]+)/i,
43021
+ // Other Firefox-based
43022
+ /(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,
43023
+ // Mozilla
43024
+ // Other
43025
+ /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,
43026
+ // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir/Obigo/Mosaic/Go/ICE/UP.Browser
43027
+ /(links) \(([\w\.]+)/i,
43028
+ // Links
43029
+ /panasonic;(viera)/i
43030
+ // Panasonic Viera
43031
+ ],
43032
+ [NAME, VERSION],
43033
+ [
43034
+ /(cobalt)\/([\w\.]+)/i
43035
+ // Cobalt
43036
+ ],
43037
+ [NAME, [VERSION, /master.|lts./, ""]]
43038
+ ],
43039
+ cpu: [
43040
+ [
43041
+ /(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i
43042
+ // AMD64 (x64)
43043
+ ],
43044
+ [[ARCHITECTURE, "amd64"]],
43045
+ [
43046
+ /(ia32(?=;))/i
43047
+ // IA32 (quicktime)
43048
+ ],
43049
+ [[ARCHITECTURE, lowerize]],
43050
+ [
43051
+ /((?:i[346]|x)86)[;\)]/i
43052
+ // IA32 (x86)
43053
+ ],
43054
+ [[ARCHITECTURE, "ia32"]],
43055
+ [
43056
+ /\b(aarch64|arm(v?8e?l?|_?64))\b/i
43057
+ // ARM64
43058
+ ],
43059
+ [[ARCHITECTURE, "arm64"]],
43060
+ [
43061
+ /\b(arm(?:v[67])?ht?n?[fl]p?)\b/i
43062
+ // ARMHF
43063
+ ],
43064
+ [[ARCHITECTURE, "armhf"]],
43065
+ [
43066
+ // PocketPC mistakenly identified as PowerPC
43067
+ /windows (ce|mobile); ppc;/i
43068
+ ],
43069
+ [[ARCHITECTURE, "arm"]],
43070
+ [
43071
+ /((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i
43072
+ // PowerPC
43073
+ ],
43074
+ [[ARCHITECTURE, /ower/, EMPTY, lowerize]],
43075
+ [
43076
+ /(sun4\w)[;\)]/i
43077
+ // SPARC
43078
+ ],
43079
+ [[ARCHITECTURE, "sparc"]],
43080
+ [
43081
+ /((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i
43082
+ // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC
43083
+ ],
43084
+ [[ARCHITECTURE, lowerize]]
43085
+ ],
43086
+ device: [
43087
+ [
43088
+ //////////////////////////
43089
+ // MOBILES & TABLETS
43090
+ /////////////////////////
43091
+ // Samsung
43092
+ /\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i
43093
+ ],
43094
+ [MODEL, [VENDOR, SAMSUNG], [TYPE2, TABLET]],
43095
+ [
43096
+ /\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
43097
+ /samsung[- ]([-\w]+)/i,
43098
+ /sec-(sgh\w+)/i
43099
+ ],
43100
+ [MODEL, [VENDOR, SAMSUNG], [TYPE2, MOBILE]],
43101
+ [
43102
+ // Apple
43103
+ /(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i
43104
+ // iPod/iPhone
43105
+ ],
43106
+ [MODEL, [VENDOR, APPLE], [TYPE2, MOBILE]],
43107
+ [
43108
+ /\((ipad);[-\w\),; ]+apple/i,
43109
+ // iPad
43110
+ /applecoremedia\/[\w\.]+ \((ipad)/i,
43111
+ /\b(ipad)\d\d?,\d\d?[;\]].+ios/i
43112
+ ],
43113
+ [MODEL, [VENDOR, APPLE], [TYPE2, TABLET]],
43114
+ [
43115
+ /(macintosh);/i
43116
+ ],
43117
+ [MODEL, [VENDOR, APPLE]],
43118
+ [
43119
+ // Sharp
43120
+ /\b(sh-?[altvz]?\d\d[a-ekm]?)/i
43121
+ ],
43122
+ [MODEL, [VENDOR, SHARP], [TYPE2, MOBILE]],
43123
+ [
43124
+ // Huawei
43125
+ /\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i
43126
+ ],
43127
+ [MODEL, [VENDOR, HUAWEI], [TYPE2, TABLET]],
43128
+ [
43129
+ /(?:huawei|honor)([-\w ]+)[;\)]/i,
43130
+ /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i
43131
+ ],
43132
+ [MODEL, [VENDOR, HUAWEI], [TYPE2, MOBILE]],
43133
+ [
43134
+ // Xiaomi
43135
+ /\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,
43136
+ // Xiaomi POCO
43137
+ /\b; (\w+) build\/hm\1/i,
43138
+ // Xiaomi Hongmi 'numeric' models
43139
+ /\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,
43140
+ // Xiaomi Hongmi
43141
+ /\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,
43142
+ // Xiaomi Redmi
43143
+ /oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,
43144
+ // Xiaomi Redmi 'numeric' models
43145
+ /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i
43146
+ // Xiaomi Mi
43147
+ ],
43148
+ [[MODEL, /_/g, " "], [VENDOR, XIAOMI], [TYPE2, MOBILE]],
43149
+ [
43150
+ /oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,
43151
+ // Redmi Pad
43152
+ /\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i
43153
+ // Mi Pad tablets
43154
+ ],
43155
+ [[MODEL, /_/g, " "], [VENDOR, XIAOMI], [TYPE2, TABLET]],
43156
+ [
43157
+ // OPPO
43158
+ /; (\w+) bui.+ oppo/i,
43159
+ /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i
43160
+ ],
43161
+ [MODEL, [VENDOR, "OPPO"], [TYPE2, MOBILE]],
43162
+ [
43163
+ // Vivo
43164
+ /vivo (\w+)(?: bui|\))/i,
43165
+ /\b(v[12]\d{3}\w?[at])(?: bui|;)/i
43166
+ ],
43167
+ [MODEL, [VENDOR, "Vivo"], [TYPE2, MOBILE]],
43168
+ [
43169
+ // Realme
43170
+ /\b(rmx[1-3]\d{3})(?: bui|;|\))/i
43171
+ ],
43172
+ [MODEL, [VENDOR, "Realme"], [TYPE2, MOBILE]],
43173
+ [
43174
+ // Motorola
43175
+ /\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,
43176
+ /\bmot(?:orola)?[- ](\w*)/i,
43177
+ /((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i
43178
+ ],
43179
+ [MODEL, [VENDOR, MOTOROLA], [TYPE2, MOBILE]],
43180
+ [
43181
+ /\b(mz60\d|xoom[2 ]{0,2}) build\//i
43182
+ ],
43183
+ [MODEL, [VENDOR, MOTOROLA], [TYPE2, TABLET]],
43184
+ [
43185
+ // LG
43186
+ /((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i
43187
+ ],
43188
+ [MODEL, [VENDOR, LG], [TYPE2, TABLET]],
43189
+ [
43190
+ /(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
43191
+ /\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,
43192
+ /\blg-?([\d\w]+) bui/i
43193
+ ],
43194
+ [MODEL, [VENDOR, LG], [TYPE2, MOBILE]],
43195
+ [
43196
+ // Lenovo
43197
+ /(ideatab[-\w ]+)/i,
43198
+ /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i
43199
+ ],
43200
+ [MODEL, [VENDOR, "Lenovo"], [TYPE2, TABLET]],
43201
+ [
43202
+ // Nokia
43203
+ /(?:maemo|nokia).*(n900|lumia \d+)/i,
43204
+ /nokia[-_ ]?([-\w\.]*)/i
43205
+ ],
43206
+ [[MODEL, /_/g, " "], [VENDOR, "Nokia"], [TYPE2, MOBILE]],
43207
+ [
43208
+ // Google
43209
+ /(pixel c)\b/i
43210
+ // Google Pixel C
43211
+ ],
43212
+ [MODEL, [VENDOR, GOOGLE], [TYPE2, TABLET]],
43213
+ [
43214
+ /droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i
43215
+ // Google Pixel
43216
+ ],
43217
+ [MODEL, [VENDOR, GOOGLE], [TYPE2, MOBILE]],
43218
+ [
43219
+ // Sony
43220
+ /droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i
43221
+ ],
43222
+ [MODEL, [VENDOR, SONY], [TYPE2, MOBILE]],
43223
+ [
43224
+ /sony tablet [ps]/i,
43225
+ /\b(?:sony)?sgp\w+(?: bui|\))/i
43226
+ ],
43227
+ [[MODEL, "Xperia Tablet"], [VENDOR, SONY], [TYPE2, TABLET]],
43228
+ [
43229
+ // OnePlus
43230
+ / (kb2005|in20[12]5|be20[12][59])\b/i,
43231
+ /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i
43232
+ ],
43233
+ [MODEL, [VENDOR, "OnePlus"], [TYPE2, MOBILE]],
43234
+ [
43235
+ // Amazon
43236
+ /(alexa)webm/i,
43237
+ /(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,
43238
+ // Kindle Fire without Silk / Echo Show
43239
+ /(kf[a-z]+)( bui|\)).+silk\//i
43240
+ // Kindle Fire HD
43241
+ ],
43242
+ [MODEL, [VENDOR, AMAZON], [TYPE2, TABLET]],
43243
+ [
43244
+ /((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i
43245
+ // Fire Phone
43246
+ ],
43247
+ [[MODEL, /(.+)/g, "Fire Phone $1"], [VENDOR, AMAZON], [TYPE2, MOBILE]],
43248
+ [
43249
+ // BlackBerry
43250
+ /(playbook);[-\w\),; ]+(rim)/i
43251
+ // BlackBerry PlayBook
43252
+ ],
43253
+ [MODEL, VENDOR, [TYPE2, TABLET]],
43254
+ [
43255
+ /\b((?:bb[a-f]|st[hv])100-\d)/i,
43256
+ /\(bb10; (\w+)/i
43257
+ // BlackBerry 10
43258
+ ],
43259
+ [MODEL, [VENDOR, BLACKBERRY], [TYPE2, MOBILE]],
43260
+ [
43261
+ // Asus
43262
+ /(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i
43263
+ ],
43264
+ [MODEL, [VENDOR, ASUS], [TYPE2, TABLET]],
43265
+ [
43266
+ / (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i
43267
+ ],
43268
+ [MODEL, [VENDOR, ASUS], [TYPE2, MOBILE]],
43269
+ [
43270
+ // HTC
43271
+ /(nexus 9)/i
43272
+ // HTC Nexus 9
43273
+ ],
43274
+ [MODEL, [VENDOR, "HTC"], [TYPE2, TABLET]],
43275
+ [
43276
+ /(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,
43277
+ // HTC
43278
+ // ZTE
43279
+ /(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,
43280
+ /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i
43281
+ // Alcatel/GeeksPhone/Nexian/Panasonic/Sony
43282
+ ],
43283
+ [VENDOR, [MODEL, /_/g, " "], [TYPE2, MOBILE]],
43284
+ [
43285
+ // Acer
43286
+ /droid.+; ([ab][1-7]-?[0178a]\d\d?)/i
43287
+ ],
43288
+ [MODEL, [VENDOR, "Acer"], [TYPE2, TABLET]],
43289
+ [
43290
+ // Meizu
43291
+ /droid.+; (m[1-5] note) bui/i,
43292
+ /\bmz-([-\w]{2,})/i
43293
+ ],
43294
+ [MODEL, [VENDOR, "Meizu"], [TYPE2, MOBILE]],
43295
+ [
43296
+ // Ulefone
43297
+ /; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i
43298
+ ],
43299
+ [MODEL, [VENDOR, "Ulefone"], [TYPE2, MOBILE]],
43300
+ [
43301
+ // MIXED
43302
+ /(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,
43303
+ // BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron
43304
+ /(hp) ([\w ]+\w)/i,
43305
+ // HP iPAQ
43306
+ /(asus)-?(\w+)/i,
43307
+ // Asus
43308
+ /(microsoft); (lumia[\w ]+)/i,
43309
+ // Microsoft Lumia
43310
+ /(lenovo)[-_ ]?([-\w]+)/i,
43311
+ // Lenovo
43312
+ /(jolla)/i,
43313
+ // Jolla
43314
+ /(oppo) ?([\w ]+) bui/i
43315
+ // OPPO
43316
+ ],
43317
+ [VENDOR, MODEL, [TYPE2, MOBILE]],
43318
+ [
43319
+ /(kobo)\s(ereader|touch)/i,
43320
+ // Kobo
43321
+ /(archos) (gamepad2?)/i,
43322
+ // Archos
43323
+ /(hp).+(touchpad(?!.+tablet)|tablet)/i,
43324
+ // HP TouchPad
43325
+ /(kindle)\/([\w\.]+)/i,
43326
+ // Kindle
43327
+ /(nook)[\w ]+build\/(\w+)/i,
43328
+ // Nook
43329
+ /(dell) (strea[kpr\d ]*[\dko])/i,
43330
+ // Dell Streak
43331
+ /(le[- ]+pan)[- ]+(\w{1,9}) bui/i,
43332
+ // Le Pan Tablets
43333
+ /(trinity)[- ]*(t\d{3}) bui/i,
43334
+ // Trinity Tablets
43335
+ /(gigaset)[- ]+(q\w{1,9}) bui/i,
43336
+ // Gigaset Tablets
43337
+ /(vodafone) ([\w ]+)(?:\)| bui)/i
43338
+ // Vodafone
43339
+ ],
43340
+ [VENDOR, MODEL, [TYPE2, TABLET]],
43341
+ [
43342
+ /(surface duo)/i
43343
+ // Surface Duo
43344
+ ],
43345
+ [MODEL, [VENDOR, MICROSOFT], [TYPE2, TABLET]],
43346
+ [
43347
+ /droid [\d\.]+; (fp\du?)(?: b|\))/i
43348
+ // Fairphone
43349
+ ],
43350
+ [MODEL, [VENDOR, "Fairphone"], [TYPE2, MOBILE]],
43351
+ [
43352
+ /(u304aa)/i
43353
+ // AT&T
43354
+ ],
43355
+ [MODEL, [VENDOR, "AT&T"], [TYPE2, MOBILE]],
43356
+ [
43357
+ /\bsie-(\w*)/i
43358
+ // Siemens
43359
+ ],
43360
+ [MODEL, [VENDOR, "Siemens"], [TYPE2, MOBILE]],
43361
+ [
43362
+ /\b(rct\w+) b/i
43363
+ // RCA Tablets
43364
+ ],
43365
+ [MODEL, [VENDOR, "RCA"], [TYPE2, TABLET]],
43366
+ [
43367
+ /\b(venue[\d ]{2,7}) b/i
43368
+ // Dell Venue Tablets
43369
+ ],
43370
+ [MODEL, [VENDOR, "Dell"], [TYPE2, TABLET]],
43371
+ [
43372
+ /\b(q(?:mv|ta)\w+) b/i
43373
+ // Verizon Tablet
43374
+ ],
43375
+ [MODEL, [VENDOR, "Verizon"], [TYPE2, TABLET]],
43376
+ [
43377
+ /\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i
43378
+ // Barnes & Noble Tablet
43379
+ ],
43380
+ [MODEL, [VENDOR, "Barnes & Noble"], [TYPE2, TABLET]],
43381
+ [
43382
+ /\b(tm\d{3}\w+) b/i
43383
+ ],
43384
+ [MODEL, [VENDOR, "NuVision"], [TYPE2, TABLET]],
43385
+ [
43386
+ /\b(k88) b/i
43387
+ // ZTE K Series Tablet
43388
+ ],
43389
+ [MODEL, [VENDOR, "ZTE"], [TYPE2, TABLET]],
43390
+ [
43391
+ /\b(nx\d{3}j) b/i
43392
+ // ZTE Nubia
43393
+ ],
43394
+ [MODEL, [VENDOR, "ZTE"], [TYPE2, MOBILE]],
43395
+ [
43396
+ /\b(gen\d{3}) b.+49h/i
43397
+ // Swiss GEN Mobile
43398
+ ],
43399
+ [MODEL, [VENDOR, "Swiss"], [TYPE2, MOBILE]],
43400
+ [
43401
+ /\b(zur\d{3}) b/i
43402
+ // Swiss ZUR Tablet
43403
+ ],
43404
+ [MODEL, [VENDOR, "Swiss"], [TYPE2, TABLET]],
43405
+ [
43406
+ /\b((zeki)?tb.*\b) b/i
43407
+ // Zeki Tablets
43408
+ ],
43409
+ [MODEL, [VENDOR, "Zeki"], [TYPE2, TABLET]],
43410
+ [
43411
+ /\b([yr]\d{2}) b/i,
43412
+ /\b(dragon[- ]+touch |dt)(\w{5}) b/i
43413
+ // Dragon Touch Tablet
43414
+ ],
43415
+ [[VENDOR, "Dragon Touch"], MODEL, [TYPE2, TABLET]],
43416
+ [
43417
+ /\b(ns-?\w{0,9}) b/i
43418
+ // Insignia Tablets
43419
+ ],
43420
+ [MODEL, [VENDOR, "Insignia"], [TYPE2, TABLET]],
43421
+ [
43422
+ /\b((nxa|next)-?\w{0,9}) b/i
43423
+ // NextBook Tablets
43424
+ ],
43425
+ [MODEL, [VENDOR, "NextBook"], [TYPE2, TABLET]],
43426
+ [
43427
+ /\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i
43428
+ // Voice Xtreme Phones
43429
+ ],
43430
+ [[VENDOR, "Voice"], MODEL, [TYPE2, MOBILE]],
43431
+ [
43432
+ /\b(lvtel\-)?(v1[12]) b/i
43433
+ // LvTel Phones
43434
+ ],
43435
+ [[VENDOR, "LvTel"], MODEL, [TYPE2, MOBILE]],
43436
+ [
43437
+ /\b(ph-1) /i
43438
+ // Essential PH-1
43439
+ ],
43440
+ [MODEL, [VENDOR, "Essential"], [TYPE2, MOBILE]],
43441
+ [
43442
+ /\b(v(100md|700na|7011|917g).*\b) b/i
43443
+ // Envizen Tablets
43444
+ ],
43445
+ [MODEL, [VENDOR, "Envizen"], [TYPE2, TABLET]],
43446
+ [
43447
+ /\b(trio[-\w\. ]+) b/i
43448
+ // MachSpeed Tablets
43449
+ ],
43450
+ [MODEL, [VENDOR, "MachSpeed"], [TYPE2, TABLET]],
43451
+ [
43452
+ /\btu_(1491) b/i
43453
+ // Rotor Tablets
43454
+ ],
43455
+ [MODEL, [VENDOR, "Rotor"], [TYPE2, TABLET]],
43456
+ [
43457
+ /(shield[\w ]+) b/i
43458
+ // Nvidia Shield Tablets
43459
+ ],
43460
+ [MODEL, [VENDOR, "Nvidia"], [TYPE2, TABLET]],
43461
+ [
43462
+ /(sprint) (\w+)/i
43463
+ // Sprint Phones
43464
+ ],
43465
+ [VENDOR, MODEL, [TYPE2, MOBILE]],
43466
+ [
43467
+ /(kin\.[onetw]{3})/i
43468
+ // Microsoft Kin
43469
+ ],
43470
+ [[MODEL, /\./g, " "], [VENDOR, MICROSOFT], [TYPE2, MOBILE]],
43471
+ [
43472
+ /droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i
43473
+ // Zebra
43474
+ ],
43475
+ [MODEL, [VENDOR, ZEBRA], [TYPE2, TABLET]],
43476
+ [
43477
+ /droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i
43478
+ ],
43479
+ [MODEL, [VENDOR, ZEBRA], [TYPE2, MOBILE]],
43480
+ [
43481
+ ///////////////////
43482
+ // SMARTTVS
43483
+ ///////////////////
43484
+ /smart-tv.+(samsung)/i
43485
+ // Samsung
43486
+ ],
43487
+ [VENDOR, [TYPE2, SMARTTV]],
43488
+ [
43489
+ /hbbtv.+maple;(\d+)/i
43490
+ ],
43491
+ [[MODEL, /^/, "SmartTV"], [VENDOR, SAMSUNG], [TYPE2, SMARTTV]],
43492
+ [
43493
+ /(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
43494
+ // LG SmartTV
43495
+ ],
43496
+ [[VENDOR, LG], [TYPE2, SMARTTV]],
43497
+ [
43498
+ /(apple) ?tv/i
43499
+ // Apple TV
43500
+ ],
43501
+ [VENDOR, [MODEL, APPLE + " TV"], [TYPE2, SMARTTV]],
43502
+ [
43503
+ /crkey/i
43504
+ // Google Chromecast
43505
+ ],
43506
+ [[MODEL, CHROME + "cast"], [VENDOR, GOOGLE], [TYPE2, SMARTTV]],
43507
+ [
43508
+ /droid.+aft(\w+)( bui|\))/i
43509
+ // Fire TV
43510
+ ],
43511
+ [MODEL, [VENDOR, AMAZON], [TYPE2, SMARTTV]],
43512
+ [
43513
+ /\(dtv[\);].+(aquos)/i,
43514
+ /(aquos-tv[\w ]+)\)/i
43515
+ // Sharp
43516
+ ],
43517
+ [MODEL, [VENDOR, SHARP], [TYPE2, SMARTTV]],
43518
+ [
43519
+ /(bravia[\w ]+)( bui|\))/i
43520
+ // Sony
43521
+ ],
43522
+ [MODEL, [VENDOR, SONY], [TYPE2, SMARTTV]],
43523
+ [
43524
+ /(mitv-\w{5}) bui/i
43525
+ // Xiaomi
43526
+ ],
43527
+ [MODEL, [VENDOR, XIAOMI], [TYPE2, SMARTTV]],
43528
+ [
43529
+ /Hbbtv.*(technisat) (.*);/i
43530
+ // TechniSAT
43531
+ ],
43532
+ [VENDOR, MODEL, [TYPE2, SMARTTV]],
43533
+ [
43534
+ /\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,
43535
+ // Roku
43536
+ /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i
43537
+ // HbbTV devices
43538
+ ],
43539
+ [[VENDOR, trim], [MODEL, trim], [TYPE2, SMARTTV]],
43540
+ [
43541
+ /\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i
43542
+ // SmartTV from Unidentified Vendors
43543
+ ],
43544
+ [[TYPE2, SMARTTV]],
43545
+ [
43546
+ ///////////////////
43547
+ // CONSOLES
43548
+ ///////////////////
43549
+ /(ouya)/i,
43550
+ // Ouya
43551
+ /(nintendo) ([wids3utch]+)/i
43552
+ // Nintendo
43553
+ ],
43554
+ [VENDOR, MODEL, [TYPE2, CONSOLE]],
43555
+ [
43556
+ /droid.+; (shield) bui/i
43557
+ // Nvidia
43558
+ ],
43559
+ [MODEL, [VENDOR, "Nvidia"], [TYPE2, CONSOLE]],
43560
+ [
43561
+ /(playstation [345portablevi]+)/i
43562
+ // Playstation
43563
+ ],
43564
+ [MODEL, [VENDOR, SONY], [TYPE2, CONSOLE]],
43565
+ [
43566
+ /\b(xbox(?: one)?(?!; xbox))[\); ]/i
43567
+ // Microsoft Xbox
43568
+ ],
43569
+ [MODEL, [VENDOR, MICROSOFT], [TYPE2, CONSOLE]],
43570
+ [
43571
+ ///////////////////
43572
+ // WEARABLES
43573
+ ///////////////////
43574
+ /((pebble))app/i
43575
+ // Pebble
43576
+ ],
43577
+ [VENDOR, MODEL, [TYPE2, WEARABLE]],
43578
+ [
43579
+ /(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i
43580
+ // Apple Watch
43581
+ ],
43582
+ [MODEL, [VENDOR, APPLE], [TYPE2, WEARABLE]],
43583
+ [
43584
+ /droid.+; (glass) \d/i
43585
+ // Google Glass
43586
+ ],
43587
+ [MODEL, [VENDOR, GOOGLE], [TYPE2, WEARABLE]],
43588
+ [
43589
+ /droid.+; (wt63?0{2,3})\)/i
43590
+ ],
43591
+ [MODEL, [VENDOR, ZEBRA], [TYPE2, WEARABLE]],
43592
+ [
43593
+ /(quest( 2| pro)?)/i
43594
+ // Oculus Quest
43595
+ ],
43596
+ [MODEL, [VENDOR, FACEBOOK], [TYPE2, WEARABLE]],
43597
+ [
43598
+ ///////////////////
43599
+ // EMBEDDED
43600
+ ///////////////////
43601
+ /(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i
43602
+ // Tesla
43603
+ ],
43604
+ [VENDOR, [TYPE2, EMBEDDED]],
43605
+ [
43606
+ /(aeobc)\b/i
43607
+ // Echo Dot
43608
+ ],
43609
+ [MODEL, [VENDOR, AMAZON], [TYPE2, EMBEDDED]],
43610
+ [
43611
+ ////////////////////
43612
+ // MIXED (GENERIC)
43613
+ ///////////////////
43614
+ /droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i
43615
+ // Android Phones from Unidentified Vendors
43616
+ ],
43617
+ [MODEL, [TYPE2, MOBILE]],
43618
+ [
43619
+ /droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i
43620
+ // Android Tablets from Unidentified Vendors
43621
+ ],
43622
+ [MODEL, [TYPE2, TABLET]],
43623
+ [
43624
+ /\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i
43625
+ // Unidentifiable Tablet
43626
+ ],
43627
+ [[TYPE2, TABLET]],
43628
+ [
43629
+ /(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i
43630
+ // Unidentifiable Mobile
43631
+ ],
43632
+ [[TYPE2, MOBILE]],
43633
+ [
43634
+ /(android[-\w\. ]{0,9});.+buil/i
43635
+ // Generic Android Device
43636
+ ],
43637
+ [MODEL, [VENDOR, "Generic"]]
43638
+ ],
43639
+ engine: [
43640
+ [
43641
+ /windows.+ edge\/([\w\.]+)/i
43642
+ // EdgeHTML
43643
+ ],
43644
+ [VERSION, [NAME, EDGE + "HTML"]],
43645
+ [
43646
+ /webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i
43647
+ // Blink
43648
+ ],
43649
+ [VERSION, [NAME, "Blink"]],
43650
+ [
43651
+ /(presto)\/([\w\.]+)/i,
43652
+ // Presto
43653
+ /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,
43654
+ // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m/Goanna
43655
+ /ekioh(flow)\/([\w\.]+)/i,
43656
+ // Flow
43657
+ /(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,
43658
+ // KHTML/Tasman/Links
43659
+ /(icab)[\/ ]([23]\.[\d\.]+)/i,
43660
+ // iCab
43661
+ /\b(libweb)/i
43662
+ ],
43663
+ [NAME, VERSION],
43664
+ [
43665
+ /rv\:([\w\.]{1,9})\b.+(gecko)/i
43666
+ // Gecko
43667
+ ],
43668
+ [VERSION, NAME]
43669
+ ],
43670
+ os: [
43671
+ [
43672
+ // Windows
43673
+ /microsoft (windows) (vista|xp)/i
43674
+ // Windows (iTunes)
43675
+ ],
43676
+ [NAME, VERSION],
43677
+ [
43678
+ /(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i
43679
+ // Windows Phone
43680
+ ],
43681
+ [NAME, [VERSION, strMapper, windowsVersionMap]],
43682
+ [
43683
+ /windows nt 6\.2; (arm)/i,
43684
+ // Windows RT
43685
+ /windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,
43686
+ /(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i
43687
+ ],
43688
+ [[VERSION, strMapper, windowsVersionMap], [NAME, "Windows"]],
43689
+ [
43690
+ // iOS/macOS
43691
+ /ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,
43692
+ // iOS
43693
+ /(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,
43694
+ /cfnetwork\/.+darwin/i
43695
+ ],
43696
+ [[VERSION, /_/g, "."], [NAME, "iOS"]],
43697
+ [
43698
+ /(mac os x) ?([\w\. ]*)/i,
43699
+ /(macintosh|mac_powerpc\b)(?!.+haiku)/i
43700
+ // Mac OS
43701
+ ],
43702
+ [[NAME, MAC_OS], [VERSION, /_/g, "."]],
43703
+ [
43704
+ // Mobile OSes
43705
+ /droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i
43706
+ // Android-x86/HarmonyOS
43707
+ ],
43708
+ [VERSION, NAME],
43709
+ [
43710
+ // Android/WebOS/QNX/Bada/RIM/Maemo/MeeGo/Sailfish OS
43711
+ /(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,
43712
+ /(blackberry)\w*\/([\w\.]*)/i,
43713
+ // Blackberry
43714
+ /(tizen|kaios)[\/ ]([\w\.]+)/i,
43715
+ // Tizen/KaiOS
43716
+ /\((series40);/i
43717
+ // Series 40
43718
+ ],
43719
+ [NAME, VERSION],
43720
+ [
43721
+ /\(bb(10);/i
43722
+ // BlackBerry 10
43723
+ ],
43724
+ [VERSION, [NAME, BLACKBERRY]],
43725
+ [
43726
+ /(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i
43727
+ // Symbian
43728
+ ],
43729
+ [VERSION, [NAME, "Symbian"]],
43730
+ [
43731
+ /mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i
43732
+ // Firefox OS
43733
+ ],
43734
+ [VERSION, [NAME, FIREFOX + " OS"]],
43735
+ [
43736
+ /web0s;.+rt(tv)/i,
43737
+ /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i
43738
+ // WebOS
43739
+ ],
43740
+ [VERSION, [NAME, "webOS"]],
43741
+ [
43742
+ /watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i
43743
+ // watchOS
43744
+ ],
43745
+ [VERSION, [NAME, "watchOS"]],
43746
+ [
43747
+ // Google Chromecast
43748
+ /crkey\/([\d\.]+)/i
43749
+ // Google Chromecast
43750
+ ],
43751
+ [VERSION, [NAME, CHROME + "cast"]],
43752
+ [
43753
+ /(cros) [\w]+(?:\)| ([\w\.]+)\b)/i
43754
+ // Chromium OS
43755
+ ],
43756
+ [[NAME, CHROMIUM_OS], VERSION],
43757
+ [
43758
+ // Smart TVs
43759
+ /panasonic;(viera)/i,
43760
+ // Panasonic Viera
43761
+ /(netrange)mmh/i,
43762
+ // Netrange
43763
+ /(nettv)\/(\d+\.[\w\.]+)/i,
43764
+ // NetTV
43765
+ // Console
43766
+ /(nintendo|playstation) ([wids345portablevuch]+)/i,
43767
+ // Nintendo/Playstation
43768
+ /(xbox); +xbox ([^\);]+)/i,
43769
+ // Microsoft Xbox (360, One, X, S, Series X, Series S)
43770
+ // Other
43771
+ /\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,
43772
+ // Joli/Palm
43773
+ /(mint)[\/\(\) ]?(\w*)/i,
43774
+ // Mint
43775
+ /(mageia|vectorlinux)[; ]/i,
43776
+ // Mageia/VectorLinux
43777
+ /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,
43778
+ // Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware/Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus/Raspbian/Plan9/Minix/RISCOS/Contiki/Deepin/Manjaro/elementary/Sabayon/Linspire
43779
+ /(hurd|linux) ?([\w\.]*)/i,
43780
+ // Hurd/Linux
43781
+ /(gnu) ?([\w\.]*)/i,
43782
+ // GNU
43783
+ /\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,
43784
+ // FreeBSD/NetBSD/OpenBSD/PC-BSD/GhostBSD/DragonFly
43785
+ /(haiku) (\w+)/i
43786
+ // Haiku
43787
+ ],
43788
+ [NAME, VERSION],
43789
+ [
43790
+ /(sunos) ?([\w\.\d]*)/i
43791
+ // Solaris
43792
+ ],
43793
+ [[NAME, "Solaris"], VERSION],
43794
+ [
43795
+ /((?:open)?solaris)[-\/ ]?([\w\.]*)/i,
43796
+ // Solaris
43797
+ /(aix) ((\d)(?=\.|\)| )[\w\.])*/i,
43798
+ // AIX
43799
+ /\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,
43800
+ // BeOS/OS2/AmigaOS/MorphOS/OpenVMS/Fuchsia/HP-UX/SerenityOS
43801
+ /(unix) ?([\w\.]*)/i
43802
+ // UNIX
43803
+ ],
43804
+ [NAME, VERSION]
43805
+ ]
43806
+ };
43807
+ var UAParser2 = function(ua, extensions) {
43808
+ if (typeof ua === OBJ_TYPE) {
43809
+ extensions = ua;
43810
+ ua = undefined2;
43811
+ }
43812
+ if (!(this instanceof UAParser2)) {
43813
+ return new UAParser2(ua, extensions).getResult();
43814
+ }
43815
+ var _navigator = typeof window2 !== UNDEF_TYPE && window2.navigator ? window2.navigator : undefined2;
43816
+ var _ua = ua || (_navigator && _navigator.userAgent ? _navigator.userAgent : EMPTY);
43817
+ var _uach = _navigator && _navigator.userAgentData ? _navigator.userAgentData : undefined2;
43818
+ var _rgxmap = extensions ? extend(regexes, extensions) : regexes;
43819
+ var _isSelfNav = _navigator && _navigator.userAgent == _ua;
43820
+ this.getBrowser = function() {
43821
+ var _browser = {};
43822
+ _browser[NAME] = undefined2;
43823
+ _browser[VERSION] = undefined2;
43824
+ rgxMapper.call(_browser, _ua, _rgxmap.browser);
43825
+ _browser[MAJOR] = majorize(_browser[VERSION]);
43826
+ if (_isSelfNav && _navigator && _navigator.brave && typeof _navigator.brave.isBrave == FUNC_TYPE) {
43827
+ _browser[NAME] = "Brave";
43828
+ }
43829
+ return _browser;
43830
+ };
43831
+ this.getCPU = function() {
43832
+ var _cpu = {};
43833
+ _cpu[ARCHITECTURE] = undefined2;
43834
+ rgxMapper.call(_cpu, _ua, _rgxmap.cpu);
43835
+ return _cpu;
43836
+ };
43837
+ this.getDevice = function() {
43838
+ var _device = {};
43839
+ _device[VENDOR] = undefined2;
43840
+ _device[MODEL] = undefined2;
43841
+ _device[TYPE2] = undefined2;
43842
+ rgxMapper.call(_device, _ua, _rgxmap.device);
43843
+ if (_isSelfNav && !_device[TYPE2] && _uach && _uach.mobile) {
43844
+ _device[TYPE2] = MOBILE;
43845
+ }
43846
+ if (_isSelfNav && _device[MODEL] == "Macintosh" && _navigator && typeof _navigator.standalone !== UNDEF_TYPE && _navigator.maxTouchPoints && _navigator.maxTouchPoints > 2) {
43847
+ _device[MODEL] = "iPad";
43848
+ _device[TYPE2] = TABLET;
43849
+ }
43850
+ return _device;
43851
+ };
43852
+ this.getEngine = function() {
43853
+ var _engine = {};
43854
+ _engine[NAME] = undefined2;
43855
+ _engine[VERSION] = undefined2;
43856
+ rgxMapper.call(_engine, _ua, _rgxmap.engine);
43857
+ return _engine;
43858
+ };
43859
+ this.getOS = function() {
43860
+ var _os = {};
43861
+ _os[NAME] = undefined2;
43862
+ _os[VERSION] = undefined2;
43863
+ rgxMapper.call(_os, _ua, _rgxmap.os);
43864
+ if (_isSelfNav && !_os[NAME] && _uach && _uach.platform != "Unknown") {
43865
+ _os[NAME] = _uach.platform.replace(/chrome os/i, CHROMIUM_OS).replace(/macos/i, MAC_OS);
43866
+ }
43867
+ return _os;
43868
+ };
43869
+ this.getResult = function() {
43870
+ return {
43871
+ ua: this.getUA(),
43872
+ browser: this.getBrowser(),
43873
+ engine: this.getEngine(),
43874
+ os: this.getOS(),
43875
+ device: this.getDevice(),
43876
+ cpu: this.getCPU()
43877
+ };
43878
+ };
43879
+ this.getUA = function() {
43880
+ return _ua;
43881
+ };
43882
+ this.setUA = function(ua2) {
43883
+ _ua = typeof ua2 === STR_TYPE && ua2.length > UA_MAX_LENGTH ? trim(ua2, UA_MAX_LENGTH) : ua2;
43884
+ return this;
43885
+ };
43886
+ this.setUA(_ua);
43887
+ return this;
43888
+ };
43889
+ UAParser2.VERSION = LIBVERSION;
43890
+ UAParser2.BROWSER = enumerize([NAME, VERSION, MAJOR]);
43891
+ UAParser2.CPU = enumerize([ARCHITECTURE]);
43892
+ UAParser2.DEVICE = enumerize([MODEL, VENDOR, TYPE2, CONSOLE, MOBILE, SMARTTV, TABLET, WEARABLE, EMBEDDED]);
43893
+ UAParser2.ENGINE = UAParser2.OS = enumerize([NAME, VERSION]);
43894
+ if (typeof exports !== UNDEF_TYPE) {
43895
+ if (typeof module2 !== UNDEF_TYPE && module2.exports) {
43896
+ exports = module2.exports = UAParser2;
43897
+ }
43898
+ exports.UAParser = UAParser2;
43899
+ } else {
43900
+ if (typeof define === FUNC_TYPE && define.amd) {
43901
+ define(function() {
43902
+ return UAParser2;
43903
+ });
43904
+ } else if (typeof window2 !== UNDEF_TYPE) {
43905
+ window2.UAParser = UAParser2;
43906
+ }
43907
+ }
43908
+ var $ = typeof window2 !== UNDEF_TYPE && (window2.jQuery || window2.Zepto);
43909
+ if ($ && !$.ua) {
43910
+ var parser = new UAParser2();
43911
+ $.ua = parser.getResult();
43912
+ $.ua.get = function() {
43913
+ return parser.getUA();
43914
+ };
43915
+ $.ua.set = function(ua) {
43916
+ parser.setUA(ua);
43917
+ var result = parser.getResult();
43918
+ for (var prop in result) {
43919
+ $.ua[prop] = result[prop];
43920
+ }
43921
+ };
43922
+ }
43923
+ })(typeof window === "object" ? window : exports);
43924
+ }
43925
+ });
43926
+
42600
43927
  // ../../node_modules/use-debounce/dist/index.module.js
42601
43928
  var index_module_exports = {};
42602
43929
  __export(index_module_exports, {
@@ -44541,6 +45868,26 @@ var require_dist = __commonJS({
44541
45868
  mod
44542
45869
  ));
44543
45870
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
45871
+ var __async2 = (__this, __arguments, generator) => {
45872
+ return new Promise((resolve, reject) => {
45873
+ var fulfilled = (value) => {
45874
+ try {
45875
+ step(generator.next(value));
45876
+ } catch (e2) {
45877
+ reject(e2);
45878
+ }
45879
+ };
45880
+ var rejected = (value) => {
45881
+ try {
45882
+ step(generator.throw(value));
45883
+ } catch (e2) {
45884
+ reject(e2);
45885
+ }
45886
+ };
45887
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
45888
+ step((generator = generator.apply(__this, __arguments)).next());
45889
+ });
45890
+ };
44544
45891
  var auto_frame_component_exports = {};
44545
45892
  __export2(auto_frame_component_exports, {
44546
45893
  default: () => AutoFrameComponent_default
@@ -44559,21 +45906,76 @@ var require_dist = __commonJS({
44559
45906
  });
44560
45907
  return collected;
44561
45908
  };
45909
+ var getStyleSheet = (el) => {
45910
+ return Array.from(document.styleSheets).find((ss) => {
45911
+ const ownerNode = ss.ownerNode;
45912
+ return ownerNode.href === el.href;
45913
+ });
45914
+ };
45915
+ var getStyles2 = (styleSheet) => {
45916
+ if (styleSheet) {
45917
+ try {
45918
+ return [...styleSheet.cssRules].map((rule) => rule.cssText).join("");
45919
+ } catch (e2) {
45920
+ console.warn(
45921
+ "Access to stylesheet %s is denied. Ignoring\u2026",
45922
+ styleSheet.href
45923
+ );
45924
+ }
45925
+ }
45926
+ return "";
45927
+ };
45928
+ var defer = (fn) => setTimeout(fn, 0);
44562
45929
  var CopyHostStyles = ({
44563
45930
  children,
44564
45931
  debug = false,
44565
45932
  onStylesLoaded = () => null
44566
45933
  }) => {
44567
45934
  const { document: doc, window: win } = (0, import_react_frame_component.useFrame)();
44568
- (0, import_react22.useLayoutEffect)(() => {
45935
+ (0, import_react22.useEffect)(() => {
44569
45936
  if (!win || !doc) {
44570
45937
  return () => {
44571
45938
  };
44572
45939
  }
44573
- const elements = [];
45940
+ let elements = [];
45941
+ const hashes = {};
44574
45942
  const lookupEl = (el) => elements.findIndex((elementMap) => elementMap.original === el);
45943
+ const mirrorEl = (el, onLoad = () => {
45944
+ }) => __async2(void 0, null, function* () {
45945
+ let mirror;
45946
+ if (el.nodeName === "LINK") {
45947
+ mirror = document.createElement("style");
45948
+ mirror.type = "text/css";
45949
+ let styleSheet = getStyleSheet(el);
45950
+ if (!styleSheet) {
45951
+ yield new Promise((resolve) => {
45952
+ const fn = () => {
45953
+ resolve();
45954
+ el.removeEventListener("load", fn);
45955
+ };
45956
+ el.addEventListener("load", fn);
45957
+ });
45958
+ styleSheet = getStyleSheet(el);
45959
+ }
45960
+ const styles = getStyles2(styleSheet);
45961
+ if (!styles) {
45962
+ if (debug) {
45963
+ console.warn(
45964
+ `Tried to load styles for link element, but couldn't find them. Skipping...`
45965
+ );
45966
+ }
45967
+ return;
45968
+ }
45969
+ mirror.innerHTML = styles;
45970
+ mirror.setAttribute("data-href", el.getAttribute("href"));
45971
+ } else {
45972
+ mirror = el.cloneNode(true);
45973
+ }
45974
+ mirror.onload = onLoad;
45975
+ return mirror;
45976
+ });
44575
45977
  const addEl = (el, onLoad = () => {
44576
- }) => {
45978
+ }) => __async2(void 0, null, function* () {
44577
45979
  const index = lookupEl(el);
44578
45980
  if (index > -1) {
44579
45981
  if (debug)
@@ -44584,11 +45986,13 @@ var require_dist = __commonJS({
44584
45986
  onLoad();
44585
45987
  return;
44586
45988
  }
44587
- const elHash = (0, import_object_hash.default)(el.outerHTML);
44588
- const existingHashes = collectStyles(doc).map(
44589
- (existingStyle) => (0, import_object_hash.default)(existingStyle.outerHTML)
44590
- );
44591
- if (existingHashes.indexOf(elHash) > -1) {
45989
+ const mirror = yield mirrorEl(el, onLoad);
45990
+ if (!mirror) {
45991
+ onLoad();
45992
+ return;
45993
+ }
45994
+ const elHash = (0, import_object_hash.default)(mirror.outerHTML);
45995
+ if (hashes[elHash]) {
44592
45996
  if (debug)
44593
45997
  console.log(
44594
45998
  `iframe already contains element that is being mirrored. Skipping...`
@@ -44596,14 +46000,15 @@ var require_dist = __commonJS({
44596
46000
  onLoad();
44597
46001
  return;
44598
46002
  }
44599
- const mirror = el.cloneNode(true);
46003
+ hashes[elHash] = true;
44600
46004
  mirror.onload = onLoad;
44601
46005
  doc.head.append(mirror);
44602
46006
  elements.push({ original: el, mirror });
44603
46007
  if (debug)
44604
46008
  console.log(`Added style node ${el.outerHTML}`);
44605
- };
46009
+ });
44606
46010
  const removeEl = (el) => {
46011
+ var _a3, _b;
44607
46012
  const index = lookupEl(el);
44608
46013
  if (index === -1) {
44609
46014
  if (debug)
@@ -44612,7 +46017,9 @@ var require_dist = __commonJS({
44612
46017
  );
44613
46018
  return;
44614
46019
  }
44615
- elements[index].mirror.remove();
46020
+ const elHash = (0, import_object_hash.default)(el.outerHTML);
46021
+ (_b = (_a3 = elements[index]) == null ? void 0 : _a3.mirror) == null ? void 0 : _b.remove();
46022
+ delete hashes[elHash];
44616
46023
  if (debug)
44617
46024
  console.log(`Removed style node ${el.outerHTML}`);
44618
46025
  };
@@ -44623,7 +46030,7 @@ var require_dist = __commonJS({
44623
46030
  if (node.nodeType === Node.TEXT_NODE || node.nodeType === Node.ELEMENT_NODE) {
44624
46031
  const el = node.nodeType === Node.TEXT_NODE ? node.parentElement : node;
44625
46032
  if (el && el.matches(styleSelector)) {
44626
- addEl(el);
46033
+ defer(() => addEl(el));
44627
46034
  }
44628
46035
  }
44629
46036
  });
@@ -44631,7 +46038,7 @@ var require_dist = __commonJS({
44631
46038
  if (node.nodeType === Node.TEXT_NODE || node.nodeType === Node.ELEMENT_NODE) {
44632
46039
  const el = node.nodeType === Node.TEXT_NODE ? node.parentElement : node;
44633
46040
  if (el && el.matches(styleSelector)) {
44634
- removeEl(el);
46041
+ defer(() => removeEl(el));
44635
46042
  }
44636
46043
  }
44637
46044
  });
@@ -44640,26 +46047,49 @@ var require_dist = __commonJS({
44640
46047
  });
44641
46048
  const parentDocument = win.parent.document;
44642
46049
  const collectedStyles = collectStyles(parentDocument);
44643
- let mountedCounter = 0;
44644
- collectedStyles.forEach((styleNode) => {
44645
- addEl(styleNode, () => {
44646
- mountedCounter += 1;
44647
- if (mountedCounter === collectedStyles.length) {
44648
- onStylesLoaded();
46050
+ const hrefs = [];
46051
+ Promise.all(
46052
+ collectedStyles.map((styleNode, i2) => __async2(void 0, null, function* () {
46053
+ if (styleNode.nodeName === "LINK") {
46054
+ const linkHref = styleNode.href;
46055
+ if (hrefs.indexOf(linkHref) > -1) {
46056
+ return;
46057
+ }
46058
+ hrefs.push(linkHref);
44649
46059
  }
46060
+ const mirror = yield mirrorEl(styleNode);
46061
+ if (!mirror)
46062
+ return;
46063
+ elements.push({ original: styleNode, mirror });
46064
+ return mirror;
46065
+ }))
46066
+ ).then((mirrorStyles) => {
46067
+ const filtered = mirrorStyles.filter(
46068
+ (el) => typeof el !== "undefined"
46069
+ );
46070
+ doc.head.innerHTML = "";
46071
+ doc.head.append(...filtered);
46072
+ observer.observe(parentDocument.head, { childList: true, subtree: true });
46073
+ filtered.forEach((el) => {
46074
+ const elHash = (0, import_object_hash.default)(el.outerHTML);
46075
+ hashes[elHash] = true;
44650
46076
  });
46077
+ onStylesLoaded();
44651
46078
  });
44652
- observer.observe(parentDocument.head, { childList: true, subtree: true });
44653
46079
  return () => {
44654
46080
  observer.disconnect();
44655
46081
  };
44656
46082
  }, []);
44657
46083
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_jsx_runtime8.Fragment, { children });
44658
46084
  };
44659
- var AutoFrameComponent_default = import_react22.default.forwardRef(function(_a3, ref2) {
44660
- var _b = _a3, { children, debug, onStylesLoaded } = _b, props = __objRest2(_b, ["children", "debug", "onStylesLoaded"]);
44661
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_frame_component.default, __spreadProps2(__spreadValues2({}, props), { ref: ref2, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(CopyHostStyles, { debug, onStylesLoaded, children }) }));
44662
- });
46085
+ var AutoFrameComponent = import_react22.default.forwardRef(
46086
+ function(_a3, ref2) {
46087
+ var _b = _a3, { children, debug, onStylesLoaded } = _b, props = __objRest2(_b, ["children", "debug", "onStylesLoaded"]);
46088
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_frame_component.default, __spreadProps2(__spreadValues2({}, props), { ref: ref2, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(CopyHostStyles, { debug, onStylesLoaded, children }) }));
46089
+ }
46090
+ );
46091
+ AutoFrameComponent.displayName = "AutoFrameComponent";
46092
+ var AutoFrameComponent_default = AutoFrameComponent;
44663
46093
  }
44664
46094
  });
44665
46095
 
@@ -74400,6 +75830,7 @@ var require_dist2 = __commonJS({
74400
75830
  { width: 768, height: "auto", icon: "Tablet", label: "Medium" },
74401
75831
  { width: 1280, height: "auto", icon: "Monitor", label: "Large" }
74402
75832
  ];
75833
+ var import_ua_parser_js2 = require_ua_parser();
74403
75834
  var import_jsx_runtime22 = require("react/jsx-runtime");
74404
75835
  var defaultAppState2 = {
74405
75836
  data: { content: [], root: { props: { title: "" } } },
@@ -74439,7 +75870,8 @@ var require_dist2 = __commonJS({
74439
75870
  setZoomConfig: () => null,
74440
75871
  status: "LOADING",
74441
75872
  setStatus: () => null,
74442
- iframe: {}
75873
+ iframe: {},
75874
+ safariFallbackMode: false
74443
75875
  };
74444
75876
  var appContext2 = (0, import_react32.createContext)(defaultContext2);
74445
75877
  var AppProvider = ({
@@ -74451,10 +75883,34 @@ var require_dist2 = __commonJS({
74451
75883
  (0, import_react32.useEffect)(() => {
74452
75884
  setStatus("MOUNTED");
74453
75885
  }, []);
75886
+ const [safariFallbackMode, setSafariFallbackMode] = (0, import_react32.useState)(false);
75887
+ (0, import_react32.useEffect)(() => {
75888
+ var _a3, _b, _c;
75889
+ const ua = new import_ua_parser_js2.UAParser(navigator.userAgent);
75890
+ const { browser } = ua.getResult();
75891
+ if (browser.name === "Safari" && (((_a3 = browser.version) == null ? void 0 : _a3.indexOf("17.2.")) || ((_b = browser.version) == null ? void 0 : _b.indexOf("17.3.")) || ((_c = browser.version) == null ? void 0 : _c.indexOf("17.4.")))) {
75892
+ if (process.env.NODE_ENV !== "production" && value.iframe.enabled) {
75893
+ console.warn(
75894
+ `Detected Safari ${browser.version}, which contains a bug that prevents Puck DropZones from detecting a mouseover event within an iframe. This affects Safari versions 17.2, 17.3 and 17.4.
75895
+
75896
+ Running in compatibility mode, which may have some DropZone side-effects. Alternatively, consider disabling iframes: https://puckeditor.com/docs/integrating-puck/viewports#opting-out-of-iframes.
75897
+
75898
+ See https://github.com/measuredco/puck/issues/411 for more information. This message will not show in production.`
75899
+ );
75900
+ }
75901
+ setSafariFallbackMode(true);
75902
+ }
75903
+ }, []);
74454
75904
  return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
74455
75905
  appContext2.Provider,
74456
75906
  {
74457
- value: __spreadProps2(__spreadValues2({}, value), { zoomConfig, setZoomConfig, status, setStatus }),
75907
+ value: __spreadProps2(__spreadValues2({}, value), {
75908
+ zoomConfig,
75909
+ setZoomConfig,
75910
+ status,
75911
+ setStatus,
75912
+ safariFallbackMode
75913
+ }),
74458
75914
  children
74459
75915
  }
74460
75916
  );
@@ -75176,7 +76632,11 @@ var require_dist2 = __commonJS({
75176
76632
  let isEnabled = userWillDrag;
75177
76633
  if (userIsDragging) {
75178
76634
  if (draggingNewComponent) {
75179
- isEnabled = hoveringOverArea;
76635
+ if (appContext22.safariFallbackMode) {
76636
+ isEnabled = true;
76637
+ } else {
76638
+ isEnabled = hoveringOverArea;
76639
+ }
75180
76640
  } else {
75181
76641
  isEnabled = draggingOverArea && hoveringOverZone;
75182
76642
  }
@@ -76902,7 +78362,7 @@ var require_dist2 = __commonJS({
76902
78362
  onChange(e2.currentTarget.value);
76903
78363
  },
76904
78364
  disabled: readOnly,
76905
- defaultChecked: value === option.value
78365
+ checked: value === option.value
76906
78366
  }
76907
78367
  ),
76908
78368
  /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: getClassName14("radioInner"), children: option.label || option.value })
@@ -76942,7 +78402,7 @@ var require_dist2 = __commonJS({
76942
78402
  disabled: readOnly,
76943
78403
  onChange: (e2) => {
76944
78404
  if (e2.currentTarget.value === "true" || e2.currentTarget.value === "false") {
76945
- onChange(Boolean(e2.currentTarget.value));
78405
+ onChange(JSON.parse(e2.currentTarget.value));
76946
78406
  return;
76947
78407
  }
76948
78408
  onChange(e2.currentTarget.value);
@@ -78197,7 +79657,8 @@ var require_dist2 = __commonJS({
78197
79657
  viewports = defaultViewports2,
78198
79658
  iframe = {
78199
79659
  enabled: true
78200
- }
79660
+ },
79661
+ dnd
78201
79662
  }) {
78202
79663
  var _a3;
78203
79664
  const historyStore = useHistoryStore();
@@ -78397,6 +79858,7 @@ var require_dist2 = __commonJS({
78397
79858
  children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
78398
79859
  DragDropContext2,
78399
79860
  {
79861
+ autoScrollerOptions: { disabled: dnd == null ? void 0 : dnd.disableAutoScroll },
78400
79862
  onDragUpdate: (update2) => {
78401
79863
  setDraggedItem(__spreadValues2(__spreadValues2({}, draggedItem), update2));
78402
79864
  onDragStartOrUpdate(update2);
@@ -78957,6 +80419,7 @@ var defaultViewports = [
78957
80419
  ];
78958
80420
 
78959
80421
  // ../core/components/Puck/context.tsx
80422
+ var import_ua_parser_js = __toESM(require_ua_parser());
78960
80423
  var import_jsx_runtime4 = require("react/jsx-runtime");
78961
80424
  var defaultAppState = {
78962
80425
  data: { content: [], root: { props: { title: "" } } },
@@ -78996,7 +80459,8 @@ var defaultContext = {
78996
80459
  setZoomConfig: () => null,
78997
80460
  status: "LOADING",
78998
80461
  setStatus: () => null,
78999
- iframe: {}
80462
+ iframe: {},
80463
+ safariFallbackMode: false
79000
80464
  };
79001
80465
  var appContext = (0, import_react10.createContext)(defaultContext);
79002
80466
  function useAppContext() {