@amazon/vinyl-mpd-parser 3.2.3-next.20261009230135 → 3.2.3-next.20261013174635

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/index.cjs +124 -14
  2. package/dist/index.cjs.map +4 -4
  3. package/dist/index.js +125 -8
  4. package/dist/index.js.map +4 -4
  5. package/dist/test/benchmark.es5.js +18 -16
  6. package/dist/test/benchmark.js +155 -52
  7. package/dist/test/benchmark.js.map +4 -4
  8. package/dist/types/current/index.d.ts +2 -0
  9. package/dist/types/current/index.d.ts.map +1 -1
  10. package/dist/types/current/index.js +2 -0
  11. package/dist/types/current/manifest/dashManifestXmlRules.d.ts +5 -0
  12. package/dist/types/current/manifest/dashManifestXmlRules.d.ts.map +1 -1
  13. package/dist/types/current/manifest/dashManifestXmlRules.js +30 -5
  14. package/dist/types/current/manifest/dashParser.d.ts +368 -1
  15. package/dist/types/current/manifest/dashParser.d.ts.map +1 -1
  16. package/dist/types/current/manifest/dashParser.js +2 -1
  17. package/dist/types/current/manifest/ext/events/scte35XmlRules.d.ts +33 -0
  18. package/dist/types/current/manifest/ext/events/scte35XmlRules.d.ts.map +1 -0
  19. package/dist/types/current/manifest/ext/events/scte35XmlRules.js +83 -0
  20. package/dist/types/current/tsconfig.tsbuildinfo +1 -1
  21. package/dist/types/current/xmlns/mpeg/dash/schema/mpd/2011.d.ts +79 -1
  22. package/dist/types/current/xmlns/mpeg/dash/schema/mpd/2011.d.ts.map +1 -1
  23. package/dist/types/current/xmlns/scte/35/2016.d.ts +73 -0
  24. package/dist/types/current/xmlns/scte/35/2016.d.ts.map +1 -0
  25. package/dist/types/current/xmlns/scte/35/2016.js +13 -0
  26. package/dist/types/ts3.7/index.d.ts +2 -0
  27. package/dist/types/ts3.7/manifest/dashManifestXmlRules.d.ts +5 -0
  28. package/dist/types/ts3.7/manifest/dashParser.d.ts +368 -1
  29. package/dist/types/ts3.7/manifest/ext/events/scte35XmlRules.d.ts +33 -0
  30. package/dist/types/ts3.7/xmlns/mpeg/dash/schema/mpd/2011.d.ts +79 -1
  31. package/dist/types/ts3.7/xmlns/scte/35/2016.d.ts +73 -0
  32. package/dist/types/ts4.1/index.d.ts +2 -0
  33. package/dist/types/ts4.1/manifest/dashManifestXmlRules.d.ts +5 -0
  34. package/dist/types/ts4.1/manifest/dashParser.d.ts +368 -1
  35. package/dist/types/ts4.1/manifest/ext/events/scte35XmlRules.d.ts +33 -0
  36. package/dist/types/ts4.1/xmlns/mpeg/dash/schema/mpd/2011.d.ts +79 -1
  37. package/dist/types/ts4.1/xmlns/scte/35/2016.d.ts +73 -0
  38. package/dist/types/ts4.7/index.d.ts +2 -0
  39. package/dist/types/ts4.7/manifest/dashManifestXmlRules.d.ts +5 -0
  40. package/dist/types/ts4.7/manifest/dashParser.d.ts +368 -1
  41. package/dist/types/ts4.7/manifest/ext/events/scte35XmlRules.d.ts +33 -0
  42. package/dist/types/ts4.7/xmlns/mpeg/dash/schema/mpd/2011.d.ts +79 -1
  43. package/dist/types/ts4.7/xmlns/scte/35/2016.d.ts +73 -0
  44. package/dist/unit/types/current/tsconfig.tsbuildinfo +1 -1
  45. package/package.json +6 -6
package/dist/index.cjs CHANGED
@@ -40,8 +40,11 @@ __export(index_exports, {
40
40
  CENC_NAMESPACE_URI: () => CENC_NAMESPACE_URI,
41
41
  ContentProtectionScheme: () => ContentProtectionScheme,
42
42
  PLAY_READY_NAMESPACE_URI: () => PLAY_READY_NAMESPACE_URI,
43
+ SCTE35_2016_NAMESPACE_URI: () => SCTE35_2016_NAMESPACE_URI,
44
+ XLINK_NAMESPACE_URI: () => XLINK_NAMESPACE_URI,
43
45
  cencXmlRules: () => cencXmlRules,
44
46
  createDashProtectionXmlRules: () => createDashProtectionXmlRules,
47
+ createDashScte35EventXmlRules: () => createDashScte35EventXmlRules,
45
48
  dashDrmRules: () => dashDrmRules,
46
49
  dashManifestXmlRules: () => dashManifestXmlRules,
47
50
  dashNamespaceUri: () => dashNamespaceUri,
@@ -59,6 +62,7 @@ __export(index_exports, {
59
62
  parseSwitchingTypeType: () => parseSwitchingTypeType,
60
63
  parseVideoScan: () => parseVideoScan,
61
64
  playreadyXmlRules: () => playreadyXmlRules,
65
+ scte35EventXmlRules: () => scte35EventXmlRules,
62
66
  stringifyByteRange: () => stringifyByteRange,
63
67
  stringifyDashManifest: () => stringifyDashManifest,
64
68
  stringifyDuration: () => stringifyDuration,
@@ -163,10 +167,13 @@ function stringifyFrameRate(value) {
163
167
 
164
168
  // src/manifest/dashManifestXmlRules.ts
165
169
  var dashNamespaceUri = "urn:mpeg:dash:schema:mpd:2011";
170
+ var XLINK_NAMESPACE_URI = "http://www.w3.org/1999/xlink";
166
171
  function dashManifestXmlRules() {
167
172
  const attrActuateType = (0, import_vinyl_xml.attr)(import_vinyl_xml.assertActuateEnum, import_vinyl_util4.stringify, {
168
- default: "onRequest"
173
+ default: "onRequest",
174
+ namespaceUri: XLINK_NAMESPACE_URI
169
175
  });
176
+ const attrHref = (0, import_vinyl_xml.attrString)({ namespaceUri: XLINK_NAMESPACE_URI });
170
177
  const descriptorType = {
171
178
  id: import_vinyl_xml.attrString,
172
179
  schemeIdUri: (0, import_vinyl_xml.attrString)({ required: true }),
@@ -227,7 +234,7 @@ function dashManifestXmlRules() {
227
234
  };
228
235
  const segmentListType = __spreadProps(__spreadValues({}, multipleSegmentBaseType), {
229
236
  actuate: attrActuateType,
230
- href: import_vinyl_xml.attrString,
237
+ href: attrHref,
231
238
  SegmentURL: (0, import_vinyl_xml.elements)(segmentURLType)
232
239
  });
233
240
  const segmentTemplateType = __spreadProps(__spreadValues({}, multipleSegmentBaseType), {
@@ -240,19 +247,32 @@ function dashManifestXmlRules() {
240
247
  contains: (0, import_vinyl_xml.attr)(parseIntVector, stringifyIntVector, { required: true }),
241
248
  id: import_vinyl_xml.attrString
242
249
  };
250
+ const alternativePresentationType = {
251
+ uri: import_vinyl_xml.attrString,
252
+ maxDuration: import_vinyl_xml.attrInt,
253
+ earliestResolutionTimeOffset: import_vinyl_xml.attrInt,
254
+ returnOffset: import_vinyl_xml.attrInt,
255
+ clip: import_vinyl_xml.attrBoolean,
256
+ startWithOffset: import_vinyl_xml.attrBoolean
257
+ };
243
258
  const eventType = {
244
259
  duration: import_vinyl_xml.attrInt,
245
260
  id: import_vinyl_xml.attrInt,
246
261
  messageData: import_vinyl_xml.attrString,
247
- presentationTime: (0, import_vinyl_xml.attrInt)({ default: 0 })
262
+ presentationTime: (0, import_vinyl_xml.attrInt)({ default: 0 }),
263
+ contentEncoding: import_vinyl_xml.attrString,
264
+ _content: import_vinyl_xml.charactersString,
265
+ InsertPresentation: (0, import_vinyl_xml.element)(alternativePresentationType),
266
+ ReplacePresentation: (0, import_vinyl_xml.element)(alternativePresentationType)
248
267
  };
249
268
  const eventStreamType = {
250
269
  Event: (0, import_vinyl_xml.elements)(eventType),
251
270
  actuate: attrActuateType,
252
- href: import_vinyl_xml.attrString,
271
+ href: attrHref,
253
272
  messageData: import_vinyl_xml.attrString,
254
273
  schemeIdUri: (0, import_vinyl_xml.attrString)({ required: true }),
255
274
  timescale: import_vinyl_xml.attrInt,
275
+ presentationTimeOffset: import_vinyl_xml.attrInt,
256
276
  value: import_vinyl_xml.attrString
257
277
  };
258
278
  const switchingType = {
@@ -316,7 +336,7 @@ function dashManifestXmlRules() {
316
336
  bitstreamSwitching: import_vinyl_xml.attrBoolean,
317
337
  contentType: import_vinyl_xml.attrString,
318
338
  group: import_vinyl_xml.attrInt,
319
- href: import_vinyl_xml.attrString,
339
+ href: attrHref,
320
340
  id: import_vinyl_xml.attrInt,
321
341
  lang: import_vinyl_xml.attrString,
322
342
  maxBandwidth: import_vinyl_xml.attrInt,
@@ -348,6 +368,10 @@ function dashManifestXmlRules() {
348
368
  Range: (0, import_vinyl_xml.elements)(rangeType),
349
369
  Reporting: (0, import_vinyl_xml.elements)(descriptorType, { minOccurs: 1 })
350
370
  };
371
+ const importedMpdType = {
372
+ earliestResolutionTimeOffset: import_vinyl_xml.attrFloat,
373
+ _content: import_vinyl_xml.charactersString
374
+ };
351
375
  const periodType = {
352
376
  BaseURL: (0, import_vinyl_xml.elements)(baseURLType),
353
377
  SegmentBase: (0, import_vinyl_xml.element)(segmentBaseType),
@@ -358,10 +382,11 @@ function dashManifestXmlRules() {
358
382
  AdaptationSet: (0, import_vinyl_xml.elements)(adaptationSetType),
359
383
  Subset: (0, import_vinyl_xml.elements)(subsetType),
360
384
  SupplementalProperty: (0, import_vinyl_xml.elements)(descriptorType),
385
+ ImportedMPD: (0, import_vinyl_xml.element)(importedMpdType),
361
386
  actuate: attrActuateType,
362
387
  bitstreamSwitching: (0, import_vinyl_xml.attrBoolean)({ default: false }),
363
388
  duration: (0, import_vinyl_xml.attr)(parseDuration, stringifyDuration),
364
- href: import_vinyl_xml.attrString,
389
+ href: attrHref,
365
390
  id: import_vinyl_xml.attrString,
366
391
  start: (0, import_vinyl_xml.attr)(parseDuration, stringifyDuration)
367
392
  };
@@ -449,7 +474,8 @@ function stringifyIntVector(value) {
449
474
  }
450
475
  var presentationTypeValidator = /* @__PURE__ */ (0, import_vinyl_validation.isOneOf)(
451
476
  "static",
452
- "dynamic"
477
+ "dynamic",
478
+ "list"
453
479
  );
454
480
  function parsePresentationTypeType(str) {
455
481
  presentationTypeValidator.assert(str, import_vinyl_util4.ErrorOrigin.PARSING);
@@ -468,7 +494,7 @@ function parseConditionalUint(str) {
468
494
  }
469
495
 
470
496
  // src/manifest/dashParser.ts
471
- var import_vinyl_xml5 = require("@amazon/vinyl-xml");
497
+ var import_vinyl_xml6 = require("@amazon/vinyl-xml");
472
498
 
473
499
  // src/manifest/ext/drm/cencXmlRules.ts
474
500
  var import_vinyl_xml2 = require("@amazon/vinyl-xml");
@@ -538,21 +564,105 @@ var playreadyXmlRules = {
538
564
  )
539
565
  };
540
566
 
567
+ // src/manifest/ext/events/scte35XmlRules.ts
568
+ var import_vinyl_xml5 = require("@amazon/vinyl-xml");
569
+
570
+ // src/xmlns/scte/35/2016.ts
571
+ var SCTE35_2016_NAMESPACE_URI = "http://www.scte.org/schemas/35/2016";
572
+
573
+ // src/manifest/ext/events/scte35XmlRules.ts
574
+ var options = { namespaceUri: SCTE35_2016_NAMESPACE_URI };
575
+ var spliceTimeType = {
576
+ ptsTime: import_vinyl_xml5.attrInt
577
+ };
578
+ var segmentationUpidType = {
579
+ segmentationUpidType: import_vinyl_xml5.attrInt,
580
+ segmentationUpidFormat: import_vinyl_xml5.attrString,
581
+ _content: import_vinyl_xml5.charactersString
582
+ };
583
+ var segmentationDescriptorType = {
584
+ segmentationEventId: import_vinyl_xml5.attrInt,
585
+ segmentationEventCancelIndicator: import_vinyl_xml5.attrBoolean,
586
+ segmentationDuration: import_vinyl_xml5.attrInt,
587
+ segmentationTypeId: import_vinyl_xml5.attrInt,
588
+ segmentNum: import_vinyl_xml5.attrInt,
589
+ segmentsExpected: import_vinyl_xml5.attrInt,
590
+ SegmentationUpid: /* @__PURE__ */ (0, import_vinyl_xml5.elements)(segmentationUpidType, options)
591
+ };
592
+ var programType = {
593
+ SpliceTime: /* @__PURE__ */ (0, import_vinyl_xml5.element)(spliceTimeType, options)
594
+ };
595
+ var breakDurationType = {
596
+ autoReturn: import_vinyl_xml5.attrBoolean,
597
+ duration: import_vinyl_xml5.attrInt
598
+ };
599
+ var spliceInsertType = {
600
+ spliceEventId: import_vinyl_xml5.attrInt,
601
+ spliceEventCancelIndicator: import_vinyl_xml5.attrBoolean,
602
+ outOfNetworkIndicator: import_vinyl_xml5.attrBoolean,
603
+ spliceImmediateFlag: import_vinyl_xml5.attrBoolean,
604
+ uniqueProgramId: import_vinyl_xml5.attrInt,
605
+ availNum: import_vinyl_xml5.attrInt,
606
+ availsExpected: import_vinyl_xml5.attrInt,
607
+ Program: /* @__PURE__ */ (0, import_vinyl_xml5.element)(programType, options),
608
+ BreakDuration: /* @__PURE__ */ (0, import_vinyl_xml5.element)(breakDurationType, options)
609
+ };
610
+ var timeSignalType = {
611
+ SpliceTime: /* @__PURE__ */ (0, import_vinyl_xml5.element)(spliceTimeType, options)
612
+ };
613
+ var spliceNullType = {};
614
+ var spliceInfoSectionType = {
615
+ ptsAdjustment: import_vinyl_xml5.attrInt,
616
+ tier: import_vinyl_xml5.attrInt,
617
+ SpliceNull: /* @__PURE__ */ (0, import_vinyl_xml5.element)(spliceNullType, options),
618
+ SpliceInsert: /* @__PURE__ */ (0, import_vinyl_xml5.element)(spliceInsertType, options),
619
+ TimeSignal: /* @__PURE__ */ (0, import_vinyl_xml5.element)(timeSignalType, options),
620
+ SegmentationDescriptor: /* @__PURE__ */ (0, import_vinyl_xml5.elements)(segmentationDescriptorType, options)
621
+ };
622
+ var binaryType = {
623
+ _content: import_vinyl_xml5.charactersString
624
+ };
625
+ var signalType = {
626
+ Binary: /* @__PURE__ */ (0, import_vinyl_xml5.element)(binaryType, options)
627
+ };
628
+ var scte35EventXmlRules = {
629
+ Signal: /* @__PURE__ */ (0, import_vinyl_xml5.element)(signalType, options),
630
+ SpliceInfoSection: /* @__PURE__ */ (0, import_vinyl_xml5.element)(spliceInfoSectionType, options)
631
+ };
632
+ function createDashScte35EventXmlRules() {
633
+ return {
634
+ MPD: (0, import_vinyl_xml5.element)(
635
+ {
636
+ Period: (0, import_vinyl_xml5.elements)(
637
+ {
638
+ EventStream: (0, import_vinyl_xml5.elements)({
639
+ Event: (0, import_vinyl_xml5.elements)(scte35EventXmlRules)
640
+ })
641
+ },
642
+ { minOccurs: 1 }
643
+ )
644
+ },
645
+ { required: true, namespaceUri: dashNamespaceUri }
646
+ )
647
+ };
648
+ }
649
+
541
650
  // src/manifest/dashParser.ts
542
- var dashDrmRules = /* @__PURE__ */ (0, import_vinyl_xml5.mergeXmlRules)(
651
+ var dashDrmRules = /* @__PURE__ */ (0, import_vinyl_xml6.mergeXmlRules)(
543
652
  /* @__PURE__ */ dashManifestXmlRules(),
544
653
  /* @__PURE__ */ createDashProtectionXmlRules(cencXmlRules),
545
- /* @__PURE__ */ createDashProtectionXmlRules(playreadyXmlRules)
654
+ /* @__PURE__ */ createDashProtectionXmlRules(playreadyXmlRules),
655
+ /* @__PURE__ */ createDashScte35EventXmlRules()
546
656
  );
547
- var dashDrmRulesMapped = /* @__PURE__ */ (0, import_vinyl_xml5.mapXmlRules)(dashDrmRules);
657
+ var dashDrmRulesMapped = /* @__PURE__ */ (0, import_vinyl_xml6.mapXmlRules)(dashDrmRules);
548
658
  function dashManifestHandler() {
549
- return new import_vinyl_xml5.ParseXmlHandlerImpl(dashDrmRulesMapped);
659
+ return new import_vinyl_xml6.ParseXmlHandlerImpl(dashDrmRulesMapped);
550
660
  }
551
661
  function parseDashManifest(manifest) {
552
- return (0, import_vinyl_xml5.parseXml)(manifest, dashManifestHandler());
662
+ return (0, import_vinyl_xml6.parseXml)(manifest, dashManifestHandler());
553
663
  }
554
664
  function stringifyDashManifest(manifest) {
555
- return (0, import_vinyl_xml5.stringifyXml)(manifest, dashDrmRulesMapped);
665
+ return (0, import_vinyl_xml6.stringifyXml)(manifest, dashDrmRulesMapped);
556
666
  }
557
667
 
558
668
  // src/manifest/ext/drm/ContentProtectionScheme.ts
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../src/index.ts", "../src/duration/duration.ts", "../src/error/parsingError.ts", "../src/manifest/dashManifestXmlRules.ts", "../src/media/byteRange.ts", "../src/media/ratio.ts", "../src/media/frameRate.ts", "../src/manifest/dashParser.ts", "../src/manifest/ext/drm/cencXmlRules.ts", "../src/xmlns/mpeg/cenc/2013.ts", "../src/manifest/ext/drm/contentProtection.ts", "../src/manifest/ext/drm/playreadyXmlRules.ts", "../src/xmlns/microsoft/playready.ts", "../src/manifest/ext/drm/ContentProtectionScheme.ts"],
4
- "sourcesContent": ["/** Auto-generated from build scripts */\nexport * from './duration/duration'\nexport * from './error/parsingError'\nexport * from './manifest/dashManifestXmlRules'\nexport * from './manifest/dashParser'\nexport * from './manifest/ext/drm/cencXmlRules'\nexport * from './manifest/ext/drm/contentProtection'\nexport * from './manifest/ext/drm/ContentProtectionScheme'\nexport * from './manifest/ext/drm/playreadyXmlRules'\nexport * from './media/byteRange'\nexport * from './media/frameRate'\nexport * from './media/ratio'\nexport * from './xmlns/microsoft/playready'\nexport * from './xmlns/mpeg/cenc/2013'\nexport * from './xmlns/mpeg/dash/schema/mpd/2011'\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n ErrorOrigin,\n roundToNearest,\n ValidationError,\n} from '@amazon/vinyl-util'\n\n// ESBuild (https://github.com/evanw/esbuild/issues/3988) considers multiplication and division\n// to have a side effect and will inhibit tree shaking.\n// E.g. H = 60 * 60 will not be removed when not referenced.\nconst I = 60\nconst H = 3600\nconst D = 86400\nconst M = 2592000\nconst Y = 31536000\n\n/**\n * A duration, in seconds. (This may be negative)\n */\nexport type Duration = number\n\n/**\n * https://www.w3.org/TR/xmlschema-2/#duration\n */\nconst iso8601Duration =\n /^(-?)P?(\\d+(?:\\.\\d*)?Y)?(\\d+(?:\\.\\d*)?M)?(\\d+(?:\\.\\d*)?D)?T?(\\d+(?:\\.\\d*)?H)?(\\d+(?:\\.\\d*)?M)?(\\d+(?:\\.\\d*)?S?)?$/i\n\n/**\n * Parses an ISO 8601 duration into seconds.\n * The accepted format is P(n)Y(n)M(n)DT(n)H(n)M(n)S\n *\n * All units shall have a fixed size.\n *\n * P - Period designator, precedes all durations.\n * 1Y (Year) = 365 * 24 * 60 * 60 Seconds\n * 1M (Month) = 30 * 24 * 60 * 60 Seconds\n * 1D (Day) = 24 * 60 * 60 Seconds\n *\n * T - Time designator, precedes all time components.\n * 1H (Hour) = 60 * 60 Seconds\n * 1M (Minute) = 60 Seconds\n * 1S (Second)\n *\n *\n * @param value\n * @return Returns the duration in seconds or throws an {@link ValidationError}\n * if not properly formatted.\n * @see https://www.w3.org/TR/xmlschema-2/#duration\n */\nexport function parseDuration(value: string): Duration {\n const match = iso8601Duration.exec(value)\n if (match == null)\n throw new ValidationError(\n `Unexpected duration: '${value}', should be in iso 8601 format`,\n ErrorOrigin.PARSING\n )\n\n const sign = match[1] === '-' ? -1 : 1\n return (\n sign *\n (parseFloat(match[2] || '0') * Y +\n parseFloat(match[3] || '0') * M +\n parseFloat(match[4] || '0') * D +\n parseFloat(match[5] || '0') * H +\n parseFloat(match[6] || '0') * I +\n parseFloat(match[7] || '0'))\n )\n}\n\n/**\n * Returns the iso 8601 string representation of a duration value.\n *\n * @param value A duration value, in seconds.\n */\nexport function stringifyDuration(value: Duration): string {\n const sign = value < 0 ? '-' : ''\n let abs = Math.abs(value)\n\n const years = Math.floor(abs / Y)\n abs -= years * Y\n const months = Math.floor(abs / M)\n const days = Math.floor((abs % M) / D)\n const hours = Math.floor((abs % D) / H)\n const minutes = Math.floor((abs % H) / I)\n const seconds = abs % I\n\n let date = ''\n if (years > 0) date += `${years}Y`\n if (months > 0) date += `${months}M`\n if (days > 0) date += `${days}D`\n let time = ''\n if (hours > 0) time += `${hours}H`\n if (minutes > 0) time += `${minutes}M`\n if (seconds > 0) time += `${roundToNearest(seconds, 0.001)}S`\n // A duration must carry at least one component, so a zero duration is\n // written as `PT0S`. The time designator is only written when a time\n // component follows it; a trailing `T` is not a valid duration.\n if (!date && !time) time = '0S'\n return `${sign}P${date}${time && `T${time}`}`\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { ErrorOrigin, ValidationError } from '@amazon/vinyl-util'\n\nexport function throwParsingError(message: string): never {\n throw new ValidationError(message, ErrorOrigin.PARSING)\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Parser definitions for a dash manifest.\n * Attribute order does not matter, element order matters for writing.\n *\n * @module\n */\n\nimport type { actuateType, UriType } from '@amazon/vinyl-xml'\nimport {\n assertActuateEnum,\n attr,\n attrBoolean,\n attrDateTime,\n attrFloat,\n attrInt,\n attrString,\n charactersString,\n element,\n elements,\n type XmlRules,\n} from '@amazon/vinyl-xml'\nimport { ErrorOrigin, stringify } from '@amazon/vinyl-util'\nimport { isOneOf, number, type Validator } from '@amazon/vinyl-validation'\nimport { parseDuration, stringifyDuration } from '../duration/duration'\nimport { parseByteRange, stringifyByteRange } from '../media/byteRange'\nimport { parseRatio, stringifyRatio } from '../media/ratio'\nimport { parseFrameRate, stringifyFrameRate } from '../media/frameRate'\nimport type {\n AdaptationSetType,\n BaseURLType,\n ConditionalUintType,\n ContentComponentType,\n DashManifest,\n DescriptorType,\n EventStreamType,\n EventType,\n MetricsType,\n MPDtype,\n MultipleSegmentBaseType,\n PeriodType,\n PresentationType,\n ProgramInformationType,\n RangeType,\n RepresentationBaseType,\n RepresentationType,\n SegmentBaseType,\n SegmentListType,\n SegmentTemplateType,\n SegmentTimelineType,\n SegmentTimelineTypeSType,\n SegmentURLType,\n SubRepresentationType,\n SubsetType,\n SwitchingType,\n SwitchingTypeType,\n URLType,\n VideoScanType,\n} from '../xmlns/mpeg/dash/schema/mpd/2011'\n\nexport const dashNamespaceUri = 'urn:mpeg:dash:schema:mpd:2011'\n\nexport function dashManifestXmlRules(): XmlRules<DashManifest> {\n const attrActuateType = attr<actuateType>(assertActuateEnum, stringify, {\n default: 'onRequest',\n } as const)\n\n const descriptorType: XmlRules<DescriptorType> = {\n id: attrString,\n schemeIdUri: attrString({ required: true }),\n value: attrString,\n } as const\n\n const baseURLType: XmlRules<BaseURLType> = {\n availabilityTimeComplete: attrBoolean,\n availabilityTimeOffset: attrFloat,\n byteRange: attrString,\n serviceLocation: attrString,\n _content: charactersString,\n } as const\n\n const contentComponentType: XmlRules<ContentComponentType> = {\n contentType: attrString,\n id: attrInt,\n lang: attrString,\n par: attr(parseRatio, stringifyRatio),\n Accessibility: elements(descriptorType),\n Rating: elements(descriptorType),\n Role: elements(descriptorType),\n Viewpoint: elements(descriptorType),\n } as const\n\n const urlType: XmlRules<URLType> = {\n range: attr(parseByteRange, stringifyByteRange),\n sourceURL: attrString,\n } as const\n\n const uriType: XmlRules<UriType> = { _content: charactersString } as const\n\n const segmentBaseType: XmlRules<SegmentBaseType> = {\n Initialization: element(urlType),\n RepresentationIndex: element(urlType),\n availabilityTimeComplete: attrBoolean,\n availabilityTimeOffset: attrInt,\n indexRange: attr(parseByteRange, stringifyByteRange),\n indexRangeExact: attrBoolean({ default: false }),\n presentationTimeOffset: attrFloat,\n timescale: attrInt,\n } as const\n\n const segmentTimelineTypeSType: XmlRules<SegmentTimelineTypeSType> = {\n d: attrInt({ required: true }),\n n: attrInt,\n r: attrInt({ default: 0 }),\n t: attrInt,\n } as const\n\n const segmentTimelineType: XmlRules<SegmentTimelineType> = {\n S: elements(segmentTimelineTypeSType),\n } as const\n\n const multipleSegmentBaseType: XmlRules<MultipleSegmentBaseType> = {\n ...segmentBaseType,\n SegmentTimeline: element(segmentTimelineType),\n BitstreamSwitching: element(urlType),\n duration: attrInt,\n startNumber: attrInt,\n } as const\n\n const segmentURLType: XmlRules<SegmentURLType> = {\n index: attrString,\n indexRange: attr(parseByteRange, stringifyByteRange),\n media: attrString,\n mediaRange: attr(parseByteRange, stringifyByteRange),\n } as const\n\n const segmentListType: XmlRules<SegmentListType> = {\n ...multipleSegmentBaseType,\n actuate: attrActuateType,\n href: attrString,\n SegmentURL: elements(segmentURLType),\n } as const\n\n const segmentTemplateType: XmlRules<SegmentTemplateType> = {\n ...multipleSegmentBaseType,\n bitstreamSwitching: attrString,\n index: attrString,\n initialization: attrString,\n media: attrString,\n } as const\n\n const subsetType: XmlRules<SubsetType> = {\n contains: attr(parseIntVector, stringifyIntVector, { required: true }),\n id: attrString,\n } as const\n\n const eventType: XmlRules<EventType> = {\n duration: attrInt,\n id: attrInt,\n messageData: attrString,\n presentationTime: attrInt({ default: 0 }),\n } as const\n\n const eventStreamType: XmlRules<EventStreamType> = {\n Event: elements(eventType),\n actuate: attrActuateType,\n href: attrString,\n messageData: attrString,\n schemeIdUri: attrString({ required: true }),\n timescale: attrInt,\n value: attrString,\n } as const\n\n const switchingType: XmlRules<SwitchingType> = {\n interval: attrInt({ required: true }),\n type: attr(parseSwitchingTypeType, stringify),\n } as const\n\n const representationBaseType: XmlRules<RepresentationBaseType> = {\n FramePacking: elements(descriptorType),\n AudioChannelConfiguration: elements(descriptorType),\n ContentProtection: elements(descriptorType),\n EssentialProperty: elements(descriptorType),\n SupplementalProperty: elements(descriptorType),\n InbandEventStream: elements(eventStreamType),\n Switching: elements(switchingType),\n audioSamplingRate: attr(parseIntVector, stringifyIntVector),\n codecs: attrString,\n codingDependency: attrBoolean,\n frameRate: attr(parseFrameRate, stringifyFrameRate),\n height: attrInt,\n maximumSAPPeriod: attrInt,\n maxPlayoutRate: attrInt,\n mimeType: attrString,\n profiles: attr(parseProfiles, stringifyProfiles),\n sar: attr(parseRatio, stringifyRatio),\n scanType: attr(parseVideoScan, stringify),\n segmentProfiles: attrString,\n startWithSAP: attr(parseSap, stringify),\n width: attrInt,\n } as const\n\n const subRepresentationType: XmlRules<SubRepresentationType> = {\n ...representationBaseType,\n bandwidth: attrInt,\n contentComponent: attr(parseStringVector, stringifyStringVector),\n dependencyLevel: attr(parseIntVector, stringifyIntVector),\n level: attrInt,\n } as const\n\n const representationType: XmlRules<RepresentationType> = {\n ...representationBaseType,\n bandwidth: attrInt({ required: true }),\n bitrate: attrInt,\n dependencyId: attr(parseStringVector, stringifyStringVector),\n id: attrString({ required: true }),\n mediaStreamStructureId: attr(parseStringVector, stringifyStringVector),\n qualityRanking: attrInt,\n BaseURL: elements(baseURLType),\n SegmentBase: element(segmentBaseType),\n SegmentList: element(segmentListType),\n SegmentTemplate: element(segmentTemplateType),\n SubRepresentation: elements(subRepresentationType),\n } as const\n\n const adaptationSetType: XmlRules<AdaptationSetType> = {\n ...representationBaseType,\n Accessibility: elements(descriptorType),\n Role: elements(descriptorType),\n Rating: elements(descriptorType),\n Viewpoint: elements(descriptorType),\n ContentComponent: elements(contentComponentType),\n BaseURL: elements(baseURLType),\n SegmentBase: element(segmentBaseType),\n SegmentList: element(segmentListType),\n SegmentTemplate: element(segmentTemplateType),\n Representation: elements(representationType),\n actuate: attrActuateType,\n bitstreamSwitching: attrBoolean,\n contentType: attrString,\n group: attrInt,\n href: attrString,\n id: attrInt,\n lang: attrString,\n maxBandwidth: attrInt,\n maxFrameRate: attr(parseFrameRate, stringifyFrameRate),\n maxHeight: attrInt,\n maxWidth: attrInt,\n minBandwidth: attrInt,\n minFrameRate: attr(parseFrameRate, stringifyFrameRate),\n minHeight: attrInt,\n minWidth: attrInt,\n par: attr(parseRatio, stringifyRatio),\n segmentAlignment: attr(parseConditionalUint, stringify, {\n default: false,\n }),\n selectionPriority: attrInt({\n default: 1,\n }),\n subsegmentAlignment: attr(parseConditionalUint, stringify, {\n default: false,\n }),\n subsegmentStartsWithSAP: attr(parseSap, stringify, { default: 0 }),\n } as const\n\n const rangeType: XmlRules<RangeType> = {\n duration: attr(parseDuration, stringifyDuration),\n starttime: attr(parseDuration, stringifyDuration),\n } as const\n\n const metricsType: XmlRules<MetricsType> = {\n metrics: attrString({ required: true }),\n Range: elements(rangeType),\n Reporting: elements(descriptorType, { minOccurs: 1 }),\n } as const\n\n const periodType: XmlRules<PeriodType> = {\n BaseURL: elements(baseURLType),\n SegmentBase: element(segmentBaseType),\n SegmentList: element(segmentListType),\n SegmentTemplate: element(segmentTemplateType),\n AssetIdentifier: element(descriptorType),\n EventStream: elements(eventStreamType),\n AdaptationSet: elements(adaptationSetType),\n Subset: elements(subsetType),\n SupplementalProperty: elements(descriptorType),\n actuate: attrActuateType,\n bitstreamSwitching: attrBoolean({ default: false }),\n duration: attr(parseDuration, stringifyDuration),\n href: attrString,\n id: attrString,\n start: attr(parseDuration, stringifyDuration),\n } as const\n\n const programInformationType: XmlRules<ProgramInformationType> = {\n lang: attrString,\n moreInformationURL: attrString,\n Copyright: attrString,\n Source: attrString,\n Title: attrString,\n } as const\n\n const mpdType: XmlRules<MPDtype> = {\n ProgramInformation: elements(programInformationType),\n BaseURL: elements(baseURLType),\n Location: elements(uriType),\n Period: elements(periodType, { minOccurs: 1 }),\n Metrics: elements(metricsType),\n EssentialProperty: elements(descriptorType),\n SupplementalProperty: elements(descriptorType),\n UTCTiming: elements(descriptorType),\n availabilityEndTime: attrDateTime,\n availabilityStartTime: attrDateTime,\n id: attrString,\n maxSegmentDuration: attr(parseDuration, stringifyDuration),\n maxSubsegmentDuration: attr(parseDuration, stringifyDuration),\n mediaPresentationDuration: attr(parseDuration, stringifyDuration),\n minBufferTime: attr(parseDuration, stringifyDuration, {\n required: true,\n }),\n minimumUpdatePeriod: attr(parseDuration, stringifyDuration),\n profiles: attr(parseProfiles, stringifyProfiles, { required: true }),\n publishTime: attrDateTime,\n suggestedPresentationDelay: attr(parseDuration, stringifyDuration),\n timeShiftBufferDepth: attr(parseDuration, stringifyDuration),\n type: attr(parsePresentationTypeType, stringify, {\n default: 'static',\n } as const),\n } as const\n\n return {\n MPD: element(mpdType, {\n required: true,\n namespaceUri: dashNamespaceUri,\n }),\n } as const\n}\n\n/**\n * Parses a comma delimited list of profiles.\n * Profile values are not whitespace trimmed.\n *\n * @param str\n */\nexport function parseProfiles(str: string): readonly string[] {\n return str.split(',')\n}\n\n/**\n * Returns the string representation of a {@link FrameRate} value.\n *\n * @param value\n */\nexport function stringifyProfiles(value: readonly string[]): string {\n return value.join(',')\n}\n\nconst videoScanTypeValidator: Validator<VideoScanType> = /* @__PURE__ */ isOneOf(\n 'progressive',\n 'interlaced',\n 'unknown'\n)\n\n/**\n * @private\n */\nexport function parseVideoScan(str: string): VideoScanType {\n videoScanTypeValidator.assert(str, ErrorOrigin.PARSING)\n return str\n}\n\nconst switchingTypeTypeValidator: Validator<SwitchingTypeType> = /* @__PURE__ */ isOneOf(\n 'media',\n 'bitstream'\n)\n\n/**\n * @private\n */\nexport function parseSwitchingTypeType(str: string): SwitchingTypeType {\n switchingTypeTypeValidator.assert(str, ErrorOrigin.PARSING)\n return str\n}\n\nconst validateSap: Validator<number> = /* @__PURE__ */ /* @__PURE__ */ number().within(0, 6)\n\n/**\n * @private\n */\nexport function parseSap(str: string): number {\n const number = parseInt(str)\n validateSap.assert(number, ErrorOrigin.PARSING)\n return number\n}\n\n/**\n * Splits a string by whitespace.\n *\n * @private\n */\nexport function parseStringVector(str: string): readonly string[] {\n return str.split(/\\s+/)\n}\n\n/**\n * Returns the string representation of a string vector value.\n *\n * @param value\n */\nexport function stringifyStringVector(value: readonly string[]): string {\n return value.join(' ')\n}\n\n/**\n * Splits a string by whitespace and parses as int.\n *\n * @private\n */\nexport function parseIntVector(str: string): readonly number[] {\n return str.split(/\\s+/).map((subStr) => parseInt(subStr))\n}\n\n/**\n * Returns the string representation of an int vector value.\n *\n * @param value\n */\nexport function stringifyIntVector(value: readonly number[]): string {\n return value.join(' ')\n}\n\nconst presentationTypeValidator: Validator<PresentationType> = /* @__PURE__ */ isOneOf(\n 'static',\n 'dynamic'\n)\n\n/**\n * Asserts that the given string is one of the {@link PresentationType} enumerated values.\n * @param str\n */\nexport function parsePresentationTypeType(str: string): PresentationType {\n presentationTypeValidator.assert(str, ErrorOrigin.PARSING)\n return str\n}\n\n/**\n * Parses a string into true, false, or a number.\n *\n * @private\n */\nexport function parseConditionalUint(str: string): ConditionalUintType {\n const lower = str.toLowerCase()\n switch (lower) {\n case 'true':\n return true\n case 'false':\n return false\n default:\n return parseInt(str)\n }\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { parseIntSafe } from '@amazon/vinyl-util'\nimport { throwParsingError } from '../error/parsingError'\n\n/**\n * A range of bytes, [from, to (optional, inclusive)].\n */\nexport type ByteRange = readonly [number, number | null]\n\nconst byteRangeExp = /^(-?[0-9]+)-(-?[0-9]*)$/\n\nexport function parseByteRange(str: string): ByteRange {\n const match = str ? byteRangeExp.exec(str) : null\n if (!match) throwParsingError(`invalid byte range: '${str}'`)\n let start = parseInt(match[1])\n // Convert possibly-negative Int32 overflow value to its Uint32 equivalent\n // (reinterpret 32-bit signed integer bits as unsigned)\n if (start < 0) start >>>= 0\n let end = parseIntSafe(match[2])\n if (end != null && end < 0) end = end >>> 0\n return [start, end]\n}\n\n/**\n * Returns the string representation of a {@link ByteRange} value.\n *\n * @param value\n */\nexport function stringifyByteRange(value: ByteRange): string {\n const end = value[1]\n return `${value[0]}-${end == null ? '' : end}`\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { throwParsingError } from '../error/parsingError'\n\n/**\n * A numerator and denominator.\n */\nexport type Ratio = readonly [number, number]\n\n/**\n * The XSD specifies `[0-9]*`, and not `[0-9]+`, which would match `'23:'`\n * For missing dimensions, default to 1.\n */\nconst ratioRegExp = /^([0-9]*):([0-9]*)$/\n\n/**\n * Parses a string representing a ratio into [number, number].\n * The string must satisfy the pattern: `/^([0-9]*):([0-9]*)$/`\n * Examples:\n * ```\n * parseRatio('4:3') // [4, 3]\n * parseRatio('16:9') // [16, 9]\n * parseRatio('2:') // [2, 1]\n * ```\n *\n * @private\n */\nexport function parseRatio(str: string): Ratio {\n const match = str ? ratioRegExp.exec(str) : null\n if (!match) throwParsingError(`invalid ratio format: ${str}`)\n return [parseInt(match[1] || '1'), parseInt(match[2] || '1')]\n}\n\n/**\n * Returns the string representation of a {@link Ratio} value.\n *\n * @param value\n */\nexport function stringifyRatio(value: Ratio): string {\n return `${value[0]}:${value[1]}`\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { throwParsingError } from '../error/parsingError'\n\nexport type FrameRate = readonly [number, number]\n\nconst framerateRegexp = /^(\\d+)(?:\\/(\\d+))?$/\n\n/**\n * Parses a string into a {@link FrameRate}\n *\n * @private\n */\nexport function parseFrameRate(str: string): FrameRate {\n const match = str ? framerateRegexp.exec(str) : null\n if (!match) throwParsingError(`invalid frame rate: '${str}'`)\n return [parseInt(match[1]), parseInt(match[2] || '1')]\n}\n\n/**\n * Returns the string representation of a {@link FrameRate} value.\n *\n * @param value\n */\nexport function stringifyFrameRate(value: FrameRate): string {\n return value[1] === 1 ? value[0].toString() : `${value[0]}/${value[1]}`\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { ReservedXmlRuleKeys } from '@amazon/vinyl-xml'\nimport {\n mapXmlRules,\n type Merged,\n mergeXmlRules,\n parseXml,\n ParseXmlHandlerImpl,\n stringifyXml,\n} from '@amazon/vinyl-xml'\nimport type { PlayreadyContentProtection } from '../xmlns/microsoft/playready'\nimport type { CencContentProtection } from '../xmlns/mpeg/cenc/2013'\nimport type {\n DashManifest,\n DescriptorType,\n} from '../xmlns/mpeg/dash/schema/mpd/2011'\nimport { dashManifestXmlRules } from './dashManifestXmlRules'\nimport { cencXmlRules } from './ext/drm/cencXmlRules'\nimport type { DashProtections } from './ext/drm/contentProtection'\nimport { createDashProtectionXmlRules } from './ext/drm/contentProtection'\nimport { playreadyXmlRules } from './ext/drm/playreadyXmlRules'\nimport type { OptionalDeep } from '@amazon/vinyl-util'\n\n/**\n * Creates a Dash Manifest parser with supported extensions.\n *\n * @module\n */\n\nexport type DashDrmManifest = Merged<\n DashManifest & DashProtections<ContentProtection>\n>\n\nexport interface ContentProtection\n extends DescriptorType, CencContentProtection, PlayreadyContentProtection {}\n\nexport const dashDrmRules = /* @__PURE__ */ mergeXmlRules(\n /* @__PURE__ */ dashManifestXmlRules(),\n /* @__PURE__ */ createDashProtectionXmlRules(cencXmlRules),\n /* @__PURE__ */ createDashProtectionXmlRules(playreadyXmlRules)\n)\n\nconst dashDrmRulesMapped = /* @__PURE__ */ mapXmlRules(dashDrmRules)\n\n/**\n * A Content handler for a dash manifest.\n */\nfunction dashManifestHandler() {\n return new ParseXmlHandlerImpl(dashDrmRulesMapped)\n}\n\n/**\n * Parses a Dash Manifest, according to the mpd:2011 schema.\n * @see https://raw.githubusercontent.com/Dash-Industry-Forum/MPEG-Conformance-and-reference-source/master/conformance/MPDValidator/schemas/DASH-MPD.xsd\n * @param manifest\n */\nexport function parseDashManifest(manifest: string): DashDrmManifest {\n return parseXml(manifest, dashManifestHandler())\n}\n\nexport function stringifyDashManifest(\n manifest: OptionalDeep<DashDrmManifest, ReservedXmlRuleKeys>\n): string {\n return stringifyXml(manifest, dashDrmRulesMapped)\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n parseStringVector,\n stringifyStringVector,\n} from '../../dashManifestXmlRules'\nimport type { XmlRules } from '@amazon/vinyl-xml'\nimport { attr, charactersString, element } from '@amazon/vinyl-xml'\nimport type { CencContentProtection } from '../../../xmlns/mpeg/cenc/2013'\nimport { CENC_NAMESPACE_URI } from '../../../xmlns/mpeg/cenc/2013'\n\n/**\n * A parser for ContentProtection elements using the cenc namespace.\n * @see https://github.com/sannies/rtp2dash/blob/master/src/main/resources/auxxsd/cenc.xsd\n */\nexport const cencXmlRules: XmlRules<CencContentProtection> = {\n default_KID: /* @__PURE__ */ attr(parseStringVector, stringifyStringVector, {\n namespaceUri: CENC_NAMESPACE_URI,\n }),\n pssh: /* @__PURE__ */ element(\n {\n _content: charactersString,\n },\n {\n namespaceUri: CENC_NAMESPACE_URI,\n }\n ),\n} as const\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Base64BinaryType } from '@amazon/vinyl-xml'\n\n/**\n * Cenc content protection xml types.\n *\n * @see https://github.com/sannies/rtp2dash/blob/master/src/main/resources/auxxsd/cenc.xsd\n * @module\n */\n\nexport const CENC_NAMESPACE_URI = 'urn:mpeg:cenc:2013'\n\n/**\n * A 128-bit integer written in canonical UUID notation.\n * Must be in the form:\n * `[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}`\n */\nexport type KeyIdType = string\n\nexport interface CencContentProtection {\n readonly default_KID?: readonly KeyIdType[]\n readonly pssh?: Base64BinaryType\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { element, elements, type XmlRules } from '@amazon/vinyl-xml'\nimport { dashNamespaceUri } from '../../dashManifestXmlRules'\n\n/**\n * ContentProtection extension point for Dash manifests.\n *\n * @module\n */\n\nexport interface WithProtections<T> {\n readonly ContentProtection?: readonly T[]\n}\n\nexport interface RepresentationTypeProtections<T> extends WithProtections<T> {\n readonly SubRepresentation?: readonly WithProtections<T>[]\n}\n\nexport interface AdaptationSetProtections<T> extends WithProtections<T> {\n readonly Representation?: readonly RepresentationTypeProtections<T>[]\n}\n\nexport interface PeriodProtections<T> {\n readonly AdaptationSet?: readonly AdaptationSetProtections<T>[]\n}\n\nexport interface MPDProtections<T> {\n readonly Period: readonly PeriodProtections<T>[]\n}\n\nexport interface DashProtections<T> {\n readonly MPD: MPDProtections<T>\n}\n\n/**\n * Creates a dash extension for content protection parsing rules.\n *\n * @param contentProtectionRules Rules to be used when processing `ContentProtection` elements.\n * @return Returns a rules map that should be merged with the dash manifest rules.\n */\nexport function createDashProtectionXmlRules<T extends object>(\n contentProtectionRules: XmlRules<T>\n): XmlRules<DashProtections<T>> {\n const withProtections: XmlRules<WithProtections<T>> = {\n ContentProtection: elements(contentProtectionRules),\n } as const\n\n return {\n MPD: element<MPDProtections<T>>(\n {\n Period: elements<PeriodProtections<T>>(\n {\n AdaptationSet: elements<AdaptationSetProtections<T>>({\n ...withProtections,\n Representation: elements<\n RepresentationTypeProtections<T>\n >({\n ...withProtections,\n SubRepresentation:\n elements<WithProtections<T>>(\n withProtections\n ),\n }),\n }),\n },\n {\n minOccurs: 1,\n }\n ),\n },\n { required: true, namespaceUri: dashNamespaceUri } as const\n ),\n } as const\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { charactersString, element, type XmlRules } from '@amazon/vinyl-xml'\nimport type { PlayreadyContentProtection } from '../../../xmlns/microsoft/playready'\nimport { PLAY_READY_NAMESPACE_URI } from '../../../xmlns/microsoft/playready'\n\nexport const playreadyXmlRules: XmlRules<PlayreadyContentProtection> = {\n pro: /* @__PURE__ */ element(\n {\n _content: charactersString,\n },\n {\n namespaceUri: PLAY_READY_NAMESPACE_URI,\n }\n ),\n} as const\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Base64BinaryType } from '@amazon/vinyl-xml'\n\n/**\n * Cenc content protection playready.\n *\n * @see https://learn.microsoft.com/en-us/playready/specifications/mpeg-dash-playready#21-dash-contentprotection-descriptor-elements\n * @module\n */\n\nexport const PLAY_READY_NAMESPACE_URI = 'urn:microsoft:playready'\n\nexport interface PlayreadyContentProtection {\n readonly pro?: Base64BinaryType\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport const ContentProtectionScheme = {\n /**\n * CENC protection scheme. (Should not be used to create a key session)\n */\n CENC: 'urn:mpeg:dash:mp4protection:2011',\n\n /**\n * A simple, unencrypted content protection scheme. Not a full DRM solution.\n */\n CLEAR_KEY: 'urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e',\n\n /**\n * Apple's FairPlay.\n */\n FAIR_PLAY: 'urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2',\n\n /**\n * Open-standards community initiative by Marlin Developer Community.\n */\n MARLIN: 'urn:uuid:5e629af5-38da-4063-8977-97ffbd9902d4',\n\n /**\n * Microsoft's PlayReady.\n */\n PLAY_READY: 'urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95',\n\n /**\n * An old, unused PlayReady scheme id.\n */\n PLAY_READY_DEPRECATED: 'urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95',\n\n /**\n * Google's Widevine.\n */\n WIDEVINE: 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed',\n} as const\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACKA,wBAIO;AAKP,IAAM,IAAI;AACV,IAAM,IAAI;AACV,IAAM,IAAI;AACV,IAAM,IAAI;AACV,IAAM,IAAI;AAUV,IAAM,kBACF;AAwBG,SAAS,cAAc,OAAyB;AACnD,QAAM,QAAQ,gBAAgB,KAAK,KAAK;AACxC,MAAI,SAAS;AACT,UAAM,IAAI;AAAA,MACN,yBAAyB,KAAK;AAAA,MAC9B,8BAAY;AAAA,IAChB;AAEJ,QAAM,OAAO,MAAM,CAAC,MAAM,MAAM,KAAK;AACrC,SACI,QACC,WAAW,MAAM,CAAC,KAAK,GAAG,IAAI,IAC3B,WAAW,MAAM,CAAC,KAAK,GAAG,IAAI,IAC9B,WAAW,MAAM,CAAC,KAAK,GAAG,IAAI,IAC9B,WAAW,MAAM,CAAC,KAAK,GAAG,IAAI,IAC9B,WAAW,MAAM,CAAC,KAAK,GAAG,IAAI,IAC9B,WAAW,MAAM,CAAC,KAAK,GAAG;AAEtC;AAOO,SAAS,kBAAkB,OAAyB;AACvD,QAAM,OAAO,QAAQ,IAAI,MAAM;AAC/B,MAAI,MAAM,KAAK,IAAI,KAAK;AAExB,QAAM,QAAQ,KAAK,MAAM,MAAM,CAAC;AAChC,SAAO,QA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B,UAAmC;AACjE,aAAO,4BAAS,UAAU,oBAAoB,CAAC;AACnD;AAEO,SAAS,sBACZ,UACM;AACN,aAAO,gCAAa,UAAU,kBAAkB;AACpD;;;AM/DO,IAAM,0BAA0B;AAAA;AAAA;AAAA;AAAA,EAInC,MAAM;AAAA;AAAA;AAAA;AAAA,EAKN,WAAW;AAAA;AAAA;AAAA;AAAA,EAKX,WAAW;AAAA;AAAA;AAAA;AAAA,EAKX,QAAQ;AAAA;AAAA;AAAA;AAAA,EAKR,YAAY;AAAA;AAAA;AAAA;AAAA,EAKZ,uBAAuB;AAAA;AAAA;AAAA;AAAA,EAKvB,UAAU;AACd;",
6
- "names": ["import_vinyl_util", "import_vinyl_util", "import_vinyl_util", "number", "import_vinyl_xml", "import_vinyl_xml", "import_vinyl_xml", "import_vinyl_xml"]
3
+ "sources": ["../src/index.ts", "../src/duration/duration.ts", "../src/error/parsingError.ts", "../src/manifest/dashManifestXmlRules.ts", "../src/media/byteRange.ts", "../src/media/ratio.ts", "../src/media/frameRate.ts", "../src/manifest/dashParser.ts", "../src/manifest/ext/drm/cencXmlRules.ts", "../src/xmlns/mpeg/cenc/2013.ts", "../src/manifest/ext/drm/contentProtection.ts", "../src/manifest/ext/drm/playreadyXmlRules.ts", "../src/xmlns/microsoft/playready.ts", "../src/manifest/ext/events/scte35XmlRules.ts", "../src/xmlns/scte/35/2016.ts", "../src/manifest/ext/drm/ContentProtectionScheme.ts"],
4
+ "sourcesContent": ["/** Auto-generated from build scripts */\nexport * from './duration/duration'\nexport * from './error/parsingError'\nexport * from './manifest/dashManifestXmlRules'\nexport * from './manifest/dashParser'\nexport * from './manifest/ext/drm/cencXmlRules'\nexport * from './manifest/ext/drm/contentProtection'\nexport * from './manifest/ext/drm/ContentProtectionScheme'\nexport * from './manifest/ext/drm/playreadyXmlRules'\nexport * from './manifest/ext/events/scte35XmlRules'\nexport * from './media/byteRange'\nexport * from './media/frameRate'\nexport * from './media/ratio'\nexport * from './xmlns/microsoft/playready'\nexport * from './xmlns/mpeg/cenc/2013'\nexport * from './xmlns/mpeg/dash/schema/mpd/2011'\nexport * from './xmlns/scte/35/2016'\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n ErrorOrigin,\n roundToNearest,\n ValidationError,\n} from '@amazon/vinyl-util'\n\n// ESBuild (https://github.com/evanw/esbuild/issues/3988) considers multiplication and division\n// to have a side effect and will inhibit tree shaking.\n// E.g. H = 60 * 60 will not be removed when not referenced.\nconst I = 60\nconst H = 3600\nconst D = 86400\nconst M = 2592000\nconst Y = 31536000\n\n/**\n * A duration, in seconds. (This may be negative)\n */\nexport type Duration = number\n\n/**\n * https://www.w3.org/TR/xmlschema-2/#duration\n */\nconst iso8601Duration =\n /^(-?)P?(\\d+(?:\\.\\d*)?Y)?(\\d+(?:\\.\\d*)?M)?(\\d+(?:\\.\\d*)?D)?T?(\\d+(?:\\.\\d*)?H)?(\\d+(?:\\.\\d*)?M)?(\\d+(?:\\.\\d*)?S?)?$/i\n\n/**\n * Parses an ISO 8601 duration into seconds.\n * The accepted format is P(n)Y(n)M(n)DT(n)H(n)M(n)S\n *\n * All units shall have a fixed size.\n *\n * P - Period designator, precedes all durations.\n * 1Y (Year) = 365 * 24 * 60 * 60 Seconds\n * 1M (Month) = 30 * 24 * 60 * 60 Seconds\n * 1D (Day) = 24 * 60 * 60 Seconds\n *\n * T - Time designator, precedes all time components.\n * 1H (Hour) = 60 * 60 Seconds\n * 1M (Minute) = 60 Seconds\n * 1S (Second)\n *\n *\n * @param value\n * @return Returns the duration in seconds or throws an {@link ValidationError}\n * if not properly formatted.\n * @see https://www.w3.org/TR/xmlschema-2/#duration\n */\nexport function parseDuration(value: string): Duration {\n const match = iso8601Duration.exec(value)\n if (match == null)\n throw new ValidationError(\n `Unexpected duration: '${value}', should be in iso 8601 format`,\n ErrorOrigin.PARSING\n )\n\n const sign = match[1] === '-' ? -1 : 1\n return (\n sign *\n (parseFloat(match[2] || '0') * Y +\n parseFloat(match[3] || '0') * M +\n parseFloat(match[4] || '0') * D +\n parseFloat(match[5] || '0') * H +\n parseFloat(match[6] || '0') * I +\n parseFloat(match[7] || '0'))\n )\n}\n\n/**\n * Returns the iso 8601 string representation of a duration value.\n *\n * @param value A duration value, in seconds.\n */\nexport function stringifyDuration(value: Duration): string {\n const sign = value < 0 ? '-' : ''\n let abs = Math.abs(value)\n\n const years = Math.floor(abs / Y)\n abs -= years * Y\n const months = Math.floor(abs / M)\n const days = Math.floor((abs % M) / D)\n const hours = Math.floor((abs % D) / H)\n const minutes = Math.floor((abs % H) / I)\n const seconds = abs % I\n\n let date = ''\n if (years > 0) date += `${years}Y`\n if (months > 0) date += `${months}M`\n if (days > 0) date += `${days}D`\n let time = ''\n if (hours > 0) time += `${hours}H`\n if (minutes > 0) time += `${minutes}M`\n if (seconds > 0) time += `${roundToNearest(seconds, 0.001)}S`\n // A duration must carry at least one component, so a zero duration is\n // written as `PT0S`. The time designator is only written when a time\n // component follows it; a trailing `T` is not a valid duration.\n if (!date && !time) time = '0S'\n return `${sign}P${date}${time && `T${time}`}`\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { ErrorOrigin, ValidationError } from '@amazon/vinyl-util'\n\nexport function throwParsingError(message: string): never {\n throw new ValidationError(message, ErrorOrigin.PARSING)\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Parser definitions for a dash manifest.\n * Attribute order does not matter, element order matters for writing.\n *\n * @module\n */\n\nimport type { actuateType, UriType } from '@amazon/vinyl-xml'\nimport {\n assertActuateEnum,\n attr,\n attrBoolean,\n attrDateTime,\n attrFloat,\n attrInt,\n attrString,\n charactersString,\n element,\n elements,\n type XmlRules,\n} from '@amazon/vinyl-xml'\nimport { ErrorOrigin, stringify } from '@amazon/vinyl-util'\nimport { isOneOf, number, type Validator } from '@amazon/vinyl-validation'\nimport { parseDuration, stringifyDuration } from '../duration/duration'\nimport { parseByteRange, stringifyByteRange } from '../media/byteRange'\nimport { parseRatio, stringifyRatio } from '../media/ratio'\nimport { parseFrameRate, stringifyFrameRate } from '../media/frameRate'\nimport type {\n AdaptationSetType,\n AlternativePresentationType,\n BaseURLType,\n ConditionalUintType,\n ContentComponentType,\n DashManifest,\n DescriptorType,\n EventStreamType,\n EventType,\n ImportedMpdType,\n MetricsType,\n MPDtype,\n MultipleSegmentBaseType,\n PeriodType,\n PresentationType,\n ProgramInformationType,\n RangeType,\n RepresentationBaseType,\n RepresentationType,\n SegmentBaseType,\n SegmentListType,\n SegmentTemplateType,\n SegmentTimelineType,\n SegmentTimelineTypeSType,\n SegmentURLType,\n SubRepresentationType,\n SubsetType,\n SwitchingType,\n SwitchingTypeType,\n URLType,\n VideoScanType,\n} from '../xmlns/mpeg/dash/schema/mpd/2011'\n\nexport const dashNamespaceUri = 'urn:mpeg:dash:schema:mpd:2011'\n\n/**\n * The XLink namespace of remote element `xlink:href` and `xlink:actuate`\n * attributes.\n */\nexport const XLINK_NAMESPACE_URI = 'http://www.w3.org/1999/xlink'\n\nexport function dashManifestXmlRules(): XmlRules<DashManifest> {\n const attrActuateType = attr<actuateType>(assertActuateEnum, stringify, {\n default: 'onRequest',\n namespaceUri: XLINK_NAMESPACE_URI,\n } as const)\n const attrHref = attrString({ namespaceUri: XLINK_NAMESPACE_URI })\n\n const descriptorType: XmlRules<DescriptorType> = {\n id: attrString,\n schemeIdUri: attrString({ required: true }),\n value: attrString,\n } as const\n\n const baseURLType: XmlRules<BaseURLType> = {\n availabilityTimeComplete: attrBoolean,\n availabilityTimeOffset: attrFloat,\n byteRange: attrString,\n serviceLocation: attrString,\n _content: charactersString,\n } as const\n\n const contentComponentType: XmlRules<ContentComponentType> = {\n contentType: attrString,\n id: attrInt,\n lang: attrString,\n par: attr(parseRatio, stringifyRatio),\n Accessibility: elements(descriptorType),\n Rating: elements(descriptorType),\n Role: elements(descriptorType),\n Viewpoint: elements(descriptorType),\n } as const\n\n const urlType: XmlRules<URLType> = {\n range: attr(parseByteRange, stringifyByteRange),\n sourceURL: attrString,\n } as const\n\n const uriType: XmlRules<UriType> = { _content: charactersString } as const\n\n const segmentBaseType: XmlRules<SegmentBaseType> = {\n Initialization: element(urlType),\n RepresentationIndex: element(urlType),\n availabilityTimeComplete: attrBoolean,\n availabilityTimeOffset: attrInt,\n indexRange: attr(parseByteRange, stringifyByteRange),\n indexRangeExact: attrBoolean({ default: false }),\n presentationTimeOffset: attrFloat,\n timescale: attrInt,\n } as const\n\n const segmentTimelineTypeSType: XmlRules<SegmentTimelineTypeSType> = {\n d: attrInt({ required: true }),\n n: attrInt,\n r: attrInt({ default: 0 }),\n t: attrInt,\n } as const\n\n const segmentTimelineType: XmlRules<SegmentTimelineType> = {\n S: elements(segmentTimelineTypeSType),\n } as const\n\n const multipleSegmentBaseType: XmlRules<MultipleSegmentBaseType> = {\n ...segmentBaseType,\n SegmentTimeline: element(segmentTimelineType),\n BitstreamSwitching: element(urlType),\n duration: attrInt,\n startNumber: attrInt,\n } as const\n\n const segmentURLType: XmlRules<SegmentURLType> = {\n index: attrString,\n indexRange: attr(parseByteRange, stringifyByteRange),\n media: attrString,\n mediaRange: attr(parseByteRange, stringifyByteRange),\n } as const\n\n const segmentListType: XmlRules<SegmentListType> = {\n ...multipleSegmentBaseType,\n actuate: attrActuateType,\n href: attrHref,\n SegmentURL: elements(segmentURLType),\n } as const\n\n const segmentTemplateType: XmlRules<SegmentTemplateType> = {\n ...multipleSegmentBaseType,\n bitstreamSwitching: attrString,\n index: attrString,\n initialization: attrString,\n media: attrString,\n } as const\n\n const subsetType: XmlRules<SubsetType> = {\n contains: attr(parseIntVector, stringifyIntVector, { required: true }),\n id: attrString,\n } as const\n\n const alternativePresentationType: XmlRules<AlternativePresentationType> = {\n uri: attrString,\n maxDuration: attrInt,\n earliestResolutionTimeOffset: attrInt,\n returnOffset: attrInt,\n clip: attrBoolean,\n startWithOffset: attrBoolean,\n } as const\n\n const eventType: XmlRules<EventType> = {\n duration: attrInt,\n id: attrInt,\n messageData: attrString,\n presentationTime: attrInt({ default: 0 }),\n contentEncoding: attrString,\n _content: charactersString,\n InsertPresentation: element(alternativePresentationType),\n ReplacePresentation: element(alternativePresentationType),\n } as const\n\n const eventStreamType: XmlRules<EventStreamType> = {\n Event: elements(eventType),\n actuate: attrActuateType,\n href: attrHref,\n messageData: attrString,\n schemeIdUri: attrString({ required: true }),\n timescale: attrInt,\n presentationTimeOffset: attrInt,\n value: attrString,\n } as const\n\n const switchingType: XmlRules<SwitchingType> = {\n interval: attrInt({ required: true }),\n type: attr(parseSwitchingTypeType, stringify),\n } as const\n\n const representationBaseType: XmlRules<RepresentationBaseType> = {\n FramePacking: elements(descriptorType),\n AudioChannelConfiguration: elements(descriptorType),\n ContentProtection: elements(descriptorType),\n EssentialProperty: elements(descriptorType),\n SupplementalProperty: elements(descriptorType),\n InbandEventStream: elements(eventStreamType),\n Switching: elements(switchingType),\n audioSamplingRate: attr(parseIntVector, stringifyIntVector),\n codecs: attrString,\n codingDependency: attrBoolean,\n frameRate: attr(parseFrameRate, stringifyFrameRate),\n height: attrInt,\n maximumSAPPeriod: attrInt,\n maxPlayoutRate: attrInt,\n mimeType: attrString,\n profiles: attr(parseProfiles, stringifyProfiles),\n sar: attr(parseRatio, stringifyRatio),\n scanType: attr(parseVideoScan, stringify),\n segmentProfiles: attrString,\n startWithSAP: attr(parseSap, stringify),\n width: attrInt,\n } as const\n\n const subRepresentationType: XmlRules<SubRepresentationType> = {\n ...representationBaseType,\n bandwidth: attrInt,\n contentComponent: attr(parseStringVector, stringifyStringVector),\n dependencyLevel: attr(parseIntVector, stringifyIntVector),\n level: attrInt,\n } as const\n\n const representationType: XmlRules<RepresentationType> = {\n ...representationBaseType,\n bandwidth: attrInt({ required: true }),\n bitrate: attrInt,\n dependencyId: attr(parseStringVector, stringifyStringVector),\n id: attrString({ required: true }),\n mediaStreamStructureId: attr(parseStringVector, stringifyStringVector),\n qualityRanking: attrInt,\n BaseURL: elements(baseURLType),\n SegmentBase: element(segmentBaseType),\n SegmentList: element(segmentListType),\n SegmentTemplate: element(segmentTemplateType),\n SubRepresentation: elements(subRepresentationType),\n } as const\n\n const adaptationSetType: XmlRules<AdaptationSetType> = {\n ...representationBaseType,\n Accessibility: elements(descriptorType),\n Role: elements(descriptorType),\n Rating: elements(descriptorType),\n Viewpoint: elements(descriptorType),\n ContentComponent: elements(contentComponentType),\n BaseURL: elements(baseURLType),\n SegmentBase: element(segmentBaseType),\n SegmentList: element(segmentListType),\n SegmentTemplate: element(segmentTemplateType),\n Representation: elements(representationType),\n actuate: attrActuateType,\n bitstreamSwitching: attrBoolean,\n contentType: attrString,\n group: attrInt,\n href: attrHref,\n id: attrInt,\n lang: attrString,\n maxBandwidth: attrInt,\n maxFrameRate: attr(parseFrameRate, stringifyFrameRate),\n maxHeight: attrInt,\n maxWidth: attrInt,\n minBandwidth: attrInt,\n minFrameRate: attr(parseFrameRate, stringifyFrameRate),\n minHeight: attrInt,\n minWidth: attrInt,\n par: attr(parseRatio, stringifyRatio),\n segmentAlignment: attr(parseConditionalUint, stringify, {\n default: false,\n }),\n selectionPriority: attrInt({\n default: 1,\n }),\n subsegmentAlignment: attr(parseConditionalUint, stringify, {\n default: false,\n }),\n subsegmentStartsWithSAP: attr(parseSap, stringify, { default: 0 }),\n } as const\n\n const rangeType: XmlRules<RangeType> = {\n duration: attr(parseDuration, stringifyDuration),\n starttime: attr(parseDuration, stringifyDuration),\n } as const\n\n const metricsType: XmlRules<MetricsType> = {\n metrics: attrString({ required: true }),\n Range: elements(rangeType),\n Reporting: elements(descriptorType, { minOccurs: 1 }),\n } as const\n\n const importedMpdType: XmlRules<ImportedMpdType> = {\n earliestResolutionTimeOffset: attrFloat,\n _content: charactersString,\n } as const\n\n const periodType: XmlRules<PeriodType> = {\n BaseURL: elements(baseURLType),\n SegmentBase: element(segmentBaseType),\n SegmentList: element(segmentListType),\n SegmentTemplate: element(segmentTemplateType),\n AssetIdentifier: element(descriptorType),\n EventStream: elements(eventStreamType),\n AdaptationSet: elements(adaptationSetType),\n Subset: elements(subsetType),\n SupplementalProperty: elements(descriptorType),\n ImportedMPD: element(importedMpdType),\n actuate: attrActuateType,\n bitstreamSwitching: attrBoolean({ default: false }),\n duration: attr(parseDuration, stringifyDuration),\n href: attrHref,\n id: attrString,\n start: attr(parseDuration, stringifyDuration),\n } as const\n\n const programInformationType: XmlRules<ProgramInformationType> = {\n lang: attrString,\n moreInformationURL: attrString,\n Copyright: attrString,\n Source: attrString,\n Title: attrString,\n } as const\n\n const mpdType: XmlRules<MPDtype> = {\n ProgramInformation: elements(programInformationType),\n BaseURL: elements(baseURLType),\n Location: elements(uriType),\n Period: elements(periodType, { minOccurs: 1 }),\n Metrics: elements(metricsType),\n EssentialProperty: elements(descriptorType),\n SupplementalProperty: elements(descriptorType),\n UTCTiming: elements(descriptorType),\n availabilityEndTime: attrDateTime,\n availabilityStartTime: attrDateTime,\n id: attrString,\n maxSegmentDuration: attr(parseDuration, stringifyDuration),\n maxSubsegmentDuration: attr(parseDuration, stringifyDuration),\n mediaPresentationDuration: attr(parseDuration, stringifyDuration),\n minBufferTime: attr(parseDuration, stringifyDuration, {\n required: true,\n }),\n minimumUpdatePeriod: attr(parseDuration, stringifyDuration),\n profiles: attr(parseProfiles, stringifyProfiles, { required: true }),\n publishTime: attrDateTime,\n suggestedPresentationDelay: attr(parseDuration, stringifyDuration),\n timeShiftBufferDepth: attr(parseDuration, stringifyDuration),\n type: attr(parsePresentationTypeType, stringify, {\n default: 'static',\n } as const),\n } as const\n\n return {\n MPD: element(mpdType, {\n required: true,\n namespaceUri: dashNamespaceUri,\n }),\n } as const\n}\n\n/**\n * Parses a comma delimited list of profiles.\n * Profile values are not whitespace trimmed.\n *\n * @param str\n */\nexport function parseProfiles(str: string): readonly string[] {\n return str.split(',')\n}\n\n/**\n * Returns the string representation of a {@link FrameRate} value.\n *\n * @param value\n */\nexport function stringifyProfiles(value: readonly string[]): string {\n return value.join(',')\n}\n\nconst videoScanTypeValidator: Validator<VideoScanType> = /* @__PURE__ */ isOneOf(\n 'progressive',\n 'interlaced',\n 'unknown'\n)\n\n/**\n * @private\n */\nexport function parseVideoScan(str: string): VideoScanType {\n videoScanTypeValidator.assert(str, ErrorOrigin.PARSING)\n return str\n}\n\nconst switchingTypeTypeValidator: Validator<SwitchingTypeType> = /* @__PURE__ */ isOneOf(\n 'media',\n 'bitstream'\n)\n\n/**\n * @private\n */\nexport function parseSwitchingTypeType(str: string): SwitchingTypeType {\n switchingTypeTypeValidator.assert(str, ErrorOrigin.PARSING)\n return str\n}\n\nconst validateSap: Validator<number> = /* @__PURE__ */ /* @__PURE__ */ number().within(0, 6)\n\n/**\n * @private\n */\nexport function parseSap(str: string): number {\n const number = parseInt(str)\n validateSap.assert(number, ErrorOrigin.PARSING)\n return number\n}\n\n/**\n * Splits a string by whitespace.\n *\n * @private\n */\nexport function parseStringVector(str: string): readonly string[] {\n return str.split(/\\s+/)\n}\n\n/**\n * Returns the string representation of a string vector value.\n *\n * @param value\n */\nexport function stringifyStringVector(value: readonly string[]): string {\n return value.join(' ')\n}\n\n/**\n * Splits a string by whitespace and parses as int.\n *\n * @private\n */\nexport function parseIntVector(str: string): readonly number[] {\n return str.split(/\\s+/).map((subStr) => parseInt(subStr))\n}\n\n/**\n * Returns the string representation of an int vector value.\n *\n * @param value\n */\nexport function stringifyIntVector(value: readonly number[]): string {\n return value.join(' ')\n}\n\nconst presentationTypeValidator: Validator<PresentationType> = /* @__PURE__ */ isOneOf(\n 'static',\n 'dynamic',\n 'list'\n)\n\n/**\n * Asserts that the given string is one of the {@link PresentationType} enumerated values.\n * @param str\n */\nexport function parsePresentationTypeType(str: string): PresentationType {\n presentationTypeValidator.assert(str, ErrorOrigin.PARSING)\n return str\n}\n\n/**\n * Parses a string into true, false, or a number.\n *\n * @private\n */\nexport function parseConditionalUint(str: string): ConditionalUintType {\n const lower = str.toLowerCase()\n switch (lower) {\n case 'true':\n return true\n case 'false':\n return false\n default:\n return parseInt(str)\n }\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { parseIntSafe } from '@amazon/vinyl-util'\nimport { throwParsingError } from '../error/parsingError'\n\n/**\n * A range of bytes, [from, to (optional, inclusive)].\n */\nexport type ByteRange = readonly [number, number | null]\n\nconst byteRangeExp = /^(-?[0-9]+)-(-?[0-9]*)$/\n\nexport function parseByteRange(str: string): ByteRange {\n const match = str ? byteRangeExp.exec(str) : null\n if (!match) throwParsingError(`invalid byte range: '${str}'`)\n let start = parseInt(match[1])\n // Convert possibly-negative Int32 overflow value to its Uint32 equivalent\n // (reinterpret 32-bit signed integer bits as unsigned)\n if (start < 0) start >>>= 0\n let end = parseIntSafe(match[2])\n if (end != null && end < 0) end = end >>> 0\n return [start, end]\n}\n\n/**\n * Returns the string representation of a {@link ByteRange} value.\n *\n * @param value\n */\nexport function stringifyByteRange(value: ByteRange): string {\n const end = value[1]\n return `${value[0]}-${end == null ? '' : end}`\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { throwParsingError } from '../error/parsingError'\n\n/**\n * A numerator and denominator.\n */\nexport type Ratio = readonly [number, number]\n\n/**\n * The XSD specifies `[0-9]*`, and not `[0-9]+`, which would match `'23:'`\n * For missing dimensions, default to 1.\n */\nconst ratioRegExp = /^([0-9]*):([0-9]*)$/\n\n/**\n * Parses a string representing a ratio into [number, number].\n * The string must satisfy the pattern: `/^([0-9]*):([0-9]*)$/`\n * Examples:\n * ```\n * parseRatio('4:3') // [4, 3]\n * parseRatio('16:9') // [16, 9]\n * parseRatio('2:') // [2, 1]\n * ```\n *\n * @private\n */\nexport function parseRatio(str: string): Ratio {\n const match = str ? ratioRegExp.exec(str) : null\n if (!match) throwParsingError(`invalid ratio format: ${str}`)\n return [parseInt(match[1] || '1'), parseInt(match[2] || '1')]\n}\n\n/**\n * Returns the string representation of a {@link Ratio} value.\n *\n * @param value\n */\nexport function stringifyRatio(value: Ratio): string {\n return `${value[0]}:${value[1]}`\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { throwParsingError } from '../error/parsingError'\n\nexport type FrameRate = readonly [number, number]\n\nconst framerateRegexp = /^(\\d+)(?:\\/(\\d+))?$/\n\n/**\n * Parses a string into a {@link FrameRate}\n *\n * @private\n */\nexport function parseFrameRate(str: string): FrameRate {\n const match = str ? framerateRegexp.exec(str) : null\n if (!match) throwParsingError(`invalid frame rate: '${str}'`)\n return [parseInt(match[1]), parseInt(match[2] || '1')]\n}\n\n/**\n * Returns the string representation of a {@link FrameRate} value.\n *\n * @param value\n */\nexport function stringifyFrameRate(value: FrameRate): string {\n return value[1] === 1 ? value[0].toString() : `${value[0]}/${value[1]}`\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { ReservedXmlRuleKeys } from '@amazon/vinyl-xml'\nimport {\n mapXmlRules,\n type Merged,\n mergeXmlRules,\n parseXml,\n ParseXmlHandlerImpl,\n stringifyXml,\n} from '@amazon/vinyl-xml'\nimport type { PlayreadyContentProtection } from '../xmlns/microsoft/playready'\nimport type { CencContentProtection } from '../xmlns/mpeg/cenc/2013'\nimport type {\n DashManifest,\n DescriptorType,\n} from '../xmlns/mpeg/dash/schema/mpd/2011'\nimport { dashManifestXmlRules } from './dashManifestXmlRules'\nimport { cencXmlRules } from './ext/drm/cencXmlRules'\nimport type { DashProtections } from './ext/drm/contentProtection'\nimport { createDashProtectionXmlRules } from './ext/drm/contentProtection'\nimport { playreadyXmlRules } from './ext/drm/playreadyXmlRules'\nimport {\n createDashScte35EventXmlRules,\n type DashScte35Events,\n} from './ext/events/scte35XmlRules'\nimport type { OptionalDeep } from '@amazon/vinyl-util'\n\n/**\n * Creates a Dash Manifest parser with supported extensions.\n *\n * @module\n */\n\nexport type DashDrmManifest = Merged<\n DashManifest & DashProtections<ContentProtection> & DashScte35Events\n>\n\nexport interface ContentProtection\n extends DescriptorType, CencContentProtection, PlayreadyContentProtection {}\n\nexport const dashDrmRules = /* @__PURE__ */ mergeXmlRules(\n /* @__PURE__ */ dashManifestXmlRules(),\n /* @__PURE__ */ createDashProtectionXmlRules(cencXmlRules),\n /* @__PURE__ */ createDashProtectionXmlRules(playreadyXmlRules),\n /* @__PURE__ */ createDashScte35EventXmlRules()\n)\n\nconst dashDrmRulesMapped = /* @__PURE__ */ mapXmlRules(dashDrmRules)\n\n/**\n * A Content handler for a dash manifest.\n */\nfunction dashManifestHandler() {\n return new ParseXmlHandlerImpl(dashDrmRulesMapped)\n}\n\n/**\n * Parses a Dash Manifest, according to the mpd:2011 schema.\n * @see https://raw.githubusercontent.com/Dash-Industry-Forum/MPEG-Conformance-and-reference-source/master/conformance/MPDValidator/schemas/DASH-MPD.xsd\n * @param manifest\n */\nexport function parseDashManifest(manifest: string): DashDrmManifest {\n return parseXml(manifest, dashManifestHandler())\n}\n\nexport function stringifyDashManifest(\n manifest: OptionalDeep<DashDrmManifest, ReservedXmlRuleKeys>\n): string {\n return stringifyXml(manifest, dashDrmRulesMapped)\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n parseStringVector,\n stringifyStringVector,\n} from '../../dashManifestXmlRules'\nimport type { XmlRules } from '@amazon/vinyl-xml'\nimport { attr, charactersString, element } from '@amazon/vinyl-xml'\nimport type { CencContentProtection } from '../../../xmlns/mpeg/cenc/2013'\nimport { CENC_NAMESPACE_URI } from '../../../xmlns/mpeg/cenc/2013'\n\n/**\n * A parser for ContentProtection elements using the cenc namespace.\n * @see https://github.com/sannies/rtp2dash/blob/master/src/main/resources/auxxsd/cenc.xsd\n */\nexport const cencXmlRules: XmlRules<CencContentProtection> = {\n default_KID: /* @__PURE__ */ attr(parseStringVector, stringifyStringVector, {\n namespaceUri: CENC_NAMESPACE_URI,\n }),\n pssh: /* @__PURE__ */ element(\n {\n _content: charactersString,\n },\n {\n namespaceUri: CENC_NAMESPACE_URI,\n }\n ),\n} as const\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Base64BinaryType } from '@amazon/vinyl-xml'\n\n/**\n * Cenc content protection xml types.\n *\n * @see https://github.com/sannies/rtp2dash/blob/master/src/main/resources/auxxsd/cenc.xsd\n * @module\n */\n\nexport const CENC_NAMESPACE_URI = 'urn:mpeg:cenc:2013'\n\n/**\n * A 128-bit integer written in canonical UUID notation.\n * Must be in the form:\n * `[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}`\n */\nexport type KeyIdType = string\n\nexport interface CencContentProtection {\n readonly default_KID?: readonly KeyIdType[]\n readonly pssh?: Base64BinaryType\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { element, elements, type XmlRules } from '@amazon/vinyl-xml'\nimport { dashNamespaceUri } from '../../dashManifestXmlRules'\n\n/**\n * ContentProtection extension point for Dash manifests.\n *\n * @module\n */\n\nexport interface WithProtections<T> {\n readonly ContentProtection?: readonly T[]\n}\n\nexport interface RepresentationTypeProtections<T> extends WithProtections<T> {\n readonly SubRepresentation?: readonly WithProtections<T>[]\n}\n\nexport interface AdaptationSetProtections<T> extends WithProtections<T> {\n readonly Representation?: readonly RepresentationTypeProtections<T>[]\n}\n\nexport interface PeriodProtections<T> {\n readonly AdaptationSet?: readonly AdaptationSetProtections<T>[]\n}\n\nexport interface MPDProtections<T> {\n readonly Period: readonly PeriodProtections<T>[]\n}\n\nexport interface DashProtections<T> {\n readonly MPD: MPDProtections<T>\n}\n\n/**\n * Creates a dash extension for content protection parsing rules.\n *\n * @param contentProtectionRules Rules to be used when processing `ContentProtection` elements.\n * @return Returns a rules map that should be merged with the dash manifest rules.\n */\nexport function createDashProtectionXmlRules<T extends object>(\n contentProtectionRules: XmlRules<T>\n): XmlRules<DashProtections<T>> {\n const withProtections: XmlRules<WithProtections<T>> = {\n ContentProtection: elements(contentProtectionRules),\n } as const\n\n return {\n MPD: element<MPDProtections<T>>(\n {\n Period: elements<PeriodProtections<T>>(\n {\n AdaptationSet: elements<AdaptationSetProtections<T>>({\n ...withProtections,\n Representation: elements<\n RepresentationTypeProtections<T>\n >({\n ...withProtections,\n SubRepresentation:\n elements<WithProtections<T>>(\n withProtections\n ),\n }),\n }),\n },\n {\n minOccurs: 1,\n }\n ),\n },\n { required: true, namespaceUri: dashNamespaceUri } as const\n ),\n } as const\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { charactersString, element, type XmlRules } from '@amazon/vinyl-xml'\nimport type { PlayreadyContentProtection } from '../../../xmlns/microsoft/playready'\nimport { PLAY_READY_NAMESPACE_URI } from '../../../xmlns/microsoft/playready'\n\nexport const playreadyXmlRules: XmlRules<PlayreadyContentProtection> = {\n pro: /* @__PURE__ */ element(\n {\n _content: charactersString,\n },\n {\n namespaceUri: PLAY_READY_NAMESPACE_URI,\n }\n ),\n} as const\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Base64BinaryType } from '@amazon/vinyl-xml'\n\n/**\n * Cenc content protection playready.\n *\n * @see https://learn.microsoft.com/en-us/playready/specifications/mpeg-dash-playready#21-dash-contentprotection-descriptor-elements\n * @module\n */\n\nexport const PLAY_READY_NAMESPACE_URI = 'urn:microsoft:playready'\n\nexport interface PlayreadyContentProtection {\n readonly pro?: Base64BinaryType\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n attrBoolean,\n attrInt,\n attrString,\n charactersString,\n element,\n elements,\n type XmlRules,\n} from '@amazon/vinyl-xml'\nimport { dashNamespaceUri } from '../../dashManifestXmlRules'\nimport {\n SCTE35_2016_NAMESPACE_URI,\n type Scte35BinaryType,\n type Scte35BreakDurationType,\n type Scte35ProgramType,\n type Scte35SegmentationDescriptorType,\n type Scte35SegmentationUpidType,\n type Scte35SpliceInsertType,\n type Scte35SpliceNullType,\n type Scte35TimeSignalType,\n type Scte35SignalType,\n type Scte35SpliceInfoSectionType,\n type Scte35SpliceTimeType,\n} from '../../../xmlns/scte/35/2016'\n\n/**\n * The SCTE-35 bodies of an MPD `Event`, per SCTE 214-1.\n */\nexport interface Scte35Event {\n /** The body of a `urn:scte:scte35:2014:xml+bin` event. */\n readonly Signal?: Scte35SignalType\n\n /** The body of a `urn:scte:scte35:2013:xml` event. */\n readonly SpliceInfoSection?: Scte35SpliceInfoSectionType\n}\n\nexport interface EventStreamScte35Events {\n readonly Event?: readonly Scte35Event[]\n}\n\nexport interface PeriodScte35Events {\n readonly EventStream?: readonly EventStreamScte35Events[]\n}\n\nexport interface MPDScte35Events {\n readonly Period: readonly PeriodScte35Events[]\n}\n\nexport interface DashScte35Events {\n readonly MPD: MPDScte35Events\n}\n\nconst options = { namespaceUri: SCTE35_2016_NAMESPACE_URI } as const\n\nconst spliceTimeType: XmlRules<Scte35SpliceTimeType> = {\n ptsTime: attrInt,\n} as const\n\nconst segmentationUpidType: XmlRules<Scte35SegmentationUpidType> = {\n segmentationUpidType: attrInt,\n segmentationUpidFormat: attrString,\n _content: charactersString,\n} as const\n\nconst segmentationDescriptorType: XmlRules<Scte35SegmentationDescriptorType> = {\n segmentationEventId: attrInt,\n segmentationEventCancelIndicator: attrBoolean,\n segmentationDuration: attrInt,\n segmentationTypeId: attrInt,\n segmentNum: attrInt,\n segmentsExpected: attrInt,\n SegmentationUpid: /* @__PURE__ */ elements(segmentationUpidType, options),\n} as const\n\nconst programType: XmlRules<Scte35ProgramType> = {\n SpliceTime: /* @__PURE__ */ element(spliceTimeType, options),\n} as const\n\nconst breakDurationType: XmlRules<Scte35BreakDurationType> = {\n autoReturn: attrBoolean,\n duration: attrInt,\n} as const\n\nconst spliceInsertType: XmlRules<Scte35SpliceInsertType> = {\n spliceEventId: attrInt,\n spliceEventCancelIndicator: attrBoolean,\n outOfNetworkIndicator: attrBoolean,\n spliceImmediateFlag: attrBoolean,\n uniqueProgramId: attrInt,\n availNum: attrInt,\n availsExpected: attrInt,\n Program: /* @__PURE__ */ element(programType, options),\n BreakDuration: /* @__PURE__ */ element(breakDurationType, options),\n} as const\n\nconst timeSignalType: XmlRules<Scte35TimeSignalType> = {\n SpliceTime: /* @__PURE__ */ element(spliceTimeType, options),\n} as const\n\nconst spliceNullType: XmlRules<Scte35SpliceNullType> = {} as const\n\nconst spliceInfoSectionType: XmlRules<Scte35SpliceInfoSectionType> = {\n ptsAdjustment: attrInt,\n tier: attrInt,\n SpliceNull: /* @__PURE__ */ element(spliceNullType, options),\n SpliceInsert: /* @__PURE__ */ element(spliceInsertType, options),\n TimeSignal: /* @__PURE__ */ element(timeSignalType, options),\n SegmentationDescriptor: /* @__PURE__ */ elements(segmentationDescriptorType, options),\n} as const\n\nconst binaryType: XmlRules<Scte35BinaryType> = {\n _content: charactersString,\n} as const\n\nconst signalType: XmlRules<Scte35SignalType> = {\n Binary: /* @__PURE__ */ element(binaryType, options),\n} as const\n\n/**\n * Parsing rules for SCTE-35 MPD events, in the SCTE-35 2016 XML namespace.\n */\nexport const scte35EventXmlRules: XmlRules<Scte35Event> = {\n Signal: /* @__PURE__ */ element(signalType, options),\n SpliceInfoSection: /* @__PURE__ */ element(spliceInfoSectionType, options),\n} as const\n\n/**\n * Creates the rules map for SCTE-35 MPD event bodies, to be merged with the\n * dash manifest rules.\n */\nexport function createDashScte35EventXmlRules(): XmlRules<DashScte35Events> {\n return {\n MPD: element<MPDScte35Events>(\n {\n Period: elements<PeriodScte35Events>(\n {\n EventStream: elements<EventStreamScte35Events>({\n Event: elements(scte35EventXmlRules),\n }),\n },\n { minOccurs: 1 }\n ),\n },\n { required: true, namespaceUri: dashNamespaceUri } as const\n ),\n } as const\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * SCTE-35 XML types, as carried in DASH MPD events per SCTE 214-1.\n *\n * Only the elements and attributes that describe ad avails are modeled.\n *\n * @see https://www.scte.org/standards/library/catalog/scte-35-digital-program-insertion-cueing-message/\n * @module\n */\n\nexport const SCTE35_2016_NAMESPACE_URI = 'http://www.scte.org/schemas/35/2016'\n\n/**\n * `scte35:Signal`, the event body of the `urn:scte:scte35:2014:xml+bin`\n * scheme: a binary `splice_info_section`, base64 encoded.\n */\nexport interface Scte35SignalType {\n readonly Binary?: Scte35BinaryType\n}\n\nexport interface Scte35BinaryType {\n /** The base64 encoded `splice_info_section`. */\n readonly _content?: string\n}\n\n/**\n * `scte35:SpliceInfoSection`, the event body of the `urn:scte:scte35:2013:xml`\n * scheme.\n */\nexport interface Scte35SpliceInfoSectionType {\n readonly ptsAdjustment?: number\n readonly tier?: number\n readonly SpliceNull?: Scte35SpliceNullType\n readonly SpliceInsert?: Scte35SpliceInsertType\n readonly TimeSignal?: Scte35TimeSignalType\n readonly SegmentationDescriptor?: readonly Scte35SegmentationDescriptorType[]\n}\n\nexport interface Scte35SpliceTimeType {\n readonly ptsTime?: number\n}\n\nexport interface Scte35SpliceInsertType {\n readonly spliceEventId?: number\n readonly spliceEventCancelIndicator?: boolean\n readonly outOfNetworkIndicator?: boolean\n readonly spliceImmediateFlag?: boolean\n readonly uniqueProgramId?: number\n readonly availNum?: number\n readonly availsExpected?: number\n readonly Program?: Scte35ProgramType\n readonly BreakDuration?: Scte35BreakDurationType\n}\n\nexport type Scte35SpliceNullType = Record<never, never>\n\nexport interface Scte35ProgramType {\n readonly SpliceTime?: Scte35SpliceTimeType\n}\n\nexport interface Scte35BreakDurationType {\n readonly autoReturn?: boolean\n readonly duration?: number\n}\n\nexport interface Scte35TimeSignalType {\n readonly SpliceTime?: Scte35SpliceTimeType\n}\n\nexport interface Scte35SegmentationDescriptorType {\n readonly segmentationEventId?: number\n readonly segmentationEventCancelIndicator?: boolean\n readonly segmentationDuration?: number\n readonly segmentationTypeId?: number\n readonly segmentNum?: number\n readonly segmentsExpected?: number\n readonly SegmentationUpid?: readonly Scte35SegmentationUpidType[]\n}\n\nexport interface Scte35SegmentationUpidType {\n readonly segmentationUpidType?: number\n /** `text` or `hexbinary` (the default). */\n readonly segmentationUpidFormat?: string\n readonly _content?: string\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport const ContentProtectionScheme = {\n /**\n * CENC protection scheme. (Should not be used to create a key session)\n */\n CENC: 'urn:mpeg:dash:mp4protection:2011',\n\n /**\n * A simple, unencrypted content protection scheme. Not a full DRM solution.\n */\n CLEAR_KEY: 'urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e',\n\n /**\n * Apple's FairPlay.\n */\n FAIR_PLAY: 'urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2',\n\n /**\n * Open-standards community initiative by Marlin Developer Community.\n */\n MARLIN: 'urn:uuid:5e629af5-38da-4063-8977-97ffbd9902d4',\n\n /**\n * Microsoft's PlayReady.\n */\n PLAY_READY: 'urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95',\n\n /**\n * An old, unused PlayReady scheme id.\n */\n PLAY_READY_DEPRECATED: 'urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95',\n\n /**\n * Google's Widevine.\n */\n WIDEVINE: 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed',\n} as const\n"],
5
+ "mapp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"import_vinyl_xml"]
7
7
  }