@measured/puck-plugin-heading-analyzer 0.14.2-canary.03ab0bd → 0.14.2-canary.25a7c4b

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 +1461 -26
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -35204,6 +35204,26 @@ function getFurthestAway({
35204
35204
  }).sort((a2, b) => b.distance - a2.distance);
35205
35205
  return sorted[0] ? sorted[0].id : null;
35206
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
+ }
35207
35227
  function getDroppableOver({
35208
35228
  pageBorderBox,
35209
35229
  draggable: draggable2,
@@ -35244,10 +35264,14 @@ function getDroppableOver({
35244
35264
  if (candidates.length === 1) {
35245
35265
  return candidates[0].descriptor.id;
35246
35266
  }
35267
+ const normalizedCandidates = normalizeFamilies(pageBorderBox, candidates);
35268
+ if (normalizedCandidates.length === 1) {
35269
+ return normalizedCandidates[0].descriptor.id;
35270
+ }
35247
35271
  return getFurthestAway({
35248
35272
  pageBorderBox,
35249
35273
  draggable: draggable2,
35250
- candidates
35274
+ candidates: normalizedCandidates
35251
35275
  });
35252
35276
  }
35253
35277
  function getIsDisplaced({
@@ -35470,7 +35494,10 @@ function querySelectorAllIframe(selector) {
35470
35494
  iframes = iframes.filter((iframe) => iframe.hasAttribute("data-rfd-iframe"));
35471
35495
  iframeCache.set("iframes", iframes);
35472
35496
  }
35473
- const iframePossible = iframes.reduce((acc, iframe) => [...acc, ...querySelectorAll(iframe.contentWindow.document, selector)], []);
35497
+ const iframePossible = iframes.reduce((acc, iframe) => {
35498
+ var _a3;
35499
+ return [...acc, ...((_a3 = iframe.contentWindow) == null ? void 0 : _a3.document) ? querySelectorAll(iframe.contentWindow.document, selector) : []];
35500
+ }, []);
35474
35501
  return [...querySelectorAll(document, selector), ...iframePossible];
35475
35502
  }
35476
35503
  function useStyleMarshal(contextId, nonce) {
@@ -35492,7 +35519,10 @@ function useStyleMarshal(contextId, nonce) {
35492
35519
  useLayoutEffect2(() => {
35493
35520
  const alwaysSelector = `[${alwaysDataAttr}="${contextId}"]`;
35494
35521
  const dynamicSelector = `[${dynamicDataAttr}="${contextId}"]`;
35495
- const heads = [getHead(document), ...querySelectorAll(document, `[${prefix2}-iframe]`).map((iframe) => getHead(iframe.contentWindow.document))];
35522
+ const heads = [getHead(document), ...querySelectorAll(document, `[${prefix2}-iframe]`).filter((iframe) => {
35523
+ var _a3;
35524
+ return (_a3 = iframe.contentWindow) == null ? void 0 : _a3.document;
35525
+ }).map((iframe) => getHead(iframe.contentWindow.document))];
35496
35526
  heads.forEach((head) => {
35497
35527
  if (!head)
35498
35528
  return;
@@ -37612,7 +37642,7 @@ function getBody() {
37612
37642
  !document.body ? process.env.NODE_ENV !== "production" ? invariant2(false, "document.body is not ready") : invariant2(false) : void 0;
37613
37643
  return document.body;
37614
37644
  }
37615
- 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, 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;
37645
+ 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;
37616
37646
  var init_dnd_esm = __esm({
37617
37647
  "../../node_modules/@measured/dnd/dist/dnd.esm.js"() {
37618
37648
  init_react_import();
@@ -41981,7 +42011,8 @@ var init_dnd_esm = __esm({
41981
42011
  client,
41982
42012
  page,
41983
42013
  closest: closest2,
41984
- transform
42014
+ transform,
42015
+ parents
41985
42016
  }) => {
41986
42017
  const frame = (() => {
41987
42018
  if (!closest2) {
@@ -42030,7 +42061,8 @@ var init_dnd_esm = __esm({
42030
42061
  page,
42031
42062
  frame,
42032
42063
  subject,
42033
- transform
42064
+ transform,
42065
+ parents
42034
42066
  };
42035
42067
  return dimension;
42036
42068
  };
@@ -42067,6 +42099,27 @@ var init_dnd_esm = __esm({
42067
42099
  });
42068
42100
  return client;
42069
42101
  };
42102
+ getParents = (ref2) => {
42103
+ var _a3;
42104
+ const contextId = ref2.getAttribute(`${prefix2}-droppable-context-id`);
42105
+ const parentDescriptors = [];
42106
+ if (!contextId)
42107
+ return [];
42108
+ let currentEl = ref2;
42109
+ while (currentEl) {
42110
+ currentEl = (_a3 = currentEl.parentElement) == null ? void 0 : _a3.closest(`[${prefix2}-droppable-context-id="${contextId}"]`);
42111
+ const id = currentEl == null ? void 0 : currentEl.getAttribute(`${prefix2}-droppable-id`);
42112
+ if (id) {
42113
+ parentDescriptors.push({
42114
+ id,
42115
+ mode: "standard",
42116
+ type: "DEFAULT"
42117
+ });
42118
+ }
42119
+ }
42120
+ parentDescriptors.reverse();
42121
+ return parentDescriptors;
42122
+ };
42070
42123
  getDimension = ({
42071
42124
  ref: ref2,
42072
42125
  descriptor,
@@ -42102,6 +42155,7 @@ var init_dnd_esm = __esm({
42102
42155
  shouldClipSubject
42103
42156
  };
42104
42157
  })();
42158
+ const parents = getParents(ref2);
42105
42159
  const dimension = getDroppableDimension({
42106
42160
  descriptor,
42107
42161
  isEnabled: !isDropDisabled,
@@ -42111,7 +42165,8 @@ var init_dnd_esm = __esm({
42111
42165
  client,
42112
42166
  page,
42113
42167
  closest: closest2,
42114
- transform
42168
+ transform,
42169
+ parents
42115
42170
  });
42116
42171
  return dimension;
42117
42172
  };
@@ -42582,6 +42637,1291 @@ var init_dnd_esm = __esm({
42582
42637
  }
42583
42638
  });
42584
42639
 
42640
+ // ../../node_modules/ua-parser-js/src/ua-parser.js
42641
+ var require_ua_parser = __commonJS({
42642
+ "../../node_modules/ua-parser-js/src/ua-parser.js"(exports, module2) {
42643
+ init_react_import();
42644
+ (function(window2, undefined2) {
42645
+ "use strict";
42646
+ 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;
42647
+ 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";
42648
+ var extend = function(regexes2, extensions) {
42649
+ var mergedRegexes = {};
42650
+ for (var i2 in regexes2) {
42651
+ if (extensions[i2] && extensions[i2].length % 2 === 0) {
42652
+ mergedRegexes[i2] = extensions[i2].concat(regexes2[i2]);
42653
+ } else {
42654
+ mergedRegexes[i2] = regexes2[i2];
42655
+ }
42656
+ }
42657
+ return mergedRegexes;
42658
+ }, enumerize = function(arr) {
42659
+ var enums = {};
42660
+ for (var i2 = 0; i2 < arr.length; i2++) {
42661
+ enums[arr[i2].toUpperCase()] = arr[i2];
42662
+ }
42663
+ return enums;
42664
+ }, has = function(str1, str2) {
42665
+ return typeof str1 === STR_TYPE ? lowerize(str2).indexOf(lowerize(str1)) !== -1 : false;
42666
+ }, lowerize = function(str) {
42667
+ return str.toLowerCase();
42668
+ }, majorize = function(version2) {
42669
+ return typeof version2 === STR_TYPE ? version2.replace(/[^\d\.]/g, EMPTY).split(".")[0] : undefined2;
42670
+ }, trim = function(str, len) {
42671
+ if (typeof str === STR_TYPE) {
42672
+ str = str.replace(/^\s\s*/, EMPTY);
42673
+ return typeof len === UNDEF_TYPE ? str : str.substring(0, UA_MAX_LENGTH);
42674
+ }
42675
+ };
42676
+ var rgxMapper = function(ua, arrays) {
42677
+ var i2 = 0, j, k, p, q, matches, match;
42678
+ while (i2 < arrays.length && !matches) {
42679
+ var regex = arrays[i2], props = arrays[i2 + 1];
42680
+ j = k = 0;
42681
+ while (j < regex.length && !matches) {
42682
+ if (!regex[j]) {
42683
+ break;
42684
+ }
42685
+ matches = regex[j++].exec(ua);
42686
+ if (!!matches) {
42687
+ for (p = 0; p < props.length; p++) {
42688
+ match = matches[++k];
42689
+ q = props[p];
42690
+ if (typeof q === OBJ_TYPE && q.length > 0) {
42691
+ if (q.length === 2) {
42692
+ if (typeof q[1] == FUNC_TYPE) {
42693
+ this[q[0]] = q[1].call(this, match);
42694
+ } else {
42695
+ this[q[0]] = q[1];
42696
+ }
42697
+ } else if (q.length === 3) {
42698
+ if (typeof q[1] === FUNC_TYPE && !(q[1].exec && q[1].test)) {
42699
+ this[q[0]] = match ? q[1].call(this, match, q[2]) : undefined2;
42700
+ } else {
42701
+ this[q[0]] = match ? match.replace(q[1], q[2]) : undefined2;
42702
+ }
42703
+ } else if (q.length === 4) {
42704
+ this[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined2;
42705
+ }
42706
+ } else {
42707
+ this[q] = match ? match : undefined2;
42708
+ }
42709
+ }
42710
+ }
42711
+ }
42712
+ i2 += 2;
42713
+ }
42714
+ }, strMapper = function(str, map) {
42715
+ for (var i2 in map) {
42716
+ if (typeof map[i2] === OBJ_TYPE && map[i2].length > 0) {
42717
+ for (var j = 0; j < map[i2].length; j++) {
42718
+ if (has(map[i2][j], str)) {
42719
+ return i2 === UNKNOWN ? undefined2 : i2;
42720
+ }
42721
+ }
42722
+ } else if (has(map[i2], str)) {
42723
+ return i2 === UNKNOWN ? undefined2 : i2;
42724
+ }
42725
+ }
42726
+ return str;
42727
+ };
42728
+ var oldSafariMap = {
42729
+ "1.0": "/8",
42730
+ "1.2": "/1",
42731
+ "1.3": "/3",
42732
+ "2.0": "/412",
42733
+ "2.0.2": "/416",
42734
+ "2.0.3": "/417",
42735
+ "2.0.4": "/419",
42736
+ "?": "/"
42737
+ }, windowsVersionMap = {
42738
+ "ME": "4.90",
42739
+ "NT 3.11": "NT3.51",
42740
+ "NT 4.0": "NT4.0",
42741
+ "2000": "NT 5.0",
42742
+ "XP": ["NT 5.1", "NT 5.2"],
42743
+ "Vista": "NT 6.0",
42744
+ "7": "NT 6.1",
42745
+ "8": "NT 6.2",
42746
+ "8.1": "NT 6.3",
42747
+ "10": ["NT 6.4", "NT 10.0"],
42748
+ "RT": "ARM"
42749
+ };
42750
+ var regexes = {
42751
+ browser: [
42752
+ [
42753
+ /\b(?:crmo|crios)\/([\w\.]+)/i
42754
+ // Chrome for Android/iOS
42755
+ ],
42756
+ [VERSION, [NAME, "Chrome"]],
42757
+ [
42758
+ /edg(?:e|ios|a)?\/([\w\.]+)/i
42759
+ // Microsoft Edge
42760
+ ],
42761
+ [VERSION, [NAME, "Edge"]],
42762
+ [
42763
+ // Presto based
42764
+ /(opera mini)\/([-\w\.]+)/i,
42765
+ // Opera Mini
42766
+ /(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,
42767
+ // Opera Mobi/Tablet
42768
+ /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i
42769
+ // Opera
42770
+ ],
42771
+ [NAME, VERSION],
42772
+ [
42773
+ /opios[\/ ]+([\w\.]+)/i
42774
+ // Opera mini on iphone >= 8.0
42775
+ ],
42776
+ [VERSION, [NAME, OPERA + " Mini"]],
42777
+ [
42778
+ /\bopr\/([\w\.]+)/i
42779
+ // Opera Webkit
42780
+ ],
42781
+ [VERSION, [NAME, OPERA]],
42782
+ [
42783
+ // Mixed
42784
+ /\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i
42785
+ // Baidu
42786
+ ],
42787
+ [VERSION, [NAME, "Baidu"]],
42788
+ [
42789
+ /(kindle)\/([\w\.]+)/i,
42790
+ // Kindle
42791
+ /(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,
42792
+ // Lunascape/Maxthon/Netfront/Jasmine/Blazer
42793
+ // Trident based
42794
+ /(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,
42795
+ // Avant/IEMobile/SlimBrowser
42796
+ /(?:ms|\()(ie) ([\w\.]+)/i,
42797
+ // Internet Explorer
42798
+ // Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon
42799
+ /(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,
42800
+ // Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ, aka ShouQ
42801
+ /(heytap|ovi)browser\/([\d\.]+)/i,
42802
+ // Heytap/Ovi
42803
+ /(weibo)__([\d\.]+)/i
42804
+ // Weibo
42805
+ ],
42806
+ [NAME, VERSION],
42807
+ [
42808
+ /(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i
42809
+ // UCBrowser
42810
+ ],
42811
+ [VERSION, [NAME, "UC" + BROWSER]],
42812
+ [
42813
+ /microm.+\bqbcore\/([\w\.]+)/i,
42814
+ // WeChat Desktop for Windows Built-in Browser
42815
+ /\bqbcore\/([\w\.]+).+microm/i,
42816
+ /micromessenger\/([\w\.]+)/i
42817
+ // WeChat
42818
+ ],
42819
+ [VERSION, [NAME, "WeChat"]],
42820
+ [
42821
+ /konqueror\/([\w\.]+)/i
42822
+ // Konqueror
42823
+ ],
42824
+ [VERSION, [NAME, "Konqueror"]],
42825
+ [
42826
+ /trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i
42827
+ // IE11
42828
+ ],
42829
+ [VERSION, [NAME, "IE"]],
42830
+ [
42831
+ /ya(?:search)?browser\/([\w\.]+)/i
42832
+ // Yandex
42833
+ ],
42834
+ [VERSION, [NAME, "Yandex"]],
42835
+ [
42836
+ /slbrowser\/([\w\.]+)/i
42837
+ // Smart Lenovo Browser
42838
+ ],
42839
+ [VERSION, [NAME, "Smart Lenovo " + BROWSER]],
42840
+ [
42841
+ /(avast|avg)\/([\w\.]+)/i
42842
+ // Avast/AVG Secure Browser
42843
+ ],
42844
+ [[NAME, /(.+)/, "$1 Secure " + BROWSER], VERSION],
42845
+ [
42846
+ /\bfocus\/([\w\.]+)/i
42847
+ // Firefox Focus
42848
+ ],
42849
+ [VERSION, [NAME, FIREFOX + " Focus"]],
42850
+ [
42851
+ /\bopt\/([\w\.]+)/i
42852
+ // Opera Touch
42853
+ ],
42854
+ [VERSION, [NAME, OPERA + " Touch"]],
42855
+ [
42856
+ /coc_coc\w+\/([\w\.]+)/i
42857
+ // Coc Coc Browser
42858
+ ],
42859
+ [VERSION, [NAME, "Coc Coc"]],
42860
+ [
42861
+ /dolfin\/([\w\.]+)/i
42862
+ // Dolphin
42863
+ ],
42864
+ [VERSION, [NAME, "Dolphin"]],
42865
+ [
42866
+ /coast\/([\w\.]+)/i
42867
+ // Opera Coast
42868
+ ],
42869
+ [VERSION, [NAME, OPERA + " Coast"]],
42870
+ [
42871
+ /miuibrowser\/([\w\.]+)/i
42872
+ // MIUI Browser
42873
+ ],
42874
+ [VERSION, [NAME, "MIUI " + BROWSER]],
42875
+ [
42876
+ /fxios\/([-\w\.]+)/i
42877
+ // Firefox for iOS
42878
+ ],
42879
+ [VERSION, [NAME, FIREFOX]],
42880
+ [
42881
+ /\bqihu|(qi?ho?o?|360)browser/i
42882
+ // 360
42883
+ ],
42884
+ [[NAME, "360 " + BROWSER]],
42885
+ [
42886
+ /(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i
42887
+ ],
42888
+ [[NAME, /(.+)/, "$1 " + BROWSER], VERSION],
42889
+ [
42890
+ // Oculus/Sailfish/HuaweiBrowser/VivoBrowser
42891
+ /samsungbrowser\/([\w\.]+)/i
42892
+ // Samsung Internet
42893
+ ],
42894
+ [VERSION, [NAME, SAMSUNG + " Internet"]],
42895
+ [
42896
+ /(comodo_dragon)\/([\w\.]+)/i
42897
+ // Comodo Dragon
42898
+ ],
42899
+ [[NAME, /_/g, " "], VERSION],
42900
+ [
42901
+ /metasr[\/ ]?([\d\.]+)/i
42902
+ // Sogou Explorer
42903
+ ],
42904
+ [VERSION, [NAME, "Sogou Explorer"]],
42905
+ [
42906
+ /(sogou)mo\w+\/([\d\.]+)/i
42907
+ // Sogou Mobile
42908
+ ],
42909
+ [[NAME, "Sogou Mobile"], VERSION],
42910
+ [
42911
+ /(electron)\/([\w\.]+) safari/i,
42912
+ // Electron-based App
42913
+ /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,
42914
+ // Tesla
42915
+ /m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i
42916
+ // QQBrowser/2345 Browser
42917
+ ],
42918
+ [NAME, VERSION],
42919
+ [
42920
+ /(lbbrowser)/i,
42921
+ // LieBao Browser
42922
+ /\[(linkedin)app\]/i
42923
+ // LinkedIn App for iOS & Android
42924
+ ],
42925
+ [NAME],
42926
+ [
42927
+ // WebView
42928
+ /((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i
42929
+ // Facebook App for iOS & Android
42930
+ ],
42931
+ [[NAME, FACEBOOK], VERSION],
42932
+ [
42933
+ /(Klarna)\/([\w\.]+)/i,
42934
+ // Klarna Shopping Browser for iOS & Android
42935
+ /(kakao(?:talk|story))[\/ ]([\w\.]+)/i,
42936
+ // Kakao App
42937
+ /(naver)\(.*?(\d+\.[\w\.]+).*\)/i,
42938
+ // Naver InApp
42939
+ /safari (line)\/([\w\.]+)/i,
42940
+ // Line App for iOS
42941
+ /\b(line)\/([\w\.]+)\/iab/i,
42942
+ // Line App for Android
42943
+ /(alipay)client\/([\w\.]+)/i,
42944
+ // Alipay
42945
+ /(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i
42946
+ // Chromium/Instagram/Snapchat
42947
+ ],
42948
+ [NAME, VERSION],
42949
+ [
42950
+ /\bgsa\/([\w\.]+) .*safari\//i
42951
+ // Google Search Appliance on iOS
42952
+ ],
42953
+ [VERSION, [NAME, "GSA"]],
42954
+ [
42955
+ /musical_ly(?:.+app_?version\/|_)([\w\.]+)/i
42956
+ // TikTok
42957
+ ],
42958
+ [VERSION, [NAME, "TikTok"]],
42959
+ [
42960
+ /headlesschrome(?:\/([\w\.]+)| )/i
42961
+ // Chrome Headless
42962
+ ],
42963
+ [VERSION, [NAME, CHROME + " Headless"]],
42964
+ [
42965
+ / wv\).+(chrome)\/([\w\.]+)/i
42966
+ // Chrome WebView
42967
+ ],
42968
+ [[NAME, CHROME + " WebView"], VERSION],
42969
+ [
42970
+ /droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i
42971
+ // Android Browser
42972
+ ],
42973
+ [VERSION, [NAME, "Android " + BROWSER]],
42974
+ [
42975
+ /(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i
42976
+ // Chrome/OmniWeb/Arora/Tizen/Nokia
42977
+ ],
42978
+ [NAME, VERSION],
42979
+ [
42980
+ /version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i
42981
+ // Mobile Safari
42982
+ ],
42983
+ [VERSION, [NAME, "Mobile Safari"]],
42984
+ [
42985
+ /version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i
42986
+ // Safari & Safari Mobile
42987
+ ],
42988
+ [VERSION, NAME],
42989
+ [
42990
+ /webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i
42991
+ // Safari < 3.0
42992
+ ],
42993
+ [NAME, [VERSION, strMapper, oldSafariMap]],
42994
+ [
42995
+ /(webkit|khtml)\/([\w\.]+)/i
42996
+ ],
42997
+ [NAME, VERSION],
42998
+ [
42999
+ // Gecko based
43000
+ /(navigator|netscape\d?)\/([-\w\.]+)/i
43001
+ // Netscape
43002
+ ],
43003
+ [[NAME, "Netscape"], VERSION],
43004
+ [
43005
+ /mobile vr; rv:([\w\.]+)\).+firefox/i
43006
+ // Firefox Reality
43007
+ ],
43008
+ [VERSION, [NAME, FIREFOX + " Reality"]],
43009
+ [
43010
+ /ekiohf.+(flow)\/([\w\.]+)/i,
43011
+ // Flow
43012
+ /(swiftfox)/i,
43013
+ // Swiftfox
43014
+ /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,
43015
+ // IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror/Klar
43016
+ /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,
43017
+ // Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix
43018
+ /(firefox)\/([\w\.]+)/i,
43019
+ // Other Firefox-based
43020
+ /(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,
43021
+ // Mozilla
43022
+ // Other
43023
+ /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,
43024
+ // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir/Obigo/Mosaic/Go/ICE/UP.Browser
43025
+ /(links) \(([\w\.]+)/i,
43026
+ // Links
43027
+ /panasonic;(viera)/i
43028
+ // Panasonic Viera
43029
+ ],
43030
+ [NAME, VERSION],
43031
+ [
43032
+ /(cobalt)\/([\w\.]+)/i
43033
+ // Cobalt
43034
+ ],
43035
+ [NAME, [VERSION, /master.|lts./, ""]]
43036
+ ],
43037
+ cpu: [
43038
+ [
43039
+ /(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i
43040
+ // AMD64 (x64)
43041
+ ],
43042
+ [[ARCHITECTURE, "amd64"]],
43043
+ [
43044
+ /(ia32(?=;))/i
43045
+ // IA32 (quicktime)
43046
+ ],
43047
+ [[ARCHITECTURE, lowerize]],
43048
+ [
43049
+ /((?:i[346]|x)86)[;\)]/i
43050
+ // IA32 (x86)
43051
+ ],
43052
+ [[ARCHITECTURE, "ia32"]],
43053
+ [
43054
+ /\b(aarch64|arm(v?8e?l?|_?64))\b/i
43055
+ // ARM64
43056
+ ],
43057
+ [[ARCHITECTURE, "arm64"]],
43058
+ [
43059
+ /\b(arm(?:v[67])?ht?n?[fl]p?)\b/i
43060
+ // ARMHF
43061
+ ],
43062
+ [[ARCHITECTURE, "armhf"]],
43063
+ [
43064
+ // PocketPC mistakenly identified as PowerPC
43065
+ /windows (ce|mobile); ppc;/i
43066
+ ],
43067
+ [[ARCHITECTURE, "arm"]],
43068
+ [
43069
+ /((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i
43070
+ // PowerPC
43071
+ ],
43072
+ [[ARCHITECTURE, /ower/, EMPTY, lowerize]],
43073
+ [
43074
+ /(sun4\w)[;\)]/i
43075
+ // SPARC
43076
+ ],
43077
+ [[ARCHITECTURE, "sparc"]],
43078
+ [
43079
+ /((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i
43080
+ // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC
43081
+ ],
43082
+ [[ARCHITECTURE, lowerize]]
43083
+ ],
43084
+ device: [
43085
+ [
43086
+ //////////////////////////
43087
+ // MOBILES & TABLETS
43088
+ /////////////////////////
43089
+ // Samsung
43090
+ /\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
43091
+ ],
43092
+ [MODEL, [VENDOR, SAMSUNG], [TYPE2, TABLET]],
43093
+ [
43094
+ /\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
43095
+ /samsung[- ]([-\w]+)/i,
43096
+ /sec-(sgh\w+)/i
43097
+ ],
43098
+ [MODEL, [VENDOR, SAMSUNG], [TYPE2, MOBILE]],
43099
+ [
43100
+ // Apple
43101
+ /(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i
43102
+ // iPod/iPhone
43103
+ ],
43104
+ [MODEL, [VENDOR, APPLE], [TYPE2, MOBILE]],
43105
+ [
43106
+ /\((ipad);[-\w\),; ]+apple/i,
43107
+ // iPad
43108
+ /applecoremedia\/[\w\.]+ \((ipad)/i,
43109
+ /\b(ipad)\d\d?,\d\d?[;\]].+ios/i
43110
+ ],
43111
+ [MODEL, [VENDOR, APPLE], [TYPE2, TABLET]],
43112
+ [
43113
+ /(macintosh);/i
43114
+ ],
43115
+ [MODEL, [VENDOR, APPLE]],
43116
+ [
43117
+ // Sharp
43118
+ /\b(sh-?[altvz]?\d\d[a-ekm]?)/i
43119
+ ],
43120
+ [MODEL, [VENDOR, SHARP], [TYPE2, MOBILE]],
43121
+ [
43122
+ // Huawei
43123
+ /\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i
43124
+ ],
43125
+ [MODEL, [VENDOR, HUAWEI], [TYPE2, TABLET]],
43126
+ [
43127
+ /(?:huawei|honor)([-\w ]+)[;\)]/i,
43128
+ /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i
43129
+ ],
43130
+ [MODEL, [VENDOR, HUAWEI], [TYPE2, MOBILE]],
43131
+ [
43132
+ // Xiaomi
43133
+ /\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,
43134
+ // Xiaomi POCO
43135
+ /\b; (\w+) build\/hm\1/i,
43136
+ // Xiaomi Hongmi 'numeric' models
43137
+ /\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,
43138
+ // Xiaomi Hongmi
43139
+ /\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,
43140
+ // Xiaomi Redmi
43141
+ /oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,
43142
+ // Xiaomi Redmi 'numeric' models
43143
+ /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i
43144
+ // Xiaomi Mi
43145
+ ],
43146
+ [[MODEL, /_/g, " "], [VENDOR, XIAOMI], [TYPE2, MOBILE]],
43147
+ [
43148
+ /oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,
43149
+ // Redmi Pad
43150
+ /\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i
43151
+ // Mi Pad tablets
43152
+ ],
43153
+ [[MODEL, /_/g, " "], [VENDOR, XIAOMI], [TYPE2, TABLET]],
43154
+ [
43155
+ // OPPO
43156
+ /; (\w+) bui.+ oppo/i,
43157
+ /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i
43158
+ ],
43159
+ [MODEL, [VENDOR, "OPPO"], [TYPE2, MOBILE]],
43160
+ [
43161
+ // Vivo
43162
+ /vivo (\w+)(?: bui|\))/i,
43163
+ /\b(v[12]\d{3}\w?[at])(?: bui|;)/i
43164
+ ],
43165
+ [MODEL, [VENDOR, "Vivo"], [TYPE2, MOBILE]],
43166
+ [
43167
+ // Realme
43168
+ /\b(rmx[1-3]\d{3})(?: bui|;|\))/i
43169
+ ],
43170
+ [MODEL, [VENDOR, "Realme"], [TYPE2, MOBILE]],
43171
+ [
43172
+ // Motorola
43173
+ /\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,
43174
+ /\bmot(?:orola)?[- ](\w*)/i,
43175
+ /((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i
43176
+ ],
43177
+ [MODEL, [VENDOR, MOTOROLA], [TYPE2, MOBILE]],
43178
+ [
43179
+ /\b(mz60\d|xoom[2 ]{0,2}) build\//i
43180
+ ],
43181
+ [MODEL, [VENDOR, MOTOROLA], [TYPE2, TABLET]],
43182
+ [
43183
+ // LG
43184
+ /((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i
43185
+ ],
43186
+ [MODEL, [VENDOR, LG], [TYPE2, TABLET]],
43187
+ [
43188
+ /(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
43189
+ /\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,
43190
+ /\blg-?([\d\w]+) bui/i
43191
+ ],
43192
+ [MODEL, [VENDOR, LG], [TYPE2, MOBILE]],
43193
+ [
43194
+ // Lenovo
43195
+ /(ideatab[-\w ]+)/i,
43196
+ /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i
43197
+ ],
43198
+ [MODEL, [VENDOR, "Lenovo"], [TYPE2, TABLET]],
43199
+ [
43200
+ // Nokia
43201
+ /(?:maemo|nokia).*(n900|lumia \d+)/i,
43202
+ /nokia[-_ ]?([-\w\.]*)/i
43203
+ ],
43204
+ [[MODEL, /_/g, " "], [VENDOR, "Nokia"], [TYPE2, MOBILE]],
43205
+ [
43206
+ // Google
43207
+ /(pixel c)\b/i
43208
+ // Google Pixel C
43209
+ ],
43210
+ [MODEL, [VENDOR, GOOGLE], [TYPE2, TABLET]],
43211
+ [
43212
+ /droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i
43213
+ // Google Pixel
43214
+ ],
43215
+ [MODEL, [VENDOR, GOOGLE], [TYPE2, MOBILE]],
43216
+ [
43217
+ // Sony
43218
+ /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
43219
+ ],
43220
+ [MODEL, [VENDOR, SONY], [TYPE2, MOBILE]],
43221
+ [
43222
+ /sony tablet [ps]/i,
43223
+ /\b(?:sony)?sgp\w+(?: bui|\))/i
43224
+ ],
43225
+ [[MODEL, "Xperia Tablet"], [VENDOR, SONY], [TYPE2, TABLET]],
43226
+ [
43227
+ // OnePlus
43228
+ / (kb2005|in20[12]5|be20[12][59])\b/i,
43229
+ /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i
43230
+ ],
43231
+ [MODEL, [VENDOR, "OnePlus"], [TYPE2, MOBILE]],
43232
+ [
43233
+ // Amazon
43234
+ /(alexa)webm/i,
43235
+ /(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,
43236
+ // Kindle Fire without Silk / Echo Show
43237
+ /(kf[a-z]+)( bui|\)).+silk\//i
43238
+ // Kindle Fire HD
43239
+ ],
43240
+ [MODEL, [VENDOR, AMAZON], [TYPE2, TABLET]],
43241
+ [
43242
+ /((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i
43243
+ // Fire Phone
43244
+ ],
43245
+ [[MODEL, /(.+)/g, "Fire Phone $1"], [VENDOR, AMAZON], [TYPE2, MOBILE]],
43246
+ [
43247
+ // BlackBerry
43248
+ /(playbook);[-\w\),; ]+(rim)/i
43249
+ // BlackBerry PlayBook
43250
+ ],
43251
+ [MODEL, VENDOR, [TYPE2, TABLET]],
43252
+ [
43253
+ /\b((?:bb[a-f]|st[hv])100-\d)/i,
43254
+ /\(bb10; (\w+)/i
43255
+ // BlackBerry 10
43256
+ ],
43257
+ [MODEL, [VENDOR, BLACKBERRY], [TYPE2, MOBILE]],
43258
+ [
43259
+ // Asus
43260
+ /(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i
43261
+ ],
43262
+ [MODEL, [VENDOR, ASUS], [TYPE2, TABLET]],
43263
+ [
43264
+ / (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i
43265
+ ],
43266
+ [MODEL, [VENDOR, ASUS], [TYPE2, MOBILE]],
43267
+ [
43268
+ // HTC
43269
+ /(nexus 9)/i
43270
+ // HTC Nexus 9
43271
+ ],
43272
+ [MODEL, [VENDOR, "HTC"], [TYPE2, TABLET]],
43273
+ [
43274
+ /(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,
43275
+ // HTC
43276
+ // ZTE
43277
+ /(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,
43278
+ /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i
43279
+ // Alcatel/GeeksPhone/Nexian/Panasonic/Sony
43280
+ ],
43281
+ [VENDOR, [MODEL, /_/g, " "], [TYPE2, MOBILE]],
43282
+ [
43283
+ // Acer
43284
+ /droid.+; ([ab][1-7]-?[0178a]\d\d?)/i
43285
+ ],
43286
+ [MODEL, [VENDOR, "Acer"], [TYPE2, TABLET]],
43287
+ [
43288
+ // Meizu
43289
+ /droid.+; (m[1-5] note) bui/i,
43290
+ /\bmz-([-\w]{2,})/i
43291
+ ],
43292
+ [MODEL, [VENDOR, "Meizu"], [TYPE2, MOBILE]],
43293
+ [
43294
+ // Ulefone
43295
+ /; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i
43296
+ ],
43297
+ [MODEL, [VENDOR, "Ulefone"], [TYPE2, MOBILE]],
43298
+ [
43299
+ // MIXED
43300
+ /(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,
43301
+ // BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron
43302
+ /(hp) ([\w ]+\w)/i,
43303
+ // HP iPAQ
43304
+ /(asus)-?(\w+)/i,
43305
+ // Asus
43306
+ /(microsoft); (lumia[\w ]+)/i,
43307
+ // Microsoft Lumia
43308
+ /(lenovo)[-_ ]?([-\w]+)/i,
43309
+ // Lenovo
43310
+ /(jolla)/i,
43311
+ // Jolla
43312
+ /(oppo) ?([\w ]+) bui/i
43313
+ // OPPO
43314
+ ],
43315
+ [VENDOR, MODEL, [TYPE2, MOBILE]],
43316
+ [
43317
+ /(kobo)\s(ereader|touch)/i,
43318
+ // Kobo
43319
+ /(archos) (gamepad2?)/i,
43320
+ // Archos
43321
+ /(hp).+(touchpad(?!.+tablet)|tablet)/i,
43322
+ // HP TouchPad
43323
+ /(kindle)\/([\w\.]+)/i,
43324
+ // Kindle
43325
+ /(nook)[\w ]+build\/(\w+)/i,
43326
+ // Nook
43327
+ /(dell) (strea[kpr\d ]*[\dko])/i,
43328
+ // Dell Streak
43329
+ /(le[- ]+pan)[- ]+(\w{1,9}) bui/i,
43330
+ // Le Pan Tablets
43331
+ /(trinity)[- ]*(t\d{3}) bui/i,
43332
+ // Trinity Tablets
43333
+ /(gigaset)[- ]+(q\w{1,9}) bui/i,
43334
+ // Gigaset Tablets
43335
+ /(vodafone) ([\w ]+)(?:\)| bui)/i
43336
+ // Vodafone
43337
+ ],
43338
+ [VENDOR, MODEL, [TYPE2, TABLET]],
43339
+ [
43340
+ /(surface duo)/i
43341
+ // Surface Duo
43342
+ ],
43343
+ [MODEL, [VENDOR, MICROSOFT], [TYPE2, TABLET]],
43344
+ [
43345
+ /droid [\d\.]+; (fp\du?)(?: b|\))/i
43346
+ // Fairphone
43347
+ ],
43348
+ [MODEL, [VENDOR, "Fairphone"], [TYPE2, MOBILE]],
43349
+ [
43350
+ /(u304aa)/i
43351
+ // AT&T
43352
+ ],
43353
+ [MODEL, [VENDOR, "AT&T"], [TYPE2, MOBILE]],
43354
+ [
43355
+ /\bsie-(\w*)/i
43356
+ // Siemens
43357
+ ],
43358
+ [MODEL, [VENDOR, "Siemens"], [TYPE2, MOBILE]],
43359
+ [
43360
+ /\b(rct\w+) b/i
43361
+ // RCA Tablets
43362
+ ],
43363
+ [MODEL, [VENDOR, "RCA"], [TYPE2, TABLET]],
43364
+ [
43365
+ /\b(venue[\d ]{2,7}) b/i
43366
+ // Dell Venue Tablets
43367
+ ],
43368
+ [MODEL, [VENDOR, "Dell"], [TYPE2, TABLET]],
43369
+ [
43370
+ /\b(q(?:mv|ta)\w+) b/i
43371
+ // Verizon Tablet
43372
+ ],
43373
+ [MODEL, [VENDOR, "Verizon"], [TYPE2, TABLET]],
43374
+ [
43375
+ /\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i
43376
+ // Barnes & Noble Tablet
43377
+ ],
43378
+ [MODEL, [VENDOR, "Barnes & Noble"], [TYPE2, TABLET]],
43379
+ [
43380
+ /\b(tm\d{3}\w+) b/i
43381
+ ],
43382
+ [MODEL, [VENDOR, "NuVision"], [TYPE2, TABLET]],
43383
+ [
43384
+ /\b(k88) b/i
43385
+ // ZTE K Series Tablet
43386
+ ],
43387
+ [MODEL, [VENDOR, "ZTE"], [TYPE2, TABLET]],
43388
+ [
43389
+ /\b(nx\d{3}j) b/i
43390
+ // ZTE Nubia
43391
+ ],
43392
+ [MODEL, [VENDOR, "ZTE"], [TYPE2, MOBILE]],
43393
+ [
43394
+ /\b(gen\d{3}) b.+49h/i
43395
+ // Swiss GEN Mobile
43396
+ ],
43397
+ [MODEL, [VENDOR, "Swiss"], [TYPE2, MOBILE]],
43398
+ [
43399
+ /\b(zur\d{3}) b/i
43400
+ // Swiss ZUR Tablet
43401
+ ],
43402
+ [MODEL, [VENDOR, "Swiss"], [TYPE2, TABLET]],
43403
+ [
43404
+ /\b((zeki)?tb.*\b) b/i
43405
+ // Zeki Tablets
43406
+ ],
43407
+ [MODEL, [VENDOR, "Zeki"], [TYPE2, TABLET]],
43408
+ [
43409
+ /\b([yr]\d{2}) b/i,
43410
+ /\b(dragon[- ]+touch |dt)(\w{5}) b/i
43411
+ // Dragon Touch Tablet
43412
+ ],
43413
+ [[VENDOR, "Dragon Touch"], MODEL, [TYPE2, TABLET]],
43414
+ [
43415
+ /\b(ns-?\w{0,9}) b/i
43416
+ // Insignia Tablets
43417
+ ],
43418
+ [MODEL, [VENDOR, "Insignia"], [TYPE2, TABLET]],
43419
+ [
43420
+ /\b((nxa|next)-?\w{0,9}) b/i
43421
+ // NextBook Tablets
43422
+ ],
43423
+ [MODEL, [VENDOR, "NextBook"], [TYPE2, TABLET]],
43424
+ [
43425
+ /\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i
43426
+ // Voice Xtreme Phones
43427
+ ],
43428
+ [[VENDOR, "Voice"], MODEL, [TYPE2, MOBILE]],
43429
+ [
43430
+ /\b(lvtel\-)?(v1[12]) b/i
43431
+ // LvTel Phones
43432
+ ],
43433
+ [[VENDOR, "LvTel"], MODEL, [TYPE2, MOBILE]],
43434
+ [
43435
+ /\b(ph-1) /i
43436
+ // Essential PH-1
43437
+ ],
43438
+ [MODEL, [VENDOR, "Essential"], [TYPE2, MOBILE]],
43439
+ [
43440
+ /\b(v(100md|700na|7011|917g).*\b) b/i
43441
+ // Envizen Tablets
43442
+ ],
43443
+ [MODEL, [VENDOR, "Envizen"], [TYPE2, TABLET]],
43444
+ [
43445
+ /\b(trio[-\w\. ]+) b/i
43446
+ // MachSpeed Tablets
43447
+ ],
43448
+ [MODEL, [VENDOR, "MachSpeed"], [TYPE2, TABLET]],
43449
+ [
43450
+ /\btu_(1491) b/i
43451
+ // Rotor Tablets
43452
+ ],
43453
+ [MODEL, [VENDOR, "Rotor"], [TYPE2, TABLET]],
43454
+ [
43455
+ /(shield[\w ]+) b/i
43456
+ // Nvidia Shield Tablets
43457
+ ],
43458
+ [MODEL, [VENDOR, "Nvidia"], [TYPE2, TABLET]],
43459
+ [
43460
+ /(sprint) (\w+)/i
43461
+ // Sprint Phones
43462
+ ],
43463
+ [VENDOR, MODEL, [TYPE2, MOBILE]],
43464
+ [
43465
+ /(kin\.[onetw]{3})/i
43466
+ // Microsoft Kin
43467
+ ],
43468
+ [[MODEL, /\./g, " "], [VENDOR, MICROSOFT], [TYPE2, MOBILE]],
43469
+ [
43470
+ /droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i
43471
+ // Zebra
43472
+ ],
43473
+ [MODEL, [VENDOR, ZEBRA], [TYPE2, TABLET]],
43474
+ [
43475
+ /droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i
43476
+ ],
43477
+ [MODEL, [VENDOR, ZEBRA], [TYPE2, MOBILE]],
43478
+ [
43479
+ ///////////////////
43480
+ // SMARTTVS
43481
+ ///////////////////
43482
+ /smart-tv.+(samsung)/i
43483
+ // Samsung
43484
+ ],
43485
+ [VENDOR, [TYPE2, SMARTTV]],
43486
+ [
43487
+ /hbbtv.+maple;(\d+)/i
43488
+ ],
43489
+ [[MODEL, /^/, "SmartTV"], [VENDOR, SAMSUNG], [TYPE2, SMARTTV]],
43490
+ [
43491
+ /(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
43492
+ // LG SmartTV
43493
+ ],
43494
+ [[VENDOR, LG], [TYPE2, SMARTTV]],
43495
+ [
43496
+ /(apple) ?tv/i
43497
+ // Apple TV
43498
+ ],
43499
+ [VENDOR, [MODEL, APPLE + " TV"], [TYPE2, SMARTTV]],
43500
+ [
43501
+ /crkey/i
43502
+ // Google Chromecast
43503
+ ],
43504
+ [[MODEL, CHROME + "cast"], [VENDOR, GOOGLE], [TYPE2, SMARTTV]],
43505
+ [
43506
+ /droid.+aft(\w+)( bui|\))/i
43507
+ // Fire TV
43508
+ ],
43509
+ [MODEL, [VENDOR, AMAZON], [TYPE2, SMARTTV]],
43510
+ [
43511
+ /\(dtv[\);].+(aquos)/i,
43512
+ /(aquos-tv[\w ]+)\)/i
43513
+ // Sharp
43514
+ ],
43515
+ [MODEL, [VENDOR, SHARP], [TYPE2, SMARTTV]],
43516
+ [
43517
+ /(bravia[\w ]+)( bui|\))/i
43518
+ // Sony
43519
+ ],
43520
+ [MODEL, [VENDOR, SONY], [TYPE2, SMARTTV]],
43521
+ [
43522
+ /(mitv-\w{5}) bui/i
43523
+ // Xiaomi
43524
+ ],
43525
+ [MODEL, [VENDOR, XIAOMI], [TYPE2, SMARTTV]],
43526
+ [
43527
+ /Hbbtv.*(technisat) (.*);/i
43528
+ // TechniSAT
43529
+ ],
43530
+ [VENDOR, MODEL, [TYPE2, SMARTTV]],
43531
+ [
43532
+ /\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,
43533
+ // Roku
43534
+ /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i
43535
+ // HbbTV devices
43536
+ ],
43537
+ [[VENDOR, trim], [MODEL, trim], [TYPE2, SMARTTV]],
43538
+ [
43539
+ /\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i
43540
+ // SmartTV from Unidentified Vendors
43541
+ ],
43542
+ [[TYPE2, SMARTTV]],
43543
+ [
43544
+ ///////////////////
43545
+ // CONSOLES
43546
+ ///////////////////
43547
+ /(ouya)/i,
43548
+ // Ouya
43549
+ /(nintendo) ([wids3utch]+)/i
43550
+ // Nintendo
43551
+ ],
43552
+ [VENDOR, MODEL, [TYPE2, CONSOLE]],
43553
+ [
43554
+ /droid.+; (shield) bui/i
43555
+ // Nvidia
43556
+ ],
43557
+ [MODEL, [VENDOR, "Nvidia"], [TYPE2, CONSOLE]],
43558
+ [
43559
+ /(playstation [345portablevi]+)/i
43560
+ // Playstation
43561
+ ],
43562
+ [MODEL, [VENDOR, SONY], [TYPE2, CONSOLE]],
43563
+ [
43564
+ /\b(xbox(?: one)?(?!; xbox))[\); ]/i
43565
+ // Microsoft Xbox
43566
+ ],
43567
+ [MODEL, [VENDOR, MICROSOFT], [TYPE2, CONSOLE]],
43568
+ [
43569
+ ///////////////////
43570
+ // WEARABLES
43571
+ ///////////////////
43572
+ /((pebble))app/i
43573
+ // Pebble
43574
+ ],
43575
+ [VENDOR, MODEL, [TYPE2, WEARABLE]],
43576
+ [
43577
+ /(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i
43578
+ // Apple Watch
43579
+ ],
43580
+ [MODEL, [VENDOR, APPLE], [TYPE2, WEARABLE]],
43581
+ [
43582
+ /droid.+; (glass) \d/i
43583
+ // Google Glass
43584
+ ],
43585
+ [MODEL, [VENDOR, GOOGLE], [TYPE2, WEARABLE]],
43586
+ [
43587
+ /droid.+; (wt63?0{2,3})\)/i
43588
+ ],
43589
+ [MODEL, [VENDOR, ZEBRA], [TYPE2, WEARABLE]],
43590
+ [
43591
+ /(quest( 2| pro)?)/i
43592
+ // Oculus Quest
43593
+ ],
43594
+ [MODEL, [VENDOR, FACEBOOK], [TYPE2, WEARABLE]],
43595
+ [
43596
+ ///////////////////
43597
+ // EMBEDDED
43598
+ ///////////////////
43599
+ /(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i
43600
+ // Tesla
43601
+ ],
43602
+ [VENDOR, [TYPE2, EMBEDDED]],
43603
+ [
43604
+ /(aeobc)\b/i
43605
+ // Echo Dot
43606
+ ],
43607
+ [MODEL, [VENDOR, AMAZON], [TYPE2, EMBEDDED]],
43608
+ [
43609
+ ////////////////////
43610
+ // MIXED (GENERIC)
43611
+ ///////////////////
43612
+ /droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i
43613
+ // Android Phones from Unidentified Vendors
43614
+ ],
43615
+ [MODEL, [TYPE2, MOBILE]],
43616
+ [
43617
+ /droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i
43618
+ // Android Tablets from Unidentified Vendors
43619
+ ],
43620
+ [MODEL, [TYPE2, TABLET]],
43621
+ [
43622
+ /\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i
43623
+ // Unidentifiable Tablet
43624
+ ],
43625
+ [[TYPE2, TABLET]],
43626
+ [
43627
+ /(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i
43628
+ // Unidentifiable Mobile
43629
+ ],
43630
+ [[TYPE2, MOBILE]],
43631
+ [
43632
+ /(android[-\w\. ]{0,9});.+buil/i
43633
+ // Generic Android Device
43634
+ ],
43635
+ [MODEL, [VENDOR, "Generic"]]
43636
+ ],
43637
+ engine: [
43638
+ [
43639
+ /windows.+ edge\/([\w\.]+)/i
43640
+ // EdgeHTML
43641
+ ],
43642
+ [VERSION, [NAME, EDGE + "HTML"]],
43643
+ [
43644
+ /webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i
43645
+ // Blink
43646
+ ],
43647
+ [VERSION, [NAME, "Blink"]],
43648
+ [
43649
+ /(presto)\/([\w\.]+)/i,
43650
+ // Presto
43651
+ /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,
43652
+ // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m/Goanna
43653
+ /ekioh(flow)\/([\w\.]+)/i,
43654
+ // Flow
43655
+ /(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,
43656
+ // KHTML/Tasman/Links
43657
+ /(icab)[\/ ]([23]\.[\d\.]+)/i,
43658
+ // iCab
43659
+ /\b(libweb)/i
43660
+ ],
43661
+ [NAME, VERSION],
43662
+ [
43663
+ /rv\:([\w\.]{1,9})\b.+(gecko)/i
43664
+ // Gecko
43665
+ ],
43666
+ [VERSION, NAME]
43667
+ ],
43668
+ os: [
43669
+ [
43670
+ // Windows
43671
+ /microsoft (windows) (vista|xp)/i
43672
+ // Windows (iTunes)
43673
+ ],
43674
+ [NAME, VERSION],
43675
+ [
43676
+ /(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i
43677
+ // Windows Phone
43678
+ ],
43679
+ [NAME, [VERSION, strMapper, windowsVersionMap]],
43680
+ [
43681
+ /windows nt 6\.2; (arm)/i,
43682
+ // Windows RT
43683
+ /windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,
43684
+ /(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i
43685
+ ],
43686
+ [[VERSION, strMapper, windowsVersionMap], [NAME, "Windows"]],
43687
+ [
43688
+ // iOS/macOS
43689
+ /ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,
43690
+ // iOS
43691
+ /(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,
43692
+ /cfnetwork\/.+darwin/i
43693
+ ],
43694
+ [[VERSION, /_/g, "."], [NAME, "iOS"]],
43695
+ [
43696
+ /(mac os x) ?([\w\. ]*)/i,
43697
+ /(macintosh|mac_powerpc\b)(?!.+haiku)/i
43698
+ // Mac OS
43699
+ ],
43700
+ [[NAME, MAC_OS], [VERSION, /_/g, "."]],
43701
+ [
43702
+ // Mobile OSes
43703
+ /droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i
43704
+ // Android-x86/HarmonyOS
43705
+ ],
43706
+ [VERSION, NAME],
43707
+ [
43708
+ // Android/WebOS/QNX/Bada/RIM/Maemo/MeeGo/Sailfish OS
43709
+ /(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,
43710
+ /(blackberry)\w*\/([\w\.]*)/i,
43711
+ // Blackberry
43712
+ /(tizen|kaios)[\/ ]([\w\.]+)/i,
43713
+ // Tizen/KaiOS
43714
+ /\((series40);/i
43715
+ // Series 40
43716
+ ],
43717
+ [NAME, VERSION],
43718
+ [
43719
+ /\(bb(10);/i
43720
+ // BlackBerry 10
43721
+ ],
43722
+ [VERSION, [NAME, BLACKBERRY]],
43723
+ [
43724
+ /(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i
43725
+ // Symbian
43726
+ ],
43727
+ [VERSION, [NAME, "Symbian"]],
43728
+ [
43729
+ /mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i
43730
+ // Firefox OS
43731
+ ],
43732
+ [VERSION, [NAME, FIREFOX + " OS"]],
43733
+ [
43734
+ /web0s;.+rt(tv)/i,
43735
+ /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i
43736
+ // WebOS
43737
+ ],
43738
+ [VERSION, [NAME, "webOS"]],
43739
+ [
43740
+ /watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i
43741
+ // watchOS
43742
+ ],
43743
+ [VERSION, [NAME, "watchOS"]],
43744
+ [
43745
+ // Google Chromecast
43746
+ /crkey\/([\d\.]+)/i
43747
+ // Google Chromecast
43748
+ ],
43749
+ [VERSION, [NAME, CHROME + "cast"]],
43750
+ [
43751
+ /(cros) [\w]+(?:\)| ([\w\.]+)\b)/i
43752
+ // Chromium OS
43753
+ ],
43754
+ [[NAME, CHROMIUM_OS], VERSION],
43755
+ [
43756
+ // Smart TVs
43757
+ /panasonic;(viera)/i,
43758
+ // Panasonic Viera
43759
+ /(netrange)mmh/i,
43760
+ // Netrange
43761
+ /(nettv)\/(\d+\.[\w\.]+)/i,
43762
+ // NetTV
43763
+ // Console
43764
+ /(nintendo|playstation) ([wids345portablevuch]+)/i,
43765
+ // Nintendo/Playstation
43766
+ /(xbox); +xbox ([^\);]+)/i,
43767
+ // Microsoft Xbox (360, One, X, S, Series X, Series S)
43768
+ // Other
43769
+ /\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,
43770
+ // Joli/Palm
43771
+ /(mint)[\/\(\) ]?(\w*)/i,
43772
+ // Mint
43773
+ /(mageia|vectorlinux)[; ]/i,
43774
+ // Mageia/VectorLinux
43775
+ /([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,
43776
+ // Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware/Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus/Raspbian/Plan9/Minix/RISCOS/Contiki/Deepin/Manjaro/elementary/Sabayon/Linspire
43777
+ /(hurd|linux) ?([\w\.]*)/i,
43778
+ // Hurd/Linux
43779
+ /(gnu) ?([\w\.]*)/i,
43780
+ // GNU
43781
+ /\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,
43782
+ // FreeBSD/NetBSD/OpenBSD/PC-BSD/GhostBSD/DragonFly
43783
+ /(haiku) (\w+)/i
43784
+ // Haiku
43785
+ ],
43786
+ [NAME, VERSION],
43787
+ [
43788
+ /(sunos) ?([\w\.\d]*)/i
43789
+ // Solaris
43790
+ ],
43791
+ [[NAME, "Solaris"], VERSION],
43792
+ [
43793
+ /((?:open)?solaris)[-\/ ]?([\w\.]*)/i,
43794
+ // Solaris
43795
+ /(aix) ((\d)(?=\.|\)| )[\w\.])*/i,
43796
+ // AIX
43797
+ /\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,
43798
+ // BeOS/OS2/AmigaOS/MorphOS/OpenVMS/Fuchsia/HP-UX/SerenityOS
43799
+ /(unix) ?([\w\.]*)/i
43800
+ // UNIX
43801
+ ],
43802
+ [NAME, VERSION]
43803
+ ]
43804
+ };
43805
+ var UAParser2 = function(ua, extensions) {
43806
+ if (typeof ua === OBJ_TYPE) {
43807
+ extensions = ua;
43808
+ ua = undefined2;
43809
+ }
43810
+ if (!(this instanceof UAParser2)) {
43811
+ return new UAParser2(ua, extensions).getResult();
43812
+ }
43813
+ var _navigator = typeof window2 !== UNDEF_TYPE && window2.navigator ? window2.navigator : undefined2;
43814
+ var _ua = ua || (_navigator && _navigator.userAgent ? _navigator.userAgent : EMPTY);
43815
+ var _uach = _navigator && _navigator.userAgentData ? _navigator.userAgentData : undefined2;
43816
+ var _rgxmap = extensions ? extend(regexes, extensions) : regexes;
43817
+ var _isSelfNav = _navigator && _navigator.userAgent == _ua;
43818
+ this.getBrowser = function() {
43819
+ var _browser = {};
43820
+ _browser[NAME] = undefined2;
43821
+ _browser[VERSION] = undefined2;
43822
+ rgxMapper.call(_browser, _ua, _rgxmap.browser);
43823
+ _browser[MAJOR] = majorize(_browser[VERSION]);
43824
+ if (_isSelfNav && _navigator && _navigator.brave && typeof _navigator.brave.isBrave == FUNC_TYPE) {
43825
+ _browser[NAME] = "Brave";
43826
+ }
43827
+ return _browser;
43828
+ };
43829
+ this.getCPU = function() {
43830
+ var _cpu = {};
43831
+ _cpu[ARCHITECTURE] = undefined2;
43832
+ rgxMapper.call(_cpu, _ua, _rgxmap.cpu);
43833
+ return _cpu;
43834
+ };
43835
+ this.getDevice = function() {
43836
+ var _device = {};
43837
+ _device[VENDOR] = undefined2;
43838
+ _device[MODEL] = undefined2;
43839
+ _device[TYPE2] = undefined2;
43840
+ rgxMapper.call(_device, _ua, _rgxmap.device);
43841
+ if (_isSelfNav && !_device[TYPE2] && _uach && _uach.mobile) {
43842
+ _device[TYPE2] = MOBILE;
43843
+ }
43844
+ if (_isSelfNav && _device[MODEL] == "Macintosh" && _navigator && typeof _navigator.standalone !== UNDEF_TYPE && _navigator.maxTouchPoints && _navigator.maxTouchPoints > 2) {
43845
+ _device[MODEL] = "iPad";
43846
+ _device[TYPE2] = TABLET;
43847
+ }
43848
+ return _device;
43849
+ };
43850
+ this.getEngine = function() {
43851
+ var _engine = {};
43852
+ _engine[NAME] = undefined2;
43853
+ _engine[VERSION] = undefined2;
43854
+ rgxMapper.call(_engine, _ua, _rgxmap.engine);
43855
+ return _engine;
43856
+ };
43857
+ this.getOS = function() {
43858
+ var _os = {};
43859
+ _os[NAME] = undefined2;
43860
+ _os[VERSION] = undefined2;
43861
+ rgxMapper.call(_os, _ua, _rgxmap.os);
43862
+ if (_isSelfNav && !_os[NAME] && _uach && _uach.platform != "Unknown") {
43863
+ _os[NAME] = _uach.platform.replace(/chrome os/i, CHROMIUM_OS).replace(/macos/i, MAC_OS);
43864
+ }
43865
+ return _os;
43866
+ };
43867
+ this.getResult = function() {
43868
+ return {
43869
+ ua: this.getUA(),
43870
+ browser: this.getBrowser(),
43871
+ engine: this.getEngine(),
43872
+ os: this.getOS(),
43873
+ device: this.getDevice(),
43874
+ cpu: this.getCPU()
43875
+ };
43876
+ };
43877
+ this.getUA = function() {
43878
+ return _ua;
43879
+ };
43880
+ this.setUA = function(ua2) {
43881
+ _ua = typeof ua2 === STR_TYPE && ua2.length > UA_MAX_LENGTH ? trim(ua2, UA_MAX_LENGTH) : ua2;
43882
+ return this;
43883
+ };
43884
+ this.setUA(_ua);
43885
+ return this;
43886
+ };
43887
+ UAParser2.VERSION = LIBVERSION;
43888
+ UAParser2.BROWSER = enumerize([NAME, VERSION, MAJOR]);
43889
+ UAParser2.CPU = enumerize([ARCHITECTURE]);
43890
+ UAParser2.DEVICE = enumerize([MODEL, VENDOR, TYPE2, CONSOLE, MOBILE, SMARTTV, TABLET, WEARABLE, EMBEDDED]);
43891
+ UAParser2.ENGINE = UAParser2.OS = enumerize([NAME, VERSION]);
43892
+ if (typeof exports !== UNDEF_TYPE) {
43893
+ if (typeof module2 !== UNDEF_TYPE && module2.exports) {
43894
+ exports = module2.exports = UAParser2;
43895
+ }
43896
+ exports.UAParser = UAParser2;
43897
+ } else {
43898
+ if (typeof define === FUNC_TYPE && define.amd) {
43899
+ define(function() {
43900
+ return UAParser2;
43901
+ });
43902
+ } else if (typeof window2 !== UNDEF_TYPE) {
43903
+ window2.UAParser = UAParser2;
43904
+ }
43905
+ }
43906
+ var $ = typeof window2 !== UNDEF_TYPE && (window2.jQuery || window2.Zepto);
43907
+ if ($ && !$.ua) {
43908
+ var parser = new UAParser2();
43909
+ $.ua = parser.getResult();
43910
+ $.ua.get = function() {
43911
+ return parser.getUA();
43912
+ };
43913
+ $.ua.set = function(ua) {
43914
+ parser.setUA(ua);
43915
+ var result = parser.getResult();
43916
+ for (var prop in result) {
43917
+ $.ua[prop] = result[prop];
43918
+ }
43919
+ };
43920
+ }
43921
+ })(typeof window === "object" ? window : exports);
43922
+ }
43923
+ });
43924
+
42585
43925
  // ../../node_modules/use-debounce/dist/index.module.js
42586
43926
  var index_module_exports = {};
42587
43927
  __export(index_module_exports, {
@@ -44526,6 +45866,26 @@ var require_dist = __commonJS({
44526
45866
  mod
44527
45867
  ));
44528
45868
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
45869
+ var __async2 = (__this, __arguments, generator) => {
45870
+ return new Promise((resolve, reject) => {
45871
+ var fulfilled = (value) => {
45872
+ try {
45873
+ step(generator.next(value));
45874
+ } catch (e2) {
45875
+ reject(e2);
45876
+ }
45877
+ };
45878
+ var rejected = (value) => {
45879
+ try {
45880
+ step(generator.throw(value));
45881
+ } catch (e2) {
45882
+ reject(e2);
45883
+ }
45884
+ };
45885
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
45886
+ step((generator = generator.apply(__this, __arguments)).next());
45887
+ });
45888
+ };
44529
45889
  var auto_frame_component_exports = {};
44530
45890
  __export2(auto_frame_component_exports, {
44531
45891
  default: () => AutoFrameComponent_default
@@ -44544,6 +45904,22 @@ var require_dist = __commonJS({
44544
45904
  });
44545
45905
  return collected;
44546
45906
  };
45907
+ var getStyleSheet = (el) => {
45908
+ return Array.from(document.styleSheets).find((ss) => ss.ownerNode === el);
45909
+ };
45910
+ var getStyles2 = (styleSheet) => {
45911
+ if (styleSheet) {
45912
+ try {
45913
+ return [...styleSheet.cssRules].map((rule) => rule.cssText).join("");
45914
+ } catch (e2) {
45915
+ console.warn(
45916
+ "Access to stylesheet %s is denied. Ignoring\u2026",
45917
+ styleSheet.href
45918
+ );
45919
+ }
45920
+ }
45921
+ return "";
45922
+ };
44547
45923
  var CopyHostStyles = ({
44548
45924
  children,
44549
45925
  debug = false,
@@ -44558,7 +45934,7 @@ var require_dist = __commonJS({
44558
45934
  const elements = [];
44559
45935
  const lookupEl = (el) => elements.findIndex((elementMap) => elementMap.original === el);
44560
45936
  const addEl = (el, onLoad = () => {
44561
- }) => {
45937
+ }) => __async2(void 0, null, function* () {
44562
45938
  const index = lookupEl(el);
44563
45939
  if (index > -1) {
44564
45940
  if (debug)
@@ -44569,10 +45945,34 @@ var require_dist = __commonJS({
44569
45945
  onLoad();
44570
45946
  return;
44571
45947
  }
44572
- const elHash = (0, import_object_hash.default)(el.outerHTML);
45948
+ let mirror;
45949
+ if (el.nodeName === "LINK") {
45950
+ mirror = document.createElement("style");
45951
+ mirror.type = "text/css";
45952
+ let styleSheet = getStyleSheet(el);
45953
+ if (!styleSheet) {
45954
+ yield new Promise((resolve) => el.onload = resolve);
45955
+ styleSheet = getStyleSheet(el);
45956
+ }
45957
+ const styles = getStyles2(styleSheet);
45958
+ if (!styles) {
45959
+ if (debug) {
45960
+ console.warn(
45961
+ `Tried to load styles for link element, but couldn't find them. Skipping...`
45962
+ );
45963
+ }
45964
+ onLoad();
45965
+ return;
45966
+ }
45967
+ mirror.innerHTML = styles;
45968
+ mirror.setAttribute("data-href", el.getAttribute("href"));
45969
+ } else {
45970
+ mirror = el.cloneNode(true);
45971
+ }
45972
+ const elHash = (0, import_object_hash.default)(mirror.outerHTML);
44573
45973
  const existingHashes = collectStyles(doc).map(
44574
- (existingStyle) => (0, import_object_hash.default)(existingStyle.outerHTML)
44575
- );
45974
+ (existingStyle) => existingStyle !== mirror && (0, import_object_hash.default)(existingStyle.outerHTML)
45975
+ ).filter(Boolean);
44576
45976
  if (existingHashes.indexOf(elHash) > -1) {
44577
45977
  if (debug)
44578
45978
  console.log(
@@ -44581,13 +45981,12 @@ var require_dist = __commonJS({
44581
45981
  onLoad();
44582
45982
  return;
44583
45983
  }
44584
- const mirror = el.cloneNode(true);
44585
45984
  mirror.onload = onLoad;
44586
45985
  doc.head.append(mirror);
44587
45986
  elements.push({ original: el, mirror });
44588
45987
  if (debug)
44589
45988
  console.log(`Added style node ${el.outerHTML}`);
44590
- };
45989
+ });
44591
45990
  const removeEl = (el) => {
44592
45991
  const index = lookupEl(el);
44593
45992
  if (index === -1) {
@@ -44641,10 +46040,14 @@ var require_dist = __commonJS({
44641
46040
  }, []);
44642
46041
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_jsx_runtime8.Fragment, { children });
44643
46042
  };
44644
- var AutoFrameComponent_default = import_react22.default.forwardRef(function(_a3, ref2) {
44645
- var _b = _a3, { children, debug, onStylesLoaded } = _b, props = __objRest2(_b, ["children", "debug", "onStylesLoaded"]);
44646
- 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 }) }));
44647
- });
46043
+ var AutoFrameComponent = import_react22.default.forwardRef(
46044
+ function(_a3, ref2) {
46045
+ var _b = _a3, { children, debug, onStylesLoaded } = _b, props = __objRest2(_b, ["children", "debug", "onStylesLoaded"]);
46046
+ 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 }) }));
46047
+ }
46048
+ );
46049
+ AutoFrameComponent.displayName = "AutoFrameComponent";
46050
+ var AutoFrameComponent_default = AutoFrameComponent;
44648
46051
  }
44649
46052
  });
44650
46053
 
@@ -74385,6 +75788,7 @@ var require_dist2 = __commonJS({
74385
75788
  { width: 768, height: "auto", icon: "Tablet", label: "Medium" },
74386
75789
  { width: 1280, height: "auto", icon: "Monitor", label: "Large" }
74387
75790
  ];
75791
+ var import_ua_parser_js2 = require_ua_parser();
74388
75792
  var import_jsx_runtime22 = require("react/jsx-runtime");
74389
75793
  var defaultAppState2 = {
74390
75794
  data: { content: [], root: { props: { title: "" } } },
@@ -74424,7 +75828,8 @@ var require_dist2 = __commonJS({
74424
75828
  setZoomConfig: () => null,
74425
75829
  status: "LOADING",
74426
75830
  setStatus: () => null,
74427
- iframe: {}
75831
+ iframe: {},
75832
+ safariFallbackMode: false
74428
75833
  };
74429
75834
  var appContext2 = (0, import_react32.createContext)(defaultContext2);
74430
75835
  var AppProvider = ({
@@ -74436,10 +75841,34 @@ var require_dist2 = __commonJS({
74436
75841
  (0, import_react32.useEffect)(() => {
74437
75842
  setStatus("MOUNTED");
74438
75843
  }, []);
75844
+ const [safariFallbackMode, setSafariFallbackMode] = (0, import_react32.useState)(false);
75845
+ (0, import_react32.useEffect)(() => {
75846
+ var _a3, _b, _c;
75847
+ const ua = new import_ua_parser_js2.UAParser(navigator.userAgent);
75848
+ const { browser } = ua.getResult();
75849
+ 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.")))) {
75850
+ if (process.env.NODE_ENV !== "production" && value.iframe.enabled) {
75851
+ console.warn(
75852
+ `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.
75853
+
75854
+ 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.
75855
+
75856
+ See https://github.com/measuredco/puck/issues/411 for more information. This message will not show in production.`
75857
+ );
75858
+ }
75859
+ setSafariFallbackMode(true);
75860
+ }
75861
+ }, []);
74439
75862
  return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
74440
75863
  appContext2.Provider,
74441
75864
  {
74442
- value: __spreadProps2(__spreadValues2({}, value), { zoomConfig, setZoomConfig, status, setStatus }),
75865
+ value: __spreadProps2(__spreadValues2({}, value), {
75866
+ zoomConfig,
75867
+ setZoomConfig,
75868
+ status,
75869
+ setStatus,
75870
+ safariFallbackMode
75871
+ }),
74443
75872
  children
74444
75873
  }
74445
75874
  );
@@ -74635,7 +76064,7 @@ var require_dist2 = __commonJS({
74635
76064
  var import_react72 = require("react");
74636
76065
  var import_dnd3 = (init_dnd_esm(), __toCommonJS(dnd_esm_exports));
74637
76066
  init_react_import2();
74638
- var styles_module_default32 = { "DraggableComponent": "_DraggableComponent_1542z_1", "DraggableComponent--isDragging": "_DraggableComponent--isDragging_1542z_11", "DraggableComponent-contents": "_DraggableComponent-contents_1542z_16", "DraggableComponent-overlay": "_DraggableComponent-overlay_1542z_29", "DraggableComponent-loadingOverlay": "_DraggableComponent-loadingOverlay_1542z_49", "DraggableComponent--isLocked": "_DraggableComponent--isLocked_1542z_65", "DraggableComponent--forceHover": "_DraggableComponent--forceHover_1542z_71", "DraggableComponent--isSelected": "_DraggableComponent--isSelected_1542z_76", "DraggableComponent--indicativeHover": "_DraggableComponent--indicativeHover_1542z_81", "DraggableComponent-actionsOverlay": "_DraggableComponent-actionsOverlay_1542z_97", "DraggableComponent-actions": "_DraggableComponent-actions_1542z_97", "DraggableComponent-actionsLabel": "_DraggableComponent-actionsLabel_1542z_127", "DraggableComponent-action": "_DraggableComponent-action_1542z_97" };
76067
+ var styles_module_default32 = { "DraggableComponent": "_DraggableComponent_59z7f_1", "DraggableComponent--isDragging": "_DraggableComponent--isDragging_59z7f_11", "DraggableComponent-contents": "_DraggableComponent-contents_59z7f_16", "DraggableComponent-overlay": "_DraggableComponent-overlay_59z7f_29", "DraggableComponent-loadingOverlay": "_DraggableComponent-loadingOverlay_59z7f_49", "DraggableComponent--isLocked": "_DraggableComponent--isLocked_59z7f_65", "DraggableComponent--forceHover": "_DraggableComponent--forceHover_59z7f_71", "DraggableComponent--isSelected": "_DraggableComponent--isSelected_59z7f_76", "DraggableComponent--indicativeHover": "_DraggableComponent--indicativeHover_59z7f_81", "DraggableComponent-actionsOverlay": "_DraggableComponent-actionsOverlay_59z7f_97", "DraggableComponent-actions": "_DraggableComponent-actions_59z7f_97", "DraggableComponent-actionsLabel": "_DraggableComponent-actionsLabel_59z7f_127", "DraggableComponent-action": "_DraggableComponent-action_59z7f_97" };
74639
76068
  init_react_import2();
74640
76069
  init_react_import2();
74641
76070
  var import_react52 = require("react");
@@ -74976,7 +76405,7 @@ var require_dist2 = __commonJS({
74976
76405
  );
74977
76406
  };
74978
76407
  init_react_import2();
74979
- var styles_module_default42 = { "DropZone": "_DropZone_w4btq_1", "DropZone-content": "_DropZone-content_w4btq_10", "DropZone--userIsDragging": "_DropZone--userIsDragging_w4btq_15", "DropZone--draggingOverArea": "_DropZone--draggingOverArea_w4btq_19", "DropZone--draggingNewComponent": "_DropZone--draggingNewComponent_w4btq_20", "DropZone--isAreaSelected": "_DropZone--isAreaSelected_w4btq_26", "DropZone--hoveringOverArea": "_DropZone--hoveringOverArea_w4btq_27", "DropZone--isDisabled": "_DropZone--isDisabled_w4btq_28", "DropZone--isRootZone": "_DropZone--isRootZone_w4btq_29", "DropZone--hasChildren": "_DropZone--hasChildren_w4btq_30", "DropZone--isDestination": "_DropZone--isDestination_w4btq_40", "DropZone-item": "_DropZone-item_w4btq_52", "DropZone-hitbox": "_DropZone-hitbox_w4btq_56" };
76408
+ var styles_module_default42 = { "DropZone": "_DropZone_djoti_1", "DropZone-content": "_DropZone-content_djoti_10", "DropZone--userIsDragging": "_DropZone--userIsDragging_djoti_15", "DropZone--draggingOverArea": "_DropZone--draggingOverArea_djoti_19", "DropZone--draggingNewComponent": "_DropZone--draggingNewComponent_djoti_20", "DropZone--isAreaSelected": "_DropZone--isAreaSelected_djoti_26", "DropZone--hoveringOverArea": "_DropZone--hoveringOverArea_djoti_27", "DropZone--isDisabled": "_DropZone--isDisabled_djoti_28", "DropZone--isRootZone": "_DropZone--isRootZone_djoti_29", "DropZone--hasChildren": "_DropZone--hasChildren_djoti_30", "DropZone--isDestination": "_DropZone--isDestination_djoti_40", "DropZone-item": "_DropZone-item_djoti_52", "DropZone-hitbox": "_DropZone-hitbox_djoti_56" };
74980
76409
  init_react_import2();
74981
76410
  var import_react82 = require("react");
74982
76411
  var import_use_debounce = (init_index_module(), __toCommonJS(index_module_exports));
@@ -75161,7 +76590,11 @@ var require_dist2 = __commonJS({
75161
76590
  let isEnabled = userWillDrag;
75162
76591
  if (userIsDragging) {
75163
76592
  if (draggingNewComponent) {
75164
- isEnabled = hoveringOverArea;
76593
+ if (appContext22.safariFallbackMode) {
76594
+ isEnabled = true;
76595
+ } else {
76596
+ isEnabled = hoveringOverArea;
76597
+ }
75165
76598
  } else {
75166
76599
  isEnabled = draggingOverArea && hoveringOverZone;
75167
76600
  }
@@ -76927,7 +78360,7 @@ var require_dist2 = __commonJS({
76927
78360
  disabled: readOnly,
76928
78361
  onChange: (e2) => {
76929
78362
  if (e2.currentTarget.value === "true" || e2.currentTarget.value === "false") {
76930
- onChange(Boolean(e2.currentTarget.value));
78363
+ onChange(JSON.parse(e2.currentTarget.value));
76931
78364
  return;
76932
78365
  }
76933
78366
  onChange(e2.currentTarget.value);
@@ -77422,7 +78855,7 @@ var require_dist2 = __commonJS({
77422
78855
  var import_react222 = require("react");
77423
78856
  var import_auto_frame_component = __toESM2(require_dist());
77424
78857
  init_react_import2();
77425
- var styles_module_default16 = { "PuckPreview": "_PuckPreview_1mia0_1", "PuckPreview-frame": "_PuckPreview-frame_1mia0_5" };
78858
+ var styles_module_default16 = { "PuckPreview": "_PuckPreview_rxwlr_1", "PuckPreview-frame": "_PuckPreview-frame_rxwlr_5" };
77426
78859
  var import_jsx_runtime29 = require("react/jsx-runtime");
77427
78860
  var getClassName21 = get_class_name_factory_default2("PuckPreview", styles_module_default16);
77428
78861
  var Preview = ({ id = "puck-preview" }) => {
@@ -78150,7 +79583,7 @@ var require_dist2 = __commonJS({
78150
79583
  {
78151
79584
  className: getClassName24("root"),
78152
79585
  style: {
78153
- width: iframe.enabled ? ui.viewports.current.width : void 0,
79586
+ width: iframe.enabled ? ui.viewports.current.width : "100%",
78154
79587
  height: zoomConfig.rootHeight,
78155
79588
  transform: iframe.enabled ? `scale(${zoomConfig.zoom})` : void 0,
78156
79589
  transition: showTransition ? "width 150ms ease-out, height 150ms ease-out, transform 150ms ease-out" : "",
@@ -78942,6 +80375,7 @@ var defaultViewports = [
78942
80375
  ];
78943
80376
 
78944
80377
  // ../core/components/Puck/context.tsx
80378
+ var import_ua_parser_js = __toESM(require_ua_parser());
78945
80379
  var import_jsx_runtime4 = require("react/jsx-runtime");
78946
80380
  var defaultAppState = {
78947
80381
  data: { content: [], root: { props: { title: "" } } },
@@ -78981,7 +80415,8 @@ var defaultContext = {
78981
80415
  setZoomConfig: () => null,
78982
80416
  status: "LOADING",
78983
80417
  setStatus: () => null,
78984
- iframe: {}
80418
+ iframe: {},
80419
+ safariFallbackMode: false
78985
80420
  };
78986
80421
  var appContext = (0, import_react10.createContext)(defaultContext);
78987
80422
  function useAppContext() {