jclic 2.1.21 → 2.1.22

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 (173) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/jclic-node.js +1 -1
  3. package/dist/jclic-node.js.map +1 -1
  4. package/dist/jclic.min.js +2 -2
  5. package/dist/jclic.min.js.map +1 -1
  6. package/package.json +1 -1
  7. package/src/GlobalData.js +1 -1
  8. package/dist/1078.jclic-node.js +0 -282
  9. package/dist/1078.jclic-node.js.map +0 -1
  10. package/dist/1196.jclic-node.js +0 -808
  11. package/dist/1196.jclic-node.js.map +0 -1
  12. package/dist/1253.jclic-node.js +0 -1432
  13. package/dist/1253.jclic-node.js.map +0 -1
  14. package/dist/13.jclic-node.js +0 -103
  15. package/dist/13.jclic-node.js.map +0 -1
  16. package/dist/1567.jclic-node.js +0 -2313
  17. package/dist/1567.jclic-node.js.map +0 -1
  18. package/dist/1588.jclic-node.js +0 -602
  19. package/dist/1588.jclic-node.js.map +0 -1
  20. package/dist/1725.jclic-node.js +0 -836
  21. package/dist/1725.jclic-node.js.map +0 -1
  22. package/dist/1731.jclic-node.js +0 -438
  23. package/dist/1731.jclic-node.js.map +0 -1
  24. package/dist/1842.jclic-node.js +0 -651
  25. package/dist/1842.jclic-node.js.map +0 -1
  26. package/dist/2160.jclic-node.js +0 -1016
  27. package/dist/2160.jclic-node.js.map +0 -1
  28. package/dist/222.jclic-node.js +0 -129
  29. package/dist/222.jclic-node.js.map +0 -1
  30. package/dist/2316.jclic-node.js +0 -949
  31. package/dist/2316.jclic-node.js.map +0 -1
  32. package/dist/2355.jclic-node.js +0 -371
  33. package/dist/2355.jclic-node.js.map +0 -1
  34. package/dist/2366.jclic-node.js +0 -431
  35. package/dist/2366.jclic-node.js.map +0 -1
  36. package/dist/2379.jclic-node.js +0 -202
  37. package/dist/2379.jclic-node.js.map +0 -1
  38. package/dist/2437.jclic-node.js +0 -450
  39. package/dist/2437.jclic-node.js.map +0 -1
  40. package/dist/2531.jclic-node.js +0 -869
  41. package/dist/2531.jclic-node.js.map +0 -1
  42. package/dist/2608.jclic-node.js +0 -160
  43. package/dist/2608.jclic-node.js.map +0 -1
  44. package/dist/2715.jclic-node.js +0 -554
  45. package/dist/2715.jclic-node.js.map +0 -1
  46. package/dist/277.jclic-node.js +0 -22
  47. package/dist/277.jclic-node.js.map +0 -1
  48. package/dist/2921.jclic-node.js +0 -660
  49. package/dist/2921.jclic-node.js.map +0 -1
  50. package/dist/2952.jclic-node.js +0 -101
  51. package/dist/2952.jclic-node.js.map +0 -1
  52. package/dist/3018.jclic-node.js +0 -421
  53. package/dist/3018.jclic-node.js.map +0 -1
  54. package/dist/3019.jclic-node.js +0 -682
  55. package/dist/3019.jclic-node.js.map +0 -1
  56. package/dist/3231.jclic-node.js +0 -274
  57. package/dist/3231.jclic-node.js.map +0 -1
  58. package/dist/331.jclic-node.js +0 -115
  59. package/dist/331.jclic-node.js.map +0 -1
  60. package/dist/3391.jclic-node.js +0 -276
  61. package/dist/3391.jclic-node.js.map +0 -1
  62. package/dist/3502.jclic-node.js +0 -671
  63. package/dist/3502.jclic-node.js.map +0 -1
  64. package/dist/3653.jclic-node.js +0 -982
  65. package/dist/3653.jclic-node.js.map +0 -1
  66. package/dist/371.jclic.min.js +0 -2
  67. package/dist/371.jclic.min.js.map +0 -1
  68. package/dist/3856.jclic-node.js +0 -575
  69. package/dist/3856.jclic-node.js.map +0 -1
  70. package/dist/4112.jclic-node.js +0 -659
  71. package/dist/4112.jclic-node.js.map +0 -1
  72. package/dist/4123.jclic-node.js +0 -910
  73. package/dist/4123.jclic-node.js.map +0 -1
  74. package/dist/427.jclic-node.js +0 -894
  75. package/dist/427.jclic-node.js.map +0 -1
  76. package/dist/4483.jclic-node.js +0 -327
  77. package/dist/4483.jclic-node.js.map +0 -1
  78. package/dist/4548.jclic-node.js +0 -1078
  79. package/dist/4548.jclic-node.js.map +0 -1
  80. package/dist/466.jclic-node.js +0 -99
  81. package/dist/466.jclic-node.js.map +0 -1
  82. package/dist/485.jclic-node.js +0 -783
  83. package/dist/485.jclic-node.js.map +0 -1
  84. package/dist/4921.jclic-node.js +0 -500
  85. package/dist/4921.jclic-node.js.map +0 -1
  86. package/dist/5091.jclic-node.js +0 -239
  87. package/dist/5091.jclic-node.js.map +0 -1
  88. package/dist/520.jclic-node.js +0 -550
  89. package/dist/520.jclic-node.js.map +0 -1
  90. package/dist/5312.jclic-node.js +0 -1126
  91. package/dist/5312.jclic-node.js.map +0 -1
  92. package/dist/5338.jclic-node.js +0 -212
  93. package/dist/5338.jclic-node.js.map +0 -1
  94. package/dist/5344.jclic-node.js +0 -229
  95. package/dist/5344.jclic-node.js.map +0 -1
  96. package/dist/5550.jclic-node.js +0 -238
  97. package/dist/5550.jclic-node.js.map +0 -1
  98. package/dist/5626.jclic-node.js +0 -614
  99. package/dist/5626.jclic-node.js.map +0 -1
  100. package/dist/5977.jclic-node.js +0 -1081
  101. package/dist/5977.jclic-node.js.map +0 -1
  102. package/dist/6148.jclic-node.js +0 -345
  103. package/dist/6148.jclic-node.js.map +0 -1
  104. package/dist/6176.jclic-node.js +0 -481
  105. package/dist/6176.jclic-node.js.map +0 -1
  106. package/dist/6221.jclic-node.js +0 -1072
  107. package/dist/6221.jclic-node.js.map +0 -1
  108. package/dist/6238.jclic-node.js +0 -718
  109. package/dist/6238.jclic-node.js.map +0 -1
  110. package/dist/6454.jclic-node.js +0 -1413
  111. package/dist/6454.jclic-node.js.map +0 -1
  112. package/dist/6565.jclic-node.js +0 -294
  113. package/dist/6565.jclic-node.js.map +0 -1
  114. package/dist/6579.jclic-node.js +0 -719
  115. package/dist/6579.jclic-node.js.map +0 -1
  116. package/dist/6715.jclic-node.js +0 -148
  117. package/dist/6715.jclic-node.js.map +0 -1
  118. package/dist/6777.jclic-node.js +0 -171
  119. package/dist/6777.jclic-node.js.map +0 -1
  120. package/dist/6782.jclic-node.js +0 -1611
  121. package/dist/6782.jclic-node.js.map +0 -1
  122. package/dist/6847.jclic-node.js +0 -601
  123. package/dist/6847.jclic-node.js.map +0 -1
  124. package/dist/6856.jclic-node.js +0 -252
  125. package/dist/6856.jclic-node.js.map +0 -1
  126. package/dist/696.jclic-node.js +0 -1821
  127. package/dist/696.jclic-node.js.map +0 -1
  128. package/dist/698.jclic-node.js +0 -583
  129. package/dist/698.jclic-node.js.map +0 -1
  130. package/dist/704.jclic-node.js +0 -80
  131. package/dist/704.jclic-node.js.map +0 -1
  132. package/dist/7046.jclic-node.js +0 -735
  133. package/dist/7046.jclic-node.js.map +0 -1
  134. package/dist/7220.jclic-node.js +0 -156
  135. package/dist/7220.jclic-node.js.map +0 -1
  136. package/dist/7257.jclic-node.js +0 -931
  137. package/dist/7257.jclic-node.js.map +0 -1
  138. package/dist/743.jclic-node.js +0 -583
  139. package/dist/743.jclic-node.js.map +0 -1
  140. package/dist/757.jclic-node.js +0 -1072
  141. package/dist/757.jclic-node.js.map +0 -1
  142. package/dist/7781.jclic-node.js +0 -202
  143. package/dist/7781.jclic-node.js.map +0 -1
  144. package/dist/7912.jclic-node.js +0 -2103
  145. package/dist/7912.jclic-node.js.map +0 -1
  146. package/dist/827.jclic-node.js +0 -708
  147. package/dist/827.jclic-node.js.map +0 -1
  148. package/dist/8276.jclic-node.js +0 -409
  149. package/dist/8276.jclic-node.js.map +0 -1
  150. package/dist/8322.jclic-node.js +0 -498
  151. package/dist/8322.jclic-node.js.map +0 -1
  152. package/dist/8641.jclic-node.js +0 -360
  153. package/dist/8641.jclic-node.js.map +0 -1
  154. package/dist/8837.jclic-node.js +0 -651
  155. package/dist/8837.jclic-node.js.map +0 -1
  156. package/dist/8895.jclic-node.js +0 -151
  157. package/dist/8895.jclic-node.js.map +0 -1
  158. package/dist/9072.jclic-node.js +0 -1285
  159. package/dist/9072.jclic-node.js.map +0 -1
  160. package/dist/9078.jclic-node.js +0 -935
  161. package/dist/9078.jclic-node.js.map +0 -1
  162. package/dist/9103.jclic-node.js +0 -718
  163. package/dist/9103.jclic-node.js.map +0 -1
  164. package/dist/9359.jclic-node.js +0 -145
  165. package/dist/9359.jclic-node.js.map +0 -1
  166. package/dist/9409.jclic-node.js +0 -921
  167. package/dist/9409.jclic-node.js.map +0 -1
  168. package/dist/9513.jclic-node.js +0 -720
  169. package/dist/9513.jclic-node.js.map +0 -1
  170. package/dist/9704.jclic-node.js +0 -81
  171. package/dist/9704.jclic-node.js.map +0 -1
  172. package/dist/9950.jclic-node.js +0 -827
  173. package/dist/9950.jclic-node.js.map +0 -1
@@ -1,602 +0,0 @@
1
- "use strict";
2
- exports.id = 1588;
3
- exports.ids = [1588,6777];
4
- exports.modules = {
5
-
6
- /***/ 6777:
7
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8
-
9
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
11
- /* harmony export */ });
12
- /* unused harmony export Counter */
13
- /**
14
- * File : skins/Counter.js
15
- * Created : 07/05/2015
16
- * By : Francesc Busquets <francesc@gmail.com>
17
- *
18
- * JClic.js
19
- * An HTML5 player of JClic activities
20
- * https://projectestac.github.io/jclic.js
21
- *
22
- * @source https://github.com/projectestac/jclic.js
23
- *
24
- * @license EUPL-1.2
25
- * @licstart
26
- * (c) 2000-2020 Educational Telematic Network of Catalonia (XTEC)
27
- *
28
- * Licensed under the EUPL, Version 1.1 or -as soon they will be approved by
29
- * the European Commission- subsequent versions of the EUPL (the "Licence");
30
- * You may not use this work except in compliance with the Licence.
31
- *
32
- * You may obtain a copy of the Licence at:
33
- * https://joinup.ec.europa.eu/software/page/eupl
34
- *
35
- * Unless required by applicable law or agreed to in writing, software
36
- * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT
37
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
38
- * Licence for the specific language governing permissions and limitations
39
- * under the Licence.
40
- * @licend
41
- * @module
42
- */
43
-
44
- /**
45
- * This class encapsulates the operation of a numeric counter, used to display the current
46
- * values of score, actions and time.
47
- */
48
- class Counter {
49
- /**
50
- * Counter constructor
51
- * @param {string} id - The type of information stored on this counter
52
- * @param {external:jQuery} [$div] - The HTML element where this counter will show values (can be _null_)
53
- */
54
- constructor(id, $div) {
55
- if (id)
56
- this.id = id;
57
- if ($div)
58
- this.$div = $div;
59
- }
60
-
61
- /**
62
- * Gets the current display value of this counter
63
- * @returns {number}
64
- */
65
- getDisplayValue() {
66
- let result = this.countDown > 0 ? this.countDown - this.value : this.value;
67
- if (this.displayDiffFrom)
68
- result = result - this.displayDiffFrom.value;
69
- return Math.max(0, Math.min(this.MAX_DISPLAY_VALUE, result));
70
- }
71
-
72
- /**
73
- * Paints the value of this counter on screen
74
- * (method to be overridden by subclasses)
75
- */
76
- refreshDisplay() {
77
- if (this.$div)
78
- this.$div.html(this.enabled ? (this.getDisplayValue() + 1000).toString().substring(1) : '000');
79
- }
80
-
81
- /**
82
- * Enables or disables this counter
83
- * @param {boolean} enabled - State been assigned to this counter
84
- */
85
- setEnabled(enabled) {
86
- if (this.enabled !== enabled) {
87
- this.enabled = enabled;
88
- if (this.$div) {
89
- this.refreshDisplay();
90
- this.$div.css('opacity', this.enabled ? 1.0 : 0.3);
91
- }
92
- }
93
- }
94
-
95
- /**
96
- * Sets the initial value of the counter
97
- * @param {number} maxValue - Value from which the countdown will start
98
- */
99
- setCountDown(maxValue) {
100
- if (this.countDown !== (this.countDown = maxValue))
101
- this.refreshDisplay();
102
- }
103
-
104
- /**
105
- * Increments by one the value of this counter
106
- */
107
- incValue() {
108
- this.value++;
109
- if (this.enabled)
110
- this.refreshDisplay();
111
- }
112
-
113
- /**
114
- * Sets a specific value to this counter
115
- * @param {number} value - The value to set
116
- */
117
- setValue(value) {
118
- if (this.enabled && this.value !== (this.value = value))
119
- this.refreshDisplay();
120
- }
121
- }
122
-
123
- Object.assign(Counter.prototype, {
124
- /**
125
- * Type of counter (usually: `score`, `actions` or `time`)
126
- * @name module:skins/Counter.Counter#id
127
- * @type {string} */
128
- id: '',
129
- /**
130
- * The HTML element where this counter shows its value
131
- * @name module:skins/Counter.Counter#$div
132
- * @type {external:jQuery}
133
- */
134
- $div: null,
135
- /**
136
- * Current value of this counter
137
- * @name module:skins/Counter.Counter#value
138
- * @type {number} */
139
- value: 0,
140
- /**
141
- * When set, the counter displays a countdown from this value to zero
142
- * @name module:skins/Counter.Counter#countDown
143
- * @type {number} */
144
- countDown: 0,
145
- /**
146
- * Flag indicating if this counter is currently enabled
147
- * @name module:skins/Counter.Counter#enabled
148
- * @type {boolean} */
149
- enabled: true,
150
- /**
151
- * Maximum value to be displayed by this counter
152
- * @name module:skins/Counter.Counter#MAX_DISPLAY_VALUE
153
- * @type {number} */
154
- MAX_DISPLAY_VALUE: 999,
155
- /**
156
- * An optional Counter used as a subtractor to display the current value.
157
- * Useful to display `errors` subtracting `score` from `actions`.
158
- * @name module:skins/Counter.Counter#displayDiffFrom
159
- * @type {module:skins/Counter.Counter}
160
- */
161
- displayDiffFrom: null,
162
- });
163
-
164
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Counter);
165
-
166
-
167
- /***/ }),
168
-
169
- /***/ 1588:
170
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
171
-
172
-
173
- // EXPORTS
174
- __webpack_require__.d(__webpack_exports__, {
175
- "default": () => (/* binding */ skins_DefaultSkin)
176
- });
177
-
178
- // UNUSED EXPORTS: DefaultSkin
179
-
180
- // EXTERNAL MODULE: external "jquery"
181
- var external_jquery_ = __webpack_require__(7750);
182
- var external_jquery_default = /*#__PURE__*/__webpack_require__.n(external_jquery_);
183
- // EXTERNAL MODULE: ./src/AWT.js
184
- var AWT = __webpack_require__(7912);
185
- // EXTERNAL MODULE: ./src/skins/Skin.js + 9 modules
186
- var Skin = __webpack_require__(757);
187
- // EXTERNAL MODULE: ./src/boxes/ActiveBox.js
188
- var ActiveBox = __webpack_require__(1725);
189
- // EXTERNAL MODULE: ./src/skins/Counter.js
190
- var Counter = __webpack_require__(6777);
191
- // EXTERNAL MODULE: ./src/Utils.js
192
- var Utils = __webpack_require__(1253);
193
- ;// ./src/skins/assets/main.css
194
- const main_namespaceObject = ".ID .JClicCtrlCnt {\n margin: 0 9px 18px 9px;\n display: -webkit-flex;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.ID .JClicCountCnt {\n display: -webkit-flex;\n display: flex;\n flex-direction: column;\n}\n\n.ID .JClicMsgBox {\n height: 60px;\n flex-grow: 1;\n background-color: lightblue;\n}\n\n.ID .JClicBtn {\n cursor: pointer;\n line-height: 0;\n}\n\n.ID .JClicBtn:disabled {\n cursor: inherit;\n opacity: 0.3;\n}\n\n.ID .JClicCounter {\n width: 40px;\n height: 20px;\n padding-left: 20px;\n color: white;\n cursor: pointer;\n font-family: Roboto, Sans-serif;\n font-size: 18px;\n text-align: center;\n background-repeat: no-repeat;\n background-position: left;\n box-sizing: content-box;\n}\n";
195
- ;// ./src/skins/assets/mainHalf.css
196
- const mainHalf_namespaceObject = ".ID .JClicPlayerCnt {\n margin: 9px;\n}\n\n.ID .JClicCtrlCnt {\n margin: 0 4px 9px 4px;\n}\n\n.ID .JClicCtrlCnt button svg, img {\n width: 18px;\n height: 18px;\n}\n\n.ID .JClicMsgBox {\n height: 30px;\n}\n\n.ID .JClicCounter {\n width: 20px;\n height: 10px;\n margin-left: -15px;\n transform: scale(0.5);\n}\n";
197
- ;// ./src/skins/assets/mainTwoThirds.css
198
- const mainTwoThirds_namespaceObject = ".ID .JClicPlayerCnt {\n margin: 12px;\n}\n\n.ID .JClicCtrlCnt {\n margin: 0 6px 12px 6px;\n}\n\n.ID .JClicCtrlCnt button svg, img {\n width: 24px;\n height: 24px;\n}\n\n.ID .JClicMsgBox {\n height: 40px;\n}\n\n.ID .JClicCounter {\n width: 27px;\n height: 13px;\n margin-left: -10px;\n transform: scale(0.666);\n}\n";
199
- ;// ./src/skins/assets/prevIcon.svg
200
- const prevIcon_namespaceObject = "<svg fill=\"#FFFFFF\" viewBox=\"0 0 24 24\" width=\"36\" height=\"36\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\" />\n</svg>\n";
201
- ;// ./src/skins/assets/nextIcon.svg
202
- const nextIcon_namespaceObject = "<svg fill=\"#FFFFFF\" viewBox=\"0 0 24 24\" width=\"36\" height=\"36\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\" />\n</svg>\n";
203
- ;// ./src/skins/assets/fullScreenIcon.svg
204
- const fullScreenIcon_namespaceObject = "<svg fill=\"#FFFFFF\" viewBox=\"0 0 24 24\" width=\"36\" height=\"36\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z\" />\n</svg>\n";
205
- ;// ./src/skins/assets/fullScreenExitIcon.svg
206
- const fullScreenExitIcon_namespaceObject = "<svg fill=\"#FFFFFF\" viewBox=\"0 0 24 24\" width=\"36\" height=\"36\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z\" />\n</svg>\n";
207
- ;// ./src/skins/assets/closeIcon.svg
208
- const closeIcon_namespaceObject = "<svg fill=\"#FFFFFF\" viewBox=\"0 0 24 24\" width=\"36\" height=\"36\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\" />\n</svg>\n";
209
- ;// ./src/skins/assets/infoIcon.svg
210
- const infoIcon_namespaceObject = "<svg fill=\"#FFFFFF\" viewBox=\"0 0 24 24\" width=\"36\" height=\"36\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M11 17h2v-6h-2v6zm1-15C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zM11 9h2V7h-2v2z\" />\n</svg>\n";
211
- ;// ./src/skins/assets/reportsIcon.svg
212
- const reportsIcon_namespaceObject = "<svg fill=\"#FFFFFF\" viewBox=\"0 0 24 24\" width=\"36\" height=\"36\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\" />\n</svg>\n";
213
- ;// ./src/skins/assets/timeIcon.svg
214
- const timeIcon_namespaceObject = "<svg fill=\"#FFFFFF\" viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z\" />\n <path d=\"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z\" />\n</svg>\n";
215
- ;// ./src/skins/assets/scoreIcon.svg
216
- const scoreIcon_namespaceObject = "<svg fill=\"#FFFFFF\" viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z\" />\n</svg>\n";
217
- ;// ./src/skins/assets/actionsIcon.svg
218
- const actionsIcon_namespaceObject = "<svg fill=\"#FFFFFF\" viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M13.49 5.48c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm-3.6 13.9l1-4.4 2.1 2v6h2v-7.5l-2.1-2 .6-3c1.3 1.5 3.3 2.5 5.5 2.5v-2c-1.9 0-3.5-1-4.3-2.4l-1-1.6c-.4-.6-1-1-1.7-1-.3 0-.5.1-.8.1l-5.2 2.2v4.7h2v-3.4l1.8-.7-1.6 8.1-4.9-1-.4 2 7 1.4z\" />\n</svg>\n";
219
- ;// ./src/skins/DefaultSkin.js
220
- /**
221
- * File : skins/DefaultSkin.js
222
- * Created : 12/05/2015
223
- * By : Francesc Busquets <francesc@gmail.com>
224
- *
225
- * JClic.js
226
- * An HTML5 player of JClic activities
227
- * https://projectestac.github.io/jclic.js
228
- *
229
- * @source https://github.com/projectestac/jclic.js
230
- *
231
- * @license EUPL-1.2
232
- * @licstart
233
- * (c) 2000-2020 Educational Telematic Network of Catalonia (XTEC)
234
- *
235
- * Licensed under the EUPL, Version 1.1 or -as soon they will be approved by
236
- * the European Commission- subsequent versions of the EUPL (the "Licence");
237
- * You may not use this work except in compliance with the Licence.
238
- *
239
- * You may obtain a copy of the Licence at:
240
- * https://joinup.ec.europa.eu/software/page/eupl
241
- *
242
- * Unless required by applicable law or agreed to in writing, software
243
- * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT
244
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
245
- * Licence for the specific language governing permissions and limitations
246
- * under the Licence.
247
- * @licend
248
- * @module
249
- */
250
-
251
- /* global document */
252
-
253
-
254
-
255
-
256
-
257
-
258
-
259
-
260
- // Use Webpack to import CSS and SVG files
261
-
262
-
263
-
264
-
265
-
266
-
267
-
268
-
269
-
270
-
271
-
272
-
273
-
274
-
275
- /**
276
- * This is the default {@link module:skins/Skin.Skin Skin} used by JClic.js
277
- * @extends module:skins/Skin.Skin
278
- */
279
- class DefaultSkin extends Skin["default"] {
280
- /**
281
- * DefaultSkin constructor
282
- * @param {module:JClicPlayer.JClicPlayer} ps - The PlayStation (currently a {@link module:JClicPlayer.JClicPlayer JClicPlayer}) used to load and
283
- * realize the media objects needed tot build the Skin.
284
- * @param {string} [name] - The skin class name
285
- * @param {object} [options] - Optional parameter with additional options, used by subclasses
286
- * this skin. When `null` or `undefined`, a new one will be created.
287
- */
288
- constructor(ps, name = null, options = {}) {
289
- // DefaultSkin extends [Skin](Skin.html)
290
- super(ps, name, options);
291
- let msg = '';
292
-
293
- AWT/* Font */.KQ.loadGoogleFonts(this.cssFonts);
294
-
295
- // Create the main container for buttons, counters and message box
296
- this.$ctrlCnt = external_jquery_default()('<div/>', { class: 'JClicCtrlCnt unselectableText', role: 'navigation' });
297
- this.$div.append(this.$ctrlCnt);
298
-
299
- // Add `prev` button
300
- msg = (0,Utils/* getMsg */.qG)('Previous activity');
301
- this.buttons.prev = external_jquery_default()('<button/>', { class: 'JClicBtn', title: msg, 'aria-label': msg })
302
- .append(external_jquery_default()((0,Utils/* getSvg */.r4)(this.prevIcon, this.iconWidth, this.iconHeight, this.iconFill)))
303
- .on('click', evt => {
304
- if (this.ps)
305
- this.ps.actions.prev.processEvent(evt);
306
- });
307
- this.$ctrlCnt.append(this.buttons.prev);
308
-
309
- // Add message box
310
- this.msgBox = new ActiveBox["default"]();
311
- this.msgBox.role = 'message';
312
- this.$msgBoxDiv = external_jquery_default()('<div/>', { class: 'JClicMsgBox' })
313
- .on('click', () => {
314
- this.msgBox.playMedia(ps);
315
- return false;
316
- });
317
- this.$ctrlCnt.append(this.$msgBoxDiv);
318
-
319
- // Add `next` button
320
- msg = (0,Utils/* getMsg */.qG)('Next activity');
321
- this.buttons.next = external_jquery_default()('<button/>', { class: 'JClicBtn', title: msg, 'aria-label': msg })
322
- .append(external_jquery_default()((0,Utils/* getSvg */.r4)(this.nextIcon, this.iconWidth, this.iconHeight, this.iconFill)))
323
- .on('click', evt => {
324
- if (this.ps)
325
- this.ps.actions.next.processEvent(evt);
326
- });
327
- this.$ctrlCnt.append(this.buttons.next);
328
-
329
- // Add counters
330
- if (false !== this.ps.options.counters && false !== options.counters) {
331
- // Create counters
332
- msg = (0,Utils/* getMsg */.qG)('Reports');
333
- const $countCnt = external_jquery_default()('<button/>', { class: 'JClicCountCnt', 'aria-label': msg })
334
- .on('click', evt => {
335
- if (this.ps)
336
- this.ps.actions.reports.processEvent(evt);
337
- });
338
- external_jquery_default().each(Skin["default"].prototype.counters, (name, _val) => {
339
- msg = (0,Utils/* getMsg */.qG)(name);
340
- this.counters[name] = new Counter["default"](name, external_jquery_default()('<div/>', { class: 'JClicCounter', title: msg, 'aria-label': msg })
341
- .css({
342
- 'background-image': `url(${(0,Utils/* svgToURI */.g8)(this[name + 'Icon'], this.counterIconWidth, this.counterIconHeight, this.counterIconFill)})`,
343
- color: this.counterIconFill
344
- })
345
- .html('000')
346
- .appendTo($countCnt));
347
- });
348
- this.$ctrlCnt.append($countCnt);
349
- }
350
-
351
- // Add info button
352
- if (true === this.ps.options.info || true === options.info) {
353
- msg = (0,Utils/* getMsg */.qG)('Information');
354
- this.buttons.info = external_jquery_default()('<button/>', { class: 'JClicBtn', title: msg, 'aria-label': msg })
355
- .append(external_jquery_default()((0,Utils/* getSvg */.r4)(this.infoIcon, this.iconWidth, this.iconHeight, this.iconFill)))
356
- .on('click', evt => {
357
- if (this.ps)
358
- this.ps.actions.info.processEvent(evt);
359
- });
360
- this.$ctrlCnt.append(this.buttons.info);
361
- }
362
-
363
- // Add reports button
364
- if (true === this.ps.options.reportsBtn || true === options.reportsBtn) {
365
- msg = (0,Utils/* getMsg */.qG)('Reports');
366
- this.buttons.about = external_jquery_default()('<button/>', { class: 'JClicBtn', title: msg, 'aria-label': msg })
367
- .append(external_jquery_default()((0,Utils/* getSvg */.r4)(this.reportsIcon, this.iconWidth, this.iconHeight, this.iconFill)))
368
- .on('click', evt => {
369
- if (this.ps)
370
- this.ps.actions.reports.processEvent(evt);
371
- });
372
- this.$ctrlCnt.append(this.buttons.about);
373
- }
374
-
375
- // Add `full screen` button
376
- if (document && document.fullscreenEnabled) {
377
- msg = (0,Utils/* getMsg */.qG)('Toggle full screen');
378
- this.buttons.fullscreen = external_jquery_default()('<button/>', { class: 'JClicBtn', title: msg, 'aria-label': msg })
379
- .append(external_jquery_default()('<img/>', { src: (0,Utils/* svgToURI */.g8)(this.fullScreenIcon, this.iconWidth, this.iconHeight, this.iconFill) }))
380
- .on('click', () => {
381
- this.setScreenFull(null);
382
- });
383
- this.$ctrlCnt.append(this.buttons.fullscreen);
384
- }
385
-
386
- // Add `close` button
387
- if (typeof this.ps.options.closeFn === 'function') {
388
- msg = (0,Utils/* getMsg */.qG)('Close');
389
- const closeFn = this.ps.options.closeFn;
390
- this.buttons.close = external_jquery_default()('<button/>', { class: 'JClicBtn', title: msg, 'aria-label': msg })
391
- .append(external_jquery_default()((0,Utils/* getSvg */.r4)(this.closeIcon, this.iconWidth, this.iconHeight, this.iconFill)))
392
- .on('click', () => {
393
- (0,Utils/* log */.Rm)('info', 'Closing the player');
394
- closeFn();
395
- });
396
- this.$ctrlCnt.append(this.buttons.close);
397
- }
398
-
399
- // Workaround for a bug in Edge and Explorer: SVG objects not implementing `blur` and `focus` methods
400
- // See: [https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8479637/]
401
- // This affects Polymer `iron-overlay-behavior`. See: [https://github.com/PolymerElements/iron-overlay-behavior/pull/211]
402
- let nilFunc = null;
403
- external_jquery_default().each(this.buttons, (_key, value) => {
404
- if (value && (typeof value[0].focus !== 'function' || typeof value[0].blur !== 'function')) {
405
- if (nilFunc === null)
406
- nilFunc = () => (0,Utils/* log */.Rm)('error', '"blur" and "focus" not defined for SVG objects in Explorer/Edge');
407
- value[0].focus = value[0].blur = nilFunc;
408
- }
409
- });
410
- }
411
-
412
- /**
413
- * Returns the CSS styles used by this skin. This method should be called only from
414
- * the `Skin` constructor, and overridded by subclasses if needed.
415
- * @param {string} media - A specific media size. Possible values are: 'default', 'half' and 'twoThirds'
416
- * @returns {string}
417
- */
418
- _getStyleSheets(media = 'default') {
419
- return `${super._getStyleSheets(media)}${media === 'default' ? this.mainCSS : media === 'half' ? this.mainCSSHalf : media === 'twoThirds' ? this.mainCSSTwoThirds : ''}`;
420
- }
421
-
422
- /**
423
- * Main method used to build the content of the skin. Resizes and places internal objects.
424
- * @override
425
- */
426
- doLayout() {
427
- // Call method on ancestor
428
- super.doLayout();
429
-
430
- // Set the fullScreen icon
431
- if (this.buttons.fullscreen)
432
- this.buttons.fullscreen.find('img').get(-1).src = (0,Utils/* svgToURI */.g8)(
433
- this[(document && document.fullscreenElement) ? 'fullScreenExitIcon' : 'fullScreenIcon'],
434
- this.iconWidth, this.iconHeight, this.iconFill);
435
- }
436
-
437
- /**
438
- * Enables or disables the `tabindex` attribute of the main buttons. Useful when a modal dialog
439
- * overlay is active, to avoid direct access to controls not related with the dialog.
440
- * @param {boolean} status - `true` to make main controls navigable, `false` otherwise
441
- */
442
- enableMainButtons(status) {
443
- this.$ctrlCnt.find('.JClicBtn,.JClicCountCnt').attr('tabindex', status ? '0' : '-1');
444
- }
445
- }
446
-
447
- Object.assign(DefaultSkin.prototype, {
448
- /**
449
- * Class name of this skin. It will be used as a base selector in the definition of all CSS styles.
450
- * @name module:skins/DefaultSkin.DefaultSkin#skinId
451
- * @override
452
- * @type {string}
453
- */
454
- skinId: 'JClicDefaultSkin',
455
- /**
456
- * The HTML div where buttons, counters and message box are placed
457
- * @name module:skins/DefaultSkin.DefaultSkin#$ctrlCnt
458
- * @type {external:jQuery} */
459
- $ctrlCnt: null,
460
- /**
461
- * Space (pixels) between the components of this {@link module:skins/Skin.Skin Skin}
462
- * @name module:skins/DefaultSkin.DefaultSkin#margin
463
- * @type {number} */
464
- margin: 18,
465
- /**
466
- * Height of {@link module:skins/DefaultSkin.DefaultSkin#msgBox msgBox}
467
- * @name module:skins/DefaultSkin.DefaultSkin#msgBoxHeight
468
- * @type {number} */
469
- msgBoxHeight: 60,
470
- /**
471
- * Width of counters, in pixels
472
- * @name module:skins/DefaultSkin.DefaultSkin#countersWidth
473
- * @type {number} */
474
- countersWidth: 60,
475
- /**
476
- * Height of counters, in pixels
477
- * @name module:skins/DefaultSkin.DefaultSkin#countersHeight
478
- * @type {number} */
479
- countersHeight: 20,
480
- //
481
- //Buttons and other graphical resources used by this skin.
482
- //
483
- /**
484
- * Styles used in this skin
485
- * @name module:skins/DefaultSkin.DefaultSkin#mainCSS
486
- * @type {string} */
487
- mainCSS: main_namespaceObject,
488
- /**
489
- * Styles used in this skin, sized to half its regular size
490
- * @name module:skins/DefaultSkin.DefaultSkin#mainCSSHalf
491
- * @type {string} */
492
- mainCSSHalf: mainHalf_namespaceObject,
493
- /**
494
- * Styles used in this skin, sized to two thirds of its regular size
495
- * @name module:skins/DefaultSkin.DefaultSkin#mainCSSTwoThirds
496
- * @type {string} */
497
- mainCSSTwoThirds: mainTwoThirds_namespaceObject,
498
- /**
499
- * Fonts used in this skin
500
- * @name module:skins/DefaultSkin.DefaultSkin#cssFonts
501
- * @type {string[]} */
502
- cssFonts: ['Roboto'],
503
- //
504
- // Default settings for icons (can be overridden in subclasses):
505
- /**
506
- * Icon width
507
- * @name module:skins/DefaultSkin.DefaultSkin#iconWidth
508
- * @type {number} */
509
- iconWidth: 36,
510
- /**
511
- * Icon height
512
- * @name module:skins/DefaultSkin.DefaultSkin#iconHeight
513
- * @type {number} */
514
- iconHeight: 36,
515
- /**
516
- * Fill color for icons
517
- * @name module:skins/DefaultSkin.DefaultSkin#iconFill
518
- * @type {string} */
519
- iconFill: '#FFFFFF',
520
- //
521
- // SVG images for action buttons
522
- // Based on [Google Material design Icons](https://google.github.io/material-design-icons/)
523
- //
524
- /**
525
- * Icon for 'previous activity' button
526
- * @name module:skins/DefaultSkin.DefaultSkin#prevIcon
527
- * @type {string} */
528
- prevIcon: prevIcon_namespaceObject,
529
- /**
530
- * Icon for 'next activity' button
531
- * @name module:skins/DefaultSkin.DefaultSkin#nextIcon
532
- * @type {string} */
533
- nextIcon: nextIcon_namespaceObject,
534
- /**
535
- * Full screen on icon
536
- * @name module:skins/DefaultSkin.DefaultSkin#fullScreenIcon
537
- * @type {string} */
538
- fullScreenIcon: fullScreenIcon_namespaceObject,
539
- /**
540
- * Full screen off icon
541
- * @name module:skins/DefaultSkin.DefaultSkin#fullScreenExitIcon
542
- * @type {string} */
543
- fullScreenExitIcon: fullScreenExitIcon_namespaceObject,
544
- /**
545
- * Close button
546
- * @name module:skins/DefaultSkin.DefaultSkin#closeIcon
547
- * @type {string} */
548
- closeIcon: closeIcon_namespaceObject,
549
- /**
550
- * Info button
551
- * @name module:skins/DefaultSkin.DefaultSkin#infoIcon
552
- * @type {string} */
553
- infoIcon: infoIcon_namespaceObject,
554
- /**
555
- * Reports button
556
- * @name module:skins/DefaultSkin.DefaultSkin#reportsIcon
557
- * @type {string} */
558
- reportsIcon: reportsIcon_namespaceObject,
559
- //
560
- // Settings for counters:
561
- /**
562
- * Counter icon width
563
- * @name module:skins/DefaultSkin.DefaultSkin#counterIconWidth
564
- * @type {number} */
565
- counterIconWidth: 18,
566
- /**
567
- * Counter icon height
568
- * @name module:skins/DefaultSkin.DefaultSkin#counterIconHeight
569
- * @type {number} */
570
- counterIconHeight: 18,
571
- /**
572
- * Counter icon fill color
573
- * @name module:skins/DefaultSkin.DefaultSkin#counterIconFill
574
- * @type {string} */
575
- counterIconFill: '#FFFFFF',
576
- // Counters:
577
- /**
578
- * Time icon
579
- * @name module:skins/DefaultSkin.DefaultSkin#timeIcon
580
- * @type {string} */
581
- timeIcon: timeIcon_namespaceObject,
582
- /**
583
- * Score icon
584
- * @name module:skins/DefaultSkin.DefaultSkin#scoreIcon
585
- * @type {string} */
586
- scoreIcon: scoreIcon_namespaceObject,
587
- /**
588
- * Actions icon
589
- * @name module:skins/DefaultSkin.DefaultSkin#actionsIcon
590
- * @type {string} */
591
- actionsIcon: actionsIcon_namespaceObject,
592
- });
593
-
594
- // Register this class in the list of available skins
595
- /* harmony default export */ const skins_DefaultSkin = (Skin["default"].registerClass('default', DefaultSkin));
596
-
597
-
598
- /***/ })
599
-
600
- };
601
- ;
602
- //# sourceMappingURL=1588.jclic-node.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"1588.jclic-node.js","mappings":";;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,CAAC;;AAED,iEAAe,OAAO,EAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACvJvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEuB;AACU;AACJ;AACiB;AACX;AACyB;;AAE5D;AACwC;AACQ;AACU;AACb;AACA;AACY;AACQ;AAClB;AACF;AACM;AACN;AACE;AACI;;AAEnD;AACA,wBAAwB,mCAAmC;AAC3D;AACA;AACO,0BAA0B,eAAI;AACrC;AACA;AACA,aAAa,gCAAgC,mCAAmC,iDAAiD;AACjI;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;;AAEA,IAAI,gBAAI;;AAER;AACA,oBAAoB,yBAAC,aAAa,4DAA4D;AAC9F;;AAEA;AACA,UAAU,wBAAM;AAChB,wBAAwB,yBAAC,gBAAgB,kDAAkD;AAC3F,cAAc,yBAAC,CAAC,wBAAM;AACtB;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,sBAAsB,oBAAS;AAC/B;AACA,sBAAsB,yBAAC,aAAa,sBAAsB;AAC1D;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,UAAU,wBAAM;AAChB,wBAAwB,yBAAC,gBAAgB,kDAAkD;AAC3F,cAAc,yBAAC,CAAC,wBAAM;AACtB;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA,YAAY,wBAAM;AAClB,wBAAwB,yBAAC,gBAAgB,2CAA2C;AACpF;AACA;AACA;AACA,SAAS;AACT,MAAM,8BAAM,CAAC,eAAI;AACjB,cAAc,wBAAM;AACpB,kCAAkC,kBAAO,OAAO,yBAAC,aAAa,sDAAsD;AACpH;AACA,uCAAuC,0BAAQ,2FAA2F;AAC1I;AACA,WAAW;AACX;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA,YAAY,wBAAM;AAClB,0BAA0B,yBAAC,gBAAgB,kDAAkD;AAC7F,gBAAgB,yBAAC,CAAC,wBAAM;AACxB;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA,YAAY,wBAAM;AAClB,2BAA2B,yBAAC,gBAAgB,kDAAkD;AAC9F,gBAAgB,yBAAC,CAAC,wBAAM;AACxB;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA,YAAY,wBAAM;AAClB,gCAAgC,yBAAC,gBAAgB,kDAAkD;AACnG,gBAAgB,yBAAC,aAAa,KAAK,0BAAQ,uEAAuE;AAClH;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA,YAAY,wBAAM;AAClB;AACA,2BAA2B,yBAAC,gBAAgB,kDAAkD;AAC9F,gBAAgB,yBAAC,CAAC,wBAAM;AACxB;AACA,UAAU,qBAAG;AACb;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI,8BAAM;AACV;AACA;AACA,0BAA0B,qBAAG;AAC7B;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA,cAAc,6BAA6B,EAAE,8HAA8H;AAC3K;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wDAAwD,0BAAQ;AAChE;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA,oDAAoD;AACpD;AACA,YAAY,QAAQ;AACpB;AACA;AACA,gBAAgB;AAChB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,SAAS;AACT;AACA;AACA;AACA,YAAY,QAAQ;AACpB,aAAa;AACb;AACA;AACA;AACA,YAAY,QAAQ;AACpB,kBAAkB;AAClB;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,UAAU;AACV;AACA;AACA;AACA,YAAY,QAAQ;AACpB,UAAU;AACV;AACA;AACA;AACA,YAAY,QAAQ;AACpB,gBAAgB;AAChB;AACA;AACA;AACA,YAAY,QAAQ;AACpB,oBAAoB;AACpB;AACA;AACA;AACA,YAAY,QAAQ;AACpB,WAAW;AACX;AACA;AACA;AACA,YAAY,QAAQ;AACpB,UAAU;AACV;AACA;AACA;AACA,YAAY,QAAQ;AACpB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,UAAU;AACV;AACA;AACA;AACA,YAAY,QAAQ;AACpB,WAAW;AACX;AACA;AACA;AACA,YAAY,QAAQ;AACpB,aAAa;AACb,CAAC;;AAED;AACA,wDAAe,eAAI,sCAAsC,EAAC","sources":["webpack://jclic/./src/skins/Counter.js","webpack://jclic/./src/skins/DefaultSkin.js"],"sourcesContent":["/**\n * File : skins/Counter.js\n * Created : 07/05/2015\n * By : Francesc Busquets <francesc@gmail.com>\n *\n * JClic.js\n * An HTML5 player of JClic activities\n * https://projectestac.github.io/jclic.js\n *\n * @source https://github.com/projectestac/jclic.js\n *\n * @license EUPL-1.2\n * @licstart\n * (c) 2000-2020 Educational Telematic Network of Catalonia (XTEC)\n *\n * Licensed under the EUPL, Version 1.1 or -as soon they will be approved by\n * the European Commission- subsequent versions of the EUPL (the \"Licence\");\n * You may not use this work except in compliance with the Licence.\n *\n * You may obtain a copy of the Licence at:\n * https://joinup.ec.europa.eu/software/page/eupl\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the Licence is distributed on an \"AS IS\" basis, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n * Licence for the specific language governing permissions and limitations\n * under the Licence.\n * @licend\n * @module\n */\n\n/**\n * This class encapsulates the operation of a numeric counter, used to display the current\n * values of score, actions and time.\n */\nexport class Counter {\n /**\n * Counter constructor\n * @param {string} id - The type of information stored on this counter\n * @param {external:jQuery} [$div] - The HTML element where this counter will show values (can be _null_)\n */\n constructor(id, $div) {\n if (id)\n this.id = id;\n if ($div)\n this.$div = $div;\n }\n\n /**\n * Gets the current display value of this counter\n * @returns {number}\n */\n getDisplayValue() {\n let result = this.countDown > 0 ? this.countDown - this.value : this.value;\n if (this.displayDiffFrom)\n result = result - this.displayDiffFrom.value;\n return Math.max(0, Math.min(this.MAX_DISPLAY_VALUE, result));\n }\n\n /**\n * Paints the value of this counter on screen\n * (method to be overridden by subclasses)\n */\n refreshDisplay() {\n if (this.$div)\n this.$div.html(this.enabled ? (this.getDisplayValue() + 1000).toString().substring(1) : '000');\n }\n\n /**\n * Enables or disables this counter\n * @param {boolean} enabled - State been assigned to this counter\n */\n setEnabled(enabled) {\n if (this.enabled !== enabled) {\n this.enabled = enabled;\n if (this.$div) {\n this.refreshDisplay();\n this.$div.css('opacity', this.enabled ? 1.0 : 0.3);\n }\n }\n }\n\n /**\n * Sets the initial value of the counter\n * @param {number} maxValue - Value from which the countdown will start\n */\n setCountDown(maxValue) {\n if (this.countDown !== (this.countDown = maxValue))\n this.refreshDisplay();\n }\n\n /**\n * Increments by one the value of this counter\n */\n incValue() {\n this.value++;\n if (this.enabled)\n this.refreshDisplay();\n }\n\n /**\n * Sets a specific value to this counter\n * @param {number} value - The value to set\n */\n setValue(value) {\n if (this.enabled && this.value !== (this.value = value))\n this.refreshDisplay();\n }\n}\n\nObject.assign(Counter.prototype, {\n /**\n * Type of counter (usually: `score`, `actions` or `time`)\n * @name module:skins/Counter.Counter#id\n * @type {string} */\n id: '',\n /**\n * The HTML element where this counter shows its value\n * @name module:skins/Counter.Counter#$div\n * @type {external:jQuery}\n */\n $div: null,\n /**\n * Current value of this counter\n * @name module:skins/Counter.Counter#value\n * @type {number} */\n value: 0,\n /**\n * When set, the counter displays a countdown from this value to zero\n * @name module:skins/Counter.Counter#countDown\n * @type {number} */\n countDown: 0,\n /**\n * Flag indicating if this counter is currently enabled\n * @name module:skins/Counter.Counter#enabled\n * @type {boolean} */\n enabled: true,\n /**\n * Maximum value to be displayed by this counter\n * @name module:skins/Counter.Counter#MAX_DISPLAY_VALUE\n * @type {number} */\n MAX_DISPLAY_VALUE: 999,\n /**\n * An optional Counter used as a subtractor to display the current value.\n * Useful to display `errors` subtracting `score` from `actions`.\n * @name module:skins/Counter.Counter#displayDiffFrom\n * @type {module:skins/Counter.Counter}\n */\n displayDiffFrom: null,\n});\n\nexport default Counter;\n","/**\n * File : skins/DefaultSkin.js\n * Created : 12/05/2015\n * By : Francesc Busquets <francesc@gmail.com>\n *\n * JClic.js\n * An HTML5 player of JClic activities\n * https://projectestac.github.io/jclic.js\n *\n * @source https://github.com/projectestac/jclic.js\n *\n * @license EUPL-1.2\n * @licstart\n * (c) 2000-2020 Educational Telematic Network of Catalonia (XTEC)\n *\n * Licensed under the EUPL, Version 1.1 or -as soon they will be approved by\n * the European Commission- subsequent versions of the EUPL (the \"Licence\");\n * You may not use this work except in compliance with the Licence.\n *\n * You may obtain a copy of the Licence at:\n * https://joinup.ec.europa.eu/software/page/eupl\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the Licence is distributed on an \"AS IS\" basis, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n * Licence for the specific language governing permissions and limitations\n * under the Licence.\n * @licend\n * @module\n */\n\n/* global document */\n\nimport $ from 'jquery';\nimport { Font } from '../AWT.js';\nimport Skin from './Skin.js';\nimport ActiveBox from '../boxes/ActiveBox.js';\nimport Counter from './Counter.js';\nimport { log, getMsg, getSvg, svgToURI } from '../Utils.js';\n\n// Use Webpack to import CSS and SVG files\nimport mainCSS from './assets/main.css';\nimport mainCSSHalf from './assets/mainHalf.css';\nimport mainCSSTwoThirds from './assets/mainTwoThirds.css';\nimport prevIcon from './assets/prevIcon.svg';\nimport nextIcon from './assets/nextIcon.svg';\nimport fullScreenIcon from './assets/fullScreenIcon.svg';\nimport fullScreenExitIcon from './assets/fullScreenExitIcon.svg';\nimport closeIcon from './assets/closeIcon.svg';\nimport infoIcon from './assets/infoIcon.svg';\nimport reportsIcon from './assets/reportsIcon.svg';\nimport timeIcon from './assets/timeIcon.svg';\nimport scoreIcon from './assets/scoreIcon.svg';\nimport actionsIcon from './assets/actionsIcon.svg';\n\n/**\n * This is the default {@link module:skins/Skin.Skin Skin} used by JClic.js\n * @extends module:skins/Skin.Skin\n */\nexport class DefaultSkin extends Skin {\n /**\n * DefaultSkin constructor\n * @param {module:JClicPlayer.JClicPlayer} ps - The PlayStation (currently a {@link module:JClicPlayer.JClicPlayer JClicPlayer}) used to load and\n * realize the media objects needed tot build the Skin.\n * @param {string} [name] - The skin class name\n * @param {object} [options] - Optional parameter with additional options, used by subclasses\n * this skin. When `null` or `undefined`, a new one will be created.\n */\n constructor(ps, name = null, options = {}) {\n // DefaultSkin extends [Skin](Skin.html)\n super(ps, name, options);\n let msg = '';\n\n Font.loadGoogleFonts(this.cssFonts);\n\n // Create the main container for buttons, counters and message box\n this.$ctrlCnt = $('<div/>', { class: 'JClicCtrlCnt unselectableText', role: 'navigation' });\n this.$div.append(this.$ctrlCnt);\n\n // Add `prev` button\n msg = getMsg('Previous activity');\n this.buttons.prev = $('<button/>', { class: 'JClicBtn', title: msg, 'aria-label': msg })\n .append($(getSvg(this.prevIcon, this.iconWidth, this.iconHeight, this.iconFill)))\n .on('click', evt => {\n if (this.ps)\n this.ps.actions.prev.processEvent(evt);\n });\n this.$ctrlCnt.append(this.buttons.prev);\n\n // Add message box\n this.msgBox = new ActiveBox();\n this.msgBox.role = 'message';\n this.$msgBoxDiv = $('<div/>', { class: 'JClicMsgBox' })\n .on('click', () => {\n this.msgBox.playMedia(ps);\n return false;\n });\n this.$ctrlCnt.append(this.$msgBoxDiv);\n\n // Add `next` button\n msg = getMsg('Next activity');\n this.buttons.next = $('<button/>', { class: 'JClicBtn', title: msg, 'aria-label': msg })\n .append($(getSvg(this.nextIcon, this.iconWidth, this.iconHeight, this.iconFill)))\n .on('click', evt => {\n if (this.ps)\n this.ps.actions.next.processEvent(evt);\n });\n this.$ctrlCnt.append(this.buttons.next);\n\n // Add counters\n if (false !== this.ps.options.counters && false !== options.counters) {\n // Create counters\n msg = getMsg('Reports');\n const $countCnt = $('<button/>', { class: 'JClicCountCnt', 'aria-label': msg })\n .on('click', evt => {\n if (this.ps)\n this.ps.actions.reports.processEvent(evt);\n });\n $.each(Skin.prototype.counters, (name, _val) => {\n msg = getMsg(name);\n this.counters[name] = new Counter(name, $('<div/>', { class: 'JClicCounter', title: msg, 'aria-label': msg })\n .css({\n 'background-image': `url(${svgToURI(this[name + 'Icon'], this.counterIconWidth, this.counterIconHeight, this.counterIconFill)})`,\n color: this.counterIconFill\n })\n .html('000')\n .appendTo($countCnt));\n });\n this.$ctrlCnt.append($countCnt);\n }\n\n // Add info button\n if (true === this.ps.options.info || true === options.info) {\n msg = getMsg('Information');\n this.buttons.info = $('<button/>', { class: 'JClicBtn', title: msg, 'aria-label': msg })\n .append($(getSvg(this.infoIcon, this.iconWidth, this.iconHeight, this.iconFill)))\n .on('click', evt => {\n if (this.ps)\n this.ps.actions.info.processEvent(evt);\n });\n this.$ctrlCnt.append(this.buttons.info);\n }\n\n // Add reports button\n if (true === this.ps.options.reportsBtn || true === options.reportsBtn) {\n msg = getMsg('Reports');\n this.buttons.about = $('<button/>', { class: 'JClicBtn', title: msg, 'aria-label': msg })\n .append($(getSvg(this.reportsIcon, this.iconWidth, this.iconHeight, this.iconFill)))\n .on('click', evt => {\n if (this.ps)\n this.ps.actions.reports.processEvent(evt);\n });\n this.$ctrlCnt.append(this.buttons.about);\n }\n\n // Add `full screen` button\n if (document && document.fullscreenEnabled) {\n msg = getMsg('Toggle full screen');\n this.buttons.fullscreen = $('<button/>', { class: 'JClicBtn', title: msg, 'aria-label': msg })\n .append($('<img/>', { src: svgToURI(this.fullScreenIcon, this.iconWidth, this.iconHeight, this.iconFill) }))\n .on('click', () => {\n this.setScreenFull(null);\n });\n this.$ctrlCnt.append(this.buttons.fullscreen);\n }\n\n // Add `close` button\n if (typeof this.ps.options.closeFn === 'function') {\n msg = getMsg('Close');\n const closeFn = this.ps.options.closeFn;\n this.buttons.close = $('<button/>', { class: 'JClicBtn', title: msg, 'aria-label': msg })\n .append($(getSvg(this.closeIcon, this.iconWidth, this.iconHeight, this.iconFill)))\n .on('click', () => {\n log('info', 'Closing the player');\n closeFn();\n });\n this.$ctrlCnt.append(this.buttons.close);\n }\n\n // Workaround for a bug in Edge and Explorer: SVG objects not implementing `blur` and `focus` methods\n // See: [https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8479637/]\n // This affects Polymer `iron-overlay-behavior`. See: [https://github.com/PolymerElements/iron-overlay-behavior/pull/211]\n let nilFunc = null;\n $.each(this.buttons, (_key, value) => {\n if (value && (typeof value[0].focus !== 'function' || typeof value[0].blur !== 'function')) {\n if (nilFunc === null)\n nilFunc = () => log('error', '\"blur\" and \"focus\" not defined for SVG objects in Explorer/Edge');\n value[0].focus = value[0].blur = nilFunc;\n }\n });\n }\n\n /**\n * Returns the CSS styles used by this skin. This method should be called only from\n * the `Skin` constructor, and overridded by subclasses if needed.\n * @param {string} media - A specific media size. Possible values are: 'default', 'half' and 'twoThirds'\n * @returns {string}\n */\n _getStyleSheets(media = 'default') {\n return `${super._getStyleSheets(media)}${media === 'default' ? this.mainCSS : media === 'half' ? this.mainCSSHalf : media === 'twoThirds' ? this.mainCSSTwoThirds : ''}`;\n }\n\n /**\n * Main method used to build the content of the skin. Resizes and places internal objects.\n * @override\n */\n doLayout() {\n // Call method on ancestor\n super.doLayout();\n\n // Set the fullScreen icon\n if (this.buttons.fullscreen)\n this.buttons.fullscreen.find('img').get(-1).src = svgToURI(\n this[(document && document.fullscreenElement) ? 'fullScreenExitIcon' : 'fullScreenIcon'],\n this.iconWidth, this.iconHeight, this.iconFill);\n }\n\n /**\n * Enables or disables the `tabindex` attribute of the main buttons. Useful when a modal dialog\n * overlay is active, to avoid direct access to controls not related with the dialog.\n * @param {boolean} status - `true` to make main controls navigable, `false` otherwise\n */\n enableMainButtons(status) {\n this.$ctrlCnt.find('.JClicBtn,.JClicCountCnt').attr('tabindex', status ? '0' : '-1');\n }\n}\n\nObject.assign(DefaultSkin.prototype, {\n /**\n * Class name of this skin. It will be used as a base selector in the definition of all CSS styles.\n * @name module:skins/DefaultSkin.DefaultSkin#skinId\n * @override\n * @type {string}\n */\n skinId: 'JClicDefaultSkin',\n /**\n * The HTML div where buttons, counters and message box are placed\n * @name module:skins/DefaultSkin.DefaultSkin#$ctrlCnt\n * @type {external:jQuery} */\n $ctrlCnt: null,\n /**\n * Space (pixels) between the components of this {@link module:skins/Skin.Skin Skin}\n * @name module:skins/DefaultSkin.DefaultSkin#margin\n * @type {number} */\n margin: 18,\n /**\n * Height of {@link module:skins/DefaultSkin.DefaultSkin#msgBox msgBox}\n * @name module:skins/DefaultSkin.DefaultSkin#msgBoxHeight\n * @type {number} */\n msgBoxHeight: 60,\n /**\n * Width of counters, in pixels\n * @name module:skins/DefaultSkin.DefaultSkin#countersWidth\n * @type {number} */\n countersWidth: 60,\n /**\n * Height of counters, in pixels\n * @name module:skins/DefaultSkin.DefaultSkin#countersHeight\n * @type {number} */\n countersHeight: 20,\n //\n //Buttons and other graphical resources used by this skin.\n //\n /**\n * Styles used in this skin\n * @name module:skins/DefaultSkin.DefaultSkin#mainCSS\n * @type {string} */\n mainCSS,\n /**\n * Styles used in this skin, sized to half its regular size\n * @name module:skins/DefaultSkin.DefaultSkin#mainCSSHalf\n * @type {string} */\n mainCSSHalf,\n /**\n * Styles used in this skin, sized to two thirds of its regular size\n * @name module:skins/DefaultSkin.DefaultSkin#mainCSSTwoThirds\n * @type {string} */\n mainCSSTwoThirds,\n /**\n * Fonts used in this skin\n * @name module:skins/DefaultSkin.DefaultSkin#cssFonts\n * @type {string[]} */\n cssFonts: ['Roboto'],\n //\n // Default settings for icons (can be overridden in subclasses):\n /**\n * Icon width\n * @name module:skins/DefaultSkin.DefaultSkin#iconWidth\n * @type {number} */\n iconWidth: 36,\n /**\n * Icon height\n * @name module:skins/DefaultSkin.DefaultSkin#iconHeight\n * @type {number} */\n iconHeight: 36,\n /**\n * Fill color for icons\n * @name module:skins/DefaultSkin.DefaultSkin#iconFill\n * @type {string} */\n iconFill: '#FFFFFF',\n //\n // SVG images for action buttons\n // Based on [Google Material design Icons](https://google.github.io/material-design-icons/)\n //\n /**\n * Icon for 'previous activity' button\n * @name module:skins/DefaultSkin.DefaultSkin#prevIcon\n * @type {string} */\n prevIcon,\n /**\n * Icon for 'next activity' button\n * @name module:skins/DefaultSkin.DefaultSkin#nextIcon\n * @type {string} */\n nextIcon,\n /**\n * Full screen on icon\n * @name module:skins/DefaultSkin.DefaultSkin#fullScreenIcon\n * @type {string} */\n fullScreenIcon,\n /**\n * Full screen off icon\n * @name module:skins/DefaultSkin.DefaultSkin#fullScreenExitIcon\n * @type {string} */\n fullScreenExitIcon,\n /**\n * Close button\n * @name module:skins/DefaultSkin.DefaultSkin#closeIcon\n * @type {string} */\n closeIcon,\n /**\n * Info button\n * @name module:skins/DefaultSkin.DefaultSkin#infoIcon\n * @type {string} */\n infoIcon,\n /**\n * Reports button\n * @name module:skins/DefaultSkin.DefaultSkin#reportsIcon\n * @type {string} */\n reportsIcon,\n //\n // Settings for counters:\n /**\n * Counter icon width\n * @name module:skins/DefaultSkin.DefaultSkin#counterIconWidth\n * @type {number} */\n counterIconWidth: 18,\n /**\n * Counter icon height\n * @name module:skins/DefaultSkin.DefaultSkin#counterIconHeight\n * @type {number} */\n counterIconHeight: 18,\n /**\n * Counter icon fill color\n * @name module:skins/DefaultSkin.DefaultSkin#counterIconFill\n * @type {string} */\n counterIconFill: '#FFFFFF',\n // Counters:\n /**\n * Time icon\n * @name module:skins/DefaultSkin.DefaultSkin#timeIcon\n * @type {string} */\n timeIcon,\n /**\n * Score icon\n * @name module:skins/DefaultSkin.DefaultSkin#scoreIcon\n * @type {string} */\n scoreIcon,\n /**\n * Actions icon\n * @name module:skins/DefaultSkin.DefaultSkin#actionsIcon\n * @type {string} */\n actionsIcon,\n});\n\n// Register this class in the list of available skins\nexport default Skin.registerClass('default', DefaultSkin);\n"],"names":[],"sourceRoot":""}