irie 0.0.8__py3-none-any.whl → 0.0.10__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. irie/apps/inventory/migrations/0002_alter_asset_bridge_sensors_and_more.py +24 -0
  2. irie/apps/inventory/models.py +2 -2
  3. irie/apps/static/assets/vendor/@popperjs/core/dist/cjs/popper-base.js +1069 -0
  4. irie/apps/static/assets/vendor/@popperjs/core/dist/cjs/popper-base.js.flow +3 -0
  5. irie/apps/static/assets/vendor/@popperjs/core/dist/cjs/popper-lite.js +1378 -0
  6. irie/apps/static/assets/vendor/@popperjs/core/dist/cjs/popper-lite.js.flow +3 -0
  7. irie/apps/static/assets/vendor/@popperjs/core/dist/cjs/popper.js +1927 -0
  8. irie/apps/static/assets/vendor/@popperjs/core/dist/cjs/popper.js.flow +3 -0
  9. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/createPopper.js +258 -0
  10. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/contains.js +23 -0
  11. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getBoundingClientRect.js +28 -0
  12. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getClippingRect.js +70 -0
  13. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getCompositeRect.js +57 -0
  14. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getComputedStyle.js +4 -0
  15. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getDocumentElement.js +6 -0
  16. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getDocumentRect.js +29 -0
  17. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getHTMLElementScroll.js +6 -0
  18. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getLayoutRect.js +25 -0
  19. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getNodeName.js +3 -0
  20. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getNodeScroll.js +11 -0
  21. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getOffsetParent.js +64 -0
  22. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getParentNode.js +19 -0
  23. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getScrollParent.js +16 -0
  24. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getViewportRect.js +40 -0
  25. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getWindow.js +12 -0
  26. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getWindowScroll.js +10 -0
  27. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getWindowScrollBarX.js +13 -0
  28. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/instanceOf.js +23 -0
  29. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/isScrollParent.js +10 -0
  30. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/isTableElement.js +4 -0
  31. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/listScrollParents.js +26 -0
  32. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/enums.js +31 -0
  33. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/index.js +8 -0
  34. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/modifiers/applyStyles.js +84 -0
  35. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/modifiers/arrow.js +101 -0
  36. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/modifiers/computeStyles.js +155 -0
  37. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/modifiers/eventListeners.js +49 -0
  38. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/modifiers/flip.js +147 -0
  39. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/modifiers/hide.js +61 -0
  40. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/modifiers/index.js +9 -0
  41. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/modifiers/offset.js +53 -0
  42. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/modifiers/popperOffsets.js +25 -0
  43. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/modifiers/preventOverflow.js +123 -0
  44. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/popper-base.js +3 -0
  45. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/popper-lite.js +11 -0
  46. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/popper.js +20 -0
  47. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/types.js +0 -0
  48. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/computeAutoPlacement.js +47 -0
  49. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/computeOffsets.js +70 -0
  50. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/debounce.js +15 -0
  51. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/detectOverflow.js +64 -0
  52. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/expandToHashMap.js +6 -0
  53. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/format.js +9 -0
  54. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/getAltAxis.js +3 -0
  55. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/getAltLen.js +3 -0
  56. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/getBasePlacement.js +4 -0
  57. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/getFreshSideObject.js +8 -0
  58. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/getMainAxisFromPlacement.js +3 -0
  59. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/getOppositePlacement.js +11 -0
  60. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/getOppositeVariationPlacement.js +9 -0
  61. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/getVariation.js +3 -0
  62. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/math.js +3 -0
  63. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/mergeByName.js +14 -0
  64. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/mergePaddingObject.js +4 -0
  65. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/orderModifiers.js +44 -0
  66. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/rectToClientRect.js +8 -0
  67. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/uniqueBy.js +11 -0
  68. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/validateModifiers.js +76 -0
  69. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/within.js +4 -0
  70. irie/apps/static/assets/vendor/@popperjs/core/dist/umd/popper-base.min.js +6 -0
  71. irie/apps/static/assets/vendor/@popperjs/core/dist/umd/popper-base.min.js.flow +3 -0
  72. irie/apps/static/assets/vendor/@popperjs/core/dist/umd/popper-lite.min.js +6 -0
  73. irie/apps/static/assets/vendor/@popperjs/core/dist/umd/popper-lite.min.js.flow +3 -0
  74. irie/apps/static/assets/vendor/@popperjs/core/dist/umd/popper.min.js +6 -0
  75. irie/apps/static/assets/vendor/@popperjs/core/dist/umd/popper.min.js.flow +3 -0
  76. irie/apps/static/assets/vendor/bootstrap/dist/css/bootstrap-grid.min.css +6 -0
  77. irie/apps/static/assets/vendor/bootstrap/dist/css/bootstrap-grid.rtl.min.css +6 -0
  78. irie/apps/static/assets/vendor/bootstrap/dist/css/bootstrap-reboot.min.css +7 -0
  79. irie/apps/static/assets/vendor/bootstrap/dist/css/bootstrap-reboot.rtl.min.css +7 -0
  80. irie/apps/static/assets/vendor/bootstrap/dist/css/bootstrap-utilities.min.css +6 -0
  81. irie/apps/static/assets/vendor/bootstrap/dist/css/bootstrap-utilities.rtl.min.css +6 -0
  82. irie/apps/static/assets/vendor/bootstrap/dist/css/bootstrap.min.css +6 -0
  83. irie/apps/static/assets/vendor/bootstrap/dist/css/bootstrap.rtl.min.css +6 -0
  84. irie/apps/static/assets/vendor/bootstrap/dist/js/bootstrap.bundle.min.js +6 -0
  85. irie/apps/static/assets/vendor/bootstrap/dist/js/bootstrap.esm.min.js +6 -0
  86. irie/apps/static/assets/vendor/bootstrap/dist/js/bootstrap.min.js +6 -0
  87. irie/apps/static/assets/vendor/chartist-plugin-tooltips/dist/chartist-plugin-tooltip.css +34 -0
  88. irie/apps/static/assets/vendor/chartist-plugin-tooltips/dist/chartist-plugin-tooltip.min.js +7 -0
  89. irie/apps/static/assets/vendor/notyf/notyf.es.js +441 -0
  90. irie/apps/static/assets/vendor/notyf/notyf.min.css +1 -0
  91. irie/apps/static/assets/vendor/notyf/notyf.min.js +1 -0
  92. irie/apps/static/assets/vendor/notyf/notyf.umd.js +449 -0
  93. irie/apps/static/assets/vendor/nouislider/distribute/nouislider.min.css +1 -0
  94. irie/apps/static/assets/vendor/nouislider/distribute/nouislider.min.js +1 -0
  95. irie/apps/static/assets/vendor/nouislider/distribute/nouislider.min.mjs +1 -0
  96. irie/apps/static/assets/vendor/nouislider/distribute/nouislider.mjs +2238 -0
  97. irie/apps/static/assets/vendor/onscreen/dist/index.js +21 -0
  98. irie/apps/static/assets/vendor/onscreen/dist/on-screen.es6.js +404 -0
  99. irie/apps/static/assets/vendor/onscreen/dist/on-screen.umd.min.js +1 -0
  100. irie/apps/static/assets/vendor/simplebar/dist/simplebar-core.esm.js +889 -0
  101. irie/apps/static/assets/vendor/simplebar/dist/simplebar.esm.js +994 -0
  102. irie/apps/static/assets/vendor/simplebar/dist/simplebar.min.css +1 -0
  103. irie/apps/static/assets/vendor/simplebar/dist/simplebar.min.js +10 -0
  104. irie/apps/static/assets/vendor/simplebar/dist/simplebar.umd.js +127 -0
  105. irie/apps/static/assets/vendor/smooth-scroll/dist/smooth-scroll.min.js +2 -0
  106. irie/apps/static/assets/vendor/smooth-scroll/dist/smooth-scroll.polyfills.min.js +2 -0
  107. irie/apps/static/assets/vendor/sweetalert2/dist/sweetalert2.all.min.js +2 -0
  108. irie/apps/static/assets/vendor/sweetalert2/dist/sweetalert2.min.css +1 -0
  109. irie/apps/static/assets/vendor/sweetalert2/dist/sweetalert2.min.js +1 -0
  110. irie/apps/static/assets/vendor/waypoints/lib/jquery.waypoints.min.js +7 -0
  111. irie/apps/static/assets/vendor/waypoints/lib/noframework.waypoints.min.js +7 -0
  112. irie/apps/static/assets/vendor/waypoints/lib/shortcuts/infinite.min.js +7 -0
  113. irie/apps/static/assets/vendor/waypoints/lib/shortcuts/inview.min.js +7 -0
  114. irie/apps/static/assets/vendor/waypoints/lib/shortcuts/sticky.min.js +7 -0
  115. irie/apps/static/assets/vendor/waypoints/lib/waypoints.debug.js +46 -0
  116. irie/apps/static/assets/vendor/waypoints/lib/zepto.waypoints.min.js +7 -0
  117. irie/apps/static/assets/vendor/waypoints/licenses.txt +23 -0
  118. irie/apps/static/assets/vendor/waypoints/testem.json +24 -0
  119. irie/core/settings.py +4 -2
  120. irie/init/hayward.zip +0 -0
  121. {irie-0.0.8.dist-info → irie-0.0.10.dist-info}/METADATA +1 -1
  122. {irie-0.0.8.dist-info → irie-0.0.10.dist-info}/RECORD +125 -7
  123. {irie-0.0.8.dist-info → irie-0.0.10.dist-info}/WHEEL +0 -0
  124. {irie-0.0.8.dist-info → irie-0.0.10.dist-info}/entry_points.txt +0 -0
  125. {irie-0.0.8.dist-info → irie-0.0.10.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,3 @@
1
+ // @flow
2
+
3
+ export * from '../../lib/popper.js'
@@ -0,0 +1,258 @@
1
+ import getCompositeRect from "./dom-utils/getCompositeRect.js";
2
+ import getLayoutRect from "./dom-utils/getLayoutRect.js";
3
+ import listScrollParents from "./dom-utils/listScrollParents.js";
4
+ import getOffsetParent from "./dom-utils/getOffsetParent.js";
5
+ import getComputedStyle from "./dom-utils/getComputedStyle.js";
6
+ import orderModifiers from "./utils/orderModifiers.js";
7
+ import debounce from "./utils/debounce.js";
8
+ import validateModifiers from "./utils/validateModifiers.js";
9
+ import uniqueBy from "./utils/uniqueBy.js";
10
+ import getBasePlacement from "./utils/getBasePlacement.js";
11
+ import mergeByName from "./utils/mergeByName.js";
12
+ import detectOverflow from "./utils/detectOverflow.js";
13
+ import { isElement } from "./dom-utils/instanceOf.js";
14
+ import { auto } from "./enums.js";
15
+ var INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';
16
+ var INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';
17
+ var DEFAULT_OPTIONS = {
18
+ placement: 'bottom',
19
+ modifiers: [],
20
+ strategy: 'absolute'
21
+ };
22
+
23
+ function areValidElements() {
24
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
25
+ args[_key] = arguments[_key];
26
+ }
27
+
28
+ return !args.some(function (element) {
29
+ return !(element && typeof element.getBoundingClientRect === 'function');
30
+ });
31
+ }
32
+
33
+ export function popperGenerator(generatorOptions) {
34
+ if (generatorOptions === void 0) {
35
+ generatorOptions = {};
36
+ }
37
+
38
+ var _generatorOptions = generatorOptions,
39
+ _generatorOptions$def = _generatorOptions.defaultModifiers,
40
+ defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,
41
+ _generatorOptions$def2 = _generatorOptions.defaultOptions,
42
+ defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
43
+ return function createPopper(reference, popper, options) {
44
+ if (options === void 0) {
45
+ options = defaultOptions;
46
+ }
47
+
48
+ var state = {
49
+ placement: 'bottom',
50
+ orderedModifiers: [],
51
+ options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),
52
+ modifiersData: {},
53
+ elements: {
54
+ reference: reference,
55
+ popper: popper
56
+ },
57
+ attributes: {},
58
+ styles: {}
59
+ };
60
+ var effectCleanupFns = [];
61
+ var isDestroyed = false;
62
+ var instance = {
63
+ state: state,
64
+ setOptions: function setOptions(options) {
65
+ cleanupModifierEffects();
66
+ state.options = Object.assign({}, defaultOptions, state.options, options);
67
+ state.scrollParents = {
68
+ reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
69
+ popper: listScrollParents(popper)
70
+ }; // Orders the modifiers based on their dependencies and `phase`
71
+ // properties
72
+
73
+ var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers
74
+
75
+ state.orderedModifiers = orderedModifiers.filter(function (m) {
76
+ return m.enabled;
77
+ }); // Validate the provided modifiers so that the consumer will get warned
78
+ // if one of the modifiers is invalid for any reason
79
+
80
+ if (false) {
81
+ var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {
82
+ var name = _ref.name;
83
+ return name;
84
+ });
85
+ validateModifiers(modifiers);
86
+
87
+ if (getBasePlacement(state.options.placement) === auto) {
88
+ var flipModifier = state.orderedModifiers.find(function (_ref2) {
89
+ var name = _ref2.name;
90
+ return name === 'flip';
91
+ });
92
+
93
+ if (!flipModifier) {
94
+ console.error(['Popper: "auto" placements require the "flip" modifier be', 'present and enabled to work.'].join(' '));
95
+ }
96
+ }
97
+
98
+ var _getComputedStyle = getComputedStyle(popper),
99
+ marginTop = _getComputedStyle.marginTop,
100
+ marginRight = _getComputedStyle.marginRight,
101
+ marginBottom = _getComputedStyle.marginBottom,
102
+ marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can
103
+ // cause bugs with positioning, so we'll warn the consumer
104
+
105
+
106
+ if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {
107
+ return parseFloat(margin);
108
+ })) {
109
+ console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));
110
+ }
111
+ }
112
+
113
+ runModifierEffects();
114
+ return instance.update();
115
+ },
116
+ // Sync update – it will always be executed, even if not necessary. This
117
+ // is useful for low frequency updates where sync behavior simplifies the
118
+ // logic.
119
+ // For high frequency updates (e.g. `resize` and `scroll` events), always
120
+ // prefer the async Popper#update method
121
+ forceUpdate: function forceUpdate() {
122
+ if (isDestroyed) {
123
+ return;
124
+ }
125
+
126
+ var _state$elements = state.elements,
127
+ reference = _state$elements.reference,
128
+ popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements
129
+ // anymore
130
+
131
+ if (!areValidElements(reference, popper)) {
132
+ if (false) {
133
+ console.error(INVALID_ELEMENT_ERROR);
134
+ }
135
+
136
+ return;
137
+ } // Store the reference and popper rects to be read by modifiers
138
+
139
+
140
+ state.rects = {
141
+ reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),
142
+ popper: getLayoutRect(popper)
143
+ }; // Modifiers have the ability to reset the current update cycle. The
144
+ // most common use case for this is the `flip` modifier changing the
145
+ // placement, which then needs to re-run all the modifiers, because the
146
+ // logic was previously ran for the previous placement and is therefore
147
+ // stale/incorrect
148
+
149
+ state.reset = false;
150
+ state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier
151
+ // is filled with the initial data specified by the modifier. This means
152
+ // it doesn't persist and is fresh on each update.
153
+ // To ensure persistent data, use `${name}#persistent`
154
+
155
+ state.orderedModifiers.forEach(function (modifier) {
156
+ return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
157
+ });
158
+ var __debug_loops__ = 0;
159
+
160
+ for (var index = 0; index < state.orderedModifiers.length; index++) {
161
+ if (false) {
162
+ __debug_loops__ += 1;
163
+
164
+ if (__debug_loops__ > 100) {
165
+ console.error(INFINITE_LOOP_ERROR);
166
+ break;
167
+ }
168
+ }
169
+
170
+ if (state.reset === true) {
171
+ state.reset = false;
172
+ index = -1;
173
+ continue;
174
+ }
175
+
176
+ var _state$orderedModifie = state.orderedModifiers[index],
177
+ fn = _state$orderedModifie.fn,
178
+ _state$orderedModifie2 = _state$orderedModifie.options,
179
+ _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,
180
+ name = _state$orderedModifie.name;
181
+
182
+ if (typeof fn === 'function') {
183
+ state = fn({
184
+ state: state,
185
+ options: _options,
186
+ name: name,
187
+ instance: instance
188
+ }) || state;
189
+ }
190
+ }
191
+ },
192
+ // Async and optimistically optimized update – it will not be executed if
193
+ // not necessary (debounced to run at most once-per-tick)
194
+ update: debounce(function () {
195
+ return new Promise(function (resolve) {
196
+ instance.forceUpdate();
197
+ resolve(state);
198
+ });
199
+ }),
200
+ destroy: function destroy() {
201
+ cleanupModifierEffects();
202
+ isDestroyed = true;
203
+ }
204
+ };
205
+
206
+ if (!areValidElements(reference, popper)) {
207
+ if (false) {
208
+ console.error(INVALID_ELEMENT_ERROR);
209
+ }
210
+
211
+ return instance;
212
+ }
213
+
214
+ instance.setOptions(options).then(function (state) {
215
+ if (!isDestroyed && options.onFirstUpdate) {
216
+ options.onFirstUpdate(state);
217
+ }
218
+ }); // Modifiers have the ability to execute arbitrary code before the first
219
+ // update cycle runs. They will be executed in the same order as the update
220
+ // cycle. This is useful when a modifier adds some persistent data that
221
+ // other modifiers need to use, but the modifier is run after the dependent
222
+ // one.
223
+
224
+ function runModifierEffects() {
225
+ state.orderedModifiers.forEach(function (_ref3) {
226
+ var name = _ref3.name,
227
+ _ref3$options = _ref3.options,
228
+ options = _ref3$options === void 0 ? {} : _ref3$options,
229
+ effect = _ref3.effect;
230
+
231
+ if (typeof effect === 'function') {
232
+ var cleanupFn = effect({
233
+ state: state,
234
+ name: name,
235
+ instance: instance,
236
+ options: options
237
+ });
238
+
239
+ var noopFn = function noopFn() {};
240
+
241
+ effectCleanupFns.push(cleanupFn || noopFn);
242
+ }
243
+ });
244
+ }
245
+
246
+ function cleanupModifierEffects() {
247
+ effectCleanupFns.forEach(function (fn) {
248
+ return fn();
249
+ });
250
+ effectCleanupFns = [];
251
+ }
252
+
253
+ return instance;
254
+ };
255
+ }
256
+ export var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules
257
+
258
+ export { detectOverflow };
@@ -0,0 +1,23 @@
1
+ import { isShadowRoot } from "./instanceOf.js";
2
+ export default function contains(parent, child) {
3
+ var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method
4
+
5
+ if (parent.contains(child)) {
6
+ return true;
7
+ } // then fallback to custom implementation with Shadow DOM support
8
+ else if (rootNode && isShadowRoot(rootNode)) {
9
+ var next = child;
10
+
11
+ do {
12
+ if (next && parent.isSameNode(next)) {
13
+ return true;
14
+ } // $FlowFixMe[prop-missing]: need a better way to handle this...
15
+
16
+
17
+ next = next.parentNode || next.host;
18
+ } while (next);
19
+ } // Give up, the result is false
20
+
21
+
22
+ return false;
23
+ }
@@ -0,0 +1,28 @@
1
+ import { isHTMLElement } from "./instanceOf.js";
2
+ var round = Math.round;
3
+ export default function getBoundingClientRect(element, includeScale) {
4
+ if (includeScale === void 0) {
5
+ includeScale = false;
6
+ }
7
+
8
+ var rect = element.getBoundingClientRect();
9
+ var scaleX = 1;
10
+ var scaleY = 1;
11
+
12
+ if (isHTMLElement(element) && includeScale) {
13
+ // Fallback to 1 in case both values are `0`
14
+ scaleX = rect.width / element.offsetWidth || 1;
15
+ scaleY = rect.height / element.offsetHeight || 1;
16
+ }
17
+
18
+ return {
19
+ width: round(rect.width / scaleX),
20
+ height: round(rect.height / scaleY),
21
+ top: round(rect.top / scaleY),
22
+ right: round(rect.right / scaleX),
23
+ bottom: round(rect.bottom / scaleY),
24
+ left: round(rect.left / scaleX),
25
+ x: round(rect.left / scaleX),
26
+ y: round(rect.top / scaleY)
27
+ };
28
+ }
@@ -0,0 +1,70 @@
1
+ import { viewport } from "../enums.js";
2
+ import getViewportRect from "./getViewportRect.js";
3
+ import getDocumentRect from "./getDocumentRect.js";
4
+ import listScrollParents from "./listScrollParents.js";
5
+ import getOffsetParent from "./getOffsetParent.js";
6
+ import getDocumentElement from "./getDocumentElement.js";
7
+ import getComputedStyle from "./getComputedStyle.js";
8
+ import { isElement, isHTMLElement } from "./instanceOf.js";
9
+ import getBoundingClientRect from "./getBoundingClientRect.js";
10
+ import getParentNode from "./getParentNode.js";
11
+ import contains from "./contains.js";
12
+ import getNodeName from "./getNodeName.js";
13
+ import rectToClientRect from "../utils/rectToClientRect.js";
14
+ import { max, min } from "../utils/math.js";
15
+
16
+ function getInnerBoundingClientRect(element) {
17
+ var rect = getBoundingClientRect(element);
18
+ rect.top = rect.top + element.clientTop;
19
+ rect.left = rect.left + element.clientLeft;
20
+ rect.bottom = rect.top + element.clientHeight;
21
+ rect.right = rect.left + element.clientWidth;
22
+ rect.width = element.clientWidth;
23
+ rect.height = element.clientHeight;
24
+ rect.x = rect.left;
25
+ rect.y = rect.top;
26
+ return rect;
27
+ }
28
+
29
+ function getClientRectFromMixedType(element, clippingParent) {
30
+ return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
31
+ } // A "clipping parent" is an overflowable container with the characteristic of
32
+ // clipping (or hiding) overflowing elements with a position different from
33
+ // `initial`
34
+
35
+
36
+ function getClippingParents(element) {
37
+ var clippingParents = listScrollParents(getParentNode(element));
38
+ var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;
39
+ var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
40
+
41
+ if (!isElement(clipperElement)) {
42
+ return [];
43
+ } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414
44
+
45
+
46
+ return clippingParents.filter(function (clippingParent) {
47
+ return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
48
+ });
49
+ } // Gets the maximum area that the element is visible in due to any number of
50
+ // clipping parents
51
+
52
+
53
+ export default function getClippingRect(element, boundary, rootBoundary) {
54
+ var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);
55
+ var clippingParents = [].concat(mainClippingParents, [rootBoundary]);
56
+ var firstClippingParent = clippingParents[0];
57
+ var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {
58
+ var rect = getClientRectFromMixedType(element, clippingParent);
59
+ accRect.top = max(rect.top, accRect.top);
60
+ accRect.right = min(rect.right, accRect.right);
61
+ accRect.bottom = min(rect.bottom, accRect.bottom);
62
+ accRect.left = max(rect.left, accRect.left);
63
+ return accRect;
64
+ }, getClientRectFromMixedType(element, firstClippingParent));
65
+ clippingRect.width = clippingRect.right - clippingRect.left;
66
+ clippingRect.height = clippingRect.bottom - clippingRect.top;
67
+ clippingRect.x = clippingRect.left;
68
+ clippingRect.y = clippingRect.top;
69
+ return clippingRect;
70
+ }
@@ -0,0 +1,57 @@
1
+ import getBoundingClientRect from "./getBoundingClientRect.js";
2
+ import getNodeScroll from "./getNodeScroll.js";
3
+ import getNodeName from "./getNodeName.js";
4
+ import { isHTMLElement } from "./instanceOf.js";
5
+ import getWindowScrollBarX from "./getWindowScrollBarX.js";
6
+ import getDocumentElement from "./getDocumentElement.js";
7
+ import isScrollParent from "./isScrollParent.js";
8
+
9
+ function isElementScaled(element) {
10
+ var rect = element.getBoundingClientRect();
11
+ var scaleX = rect.width / element.offsetWidth || 1;
12
+ var scaleY = rect.height / element.offsetHeight || 1;
13
+ return scaleX !== 1 || scaleY !== 1;
14
+ } // Returns the composite rect of an element relative to its offsetParent.
15
+ // Composite means it takes into account transforms as well as layout.
16
+
17
+
18
+ export default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
19
+ if (isFixed === void 0) {
20
+ isFixed = false;
21
+ }
22
+
23
+ var isOffsetParentAnElement = isHTMLElement(offsetParent);
24
+ var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
25
+ var documentElement = getDocumentElement(offsetParent);
26
+ var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
27
+ var scroll = {
28
+ scrollLeft: 0,
29
+ scrollTop: 0
30
+ };
31
+ var offsets = {
32
+ x: 0,
33
+ y: 0
34
+ };
35
+
36
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
37
+ if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078
38
+ isScrollParent(documentElement)) {
39
+ scroll = getNodeScroll(offsetParent);
40
+ }
41
+
42
+ if (isHTMLElement(offsetParent)) {
43
+ offsets = getBoundingClientRect(offsetParent, true);
44
+ offsets.x += offsetParent.clientLeft;
45
+ offsets.y += offsetParent.clientTop;
46
+ } else if (documentElement) {
47
+ offsets.x = getWindowScrollBarX(documentElement);
48
+ }
49
+ }
50
+
51
+ return {
52
+ x: rect.left + scroll.scrollLeft - offsets.x,
53
+ y: rect.top + scroll.scrollTop - offsets.y,
54
+ width: rect.width,
55
+ height: rect.height
56
+ };
57
+ }
@@ -0,0 +1,4 @@
1
+ import getWindow from "./getWindow.js";
2
+ export default function getComputedStyle(element) {
3
+ return getWindow(element).getComputedStyle(element);
4
+ }
@@ -0,0 +1,6 @@
1
+ import { isElement } from "./instanceOf.js";
2
+ export default function getDocumentElement(element) {
3
+ // $FlowFixMe[incompatible-return]: assume body is always available
4
+ return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]
5
+ element.document) || window.document).documentElement;
6
+ }
@@ -0,0 +1,29 @@
1
+ import getDocumentElement from "./getDocumentElement.js";
2
+ import getComputedStyle from "./getComputedStyle.js";
3
+ import getWindowScrollBarX from "./getWindowScrollBarX.js";
4
+ import getWindowScroll from "./getWindowScroll.js";
5
+ import { max } from "../utils/math.js"; // Gets the entire size of the scrollable document area, even extending outside
6
+ // of the `<html>` and `<body>` rect bounds if horizontally scrollable
7
+
8
+ export default function getDocumentRect(element) {
9
+ var _element$ownerDocumen;
10
+
11
+ var html = getDocumentElement(element);
12
+ var winScroll = getWindowScroll(element);
13
+ var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
14
+ var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
15
+ var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
16
+ var x = -winScroll.scrollLeft + getWindowScrollBarX(element);
17
+ var y = -winScroll.scrollTop;
18
+
19
+ if (getComputedStyle(body || html).direction === 'rtl') {
20
+ x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
21
+ }
22
+
23
+ return {
24
+ width: width,
25
+ height: height,
26
+ x: x,
27
+ y: y
28
+ };
29
+ }
@@ -0,0 +1,6 @@
1
+ export default function getHTMLElementScroll(element) {
2
+ return {
3
+ scrollLeft: element.scrollLeft,
4
+ scrollTop: element.scrollTop
5
+ };
6
+ }
@@ -0,0 +1,25 @@
1
+ import getBoundingClientRect from "./getBoundingClientRect.js"; // Returns the layout rect of an element relative to its offsetParent. Layout
2
+ // means it doesn't take into account transforms.
3
+
4
+ export default function getLayoutRect(element) {
5
+ var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.
6
+ // Fixes https://github.com/popperjs/popper-core/issues/1223
7
+
8
+ var width = element.offsetWidth;
9
+ var height = element.offsetHeight;
10
+
11
+ if (Math.abs(clientRect.width - width) <= 1) {
12
+ width = clientRect.width;
13
+ }
14
+
15
+ if (Math.abs(clientRect.height - height) <= 1) {
16
+ height = clientRect.height;
17
+ }
18
+
19
+ return {
20
+ x: element.offsetLeft,
21
+ y: element.offsetTop,
22
+ width: width,
23
+ height: height
24
+ };
25
+ }
@@ -0,0 +1,3 @@
1
+ export default function getNodeName(element) {
2
+ return element ? (element.nodeName || '').toLowerCase() : null;
3
+ }
@@ -0,0 +1,11 @@
1
+ import getWindowScroll from "./getWindowScroll.js";
2
+ import getWindow from "./getWindow.js";
3
+ import { isHTMLElement } from "./instanceOf.js";
4
+ import getHTMLElementScroll from "./getHTMLElementScroll.js";
5
+ export default function getNodeScroll(node) {
6
+ if (node === getWindow(node) || !isHTMLElement(node)) {
7
+ return getWindowScroll(node);
8
+ } else {
9
+ return getHTMLElementScroll(node);
10
+ }
11
+ }
@@ -0,0 +1,64 @@
1
+ import getWindow from "./getWindow.js";
2
+ import getNodeName from "./getNodeName.js";
3
+ import getComputedStyle from "./getComputedStyle.js";
4
+ import { isHTMLElement } from "./instanceOf.js";
5
+ import isTableElement from "./isTableElement.js";
6
+ import getParentNode from "./getParentNode.js";
7
+
8
+ function getTrueOffsetParent(element) {
9
+ if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837
10
+ getComputedStyle(element).position === 'fixed') {
11
+ return null;
12
+ }
13
+
14
+ return element.offsetParent;
15
+ } // `.offsetParent` reports `null` for fixed elements, while absolute elements
16
+ // return the containing block
17
+
18
+
19
+ function getContainingBlock(element) {
20
+ var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;
21
+ var isIE = navigator.userAgent.indexOf('Trident') !== -1;
22
+
23
+ if (isIE && isHTMLElement(element)) {
24
+ // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
25
+ var elementCss = getComputedStyle(element);
26
+
27
+ if (elementCss.position === 'fixed') {
28
+ return null;
29
+ }
30
+ }
31
+
32
+ var currentNode = getParentNode(element);
33
+
34
+ while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
35
+ var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that
36
+ // create a containing block.
37
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
38
+
39
+ if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {
40
+ return currentNode;
41
+ } else {
42
+ currentNode = currentNode.parentNode;
43
+ }
44
+ }
45
+
46
+ return null;
47
+ } // Gets the closest ancestor positioned element. Handles some edge cases,
48
+ // such as table ancestors and cross browser bugs.
49
+
50
+
51
+ export default function getOffsetParent(element) {
52
+ var window = getWindow(element);
53
+ var offsetParent = getTrueOffsetParent(element);
54
+
55
+ while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {
56
+ offsetParent = getTrueOffsetParent(offsetParent);
57
+ }
58
+
59
+ if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {
60
+ return window;
61
+ }
62
+
63
+ return offsetParent || getContainingBlock(element) || window;
64
+ }
@@ -0,0 +1,19 @@
1
+ import getNodeName from "./getNodeName.js";
2
+ import getDocumentElement from "./getDocumentElement.js";
3
+ import { isShadowRoot } from "./instanceOf.js";
4
+ export default function getParentNode(element) {
5
+ if (getNodeName(element) === 'html') {
6
+ return element;
7
+ }
8
+
9
+ return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle
10
+ // $FlowFixMe[incompatible-return]
11
+ // $FlowFixMe[prop-missing]
12
+ element.assignedSlot || // step into the shadow DOM of the parent of a slotted node
13
+ element.parentNode || ( // DOM Element detected
14
+ isShadowRoot(element) ? element.host : null) || // ShadowRoot detected
15
+ // $FlowFixMe[incompatible-call]: HTMLElement is a Node
16
+ getDocumentElement(element) // fallback
17
+
18
+ );
19
+ }
@@ -0,0 +1,16 @@
1
+ import getParentNode from "./getParentNode.js";
2
+ import isScrollParent from "./isScrollParent.js";
3
+ import getNodeName from "./getNodeName.js";
4
+ import { isHTMLElement } from "./instanceOf.js";
5
+ export default function getScrollParent(node) {
6
+ if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {
7
+ // $FlowFixMe[incompatible-return]: assume body is always available
8
+ return node.ownerDocument.body;
9
+ }
10
+
11
+ if (isHTMLElement(node) && isScrollParent(node)) {
12
+ return node;
13
+ }
14
+
15
+ return getScrollParent(getParentNode(node));
16
+ }