@startinblox/core 0.19.0-beta.1 → 0.19.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{_snowpack/pkg/leaflet.markercluster/dist/MarkerCluster.css → assets/MarkerCluster-614dea0a.css} +0 -0
- package/dist/{_snowpack/pkg/leaflet.markercluster/dist/MarkerCluster.Default.css → assets/MarkerCluster.Default-61258232.css} +0 -0
- package/dist/assets/en-e53105c5.js +14 -0
- package/dist/assets/en-e53105c5.js.map +1 -0
- package/dist/assets/fr-a7fcdb64.js +14 -0
- package/dist/assets/fr-a7fcdb64.js.map +1 -0
- package/dist/{_snowpack/pkg/fusejs.js → assets/helpers-bf15809c.js} +398 -454
- package/dist/assets/helpers-bf15809c.js.map +1 -0
- package/dist/{_snowpack/pkg/leaflet/dist/leaflet.css → assets/leaflet-3c081932.css} +3 -3
- package/dist/helpers.js +18 -0
- package/dist/helpers.js.map +1 -0
- package/dist/index.js +54523 -48
- package/dist/index.js.map +1 -0
- package/package.json +7 -22
- package/dist/_snowpack/pkg/autolinker.js +0 -4429
- package/dist/_snowpack/pkg/autolinker.js.map +0 -1
- package/dist/_snowpack/pkg/common/_baseUnary-d2677655.js +0 -353
- package/dist/_snowpack/pkg/common/_baseUnary-d2677655.js.map +0 -1
- package/dist/_snowpack/pkg/common/_commonjsHelpers-0597c316.js +0 -26
- package/dist/_snowpack/pkg/common/_commonjsHelpers-0597c316.js.map +0 -1
- package/dist/_snowpack/pkg/common/decode-26fbf385.js +0 -185
- package/dist/_snowpack/pkg/common/decode-26fbf385.js.map +0 -1
- package/dist/_snowpack/pkg/common/lit-html-3647afce.js +0 -1104
- package/dist/_snowpack/pkg/common/lit-html-3647afce.js.map +0 -1
- package/dist/_snowpack/pkg/delta-markdown-for-quill.js +0 -26198
- package/dist/_snowpack/pkg/delta-markdown-for-quill.js.map +0 -1
- package/dist/_snowpack/pkg/dialog-polyfill.js +0 -826
- package/dist/_snowpack/pkg/dialog-polyfill.js.map +0 -1
- package/dist/_snowpack/pkg/fusejs.js.map +0 -1
- package/dist/_snowpack/pkg/import-map.json +0 -25
- package/dist/_snowpack/pkg/jsonld-context-parser.js +0 -836
- package/dist/_snowpack/pkg/jsonld-context-parser.js.map +0 -1
- package/dist/_snowpack/pkg/jsonld.js +0 -11760
- package/dist/_snowpack/pkg/jsonld.js.map +0 -1
- package/dist/_snowpack/pkg/leaflet/dist/leaflet.css.proxy.js +0 -10
- package/dist/_snowpack/pkg/leaflet.markercluster/dist/MarkerCluster.Default.css.proxy.js +0 -10
- package/dist/_snowpack/pkg/leaflet.markercluster/dist/MarkerCluster.css.proxy.js +0 -10
- package/dist/_snowpack/pkg/lit-html/directives/if-defined.js +0 -39
- package/dist/_snowpack/pkg/lit-html/directives/if-defined.js.map +0 -1
- package/dist/_snowpack/pkg/lit-html/directives/unsafe-html.js +0 -48
- package/dist/_snowpack/pkg/lit-html/directives/unsafe-html.js.map +0 -1
- package/dist/_snowpack/pkg/lit-html/directives/until.js +0 -87
- package/dist/_snowpack/pkg/lit-html/directives/until.js.map +0 -1
- package/dist/_snowpack/pkg/lit-html.js +0 -94
- package/dist/_snowpack/pkg/lit-html.js.map +0 -1
- package/dist/_snowpack/pkg/markdown-it-link-attributes.js +0 -68
- package/dist/_snowpack/pkg/markdown-it-link-attributes.js.map +0 -1
- package/dist/_snowpack/pkg/markdown-it.js +0 -11307
- package/dist/_snowpack/pkg/markdown-it.js.map +0 -1
- package/dist/_snowpack/pkg/quill/dist/quill.snow.css.proxy.js +0 -10
- package/dist/_snowpack/pkg/quill-delta-to-markdown.js +0 -971
- package/dist/_snowpack/pkg/quill-delta-to-markdown.js.map +0 -1
- package/dist/_snowpack/pkg/quill.js +0 -14441
- package/dist/_snowpack/pkg/quill.js.map +0 -1
- package/dist/_snowpack/pkg/slim-select.js +0 -714
- package/dist/_snowpack/pkg/slim-select.js.map +0 -1
- package/dist/_snowpack/pkg/tui-calendar/dist/tui-calendar.css +0 -1149
- package/dist/_snowpack/pkg/tui-calendar/dist/tui-calendar.css.proxy.js +0 -10
- package/dist/_snowpack/pkg/tui-calendar.js +0 -46503
- package/dist/_snowpack/pkg/tui-calendar.js.map +0 -1
- package/dist/components/solid-ac-checker.js +0 -45
- package/dist/components/solid-calendar.js +0 -66
- package/dist/components/solid-delete.js +0 -96
- package/dist/components/solid-display.js +0 -150
- package/dist/components/solid-form-search.js +0 -173
- package/dist/components/solid-form.js +0 -257
- package/dist/components/solid-lang.js +0 -35
- package/dist/components/solid-map.js +0 -204
- package/dist/components/solid-table.js +0 -181
- package/dist/components/solid-widget.js +0 -72
- package/dist/import.css +0 -4
- package/dist/libs/Component.js +0 -13
- package/dist/libs/ComponentFactory.js +0 -165
- package/dist/libs/Compositor.js +0 -96
- package/dist/libs/Sib.js +0 -44
- package/dist/libs/filter.js +0 -184
- package/dist/libs/helpers.js +0 -185
- package/dist/libs/interfaces.js +0 -6
- package/dist/libs/lit-helpers.js +0 -139
- package/dist/libs/polyfills.js +0 -35
- package/dist/libs/store/custom-getter.js +0 -344
- package/dist/libs/store/server-pagination.js +0 -19
- package/dist/libs/store/server-search.js +0 -32
- package/dist/libs/store/store.js +0 -560
- package/dist/locales/en.json +0 -10
- package/dist/locales/en.json.proxy.js +0 -2
- package/dist/locales/fr.json +0 -10
- package/dist/locales/fr.json.proxy.js +0 -2
- package/dist/mixins/attributeBinderMixin.js +0 -113
- package/dist/mixins/contextMixin.js +0 -26
- package/dist/mixins/counterMixin.js +0 -54
- package/dist/mixins/federationMixin.js +0 -57
- package/dist/mixins/filterMixin.js +0 -152
- package/dist/mixins/grouperMixin.js +0 -73
- package/dist/mixins/highlighterMixin.js +0 -36
- package/dist/mixins/interfaces.js +0 -6
- package/dist/mixins/listMixin.js +0 -116
- package/dist/mixins/nextMixin.js +0 -23
- package/dist/mixins/paginateMixin.js +0 -97
- package/dist/mixins/requiredMixin.js +0 -38
- package/dist/mixins/serverPaginationMixin.js +0 -122
- package/dist/mixins/sorterMixin.js +0 -131
- package/dist/mixins/storeMixin.js +0 -139
- package/dist/mixins/translationMixin.js +0 -58
- package/dist/mixins/validationMixin.js +0 -95
- package/dist/mixins/widgetMixin.js +0 -358
- package/dist/new-widgets/attributeMixins/actionMixin.js +0 -13
- package/dist/new-widgets/attributeMixins/blankMixin.js +0 -7
- package/dist/new-widgets/attributeMixins/booleanMixin.js +0 -7
- package/dist/new-widgets/attributeMixins/index.js +0 -19
- package/dist/new-widgets/attributeMixins/mailtoMixin.js +0 -7
- package/dist/new-widgets/attributeMixins/multipleMixin.js +0 -27
- package/dist/new-widgets/attributeMixins/numberMixin.js +0 -7
- package/dist/new-widgets/attributeMixins/placeholderMixin.js +0 -16
- package/dist/new-widgets/attributeMixins/telMixin.js +0 -7
- package/dist/new-widgets/baseWidgetMixin.js +0 -109
- package/dist/new-widgets/callbackMixins/autocompletionMixin.js +0 -96
- package/dist/new-widgets/callbackMixins/index.js +0 -7
- package/dist/new-widgets/callbackMixins/richtextMixin.js +0 -37
- package/dist/new-widgets/callbackMixins/slimselect.css.proxy.js +0 -10
- package/dist/new-widgets/interfaces.js +0 -1
- package/dist/new-widgets/new-widget-factory.js +0 -91
- package/dist/new-widgets/templateAdditionMixins/addableMixin.js +0 -26
- package/dist/new-widgets/templateAdditionMixins/index.js +0 -13
- package/dist/new-widgets/templateAdditionMixins/labelLastMixin.js +0 -16
- package/dist/new-widgets/templateAdditionMixins/labelMixin.js +0 -18
- package/dist/new-widgets/templates/defaultTemplatesDirectory.js +0 -29
- package/dist/new-widgets/templates/displayTemplatesDirectory.js +0 -54
- package/dist/new-widgets/templates/formTemplatesDirectory.js +0 -423
- package/dist/new-widgets/templates/groupTemplatesDirectory.js +0 -11
- package/dist/new-widgets/templates/index.js +0 -6
- package/dist/new-widgets/templates/setTemplatesDirectory.js +0 -16
- package/dist/new-widgets/templatesDependencies/altMixin.js +0 -12
- package/dist/new-widgets/templatesDependencies/editableMixin.js +0 -60
- package/dist/new-widgets/templatesDependencies/filterRangeFormMixin.js +0 -34
- package/dist/new-widgets/templatesDependencies/formCheckboxMixin.js +0 -10
- package/dist/new-widgets/templatesDependencies/formCheckboxesMixin.js +0 -41
- package/dist/new-widgets/templatesDependencies/formDropdownMixin.js +0 -59
- package/dist/new-widgets/templatesDependencies/formFileMixin.js +0 -82
- package/dist/new-widgets/templatesDependencies/formLengthMixin.js +0 -18
- package/dist/new-widgets/templatesDependencies/formMinMaxMixin.js +0 -18
- package/dist/new-widgets/templatesDependencies/formMixin.js +0 -56
- package/dist/new-widgets/templatesDependencies/formNumberMixin.js +0 -10
- package/dist/new-widgets/templatesDependencies/formRadioMixin.js +0 -12
- package/dist/new-widgets/templatesDependencies/formStepMixin.js +0 -12
- package/dist/new-widgets/templatesDependencies/linkTextMixin.js +0 -13
- package/dist/new-widgets/templatesDependencies/multipleFormMixin.js +0 -116
- package/dist/new-widgets/templatesDependencies/multipleselectFormMixin.js +0 -74
- package/dist/new-widgets/templatesDependencies/patternMixin.js +0 -18
- package/dist/new-widgets/templatesDependencies/rangeMixin.js +0 -100
- package/dist/new-widgets/templatesDependencies/setMixin.js +0 -9
- package/dist/new-widgets/templatesDependencies/valueRichtextMixin.js +0 -9
- package/dist/new-widgets/valueTransformationMixins/autolinkMixin.js +0 -14
- package/dist/new-widgets/valueTransformationMixins/dateMixin.js +0 -29
- package/dist/new-widgets/valueTransformationMixins/dateTimeMixin.js +0 -12
- package/dist/new-widgets/valueTransformationMixins/index.js +0 -15
- package/dist/new-widgets/valueTransformationMixins/markdownMixin.js +0 -30
- package/dist/new-widgets/valueTransformationMixins/multilineMixin.js +0 -13
- package/dist/new-widgets/valueTransformationMixins/oembedMixin.js +0 -21
- package/dist/solid-template-element.js +0 -144
- package/dist/style/default-theme.css.proxy.js +0 -10
- package/dist/widgets/baseWidget.js +0 -267
- package/dist/widgets/widget-factory.js +0 -20
- /package/dist/{style/default-theme.css → assets/default-theme-d0f20a8a.css} +0 -0
- /package/dist/{_snowpack/pkg/quill/dist/quill.snow.css → assets/quill.snow-8f222e44.css} +0 -0
- /package/dist/{new-widgets/callbackMixins/slimselect.css → assets/slimselect-43e3ebc8.css} +0 -0
|
@@ -1,971 +0,0 @@
|
|
|
1
|
-
import { c as createCommonjsModule } from './common/_commonjsHelpers-0597c316.js';
|
|
2
|
-
import { i as isObjectLike_1, c as _baseGetTag, h as _Symbol, g as isArray_1, _ as _getNative, f as _baseUnary, j as isObject_1 } from './common/_baseUnary-d2677655.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* A specialized version of `_.map` for arrays without support for iteratee
|
|
6
|
-
* shorthands.
|
|
7
|
-
*
|
|
8
|
-
* @private
|
|
9
|
-
* @param {Array} [array] The array to iterate over.
|
|
10
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
11
|
-
* @returns {Array} Returns the new mapped array.
|
|
12
|
-
*/
|
|
13
|
-
function arrayMap(array, iteratee) {
|
|
14
|
-
var index = -1,
|
|
15
|
-
length = array == null ? 0 : array.length,
|
|
16
|
-
result = Array(length);
|
|
17
|
-
while (++index < length) {
|
|
18
|
-
result[index] = iteratee(array[index], index, array);
|
|
19
|
-
}
|
|
20
|
-
return result;
|
|
21
|
-
}
|
|
22
|
-
var _arrayMap = arrayMap;
|
|
23
|
-
|
|
24
|
-
/** `Object#toString` result references. */
|
|
25
|
-
var symbolTag = '[object Symbol]';
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
29
|
-
*
|
|
30
|
-
* @static
|
|
31
|
-
* @memberOf _
|
|
32
|
-
* @since 4.0.0
|
|
33
|
-
* @category Lang
|
|
34
|
-
* @param {*} value The value to check.
|
|
35
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
36
|
-
* @example
|
|
37
|
-
*
|
|
38
|
-
* _.isSymbol(Symbol.iterator);
|
|
39
|
-
* // => true
|
|
40
|
-
*
|
|
41
|
-
* _.isSymbol('abc');
|
|
42
|
-
* // => false
|
|
43
|
-
*/
|
|
44
|
-
function isSymbol(value) {
|
|
45
|
-
return typeof value == 'symbol' || isObjectLike_1(value) && _baseGetTag(value) == symbolTag;
|
|
46
|
-
}
|
|
47
|
-
var isSymbol_1 = isSymbol;
|
|
48
|
-
|
|
49
|
-
/** Used as references for various `Number` constants. */
|
|
50
|
-
var INFINITY = 1 / 0;
|
|
51
|
-
|
|
52
|
-
/** Used to convert symbols to primitives and strings. */
|
|
53
|
-
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
|
54
|
-
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* The base implementation of `_.toString` which doesn't convert nullish
|
|
58
|
-
* values to empty strings.
|
|
59
|
-
*
|
|
60
|
-
* @private
|
|
61
|
-
* @param {*} value The value to process.
|
|
62
|
-
* @returns {string} Returns the string.
|
|
63
|
-
*/
|
|
64
|
-
function baseToString(value) {
|
|
65
|
-
// Exit early for strings to avoid a performance hit in some environments.
|
|
66
|
-
if (typeof value == 'string') {
|
|
67
|
-
return value;
|
|
68
|
-
}
|
|
69
|
-
if (isArray_1(value)) {
|
|
70
|
-
// Recursively convert values (susceptible to call stack limits).
|
|
71
|
-
return _arrayMap(value, baseToString) + '';
|
|
72
|
-
}
|
|
73
|
-
if (isSymbol_1(value)) {
|
|
74
|
-
return symbolToString ? symbolToString.call(value) : '';
|
|
75
|
-
}
|
|
76
|
-
var result = value + '';
|
|
77
|
-
return result == '0' && 1 / value == -INFINITY ? '-0' : result;
|
|
78
|
-
}
|
|
79
|
-
var _baseToString = baseToString;
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* The base implementation of `_.slice` without an iteratee call guard.
|
|
83
|
-
*
|
|
84
|
-
* @private
|
|
85
|
-
* @param {Array} array The array to slice.
|
|
86
|
-
* @param {number} [start=0] The start position.
|
|
87
|
-
* @param {number} [end=array.length] The end position.
|
|
88
|
-
* @returns {Array} Returns the slice of `array`.
|
|
89
|
-
*/
|
|
90
|
-
function baseSlice(array, start, end) {
|
|
91
|
-
var index = -1,
|
|
92
|
-
length = array.length;
|
|
93
|
-
if (start < 0) {
|
|
94
|
-
start = -start > length ? 0 : length + start;
|
|
95
|
-
}
|
|
96
|
-
end = end > length ? length : end;
|
|
97
|
-
if (end < 0) {
|
|
98
|
-
end += length;
|
|
99
|
-
}
|
|
100
|
-
length = start > end ? 0 : end - start >>> 0;
|
|
101
|
-
start >>>= 0;
|
|
102
|
-
var result = Array(length);
|
|
103
|
-
while (++index < length) {
|
|
104
|
-
result[index] = array[index + start];
|
|
105
|
-
}
|
|
106
|
-
return result;
|
|
107
|
-
}
|
|
108
|
-
var _baseSlice = baseSlice;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Casts `array` to a slice if it's needed.
|
|
112
|
-
*
|
|
113
|
-
* @private
|
|
114
|
-
* @param {Array} array The array to inspect.
|
|
115
|
-
* @param {number} start The start position.
|
|
116
|
-
* @param {number} [end=array.length] The end position.
|
|
117
|
-
* @returns {Array} Returns the cast slice.
|
|
118
|
-
*/
|
|
119
|
-
function castSlice(array, start, end) {
|
|
120
|
-
var length = array.length;
|
|
121
|
-
end = end === undefined ? length : end;
|
|
122
|
-
return !start && end >= length ? array : _baseSlice(array, start, end);
|
|
123
|
-
}
|
|
124
|
-
var _castSlice = castSlice;
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* The base implementation of `_.findIndex` and `_.findLastIndex` without
|
|
128
|
-
* support for iteratee shorthands.
|
|
129
|
-
*
|
|
130
|
-
* @private
|
|
131
|
-
* @param {Array} array The array to inspect.
|
|
132
|
-
* @param {Function} predicate The function invoked per iteration.
|
|
133
|
-
* @param {number} fromIndex The index to search from.
|
|
134
|
-
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
135
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
136
|
-
*/
|
|
137
|
-
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
|
138
|
-
var length = array.length,
|
|
139
|
-
index = fromIndex + (fromRight ? 1 : -1);
|
|
140
|
-
while (fromRight ? index-- : ++index < length) {
|
|
141
|
-
if (predicate(array[index], index, array)) {
|
|
142
|
-
return index;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
return -1;
|
|
146
|
-
}
|
|
147
|
-
var _baseFindIndex = baseFindIndex;
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* The base implementation of `_.isNaN` without support for number objects.
|
|
151
|
-
*
|
|
152
|
-
* @private
|
|
153
|
-
* @param {*} value The value to check.
|
|
154
|
-
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
|
|
155
|
-
*/
|
|
156
|
-
function baseIsNaN(value) {
|
|
157
|
-
return value !== value;
|
|
158
|
-
}
|
|
159
|
-
var _baseIsNaN = baseIsNaN;
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* A specialized version of `_.indexOf` which performs strict equality
|
|
163
|
-
* comparisons of values, i.e. `===`.
|
|
164
|
-
*
|
|
165
|
-
* @private
|
|
166
|
-
* @param {Array} array The array to inspect.
|
|
167
|
-
* @param {*} value The value to search for.
|
|
168
|
-
* @param {number} fromIndex The index to search from.
|
|
169
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
170
|
-
*/
|
|
171
|
-
function strictIndexOf(array, value, fromIndex) {
|
|
172
|
-
var index = fromIndex - 1,
|
|
173
|
-
length = array.length;
|
|
174
|
-
while (++index < length) {
|
|
175
|
-
if (array[index] === value) {
|
|
176
|
-
return index;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
return -1;
|
|
180
|
-
}
|
|
181
|
-
var _strictIndexOf = strictIndexOf;
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
|
|
185
|
-
*
|
|
186
|
-
* @private
|
|
187
|
-
* @param {Array} array The array to inspect.
|
|
188
|
-
* @param {*} value The value to search for.
|
|
189
|
-
* @param {number} fromIndex The index to search from.
|
|
190
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
191
|
-
*/
|
|
192
|
-
function baseIndexOf(array, value, fromIndex) {
|
|
193
|
-
return value === value ? _strictIndexOf(array, value, fromIndex) : _baseFindIndex(array, _baseIsNaN, fromIndex);
|
|
194
|
-
}
|
|
195
|
-
var _baseIndexOf = baseIndexOf;
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
|
|
199
|
-
* that is not found in the character symbols.
|
|
200
|
-
*
|
|
201
|
-
* @private
|
|
202
|
-
* @param {Array} strSymbols The string symbols to inspect.
|
|
203
|
-
* @param {Array} chrSymbols The character symbols to find.
|
|
204
|
-
* @returns {number} Returns the index of the last unmatched string symbol.
|
|
205
|
-
*/
|
|
206
|
-
function charsEndIndex(strSymbols, chrSymbols) {
|
|
207
|
-
var index = strSymbols.length;
|
|
208
|
-
while (index-- && _baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
|
|
209
|
-
return index;
|
|
210
|
-
}
|
|
211
|
-
var _charsEndIndex = charsEndIndex;
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Converts an ASCII `string` to an array.
|
|
215
|
-
*
|
|
216
|
-
* @private
|
|
217
|
-
* @param {string} string The string to convert.
|
|
218
|
-
* @returns {Array} Returns the converted array.
|
|
219
|
-
*/
|
|
220
|
-
function asciiToArray(string) {
|
|
221
|
-
return string.split('');
|
|
222
|
-
}
|
|
223
|
-
var _asciiToArray = asciiToArray;
|
|
224
|
-
|
|
225
|
-
/** Used to compose unicode character classes. */
|
|
226
|
-
var rsAstralRange = '\\ud800-\\udfff',
|
|
227
|
-
rsComboMarksRange = '\\u0300-\\u036f',
|
|
228
|
-
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
|
|
229
|
-
rsComboSymbolsRange = '\\u20d0-\\u20ff',
|
|
230
|
-
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
|
|
231
|
-
rsVarRange = '\\ufe0e\\ufe0f';
|
|
232
|
-
|
|
233
|
-
/** Used to compose unicode capture groups. */
|
|
234
|
-
var rsZWJ = '\\u200d';
|
|
235
|
-
|
|
236
|
-
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
|
|
237
|
-
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
* Checks if `string` contains Unicode symbols.
|
|
241
|
-
*
|
|
242
|
-
* @private
|
|
243
|
-
* @param {string} string The string to inspect.
|
|
244
|
-
* @returns {boolean} Returns `true` if a symbol is found, else `false`.
|
|
245
|
-
*/
|
|
246
|
-
function hasUnicode(string) {
|
|
247
|
-
return reHasUnicode.test(string);
|
|
248
|
-
}
|
|
249
|
-
var _hasUnicode = hasUnicode;
|
|
250
|
-
|
|
251
|
-
/** Used to compose unicode character classes. */
|
|
252
|
-
var rsAstralRange$1 = '\\ud800-\\udfff',
|
|
253
|
-
rsComboMarksRange$1 = '\\u0300-\\u036f',
|
|
254
|
-
reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f',
|
|
255
|
-
rsComboSymbolsRange$1 = '\\u20d0-\\u20ff',
|
|
256
|
-
rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1,
|
|
257
|
-
rsVarRange$1 = '\\ufe0e\\ufe0f';
|
|
258
|
-
|
|
259
|
-
/** Used to compose unicode capture groups. */
|
|
260
|
-
var rsAstral = '[' + rsAstralRange$1 + ']',
|
|
261
|
-
rsCombo = '[' + rsComboRange$1 + ']',
|
|
262
|
-
rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
|
263
|
-
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
|
|
264
|
-
rsNonAstral = '[^' + rsAstralRange$1 + ']',
|
|
265
|
-
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
|
266
|
-
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
|
267
|
-
rsZWJ$1 = '\\u200d';
|
|
268
|
-
|
|
269
|
-
/** Used to compose unicode regexes. */
|
|
270
|
-
var reOptMod = rsModifier + '?',
|
|
271
|
-
rsOptVar = '[' + rsVarRange$1 + ']?',
|
|
272
|
-
rsOptJoin = '(?:' + rsZWJ$1 + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
|
273
|
-
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
|
274
|
-
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
|
|
275
|
-
|
|
276
|
-
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
|
|
277
|
-
var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
|
|
278
|
-
|
|
279
|
-
/**
|
|
280
|
-
* Converts a Unicode `string` to an array.
|
|
281
|
-
*
|
|
282
|
-
* @private
|
|
283
|
-
* @param {string} string The string to convert.
|
|
284
|
-
* @returns {Array} Returns the converted array.
|
|
285
|
-
*/
|
|
286
|
-
function unicodeToArray(string) {
|
|
287
|
-
return string.match(reUnicode) || [];
|
|
288
|
-
}
|
|
289
|
-
var _unicodeToArray = unicodeToArray;
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* Converts `string` to an array.
|
|
293
|
-
*
|
|
294
|
-
* @private
|
|
295
|
-
* @param {string} string The string to convert.
|
|
296
|
-
* @returns {Array} Returns the converted array.
|
|
297
|
-
*/
|
|
298
|
-
function stringToArray(string) {
|
|
299
|
-
return _hasUnicode(string) ? _unicodeToArray(string) : _asciiToArray(string);
|
|
300
|
-
}
|
|
301
|
-
var _stringToArray = stringToArray;
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* Converts `value` to a string. An empty string is returned for `null`
|
|
305
|
-
* and `undefined` values. The sign of `-0` is preserved.
|
|
306
|
-
*
|
|
307
|
-
* @static
|
|
308
|
-
* @memberOf _
|
|
309
|
-
* @since 4.0.0
|
|
310
|
-
* @category Lang
|
|
311
|
-
* @param {*} value The value to convert.
|
|
312
|
-
* @returns {string} Returns the converted string.
|
|
313
|
-
* @example
|
|
314
|
-
*
|
|
315
|
-
* _.toString(null);
|
|
316
|
-
* // => ''
|
|
317
|
-
*
|
|
318
|
-
* _.toString(-0);
|
|
319
|
-
* // => '-0'
|
|
320
|
-
*
|
|
321
|
-
* _.toString([1, 2, 3]);
|
|
322
|
-
* // => '1,2,3'
|
|
323
|
-
*/
|
|
324
|
-
function toString(value) {
|
|
325
|
-
return value == null ? '' : _baseToString(value);
|
|
326
|
-
}
|
|
327
|
-
var toString_1 = toString;
|
|
328
|
-
|
|
329
|
-
/** Used to match a single whitespace character. */
|
|
330
|
-
var reWhitespace = /\s/;
|
|
331
|
-
|
|
332
|
-
/**
|
|
333
|
-
* Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
|
|
334
|
-
* character of `string`.
|
|
335
|
-
*
|
|
336
|
-
* @private
|
|
337
|
-
* @param {string} string The string to inspect.
|
|
338
|
-
* @returns {number} Returns the index of the last non-whitespace character.
|
|
339
|
-
*/
|
|
340
|
-
function trimmedEndIndex(string) {
|
|
341
|
-
var index = string.length;
|
|
342
|
-
while (index-- && reWhitespace.test(string.charAt(index))) {}
|
|
343
|
-
return index;
|
|
344
|
-
}
|
|
345
|
-
var _trimmedEndIndex = trimmedEndIndex;
|
|
346
|
-
|
|
347
|
-
/**
|
|
348
|
-
* Removes trailing whitespace or specified characters from `string`.
|
|
349
|
-
*
|
|
350
|
-
* @static
|
|
351
|
-
* @memberOf _
|
|
352
|
-
* @since 4.0.0
|
|
353
|
-
* @category String
|
|
354
|
-
* @param {string} [string=''] The string to trim.
|
|
355
|
-
* @param {string} [chars=whitespace] The characters to trim.
|
|
356
|
-
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
357
|
-
* @returns {string} Returns the trimmed string.
|
|
358
|
-
* @example
|
|
359
|
-
*
|
|
360
|
-
* _.trimEnd(' abc ');
|
|
361
|
-
* // => ' abc'
|
|
362
|
-
*
|
|
363
|
-
* _.trimEnd('-_-abc-_-', '_-');
|
|
364
|
-
* // => '-_-abc'
|
|
365
|
-
*/
|
|
366
|
-
function trimEnd(string, chars, guard) {
|
|
367
|
-
string = toString_1(string);
|
|
368
|
-
if (string && (guard || chars === undefined)) {
|
|
369
|
-
return string.slice(0, _trimmedEndIndex(string) + 1);
|
|
370
|
-
}
|
|
371
|
-
if (!string || !(chars = _baseToString(chars))) {
|
|
372
|
-
return string;
|
|
373
|
-
}
|
|
374
|
-
var strSymbols = _stringToArray(string),
|
|
375
|
-
end = _charsEndIndex(strSymbols, _stringToArray(chars)) + 1;
|
|
376
|
-
return _castSlice(strSymbols, 0, end).join('');
|
|
377
|
-
}
|
|
378
|
-
var trimEnd_1 = trimEnd;
|
|
379
|
-
|
|
380
|
-
/** `Object#toString` result references. */
|
|
381
|
-
var stringTag = '[object String]';
|
|
382
|
-
|
|
383
|
-
/**
|
|
384
|
-
* Checks if `value` is classified as a `String` primitive or object.
|
|
385
|
-
*
|
|
386
|
-
* @static
|
|
387
|
-
* @since 0.1.0
|
|
388
|
-
* @memberOf _
|
|
389
|
-
* @category Lang
|
|
390
|
-
* @param {*} value The value to check.
|
|
391
|
-
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
|
|
392
|
-
* @example
|
|
393
|
-
*
|
|
394
|
-
* _.isString('abc');
|
|
395
|
-
* // => true
|
|
396
|
-
*
|
|
397
|
-
* _.isString(1);
|
|
398
|
-
* // => false
|
|
399
|
-
*/
|
|
400
|
-
function isString(value) {
|
|
401
|
-
return typeof value == 'string' || !isArray_1(value) && isObjectLike_1(value) && _baseGetTag(value) == stringTag;
|
|
402
|
-
}
|
|
403
|
-
var isString_1 = isString;
|
|
404
|
-
|
|
405
|
-
/**
|
|
406
|
-
* This method returns the first argument it receives.
|
|
407
|
-
*
|
|
408
|
-
* @static
|
|
409
|
-
* @since 0.1.0
|
|
410
|
-
* @memberOf _
|
|
411
|
-
* @category Util
|
|
412
|
-
* @param {*} value Any value.
|
|
413
|
-
* @returns {*} Returns `value`.
|
|
414
|
-
* @example
|
|
415
|
-
*
|
|
416
|
-
* var object = { 'a': 1 };
|
|
417
|
-
*
|
|
418
|
-
* console.log(_.identity(object) === object);
|
|
419
|
-
* // => true
|
|
420
|
-
*/
|
|
421
|
-
function identity(value) {
|
|
422
|
-
return value;
|
|
423
|
-
}
|
|
424
|
-
var identity_1 = identity;
|
|
425
|
-
|
|
426
|
-
/**
|
|
427
|
-
* A faster alternative to `Function#apply`, this function invokes `func`
|
|
428
|
-
* with the `this` binding of `thisArg` and the arguments of `args`.
|
|
429
|
-
*
|
|
430
|
-
* @private
|
|
431
|
-
* @param {Function} func The function to invoke.
|
|
432
|
-
* @param {*} thisArg The `this` binding of `func`.
|
|
433
|
-
* @param {Array} args The arguments to invoke `func` with.
|
|
434
|
-
* @returns {*} Returns the result of `func`.
|
|
435
|
-
*/
|
|
436
|
-
function apply(func, thisArg, args) {
|
|
437
|
-
switch (args.length) {
|
|
438
|
-
case 0:
|
|
439
|
-
return func.call(thisArg);
|
|
440
|
-
case 1:
|
|
441
|
-
return func.call(thisArg, args[0]);
|
|
442
|
-
case 2:
|
|
443
|
-
return func.call(thisArg, args[0], args[1]);
|
|
444
|
-
case 3:
|
|
445
|
-
return func.call(thisArg, args[0], args[1], args[2]);
|
|
446
|
-
}
|
|
447
|
-
return func.apply(thisArg, args);
|
|
448
|
-
}
|
|
449
|
-
var _apply = apply;
|
|
450
|
-
|
|
451
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
452
|
-
var nativeMax = Math.max;
|
|
453
|
-
|
|
454
|
-
/**
|
|
455
|
-
* A specialized version of `baseRest` which transforms the rest array.
|
|
456
|
-
*
|
|
457
|
-
* @private
|
|
458
|
-
* @param {Function} func The function to apply a rest parameter to.
|
|
459
|
-
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
|
460
|
-
* @param {Function} transform The rest array transform.
|
|
461
|
-
* @returns {Function} Returns the new function.
|
|
462
|
-
*/
|
|
463
|
-
function overRest(func, start, transform) {
|
|
464
|
-
start = nativeMax(start === undefined ? func.length - 1 : start, 0);
|
|
465
|
-
return function () {
|
|
466
|
-
var args = arguments,
|
|
467
|
-
index = -1,
|
|
468
|
-
length = nativeMax(args.length - start, 0),
|
|
469
|
-
array = Array(length);
|
|
470
|
-
while (++index < length) {
|
|
471
|
-
array[index] = args[start + index];
|
|
472
|
-
}
|
|
473
|
-
index = -1;
|
|
474
|
-
var otherArgs = Array(start + 1);
|
|
475
|
-
while (++index < start) {
|
|
476
|
-
otherArgs[index] = args[index];
|
|
477
|
-
}
|
|
478
|
-
otherArgs[start] = transform(array);
|
|
479
|
-
return _apply(func, this, otherArgs);
|
|
480
|
-
};
|
|
481
|
-
}
|
|
482
|
-
var _overRest = overRest;
|
|
483
|
-
|
|
484
|
-
/**
|
|
485
|
-
* Creates a function that returns `value`.
|
|
486
|
-
*
|
|
487
|
-
* @static
|
|
488
|
-
* @memberOf _
|
|
489
|
-
* @since 2.4.0
|
|
490
|
-
* @category Util
|
|
491
|
-
* @param {*} value The value to return from the new function.
|
|
492
|
-
* @returns {Function} Returns the new constant function.
|
|
493
|
-
* @example
|
|
494
|
-
*
|
|
495
|
-
* var objects = _.times(2, _.constant({ 'a': 1 }));
|
|
496
|
-
*
|
|
497
|
-
* console.log(objects);
|
|
498
|
-
* // => [{ 'a': 1 }, { 'a': 1 }]
|
|
499
|
-
*
|
|
500
|
-
* console.log(objects[0] === objects[1]);
|
|
501
|
-
* // => true
|
|
502
|
-
*/
|
|
503
|
-
function constant(value) {
|
|
504
|
-
return function () {
|
|
505
|
-
return value;
|
|
506
|
-
};
|
|
507
|
-
}
|
|
508
|
-
var constant_1 = constant;
|
|
509
|
-
|
|
510
|
-
var defineProperty = function () {
|
|
511
|
-
try {
|
|
512
|
-
var func = _getNative(Object, 'defineProperty');
|
|
513
|
-
func({}, '', {});
|
|
514
|
-
return func;
|
|
515
|
-
} catch (e) {}
|
|
516
|
-
}();
|
|
517
|
-
var _defineProperty = defineProperty;
|
|
518
|
-
|
|
519
|
-
/**
|
|
520
|
-
* The base implementation of `setToString` without support for hot loop shorting.
|
|
521
|
-
*
|
|
522
|
-
* @private
|
|
523
|
-
* @param {Function} func The function to modify.
|
|
524
|
-
* @param {Function} string The `toString` result.
|
|
525
|
-
* @returns {Function} Returns `func`.
|
|
526
|
-
*/
|
|
527
|
-
var baseSetToString = !_defineProperty ? identity_1 : function (func, string) {
|
|
528
|
-
return _defineProperty(func, 'toString', {
|
|
529
|
-
'configurable': true,
|
|
530
|
-
'enumerable': false,
|
|
531
|
-
'value': constant_1(string),
|
|
532
|
-
'writable': true
|
|
533
|
-
});
|
|
534
|
-
};
|
|
535
|
-
var _baseSetToString = baseSetToString;
|
|
536
|
-
|
|
537
|
-
/** Used to detect hot functions by number of calls within a span of milliseconds. */
|
|
538
|
-
var HOT_COUNT = 800,
|
|
539
|
-
HOT_SPAN = 16;
|
|
540
|
-
|
|
541
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
542
|
-
var nativeNow = Date.now;
|
|
543
|
-
|
|
544
|
-
/**
|
|
545
|
-
* Creates a function that'll short out and invoke `identity` instead
|
|
546
|
-
* of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
|
|
547
|
-
* milliseconds.
|
|
548
|
-
*
|
|
549
|
-
* @private
|
|
550
|
-
* @param {Function} func The function to restrict.
|
|
551
|
-
* @returns {Function} Returns the new shortable function.
|
|
552
|
-
*/
|
|
553
|
-
function shortOut(func) {
|
|
554
|
-
var count = 0,
|
|
555
|
-
lastCalled = 0;
|
|
556
|
-
return function () {
|
|
557
|
-
var stamp = nativeNow(),
|
|
558
|
-
remaining = HOT_SPAN - (stamp - lastCalled);
|
|
559
|
-
lastCalled = stamp;
|
|
560
|
-
if (remaining > 0) {
|
|
561
|
-
if (++count >= HOT_COUNT) {
|
|
562
|
-
return arguments[0];
|
|
563
|
-
}
|
|
564
|
-
} else {
|
|
565
|
-
count = 0;
|
|
566
|
-
}
|
|
567
|
-
return func.apply(undefined, arguments);
|
|
568
|
-
};
|
|
569
|
-
}
|
|
570
|
-
var _shortOut = shortOut;
|
|
571
|
-
|
|
572
|
-
/**
|
|
573
|
-
* Sets the `toString` method of `func` to return `string`.
|
|
574
|
-
*
|
|
575
|
-
* @private
|
|
576
|
-
* @param {Function} func The function to modify.
|
|
577
|
-
* @param {Function} string The `toString` result.
|
|
578
|
-
* @returns {Function} Returns `func`.
|
|
579
|
-
*/
|
|
580
|
-
var setToString = _shortOut(_baseSetToString);
|
|
581
|
-
var _setToString = setToString;
|
|
582
|
-
|
|
583
|
-
/**
|
|
584
|
-
* The base implementation of `_.rest` which doesn't validate or coerce arguments.
|
|
585
|
-
*
|
|
586
|
-
* @private
|
|
587
|
-
* @param {Function} func The function to apply a rest parameter to.
|
|
588
|
-
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
|
589
|
-
* @returns {Function} Returns the new function.
|
|
590
|
-
*/
|
|
591
|
-
function baseRest(func, start) {
|
|
592
|
-
return _setToString(_overRest(func, start, identity_1), func + '');
|
|
593
|
-
}
|
|
594
|
-
var _baseRest = baseRest;
|
|
595
|
-
|
|
596
|
-
/**
|
|
597
|
-
* This function is like `baseIndexOf` except that it accepts a comparator.
|
|
598
|
-
*
|
|
599
|
-
* @private
|
|
600
|
-
* @param {Array} array The array to inspect.
|
|
601
|
-
* @param {*} value The value to search for.
|
|
602
|
-
* @param {number} fromIndex The index to search from.
|
|
603
|
-
* @param {Function} comparator The comparator invoked per element.
|
|
604
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
605
|
-
*/
|
|
606
|
-
function baseIndexOfWith(array, value, fromIndex, comparator) {
|
|
607
|
-
var index = fromIndex - 1,
|
|
608
|
-
length = array.length;
|
|
609
|
-
while (++index < length) {
|
|
610
|
-
if (comparator(array[index], value)) {
|
|
611
|
-
return index;
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
return -1;
|
|
615
|
-
}
|
|
616
|
-
var _baseIndexOfWith = baseIndexOfWith;
|
|
617
|
-
|
|
618
|
-
/**
|
|
619
|
-
* Copies the values of `source` to `array`.
|
|
620
|
-
*
|
|
621
|
-
* @private
|
|
622
|
-
* @param {Array} source The array to copy values from.
|
|
623
|
-
* @param {Array} [array=[]] The array to copy values to.
|
|
624
|
-
* @returns {Array} Returns `array`.
|
|
625
|
-
*/
|
|
626
|
-
function copyArray(source, array) {
|
|
627
|
-
var index = -1,
|
|
628
|
-
length = source.length;
|
|
629
|
-
array || (array = Array(length));
|
|
630
|
-
while (++index < length) {
|
|
631
|
-
array[index] = source[index];
|
|
632
|
-
}
|
|
633
|
-
return array;
|
|
634
|
-
}
|
|
635
|
-
var _copyArray = copyArray;
|
|
636
|
-
|
|
637
|
-
/** Used for built-in method references. */
|
|
638
|
-
var arrayProto = Array.prototype;
|
|
639
|
-
|
|
640
|
-
/** Built-in value references. */
|
|
641
|
-
var splice = arrayProto.splice;
|
|
642
|
-
|
|
643
|
-
/**
|
|
644
|
-
* The base implementation of `_.pullAllBy` without support for iteratee
|
|
645
|
-
* shorthands.
|
|
646
|
-
*
|
|
647
|
-
* @private
|
|
648
|
-
* @param {Array} array The array to modify.
|
|
649
|
-
* @param {Array} values The values to remove.
|
|
650
|
-
* @param {Function} [iteratee] The iteratee invoked per element.
|
|
651
|
-
* @param {Function} [comparator] The comparator invoked per element.
|
|
652
|
-
* @returns {Array} Returns `array`.
|
|
653
|
-
*/
|
|
654
|
-
function basePullAll(array, values, iteratee, comparator) {
|
|
655
|
-
var indexOf = comparator ? _baseIndexOfWith : _baseIndexOf,
|
|
656
|
-
index = -1,
|
|
657
|
-
length = values.length,
|
|
658
|
-
seen = array;
|
|
659
|
-
if (array === values) {
|
|
660
|
-
values = _copyArray(values);
|
|
661
|
-
}
|
|
662
|
-
if (iteratee) {
|
|
663
|
-
seen = _arrayMap(array, _baseUnary(iteratee));
|
|
664
|
-
}
|
|
665
|
-
while (++index < length) {
|
|
666
|
-
var fromIndex = 0,
|
|
667
|
-
value = values[index],
|
|
668
|
-
computed = iteratee ? iteratee(value) : value;
|
|
669
|
-
while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
|
|
670
|
-
if (seen !== array) {
|
|
671
|
-
splice.call(seen, fromIndex, 1);
|
|
672
|
-
}
|
|
673
|
-
splice.call(array, fromIndex, 1);
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
return array;
|
|
677
|
-
}
|
|
678
|
-
var _basePullAll = basePullAll;
|
|
679
|
-
|
|
680
|
-
/**
|
|
681
|
-
* This method is like `_.pull` except that it accepts an array of values to remove.
|
|
682
|
-
*
|
|
683
|
-
* **Note:** Unlike `_.difference`, this method mutates `array`.
|
|
684
|
-
*
|
|
685
|
-
* @static
|
|
686
|
-
* @memberOf _
|
|
687
|
-
* @since 4.0.0
|
|
688
|
-
* @category Array
|
|
689
|
-
* @param {Array} array The array to modify.
|
|
690
|
-
* @param {Array} values The values to remove.
|
|
691
|
-
* @returns {Array} Returns `array`.
|
|
692
|
-
* @example
|
|
693
|
-
*
|
|
694
|
-
* var array = ['a', 'b', 'c', 'a', 'b', 'c'];
|
|
695
|
-
*
|
|
696
|
-
* _.pullAll(array, ['a', 'c']);
|
|
697
|
-
* console.log(array);
|
|
698
|
-
* // => ['b', 'b']
|
|
699
|
-
*/
|
|
700
|
-
function pullAll(array, values) {
|
|
701
|
-
return array && array.length && values && values.length ? _basePullAll(array, values) : array;
|
|
702
|
-
}
|
|
703
|
-
var pullAll_1 = pullAll;
|
|
704
|
-
|
|
705
|
-
/**
|
|
706
|
-
* Removes all given values from `array` using
|
|
707
|
-
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
708
|
-
* for equality comparisons.
|
|
709
|
-
*
|
|
710
|
-
* **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
|
|
711
|
-
* to remove elements from an array by predicate.
|
|
712
|
-
*
|
|
713
|
-
* @static
|
|
714
|
-
* @memberOf _
|
|
715
|
-
* @since 2.0.0
|
|
716
|
-
* @category Array
|
|
717
|
-
* @param {Array} array The array to modify.
|
|
718
|
-
* @param {...*} [values] The values to remove.
|
|
719
|
-
* @returns {Array} Returns `array`.
|
|
720
|
-
* @example
|
|
721
|
-
*
|
|
722
|
-
* var array = ['a', 'b', 'c', 'a', 'b', 'c'];
|
|
723
|
-
*
|
|
724
|
-
* _.pull(array, 'a', 'c');
|
|
725
|
-
* console.log(array);
|
|
726
|
-
* // => ['b', 'b']
|
|
727
|
-
*/
|
|
728
|
-
var pull = _baseRest(pullAll_1);
|
|
729
|
-
var pull_1 = pull;
|
|
730
|
-
|
|
731
|
-
var id = 0;
|
|
732
|
-
class Node {
|
|
733
|
-
constructor(data) {
|
|
734
|
-
this.id = ++id;
|
|
735
|
-
if (isArray_1(data)) {
|
|
736
|
-
this.open = data[0];
|
|
737
|
-
this.close = data[1];
|
|
738
|
-
} else if (isString_1(data)) {
|
|
739
|
-
this.text = data;
|
|
740
|
-
}
|
|
741
|
-
this.children = [];
|
|
742
|
-
}
|
|
743
|
-
append(e) {
|
|
744
|
-
if (!(e instanceof Node)) {
|
|
745
|
-
e = new Node(e);
|
|
746
|
-
}
|
|
747
|
-
if (e._parent) {
|
|
748
|
-
pull_1(e._parent.children, e);
|
|
749
|
-
}
|
|
750
|
-
e._parent = this;
|
|
751
|
-
this.children = this.children.concat(e);
|
|
752
|
-
}
|
|
753
|
-
render() {
|
|
754
|
-
var text = '';
|
|
755
|
-
if (this.open) {
|
|
756
|
-
text += this.open;
|
|
757
|
-
}
|
|
758
|
-
if (this.text) {
|
|
759
|
-
text += this.text;
|
|
760
|
-
}
|
|
761
|
-
for (var i = 0; i < this.children.length; i++) {
|
|
762
|
-
text += this.children[i].render();
|
|
763
|
-
}
|
|
764
|
-
if (this.close) {
|
|
765
|
-
text += this.close;
|
|
766
|
-
}
|
|
767
|
-
return text;
|
|
768
|
-
}
|
|
769
|
-
parent() {
|
|
770
|
-
return this._parent;
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
var Node_1 = Node;
|
|
774
|
-
|
|
775
|
-
const encodeLink = link => encodeURI(link).replace(/\(/i, "%28").replace(/\)/i, "%29").replace(/(\?|&)response-content-disposition=attachment.*$/, "");
|
|
776
|
-
var URL = {
|
|
777
|
-
encodeLink
|
|
778
|
-
};
|
|
779
|
-
|
|
780
|
-
const {
|
|
781
|
-
encodeLink: encodeLink$1
|
|
782
|
-
} = URL;
|
|
783
|
-
var fromDelta_converters = {
|
|
784
|
-
embed: {
|
|
785
|
-
image: function (src) {
|
|
786
|
-
this.append(' + ')');
|
|
787
|
-
},
|
|
788
|
-
// Not a default Quill feature, converts custom divider embed blot added when
|
|
789
|
-
// creating quill editor instance.
|
|
790
|
-
// See https://quilljs.com/guides/cloning-medium-with-parchment/#dividers
|
|
791
|
-
thematic_break: function () {
|
|
792
|
-
this.open = '\n---\n' + this.open;
|
|
793
|
-
}
|
|
794
|
-
},
|
|
795
|
-
inline: {
|
|
796
|
-
italic: function () {
|
|
797
|
-
return ['_', '_'];
|
|
798
|
-
},
|
|
799
|
-
bold: function () {
|
|
800
|
-
return ['**', '**'];
|
|
801
|
-
},
|
|
802
|
-
link: function (url) {
|
|
803
|
-
return ['[', '](' + url + ')'];
|
|
804
|
-
}
|
|
805
|
-
},
|
|
806
|
-
block: {
|
|
807
|
-
'header': function ({
|
|
808
|
-
header
|
|
809
|
-
}) {
|
|
810
|
-
this.open = '#'.repeat(header) + ' ' + this.open;
|
|
811
|
-
},
|
|
812
|
-
blockquote: function () {
|
|
813
|
-
this.open = '> ' + this.open;
|
|
814
|
-
},
|
|
815
|
-
'list': {
|
|
816
|
-
group: function () {
|
|
817
|
-
return new Node_1(['', '\n']);
|
|
818
|
-
},
|
|
819
|
-
line: function (attrs, group) {
|
|
820
|
-
if (attrs.list === 'bullet') {
|
|
821
|
-
this.open = '- ' + this.open;
|
|
822
|
-
} else if (attrs.list === "checked") {
|
|
823
|
-
this.open = '- [x] ' + this.open;
|
|
824
|
-
} else if (attrs.list === "unchecked") {
|
|
825
|
-
this.open = '- [ ] ' + this.open;
|
|
826
|
-
} else if (attrs.list === 'ordered') {
|
|
827
|
-
group.count = group.count || 0;
|
|
828
|
-
var count = ++group.count;
|
|
829
|
-
this.open = count + '. ' + this.open;
|
|
830
|
-
}
|
|
831
|
-
}
|
|
832
|
-
}
|
|
833
|
-
}
|
|
834
|
-
};
|
|
835
|
-
|
|
836
|
-
var fromDelta = createCommonjsModule(function (module, exports) {
|
|
837
|
-
module.exports = function (ops, converters = fromDelta_converters) {
|
|
838
|
-
return trimEnd_1(convert(ops, converters).render()) + '\n';
|
|
839
|
-
};
|
|
840
|
-
function convert(ops, converters) {
|
|
841
|
-
var group, line, el, activeInline, beginningOfLine;
|
|
842
|
-
var root = new Node_1();
|
|
843
|
-
function newLine() {
|
|
844
|
-
el = line = new Node_1(['', '\n']);
|
|
845
|
-
root.append(line);
|
|
846
|
-
activeInline = {};
|
|
847
|
-
}
|
|
848
|
-
newLine();
|
|
849
|
-
for (var i = 0; i < ops.length; i++) {
|
|
850
|
-
var op = ops[i];
|
|
851
|
-
if (isObject_1(op.insert)) {
|
|
852
|
-
for (var k in op.insert) {
|
|
853
|
-
if (converters.embed[k]) {
|
|
854
|
-
applyInlineAttributes(op.attributes);
|
|
855
|
-
converters.embed[k].call(el, op.insert[k], op.attributes);
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
} else {
|
|
859
|
-
var lines = op.insert.split('\n');
|
|
860
|
-
if (hasBlockLevelAttribute(op.attributes, converters)) {
|
|
861
|
-
// Some line-level styling (ie headings) is applied by inserting a \n
|
|
862
|
-
// with the style; the style applies back to the previous \n.
|
|
863
|
-
// There *should* only be one style in an insert operation.
|
|
864
|
-
|
|
865
|
-
for (var j = 1; j < lines.length; j++) {
|
|
866
|
-
for (var attr in op.attributes) {
|
|
867
|
-
if (converters.block[attr]) {
|
|
868
|
-
var fn = converters.block[attr];
|
|
869
|
-
if (typeof fn === 'object') {
|
|
870
|
-
if (group && group.type !== attr) {
|
|
871
|
-
group = null;
|
|
872
|
-
}
|
|
873
|
-
if (!group && fn.group) {
|
|
874
|
-
group = {
|
|
875
|
-
el: fn.group(),
|
|
876
|
-
type: attr,
|
|
877
|
-
value: op.attributes[k],
|
|
878
|
-
distance: 0
|
|
879
|
-
};
|
|
880
|
-
root.append(group.el);
|
|
881
|
-
}
|
|
882
|
-
if (group) {
|
|
883
|
-
group.el.append(line);
|
|
884
|
-
group.distance = 0;
|
|
885
|
-
}
|
|
886
|
-
fn = fn.line;
|
|
887
|
-
}
|
|
888
|
-
fn.call(line, op.attributes, group);
|
|
889
|
-
newLine();
|
|
890
|
-
break;
|
|
891
|
-
}
|
|
892
|
-
}
|
|
893
|
-
}
|
|
894
|
-
beginningOfLine = true;
|
|
895
|
-
} else {
|
|
896
|
-
for (var l = 0; l < lines.length; l++) {
|
|
897
|
-
if ((l > 0 || beginningOfLine) && group && ++group.distance >= 2) {
|
|
898
|
-
group = null;
|
|
899
|
-
}
|
|
900
|
-
applyInlineAttributes(op.attributes, ops[i + 1] && ops[i + 1].attributes);
|
|
901
|
-
el.append(lines[l]);
|
|
902
|
-
if (l < lines.length - 1) {
|
|
903
|
-
newLine();
|
|
904
|
-
}
|
|
905
|
-
}
|
|
906
|
-
beginningOfLine = false;
|
|
907
|
-
}
|
|
908
|
-
}
|
|
909
|
-
}
|
|
910
|
-
return root;
|
|
911
|
-
function applyInlineAttributes(attrs, next) {
|
|
912
|
-
var first = [],
|
|
913
|
-
then = [];
|
|
914
|
-
attrs = attrs || {};
|
|
915
|
-
var tag = el,
|
|
916
|
-
seen = {};
|
|
917
|
-
while (tag._format) {
|
|
918
|
-
seen[tag._format] = true;
|
|
919
|
-
if (!attrs[tag._format]) {
|
|
920
|
-
for (var k in seen) {
|
|
921
|
-
delete activeInline[k];
|
|
922
|
-
}
|
|
923
|
-
el = tag.parent();
|
|
924
|
-
}
|
|
925
|
-
tag = tag.parent();
|
|
926
|
-
}
|
|
927
|
-
for (var attr in attrs) {
|
|
928
|
-
if (converters.inline[attr]) {
|
|
929
|
-
if (activeInline[attr]) {
|
|
930
|
-
if (activeInline[attr] === attrs[attr]) {
|
|
931
|
-
continue; // do nothing -- we should already be inside this style's tag
|
|
932
|
-
}
|
|
933
|
-
}
|
|
934
|
-
|
|
935
|
-
if (next && attrs[attr] === next[attr]) {
|
|
936
|
-
first.push(attr); // if the next operation has the same style, this should be the outermost tag
|
|
937
|
-
} else {
|
|
938
|
-
then.push(attr);
|
|
939
|
-
}
|
|
940
|
-
activeInline[attr] = attrs[attr];
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
|
-
first.forEach(apply);
|
|
944
|
-
then.forEach(apply);
|
|
945
|
-
function apply(fmt) {
|
|
946
|
-
var newEl = converters.inline[fmt].call(null, attrs[fmt]);
|
|
947
|
-
if (isArray_1(newEl)) {
|
|
948
|
-
newEl = new Node_1(newEl);
|
|
949
|
-
}
|
|
950
|
-
newEl._format = fmt;
|
|
951
|
-
el.append(newEl);
|
|
952
|
-
el = newEl;
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
}
|
|
956
|
-
function hasBlockLevelAttribute(attrs, converters) {
|
|
957
|
-
for (var k in attrs) {
|
|
958
|
-
if (Object.keys(converters.block).includes(k)) {
|
|
959
|
-
return true;
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
|
-
return false;
|
|
963
|
-
}
|
|
964
|
-
});
|
|
965
|
-
|
|
966
|
-
var quillDeltaToMarkdown = {
|
|
967
|
-
deltaToMarkdown: fromDelta
|
|
968
|
-
};
|
|
969
|
-
|
|
970
|
-
export default quillDeltaToMarkdown;
|
|
971
|
-
//# sourceMappingURL=quill-delta-to-markdown.js.map
|