sanity-plugin-mux-input 1.2.0-main.4 → 1.2.0-main.5

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/lib/cjs/index.js CHANGED
@@ -1,38 +1,43 @@
1
- var $dyHF6$reactjsxruntime = require("react/jsx-runtime");
2
- var $dyHF6$react = require("react");
3
- var $dyHF6$sanity = require("sanity");
4
- var $dyHF6$sanityui = require("@sanity/ui");
5
- var $dyHF6$scrollintoviewifneeded = require("scroll-into-view-if-needed");
6
- var $dyHF6$suspendreact = require("suspend-react");
7
- var $dyHF6$useerrorboundary = require("use-error-boundary");
8
- var $dyHF6$sanity_unstable = require("sanity/_unstable");
9
- var $dyHF6$swr = require("swr");
10
- var $dyHF6$rxjs = require("rxjs");
11
- var $dyHF6$rxjsoperators = require("rxjs/operators");
12
- var $dyHF6$sanityform = require("sanity/form");
13
- var $dyHF6$sanityuuid = require("@sanity/uuid");
14
- var $dyHF6$muxupchunk = require("@mux/upchunk");
15
- var $dyHF6$reachautoid = require("@reach/auto-id");
16
- var $dyHF6$sanityicons = require("@sanity/icons");
17
- var $dyHF6$motion = require("motion");
18
- var $dyHF6$styledcomponents = require("styled-components");
19
- var $dyHF6$usedevicepixelratio = require("use-device-pixel-ratio");
20
- var $dyHF6$jsonwebtokenesmsign = require("jsonwebtoken-esm/sign");
21
- var $dyHF6$muxplaybackcore = require("@mux/playback-core");
22
- var $dyHF6$mediachromedistreact = require("media-chrome/dist/react");
23
- var $dyHF6$reactis = require("react-is");
1
+ var $ayBmS$swchelperslib_object_spreadjs = require("@swc/helpers/lib/_object_spread.js");
2
+ var $ayBmS$reactjsxruntime = require("react/jsx-runtime");
3
+ var $ayBmS$react = require("react");
4
+ var $ayBmS$sanity = require("sanity");
5
+ var $ayBmS$sanityui = require("@sanity/ui");
6
+ var $ayBmS$scrollintoviewifneeded = require("scroll-into-view-if-needed");
7
+ var $ayBmS$suspendreact = require("suspend-react");
8
+ var $ayBmS$useerrorboundary = require("use-error-boundary");
9
+ var $ayBmS$swchelperslib_object_spread_propsjs = require("@swc/helpers/lib/_object_spread_props.js");
10
+ var $ayBmS$sanity_unstable = require("sanity/_unstable");
11
+ var $ayBmS$swr = require("swr");
12
+ var $ayBmS$swchelperslib_define_propertyjs = require("@swc/helpers/lib/_define_property.js");
13
+ var $ayBmS$rxjs = require("rxjs");
14
+ var $ayBmS$rxjsoperators = require("rxjs/operators");
15
+ var $ayBmS$sanityform = require("sanity/form");
16
+ var $ayBmS$sanityuuid = require("@sanity/uuid");
17
+ var $ayBmS$muxupchunk = require("@mux/upchunk");
18
+ var $ayBmS$reachautoid = require("@reach/auto-id");
19
+ var $ayBmS$sanityicons = require("@sanity/icons");
20
+ var $ayBmS$motion = require("motion");
21
+ var $ayBmS$styledcomponents = require("styled-components");
22
+ var $ayBmS$usedevicepixelratio = require("use-device-pixel-ratio");
23
+ var $ayBmS$jsonwebtokenesm = require("jsonwebtoken-esm");
24
+ var $ayBmS$muxplaybackcore = require("@mux/playback-core");
25
+ var $ayBmS$mediachromedistreact = require("media-chrome/dist/react");
26
+ var $ayBmS$swchelperslib_object_without_propertiesjs = require("@swc/helpers/lib/_object_without_properties.js");
27
+ var $ayBmS$reactis = require("react-is");
24
28
 
25
- function $parcel$export(e, n, v, s) {
26
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
27
- }
28
29
  function $parcel$interopDefault(a) {
29
30
  return a && a.__esModule ? a.default : a;
30
31
  }
32
+ function $parcel$export(e, n, v, s) {
33
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
34
+ }
35
+
36
+ $parcel$export(module.exports, "defaultConfig", function () { return $35eb69de8ff825b5$export$f84bd70098573c5c; });
37
+ $parcel$export(module.exports, "muxInput", function () { return $35eb69de8ff825b5$export$4d2e76c338bb9fbd; });
38
+ $parcel$export(module.exports, "Input", function () { return $7988e690e4a01972$export$2e2bcd8739ae039; });
39
+ $parcel$export(module.exports, "Preview", function () { return $a1523ee7ee9b753a$export$2e2bcd8739ae039; });
31
40
 
32
- $parcel$export(module.exports, "defaultConfig", () => $329a1cedcedb1349$export$f84bd70098573c5c);
33
- $parcel$export(module.exports, "muxInput", () => $329a1cedcedb1349$export$4d2e76c338bb9fbd);
34
- $parcel$export(module.exports, "Input", () => $6bca891f5dd9dfc9$export$2e2bcd8739ae039);
35
- $parcel$export(module.exports, "Preview", () => $cbaf0acf64ca3573$export$2e2bcd8739ae039);
36
41
 
37
42
 
38
43
 
@@ -42,16 +47,16 @@ $parcel$export(module.exports, "Preview", () => $cbaf0acf64ca3573$export$2e2bcd8
42
47
 
43
48
 
44
49
 
45
- const $2ffcb7ef2a4a67d0$export$a8ff84c12d48cfa6 = "mux-input";
46
- const $2ffcb7ef2a4a67d0$export$13cdb654d47e0703 = "sanity-plugin-mux-input";
47
- const $2ffcb7ef2a4a67d0$export$64952397958089dd = "secrets.mux";
50
+ const $764163079c542eaf$export$a8ff84c12d48cfa6 = "mux-input";
51
+ const $764163079c542eaf$export$13cdb654d47e0703 = "sanity-plugin-mux-input";
52
+ const $764163079c542eaf$export$64952397958089dd = "secrets.mux";
48
53
 
49
54
 
50
- function $440e5e6a7a1a5e7d$var$ErrorBoundaryCard(props) {
55
+ function $23a5e4ef1c8a3996$var$ErrorBoundaryCard(props) {
51
56
  const { children: children , schemaType: schemaType } = props;
52
- const { push: pushToast } = (0, $dyHF6$sanityui.useToast)();
53
- const errorRef = (0, $dyHF6$react.useRef)(null);
54
- const { ErrorBoundary: ErrorBoundary , didCatch: didCatch , error: error , reset: reset } = (0, $dyHF6$useerrorboundary.useErrorBoundary)({
57
+ const { push: pushToast } = (0, $ayBmS$sanityui.useToast)();
58
+ const errorRef = (0, $ayBmS$react.useRef)(null);
59
+ const { ErrorBoundary: ErrorBoundary , didCatch: didCatch , error: error , reset: reset } = (0, $ayBmS$useerrorboundary.useErrorBoundary)({
55
60
  onDidCatch: (err, errorInfo)=>{
56
61
  console.group(err.toString());
57
62
  console.groupCollapsed("console.error");
@@ -62,7 +67,7 @@ function $440e5e6a7a1a5e7d$var$ErrorBoundaryCard(props) {
62
67
  console.log(err.stack);
63
68
  console.groupEnd();
64
69
  }
65
- if (errorInfo?.componentStack) {
70
+ if (errorInfo === null || errorInfo === void 0 ? void 0 : errorInfo.componentStack) {
66
71
  console.groupCollapsed("errorInfo.componentStack");
67
72
  console.log(errorInfo.componentStack);
68
73
  console.groupEnd();
@@ -71,13 +76,13 @@ function $440e5e6a7a1a5e7d$var$ErrorBoundaryCard(props) {
71
76
  pushToast({
72
77
  status: "error",
73
78
  title: "Plugin crashed",
74
- description: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Flex), {
79
+ description: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Flex), {
75
80
  align: "center",
76
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Inline), {
81
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Inline), {
77
82
  space: 1,
78
83
  children: [
79
84
  "An error happened while rendering",
80
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Button), {
85
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Button), {
81
86
  padding: 1,
82
87
  fontSize: 1,
83
88
  style: {
@@ -86,7 +91,7 @@ function $440e5e6a7a1a5e7d$var$ErrorBoundaryCard(props) {
86
91
  mode: "ghost",
87
92
  text: schemaType.title,
88
93
  onClick: ()=>{
89
- if (errorRef.current) (0, ($parcel$interopDefault($dyHF6$scrollintoviewifneeded)))(errorRef.current, {
94
+ if (errorRef.current) (0, ($parcel$interopDefault($ayBmS$scrollintoviewifneeded)))(errorRef.current, {
90
95
  behavior: "smooth",
91
96
  scrollMode: "if-needed",
92
97
  block: "center"
@@ -99,16 +104,16 @@ function $440e5e6a7a1a5e7d$var$ErrorBoundaryCard(props) {
99
104
  });
100
105
  }
101
106
  });
102
- const handleRetry = (0, $dyHF6$react.useCallback)(()=>{
107
+ const handleRetry = (0, $ayBmS$react.useCallback)(()=>{
103
108
  // Purge request cache before retrying, otherwise the cached errors will rethrow
104
- (0, $dyHF6$suspendreact.clear)([
105
- (0, $2ffcb7ef2a4a67d0$export$a8ff84c12d48cfa6)
109
+ (0, $ayBmS$suspendreact.clear)([
110
+ (0, $764163079c542eaf$export$a8ff84c12d48cfa6)
106
111
  ]);
107
112
  reset();
108
113
  }, [
109
114
  reset
110
115
  ]);
111
- if (didCatch) return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Card), {
116
+ if (didCatch) return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Card), {
112
117
  ref: errorRef,
113
118
  paddingX: [
114
119
  2,
@@ -119,11 +124,11 @@ function $440e5e6a7a1a5e7d$var$ErrorBoundaryCard(props) {
119
124
  height: "fill",
120
125
  shadow: 1,
121
126
  overflow: "auto",
122
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Flex), {
127
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Flex), {
123
128
  justify: "flex-start",
124
129
  align: "center",
125
130
  height: "fill",
126
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Grid), {
131
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Grid), {
127
132
  columns: 1,
128
133
  gap: [
129
134
  2,
@@ -132,27 +137,27 @@ function $440e5e6a7a1a5e7d$var$ErrorBoundaryCard(props) {
132
137
  4
133
138
  ],
134
139
  children: [
135
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Heading), {
140
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Heading), {
136
141
  as: "h1",
137
142
  children: [
138
143
  "The ",
139
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("code", {
140
- children: (0, $2ffcb7ef2a4a67d0$export$a8ff84c12d48cfa6)
144
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("code", {
145
+ children: (0, $764163079c542eaf$export$a8ff84c12d48cfa6)
141
146
  }),
142
147
  " plugin crashed"
143
148
  ]
144
149
  }),
145
- error?.message && /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Card), {
150
+ (error === null || error === void 0 ? void 0 : error.message) && /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Card), {
146
151
  padding: 3,
147
152
  tone: "critical",
148
153
  shadow: 1,
149
154
  radius: 2,
150
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Text), {
155
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Text), {
151
156
  children: error.message
152
157
  })
153
158
  }),
154
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Inline), {
155
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Button), {
159
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Inline), {
160
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Button), {
156
161
  onClick: handleRetry,
157
162
  text: "Retry"
158
163
  })
@@ -161,11 +166,13 @@ function $440e5e6a7a1a5e7d$var$ErrorBoundaryCard(props) {
161
166
  })
162
167
  })
163
168
  });
164
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)(ErrorBoundary, {
169
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)(ErrorBoundary, {
165
170
  children: children
166
171
  });
167
172
  }
168
- var $440e5e6a7a1a5e7d$export$2e2bcd8739ae039 = /*#__PURE__*/ (0, $dyHF6$react.memo)($440e5e6a7a1a5e7d$var$ErrorBoundaryCard);
173
+ var $23a5e4ef1c8a3996$export$2e2bcd8739ae039 = /*#__PURE__*/ (0, $ayBmS$react.memo)($23a5e4ef1c8a3996$var$ErrorBoundaryCard);
174
+
175
+
169
176
 
170
177
 
171
178
 
@@ -173,7 +180,7 @@ var $440e5e6a7a1a5e7d$export$2e2bcd8739ae039 = /*#__PURE__*/ (0, $dyHF6$react.me
173
180
 
174
181
 
175
182
 
176
- const $eef844dd0892040d$var$path = [
183
+ const $91e90464b4ca45aa$var$path = [
177
184
  "assetId",
178
185
  "data",
179
186
  "playbackId",
@@ -181,28 +188,32 @@ const $eef844dd0892040d$var$path = [
181
188
  "thumbTime",
182
189
  "filename"
183
190
  ];
184
- const $eef844dd0892040d$export$e11a382d55e07f75 = (asset)=>(0, $dyHF6$sanity_unstable.useDocumentValues)((0, $dyHF6$sanity.isReference)(asset) ? asset._ref : "", $eef844dd0892040d$var$path);
191
+ const $91e90464b4ca45aa$export$e11a382d55e07f75 = (asset)=>(0, $ayBmS$sanity_unstable.useDocumentValues)((0, $ayBmS$sanity.isReference)(asset) ? asset._ref : "", $91e90464b4ca45aa$var$path);
185
192
 
186
193
 
187
194
 
188
- function $af23ed16e7325a21$export$573903f1c655c034() {
189
- return (0, $dyHF6$react.useState)(false);
195
+ function $8ea54a6e4798432c$export$573903f1c655c034() {
196
+ return (0, $ayBmS$react.useState)(false);
190
197
  }
191
198
 
192
199
 
193
200
 
194
201
 
195
202
 
196
- const $9427a85db5895988$export$fd270df25d7dbb88 = (asset)=>{
197
- const client = (0, $dyHF6$sanity.useClient)();
198
- const projectId = (0, $dyHF6$sanity.useProjectId)();
199
- const dataset = (0, $dyHF6$sanity.useDataset)();
200
- const shouldFetch = (0, $dyHF6$react.useMemo)(()=>!!asset?.assetId && (asset?.status === "preparing" || asset?.data?.static_renditions?.status === "preparing"), [
201
- asset?.assetId,
202
- asset?.data?.static_renditions?.status,
203
- asset?.status
203
+ const $b098b0d885e904ff$export$fd270df25d7dbb88 = (asset)=>{
204
+ var ref3, ref1;
205
+ const client = (0, $ayBmS$sanity.useClient)();
206
+ const projectId = (0, $ayBmS$sanity.useProjectId)();
207
+ const dataset = (0, $ayBmS$sanity.useDataset)();
208
+ const shouldFetch = (0, $ayBmS$react.useMemo)(()=>{
209
+ var ref, ref2;
210
+ return !!(asset === null || asset === void 0 ? void 0 : asset.assetId) && ((asset === null || asset === void 0 ? void 0 : asset.status) === "preparing" || (asset === null || asset === void 0 ? void 0 : (ref = asset.data) === null || ref === void 0 ? void 0 : (ref2 = ref.static_renditions) === null || ref2 === void 0 ? void 0 : ref2.status) === "preparing");
211
+ }, [
212
+ asset === null || asset === void 0 ? void 0 : asset.assetId,
213
+ asset === null || asset === void 0 ? void 0 : (ref3 = asset.data) === null || ref3 === void 0 ? void 0 : (ref1 = ref3.static_renditions) === null || ref1 === void 0 ? void 0 : ref1.status,
214
+ asset === null || asset === void 0 ? void 0 : asset.status
204
215
  ]);
205
- return (0, ($parcel$interopDefault($dyHF6$swr)))(shouldFetch ? `/${projectId}/addons/mux/assets/${dataset}/data/${asset?.assetId}` : null, async ()=>{
216
+ return (0, ($parcel$interopDefault($ayBmS$swr)))(shouldFetch ? `/${projectId}/addons/mux/assets/${dataset}/data/${asset === null || asset === void 0 ? void 0 : asset.assetId}` : null, async ()=>{
206
217
  const { data: data } = await client.request({
207
218
  url: `/addons/mux/assets/${dataset}/data/${asset.assetId}`,
208
219
  withCredentials: true,
@@ -225,27 +236,27 @@ const $9427a85db5895988$export$fd270df25d7dbb88 = (asset)=>{
225
236
 
226
237
 
227
238
 
228
- const $8a0ef7d2f7c4ca7e$var$path = [
239
+ const $e0562e9a5cd26710$var$path = [
229
240
  "token",
230
241
  "secretKey",
231
242
  "enableSignedUrls",
232
243
  "signingKeyId",
233
244
  "signingKeyPrivate"
234
245
  ];
235
- const $8a0ef7d2f7c4ca7e$export$4c2801830a129eb = ()=>{
236
- const { error: error , isLoading: isLoading , value: value } = (0, $dyHF6$sanity_unstable.useDocumentValues)((0, $2ffcb7ef2a4a67d0$export$64952397958089dd), $8a0ef7d2f7c4ca7e$var$path);
237
- const cache = (0, $dyHF6$react.useMemo)(()=>{
246
+ const $e0562e9a5cd26710$export$4c2801830a129eb = ()=>{
247
+ const { error: error , isLoading: isLoading , value: value } = (0, $ayBmS$sanity_unstable.useDocumentValues)((0, $764163079c542eaf$export$64952397958089dd), $e0562e9a5cd26710$var$path);
248
+ const cache = (0, $ayBmS$react.useMemo)(()=>{
238
249
  const exists = Boolean(value);
239
250
  const secrets = {
240
- token: value?.token || null,
241
- secretKey: value?.secretKey || null,
242
- enableSignedUrls: value?.enableSignedUrls || false,
243
- signingKeyId: value?.signingKeyId || null,
244
- signingKeyPrivate: value?.signingKeyPrivate || null
251
+ token: (value === null || value === void 0 ? void 0 : value.token) || null,
252
+ secretKey: (value === null || value === void 0 ? void 0 : value.secretKey) || null,
253
+ enableSignedUrls: (value === null || value === void 0 ? void 0 : value.enableSignedUrls) || false,
254
+ signingKeyId: (value === null || value === void 0 ? void 0 : value.signingKeyId) || null,
255
+ signingKeyPrivate: (value === null || value === void 0 ? void 0 : value.signingKeyPrivate) || null
245
256
  };
246
257
  return {
247
258
  isInitialSetup: !exists,
248
- needsSetup: !secrets?.token || !secrets?.secretKey,
259
+ needsSetup: !(secrets === null || secrets === void 0 ? void 0 : secrets.token) || !(secrets === null || secrets === void 0 ? void 0 : secrets.secretKey),
249
260
  secrets: secrets
250
261
  };
251
262
  }, [
@@ -269,9 +280,12 @@ const $8a0ef7d2f7c4ca7e$export$4c2801830a129eb = ()=>{
269
280
 
270
281
 
271
282
 
272
- function $3dde8b7caa07e0e7$export$ad6eab20b4b3876f(uuid, uploadUrl, source) {
273
- return new (0, $dyHF6$rxjs.Observable)((subscriber)=>{
274
- const upchunk = $dyHF6$muxupchunk.createUpload({
283
+
284
+
285
+
286
+ function $769e09a03b9726c9$export$ad6eab20b4b3876f(uuid, uploadUrl, source) {
287
+ return new (0, $ayBmS$rxjs.Observable)((subscriber)=>{
288
+ const upchunk = $ayBmS$muxupchunk.createUpload({
275
289
  endpoint: uploadUrl,
276
290
  file: source,
277
291
  chunkSize: 30720
@@ -314,7 +328,7 @@ function $3dde8b7caa07e0e7$export$ad6eab20b4b3876f(uuid, uploadUrl, source) {
314
328
  }
315
329
 
316
330
 
317
- function $a0485042ac477352$export$df987b50509121ea(client, assetId) {
331
+ function $85b2a8cdf745d7d3$export$df987b50509121ea(client, assetId) {
318
332
  const { dataset: dataset } = client.config();
319
333
  return client.request({
320
334
  url: `/addons/mux/assets/${dataset}/${assetId}`,
@@ -322,7 +336,7 @@ function $a0485042ac477352$export$df987b50509121ea(client, assetId) {
322
336
  method: "DELETE"
323
337
  });
324
338
  }
325
- function $a0485042ac477352$export$da446a5ee2572b7(client, assetId) {
339
+ function $85b2a8cdf745d7d3$export$da446a5ee2572b7(client, assetId) {
326
340
  const { dataset: dataset } = client.config();
327
341
  return client.request({
328
342
  url: `/addons/mux/assets/${dataset}/data/${assetId}`,
@@ -333,7 +347,7 @@ function $a0485042ac477352$export$da446a5ee2572b7(client, assetId) {
333
347
 
334
348
 
335
349
 
336
- function $58acdddf66edce65$export$f16c6d66b9790f06(client, token, secretKey, enableSignedUrls, signingKeyId, signingKeyPrivate) {
350
+ function $4d6664636d7d58e3$export$f16c6d66b9790f06(client, token, secretKey, enableSignedUrls, signingKeyId, signingKeyPrivate) {
337
351
  const doc = {
338
352
  _id: "secrets.mux",
339
353
  _type: "mux.apiKey",
@@ -345,7 +359,7 @@ function $58acdddf66edce65$export$f16c6d66b9790f06(client, token, secretKey, ena
345
359
  };
346
360
  return client.createOrReplace(doc);
347
361
  }
348
- function $58acdddf66edce65$export$21cc0cab779cfac1(client) {
362
+ function $4d6664636d7d58e3$export$21cc0cab779cfac1(client) {
349
363
  const { dataset: dataset } = client.config();
350
364
  return client.request({
351
365
  url: `/addons/mux/signing-keys/${dataset}`,
@@ -353,7 +367,7 @@ function $58acdddf66edce65$export$21cc0cab779cfac1(client) {
353
367
  method: "POST"
354
368
  });
355
369
  }
356
- function $58acdddf66edce65$export$3a1df1322191b3ef(client) {
370
+ function $4d6664636d7d58e3$export$3a1df1322191b3ef(client) {
357
371
  const { dataset: dataset } = client.config();
358
372
  return client.request({
359
373
  url: `/addons/mux/secrets/${dataset}/test`,
@@ -361,7 +375,7 @@ function $58acdddf66edce65$export$3a1df1322191b3ef(client) {
361
375
  method: "GET"
362
376
  });
363
377
  }
364
- async function $58acdddf66edce65$export$f5836111430d17bc(client, signingKeyId, signingKeyPrivate) {
378
+ async function $4d6664636d7d58e3$export$f5836111430d17bc(client, signingKeyId, signingKeyPrivate) {
365
379
  if (!(signingKeyId && signingKeyPrivate)) return false;
366
380
  const { dataset: dataset } = client.config();
367
381
  try {
@@ -379,9 +393,9 @@ async function $58acdddf66edce65$export$f5836111430d17bc(client, signingKeyId, s
379
393
  return false;
380
394
  }
381
395
  }
382
- function $58acdddf66edce65$export$7d1f83854429bc73(client) {
396
+ function $4d6664636d7d58e3$export$7d1f83854429bc73(client) {
383
397
  const { dataset: dataset } = client.config();
384
- return (0, $dyHF6$rxjs.defer)(()=>client.observable.request({
398
+ return (0, $ayBmS$rxjs.defer)(()=>client.observable.request({
385
399
  url: `/addons/mux/secrets/${dataset}/test`,
386
400
  withCredentials: true,
387
401
  method: "GET"
@@ -389,21 +403,21 @@ function $58acdddf66edce65$export$7d1f83854429bc73(client) {
389
403
  }
390
404
 
391
405
 
392
- function $4a210fa13f9688e9$export$5130fb4c263997a4(client, uuid) {
406
+ function $12591da830e5242f$export$5130fb4c263997a4(client, uuid) {
393
407
  return client.observable.request({
394
408
  url: `/addons/mux/uploads/${client.clientConfig.dataset}/${uuid}`,
395
409
  withCredentials: true,
396
410
  method: "DELETE"
397
411
  });
398
412
  }
399
- function $4a210fa13f9688e9$export$f35af194eb27b25f(config, client, url, options = {}) {
400
- return $4a210fa13f9688e9$var$testUrl(url).pipe((0, $dyHF6$rxjsoperators.switchMap)((validUrl)=>{
401
- return (0, $dyHF6$rxjs.concat)((0, $dyHF6$rxjs.of)({
413
+ function $12591da830e5242f$export$f35af194eb27b25f(config, client, url, options = {}) {
414
+ return $12591da830e5242f$var$testUrl(url).pipe((0, $ayBmS$rxjsoperators.switchMap)((validUrl)=>{
415
+ return (0, $ayBmS$rxjs.concat)((0, $ayBmS$rxjs.of)({
402
416
  type: "url",
403
417
  url: validUrl
404
- }), (0, $58acdddf66edce65$export$7d1f83854429bc73)(client).pipe((0, $dyHF6$rxjsoperators.switchMap)((json)=>{
405
- if (!json || !json.status) return (0, $dyHF6$rxjs.throwError)(new Error("Invalid credentials"));
406
- const uuid = (0, $dyHF6$sanityuuid.uuid)();
418
+ }), (0, $4d6664636d7d58e3$export$7d1f83854429bc73)(client).pipe((0, $ayBmS$rxjsoperators.switchMap)((json)=>{
419
+ if (!json || !json.status) return (0, $ayBmS$rxjs.throwError)(new Error("Invalid credentials"));
420
+ const uuid = (0, $ayBmS$sanityuuid.uuid)();
407
421
  const { enableSignedUrls: enableSignedUrls } = options;
408
422
  const muxBody = {
409
423
  input: validUrl,
@@ -417,7 +431,7 @@ function $4a210fa13f9688e9$export$f35af194eb27b25f(config, client, url, options
417
431
  filename: validUrl.split("/").slice(-1)[0]
418
432
  };
419
433
  const dataset = client.clientConfig.dataset;
420
- return (0, $dyHF6$rxjs.defer)(()=>client.observable.request({
434
+ return (0, $ayBmS$rxjs.defer)(()=>client.observable.request({
421
435
  url: `/addons/mux/assets/${dataset}`,
422
436
  withCredentials: true,
423
437
  method: "POST",
@@ -426,10 +440,10 @@ function $4a210fa13f9688e9$export$f35af194eb27b25f(config, client, url, options
426
440
  "Content-Type": "application/json"
427
441
  },
428
442
  query: query
429
- })).pipe((0, $dyHF6$rxjsoperators.mergeMap)((result)=>{
443
+ })).pipe((0, $ayBmS$rxjsoperators.mergeMap)((result)=>{
430
444
  const asset = result && result.results && result.results[0] && result.results[0].document || null;
431
- if (!asset) return (0, $dyHF6$rxjs.throwError)(new Error("No asset document returned"));
432
- return (0, $dyHF6$rxjs.of)({
445
+ if (!asset) return (0, $ayBmS$rxjs.throwError)(new Error("No asset document returned"));
446
+ return (0, $ayBmS$rxjs.of)({
433
447
  type: "success",
434
448
  id: uuid,
435
449
  asset: asset
@@ -438,14 +452,14 @@ function $4a210fa13f9688e9$export$f35af194eb27b25f(config, client, url, options
438
452
  })));
439
453
  }));
440
454
  }
441
- function $4a210fa13f9688e9$export$a5575dbeeffdad98(config, client, file, options = {}) {
442
- return $4a210fa13f9688e9$var$testFile(file).pipe((0, $dyHF6$rxjsoperators.switchMap)((fileOptions)=>{
443
- return (0, $dyHF6$rxjs.concat)((0, $dyHF6$rxjs.of)({
455
+ function $12591da830e5242f$export$a5575dbeeffdad98(config, client, file, options = {}) {
456
+ return $12591da830e5242f$var$testFile(file).pipe((0, $ayBmS$rxjsoperators.switchMap)((fileOptions)=>{
457
+ return (0, $ayBmS$rxjs.concat)((0, $ayBmS$rxjs.of)({
444
458
  type: "file",
445
459
  file: fileOptions
446
- }), (0, $58acdddf66edce65$export$7d1f83854429bc73)(client).pipe((0, $dyHF6$rxjsoperators.switchMap)((json)=>{
447
- if (!json || !json.status) return (0, $dyHF6$rxjs.throwError)(new Error("Invalid credentials"));
448
- const uuid = (0, $dyHF6$sanityuuid.uuid)();
460
+ }), (0, $4d6664636d7d58e3$export$7d1f83854429bc73)(client).pipe((0, $ayBmS$rxjsoperators.switchMap)((json)=>{
461
+ if (!json || !json.status) return (0, $ayBmS$rxjs.throwError)(new Error("Invalid credentials"));
462
+ const uuid = (0, $ayBmS$sanityuuid.uuid)();
449
463
  const { enableSignedUrls: enableSignedUrls } = options;
450
464
  const body = {
451
465
  mp4_support: config.mp4_support,
@@ -453,10 +467,10 @@ function $4a210fa13f9688e9$export$a5575dbeeffdad98(config, client, file, options
453
467
  enableSignedUrls ? "signed" : "public"
454
468
  ]
455
469
  };
456
- return (0, $dyHF6$rxjs.concat)((0, $dyHF6$rxjs.of)({
470
+ return (0, $ayBmS$rxjs.concat)((0, $ayBmS$rxjs.of)({
457
471
  type: "uuid",
458
472
  uuid: uuid
459
- }), (0, $dyHF6$rxjs.defer)(()=>client.observable.request({
473
+ }), (0, $ayBmS$rxjs.defer)(()=>client.observable.request({
460
474
  url: `/addons/mux/uploads/${client.clientConfig.dataset}`,
461
475
  withCredentials: true,
462
476
  method: "POST",
@@ -465,27 +479,26 @@ function $4a210fa13f9688e9$export$a5575dbeeffdad98(config, client, file, options
465
479
  "Content-Type": "application/json"
466
480
  },
467
481
  body: body
468
- })).pipe((0, $dyHF6$rxjsoperators.mergeMap)((result)=>{
469
- return (0, $3dde8b7caa07e0e7$export$ad6eab20b4b3876f)(uuid, result.upload.url, file).pipe(// eslint-disable-next-line no-warning-comments
482
+ })).pipe((0, $ayBmS$rxjsoperators.mergeMap)((result)=>{
483
+ return (0, $769e09a03b9726c9$export$ad6eab20b4b3876f)(uuid, result.upload.url, file).pipe(// eslint-disable-next-line no-warning-comments
470
484
  // @TODO type the observable events
471
485
  // eslint-disable-next-line max-nested-callbacks
472
- (0, $dyHF6$rxjsoperators.mergeMap)((event)=>{
473
- if (event.type !== "success") return (0, $dyHF6$rxjs.of)(event);
474
- return (0, $dyHF6$rxjs.from)($4a210fa13f9688e9$var$updateAssetDocumentFromUpload(client, uuid)).pipe(// eslint-disable-next-line max-nested-callbacks
475
- (0, $dyHF6$rxjsoperators.mergeMap)((doc)=>(0, $dyHF6$rxjs.of)({
476
- ...event,
486
+ (0, $ayBmS$rxjsoperators.mergeMap)((event)=>{
487
+ if (event.type !== "success") return (0, $ayBmS$rxjs.of)(event);
488
+ return (0, $ayBmS$rxjs.from)($12591da830e5242f$var$updateAssetDocumentFromUpload(client, uuid)).pipe(// eslint-disable-next-line max-nested-callbacks
489
+ (0, $ayBmS$rxjsoperators.mergeMap)((doc)=>(0, $ayBmS$rxjs.of)((0, ($parcel$interopDefault($ayBmS$swchelperslib_object_spread_propsjs)))((0, ($parcel$interopDefault($ayBmS$swchelperslib_object_spreadjs)))({}, event), {
477
490
  asset: doc
478
- })));
491
+ }))));
479
492
  }), // eslint-disable-next-line max-nested-callbacks
480
- (0, $dyHF6$rxjsoperators.catchError)((err)=>{
493
+ (0, $ayBmS$rxjsoperators.catchError)((err)=>{
481
494
  // Delete asset document
482
- return $4a210fa13f9688e9$export$5130fb4c263997a4(client, uuid).pipe((0, $dyHF6$rxjsoperators.mergeMapTo)((0, $dyHF6$rxjs.throwError)(err)));
495
+ return $12591da830e5242f$export$5130fb4c263997a4(client, uuid).pipe((0, $ayBmS$rxjsoperators.mergeMapTo)((0, $ayBmS$rxjs.throwError)(err)));
483
496
  }));
484
497
  })));
485
498
  })));
486
499
  }));
487
500
  }
488
- function $4a210fa13f9688e9$export$38276c014c550f86(client, assetId) {
501
+ function $12591da830e5242f$export$38276c014c550f86(client, assetId) {
489
502
  const { dataset: dataset } = client.config();
490
503
  return client.request({
491
504
  url: `/addons/mux/uploads/${dataset}/${assetId}`,
@@ -493,7 +506,7 @@ function $4a210fa13f9688e9$export$38276c014c550f86(client, assetId) {
493
506
  method: "GET"
494
507
  });
495
508
  }
496
- function $4a210fa13f9688e9$var$pollUpload(client, uuid) {
509
+ function $12591da830e5242f$var$pollUpload(client, uuid) {
497
510
  const maxTries = 10;
498
511
  let pollInterval;
499
512
  let tries = 0;
@@ -502,7 +515,7 @@ function $4a210fa13f9688e9$var$pollUpload(client, uuid) {
502
515
  return new Promise((resolve, reject)=>{
503
516
  pollInterval = setInterval(async ()=>{
504
517
  try {
505
- upload = await $4a210fa13f9688e9$export$38276c014c550f86(client, uuid);
518
+ upload = await $12591da830e5242f$export$38276c014c550f86(client, uuid);
506
519
  } catch (err) {
507
520
  reject(err);
508
521
  return;
@@ -520,16 +533,16 @@ function $4a210fa13f9688e9$var$pollUpload(client, uuid) {
520
533
  }, 2000);
521
534
  });
522
535
  }
523
- async function $4a210fa13f9688e9$var$updateAssetDocumentFromUpload(client, uuid) {
536
+ async function $12591da830e5242f$var$updateAssetDocumentFromUpload(client, uuid) {
524
537
  let upload;
525
538
  let asset;
526
539
  try {
527
- upload = await $4a210fa13f9688e9$var$pollUpload(client, uuid);
540
+ upload = await $12591da830e5242f$var$pollUpload(client, uuid);
528
541
  } catch (err) {
529
542
  return Promise.reject(err);
530
543
  }
531
544
  try {
532
- asset = await (0, $a0485042ac477352$export$da446a5ee2572b7)(client, upload.data.asset_id);
545
+ asset = await (0, $85b2a8cdf745d7d3$export$da446a5ee2572b7)(client, upload.data.asset_id);
533
546
  } catch (err1) {
534
547
  return Promise.reject(err1);
535
548
  }
@@ -546,26 +559,26 @@ async function $4a210fa13f9688e9$var$updateAssetDocumentFromUpload(client, uuid)
546
559
  return doc;
547
560
  });
548
561
  }
549
- function $4a210fa13f9688e9$var$testFile(file) {
562
+ function $12591da830e5242f$var$testFile(file) {
550
563
  if (typeof window !== "undefined" && file instanceof window.File) {
551
- const fileOptions = $4a210fa13f9688e9$var$optionsFromFile({}, file);
552
- return (0, $dyHF6$rxjs.of)(fileOptions);
564
+ const fileOptions = $12591da830e5242f$var$optionsFromFile({}, file);
565
+ return (0, $ayBmS$rxjs.of)(fileOptions);
553
566
  }
554
- return (0, $dyHF6$rxjs.throwError)(new Error("Invalid file"));
567
+ return (0, $ayBmS$rxjs.throwError)(new Error("Invalid file"));
555
568
  }
556
- function $4a210fa13f9688e9$var$testUrl(url) {
569
+ function $12591da830e5242f$var$testUrl(url) {
557
570
  const error = new Error("Invalid URL");
558
- if (typeof url !== "string") return (0, $dyHF6$rxjs.throwError)(error);
571
+ if (typeof url !== "string") return (0, $ayBmS$rxjs.throwError)(error);
559
572
  let parsed;
560
573
  try {
561
574
  parsed = new URL(url);
562
575
  } catch (err) {
563
- return (0, $dyHF6$rxjs.throwError)(error);
576
+ return (0, $ayBmS$rxjs.throwError)(error);
564
577
  }
565
- if (parsed && !parsed.protocol.match(/http:|https:/)) return (0, $dyHF6$rxjs.throwError)(error);
566
- return (0, $dyHF6$rxjs.of)(url);
578
+ if (parsed && !parsed.protocol.match(/http:|https:/)) return (0, $ayBmS$rxjs.throwError)(error);
579
+ return (0, $ayBmS$rxjs.of)(url);
567
580
  }
568
- function $4a210fa13f9688e9$var$optionsFromFile(opts, file) {
581
+ function $12591da830e5242f$var$optionsFromFile(opts, file) {
569
582
  if (typeof window === "undefined" || !(file instanceof window.File)) return opts;
570
583
  return {
571
584
  name: opts.preserveFilename === false ? undefined : file.name,
@@ -574,13 +587,13 @@ function $4a210fa13f9688e9$var$optionsFromFile(opts, file) {
574
587
  }
575
588
 
576
589
 
577
- function $94a513daa91cd04e$export$73f6d6d8d794f645(dataTransfer) {
590
+ function $f981bc359ea69985$export$73f6d6d8d794f645(dataTransfer) {
578
591
  const files = Array.from(dataTransfer.files || []);
579
592
  const items = Array.from(dataTransfer.items || []);
580
593
  if (files && files.length > 0) return Promise.resolve(files);
581
- return $94a513daa91cd04e$var$normalizeItems(items).then((arr)=>arr.flat());
594
+ return $f981bc359ea69985$var$normalizeItems(items).then((arr)=>arr.flat());
582
595
  }
583
- function $94a513daa91cd04e$var$normalizeItems(items) {
596
+ function $f981bc359ea69985$var$normalizeItems(items) {
584
597
  return Promise.all(items.map((item)=>{
585
598
  // directory
586
599
  if (item.kind === "file" && item.webkitGetAsEntry) {
@@ -594,7 +607,7 @@ function $94a513daa91cd04e$var$normalizeItems(items) {
594
607
  ];
595
608
  }
596
609
  if (!entry) return [];
597
- return entry.isDirectory ? $94a513daa91cd04e$var$walk(entry) : [
610
+ return entry.isDirectory ? $f981bc359ea69985$var$walk(entry) : [
598
611
  item.getAsFile()
599
612
  ];
600
613
  }
@@ -615,19 +628,19 @@ function $94a513daa91cd04e$var$normalizeItems(items) {
615
628
  ] : []);
616
629
  }));
617
630
  }
618
- function $94a513daa91cd04e$var$isFile(entry) {
631
+ function $f981bc359ea69985$var$isFile(entry) {
619
632
  return entry.isFile;
620
633
  }
621
- function $94a513daa91cd04e$var$isDirectory(entry) {
634
+ function $f981bc359ea69985$var$isDirectory(entry) {
622
635
  return entry.isDirectory;
623
636
  }
624
- function $94a513daa91cd04e$var$walk(entry) {
625
- if ($94a513daa91cd04e$var$isFile(entry)) return new Promise((resolve)=>entry.file(resolve)).then((file)=>[
637
+ function $f981bc359ea69985$var$walk(entry) {
638
+ if ($f981bc359ea69985$var$isFile(entry)) return new Promise((resolve)=>entry.file(resolve)).then((file)=>[
626
639
  file
627
640
  ]);
628
- if ($94a513daa91cd04e$var$isDirectory(entry)) {
641
+ if ($f981bc359ea69985$var$isDirectory(entry)) {
629
642
  const dir = entry.createReader();
630
- return new Promise((resolve)=>dir.readEntries(resolve)).then((entries)=>entries.filter((entr)=>!entr.name.startsWith("."))).then((entries)=>Promise.all(entries.map($94a513daa91cd04e$var$walk)).then((arr)=>arr.flat()));
643
+ return new Promise((resolve)=>dir.readEntries(resolve)).then((entries)=>entries.filter((entr)=>!entr.name.startsWith("."))).then((entries)=>Promise.all(entries.map($f981bc359ea69985$var$walk)).then((arr)=>arr.flat()));
631
644
  }
632
645
  return Promise.resolve([]);
633
646
  }
@@ -664,10 +677,10 @@ function $94a513daa91cd04e$var$walk(entry) {
664
677
 
665
678
 
666
679
 
667
- const $edbbfc11873e0f23$export$9c7ae676ac45430a = "secrets.mux";
668
- function $edbbfc11873e0f23$export$e6f48a1ef9de02f7(client) {
680
+ const $ca60bbd6b265fe38$export$9c7ae676ac45430a = "secrets.mux";
681
+ function $ca60bbd6b265fe38$export$e6f48a1ef9de02f7(client) {
669
682
  const { projectId: projectId , dataset: dataset } = client.config();
670
- return (0, $dyHF6$suspendreact.suspend)(async ()=>{
683
+ return (0, $ayBmS$suspendreact.suspend)(async ()=>{
671
684
  const data = await client.fetch(/* groq */ `*[_id == $_id][0]{
672
685
  token,
673
686
  secretKey,
@@ -675,34 +688,36 @@ function $edbbfc11873e0f23$export$e6f48a1ef9de02f7(client) {
675
688
  signingKeyId,
676
689
  signingKeyPrivate
677
690
  }`, {
678
- _id: $edbbfc11873e0f23$export$9c7ae676ac45430a
691
+ _id: $ca60bbd6b265fe38$export$9c7ae676ac45430a
679
692
  });
680
693
  return {
681
- token: data?.token || null,
682
- secretKey: data?.secretKey || null,
683
- enableSignedUrls: Boolean(data?.enableSignedUrls) || false,
684
- signingKeyId: data?.signingKeyId || null,
685
- signingKeyPrivate: data?.signingKeyPrivate || null
694
+ token: (data === null || data === void 0 ? void 0 : data.token) || null,
695
+ secretKey: (data === null || data === void 0 ? void 0 : data.secretKey) || null,
696
+ enableSignedUrls: Boolean(data === null || data === void 0 ? void 0 : data.enableSignedUrls) || false,
697
+ signingKeyId: (data === null || data === void 0 ? void 0 : data.signingKeyId) || null,
698
+ signingKeyPrivate: (data === null || data === void 0 ? void 0 : data.signingKeyPrivate) || null
686
699
  };
687
700
  }, [
688
- (0, $2ffcb7ef2a4a67d0$export$13cdb654d47e0703),
689
- $edbbfc11873e0f23$export$9c7ae676ac45430a,
701
+ (0, $764163079c542eaf$export$13cdb654d47e0703),
702
+ $ca60bbd6b265fe38$export$9c7ae676ac45430a,
690
703
  projectId,
691
704
  dataset
692
705
  ]);
693
706
  }
694
707
 
695
708
 
696
-
697
- function $d8ba7896129c9d6c$export$87b96baf1080652a(client, playbackId, aud, payload) {
698
- const { signingKeyId: signingKeyId , signingKeyPrivate: signingKeyPrivate } = (0, $edbbfc11873e0f23$export$e6f48a1ef9de02f7)(client);
709
+ function $66cd6455bd010559$export$87b96baf1080652a(client, playbackId, aud, payload) {
710
+ const { signingKeyId: signingKeyId , signingKeyPrivate: signingKeyPrivate } = (0, $ca60bbd6b265fe38$export$e6f48a1ef9de02f7)(client);
699
711
  if (!signingKeyId) throw new TypeError("Missing signingKeyId");
700
712
  if (!signingKeyPrivate) throw new TypeError("Missing signingKeyPrivate");
701
- const { default: sign } = (0, $dyHF6$suspendreact.suspend)(()=>$dyHF6$jsonwebtokenesmsign, [
702
- "sanity-plugin-mux-input",
703
- "jsonwebtoken-esm/sign"
704
- ]);
705
- return sign(payload ? JSON.parse(JSON.stringify(payload, (_, v)=>v ?? undefined)) : {}, atob(signingKeyPrivate), {
713
+ /*
714
+ const {sign}: {sign: typeof import('jsonwebtoken-esm/sign')['default']} = suspend(async () => {
715
+ // eslint-disable-next-line @typescript-eslint/no-shadow
716
+ const {default: sign} = await import('jsonwebtoken-esm/sign')
717
+ // eslint-disable-next-line @typescript-eslint/no-shadow
718
+ return {sign: (payload: any, secret: any, options: any) => sign(payload, secret, options)}
719
+ }, ['sanity-plugin-mux-input', 'jsonwebtoken-esm/sign'])
720
+ // */ return (0, $ayBmS$jsonwebtokenesm.sign)(payload ? JSON.parse(JSON.stringify(payload, (_, v)=>v !== null && v !== void 0 ? v : undefined)) : {}, atob(signingKeyPrivate), {
706
721
  algorithm: "RS256",
707
722
  keyid: signingKeyId,
708
723
  audience: aud,
@@ -713,8 +728,8 @@ function $d8ba7896129c9d6c$export$87b96baf1080652a(client, playbackId, aud, payl
713
728
  }
714
729
 
715
730
 
716
- function $96cfb4479805b243$export$bdfa34d24bb44333(asset) {
717
- if (!asset?.playbackId) {
731
+ function $95c7e77a8fa5d84c$export$bdfa34d24bb44333(asset) {
732
+ if (!(asset === null || asset === void 0 ? void 0 : asset.playbackId)) {
718
733
  console.error("Asset is missing a playbackId", {
719
734
  asset: asset
720
735
  });
@@ -724,12 +739,14 @@ function $96cfb4479805b243$export$bdfa34d24bb44333(asset) {
724
739
  }
725
740
 
726
741
 
727
- function $5bbe48978fdc9616$export$f7d2546fac75bbd(asset) {
728
- return asset.data?.playback_ids?.[0]?.policy ?? "public";
742
+ function $b22c582d9b0c45c1$export$f7d2546fac75bbd(asset) {
743
+ var ref, ref1, ref2;
744
+ var ref3;
745
+ return (ref3 = (ref = asset.data) === null || ref === void 0 ? void 0 : (ref1 = ref.playback_ids) === null || ref1 === void 0 ? void 0 : (ref2 = ref1[0]) === null || ref2 === void 0 ? void 0 : ref2.policy) !== null && ref3 !== void 0 ? ref3 : "public";
729
746
  }
730
747
 
731
748
 
732
- function $d116a96f272a1c22$export$6adb108e2a577699({ asset: asset , client: client , height: height , width: width , start: start = asset.thumbTime ? Math.max(0, asset.thumbTime - 2.5) : 0 , end: end = start + 5 , fps: fps = 15 }) {
749
+ function $7c5f49510d59d596$export$6adb108e2a577699({ asset: asset , client: client , height: height , width: width , start: start = asset.thumbTime ? Math.max(0, asset.thumbTime - 2.5) : 0 , end: end = start + 5 , fps: fps = 15 }) {
733
750
  const params = {
734
751
  height: height,
735
752
  width: width,
@@ -737,10 +754,10 @@ function $d116a96f272a1c22$export$6adb108e2a577699({ asset: asset , client: clie
737
754
  end: end,
738
755
  fps: fps
739
756
  };
740
- const playbackId = (0, $96cfb4479805b243$export$bdfa34d24bb44333)(asset);
741
- let searchParams = new URLSearchParams(JSON.parse(JSON.stringify(params, (_, v)=>v ?? undefined)));
742
- if ((0, $5bbe48978fdc9616$export$f7d2546fac75bbd)(asset) === "signed") {
743
- const token = (0, $d8ba7896129c9d6c$export$87b96baf1080652a)(client, playbackId, "g", params);
757
+ const playbackId = (0, $95c7e77a8fa5d84c$export$bdfa34d24bb44333)(asset);
758
+ let searchParams = new URLSearchParams(JSON.parse(JSON.stringify(params, (_, v)=>v !== null && v !== void 0 ? v : undefined)));
759
+ if ((0, $b22c582d9b0c45c1$export$f7d2546fac75bbd)(asset) === "signed") {
760
+ const token = (0, $66cd6455bd010559$export$87b96baf1080652a)(client, playbackId, "g", params);
744
761
  searchParams = new URLSearchParams({
745
762
  token: token
746
763
  });
@@ -753,17 +770,17 @@ function $d116a96f272a1c22$export$6adb108e2a577699({ asset: asset , client: clie
753
770
 
754
771
 
755
772
 
756
- function $2ed67348dc6c5cb5$export$8081e7a11b9f1345({ asset: asset , client: client , fit_mode: fit_mode , height: height , time: time = asset.thumbTime , width: width }) {
773
+ function $f2ccfb00ca22d3aa$export$8081e7a11b9f1345({ asset: asset , client: client , fit_mode: fit_mode , height: height , time: time = asset.thumbTime , width: width }) {
757
774
  const params = {
758
775
  fit_mode: fit_mode,
759
776
  height: height,
760
777
  time: time,
761
778
  width: width
762
779
  };
763
- const playbackId = (0, $96cfb4479805b243$export$bdfa34d24bb44333)(asset);
764
- let searchParams = new URLSearchParams(JSON.parse(JSON.stringify(params, (_, v)=>v ?? undefined)));
765
- if ((0, $5bbe48978fdc9616$export$f7d2546fac75bbd)(asset) === "signed") {
766
- const token = (0, $d8ba7896129c9d6c$export$87b96baf1080652a)(client, playbackId, "t", params);
780
+ const playbackId = (0, $95c7e77a8fa5d84c$export$bdfa34d24bb44333)(asset);
781
+ let searchParams = new URLSearchParams(JSON.parse(JSON.stringify(params, (_, v)=>v !== null && v !== void 0 ? v : undefined)));
782
+ if ((0, $b22c582d9b0c45c1$export$f7d2546fac75bbd)(asset) === "signed") {
783
+ const token = (0, $66cd6455bd010559$export$87b96baf1080652a)(client, playbackId, "t", params);
767
784
  searchParams = new URLSearchParams({
768
785
  token: token
769
786
  });
@@ -772,11 +789,12 @@ function $2ed67348dc6c5cb5$export$8081e7a11b9f1345({ asset: asset , client: clie
772
789
  }
773
790
 
774
791
 
775
- const $6de6709202a3b061$var$mediaDimensions = {
792
+ let $b4359f9e5317addd$var$_ = (t5)=>t5, $b4359f9e5317addd$var$t, $b4359f9e5317addd$var$t1, $b4359f9e5317addd$var$t2, $b4359f9e5317addd$var$t3, $b4359f9e5317addd$var$t4;
793
+ const $b4359f9e5317addd$var$mediaDimensions = {
776
794
  aspect: 16 / 9
777
795
  };
778
- const $6de6709202a3b061$var$ImageLoader = /*#__PURE__*/ (0, $dyHF6$react.memo)(function ImageLoader({ alt: alt , src: src , height: height , width: width , aspectRatio: aspectRatio }) {
779
- (0, $dyHF6$suspendreact.suspend)(async ()=>{
796
+ const $b4359f9e5317addd$var$ImageLoader = /*#__PURE__*/ (0, $ayBmS$react.memo)(function ImageLoader({ alt: alt , src: src , height: height , width: width , aspectRatio: aspectRatio }) {
797
+ (0, $ayBmS$suspendreact.suspend)(async ()=>{
780
798
  const img = new Image(width, height);
781
799
  img.decoding = "async";
782
800
  img.src = src;
@@ -786,7 +804,7 @@ const $6de6709202a3b061$var$ImageLoader = /*#__PURE__*/ (0, $dyHF6$react.memo)(f
786
804
  "image",
787
805
  src
788
806
  ]);
789
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("img", {
807
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("img", {
790
808
  alt: alt,
791
809
  src: src,
792
810
  height: height,
@@ -796,34 +814,34 @@ const $6de6709202a3b061$var$ImageLoader = /*#__PURE__*/ (0, $dyHF6$react.memo)(f
796
814
  }
797
815
  });
798
816
  });
799
- const $6de6709202a3b061$var$VideoMediaPreview = (0, ($parcel$interopDefault($dyHF6$styledcomponents)))((0, $dyHF6$sanity_unstable.MediaPreview))`
817
+ const $b4359f9e5317addd$var$VideoMediaPreview = (0, ($parcel$interopDefault($ayBmS$styledcomponents)))((0, $ayBmS$sanity_unstable.MediaPreview))($b4359f9e5317addd$var$t || ($b4359f9e5317addd$var$t = $b4359f9e5317addd$var$_`
800
818
  img {
801
819
  object-fit: cover;
802
820
  }
803
- `;
804
- const $6de6709202a3b061$var$VideoMediaPreviewSignedSubtitle = ({ solo: solo })=>{
805
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Inline), {
821
+ `));
822
+ const $b4359f9e5317addd$var$VideoMediaPreviewSignedSubtitle = ({ solo: solo })=>{
823
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Inline), {
806
824
  space: 1,
807
825
  style: {
808
826
  marginTop: solo ? "-1.35em" : undefined,
809
827
  marginBottom: solo ? undefined : "0.35rem"
810
828
  },
811
829
  children: [
812
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityicons.LockIcon), {}),
830
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityicons.LockIcon), {}),
813
831
  "Signed playback policy"
814
832
  ]
815
833
  });
816
834
  };
817
- const $6de6709202a3b061$var$PosterImage = ({ asset: asset , height: height , width: width , showTip: showTip })=>{
818
- const client = (0, $dyHF6$sanity.useClient)();
819
- const src = (0, $2ed67348dc6c5cb5$export$8081e7a11b9f1345)({
835
+ const $b4359f9e5317addd$var$PosterImage = ({ asset: asset , height: height , width: width , showTip: showTip })=>{
836
+ const client = (0, $ayBmS$sanity.useClient)();
837
+ const src = (0, $f2ccfb00ca22d3aa$export$8081e7a11b9f1345)({
820
838
  asset: asset,
821
839
  client: client,
822
840
  height: height,
823
841
  width: width,
824
842
  fit_mode: "smartcrop"
825
843
  });
826
- const subtitle = (0, $dyHF6$react.useMemo)(()=>showTip && (0, $5bbe48978fdc9616$export$f7d2546fac75bbd)(asset) === "signed" ? /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)($6de6709202a3b061$var$VideoMediaPreviewSignedSubtitle, {
844
+ const subtitle = (0, $ayBmS$react.useMemo)(()=>showTip && (0, $b22c582d9b0c45c1$export$f7d2546fac75bbd)(asset) === "signed" ? /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)($b4359f9e5317addd$var$VideoMediaPreviewSignedSubtitle, {
827
845
  solo: true
828
846
  }) : undefined, [
829
847
  asset,
@@ -831,13 +849,13 @@ const $6de6709202a3b061$var$PosterImage = ({ asset: asset , height: height , wid
831
849
  ]);
832
850
  // eslint-disable-next-line no-warning-comments
833
851
  // @TODO support setting the alt text in the schema, like how we deal with images
834
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)($6de6709202a3b061$var$VideoMediaPreview, {
835
- mediaDimensions: $6de6709202a3b061$var$mediaDimensions,
852
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)($b4359f9e5317addd$var$VideoMediaPreview, {
853
+ mediaDimensions: $b4359f9e5317addd$var$mediaDimensions,
836
854
  subtitle: subtitle,
837
- title: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$reactjsxruntime.Fragment), {
855
+ title: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$reactjsxruntime.Fragment), {
838
856
  children: null
839
857
  }),
840
- media: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)($6de6709202a3b061$var$ImageLoader, {
858
+ media: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)($b4359f9e5317addd$var$ImageLoader, {
841
859
  alt: "",
842
860
  src: src,
843
861
  height: height,
@@ -845,25 +863,25 @@ const $6de6709202a3b061$var$PosterImage = ({ asset: asset , height: height , wid
845
863
  })
846
864
  });
847
865
  };
848
- const $6de6709202a3b061$export$bd4b73f15688a160 = /*#__PURE__*/ (0, $dyHF6$react.memo)(function VideoThumbnail({ asset: asset , width: width , showTip: showTip }) {
849
- const { ErrorBoundary: ErrorBoundary , didCatch: didCatch , error: error } = (0, $dyHF6$useerrorboundary.useErrorBoundary)();
866
+ const $b4359f9e5317addd$export$bd4b73f15688a160 = /*#__PURE__*/ (0, $ayBmS$react.memo)(function VideoThumbnail({ asset: asset , width: width , showTip: showTip }) {
867
+ const { ErrorBoundary: ErrorBoundary , didCatch: didCatch , error: error } = (0, $ayBmS$useerrorboundary.useErrorBoundary)();
850
868
  const height = Math.round(width * 9 / 16);
851
- const subtitle = (0, $dyHF6$react.useMemo)(()=>showTip && (0, $5bbe48978fdc9616$export$f7d2546fac75bbd)(asset) === "signed" ? /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)($6de6709202a3b061$var$VideoMediaPreviewSignedSubtitle, {}) : undefined, [
869
+ const subtitle = (0, $ayBmS$react.useMemo)(()=>showTip && (0, $b22c582d9b0c45c1$export$f7d2546fac75bbd)(asset) === "signed" ? /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)($b4359f9e5317addd$var$VideoMediaPreviewSignedSubtitle, {}) : undefined, [
852
870
  showTip,
853
871
  asset
854
872
  ]);
855
- if (didCatch) return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)($6de6709202a3b061$var$VideoMediaPreview, {
873
+ if (didCatch) return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)($b4359f9e5317addd$var$VideoMediaPreview, {
856
874
  subtitle: error.message,
857
- mediaDimensions: $6de6709202a3b061$var$mediaDimensions,
875
+ mediaDimensions: $b4359f9e5317addd$var$mediaDimensions,
858
876
  title: "Error when loading thumbnail",
859
- media: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Card), {
877
+ media: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Card), {
860
878
  radius: 2,
861
879
  height: "fill",
862
880
  style: {
863
881
  position: "relative",
864
882
  width: "100%"
865
883
  },
866
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Box), {
884
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Box), {
867
885
  style: {
868
886
  display: "flex",
869
887
  justifyContent: "center",
@@ -874,19 +892,19 @@ const $6de6709202a3b061$export$bd4b73f15688a160 = /*#__PURE__*/ (0, $dyHF6$react
874
892
  right: 0,
875
893
  bottom: 0
876
894
  },
877
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityicons.UnknownIcon), {})
895
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityicons.UnknownIcon), {})
878
896
  })
879
897
  })
880
898
  });
881
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)(ErrorBoundary, {
882
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$react.Suspense), {
883
- fallback: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)($6de6709202a3b061$var$VideoMediaPreview, {
899
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)(ErrorBoundary, {
900
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$react.Suspense), {
901
+ fallback: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)($b4359f9e5317addd$var$VideoMediaPreview, {
884
902
  isPlaceholder: true,
885
903
  title: "Loading thumbnail...",
886
904
  subtitle: subtitle,
887
- mediaDimensions: $6de6709202a3b061$var$mediaDimensions
905
+ mediaDimensions: $b4359f9e5317addd$var$mediaDimensions
888
906
  }),
889
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)($6de6709202a3b061$var$PosterImage, {
907
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)($b4359f9e5317addd$var$PosterImage, {
890
908
  showTip: showTip,
891
909
  asset: asset,
892
910
  height: height,
@@ -895,24 +913,24 @@ const $6de6709202a3b061$export$bd4b73f15688a160 = /*#__PURE__*/ (0, $dyHF6$react
895
913
  })
896
914
  });
897
915
  });
898
- const $6de6709202a3b061$var$AnimatedVideoMediaPreview = (0, ($parcel$interopDefault($dyHF6$styledcomponents)))((0, $dyHF6$sanity_unstable.MediaPreview))`
916
+ const $b4359f9e5317addd$var$AnimatedVideoMediaPreview = (0, ($parcel$interopDefault($ayBmS$styledcomponents)))((0, $ayBmS$sanity_unstable.MediaPreview))($b4359f9e5317addd$var$t1 || ($b4359f9e5317addd$var$t1 = $b4359f9e5317addd$var$_`
899
917
  img {
900
918
  object-fit: contain;
901
919
  }
902
- `;
903
- const $6de6709202a3b061$var$AnimatedPosterImage = ({ asset: asset , width: width })=>{
904
- const client = (0, $dyHF6$sanity.useClient)();
905
- const src = (0, $d116a96f272a1c22$export$6adb108e2a577699)({
920
+ `));
921
+ const $b4359f9e5317addd$var$AnimatedPosterImage = ({ asset: asset , width: width })=>{
922
+ const client = (0, $ayBmS$sanity.useClient)();
923
+ const src = (0, $7c5f49510d59d596$export$6adb108e2a577699)({
906
924
  asset: asset,
907
925
  client: client,
908
926
  width: width
909
927
  });
910
928
  // eslint-disable-next-line no-warning-comments
911
929
  // @TODO support setting the alt text in the schema, like how we deal with images
912
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)($6de6709202a3b061$var$AnimatedVideoMediaPreview, {
930
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)($b4359f9e5317addd$var$AnimatedVideoMediaPreview, {
913
931
  withBorder: false,
914
- mediaDimensions: $6de6709202a3b061$var$mediaDimensions,
915
- media: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)($6de6709202a3b061$var$ImageLoader, {
932
+ mediaDimensions: $b4359f9e5317addd$var$mediaDimensions,
933
+ media: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)($b4359f9e5317addd$var$ImageLoader, {
916
934
  alt: "",
917
935
  src: src,
918
936
  width: width,
@@ -920,24 +938,24 @@ const $6de6709202a3b061$var$AnimatedPosterImage = ({ asset: asset , width: width
920
938
  })
921
939
  });
922
940
  };
923
- const $6de6709202a3b061$export$357b57aa2db6117e = /*#__PURE__*/ (0, $dyHF6$react.memo)(function AnimatedVideoThumbnail({ asset: asset , width: width }) {
924
- const { ErrorBoundary: ErrorBoundary , didCatch: didCatch } = (0, $dyHF6$useerrorboundary.useErrorBoundary)();
941
+ const $b4359f9e5317addd$export$357b57aa2db6117e = /*#__PURE__*/ (0, $ayBmS$react.memo)(function AnimatedVideoThumbnail({ asset: asset , width: width }) {
942
+ const { ErrorBoundary: ErrorBoundary , didCatch: didCatch } = (0, $ayBmS$useerrorboundary.useErrorBoundary)();
925
943
  if (didCatch) return null;
926
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)(ErrorBoundary, {
927
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$react.Suspense), {
928
- fallback: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)($6de6709202a3b061$var$FancyBackdrop, {
929
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)($6de6709202a3b061$var$VideoMediaPreview, {
930
- mediaDimensions: $6de6709202a3b061$var$mediaDimensions,
944
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)(ErrorBoundary, {
945
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$react.Suspense), {
946
+ fallback: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)($b4359f9e5317addd$var$FancyBackdrop, {
947
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)($b4359f9e5317addd$var$VideoMediaPreview, {
948
+ mediaDimensions: $b4359f9e5317addd$var$mediaDimensions,
931
949
  withBorder: false,
932
- media: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Spinner), {
950
+ media: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Spinner), {
933
951
  muted: true
934
952
  })
935
953
  })
936
954
  }),
937
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Card), {
955
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Card), {
938
956
  height: "fill",
939
957
  tone: "transparent",
940
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)($6de6709202a3b061$var$AnimatedPosterImage, {
958
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)($b4359f9e5317addd$var$AnimatedPosterImage, {
941
959
  asset: asset,
942
960
  width: width
943
961
  })
@@ -945,64 +963,65 @@ const $6de6709202a3b061$export$357b57aa2db6117e = /*#__PURE__*/ (0, $dyHF6$react
945
963
  })
946
964
  });
947
965
  });
948
- const $6de6709202a3b061$var$FancyBackdrop = (0, ($parcel$interopDefault($dyHF6$styledcomponents)))((0, $dyHF6$sanityui.Box))`
966
+ const $b4359f9e5317addd$var$FancyBackdrop = (0, ($parcel$interopDefault($ayBmS$styledcomponents)))((0, $ayBmS$sanityui.Box))($b4359f9e5317addd$var$t2 || ($b4359f9e5317addd$var$t2 = $b4359f9e5317addd$var$_`
949
967
  backdrop-filter: blur(8px) brightness(0.5) saturate(2);
950
968
  mix-blend-mode: color-dodge;
951
- `;
952
- const $6de6709202a3b061$export$e20c438ffc62921 = (0, ($parcel$interopDefault($dyHF6$styledcomponents)))((0, $dyHF6$sanityui.Grid))`
969
+ `));
970
+ const $b4359f9e5317addd$export$e20c438ffc62921 = (0, ($parcel$interopDefault($ayBmS$styledcomponents)))((0, $ayBmS$sanityui.Grid))($b4359f9e5317addd$var$t3 || ($b4359f9e5317addd$var$t3 = $b4359f9e5317addd$var$_`
953
971
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
954
- `;
955
- const $6de6709202a3b061$export$7431cee690d58bc9 = (0, ($parcel$interopDefault($dyHF6$styledcomponents)))((0, $dyHF6$sanityui.Card))`
972
+ `));
973
+ const $b4359f9e5317addd$export$7431cee690d58bc9 = (0, ($parcel$interopDefault($ayBmS$styledcomponents)))((0, $ayBmS$sanityui.Card))($b4359f9e5317addd$var$t4 || ($b4359f9e5317addd$var$t4 = $b4359f9e5317addd$var$_`
956
974
  border-top: 1px solid var(--card-border-color);
957
975
  position: sticky;
958
976
  bottom: 0;
959
977
  z-index: 200;
960
- `;
978
+ `));
961
979
 
962
980
 
963
- function $216715c95525676f$var$AssetActionsMenu(props) {
981
+ let $7a82b2aa05cc8aca$var$_ = (t2)=>t2, $7a82b2aa05cc8aca$var$t, $7a82b2aa05cc8aca$var$t1;
982
+ function $7a82b2aa05cc8aca$var$AssetActionsMenu(props) {
964
983
  const { asset: asset } = props;
965
- const id = (0, $dyHF6$reachautoid.useId)();
966
- const [dialogState, setDialogState] = (0, $dyHF6$react.useState)();
967
- const [open, setOpen] = (0, $dyHF6$react.useState)(false);
968
- const [menuElement, setMenuRef] = (0, $dyHF6$react.useState)(null);
969
- const handleDelete = (0, $dyHF6$react.useCallback)(()=>setDialogState("confirm-delete"), []);
970
- const handleClick = (0, $dyHF6$react.useCallback)(()=>{
984
+ const id = (0, $ayBmS$reachautoid.useId)();
985
+ const [dialogState, setDialogState] = (0, $ayBmS$react.useState)();
986
+ const [open, setOpen] = (0, $ayBmS$react.useState)(false);
987
+ const [menuElement, setMenuRef] = (0, $ayBmS$react.useState)(null);
988
+ const handleDelete = (0, $ayBmS$react.useCallback)(()=>setDialogState("confirm-delete"), []);
989
+ const handleClick = (0, $ayBmS$react.useCallback)(()=>{
971
990
  setDialogState(false);
972
991
  setOpen(true);
973
992
  }, [
974
993
  setDialogState
975
994
  ]);
976
- const handleClose = (0, $dyHF6$react.useCallback)(()=>{
995
+ const handleClose = (0, $ayBmS$react.useCallback)(()=>{
977
996
  setDialogState(false);
978
997
  setOpen(false);
979
998
  }, [
980
999
  setDialogState
981
1000
  ]);
982
- (0, $dyHF6$react.useEffect)(()=>{
1001
+ (0, $ayBmS$react.useEffect)(()=>{
983
1002
  if (open && dialogState) setOpen(false);
984
1003
  }, [
985
1004
  dialogState,
986
1005
  open
987
1006
  ]);
988
- (0, $dyHF6$sanityui.useClickOutside)((0, $dyHF6$react.useCallback)(()=>setOpen(false), []), [
1007
+ (0, $ayBmS$sanityui.useClickOutside)((0, $ayBmS$react.useCallback)(()=>setOpen(false), []), [
989
1008
  menuElement
990
1009
  ]);
991
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$reactjsxruntime.Fragment), {
1010
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$reactjsxruntime.Fragment), {
992
1011
  children: [
993
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.MenuButton), {
1012
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.MenuButton), {
994
1013
  id: `${id}-asset-menu`,
995
- button: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Button), {
996
- icon: (0, $dyHF6$sanityicons.EllipsisVerticalIcon),
1014
+ button: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Button), {
1015
+ icon: (0, $ayBmS$sanityicons.EllipsisVerticalIcon),
997
1016
  mode: "ghost",
998
1017
  onClick: handleClick,
999
1018
  padding: 2
1000
1019
  }),
1001
- menu: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Menu), {
1020
+ menu: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Menu), {
1002
1021
  ref: setMenuRef,
1003
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.MenuItem), {
1022
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.MenuItem), {
1004
1023
  tone: "critical",
1005
- icon: (0, $dyHF6$sanityicons.TrashIcon),
1024
+ icon: (0, $ayBmS$sanityicons.TrashIcon),
1006
1025
  text: "Delete",
1007
1026
  onClick: handleDelete
1008
1027
  })
@@ -1010,30 +1029,31 @@ function $216715c95525676f$var$AssetActionsMenu(props) {
1010
1029
  portal: true,
1011
1030
  placement: "right"
1012
1031
  }),
1013
- dialogState === "confirm-delete" && /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)($216715c95525676f$var$DeleteDialog, {
1032
+ dialogState === "confirm-delete" && /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)($7a82b2aa05cc8aca$var$DeleteDialog, {
1014
1033
  asset: asset,
1015
1034
  onClose: handleClose
1016
1035
  })
1017
1036
  ]
1018
1037
  });
1019
1038
  }
1020
- function $216715c95525676f$var$DeleteDialog(props) {
1039
+ function $7a82b2aa05cc8aca$var$DeleteDialog(props) {
1021
1040
  const { asset: asset , onClose: onClose } = props;
1022
- const client = (0, $dyHF6$sanity.useClient)();
1023
- const { push: pushToast } = (0, $dyHF6$sanityui.useToast)();
1024
- const [deleting, setDeleting] = (0, $dyHF6$react.useState)(false);
1025
- const [deleteOnMux, setDeleteOnMux] = (0, $dyHF6$react.useState)(false);
1026
- const id = (0, $dyHF6$reachautoid.useId)();
1041
+ const client = (0, $ayBmS$sanity.useClient)();
1042
+ const { push: pushToast } = (0, $ayBmS$sanityui.useToast)();
1043
+ const [deleting, setDeleting] = (0, $ayBmS$react.useState)(false);
1044
+ const [deleteOnMux, setDeleteOnMux] = (0, $ayBmS$react.useState)(false);
1045
+ const id = (0, $ayBmS$reachautoid.useId)();
1027
1046
  const noPaddingOnStack = true;
1028
- const width = 200 * (0, $dyHF6$usedevicepixelratio.getDevicePixelRatio)({
1047
+ const width = 200 * (0, $ayBmS$usedevicepixelratio.getDevicePixelRatio)({
1029
1048
  maxDpr: 2
1030
1049
  });
1031
- const handleDelete = (0, $dyHF6$react.useCallback)(async ()=>{
1050
+ const handleDelete = (0, $ayBmS$react.useCallback)(async ()=>{
1032
1051
  setDeleting(true);
1033
1052
  try {
1034
- if (asset?._id) await client.delete(asset._id);
1035
- if (deleteOnMux && asset?.assetId) await (0, $a0485042ac477352$export$df987b50509121ea)(client, asset.assetId);
1036
- document.querySelector(`[data-id="${asset._id}"]`)?.parentElement?.setAttribute?.("hidden", "true");
1053
+ var ref, ref1, ref2;
1054
+ if (asset === null || asset === void 0 ? void 0 : asset._id) await client.delete(asset._id);
1055
+ if (deleteOnMux && (asset === null || asset === void 0 ? void 0 : asset.assetId)) await (0, $85b2a8cdf745d7d3$export$df987b50509121ea)(client, asset.assetId);
1056
+ (ref = document.querySelector(`[data-id="${asset._id}"]`)) === null || ref === void 0 ? void 0 : (ref1 = ref.parentElement) === null || ref1 === void 0 ? void 0 : (ref2 = ref1.setAttribute) === null || ref2 === void 0 ? void 0 : ref2.call(ref1, "hidden", "true");
1037
1057
  } catch (err) {
1038
1058
  console.error("Failed during delete", err);
1039
1059
  pushToast({
@@ -1055,24 +1075,24 @@ function $216715c95525676f$var$DeleteDialog(props) {
1055
1075
  onClose,
1056
1076
  pushToast
1057
1077
  ]);
1058
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Dialog), {
1078
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Dialog), {
1059
1079
  onClose: onClose,
1060
1080
  id: `${id}-confirm-delete`,
1061
1081
  header: "Delete video",
1062
- footer: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Grid), {
1082
+ footer: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Grid), {
1063
1083
  padding: 2,
1064
1084
  gap: 2,
1065
1085
  columns: 2,
1066
1086
  children: [
1067
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Button), {
1087
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Button), {
1068
1088
  mode: "bleed",
1069
1089
  text: "Cancel",
1070
1090
  onClick: onClose
1071
1091
  }),
1072
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Button), {
1092
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Button), {
1073
1093
  text: "Delete",
1074
1094
  tone: "critical",
1075
- icon: (0, $dyHF6$sanityicons.TrashIcon),
1095
+ icon: (0, $ayBmS$sanityicons.TrashIcon),
1076
1096
  onClick: handleDelete,
1077
1097
  loading: deleting
1078
1098
  })
@@ -1080,7 +1100,7 @@ function $216715c95525676f$var$DeleteDialog(props) {
1080
1100
  }),
1081
1101
  // __unstable_autoFocus
1082
1102
  width: 1,
1083
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Stack), {
1103
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Stack), {
1084
1104
  paddingX: noPaddingOnStack ? 0 : [
1085
1105
  2,
1086
1106
  3,
@@ -1093,7 +1113,7 @@ function $216715c95525676f$var$DeleteDialog(props) {
1093
1113
  4
1094
1114
  ],
1095
1115
  space: 1,
1096
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Card), {
1116
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Card), {
1097
1117
  paddingX: [
1098
1118
  2,
1099
1119
  3,
@@ -1105,29 +1125,29 @@ function $216715c95525676f$var$DeleteDialog(props) {
1105
1125
  3,
1106
1126
  4
1107
1127
  ],
1108
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Grid), {
1128
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Grid), {
1109
1129
  columns: 3,
1110
1130
  gap: 3,
1111
1131
  children: [
1112
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Flex), {
1132
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Flex), {
1113
1133
  style: {
1114
1134
  gridColumn: "span 2"
1115
1135
  },
1116
1136
  align: "center",
1117
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Box), {
1137
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Box), {
1118
1138
  padding: 4,
1119
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Stack), {
1139
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Stack), {
1120
1140
  space: 4,
1121
1141
  children: [
1122
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Flex), {
1142
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Flex), {
1123
1143
  align: "center",
1124
1144
  as: "label",
1125
1145
  children: [
1126
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Checkbox), {
1146
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Checkbox), {
1127
1147
  checked: deleteOnMux,
1128
1148
  onChange: ()=>setDeleteOnMux((prev)=>!prev)
1129
1149
  }),
1130
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Text), {
1150
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Text), {
1131
1151
  style: {
1132
1152
  margin: "0 10px"
1133
1153
  },
@@ -1135,15 +1155,15 @@ function $216715c95525676f$var$DeleteDialog(props) {
1135
1155
  })
1136
1156
  ]
1137
1157
  }),
1138
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Flex), {
1158
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Flex), {
1139
1159
  align: "center",
1140
1160
  as: "label",
1141
1161
  children: [
1142
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Checkbox), {
1162
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Checkbox), {
1143
1163
  disabled: true,
1144
1164
  checked: true
1145
1165
  }),
1146
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Text), {
1166
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Text), {
1147
1167
  style: {
1148
1168
  margin: "0 10px"
1149
1169
  },
@@ -1155,7 +1175,7 @@ function $216715c95525676f$var$DeleteDialog(props) {
1155
1175
  })
1156
1176
  })
1157
1177
  }),
1158
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $6de6709202a3b061$export$bd4b73f15688a160), {
1178
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $b4359f9e5317addd$export$bd4b73f15688a160), {
1159
1179
  asset: asset,
1160
1180
  width: width,
1161
1181
  showTip: true
@@ -1166,53 +1186,53 @@ function $216715c95525676f$var$DeleteDialog(props) {
1166
1186
  })
1167
1187
  });
1168
1188
  }
1169
- function $216715c95525676f$export$2e2bcd8739ae039({ assets: assets , isLoading: isLoading , isLastPage: isLastPage , onSelect: onSelect , onLoadMore: onLoadMore }) {
1170
- const handleClick = (0, $dyHF6$react.useCallback)((event)=>onSelect(event.currentTarget.dataset.id), [
1189
+ function $7a82b2aa05cc8aca$export$2e2bcd8739ae039({ assets: assets , isLoading: isLoading , isLastPage: isLastPage , onSelect: onSelect , onLoadMore: onLoadMore }) {
1190
+ const handleClick = (0, $ayBmS$react.useCallback)((event)=>onSelect(event.currentTarget.dataset.id), [
1171
1191
  onSelect
1172
1192
  ]);
1173
- const handleKeyPress = (0, $dyHF6$react.useCallback)((event)=>{
1193
+ const handleKeyPress = (0, $ayBmS$react.useCallback)((event)=>{
1174
1194
  if (event.key === "Enter") onSelect(event.currentTarget.dataset.id);
1175
1195
  }, [
1176
1196
  onSelect
1177
1197
  ]);
1178
- const width = 200 * (0, $dyHF6$usedevicepixelratio.getDevicePixelRatio)({
1198
+ const width = 200 * (0, $ayBmS$usedevicepixelratio.getDevicePixelRatio)({
1179
1199
  maxDpr: 2
1180
1200
  });
1181
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$reactjsxruntime.Fragment), {
1201
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$reactjsxruntime.Fragment), {
1182
1202
  children: [
1183
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Box), {
1203
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Box), {
1184
1204
  padding: 4,
1185
1205
  children: [
1186
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $6de6709202a3b061$export$e20c438ffc62921), {
1206
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $b4359f9e5317addd$export$e20c438ffc62921), {
1187
1207
  gap: 2,
1188
- children: assets.map((asset)=>/*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)($216715c95525676f$var$VideoSourceItem, {
1208
+ children: assets.map((asset)=>/*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)($7a82b2aa05cc8aca$var$VideoSourceItem, {
1189
1209
  asset: asset,
1190
1210
  onClick: handleClick,
1191
1211
  onKeyPress: handleKeyPress,
1192
1212
  width: width
1193
1213
  }, asset._id))
1194
1214
  }),
1195
- isLoading && assets.length === 0 && /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Flex), {
1215
+ isLoading && assets.length === 0 && /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Flex), {
1196
1216
  justify: "center",
1197
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Spinner), {
1217
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Spinner), {
1198
1218
  muted: true
1199
1219
  })
1200
1220
  }),
1201
- !isLoading && assets.length === 0 && /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Text), {
1221
+ !isLoading && assets.length === 0 && /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Text), {
1202
1222
  align: "center",
1203
1223
  muted: true,
1204
1224
  children: "No videos"
1205
1225
  })
1206
1226
  ]
1207
1227
  }),
1208
- assets.length > 0 && !isLastPage && /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $6de6709202a3b061$export$7431cee690d58bc9), {
1228
+ assets.length > 0 && !isLastPage && /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $b4359f9e5317addd$export$7431cee690d58bc9), {
1209
1229
  tone: "default",
1210
1230
  padding: 4,
1211
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Flex), {
1231
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Flex), {
1212
1232
  direction: "column",
1213
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Button), {
1233
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Button), {
1214
1234
  type: "button",
1215
- icon: (0, $dyHF6$sanityicons.DownloadIcon),
1235
+ icon: (0, $ayBmS$sanityicons.DownloadIcon),
1216
1236
  loading: isLoading,
1217
1237
  onClick: onLoadMore,
1218
1238
  text: "Load more",
@@ -1223,27 +1243,27 @@ function $216715c95525676f$export$2e2bcd8739ae039({ assets: assets , isLoading:
1223
1243
  ]
1224
1244
  });
1225
1245
  }
1226
- const $216715c95525676f$var$_VideoSourceItem = ({ asset: asset , onClick: onClick , onKeyPress: onKeyPress , width: width })=>{
1227
- const [hover, setHover] = (0, $dyHF6$react.useState)(null);
1228
- const ref = (0, $dyHF6$react.useRef)(null);
1229
- (0, $dyHF6$react.useLayoutEffect)(()=>{
1246
+ const $7a82b2aa05cc8aca$var$_VideoSourceItem = ({ asset: asset , onClick: onClick , onKeyPress: onKeyPress , width: width })=>{
1247
+ const [hover, setHover] = (0, $ayBmS$react.useState)(null);
1248
+ const ref = (0, $ayBmS$react.useRef)(null);
1249
+ (0, $ayBmS$react.useLayoutEffect)(()=>{
1230
1250
  if (!ref.current || hover === null) return;
1231
- if (hover) (0, $dyHF6$motion.animate)(ref.current, {
1251
+ if (hover) (0, $ayBmS$motion.animate)(ref.current, {
1232
1252
  opacity: 1
1233
1253
  });
1234
- else (0, $dyHF6$motion.animate)(ref.current, {
1254
+ else (0, $ayBmS$motion.animate)(ref.current, {
1235
1255
  opacity: 0
1236
1256
  });
1237
1257
  }, [
1238
1258
  hover
1239
1259
  ]);
1240
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Box), {
1260
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Box), {
1241
1261
  height: "fill",
1242
1262
  style: {
1243
1263
  position: "relative"
1244
1264
  },
1245
1265
  children: [
1246
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Card), {
1266
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Card), {
1247
1267
  as: "button",
1248
1268
  "data-id": asset._id,
1249
1269
  onClick: onClick,
@@ -1259,33 +1279,33 @@ const $216715c95525676f$var$_VideoSourceItem = ({ asset: asset , onClick: onClic
1259
1279
  onMouseEnter: ()=>setHover(true),
1260
1280
  onMouseLeave: ()=>setHover(false),
1261
1281
  children: [
1262
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $6de6709202a3b061$export$bd4b73f15688a160), {
1282
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $b4359f9e5317addd$export$bd4b73f15688a160), {
1263
1283
  asset: asset,
1264
1284
  width: width,
1265
1285
  showTip: true
1266
1286
  }),
1267
- asset?.playbackId && /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)($216715c95525676f$var$AnimateWrapper, {
1287
+ (asset === null || asset === void 0 ? void 0 : asset.playbackId) && /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)($7a82b2aa05cc8aca$var$AnimateWrapper, {
1268
1288
  tone: "transparent",
1269
1289
  ref: ref,
1270
1290
  margin: 1,
1271
1291
  radius: 1,
1272
- children: hover !== null && /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $6de6709202a3b061$export$357b57aa2db6117e), {
1292
+ children: hover !== null && /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $b4359f9e5317addd$export$357b57aa2db6117e), {
1273
1293
  asset: asset,
1274
1294
  width: width
1275
1295
  })
1276
1296
  })
1277
1297
  ]
1278
1298
  }),
1279
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)($216715c95525676f$var$ActionsAssetsContainer, {
1280
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)($216715c95525676f$var$AssetActionsMenu, {
1299
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)($7a82b2aa05cc8aca$var$ActionsAssetsContainer, {
1300
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)($7a82b2aa05cc8aca$var$AssetActionsMenu, {
1281
1301
  asset: asset
1282
1302
  })
1283
1303
  })
1284
1304
  ]
1285
1305
  });
1286
1306
  };
1287
- const $216715c95525676f$var$VideoSourceItem = /*#__PURE__*/ (0, $dyHF6$react.memo)($216715c95525676f$var$_VideoSourceItem);
1288
- const $216715c95525676f$var$AnimateWrapper = (0, ($parcel$interopDefault($dyHF6$styledcomponents)))((0, $dyHF6$sanityui.Card))`
1307
+ const $7a82b2aa05cc8aca$var$VideoSourceItem = /*#__PURE__*/ (0, $ayBmS$react.memo)($7a82b2aa05cc8aca$var$_VideoSourceItem);
1308
+ const $7a82b2aa05cc8aca$var$AnimateWrapper = (0, ($parcel$interopDefault($ayBmS$styledcomponents)))((0, $ayBmS$sanityui.Card))($7a82b2aa05cc8aca$var$t || ($7a82b2aa05cc8aca$var$t = $7a82b2aa05cc8aca$var$_`
1289
1309
  position: absolute;
1290
1310
  top: 0;
1291
1311
  left: 0;
@@ -1295,8 +1315,8 @@ const $216715c95525676f$var$AnimateWrapper = (0, ($parcel$interopDefault($dyHF6$
1295
1315
  background: transparent;
1296
1316
  opacity: 0;
1297
1317
  pointer-events: none;
1298
- `;
1299
- const $216715c95525676f$var$ActionsAssetsContainer = (0, ($parcel$interopDefault($dyHF6$styledcomponents))).div`
1318
+ `));
1319
+ const $7a82b2aa05cc8aca$var$ActionsAssetsContainer = (0, ($parcel$interopDefault($ayBmS$styledcomponents))).div($7a82b2aa05cc8aca$var$t1 || ($7a82b2aa05cc8aca$var$t1 = $7a82b2aa05cc8aca$var$_`
1300
1320
  box-sizing: border-box;
1301
1321
  position: absolute;
1302
1322
  z-index: 300;
@@ -1310,38 +1330,38 @@ const $216715c95525676f$var$ActionsAssetsContainer = (0, ($parcel$interopDefault
1310
1330
  &:focus-visible {
1311
1331
  opacity: 1;
1312
1332
  }
1313
- `;
1333
+ `));
1314
1334
 
1315
1335
 
1316
- const $43923b4c880150fa$var$PER_PAGE = 20;
1317
- function $43923b4c880150fa$var$createQuery(start = 0, end = $43923b4c880150fa$var$PER_PAGE) {
1336
+ const $7011b51a60f6091d$var$PER_PAGE = 20;
1337
+ function $7011b51a60f6091d$var$createQuery(start = 0, end = $7011b51a60f6091d$var$PER_PAGE) {
1318
1338
  return /* groq */ `*[_type == "mux.videoAsset"] | order(_updatedAt desc) [${start}...${end}]`;
1319
1339
  }
1320
- function $43923b4c880150fa$export$2e2bcd8739ae039({ asset: asset , onChange: onChange , setDialogState: setDialogState }) {
1321
- const client = (0, $dyHF6$sanity.useClient)();
1322
- const pageNoRef = (0, $dyHF6$react.useRef)(0);
1323
- const [isLastPage, setLastPage] = (0, $dyHF6$react.useState)(false);
1324
- const [isLoading, setLoading] = (0, $dyHF6$react.useState)(false);
1325
- const [assets, setAssets] = (0, $dyHF6$react.useState)([]);
1326
- const fetchPage = (0, $dyHF6$react.useCallback)((pageNo)=>{
1327
- const start = pageNo * $43923b4c880150fa$var$PER_PAGE;
1328
- const end = start + $43923b4c880150fa$var$PER_PAGE;
1340
+ function $7011b51a60f6091d$export$2e2bcd8739ae039({ asset: asset , onChange: onChange , setDialogState: setDialogState }) {
1341
+ const client = (0, $ayBmS$sanity.useClient)();
1342
+ const pageNoRef = (0, $ayBmS$react.useRef)(0);
1343
+ const [isLastPage, setLastPage] = (0, $ayBmS$react.useState)(false);
1344
+ const [isLoading, setLoading] = (0, $ayBmS$react.useState)(false);
1345
+ const [assets, setAssets] = (0, $ayBmS$react.useState)([]);
1346
+ const fetchPage = (0, $ayBmS$react.useCallback)((pageNo)=>{
1347
+ const start = pageNo * $7011b51a60f6091d$var$PER_PAGE;
1348
+ const end = start + $7011b51a60f6091d$var$PER_PAGE;
1329
1349
  setLoading(true);
1330
- return client.fetch($43923b4c880150fa$var$createQuery(start, end)).then((result)=>{
1331
- setLastPage(result.length < $43923b4c880150fa$var$PER_PAGE);
1350
+ return client.fetch($7011b51a60f6091d$var$createQuery(start, end)).then((result)=>{
1351
+ setLastPage(result.length < $7011b51a60f6091d$var$PER_PAGE);
1332
1352
  setAssets((prev)=>prev.concat(result));
1333
1353
  }).finally(()=>setLoading(false));
1334
1354
  }, [
1335
1355
  client
1336
1356
  ]);
1337
- const handleSelect = (0, $dyHF6$react.useCallback)((id)=>{
1357
+ const handleSelect = (0, $ayBmS$react.useCallback)((id)=>{
1338
1358
  const selected = assets.find((doc)=>doc._id === id);
1339
1359
  if (!selected) throw new TypeError(`Failed to find video asset with id: ${id}`);
1340
- onChange((0, $dyHF6$sanityform.PatchEvent).from([
1341
- (0, $dyHF6$sanityform.setIfMissing)({
1360
+ onChange((0, $ayBmS$sanityform.PatchEvent).from([
1361
+ (0, $ayBmS$sanityform.setIfMissing)({
1342
1362
  asset: {}
1343
1363
  }),
1344
- (0, $dyHF6$sanityform.set)({
1364
+ (0, $ayBmS$sanityform.set)({
1345
1365
  _type: "reference",
1346
1366
  _weak: true,
1347
1367
  _ref: selected._id
@@ -1355,15 +1375,15 @@ function $43923b4c880150fa$export$2e2bcd8739ae039({ asset: asset , onChange: onC
1355
1375
  onChange,
1356
1376
  setDialogState
1357
1377
  ]);
1358
- const handleLoadMore = (0, $dyHF6$react.useCallback)(()=>{
1378
+ const handleLoadMore = (0, $ayBmS$react.useCallback)(()=>{
1359
1379
  fetchPage(++pageNoRef.current);
1360
1380
  }, [
1361
1381
  fetchPage
1362
1382
  ]);
1363
- (0, $dyHF6$react.useEffect)(()=>void fetchPage(pageNoRef.current), [
1383
+ (0, $ayBmS$react.useEffect)(()=>void fetchPage(pageNoRef.current), [
1364
1384
  fetchPage
1365
1385
  ]);
1366
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $216715c95525676f$export$2e2bcd8739ae039), {
1386
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $7a82b2aa05cc8aca$export$2e2bcd8739ae039), {
1367
1387
  onSelect: handleSelect,
1368
1388
  assets: assets,
1369
1389
  isLastPage: isLastPage,
@@ -1373,19 +1393,19 @@ function $43923b4c880150fa$export$2e2bcd8739ae039({ asset: asset , onChange: onC
1373
1393
  }
1374
1394
 
1375
1395
 
1376
- function $002b8d5a97e55801$export$2e2bcd8739ae039({ setDialogState: setDialogState , asset: asset , onChange: onChange }) {
1377
- const id = `InputBrowser${(0, $dyHF6$reachautoid.useId)()}`;
1378
- const handleClose = (0, $dyHF6$react.useCallback)(()=>setDialogState(false), [
1396
+ function $5f35306d1d1944f9$export$2e2bcd8739ae039({ setDialogState: setDialogState , asset: asset , onChange: onChange }) {
1397
+ const id = `InputBrowser${(0, $ayBmS$reachautoid.useId)()}`;
1398
+ const handleClose = (0, $ayBmS$react.useCallback)(()=>setDialogState(false), [
1379
1399
  setDialogState
1380
1400
  ]);
1381
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Dialog), {
1401
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Dialog), {
1382
1402
  scheme: "dark",
1383
1403
  __unstable_autoFocus: true,
1384
1404
  header: "Select video",
1385
1405
  id: id,
1386
1406
  onClose: handleClose,
1387
1407
  width: 2,
1388
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $43923b4c880150fa$export$2e2bcd8739ae039), {
1408
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $7011b51a60f6091d$export$2e2bcd8739ae039), {
1389
1409
  asset: asset,
1390
1410
  onChange: onChange,
1391
1411
  setDialogState: setDialogState
@@ -1404,12 +1424,12 @@ function $002b8d5a97e55801$export$2e2bcd8739ae039({ setDialogState: setDialogSta
1404
1424
 
1405
1425
 
1406
1426
 
1407
- const $aaf33e116b8198b5$export$b07ce35d92a46f4b = (asset, onChange)=>{
1408
- const client = (0, $dyHF6$sanity.useClient)();
1409
- return (0, $dyHF6$react.useCallback)(()=>{
1427
+ const $df118f8f4f291a25$export$b07ce35d92a46f4b = (asset, onChange)=>{
1428
+ const client = (0, $ayBmS$sanity.useClient)();
1429
+ return (0, $ayBmS$react.useCallback)(()=>{
1410
1430
  if (!asset) return;
1411
- onChange((0, $dyHF6$sanityform.PatchEvent).from((0, $dyHF6$sanityform.unset)()));
1412
- if (asset.assetId) (0, $a0485042ac477352$export$df987b50509121ea)(client, asset.assetId);
1431
+ onChange((0, $ayBmS$sanityform.PatchEvent).from((0, $ayBmS$sanityform.unset)()));
1432
+ if (asset.assetId) (0, $85b2a8cdf745d7d3$export$df987b50509121ea)(client, asset.assetId);
1413
1433
  if (asset._id) client.delete(asset._id);
1414
1434
  }, [
1415
1435
  asset,
@@ -1422,11 +1442,11 @@ const $aaf33e116b8198b5$export$b07ce35d92a46f4b = (asset, onChange)=>{
1422
1442
 
1423
1443
 
1424
1444
 
1425
- function $23be88c51cb37a0a$export$b704b622b4125987({ asset: asset , client: client }) {
1426
- const playbackId = (0, $96cfb4479805b243$export$bdfa34d24bb44333)(asset);
1445
+ function $7d093cbbd5ecccea$export$b704b622b4125987({ asset: asset , client: client }) {
1446
+ const playbackId = (0, $95c7e77a8fa5d84c$export$bdfa34d24bb44333)(asset);
1427
1447
  const searchParams = new URLSearchParams();
1428
- if ((0, $5bbe48978fdc9616$export$f7d2546fac75bbd)(asset) === "signed") {
1429
- const token = (0, $d8ba7896129c9d6c$export$87b96baf1080652a)(client, playbackId, "v");
1448
+ if ((0, $b22c582d9b0c45c1$export$f7d2546fac75bbd)(asset) === "signed") {
1449
+ const token = (0, $66cd6455bd010559$export$87b96baf1080652a)(client, playbackId, "v");
1430
1450
  searchParams.set("token", token);
1431
1451
  }
1432
1452
  return `https://stream.mux.com/${playbackId}.m3u8?${searchParams}`;
@@ -1440,22 +1460,23 @@ function $23be88c51cb37a0a$export$b704b622b4125987({ asset: asset , client: clie
1440
1460
 
1441
1461
 
1442
1462
 
1443
- function $e9dd88be70c34bc0$export$2e2bcd8739ae039({ asset: asset , getCurrentTime: getCurrentTime , setDialogState: setDialogState }) {
1444
- const client = (0, $dyHF6$sanity.useClient)();
1445
- const dialogId = `EditThumbnailDialog${(0, $dyHF6$reachautoid.useId)()}`;
1446
- const nextTime = (0, $dyHF6$react.useMemo)(()=>getCurrentTime(), [
1463
+
1464
+
1465
+ function $8bba2dccded136a6$export$2e2bcd8739ae039({ asset: asset , getCurrentTime: getCurrentTime , setDialogState: setDialogState }) {
1466
+ const client = (0, $ayBmS$sanity.useClient)();
1467
+ const dialogId = `EditThumbnailDialog${(0, $ayBmS$reachautoid.useId)()}`;
1468
+ const nextTime = (0, $ayBmS$react.useMemo)(()=>getCurrentTime(), [
1447
1469
  getCurrentTime
1448
1470
  ]);
1449
- const assetWithNewThumbnail = (0, $dyHF6$react.useMemo)(()=>({
1450
- ...asset,
1471
+ const assetWithNewThumbnail = (0, $ayBmS$react.useMemo)(()=>(0, ($parcel$interopDefault($ayBmS$swchelperslib_object_spread_propsjs)))((0, ($parcel$interopDefault($ayBmS$swchelperslib_object_spreadjs)))({}, asset), {
1451
1472
  thumbTime: nextTime
1452
1473
  }), [
1453
1474
  asset,
1454
1475
  nextTime
1455
1476
  ]);
1456
- const [saving, setSaving] = (0, $dyHF6$react.useState)(false);
1457
- const [error, setError] = (0, $dyHF6$react.useState)(null);
1458
- const handleSave = (0, $dyHF6$react.useCallback)(()=>{
1477
+ const [saving, setSaving] = (0, $ayBmS$react.useState)(false);
1478
+ const [error, setError] = (0, $ayBmS$react.useState)(null);
1479
+ const handleSave = (0, $ayBmS$react.useCallback)(()=>{
1459
1480
  setSaving(true);
1460
1481
  client.patch(asset._id).set({
1461
1482
  thumbTime: nextTime
@@ -1468,19 +1489,19 @@ function $e9dd88be70c34bc0$export$2e2bcd8739ae039({ asset: asset , getCurrentTim
1468
1489
  nextTime,
1469
1490
  setDialogState
1470
1491
  ]);
1471
- const width = 300 * (0, $dyHF6$usedevicepixelratio.getDevicePixelRatio)({
1492
+ const width = 300 * (0, $ayBmS$usedevicepixelratio.getDevicePixelRatio)({
1472
1493
  maxDpr: 2
1473
1494
  });
1474
1495
  if (error) // eslint-disable-next-line no-warning-comments
1475
1496
  // @TODO handle errors more gracefully
1476
1497
  throw error;
1477
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Dialog), {
1498
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Dialog), {
1478
1499
  id: dialogId,
1479
1500
  header: "Edit thumbnail",
1480
1501
  onClose: ()=>setDialogState(false),
1481
- footer: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Stack), {
1502
+ footer: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Stack), {
1482
1503
  padding: 3,
1483
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Button), {
1504
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Button), {
1484
1505
  mode: "ghost",
1485
1506
  tone: "primary",
1486
1507
  loading: saving,
@@ -1488,33 +1509,33 @@ function $e9dd88be70c34bc0$export$2e2bcd8739ae039({ asset: asset , getCurrentTim
1488
1509
  text: "Set new thumbnail"
1489
1510
  }, "thumbnail")
1490
1511
  }),
1491
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Stack), {
1512
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Stack), {
1492
1513
  space: 3,
1493
1514
  padding: 3,
1494
1515
  children: [
1495
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Stack), {
1516
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Stack), {
1496
1517
  space: 2,
1497
1518
  children: [
1498
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Text), {
1519
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Text), {
1499
1520
  size: 1,
1500
1521
  weight: "semibold",
1501
1522
  children: "Current:"
1502
1523
  }),
1503
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $6de6709202a3b061$export$bd4b73f15688a160), {
1524
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $b4359f9e5317addd$export$bd4b73f15688a160), {
1504
1525
  asset: asset,
1505
1526
  width: width
1506
1527
  })
1507
1528
  ]
1508
1529
  }),
1509
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Stack), {
1530
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Stack), {
1510
1531
  space: 2,
1511
1532
  children: [
1512
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Text), {
1533
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Text), {
1513
1534
  size: 1,
1514
1535
  weight: "semibold",
1515
1536
  children: "New:"
1516
1537
  }),
1517
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $6de6709202a3b061$export$bd4b73f15688a160), {
1538
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $b4359f9e5317addd$export$bd4b73f15688a160), {
1518
1539
  asset: assetWithNewThumbnail,
1519
1540
  width: width
1520
1541
  })
@@ -1536,18 +1557,19 @@ function $e9dd88be70c34bc0$export$2e2bcd8739ae039({ asset: asset , getCurrentTim
1536
1557
 
1537
1558
 
1538
1559
 
1539
- function $ff9ed2112976f4c6$export$445f1a1fda135dc9({ asset: asset , client: client }) {
1540
- const playbackId = (0, $96cfb4479805b243$export$bdfa34d24bb44333)(asset);
1560
+ function $903f6e8094d64e93$export$445f1a1fda135dc9({ asset: asset , client: client }) {
1561
+ const playbackId = (0, $95c7e77a8fa5d84c$export$bdfa34d24bb44333)(asset);
1541
1562
  const searchParams = new URLSearchParams();
1542
- if ((0, $5bbe48978fdc9616$export$f7d2546fac75bbd)(asset) === "signed") {
1543
- const token = (0, $d8ba7896129c9d6c$export$87b96baf1080652a)(client, playbackId, "s");
1563
+ if ((0, $b22c582d9b0c45c1$export$f7d2546fac75bbd)(asset) === "signed") {
1564
+ const token = (0, $66cd6455bd010559$export$87b96baf1080652a)(client, playbackId, "s");
1544
1565
  searchParams.set("token", token);
1545
1566
  }
1546
1567
  return `https://image.mux.com/${playbackId}/storyboard.vtt?${searchParams}`;
1547
1568
  }
1548
1569
 
1549
1570
 
1550
- const $f31b07fd20c626b4$export$b302ef9d8310f71 = (0, ($parcel$interopDefault($dyHF6$styledcomponents)))((0, $dyHF6$sanityui.Card))`
1571
+ let $f42279f82eb87901$var$_ = (t3)=>t3, $f42279f82eb87901$var$t, $f42279f82eb87901$var$t1, $f42279f82eb87901$var$t2;
1572
+ const $f42279f82eb87901$export$b302ef9d8310f71 = (0, ($parcel$interopDefault($ayBmS$styledcomponents)))((0, $ayBmS$sanityui.Card))($f42279f82eb87901$var$t || ($f42279f82eb87901$var$t = $f42279f82eb87901$var$_`
1551
1573
  position: relative;
1552
1574
  min-height: 150px;
1553
1575
  aspect-ratio: 16 / 9;
@@ -1663,8 +1685,8 @@ const $f31b07fd20c626b4$export$b302ef9d8310f71 = (0, ($parcel$interopDefault($dy
1663
1685
  media-controller:not(:-webkit-full-screen) video {
1664
1686
  aspect-ratio: 16 / 9;
1665
1687
  }
1666
- `;
1667
- const $f31b07fd20c626b4$export$ec21f2fe322b745c = (0, ($parcel$interopDefault($dyHF6$styledcomponents))).div`
1688
+ `));
1689
+ const $f42279f82eb87901$export$ec21f2fe322b745c = (0, ($parcel$interopDefault($ayBmS$styledcomponents))).div($f42279f82eb87901$var$t1 || ($f42279f82eb87901$var$t1 = $f42279f82eb87901$var$_`
1668
1690
  && {
1669
1691
  --media-background-color: transparent;
1670
1692
  --media-button-icon-width: 100%;
@@ -1682,17 +1704,17 @@ const $f31b07fd20c626b4$export$ec21f2fe322b745c = (0, ($parcel$interopDefault($d
1682
1704
  width: max(27px, min(9%, 90px));
1683
1705
  }
1684
1706
  }
1685
- `;
1686
- const $f31b07fd20c626b4$export$fa0cb91fe5adf3c5 = (0, ($parcel$interopDefault($dyHF6$styledcomponents)))((0, $dyHF6$mediachromedistreact.MediaControlBar))`
1707
+ `));
1708
+ const $f42279f82eb87901$export$fa0cb91fe5adf3c5 = (0, ($parcel$interopDefault($ayBmS$styledcomponents)))((0, $ayBmS$mediachromedistreact.MediaControlBar))($f42279f82eb87901$var$t2 || ($f42279f82eb87901$var$t2 = $f42279f82eb87901$var$_`
1687
1709
  justify-content: flex-end;
1688
1710
  button {
1689
1711
  height: auto;
1690
1712
  }
1691
- `;
1692
- function $f31b07fd20c626b4$export$5ebdf79245c1c64a({ asset: asset }) {
1693
- const client = (0, $dyHF6$sanity.useClient)();
1694
- const ref = (0, $dyHF6$react.useRef)(null);
1695
- const src = (0, $dyHF6$react.useMemo)(()=>(0, $2ed67348dc6c5cb5$export$8081e7a11b9f1345)({
1713
+ `));
1714
+ function $f42279f82eb87901$export$5ebdf79245c1c64a({ asset: asset }) {
1715
+ const client = (0, $ayBmS$sanity.useClient)();
1716
+ const ref = (0, $ayBmS$react.useRef)(null);
1717
+ const src = (0, $ayBmS$react.useMemo)(()=>(0, $f2ccfb00ca22d3aa$export$8081e7a11b9f1345)({
1696
1718
  client: client,
1697
1719
  asset: asset,
1698
1720
  width: 1920,
@@ -1701,27 +1723,28 @@ function $f31b07fd20c626b4$export$5ebdf79245c1c64a({ asset: asset }) {
1701
1723
  client,
1702
1724
  asset
1703
1725
  ]);
1704
- (0, $dyHF6$react.useEffect)(()=>{
1726
+ (0, $ayBmS$react.useEffect)(()=>{
1705
1727
  if (ref.current) {
1728
+ var ref1;
1706
1729
  const style = document.createElement("style");
1707
1730
  style.innerHTML = "img { object-fit: contain; }";
1708
- if (ref.current?.shadowRoot) ref.current.shadowRoot.appendChild(style);
1731
+ if ((ref1 = ref.current) === null || ref1 === void 0 ? void 0 : ref1.shadowRoot) ref.current.shadowRoot.appendChild(style);
1709
1732
  }
1710
1733
  }, []);
1711
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$mediachromedistreact.MediaPosterImage), {
1734
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$mediachromedistreact.MediaPosterImage), {
1712
1735
  ref: ref,
1713
1736
  slot: "poster",
1714
1737
  src: src
1715
1738
  });
1716
1739
  }
1717
- function $f31b07fd20c626b4$export$95073c0c4bf2add1({ asset: asset }) {
1718
- const client = (0, $dyHF6$sanity.useClient)();
1740
+ function $f42279f82eb87901$export$95073c0c4bf2add1({ asset: asset }) {
1741
+ const client = (0, $ayBmS$sanity.useClient)();
1719
1742
  // Why useState instead of useMemo? Because we really really only want to run it exactly once and useMemo doesn't make that guarantee
1720
- const [src] = (0, $dyHF6$react.useState)(()=>(0, $ff9ed2112976f4c6$export$445f1a1fda135dc9)({
1743
+ const [src] = (0, $ayBmS$react.useState)(()=>(0, $903f6e8094d64e93$export$445f1a1fda135dc9)({
1721
1744
  asset: asset,
1722
1745
  client: client
1723
1746
  }));
1724
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("track", {
1747
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("track", {
1725
1748
  label: "thumbnails",
1726
1749
  default: true,
1727
1750
  kind: "metadata",
@@ -1735,19 +1758,20 @@ function $f31b07fd20c626b4$export$95073c0c4bf2add1({ asset: asset }) {
1735
1758
 
1736
1759
 
1737
1760
 
1738
- const $18e643189121e331$export$6aa22a823032b784 = (0, ($parcel$interopDefault($dyHF6$styledcomponents)))((0, $dyHF6$sanityui.Card))`
1761
+ let $e3b6eafb04e90e95$var$_ = (t4)=>t4, $e3b6eafb04e90e95$var$t, $e3b6eafb04e90e95$var$t1, $e3b6eafb04e90e95$var$t2, $e3b6eafb04e90e95$var$t3;
1762
+ const $e3b6eafb04e90e95$export$6aa22a823032b784 = (0, ($parcel$interopDefault($ayBmS$styledcomponents)))((0, $ayBmS$sanityui.Card))($e3b6eafb04e90e95$var$t || ($e3b6eafb04e90e95$var$t = $e3b6eafb04e90e95$var$_`
1739
1763
  min-height: 82px;
1740
1764
  box-sizing: border-box;
1741
- `;
1742
- const $18e643189121e331$export$245cfede9308c835 = (0, ($parcel$interopDefault($dyHF6$styledcomponents)))((0, $dyHF6$sanityui.Flex))`
1765
+ `));
1766
+ const $e3b6eafb04e90e95$export$245cfede9308c835 = (0, ($parcel$interopDefault($ayBmS$styledcomponents)))((0, $ayBmS$sanityui.Flex))($e3b6eafb04e90e95$var$t1 || ($e3b6eafb04e90e95$var$t1 = $e3b6eafb04e90e95$var$_`
1743
1767
  text-overflow: ellipsis;
1744
1768
  overflow: hidden;
1745
- `;
1746
- const $18e643189121e331$export$e3b4754a92ccf466 = (0, ($parcel$interopDefault($dyHF6$styledcomponents)))((0, $dyHF6$sanityui.Stack))`
1769
+ `));
1770
+ const $e3b6eafb04e90e95$export$e3b4754a92ccf466 = (0, ($parcel$interopDefault($ayBmS$styledcomponents)))((0, $ayBmS$sanityui.Stack))($e3b6eafb04e90e95$var$t2 || ($e3b6eafb04e90e95$var$t2 = $e3b6eafb04e90e95$var$_`
1747
1771
  position: relative;
1748
1772
  width: 60%;
1749
- `;
1750
- const $18e643189121e331$export$bedb6b8ab184f038 = (0, ($parcel$interopDefault($dyHF6$styledcomponents)))((0, $dyHF6$sanityui.Code))`
1773
+ `));
1774
+ const $e3b6eafb04e90e95$export$bedb6b8ab184f038 = (0, ($parcel$interopDefault($ayBmS$styledcomponents)))((0, $ayBmS$sanityui.Code))($e3b6eafb04e90e95$var$t3 || ($e3b6eafb04e90e95$var$t3 = $e3b6eafb04e90e95$var$_`
1751
1775
  position: relative;
1752
1776
  width: 100%;
1753
1777
 
@@ -1757,23 +1781,23 @@ const $18e643189121e331$export$bedb6b8ab184f038 = (0, ($parcel$interopDefault($d
1757
1781
  position: relative;
1758
1782
  max-width: 200px;
1759
1783
  }
1760
- `;
1761
- const $18e643189121e331$export$98a3886347b629fb = ({ progress: progress = 100 , onCancel: onCancel , filename: filename , text: text = "Uploading" })=>{
1762
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)($18e643189121e331$export$6aa22a823032b784, {
1784
+ `));
1785
+ const $e3b6eafb04e90e95$export$98a3886347b629fb = ({ progress: progress = 100 , onCancel: onCancel , filename: filename , text: text = "Uploading" })=>{
1786
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)($e3b6eafb04e90e95$export$6aa22a823032b784, {
1763
1787
  tone: "primary",
1764
1788
  padding: 4,
1765
1789
  border: true,
1766
1790
  height: "fill",
1767
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)($18e643189121e331$export$245cfede9308c835, {
1791
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)($e3b6eafb04e90e95$export$245cfede9308c835, {
1768
1792
  align: "center",
1769
1793
  justify: "space-between",
1770
1794
  height: "fill",
1771
1795
  direction: "row",
1772
1796
  gap: 2,
1773
1797
  children: [
1774
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)($18e643189121e331$export$e3b4754a92ccf466, {
1798
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)($e3b6eafb04e90e95$export$e3b4754a92ccf466, {
1775
1799
  children: [
1776
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Flex), {
1800
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Flex), {
1777
1801
  justify: "center",
1778
1802
  gap: [
1779
1803
  3,
@@ -1786,13 +1810,13 @@ const $18e643189121e331$export$98a3886347b629fb = ({ progress: progress = 100 ,
1786
1810
  "column",
1787
1811
  "row"
1788
1812
  ],
1789
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Text), {
1813
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Text), {
1790
1814
  size: 1,
1791
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Inline), {
1815
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Inline), {
1792
1816
  space: 2,
1793
1817
  children: [
1794
1818
  text,
1795
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)($18e643189121e331$export$bedb6b8ab184f038, {
1819
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)($e3b6eafb04e90e95$export$bedb6b8ab184f038, {
1796
1820
  size: 1,
1797
1821
  children: filename ? filename : "..."
1798
1822
  })
@@ -1800,17 +1824,17 @@ const $18e643189121e331$export$98a3886347b629fb = ({ progress: progress = 100 ,
1800
1824
  })
1801
1825
  })
1802
1826
  }),
1803
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Card), {
1827
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Card), {
1804
1828
  marginTop: 3,
1805
1829
  radius: 5,
1806
1830
  shadow: 1,
1807
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanity_unstable.LinearProgress), {
1831
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanity_unstable.LinearProgress), {
1808
1832
  value: progress
1809
1833
  })
1810
1834
  })
1811
1835
  ]
1812
1836
  }),
1813
- onCancel ? /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Button), {
1837
+ onCancel ? /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Button), {
1814
1838
  fontSize: 2,
1815
1839
  text: "Cancel upload",
1816
1840
  mode: "ghost",
@@ -1823,52 +1847,59 @@ const $18e643189121e331$export$98a3886347b629fb = ({ progress: progress = 100 ,
1823
1847
  };
1824
1848
 
1825
1849
 
1826
- const $4b270840a4c34b64$var$MuxVideo = ({ asset: asset , buttons: buttons , readOnly: readOnly , onChange: onChange , dialogState: dialogState , setDialogState: setDialogState })=>{
1827
- const client = (0, $dyHF6$sanity.useClient)();
1828
- const isLoading = (0, $dyHF6$react.useMemo)(()=>{
1829
- if (asset?.status === "preparing") return "Preparing the video";
1830
- if (asset?.status === "waiting_for_upload") return "Waiting for upload to start";
1831
- if (asset?.status === "waiting") return "Processing upload";
1832
- if (asset?.status === "ready") return false;
1833
- if (typeof asset?.status === "undefined") return false;
1850
+ const $ab86d4653880d8ea$var$MuxVideo = ({ asset: asset , buttons: buttons , readOnly: readOnly , onChange: onChange , dialogState: dialogState , setDialogState: setDialogState })=>{
1851
+ var ref8, ref1, ref2, ref3;
1852
+ const client = (0, $ayBmS$sanity.useClient)();
1853
+ const isLoading = (0, $ayBmS$react.useMemo)(()=>{
1854
+ if ((asset === null || asset === void 0 ? void 0 : asset.status) === "preparing") return "Preparing the video";
1855
+ if ((asset === null || asset === void 0 ? void 0 : asset.status) === "waiting_for_upload") return "Waiting for upload to start";
1856
+ if ((asset === null || asset === void 0 ? void 0 : asset.status) === "waiting") return "Processing upload";
1857
+ if ((asset === null || asset === void 0 ? void 0 : asset.status) === "ready") return false;
1858
+ if (typeof (asset === null || asset === void 0 ? void 0 : asset.status) === "undefined") return false;
1834
1859
  return true;
1835
1860
  }, [
1836
1861
  asset
1837
1862
  ]);
1838
- const isPreparingStaticRenditions = (0, $dyHF6$react.useMemo)(()=>{
1839
- if (asset?.data?.static_renditions?.status === "preparing") return true;
1840
- if (asset?.data?.static_renditions?.status === "ready") return false;
1863
+ const isPreparingStaticRenditions = (0, $ayBmS$react.useMemo)(()=>{
1864
+ var ref, ref5, ref6, ref7;
1865
+ if ((asset === null || asset === void 0 ? void 0 : (ref = asset.data) === null || ref === void 0 ? void 0 : (ref5 = ref.static_renditions) === null || ref5 === void 0 ? void 0 : ref5.status) === "preparing") return true;
1866
+ if ((asset === null || asset === void 0 ? void 0 : (ref6 = asset.data) === null || ref6 === void 0 ? void 0 : (ref7 = ref6.static_renditions) === null || ref7 === void 0 ? void 0 : ref7.status) === "ready") return false;
1841
1867
  return false;
1842
1868
  }, [
1843
- asset?.data?.static_renditions?.status
1869
+ asset === null || asset === void 0 ? void 0 : (ref8 = asset.data) === null || ref8 === void 0 ? void 0 : (ref1 = ref8.static_renditions) === null || ref1 === void 0 ? void 0 : ref1.status
1844
1870
  ]);
1845
- const videoSrc = (0, $dyHF6$react.useMemo)(()=>asset.playbackId && (0, $23be88c51cb37a0a$export$b704b622b4125987)({
1871
+ const videoSrc = (0, $ayBmS$react.useMemo)(()=>asset.playbackId && (0, $7d093cbbd5ecccea$export$b704b622b4125987)({
1846
1872
  client: client,
1847
1873
  asset: asset
1848
1874
  }), [
1849
1875
  asset,
1850
1876
  client
1851
1877
  ]);
1852
- const [error, setError] = (0, $dyHF6$react.useState)(null);
1853
- const handleError = (0, $dyHF6$react.useCallback)((event)=>setError(event.currentTarget.error), []);
1854
- const playRef = (0, $dyHF6$react.useRef)(null);
1855
- const muteRef = (0, $dyHF6$react.useRef)(null);
1856
- const video = (0, $dyHF6$react.useRef)(null);
1857
- const getCurrentTime = (0, $dyHF6$react.useCallback)(()=>video.current?.currentTime ?? 0, [
1878
+ const [error, setError] = (0, $ayBmS$react.useState)(null);
1879
+ const handleError = (0, $ayBmS$react.useCallback)((event)=>setError(event.currentTarget.error), []);
1880
+ const playRef = (0, $ayBmS$react.useRef)(null);
1881
+ const muteRef = (0, $ayBmS$react.useRef)(null);
1882
+ const video = (0, $ayBmS$react.useRef)(null);
1883
+ var ref4;
1884
+ const getCurrentTime = (0, $ayBmS$react.useCallback)(()=>{
1885
+ var ref;
1886
+ return (ref4 = (ref = video.current) === null || ref === void 0 ? void 0 : ref.currentTime) !== null && ref4 !== void 0 ? ref4 : 0;
1887
+ }, [
1858
1888
  video
1859
1889
  ]);
1860
- const handleCancelUpload = (0, $aaf33e116b8198b5$export$b07ce35d92a46f4b)(asset, onChange);
1861
- (0, $dyHF6$react.useEffect)(()=>{
1890
+ const handleCancelUpload = (0, $df118f8f4f291a25$export$b07ce35d92a46f4b)(asset, onChange);
1891
+ (0, $ayBmS$react.useEffect)(()=>{
1892
+ var ref, ref9;
1862
1893
  const style = document.createElement("style");
1863
1894
  style.innerHTML = "button svg { vertical-align: middle; }";
1864
- if (playRef.current?.shadowRoot) playRef.current.shadowRoot.appendChild(style);
1865
- if (muteRef?.current?.shadowRoot) muteRef.current.shadowRoot.appendChild(style.cloneNode(true));
1895
+ if ((ref = playRef.current) === null || ref === void 0 ? void 0 : ref.shadowRoot) playRef.current.shadowRoot.appendChild(style);
1896
+ if (muteRef === null || muteRef === void 0 ? void 0 : (ref9 = muteRef.current) === null || ref9 === void 0 ? void 0 : ref9.shadowRoot) muteRef.current.shadowRoot.appendChild(style.cloneNode(true));
1866
1897
  }, []);
1867
- const [playerInitTime] = (0, $dyHF6$react.useState)(()=>(0, $dyHF6$muxplaybackcore.generatePlayerInitTime)());
1868
- const playbackEngineRef = (0, $dyHF6$react.useRef)(undefined);
1869
- (0, $dyHF6$react.useEffect)(()=>{
1898
+ const [playerInitTime] = (0, $ayBmS$react.useState)(()=>(0, $ayBmS$muxplaybackcore.generatePlayerInitTime)());
1899
+ const playbackEngineRef = (0, $ayBmS$react.useRef)(undefined);
1900
+ (0, $ayBmS$react.useEffect)(()=>{
1870
1901
  if (isLoading || !videoSrc) return;
1871
- const nextPlaybackEngineRef = (0, $dyHF6$muxplaybackcore.initialize)({
1902
+ const nextPlaybackEngineRef = (0, $ayBmS$muxplaybackcore.initialize)({
1872
1903
  src: videoSrc,
1873
1904
  playerInitTime: playerInitTime,
1874
1905
  playerSoftwareName: "sanity-plugin-mux-input",
@@ -1880,74 +1911,75 @@ const $4b270840a4c34b64$var$MuxVideo = ({ asset: asset , buttons: buttons , read
1880
1911
  isLoading,
1881
1912
  playerInitTime
1882
1913
  ]);
1883
- (0, $dyHF6$react.useEffect)(()=>{
1884
- if (asset?.status === "errored") {
1914
+ (0, $ayBmS$react.useEffect)(()=>{
1915
+ if ((asset === null || asset === void 0 ? void 0 : asset.status) === "errored") {
1916
+ var ref, ref10, ref11;
1885
1917
  handleCancelUpload();
1886
1918
  // eslint-disable-next-line no-warning-comments
1887
1919
  // @TODO use better error handling
1888
- throw new Error(asset.data?.errors?.messages?.join(" "));
1920
+ throw new Error((ref = asset.data) === null || ref === void 0 ? void 0 : (ref10 = ref.errors) === null || ref10 === void 0 ? void 0 : (ref11 = ref10.messages) === null || ref11 === void 0 ? void 0 : ref11.join(" "));
1889
1921
  }
1890
1922
  }, [
1891
- asset.data?.errors?.messages,
1892
- asset?.status,
1923
+ (ref2 = asset.data) === null || ref2 === void 0 ? void 0 : (ref3 = ref2.errors) === null || ref3 === void 0 ? void 0 : ref3.messages,
1924
+ asset === null || asset === void 0 ? void 0 : asset.status,
1893
1925
  handleCancelUpload
1894
1926
  ]);
1895
1927
  if (error) // @TODO better error handling
1896
1928
  throw error;
1897
1929
  if (!asset || !asset.status) return null;
1898
- if (isLoading) return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $18e643189121e331$export$98a3886347b629fb), {
1930
+ if (isLoading) return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $e3b6eafb04e90e95$export$98a3886347b629fb), {
1899
1931
  progress: 100,
1900
- filename: asset?.filename,
1932
+ filename: asset === null || asset === void 0 ? void 0 : asset.filename,
1901
1933
  text: isLoading !== true && isLoading || "Waiting for Mux to complete the file",
1902
1934
  onCancel: readOnly ? undefined : ()=>handleCancelUpload()
1903
1935
  });
1904
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$reactjsxruntime.Fragment), {
1936
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$reactjsxruntime.Fragment), {
1905
1937
  children: [
1906
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $f31b07fd20c626b4$export$b302ef9d8310f71), {
1938
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $f42279f82eb87901$export$b302ef9d8310f71), {
1907
1939
  shadow: 1,
1908
1940
  tone: "transparent",
1909
1941
  scheme: "dark",
1910
1942
  children: [
1911
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$mediachromedistreact.MediaController), {
1943
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$mediachromedistreact.MediaController), {
1912
1944
  children: [
1913
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("video", {
1945
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("video", {
1914
1946
  playsInline: true,
1915
1947
  ref: video,
1916
1948
  onError: handleError,
1917
1949
  slot: "media",
1918
1950
  preload: "metadata",
1919
1951
  crossOrigin: "anonomous",
1920
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $f31b07fd20c626b4$export$95073c0c4bf2add1), {
1952
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $f42279f82eb87901$export$95073c0c4bf2add1), {
1921
1953
  asset: asset
1922
1954
  })
1923
1955
  }),
1924
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $f31b07fd20c626b4$export$5ebdf79245c1c64a), {
1956
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $f42279f82eb87901$export$5ebdf79245c1c64a), {
1925
1957
  asset: asset
1926
1958
  }),
1927
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$mediachromedistreact.MediaLoadingIndicator), {
1959
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$mediachromedistreact.MediaLoadingIndicator), {
1928
1960
  slot: "centered-chrome",
1929
1961
  noAutoHide: true
1930
1962
  }),
1931
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $f31b07fd20c626b4$export$ec21f2fe322b745c), {
1963
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $f42279f82eb87901$export$ec21f2fe322b745c), {
1932
1964
  slot: "centered-chrome",
1933
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$mediachromedistreact.MediaPlayButton), {})
1965
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$mediachromedistreact.MediaPlayButton), {})
1934
1966
  }),
1935
- buttons && /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $f31b07fd20c626b4$export$fa0cb91fe5adf3c5), {
1967
+ buttons && /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $f42279f82eb87901$export$fa0cb91fe5adf3c5), {
1936
1968
  slot: "top-chrome",
1937
1969
  children: buttons
1938
1970
  }),
1939
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$mediachromedistreact.MediaControlBar), {
1971
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$mediachromedistreact.MediaControlBar), {
1940
1972
  children: [
1941
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$mediachromedistreact.MediaMuteButton), {}),
1942
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$mediachromedistreact.MediaTimeDisplay), {}),
1943
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$mediachromedistreact.MediaTimeRange), {}),
1944
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$mediachromedistreact.MediaDurationDisplay), {}),
1945
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$mediachromedistreact.MediaFullscreenButton), {})
1973
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$mediachromedistreact.MediaMuteButton), {}),
1974
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$mediachromedistreact.MediaTimeDisplay), {}),
1975
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$mediachromedistreact.MediaTimeRange), {}),
1976
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$mediachromedistreact.MediaDurationDisplay), {}),
1977
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$mediachromedistreact.MediaFullscreenButton), {})
1946
1978
  ]
1947
1979
  })
1948
1980
  ]
1949
1981
  }),
1950
- isPreparingStaticRenditions && /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Card), {
1982
+ isPreparingStaticRenditions && /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Card), {
1951
1983
  padding: 2,
1952
1984
  radius: 1,
1953
1985
  style: {
@@ -1956,7 +1988,7 @@ const $4b270840a4c34b64$var$MuxVideo = ({ asset: asset , buttons: buttons , read
1956
1988
  top: "0.5em",
1957
1989
  left: "0.5em"
1958
1990
  },
1959
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Text), {
1991
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Text), {
1960
1992
  size: 1,
1961
1993
  style: {
1962
1994
  color: "var(--card-bg-color)"
@@ -1966,7 +1998,7 @@ const $4b270840a4c34b64$var$MuxVideo = ({ asset: asset , buttons: buttons , read
1966
1998
  })
1967
1999
  ]
1968
2000
  }),
1969
- dialogState === "edit-thumbnail" && /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $e9dd88be70c34bc0$export$2e2bcd8739ae039), {
2001
+ dialogState === "edit-thumbnail" && /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $8bba2dccded136a6$export$2e2bcd8739ae039), {
1970
2002
  asset: asset,
1971
2003
  getCurrentTime: getCurrentTime,
1972
2004
  setDialogState: setDialogState
@@ -1974,7 +2006,10 @@ const $4b270840a4c34b64$var$MuxVideo = ({ asset: asset , buttons: buttons , read
1974
2006
  ]
1975
2007
  });
1976
2008
  };
1977
- var $4b270840a4c34b64$export$2e2bcd8739ae039 = $4b270840a4c34b64$var$MuxVideo;
2009
+ var $ab86d4653880d8ea$export$2e2bcd8739ae039 = $ab86d4653880d8ea$var$MuxVideo;
2010
+
2011
+
2012
+
1978
2013
 
1979
2014
 
1980
2015
 
@@ -1991,40 +2026,37 @@ var $4b270840a4c34b64$export$2e2bcd8739ae039 = $4b270840a4c34b64$var$MuxVideo;
1991
2026
 
1992
2027
 
1993
2028
 
1994
- function $c3640926d3b4b579$export$a79bcc1dc439e294(border) {
2029
+ function $d5b4dfea215935be$export$a79bcc1dc439e294(border) {
1995
2030
  return `inset 0 0 0 ${border.width}px ${border.color}`;
1996
2031
  }
1997
- function $c3640926d3b4b579$export$c339ddc20364daad(opts) {
2032
+ function $d5b4dfea215935be$export$c339ddc20364daad(opts) {
1998
2033
  const { base: base , border: border , focusRing: focusRing } = opts;
1999
2034
  const focusRingOutsetWidth = focusRing.offset + focusRing.width;
2000
2035
  const focusRingInsetWidth = 0 - focusRing.offset;
2001
2036
  const bgColor = base ? base.bg : "var(--card-bg-color)";
2002
2037
  return [
2003
2038
  focusRingInsetWidth > 0 && `inset 0 0 0 ${focusRingInsetWidth}px var(--card-focus-ring-color)`,
2004
- border && $c3640926d3b4b579$export$a79bcc1dc439e294(border),
2039
+ border && $d5b4dfea215935be$export$a79bcc1dc439e294(border),
2005
2040
  focusRingInsetWidth < 0 && `0 0 0 ${0 - focusRingInsetWidth}px ${bgColor}`,
2006
2041
  focusRingOutsetWidth > 0 && `0 0 0 ${focusRingOutsetWidth}px var(--card-focus-ring-color)`,
2007
2042
  ].filter(Boolean).join(",");
2008
2043
  }
2009
2044
 
2010
2045
 
2011
- const $59667831b98d647c$export$de1df6cdafc19206 = (0, ($parcel$interopDefault($dyHF6$styledcomponents)))((0, $dyHF6$sanityui.MenuItem))(({ theme: theme })=>{
2046
+ let $3e9b63b1a24e1c3d$var$_ = (t1)=>t1, $3e9b63b1a24e1c3d$var$t;
2047
+ const $3e9b63b1a24e1c3d$export$de1df6cdafc19206 = (0, ($parcel$interopDefault($ayBmS$styledcomponents)))((0, $ayBmS$sanityui.MenuItem))(({ theme: theme })=>{
2012
2048
  const { focusRing: focusRing } = theme.sanity;
2013
2049
  const base = theme.sanity.color.base;
2014
2050
  const border = {
2015
2051
  width: 1,
2016
2052
  color: "var(--card-border-color)"
2017
2053
  };
2018
- return (0, $dyHF6$styledcomponents.css)`
2054
+ return (0, $ayBmS$styledcomponents.css)($3e9b63b1a24e1c3d$var$t || ($3e9b63b1a24e1c3d$var$t = $3e9b63b1a24e1c3d$var$_`
2019
2055
  position: relative;
2020
2056
 
2021
2057
  &:not([data-disabled='true']) {
2022
2058
  &:focus-within {
2023
- box-shadow: ${(0, $c3640926d3b4b579$export$c339ddc20364daad)({
2024
- base: base,
2025
- border: border,
2026
- focusRing: focusRing
2027
- })};
2059
+ box-shadow: ${0};
2028
2060
  }
2029
2061
  }
2030
2062
 
@@ -2043,34 +2075,51 @@ const $59667831b98d647c$export$de1df6cdafc19206 = (0, ($parcel$interopDefault($d
2043
2075
  border: 0;
2044
2076
  opacity: 0;
2045
2077
  }
2046
- `;
2078
+ `), (0, $d5b4dfea215935be$export$c339ddc20364daad)({
2079
+ base: base,
2080
+ border: border,
2081
+ focusRing: focusRing
2082
+ }));
2047
2083
  });
2048
2084
 
2049
2085
 
2050
- const $a1238a31a065a28d$export$c1c647ae58701638 = /*#__PURE__*/ (0, ($parcel$interopDefault($dyHF6$react))).forwardRef(function FileInputMenuItem(props, forwardedRef) {
2051
- const { icon: icon , id: idProp , accept: accept , capture: capture , fontSize: fontSize , multiple: multiple , onSelect: onSelect , padding: padding = 3 , space: space = 3 , textAlign: textAlign , text: text , disabled: disabled , ...rest } = props;
2052
- const id = (0, $dyHF6$reachautoid.useId)(idProp);
2053
- const handleChange = (0, ($parcel$interopDefault($dyHF6$react))).useCallback((event)=>{
2086
+ var $50a0d51ee493b3cc$export$c1c647ae58701638 = /*#__PURE__*/ (0, ($parcel$interopDefault($ayBmS$react))).forwardRef(function FileInputMenuItem(props, forwardedRef) {
2087
+ const { icon: icon , id: idProp , accept: accept , capture: capture , fontSize: fontSize , multiple: multiple , onSelect: onSelect , padding: padding = 3 , space: space = 3 , textAlign: textAlign , text: text , disabled: disabled } = props, rest = (0, ($parcel$interopDefault($ayBmS$swchelperslib_object_without_propertiesjs)))(props, [
2088
+ "icon",
2089
+ "id",
2090
+ "accept",
2091
+ "capture",
2092
+ "fontSize",
2093
+ "multiple",
2094
+ "onSelect",
2095
+ "padding",
2096
+ "space",
2097
+ "textAlign",
2098
+ "text",
2099
+ "disabled"
2100
+ ]);
2101
+ const id = (0, $ayBmS$reachautoid.useId)(idProp);
2102
+ const handleChange = (0, ($parcel$interopDefault($ayBmS$react))).useCallback((event)=>{
2054
2103
  if (onSelect && event.target.files) onSelect(Array.from(event.target.files));
2055
2104
  }, [
2056
2105
  onSelect
2057
2106
  ]);
2058
- const content = /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Flex), {
2107
+ const content = /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Flex), {
2059
2108
  align: "center",
2060
2109
  justify: "flex-start",
2061
2110
  padding: padding,
2062
2111
  children: [
2063
- icon && /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Box), {
2112
+ icon && /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Box), {
2064
2113
  marginRight: text ? space : undefined,
2065
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Text), {
2114
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Text), {
2066
2115
  size: fontSize,
2067
2116
  children: [
2068
- /*#__PURE__*/ (0, $dyHF6$react.isValidElement)(icon) && icon,
2069
- (0, $dyHF6$reactis.isValidElementType)(icon) && /*#__PURE__*/ (0, $dyHF6$react.createElement)(icon)
2117
+ /*#__PURE__*/ (0, $ayBmS$react.isValidElement)(icon) && icon,
2118
+ (0, $ayBmS$reactis.isValidElementType)(icon) && /*#__PURE__*/ (0, $ayBmS$react.createElement)(icon)
2070
2119
  ]
2071
2120
  })
2072
2121
  }),
2073
- text && /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Text), {
2122
+ text && /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Text), {
2074
2123
  align: textAlign,
2075
2124
  size: fontSize,
2076
2125
  textOverflow: "ellipsis",
@@ -2078,8 +2127,7 @@ const $a1238a31a065a28d$export$c1c647ae58701638 = /*#__PURE__*/ (0, ($parcel$int
2078
2127
  })
2079
2128
  ]
2080
2129
  });
2081
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $59667831b98d647c$export$de1df6cdafc19206), {
2082
- ...rest,
2130
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $3e9b63b1a24e1c3d$export$de1df6cdafc19206), (0, ($parcel$interopDefault($ayBmS$swchelperslib_object_spread_propsjs)))((0, ($parcel$interopDefault($ayBmS$swchelperslib_object_spreadjs)))({}, rest), {
2083
2131
  htmlFor: id,
2084
2132
  padding: 0,
2085
2133
  fontSize: 2,
@@ -2087,7 +2135,7 @@ const $a1238a31a065a28d$export$c1c647ae58701638 = /*#__PURE__*/ (0, ($parcel$int
2087
2135
  ref: forwardedRef,
2088
2136
  children: [
2089
2137
  content,
2090
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("input", {
2138
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("input", {
2091
2139
  "data-testid": "file-button-input",
2092
2140
  accept: accept,
2093
2141
  capture: capture,
@@ -2099,49 +2147,50 @@ const $a1238a31a065a28d$export$c1c647ae58701638 = /*#__PURE__*/ (0, ($parcel$int
2099
2147
  disabled: disabled
2100
2148
  })
2101
2149
  ]
2102
- });
2150
+ }));
2103
2151
  });
2104
2152
 
2105
2153
 
2106
- const $8a74cfcfbdb3efdf$var$LockCard = (0, ($parcel$interopDefault($dyHF6$styledcomponents)))((0, $dyHF6$sanityui.Card))`
2154
+ let $c5963d9d2157fdda$var$_ = (t2)=>t2, $c5963d9d2157fdda$var$t, $c5963d9d2157fdda$var$t1;
2155
+ const $c5963d9d2157fdda$var$LockCard = (0, ($parcel$interopDefault($ayBmS$styledcomponents)))((0, $ayBmS$sanityui.Card))($c5963d9d2157fdda$var$t || ($c5963d9d2157fdda$var$t = $c5963d9d2157fdda$var$_`
2107
2156
  position: absolute;
2108
2157
  top: 0;
2109
2158
  left: 0;
2110
2159
  opacity: 0.6;
2111
2160
  mix-blend-mode: screen;
2112
2161
  background: transparent;
2113
- `;
2114
- const $8a74cfcfbdb3efdf$var$LockButton = (0, ($parcel$interopDefault($dyHF6$styledcomponents)))((0, $dyHF6$sanityui.Button))`
2162
+ `));
2163
+ const $c5963d9d2157fdda$var$LockButton = (0, ($parcel$interopDefault($ayBmS$styledcomponents)))((0, $ayBmS$sanityui.Button))($c5963d9d2157fdda$var$t1 || ($c5963d9d2157fdda$var$t1 = $c5963d9d2157fdda$var$_`
2115
2164
  background: transparent;
2116
2165
  color: white;
2117
- `;
2118
- function $8a74cfcfbdb3efdf$var$PlayerActionsMenu(props) {
2166
+ `));
2167
+ function $c5963d9d2157fdda$var$PlayerActionsMenu(props) {
2119
2168
  const { asset: asset , readOnly: readOnly , dialogState: dialogState , setDialogState: setDialogState , onChange: onChange , onUpload: onUpload } = props;
2120
- const [open, setOpen] = (0, $dyHF6$react.useState)(false);
2121
- const [menuElement, setMenuRef] = (0, $dyHF6$react.useState)(null);
2122
- const isSigned = (0, $dyHF6$react.useMemo)(()=>(0, $5bbe48978fdc9616$export$f7d2546fac75bbd)(asset) === "signed", [
2169
+ const [open, setOpen] = (0, $ayBmS$react.useState)(false);
2170
+ const [menuElement, setMenuRef] = (0, $ayBmS$react.useState)(null);
2171
+ const isSigned = (0, $ayBmS$react.useMemo)(()=>(0, $b22c582d9b0c45c1$export$f7d2546fac75bbd)(asset) === "signed", [
2123
2172
  asset
2124
2173
  ]);
2125
- const onReset = (0, $dyHF6$react.useCallback)(()=>onChange((0, $dyHF6$sanityform.PatchEvent).from((0, $dyHF6$sanityform.unset)([]))), [
2174
+ const onReset = (0, $ayBmS$react.useCallback)(()=>onChange((0, $ayBmS$sanityform.PatchEvent).from((0, $ayBmS$sanityform.unset)([]))), [
2126
2175
  onChange
2127
2176
  ]);
2128
- (0, $dyHF6$react.useEffect)(()=>{
2177
+ (0, $ayBmS$react.useEffect)(()=>{
2129
2178
  if (open && dialogState) setOpen(false);
2130
2179
  }, [
2131
2180
  dialogState,
2132
2181
  open
2133
2182
  ]);
2134
- (0, $dyHF6$sanityui.useClickOutside)((0, $dyHF6$react.useCallback)(()=>setOpen(false), []), [
2183
+ (0, $ayBmS$sanityui.useClickOutside)((0, $ayBmS$react.useCallback)(()=>setOpen(false), []), [
2135
2184
  menuElement
2136
2185
  ]);
2137
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Inline), {
2186
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Inline), {
2138
2187
  space: 1,
2139
2188
  padding: 2,
2140
2189
  children: [
2141
- isSigned && /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Tooltip), {
2142
- content: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Box), {
2190
+ isSigned && /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Tooltip), {
2191
+ content: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Box), {
2143
2192
  padding: 2,
2144
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Text), {
2193
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Text), {
2145
2194
  muted: true,
2146
2195
  size: 1,
2147
2196
  children: "Signed playback policy"
@@ -2149,59 +2198,59 @@ function $8a74cfcfbdb3efdf$var$PlayerActionsMenu(props) {
2149
2198
  }),
2150
2199
  placement: "right",
2151
2200
  portal: true,
2152
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)($8a74cfcfbdb3efdf$var$LockCard, {
2201
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)($c5963d9d2157fdda$var$LockCard, {
2153
2202
  radius: 2,
2154
2203
  margin: 2,
2155
2204
  scheme: "dark",
2156
2205
  tone: "positive",
2157
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)($8a74cfcfbdb3efdf$var$LockButton, {
2158
- icon: (0, $dyHF6$sanityicons.LockIcon),
2206
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)($c5963d9d2157fdda$var$LockButton, {
2207
+ icon: (0, $ayBmS$sanityicons.LockIcon),
2159
2208
  mode: "bleed",
2160
2209
  tone: "positive"
2161
2210
  })
2162
2211
  })
2163
2212
  }),
2164
- !readOnly && /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Button), {
2165
- icon: (0, $dyHF6$sanityicons.EditIcon),
2213
+ !readOnly && /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Button), {
2214
+ icon: (0, $ayBmS$sanityicons.EditIcon),
2166
2215
  mode: "ghost",
2167
2216
  onClick: ()=>setDialogState("edit-thumbnail")
2168
2217
  }),
2169
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Popover), {
2170
- content: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Menu), {
2218
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Popover), {
2219
+ content: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Menu), {
2171
2220
  ref: setMenuRef,
2172
2221
  children: [
2173
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Box), {
2222
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Box), {
2174
2223
  padding: 2,
2175
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Label), {
2224
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Label), {
2176
2225
  muted: true,
2177
2226
  size: 1,
2178
2227
  children: "Replace"
2179
2228
  })
2180
2229
  }),
2181
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $a1238a31a065a28d$export$c1c647ae58701638), {
2230
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $50a0d51ee493b3cc$export$c1c647ae58701638), {
2182
2231
  accept: "video/*",
2183
- icon: (0, $dyHF6$sanityicons.UploadIcon),
2232
+ icon: (0, $ayBmS$sanityicons.UploadIcon),
2184
2233
  mode: "bleed",
2185
2234
  onSelect: onUpload,
2186
2235
  text: "Upload",
2187
2236
  disabled: readOnly,
2188
2237
  fontSize: 2
2189
2238
  }),
2190
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.MenuItem), {
2191
- icon: (0, $dyHF6$sanityicons.SearchIcon),
2239
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.MenuItem), {
2240
+ icon: (0, $ayBmS$sanityicons.SearchIcon),
2192
2241
  text: "Browse",
2193
2242
  onClick: ()=>setDialogState("select-video")
2194
2243
  }),
2195
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.MenuDivider), {}),
2196
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.MenuItem), {
2197
- icon: (0, $dyHF6$sanityicons.PlugIcon),
2244
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.MenuDivider), {}),
2245
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.MenuItem), {
2246
+ icon: (0, $ayBmS$sanityicons.PlugIcon),
2198
2247
  text: "Configure API",
2199
2248
  onClick: ()=>setDialogState("secrets")
2200
2249
  }),
2201
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.MenuDivider), {}),
2202
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.MenuItem), {
2250
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.MenuDivider), {}),
2251
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.MenuItem), {
2203
2252
  tone: "critical",
2204
- icon: (0, $dyHF6$sanityicons.ResetIcon),
2253
+ icon: (0, $ayBmS$sanityicons.ResetIcon),
2205
2254
  text: "Clear field",
2206
2255
  onClick: onReset,
2207
2256
  disabled: readOnly
@@ -2210,8 +2259,8 @@ function $8a74cfcfbdb3efdf$var$PlayerActionsMenu(props) {
2210
2259
  }),
2211
2260
  portal: true,
2212
2261
  open: open,
2213
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Button), {
2214
- icon: (0, $dyHF6$sanityicons.EllipsisVerticalIcon),
2262
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Button), {
2263
+ icon: (0, $ayBmS$sanityicons.EllipsisVerticalIcon),
2215
2264
  mode: "ghost",
2216
2265
  onClick: ()=>{
2217
2266
  setDialogState(false);
@@ -2222,7 +2271,7 @@ function $8a74cfcfbdb3efdf$var$PlayerActionsMenu(props) {
2222
2271
  ]
2223
2272
  });
2224
2273
  }
2225
- var $8a74cfcfbdb3efdf$export$2e2bcd8739ae039 = /*#__PURE__*/ (0, $dyHF6$react.memo)($8a74cfcfbdb3efdf$var$PlayerActionsMenu);
2274
+ var $c5963d9d2157fdda$export$2e2bcd8739ae039 = /*#__PURE__*/ (0, $ayBmS$react.memo)($c5963d9d2157fdda$var$PlayerActionsMenu);
2226
2275
 
2227
2276
 
2228
2277
 
@@ -2232,48 +2281,50 @@ var $8a74cfcfbdb3efdf$export$2e2bcd8739ae039 = /*#__PURE__*/ (0, $dyHF6$react.me
2232
2281
 
2233
2282
 
2234
2283
 
2235
- function $ef74f13c86627be6$export$ed320981107bc6bd(component) {
2236
- return (0, ($parcel$interopDefault($dyHF6$styledcomponents)))(component)((props)=>{
2284
+ let $ecb87a73d452358c$var$_ = (t1)=>t1, $ecb87a73d452358c$var$t;
2285
+ function $ecb87a73d452358c$export$ed320981107bc6bd(component) {
2286
+ return (0, ($parcel$interopDefault($ayBmS$styledcomponents)))(component)((props)=>{
2237
2287
  const border = {
2238
2288
  width: props.$border ? 1 : 0,
2239
2289
  color: "var(--card-border-color)"
2240
2290
  };
2241
- return (0, $dyHF6$styledcomponents.css)`
2242
- --card-focus-box-shadow: ${(0, $c3640926d3b4b579$export$a79bcc1dc439e294)(border)};
2291
+ return (0, $ayBmS$styledcomponents.css)($ecb87a73d452358c$var$t || ($ecb87a73d452358c$var$t = $ecb87a73d452358c$var$_`
2292
+ --card-focus-box-shadow: ${0};
2243
2293
 
2244
- border-radius: ${(0, $dyHF6$sanityui.rem)(props.theme.sanity.radius[1])};
2294
+ border-radius: ${0};
2245
2295
  outline: none;
2246
2296
  box-shadow: var(--card-focus-box-shadow);
2247
2297
 
2248
2298
  &:focus {
2249
- --card-focus-box-shadow: ${(0, $c3640926d3b4b579$export$c339ddc20364daad)({
2299
+ --card-focus-box-shadow: ${0};
2300
+ }
2301
+ `), (0, $d5b4dfea215935be$export$a79bcc1dc439e294)(border), (0, $ayBmS$sanityui.rem)(props.theme.sanity.radius[1]), (0, $d5b4dfea215935be$export$c339ddc20364daad)({
2250
2302
  base: props.theme.sanity.color.base,
2251
2303
  border: border,
2252
2304
  focusRing: props.theme.sanity.focusRing
2253
- })};
2254
- }
2255
- `;
2305
+ }));
2256
2306
  });
2257
2307
  }
2258
2308
 
2259
2309
 
2260
2310
 
2261
2311
 
2262
- const $59b5a0f5519b63e4$var$ctrlKey = 17;
2263
- const $59b5a0f5519b63e4$var$cmdKey = 91;
2264
- const $59b5a0f5519b63e4$var$UploadCardWithFocusRing = (0, $ef74f13c86627be6$export$ed320981107bc6bd)((0, $dyHF6$sanityui.Card));
2265
- const $59b5a0f5519b63e4$export$88f8ee83ae881d58 = /*#__PURE__*/ (0, $dyHF6$react.forwardRef)(({ children: children , tone: tone , onPaste: onPaste , onFocus: onFocus , onBlur: onBlur , onDrop: onDrop , onDragEnter: onDragEnter , onDragLeave: onDragLeave , onDragOver: onDragOver }, forwardedRef)=>{
2266
- const ctrlDown = (0, $dyHF6$react.useRef)(false);
2267
- const inputRef = (0, $dyHF6$react.useRef)(null);
2268
- const handleKeyDown = (0, $dyHF6$react.useCallback)((event)=>{
2269
- if (event.keyCode == $59b5a0f5519b63e4$var$ctrlKey || event.keyCode == $59b5a0f5519b63e4$var$cmdKey) ctrlDown.current = true;
2312
+ let $acf777e43722fa61$var$_ = (t1)=>t1, $acf777e43722fa61$var$t;
2313
+ const $acf777e43722fa61$var$ctrlKey = 17;
2314
+ const $acf777e43722fa61$var$cmdKey = 91;
2315
+ const $acf777e43722fa61$var$UploadCardWithFocusRing = (0, $ecb87a73d452358c$export$ed320981107bc6bd)((0, $ayBmS$sanityui.Card));
2316
+ const $acf777e43722fa61$export$88f8ee83ae881d58 = /*#__PURE__*/ (0, $ayBmS$react.forwardRef)(({ children: children , tone: tone , onPaste: onPaste , onFocus: onFocus , onBlur: onBlur , onDrop: onDrop , onDragEnter: onDragEnter , onDragLeave: onDragLeave , onDragOver: onDragOver }, forwardedRef)=>{
2317
+ const ctrlDown = (0, $ayBmS$react.useRef)(false);
2318
+ const inputRef = (0, $ayBmS$react.useRef)(null);
2319
+ const handleKeyDown = (0, $ayBmS$react.useCallback)((event)=>{
2320
+ if (event.keyCode == $acf777e43722fa61$var$ctrlKey || event.keyCode == $acf777e43722fa61$var$cmdKey) ctrlDown.current = true;
2270
2321
  const vKey = 86;
2271
2322
  if (ctrlDown.current && event.keyCode == vKey) inputRef.current.focus();
2272
2323
  }, []);
2273
- const handleKeyUp = (0, $dyHF6$react.useCallback)((event)=>{
2274
- if (event.keyCode == $59b5a0f5519b63e4$var$ctrlKey || event.keyCode == $59b5a0f5519b63e4$var$cmdKey) ctrlDown.current = false;
2324
+ const handleKeyUp = (0, $ayBmS$react.useCallback)((event)=>{
2325
+ if (event.keyCode == $acf777e43722fa61$var$ctrlKey || event.keyCode == $acf777e43722fa61$var$cmdKey) ctrlDown.current = false;
2275
2326
  }, []);
2276
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)($59b5a0f5519b63e4$var$UploadCardWithFocusRing, {
2327
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)($acf777e43722fa61$var$UploadCardWithFocusRing, {
2277
2328
  tone: tone,
2278
2329
  height: "fill",
2279
2330
  ref: forwardedRef,
@@ -2291,7 +2342,7 @@ const $59b5a0f5519b63e4$export$88f8ee83ae881d58 = /*#__PURE__*/ (0, $dyHF6$react
2291
2342
  onDragLeave: onDragLeave,
2292
2343
  onDragOver: onDragOver,
2293
2344
  children: [
2294
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)($59b5a0f5519b63e4$var$HiddenInput, {
2345
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)($acf777e43722fa61$var$HiddenInput, {
2295
2346
  ref: inputRef,
2296
2347
  onPaste: onPaste
2297
2348
  }),
@@ -2299,9 +2350,9 @@ const $59b5a0f5519b63e4$export$88f8ee83ae881d58 = /*#__PURE__*/ (0, $dyHF6$react
2299
2350
  ]
2300
2351
  });
2301
2352
  });
2302
- const $59b5a0f5519b63e4$var$HiddenInput = (0, ($parcel$interopDefault($dyHF6$styledcomponents))).input.attrs({
2353
+ const $acf777e43722fa61$var$HiddenInput = (0, ($parcel$interopDefault($ayBmS$styledcomponents))).input.attrs({
2303
2354
  type: "text"
2304
- })`
2355
+ })($acf777e43722fa61$var$t || ($acf777e43722fa61$var$t = $acf777e43722fa61$var$_`
2305
2356
  position: absolute;
2306
2357
  border: 0;
2307
2358
  color: white;
@@ -2310,7 +2361,9 @@ const $59b5a0f5519b63e4$var$HiddenInput = (0, ($parcel$interopDefault($dyHF6$sty
2310
2361
  &:focus {
2311
2362
  outline: none;
2312
2363
  }
2313
- `;
2364
+ `));
2365
+
2366
+
2314
2367
 
2315
2368
 
2316
2369
 
@@ -2324,30 +2377,37 @@ const $59b5a0f5519b63e4$var$HiddenInput = (0, ($parcel$interopDefault($dyHF6$sty
2324
2377
 
2325
2378
 
2326
2379
 
2327
- const $71bea6581a27d1cb$var$HiddenInput = (0, ($parcel$interopDefault($dyHF6$styledcomponents))).input`
2380
+ let $7cd23a424037c874$var$_ = (t2)=>t2, $7cd23a424037c874$var$t, $7cd23a424037c874$var$t1;
2381
+ const $7cd23a424037c874$var$HiddenInput = (0, ($parcel$interopDefault($ayBmS$styledcomponents))).input($7cd23a424037c874$var$t || ($7cd23a424037c874$var$t = $7cd23a424037c874$var$_`
2328
2382
  overflow: hidden;
2329
2383
  width: 0.1px;
2330
2384
  height: 0.1px;
2331
2385
  opacity: 0;
2332
2386
  position: absolute;
2333
2387
  z-index: -1;
2334
- `;
2335
- const $71bea6581a27d1cb$var$Label = (0, ($parcel$interopDefault($dyHF6$styledcomponents))).label`
2388
+ `));
2389
+ const $7cd23a424037c874$var$Label = (0, ($parcel$interopDefault($ayBmS$styledcomponents))).label($7cd23a424037c874$var$t1 || ($7cd23a424037c874$var$t1 = $7cd23a424037c874$var$_`
2336
2390
  position: relative;
2337
- `;
2338
- const $71bea6581a27d1cb$export$c6c4e824471beee6 = ({ onSelect: onSelect , ...props })=>{
2339
- const inputId = `FileSelect${(0, $dyHF6$reachautoid.useId)()}`;
2340
- const inputRef = (0, $dyHF6$react.useRef)(null);
2341
- const handleSelect = (0, $dyHF6$react.useCallback)((event)=>{
2391
+ `));
2392
+ var $7cd23a424037c874$export$c6c4e824471beee6 = (_param)=>{
2393
+ var { onSelect: onSelect } = _param, props = (0, ($parcel$interopDefault($ayBmS$swchelperslib_object_without_propertiesjs)))(_param, [
2394
+ "onSelect"
2395
+ ]);
2396
+ const inputId = `FileSelect${(0, $ayBmS$reachautoid.useId)()}`;
2397
+ const inputRef = (0, $ayBmS$react.useRef)(null);
2398
+ const handleSelect = (0, $ayBmS$react.useCallback)((event)=>{
2342
2399
  if (onSelect) onSelect(event.target.files);
2343
2400
  }, [
2344
2401
  onSelect
2345
2402
  ]);
2346
- const handleButtonClick = (0, $dyHF6$react.useCallback)(()=>inputRef.current?.click(), []);
2347
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)($71bea6581a27d1cb$var$Label, {
2403
+ const handleButtonClick = (0, $ayBmS$react.useCallback)(()=>{
2404
+ var ref;
2405
+ return (ref = inputRef.current) === null || ref === void 0 ? void 0 : ref.click();
2406
+ }, []);
2407
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)($7cd23a424037c874$var$Label, {
2348
2408
  htmlFor: inputId,
2349
2409
  children: [
2350
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)($71bea6581a27d1cb$var$HiddenInput, {
2410
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)($7cd23a424037c874$var$HiddenInput, {
2351
2411
  accept: "video/*",
2352
2412
  ref: inputRef,
2353
2413
  tabIndex: 0,
@@ -2356,45 +2416,45 @@ const $71bea6581a27d1cb$export$c6c4e824471beee6 = ({ onSelect: onSelect , ...pro
2356
2416
  onChange: handleSelect,
2357
2417
  value: ""
2358
2418
  }),
2359
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Button), {
2419
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Button), (0, ($parcel$interopDefault($ayBmS$swchelperslib_object_spreadjs)))({
2360
2420
  onClick: handleButtonClick,
2361
2421
  mode: "default",
2362
2422
  tone: "primary",
2363
2423
  style: {
2364
2424
  width: "100%"
2365
- },
2366
- ...props
2367
- })
2425
+ }
2426
+ }, props))
2368
2427
  ]
2369
2428
  });
2370
2429
  };
2371
2430
 
2372
2431
 
2373
- const $c862462ae08f977b$var$UploadCard = (0, ($parcel$interopDefault($dyHF6$styledcomponents)))((0, $dyHF6$sanityui.Card))`
2432
+ let $7570d589af81e056$var$_ = (t2)=>t2, $7570d589af81e056$var$t, $7570d589af81e056$var$t1;
2433
+ const $7570d589af81e056$var$UploadCard = (0, ($parcel$interopDefault($ayBmS$styledcomponents)))((0, $ayBmS$sanityui.Card))($7570d589af81e056$var$t || ($7570d589af81e056$var$t = $7570d589af81e056$var$_`
2374
2434
  && {
2375
2435
  border-style: dashed;
2376
2436
  }
2377
- `;
2378
- const $c862462ae08f977b$var$ConfigureApiBox = (0, ($parcel$interopDefault($dyHF6$styledcomponents)))((0, $dyHF6$sanityui.Box))`
2437
+ `));
2438
+ const $7570d589af81e056$var$ConfigureApiBox = (0, ($parcel$interopDefault($ayBmS$styledcomponents)))((0, $ayBmS$sanityui.Box))($7570d589af81e056$var$t1 || ($7570d589af81e056$var$t1 = $7570d589af81e056$var$_`
2379
2439
  position: absolute;
2380
2440
  top: 0;
2381
2441
  right: 0;
2382
- `;
2383
- function $c862462ae08f977b$export$2e2bcd8739ae039(props) {
2442
+ `));
2443
+ function $7570d589af81e056$export$2e2bcd8739ae039(props) {
2384
2444
  const { setDialogState: setDialogState , readOnly: readOnly , onSelect: onSelect , hovering: hovering , needsSetup: needsSetup } = props;
2385
- const handleBrowse = (0, $dyHF6$react.useCallback)(()=>setDialogState("select-video"), [
2445
+ const handleBrowse = (0, $ayBmS$react.useCallback)(()=>setDialogState("select-video"), [
2386
2446
  setDialogState
2387
2447
  ]);
2388
- const handleConfigureApi = (0, $dyHF6$react.useCallback)(()=>setDialogState("secrets"), [
2448
+ const handleConfigureApi = (0, $ayBmS$react.useCallback)(()=>setDialogState("secrets"), [
2389
2449
  setDialogState
2390
2450
  ]);
2391
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Box), {
2451
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Box), {
2392
2452
  style: {
2393
2453
  padding: 1,
2394
2454
  position: "relative"
2395
2455
  },
2396
2456
  height: "stretch",
2397
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)($c862462ae08f977b$var$UploadCard, {
2457
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)($7570d589af81e056$var$UploadCard, {
2398
2458
  sizing: "border",
2399
2459
  height: "fill",
2400
2460
  tone: readOnly ? "transparent" : "inherit",
@@ -2404,18 +2464,18 @@ function $c862462ae08f977b$export$2e2bcd8739ae039(props) {
2404
2464
  borderColor: "transparent"
2405
2465
  } : undefined,
2406
2466
  children: [
2407
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)($c862462ae08f977b$var$ConfigureApiBox, {
2467
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)($7570d589af81e056$var$ConfigureApiBox, {
2408
2468
  padding: 3,
2409
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Button), {
2469
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Button), {
2410
2470
  padding: 3,
2411
2471
  radius: 3,
2412
2472
  tone: needsSetup ? "critical" : undefined,
2413
2473
  onClick: handleConfigureApi,
2414
- icon: (0, $dyHF6$sanityicons.PlugIcon),
2474
+ icon: (0, $ayBmS$sanityicons.PlugIcon),
2415
2475
  mode: "bleed"
2416
2476
  })
2417
2477
  }),
2418
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Flex), {
2478
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Flex), {
2419
2479
  align: "center",
2420
2480
  justify: "space-between",
2421
2481
  gap: 4,
@@ -2432,22 +2492,22 @@ function $c862462ae08f977b$export$2e2bcd8739ae039(props) {
2432
2492
  sizing: "border",
2433
2493
  height: "fill",
2434
2494
  children: [
2435
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Flex), {
2495
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Flex), {
2436
2496
  align: "center",
2437
2497
  justify: "center",
2438
2498
  gap: 2,
2439
2499
  flex: 1,
2440
2500
  children: [
2441
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Flex), {
2501
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Flex), {
2442
2502
  justify: "center",
2443
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Text), {
2503
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Text), {
2444
2504
  muted: true,
2445
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityicons.DocumentVideoIcon), {})
2505
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityicons.DocumentVideoIcon), {})
2446
2506
  })
2447
2507
  }),
2448
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Flex), {
2508
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Flex), {
2449
2509
  justify: "center",
2450
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Text), {
2510
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Text), {
2451
2511
  size: 1,
2452
2512
  muted: true,
2453
2513
  children: "Drag video or paste URL here"
@@ -2455,19 +2515,19 @@ function $c862462ae08f977b$export$2e2bcd8739ae039(props) {
2455
2515
  })
2456
2516
  ]
2457
2517
  }),
2458
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Inline), {
2518
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Inline), {
2459
2519
  space: 2,
2460
2520
  children: [
2461
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $71bea6581a27d1cb$export$c6c4e824471beee6), {
2521
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $7cd23a424037c874$export$c6c4e824471beee6), {
2462
2522
  mode: "ghost",
2463
2523
  tone: "default",
2464
- icon: (0, $dyHF6$sanityicons.UploadIcon),
2524
+ icon: (0, $ayBmS$sanityicons.UploadIcon),
2465
2525
  text: "Upload",
2466
2526
  onSelect: onSelect
2467
2527
  }),
2468
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Button), {
2528
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Button), {
2469
2529
  mode: "ghost",
2470
- icon: (0, $dyHF6$sanityicons.SearchIcon),
2530
+ icon: (0, $ayBmS$sanityicons.SearchIcon),
2471
2531
  text: "Select",
2472
2532
  onClick: handleBrowse
2473
2533
  })
@@ -2482,193 +2542,30 @@ function $c862462ae08f977b$export$2e2bcd8739ae039(props) {
2482
2542
 
2483
2543
 
2484
2544
 
2485
- class $ee85957326065d04$var$MuxVideoInputUploader extends (0, $dyHF6$react.Component) {
2486
- state = {
2487
- isDraggingOver: false,
2488
- invalidPaste: false,
2489
- invalidFile: false,
2490
- uploadProgress: null,
2491
- fileInfo: null,
2492
- uuid: null,
2493
- error: null,
2494
- url: null
2495
- };
2496
- dragEnteredEls = [];
2497
- ctrlDown = false;
2498
- // eslint-disable-next-line no-warning-comments
2499
- // @TODO add proper typings for the return values of uploadFile and uploadUrl
2500
- upload = null;
2501
- container = /*#__PURE__*/ (0, ($parcel$interopDefault($dyHF6$react))).createRef();
2545
+ class $e43e21f1b2fe430e$var$MuxVideoInputUploader extends (0, $ayBmS$react.Component) {
2502
2546
  componentWillUnmount() {
2503
2547
  this.unSubscribeToUpload();
2504
2548
  }
2505
2549
  componentDidMount() {
2506
- const events$ = new (0, $dyHF6$rxjs.Subject)();
2550
+ const events$ = new (0, $ayBmS$rxjs.Subject)();
2507
2551
  this.onCancelUploadButtonClick$ = events$.asObservable();
2508
2552
  this.handleCancelUploadButtonClick = (event)=>events$.next(event);
2509
2553
  }
2510
2554
  unSubscribeToUpload() {
2511
2555
  if (this.upload && !this.upload.closed) this.upload.unsubscribe();
2512
2556
  }
2513
- handleProgress = (evt)=>{
2514
- this.setState({
2515
- uploadProgress: evt.percent
2516
- });
2517
- };
2518
- onUpload = (files)=>{
2519
- this.setState({
2520
- uploadProgress: 0,
2521
- fileInfo: null,
2522
- uuid: null
2523
- });
2524
- this.upload = (0, $4a210fa13f9688e9$export$a5575dbeeffdad98)(this.props.config, this.props.client, files[0], {
2525
- enableSignedUrls: this.props.secrets.enableSignedUrls
2526
- }).pipe((0, $dyHF6$rxjsoperators.takeUntil)(this.onCancelUploadButtonClick$.pipe((0, $dyHF6$rxjsoperators.tap)(()=>{
2527
- if (this.state.uuid) this.props.client.delete(this.state.uuid);
2528
- })))).subscribe({
2529
- complete: ()=>{
2530
- this.setState({
2531
- error: null,
2532
- uploadProgress: null,
2533
- uuid: null
2534
- });
2535
- },
2536
- next: (event)=>{
2537
- this.handleUploadEvent(event);
2538
- },
2539
- error: (err)=>{
2540
- this.setState({
2541
- error: err,
2542
- uploadProgress: null,
2543
- uuid: null
2544
- });
2545
- }
2546
- });
2547
- };
2548
- // eslint-disable-next-line no-warning-comments
2549
- // @TODO add proper typings for the Observable events
2550
- handleUploadEvent = (event)=>{
2551
- switch(event.type){
2552
- case "success":
2553
- return this.handleUploadSuccess(event.asset);
2554
- case "progress":
2555
- return this.handleProgress(event);
2556
- case "file":
2557
- return this.setState({
2558
- fileInfo: event.file
2559
- });
2560
- case "uuid":
2561
- // Means we created a mux.videoAsset document with an uuid
2562
- return this.setState({
2563
- uuid: event.uuid
2564
- });
2565
- case "url":
2566
- return this.setState({
2567
- url: event.url,
2568
- uploadProgress: 100
2569
- });
2570
- default:
2571
- return null;
2572
- }
2573
- };
2574
- handleUploadSuccess = (asset)=>{
2575
- this.setState({
2576
- uploadProgress: 100
2577
- });
2578
- this.props.onChange((0, $dyHF6$sanityform.PatchEvent).from([
2579
- (0, $dyHF6$sanityform.setIfMissing)({
2580
- asset: {}
2581
- }),
2582
- (0, $dyHF6$sanityform.set)({
2583
- _type: "reference",
2584
- _weak: true,
2585
- _ref: asset._id
2586
- }, [
2587
- "asset"
2588
- ]),
2589
- ]));
2590
- };
2591
- handlePaste = (event)=>{
2592
- const clipboardData = event.clipboardData || window.clipboardData;
2593
- const url = clipboardData.getData("text");
2594
- const options = {
2595
- enableSignedUrls: this.props.secrets.enableSignedUrls
2596
- };
2597
- this.upload = (0, $4a210fa13f9688e9$export$f35af194eb27b25f)(this.props.config, this.props.client, url, options).subscribe({
2598
- complete: ()=>{
2599
- this.setState({
2600
- error: null,
2601
- uploadProgress: null,
2602
- url: null
2603
- });
2604
- },
2605
- next: (sEvent)=>{
2606
- this.handleUploadEvent(sEvent);
2607
- },
2608
- error: (err)=>{
2609
- let error;
2610
- // Don't output error dialog when just invalid url
2611
- if (!err.message.toLowerCase().match("invalid url")) error = err;
2612
- this.setState({
2613
- invalidPaste: true,
2614
- error: error
2615
- }, ()=>{
2616
- setTimeout(()=>{
2617
- this.setState({
2618
- invalidPaste: false,
2619
- uploadProgress: null
2620
- });
2621
- }, 2000);
2622
- });
2623
- }
2624
- });
2625
- };
2626
- handleDrop = (event)=>{
2627
- this.setState({
2628
- isDraggingOver: false
2629
- });
2630
- event.preventDefault();
2631
- event.stopPropagation();
2632
- (0, $94a513daa91cd04e$export$73f6d6d8d794f645)(event.nativeEvent.dataTransfer).then((files)=>{
2633
- if (files) // eslint-disable-next-line no-warning-comments
2634
- // @TODO fix the typing on files
2635
- this.onUpload(files);
2636
- });
2637
- };
2638
- handleDragOver = (event)=>{
2639
- event.preventDefault();
2640
- event.stopPropagation();
2641
- };
2642
- handleDragEnter = (event)=>{
2643
- event.stopPropagation();
2644
- this.dragEnteredEls.push(event.target);
2645
- this.setState({
2646
- isDraggingOver: true
2647
- });
2648
- const type = event.dataTransfer.items?.[0]?.type;
2649
- this.setState({
2650
- invalidFile: !type.startsWith("video/")
2651
- });
2652
- };
2653
- handleDragLeave = (event)=>{
2654
- event.stopPropagation();
2655
- const idx = this.dragEnteredEls.indexOf(event.target);
2656
- if (idx > -1) this.dragEnteredEls.splice(idx, 1);
2657
- if (this.dragEnteredEls.length === 0) this.setState({
2658
- isDraggingOver: false
2659
- });
2660
- };
2661
2557
  render() {
2662
- if (this.state.uploadProgress !== null) return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $18e643189121e331$export$98a3886347b629fb), {
2558
+ var ref;
2559
+ if (this.state.uploadProgress !== null) return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $e3b6eafb04e90e95$export$98a3886347b629fb), {
2663
2560
  onCancel: this.handleCancelUploadButtonClick,
2664
2561
  progress: this.state.uploadProgress,
2665
- filename: this.state.fileInfo?.name || this.state.url
2562
+ filename: ((ref = this.state.fileInfo) === null || ref === void 0 ? void 0 : ref.name) || this.state.url
2666
2563
  });
2667
2564
  if (this.state.error) // @TODO better error handling
2668
2565
  throw this.state.error;
2669
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$reactjsxruntime.Fragment), {
2566
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$reactjsxruntime.Fragment), {
2670
2567
  children: [
2671
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $59b5a0f5519b63e4$export$88f8ee83ae881d58), {
2568
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $acf777e43722fa61$export$88f8ee83ae881d58), {
2672
2569
  tone: this.state.isDraggingOver && (this.state.invalidPaste || this.state.invalidFile) ? "critical" : this.state.isDraggingOver ? "positive" : undefined,
2673
2570
  onBlur: this.props.onBlur,
2674
2571
  onFocus: this.props.onFocus,
@@ -2678,13 +2575,13 @@ class $ee85957326065d04$var$MuxVideoInputUploader extends (0, $dyHF6$react.Compo
2678
2575
  onDragEnter: this.handleDragEnter,
2679
2576
  onPaste: this.handlePaste,
2680
2577
  ref: this.container,
2681
- children: this.props.asset ? /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $4b270840a4c34b64$export$2e2bcd8739ae039), {
2578
+ children: this.props.asset ? /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ab86d4653880d8ea$export$2e2bcd8739ae039), {
2682
2579
  readOnly: this.props.readOnly,
2683
2580
  asset: this.props.asset,
2684
2581
  onChange: this.props.onChange,
2685
2582
  dialogState: this.props.dialogState,
2686
2583
  setDialogState: this.props.setDialogState,
2687
- buttons: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $8a74cfcfbdb3efdf$export$2e2bcd8739ae039), {
2584
+ buttons: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $c5963d9d2157fdda$export$2e2bcd8739ae039), {
2688
2585
  asset: this.props.asset,
2689
2586
  dialogState: this.props.dialogState,
2690
2587
  setDialogState: this.props.setDialogState,
@@ -2692,7 +2589,7 @@ class $ee85957326065d04$var$MuxVideoInputUploader extends (0, $dyHF6$react.Compo
2692
2589
  onUpload: this.onUpload,
2693
2590
  readOnly: this.props.readOnly
2694
2591
  })
2695
- }) : /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $c862462ae08f977b$export$2e2bcd8739ae039), {
2592
+ }) : /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $7570d589af81e056$export$2e2bcd8739ae039), {
2696
2593
  hovering: this.state.isDraggingOver,
2697
2594
  onSelect: this.onUpload,
2698
2595
  readOnly: this.props.readOnly,
@@ -2700,7 +2597,7 @@ class $ee85957326065d04$var$MuxVideoInputUploader extends (0, $dyHF6$react.Compo
2700
2597
  needsSetup: this.props.needsSetup
2701
2598
  })
2702
2599
  }),
2703
- this.props.dialogState === "select-video" && /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $002b8d5a97e55801$export$2e2bcd8739ae039), {
2600
+ this.props.dialogState === "select-video" && /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $5f35306d1d1944f9$export$2e2bcd8739ae039), {
2704
2601
  asset: this.props.asset,
2705
2602
  onChange: this.props.onChange,
2706
2603
  setDialogState: this.props.setDialogState
@@ -2708,8 +2605,176 @@ class $ee85957326065d04$var$MuxVideoInputUploader extends (0, $dyHF6$react.Compo
2708
2605
  ]
2709
2606
  });
2710
2607
  }
2608
+ constructor(...args){
2609
+ super(...args);
2610
+ (0, ($parcel$interopDefault($ayBmS$swchelperslib_define_propertyjs)))(this, "state", {
2611
+ isDraggingOver: false,
2612
+ invalidPaste: false,
2613
+ invalidFile: false,
2614
+ uploadProgress: null,
2615
+ fileInfo: null,
2616
+ uuid: null,
2617
+ error: null,
2618
+ url: null
2619
+ });
2620
+ (0, ($parcel$interopDefault($ayBmS$swchelperslib_define_propertyjs)))(this, "dragEnteredEls", []);
2621
+ (0, ($parcel$interopDefault($ayBmS$swchelperslib_define_propertyjs)))(this, "ctrlDown", false);
2622
+ // eslint-disable-next-line no-warning-comments
2623
+ // @TODO add proper typings for the return values of uploadFile and uploadUrl
2624
+ (0, ($parcel$interopDefault($ayBmS$swchelperslib_define_propertyjs)))(this, "upload", null);
2625
+ (0, ($parcel$interopDefault($ayBmS$swchelperslib_define_propertyjs)))(this, "container", /*#__PURE__*/ (0, ($parcel$interopDefault($ayBmS$react))).createRef());
2626
+ (0, ($parcel$interopDefault($ayBmS$swchelperslib_define_propertyjs)))(this, "handleProgress", (evt)=>{
2627
+ this.setState({
2628
+ uploadProgress: evt.percent
2629
+ });
2630
+ });
2631
+ (0, ($parcel$interopDefault($ayBmS$swchelperslib_define_propertyjs)))(this, "onUpload", (files)=>{
2632
+ this.setState({
2633
+ uploadProgress: 0,
2634
+ fileInfo: null,
2635
+ uuid: null
2636
+ });
2637
+ this.upload = (0, $12591da830e5242f$export$a5575dbeeffdad98)(this.props.config, this.props.client, files[0], {
2638
+ enableSignedUrls: this.props.secrets.enableSignedUrls
2639
+ }).pipe((0, $ayBmS$rxjsoperators.takeUntil)(this.onCancelUploadButtonClick$.pipe((0, $ayBmS$rxjsoperators.tap)(()=>{
2640
+ if (this.state.uuid) this.props.client.delete(this.state.uuid);
2641
+ })))).subscribe({
2642
+ complete: ()=>{
2643
+ this.setState({
2644
+ error: null,
2645
+ uploadProgress: null,
2646
+ uuid: null
2647
+ });
2648
+ },
2649
+ next: (event)=>{
2650
+ this.handleUploadEvent(event);
2651
+ },
2652
+ error: (err)=>{
2653
+ this.setState({
2654
+ error: err,
2655
+ uploadProgress: null,
2656
+ uuid: null
2657
+ });
2658
+ }
2659
+ });
2660
+ });
2661
+ // eslint-disable-next-line no-warning-comments
2662
+ // @TODO add proper typings for the Observable events
2663
+ (0, ($parcel$interopDefault($ayBmS$swchelperslib_define_propertyjs)))(this, "handleUploadEvent", (event)=>{
2664
+ switch(event.type){
2665
+ case "success":
2666
+ return this.handleUploadSuccess(event.asset);
2667
+ case "progress":
2668
+ return this.handleProgress(event);
2669
+ case "file":
2670
+ return this.setState({
2671
+ fileInfo: event.file
2672
+ });
2673
+ case "uuid":
2674
+ // Means we created a mux.videoAsset document with an uuid
2675
+ return this.setState({
2676
+ uuid: event.uuid
2677
+ });
2678
+ case "url":
2679
+ return this.setState({
2680
+ url: event.url,
2681
+ uploadProgress: 100
2682
+ });
2683
+ default:
2684
+ return null;
2685
+ }
2686
+ });
2687
+ (0, ($parcel$interopDefault($ayBmS$swchelperslib_define_propertyjs)))(this, "handleUploadSuccess", (asset)=>{
2688
+ this.setState({
2689
+ uploadProgress: 100
2690
+ });
2691
+ this.props.onChange((0, $ayBmS$sanityform.PatchEvent).from([
2692
+ (0, $ayBmS$sanityform.setIfMissing)({
2693
+ asset: {}
2694
+ }),
2695
+ (0, $ayBmS$sanityform.set)({
2696
+ _type: "reference",
2697
+ _weak: true,
2698
+ _ref: asset._id
2699
+ }, [
2700
+ "asset"
2701
+ ]),
2702
+ ]));
2703
+ });
2704
+ (0, ($parcel$interopDefault($ayBmS$swchelperslib_define_propertyjs)))(this, "handlePaste", (event)=>{
2705
+ const clipboardData = event.clipboardData || window.clipboardData;
2706
+ const url = clipboardData.getData("text");
2707
+ const options = {
2708
+ enableSignedUrls: this.props.secrets.enableSignedUrls
2709
+ };
2710
+ this.upload = (0, $12591da830e5242f$export$f35af194eb27b25f)(this.props.config, this.props.client, url, options).subscribe({
2711
+ complete: ()=>{
2712
+ this.setState({
2713
+ error: null,
2714
+ uploadProgress: null,
2715
+ url: null
2716
+ });
2717
+ },
2718
+ next: (sEvent)=>{
2719
+ this.handleUploadEvent(sEvent);
2720
+ },
2721
+ error: (err)=>{
2722
+ let error;
2723
+ // Don't output error dialog when just invalid url
2724
+ if (!err.message.toLowerCase().match("invalid url")) error = err;
2725
+ this.setState({
2726
+ invalidPaste: true,
2727
+ error: error
2728
+ }, ()=>{
2729
+ setTimeout(()=>{
2730
+ this.setState({
2731
+ invalidPaste: false,
2732
+ uploadProgress: null
2733
+ });
2734
+ }, 2000);
2735
+ });
2736
+ }
2737
+ });
2738
+ });
2739
+ (0, ($parcel$interopDefault($ayBmS$swchelperslib_define_propertyjs)))(this, "handleDrop", (event)=>{
2740
+ this.setState({
2741
+ isDraggingOver: false
2742
+ });
2743
+ event.preventDefault();
2744
+ event.stopPropagation();
2745
+ (0, $f981bc359ea69985$export$73f6d6d8d794f645)(event.nativeEvent.dataTransfer).then((files)=>{
2746
+ if (files) // eslint-disable-next-line no-warning-comments
2747
+ // @TODO fix the typing on files
2748
+ this.onUpload(files);
2749
+ });
2750
+ });
2751
+ (0, ($parcel$interopDefault($ayBmS$swchelperslib_define_propertyjs)))(this, "handleDragOver", (event)=>{
2752
+ event.preventDefault();
2753
+ event.stopPropagation();
2754
+ });
2755
+ (0, ($parcel$interopDefault($ayBmS$swchelperslib_define_propertyjs)))(this, "handleDragEnter", (event)=>{
2756
+ var ref, ref1;
2757
+ event.stopPropagation();
2758
+ this.dragEnteredEls.push(event.target);
2759
+ this.setState({
2760
+ isDraggingOver: true
2761
+ });
2762
+ const type = (ref = event.dataTransfer.items) === null || ref === void 0 ? void 0 : (ref1 = ref[0]) === null || ref1 === void 0 ? void 0 : ref1.type;
2763
+ this.setState({
2764
+ invalidFile: !type.startsWith("video/")
2765
+ });
2766
+ });
2767
+ (0, ($parcel$interopDefault($ayBmS$swchelperslib_define_propertyjs)))(this, "handleDragLeave", (event)=>{
2768
+ event.stopPropagation();
2769
+ const idx = this.dragEnteredEls.indexOf(event.target);
2770
+ if (idx > -1) this.dragEnteredEls.splice(idx, 1);
2771
+ if (this.dragEnteredEls.length === 0) this.setState({
2772
+ isDraggingOver: false
2773
+ });
2774
+ });
2775
+ }
2711
2776
  }
2712
- var $ee85957326065d04$export$2e2bcd8739ae039 = $ee85957326065d04$var$MuxVideoInputUploader;
2777
+ var $e43e21f1b2fe430e$export$2e2bcd8739ae039 = $e43e21f1b2fe430e$var$MuxVideoInputUploader;
2713
2778
 
2714
2779
 
2715
2780
 
@@ -2720,24 +2785,24 @@ var $ee85957326065d04$export$2e2bcd8739ae039 = $ee85957326065d04$var$MuxVideoInp
2720
2785
 
2721
2786
 
2722
2787
 
2723
- const $624f4dcaee76afb6$export$e1d4ef4fde5dbdf2 = (client, secrets)=>{
2724
- return (0, $dyHF6$react.useCallback)(async ({ token: token , secretKey: secretKey , enableSignedUrls: enableSignedUrls })=>{
2788
+ const $efecc0530b43438c$export$e1d4ef4fde5dbdf2 = (client, secrets)=>{
2789
+ return (0, $ayBmS$react.useCallback)(async ({ token: token , secretKey: secretKey , enableSignedUrls: enableSignedUrls })=>{
2725
2790
  let { signingKeyId: signingKeyId , signingKeyPrivate: signingKeyPrivate } = secrets;
2726
2791
  try {
2727
- await (0, $58acdddf66edce65$export$f16c6d66b9790f06)(client, token, secretKey, enableSignedUrls, signingKeyId, signingKeyPrivate);
2728
- const valid = await (0, $58acdddf66edce65$export$3a1df1322191b3ef)(client);
2729
- if (!valid?.status && token && secretKey) throw new Error("Invalid secrets");
2792
+ await (0, $4d6664636d7d58e3$export$f16c6d66b9790f06)(client, token, secretKey, enableSignedUrls, signingKeyId, signingKeyPrivate);
2793
+ const valid = await (0, $4d6664636d7d58e3$export$3a1df1322191b3ef)(client);
2794
+ if (!(valid === null || valid === void 0 ? void 0 : valid.status) && token && secretKey) throw new Error("Invalid secrets");
2730
2795
  } catch (err) {
2731
2796
  console.error("Error while trying to save secrets:", err);
2732
2797
  throw err;
2733
2798
  }
2734
2799
  if (enableSignedUrls) {
2735
- const hasValidSigningKeys = await (0, $58acdddf66edce65$export$f5836111430d17bc)(client, signingKeyId, signingKeyPrivate);
2800
+ const hasValidSigningKeys = await (0, $4d6664636d7d58e3$export$f5836111430d17bc)(client, signingKeyId, signingKeyPrivate);
2736
2801
  if (!hasValidSigningKeys) try {
2737
- const { data: data } = await (0, $58acdddf66edce65$export$21cc0cab779cfac1)(client);
2802
+ const { data: data } = await (0, $4d6664636d7d58e3$export$21cc0cab779cfac1)(client);
2738
2803
  signingKeyId = data.id;
2739
2804
  signingKeyPrivate = data.private_key;
2740
- await (0, $58acdddf66edce65$export$f16c6d66b9790f06)(client, token, secretKey, enableSignedUrls, signingKeyId, signingKeyPrivate);
2805
+ await (0, $4d6664636d7d58e3$export$f16c6d66b9790f06)(client, token, secretKey, enableSignedUrls, signingKeyId, signingKeyPrivate);
2741
2806
  } catch (err) {
2742
2807
  // eslint-disable-next-line no-console
2743
2808
  console.log("Error while creating and saving signing key:", err.message);
@@ -2759,43 +2824,42 @@ const $624f4dcaee76afb6$export$e1d4ef4fde5dbdf2 = (client, secrets)=>{
2759
2824
 
2760
2825
 
2761
2826
 
2762
- function $2f6a2877401ba7f3$var$init({ token: token , secretKey: secretKey , enableSignedUrls: enableSignedUrls }) {
2827
+
2828
+
2829
+ function $f23684a2b0635ab0$var$init({ token: token , secretKey: secretKey , enableSignedUrls: enableSignedUrls }) {
2763
2830
  return {
2764
2831
  submitting: false,
2765
2832
  error: null,
2766
2833
  // Form inputs don't set the state back to null when clearing a field, but uses empty strings
2767
2834
  // This ensures the `dirty` check works correctly
2768
- token: token ?? "",
2769
- secretKey: secretKey ?? "",
2770
- enableSignedUrls: enableSignedUrls ?? false
2835
+ token: token !== null && token !== void 0 ? token : "",
2836
+ secretKey: secretKey !== null && secretKey !== void 0 ? secretKey : "",
2837
+ enableSignedUrls: enableSignedUrls !== null && enableSignedUrls !== void 0 ? enableSignedUrls : false
2771
2838
  };
2772
2839
  }
2773
- function $2f6a2877401ba7f3$var$reducer(state, action) {
2774
- switch(action?.type){
2840
+ function $f23684a2b0635ab0$var$reducer(state, action) {
2841
+ switch(action === null || action === void 0 ? void 0 : action.type){
2775
2842
  case "submit":
2776
- return {
2777
- ...state,
2843
+ return (0, ($parcel$interopDefault($ayBmS$swchelperslib_object_spread_propsjs)))((0, ($parcel$interopDefault($ayBmS$swchelperslib_object_spreadjs)))({}, state), {
2778
2844
  submitting: true,
2779
2845
  error: null
2780
- };
2846
+ });
2781
2847
  case "error":
2782
- return {
2783
- ...state,
2848
+ return (0, ($parcel$interopDefault($ayBmS$swchelperslib_object_spread_propsjs)))((0, ($parcel$interopDefault($ayBmS$swchelperslib_object_spreadjs)))({}, state), {
2784
2849
  submitting: false,
2785
2850
  error: action.payload
2786
- };
2851
+ });
2787
2852
  case "reset":
2788
- return $2f6a2877401ba7f3$var$init(action.payload);
2853
+ return $f23684a2b0635ab0$var$init(action.payload);
2789
2854
  case "change":
2790
- return {
2791
- ...state,
2855
+ return (0, ($parcel$interopDefault($ayBmS$swchelperslib_object_spread_propsjs)))((0, ($parcel$interopDefault($ayBmS$swchelperslib_object_spreadjs)))({}, state), {
2792
2856
  [action.payload.name]: action.payload.value
2793
- };
2857
+ });
2794
2858
  default:
2795
- throw new Error(`Unknown action type: ${action?.type}`);
2859
+ throw new Error(`Unknown action type: ${action === null || action === void 0 ? void 0 : action.type}`);
2796
2860
  }
2797
2861
  }
2798
- const $2f6a2877401ba7f3$export$e24a74f4fce2446c = (secrets)=>(0, $dyHF6$react.useReducer)($2f6a2877401ba7f3$var$reducer, secrets, $2f6a2877401ba7f3$var$init);
2862
+ const $f23684a2b0635ab0$export$e24a74f4fce2446c = (secrets)=>(0, $ayBmS$react.useReducer)($f23684a2b0635ab0$var$reducer, secrets, $f23684a2b0635ab0$var$init);
2799
2863
 
2800
2864
 
2801
2865
 
@@ -2807,7 +2871,7 @@ const $2f6a2877401ba7f3$export$e24a74f4fce2446c = (secrets)=>(0, $dyHF6$react.us
2807
2871
 
2808
2872
 
2809
2873
  // Mapping ids to ensure filter refs are unique, otherwise all Logo instances are hidden if the first SVG is hidden, due to how SVGs deal with relative links and ids
2810
- const $81c579b2354bfb4d$var$ids = [
2874
+ const $e3a8039a3d28e592$var$ids = [
2811
2875
  "title",
2812
2876
  "a",
2813
2877
  "b",
@@ -2828,12 +2892,12 @@ const $81c579b2354bfb4d$var$ids = [
2828
2892
  "q",
2829
2893
  "r",
2830
2894
  ];
2831
- function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
2832
- const id = (0, $dyHF6$reachautoid.useId)();
2833
- const [titleId, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r] = (0, $dyHF6$react.useMemo)(()=>$81c579b2354bfb4d$var$ids.map((field)=>`${id}-${field}`), [
2895
+ function $e3a8039a3d28e592$export$2e2bcd8739ae039({ height: height = 26 }) {
2896
+ const id = (0, $ayBmS$reachautoid.useId)();
2897
+ const [titleId, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r] = (0, $ayBmS$react.useMemo)(()=>$e3a8039a3d28e592$var$ids.map((field)=>`${id}-${field}`), [
2834
2898
  id
2835
2899
  ]);
2836
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)("svg", {
2900
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)("svg", {
2837
2901
  "aria-labelledby": titleId,
2838
2902
  role: "img",
2839
2903
  xmlns: "http://www.w3.org/2000/svg",
@@ -2843,13 +2907,13 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
2843
2907
  height: `${height}px`
2844
2908
  },
2845
2909
  children: [
2846
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("title", {
2910
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("title", {
2847
2911
  id: titleId,
2848
2912
  children: "Mux Logo"
2849
2913
  }),
2850
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)("defs", {
2914
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)("defs", {
2851
2915
  children: [
2852
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)("linearGradient", {
2916
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)("linearGradient", {
2853
2917
  id: c,
2854
2918
  spreadMethod: "pad",
2855
2919
  gradientTransform: "matrix(528.38055 0 0 -528.38055 63.801 159.5)",
@@ -2859,14 +2923,14 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
2859
2923
  y1: 0,
2860
2924
  x1: 0,
2861
2925
  children: [
2862
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("stop", {
2926
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("stop", {
2863
2927
  offset: 0,
2864
2928
  style: {
2865
2929
  stopOpacity: 1,
2866
2930
  stopColor: "#ff4e00"
2867
2931
  }
2868
2932
  }),
2869
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("stop", {
2933
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("stop", {
2870
2934
  offset: 1,
2871
2935
  style: {
2872
2936
  stopOpacity: 1,
@@ -2875,7 +2939,7 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
2875
2939
  })
2876
2940
  ]
2877
2941
  }),
2878
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)("linearGradient", {
2942
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)("linearGradient", {
2879
2943
  id: d,
2880
2944
  spreadMethod: "pad",
2881
2945
  gradientTransform: "matrix(523.66766 0 0 -523.66766 67.897 159.5)",
@@ -2885,14 +2949,14 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
2885
2949
  y1: 0,
2886
2950
  x1: 0,
2887
2951
  children: [
2888
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("stop", {
2952
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("stop", {
2889
2953
  offset: 0,
2890
2954
  style: {
2891
2955
  stopOpacity: 1,
2892
2956
  stopColor: "#ff4e00"
2893
2957
  }
2894
2958
  }),
2895
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("stop", {
2959
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("stop", {
2896
2960
  offset: 1,
2897
2961
  style: {
2898
2962
  stopOpacity: 1,
@@ -2901,7 +2965,7 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
2901
2965
  })
2902
2966
  ]
2903
2967
  }),
2904
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)("linearGradient", {
2968
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)("linearGradient", {
2905
2969
  id: g,
2906
2970
  spreadMethod: "pad",
2907
2971
  gradientTransform: "rotate(180 296.075 79.75) scale(524.84045)",
@@ -2911,14 +2975,14 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
2911
2975
  y1: 0,
2912
2976
  x1: 0,
2913
2977
  children: [
2914
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("stop", {
2978
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("stop", {
2915
2979
  offset: 0,
2916
2980
  style: {
2917
2981
  stopOpacity: 1,
2918
2982
  stopColor: "#ff4e00"
2919
2983
  }
2920
2984
  }),
2921
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("stop", {
2985
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("stop", {
2922
2986
  offset: 1,
2923
2987
  style: {
2924
2988
  stopOpacity: 1,
@@ -2927,7 +2991,7 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
2927
2991
  })
2928
2992
  ]
2929
2993
  }),
2930
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)("linearGradient", {
2994
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)("linearGradient", {
2931
2995
  id: i,
2932
2996
  spreadMethod: "pad",
2933
2997
  gradientTransform: "matrix(524.84045 0 0 -524.84045 63.801 159.5)",
@@ -2937,14 +3001,14 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
2937
3001
  y1: 0,
2938
3002
  x1: 0,
2939
3003
  children: [
2940
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("stop", {
3004
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("stop", {
2941
3005
  offset: 0,
2942
3006
  style: {
2943
3007
  stopOpacity: 1,
2944
3008
  stopColor: "#ff4e00"
2945
3009
  }
2946
3010
  }),
2947
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("stop", {
3011
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("stop", {
2948
3012
  offset: 1,
2949
3013
  style: {
2950
3014
  stopOpacity: 1,
@@ -2953,7 +3017,7 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
2953
3017
  })
2954
3018
  ]
2955
3019
  }),
2956
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)("linearGradient", {
3020
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)("linearGradient", {
2957
3021
  id: j,
2958
3022
  spreadMethod: "pad",
2959
3023
  gradientTransform: "matrix(523.08514 0 0 -523.08514 67.897 224.446)",
@@ -2963,14 +3027,14 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
2963
3027
  y1: 0,
2964
3028
  x1: 0,
2965
3029
  children: [
2966
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("stop", {
3030
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("stop", {
2967
3031
  offset: 0,
2968
3032
  style: {
2969
3033
  stopOpacity: 1,
2970
3034
  stopColor: "#ff4e00"
2971
3035
  }
2972
3036
  }),
2973
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("stop", {
3037
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("stop", {
2974
3038
  offset: 1,
2975
3039
  style: {
2976
3040
  stopOpacity: 1,
@@ -2979,7 +3043,7 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
2979
3043
  })
2980
3044
  ]
2981
3045
  }),
2982
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)("linearGradient", {
3046
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)("linearGradient", {
2983
3047
  id: k,
2984
3048
  spreadMethod: "pad",
2985
3049
  gradientTransform: "matrix(524.84045 0 0 -524.84045 63.801 94.553)",
@@ -2989,14 +3053,14 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
2989
3053
  y1: 0,
2990
3054
  x1: 0,
2991
3055
  children: [
2992
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("stop", {
3056
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("stop", {
2993
3057
  offset: 0,
2994
3058
  style: {
2995
3059
  stopOpacity: 1,
2996
3060
  stopColor: "#ff4e00"
2997
3061
  }
2998
3062
  }),
2999
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("stop", {
3063
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("stop", {
3000
3064
  offset: 1,
3001
3065
  style: {
3002
3066
  stopOpacity: 1,
@@ -3005,7 +3069,7 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
3005
3069
  })
3006
3070
  ]
3007
3071
  }),
3008
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)("linearGradient", {
3072
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)("linearGradient", {
3009
3073
  id: l,
3010
3074
  spreadMethod: "pad",
3011
3075
  gradientTransform: "matrix(524.84045 0 0 -524.84045 63.801 159.5)",
@@ -3015,14 +3079,14 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
3015
3079
  y1: 0,
3016
3080
  x1: 0,
3017
3081
  children: [
3018
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("stop", {
3082
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("stop", {
3019
3083
  offset: 0,
3020
3084
  style: {
3021
3085
  stopOpacity: 1,
3022
3086
  stopColor: "#ff4e00"
3023
3087
  }
3024
3088
  }),
3025
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("stop", {
3089
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("stop", {
3026
3090
  offset: 1,
3027
3091
  style: {
3028
3092
  stopOpacity: 1,
@@ -3031,7 +3095,7 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
3031
3095
  })
3032
3096
  ]
3033
3097
  }),
3034
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)("linearGradient", {
3098
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)("linearGradient", {
3035
3099
  id: m,
3036
3100
  spreadMethod: "pad",
3037
3101
  gradientTransform: "matrix(524.84045 0 0 -524.84045 63.801 94.554)",
@@ -3041,14 +3105,14 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
3041
3105
  y1: 0,
3042
3106
  x1: 0,
3043
3107
  children: [
3044
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("stop", {
3108
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("stop", {
3045
3109
  offset: 0,
3046
3110
  style: {
3047
3111
  stopOpacity: 1,
3048
3112
  stopColor: "#ff4e00"
3049
3113
  }
3050
3114
  }),
3051
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("stop", {
3115
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("stop", {
3052
3116
  offset: 1,
3053
3117
  style: {
3054
3118
  stopOpacity: 1,
@@ -3057,7 +3121,7 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
3057
3121
  })
3058
3122
  ]
3059
3123
  }),
3060
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)("linearGradient", {
3124
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)("linearGradient", {
3061
3125
  id: p,
3062
3126
  spreadMethod: "pad",
3063
3127
  gradientTransform: "matrix(521.97632 0 0 -521.97632 69.067 191.973)",
@@ -3067,14 +3131,14 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
3067
3131
  y1: 0,
3068
3132
  x1: 0,
3069
3133
  children: [
3070
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("stop", {
3134
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("stop", {
3071
3135
  offset: 0,
3072
3136
  style: {
3073
3137
  stopOpacity: 1,
3074
3138
  stopColor: "#ff4e00"
3075
3139
  }
3076
3140
  }),
3077
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("stop", {
3141
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("stop", {
3078
3142
  offset: 1,
3079
3143
  style: {
3080
3144
  stopOpacity: 1,
@@ -3083,7 +3147,7 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
3083
3147
  })
3084
3148
  ]
3085
3149
  }),
3086
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)("linearGradient", {
3150
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)("linearGradient", {
3087
3151
  id: q,
3088
3152
  spreadMethod: "pad",
3089
3153
  gradientTransform: "matrix(523.09039 0 0 -523.09039 67.312 191.973)",
@@ -3093,14 +3157,14 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
3093
3157
  y1: 0,
3094
3158
  x1: 0,
3095
3159
  children: [
3096
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("stop", {
3160
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("stop", {
3097
3161
  offset: 0,
3098
3162
  style: {
3099
3163
  stopOpacity: 1,
3100
3164
  stopColor: "#ff4e00"
3101
3165
  }
3102
3166
  }),
3103
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("stop", {
3167
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("stop", {
3104
3168
  offset: 1,
3105
3169
  style: {
3106
3170
  stopOpacity: 1,
@@ -3109,7 +3173,7 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
3109
3173
  })
3110
3174
  ]
3111
3175
  }),
3112
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)("linearGradient", {
3176
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)("linearGradient", {
3113
3177
  id: r,
3114
3178
  spreadMethod: "pad",
3115
3179
  gradientTransform: "matrix(524.84045 0 0 -524.84045 63.801 159.5)",
@@ -3119,14 +3183,14 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
3119
3183
  y1: 0,
3120
3184
  x1: 0,
3121
3185
  children: [
3122
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("stop", {
3186
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("stop", {
3123
3187
  offset: 0,
3124
3188
  style: {
3125
3189
  stopOpacity: 1,
3126
3190
  stopColor: "#ff4e00"
3127
3191
  }
3128
3192
  }),
3129
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("stop", {
3193
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("stop", {
3130
3194
  offset: 1,
3131
3195
  style: {
3132
3196
  stopOpacity: 1,
@@ -3135,66 +3199,66 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
3135
3199
  })
3136
3200
  ]
3137
3201
  }),
3138
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("clipPath", {
3202
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("clipPath", {
3139
3203
  id: a,
3140
3204
  clipPathUnits: "userSpaceOnUse",
3141
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("path", {
3205
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("path", {
3142
3206
  d: "M0 319h657.706V0H0Z"
3143
3207
  })
3144
3208
  }),
3145
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("clipPath", {
3209
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("clipPath", {
3146
3210
  id: b,
3147
3211
  clipPathUnits: "userSpaceOnUse",
3148
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("path", {
3212
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("path", {
3149
3213
  d: "M423.64 242h164.999V77H423.64Z"
3150
3214
  })
3151
3215
  }),
3152
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("clipPath", {
3216
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("clipPath", {
3153
3217
  id: e,
3154
3218
  clipPathUnits: "userSpaceOnUse",
3155
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("path", {
3219
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("path", {
3156
3220
  d: "M0 319h657.706V0H0Z"
3157
3221
  })
3158
3222
  }),
3159
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("clipPath", {
3223
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("clipPath", {
3160
3224
  id: f,
3161
3225
  clipPathUnits: "userSpaceOnUse",
3162
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("path", {
3226
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("path", {
3163
3227
  d: "M311.3 242h93.031V77H311.3Z"
3164
3228
  })
3165
3229
  }),
3166
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("clipPath", {
3230
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("clipPath", {
3167
3231
  id: h,
3168
3232
  clipPathUnits: "userSpaceOnUse",
3169
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("path", {
3233
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("path", {
3170
3234
  d: "M198.96 242h35.106V77H198.96Z"
3171
3235
  })
3172
3236
  }),
3173
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("clipPath", {
3237
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("clipPath", {
3174
3238
  id: n,
3175
3239
  clipPathUnits: "userSpaceOnUse",
3176
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("path", {
3240
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("path", {
3177
3241
  d: "M0 319h657.706V0H0Z"
3178
3242
  })
3179
3243
  }),
3180
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("clipPath", {
3244
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("clipPath", {
3181
3245
  id: o,
3182
3246
  clipPathUnits: "userSpaceOnUse",
3183
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("path", {
3247
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("path", {
3184
3248
  d: "M69.067 242H169.12V141.947H69.067Z"
3185
3249
  })
3186
3250
  })
3187
3251
  ]
3188
3252
  }),
3189
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("g", {
3253
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("g", {
3190
3254
  clipPath: `url(#${a})`,
3191
3255
  transform: "matrix(1.33333 0 0 -1.33333 0 425.333)",
3192
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("g", {
3256
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("g", {
3193
3257
  style: {
3194
3258
  opacity: 0.69999701
3195
3259
  },
3196
3260
  clipPath: `url(#${b})`,
3197
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("path", {
3261
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("path", {
3198
3262
  style: {
3199
3263
  fill: `url(#${c})`,
3200
3264
  stroke: "none"
@@ -3203,7 +3267,7 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
3203
3267
  })
3204
3268
  })
3205
3269
  }),
3206
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("path", {
3270
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("path", {
3207
3271
  style: {
3208
3272
  fill: `url(#${d})`,
3209
3273
  stroke: "none"
@@ -3211,16 +3275,16 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
3211
3275
  d: "M558.674 236.858 428.781 106.966c-6.855-6.855-6.855-17.969 0-24.825 6.855-6.854 17.969-6.854 24.823 0l129.894 129.894c6.854 6.855 6.854 17.968 0 24.823A17.498 17.498 0 0 1 571.086 242a17.495 17.495 0 0 1-12.412-5.142",
3212
3276
  transform: "matrix(1.33333 0 0 -1.33333 0 425.333)"
3213
3277
  }),
3214
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)("g", {
3278
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)("g", {
3215
3279
  clipPath: `url(#${e})`,
3216
3280
  transform: "matrix(1.33333 0 0 -1.33333 0 425.333)",
3217
3281
  children: [
3218
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("g", {
3282
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("g", {
3219
3283
  style: {
3220
3284
  opacity: 0.69999701
3221
3285
  },
3222
3286
  clipPath: `url(#${f})`,
3223
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("path", {
3287
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("path", {
3224
3288
  style: {
3225
3289
  fill: `url(#${g})`,
3226
3290
  stroke: "none"
@@ -3228,12 +3292,12 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
3228
3292
  d: "M328.853 112.107c22.297 0 40.372 18.075 40.372 40.372v71.315c0 10.054 7.505 18.206 17.554 18.206 10.048 0 17.552-8.152 17.552-18.206v-71.315c0-41.686-33.793-75.479-75.478-75.479-9.694 0-17.553 7.859-17.553 17.554 0 9.694 7.859 17.553 17.553 17.553"
3229
3293
  })
3230
3294
  }),
3231
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("g", {
3295
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("g", {
3232
3296
  style: {
3233
3297
  opacity: 0.69999701
3234
3298
  },
3235
3299
  clipPath: `url(#${h})`,
3236
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("path", {
3300
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("path", {
3237
3301
  style: {
3238
3302
  fill: `url(#${i})`,
3239
3303
  stroke: "none"
@@ -3243,7 +3307,7 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
3243
3307
  })
3244
3308
  ]
3245
3309
  }),
3246
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("path", {
3310
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("path", {
3247
3311
  style: {
3248
3312
  fill: `url(#${j})`,
3249
3313
  stroke: "none"
@@ -3251,7 +3315,7 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
3251
3315
  d: "M369.225 224.447c0-9.694 7.859-17.553 17.553-17.553 9.695 0 17.553 7.859 17.553 17.553s-7.858 17.552-17.553 17.552c-9.694 0-17.553-7.858-17.553-17.552",
3252
3316
  transform: "matrix(1.33333 0 0 -1.33333 0 425.333)"
3253
3317
  }),
3254
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("path", {
3318
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("path", {
3255
3319
  style: {
3256
3320
  fill: `url(#${k})`,
3257
3321
  stroke: "none"
@@ -3259,7 +3323,7 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
3259
3323
  d: "M553.532 94.554c0-9.695 7.859-17.554 17.553-17.554 9.695 0 17.554 7.859 17.554 17.554 0 9.694-7.859 17.552-17.554 17.552-9.694 0-17.553-7.858-17.553-17.552",
3260
3324
  transform: "matrix(1.33333 0 0 -1.33333 0 425.333)"
3261
3325
  }),
3262
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("path", {
3326
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("path", {
3263
3327
  style: {
3264
3328
  fill: `url(#${l})`,
3265
3329
  stroke: "none"
@@ -3267,7 +3331,7 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
3267
3331
  d: "M69.067 223.794V95.206C69.067 85.152 76.571 77 86.62 77c10.048 0 17.553 8.152 17.553 18.206v128.588c0 10.055-7.505 18.205-17.553 18.205-10.049 0-17.553-8.15-17.553-18.205",
3268
3332
  transform: "matrix(1.33333 0 0 -1.33333 0 425.333)"
3269
3333
  }),
3270
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("path", {
3334
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("path", {
3271
3335
  style: {
3272
3336
  fill: `url(#${m})`,
3273
3337
  stroke: "none"
@@ -3275,15 +3339,15 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
3275
3339
  d: "M198.96 94.554c0-9.695 7.859-17.554 17.553-17.554 9.695 0 17.554 7.859 17.554 17.554 0 9.694-7.859 17.553-17.554 17.553-9.694 0-17.553-7.859-17.553-17.553",
3276
3340
  transform: "matrix(1.33333 0 0 -1.33333 0 425.333)"
3277
3341
  }),
3278
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("g", {
3342
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("g", {
3279
3343
  clipPath: `url(#${n})`,
3280
3344
  transform: "matrix(1.33333 0 0 -1.33333 0 425.333)",
3281
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("g", {
3345
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("g", {
3282
3346
  style: {
3283
3347
  opacity: 0.69999701
3284
3348
  },
3285
3349
  clipPath: `url(#${o})`,
3286
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("path", {
3350
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("path", {
3287
3351
  style: {
3288
3352
  fill: `url(#${p})`,
3289
3353
  stroke: "none"
@@ -3292,7 +3356,7 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
3292
3356
  })
3293
3357
  })
3294
3358
  }),
3295
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("path", {
3359
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("path", {
3296
3360
  style: {
3297
3361
  fill: `url(#${q})`,
3298
3362
  stroke: "none"
@@ -3300,7 +3364,7 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
3300
3364
  d: "m204.101 236.858-64.947-64.946c-6.854-6.855-6.854-17.969 0-24.824 6.856-6.855 17.97-6.855 24.824 0l64.947 64.947c6.855 6.855 6.855 17.968 0 24.823A17.495 17.495 0 0 1 216.513 242a17.498 17.498 0 0 1-12.412-5.142",
3301
3365
  transform: "matrix(1.33333 0 0 -1.33333 0 425.333)"
3302
3366
  }),
3303
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("path", {
3367
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("path", {
3304
3368
  style: {
3305
3369
  fill: `url(#${r})`,
3306
3370
  stroke: "none"
@@ -3313,16 +3377,17 @@ function $81c579b2354bfb4d$export$2e2bcd8739ae039({ height: height = 26 }) {
3313
3377
  }
3314
3378
 
3315
3379
 
3316
- const $97292a102d486fd6$var$Logo = (0, ($parcel$interopDefault($dyHF6$styledcomponents))).span`
3380
+ let $11947e4b4e6f3883$var$_ = (t1)=>t1, $11947e4b4e6f3883$var$t;
3381
+ const $11947e4b4e6f3883$var$Logo = (0, ($parcel$interopDefault($ayBmS$styledcomponents))).span($11947e4b4e6f3883$var$t || ($11947e4b4e6f3883$var$t = $11947e4b4e6f3883$var$_`
3317
3382
  display: inline-block;
3318
3383
  height: 0.8em;
3319
3384
  margin-right: 1em;
3320
3385
  transform: translate(0.3em, -0.2em);
3321
- `;
3322
- const $97292a102d486fd6$export$8b251419efc915eb = ()=>/*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$reactjsxruntime.Fragment), {
3386
+ `));
3387
+ const $11947e4b4e6f3883$export$8b251419efc915eb = ()=>/*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$reactjsxruntime.Fragment), {
3323
3388
  children: [
3324
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)($97292a102d486fd6$var$Logo, {
3325
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $81c579b2354bfb4d$export$2e2bcd8739ae039), {
3389
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)($11947e4b4e6f3883$var$Logo, {
3390
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $e3a8039a3d28e592$export$2e2bcd8739ae039), {
3326
3391
  height: 13
3327
3392
  })
3328
3393
  }),
@@ -3334,30 +3399,30 @@ const $97292a102d486fd6$export$8b251419efc915eb = ()=>/*#__PURE__*/ (0, $dyHF6$r
3334
3399
 
3335
3400
 
3336
3401
 
3337
- function $696fc2bd3580ef7e$var$FormField(props) {
3402
+ function $4c82d5f60ad56557$var$FormField(props) {
3338
3403
  const { children: children , title: title , description: description , inputId: inputId } = props;
3339
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Stack), {
3404
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Stack), {
3340
3405
  space: 1,
3341
3406
  children: [
3342
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Flex), {
3407
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Flex), {
3343
3408
  align: "flex-end",
3344
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Box), {
3409
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Box), {
3345
3410
  flex: 1,
3346
3411
  paddingY: 2,
3347
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Stack), {
3412
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Stack), {
3348
3413
  space: 2,
3349
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Flex), {
3414
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Flex), {
3350
3415
  children: [
3351
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Text), {
3416
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Text), {
3352
3417
  as: "label",
3353
3418
  htmlFor: inputId,
3354
3419
  weight: "semibold",
3355
3420
  size: 1,
3356
- children: title || /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("em", {
3421
+ children: title || /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("em", {
3357
3422
  children: "Untitled"
3358
3423
  })
3359
3424
  }),
3360
- description && /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Text), {
3425
+ description && /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Text), {
3361
3426
  muted: true,
3362
3427
  size: 1,
3363
3428
  children: description
@@ -3367,41 +3432,41 @@ function $696fc2bd3580ef7e$var$FormField(props) {
3367
3432
  })
3368
3433
  })
3369
3434
  }),
3370
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("div", {
3435
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("div", {
3371
3436
  children: children
3372
3437
  })
3373
3438
  ]
3374
3439
  });
3375
3440
  }
3376
- var $696fc2bd3580ef7e$export$2e2bcd8739ae039 = /*#__PURE__*/ (0, $dyHF6$react.memo)($696fc2bd3580ef7e$var$FormField);
3441
+ var $4c82d5f60ad56557$export$2e2bcd8739ae039 = /*#__PURE__*/ (0, $ayBmS$react.memo)($4c82d5f60ad56557$var$FormField);
3377
3442
 
3378
3443
 
3379
- const $4a8a0e20ccb63ea2$var$fieldNames = [
3444
+ const $56bacf7dc6478771$var$fieldNames = [
3380
3445
  "token",
3381
3446
  "secretKey",
3382
3447
  "enableSignedUrls"
3383
3448
  ];
3384
- function $4a8a0e20ccb63ea2$var$ConfigureApi({ secrets: secrets , setDialogState: setDialogState }) {
3385
- const client = (0, $dyHF6$sanity.useClient)();
3386
- const [state, dispatch] = (0, $2f6a2877401ba7f3$export$e24a74f4fce2446c)(secrets);
3387
- const hasSecretsInitially = (0, $dyHF6$react.useMemo)(()=>secrets.token && secrets.secretKey, [
3449
+ function $56bacf7dc6478771$var$ConfigureApi({ secrets: secrets , setDialogState: setDialogState }) {
3450
+ const client = (0, $ayBmS$sanity.useClient)();
3451
+ const [state, dispatch] = (0, $f23684a2b0635ab0$export$e24a74f4fce2446c)(secrets);
3452
+ const hasSecretsInitially = (0, $ayBmS$react.useMemo)(()=>secrets.token && secrets.secretKey, [
3388
3453
  secrets
3389
3454
  ]);
3390
- const handleClose = (0, $dyHF6$react.useCallback)(()=>setDialogState(false), [
3455
+ const handleClose = (0, $ayBmS$react.useCallback)(()=>setDialogState(false), [
3391
3456
  setDialogState
3392
3457
  ]);
3393
- const dirty = (0, $dyHF6$react.useMemo)(()=>secrets.token !== state.token || secrets.secretKey !== state.secretKey || secrets.enableSignedUrls !== state.enableSignedUrls, [
3458
+ const dirty = (0, $ayBmS$react.useMemo)(()=>secrets.token !== state.token || secrets.secretKey !== state.secretKey || secrets.enableSignedUrls !== state.enableSignedUrls, [
3394
3459
  secrets,
3395
3460
  state
3396
3461
  ]);
3397
- const id = `ConfigureApi${(0, $dyHF6$reachautoid.useId)()}`;
3398
- const [tokenId, secretKeyId, enableSignedUrlsId] = (0, $dyHF6$react.useMemo)(()=>$4a8a0e20ccb63ea2$var$fieldNames.map((field)=>`${id}-${field}`), [
3462
+ const id = `ConfigureApi${(0, $ayBmS$reachautoid.useId)()}`;
3463
+ const [tokenId, secretKeyId, enableSignedUrlsId] = (0, $ayBmS$react.useMemo)(()=>$56bacf7dc6478771$var$fieldNames.map((field)=>`${id}-${field}`), [
3399
3464
  id
3400
3465
  ]);
3401
- const firstField = (0, $dyHF6$react.useRef)(null);
3402
- const handleSaveSecrets = (0, $624f4dcaee76afb6$export$e1d4ef4fde5dbdf2)(client, secrets);
3403
- const saving = (0, $dyHF6$react.useRef)(false);
3404
- const handleSubmit = (0, $dyHF6$react.useCallback)((event)=>{
3466
+ const firstField = (0, $ayBmS$react.useRef)(null);
3467
+ const handleSaveSecrets = (0, $efecc0530b43438c$export$e1d4ef4fde5dbdf2)(client, secrets);
3468
+ const saving = (0, $ayBmS$react.useRef)(false);
3469
+ const handleSubmit = (0, $ayBmS$react.useCallback)((event)=>{
3405
3470
  event.preventDefault();
3406
3471
  if (!saving.current && event.currentTarget.reportValidity()) {
3407
3472
  saving.current = true;
@@ -3415,15 +3480,15 @@ function $4a8a0e20ccb63ea2$var$ConfigureApi({ secrets: secrets , setDialogState:
3415
3480
  enableSignedUrls: enableSignedUrls
3416
3481
  }).then((savedSecrets)=>{
3417
3482
  const { projectId: projectId , dataset: dataset } = client.config();
3418
- (0, $dyHF6$suspendreact.clear)([
3419
- (0, $2ffcb7ef2a4a67d0$export$13cdb654d47e0703),
3420
- (0, $edbbfc11873e0f23$export$9c7ae676ac45430a),
3483
+ (0, $ayBmS$suspendreact.clear)([
3484
+ (0, $764163079c542eaf$export$13cdb654d47e0703),
3485
+ (0, $ca60bbd6b265fe38$export$9c7ae676ac45430a),
3421
3486
  projectId,
3422
3487
  dataset
3423
3488
  ]);
3424
- (0, $dyHF6$suspendreact.preload)(()=>Promise.resolve(savedSecrets), [
3425
- (0, $2ffcb7ef2a4a67d0$export$13cdb654d47e0703),
3426
- (0, $edbbfc11873e0f23$export$9c7ae676ac45430a),
3489
+ (0, $ayBmS$suspendreact.preload)(()=>Promise.resolve(savedSecrets), [
3490
+ (0, $764163079c542eaf$export$13cdb654d47e0703),
3491
+ (0, $ca60bbd6b265fe38$export$9c7ae676ac45430a),
3427
3492
  projectId,
3428
3493
  dataset
3429
3494
  ]);
@@ -3442,7 +3507,7 @@ function $4a8a0e20ccb63ea2$var$ConfigureApi({ secrets: secrets , setDialogState:
3442
3507
  setDialogState,
3443
3508
  state
3444
3509
  ]);
3445
- const handleChangeToken = (0, $dyHF6$react.useCallback)((event)=>{
3510
+ const handleChangeToken = (0, $ayBmS$react.useCallback)((event)=>{
3446
3511
  dispatch({
3447
3512
  type: "change",
3448
3513
  payload: {
@@ -3453,7 +3518,7 @@ function $4a8a0e20ccb63ea2$var$ConfigureApi({ secrets: secrets , setDialogState:
3453
3518
  }, [
3454
3519
  dispatch
3455
3520
  ]);
3456
- const handleChangeSecretKey = (0, $dyHF6$react.useCallback)((event)=>{
3521
+ const handleChangeSecretKey = (0, $ayBmS$react.useCallback)((event)=>{
3457
3522
  dispatch({
3458
3523
  type: "change",
3459
3524
  payload: {
@@ -3464,7 +3529,7 @@ function $4a8a0e20ccb63ea2$var$ConfigureApi({ secrets: secrets , setDialogState:
3464
3529
  }, [
3465
3530
  dispatch
3466
3531
  ]);
3467
- const handleChangeEnableSignedUrls = (0, $dyHF6$react.useCallback)((event)=>{
3532
+ const handleChangeEnableSignedUrls = (0, $ayBmS$react.useCallback)((event)=>{
3468
3533
  dispatch({
3469
3534
  type: "change",
3470
3535
  payload: {
@@ -3475,28 +3540,29 @@ function $4a8a0e20ccb63ea2$var$ConfigureApi({ secrets: secrets , setDialogState:
3475
3540
  }, [
3476
3541
  dispatch
3477
3542
  ]);
3478
- (0, $dyHF6$react.useEffect)(()=>{
3543
+ (0, $ayBmS$react.useEffect)(()=>{
3479
3544
  if (firstField.current) firstField.current.focus();
3480
3545
  }, [
3481
3546
  firstField
3482
3547
  ]);
3483
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Dialog), {
3548
+ var _token, _secretKey;
3549
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Dialog), {
3484
3550
  id: id,
3485
3551
  onClose: handleClose,
3486
- header: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $97292a102d486fd6$export$8b251419efc915eb), {}),
3552
+ header: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $11947e4b4e6f3883$export$8b251419efc915eb), {}),
3487
3553
  width: 0,
3488
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Box), {
3554
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Box), {
3489
3555
  padding: 4,
3490
3556
  style: {
3491
3557
  position: "relative"
3492
3558
  },
3493
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("form", {
3559
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("form", {
3494
3560
  onSubmit: handleSubmit,
3495
3561
  noValidate: true,
3496
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Stack), {
3562
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Stack), {
3497
3563
  space: 4,
3498
3564
  children: [
3499
- !hasSecretsInitially && /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Card), {
3565
+ !hasSecretsInitially && /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Card), {
3500
3566
  padding: [
3501
3567
  3,
3502
3568
  3,
@@ -3505,15 +3571,15 @@ function $4a8a0e20ccb63ea2$var$ConfigureApi({ secrets: secrets , setDialogState:
3505
3571
  radius: 2,
3506
3572
  shadow: 1,
3507
3573
  tone: "primary",
3508
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Stack), {
3574
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Stack), {
3509
3575
  space: 3,
3510
3576
  children: [
3511
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Text), {
3577
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Text), {
3512
3578
  size: 1,
3513
3579
  children: [
3514
3580
  "To set up a new access token, go to your",
3515
3581
  " ",
3516
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("a", {
3582
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("a", {
3517
3583
  href: "https://dashboard.mux.com/settings/access-tokens",
3518
3584
  target: "_blank",
3519
3585
  rel: "noreferrer noopener",
@@ -3522,55 +3588,55 @@ function $4a8a0e20ccb63ea2$var$ConfigureApi({ secrets: secrets , setDialogState:
3522
3588
  "."
3523
3589
  ]
3524
3590
  }),
3525
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Text), {
3591
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Text), {
3526
3592
  size: 1,
3527
3593
  children: [
3528
3594
  "The access token needs permissions: ",
3529
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("strong", {
3595
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("strong", {
3530
3596
  children: "Mux Video "
3531
3597
  }),
3532
3598
  "(Full Access) and ",
3533
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("strong", {
3599
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("strong", {
3534
3600
  children: "Mux Data"
3535
3601
  }),
3536
3602
  " (Read)",
3537
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("br", {}),
3603
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("br", {}),
3538
3604
  "The credentials will be stored safely in a hidden document only available to editors."
3539
3605
  ]
3540
3606
  })
3541
3607
  ]
3542
3608
  })
3543
3609
  }),
3544
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $696fc2bd3580ef7e$export$2e2bcd8739ae039), {
3610
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $4c82d5f60ad56557$export$2e2bcd8739ae039), {
3545
3611
  title: "Access Token",
3546
3612
  inputId: tokenId,
3547
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.TextInput), {
3613
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.TextInput), {
3548
3614
  id: tokenId,
3549
3615
  ref: firstField,
3550
3616
  onChange: handleChangeToken,
3551
3617
  type: "text",
3552
- value: state.token ?? "",
3618
+ value: (_token = state.token) !== null && _token !== void 0 ? _token : "",
3553
3619
  required: !!state.secretKey || state.enableSignedUrls
3554
3620
  })
3555
3621
  }),
3556
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $696fc2bd3580ef7e$export$2e2bcd8739ae039), {
3622
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $4c82d5f60ad56557$export$2e2bcd8739ae039), {
3557
3623
  title: "Secret Key",
3558
3624
  inputId: secretKeyId,
3559
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.TextInput), {
3625
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.TextInput), {
3560
3626
  id: secretKeyId,
3561
3627
  onChange: handleChangeSecretKey,
3562
3628
  type: "text",
3563
- value: state.secretKey ?? "",
3629
+ value: (_secretKey = state.secretKey) !== null && _secretKey !== void 0 ? _secretKey : "",
3564
3630
  required: !!state.token || state.enableSignedUrls
3565
3631
  })
3566
3632
  }),
3567
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Stack), {
3633
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Stack), {
3568
3634
  space: 4,
3569
3635
  children: [
3570
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Flex), {
3636
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Flex), {
3571
3637
  align: "center",
3572
3638
  children: [
3573
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Checkbox), {
3639
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Checkbox), {
3574
3640
  id: enableSignedUrlsId,
3575
3641
  onChange: handleChangeEnableSignedUrls,
3576
3642
  checked: state.enableSignedUrls,
@@ -3578,11 +3644,11 @@ function $4a8a0e20ccb63ea2$var$ConfigureApi({ secrets: secrets , setDialogState:
3578
3644
  display: "block"
3579
3645
  }
3580
3646
  }),
3581
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Box), {
3647
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Box), {
3582
3648
  flex: 1,
3583
3649
  paddingLeft: 3,
3584
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Text), {
3585
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("label", {
3650
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Text), {
3651
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("label", {
3586
3652
  htmlFor: enableSignedUrlsId,
3587
3653
  children: "Enable Signed Urls"
3588
3654
  })
@@ -3590,7 +3656,7 @@ function $4a8a0e20ccb63ea2$var$ConfigureApi({ secrets: secrets , setDialogState:
3590
3656
  })
3591
3657
  ]
3592
3658
  }),
3593
- secrets.signingKeyId && state.enableSignedUrls ? /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Card), {
3659
+ secrets.signingKeyId && state.enableSignedUrls ? /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Card), {
3594
3660
  padding: [
3595
3661
  3,
3596
3662
  3,
@@ -3599,22 +3665,22 @@ function $4a8a0e20ccb63ea2$var$ConfigureApi({ secrets: secrets , setDialogState:
3599
3665
  radius: 2,
3600
3666
  shadow: 1,
3601
3667
  tone: "caution",
3602
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Stack), {
3668
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Stack), {
3603
3669
  space: 3,
3604
3670
  children: [
3605
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Text), {
3671
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Text), {
3606
3672
  size: 1,
3607
3673
  children: "The signing key ID that Sanity will use is:"
3608
3674
  }),
3609
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Code), {
3675
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Code), {
3610
3676
  size: 1,
3611
3677
  children: secrets.signingKeyId
3612
3678
  }),
3613
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Text), {
3679
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Text), {
3614
3680
  size: 1,
3615
3681
  children: [
3616
3682
  "This key is only used for previewing content in the Sanity UI.",
3617
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("br", {}),
3683
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("br", {}),
3618
3684
  "You should generate a different key to use in your application server."
3619
3685
  ]
3620
3686
  })
@@ -3623,10 +3689,10 @@ function $4a8a0e20ccb63ea2$var$ConfigureApi({ secrets: secrets , setDialogState:
3623
3689
  }) : null
3624
3690
  ]
3625
3691
  }),
3626
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Inline), {
3692
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Inline), {
3627
3693
  space: 2,
3628
3694
  children: [
3629
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Button), {
3695
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Button), {
3630
3696
  text: "Save",
3631
3697
  disabled: !dirty,
3632
3698
  loading: state.submitting,
@@ -3634,7 +3700,7 @@ function $4a8a0e20ccb63ea2$var$ConfigureApi({ secrets: secrets , setDialogState:
3634
3700
  mode: "default",
3635
3701
  type: "submit"
3636
3702
  }),
3637
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Button), {
3703
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Button), {
3638
3704
  disabled: state.submitting,
3639
3705
  text: "Cancel",
3640
3706
  mode: "bleed",
@@ -3642,7 +3708,7 @@ function $4a8a0e20ccb63ea2$var$ConfigureApi({ secrets: secrets , setDialogState:
3642
3708
  })
3643
3709
  ]
3644
3710
  }),
3645
- state.error && /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Card), {
3711
+ state.error && /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Card), {
3646
3712
  padding: [
3647
3713
  3,
3648
3714
  3,
@@ -3651,7 +3717,7 @@ function $4a8a0e20ccb63ea2$var$ConfigureApi({ secrets: secrets , setDialogState:
3651
3717
  radius: 2,
3652
3718
  shadow: 1,
3653
3719
  tone: "critical",
3654
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Text), {
3720
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Text), {
3655
3721
  children: state.error
3656
3722
  })
3657
3723
  })
@@ -3661,24 +3727,25 @@ function $4a8a0e20ccb63ea2$var$ConfigureApi({ secrets: secrets , setDialogState:
3661
3727
  })
3662
3728
  });
3663
3729
  }
3664
- var $4a8a0e20ccb63ea2$export$2e2bcd8739ae039 = /*#__PURE__*/ (0, $dyHF6$react.memo)($4a8a0e20ccb63ea2$var$ConfigureApi);
3730
+ var $56bacf7dc6478771$export$2e2bcd8739ae039 = /*#__PURE__*/ (0, $ayBmS$react.memo)($56bacf7dc6478771$var$ConfigureApi);
3665
3731
 
3666
3732
 
3667
3733
 
3668
3734
 
3669
3735
 
3670
3736
 
3671
- const $5f180d117773fee7$export$f0c88bc5a320387d = (0, ($parcel$interopDefault($dyHF6$styledcomponents)))((0, $dyHF6$sanityui.Card))`
3737
+ let $3c6497e4f99ab548$var$_ = (t1)=>t1, $3c6497e4f99ab548$var$t;
3738
+ const $3c6497e4f99ab548$export$f0c88bc5a320387d = (0, ($parcel$interopDefault($ayBmS$styledcomponents)))((0, $ayBmS$sanityui.Card))($3c6497e4f99ab548$var$t || ($3c6497e4f99ab548$var$t = $3c6497e4f99ab548$var$_`
3672
3739
  aspect-ratio: 16 / 9;
3673
3740
  position: relative;
3674
3741
  width: 100%;
3675
- `;
3676
- const $5f180d117773fee7$export$18fe723e8683ca03 = ()=>{
3677
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("div", {
3742
+ `));
3743
+ const $3c6497e4f99ab548$export$18fe723e8683ca03 = ()=>{
3744
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("div", {
3678
3745
  style: {
3679
3746
  padding: 1
3680
3747
  },
3681
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Card), {
3748
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Card), {
3682
3749
  shadow: 1,
3683
3750
  sizing: "border",
3684
3751
  style: {
@@ -3686,18 +3753,18 @@ const $5f180d117773fee7$export$18fe723e8683ca03 = ()=>{
3686
3753
  width: "100%",
3687
3754
  borderRadius: "1px"
3688
3755
  },
3689
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Flex), {
3756
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Flex), {
3690
3757
  align: "center",
3691
3758
  direction: "column",
3692
3759
  height: "fill",
3693
3760
  justify: "center",
3694
3761
  children: [
3695
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Spinner), {
3762
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Spinner), {
3696
3763
  muted: true
3697
3764
  }),
3698
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Box), {
3765
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Box), {
3699
3766
  marginTop: 3,
3700
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Text), {
3767
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Text), {
3701
3768
  align: "center",
3702
3769
  muted: true,
3703
3770
  size: 1,
@@ -3716,17 +3783,17 @@ const $5f180d117773fee7$export$18fe723e8683ca03 = ()=>{
3716
3783
 
3717
3784
 
3718
3785
 
3719
- function $20bd1aaec92888dd$export$2e2bcd8739ae039(props) {
3786
+ function $8283748ba76c562e$export$2e2bcd8739ae039(props) {
3720
3787
  const { setDialogState: setDialogState } = props;
3721
- const handleOpen = (0, $dyHF6$react.useCallback)(()=>setDialogState("secrets"), [
3788
+ const handleOpen = (0, $ayBmS$react.useCallback)(()=>setDialogState("secrets"), [
3722
3789
  setDialogState
3723
3790
  ]);
3724
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$reactjsxruntime.Fragment), {
3725
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("div", {
3791
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$reactjsxruntime.Fragment), {
3792
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("div", {
3726
3793
  style: {
3727
3794
  padding: 2
3728
3795
  },
3729
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Card), {
3796
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Card), {
3730
3797
  display: "flex",
3731
3798
  sizing: "border",
3732
3799
  style: {
@@ -3742,10 +3809,10 @@ function $20bd1aaec92888dd$export$2e2bcd8739ae039(props) {
3742
3809
  ],
3743
3810
  radius: 1,
3744
3811
  tone: "transparent",
3745
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Flex), {
3812
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Flex), {
3746
3813
  justify: "flex-start",
3747
3814
  align: "center",
3748
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$sanityui.Grid), {
3815
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$sanityui.Grid), {
3749
3816
  columns: 1,
3750
3817
  gap: [
3751
3818
  2,
@@ -3754,18 +3821,18 @@ function $20bd1aaec92888dd$export$2e2bcd8739ae039(props) {
3754
3821
  4
3755
3822
  ],
3756
3823
  children: [
3757
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Inline), {
3824
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Inline), {
3758
3825
  paddingY: 1,
3759
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)("div", {
3826
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)("div", {
3760
3827
  style: {
3761
3828
  height: "32px"
3762
3829
  },
3763
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $81c579b2354bfb4d$export$2e2bcd8739ae039), {})
3830
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $e3a8039a3d28e592$export$2e2bcd8739ae039), {})
3764
3831
  })
3765
3832
  }),
3766
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Inline), {
3833
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Inline), {
3767
3834
  paddingY: 1,
3768
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Heading), {
3835
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Heading), {
3769
3836
  size: [
3770
3837
  0,
3771
3838
  1,
@@ -3775,11 +3842,11 @@ function $20bd1aaec92888dd$export$2e2bcd8739ae039(props) {
3775
3842
  children: "Upload and preview videos directly from your studio."
3776
3843
  })
3777
3844
  }),
3778
- /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Inline), {
3845
+ /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Inline), {
3779
3846
  paddingY: 1,
3780
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanityui.Button), {
3847
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanityui.Button), {
3781
3848
  mode: "ghost",
3782
- icon: (0, $dyHF6$sanityicons.PlugIcon),
3849
+ icon: (0, $ayBmS$sanityicons.PlugIcon),
3783
3850
  text: "Configure API",
3784
3851
  onClick: handleOpen
3785
3852
  })
@@ -3793,12 +3860,13 @@ function $20bd1aaec92888dd$export$2e2bcd8739ae039(props) {
3793
3860
  }
3794
3861
 
3795
3862
 
3796
- const $6bca891f5dd9dfc9$var$Input = (props)=>{
3797
- const client = (0, $dyHF6$sanity.useClient)();
3798
- const secretDocumentValues = (0, $8a0ef7d2f7c4ca7e$export$4c2801830a129eb)();
3799
- const assetDocumentValues = (0, $eef844dd0892040d$export$e11a382d55e07f75)(props.value?.asset);
3800
- const poll = (0, $9427a85db5895988$export$fd270df25d7dbb88)(props.readOnly ? undefined : assetDocumentValues?.value || undefined);
3801
- const [dialogState, setDialogState] = (0, $af23ed16e7325a21$export$573903f1c655c034)();
3863
+ const $7988e690e4a01972$var$Input = (props)=>{
3864
+ var ref;
3865
+ const client = (0, $ayBmS$sanity.useClient)();
3866
+ const secretDocumentValues = (0, $e0562e9a5cd26710$export$4c2801830a129eb)();
3867
+ const assetDocumentValues = (0, $91e90464b4ca45aa$export$e11a382d55e07f75)((ref = props.value) === null || ref === void 0 ? void 0 : ref.asset);
3868
+ const poll = (0, $b098b0d885e904ff$export$fd270df25d7dbb88)(props.readOnly ? undefined : (assetDocumentValues === null || assetDocumentValues === void 0 ? void 0 : assetDocumentValues.value) || undefined);
3869
+ const [dialogState, setDialogState] = (0, $8ea54a6e4798432c$export$573903f1c655c034)();
3802
3870
  const error = secretDocumentValues.error || assetDocumentValues.error || poll.error /*||
3803
3871
  // @TODO move errored logic to Uploader, where handleRemoveVideo can be called
3804
3872
  (assetDocumentValues.value?.status === 'errored'
@@ -3808,21 +3876,20 @@ const $6bca891f5dd9dfc9$var$Input = (props)=>{
3808
3876
  if (error) // @TODO deal with it more gracefully
3809
3877
  throw error;
3810
3878
  const isLoading = secretDocumentValues.isLoading || assetDocumentValues.isLoading;
3811
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$reactjsxruntime.Fragment), {
3812
- children: isLoading ? /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $5f180d117773fee7$export$18fe723e8683ca03), {}) : /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsxs)((0, $dyHF6$reactjsxruntime.Fragment), {
3879
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$reactjsxruntime.Fragment), {
3880
+ children: isLoading ? /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $3c6497e4f99ab548$export$18fe723e8683ca03), {}) : /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsxs)((0, $ayBmS$reactjsxruntime.Fragment), {
3813
3881
  children: [
3814
- secretDocumentValues.value.needsSetup && !assetDocumentValues.value ? /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $20bd1aaec92888dd$export$2e2bcd8739ae039), {
3882
+ secretDocumentValues.value.needsSetup && !assetDocumentValues.value ? /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $8283748ba76c562e$export$2e2bcd8739ae039), {
3815
3883
  setDialogState: setDialogState
3816
- }) : /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $ee85957326065d04$export$2e2bcd8739ae039), {
3817
- ...props,
3884
+ }) : /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $e43e21f1b2fe430e$export$2e2bcd8739ae039), (0, ($parcel$interopDefault($ayBmS$swchelperslib_object_spread_propsjs)))((0, ($parcel$interopDefault($ayBmS$swchelperslib_object_spreadjs)))({}, props), {
3818
3885
  client: client,
3819
3886
  secrets: secretDocumentValues.value.secrets,
3820
3887
  asset: assetDocumentValues.value,
3821
3888
  dialogState: dialogState,
3822
3889
  setDialogState: setDialogState,
3823
3890
  needsSetup: secretDocumentValues.value.needsSetup
3824
- }),
3825
- dialogState === "secrets" && /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $4a8a0e20ccb63ea2$export$2e2bcd8739ae039), {
3891
+ })),
3892
+ dialogState === "secrets" && /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $56bacf7dc6478771$export$2e2bcd8739ae039), {
3826
3893
  setDialogState: setDialogState,
3827
3894
  secrets: secretDocumentValues.value.secrets
3828
3895
  })
@@ -3830,7 +3897,7 @@ const $6bca891f5dd9dfc9$var$Input = (props)=>{
3830
3897
  })
3831
3898
  });
3832
3899
  };
3833
- var $6bca891f5dd9dfc9$export$2e2bcd8739ae039 = /*#__PURE__*/ (0, $dyHF6$react.memo)($6bca891f5dd9dfc9$var$Input);
3900
+ var $7988e690e4a01972$export$2e2bcd8739ae039 = /*#__PURE__*/ (0, $ayBmS$react.memo)($7988e690e4a01972$var$Input);
3834
3901
 
3835
3902
 
3836
3903
 
@@ -3839,27 +3906,27 @@ var $6bca891f5dd9dfc9$export$2e2bcd8739ae039 = /*#__PURE__*/ (0, $dyHF6$react.me
3839
3906
 
3840
3907
 
3841
3908
 
3842
- const $cbaf0acf64ca3573$var$MuxVideoPreview = ({ value: value })=>{
3843
- const assetDocumentValues = (0, $eef844dd0892040d$export$e11a382d55e07f75)(value?.asset);
3844
- if (assetDocumentValues.value) return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $6de6709202a3b061$export$bd4b73f15688a160), {
3909
+ const $a1523ee7ee9b753a$var$MuxVideoPreview = ({ value: value })=>{
3910
+ const assetDocumentValues = (0, $91e90464b4ca45aa$export$e11a382d55e07f75)(value === null || value === void 0 ? void 0 : value.asset);
3911
+ if (assetDocumentValues.value) return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $b4359f9e5317addd$export$bd4b73f15688a160), {
3845
3912
  asset: assetDocumentValues.value,
3846
3913
  width: 640
3847
3914
  });
3848
3915
  // @ts-expect-error
3849
- const { filename: filename , playbackId: playbackId , status: status } = value ?? {};
3850
- return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$sanity_unstable.SanityDefaultPreview), {
3916
+ const { filename: filename , playbackId: playbackId , status: status } = value !== null && value !== void 0 ? value : {};
3917
+ return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$sanity_unstable.SanityDefaultPreview), {
3851
3918
  title: filename || playbackId || "",
3852
3919
  subtitle: status ? `status: ${status}` : null
3853
3920
  });
3854
3921
  };
3855
- var $cbaf0acf64ca3573$export$2e2bcd8739ae039 = $cbaf0acf64ca3573$var$MuxVideoPreview;
3922
+ var $a1523ee7ee9b753a$export$2e2bcd8739ae039 = $a1523ee7ee9b753a$var$MuxVideoPreview;
3856
3923
 
3857
3924
 
3858
3925
 
3859
3926
 
3860
- const $75523cdda380b780$export$a8ff84c12d48cfa6 = "mux.videoAsset";
3861
- const $75523cdda380b780$var$videoAsset = (0, $dyHF6$sanity.defineField)({
3862
- name: $75523cdda380b780$export$a8ff84c12d48cfa6,
3927
+ const $aa6f8a8b344a9a01$export$a8ff84c12d48cfa6 = "mux.videoAsset";
3928
+ const $aa6f8a8b344a9a01$var$videoAsset = (0, $ayBmS$sanity.defineField)({
3929
+ name: $aa6f8a8b344a9a01$export$a8ff84c12d48cfa6,
3863
3930
  type: "object",
3864
3931
  title: "Video asset",
3865
3932
  fields: [
@@ -3885,12 +3952,12 @@ const $75523cdda380b780$var$videoAsset = (0, $dyHF6$sanity.defineField)({
3885
3952
  },
3886
3953
  ]
3887
3954
  });
3888
- var $75523cdda380b780$export$2e2bcd8739ae039 = $75523cdda380b780$var$videoAsset;
3955
+ var $aa6f8a8b344a9a01$export$2e2bcd8739ae039 = $aa6f8a8b344a9a01$var$videoAsset;
3889
3956
 
3890
3957
 
3891
- const $ac55e63956aa9e84$export$a8ff84c12d48cfa6 = "mux.video";
3892
- const $ac55e63956aa9e84$var$video = (0, $dyHF6$sanity.defineField)({
3893
- name: $ac55e63956aa9e84$export$a8ff84c12d48cfa6,
3958
+ const $c9d039407c122263$export$a8ff84c12d48cfa6 = "mux.video";
3959
+ const $c9d039407c122263$var$video = (0, $ayBmS$sanity.defineField)({
3960
+ name: $c9d039407c122263$export$a8ff84c12d48cfa6,
3894
3961
  type: "object",
3895
3962
  title: "Video asset reference",
3896
3963
  fields: [
@@ -3901,65 +3968,61 @@ const $ac55e63956aa9e84$var$video = (0, $dyHF6$sanity.defineField)({
3901
3968
  weak: true,
3902
3969
  to: [
3903
3970
  {
3904
- type: (0, $75523cdda380b780$export$a8ff84c12d48cfa6)
3971
+ type: (0, $aa6f8a8b344a9a01$export$a8ff84c12d48cfa6)
3905
3972
  }
3906
3973
  ]
3907
3974
  },
3908
3975
  ]
3909
3976
  });
3910
- var $ac55e63956aa9e84$export$2e2bcd8739ae039 = $ac55e63956aa9e84$var$video;
3977
+ var $c9d039407c122263$export$2e2bcd8739ae039 = $c9d039407c122263$var$video;
3911
3978
 
3912
3979
 
3913
3980
 
3914
3981
 
3915
3982
 
3916
- function $0c6ceed5d95aa3e9$export$c8119cbbd1c84da1(props) {
3917
- return (0, $dyHF6$sanity.isObjectSchemaType)(props.schemaType) && props.schemaType.type?.name === (0, $ac55e63956aa9e84$export$a8ff84c12d48cfa6);
3983
+ function $aa910bb01208cd6d$export$c8119cbbd1c84da1(props) {
3984
+ var ref;
3985
+ return (0, $ayBmS$sanity.isObjectSchemaType)(props.schemaType) && ((ref = props.schemaType.type) === null || ref === void 0 ? void 0 : ref.name) === (0, $c9d039407c122263$export$a8ff84c12d48cfa6);
3918
3986
  }
3919
- function $0c6ceed5d95aa3e9$export$3542974c36e4d83f(props) {
3920
- return props.schemaType.type?.name === (0, $ac55e63956aa9e84$export$a8ff84c12d48cfa6);
3987
+ function $aa910bb01208cd6d$export$3542974c36e4d83f(props) {
3988
+ var ref;
3989
+ return ((ref = props.schemaType.type) === null || ref === void 0 ? void 0 : ref.name) === (0, $c9d039407c122263$export$a8ff84c12d48cfa6);
3921
3990
  }
3922
3991
 
3923
3992
 
3924
- const $329a1cedcedb1349$export$f84bd70098573c5c = {
3993
+ const $35eb69de8ff825b5$export$f84bd70098573c5c = {
3925
3994
  mp4_support: "none"
3926
3995
  };
3927
- const $329a1cedcedb1349$export$4d2e76c338bb9fbd = (0, $dyHF6$sanity.createPlugin)((userConfig)=>{
3928
- const config = {
3929
- ...$329a1cedcedb1349$export$f84bd70098573c5c,
3930
- ...userConfig
3931
- };
3996
+ const $35eb69de8ff825b5$export$4d2e76c338bb9fbd = (0, $ayBmS$sanity.createPlugin)((userConfig)=>{
3997
+ const config = (0, ($parcel$interopDefault($ayBmS$swchelperslib_object_spreadjs)))({}, $35eb69de8ff825b5$export$f84bd70098573c5c, userConfig);
3932
3998
  return {
3933
3999
  name: "mux-input",
3934
4000
  form: {
3935
4001
  renderInput (props, next) {
3936
- if ((0, $0c6ceed5d95aa3e9$export$c8119cbbd1c84da1)(props)) return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $5f180d117773fee7$export$f0c88bc5a320387d), {
3937
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $440e5e6a7a1a5e7d$export$2e2bcd8739ae039), {
4002
+ if ((0, $aa910bb01208cd6d$export$c8119cbbd1c84da1)(props)) return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $3c6497e4f99ab548$export$f0c88bc5a320387d), {
4003
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $23a5e4ef1c8a3996$export$2e2bcd8739ae039), {
3938
4004
  schemaType: props.schemaType,
3939
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $dyHF6$react.Suspense), {
3940
- fallback: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $5f180d117773fee7$export$18fe723e8683ca03), {}),
3941
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $6bca891f5dd9dfc9$export$2e2bcd8739ae039), {
3942
- config: config,
3943
- ...props
3944
- })
4005
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $ayBmS$react.Suspense), {
4006
+ fallback: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $3c6497e4f99ab548$export$18fe723e8683ca03), {}),
4007
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $7988e690e4a01972$export$2e2bcd8739ae039), (0, ($parcel$interopDefault($ayBmS$swchelperslib_object_spreadjs)))({
4008
+ config: config
4009
+ }, props))
3945
4010
  })
3946
4011
  })
3947
4012
  });
3948
4013
  return next(props);
3949
4014
  },
3950
4015
  renderPreview (props, next) {
3951
- if ((0, $0c6ceed5d95aa3e9$export$3542974c36e4d83f)(props)) return /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $5f180d117773fee7$export$f0c88bc5a320387d), {
3952
- children: /*#__PURE__*/ (0, $dyHF6$reactjsxruntime.jsx)((0, $cbaf0acf64ca3573$export$2e2bcd8739ae039), {
3953
- ...props
3954
- })
4016
+ if ((0, $aa910bb01208cd6d$export$3542974c36e4d83f)(props)) return /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $3c6497e4f99ab548$export$f0c88bc5a320387d), {
4017
+ children: /*#__PURE__*/ (0, $ayBmS$reactjsxruntime.jsx)((0, $a1523ee7ee9b753a$export$2e2bcd8739ae039), (0, ($parcel$interopDefault($ayBmS$swchelperslib_object_spreadjs)))({}, props))
3955
4018
  });
3956
4019
  return next(props);
3957
4020
  }
3958
4021
  },
3959
4022
  schema: {
3960
4023
  types: [
3961
- (0, $ac55e63956aa9e84$export$2e2bcd8739ae039),
3962
- (0, $75523cdda380b780$export$2e2bcd8739ae039)
4024
+ (0, $c9d039407c122263$export$2e2bcd8739ae039),
4025
+ (0, $aa6f8a8b344a9a01$export$2e2bcd8739ae039)
3963
4026
  ]
3964
4027
  }
3965
4028
  };