@clickview/exchange 0.6.1-rc.9 → 0.7.1
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/bundles.json +1 -1
- package/dist/languages/en.json +1 -1
- package/dist/scripts/{127-c473c4f98d-exchange.chunk.js → 127-a6c0df48ef-exchange.chunk.js} +1 -1
- package/dist/scripts/255-2b234a0065-exchange.chunk.js +2 -0
- package/dist/scripts/{439-98cfc72c39-exchange.chunk.js → 439-777020cc52-exchange.chunk.js} +1 -1
- package/dist/scripts/544-83b6b4c75b-exchange.chunk.js +1 -0
- package/dist/scripts/63-dcc39d9466-exchange.chunk.js +1 -0
- package/dist/scripts/636-ce1f722491-exchange.chunk.js +2 -0
- package/dist/scripts/665-9904fe4289-exchange.chunk.js +2 -0
- package/dist/scripts/690-3160f8eef6-exchange.chunk.js +1 -0
- package/dist/scripts/{806-df16fc5522-exchange.chunk.js → 806-88a8027836-exchange.chunk.js} +1 -1
- package/dist/scripts/85-908fd21b01-exchange.chunk.js +1 -0
- package/dist/scripts/{665-cd59bb01aa-exchange.chunk.js → 923-cd7764743c-exchange.chunk.js} +1 -1
- package/dist/scripts/bundle-9688abac12.min.js +2 -0
- package/jest.config.js +11 -11
- package/package.json +39 -39
- package/typings/libs/CVLanguages.d.ts +24 -24
- package/typings/libs/cloneDeep.d.ts +4 -4
- package/typings/libs/intersection-observer.d.ts +82 -82
- package/typings/libs/trackjs.d.ts +2 -2
- package/typings/libs/videojs-contrib-quality-levels.d.ts +28 -28
- package/typings/utils/imports.d.ts +11 -11
- package/dist/scripts/24-02795fabe4-exchange.chunk.js +0 -2
- package/dist/scripts/255-93f71fd301-exchange.chunk.js +0 -2
- package/dist/scripts/544-7f576a5f4b-exchange.chunk.js +0 -1
- package/dist/scripts/63-cebc9b6ecd-exchange.chunk.js +0 -1
- package/dist/scripts/636-01b682501d-exchange.chunk.js +0 -2
- package/dist/scripts/690-89a343556e-exchange.chunk.js +0 -1
- package/dist/scripts/85-2fb0665862-exchange.chunk.js +0 -1
- package/dist/scripts/bundle-c9b04dc087.min.js +0 -2
- /package/dist/css/{24-exchange-74522bc90f.chunk.css → 665-exchange-74522bc90f.chunk.css} +0 -0
- /package/dist/scripts/{24-02795fabe4-exchange.chunk.js.LICENSE.txt → 255-2b234a0065-exchange.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{255-93f71fd301-exchange.chunk.js.LICENSE.txt → 636-ce1f722491-exchange.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{636-01b682501d-exchange.chunk.js.LICENSE.txt → 665-9904fe4289-exchange.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{bundle-c9b04dc087.min.js.LICENSE.txt → bundle-9688abac12.min.js.LICENSE.txt} +0 -0
package/jest.config.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const getBaseConfig = require('../../libs/testing/jest.base.config');
|
|
2
|
-
const { compilerOptions } = require('./tsconfig');
|
|
3
|
-
|
|
4
|
-
const paths = {
|
|
5
|
-
...compilerOptions.paths,
|
|
6
|
-
'shared/*': ['./src/shared/*'],
|
|
7
|
-
'apps/*': ['./src/apps/*']
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
delete paths['*'];
|
|
11
|
-
|
|
1
|
+
const getBaseConfig = require('../../libs/testing/jest.base.config');
|
|
2
|
+
const { compilerOptions } = require('./tsconfig');
|
|
3
|
+
|
|
4
|
+
const paths = {
|
|
5
|
+
...compilerOptions.paths,
|
|
6
|
+
'shared/*': ['./src/shared/*'],
|
|
7
|
+
'apps/*': ['./src/apps/*']
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
delete paths['*'];
|
|
11
|
+
|
|
12
12
|
module.exports = getBaseConfig(paths);
|
package/package.json
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@clickview/exchange",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "ClickView exchange",
|
|
5
|
-
"main": "dist/scripts/bundle.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"start": "cross-env NODE_ENV=development webpack -w --config ./tooling/webpack.config.js",
|
|
8
|
-
"build": "cross-env NODE_ENV=production webpack --config ./tooling/webpack.config.js",
|
|
9
|
-
"test": "jest",
|
|
10
|
-
"test-watch": "jest --watch"
|
|
11
|
-
},
|
|
12
|
-
"repository": {
|
|
13
|
-
"type": "git",
|
|
14
|
-
"url": "https://gitlab.cvinternal.net/front-end/clickview"
|
|
15
|
-
},
|
|
16
|
-
"cv": {
|
|
17
|
-
"publishable": true,
|
|
18
|
-
"rebuildable": true
|
|
19
|
-
},
|
|
20
|
-
"dependencies": {
|
|
21
|
-
"moment-timezone": "0.5.43"
|
|
22
|
-
},
|
|
23
|
-
"devDependencies": {
|
|
24
|
-
"@types/moment-timezone": "0.5.30"
|
|
25
|
-
},
|
|
26
|
-
"author": "Shale Kuzmanovski",
|
|
27
|
-
"license": "ISC",
|
|
28
|
-
"babel": {
|
|
29
|
-
"presets": [
|
|
30
|
-
[
|
|
31
|
-
"@babel/preset-env",
|
|
32
|
-
{
|
|
33
|
-
"corejs": 3,
|
|
34
|
-
"useBuiltIns": "entry"
|
|
35
|
-
}
|
|
36
|
-
]
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@clickview/exchange",
|
|
3
|
+
"version": "0.7.1",
|
|
4
|
+
"description": "ClickView exchange",
|
|
5
|
+
"main": "dist/scripts/bundle.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"start": "cross-env NODE_ENV=development webpack -w --config ./tooling/webpack.config.js",
|
|
8
|
+
"build": "cross-env NODE_ENV=production webpack --config ./tooling/webpack.config.js",
|
|
9
|
+
"test": "jest",
|
|
10
|
+
"test-watch": "jest --watch"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://gitlab.cvinternal.net/front-end/clickview"
|
|
15
|
+
},
|
|
16
|
+
"cv": {
|
|
17
|
+
"publishable": true,
|
|
18
|
+
"rebuildable": true
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"moment-timezone": "0.5.43"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/moment-timezone": "0.5.30"
|
|
25
|
+
},
|
|
26
|
+
"author": "Shale Kuzmanovski",
|
|
27
|
+
"license": "ISC",
|
|
28
|
+
"babel": {
|
|
29
|
+
"presets": [
|
|
30
|
+
[
|
|
31
|
+
"@babel/preset-env",
|
|
32
|
+
{
|
|
33
|
+
"corejs": 3,
|
|
34
|
+
"useBuiltIns": "entry"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
interface SetLanguageOptions {
|
|
2
|
-
validate: boolean;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
interface LanguageSet {
|
|
6
|
-
[languagecode: string]: Language;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
interface Language {
|
|
10
|
-
englishName: string;
|
|
11
|
-
nativeName: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
interface ICVLanguages {
|
|
15
|
-
VERSION: string;
|
|
16
|
-
|
|
17
|
-
getEnglishName(languageCode: string): string;
|
|
18
|
-
getNativeName(languageCode: string): string;
|
|
19
|
-
getFullEnglishName(languageCode: string): string;
|
|
20
|
-
getFullNativeName(languageCode: string): string;
|
|
21
|
-
getEnglishNameContains(englishName: string): Language[];
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
declare let CVLanguages: ICVLanguages;
|
|
1
|
+
interface SetLanguageOptions {
|
|
2
|
+
validate: boolean;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
interface LanguageSet {
|
|
6
|
+
[languagecode: string]: Language;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface Language {
|
|
10
|
+
englishName: string;
|
|
11
|
+
nativeName: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface ICVLanguages {
|
|
15
|
+
VERSION: string;
|
|
16
|
+
|
|
17
|
+
getEnglishName(languageCode: string): string;
|
|
18
|
+
getNativeName(languageCode: string): string;
|
|
19
|
+
getFullEnglishName(languageCode: string): string;
|
|
20
|
+
getFullNativeName(languageCode: string): string;
|
|
21
|
+
getEnglishNameContains(englishName: string): Language[];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare let CVLanguages: ICVLanguages;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare function cloneDeep<T>(obj: T): T;
|
|
2
|
-
|
|
3
|
-
declare module 'lodash.clonedeep' {
|
|
4
|
-
export = cloneDeep;
|
|
1
|
+
declare function cloneDeep<T>(obj: T): T;
|
|
2
|
+
|
|
3
|
+
declare module 'lodash.clonedeep' {
|
|
4
|
+
export = cloneDeep;
|
|
5
5
|
}
|
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
// https://wicg.github.io/IntersectionObserver/#intersection-observer-private-slots
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
callback IntersectionObserverCallback = void (sequence<IntersectionObserverEntry> entries, IntersectionObserver observer)
|
|
5
|
-
|
|
6
|
-
[Constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options),
|
|
7
|
-
Exposed=Window]
|
|
8
|
-
interface IntersectionObserver {
|
|
9
|
-
readonly attribute Element? root;
|
|
10
|
-
readonly attribute DOMString rootMargin;
|
|
11
|
-
readonly attribute sequence<double> thresholds;
|
|
12
|
-
void observe(Element target);
|
|
13
|
-
void unobserve(Element target);
|
|
14
|
-
void disconnect();
|
|
15
|
-
sequence<IntersectionObserverEntry> takeRecords();
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
[Constructor(IntersectionObserverEntryInit intersectionObserverEntryInit)]
|
|
19
|
-
interface IntersectionObserverEntry {
|
|
20
|
-
readonly attribute DOMHighResTimeStamp time;
|
|
21
|
-
readonly attribute DOMRectReadOnly rootBounds;
|
|
22
|
-
readonly attribute DOMRectReadOnly boundingClientRect;
|
|
23
|
-
readonly attribute DOMRectReadOnly intersectionRect;
|
|
24
|
-
readonly attribute double intersectionRatio;
|
|
25
|
-
readonly attribute Element target;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
dictionary IntersectionObserverEntryInit {
|
|
29
|
-
required DOMHighResTimeStamp time;
|
|
30
|
-
required DOMRectInit rootBounds;
|
|
31
|
-
required DOMRectInit boundingClientRect;
|
|
32
|
-
required DOMRectInit intersectionRect;
|
|
33
|
-
required double intersectionRatio;
|
|
34
|
-
required Element target;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
dictionary IntersectionObserverInit {
|
|
38
|
-
Element? root = null;
|
|
39
|
-
DOMString rootMargin = "0px";
|
|
40
|
-
(double or sequence<double>) threshold = 0;
|
|
41
|
-
};
|
|
42
|
-
*/
|
|
43
|
-
|
|
44
|
-
interface Bounds {
|
|
45
|
-
readonly height: number;
|
|
46
|
-
readonly width: number;
|
|
47
|
-
readonly top: number;
|
|
48
|
-
readonly left: number;
|
|
49
|
-
readonly right: number;
|
|
50
|
-
readonly bottom: number;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
interface IntersectionObserverEntry {
|
|
54
|
-
readonly time: number;
|
|
55
|
-
readonly rootBounds: Bounds;
|
|
56
|
-
readonly boundingClientRect: Bounds;
|
|
57
|
-
readonly intersectionRect: Bounds;
|
|
58
|
-
readonly intersectionRatio: number;
|
|
59
|
-
readonly target: Element;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
type IntersectionObserverCallback = (entries: IntersectionObserverEntry[], observer: IntersectionObserver) => void;
|
|
63
|
-
|
|
64
|
-
interface IntersectionObserverInit {
|
|
65
|
-
root?: Element | null;
|
|
66
|
-
rootMargin?: string;
|
|
67
|
-
threshold?: number;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
declare class IntersectionObserver {
|
|
71
|
-
readonly root: Element | null;
|
|
72
|
-
readonly rootMargin: string;
|
|
73
|
-
readonly thresholds: number[];
|
|
74
|
-
|
|
75
|
-
constructor(callback: IntersectionObserverCallback, options?: IntersectionObserverInit);
|
|
76
|
-
|
|
77
|
-
observe(target: Element): void;
|
|
78
|
-
unobserve(target: Element): void;
|
|
79
|
-
disconnect(): void;
|
|
80
|
-
takeRecords(): IntersectionObserverEntry[];
|
|
81
|
-
}
|
|
82
|
-
|
|
1
|
+
// https://wicg.github.io/IntersectionObserver/#intersection-observer-private-slots
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
callback IntersectionObserverCallback = void (sequence<IntersectionObserverEntry> entries, IntersectionObserver observer)
|
|
5
|
+
|
|
6
|
+
[Constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options),
|
|
7
|
+
Exposed=Window]
|
|
8
|
+
interface IntersectionObserver {
|
|
9
|
+
readonly attribute Element? root;
|
|
10
|
+
readonly attribute DOMString rootMargin;
|
|
11
|
+
readonly attribute sequence<double> thresholds;
|
|
12
|
+
void observe(Element target);
|
|
13
|
+
void unobserve(Element target);
|
|
14
|
+
void disconnect();
|
|
15
|
+
sequence<IntersectionObserverEntry> takeRecords();
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
[Constructor(IntersectionObserverEntryInit intersectionObserverEntryInit)]
|
|
19
|
+
interface IntersectionObserverEntry {
|
|
20
|
+
readonly attribute DOMHighResTimeStamp time;
|
|
21
|
+
readonly attribute DOMRectReadOnly rootBounds;
|
|
22
|
+
readonly attribute DOMRectReadOnly boundingClientRect;
|
|
23
|
+
readonly attribute DOMRectReadOnly intersectionRect;
|
|
24
|
+
readonly attribute double intersectionRatio;
|
|
25
|
+
readonly attribute Element target;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
dictionary IntersectionObserverEntryInit {
|
|
29
|
+
required DOMHighResTimeStamp time;
|
|
30
|
+
required DOMRectInit rootBounds;
|
|
31
|
+
required DOMRectInit boundingClientRect;
|
|
32
|
+
required DOMRectInit intersectionRect;
|
|
33
|
+
required double intersectionRatio;
|
|
34
|
+
required Element target;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
dictionary IntersectionObserverInit {
|
|
38
|
+
Element? root = null;
|
|
39
|
+
DOMString rootMargin = "0px";
|
|
40
|
+
(double or sequence<double>) threshold = 0;
|
|
41
|
+
};
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
interface Bounds {
|
|
45
|
+
readonly height: number;
|
|
46
|
+
readonly width: number;
|
|
47
|
+
readonly top: number;
|
|
48
|
+
readonly left: number;
|
|
49
|
+
readonly right: number;
|
|
50
|
+
readonly bottom: number;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
interface IntersectionObserverEntry {
|
|
54
|
+
readonly time: number;
|
|
55
|
+
readonly rootBounds: Bounds;
|
|
56
|
+
readonly boundingClientRect: Bounds;
|
|
57
|
+
readonly intersectionRect: Bounds;
|
|
58
|
+
readonly intersectionRatio: number;
|
|
59
|
+
readonly target: Element;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
type IntersectionObserverCallback = (entries: IntersectionObserverEntry[], observer: IntersectionObserver) => void;
|
|
63
|
+
|
|
64
|
+
interface IntersectionObserverInit {
|
|
65
|
+
root?: Element | null;
|
|
66
|
+
rootMargin?: string;
|
|
67
|
+
threshold?: number;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
declare class IntersectionObserver {
|
|
71
|
+
readonly root: Element | null;
|
|
72
|
+
readonly rootMargin: string;
|
|
73
|
+
readonly thresholds: number[];
|
|
74
|
+
|
|
75
|
+
constructor(callback: IntersectionObserverCallback, options?: IntersectionObserverInit);
|
|
76
|
+
|
|
77
|
+
observe(target: Element): void;
|
|
78
|
+
unobserve(target: Element): void;
|
|
79
|
+
disconnect(): void;
|
|
80
|
+
takeRecords(): IntersectionObserverEntry[];
|
|
81
|
+
}
|
|
82
|
+
|
|
83
83
|
export = IntersectionObserver;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare namespace trackJs {
|
|
2
|
-
declare function track(error: string | Error): void;
|
|
1
|
+
declare namespace trackJs {
|
|
2
|
+
declare function track(error: string | Error): void;
|
|
3
3
|
}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import videojs from 'video.js';
|
|
2
|
-
|
|
3
|
-
declare module 'video.js' {
|
|
4
|
-
export interface VideoJsPlayer {
|
|
5
|
-
qualityLevels(): QualityLevelList;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
declare module 'videojs-contrib-quality-levels' {
|
|
10
|
-
export interface QualityLevelList extends videojs.EventTarget {
|
|
11
|
-
[id: string]: QualityLevel;
|
|
12
|
-
selectedIndex: number;
|
|
13
|
-
length: number;
|
|
14
|
-
addQualityLevel(representation: Representation): QualityLevel;
|
|
15
|
-
removeQualityLevel(qualityLevel: QualityLevel): QualityLevel;
|
|
16
|
-
getQualityLevelById(id: string): QualityLevel;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface QualityLevel {
|
|
20
|
-
id: string;
|
|
21
|
-
label: string;
|
|
22
|
-
enabled: boolean;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface Representation {
|
|
26
|
-
id: string;
|
|
27
|
-
enabled(enabled: boolean): boolean;
|
|
28
|
-
}
|
|
1
|
+
import videojs from 'video.js';
|
|
2
|
+
|
|
3
|
+
declare module 'video.js' {
|
|
4
|
+
export interface VideoJsPlayer {
|
|
5
|
+
qualityLevels(): QualityLevelList;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare module 'videojs-contrib-quality-levels' {
|
|
10
|
+
export interface QualityLevelList extends videojs.EventTarget {
|
|
11
|
+
[id: string]: QualityLevel;
|
|
12
|
+
selectedIndex: number;
|
|
13
|
+
length: number;
|
|
14
|
+
addQualityLevel(representation: Representation): QualityLevel;
|
|
15
|
+
removeQualityLevel(qualityLevel: QualityLevel): QualityLevel;
|
|
16
|
+
getQualityLevelById(id: string): QualityLevel;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface QualityLevel {
|
|
20
|
+
id: string;
|
|
21
|
+
label: string;
|
|
22
|
+
enabled: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface Representation {
|
|
26
|
+
id: string;
|
|
27
|
+
enabled(enabled: boolean): boolean;
|
|
28
|
+
}
|
|
29
29
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Define our templates as a module so that we can use
|
|
3
|
-
* import statements just the same as we do for other
|
|
4
|
-
* ts/js code.
|
|
5
|
-
*/
|
|
6
|
-
declare module '*.scss';
|
|
7
|
-
declare module '*.svg';
|
|
8
|
-
|
|
9
|
-
declare module '*.json' {
|
|
10
|
-
export const value: any;
|
|
11
|
-
export default value;
|
|
1
|
+
/**
|
|
2
|
+
* Define our templates as a module so that we can use
|
|
3
|
+
* import statements just the same as we do for other
|
|
4
|
+
* ts/js code.
|
|
5
|
+
*/
|
|
6
|
+
declare module '*.scss';
|
|
7
|
+
declare module '*.svg';
|
|
8
|
+
|
|
9
|
+
declare module '*.json' {
|
|
10
|
+
export const value: any;
|
|
11
|
+
export default value;
|
|
12
12
|
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 24-02795fabe4-exchange.chunk.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[24],{23201:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(32735),a=r(92802),o=r(2102),i=r(83345),c=r(33936),l="shared.formButtons";function s(e){var t=(0,a.u6)(),r=(0,c.l)(t);return n.createElement(o.m,{variant:e.variant||"primary",type:"submit",disabled:!r,size:e.size,className:e.className?e.className:"",showSpinner:t.isSubmitting},e.submitText?n.createElement(n.Fragment,null,e.submitText):n.createElement(i.x,{namespace:l,phrase:e.isNew?"create":"save"}))}},1269:(e,t,r)=>{r.d(t,{n:()=>w,W:()=>O});var n=r(32735),a=r(22583),o=r(92802),i=r(79014),c=r(1048),l=r(57408),s=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r};function u(e){var t=e.label,r=e.checkboxLabelClassName,o=e.checkboxLabelFontWeight,i=e.className,c=s(e,["label","checkboxLabelClassName","checkboxLabelFontWeight","className"]);return n.createElement(a.Z.Group,null,n.createElement("div",{className:"custom-control custom-checkbox ".concat(i)},n.createElement(w,Object.assign({className:"custom-control-input"},c)),n.createElement(a.Z.Label,{className:"custom-control-label cursor-pointer ".concat("normal"===o?"font-weight-normal":""," \n ").concat(r),htmlFor:c.id},t),e.checkboxAppLink&&e.checkboxAppLinkText&&n.createElement(n.Fragment,null,n.createElement("span",null," "),n.createElement(l.F,{appLink:e.checkboxAppLink,className:"info-link"},e.checkboxAppLinkText))))}var f=r(83914),m=r(83345),p={getCustomFormControlClassName:function(e,t,r,n,a){var i="form-control";return"sm"===n&&(i+=" form-control-sm"),"lg"===n&&(i+=" form-control-lg"),(0,o.u9)(t,r)&&(0,o.u9)(e,r)&&(i+=" is-invalid"),a&&(i+=" ".concat(a)),i}},d=r(35223);function v(e){var t=(0,o.u6)().values[e.fieldName];return"string"!=typeof t?n.createElement(n.Fragment,null):n.createElement("div",{className:"float-right text-muted font-weight-normal"},t.length,"/",e.limit," characters")}const y={revealPassword:"jCfI0",passwordInput:"RBJnf",passwordContainer:"d78lK",passwordContainerDisabled:"asbVo",infoTooltip:"wzyOG"};function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var b=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r},g="shared.formField";function w(e){var t,r,a=e.children,l=b(e,["children"]),s=(t=n.useState(e.type),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(t,r)||function(e,t){if(e){if("string"==typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=s[0],m=s[1],p=i.q.isFunction(a)?function(e){return a(e)}:n.Children.count(a)?a:null;if("password"!==l.type)return n.createElement(o.gN,Object.assign({},c.t.omit(l,["formSize"])),p);var v="position-relative ".concat(y.passwordContainer);return l.className&&(v+=" ".concat(l.className)),l.disabled&&(v+=" ".concat(y.passwordContainerDisabled)),n.createElement("div",{className:v},n.createElement(o.gN,Object.assign({},c.t.omit(l,["formSize","type","className"]),{type:u,className:"".concat(y.passwordInput," border-0 w-100 h-100 outline-none rounded")}),p),"password"===l.type&&n.createElement(f.x,{svgName:"password"===u?d.vn.VisibleOn:d.vn.VisibleOff,className:"svg-container cursor-pointer ".concat(y.revealPassword),onClick:function(){m("password"===u?"text":"password")}}))}function O(e){var t=e.label,r=e.className,i=e.showCharacterCounter,l=e.showRequiredStar,s=e.infoTooltip,h=e.infoTooltipPlacement,O=e.infoText,E=e.formSize,S=e.showOptionalLabel,x=b(e,["label","className","showCharacterCounter","showRequiredStar","infoTooltip","infoTooltipPlacement","infoText","formSize","showOptionalLabel"]),j=(0,o.u6)(),k=j.errors,P=j.touched,N=function(){};if("checkbox"===x.type){var T=c.t.omit(e,["formSize","infoTooltipPlacement"]);return e.disabled&&(T.onChange=N),n.createElement(u,Object.assign({},T))}var C=Object.assign(Object.assign({},x),{className:p.getCustomFormControlClassName(k,P,x.name,E,r)});return e.disabled&&(C.onChange=N),n.createElement(a.Z.Group,null,!!t&&n.createElement(a.Z.Label,{htmlFor:x.id,className:"d-flex align-items-center"},t,l&&n.createElement("span",{className:"text-danger"},"*"),s&&n.createElement(f.x,{className:"svg-container text-muted ".concat(y.infoTooltip),svgName:d.vn.Info,title:s,tooltipPlacement:h,tooltipSpanHack:!0}),S&&n.createElement("span",{className:"text-muted"}," ",n.createElement(m.x,{namespace:g,phrase:"optional"})),!!i&&!!x.maxLength&&n.createElement("div",{className:"ml-auto"},n.createElement(v,{fieldName:x.name,limit:x.maxLength}))),n.createElement(w,Object.assign({},C)),!!O&&n.createElement(a.Z.Text,{className:"text-muted"},O),n.createElement(o.Bc,{name:x.name},(function(e){return n.createElement(a.Z.Control.Feedback,{type:"invalid"},e)})))}w.defaultProps={autoComplete:"off"},O.defaultProps={autoComplete:"off",infoTooltipPlacement:"top"}},82644:(e,t,r)=>{r.d(t,{n:()=>s});var n=r(32735),a=r(92802),o=r(79014),i=r(1048);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var l=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r};function s(e){var t=e.castInitialValues,r=e.castValuesOnSubmit,s=e.initialValues,u=e.onSubmit,f=l(e,["castInitialValues","castValuesOnSubmit","initialValues","onSubmit"]),m=t&&e.validationSchema?e.validationSchema.cast(function(e){if(!e)return{};var t=i.t.deepClone(e);return function e(r){Object.keys(t).forEach((function(n){t.hasOwnProperty(n)&&(i.t.isObject(r[n])?e(r[n]):null===t[n]&&delete t[n])}))}(t),t}(s)):s,p={allowInitialSubmit:e.allowInitialSubmit};return n.createElement(a.J9,Object.assign({enableReinitialize:!0},f,{initialValues:m,onSubmit:function(t,n){var a=n.setSubmitting,o=n.resetForm,i=n.setFieldError,l=r&&e.validationSchema?e.validationSchema.cast(t):t;u(l,(function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(r.reset&&o(),r.errors)for(var n=0,l=Object.entries(r.errors);n<l.length;n++){var s=(e=l[n],t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=s[0],f=s[1];i(u,f)}a(!1)}))},initialStatus:p}),o.q.isFunction(e.children)?function(t){return e.children(t)}:n.Children.count(e.children)?e.children:null)}s.defaultProps={castInitialValues:!0,castValuesOnSubmit:!0}},55110:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(79976),a=r(60139),o=r(32735),i=r(71365);function c(){var e,t,r,c=(e=n.P.ALERT,t=e,r=i.u.getInstance(t),o.useEffect((function(){return function(){i.u.releaseInstance(t)}})),r);return{success:function(e){c.success(e)()},error:function(e){c.error(e)()},warning:function(e){c.createAlert({type:a.NK.Warning,heading:a.R6.Warning,message:e})}}}},8712:(e,t,r)=>{r.d(t,{Y:()=>s});var n,a,o=r(23481);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function c(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===i(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}!function(e){e.AU="cv-ap-southeast-1",e.NZ="cv-ap-southeast-2",e.UK="cv-eu-west-1",e.US="cv-na-west-1"}(n||(n={}));var l=o.T.encloseNamespace("tv.regionMap"),s=(c(a={},n.AU,{tv:l("foxtel"),country:l("au"),programGuidePhraseKey:"foxtelTvGuide"}),c(a,n.UK,{tv:l("bbcRes"),country:l("uk"),programGuidePhraseKey:"bbcSearch"}),a)},5353:(e,t,r)=>{r.d(t,{i:()=>f});var n,a=r(99940),o=r(97395),i=r(110);!function(e){e[e.AllResults=0]="AllResults",e[e.Subtitles=1]="Subtitles",e[e.TitleAndDescription=2]="TitleAndDescription"}(n||(n={}));var c=r(55812);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e){return Object.entries(e).reduce((function(e,t){var r,n,a=(n=2,function(e){if(Array.isArray(e))return e}(r=t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(r,n)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=a[0],i=a[1];return e[o.charAt(0).toLowerCase()+o.slice(1)]=i,e}),{})}function u(e){return e?Array.isArray(e)?function(e){return e.map(s)}(e):s(e):null}var f={regions:function(){return{url:"/api/tv/api/v2/regions",key:"tv:regions",normalize:!1,formatData:u}},region:function(e){return{url:"/api/tv/api/v2/regions/".concat(e),key:"tv:region:".concat(e),normalize:!1,formatData:u}},dateRange:function(e){return{url:"/api/tv/api/v2/regions/".concat(e,"/daterange"),key:"tv:region:".concat(e,":daterange"),normalize:!1,formatData:u}},channels:function(e){return{url:o._.urlBuilder("/api/tv/api/v2/channels",{region:e}),key:"tv:channels:".concat(e),normalize:!1,formatData:function(e){return u(e).sort((function(e,t){return e.sortOrder-t.sortOrder}))}}},programsByChannel:function(e,t,r,n){return{url:o._.urlBuilder("/api/tv/api/v3/regions/".concat(e,"/channels/programs"),{channel:t,startDate:r,endDate:n}),key:["tv:programs:by:channel",e,t,r,n].join(":"),normalize:!1,formatData:u}},programsByLetter:function(e,t,r,n){return{url:o._.urlBuilder("/api/tv/api/v2/Programs",{regionCode:e,startsWith:t,startDate:r,endDate:n}),key:["tv:programs:by:letter",e,t,r,n].join(":"),normalize:!1,formatData:u}},program:function(e){return{url:"/api/tv/api/v3/programs/".concat(e),key:"tv:programs:".concat(e),normalize:!1,formatData:function(e){var t=u(e);return t.region=u(e.Region),t}}},search:function(e,t,r){var a=t.query,i=t.dateBroadcast,l=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r}(t,["query","dateBroadcast"]),s=r||1,f=l.filter||n.AllResults;return{url:o._.urlBuilder("/api/tv/api/v4/search",Object.assign(Object.assign(Object.assign({region:e,query:a,filter:f},c.a.getDateBroadcastParams(i)),l),{page:s,size:25})),key:["tv:search",a,e,Object.values(Object.assign({filter:f,dateBroadcast:i},l)).join(":"),s].join(":"),normalize:!1,formatData:function(e){var t=u(e);return t.results=u(e.Results),t.page=s,t}}},addFullVideo:function(e,t){return{url:"/api/tv/api/v2/workspace/video",key:"tv:add:full:video",normalize:!1,type:a.k.POST,data:e,invalidationKeys:"tv:workspace:video:".concat(t)}},addAdFreeVideo:function(e,t){return{url:o._.urlBuilder("/api/tv/v4/programs/".concat(e.id,"/ad-free"),{customerId:e.customerId,userId:e.userId}),key:"tv:add:ad:free:video",normalize:!1,type:a.k.POST,invalidationKeys:"tv:workspace:video:".concat(t)}},adFreeCredits:function(e,t){var r=new Date;r.setHours(0,0,0,0),r.setMinutes(r.getMinutes()+r.getTimezoneOffset());var n=i.O.add(r,1,"day");return{url:o._.urlBuilder("/api/tv/api/v1/user-requests",{username:e,region:t,from:i.O.convertUTCToLocal(r).toISOString(),to:i.O.convertUTCToLocal(n).toISOString()}),key:"tv:add:free:credits",normalize:!1,formatData:u}},createAdFreeRequest:function(e){return{url:o._.urlBuilder("/api/tv/v4/user-requests/ad-free",{userId:e.userId,customerId:e.customerId}),key:"tv:create:add:free:request",normalize:!1,type:a.k.POST,data:{programId:e.programId,regionCode:e.regionCode},invalidationKeys:["tv:add:free:credits"]}},workspaceVideo:function(e,t,r){return{url:o._.urlBuilder("/api/tv/v4/workspace/programs/".concat(e),{userId:t,customerId:r}),key:"tv:workspace:video:".concat(e),formatData:u}},requestProgram:function(e){return{url:"/api/tv/v1/pay-tv/user-requests",key:"tv:request:program",type:a.k.POST,data:e}}}},55812:(e,t,r)=>{r.d(t,{a:()=>a});var n=r(110),a={getFormattedDateRange:function(e,t){return"".concat(n.O.format(e,"Do MMMM yyyy")," - ").concat(n.O.format(t,"Do MMMM yyyy"))},getDateBroadcastParams:function(e){var t=function(e){return n.O.format(e,"YYYY-MM-DD")},r=t(new Date);switch(e){case"yesterday":return{from:t(n.O.subtract(r,1,"day")),to:r};case"last-week":return{from:t(n.O.subtract(r,7,"days")),to:r};case"last-2-weeks":return{from:t(n.O.subtract(r,14,"days")),to:r}}}}},10024:(e,t,r)=>{r.r(t),r.d(t,{TvRequestProgramView:()=>A});var n=r(32735),a=r(23481),o=r(20354),i=r(110),c=r(49985),l=r(65858),s=r(82644),u=r(21132),f=r(83345),m=r(31949),p=r(55110),d=r(8712),v=r(5353),y=r(5173),h=a.T.encloseNamespace("tv.requestProgramValidation"),b=r(92802),g=r(23201),w=r(1269),O=r(13876),E="tv.requestProgramForm",S=a.T.encloseNamespace(E);function x(e){var t=(0,b.u6)(),r=i.O.format(i.O.add(new Date,3,"days"),"YYYY-MM-DD"),o=i.O.format(i.O.add(r,11,"days"),"YYYY-MM-DD");return n.createElement(b.l0,null,n.createElement(w.W,{as:"select",label:S("channelLabel"),name:"channelId",value:t.values.channelId,showRequiredStar:!0},n.createElement("option",{key:0,value:""},a.T.getPhrase(E,"channelPlaceholder")),e.channels.map((function(e){return n.createElement("option",{key:e.id,value:e.id},e.displayName)}))),n.createElement(w.W,{label:S("programLabel"),placeholder:S("programPlaceholder"),type:"text",name:"title",value:t.values.title,showRequiredStar:!0}),n.createElement("div",{className:"d-flex"},n.createElement("div",{className:"w-50 mr-2"},n.createElement(w.W,{label:S("broadcastDateLabel"),type:"date",name:"broadcastDate",value:t.values.broadcastDate,min:r,max:o,showRequiredStar:!0})),n.createElement("div",{className:"w-50"},n.createElement(w.W,{label:S("broadcastTimeLabel"),type:"time",name:"broadcastTime",value:t.values.broadcastTime,className:"mb-0",showRequiredStar:!0}))),n.createElement("p",{className:"mt-n1"},n.createElement("small",null,n.createElement(f.x,{namespace:E,phrase:d.Y[e.instanceRegion].programGuidePhraseKey}))),n.createElement("div",{className:"d-flex"},n.createElement("div",{className:"w-50 mr-2"},n.createElement(w.W,{as:"select",label:S("ccLabel"),name:"closedCaptions",value:t.values.closedCaptions},n.createElement("option",{value:""},a.T.getPhrase(E,"ccNo")),n.createElement("option",{value:"yes"},a.T.getPhrase(E,"ccYes")))),n.createElement("div",{className:"w-50"})),n.createElement(w.W,{label:S("commentsLabel"),placeholder:S("commentsPlaceholder"),type:"text",name:"comments",value:t.values.comments}),n.createElement("p",null,n.createElement(f.x,{namespace:E,phrase:"note",options:{tv:d.Y[e.instanceRegion].tv}})),n.createElement(O.u,null,n.createElement(O.u.Cancel,{text:S("cancel"),onClick:e.onClickCancel,variant:"link"}),n.createElement(g.A,{variant:"dark",submitText:S("request")})))}function j(e){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}function k(){k=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:N(e,r,c)}),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var m="suspendedStart",p="suspendedYield",d="executing",v="completed",y={};function h(){}function b(){}function g(){}var w={};s(w,i,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(A([])));E&&E!==r&&n.call(E,i)&&(w=E);var S=g.prototype=h.prototype=Object.create(w);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(a,o,i,c){var l=f(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==j(u)&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function N(t,r,n){var a=m;return function(o,i){if(a===d)throw new Error("Generator is already running");if(a===v){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=T(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===m)throw a=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=d;var s=f(t,r,n);if("normal"===s.type){if(a=n.done?v:p,s.arg===y)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=v,n.method="throw",n.arg=s.arg)}}}function T(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=f(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function A(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(j(t)+" is not iterable")}return b.prototype=g,a(S,"constructor",{value:g,configurable:!0}),a(g,"constructor",{value:b,configurable:!0}),b.displayName=s(g,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,s(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},x(P.prototype),s(P.prototype,c,(function(){return this})),t.AsyncIterator=P,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new P(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},x(S),s(S,l,"Generator"),s(S,i,(function(){return this})),s(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=A,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:A(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var N=function(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{l(n.next(e))}catch(e){o(e)}}function c(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,c)}l((n=n.apply(e,t||[])).next())}))},T=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r},C={channelId:"",title:"",broadcastDate:"",broadcastTime:"",closedCaptions:"",comments:""},L="tv.requestProgram",I=a.T.encloseNamespace(L);function A(e){var t=o.a.useGetFetchAsync(),r=(0,p.Z)(),a=o.a.useBasicFetch(m.N.currentUser()),b=o.a.useBasicFetch(v.i.channels(e.region));return n.createElement(u.G,{title:I("title",{tv:d.Y[e.instanceRegion].tv}),closePopup:e.closePopup},n.createElement("p",null,n.createElement(f.x,{namespace:L,phrase:"description",options:{tv:d.Y[e.instanceRegion].tv,faqUrl:""}})),n.createElement("p",null,n.createElement(f.x,{namespace:L,phrase:"moreInfo",options:{tv:d.Y[e.instanceRegion].tv}})),b&&n.createElement(s.n,{initialValues:C,validationSchema:(0,y.Ry)().shape({channelId:(0,y.Z_)().required(h("channelRequired")),title:(0,y.Z_)().required(h("programRequired")),broadcastDate:(0,y.Z_)().required(h("dateRequired")),broadcastTime:(0,y.Z_)().required(h("timeRequired")),closedCaptions:(0,y.Z_)(),comments:(0,y.Z_)()}),onSubmit:function(n,o){return N(this,void 0,void 0,k().mark((function s(){var u,f,m,p,y,h,g,w,O,E,S;return k().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:u=n.broadcastDate,f=n.broadcastTime,m=n.closedCaptions,p=T(n,["broadcastDate","broadcastTime","closedCaptions"]),y=f.split(":"),j=2,h=function(e){if(Array.isArray(e))return e}(x=y)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(x,j)||function(e,t){if(e){if("string"==typeof e)return P(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?P(e,t):void 0}}(x,j)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),g=h[0],w=h[1],O=u,O=i.O.add(O,+g,"hours"),O=(O=i.O.add(O,+w,"minutes")).toISOString(),E=Object.assign(Object.assign({},p),{closedCaptions:Boolean(m),regionCode:e.region,username:a.data.username,programDateTime:O});try{t(v.i.requestProgram(E)),S=b.data.find((function(e){return String(e.id)===p.channelId})),r.success(I("success",{tv:d.Y[e.instanceRegion].tv,program:p.title,channel:S.displayName})),e.closePopup(),c.k.logUserAction({channel:S.id,name:S.name,region:e.region},{actionType:l.Vw.Submit,entity:l.py.Video,location:l.LZ.Popup,workflowPhase:l.eu.Complete,descriptor:l.MI.RequestProgram})}catch(e){r.error(I("error")),o()}case 8:case"end":return s.stop()}var x,j}),s)})))}},n.createElement(x,{onClickCancel:function(){e.closePopup()},channels:b.data,instanceRegion:e.instanceRegion})))}}}]);
|