@tiptap/extension-youtube 2.0.0-beta.213 → 2.0.0-beta.215

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,249 +1,226 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/youtube.ts
2
- var _core = require('@tiptap/core');
1
+ 'use strict';
3
2
 
4
- // src/utils.ts
5
- var YOUTUBE_REGEX = /^(https?:\/\/)?(www\.|music\.)?(youtube\.com|youtu\.be)(.+)?$/;
6
- var YOUTUBE_REGEX_GLOBAL = /^(https?:\/\/)?(www\.|music\.)?(youtube\.com|youtu\.be)(.+)?$/g;
7
- var isValidYoutubeUrl = (url) => {
8
- return url.match(YOUTUBE_REGEX);
9
- };
10
- var getYoutubeEmbedUrl = (nocookie) => {
11
- return nocookie ? "https://www.youtube-nocookie.com/embed/" : "https://www.youtube.com/embed/";
12
- };
13
- var getEmbedUrlFromYoutubeUrl = (options) => {
14
- const {
15
- url,
16
- allowFullscreen,
17
- autoplay,
18
- ccLanguage,
19
- ccLoadPolicy,
20
- controls,
21
- disableKBcontrols,
22
- enableIFrameApi,
23
- endTime,
24
- interfaceLanguage,
25
- ivLoadPolicy,
26
- loop,
27
- modestBranding,
28
- nocookie,
29
- origin,
30
- playlist,
31
- progressBarColor,
32
- startAt
33
- } = options;
34
- if (url.includes("/embed/")) {
35
- return url;
36
- }
37
- if (url.includes("youtu.be")) {
38
- const id = url.split("/").pop();
39
- if (!id) {
40
- return null;
41
- }
42
- return `${getYoutubeEmbedUrl(nocookie)}${id}`;
43
- }
44
- const videoIdRegex = /v=([-\w]+)/gm;
45
- const matches = videoIdRegex.exec(url);
46
- if (!matches || !matches[1]) {
47
- return null;
48
- }
49
- let outputUrl = `${getYoutubeEmbedUrl(nocookie)}${matches[1]}`;
50
- const params = [];
51
- if (allowFullscreen === false) {
52
- params.push("fs=0");
53
- }
54
- if (autoplay) {
55
- params.push("autoplay=1");
56
- }
57
- if (ccLanguage) {
58
- params.push(`cc_lang_pref=${ccLanguage}`);
59
- }
60
- if (ccLoadPolicy) {
61
- params.push("cc_load_policy=1");
62
- }
63
- if (!controls) {
64
- params.push("controls=0");
65
- }
66
- if (disableKBcontrols) {
67
- params.push("disablekb=1");
68
- }
69
- if (enableIFrameApi) {
70
- params.push("enablejsapi=1");
71
- }
72
- if (endTime) {
73
- params.push(`end=${endTime}`);
74
- }
75
- if (interfaceLanguage) {
76
- params.push(`hl=${interfaceLanguage}`);
77
- }
78
- if (ivLoadPolicy) {
79
- params.push(`iv_load_policy=${ivLoadPolicy}`);
80
- }
81
- if (loop) {
82
- params.push("loop=1");
83
- }
84
- if (modestBranding) {
85
- params.push("modestbranding=1");
86
- }
87
- if (origin) {
88
- params.push(`origin=${origin}`);
89
- }
90
- if (playlist) {
91
- params.push(`playlist=${playlist}`);
92
- }
93
- if (startAt) {
94
- params.push(`start=${startAt}`);
95
- }
96
- if (progressBarColor) {
97
- params.push(`color=${progressBarColor}`);
98
- }
99
- if (params.length) {
100
- outputUrl += `?${params.join("&")}`;
101
- }
102
- return outputUrl;
103
- };
3
+ Object.defineProperty(exports, '__esModule', { value: true });
104
4
 
105
- // src/youtube.ts
106
- var Youtube = _core.Node.create({
107
- name: "youtube",
108
- addOptions() {
109
- return {
110
- addPasteHandler: true,
111
- allowFullscreen: true,
112
- autoplay: false,
113
- ccLanguage: void 0,
114
- ccLoadPolicy: void 0,
115
- controls: true,
116
- disableKBcontrols: false,
117
- enableIFrameApi: false,
118
- endTime: 0,
119
- height: 480,
120
- interfaceLanguage: void 0,
121
- ivLoadPolicy: 0,
122
- loop: false,
123
- modestBranding: false,
124
- HTMLAttributes: {},
125
- inline: false,
126
- nocookie: false,
127
- origin: "",
128
- playlist: "",
129
- progressBarColor: void 0,
130
- width: 640
131
- };
132
- },
133
- inline() {
134
- return this.options.inline;
135
- },
136
- group() {
137
- return this.options.inline ? "inline" : "block";
138
- },
139
- draggable: true,
140
- addAttributes() {
141
- return {
142
- src: {
143
- default: null
144
- },
145
- start: {
146
- default: 0
147
- },
148
- width: {
149
- default: this.options.width
150
- },
151
- height: {
152
- default: this.options.height
153
- }
154
- };
155
- },
156
- parseHTML() {
157
- return [
158
- {
159
- tag: "div[data-youtube-video] iframe"
160
- }
161
- ];
162
- },
163
- addCommands() {
164
- return {
165
- setYoutubeVideo: (options) => ({ commands }) => {
166
- if (!isValidYoutubeUrl(options.src)) {
167
- return false;
168
- }
169
- return commands.insertContent({
170
- type: this.name,
171
- attrs: options
172
- });
173
- }
174
- };
175
- },
176
- addPasteRules() {
177
- if (!this.options.addPasteHandler) {
178
- return [];
179
- }
180
- return [
181
- _core.nodePasteRule.call(void 0, {
182
- find: YOUTUBE_REGEX_GLOBAL,
183
- type: this.type,
184
- getAttributes: (match) => {
185
- return { src: match.input };
186
- }
187
- })
188
- ];
189
- },
190
- renderHTML({ HTMLAttributes }) {
191
- const embedUrl = getEmbedUrlFromYoutubeUrl({
192
- url: HTMLAttributes.src,
193
- allowFullscreen: this.options.allowFullscreen,
194
- autoplay: this.options.autoplay,
195
- ccLanguage: this.options.ccLanguage,
196
- ccLoadPolicy: this.options.ccLoadPolicy,
197
- controls: this.options.controls,
198
- disableKBcontrols: this.options.disableKBcontrols,
199
- enableIFrameApi: this.options.enableIFrameApi,
200
- endTime: this.options.endTime,
201
- interfaceLanguage: this.options.interfaceLanguage,
202
- ivLoadPolicy: this.options.ivLoadPolicy,
203
- loop: this.options.loop,
204
- modestBranding: this.options.modestBranding,
205
- nocookie: this.options.nocookie,
206
- origin: this.options.origin,
207
- playlist: this.options.playlist,
208
- progressBarColor: this.options.progressBarColor,
209
- startAt: HTMLAttributes.start || 0
210
- });
211
- HTMLAttributes.src = embedUrl;
212
- return [
213
- "div",
214
- { "data-youtube-video": "" },
215
- [
216
- "iframe",
217
- _core.mergeAttributes.call(void 0,
218
- this.options.HTMLAttributes,
219
- {
220
- width: this.options.width,
221
- height: this.options.height,
222
- allowfullscreen: this.options.allowFullscreen,
223
- autoplay: this.options.autoplay,
224
- ccLanguage: this.options.ccLanguage,
225
- ccLoadPolicy: this.options.ccLoadPolicy,
226
- disableKBcontrols: this.options.disableKBcontrols,
227
- enableIFrameApi: this.options.enableIFrameApi,
228
- endTime: this.options.endTime,
229
- interfaceLanguage: this.options.interfaceLanguage,
230
- ivLoadPolicy: this.options.ivLoadPolicy,
231
- loop: this.options.loop,
232
- modestBranding: this.options.modestBranding,
233
- origin: this.options.origin,
234
- playlist: this.options.playlist,
235
- progressBarColor: this.options.progressBarColor
236
- },
237
- HTMLAttributes
238
- )
239
- ]
240
- ];
241
- }
242
- });
243
-
244
- // src/index.ts
245
- var src_default = Youtube;
5
+ var core = require('@tiptap/core');
246
6
 
7
+ const YOUTUBE_REGEX = /^(https?:\/\/)?(www\.|music\.)?(youtube\.com|youtu\.be)(.+)?$/;
8
+ const YOUTUBE_REGEX_GLOBAL = /^(https?:\/\/)?(www\.|music\.)?(youtube\.com|youtu\.be)(.+)?$/g;
9
+ const isValidYoutubeUrl = (url) => {
10
+ return url.match(YOUTUBE_REGEX);
11
+ };
12
+ const getYoutubeEmbedUrl = (nocookie) => {
13
+ return nocookie ? 'https://www.youtube-nocookie.com/embed/' : 'https://www.youtube.com/embed/';
14
+ };
15
+ const getEmbedUrlFromYoutubeUrl = (options) => {
16
+ const { url, allowFullscreen, autoplay, ccLanguage, ccLoadPolicy, controls, disableKBcontrols, enableIFrameApi, endTime, interfaceLanguage, ivLoadPolicy, loop, modestBranding, nocookie, origin, playlist, progressBarColor, startAt, } = options;
17
+ // if is already an embed url, return it
18
+ if (url.includes('/embed/')) {
19
+ return url;
20
+ }
21
+ // if is a youtu.be url, get the id after the /
22
+ if (url.includes('youtu.be')) {
23
+ const id = url.split('/').pop();
24
+ if (!id) {
25
+ return null;
26
+ }
27
+ return `${getYoutubeEmbedUrl(nocookie)}${id}`;
28
+ }
29
+ const videoIdRegex = /v=([-\w]+)/gm;
30
+ const matches = videoIdRegex.exec(url);
31
+ if (!matches || !matches[1]) {
32
+ return null;
33
+ }
34
+ let outputUrl = `${getYoutubeEmbedUrl(nocookie)}${matches[1]}`;
35
+ const params = [];
36
+ if (allowFullscreen === false) {
37
+ params.push('fs=0');
38
+ }
39
+ if (autoplay) {
40
+ params.push('autoplay=1');
41
+ }
42
+ if (ccLanguage) {
43
+ params.push(`cc_lang_pref=${ccLanguage}`);
44
+ }
45
+ if (ccLoadPolicy) {
46
+ params.push('cc_load_policy=1');
47
+ }
48
+ if (!controls) {
49
+ params.push('controls=0');
50
+ }
51
+ if (disableKBcontrols) {
52
+ params.push('disablekb=1');
53
+ }
54
+ if (enableIFrameApi) {
55
+ params.push('enablejsapi=1');
56
+ }
57
+ if (endTime) {
58
+ params.push(`end=${endTime}`);
59
+ }
60
+ if (interfaceLanguage) {
61
+ params.push(`hl=${interfaceLanguage}`);
62
+ }
63
+ if (ivLoadPolicy) {
64
+ params.push(`iv_load_policy=${ivLoadPolicy}`);
65
+ }
66
+ if (loop) {
67
+ params.push('loop=1');
68
+ }
69
+ if (modestBranding) {
70
+ params.push('modestbranding=1');
71
+ }
72
+ if (origin) {
73
+ params.push(`origin=${origin}`);
74
+ }
75
+ if (playlist) {
76
+ params.push(`playlist=${playlist}`);
77
+ }
78
+ if (startAt) {
79
+ params.push(`start=${startAt}`);
80
+ }
81
+ if (progressBarColor) {
82
+ params.push(`color=${progressBarColor}`);
83
+ }
84
+ if (params.length) {
85
+ outputUrl += `?${params.join('&')}`;
86
+ }
87
+ return outputUrl;
88
+ };
247
89
 
90
+ const Youtube = core.Node.create({
91
+ name: 'youtube',
92
+ addOptions() {
93
+ return {
94
+ addPasteHandler: true,
95
+ allowFullscreen: true,
96
+ autoplay: false,
97
+ ccLanguage: undefined,
98
+ ccLoadPolicy: undefined,
99
+ controls: true,
100
+ disableKBcontrols: false,
101
+ enableIFrameApi: false,
102
+ endTime: 0,
103
+ height: 480,
104
+ interfaceLanguage: undefined,
105
+ ivLoadPolicy: 0,
106
+ loop: false,
107
+ modestBranding: false,
108
+ HTMLAttributes: {},
109
+ inline: false,
110
+ nocookie: false,
111
+ origin: '',
112
+ playlist: '',
113
+ progressBarColor: undefined,
114
+ width: 640,
115
+ };
116
+ },
117
+ inline() {
118
+ return this.options.inline;
119
+ },
120
+ group() {
121
+ return this.options.inline ? 'inline' : 'block';
122
+ },
123
+ draggable: true,
124
+ addAttributes() {
125
+ return {
126
+ src: {
127
+ default: null,
128
+ },
129
+ start: {
130
+ default: 0,
131
+ },
132
+ width: {
133
+ default: this.options.width,
134
+ },
135
+ height: {
136
+ default: this.options.height,
137
+ },
138
+ };
139
+ },
140
+ parseHTML() {
141
+ return [
142
+ {
143
+ tag: 'div[data-youtube-video] iframe',
144
+ },
145
+ ];
146
+ },
147
+ addCommands() {
148
+ return {
149
+ setYoutubeVideo: options => ({ commands }) => {
150
+ if (!isValidYoutubeUrl(options.src)) {
151
+ return false;
152
+ }
153
+ return commands.insertContent({
154
+ type: this.name,
155
+ attrs: options,
156
+ });
157
+ },
158
+ };
159
+ },
160
+ addPasteRules() {
161
+ if (!this.options.addPasteHandler) {
162
+ return [];
163
+ }
164
+ return [
165
+ core.nodePasteRule({
166
+ find: YOUTUBE_REGEX_GLOBAL,
167
+ type: this.type,
168
+ getAttributes: match => {
169
+ return { src: match.input };
170
+ },
171
+ }),
172
+ ];
173
+ },
174
+ renderHTML({ HTMLAttributes }) {
175
+ const embedUrl = getEmbedUrlFromYoutubeUrl({
176
+ url: HTMLAttributes.src,
177
+ allowFullscreen: this.options.allowFullscreen,
178
+ autoplay: this.options.autoplay,
179
+ ccLanguage: this.options.ccLanguage,
180
+ ccLoadPolicy: this.options.ccLoadPolicy,
181
+ controls: this.options.controls,
182
+ disableKBcontrols: this.options.disableKBcontrols,
183
+ enableIFrameApi: this.options.enableIFrameApi,
184
+ endTime: this.options.endTime,
185
+ interfaceLanguage: this.options.interfaceLanguage,
186
+ ivLoadPolicy: this.options.ivLoadPolicy,
187
+ loop: this.options.loop,
188
+ modestBranding: this.options.modestBranding,
189
+ nocookie: this.options.nocookie,
190
+ origin: this.options.origin,
191
+ playlist: this.options.playlist,
192
+ progressBarColor: this.options.progressBarColor,
193
+ startAt: HTMLAttributes.start || 0,
194
+ });
195
+ HTMLAttributes.src = embedUrl;
196
+ return [
197
+ 'div',
198
+ { 'data-youtube-video': '' },
199
+ [
200
+ 'iframe',
201
+ core.mergeAttributes(this.options.HTMLAttributes, {
202
+ width: this.options.width,
203
+ height: this.options.height,
204
+ allowfullscreen: this.options.allowFullscreen,
205
+ autoplay: this.options.autoplay,
206
+ ccLanguage: this.options.ccLanguage,
207
+ ccLoadPolicy: this.options.ccLoadPolicy,
208
+ disableKBcontrols: this.options.disableKBcontrols,
209
+ enableIFrameApi: this.options.enableIFrameApi,
210
+ endTime: this.options.endTime,
211
+ interfaceLanguage: this.options.interfaceLanguage,
212
+ ivLoadPolicy: this.options.ivLoadPolicy,
213
+ loop: this.options.loop,
214
+ modestBranding: this.options.modestBranding,
215
+ origin: this.options.origin,
216
+ playlist: this.options.playlist,
217
+ progressBarColor: this.options.progressBarColor,
218
+ }, HTMLAttributes),
219
+ ],
220
+ ];
221
+ },
222
+ });
248
223
 
249
- exports.Youtube = Youtube; exports.default = src_default;
224
+ exports.Youtube = Youtube;
225
+ exports["default"] = Youtube;
226
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../src/utils.ts","../src/youtube.ts"],"sourcesContent":["export const YOUTUBE_REGEX = /^(https?:\\/\\/)?(www\\.|music\\.)?(youtube\\.com|youtu\\.be)(.+)?$/\nexport const YOUTUBE_REGEX_GLOBAL = /^(https?:\\/\\/)?(www\\.|music\\.)?(youtube\\.com|youtu\\.be)(.+)?$/g\n\nexport const isValidYoutubeUrl = (url: string) => {\n return url.match(YOUTUBE_REGEX)\n}\n\nexport interface GetEmbedUrlOptions {\n url: string;\n allowFullscreen?: boolean;\n autoplay?: boolean;\n ccLanguage?:string;\n ccLoadPolicy?:boolean;\n controls?: boolean;\n disableKBcontrols?: boolean,\n enableIFrameApi?: boolean;\n endTime?: number;\n interfaceLanguage?: string;\n ivLoadPolicy?: number;\n loop?: boolean;\n modestBranding?: boolean;\n nocookie?: boolean;\n origin?: string;\n playlist?: string;\n progressBarColor?: string;\n startAt?: number;\n}\n\nexport const getYoutubeEmbedUrl = (nocookie?: boolean) => {\n return nocookie ? 'https://www.youtube-nocookie.com/embed/' : 'https://www.youtube.com/embed/'\n}\n\nexport const getEmbedUrlFromYoutubeUrl = (options: GetEmbedUrlOptions) => {\n const {\n url,\n allowFullscreen,\n autoplay,\n ccLanguage,\n ccLoadPolicy,\n controls,\n disableKBcontrols,\n enableIFrameApi,\n endTime,\n interfaceLanguage,\n ivLoadPolicy,\n loop,\n modestBranding,\n nocookie,\n origin,\n playlist,\n progressBarColor,\n startAt,\n } = options\n\n // if is already an embed url, return it\n if (url.includes('/embed/')) {\n return url\n }\n\n // if is a youtu.be url, get the id after the /\n if (url.includes('youtu.be')) {\n const id = url.split('/').pop()\n\n if (!id) {\n return null\n }\n return `${getYoutubeEmbedUrl(nocookie)}${id}`\n }\n\n const videoIdRegex = /v=([-\\w]+)/gm\n const matches = videoIdRegex.exec(url)\n\n if (!matches || !matches[1]) {\n return null\n }\n\n let outputUrl = `${getYoutubeEmbedUrl(nocookie)}${matches[1]}`\n\n const params = []\n\n if (allowFullscreen === false) {\n params.push('fs=0')\n }\n\n if (autoplay) {\n params.push('autoplay=1')\n }\n\n if (ccLanguage) {\n params.push(`cc_lang_pref=${ccLanguage}`)\n }\n\n if (ccLoadPolicy) {\n params.push('cc_load_policy=1')\n }\n\n if (!controls) {\n params.push('controls=0')\n }\n\n if (disableKBcontrols) {\n params.push('disablekb=1')\n }\n\n if (enableIFrameApi) {\n params.push('enablejsapi=1')\n }\n\n if (endTime) {\n params.push(`end=${endTime}`)\n }\n\n if (interfaceLanguage) {\n params.push(`hl=${interfaceLanguage}`)\n }\n\n if (ivLoadPolicy) {\n params.push(`iv_load_policy=${ivLoadPolicy}`)\n }\n\n if (loop) {\n params.push('loop=1')\n }\n\n if (modestBranding) {\n params.push('modestbranding=1')\n }\n\n if (origin) {\n params.push(`origin=${origin}`)\n }\n\n if (playlist) {\n params.push(`playlist=${playlist}`)\n }\n\n if (startAt) {\n params.push(`start=${startAt}`)\n }\n\n if (progressBarColor) {\n params.push(`color=${progressBarColor}`)\n }\n\n if (params.length) {\n outputUrl += `?${params.join('&')}`\n }\n\n return outputUrl\n}\n","import { mergeAttributes, Node, nodePasteRule } from '@tiptap/core'\n\nimport { getEmbedUrlFromYoutubeUrl, isValidYoutubeUrl, YOUTUBE_REGEX_GLOBAL } from './utils'\n\nexport interface YoutubeOptions {\n addPasteHandler: boolean;\n allowFullscreen: boolean;\n autoplay: boolean;\n ccLanguage?: string;\n ccLoadPolicy?: boolean;\n controls: boolean;\n disableKBcontrols: boolean;\n enableIFrameApi: boolean;\n endTime: number;\n height: number;\n interfaceLanguage?: string;\n ivLoadPolicy: number;\n loop: boolean;\n modestBranding: boolean;\n HTMLAttributes: Record<string, any>;\n inline: boolean;\n nocookie: boolean;\n origin: string;\n playlist: string;\n progressBarColor?: string;\n width: number;\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n youtube: {\n /**\n * Insert a youtube video\n */\n setYoutubeVideo: (options: { src: string, width?: number, height?: number, start?: number }) => ReturnType,\n }\n }\n}\n\nexport const Youtube = Node.create<YoutubeOptions>({\n name: 'youtube',\n\n addOptions() {\n return {\n addPasteHandler: true,\n allowFullscreen: true,\n autoplay: false,\n ccLanguage: undefined,\n ccLoadPolicy: undefined,\n controls: true,\n disableKBcontrols: false,\n enableIFrameApi: false,\n endTime: 0,\n height: 480,\n interfaceLanguage: undefined,\n ivLoadPolicy: 0,\n loop: false,\n modestBranding: false,\n HTMLAttributes: {},\n inline: false,\n nocookie: false,\n origin: '',\n playlist: '',\n progressBarColor: undefined,\n width: 640,\n }\n },\n\n inline() {\n return this.options.inline\n },\n\n group() {\n return this.options.inline ? 'inline' : 'block'\n },\n\n draggable: true,\n\n addAttributes() {\n return {\n src: {\n default: null,\n },\n start: {\n default: 0,\n },\n width: {\n default: this.options.width,\n },\n height: {\n default: this.options.height,\n },\n }\n },\n\n parseHTML() {\n return [\n {\n tag: 'div[data-youtube-video] iframe',\n },\n ]\n },\n\n addCommands() {\n return {\n setYoutubeVideo: options => ({ commands }) => {\n if (!isValidYoutubeUrl(options.src)) {\n return false\n }\n\n return commands.insertContent({\n type: this.name,\n attrs: options,\n })\n },\n }\n },\n\n addPasteRules() {\n if (!this.options.addPasteHandler) {\n return []\n }\n\n return [\n nodePasteRule({\n find: YOUTUBE_REGEX_GLOBAL,\n type: this.type,\n getAttributes: match => {\n return { src: match.input }\n },\n }),\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n const embedUrl = getEmbedUrlFromYoutubeUrl({\n url: HTMLAttributes.src,\n allowFullscreen: this.options.allowFullscreen,\n autoplay: this.options.autoplay,\n ccLanguage: this.options.ccLanguage,\n ccLoadPolicy: this.options.ccLoadPolicy,\n controls: this.options.controls,\n disableKBcontrols: this.options.disableKBcontrols,\n enableIFrameApi: this.options.enableIFrameApi,\n endTime: this.options.endTime,\n interfaceLanguage: this.options.interfaceLanguage,\n ivLoadPolicy: this.options.ivLoadPolicy,\n loop: this.options.loop,\n modestBranding: this.options.modestBranding,\n nocookie: this.options.nocookie,\n origin: this.options.origin,\n playlist: this.options.playlist,\n progressBarColor: this.options.progressBarColor,\n startAt: HTMLAttributes.start || 0,\n })\n\n HTMLAttributes.src = embedUrl\n\n return [\n 'div',\n { 'data-youtube-video': '' },\n [\n 'iframe',\n mergeAttributes(\n this.options.HTMLAttributes,\n {\n width: this.options.width,\n height: this.options.height,\n allowfullscreen: this.options.allowFullscreen,\n autoplay: this.options.autoplay,\n ccLanguage: this.options.ccLanguage,\n ccLoadPolicy: this.options.ccLoadPolicy,\n disableKBcontrols: this.options.disableKBcontrols,\n enableIFrameApi: this.options.enableIFrameApi,\n endTime: this.options.endTime,\n interfaceLanguage: this.options.interfaceLanguage,\n ivLoadPolicy: this.options.ivLoadPolicy,\n loop: this.options.loop,\n modestBranding: this.options.modestBranding,\n origin: this.options.origin,\n playlist: this.options.playlist,\n progressBarColor: this.options.progressBarColor,\n },\n HTMLAttributes,\n ),\n ],\n ]\n },\n})\n"],"names":["Node","nodePasteRule","mergeAttributes"],"mappings":";;;;;;AAAO,MAAM,aAAa,GAAG,+DAA+D,CAAA;AACrF,MAAM,oBAAoB,GAAG,gEAAgE,CAAA;AAE7F,MAAM,iBAAiB,GAAG,CAAC,GAAW,KAAI;AAC/C,IAAA,OAAO,GAAG,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;AACjC,CAAC,CAAA;AAuBM,MAAM,kBAAkB,GAAG,CAAC,QAAkB,KAAI;IACvD,OAAO,QAAQ,GAAG,yCAAyC,GAAG,gCAAgC,CAAA;AAChG,CAAC,CAAA;AAEM,MAAM,yBAAyB,GAAG,CAAC,OAA2B,KAAI;AACvE,IAAA,MAAM,EACJ,GAAG,EACH,eAAe,EACf,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,iBAAiB,EACjB,eAAe,EACf,OAAO,EACP,iBAAiB,EACjB,YAAY,EACZ,IAAI,EACJ,cAAc,EACd,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,gBAAgB,EAChB,OAAO,GACR,GAAG,OAAO,CAAA;;AAGX,IAAA,IAAI,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;AAC3B,QAAA,OAAO,GAAG,CAAA;AACX,KAAA;;AAGD,IAAA,IAAI,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE;QAC5B,MAAM,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAA;QAE/B,IAAI,CAAC,EAAE,EAAE;AACP,YAAA,OAAO,IAAI,CAAA;AACZ,SAAA;QACD,OAA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