npm-pkg-hook 1.1.5 → 1.1.9
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/.eslintrc.js +19 -113
- package/.eslintrc.json +127 -108
- package/.github/pull_request_template.md +17 -17
- package/.github/workflows/pepeline.yaml +29 -29
- package/next.config.js +2 -5
- package/package.json +27 -24
- package/script.txt +6 -6
- package/src/config/client/errors.js +14 -14
- package/src/config/client/index.js +1 -1
- package/src/hooks/getCategoriesWithProduct/helpers/index.js +7 -0
- package/src/hooks/getCategoriesWithProduct/index.js +62 -0
- package/src/hooks/getSession/index.js +18 -18
- package/src/hooks/index.js +13 -9
- package/src/hooks/useAcumulateDate/index.js +1 -1
- package/src/hooks/useAnimationFrame/index.js +45 -45
- package/src/hooks/useAsideCart/helpers/index.js +22 -0
- package/src/hooks/useAsideCart/index.js +156 -0
- package/src/hooks/useAsideCart/queries.js +10 -0
- package/src/hooks/useBanner/index.js +11 -11
- package/src/hooks/useCart/index.js +2 -0
- package/src/hooks/useCart/queries.js +164 -0
- package/src/hooks/useCart/useCart/helpers/index.js +75 -0
- package/src/hooks/useCart/useCart/index.js +411 -0
- package/src/hooks/useCart/useGetCart/index.js +31 -0
- package/src/hooks/useCatWithProduct/index.js +15 -15
- package/src/hooks/useCatWithProduct/queries.js +1 -1
- package/src/hooks/useCatWithProductClient/index.js +48 -0
- package/src/hooks/useCatWithProductClient/queries.js +55 -0
- package/src/hooks/useCategoriesProduct/index.js +12 -12
- package/src/hooks/useCategoriesProduct/queries.js +16 -16
- package/src/hooks/useCategoryInStore/index.js +39 -36
- package/src/hooks/useCategoryInStore/queries.js +78 -78
- package/src/hooks/useCategoryStore/index.js +2 -2
- package/src/hooks/useChartData/index.js +159 -156
- package/src/hooks/useChartData/useChartData/index.js +199 -197
- package/src/hooks/useChartData/useChartDataAllOrders/index.js +94 -94
- package/src/hooks/useCheckbox/index.js +115 -115
- package/src/hooks/useClients/index.js +12 -14
- package/src/hooks/useClients/queries.js +1 -1
- package/src/hooks/useConnection/index.js +20 -21
- package/src/hooks/useCreateProduct/helpers/useEditImageProduct/index.js +6 -2
- package/src/hooks/useCreateProduct/index.js +22 -19
- package/src/hooks/useDeleteSubProductOptional/index.js +31 -30
- package/src/hooks/useDeleteSubProductOptional/queries.js +10 -10
- package/src/hooks/useDessert/helpers/index.js +51 -51
- package/src/hooks/useDessert/index.js +56 -65
- package/src/hooks/useDevices/index.js +35 -36
- package/src/hooks/useDevices/queries.js +19 -19
- package/src/hooks/useDropzone/index.js +94 -79
- package/src/hooks/useDynamicAuth/index.js +13 -13
- package/src/hooks/useDynamicAuth/queries.js +24 -24
- package/src/hooks/useEmployee/queries.js +1 -1
- package/src/hooks/useEvent/index.js +33 -33
- package/src/hooks/useFavoriteStores/index.js +19 -0
- package/src/hooks/useFavoriteStores/queries.js +47 -0
- package/src/hooks/useFetchJson/index.js +25 -25
- package/src/hooks/useFingerprintjs/index.js +172 -176
- package/src/hooks/useFormTools/index.js +12 -11
- package/src/hooks/useFormatDate/index.js +20 -21
- package/src/hooks/useFormatNumberPhone/index.js +9 -9
- package/src/hooks/useFullScreenMode/index.js +65 -65
- package/src/hooks/useGenerateNumberArray/index.js +17 -17
- package/src/hooks/useGetExtProductFoodsSubOptionalAll/index.js +14 -0
- package/src/hooks/useGetFoodRecomended/index.js +33 -0
- package/src/hooks/useGetFoodRecomended/queries.js +47 -0
- package/src/hooks/useGetMinPrice/index.js +8 -0
- package/src/hooks/useGetMinPrice/queries.js +7 -0
- package/src/hooks/useGetOneStoreRating/index.js +40 -0
- package/src/hooks/useGetOneStoreRating/queries.js +18 -0
- package/src/hooks/useGoogleLogin/index.js +160 -161
- package/src/hooks/useHover/index.js +29 -29
- package/src/hooks/useImageOptimization/index.js +15 -15
- package/src/hooks/useImageWeight/index.js +18 -19
- package/src/hooks/useImagesStore/index.js +139 -140
- package/src/hooks/useImagesStore/queries.js +19 -18
- package/src/hooks/useInnerHtml/index.js +39 -38
- package/src/hooks/useIntersection/index.js +4 -4
- package/src/hooks/useKeypress/index.js +28 -28
- package/src/hooks/useLazyScript/index.js +35 -36
- package/src/hooks/useLocalSorage/index.js +2 -2
- package/src/hooks/useLocationNavigate/index.js +54 -54
- package/src/hooks/useLogout/index.js +24 -24
- package/src/hooks/useManageQueryParams/index.js +36 -37
- package/src/hooks/useMobile/index.js +39 -38
- package/src/hooks/useMutateHeight/index.js +15 -16
- package/src/hooks/useOrderClient/index.js +5 -0
- package/src/hooks/useOrders/index.js +10 -16
- package/src/hooks/useOrders/queries.js +1 -1
- package/src/hooks/useProductsFood/index.js +32 -32
- package/src/hooks/useProductsFood/queriesStore.js +49 -48
- package/src/hooks/useProductsFood/useEditProduct.js +2 -4
- package/src/hooks/useProductsFood/usetagsProducts.js +83 -83
- package/src/hooks/useProviders/index.js +3 -3
- package/src/hooks/useProviders/queries.js +31 -31
- package/src/hooks/useProviders/useProvidersCreateStore/index.js +12 -13
- package/src/hooks/useProviders/useProvidersDataStore/index.js +24 -24
- package/src/hooks/useProvidersStore/index.js +24 -24
- package/src/hooks/useProvidersStore/queries.js +31 -31
- package/src/hooks/useRatingArrayData/index.js +54 -0
- package/src/hooks/{useRatingData → useRatingArrayData}/queries.js +19 -18
- package/src/hooks/useReactToPrint/index.js +1120 -1098
- package/src/hooks/useRemoveExtraProductFoodsOptional/index.js +23 -23
- package/src/hooks/useRemoveExtraProductFoodsOptional/queries.js +48 -48
- package/src/hooks/useReport/index.js +9 -9
- package/src/hooks/useReport/queries.js +1 -1
- package/src/hooks/useRestaurant/index.js +19 -19
- package/src/hooks/useRestaurant/queries.js +80 -80
- package/src/hooks/useSales/index.js +476 -451
- package/src/hooks/useSales/queries.js +14 -15
- package/src/hooks/useSales/useGetAllSales/index.js +25 -25
- package/src/hooks/useSales/useTotalSales.js +18 -18
- package/src/hooks/useSaveAvailableProduct/helpers/index.js +29 -29
- package/src/hooks/useSaveAvailableProduct/index.js +16 -16
- package/src/hooks/useSaveAvailableProduct/queries.js +1 -1
- package/src/hooks/useSchedule/index.js +33 -36
- package/src/hooks/useSchedule/index.jsx +22 -22
- package/src/hooks/useSchedule/queries.js +34 -35
- package/src/hooks/useScheduleData/index.js +123 -171
- package/src/hooks/useScroll/index.js +56 -57
- package/src/hooks/useScrollRotate/index.js +16 -14
- package/src/hooks/useSetSession/index.js +16 -16
- package/src/hooks/useSetState/index.js +3 -3
- package/src/hooks/useStatusOpenStore/helpers/index.js +101 -102
- package/src/hooks/useStatusOpenStore/index.js +172 -173
- package/src/hooks/useStatusOrdersClient/helpers/index.js +14 -0
- package/src/hooks/useStatusOrdersClient/index.js +17 -0
- package/src/hooks/useStatusOrdersClient/queries.js +80 -0
- package/src/hooks/useStore/index.js +40 -25
- package/src/hooks/useStore/queries.js +162 -136
- package/src/hooks/useStoreCalendar/index.js +5 -7
- package/src/hooks/useStoreContacts/index.js +16 -16
- package/src/hooks/useStoreContacts/queries.js +1 -1
- package/src/hooks/useTimeAgo/useTimeAgo.js +39 -39
- package/src/hooks/useUpdateCart/index.js +34 -28
- package/src/hooks/useUpdateExistingOrders/index.js +35 -35
- package/src/hooks/useUpdateExtProductFoodsSubOptional/index.js +38 -37
- package/src/hooks/useUser/index.js +1 -1
- package/src/hooks/useUser/queries.js +1 -1
- package/src/hooks/useWindowSize/index.js +38 -38
- package/src/mock/dessert/index.js +16 -16
- package/src/mock/index.js +1 -2
- package/src/utils/index.js +42 -45
- package/src/hooks/useRatingData/index.js +0 -53
- package/src/hooks/useSalesClient/index.js +0 -1
|
@@ -1,1201 +1,1223 @@
|
|
|
1
|
+
/* eslint-disable no-proto */
|
|
2
|
+
/* eslint-disable no-undef */
|
|
3
|
+
/* eslint-disable promise/param-names */
|
|
4
|
+
/* eslint-disable no-cond-assign */
|
|
5
|
+
/* eslint-disable no-use-before-define */
|
|
6
|
+
/* eslint-disable no-unsafe-finally */
|
|
7
|
+
/* eslint-disable no-redeclare */
|
|
8
|
+
/* eslint-disable new-cap */
|
|
9
|
+
/* eslint-disable no-var */
|
|
10
|
+
/* eslint-disable no-void */
|
|
11
|
+
/* eslint-disable no-sequences */
|
|
12
|
+
/* eslint-disable no-unused-expressions */
|
|
1
13
|
!(function (e, t) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
? define(
|
|
6
|
-
:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
14
|
+
typeof exports === 'object' && typeof module === 'object'
|
|
15
|
+
? (module.exports = t(require('react'), require('react-dom')))
|
|
16
|
+
: typeof define === 'function' && define.amd
|
|
17
|
+
? define('lib', ['react', 'react-dom'], t)
|
|
18
|
+
: typeof exports === 'object'
|
|
19
|
+
? (exports.lib = t(require('react'), require('react-dom')))
|
|
20
|
+
: (e.lib = t(e.react, e['react-dom']))
|
|
21
|
+
})(typeof self !== 'undefined' ? self : this, function (e, t) {
|
|
22
|
+
return (function () {
|
|
23
|
+
'use strict'
|
|
24
|
+
const n = {
|
|
25
|
+
655: function (e, t, n) {
|
|
26
|
+
n.r(t),
|
|
27
|
+
n.d(t, {
|
|
28
|
+
__assign: function () {
|
|
29
|
+
return i
|
|
30
|
+
},
|
|
31
|
+
__asyncDelegator: function () {
|
|
32
|
+
return E
|
|
33
|
+
},
|
|
34
|
+
__asyncGenerator: function () {
|
|
35
|
+
return x
|
|
36
|
+
},
|
|
37
|
+
__asyncValues: function () {
|
|
38
|
+
return S
|
|
39
|
+
},
|
|
40
|
+
__await: function () {
|
|
41
|
+
return O
|
|
42
|
+
},
|
|
43
|
+
__awaiter: function () {
|
|
44
|
+
return h
|
|
45
|
+
},
|
|
46
|
+
__classPrivateFieldGet: function () {
|
|
47
|
+
return k
|
|
48
|
+
},
|
|
49
|
+
__classPrivateFieldIn: function () {
|
|
50
|
+
return R
|
|
51
|
+
},
|
|
52
|
+
__classPrivateFieldSet: function () {
|
|
53
|
+
return M
|
|
54
|
+
},
|
|
55
|
+
__createBinding: function () {
|
|
56
|
+
return g
|
|
57
|
+
},
|
|
58
|
+
__decorate: function () {
|
|
59
|
+
return c
|
|
60
|
+
},
|
|
61
|
+
__esDecorate: function () {
|
|
62
|
+
return u
|
|
63
|
+
},
|
|
64
|
+
__exportStar: function () {
|
|
65
|
+
return b
|
|
66
|
+
},
|
|
67
|
+
__extends: function () {
|
|
68
|
+
return o
|
|
69
|
+
},
|
|
70
|
+
__generator: function () {
|
|
71
|
+
return y
|
|
72
|
+
},
|
|
73
|
+
__importDefault: function () {
|
|
74
|
+
return C
|
|
75
|
+
},
|
|
76
|
+
__importStar: function () {
|
|
77
|
+
return A
|
|
78
|
+
},
|
|
79
|
+
__makeTemplateObject: function () {
|
|
80
|
+
return j
|
|
81
|
+
},
|
|
82
|
+
__metadata: function () {
|
|
83
|
+
return p
|
|
84
|
+
},
|
|
85
|
+
__param: function () {
|
|
86
|
+
return l
|
|
87
|
+
},
|
|
88
|
+
__propKey: function () {
|
|
89
|
+
return f
|
|
90
|
+
},
|
|
91
|
+
__read: function () {
|
|
92
|
+
return m
|
|
93
|
+
},
|
|
94
|
+
__rest: function () {
|
|
95
|
+
return a
|
|
96
|
+
},
|
|
97
|
+
__runInitializers: function () {
|
|
98
|
+
return s
|
|
99
|
+
},
|
|
100
|
+
__setFunctionName: function () {
|
|
101
|
+
return d
|
|
102
|
+
},
|
|
103
|
+
__spread: function () {
|
|
104
|
+
return w
|
|
105
|
+
},
|
|
106
|
+
__spreadArray: function () {
|
|
107
|
+
return P
|
|
108
|
+
},
|
|
109
|
+
__spreadArrays: function () {
|
|
110
|
+
return _
|
|
111
|
+
},
|
|
112
|
+
__values: function () {
|
|
113
|
+
return v
|
|
114
|
+
}
|
|
115
|
+
})
|
|
116
|
+
let r = function (e, t) {
|
|
117
|
+
return (
|
|
118
|
+
(r =
|
|
107
119
|
Object.setPrototypeOf ||
|
|
108
120
|
({ __proto__: [] } instanceof Array &&
|
|
109
121
|
function (e, t) {
|
|
110
|
-
e.__proto__ = t
|
|
122
|
+
e.__proto__ = t
|
|
111
123
|
}) ||
|
|
112
124
|
function (e, t) {
|
|
113
|
-
for (
|
|
114
|
-
Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
125
|
+
for (const n in t) { Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]) }
|
|
115
126
|
}),
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
127
|
+
r(e, t)
|
|
128
|
+
)
|
|
129
|
+
}
|
|
130
|
+
function o (e, t) {
|
|
131
|
+
if (typeof t !== 'function' && t !== null) {
|
|
132
|
+
throw new TypeError(
|
|
133
|
+
'Class extends value ' +
|
|
123
134
|
String(t) +
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
135
|
+
' is not a constructor or null'
|
|
136
|
+
)
|
|
137
|
+
}
|
|
138
|
+
function n () {
|
|
139
|
+
this.constructor = e
|
|
140
|
+
}
|
|
141
|
+
r(e, t),
|
|
142
|
+
(e.prototype =
|
|
143
|
+
t === null
|
|
132
144
|
? Object.create(t)
|
|
133
|
-
: ((n.prototype = t.prototype), new n()))
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
145
|
+
: ((n.prototype = t.prototype), new n()))
|
|
146
|
+
}
|
|
147
|
+
var i = function () {
|
|
148
|
+
return (
|
|
149
|
+
(i =
|
|
138
150
|
Object.assign ||
|
|
139
151
|
function (e) {
|
|
140
|
-
for (var t, n = 1, r = arguments.length; n < r; n++)
|
|
141
|
-
for (
|
|
152
|
+
for (var t, n = 1, r = arguments.length; n < r; n++) {
|
|
153
|
+
for (const o in (t = arguments[n])) {
|
|
142
154
|
Object.prototype.hasOwnProperty.call(t, o) &&
|
|
143
|
-
(e[o] = t[o])
|
|
144
|
-
|
|
155
|
+
(e[o] = t[o])
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return e
|
|
145
159
|
}),
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
160
|
+
i.apply(this, arguments)
|
|
161
|
+
)
|
|
162
|
+
}
|
|
163
|
+
function a (e, t) {
|
|
164
|
+
const n = {}
|
|
165
|
+
for (var r in e) {
|
|
166
|
+
Object.prototype.hasOwnProperty.call(e, r) &&
|
|
153
167
|
t.indexOf(r) < 0 &&
|
|
154
|
-
(n[r] = e[r])
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
168
|
+
(n[r] = e[r])
|
|
169
|
+
}
|
|
170
|
+
if (
|
|
171
|
+
e != null &&
|
|
172
|
+
typeof Object.getOwnPropertySymbols === 'function'
|
|
173
|
+
) {
|
|
174
|
+
let o = 0
|
|
175
|
+
for (r = Object.getOwnPropertySymbols(e); o < r.length; o++) {
|
|
176
|
+
t.indexOf(r[o]) < 0 &&
|
|
162
177
|
Object.prototype.propertyIsEnumerable.call(e, r[o]) &&
|
|
163
|
-
(n[r[o]] = e[r[o]])
|
|
164
|
-
}
|
|
165
|
-
return n;
|
|
178
|
+
(n[r[o]] = e[r[o]])
|
|
166
179
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
180
|
+
}
|
|
181
|
+
return n
|
|
182
|
+
}
|
|
183
|
+
function c (e, t, n, r) {
|
|
184
|
+
let o
|
|
185
|
+
const i = arguments.length
|
|
186
|
+
let a =
|
|
171
187
|
i < 3
|
|
172
188
|
? t
|
|
173
|
-
:
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
(o = e[c]) &&
|
|
184
|
-
(a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
|
|
185
|
-
return i > 3 && a && Object.defineProperty(t, n, a), a;
|
|
189
|
+
: r === null
|
|
190
|
+
? (r = Object.getOwnPropertyDescriptor(t, n))
|
|
191
|
+
: r
|
|
192
|
+
if (
|
|
193
|
+
typeof Reflect === 'object' &&
|
|
194
|
+
typeof Reflect.decorate === 'function'
|
|
195
|
+
) { a = Reflect.decorate(e, t, n, r) } else {
|
|
196
|
+
for (let c = e.length - 1; c >= 0; c--) {
|
|
197
|
+
(o = e[c]) &&
|
|
198
|
+
(a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a)
|
|
186
199
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
var g = (0, n[p])(
|
|
220
|
-
"accessor" === l ? { get: f.get, set: f.set } : f[u],
|
|
221
|
-
h
|
|
222
|
-
);
|
|
223
|
-
if ("accessor" === l) {
|
|
224
|
-
if (void 0 === g) continue;
|
|
225
|
-
if (null === g || "object" != typeof g)
|
|
226
|
-
throw new TypeError("Object expected");
|
|
227
|
-
(c = a(g.get)) && (f.get = c),
|
|
228
|
-
(c = a(g.set)) && (f.set = c),
|
|
229
|
-
(c = a(g.init)) && o.push(c);
|
|
230
|
-
} else (c = a(g)) && ("field" === l ? o.push(c) : (f[u] = c));
|
|
200
|
+
}
|
|
201
|
+
return i > 3 && a && Object.defineProperty(t, n, a), a
|
|
202
|
+
}
|
|
203
|
+
function l (e, t) {
|
|
204
|
+
return function (n, r) {
|
|
205
|
+
t(n, r, e)
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
function u (e, t, n, r, o, i) {
|
|
209
|
+
function a (e) {
|
|
210
|
+
if (void 0 !== e && typeof e !== 'function') { throw new TypeError('Function expected') }
|
|
211
|
+
return e
|
|
212
|
+
}
|
|
213
|
+
for (
|
|
214
|
+
var c,
|
|
215
|
+
l = r.kind,
|
|
216
|
+
u = l === 'getter' ? 'get' : l === 'setter' ? 'set' : 'value',
|
|
217
|
+
s = !t && e ? (r.static ? e : e.prototype) : null,
|
|
218
|
+
f = t || (s ? Object.getOwnPropertyDescriptor(s, r.name) : {}),
|
|
219
|
+
d = !1,
|
|
220
|
+
p = n.length - 1;
|
|
221
|
+
p >= 0;
|
|
222
|
+
p--
|
|
223
|
+
) {
|
|
224
|
+
const h = {}
|
|
225
|
+
for (var y in r) h[y] = y === 'access' ? {} : r[y]
|
|
226
|
+
for (var y in r.access) h.access[y] = r.access[y]
|
|
227
|
+
h.addInitializer = function (e) {
|
|
228
|
+
if (d) {
|
|
229
|
+
throw new TypeError(
|
|
230
|
+
'Cannot add initializers after decoration has completed'
|
|
231
|
+
)
|
|
231
232
|
}
|
|
232
|
-
|
|
233
|
-
}
|
|
234
|
-
function s(e, t, n) {
|
|
235
|
-
for (var r = arguments.length > 2, o = 0; o < t.length; o++)
|
|
236
|
-
n = r ? t[o].call(e, n) : t[o].call(e);
|
|
237
|
-
return r ? n : void 0;
|
|
238
|
-
}
|
|
239
|
-
function f(e) {
|
|
240
|
-
return "symbol" == typeof e ? e : "".concat(e);
|
|
233
|
+
i.push(a(e || null))
|
|
241
234
|
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
)
|
|
235
|
+
const g = (0, n[p])(
|
|
236
|
+
l === 'accessor' ? { get: f.get, set: f.set } : f[u],
|
|
237
|
+
h
|
|
238
|
+
)
|
|
239
|
+
if (l === 'accessor') {
|
|
240
|
+
if (void 0 === g) continue
|
|
241
|
+
if (g === null || typeof g !== 'object') { throw new TypeError('Object expected') }
|
|
242
|
+
(c = a(g.get)) && (f.get = c),
|
|
243
|
+
(c = a(g.set)) && (f.set = c),
|
|
244
|
+
(c = a(g.init)) && o.push(c)
|
|
245
|
+
} else (c = a(g)) && (l === 'field' ? o.push(c) : (f[u] = c))
|
|
246
|
+
}
|
|
247
|
+
s && Object.defineProperty(s, r.name, f), (d = !0)
|
|
248
|
+
}
|
|
249
|
+
function s (e, t, n) {
|
|
250
|
+
for (var r = arguments.length > 2, o = 0; o < t.length; o++) { n = r ? t[o].call(e, n) : t[o].call(e) }
|
|
251
|
+
return r ? n : void 0
|
|
252
|
+
}
|
|
253
|
+
function f (e) {
|
|
254
|
+
return typeof e === 'symbol' ? e : ''.concat(e)
|
|
255
|
+
}
|
|
256
|
+
function d (e, t, n) {
|
|
257
|
+
return (
|
|
258
|
+
typeof t === 'symbol' &&
|
|
259
|
+
(t = t.description ? '['.concat(t.description, ']') : ''),
|
|
260
|
+
Object.defineProperty(e, 'name', {
|
|
261
|
+
configurable: !0,
|
|
262
|
+
value: n ? ''.concat(n, ' ', t) : t
|
|
263
|
+
})
|
|
264
|
+
)
|
|
265
|
+
}
|
|
266
|
+
function p (e, t) {
|
|
267
|
+
if (
|
|
268
|
+
typeof Reflect === 'object' &&
|
|
269
|
+
typeof Reflect.metadata === 'function'
|
|
270
|
+
) { return Reflect.metadata(e, t) }
|
|
271
|
+
}
|
|
272
|
+
function h (e, t, n, r) {
|
|
273
|
+
return new (n || (n = Promise))(function (o, i) {
|
|
274
|
+
function a (e) {
|
|
275
|
+
try {
|
|
276
|
+
l(r.next(e))
|
|
277
|
+
} catch (e) {
|
|
278
|
+
i(e)
|
|
279
|
+
}
|
|
251
280
|
}
|
|
252
|
-
function
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
281
|
+
function c (e) {
|
|
282
|
+
try {
|
|
283
|
+
l(r.throw(e))
|
|
284
|
+
} catch (e) {
|
|
285
|
+
i(e)
|
|
286
|
+
}
|
|
258
287
|
}
|
|
259
|
-
function
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
try {
|
|
270
|
-
l(r.throw(e));
|
|
271
|
-
} catch (e) {
|
|
272
|
-
i(e);
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
function l(e) {
|
|
276
|
-
var t;
|
|
277
|
-
e.done
|
|
278
|
-
? o(e.value)
|
|
279
|
-
: ((t = e.value),
|
|
280
|
-
t instanceof n
|
|
281
|
-
? t
|
|
282
|
-
: new n(function (e) {
|
|
283
|
-
e(t);
|
|
284
|
-
})).then(a, c);
|
|
285
|
-
}
|
|
286
|
-
l((r = r.apply(e, t || [])).next());
|
|
287
|
-
});
|
|
288
|
+
function l (e) {
|
|
289
|
+
let t
|
|
290
|
+
e.done
|
|
291
|
+
? o(e.value)
|
|
292
|
+
: ((t = e.value),
|
|
293
|
+
t instanceof n
|
|
294
|
+
? t
|
|
295
|
+
: new n(function (e) {
|
|
296
|
+
e(t)
|
|
297
|
+
})).then(a, c)
|
|
288
298
|
}
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
299
|
+
l((r = r.apply(e, t || [])).next())
|
|
300
|
+
})
|
|
301
|
+
}
|
|
302
|
+
function y (e, t) {
|
|
303
|
+
let n
|
|
304
|
+
let r
|
|
305
|
+
let o
|
|
306
|
+
let i
|
|
307
|
+
let a = {
|
|
308
|
+
label: 0,
|
|
309
|
+
sent: function () {
|
|
310
|
+
if (1 & o[0]) throw o[1]
|
|
311
|
+
return o[1]
|
|
312
|
+
},
|
|
313
|
+
trys: [],
|
|
314
|
+
ops: []
|
|
315
|
+
}
|
|
316
|
+
return (
|
|
317
|
+
(i = { next: c(0), throw: c(1), return: c(2) }),
|
|
318
|
+
typeof Symbol === 'function' &&
|
|
306
319
|
(i[Symbol.iterator] = function () {
|
|
307
|
-
return this
|
|
320
|
+
return this
|
|
308
321
|
}),
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
322
|
+
i
|
|
323
|
+
)
|
|
324
|
+
function c (c) {
|
|
325
|
+
return function (l) {
|
|
326
|
+
return (function (c) {
|
|
327
|
+
if (n) throw new TypeError('Generator is already executing.')
|
|
328
|
+
for (; i && ((i = 0), c[0] && (a = 0)), a;) {
|
|
329
|
+
try {
|
|
330
|
+
if (
|
|
331
|
+
((n = 1),
|
|
332
|
+
r &&
|
|
320
333
|
(o =
|
|
321
334
|
2 & c[0]
|
|
322
335
|
? r.return
|
|
323
336
|
: c[0]
|
|
324
|
-
|
|
325
|
-
|
|
337
|
+
? r.throw || ((o = r.return) && o.call(r), 0)
|
|
338
|
+
: r.next) &&
|
|
326
339
|
!(o = o.call(r, c[1])).done)
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
(o =
|
|
340
|
+
) { return o }
|
|
341
|
+
switch (((r = 0), o && (c = [2 & c[0], o.value]), c[0])) {
|
|
342
|
+
case 0:
|
|
343
|
+
case 1:
|
|
344
|
+
o = c
|
|
345
|
+
break
|
|
346
|
+
case 4:
|
|
347
|
+
return a.label++, { value: c[1], done: !1 }
|
|
348
|
+
case 5:
|
|
349
|
+
a.label++, (r = c[1]), (c = [0])
|
|
350
|
+
continue
|
|
351
|
+
case 7:
|
|
352
|
+
(c = a.ops.pop()), a.trys.pop()
|
|
353
|
+
continue
|
|
354
|
+
default:
|
|
355
|
+
if (
|
|
356
|
+
!(
|
|
357
|
+
(o =
|
|
346
358
|
(o = a.trys).length > 0 && o[o.length - 1]) ||
|
|
347
|
-
(
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
359
|
+
(c[0] !== 6 && c[0] !== 2)
|
|
360
|
+
)
|
|
361
|
+
) {
|
|
362
|
+
a = 0
|
|
363
|
+
continue
|
|
364
|
+
}
|
|
365
|
+
if (
|
|
366
|
+
c[0] === 3 &&
|
|
355
367
|
(!o || (c[1] > o[0] && c[1] < o[3]))
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
}
|
|
360
|
-
if (6 === c[0] && a.label < o[1]) {
|
|
361
|
-
(a.label = o[1]), (o = c);
|
|
362
|
-
break;
|
|
363
|
-
}
|
|
364
|
-
if (o && a.label < o[2]) {
|
|
365
|
-
(a.label = o[2]), a.ops.push(c);
|
|
366
|
-
break;
|
|
367
|
-
}
|
|
368
|
-
o[2] && a.ops.pop(), a.trys.pop();
|
|
369
|
-
continue;
|
|
368
|
+
) {
|
|
369
|
+
a.label = c[1]
|
|
370
|
+
break
|
|
370
371
|
}
|
|
371
|
-
c
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
372
|
+
if (c[0] === 6 && a.label < o[1]) {
|
|
373
|
+
(a.label = o[1]), (o = c)
|
|
374
|
+
break
|
|
375
|
+
}
|
|
376
|
+
if (o && a.label < o[2]) {
|
|
377
|
+
(a.label = o[2]), a.ops.push(c)
|
|
378
|
+
break
|
|
379
|
+
}
|
|
380
|
+
o[2] && a.ops.pop(), a.trys.pop()
|
|
381
|
+
continue
|
|
382
|
+
}
|
|
383
|
+
c = t.call(e, a)
|
|
384
|
+
} catch (e) {
|
|
385
|
+
(c = [6, e]), (r = 0)
|
|
386
|
+
} finally {
|
|
387
|
+
n = o = 0
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
if (5 & c[0]) throw c[1]
|
|
391
|
+
return { value: c[0] ? c[1] : void 0, done: !0 }
|
|
392
|
+
})([c, l])
|
|
382
393
|
}
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
var g = Object.create
|
|
397
|
+
? function (e, t, n, r) {
|
|
398
|
+
void 0 === r && (r = n)
|
|
399
|
+
let o = Object.getOwnPropertyDescriptor(t, n);
|
|
400
|
+
(o &&
|
|
401
|
+
!('get' in o
|
|
389
402
|
? !t.__esModule
|
|
390
403
|
: o.writable || o.configurable)) ||
|
|
391
404
|
(o = {
|
|
392
405
|
enumerable: !0,
|
|
393
406
|
get: function () {
|
|
394
|
-
return t[n]
|
|
395
|
-
}
|
|
407
|
+
return t[n]
|
|
408
|
+
}
|
|
396
409
|
}),
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
410
|
+
Object.defineProperty(e, r, o)
|
|
411
|
+
}
|
|
412
|
+
: function (e, t, n, r) {
|
|
413
|
+
void 0 === r && (r = n), (e[r] = t[n])
|
|
414
|
+
}
|
|
415
|
+
function b (e, t) {
|
|
416
|
+
for (const n in e) {
|
|
417
|
+
n === 'default' ||
|
|
405
418
|
Object.prototype.hasOwnProperty.call(t, n) ||
|
|
406
|
-
g(t, e, n)
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
};
|
|
422
|
-
throw new TypeError(
|
|
423
|
-
t ? "Object is not iterable." : "Symbol.iterator is not defined."
|
|
424
|
-
);
|
|
425
|
-
}
|
|
426
|
-
function m(e, t) {
|
|
427
|
-
var n = "function" == typeof Symbol && e[Symbol.iterator];
|
|
428
|
-
if (!n) return e;
|
|
429
|
-
var r,
|
|
430
|
-
o,
|
|
431
|
-
i = n.call(e),
|
|
432
|
-
a = [];
|
|
433
|
-
try {
|
|
434
|
-
for (; (void 0 === t || t-- > 0) && !(r = i.next()).done; )
|
|
435
|
-
a.push(r.value);
|
|
436
|
-
} catch (e) {
|
|
437
|
-
o = { error: e };
|
|
438
|
-
} finally {
|
|
439
|
-
try {
|
|
440
|
-
r && !r.done && (n = i.return) && n.call(i);
|
|
441
|
-
} finally {
|
|
442
|
-
if (o) throw o.error;
|
|
443
|
-
}
|
|
419
|
+
g(t, e, n)
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
function v (e) {
|
|
423
|
+
const t = typeof Symbol === 'function' && Symbol.iterator
|
|
424
|
+
const n = t && e[t]
|
|
425
|
+
let r = 0
|
|
426
|
+
if (n) return n.call(e)
|
|
427
|
+
if (e && typeof e.length === 'number') {
|
|
428
|
+
return {
|
|
429
|
+
next: function () {
|
|
430
|
+
return (
|
|
431
|
+
e && r >= e.length && (e = void 0),
|
|
432
|
+
{ value: e && e[r++], done: !e }
|
|
433
|
+
)
|
|
444
434
|
}
|
|
445
|
-
return a;
|
|
446
435
|
}
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
436
|
+
}
|
|
437
|
+
throw new TypeError(
|
|
438
|
+
t ? 'Object is not iterable.' : 'Symbol.iterator is not defined.'
|
|
439
|
+
)
|
|
440
|
+
}
|
|
441
|
+
function m (e, t) {
|
|
442
|
+
let n = typeof Symbol === 'function' && e[Symbol.iterator]
|
|
443
|
+
if (!n) return e
|
|
444
|
+
let r
|
|
445
|
+
let o
|
|
446
|
+
const i = n.call(e)
|
|
447
|
+
const a = []
|
|
448
|
+
try {
|
|
449
|
+
for (; (void 0 === t || t-- > 0) && !(r = i.next()).done;) { a.push(r.value) }
|
|
450
|
+
} catch (e) {
|
|
451
|
+
o = { error: e }
|
|
452
|
+
} finally {
|
|
453
|
+
try {
|
|
454
|
+
r && !r.done && (n = i.return) && n.call(i)
|
|
455
|
+
} finally {
|
|
456
|
+
if (o) throw o.error
|
|
451
457
|
}
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
458
|
+
}
|
|
459
|
+
return a
|
|
460
|
+
}
|
|
461
|
+
function w () {
|
|
462
|
+
for (var e = [], t = 0; t < arguments.length; t++) { e = e.concat(m(arguments[t])) }
|
|
463
|
+
return e
|
|
464
|
+
}
|
|
465
|
+
function _ () {
|
|
466
|
+
for (var e = 0, t = 0, n = arguments.length; t < n; t++) { e += arguments[t].length }
|
|
467
|
+
const r = Array(e)
|
|
468
|
+
let o = 0
|
|
469
|
+
for (t = 0; t < n; t++) {
|
|
470
|
+
for (let i = arguments[t], a = 0, c = i.length; a < c; a++, o++) { r[o] = i[a] }
|
|
471
|
+
}
|
|
472
|
+
return r
|
|
473
|
+
}
|
|
474
|
+
function P (e, t, n) {
|
|
475
|
+
if (n || arguments.length === 2) {
|
|
476
|
+
for (var r, o = 0, i = t.length; o < i; o++) {
|
|
477
|
+
(!r && o in t) ||
|
|
466
478
|
(r || (r = Array.prototype.slice.call(t, 0, o)),
|
|
467
|
-
(r[o] = t[o]))
|
|
468
|
-
return e.concat(r || Array.prototype.slice.call(t));
|
|
469
|
-
}
|
|
470
|
-
function O(e) {
|
|
471
|
-
return this instanceof O ? ((this.v = e), this) : new O(e);
|
|
479
|
+
(r[o] = t[o]))
|
|
472
480
|
}
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
481
|
+
}
|
|
482
|
+
return e.concat(r || Array.prototype.slice.call(t))
|
|
483
|
+
}
|
|
484
|
+
function O (e) {
|
|
485
|
+
return this instanceof O ? ((this.v = e), this) : new O(e)
|
|
486
|
+
}
|
|
487
|
+
function x (e, t, n) {
|
|
488
|
+
if (!Symbol.asyncIterator) { throw new TypeError('Symbol.asyncIterator is not defined.') }
|
|
489
|
+
let r
|
|
490
|
+
const o = n.apply(e, t || [])
|
|
491
|
+
const i = []
|
|
492
|
+
return (
|
|
493
|
+
(r = {}),
|
|
494
|
+
a('next'),
|
|
495
|
+
a('throw'),
|
|
496
|
+
a('return'),
|
|
497
|
+
(r[Symbol.asyncIterator] = function () {
|
|
498
|
+
return this
|
|
499
|
+
}),
|
|
500
|
+
r
|
|
501
|
+
)
|
|
502
|
+
function a (e) {
|
|
503
|
+
o[e] &&
|
|
491
504
|
(r[e] = function (t) {
|
|
492
505
|
return new Promise(function (n, r) {
|
|
493
|
-
i.push([e, t, n, r]) > 1 || c(e, t)
|
|
494
|
-
})
|
|
495
|
-
})
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
}
|
|
505
|
-
var n;
|
|
506
|
-
}
|
|
507
|
-
function l(e) {
|
|
508
|
-
c("next", e);
|
|
509
|
-
}
|
|
510
|
-
function u(e) {
|
|
511
|
-
c("throw", e);
|
|
512
|
-
}
|
|
513
|
-
function s(e, t) {
|
|
514
|
-
e(t), i.shift(), i.length && c(i[0][0], i[0][1]);
|
|
515
|
-
}
|
|
506
|
+
i.push([e, t, n, r]) > 1 || c(e, t)
|
|
507
|
+
})
|
|
508
|
+
})
|
|
509
|
+
}
|
|
510
|
+
function c (e, t) {
|
|
511
|
+
try {
|
|
512
|
+
(n = o[e](t)).value instanceof O
|
|
513
|
+
? Promise.resolve(n.value.v).then(l, u)
|
|
514
|
+
: s(i[0][2], n)
|
|
515
|
+
} catch (e) {
|
|
516
|
+
s(i[0][3], e)
|
|
516
517
|
}
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
518
|
+
let n
|
|
519
|
+
}
|
|
520
|
+
function l (e) {
|
|
521
|
+
c('next', e)
|
|
522
|
+
}
|
|
523
|
+
function u (e) {
|
|
524
|
+
c('throw', e)
|
|
525
|
+
}
|
|
526
|
+
function s (e, t) {
|
|
527
|
+
e(t), i.shift(), i.length && c(i[0][0], i[0][1])
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
function E (e) {
|
|
531
|
+
let t, n
|
|
532
|
+
return (
|
|
533
|
+
(t = {}),
|
|
534
|
+
r('next'),
|
|
535
|
+
r('throw', function (e) {
|
|
536
|
+
throw e
|
|
537
|
+
}),
|
|
538
|
+
r('return'),
|
|
539
|
+
(t[Symbol.iterator] = function () {
|
|
540
|
+
return this
|
|
541
|
+
}),
|
|
542
|
+
t
|
|
543
|
+
)
|
|
544
|
+
function r (r, o) {
|
|
545
|
+
t[r] = e[r]
|
|
546
|
+
? function (t) {
|
|
547
|
+
return (n = !n)
|
|
548
|
+
? { value: O(e[r](t)), done: !1 }
|
|
549
|
+
: o
|
|
550
|
+
? o(t)
|
|
551
|
+
: t
|
|
541
552
|
}
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
553
|
+
: o
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
function S (e) {
|
|
557
|
+
if (!Symbol.asyncIterator) { throw new TypeError('Symbol.asyncIterator is not defined.') }
|
|
558
|
+
let t
|
|
559
|
+
const n = e[Symbol.asyncIterator]
|
|
560
|
+
return n
|
|
561
|
+
? n.call(e)
|
|
562
|
+
: ((e = v(e)),
|
|
563
|
+
(t = {}),
|
|
564
|
+
r('next'),
|
|
565
|
+
r('throw'),
|
|
566
|
+
r('return'),
|
|
567
|
+
(t[Symbol.asyncIterator] = function () {
|
|
568
|
+
return this
|
|
569
|
+
}),
|
|
570
|
+
t)
|
|
571
|
+
function r (n) {
|
|
572
|
+
t[n] =
|
|
561
573
|
e[n] &&
|
|
562
574
|
function (t) {
|
|
563
575
|
return new Promise(function (r, o) {
|
|
564
576
|
!(function (e, t, n, r) {
|
|
565
577
|
Promise.resolve(r).then(function (t) {
|
|
566
|
-
e({ value: t, done: n })
|
|
567
|
-
}, t)
|
|
568
|
-
})(r, o, (t = e[n](t)).done, t.value)
|
|
569
|
-
})
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
578
|
+
e({ value: t, done: n })
|
|
579
|
+
}, t)
|
|
580
|
+
})(r, o, (t = e[n](t)).done, t.value)
|
|
581
|
+
})
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
function j (e, t) {
|
|
586
|
+
return (
|
|
587
|
+
Object.defineProperty
|
|
588
|
+
? Object.defineProperty(e, 'raw', { value: t })
|
|
589
|
+
: (e.raw = t),
|
|
590
|
+
e
|
|
591
|
+
)
|
|
592
|
+
}
|
|
593
|
+
const T = Object.create
|
|
594
|
+
? function (e, t) {
|
|
595
|
+
Object.defineProperty(e, 'default', {
|
|
596
|
+
enumerable: !0,
|
|
597
|
+
value: t
|
|
598
|
+
})
|
|
599
|
+
}
|
|
600
|
+
: function (e, t) {
|
|
601
|
+
e.default = t
|
|
602
|
+
}
|
|
603
|
+
function A (e) {
|
|
604
|
+
if (e && e.__esModule) return e
|
|
605
|
+
const t = {}
|
|
606
|
+
if (e != null) {
|
|
607
|
+
for (const n in e) {
|
|
608
|
+
n !== 'default' &&
|
|
597
609
|
Object.prototype.hasOwnProperty.call(e, n) &&
|
|
598
|
-
g(t, e, n)
|
|
599
|
-
return T(t, e), t;
|
|
610
|
+
g(t, e, n)
|
|
600
611
|
}
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
612
|
+
}
|
|
613
|
+
return T(t, e), t
|
|
614
|
+
}
|
|
615
|
+
function C (e) {
|
|
616
|
+
return e && e.__esModule ? e : { default: e }
|
|
617
|
+
}
|
|
618
|
+
function k (e, t, n, r) {
|
|
619
|
+
if (n === 'a' && !r) {
|
|
620
|
+
throw new TypeError(
|
|
621
|
+
'Private accessor was defined without a getter'
|
|
622
|
+
)
|
|
623
|
+
}
|
|
624
|
+
if (typeof t === 'function' ? e !== t || !r : !t.has(e)) {
|
|
625
|
+
throw new TypeError(
|
|
626
|
+
'Cannot read private member from an object whose class did not declare it'
|
|
627
|
+
)
|
|
628
|
+
}
|
|
629
|
+
return n === 'm'
|
|
630
|
+
? r
|
|
631
|
+
: n === 'a'
|
|
632
|
+
? r.call(e)
|
|
633
|
+
: r
|
|
618
634
|
? r.value
|
|
619
|
-
: t.get(e)
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
},
|
|
648
|
-
},
|
|
649
|
-
r = {};
|
|
650
|
-
function o(e) {
|
|
651
|
-
var t = r[e];
|
|
652
|
-
if (void 0 !== t) return t.exports;
|
|
653
|
-
var i = (r[e] = { exports: {} });
|
|
654
|
-
return n[e](i, i.exports, o), i.exports;
|
|
635
|
+
: t.get(e)
|
|
636
|
+
}
|
|
637
|
+
function M (e, t, n, r, o) {
|
|
638
|
+
if (r === 'm') { throw new TypeError('Private method is not writable') }
|
|
639
|
+
if (r === 'a' && !o) {
|
|
640
|
+
throw new TypeError(
|
|
641
|
+
'Private accessor was defined without a setter'
|
|
642
|
+
)
|
|
643
|
+
}
|
|
644
|
+
if (typeof t === 'function' ? e !== t || !o : !t.has(e)) {
|
|
645
|
+
throw new TypeError(
|
|
646
|
+
'Cannot write private member to an object whose class did not declare it'
|
|
647
|
+
)
|
|
648
|
+
}
|
|
649
|
+
return (
|
|
650
|
+
r === 'a' ? o.call(e, n) : o ? (o.value = n) : t.set(e, n), n
|
|
651
|
+
)
|
|
652
|
+
}
|
|
653
|
+
function R (e, t) {
|
|
654
|
+
if (t === null || (typeof t !== 'object' && typeof t !== 'function')) { throw new TypeError("Cannot use 'in' operator on non-object") }
|
|
655
|
+
return typeof e === 'function' ? t === e : e.has(t)
|
|
656
|
+
}
|
|
657
|
+
},
|
|
658
|
+
156: function (t) {
|
|
659
|
+
t.exports = e
|
|
660
|
+
},
|
|
661
|
+
111: function (e) {
|
|
662
|
+
e.exports = t
|
|
655
663
|
}
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
664
|
+
}
|
|
665
|
+
const r = {}
|
|
666
|
+
function o (e) {
|
|
667
|
+
const t = r[e]
|
|
668
|
+
if (void 0 !== t) return t.exports
|
|
669
|
+
const i = (r[e] = { exports: {} })
|
|
670
|
+
return n[e](i, i.exports, o), i.exports
|
|
671
|
+
}
|
|
672
|
+
(o.d = function (e, t) {
|
|
673
|
+
for (const n in t) {
|
|
674
|
+
o.o(t, n) &&
|
|
659
675
|
!o.o(e, n) &&
|
|
660
|
-
Object.defineProperty(e, n, { enumerable: !0, get: t[n] })
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
676
|
+
Object.defineProperty(e, n, { enumerable: !0, get: t[n] })
|
|
677
|
+
}
|
|
678
|
+
}),
|
|
679
|
+
(o.o = function (e, t) {
|
|
680
|
+
return Object.prototype.hasOwnProperty.call(e, t)
|
|
681
|
+
}),
|
|
682
|
+
(o.r = function (e) {
|
|
683
|
+
typeof Symbol !== 'undefined' &&
|
|
667
684
|
Symbol.toStringTag &&
|
|
668
|
-
Object.defineProperty(e, Symbol.toStringTag, { value:
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
Object.prototype.hasOwnProperty.call(n,
|
|
683
|
-
Object.prototype.hasOwnProperty.call(n,
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
null === (t = e.contentDocument) || void 0 === t
|
|
685
|
+
Object.defineProperty(e, Symbol.toStringTag, { value: 'Module' }),
|
|
686
|
+
Object.defineProperty(e, '__esModule', { value: !0 })
|
|
687
|
+
})
|
|
688
|
+
const i = {}
|
|
689
|
+
return (
|
|
690
|
+
(function () {
|
|
691
|
+
const e = i
|
|
692
|
+
Object.defineProperty(e, '__esModule', { value: !0 }),
|
|
693
|
+
(e.useReactToPrint = e.PrintContextConsumer = void 0)
|
|
694
|
+
const t = o(655)
|
|
695
|
+
const n = o(156)
|
|
696
|
+
const r = o(111)
|
|
697
|
+
const a = Object.prototype.hasOwnProperty.call(n, 'createContext')
|
|
698
|
+
const c =
|
|
699
|
+
Object.prototype.hasOwnProperty.call(n, 'useMemo') &&
|
|
700
|
+
Object.prototype.hasOwnProperty.call(n, 'useCallback')
|
|
701
|
+
const l = a ? n.createContext({}) : null
|
|
702
|
+
e.PrintContextConsumer = l
|
|
703
|
+
? l.Consumer
|
|
704
|
+
: function () {
|
|
705
|
+
return null
|
|
706
|
+
}
|
|
707
|
+
const u = {
|
|
708
|
+
copyStyles: !0,
|
|
709
|
+
pageStyle:
|
|
710
|
+
'\n @page {\n /* Remove browser default header (title) and footer (url) */\n padding: 10px;\n }\n @media print {\n body {\n /* Tell browsers to print background colors */\n -webkit-print-color-adjust: exact; /* Chrome/Safari/Edge/Opera */\n color-adjust: exact; /* Firefox */\n }\n }\n ',
|
|
711
|
+
removeAfterPrint: !1,
|
|
712
|
+
suppressErrors: !1
|
|
713
|
+
}
|
|
714
|
+
const s = (function (e) {
|
|
715
|
+
function o () {
|
|
716
|
+
const n = (e !== null && e.apply(this, arguments)) || this
|
|
717
|
+
return (
|
|
718
|
+
(n.startPrint = function (e) {
|
|
719
|
+
const t = n.props
|
|
720
|
+
const r = t.onAfterPrint
|
|
721
|
+
const o = t.onPrintError
|
|
722
|
+
const i = t.print
|
|
723
|
+
const a = t.documentTitle
|
|
724
|
+
setTimeout(function () {
|
|
725
|
+
let t, c
|
|
726
|
+
if (e.contentWindow) {
|
|
727
|
+
if ((e.contentWindow.focus(), i)) {
|
|
728
|
+
i(e)
|
|
729
|
+
.then(n.handleRemoveIframe)
|
|
730
|
+
.catch(function (e) {
|
|
731
|
+
o
|
|
732
|
+
? o('print', e)
|
|
733
|
+
: n.logMessages([
|
|
734
|
+
'An error was thrown by the specified `print` function'
|
|
735
|
+
])
|
|
736
|
+
})
|
|
737
|
+
} else if (e.contentWindow.print) {
|
|
738
|
+
const l =
|
|
739
|
+
(c =
|
|
740
|
+
(t = e.contentDocument) === null || void 0 === t
|
|
725
741
|
? void 0
|
|
726
|
-
: t.title)
|
|
742
|
+
: t.title) !==
|
|
743
|
+
null && void 0 !== c
|
|
727
744
|
? c
|
|
728
|
-
:
|
|
729
|
-
|
|
730
|
-
|
|
745
|
+
: ''
|
|
746
|
+
const u = e.ownerDocument.title
|
|
747
|
+
a &&
|
|
731
748
|
((e.ownerDocument.title = a),
|
|
732
749
|
e.contentDocument && (e.contentDocument.title = a)),
|
|
733
|
-
|
|
734
|
-
|
|
750
|
+
e.contentWindow.print(),
|
|
751
|
+
a &&
|
|
735
752
|
((e.ownerDocument.title = u),
|
|
736
|
-
e.contentDocument && (e.contentDocument.title = l))
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
753
|
+
e.contentDocument && (e.contentDocument.title = l))
|
|
754
|
+
} else {
|
|
755
|
+
n.logMessages([
|
|
756
|
+
'Printing for this browser is not currently possible: the browser does not have a `print` method available for iframes.'
|
|
757
|
+
])
|
|
758
|
+
}
|
|
759
|
+
r && r(), n.handleRemoveIframe()
|
|
760
|
+
} else n.logMessages(['Printing failed because the `contentWindow` of the print iframe did not load. This is possibly an error with `react-to-print`. Please file an issue: https://github.com/gregnb/react-to-print/issues/'])
|
|
761
|
+
}, 500)
|
|
762
|
+
}),
|
|
763
|
+
(n.triggerPrint = function (e) {
|
|
764
|
+
const t = n.props
|
|
765
|
+
const r = t.onBeforePrint
|
|
766
|
+
const o = t.onPrintError
|
|
767
|
+
if (r) {
|
|
768
|
+
const i = r()
|
|
769
|
+
i && typeof i.then === 'function'
|
|
770
|
+
? i
|
|
771
|
+
.then(function () {
|
|
772
|
+
n.startPrint(e)
|
|
773
|
+
})
|
|
774
|
+
.catch(function (e) {
|
|
775
|
+
o && o('onBeforePrint', e)
|
|
776
|
+
})
|
|
777
|
+
: n.startPrint(e)
|
|
778
|
+
} else n.startPrint(e)
|
|
779
|
+
}),
|
|
780
|
+
(n.handleClick = function () {
|
|
781
|
+
const e = n.props
|
|
782
|
+
const t = e.onBeforeGetContent
|
|
783
|
+
const r = e.onPrintError
|
|
784
|
+
if (t) {
|
|
785
|
+
const o = t()
|
|
786
|
+
o && typeof o.then === 'function'
|
|
787
|
+
? o.then(n.handlePrint).catch(function (e) {
|
|
788
|
+
r && r('onBeforeGetContent', e)
|
|
789
|
+
})
|
|
790
|
+
: n.handlePrint()
|
|
791
|
+
} else n.handlePrint()
|
|
792
|
+
}),
|
|
793
|
+
(n.handlePrint = function () {
|
|
794
|
+
const e = n.props
|
|
795
|
+
const o = e.bodyClass
|
|
796
|
+
const i = e.content
|
|
797
|
+
const a = e.copyStyles
|
|
798
|
+
const c = e.fonts
|
|
799
|
+
const l = e.pageStyle
|
|
800
|
+
const u = e.nonce
|
|
801
|
+
const s = i()
|
|
802
|
+
if (void 0 !== s) {
|
|
803
|
+
if (s !== null) {
|
|
804
|
+
const f = document.createElement('iframe');
|
|
805
|
+
(f.width = ''.concat(
|
|
806
|
+
document.documentElement.clientWidth,
|
|
807
|
+
'px'
|
|
808
|
+
)),
|
|
809
|
+
(f.height = ''.concat(
|
|
810
|
+
document.documentElement.clientHeight,
|
|
811
|
+
'px'
|
|
812
|
+
)),
|
|
813
|
+
(f.style.position = 'absolute'),
|
|
814
|
+
(f.style.top = '-'.concat(
|
|
815
|
+
document.documentElement.clientHeight + 100,
|
|
816
|
+
'px'
|
|
817
|
+
)),
|
|
818
|
+
(f.style.left = '-'.concat(
|
|
819
|
+
document.documentElement.clientWidth + 100,
|
|
820
|
+
'px'
|
|
821
|
+
)),
|
|
822
|
+
(f.id = 'printWindow'),
|
|
823
|
+
(f.srcdoc = '<!DOCTYPE html>')
|
|
824
|
+
const d = (0, r.findDOMNode)(s)
|
|
825
|
+
if (d) {
|
|
826
|
+
const p = d.cloneNode(!0)
|
|
827
|
+
const h = p instanceof Text
|
|
828
|
+
const y = document.querySelectorAll(
|
|
829
|
+
"link[rel='stylesheet']"
|
|
830
|
+
)
|
|
831
|
+
const g = h ? [] : p.querySelectorAll('img')
|
|
832
|
+
const b = h ? [] : p.querySelectorAll('video')
|
|
833
|
+
const v = c ? c.length : 0;
|
|
834
|
+
(n.numResourcesToLoad =
|
|
817
835
|
y.length + g.length + b.length + v),
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
836
|
+
(n.resourcesLoaded = []),
|
|
837
|
+
(n.resourcesErrored = [])
|
|
838
|
+
const m = function (e, r) {
|
|
839
|
+
n.resourcesLoaded.includes(e)
|
|
840
|
+
? n.logMessages(
|
|
841
|
+
[
|
|
842
|
+
'Tried to mark a resource that has already been handled',
|
|
843
|
+
e
|
|
844
|
+
],
|
|
845
|
+
'debug'
|
|
846
|
+
)
|
|
847
|
+
: (r
|
|
848
|
+
? (n.logMessages(
|
|
849
|
+
t.__spreadArray(
|
|
850
|
+
[
|
|
851
|
+
'"react-to-print" was unable to load a resource but will continue attempting to print the page'
|
|
852
|
+
],
|
|
853
|
+
t.__read(r),
|
|
854
|
+
!1
|
|
855
|
+
)
|
|
856
|
+
),
|
|
857
|
+
n.resourcesErrored.push(e))
|
|
858
|
+
: n.resourcesLoaded.push(e),
|
|
859
|
+
n.resourcesLoaded.length +
|
|
842
860
|
n.resourcesErrored.length ===
|
|
843
|
-
n.numResourcesToLoad && n.triggerPrint(f))
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
861
|
+
n.numResourcesToLoad && n.triggerPrint(f))
|
|
862
|
+
};
|
|
863
|
+
(f.onload = function () {
|
|
864
|
+
let e, r, i, s
|
|
865
|
+
f.onload = null
|
|
866
|
+
const y =
|
|
849
867
|
f.contentDocument ||
|
|
850
|
-
(
|
|
868
|
+
((r = f.contentWindow) === null || void 0 === r
|
|
851
869
|
? void 0
|
|
852
|
-
: r.document)
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
((
|
|
870
|
+
: r.document)
|
|
871
|
+
if (y) {
|
|
872
|
+
y.body.appendChild(p),
|
|
873
|
+
c &&
|
|
874
|
+
(((i = f.contentDocument) === null ||
|
|
857
875
|
void 0 === i
|
|
858
876
|
? void 0
|
|
859
877
|
: i.fonts) &&
|
|
860
|
-
(
|
|
878
|
+
((s = f.contentWindow) === null || void 0 === s
|
|
861
879
|
? void 0
|
|
862
880
|
: s.FontFace)
|
|
863
881
|
? c.forEach(function (e) {
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
});
|
|
868
|
-
f.contentDocument.fonts.add(t),
|
|
869
|
-
t.loaded
|
|
870
|
-
.then(function () {
|
|
871
|
-
m(t);
|
|
872
|
-
})
|
|
873
|
-
.catch(function (e) {
|
|
874
|
-
m(t, [
|
|
875
|
-
"Failed loading the font:",
|
|
876
|
-
t,
|
|
877
|
-
"Load error:",
|
|
878
|
-
e,
|
|
879
|
-
]);
|
|
880
|
-
});
|
|
882
|
+
const t = new FontFace(e.family, e.source, {
|
|
883
|
+
weight: e.weight,
|
|
884
|
+
style: e.style
|
|
881
885
|
})
|
|
886
|
+
f.contentDocument.fonts.add(t),
|
|
887
|
+
t.loaded
|
|
888
|
+
.then(function () {
|
|
889
|
+
m(t)
|
|
890
|
+
})
|
|
891
|
+
.catch(function (e) {
|
|
892
|
+
m(t, [
|
|
893
|
+
'Failed loading the font:',
|
|
894
|
+
t,
|
|
895
|
+
'Load error:',
|
|
896
|
+
e
|
|
897
|
+
])
|
|
898
|
+
})
|
|
899
|
+
})
|
|
882
900
|
: (c.forEach(function (e) {
|
|
883
|
-
return m(e)
|
|
901
|
+
return m(e)
|
|
884
902
|
}),
|
|
885
903
|
n.logMessages([
|
|
886
|
-
'"react-to-print" is not able to load custom fonts because the browser does not support the FontFace API but will continue attempting to print the page'
|
|
887
|
-
])))
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
(w.setAttribute(
|
|
900
|
-
y.head.setAttribute(
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
904
|
+
'"react-to-print" is not able to load custom fonts because the browser does not support the FontFace API but will continue attempting to print the page'
|
|
905
|
+
])))
|
|
906
|
+
const v = typeof l === 'function' ? l() : l
|
|
907
|
+
if (typeof v !== 'string') {
|
|
908
|
+
n.logMessages([
|
|
909
|
+
'"react-to-print" expected a "string" from `pageStyle` but received "'.concat(
|
|
910
|
+
typeof v,
|
|
911
|
+
'". Styles from `pageStyle` will not be applied.'
|
|
912
|
+
)
|
|
913
|
+
])
|
|
914
|
+
} else {
|
|
915
|
+
const w = y.createElement('style')
|
|
916
|
+
u &&
|
|
917
|
+
(w.setAttribute('nonce', u),
|
|
918
|
+
y.head.setAttribute('nonce', u)),
|
|
919
|
+
w.appendChild(y.createTextNode(v)),
|
|
920
|
+
y.head.appendChild(w)
|
|
921
|
+
}
|
|
922
|
+
if (
|
|
923
|
+
(o &&
|
|
906
924
|
(e = y.body.classList).add.apply(
|
|
907
925
|
e,
|
|
908
926
|
t.__spreadArray(
|
|
909
927
|
[],
|
|
910
|
-
t.__read(o.split(
|
|
928
|
+
t.__read(o.split(' ')),
|
|
911
929
|
!1
|
|
912
930
|
)
|
|
913
931
|
),
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
932
|
+
!h)
|
|
933
|
+
) {
|
|
934
|
+
for (
|
|
935
|
+
var _ = h ? [] : d.querySelectorAll('canvas'),
|
|
936
|
+
P = y.querySelectorAll('canvas'),
|
|
937
|
+
O = 0;
|
|
938
|
+
O < _.length;
|
|
939
|
+
++O
|
|
940
|
+
) {
|
|
941
|
+
const x = _[O]
|
|
942
|
+
const E = P[O].getContext('2d')
|
|
943
|
+
E && E.drawImage(x, 0, 0)
|
|
944
|
+
}
|
|
945
|
+
const S = function (e) {
|
|
946
|
+
const t = g[e]
|
|
947
|
+
const n = t.getAttribute('src')
|
|
948
|
+
if (n) {
|
|
949
|
+
const r = new Image();
|
|
950
|
+
(r.onload = function () {
|
|
951
|
+
return m(t)
|
|
952
|
+
}),
|
|
953
|
+
(r.onerror = function (e, n, r, o, i) {
|
|
954
|
+
return m(t, [
|
|
955
|
+
'Error loading <img>',
|
|
956
|
+
t,
|
|
957
|
+
'Error',
|
|
958
|
+
i
|
|
959
|
+
])
|
|
960
|
+
}),
|
|
961
|
+
(r.src = n)
|
|
962
|
+
} else {
|
|
963
|
+
m(t, [
|
|
964
|
+
'Found an <img> tag with an empty "src" attribute. This prevents pre-loading it. The <img> is:',
|
|
965
|
+
t
|
|
966
|
+
])
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
for (O = 0; O < g.length; O++) S(O)
|
|
970
|
+
const j = function (e) {
|
|
971
|
+
const t = b[e]
|
|
972
|
+
t.preload = 'auto'
|
|
973
|
+
const n = t.getAttribute('poster')
|
|
974
|
+
if (n) {
|
|
975
|
+
const r = new Image();
|
|
976
|
+
(r.onload = function () {
|
|
977
|
+
return m(t)
|
|
978
|
+
}),
|
|
979
|
+
(r.onerror = function (e, r, o, i, a) {
|
|
980
|
+
return m(t, [
|
|
981
|
+
'Error loading video poster',
|
|
982
|
+
n,
|
|
983
|
+
'for video',
|
|
984
|
+
t,
|
|
985
|
+
'Error:',
|
|
986
|
+
a
|
|
987
|
+
])
|
|
988
|
+
}),
|
|
989
|
+
(r.src = n)
|
|
990
|
+
} else {
|
|
991
|
+
t.readyState >= 2
|
|
992
|
+
? m(t)
|
|
993
|
+
: ((t.onloadeddata = function () {
|
|
994
|
+
return m(t)
|
|
934
995
|
}),
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
}),
|
|
943
|
-
(r.src = n);
|
|
944
|
-
} else
|
|
945
|
-
m(t, [
|
|
946
|
-
'Found an <img> tag with an empty "src" attribute. This prevents pre-loading it. The <img> is:',
|
|
947
|
-
t,
|
|
948
|
-
]);
|
|
949
|
-
};
|
|
950
|
-
for (O = 0; O < g.length; O++) S(O);
|
|
951
|
-
var j = function (e) {
|
|
952
|
-
var t = b[e];
|
|
953
|
-
t.preload = "auto";
|
|
954
|
-
var n = t.getAttribute("poster");
|
|
955
|
-
if (n) {
|
|
956
|
-
var r = new Image();
|
|
957
|
-
(r.onload = function () {
|
|
958
|
-
return m(t);
|
|
996
|
+
(t.onerror = function (e, n, r, o, i) {
|
|
997
|
+
return m(t, [
|
|
998
|
+
'Error loading video',
|
|
999
|
+
t,
|
|
1000
|
+
'Error',
|
|
1001
|
+
i
|
|
1002
|
+
])
|
|
959
1003
|
}),
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
"Error:",
|
|
967
|
-
a,
|
|
968
|
-
]);
|
|
969
|
-
}),
|
|
970
|
-
(r.src = n);
|
|
971
|
-
} else
|
|
972
|
-
t.readyState >= 2
|
|
973
|
-
? m(t)
|
|
974
|
-
: ((t.onloadeddata = function () {
|
|
975
|
-
return m(t);
|
|
976
|
-
}),
|
|
977
|
-
(t.onerror = function (e, n, r, o, i) {
|
|
978
|
-
return m(t, [
|
|
979
|
-
"Error loading video",
|
|
980
|
-
t,
|
|
981
|
-
"Error",
|
|
982
|
-
i,
|
|
983
|
-
]);
|
|
984
|
-
}),
|
|
985
|
-
(t.onstalled = function () {
|
|
986
|
-
return m(t, [
|
|
987
|
-
"Loading video stalled, skipping",
|
|
988
|
-
t,
|
|
989
|
-
]);
|
|
990
|
-
}));
|
|
991
|
-
};
|
|
992
|
-
for (O = 0; O < b.length; O++) j(O);
|
|
993
|
-
var T = "input",
|
|
994
|
-
A = d.querySelectorAll(T),
|
|
995
|
-
C = y.querySelectorAll(T);
|
|
996
|
-
for (O = 0; O < A.length; O++)
|
|
997
|
-
C[O].value = A[O].value;
|
|
998
|
-
var k = "input[type=checkbox],input[type=radio]",
|
|
999
|
-
M = d.querySelectorAll(k),
|
|
1000
|
-
R = y.querySelectorAll(k);
|
|
1001
|
-
for (O = 0; O < M.length; O++)
|
|
1002
|
-
R[O].checked = M[O].checked;
|
|
1003
|
-
var D = "select",
|
|
1004
|
-
I = d.querySelectorAll(D),
|
|
1005
|
-
q = y.querySelectorAll(D);
|
|
1006
|
-
for (O = 0; O < I.length; O++)
|
|
1007
|
-
q[O].value = I[O].value;
|
|
1004
|
+
(t.onstalled = function () {
|
|
1005
|
+
return m(t, [
|
|
1006
|
+
'Loading video stalled, skipping',
|
|
1007
|
+
t
|
|
1008
|
+
])
|
|
1009
|
+
}))
|
|
1008
1010
|
}
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1011
|
+
}
|
|
1012
|
+
for (O = 0; O < b.length; O++) j(O)
|
|
1013
|
+
const T = 'input'
|
|
1014
|
+
const A = d.querySelectorAll(T)
|
|
1015
|
+
const C = y.querySelectorAll(T)
|
|
1016
|
+
for (O = 0; O < A.length; O++) { C[O].value = A[O].value }
|
|
1017
|
+
const k = 'input[type=checkbox],input[type=radio]'
|
|
1018
|
+
const M = d.querySelectorAll(k)
|
|
1019
|
+
const R = y.querySelectorAll(k)
|
|
1020
|
+
for (O = 0; O < M.length; O++) { R[O].checked = M[O].checked }
|
|
1021
|
+
const D = 'select'
|
|
1022
|
+
const I = d.querySelectorAll(D)
|
|
1023
|
+
const q = y.querySelectorAll(D)
|
|
1024
|
+
for (O = 0; O < I.length; O++) { q[O].value = I[O].value }
|
|
1025
|
+
}
|
|
1026
|
+
if (a) {
|
|
1027
|
+
for (
|
|
1028
|
+
var F = document.querySelectorAll(
|
|
1029
|
+
"style, link[rel='stylesheet']"
|
|
1030
|
+
),
|
|
1031
|
+
L = function (e, t) {
|
|
1032
|
+
const r = F[e]
|
|
1033
|
+
if (r.tagName.toLowerCase() === 'style') {
|
|
1034
|
+
const o = y.createElement(r.tagName)
|
|
1035
|
+
const i = r.sheet
|
|
1036
|
+
if (i) {
|
|
1037
|
+
let a = ''
|
|
1038
|
+
try {
|
|
1039
|
+
for (
|
|
1040
|
+
var c = i.cssRules.length, l = 0;
|
|
1041
|
+
l < c;
|
|
1042
|
+
++l
|
|
1043
|
+
) {
|
|
1044
|
+
typeof i.cssRules[l].cssText ===
|
|
1045
|
+
'string' &&
|
|
1046
|
+
(a += ''.concat(
|
|
1030
1047
|
i.cssRules[l].cssText,
|
|
1031
|
-
|
|
1032
|
-
))
|
|
1033
|
-
} catch (e) {
|
|
1034
|
-
n.logMessages(
|
|
1035
|
-
[
|
|
1036
|
-
"A stylesheet could not be accessed. This is likely due to the stylesheet having cross-origin imports, and many browsers block script access to cross-origin stylesheets. See https://github.com/gregnb/react-to-print/issues/429 for details. You may be able to load the sheet by both marking the stylesheet with the cross `crossorigin` attribute, and setting the `Access-Control-Allow-Origin` header on the server serving the stylesheet. Alternatively, host the stylesheet on your domain to avoid this issue entirely.",
|
|
1037
|
-
r,
|
|
1038
|
-
],
|
|
1039
|
-
"warning"
|
|
1040
|
-
);
|
|
1041
|
-
}
|
|
1042
|
-
o.setAttribute(
|
|
1043
|
-
"id",
|
|
1044
|
-
"react-to-print-".concat(e)
|
|
1045
|
-
),
|
|
1046
|
-
u && o.setAttribute("nonce", u),
|
|
1047
|
-
o.appendChild(y.createTextNode(a)),
|
|
1048
|
-
y.head.appendChild(o);
|
|
1048
|
+
'\r\n'
|
|
1049
|
+
))
|
|
1049
1050
|
}
|
|
1050
|
-
}
|
|
1051
|
-
if (r.hasAttribute("disabled"))
|
|
1052
|
-
n.logMessages(
|
|
1053
|
-
[
|
|
1054
|
-
"`react-to-print` encountered a <link> tag with a `disabled` attribute and will ignore it. Note that the `disabled` attribute is deprecated, and some browsers ignore it. You should stop using it. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-disabled. The <link> is:",
|
|
1055
|
-
r,
|
|
1056
|
-
],
|
|
1057
|
-
"warning"
|
|
1058
|
-
),
|
|
1059
|
-
m(r);
|
|
1060
|
-
else {
|
|
1061
|
-
for (
|
|
1062
|
-
var s = y.createElement(r.tagName),
|
|
1063
|
-
f = ((l = 0), r.attributes.length);
|
|
1064
|
-
l < f;
|
|
1065
|
-
++l
|
|
1066
|
-
) {
|
|
1067
|
-
var d = r.attributes[l];
|
|
1068
|
-
d &&
|
|
1069
|
-
s.setAttribute(
|
|
1070
|
-
d.nodeName,
|
|
1071
|
-
d.nodeValue || ""
|
|
1072
|
-
);
|
|
1073
|
-
}
|
|
1074
|
-
(s.onload = function () {
|
|
1075
|
-
return m(s);
|
|
1076
|
-
}),
|
|
1077
|
-
(s.onerror = function (
|
|
1078
|
-
e,
|
|
1079
|
-
t,
|
|
1080
|
-
n,
|
|
1081
|
-
r,
|
|
1082
|
-
o
|
|
1083
|
-
) {
|
|
1084
|
-
return m(s, [
|
|
1085
|
-
"Failed to load",
|
|
1086
|
-
s,
|
|
1087
|
-
"Error:",
|
|
1088
|
-
o,
|
|
1089
|
-
]);
|
|
1090
|
-
}),
|
|
1091
|
-
u && s.setAttribute("nonce", u),
|
|
1092
|
-
y.head.appendChild(s);
|
|
1093
|
-
}
|
|
1094
|
-
else
|
|
1051
|
+
} catch (e) {
|
|
1095
1052
|
n.logMessages(
|
|
1096
1053
|
[
|
|
1097
|
-
|
|
1098
|
-
r
|
|
1054
|
+
'A stylesheet could not be accessed. This is likely due to the stylesheet having cross-origin imports, and many browsers block script access to cross-origin stylesheets. See https://github.com/gregnb/react-to-print/issues/429 for details. You may be able to load the sheet by both marking the stylesheet with the cross `crossorigin` attribute, and setting the `Access-Control-Allow-Origin` header on the server serving the stylesheet. Alternatively, host the stylesheet on your domain to avoid this issue entirely.',
|
|
1055
|
+
r
|
|
1099
1056
|
],
|
|
1100
|
-
|
|
1101
|
-
)
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1057
|
+
'warning'
|
|
1058
|
+
)
|
|
1059
|
+
}
|
|
1060
|
+
o.setAttribute(
|
|
1061
|
+
'id',
|
|
1062
|
+
'react-to-print-'.concat(e)
|
|
1063
|
+
),
|
|
1064
|
+
u && o.setAttribute('nonce', u),
|
|
1065
|
+
o.appendChild(y.createTextNode(a)),
|
|
1066
|
+
y.head.appendChild(o)
|
|
1067
|
+
}
|
|
1068
|
+
} else if (r.getAttribute('href')) {
|
|
1069
|
+
if (r.hasAttribute('disabled')) {
|
|
1070
|
+
n.logMessages(
|
|
1071
|
+
[
|
|
1072
|
+
'`react-to-print` encountered a <link> tag with a `disabled` attribute and will ignore it. Note that the `disabled` attribute is deprecated, and some browsers ignore it. You should stop using it. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-disabled. The <link> is:',
|
|
1073
|
+
r
|
|
1074
|
+
],
|
|
1075
|
+
'warning'
|
|
1076
|
+
),
|
|
1077
|
+
m(r)
|
|
1078
|
+
} else {
|
|
1079
|
+
for (
|
|
1080
|
+
var s = y.createElement(r.tagName),
|
|
1081
|
+
f = ((l = 0), r.attributes.length);
|
|
1082
|
+
l < f;
|
|
1083
|
+
++l
|
|
1084
|
+
) {
|
|
1085
|
+
const d = r.attributes[l]
|
|
1086
|
+
d &&
|
|
1087
|
+
s.setAttribute(
|
|
1088
|
+
d.nodeName,
|
|
1089
|
+
d.nodeValue || ''
|
|
1090
|
+
)
|
|
1091
|
+
}
|
|
1092
|
+
(s.onload = function () {
|
|
1093
|
+
return m(s)
|
|
1094
|
+
}),
|
|
1095
|
+
(s.onerror = function (
|
|
1096
|
+
e,
|
|
1097
|
+
t,
|
|
1098
|
+
n,
|
|
1099
|
+
r,
|
|
1100
|
+
o
|
|
1101
|
+
) {
|
|
1102
|
+
return m(s, [
|
|
1103
|
+
'Failed to load',
|
|
1104
|
+
s,
|
|
1105
|
+
'Error:',
|
|
1106
|
+
o
|
|
1107
|
+
])
|
|
1108
|
+
}),
|
|
1109
|
+
u && s.setAttribute('nonce', u),
|
|
1110
|
+
y.head.appendChild(s)
|
|
1111
|
+
}
|
|
1112
|
+
} else {
|
|
1113
|
+
n.logMessages(
|
|
1114
|
+
[
|
|
1115
|
+
'`react-to-print` encountered a <link> tag with an empty `href` attribute. In addition to being invalid HTML, this can cause problems in many browsers, and so the <link> was not loaded. The <link> is:',
|
|
1116
|
+
r
|
|
1117
|
+
],
|
|
1118
|
+
'warning'
|
|
1119
|
+
),
|
|
1120
|
+
m(r)
|
|
1121
|
+
}
|
|
1122
|
+
},
|
|
1123
|
+
W = ((O = 0), F.length);
|
|
1124
|
+
O < W;
|
|
1125
|
+
++O
|
|
1126
|
+
) { L(O) }
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
(n.numResourcesToLoad !== 0 && a) ||
|
|
1130
|
+
n.triggerPrint(f)
|
|
1131
|
+
}),
|
|
1132
|
+
n.handleRemoveIframe(!0),
|
|
1133
|
+
document.body.appendChild(f)
|
|
1134
|
+
} else {
|
|
1124
1135
|
n.logMessages([
|
|
1125
|
-
"
|
|
1126
|
-
])
|
|
1127
|
-
}),
|
|
1128
|
-
(n.handleRemoveIframe = function (e) {
|
|
1129
|
-
var t = n.props.removeAfterPrint;
|
|
1130
|
-
if (e || t) {
|
|
1131
|
-
var r = document.getElementById("printWindow");
|
|
1132
|
-
r && document.body.removeChild(r);
|
|
1136
|
+
'"react-to-print" could not locate the DOM node corresponding with the `content` prop'
|
|
1137
|
+
])
|
|
1133
1138
|
}
|
|
1134
|
-
}
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
+
} else {
|
|
1140
|
+
n.logMessages([
|
|
1141
|
+
'There is nothing to print because the "content" prop returned "null". Please ensure "content" is renderable before allowing "react-to-print" to be called.'
|
|
1142
|
+
])
|
|
1143
|
+
}
|
|
1144
|
+
} else {
|
|
1145
|
+
n.logMessages([
|
|
1146
|
+
'To print a functional component ensure it is wrapped with `React.forwardRef`, and ensure the forwarded ref is used. See the README for an example: https://github.com/gregnb/react-to-print#examples'
|
|
1147
|
+
])
|
|
1148
|
+
}
|
|
1149
|
+
}),
|
|
1150
|
+
(n.handleRemoveIframe = function (e) {
|
|
1151
|
+
const t = n.props.removeAfterPrint
|
|
1152
|
+
if (e || t) {
|
|
1153
|
+
const r = document.getElementById('printWindow')
|
|
1154
|
+
r && document.body.removeChild(r)
|
|
1155
|
+
}
|
|
1156
|
+
}),
|
|
1157
|
+
(n.logMessages = function (e, t) {
|
|
1158
|
+
void 0 === t && (t = 'error'),
|
|
1159
|
+
n.props.suppressErrors ||
|
|
1160
|
+
(t === 'error'
|
|
1139
1161
|
? console.error(e)
|
|
1140
|
-
:
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
if (!l)
|
|
1156
|
-
return (
|
|
1157
|
-
this.logMessages([
|
|
1158
|
-
'"react-to-print" requires React ^16.3.0 to be able to use "PrintContext"',
|
|
1159
|
-
]),
|
|
1160
|
-
null
|
|
1161
|
-
);
|
|
1162
|
-
var o = { handlePrint: this.handleClick };
|
|
1163
|
-
return n.createElement(l.Provider, { value: o }, t);
|
|
1164
|
-
}),
|
|
1165
|
-
(o.defaultProps = u),
|
|
1166
|
-
o
|
|
1167
|
-
);
|
|
1168
|
-
})(n.Component);
|
|
1169
|
-
(e.default = s),
|
|
1170
|
-
(e.useReactToPrint = function (e) {
|
|
1171
|
-
if (!c)
|
|
1162
|
+
: t === 'warning'
|
|
1163
|
+
? console.warn(e)
|
|
1164
|
+
: t === 'debug' && console.debug(e))
|
|
1165
|
+
}),
|
|
1166
|
+
n
|
|
1167
|
+
)
|
|
1168
|
+
}
|
|
1169
|
+
return (
|
|
1170
|
+
t.__extends(o, e),
|
|
1171
|
+
(o.prototype.render = function () {
|
|
1172
|
+
const e = this.props
|
|
1173
|
+
const t = e.children
|
|
1174
|
+
const r = e.trigger
|
|
1175
|
+
if (r) { return n.cloneElement(r(), { onClick: this.handleClick }) }
|
|
1176
|
+
if (!l) {
|
|
1172
1177
|
return (
|
|
1173
|
-
|
|
1178
|
+
this.logMessages([
|
|
1179
|
+
'"react-to-print" requires React ^16.3.0 to be able to use "PrintContext"'
|
|
1180
|
+
]),
|
|
1181
|
+
null
|
|
1182
|
+
)
|
|
1183
|
+
}
|
|
1184
|
+
const o = { handlePrint: this.handleClick }
|
|
1185
|
+
return n.createElement(l.Provider, { value: o }, t)
|
|
1186
|
+
}),
|
|
1187
|
+
(o.defaultProps = u),
|
|
1188
|
+
o
|
|
1189
|
+
)
|
|
1190
|
+
})(n.Component);
|
|
1191
|
+
(e.default = s),
|
|
1192
|
+
(e.useReactToPrint = function (e) {
|
|
1193
|
+
if (!c) {
|
|
1194
|
+
return (
|
|
1195
|
+
e.suppressErrors ||
|
|
1174
1196
|
console.error(
|
|
1175
1197
|
'"react-to-print" requires React ^16.8.0 to be able to use "useReactToPrint"'
|
|
1176
1198
|
),
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
})
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
})
|
|
1201
|
-
|
|
1199
|
+
function () {
|
|
1200
|
+
throw new Error(
|
|
1201
|
+
'"react-to-print" requires React ^16.8.0 to be able to use "useReactToPrint"'
|
|
1202
|
+
)
|
|
1203
|
+
}
|
|
1204
|
+
)
|
|
1205
|
+
}
|
|
1206
|
+
const r = n.useMemo(
|
|
1207
|
+
function () {
|
|
1208
|
+
return new s(t.__assign(t.__assign({}, u), e))
|
|
1209
|
+
},
|
|
1210
|
+
[e]
|
|
1211
|
+
)
|
|
1212
|
+
return n.useCallback(
|
|
1213
|
+
function () {
|
|
1214
|
+
return r.handleClick()
|
|
1215
|
+
},
|
|
1216
|
+
[r]
|
|
1217
|
+
)
|
|
1218
|
+
})
|
|
1219
|
+
})(),
|
|
1220
|
+
i
|
|
1221
|
+
)
|
|
1222
|
+
})()
|
|
1223
|
+
})
|