FV Flowplayer Video Player - Version 7.5.3.727

Version Description

  • 2021/08/10 =

  • Security - fix for XSS vulnerability in stats screen

  • Bugfix - Force landscape orientation in fullscreen setting fix

  • Bugfix - bad scroll position after leaving fullscreen

  • Bugfix - Sticky player code should not run on mobile

Download this release

Release Info

Developer FolioVision
Plugin Icon 128x128 FV Flowplayer Video Player
Version 7.5.3.727
Comparing to
See all releases

Code changes from version 7.4.47.727 to 7.5.3.727

Files changed (51) hide show
  1. composer.json +50 -0
  2. controller/backend.php +62 -28
  3. controller/editor.php +89 -30
  4. controller/frontend.php +96 -20
  5. controller/settings.php +32 -5
  6. controller/shortcodes.php +19 -4
  7. controller/track.php +142 -0
  8. css/admin.css +15 -3
  9. css/colorbox.css +0 -0
  10. css/flowplayer.css +60 -2
  11. css/fonts/fpicons.eot +0 -0
  12. css/fonts/fpicons.svg +0 -0
  13. css/fonts/fpicons.ttf +0 -0
  14. css/fonts/fpicons.woff +0 -0
  15. css/img/exit_btn.png +0 -0
  16. css/img/techinfo.png +0 -0
  17. css/list-view.css +2 -6
  18. css/shortcode-editor.css +90 -20
  19. flowplayer.php +5 -4
  20. flowplayer/embed.min.js +0 -0
  21. flowplayer/flowplayer.dashjs.min.js +1 -1
  22. flowplayer/flowplayer.swf +0 -0
  23. flowplayer/flowplayerhls.swf +0 -0
  24. flowplayer/fv-flowplayer.min.js +1 -1
  25. flowplayer/fv-player-loader.babel.js +320 -0
  26. flowplayer/fv-player-loader.dev.js +313 -0
  27. flowplayer/fv-player.min.js +1 -0
  28. flowplayer/minify.sh +4 -10
  29. flowplayer/modules/abr-remember.module.js +98 -9
  30. flowplayer/modules/analytics.module.js +65 -20
  31. flowplayer/modules/fullscreen-fix.module.js +50 -16
  32. flowplayer/modules/fullscreen-force.module.js +23 -7
  33. flowplayer/modules/fv-player.js +91 -16
  34. flowplayer/modules/mobile.module.js +67 -1
  35. flowplayer/modules/multiple-playback.module.js +51 -24
  36. flowplayer/modules/playlist-controlbar.module.js +1 -1
  37. flowplayer/modules/playlist-missing-item.module.js +7 -6
  38. flowplayer/modules/playlist-repeat.module.js +26 -11
  39. flowplayer/modules/popup-anything.module.js +29 -0
  40. flowplayer/modules/sharing.module.js +27 -20
  41. flowplayer/modules/stats.module.js +11 -3
  42. flowplayer/modules/sticky.module.js +18 -0
  43. includes/class.fv-player-wizard-base.php +4 -4
  44. includes/fp-api-private.php +51 -5
  45. js/admin.js +3 -1
  46. js/chartjs/chart.min.js +13 -0
  47. js/editor-screenshots.js +5 -1
  48. js/fancybox.js +26 -6
  49. js/gutenberg.js +26 -3
  50. js/media-library-browser-base.js +0 -3
  51. js/shortcode-editor.js +526 -300
composer.json CHANGED
@@ -1,4 +1,9 @@
1
  {
 
 
 
 
 
2
  "require-dev": {
3
  "mockery/mockery": "^1.3.3"
4
  },
@@ -219,17 +224,23 @@
219
  "rm -rf vendor/aws/aws-sdk-php/src/data/acm-pca",
220
  "rm -rf vendor/aws/aws-sdk-php/src/data/acm",
221
  "rm -rf vendor/aws/aws-sdk-php/src/data/alexaforbusiness",
 
222
  "rm -rf vendor/aws/aws-sdk-php/src/data/amplify",
 
223
  "rm -rf vendor/aws/aws-sdk-php/src/data/apigateway",
224
  "rm -rf vendor/aws/aws-sdk-php/src/data/apigatewaymanagementapi",
225
  "rm -rf vendor/aws/aws-sdk-php/src/data/apigatewayv2",
226
  "rm -rf vendor/aws/aws-sdk-php/src/data/appconfig",
 
 
 
227
  "rm -rf vendor/aws/aws-sdk-php/src/data/application-autoscaling",
228
  "rm -rf vendor/aws/aws-sdk-php/src/data/application-insights",
229
  "rm -rf vendor/aws/aws-sdk-php/src/data/appmesh",
230
  "rm -rf vendor/aws/aws-sdk-php/src/data/appstream",
231
  "rm -rf vendor/aws/aws-sdk-php/src/data/appsync",
232
  "rm -rf vendor/aws/aws-sdk-php/src/data/athena",
 
233
  "rm -rf vendor/aws/aws-sdk-php/src/data/autoscaling-plans",
234
  "rm -rf vendor/aws/aws-sdk-php/src/data/autoscaling",
235
  "rm -rf vendor/aws/aws-sdk-php/src/data/backup",
@@ -238,6 +249,8 @@
238
  "rm -rf vendor/aws/aws-sdk-php/src/data/budgets",
239
  "rm -rf vendor/aws/aws-sdk-php/src/data/ce",
240
  "rm -rf vendor/aws/aws-sdk-php/src/data/chime",
 
 
241
  "rm -rf vendor/aws/aws-sdk-php/src/data/cloud9",
242
  "rm -rf vendor/aws/aws-sdk-php/src/data/clouddirectory",
243
  "rm -rf vendor/aws/aws-sdk-php/src/data/cloudformation",
@@ -263,15 +276,19 @@
263
  "rm -rf vendor/aws/aws-sdk-php/src/data/comprehendmedical",
264
  "rm -rf vendor/aws/aws-sdk-php/src/data/compute-optimizer",
265
  "rm -rf vendor/aws/aws-sdk-php/src/data/connect",
 
266
  "rm -rf vendor/aws/aws-sdk-php/src/data/connectparticipant",
267
  "rm -rf vendor/aws/aws-sdk-php/src/data/cur",
 
268
  "rm -rf vendor/aws/aws-sdk-php/src/data/data.iot",
 
269
  "rm -rf vendor/aws/aws-sdk-php/src/data/dataexchange",
270
  "rm -rf vendor/aws/aws-sdk-php/src/data/datapipeline",
271
  "rm -rf vendor/aws/aws-sdk-php/src/data/datasync",
272
  "rm -rf vendor/aws/aws-sdk-php/src/data/dax",
273
  "rm -rf vendor/aws/aws-sdk-php/src/data/detective",
274
  "rm -rf vendor/aws/aws-sdk-php/src/data/devicefarm",
 
275
  "rm -rf vendor/aws/aws-sdk-php/src/data/directconnect",
276
  "rm -rf vendor/aws/aws-sdk-php/src/data/discovery",
277
  "rm -rf vendor/aws/aws-sdk-php/src/data/dlm",
@@ -283,6 +300,7 @@
283
  "rm -rf vendor/aws/aws-sdk-php/src/data/ec2-instance-connect",
284
  "rm -rf vendor/aws/aws-sdk-php/src/data/ec2",
285
  "rm -rf vendor/aws/aws-sdk-php/src/data/ecr",
 
286
  "rm -rf vendor/aws/aws-sdk-php/src/data/ecs",
287
  "rm -rf vendor/aws/aws-sdk-php/src/data/eks",
288
  "rm -rf vendor/aws/aws-sdk-php/src/data/elastic-inference",
@@ -294,11 +312,15 @@
294
  "rm -rf vendor/aws/aws-sdk-php/src/data/elasticmapreduce",
295
  "rm -rf vendor/aws/aws-sdk-php/src/data/elastictranscoder",
296
  "rm -rf vendor/aws/aws-sdk-php/src/data/email",
 
297
  "rm -rf vendor/aws/aws-sdk-php/src/data/entitlement.marketplace",
298
  "rm -rf vendor/aws/aws-sdk-php/src/data/es",
299
  "rm -rf vendor/aws/aws-sdk-php/src/data/eventbridge",
300
  "rm -rf vendor/aws/aws-sdk-php/src/data/events",
 
 
301
  "rm -rf vendor/aws/aws-sdk-php/src/data/firehose",
 
302
  "rm -rf vendor/aws/aws-sdk-php/src/data/fms",
303
  "rm -rf vendor/aws/aws-sdk-php/src/data/forecast",
304
  "rm -rf vendor/aws/aws-sdk-php/src/data/forecastquery",
@@ -309,9 +331,11 @@
309
  "rm -rf vendor/aws/aws-sdk-php/src/data/globalaccelerator",
310
  "rm -rf vendor/aws/aws-sdk-php/src/data/glue",
311
  "rm -rf vendor/aws/aws-sdk-php/src/data/greengrass",
 
312
  "rm -rf vendor/aws/aws-sdk-php/src/data/groundstation",
313
  "rm -rf vendor/aws/aws-sdk-php/src/data/guardduty",
314
  "rm -rf vendor/aws/aws-sdk-php/src/data/health",
 
315
  "rm -rf vendor/aws/aws-sdk-php/src/data/honeycode",
316
  "rm -rf vendor/aws/aws-sdk-php/src/data/iam",
317
  "rm -rf vendor/aws/aws-sdk-php/src/data/imagebuilder",
@@ -319,6 +343,9 @@
319
  "rm -rf vendor/aws/aws-sdk-php/src/data/inspector",
320
  "rm -rf vendor/aws/aws-sdk-php/src/data/iot-jobs-data",
321
  "rm -rf vendor/aws/aws-sdk-php/src/data/iot",
 
 
 
322
  "rm -rf vendor/aws/aws-sdk-php/src/data/iot1click-devices",
323
  "rm -rf vendor/aws/aws-sdk-php/src/data/iot1click-projects",
324
  "rm -rf vendor/aws/aws-sdk-php/src/data/iotanalytics",
@@ -343,7 +370,11 @@
343
  "rm -rf vendor/aws/aws-sdk-php/src/data/lex-models",
344
  "rm -rf vendor/aws/aws-sdk-php/src/data/license-manager",
345
  "rm -rf vendor/aws/aws-sdk-php/src/data/lightsail",
 
346
  "rm -rf vendor/aws/aws-sdk-php/src/data/logs",
 
 
 
347
  "rm -rf vendor/aws/aws-sdk-php/src/data/machinelearning",
348
  "rm -rf vendor/aws/aws-sdk-php/src/data/macie",
349
  "rm -rf vendor/aws/aws-sdk-php/src/data/macie2",
@@ -360,13 +391,18 @@
360
  "rm -rf vendor/aws/aws-sdk-php/src/data/mediatailor",
361
  "rm -rf vendor/aws/aws-sdk-php/src/data/metering.marketplace",
362
  "rm -rf vendor/aws/aws-sdk-php/src/data/mgh",
 
363
  "rm -rf vendor/aws/aws-sdk-php/src/data/migrationhub-config",
364
  "rm -rf vendor/aws/aws-sdk-php/src/data/mobile",
 
365
  "rm -rf vendor/aws/aws-sdk-php/src/data/monitoring",
366
  "rm -rf vendor/aws/aws-sdk-php/src/data/mq",
367
  "rm -rf vendor/aws/aws-sdk-php/src/data/mturk-requester",
 
368
  "rm -rf vendor/aws/aws-sdk-php/src/data/neptune",
 
369
  "rm -rf vendor/aws/aws-sdk-php/src/data/networkmanager",
 
370
  "rm -rf vendor/aws/aws-sdk-php/src/data/opsworks",
371
  "rm -rf vendor/aws/aws-sdk-php/src/data/opsworkscm",
372
  "rm -rf vendor/aws/aws-sdk-php/src/data/organizations",
@@ -379,6 +415,7 @@
379
  "rm -rf vendor/aws/aws-sdk-php/src/data/pinpoint",
380
  "rm -rf vendor/aws/aws-sdk-php/src/data/polly",
381
  "rm -rf vendor/aws/aws-sdk-php/src/data/pricing",
 
382
  "rm -rf vendor/aws/aws-sdk-php/src/data/qldb-session",
383
  "rm -rf vendor/aws/aws-sdk-php/src/data/qldb",
384
  "rm -rf vendor/aws/aws-sdk-php/src/data/quicksight",
@@ -391,12 +428,19 @@
391
  "rm -rf vendor/aws/aws-sdk-php/src/data/resourcegroupstaggingapi",
392
  "rm -rf vendor/aws/aws-sdk-php/src/data/robomaker",
393
  "rm -rf vendor/aws/aws-sdk-php/src/data/route53",
 
 
 
394
  "rm -rf vendor/aws/aws-sdk-php/src/data/route53domains",
395
  "rm -rf vendor/aws/aws-sdk-php/src/data/route53resolver",
396
  "rm -rf vendor/aws/aws-sdk-php/src/data/runtime.lex",
 
397
  "rm -rf vendor/aws/aws-sdk-php/src/data/runtime.sagemaker",
398
  "rm -rf vendor/aws/aws-sdk-php/src/data/s3control",
 
399
  "rm -rf vendor/aws/aws-sdk-php/src/data/sagemaker-a2i-runtime",
 
 
400
  "rm -rf vendor/aws/aws-sdk-php/src/data/sagemaker",
401
  "rm -rf vendor/aws/aws-sdk-php/src/data/savingsplans",
402
  "rm -rf vendor/aws/aws-sdk-php/src/data/schemas",
@@ -405,6 +449,7 @@
405
  "rm -rf vendor/aws/aws-sdk-php/src/data/serverlessrepo",
406
  "rm -rf vendor/aws/aws-sdk-php/src/data/service-quotas",
407
  "rm -rf vendor/aws/aws-sdk-php/src/data/servicecatalog",
 
408
  "rm -rf vendor/aws/aws-sdk-php/src/data/servicediscovery",
409
  "rm -rf vendor/aws/aws-sdk-php/src/data/sesv2",
410
  "rm -rf vendor/aws/aws-sdk-php/src/data/shield",
@@ -412,9 +457,12 @@
412
  "rm -rf vendor/aws/aws-sdk-php/src/data/sms-voice",
413
  "rm -rf vendor/aws/aws-sdk-php/src/data/sms",
414
  "rm -rf vendor/aws/aws-sdk-php/src/data/snowball",
 
415
  "rm -rf vendor/aws/aws-sdk-php/src/data/sns",
416
  "rm -rf vendor/aws/aws-sdk-php/src/data/sqs",
417
  "rm -rf vendor/aws/aws-sdk-php/src/data/ssm",
 
 
418
  "rm -rf vendor/aws/aws-sdk-php/src/data/sso-oidc",
419
  "rm -rf vendor/aws/aws-sdk-php/src/data/sso",
420
  "rm -rf vendor/aws/aws-sdk-php/src/data/states",
@@ -425,6 +473,8 @@
425
  "rm -rf vendor/aws/aws-sdk-php/src/data/swf",
426
  "rm -rf vendor/aws/aws-sdk-php/src/data/synthetics",
427
  "rm -rf vendor/aws/aws-sdk-php/src/data/textract",
 
 
428
  "rm -rf vendor/aws/aws-sdk-php/src/data/transcribe",
429
  "rm -rf vendor/aws/aws-sdk-php/src/data/transfer",
430
  "rm -rf vendor/aws/aws-sdk-php/src/data/translate",
1
  {
2
+ "config": {
3
+ "platform": {
4
+ "php": "5.6"
5
+ }
6
+ },
7
  "require-dev": {
8
  "mockery/mockery": "^1.3.3"
9
  },
224
  "rm -rf vendor/aws/aws-sdk-php/src/data/acm-pca",
225
  "rm -rf vendor/aws/aws-sdk-php/src/data/acm",
226
  "rm -rf vendor/aws/aws-sdk-php/src/data/alexaforbusiness",
227
+ "rm -rf vendor/aws/aws-sdk-php/src/data/amp",
228
  "rm -rf vendor/aws/aws-sdk-php/src/data/amplify",
229
+ "rm -rf vendor/aws/aws-sdk-php/src/data/amplifybackend",
230
  "rm -rf vendor/aws/aws-sdk-php/src/data/apigateway",
231
  "rm -rf vendor/aws/aws-sdk-php/src/data/apigatewaymanagementapi",
232
  "rm -rf vendor/aws/aws-sdk-php/src/data/apigatewayv2",
233
  "rm -rf vendor/aws/aws-sdk-php/src/data/appconfig",
234
+ "rm -rf vendor/aws/aws-sdk-php/src/data/appintegrations",
235
+ "rm -rf vendor/aws/aws-sdk-php/src/data/applicationcostprofiler",
236
+ "rm -rf vendor/aws/aws-sdk-php/src/data/apprunner",
237
  "rm -rf vendor/aws/aws-sdk-php/src/data/application-autoscaling",
238
  "rm -rf vendor/aws/aws-sdk-php/src/data/application-insights",
239
  "rm -rf vendor/aws/aws-sdk-php/src/data/appmesh",
240
  "rm -rf vendor/aws/aws-sdk-php/src/data/appstream",
241
  "rm -rf vendor/aws/aws-sdk-php/src/data/appsync",
242
  "rm -rf vendor/aws/aws-sdk-php/src/data/athena",
243
+ "rm -rf vendor/aws/aws-sdk-php/src/data/auditmanager",
244
  "rm -rf vendor/aws/aws-sdk-php/src/data/autoscaling-plans",
245
  "rm -rf vendor/aws/aws-sdk-php/src/data/autoscaling",
246
  "rm -rf vendor/aws/aws-sdk-php/src/data/backup",
249
  "rm -rf vendor/aws/aws-sdk-php/src/data/budgets",
250
  "rm -rf vendor/aws/aws-sdk-php/src/data/ce",
251
  "rm -rf vendor/aws/aws-sdk-php/src/data/chime",
252
+ "rm -rf vendor/aws/aws-sdk-php/src/data/chime-sdk-identity",
253
+ "rm -rf vendor/aws/aws-sdk-php/src/data/chime-sdk-messaging",
254
  "rm -rf vendor/aws/aws-sdk-php/src/data/cloud9",
255
  "rm -rf vendor/aws/aws-sdk-php/src/data/clouddirectory",
256
  "rm -rf vendor/aws/aws-sdk-php/src/data/cloudformation",
276
  "rm -rf vendor/aws/aws-sdk-php/src/data/comprehendmedical",
277
  "rm -rf vendor/aws/aws-sdk-php/src/data/compute-optimizer",
278
  "rm -rf vendor/aws/aws-sdk-php/src/data/connect",
279
+ "rm -rf vendor/aws/aws-sdk-php/src/data/connect-contact-lens",
280
  "rm -rf vendor/aws/aws-sdk-php/src/data/connectparticipant",
281
  "rm -rf vendor/aws/aws-sdk-php/src/data/cur",
282
+ "rm -rf vendor/aws/aws-sdk-php/src/data/customer-profiles",
283
  "rm -rf vendor/aws/aws-sdk-php/src/data/data.iot",
284
+ "rm -rf vendor/aws/aws-sdk-php/src/data/databrew",
285
  "rm -rf vendor/aws/aws-sdk-php/src/data/dataexchange",
286
  "rm -rf vendor/aws/aws-sdk-php/src/data/datapipeline",
287
  "rm -rf vendor/aws/aws-sdk-php/src/data/datasync",
288
  "rm -rf vendor/aws/aws-sdk-php/src/data/dax",
289
  "rm -rf vendor/aws/aws-sdk-php/src/data/detective",
290
  "rm -rf vendor/aws/aws-sdk-php/src/data/devicefarm",
291
+ "rm -rf vendor/aws/aws-sdk-php/src/data/devops-guru",
292
  "rm -rf vendor/aws/aws-sdk-php/src/data/directconnect",
293
  "rm -rf vendor/aws/aws-sdk-php/src/data/discovery",
294
  "rm -rf vendor/aws/aws-sdk-php/src/data/dlm",
300
  "rm -rf vendor/aws/aws-sdk-php/src/data/ec2-instance-connect",
301
  "rm -rf vendor/aws/aws-sdk-php/src/data/ec2",
302
  "rm -rf vendor/aws/aws-sdk-php/src/data/ecr",
303
+ "rm -rf vendor/aws/aws-sdk-php/src/data/ecr-public",
304
  "rm -rf vendor/aws/aws-sdk-php/src/data/ecs",
305
  "rm -rf vendor/aws/aws-sdk-php/src/data/eks",
306
  "rm -rf vendor/aws/aws-sdk-php/src/data/elastic-inference",
312
  "rm -rf vendor/aws/aws-sdk-php/src/data/elasticmapreduce",
313
  "rm -rf vendor/aws/aws-sdk-php/src/data/elastictranscoder",
314
  "rm -rf vendor/aws/aws-sdk-php/src/data/email",
315
+ "rm -rf vendor/aws/aws-sdk-php/src/data/emr-containers",
316
  "rm -rf vendor/aws/aws-sdk-php/src/data/entitlement.marketplace",
317
  "rm -rf vendor/aws/aws-sdk-php/src/data/es",
318
  "rm -rf vendor/aws/aws-sdk-php/src/data/eventbridge",
319
  "rm -rf vendor/aws/aws-sdk-php/src/data/events",
320
+ "rm -rf vendor/aws/aws-sdk-php/src/data/finspace",
321
+ "rm -rf vendor/aws/aws-sdk-php/src/data/finspace-data",
322
  "rm -rf vendor/aws/aws-sdk-php/src/data/firehose",
323
+ "rm -rf vendor/aws/aws-sdk-php/src/data/fis",
324
  "rm -rf vendor/aws/aws-sdk-php/src/data/fms",
325
  "rm -rf vendor/aws/aws-sdk-php/src/data/forecast",
326
  "rm -rf vendor/aws/aws-sdk-php/src/data/forecastquery",
331
  "rm -rf vendor/aws/aws-sdk-php/src/data/globalaccelerator",
332
  "rm -rf vendor/aws/aws-sdk-php/src/data/glue",
333
  "rm -rf vendor/aws/aws-sdk-php/src/data/greengrass",
334
+ "rm -rf vendor/aws/aws-sdk-php/src/data/greengrassv2",
335
  "rm -rf vendor/aws/aws-sdk-php/src/data/groundstation",
336
  "rm -rf vendor/aws/aws-sdk-php/src/data/guardduty",
337
  "rm -rf vendor/aws/aws-sdk-php/src/data/health",
338
+ "rm -rf vendor/aws/aws-sdk-php/src/data/healthlake",
339
  "rm -rf vendor/aws/aws-sdk-php/src/data/honeycode",
340
  "rm -rf vendor/aws/aws-sdk-php/src/data/iam",
341
  "rm -rf vendor/aws/aws-sdk-php/src/data/imagebuilder",
343
  "rm -rf vendor/aws/aws-sdk-php/src/data/inspector",
344
  "rm -rf vendor/aws/aws-sdk-php/src/data/iot-jobs-data",
345
  "rm -rf vendor/aws/aws-sdk-php/src/data/iot",
346
+ "rm -rf vendor/aws/aws-sdk-php/src/data/iotdeviceadvisor",
347
+ "rm -rf vendor/aws/aws-sdk-php/src/data/iotfleethub",
348
+ "rm -rf vendor/aws/aws-sdk-php/src/data/iotwireless",
349
  "rm -rf vendor/aws/aws-sdk-php/src/data/iot1click-devices",
350
  "rm -rf vendor/aws/aws-sdk-php/src/data/iot1click-projects",
351
  "rm -rf vendor/aws/aws-sdk-php/src/data/iotanalytics",
370
  "rm -rf vendor/aws/aws-sdk-php/src/data/lex-models",
371
  "rm -rf vendor/aws/aws-sdk-php/src/data/license-manager",
372
  "rm -rf vendor/aws/aws-sdk-php/src/data/lightsail",
373
+ "rm -rf vendor/aws/aws-sdk-php/src/data/location",
374
  "rm -rf vendor/aws/aws-sdk-php/src/data/logs",
375
+ "rm -rf vendor/aws/aws-sdk-php/src/data/lookoutequipment",
376
+ "rm -rf vendor/aws/aws-sdk-php/src/data/lookoutmetrics",
377
+ "rm -rf vendor/aws/aws-sdk-php/src/data/lookoutvision",
378
  "rm -rf vendor/aws/aws-sdk-php/src/data/machinelearning",
379
  "rm -rf vendor/aws/aws-sdk-php/src/data/macie",
380
  "rm -rf vendor/aws/aws-sdk-php/src/data/macie2",
391
  "rm -rf vendor/aws/aws-sdk-php/src/data/mediatailor",
392
  "rm -rf vendor/aws/aws-sdk-php/src/data/metering.marketplace",
393
  "rm -rf vendor/aws/aws-sdk-php/src/data/mgh",
394
+ "rm -rf vendor/aws/aws-sdk-php/src/data/mgn",
395
  "rm -rf vendor/aws/aws-sdk-php/src/data/migrationhub-config",
396
  "rm -rf vendor/aws/aws-sdk-php/src/data/mobile",
397
+ "rm -rf vendor/aws/aws-sdk-php/src/data/models.lex.v2",
398
  "rm -rf vendor/aws/aws-sdk-php/src/data/monitoring",
399
  "rm -rf vendor/aws/aws-sdk-php/src/data/mq",
400
  "rm -rf vendor/aws/aws-sdk-php/src/data/mturk-requester",
401
+ "rm -rf vendor/aws/aws-sdk-php/src/data/mwaa",
402
  "rm -rf vendor/aws/aws-sdk-php/src/data/neptune",
403
+ "rm -rf vendor/aws/aws-sdk-php/src/data/network-firewall",
404
  "rm -rf vendor/aws/aws-sdk-php/src/data/networkmanager",
405
+ "rm -rf vendor/aws/aws-sdk-php/src/data/nimble",
406
  "rm -rf vendor/aws/aws-sdk-php/src/data/opsworks",
407
  "rm -rf vendor/aws/aws-sdk-php/src/data/opsworkscm",
408
  "rm -rf vendor/aws/aws-sdk-php/src/data/organizations",
415
  "rm -rf vendor/aws/aws-sdk-php/src/data/pinpoint",
416
  "rm -rf vendor/aws/aws-sdk-php/src/data/polly",
417
  "rm -rf vendor/aws/aws-sdk-php/src/data/pricing",
418
+ "rm -rf vendor/aws/aws-sdk-php/src/data/proton",
419
  "rm -rf vendor/aws/aws-sdk-php/src/data/qldb-session",
420
  "rm -rf vendor/aws/aws-sdk-php/src/data/qldb",
421
  "rm -rf vendor/aws/aws-sdk-php/src/data/quicksight",
428
  "rm -rf vendor/aws/aws-sdk-php/src/data/resourcegroupstaggingapi",
429
  "rm -rf vendor/aws/aws-sdk-php/src/data/robomaker",
430
  "rm -rf vendor/aws/aws-sdk-php/src/data/route53",
431
+ "rm -rf vendor/aws/aws-sdk-php/src/data/route53-recovery-cluster",
432
+ "rm -rf vendor/aws/aws-sdk-php/src/data/route53-recovery-control-config",
433
+ "rm -rf vendor/aws/aws-sdk-php/src/data/route53-recovery-readiness",
434
  "rm -rf vendor/aws/aws-sdk-php/src/data/route53domains",
435
  "rm -rf vendor/aws/aws-sdk-php/src/data/route53resolver",
436
  "rm -rf vendor/aws/aws-sdk-php/src/data/runtime.lex",
437
+ "rm -rf vendor/aws/aws-sdk-php/src/data/runtime.lex.v2",
438
  "rm -rf vendor/aws/aws-sdk-php/src/data/runtime.sagemaker",
439
  "rm -rf vendor/aws/aws-sdk-php/src/data/s3control",
440
+ "rm -rf vendor/aws/aws-sdk-php/src/data/s3outposts",
441
  "rm -rf vendor/aws/aws-sdk-php/src/data/sagemaker-a2i-runtime",
442
+ "rm -rf vendor/aws/aws-sdk-php/src/data/sagemaker-edge",
443
+ "rm -rf vendor/aws/aws-sdk-php/src/data/sagemaker-featurestore-runtime",
444
  "rm -rf vendor/aws/aws-sdk-php/src/data/sagemaker",
445
  "rm -rf vendor/aws/aws-sdk-php/src/data/savingsplans",
446
  "rm -rf vendor/aws/aws-sdk-php/src/data/schemas",
449
  "rm -rf vendor/aws/aws-sdk-php/src/data/serverlessrepo",
450
  "rm -rf vendor/aws/aws-sdk-php/src/data/service-quotas",
451
  "rm -rf vendor/aws/aws-sdk-php/src/data/servicecatalog",
452
+ "rm -rf vendor/aws/aws-sdk-php/src/data/servicecatalog-appregistry",
453
  "rm -rf vendor/aws/aws-sdk-php/src/data/servicediscovery",
454
  "rm -rf vendor/aws/aws-sdk-php/src/data/sesv2",
455
  "rm -rf vendor/aws/aws-sdk-php/src/data/shield",
457
  "rm -rf vendor/aws/aws-sdk-php/src/data/sms-voice",
458
  "rm -rf vendor/aws/aws-sdk-php/src/data/sms",
459
  "rm -rf vendor/aws/aws-sdk-php/src/data/snowball",
460
+ "rm -rf vendor/aws/aws-sdk-php/src/data/snow-device-management",
461
  "rm -rf vendor/aws/aws-sdk-php/src/data/sns",
462
  "rm -rf vendor/aws/aws-sdk-php/src/data/sqs",
463
  "rm -rf vendor/aws/aws-sdk-php/src/data/ssm",
464
+ "rm -rf vendor/aws/aws-sdk-php/src/data/ssm-contacts",
465
+ "rm -rf vendor/aws/aws-sdk-php/src/data/ssm-incidents",
466
  "rm -rf vendor/aws/aws-sdk-php/src/data/sso-oidc",
467
  "rm -rf vendor/aws/aws-sdk-php/src/data/sso",
468
  "rm -rf vendor/aws/aws-sdk-php/src/data/states",
473
  "rm -rf vendor/aws/aws-sdk-php/src/data/swf",
474
  "rm -rf vendor/aws/aws-sdk-php/src/data/synthetics",
475
  "rm -rf vendor/aws/aws-sdk-php/src/data/textract",
476
+ "rm -rf vendor/aws/aws-sdk-php/src/data/timestream-query",
477
+ "rm -rf vendor/aws/aws-sdk-php/src/data/timestream-write",
478
  "rm -rf vendor/aws/aws-sdk-php/src/data/transcribe",
479
  "rm -rf vendor/aws/aws-sdk-php/src/data/transfer",
480
  "rm -rf vendor/aws/aws-sdk-php/src/data/translate",
controller/backend.php CHANGED
@@ -57,7 +57,7 @@ function fv_wp_flowplayer_support_mail_phpmailer_init( $phpmailer ) {
57
  global $fv_wp_flowplayer_support_mail_from, $fv_wp_flowplayer_support_mail_from_name;
58
 
59
  if( $fv_wp_flowplayer_support_mail_from_name ) {
60
- $phpmailer->FromName = trim( $fv_filled_in_phpmailer_init_from_name );
61
  }
62
  if( $fv_wp_flowplayer_support_mail_from ) {
63
  if( strcmp( trim($phpmailer->From), trim($fv_wp_flowplayer_support_mail_from) ) != 0 && !trim($phpmailer->Sender) ) {
@@ -193,12 +193,12 @@ function fv_wp_flowplayer_check_script_version( $url ) {
193
  }
194
 
195
  global $fv_wp_flowplayer_ver;
196
- if( strpos( $url, '/fv-wordpress-flowplayer/flowplayer/fv-flowplayer.min.js?ver='.$fv_wp_flowplayer_ver ) !== false ) {
197
  return 1;
198
  }
199
 
200
  // when using Google PageSpeed module
201
- if( strpos( $url, '/fv-wordpress-flowplayer/flowplayer/fv-flowplayer.min.js,qver='.$fv_wp_flowplayer_ver ) !== false ) {
202
  return 1;
203
  }
204
 
@@ -378,6 +378,8 @@ function fv_player_admin_update() {
378
 
379
  $aOptions = get_option( 'fvwpflowplayer' );
380
  if( !isset($aOptions['version']) || version_compare( $fv_wp_flowplayer_ver, $aOptions['version'] ) ) {
 
 
381
  //update_option( 'fv_wordpress_flowplayer_deferred_notices', 'FV Flowplayer upgraded - please click "Check template" and "Check videos" for automated check of your site at <a href="'.site_url().'/wp-admin/options-general.php?page=fvplayer">the settings page</a> for automated checks!' );
382
  if(!empty($aOptions['version']) ) {
383
  $aOptions['chromecast'] = true;
@@ -453,6 +455,14 @@ function fv_wp_flowplayer_delete_extensions_transients( $delete_delay = false ){
453
  add_action('admin_init', 'fv_player_lchecks');
454
 
455
  function fv_player_lchecks() {
 
 
 
 
 
 
 
 
456
  if( isset($_GET['fv-licensing']) && $_GET['fv-licensing'] == "check" ){
457
  delete_option("fv_wordpress_flowplayer_persistent_notices");
458
 
@@ -666,35 +676,27 @@ function fv_wp_flowplayer_install_extension( $plugin_package = 'fv_player_pro' )
666
 
667
 
668
 
669
- function fv_player_disable_object_cache($value=null){
670
- global $_wp_using_ext_object_cache, $fv_player_wp_using_ext_object_cache_prev;
671
- $fv_player_wp_using_ext_object_cache_prev = $_wp_using_ext_object_cache;
672
- $_wp_using_ext_object_cache = false;
673
- return $value;
674
- }
675
-
676
- function fv_player_enable_object_cache($value=null){
677
- global $_wp_using_ext_object_cache, $fv_player_wp_using_ext_object_cache_prev;
678
- $_wp_using_ext_object_cache = $fv_player_wp_using_ext_object_cache_prev;
679
- return $value;
680
- }
681
-
682
- add_filter( 'pre_set_transient_fv_flowplayer_license', 'fv_player_disable_object_cache' );
683
- add_filter( 'pre_transient_fv_flowplayer_license', 'fv_player_disable_object_cache' );
684
- add_action( 'delete_transient_fv_flowplayer_license', 'fv_player_disable_object_cache' );
685
- add_action( 'set_transient_fv_flowplayer_license', 'fv_player_disable_object_cache' );
686
- add_filter( 'transient_fv_flowplayer_license', 'fv_player_enable_object_cache' );
687
- add_action( 'deleted_transient_fv_flowplayer_license', 'fv_player_disable_object_cache' );
688
-
689
-
690
 
 
 
 
691
 
692
- function flowplayer_deactivate() {
693
- if( flowplayer::is_licensed() ) {
 
 
 
 
694
  delete_transient( 'fv_flowplayer_license' );
695
  }
 
696
  delete_option( 'fv_flowplayer_extension_install' );
697
- wp_clear_scheduled_hook('fv_flowplayer_checker_event');
 
 
698
  }
699
 
700
 
@@ -793,7 +795,7 @@ function fv_player_rollback_message( $val ) {
793
  add_action( 'admin_notices', 'fv_player_pro_version_check' );
794
 
795
  function fv_player_pro_version_check() {
796
- $version = '7.4.47.727';
797
 
798
  global $FV_Player_Pro;
799
 
@@ -805,3 +807,35 @@ function fv_player_pro_version_check() {
805
  <?php
806
  endif;
807
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  global $fv_wp_flowplayer_support_mail_from, $fv_wp_flowplayer_support_mail_from_name;
58
 
59
  if( $fv_wp_flowplayer_support_mail_from_name ) {
60
+ $phpmailer->FromName = trim( $fv_wp_flowplayer_support_mail_from_name );
61
  }
62
  if( $fv_wp_flowplayer_support_mail_from ) {
63
  if( strcmp( trim($phpmailer->From), trim($fv_wp_flowplayer_support_mail_from) ) != 0 && !trim($phpmailer->Sender) ) {
193
  }
194
 
195
  global $fv_wp_flowplayer_ver;
196
+ if( strpos( $url, '/fv-wordpress-flowplayer/flowplayer/fv-player.min.js?ver='.$fv_wp_flowplayer_ver ) !== false ) {
197
  return 1;
198
  }
199
 
200
  // when using Google PageSpeed module
201
+ if( strpos( $url, '/fv-wordpress-flowplayer/flowplayer/fv-player.min.js,qver='.$fv_wp_flowplayer_ver ) !== false ) {
202
  return 1;
203
  }
204
 
378
 
379
  $aOptions = get_option( 'fvwpflowplayer' );
380
  if( !isset($aOptions['version']) || version_compare( $fv_wp_flowplayer_ver, $aOptions['version'] ) ) {
381
+ do_action( 'fv_player_update' );
382
+
383
  //update_option( 'fv_wordpress_flowplayer_deferred_notices', 'FV Flowplayer upgraded - please click "Check template" and "Check videos" for automated check of your site at <a href="'.site_url().'/wp-admin/options-general.php?page=fvplayer">the settings page</a> for automated checks!' );
384
  if(!empty($aOptions['version']) ) {
385
  $aOptions['chromecast'] = true;
455
  add_action('admin_init', 'fv_player_lchecks');
456
 
457
  function fv_player_lchecks() {
458
+ // Do not run if it's WP Ajax
459
+ if( defined('DOING_AJAX') && DOING_AJAX ) {
460
+ // And it's not related to anythin FV
461
+ if( empty($_REQUEST['action']) || stripos($_REQUEST['action'], 'fv' ) === false ) {
462
+ return;
463
+ }
464
+ }
465
+
466
  if( isset($_GET['fv-licensing']) && $_GET['fv-licensing'] == "check" ){
467
  delete_option("fv_wordpress_flowplayer_persistent_notices");
468
 
676
 
677
 
678
 
679
+ function flowplayer_deactivate() {
680
+ if ( WP_Filesystem() ) {
681
+ global $wp_filesystem;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
682
 
683
+ if( $wp_filesystem->exists( $wp_filesystem->wp_content_dir().'fv-player-tracking/' ) ) {
684
+ $wp_filesystem->rmdir( $wp_filesystem->wp_content_dir().'fv-player-tracking/', true );
685
+ }
686
 
687
+ if( $wp_filesystem->exists( $wp_filesystem->wp_content_dir().'fv-flowplayer-custom/' ) ) {
688
+ $wp_filesystem->rmdir( $wp_filesystem->wp_content_dir().'fv-flowplayer-custom/', true );
689
+ }
690
+ }
691
+
692
+ if( flowplayer::is_licensed() ) {
693
  delete_transient( 'fv_flowplayer_license' );
694
  }
695
+
696
  delete_option( 'fv_flowplayer_extension_install' );
697
+
698
+ wp_clear_scheduled_hook( 'fv_flowplayer_checker_event' );
699
+ wp_clear_scheduled_hook( 'fv_player_stats' );
700
  }
701
 
702
 
795
  add_action( 'admin_notices', 'fv_player_pro_version_check' );
796
 
797
  function fv_player_pro_version_check() {
798
+ $version = '7.5.0.727';
799
 
800
  global $FV_Player_Pro;
801
 
807
  <?php
808
  endif;
809
  }
810
+
811
+ add_action( 'admin_notices', 'fv_player_pay_per_view_version_check' );
812
+
813
+ function fv_player_pay_per_view_version_check() {
814
+ $version = '7.5.3.727';
815
+
816
+ global $FV_Player_PayPerView;
817
+
818
+ if( !empty($FV_Player_PayPerView) && !fv_player_extension_version_is_min($version,'ppv') ) :
819
+ ?>
820
+ <div class="error">
821
+ <p><?php printf( __( 'FV Player: Please upgrade to FV Player Pay Per View version %s or above!', 'fv-wordpress-flowplayer' ), $version ); ?></p>
822
+ </div>
823
+ <?php
824
+ endif;
825
+ }
826
+
827
+ add_action( 'admin_notices', 'fv_player_pay_per_view_woocommerce_version_check' );
828
+
829
+ function fv_player_pay_per_view_woocommerce_version_check() {
830
+ $version = '7.5.3.727';
831
+
832
+ global $FV_Player_PayPerView_WooCommerce;
833
+
834
+ if( !empty($FV_Player_PayPerView_WooCommerce) && !fv_player_extension_version_is_min($version,'ppv-woocommerce') ) :
835
+ ?>
836
+ <div class="error">
837
+ <p><?php printf( __( 'FV Player: Please upgrade to FV Player Pay Per View for WooCommerce version %s or above!', 'fv-wordpress-flowplayer' ), $version ); ?></p>
838
+ </div>
839
+ <?php
840
+ endif;
841
+ }
controller/editor.php CHANGED
@@ -22,19 +22,49 @@ function fv_player_shortcode_editor_scripts_enqueue() {
22
  wp_register_script('fvwpflowplayer-editor-screenshots', flowplayer::get_plugin_url().'/js/editor-screenshots.js',array('jquery','fvwpflowplayer-shortcode-editor','flowplayer'), $fv_wp_flowplayer_ver );
23
 
24
  wp_localize_script( 'fvwpflowplayer-shortcode-editor', 'fv_player_editor_conf', array(
 
 
25
  'db_import_nonce' => wp_create_nonce( "fv-player-db-import-".get_current_user_id() ),
26
  'db_load_nonce' => wp_create_nonce( "fv-player-db-load-".get_current_user_id() ),
27
  'preview_nonce' => wp_create_nonce( "fv-player-preview-".get_current_user_id() ),
28
- 'splashscreen_nonce' => wp_create_nonce( "fv-player-splashscreen-".get_current_user_id())
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  ) );
30
 
31
  wp_enqueue_script('fvwpflowplayer-shortcode-editor');
32
  wp_enqueue_script('fvwpflowplayer-editor-screenshots');
33
 
34
- wp_register_style('fvwpflowplayer-domwindow-css', flowplayer::get_plugin_url().'/css/colorbox.css','','1.0','screen');
35
- wp_enqueue_style('fvwpflowplayer-domwindow-css');
36
- wp_register_style('fvwpflowplayer-shortcode-editor', flowplayer::get_plugin_url().'/css/shortcode-editor.css','','1.0','screen');
37
- wp_enqueue_style('fvwpflowplayer-shortcode-editor');
38
  }
39
 
40
 
@@ -80,7 +110,7 @@ function fv_wp_flowplayer_gutenberg_editor_load() {
80
  add_action( 'edit_form_after_editor', 'fv_wp_flowplayer_edit_form_after_editor' );
81
 
82
  function fv_wp_flowplayer_edit_form_after_editor( ) {
83
- include dirname( __FILE__ ) . '/../view/wizard.php';
84
 
85
  // todo: will some of this break page builders?
86
  global $fv_fp_scripts, $fv_fp;
@@ -178,21 +208,34 @@ function fv_wp_flowplayer_featured_image($post_id) {
178
  }
179
 
180
  $post = get_post($post_id);
181
- if( !$post || empty($post->post_content) ){
182
- return;
183
- }
184
 
185
  $url = false;
186
 
187
- if( preg_match('/(?:splash=\\\?")([^"]*.(?:jpg|gif|png))/', $post->post_content, $splash) ) {
188
- $url = $splash[1];
189
- } else if( preg_match('/\[fvplayer.*?id="(\d+)/', $post->post_content, $id) ) {
 
 
190
  global $FV_Player_Db;
191
  $atts = $FV_Player_Db->getPlayerAttsFromDb( array( 'id' => $id[1] ) );
192
  if( !empty($atts['splash']) ) {
193
  $url = $atts['splash'];
194
  }
195
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
 
197
  if( !$url ) return;
198
 
@@ -269,6 +312,12 @@ function fv_wp_flowplayer_save_to_media_library( $image_url, $post_id ) {
269
  );
270
  // Insert the attachment
271
  $attach_id = wp_insert_attachment( $attachment, $upload['file'], $post_id );
 
 
 
 
 
 
272
 
273
  }
274
 
@@ -305,22 +354,24 @@ function fv_player_splashcreen_action() {
305
  return urldecode($caption);
306
  }
307
 
308
- if( check_ajax_referer( "fv-player-splashscreen-".get_current_user_id(), "security" , false ) == 1 ){
309
  $title = $_POST['title'];
310
  $img = $_POST['img'];
311
-
 
312
  $img = str_replace('data:image/jpeg;base64,', '', $img);
313
  $img = str_replace(' ', '+', $img);
314
 
315
  $title = getTitleFromUrl($title);
316
  $title = sanitize_title($title);
317
-
 
318
  $decoded = base64_decode($img) ;
319
 
320
  $upload_dir = wp_upload_dir();
321
  $upload_path = str_replace( '/', DIRECTORY_SEPARATOR, $upload_dir['path'] ) . DIRECTORY_SEPARATOR;
322
 
323
- $filename = $title .'.jpeg';
324
 
325
  // $hashed_filename = md5( $filename . microtime() ) . '_' . $filename;
326
 
@@ -351,7 +402,7 @@ function fv_player_splashcreen_action() {
351
  'src' => '',
352
  'error' => $file_return['error']
353
  );
354
- }else{
355
  $filename = $file_return['file'];
356
 
357
  $attachment = array(
@@ -361,21 +412,29 @@ function fv_player_splashcreen_action() {
361
  'post_status' => 'inherit',
362
  'guid' => $upload_dir['url'] . '/' . basename($filename)
363
  );
364
- $attach_id = wp_insert_attachment( $attachment, $filename );
365
-
366
- require_once(ABSPATH . 'wp-admin/includes/image.php');
367
-
368
- $attach_data = wp_generate_attachment_metadata( $attach_id, $filename );
369
- wp_update_attachment_metadata( $attach_id, $attach_data );
370
 
371
- $src = wp_get_attachment_image_url($attach_id, $size = 'full', false);
372
 
373
- $jsonReturn = array(
374
- 'src' => $src,
375
- 'error' => ''
376
- );
377
- }
378
- }else{
 
 
 
 
 
 
 
 
 
 
 
 
 
 
379
  $jsonReturn = array(
380
  'src' => '',
381
  'error' => 'Nonce error - please reload your page'
22
  wp_register_script('fvwpflowplayer-editor-screenshots', flowplayer::get_plugin_url().'/js/editor-screenshots.js',array('jquery','fvwpflowplayer-shortcode-editor','flowplayer'), $fv_wp_flowplayer_ver );
23
 
24
  wp_localize_script( 'fvwpflowplayer-shortcode-editor', 'fv_player_editor_conf', array(
25
+ 'admin_url' => admin_url('admin.php?page=fv_player'),
26
+ 'home_url' => home_url('/'),
27
  'db_import_nonce' => wp_create_nonce( "fv-player-db-import-".get_current_user_id() ),
28
  'db_load_nonce' => wp_create_nonce( "fv-player-db-load-".get_current_user_id() ),
29
  'preview_nonce' => wp_create_nonce( "fv-player-preview-".get_current_user_id() ),
30
+ 'splashscreen_nonce' => wp_create_nonce( "fv-player-splashscreen-".get_current_user_id()),
31
+ 'shortcode_args_to_preserve' => array(
32
+ 'ab',
33
+ 'ad',
34
+ 'ad_height',
35
+ 'ad_width',
36
+ 'autoplay',
37
+ 'controlbar',
38
+ 'embed',
39
+ 'fullscreen',
40
+ 'height',
41
+ 'liststyle',
42
+ 'logo',
43
+ 'midroll',
44
+ 'playlist_advance',
45
+ 'playlist_hide',
46
+ 'playlist_start',
47
+ 'share',
48
+ 'sort',
49
+ 'vast',
50
+ 'volume',
51
+ 'width'
52
+ ),
53
+ 'shortcode_args_not_db_compatible' => array(
54
+ 'fullscreen',
55
+ 'logo',
56
+ 'playlist_advance',
57
+ 'sort',
58
+ 'volume'
59
+ ),
60
+ 'have_fv_player_vimeo_live' => class_exists('FV_Player_Vimeo_Live_Stream')
61
  ) );
62
 
63
  wp_enqueue_script('fvwpflowplayer-shortcode-editor');
64
  wp_enqueue_script('fvwpflowplayer-editor-screenshots');
65
 
66
+ wp_enqueue_style('fvwpflowplayer-domwindow-css', flowplayer::get_plugin_url().'/css/colorbox.css', '', $fv_wp_flowplayer_ver, 'screen');
67
+ wp_enqueue_style('fvwpflowplayer-shortcode-editor', flowplayer::get_plugin_url().'/css/shortcode-editor.css', '', $fv_wp_flowplayer_ver, 'screen');
 
 
68
  }
69
 
70
 
110
  add_action( 'edit_form_after_editor', 'fv_wp_flowplayer_edit_form_after_editor' );
111
 
112
  function fv_wp_flowplayer_edit_form_after_editor( ) {
113
+ require_once dirname( __FILE__ ) . '/../view/wizard.php';
114
 
115
  // todo: will some of this break page builders?
116
  global $fv_fp_scripts, $fv_fp;
208
  }
209
 
210
  $post = get_post($post_id);
 
 
 
211
 
212
  $url = false;
213
 
214
+ if( preg_match('/(?:splash=\\\?")([^"]*.(?:jpg|gif|png))/', $post->post_content, $splash) ) { // parse splash="..." in post content
215
+ $url = $splash[1];
216
+ }
217
+
218
+ if( !$url && preg_match('/\[fvplayer.*?id="(\d+)/', $post->post_content, $id) ) { // parse [fvplayer id="..."] shortcode in post content
219
  global $FV_Player_Db;
220
  $atts = $FV_Player_Db->getPlayerAttsFromDb( array( 'id' => $id[1] ) );
221
  if( !empty($atts['splash']) ) {
222
  $url = $atts['splash'];
223
  }
224
  }
225
+
226
+ if( !$url && $aMetas = get_post_custom($post_id) ) { // parse [fvplayer id="..."] shortcode in post meta
227
+ foreach( $aMetas AS $key => $aMeta ) {
228
+ foreach( $aMeta AS $shortcode ) {
229
+ if( preg_match('/\[fvplayer.*?id="(\d+)/', $shortcode, $id) ) {
230
+ global $FV_Player_Db;
231
+ $atts = $FV_Player_Db->getPlayerAttsFromDb( array( 'id' => $id[1] ) );
232
+ if( !empty($atts['splash']) ) {
233
+ $url = $atts['splash'];
234
+ }
235
+ }
236
+ }
237
+ }
238
+ }
239
 
240
  if( !$url ) return;
241
 
312
  );
313
  // Insert the attachment
314
  $attach_id = wp_insert_attachment( $attachment, $upload['file'], $post_id );
315
+
316
+ // Define attachment metadata
317
+ $attach_data = wp_generate_attachment_metadata( $attach_id, $upload['file'] );
318
+
319
+ // Assign metadata to attachment
320
+ wp_update_attachment_metadata( $attach_id, $attach_data );
321
 
322
  }
323
 
354
  return urldecode($caption);
355
  }
356
 
357
+ if( check_ajax_referer( "fv-player-splashscreen-".get_current_user_id(), "security" , false ) == 1 ) {
358
  $title = $_POST['title'];
359
  $img = $_POST['img'];
360
+ $limit = 128 - 5; // .jpeg
361
+
362
  $img = str_replace('data:image/jpeg;base64,', '', $img);
363
  $img = str_replace(' ', '+', $img);
364
 
365
  $title = getTitleFromUrl($title);
366
  $title = sanitize_title($title);
367
+ $title = mb_strimwidth($title, 0, $limit, '', 'UTF-8');
368
+
369
  $decoded = base64_decode($img) ;
370
 
371
  $upload_dir = wp_upload_dir();
372
  $upload_path = str_replace( '/', DIRECTORY_SEPARATOR, $upload_dir['path'] ) . DIRECTORY_SEPARATOR;
373
 
374
+ $filename = $title .'.jpg';
375
 
376
  // $hashed_filename = md5( $filename . microtime() ) . '_' . $filename;
377
 
402
  'src' => '',
403
  'error' => $file_return['error']
404
  );
405
+ } else {
406
  $filename = $file_return['file'];
407
 
408
  $attachment = array(
412
  'post_status' => 'inherit',
413
  'guid' => $upload_dir['url'] . '/' . basename($filename)
414
  );
 
 
 
 
 
 
415
 
416
+ $attach_id = wp_insert_attachment( $attachment, $filename, 0, true );
417
 
418
+ if( is_wp_error( $attach_id ) ) {
419
+ $jsonReturn = array(
420
+ 'src' => '',
421
+ 'error' => $attach_id->get_error_message()
422
+ );
423
+ } else {
424
+ require_once(ABSPATH . 'wp-admin/includes/image.php');
425
+
426
+ $attach_data = wp_generate_attachment_metadata( $attach_id, $filename );
427
+ wp_update_attachment_metadata( $attach_id, $attach_data );
428
+
429
+ $src = wp_get_attachment_image_url($attach_id, $size = 'full', false);
430
+
431
+ $jsonReturn = array(
432
+ 'src' => $src,
433
+ 'error' => ''
434
+ );
435
+ }
436
+ }
437
+ } else {
438
  $jsonReturn = array(
439
  'src' => '',
440
  'error' => 'Nonce error - please reload your page'
controller/frontend.php CHANGED
@@ -338,34 +338,32 @@ function flowplayer_prepare_scripts() {
338
  $sCommercialKey = $fv_fp->_get_option('key') ? $fv_fp->_get_option('key') : '';
339
  $sLogo = $sCommercialKey && $fv_fp->_get_option('logo') ? $fv_fp->_get_option('logo') : '';
340
 
341
- $aConf = array( 'fullscreen' => true, 'swf' => $sPluginUrl.'/flowplayer/flowplayer.swf?ver='.$fv_wp_flowplayer_ver, 'swfHls' => $sPluginUrl.'/flowplayer/flowplayerhls.swf?ver='.$fv_wp_flowplayer_ver );
342
 
 
 
 
 
 
 
 
 
 
 
 
 
343
  if( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ) {
344
- $path = '/flowplayer/modules/flowplayer.min.js';
345
- if( file_exists(dirname(__FILE__).'/../flowplayer/modules/flowplayer.js') ) {
346
- $path = '/flowplayer/modules/flowplayer.js';
347
- }
348
- wp_enqueue_script( 'flowplayer', flowplayer::get_plugin_url().$path, $aDependencies, filemtime( dirname(__FILE__).'/../'.$path ), true );
349
- $aDependencies[] = 'flowplayer';
350
-
351
  $path = '/flowplayer/modules/fv-player.js';
352
  wp_enqueue_script( 'fv-player', flowplayer::get_plugin_url().$path, $aDependencies, filemtime( dirname(__FILE__).'/../'.$path ), true );
353
  $aDependencies[] = 'fv-player';
354
 
355
- foreach( glob( dirname(dirname(__FILE__)).'/flowplayer/modules/*.js') as $filename ) {
356
- $filename = basename($filename);
357
- if(
358
- strcmp($filename,'flowplayer.min.js') == 0 ||
359
- strcmp($filename,'flowplayer.js') == 0 ||
360
- strcmp($filename,'fv-player.js') == 0
361
- ) continue;
362
-
363
- $path = '/flowplayer/modules/'.$filename;
364
- wp_enqueue_script( 'fv-player-'.$filename, flowplayer::get_plugin_url().$path, $aDependencies, filemtime( dirname(__FILE__).'/../'.$path ), true);
365
  }
366
 
367
  } else {
368
- wp_enqueue_script( 'flowplayer', flowplayer::get_plugin_url().'/flowplayer/fv-flowplayer.min.js', $aDependencies, $fv_wp_flowplayer_ver, true );
369
 
370
  }
371
 
@@ -425,7 +423,7 @@ function flowplayer_prepare_scripts() {
425
  if( get_post_meta($post->ID, 'fv_player_mobile_force_fullscreen', true) ) $aConf['mobile_force_fullscreen'] = true;
426
  }
427
 
428
- if( ( $fv_fp->should_force_load_js() || $fv_fp->load_hlsjs ) && $fv_fp->_get_option('hlsjs') ) {
429
  wp_enqueue_script( 'flowplayer-hlsjs', flowplayer::get_plugin_url().'/flowplayer/hls.min.js', array('flowplayer'), '1.0.4', true );
430
  }
431
  $aConf['script_hls_js'] = flowplayer::get_plugin_url().'/flowplayer/hls.min.js?ver=1.0.4';
@@ -647,22 +645,88 @@ function fv_player_comment_text( $comment_text ) {
647
  return $comment_text;
648
  }
649
 
 
 
650
  function fv_player_footer_svg_playlist() {
651
  if( file_exists(dirname( __FILE__ ) . '/../css/fvp-icon-sprite.svg') ) {
652
  include_once(dirname( __FILE__ ) . '/../css/fvp-icon-sprite.svg');
653
  }
654
  }
655
 
 
 
656
  function fv_player_footer_svg_rewind() {
657
  ?>
658
  <svg style="position: absolute; width: 0; height: 0; overflow: hidden;" class="fvp-icon" xmlns="http://www.w3.org/2000/svg">
659
  <g id="fvp-rewind">
660
  <path d="M22.7 10.9c0 1.7-0.4 3.3-1.1 4.8 -0.7 1.5-1.8 2.8-3.2 3.8 -0.4 0.3-1.3-0.9-0.9-1.2 1.2-0.9 2.1-2 2.7-3.3 0.7-1.3 1-2.7 1-4.1 0-2.6-0.9-4.7-2.7-6.5 -1.8-1.8-4-2.7-6.5-2.7 -2.5 0-4.7 0.9-6.5 2.7 -1.8 1.8-2.7 4-2.7 6.5 0 2.4 0.8 4.5 2.5 6.3 1.7 1.8 3.7 2.7 6.1 2.9l-1.2-2c-0.2-0.3 0.9-1 1.1-0.7l2.3 3.7c0.2 0.3 0 0.6-0.2 0.7L9.5 23.8c-0.3 0.2-0.9-0.9-0.5-1.2l2.1-1.1c-2.7-0.2-5-1.4-6.9-3.4 -1.9-2-2.8-4.5-2.8-7.2 0-3 1.1-5.5 3.1-7.6C6.5 1.2 9 0.2 12 0.2c3 0 5.5 1.1 7.6 3.1C21.7 5.4 22.7 7.9 22.7 10.9z" fill="#fff"/><path d="M8.1 15.1c-0.1 0-0.1 0-0.1-0.1V8C8 7.7 7.8 7.9 7.7 7.9L6.8 8.3C6.8 8.4 6.7 8.3 6.7 8.2L6.3 7.3C6.2 7.2 6.3 7.1 6.4 7.1l2.7-1.2c0.1 0 0.4 0 0.4 0.3v8.8c0 0.1 0 0.1-0.1 0.1H8.1z" fill="#fff"/><path d="M17.7 10.6c0 2.9-1.3 4.7-3.5 4.7 -2.2 0-3.5-1.8-3.5-4.7s1.3-4.7 3.5-4.7C16.4 5.9 17.7 7.7 17.7 10.6zM12.3 10.6c0 2.1 0.7 3.4 2 3.4 1.3 0 2-1.2 2-3.4 0-2.1-0.7-3.4-2-3.4C13 7.2 12.3 8.5 12.3 10.6z" fill="#fff"/>
661
  </g>
 
 
 
 
 
662
  </svg>
663
  <?php
664
  }
665
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
666
 
667
  /*
668
  * @param string $min The minimal version to check - like 7.4.44.727
@@ -689,6 +753,18 @@ function fv_player_extension_version_is_min( $min, $extension = 'pro' ) {
689
  $version = $FV_Player_Alternative_Sources->version;
690
  }
691
 
 
 
 
 
 
 
 
 
 
 
 
 
692
  }
693
 
694
  $version = str_replace('.beta','',$version);
338
  $sCommercialKey = $fv_fp->_get_option('key') ? $fv_fp->_get_option('key') : '';
339
  $sLogo = $sCommercialKey && $fv_fp->_get_option('logo') ? $fv_fp->_get_option('logo') : '';
340
 
341
+ $aConf = array( 'fv_fullscreen' => true, 'swf' => $sPluginUrl.'/flowplayer/flowplayer.swf?ver='.$fv_wp_flowplayer_ver, 'swfHls' => $sPluginUrl.'/flowplayer/flowplayerhls.swf?ver='.$fv_wp_flowplayer_ver );
342
 
343
+ // Load base Flowplayer library
344
+ $path = '/flowplayer/modules/flowplayer.min.js';
345
+ if( file_exists(dirname(__FILE__).'/../flowplayer/modules/flowplayer.js') ) {
346
+ $path = '/flowplayer/modules/flowplayer.js';
347
+ }
348
+
349
+ $version = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? filemtime( dirname(__FILE__).'/../'.$path ) : $fv_wp_flowplayer_ver;
350
+
351
+ wp_enqueue_script( 'flowplayer', flowplayer::get_plugin_url().$path, $aDependencies, $version, true );
352
+ $aDependencies[] = 'flowplayer';
353
+
354
+ // Load modules
355
  if( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ) {
 
 
 
 
 
 
 
356
  $path = '/flowplayer/modules/fv-player.js';
357
  wp_enqueue_script( 'fv-player', flowplayer::get_plugin_url().$path, $aDependencies, filemtime( dirname(__FILE__).'/../'.$path ), true );
358
  $aDependencies[] = 'fv-player';
359
 
360
+ foreach( glob( dirname(dirname(__FILE__)).'/flowplayer/modules/*.module.js') as $filename ) {
361
+ $path = '/flowplayer/modules/'.basename($filename);
362
+ wp_enqueue_script( 'fv-player-'.basename($filename), flowplayer::get_plugin_url().$path, $aDependencies, filemtime( dirname(__FILE__).'/../'.$path ), true);
 
 
 
 
 
 
 
363
  }
364
 
365
  } else {
366
+ wp_enqueue_script( 'fv-player', flowplayer::get_plugin_url().'/flowplayer/fv-player.min.js', $aDependencies, $fv_wp_flowplayer_ver, true );
367
 
368
  }
369
 
423
  if( get_post_meta($post->ID, 'fv_player_mobile_force_fullscreen', true) ) $aConf['mobile_force_fullscreen'] = true;
424
  }
425
 
426
+ if( $fv_fp->should_force_load_js() || $fv_fp->load_hlsjs ) {
427
  wp_enqueue_script( 'flowplayer-hlsjs', flowplayer::get_plugin_url().'/flowplayer/hls.min.js', array('flowplayer'), '1.0.4', true );
428
  }
429
  $aConf['script_hls_js'] = flowplayer::get_plugin_url().'/flowplayer/hls.min.js?ver=1.0.4';
645
  return $comment_text;
646
  }
647
 
648
+ add_action( 'fv_player_extensions_admin_load_assets', 'fv_player_footer_svg_playlist' );
649
+
650
  function fv_player_footer_svg_playlist() {
651
  if( file_exists(dirname( __FILE__ ) . '/../css/fvp-icon-sprite.svg') ) {
652
  include_once(dirname( __FILE__ ) . '/../css/fvp-icon-sprite.svg');
653
  }
654
  }
655
 
656
+ add_action( 'fv_player_extensions_admin_load_assets', 'fv_player_footer_svg_rewind' );
657
+
658
  function fv_player_footer_svg_rewind() {
659
  ?>
660
  <svg style="position: absolute; width: 0; height: 0; overflow: hidden;" class="fvp-icon" xmlns="http://www.w3.org/2000/svg">
661
  <g id="fvp-rewind">
662
  <path d="M22.7 10.9c0 1.7-0.4 3.3-1.1 4.8 -0.7 1.5-1.8 2.8-3.2 3.8 -0.4 0.3-1.3-0.9-0.9-1.2 1.2-0.9 2.1-2 2.7-3.3 0.7-1.3 1-2.7 1-4.1 0-2.6-0.9-4.7-2.7-6.5 -1.8-1.8-4-2.7-6.5-2.7 -2.5 0-4.7 0.9-6.5 2.7 -1.8 1.8-2.7 4-2.7 6.5 0 2.4 0.8 4.5 2.5 6.3 1.7 1.8 3.7 2.7 6.1 2.9l-1.2-2c-0.2-0.3 0.9-1 1.1-0.7l2.3 3.7c0.2 0.3 0 0.6-0.2 0.7L9.5 23.8c-0.3 0.2-0.9-0.9-0.5-1.2l2.1-1.1c-2.7-0.2-5-1.4-6.9-3.4 -1.9-2-2.8-4.5-2.8-7.2 0-3 1.1-5.5 3.1-7.6C6.5 1.2 9 0.2 12 0.2c3 0 5.5 1.1 7.6 3.1C21.7 5.4 22.7 7.9 22.7 10.9z" fill="#fff"/><path d="M8.1 15.1c-0.1 0-0.1 0-0.1-0.1V8C8 7.7 7.8 7.9 7.7 7.9L6.8 8.3C6.8 8.4 6.7 8.3 6.7 8.2L6.3 7.3C6.2 7.2 6.3 7.1 6.4 7.1l2.7-1.2c0.1 0 0.4 0 0.4 0.3v8.8c0 0.1 0 0.1-0.1 0.1H8.1z" fill="#fff"/><path d="M17.7 10.6c0 2.9-1.3 4.7-3.5 4.7 -2.2 0-3.5-1.8-3.5-4.7s1.3-4.7 3.5-4.7C16.4 5.9 17.7 7.7 17.7 10.6zM12.3 10.6c0 2.1 0.7 3.4 2 3.4 1.3 0 2-1.2 2-3.4 0-2.1-0.7-3.4-2-3.4C13 7.2 12.3 8.5 12.3 10.6z" fill="#fff"/>
663
  </g>
664
+ </svg>
665
+ <svg style="position: absolute; width: 0; height: 0; overflow: hidden;" class="fvp-icon" xmlns="http://www.w3.org/2000/svg">
666
+ <g id="fvp-forward">
667
+ <path d="M22.7 10.9c0 1.7-0.4 3.3-1.1 4.8 -0.7 1.5-1.8 2.8-3.2 3.8 -0.4 0.3-1.3-0.9-0.9-1.2 1.2-0.9 2.1-2 2.7-3.3 0.7-1.3 1-2.7 1-4.1 0-2.6-0.9-4.7-2.7-6.5 -1.8-1.8-4-2.7-6.5-2.7 -2.5 0-4.7 0.9-6.5 2.7 -1.8 1.8-2.7 4-2.7 6.5 0 2.4 0.8 4.5 2.5 6.3 1.7 1.8 3.7 2.7 6.1 2.9l-1.2-2c-0.2-0.3 0.9-1 1.1-0.7l2.3 3.7c0.2 0.3 0 0.6-0.2 0.7L9.5 23.8c-0.3 0.2-0.9-0.9-0.5-1.2l2.1-1.1c-2.7-0.2-5-1.4-6.9-3.4 -1.9-2-2.8-4.5-2.8-7.2 0-3 1.1-5.5 3.1-7.6C6.5 1.2 9 0.2 12 0.2c3 0 5.5 1.1 7.6 3.1C21.7 5.4 22.7 7.9 22.7 10.9z" fill="#fff" transform="scale(-1,1) translate(-24,0)" /><path d="M8.1 15.1c-0.1 0-0.1 0-0.1-0.1V8C8 7.7 7.8 7.9 7.7 7.9L6.8 8.3C6.8 8.4 6.7 8.3 6.7 8.2L6.3 7.3C6.2 7.2 6.3 7.1 6.4 7.1l2.7-1.2c0.1 0 0.4 0 0.4 0.3v8.8c0 0.1 0 0.1-0.1 0.1H8.1z" fill="#fff" /><path d="M17.7 10.6c0 2.9-1.3 4.7-3.5 4.7 -2.2 0-3.5-1.8-3.5-4.7s1.3-4.7 3.5-4.7C16.4 5.9 17.7 7.7 17.7 10.6zM12.3 10.6c0 2.1 0.7 3.4 2 3.4 1.3 0 2-1.2 2-3.4 0-2.1-0.7-3.4-2-3.4C13 7.2 12.3 8.5 12.3 10.6z" fill="#fff" />
668
+ </g>
669
  </svg>
670
  <?php
671
  }
672
 
673
+ add_filter( 'script_loader_tag', 'fv_player_js_loader_mark_scripts', PHP_INT_MAX, 2 );
674
+
675
+ /*
676
+ * Alters all the script tags related to FV Player, with excetption of the base FV Player library.
677
+ * The reason is that it's a dependency of most of the modules so then each module would have to be
678
+ * adjusted to be able to load without it.
679
+ *
680
+ * Fancybox lightbox library with additional code is also excluded.
681
+ *
682
+ * @param string $tag The original script tag.
683
+ * @param string $handle The WordPress script handle
684
+ *
685
+ * @global object $fv_fp The FV Player plugin instance
686
+ *
687
+ * @return string The adjusted script tag
688
+ */
689
+ function fv_player_js_loader_mark_scripts( $tag, $handle ) {
690
+ global $fv_fp;
691
+ if( is_admin() || isset($_GET['fv_player_loader_skip']) || $fv_fp->_get_option('js-everywhere') || !$fv_fp->_get_option('js-optimize') ) {
692
+ return $tag;
693
+ }
694
+
695
+ if(
696
+ // script ID must start with one of following
697
+ (
698
+ stripos($handle,'flowplayer-') === 0 || // process Flowplayer HLS.js and Dash.js, but not the base FV Player library, that one must be present instantly
699
+ stripos($handle,'fv-player') === 0 ||
700
+ stripos($handle,'fv_player') === 0
701
+
702
+ // script handle must not be one of
703
+ ) && !in_array( $handle, array(
704
+ 'fv_player_lightbox' // without this it would be impossible to open the lightbox without hovering the page before it, so it's really a problem on mobile
705
+ ), true )
706
+ ) {
707
+ $tag = str_replace( ' src=', ' data-fv-player-loader-src=', $tag );
708
+ add_action( 'wp_print_footer_scripts', 'fv_player_js_loader_load', PHP_INT_MAX );
709
+ }
710
+ return $tag;
711
+ }
712
+
713
+ /*
714
+ * Outpput FV Player JS Loader into footer, hooked in in fv_player_js_loader_mark_scripts()
715
+ */
716
+ function fv_player_js_loader_load() {
717
+ require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php';
718
+ require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-direct.php';
719
+ $filesystem = new WP_Filesystem_Direct( new StdClass() );
720
+
721
+ $js = $filesystem->get_contents( dirname(__FILE__).'/../flowplayer/fv-player-loader.babel.js' );
722
+
723
+ // remove /* comments */
724
+ $js = preg_replace( '~/\*[\s\S]*?\*/~m', '', $js );
725
+ // remove whitespace
726
+ $js = preg_replace( '~\s+~m', ' ', $js );
727
+
728
+ echo '<script data-length="'.strlen($js).'">'.$js.'</script>';
729
+ }
730
 
731
  /*
732
  * @param string $min The minimal version to check - like 7.4.44.727
753
  $version = $FV_Player_Alternative_Sources->version;
754
  }
755
 
756
+ } else if( $extension == 'ppv' ) {
757
+ global $FV_Player_PayPerView;
758
+ if( isset($FV_Player_PayPerView) && !empty($FV_Player_PayPerView->version) ) {
759
+ $version = $FV_Player_PayPerView->version;
760
+ }
761
+
762
+ } else if( $extension == 'ppv-woocommerce' ) {
763
+ global $FV_Player_PayPerView_WooCommerce;
764
+ if( isset($FV_Player_PayPerView_WooCommerce) && !empty($FV_Player_PayPerView_WooCommerce->version) ) {
765
+ $version = $FV_Player_PayPerView_WooCommerce->version;
766
+ }
767
+
768
  }
769
 
770
  $version = str_replace('.beta','',$version);
controller/settings.php CHANGED
@@ -5,7 +5,7 @@
5
  */
6
  add_action('admin_menu', 'fv_player_admin_menu');
7
 
8
- function fv_player_admin_menu () {
9
  if( function_exists('add_submenu_page') ) {
10
  add_options_page( 'FV Player', 'FV Player', 'manage_options', 'fvplayer', 'fv_player_admin_page' );
11
  }
@@ -20,9 +20,10 @@ function fv_player_admin_page() {
20
 
21
 
22
 
 
23
  function fv_player_is_admin_screen() {
24
  if( (isset($_GET['page']) && $_GET['page'] == 'fvplayer') || apply_filters('fv_player_is_admin_screen', false) ) {
25
- return true;
26
  }
27
  return false;
28
  }
@@ -30,6 +31,13 @@ function fv_player_is_admin_screen() {
30
 
31
 
32
 
 
 
 
 
 
 
 
33
  add_filter('plugin_action_links', 'fv_wp_flowplayer_plugin_action_links', 10, 2);
34
 
35
  function fv_wp_flowplayer_plugin_action_links($links, $file) {
@@ -37,7 +45,7 @@ function fv_wp_flowplayer_plugin_action_links($links, $file) {
37
  $settings_link = '<a href="https://foliovision.com/pro-support" target="_blank">Premium Support</a>';
38
  array_unshift($links, $settings_link);
39
  $settings_link = '<a href="options-general.php?page=fvplayer">Settings</a>';
40
- array_unshift($links, $settings_link);
41
  }
42
  return $links;
43
  }
@@ -61,7 +69,7 @@ function fv_wp_flowplayer_after_plugin_row( $arg) {
61
  <tr class="plugin-update-tr fv-wordpress-flowplayer-tr">
62
  <td class="plugin-update colspanchange" colspan="3">
63
  <div class="update-message">
64
- <a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/download">All Licenses 20% Off</a> - Easter sale!
65
  </div>
66
  </td>
67
  </tr>
@@ -140,6 +148,24 @@ function fv_player_admin_pointer_boxes() {
140
  );
141
  }
142
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  if( !$fv_fp->_get_option('notice_new_lightbox') ) {
144
  $fv_fp->pointer_boxes['fv_flowplayer_new_lightbox'] = array(
145
  'id' => '#wp-admin-bar-new-content',
@@ -253,6 +279,7 @@ function fv_wp_flowplayer_pointers_ajax() {
253
  }
254
 
255
  $notices = array(
 
256
  'fv_flowplayer_new_lightbox' => 'notice_new_lightbox',
257
  'fv_flowplayer_notice_xml_sitemap_iframes' => 'notice_xml_sitemap_iframes',
258
  'fv_flowplayer_db' => 'notice_db',
@@ -311,7 +338,7 @@ function fv_flowplayer_admin_scripts() {
311
 
312
  wp_enqueue_script('jquery-minicolors', flowplayer::get_plugin_url().'/js/jquery-minicolors/jquery.minicolors.min.js',array('jquery'), $fv_wp_flowplayer_ver );
313
  wp_enqueue_script('fv-player-admin', flowplayer::get_plugin_url().'/js/admin.js',array('jquery','jquery-minicolors'), $fv_wp_flowplayer_ver );
314
-
315
  wp_localize_script('fv-player-admin', 'cm_settings', wp_enqueue_code_editor(array('type' => 'text/css')) );
316
  }
317
  }
5
  */
6
  add_action('admin_menu', 'fv_player_admin_menu');
7
 
8
+ function fv_player_admin_menu() {
9
  if( function_exists('add_submenu_page') ) {
10
  add_options_page( 'FV Player', 'FV Player', 'manage_options', 'fvplayer', 'fv_player_admin_page' );
11
  }
20
 
21
 
22
 
23
+
24
  function fv_player_is_admin_screen() {
25
  if( (isset($_GET['page']) && $_GET['page'] == 'fvplayer') || apply_filters('fv_player_is_admin_screen', false) ) {
26
+ return true;
27
  }
28
  return false;
29
  }
31
 
32
 
33
 
34
+ function fv_player_stats_page() {
35
+ include dirname( __FILE__ ) . '/../view/stats.php';
36
+ }
37
+
38
+
39
+
40
+
41
  add_filter('plugin_action_links', 'fv_wp_flowplayer_plugin_action_links', 10, 2);
42
 
43
  function fv_wp_flowplayer_plugin_action_links($links, $file) {
45
  $settings_link = '<a href="https://foliovision.com/pro-support" target="_blank">Premium Support</a>';
46
  array_unshift($links, $settings_link);
47
  $settings_link = '<a href="options-general.php?page=fvplayer">Settings</a>';
48
+ array_unshift($links, $settings_link);
49
  }
50
  return $links;
51
  }
69
  <tr class="plugin-update-tr fv-wordpress-flowplayer-tr">
70
  <td class="plugin-update colspanchange" colspan="3">
71
  <div class="update-message">
72
+ <a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/download">All Licenses 20% Off</a> - Summer sale!
73
  </div>
74
  </td>
75
  </tr>
148
  );
149
  }
150
 
151
+ if( !$fv_fp->_get_option('notice_7_5') ) {
152
+ $fv_fp->pointer_boxes['fv_flowplayer_notice_7_5'] = array(
153
+ 'id' => '#wp-admin-bar-new-content',
154
+ 'pointerClass' => 'fv_flowplayer_notice_7_5',
155
+ 'heading' => __('FV Player 7.5', 'fv-wordpress-flowplayer'),
156
+ 'content' => __("<p>This new version includes several improvements:</p>
157
+ <ul style='list-style-type: revert; margin-left: 3em'>
158
+ <li>Editor autosave and preview improvements</li>
159
+ <li>FV Player Video Play Stats</li>
160
+ <li>Improved player JavaScript loading</li>
161
+ <li>Multiple video playback improvements</li>
162
+ </ul>
163
+ <p>You can read more about it in our <a href='https://foliovision.com/?p=137472' target='_blank'>blog announcement</a>.</p>", 'fv-wordpress-flowplayer'),
164
+ 'position' => array( 'edge' => 'top', 'align' => 'center' ),
165
+ 'button1' => __('Acknowledge', 'fv-wordpress-flowplayer')
166
+ );
167
+ }
168
+
169
  if( !$fv_fp->_get_option('notice_new_lightbox') ) {
170
  $fv_fp->pointer_boxes['fv_flowplayer_new_lightbox'] = array(
171
  'id' => '#wp-admin-bar-new-content',
279
  }
280
 
281
  $notices = array(
282
+ 'fv_flowplayer_notice_7_5' => 'notice_7_5',
283
  'fv_flowplayer_new_lightbox' => 'notice_new_lightbox',
284
  'fv_flowplayer_notice_xml_sitemap_iframes' => 'notice_xml_sitemap_iframes',
285
  'fv_flowplayer_db' => 'notice_db',
338
 
339
  wp_enqueue_script('jquery-minicolors', flowplayer::get_plugin_url().'/js/jquery-minicolors/jquery.minicolors.min.js',array('jquery'), $fv_wp_flowplayer_ver );
340
  wp_enqueue_script('fv-player-admin', flowplayer::get_plugin_url().'/js/admin.js',array('jquery','jquery-minicolors'), $fv_wp_flowplayer_ver );
341
+
342
  wp_localize_script('fv-player-admin', 'cm_settings', wp_enqueue_code_editor(array('type' => 'text/css')) );
343
  }
344
  }
controller/shortcodes.php CHANGED
@@ -158,12 +158,20 @@ function flowplayer_content_handle( $atts, $content = null, $tag = false ) {
158
  $arguments['post'] = get_the_ID();
159
  }
160
 
161
- if( !empty($arguments['id']) && intval($arguments['id']) > 0 ) {
 
 
 
162
  $new_player = $fv_fp->build_min_player(false, $arguments);
163
  if (!empty($new_player['script'])) {
164
  $GLOBALS['fv_fp_scripts'] = $new_player['script'];
165
  }
166
- return $new_player['html'];
 
 
 
 
 
167
 
168
  } else if( intval($arguments['post']) > 0 ) {
169
  $objVideoQuery = new WP_Query( array( 'post_type' => 'attachment', 'post_status' => 'inherit', 'post_parent' => intval($post), 'post_mime_type' => 'video' ) );
@@ -184,7 +192,9 @@ function flowplayer_content_handle( $atts, $content = null, $tag = false ) {
184
  }
185
 
186
  $new_player = $fv_fp->build_min_player( $aArgs['src'],$aArgs );
187
- $sHTML .= $new_player['html'];
 
 
188
  }
189
 
190
  return $sHTML;
@@ -196,7 +206,12 @@ function flowplayer_content_handle( $atts, $content = null, $tag = false ) {
196
  if (!empty($new_player['script'])) {
197
  $GLOBALS['fv_fp_scripts'] = $new_player['script'];
198
  }
199
- return $new_player['html'];
 
 
 
 
 
200
 
201
  }
202
  return false;
158
  $arguments['post'] = get_the_ID();
159
  }
160
 
161
+ // accepts:
162
+ // 1) [fvplayer id="198"] - a DB-based shortcode in the form
163
+ // 2) [fvplayer src="198" playlist="198;199;200"] - a front-end user's playlist shortcode that is programatically passed to this method
164
+ if( (!empty($arguments['id']) && intval($arguments['id']) > 0) || (!empty($arguments['src']) && is_numeric($arguments['src']) && intval($arguments['src']) > 0) ) {
165
  $new_player = $fv_fp->build_min_player(false, $arguments);
166
  if (!empty($new_player['script'])) {
167
  $GLOBALS['fv_fp_scripts'] = $new_player['script'];
168
  }
169
+
170
+ if ( $new_player ) {
171
+ return $new_player['html'];
172
+ } else {
173
+ return '';
174
+ }
175
 
176
  } else if( intval($arguments['post']) > 0 ) {
177
  $objVideoQuery = new WP_Query( array( 'post_type' => 'attachment', 'post_status' => 'inherit', 'post_parent' => intval($post), 'post_mime_type' => 'video' ) );
192
  }
193
 
194
  $new_player = $fv_fp->build_min_player( $aArgs['src'],$aArgs );
195
+ if ( $new_player ) {
196
+ $sHTML .= $new_player['html'];
197
+ }
198
  }
199
 
200
  return $sHTML;
206
  if (!empty($new_player['script'])) {
207
  $GLOBALS['fv_fp_scripts'] = $new_player['script'];
208
  }
209
+
210
+ if ( $new_player ) {
211
+ return $new_player['html'];
212
+ } else {
213
+ return '';
214
+ }
215
 
216
  }
217
  return false;
controller/track.php ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* This file doesn't loading WordPress, it simple increment counters for posts in wp-content/cache/fv-tracker/{tag}-{site id}.data */
3
+
4
+ Class FvPlayerTrackerWorker {
5
+
6
+ private $wp_content = false;
7
+ private $cache_path = false;
8
+ private $cache_filename = false;
9
+ private $video_id = false;
10
+ private $post_id = false;
11
+ private $player_id = false;
12
+
13
+ private $file = false;
14
+ private $data = array();
15
+
16
+ function __construct() {
17
+
18
+ if( !isset( $_REQUEST['blog_id'] ) || !isset( $_REQUEST['tag'] ) || !isset( $_REQUEST['video_id'] ) ){
19
+ die( "Error: missing arguments!" );
20
+ }
21
+
22
+ $blog_id = intval($_REQUEST['blog_id']);
23
+ $tag = preg_replace( '~[^a-z]~', '', substr( $_REQUEST['tag'], 0, 16 ) );
24
+
25
+ $this->wp_content = dirname( dirname( dirname( dirname( __FILE__ ) ) ) );
26
+ $this->cache_path = $this->wp_content."/fv-player-tracking";
27
+ $this->cache_filename = "{$tag}-{$blog_id}.data";
28
+ $this->video_id = intval($_REQUEST['video_id']);
29
+ $this->player_id = intval($_REQUEST['player_id']);
30
+ $this->post_id = intval( $_REQUEST['post_id'] );
31
+
32
+ $this->checkCacheFile();
33
+ }
34
+
35
+ /**
36
+ * Check and initialize cache file
37
+ * @return void
38
+ */
39
+ function checkCacheFile() {
40
+ $full_path = $this->cache_path . "/" . $this->cache_filename;
41
+
42
+ //cache file exists?
43
+ if( file_exists( $full_path ) ) return;
44
+
45
+ //cache directory exists
46
+ if( !file_exists( $this->cache_path ) ){
47
+ //create dir
48
+ //todo: actually don't create it, if it doesn't exist it should mean the option is not enabled and this script shouldn't write anything!
49
+ if( !mkdir( $this->cache_path, 0775, true ) ){
50
+ die("Error: failed to create cache directory.");
51
+ }
52
+ }
53
+
54
+ //init file
55
+ touch( $full_path );
56
+ }
57
+
58
+ /**
59
+ * Load cache file data, find specific video_id and increment coutner for it
60
+ * @return boolean True when file lock was obtained, this doesn't ensure successful write. Otherwise false is returned
61
+ */
62
+ function incrementCacheCounter() {
63
+ $max_attempts = 3;
64
+
65
+ for( $i = 0; $i < $max_attempts; $i++ ){
66
+
67
+ if( flock( $this->file, LOCK_EX | LOCK_NB ) ) {
68
+
69
+ //increment counter
70
+ $encoded_data = fgets( $this->file );
71
+ $data = false;
72
+ if( $encoded_data ) {
73
+ $data = json_decode( $encoded_data, true );
74
+
75
+ $json_error = json_last_error();
76
+ if( $json_error !== JSON_ERROR_NONE ) {
77
+ file_put_contents( $this->wp_content.'/fv-player-track-error.log', date('r')." JSON decode error:\n".var_export( array( 'err' => $json_error, 'data' => $encoded_data ), true )."\n", FILE_APPEND ); // todo: remove
78
+ ftruncate( $this->file, 0 );
79
+ return false;
80
+ }
81
+ }
82
+
83
+ if( !$data ) {
84
+ $data = array();
85
+ }
86
+
87
+ $found = false;
88
+ foreach( $data as $index => $item ) {
89
+ if( $item['video_id'] == $this->video_id && $item['post_id'] == $this->post_id && $item['player_id'] == $this->player_id ) {
90
+ $data[$index]['play'] += 1;
91
+ $found = true;
92
+ break;
93
+ }
94
+ }
95
+
96
+ if( !$found ) {
97
+ $data[] = array(
98
+ 'video_id' => $this->video_id,
99
+ 'post_id' => $this->post_id,
100
+ 'player_id' => $this->player_id,
101
+ 'play' => 1
102
+ );
103
+ }
104
+
105
+ $encoded_data = json_encode($data);
106
+
107
+ ftruncate( $this->file, 0 );
108
+ rewind( $this->file );
109
+ fputs( $this->file, $encoded_data );
110
+
111
+ //UNLOCK
112
+ flock( $this->file, LOCK_UN );
113
+ return true;
114
+ }
115
+ else{
116
+ //wait random interval from 50ms to 100ms
117
+ usleep( rand(50,100) );
118
+ }
119
+ }
120
+
121
+ return false;
122
+ }
123
+
124
+ /**
125
+ * Main tracker functionality
126
+ * @return void
127
+ */
128
+ function track() {
129
+ $this->file = fopen( $this->cache_path."/".$this->cache_filename, 'r+');
130
+
131
+ if( ! $this->incrementCacheCounter() ){
132
+ file_put_contents( $this->wp_content.'/fv-player-track-error.log', date('r') . " flock or other error:\n".var_export($_REQUEST,true)."\n", FILE_APPEND ); // todo: remove
133
+ }
134
+
135
+ fclose( $this->file );
136
+ }
137
+ }
138
+
139
+ $fv_player_tracker_worker = new FvPlayerTrackerWorker();
140
+ $fv_player_tracker_worker->track();
141
+
142
+ ?>
css/admin.css CHANGED
@@ -117,7 +117,8 @@ table.fv-player-popup-formats td:first-child { width: 72px }
117
  display:none;
118
  }
119
 
120
- #fv_flowplayer_admin_tabs .nav-tab-active {
 
121
  background-color: #ffffff;
122
  border-bottom: #ffffff;
123
  }
@@ -149,7 +150,9 @@ table.fv-player-popup-formats td:first-child { width: 72px }
149
  #wpfp_options .minicolors-input-swatch {display:none}
150
  #wpfp_options input[data-opacity] { background-image: url(checkered.png) }
151
 
152
- .fv-player-editor-wrapper { float: left }
 
 
153
 
154
  /* otherwise "Drag boxes here" appears when you hide a meta box initially and then you show it with JS */
155
  .metabox-holder #postbox-container-tab_video_intelligence .empty-container::after { content: none }
@@ -172,9 +175,18 @@ table.fv-player-popup-formats td:first-child { width: 72px }
172
  border: 1px solid gray;
173
  }
174
 
 
 
 
 
 
 
 
 
 
175
  /*
176
  Brizy editor support
177
  */
178
  .brz-ed .brz-blocked .flowplayer, .brz-ed .brz-blocked .fp-playlist-external {
179
  pointer-events: all;
180
- }
117
  display:none;
118
  }
119
 
120
+ #fv_flowplayer_admin_tabs .nav-tab-active,
121
+ #fv-player-shortcode-editor-right .nav-tab-active {
122
  background-color: #ffffff;
123
  border-bottom: #ffffff;
124
  }
150
  #wpfp_options .minicolors-input-swatch {display:none}
151
  #wpfp_options input[data-opacity] { background-image: url(checkered.png) }
152
 
153
+ .fv-player-editor-wrapper { float: left; width: 100%}
154
+ .fv-player-editor-player-loading { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: white; opacity:.7}
155
+ .fv-player-editor-player-loading .spinner { position: absolute; left: 0; right: 0; margin: auto; top: 0; bottom: 0 }
156
 
157
  /* otherwise "Drag boxes here" appears when you hide a meta box initially and then you show it with JS */
158
  .metabox-holder #postbox-container-tab_video_intelligence .empty-container::after { content: none }
175
  border: 1px solid gray;
176
  }
177
 
178
+ #fv-player-shortcode-editor .fv-player-tab-cues div.fv-cues-infobox {
179
+ text-align: center;
180
+ padding: 15px 0;
181
+ background-color: #fff;
182
+ width: 100%;
183
+ height: 100%;
184
+ z-index: 1000;
185
+ }
186
+
187
  /*
188
  Brizy editor support
189
  */
190
  .brz-ed .brz-blocked .flowplayer, .brz-ed .brz-blocked .fp-playlist-external {
191
  pointer-events: all;
192
+ }
css/colorbox.css CHANGED
File without changes
css/flowplayer.css CHANGED
@@ -995,7 +995,7 @@
995
  background-color: rgba(0, 0, 0, .75) !important;
996
  }
997
 
998
- .flowplayer { margin: 0 auto 2.8em auto; display: block; max-width: 100%; }
999
  .flowplayer.has-caption { margin: 0 auto; }
1000
  .flowplayer.fixed-controls.has-caption, flowplayer.fixed-controls.has-caption * { margin-bottom: 2.8em; }
1001
  .flowplayer.fixed-controls, .entry-content .flowplayer.fixed-controls { margin-bottom: 5.2em }
@@ -1037,6 +1037,17 @@
1037
  .flowplayer .fp-elapsed {min-width: 5.1ch}
1038
  .flowplayer.is-long .fp-elapsed {min-width: 7.1ch}
1039
 
 
 
 
 
 
 
 
 
 
 
 
1040
  .fv-fp-splash-text { position: absolute;bottom:20%;z-index:20;text-align:center;width:100%;color:#fff;text-shadow: 0 0 2px #333;background-color: rgba(0,0,0,0.5); font-size: 18px; padding: 5px 36px; pointer-events: none }
1041
  .flowplayer.is-error .fv-fp-splash-text {display: none}
1042
 
@@ -1090,7 +1101,8 @@
1090
 
1091
  /* reducing the spacing in .fp-header */
1092
  .flowplayer .fp-header { /*background-color: rgba(0, 0, 0, 0.5); height: 2em;*/ padding-left: 0 }
1093
- .flowplayer .fp-header .fp-icon { margin: .5em .5em 0 0;line-height: 1 }
 
1094
 
1095
  .flowplayer.is-fullscreen{ max-height:100% !important; }
1096
  .flowplayer .fp-controls .fp-fullscreen {display:none}
@@ -1155,6 +1167,7 @@
1155
  /* Share bar */
1156
  .flowplayer .fp-embed-code{display:none;}
1157
  .is-rtl.flowplayer .fvp-share-bar{left:auto;}
 
1158
  .flowplayer .fvp-share-bar textarea{width:400px;min-height:130px;font-family: "Lucida Console", Monaco, monospace; color:#777; white-space:nowrap; resize:none;overflow:hidden;border:0;outline:0;background-color:transparent;color:#ccc; border: 1px solid #888;}
1159
  .flowplayer.is-embedding .fp-embed,.flowplayer.is-embedding .fvp-share-bar{display:block;opacity:1;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100)}
1160
 
@@ -1693,10 +1706,13 @@ article .entry-content .fvfp_admin_error p { line-height: 18px }
1693
  .flowplayer {
1694
  -webkit-touch-callout: none;
1695
  -webkit-user-select: none;
 
 
1696
  -khtml-user-select: none;
1697
  -moz-user-select: none;
1698
  -ms-user-select: none;
1699
  user-select: none;
 
1700
  }
1701
  .fv-player-video-checker {
1702
  user-select: text;
@@ -1713,6 +1729,13 @@ article .entry-content .fvfp_admin_error p { line-height: 18px }
1713
  .flowplayer.chrome55fix video::-webkit-media-controls-panel { width: calc(100% + 48px); }
1714
  .flowplayer.chrome55fix-subtitles video::-webkit-media-controls-panel { width: calc(100% + 96px); }
1715
 
 
 
 
 
 
 
 
1716
 
1717
  /* Audio player */
1718
  .is-audio .fp-player {background-size: contain; background-position: top center; background-repeat: no-repeat}
@@ -2179,4 +2202,39 @@ body.fv_flowplayer_tabs_hide .fv_flowplayer_tabs_content > div.fv_flowplayer_tab
2179
 
2180
  .flowplayer .fp-ui .invisible {
2181
  visibility: hidden;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2182
  }
995
  background-color: rgba(0, 0, 0, .75) !important;
996
  }
997
 
998
+ .flowplayer { margin: 0 auto 2.8em auto; display: block; max-width: 100%; white-space: normal }
999
  .flowplayer.has-caption { margin: 0 auto; }
1000
  .flowplayer.fixed-controls.has-caption, flowplayer.fixed-controls.has-caption * { margin-bottom: 2.8em; }
1001
  .flowplayer.fixed-controls, .entry-content .flowplayer.fixed-controls { margin-bottom: 5.2em }
1037
  .flowplayer .fp-elapsed {min-width: 5.1ch}
1038
  .flowplayer.is-long .fp-elapsed {min-width: 7.1ch}
1039
 
1040
+ .flowplayer.is-fullscreen.is-splash.is-error .fp-header {
1041
+ display: block;
1042
+ opacity: 1;
1043
+ }
1044
+ .flowplayer.is-fullscreen.is-splash.is-error .fp-header > * {
1045
+ opacity: 0;
1046
+ }
1047
+ .flowplayer.is-fullscreen.is-splash.is-error .fp-header .fp-unload {
1048
+ opacity: 1;
1049
+ }
1050
+
1051
  .fv-fp-splash-text { position: absolute;bottom:20%;z-index:20;text-align:center;width:100%;color:#fff;text-shadow: 0 0 2px #333;background-color: rgba(0,0,0,0.5); font-size: 18px; padding: 5px 36px; pointer-events: none }
1052
  .flowplayer.is-error .fv-fp-splash-text {display: none}
1053
 
1101
 
1102
  /* reducing the spacing in .fp-header */
1103
  .flowplayer .fp-header { /*background-color: rgba(0, 0, 0, 0.5); height: 2em;*/ padding-left: 0 }
1104
+ .flowplayer .fp-header .fp-icon { text-shadow: 0 0 10px rgba(0, 0, 0, 0.3) }
1105
+ .flowplayer:not(.is-touch.is-fullscreen) .fp-header .fp-icon { margin: .5em .5em 0 0;line-height: 1 }
1106
 
1107
  .flowplayer.is-fullscreen{ max-height:100% !important; }
1108
  .flowplayer .fp-controls .fp-fullscreen {display:none}
1167
  /* Share bar */
1168
  .flowplayer .fp-embed-code{display:none;}
1169
  .is-rtl.flowplayer .fvp-share-bar{left:auto;}
1170
+ .flowplayer .fvp-share-bar{font-size:12px}
1171
  .flowplayer .fvp-share-bar textarea{width:400px;min-height:130px;font-family: "Lucida Console", Monaco, monospace; color:#777; white-space:nowrap; resize:none;overflow:hidden;border:0;outline:0;background-color:transparent;color:#ccc; border: 1px solid #888;}
1172
  .flowplayer.is-embedding .fp-embed,.flowplayer.is-embedding .fvp-share-bar{display:block;opacity:1;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100)}
1173
 
1706
  .flowplayer {
1707
  -webkit-touch-callout: none;
1708
  -webkit-user-select: none;
1709
+ -webkit-user-drag: none;
1710
+ touch-action: pan-x pan-y pinch-zoom;
1711
  -khtml-user-select: none;
1712
  -moz-user-select: none;
1713
  -ms-user-select: none;
1714
  user-select: none;
1715
+ -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
1716
  }
1717
  .fv-player-video-checker {
1718
  user-select: text;
1729
  .flowplayer.chrome55fix video::-webkit-media-controls-panel { width: calc(100% + 48px); }
1730
  .flowplayer.chrome55fix-subtitles video::-webkit-media-controls-panel { width: calc(100% + 96px); }
1731
 
1732
+ .flowplayer .fp-controls > .fv-fp-rewind {
1733
+ margin-right: 0;
1734
+ }
1735
+ .flowplayer .fp-controls > .fv-fp-forward {
1736
+ margin-left: 0;
1737
+ }
1738
+
1739
 
1740
  /* Audio player */
1741
  .is-audio .fp-player {background-size: contain; background-position: top center; background-repeat: no-repeat}
2202
 
2203
  .flowplayer .fp-ui .invisible {
2204
  visibility: hidden;
2205
+ }
2206
+
2207
+ .flowplayer .fv-fp-tap-left,
2208
+ .flowplayer .fv-fp-tap-right {
2209
+ top: 0;
2210
+ left: 0;
2211
+ width: 45%;
2212
+ height: calc( 100% - 6em );
2213
+ margin: 3em 0;
2214
+ position: absolute;
2215
+ -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
2216
+ -webkit-touch-callout: none;
2217
+ -webkit-user-select: none;
2218
+ -webkit-user-drag: none;
2219
+ touch-action: pan-x pan-y pinch-zoom;
2220
+ }
2221
+ .flowplayer .fv-fp-tap-right {
2222
+ left: auto;
2223
+ right: 0;
2224
+ }
2225
+ .flowplayer .fv-fp-tap-left span,
2226
+ .flowplayer .fv-fp-tap-right span {
2227
+ font-size: 1.5em;
2228
+ opacity: 0;
2229
+ position: relative;
2230
+ top: 25%;
2231
+ }
2232
+ .flowplayer .fv-fp-tap-left.is-active span,
2233
+ .flowplayer .fv-fp-tap-right.is-active span {
2234
+ animation: fv-player-tap-left-right 0.5s ease-out;
2235
+ }
2236
+ @keyframes fv-player-tap-left-right {
2237
+ 0% { opacity: 0; }
2238
+ 50% { opacity: 1; }
2239
+ 100% { opacity: 0; }
2240
  }
css/fonts/fpicons.eot CHANGED
File without changes
css/fonts/fpicons.svg CHANGED
File without changes
css/fonts/fpicons.ttf CHANGED
File without changes
css/fonts/fpicons.woff CHANGED
File without changes
css/img/exit_btn.png CHANGED
File without changes
css/img/techinfo.png CHANGED
File without changes
css/list-view.css CHANGED
@@ -3,7 +3,7 @@
3
  #date_created { width: 8em }
4
  #author { width: 8em }
5
  #embeds { width: 20% }
6
- #shortcode-copy { width: 3em }
7
 
8
  .fv_player_splash_list_preview { height: 72px; margin: 0 5px 2px 0; display: inline; float: left; position: relative; cursor: pointer}
9
  .fv_player_splash_list_preview img { height: 72px; width: auto }
@@ -17,8 +17,4 @@
17
 
18
  td.column-shortcode { padding-right: 0 }
19
  .column-shortcode { width: 10em }
20
- .column-shortcode input { width: 100% }
21
-
22
- .shortcode-copy a.button {
23
- padding: 0 5px 1px;
24
- }
3
  #date_created { width: 8em }
4
  #author { width: 8em }
5
  #embeds { width: 20% }
6
+ #stats_play { width: 3em }
7
 
8
  .fv_player_splash_list_preview { height: 72px; margin: 0 5px 2px 0; display: inline; float: left; position: relative; cursor: pointer}
9
  .fv_player_splash_list_preview img { height: 72px; width: auto }
17
 
18
  td.column-shortcode { padding-right: 0 }
19
  .column-shortcode { width: 10em }
20
+ .column-shortcode input { width: 100% }
 
 
 
 
css/shortcode-editor.css CHANGED
@@ -33,14 +33,14 @@
33
  #fv-flowplayer-playlist table:first-child .fv_wp_flowplayer_field_rtmp { visibility: visible; }
34
  #fv-flowplayer-playlist table:first-child .fv_wp_flowplayer_field_rtmp_wrapper th { visibility: visible; }
35
  /*#fv-flowplayer-playlist table:first-child .button { display: inline-block; }*/
36
- /*#colorbox, #cboxOverlay, #cboxWrapper{ z-index: 100000; }*/
37
 
38
  #fv-player-shortcode-editor .fv-player-tab-video-files table .button { width: 22% }
39
- #fv-player-shortcode-editor .fv-player-tab-subtitles table .button { width: 26% }
40
  #fv-player-shortcode-editor .fv-player-tabs .submit-button-wrapper .button { width: auto; }
41
 
42
- #fv-player-shortcode-editor-editor{ top:0; }
43
- #fv-player-shortcode-editor-editor > table{ width:100%; }
 
44
  #fv-player-shortcode-editor td{ vertical-align: top; position: relative }
45
  .fv-player-tab table{ margin-bottom: 10px; }
46
  .fv-player-tabs-header .nav-tab-wrapper{ margin:0; }
@@ -50,8 +50,8 @@
50
  #fv_player_boxTitle{ display:none!important; }
51
  #fv_player_boxLoadedContent{ margin-top:0; }
52
 
53
- .fv-player-shortcode-editor-left{ width:40%; }
54
- .fv-player-shortcode-editor-right{ width:60%; }
55
  #fv-player-shortcode-editor #fv_wp_flowplayer_field_player_name { width: 96%; margin: 0 0 6px; }
56
  .fv-player-tab{position:relative;}
57
  .fv-player-tabs #fv-player-list-thumb-toggle{ position:absolute;right:10px;text-align:right;top:9px; }
@@ -61,14 +61,13 @@
61
 
62
  /*Playlist view*/
63
  .is-playlist .fv-player-playlist-item-title{ display:block; }
64
- .is-playlist .fv_player_field_insert-button{ display:none; }
65
- .is-playlist-active .playlist_edit{ display:none; }
66
 
 
67
  .is-playlist .hide-if-playlist{display:none!important;}
68
  .is-singular .hide-if-singular{display:none!important;}
69
  .is-playlist-active .hide-if-playlist-active{display:none!important;}
 
70
 
71
- .playlist_edit{ display:block; }
72
  .fv-player-tab-playlist tr:not(:hover) .fvp_item_remove{visibility: hidden;}
73
  .fv-player-tab-playlist tr:hover .fvp_item_remove{visibility: visible;color: #a00;}
74
  .fv-player-tab-playlist a{cursor:pointer;}
@@ -89,22 +88,59 @@
89
  #fv-player-list-thumb-toggle > a{ box-shadow:none; }
90
  #fv-player-shortcode-editor td > input[type="checkbox"]{margin-top:-4px}
91
 
92
- #fv-player-shortcode-editor-loading-spinner {background-image: url(../../../../wp-includes/images/wpspin-2x.gif); background-color: white; background-repeat: no-repeat; background-position: center; position:absolute; z-index: 2; height: 100%; width: 100%;}
93
- #fv-player-shortcode-editor-loading-spinner.loaded {background: white}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
 
95
  /*Preview iframe*/
96
- #fv-player-shortcode-editor-preview{ width: 460px;position:relative;text-align: center; }
97
  #fv-player-shortcode-editor-preview div.fv-player-shortcode-editor-helper {display:none;}
98
  #fv-player-shortcode-editor-preview.preview-loading #fv-player-shortcode-editor-preview-spinner,
99
  #fv-player-shortcode-editor-preview.preview-no #fv-player-shortcode-editor-preview-no,
100
  #fv-player-shortcode-editor-preview.preview-new-tab #fv-player-shortcode-editor-preview-new-tab{display:block;}
101
  #fv-player-shortcode-editor-preview.preview-no #fv-player-shortcode-editor-preview-target,
102
  #fv-player-shortcode-editor-preview.preview-new-tab #fv-player-shortcode-editor-preview-target{display:none}
103
- #fv-player-shortcode-editor-preview.preview-new-tab #fv-player-shortcode-editor-preview-iframe-refresh{display:none!important}
104
  #fv-player-shortcode-editor-preview-spinner, .fv-player-shortcode-editor-small-spinner, .fv-player-se-loading-indictor {background-image: url(../../../../wp-includes/images/wpspin-2x.gif); background-color: white; background-repeat: no-repeat; background-position: center}
105
- #fv-player-shortcode-editor-preview-spinner{position:absolute; z-index: 2; height: 200px; width: 100%;}
106
  .fv-player-shortcode-editor-small-spinner, .fv-player-se-loading-indictor {z-index: 2; background-size: 20px; height: 20px; width: 20px; display: inline-block}
107
- .fv-player-shortcode-editor-small-spinner {position: absolute; top: 4px; right: 123px;}
108
  .fvp_item_video-thumbnail img{max-width: 95px;max-height: 95px;}
109
  #fv-player-shortcode-editor-preview-new-tab, #fv-player-shortcode-editor-preview-no{background-image: url(../images/icon-256x256.png);width: 256px;height: 290px;background-repeat: no-repeat;line-height:512px;overflow:hidden;margin:0 auto;text-align: center;}
110
  #fv-player-shortcode-editor-preview-new-tab a {margin-top:256px;}
@@ -123,7 +159,9 @@
123
 
124
  .fv-player-tabs th { width: 21%; text-align: right; }
125
  .fv-player-tabs .fv-player-tab-playlist th { text-align: left; }
126
-
 
 
127
 
128
 
129
  /* moved in from main plugin css */
@@ -165,13 +203,45 @@ a #add-format, a #add-rtmp {
165
  padding: 4px 2px;
166
  }
167
 
168
- #fv_player_copy_to_clipboard, #fv_player_import_data {width: 80%}
169
- #fv_player_copied_to_clipboard_message, #fv_player_imported_message {margin: 22px auto 0 auto; visibility: hidden; width: 20%; text-align: center}
170
-
171
  #fv-player-shortcode-editor-editor ::placeholder {
172
  opacity:.5;
173
  }
174
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  #fv-player-shortcode-editor h1 {
176
  color: #23282d;
177
  }
@@ -228,4 +298,4 @@ a #add-format, a #add-rtmp {
228
  min-height: 30px;
229
  }
230
 
231
- #fv-player-shortcode-editor .fv-player-playlist-item-title, #fv-player-shortcode-editor .fv-player-playlist-item-title:hover{ margin:0;border:0;background:transparent; }
33
  #fv-flowplayer-playlist table:first-child .fv_wp_flowplayer_field_rtmp { visibility: visible; }
34
  #fv-flowplayer-playlist table:first-child .fv_wp_flowplayer_field_rtmp_wrapper th { visibility: visible; }
35
  /*#fv-flowplayer-playlist table:first-child .button { display: inline-block; }*/
 
36
 
37
  #fv-player-shortcode-editor .fv-player-tab-video-files table .button { width: 22% }
38
+ #fv-player-shortcode-editor .fv-p layer-tab-subtitles table .button { width: 26% }
39
  #fv-player-shortcode-editor .fv-player-tabs .submit-button-wrapper .button { width: auto; }
40
 
41
+ #fv-player-shortcode-editor{ top:0; }
42
+ #fv-player-shortcode-editor td.field {position: relative;}
43
+ #fv-player-shortcode-editor .fv-player-shortcode-editor-small-spinner {position: absolute; left: 70%; top: 6px;}
44
  #fv-player-shortcode-editor td{ vertical-align: top; position: relative }
45
  .fv-player-tab table{ margin-bottom: 10px; }
46
  .fv-player-tabs-header .nav-tab-wrapper{ margin:0; }
50
  #fv_player_boxTitle{ display:none!important; }
51
  #fv_player_boxLoadedContent{ margin-top:0; }
52
 
53
+ #fv-player-shortcode-editor-left{ float: left; width:42%; margin-right: 1% }
54
+ #fv-player-shortcode-editor-right{ float: left; width:57%; }
55
  #fv-player-shortcode-editor #fv_wp_flowplayer_field_player_name { width: 96%; margin: 0 0 6px; }
56
  .fv-player-tab{position:relative;}
57
  .fv-player-tabs #fv-player-list-thumb-toggle{ position:absolute;right:10px;text-align:right;top:9px; }
61
 
62
  /*Playlist view*/
63
  .is-playlist .fv-player-playlist-item-title{ display:block; }
 
 
64
 
65
+ .always-hide{display:none!important;}
66
  .is-playlist .hide-if-playlist{display:none!important;}
67
  .is-singular .hide-if-singular{display:none!important;}
68
  .is-playlist-active .hide-if-playlist-active{display:none!important;}
69
+ .is-singular-active .hide-if-singular-active{display:none!important;}
70
 
 
71
  .fv-player-tab-playlist tr:not(:hover) .fvp_item_remove{visibility: hidden;}
72
  .fv-player-tab-playlist tr:hover .fvp_item_remove{visibility: visible;color: #a00;}
73
  .fv-player-tab-playlist a{cursor:pointer;}
88
  #fv-player-list-thumb-toggle > a{ box-shadow:none; }
89
  #fv-player-shortcode-editor td > input[type="checkbox"]{margin-top:-4px}
90
 
91
+ .fv-player-editor-overlay {
92
+ display: none;
93
+ background-color: white;
94
+ padding: 1em;
95
+ position:absolute;
96
+ z-index: 21;
97
+ text-align: center;
98
+ top: 0;
99
+ right: 0;
100
+ bottom: 0;
101
+ left: 0;
102
+ }
103
+ #fv_player_box .fv-player-editor-overlay textarea {
104
+ font-family: Consolas, Monaco, monospace;
105
+ width: 100%;
106
+ }
107
+ #fv-player-editor-loading-overlay {
108
+ background-image: url(../../../../wp-includes/images/wpspin-2x.gif);
109
+ background-repeat: no-repeat;
110
+ background-position: center;
111
+ }
112
+ .fv-player-editor-overlay-notice {
113
+ background: #fff;
114
+ border-left: 4px solid #fff;
115
+ box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
116
+ margin: 5px 15px 2px;
117
+ padding: 1px 12px;
118
+ text-align: left;
119
+ visibility: hidden;
120
+ }
121
+ .fv-player-editor-overlay-notice.notice-success {
122
+ border-left-color: #46b450;
123
+ }
124
+ .fv-player-editor-overlay-notice.notice-warning {
125
+ border-left-color: #ffb900;
126
+ }
127
+ .fv-player-editor-overlay-notice.notice-error {
128
+ border-left-color: #dc3232;
129
+ }
130
 
131
  /*Preview iframe*/
132
+ #fv-player-shortcode-editor-preview{ position:relative;text-align: center; }
133
  #fv-player-shortcode-editor-preview div.fv-player-shortcode-editor-helper {display:none;}
134
  #fv-player-shortcode-editor-preview.preview-loading #fv-player-shortcode-editor-preview-spinner,
135
  #fv-player-shortcode-editor-preview.preview-no #fv-player-shortcode-editor-preview-no,
136
  #fv-player-shortcode-editor-preview.preview-new-tab #fv-player-shortcode-editor-preview-new-tab{display:block;}
137
  #fv-player-shortcode-editor-preview.preview-no #fv-player-shortcode-editor-preview-target,
138
  #fv-player-shortcode-editor-preview.preview-new-tab #fv-player-shortcode-editor-preview-target{display:none}
139
+ #fv-player-shortcode-editor-preview.preview-new-tab {display:none!important}
140
  #fv-player-shortcode-editor-preview-spinner, .fv-player-shortcode-editor-small-spinner, .fv-player-se-loading-indictor {background-image: url(../../../../wp-includes/images/wpspin-2x.gif); background-color: white; background-repeat: no-repeat; background-position: center}
141
+ #fv-player-shortcode-editor-preview-spinner{z-index: 2; height: 100%; width: 100%; position: absolute}
142
  .fv-player-shortcode-editor-small-spinner, .fv-player-se-loading-indictor {z-index: 2; background-size: 20px; height: 20px; width: 20px; display: inline-block}
143
+ .fv-player-playlist-item .fv-player-shortcode-editor-small-spinner {position: absolute; top: 4px; right: 123px;}
144
  .fvp_item_video-thumbnail img{max-width: 95px;max-height: 95px;}
145
  #fv-player-shortcode-editor-preview-new-tab, #fv-player-shortcode-editor-preview-no{background-image: url(../images/icon-256x256.png);width: 256px;height: 290px;background-repeat: no-repeat;line-height:512px;overflow:hidden;margin:0 auto;text-align: center;}
146
  #fv-player-shortcode-editor-preview-new-tab a {margin-top:256px;}
159
 
160
  .fv-player-tabs th { width: 21%; text-align: right; }
161
  .fv-player-tabs .fv-player-tab-playlist th { text-align: left; }
162
+ .fv-player-tabs th[valign=top] label {
163
+ margin-top: 4px;
164
+ }
165
 
166
 
167
  /* moved in from main plugin css */
203
  padding: 4px 2px;
204
  }
205
 
 
 
 
206
  #fv-player-shortcode-editor-editor ::placeholder {
207
  opacity:.5;
208
  }
209
 
210
+ .fv-player-save-waiting {
211
+ position: absolute;
212
+ bottom: 10px;
213
+ right: 0;
214
+ }
215
+
216
+ .fv-player-save-notice {
217
+ position: absolute;
218
+ bottom: 10px;
219
+ left: 0;
220
+ right: 0;
221
+ background: #fff;
222
+ border-left: 4px solid gray;
223
+ box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
224
+ margin: 5px 15px 2px;
225
+ padding: 1px 12px;
226
+ }
227
+ .fv-player-save-completed {
228
+ border-left: 4px solid #46b450;
229
+ }
230
+ .fv-player-save-error {
231
+ border-left: 4px solid #bf0000;
232
+ }
233
+
234
+ .fv-player-src-playlist-support-notice {
235
+ margin: 3px 0;
236
+ padding: 8px;
237
+ background: #fff;
238
+ border-left: 4px solid #bf0000;
239
+ box-shadow: 0 0 0 2px rgba(0,0,0,.1);
240
+ display: none;
241
+ position: absolute;
242
+ z-index: 2;
243
+ }
244
+
245
  #fv-player-shortcode-editor h1 {
246
  color: #23282d;
247
  }
298
  min-height: 30px;
299
  }
300
 
301
+ #fv-player-shortcode-editor .fv-player-playlist-item-title, #fv-player-shortcode-editor .fv-player-playlist-item-title:hover{ margin:0;border:0;background:transparent; }
flowplayer.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: FV Player
4
  Plugin URI: http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer
5
  Description: Formerly FV WordPress Flowplayer. Supports MP4, HLS, MPEG-DASH, WebM and OGV. Advanced features such as overlay ads or popups. Uses Flowplayer 7.2.7.
6
- Version: 7.4.47.727
7
  Author URI: http://foliovision.com/
8
  License: GPL-3.0
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.txt
@@ -27,9 +27,8 @@ License URI: http://www.gnu.org/licenses/gpl-3.0.txt
27
  */
28
 
29
  global $fv_wp_flowplayer_ver;
30
- $fv_wp_flowplayer_ver = '7.4.47.727.2';
31
- $fv_wp_flowplayer_core_ver = '7.2.7';
32
-
33
  include_once( dirname( __FILE__ ) . '/includes/extra-functions.php' );
34
  if( file_exists( dirname( __FILE__ ) . '/includes/module.php' ) ) {
35
  include_once( dirname( __FILE__ ) . '/includes/module.php' );
@@ -100,3 +99,5 @@ include_once( dirname( __FILE__ ) . '/models/gutenberg.php' );
100
 
101
  include_once(dirname( __FILE__ ).'/models/migration-wizard.class.php');
102
  include_once(dirname( __FILE__ ).'/models/migration-wizard.php');
 
 
3
  Plugin Name: FV Player
4
  Plugin URI: http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer
5
  Description: Formerly FV WordPress Flowplayer. Supports MP4, HLS, MPEG-DASH, WebM and OGV. Advanced features such as overlay ads or popups. Uses Flowplayer 7.2.7.
6
+ Version: 7.5.3.727
7
  Author URI: http://foliovision.com/
8
  License: GPL-3.0
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.txt
27
  */
28
 
29
  global $fv_wp_flowplayer_ver;
30
+ $fv_wp_flowplayer_ver = '7.5.3.727';
31
+ $fv_wp_flowplayer_core_ver = '7.2.7.2';
 
32
  include_once( dirname( __FILE__ ) . '/includes/extra-functions.php' );
33
  if( file_exists( dirname( __FILE__ ) . '/includes/module.php' ) ) {
34
  include_once( dirname( __FILE__ ) . '/includes/module.php' );
99
 
100
  include_once(dirname( __FILE__ ).'/models/migration-wizard.class.php');
101
  include_once(dirname( __FILE__ ).'/models/migration-wizard.php');
102
+
103
+ include_once(dirname( __FILE__ ) . '/models/stats.php');
flowplayer/embed.min.js CHANGED
File without changes
flowplayer/flowplayer.dashjs.min.js CHANGED
@@ -519,7 +519,7 @@
519
  break;
520
  case "PLAYBACK_PAUSED":
521
  if( flowplayer.support.browser.chrome && !flowplayer.support.android ) {
522
- console.log( 'Dash paused!', player.loading, player.ready, player.paused, player.playing );
523
 
524
  // If the element received pause before it stared playing,
525
  // We are dealing with autoplay blocked
519
  break;
520
  case "PLAYBACK_PAUSED":
521
  if( flowplayer.support.browser.chrome && !flowplayer.support.android ) {
522
+ //console.log( 'Dash paused!', player.loading, player.ready, player.paused, player.playing );
523
 
524
  // If the element received pause before it stared playing,
525
  // We are dealing with autoplay blocked
flowplayer/flowplayer.swf CHANGED
File without changes
flowplayer/flowplayerhls.swf CHANGED
File without changes
flowplayer/fv-flowplayer.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){function t(e,t,n,r){for(var o,a=n.slice(),s=i(t,e),l=0,u=a.length;u>l&&(handler=a[l],"object"==typeof handler&&"function"==typeof handler.handleEvent?handler.handleEvent(s):handler.call(e,s),!s.stoppedImmediatePropagation);l++);return o=!s.stoppedPropagation,r&&o&&e.parentNode?e.parentNode.dispatchEvent(s):!s.defaultPrevented}function n(e,t){return{configurable:!0,get:e,set:t}}function r(e,t,r){var i=y(t||e,r);m(e,"textContent",n(function(){return i.get.call(this)},function(e){i.set.call(this,e)}))}function i(e,t){return e.currentTarget=t,e.eventPhase=e.target===e.currentTarget?2:3,e}function o(e,t){for(var n=e.length;n--&&e[n]!==t;);return n}function a(){if("BR"===this.tagName)return"\n";for(var e=this.firstChild,t=[];e;)8!==e.nodeType&&7!==e.nodeType&&t.push(e.textContent),e=e.nextSibling;return t.join("")}function s(e){!f&&C.test(document.readyState)&&(f=!f,document.detachEvent(d,s),e=document.createEvent("Event"),e.initEvent(p,!0,!0),document.dispatchEvent(e))}function l(e){for(var t;t=this.lastChild;)this.removeChild(t);null!=e&&this.appendChild(document.createTextNode(e))}function u(t,n){return n||(n=e.event),n.target||(n.target=n.srcElement||n.fromElement||document),n.timeStamp||(n.timeStamp=(new Date).getTime()),n}if(!document.createEvent){var c=!0,f=!1,d="onreadystatechange",p="DOMContentLoaded",h="__IE8__"+Math.random(),g=e.Object,m=g.defineProperty||function(e,t,n){e[t]=n.value},v=g.defineProperties||function(t,n){for(var r in n)if(w.call(n,r))try{m(t,r,n[r])}catch(i){e.console&&console.log(r+" failed on object:",t,i.message)}},y=g.getOwnPropertyDescriptor,w=g.prototype.hasOwnProperty,b=e.Element.prototype,I=e.Text.prototype,M=/^[a-z]+$/,C=/loaded|complete/,A={},S=document.createElement("div");r(e.HTMLCommentElement.prototype,b,"nodeValue"),r(e.HTMLScriptElement.prototype,null,"text"),r(I,null,"nodeValue"),r(e.HTMLTitleElement.prototype,null,"text"),m(e.HTMLStyleElement.prototype,"textContent",function(e){return n(function(){return e.get.call(this.styleSheet)},function(t){e.set.call(this.styleSheet,t)})}(y(e.CSSStyleSheet.prototype,"cssText"))),v(b,{textContent:{get:a,set:l},firstElementChild:{get:function(){for(var e=this.childNodes||[],t=0,n=e.length;n>t;t++)if(1==e[t].nodeType)return e[t]}},lastElementChild:{get:function(){for(var e=this.childNodes||[],t=e.length;t--;)if(1==e[t].nodeType)return e[t]}},previousElementSibling:{get:function(){for(var e=this.previousSibling;e&&1!=e.nodeType;)e=e.previousSibling;return e}},nextElementSibling:{get:function(){for(var e=this.nextSibling;e&&1!=e.nodeType;)e=e.nextSibling;return e}},childElementCount:{get:function(){for(var e=0,t=this.childNodes||[],n=t.length;n--;e+=1==t[n].nodeType);return e}},addEventListener:{value:function(e,n,r){var i,a=this,s="on"+e,l=a[h]||m(a,h,{value:{}})[h],c=l[s]||(l[s]={}),f=c.h||(c.h=[]);if(!w.call(c,"w")){if(c.w=function(e){return e[h]||t(a,u(a,e),f,!1)},!w.call(A,s))if(M.test(e))try{i=document.createEventObject(),i[h]=!0,9!=a.nodeType&&null==a.parentNode&&S.appendChild(a),a.fireEvent(s,i),A[s]=!0}catch(i){for(A[s]=!1;S.hasChildNodes();)S.removeChild(S.firstChild)}else A[s]=!1;(c.n=A[s])&&a.attachEvent(s,c.w)}o(f,n)<0&&f[r?"unshift":"push"](n)}},dispatchEvent:{value:function(e){var n,r=this,i="on"+e.type,o=r[h],a=o&&o[i],s=!!a;return e.target||(e.target=r),s?a.n?r.fireEvent(i,e):t(r,e,a.h,!0):(n=r.parentNode)?n.dispatchEvent(e):!0,!e.defaultPrevented}},removeEventListener:{value:function(e,t,n){var r=this,i="on"+e,a=r[h],s=a&&a[i],l=s&&s.h,u=l?o(l,t):-1;u>-1&&l.splice(u,1)}}}),v(I,{addEventListener:{value:b.addEventListener},dispatchEvent:{value:b.dispatchEvent},removeEventListener:{value:b.removeEventListener}}),v(e.XMLHttpRequest.prototype,{addEventListener:{value:function(e,t,n){var r=this,i="on"+e,a=r[h]||m(r,h,{value:{}})[h],s=a[i]||(a[i]={}),l=s.h||(s.h=[]);o(l,t)<0&&(r[i]||(r[i]=function(){var t=document.createEvent("Event");t.initEvent(e,!0,!0),r.dispatchEvent(t)}),l[n?"unshift":"push"](t))}},dispatchEvent:{value:function(e){var n=this,r="on"+e.type,i=n[h],o=i&&i[r],a=!!o;return a&&(o.n?n.fireEvent(r,e):t(n,e,o.h,!0))}},removeEventListener:{value:b.removeEventListener}}),v(e.Event.prototype,{bubbles:{value:!0,writable:!0},cancelable:{value:!0,writable:!0},preventDefault:{value:function(){this.cancelable&&(this.defaultPrevented=!0,this.returnValue=!1)}},stopPropagation:{value:function(){this.stoppedPropagation=!0,this.cancelBubble=!0}},stopImmediatePropagation:{value:function(){this.stoppedImmediatePropagation=!0,this.stopPropagation()}},initEvent:{value:function(e,t,n){this.type=e,this.bubbles=!!t,this.cancelable=!!n,this.bubbles||this.stopPropagation()}}}),v(e.HTMLDocument.prototype,{textContent:{get:function(){return 11===this.nodeType?a.call(this):null},set:function(e){11===this.nodeType&&l.call(this,e)}},addEventListener:{value:function(t,n,r){var i=this;b.addEventListener.call(i,t,n,r),c&&t===p&&!C.test(i.readyState)&&(c=!1,i.attachEvent(d,s),e==top&&function o(e){try{i.documentElement.doScroll("left"),s()}catch(t){setTimeout(o,50)}}())}},dispatchEvent:{value:b.dispatchEvent},removeEventListener:{value:b.removeEventListener},createEvent:{value:function(e){var t;if("Event"!==e)throw new Error("unsupported "+e);return t=document.createEventObject(),t.timeStamp=(new Date).getTime(),t}}}),v(e.Window.prototype,{getComputedStyle:{value:function(){function e(e){this._=e}function t(){}var n=/^(?:[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|))(?!px)[a-z%]+$/,r=/^(top|right|bottom|left)$/,i=/\-([a-z])/g,o=function(e,t){return t.toUpperCase()};return e.prototype.getPropertyValue=function(e){var t,a,s,l=this._,u=l.style,c=l.currentStyle,f=l.runtimeStyle;return e=("float"===e?"style-float":e).replace(i,o),t=c?c[e]:u[e],n.test(t)&&!r.test(e)&&(a=u.left,s=f&&f.left,s&&(f.left=c.left),u.left="fontSize"===e?"1em":t,t=u.pixelLeft+"px",u.left=a,s&&(f.left=s)),null==t?t:t+""||"auto"},t.prototype.getPropertyValue=function(){return null},function(n,r){return r?new t(n):new e(n)}}()},addEventListener:{value:function(n,r,i){var a,s=e,l="on"+n;s[l]||(s[l]=function(e){return t(s,u(s,e),a,!1)}),a=s[l][h]||(s[l][h]=[]),o(a,r)<0&&a[i?"unshift":"push"](r)}},dispatchEvent:{value:function(t){var n=e["on"+t.type];return n?n.call(e,t)!==!1&&!t.defaultPrevented:!0}},removeEventListener:{value:function(t,n,r){var i="on"+t,a=(e[i]||g)[h],s=a?o(a,n):-1;s>-1&&a.splice(s,1)}}})}}(this),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.flowplayer=e()}}(function(){var e;return function(){function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return i(n||e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}return e}()({1:[function(e,t,n){"use strict";var r=t.exports={},i=e("class-list"),o=window.jQuery,a=e("punycode"),s=e("computed-style");r.noop=function(){},r.identity=function(e){return e},r.removeNode=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},r.find=function(e,t){return o?o(e,t).toArray():(t=t||document,Array.prototype.map.call(t.querySelectorAll(e),function(e){return e}))},r.text=function(e,t){e["innerText"in e?"innerText":"textContent"]=t},r.findDirect=function(e,t){return r.find(e,t).filter(function(e){return e.parentNode===t})},r.hasClass=function(e,t){return"string"!=typeof e.className?!1:i(e).contains(t)},r.isSameDomain=function(e){var t=window.location,n=r.createElement("a",{href:e});return t.hostname===n.hostname&&t.protocol===n.protocol&&t.port===n.port},r.css=function(e,t,n){return"object"==typeof t?Object.keys(t).forEach(function(n){r.css(e,n,t[n])}):"undefined"!=typeof n?""===n?e?e.style.removeProperty(t):void 0:e?e.style.setProperty(t,n):void 0:e?s(e,t):void 0},r.createElement=function(e,t,n){try{var i=document.createElement(e);for(var a in t)t.hasOwnProperty(a)&&("css"===a?r.css(i,t[a]):r.attr(i,a,t[a]));return n&&(i.innerHTML=n),i}catch(s){if(!o)throw s;return o("<"+e+">"+n+"</"+e+">").attr(t)[0]}},r.toggleClass=function(e,t,n){if(e){var r=i(e);"undefined"==typeof n?r.toggle(t):n?r.add(t):n||r.remove(t)}},r.addClass=function(e,t){return r.toggleClass(e,t,!0)},r.removeClass=function(e,t){return r.toggleClass(e,t,!1)},r.append=function(e,t){return e.appendChild(t),e},r.appendTo=function(e,t){return r.append(t,e),e},r.prepend=function(e,t){e.insertBefore(t,e.firstChild)},r.insertAfter=function(e,t,n){t==r.lastChild(e)&&e.appendChild(n);var i=Array.prototype.indexOf.call(e.children,t);e.insertBefore(n,e.children[i+1])},r.html=function(e,t){e=e.length?e:[e],e.forEach(function(e){e.innerHTML=t})},r.attr=function(e,t,n){if("class"===t&&(t="className"),r.hasOwnOrPrototypeProperty(e,t))try{e[t]=n}catch(i){if(!o)throw i;o(e).attr(t,n)}else n===!1?e.removeAttribute(t):e.setAttribute(t,n);return e},r.prop=function(e,t,n){return"undefined"==typeof n?e&&e[t]:void(e[t]=n)},r.offset=function(e){var t=e.getBoundingClientRect();return e.offsetWidth/e.offsetHeight>e.clientWidth/e.clientHeight&&(t={left:100*t.left,right:100*t.right,top:100*t.top,bottom:100*t.bottom,width:100*t.width,height:100*t.height}),t},r.width=function(e,t){if(t)return e.style.width=(""+t).replace(/px$/,"")+"px";var n=r.offset(e).width;return"undefined"==typeof n?e.offsetWidth:n},r.height=function(e,t){if(t)return e.style.height=(""+t).replace(/px$/,"")+"px";var n=r.offset(e).height;return"undefined"==typeof n?e.offsetHeight:n},r.lastChild=function(e){return e.children[e.children.length-1]},r.hasParent=function(e,t){for(var n=e.parentElement;n;){if("string"!=typeof t){if(n===t)return!0}else if(r.matches(n,t))return!0;n=n.parentElement}return!1},r.createAbsoluteUrl=function(e){return r.createElement("a",{href:e}).href},r.xhrGet=function(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){return 4===this.readyState?this.status>=400?n():void t(this.responseText):void 0},r.open("get",e,!0),r.send()},r.pick=function(e,t){var n={};return t.forEach(function(t){e.hasOwnProperty(t)&&(n[t]=e[t])}),n},r.hostname=function(e){return a.toUnicode(e||window.location.hostname)},r.browser={webkit:"WebkitAppearance"in document.documentElement.style},r.getPrototype=function(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__},r.hasOwnOrPrototypeProperty=function(e,t){for(var n=e;n;){if(Object.prototype.hasOwnProperty.call(n,t))return!0;n=r.getPrototype(n)}return!1},r.matches=function(e,t){var n=Element.prototype,r=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector||function(e){for(var t=this,n=(t.document||t.ownerDocument).querySelectorAll(e),r=0;n[r]&&n[r]!==t;)r++;return n[r]?!0:!1};return r.call(e,t)},function(e){function t(e){return e.replace(/-[a-z]/g,function(e){return e[1].toUpperCase()})}"undefined"!=typeof e.setAttribute&&(e.setProperty=function(e,n){return this.setAttribute(t(e),String(n))},e.getPropertyValue=function(e){return this.getAttribute(t(e))||null},e.removeProperty=function(e){var n=this.getPropertyValue(e);return this.removeAttribute(t(e)),n})}(window.CSSStyleDeclaration.prototype)},{"class-list":36,"computed-style":37,punycode:44}],2:[function(e,t,n){"use strict";var r=e("../common");t.exports=function(e,t,n,i){n=n||"opaque";var o="obj"+(""+Math.random()).slice(2,15),a='<object class="fp-engine" id="'+o+'" name="'+o+'" ',s=navigator.userAgent.indexOf("MSIE")>-1;a+=s?'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">':' data="'+e+'" type="application/x-shockwave-flash">';var l={width:"100%",height:"100%",allowscriptaccess:"always",wmode:n,quality:"high",flashvars:"",movie:e+(s?"?"+o:""),name:o};"transparent"!==n&&(l.bgcolor=i||"#333333"),Object.keys(t).forEach(function(e){l.flashvars+=e+"="+t[e]+"&"}),Object.keys(l).forEach(function(e){a+='<param name="'+e+'" value="'+l[e]+'"/>'}),a+="</object>";var u=r.createElement("div",{},a);return r.find("object",u)},window.attachEvent&&window.attachEvent("onbeforeunload",function(){window.__flash_savedUnloadHandler=window.__flash_unloadHandler=function(){}})},{"../common":1}],3:[function(e,t,n){"use strict";function r(e){return/^https?:/.test(e)}var i,o=e("../flowplayer"),a=e("../common"),s=e("./embed"),l=e("extend-object"),u=e("bean");i=function(e,t){function n(e){function t(e){return("0"+parseInt(e).toString(16)).slice(-2)}return(e=e.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/))?"#"+t(e[1])+t(e[2])+t(e[3]):void 0}function c(e){if(7===e.length)return e;var t=e.split("").slice(1);return"#"+t.map(function(e){return e+e}).join("")}function f(e){return/application\/x-mpegurl/i.test(e.type)}var d,p,h,g,m=e.conf,v=[],y={engineName:i.engineName,pick:function(t){var n=l({},function(){if(o.support.flashVideo){for(var n,r,i=0;i<t.length;i++)if(r=t[i],/mp4|flv|flash/i.test(r.type)&&(n=r),e.conf.swfHls&&/mpegurl/i.test(r.type)&&(n=r),n&&!/mp4/i.test(n.type))return n;return n}}());if(n)return!n.src||r(n.src)||e.conf.rtmp||n.rtmp||(n.src=a.createAbsoluteUrl(n.src)),n},suspendEngine:function(){g=!0},resumeEngine:function(){g=!1},load:function(i){function w(e){return e.replace(/&amp;/g,"%26").replace(/&/g,"%26").replace(/=/g,"%3D")}d=i,v.forEach(function(e){clearTimeout(e)});var b=a.findDirect("video",t)[0]||a.find(".fp-player > video",t)[0],I=i.src,M=r(I),C=function(){a.removeNode(b)},A=function(e){return e.some(function(e){return!!b.canPlayType(e.type)})};o.support.video&&a.prop(b,"autoplay")&&A(i.sources)?u.one(b,"timeupdate",C):C();var S=i.rtmp||m.rtmp;if(M||S||(I=a.createAbsoluteUrl(I)),h&&f(i)&&h.data!==a.createAbsoluteUrl(m.swfHls)&&y.unload(),h){["live","preload","loop"].forEach(function(e){i.hasOwnProperty(e)&&h.__set(e,i[e])}),Object.keys(i.flashls||{}).forEach(function(e){h.__set("hls_"+e,i.flashls[e])});var E=!1;if(!M&&S)h.__set("rtmp",S.url||S);else{var j=h.__get("rtmp");E=!!j,h.__set("rtmp",null)}h.__play(I,E||i.rtmp&&i.rtmp!==m.rtmp)}else{p="fpCallback"+(""+Math.random()).slice(3,15),I=w(I);var D={hostname:m.embedded?a.hostname(m.hostname):a.hostname(location.hostname),url:I,callback:p};t.getAttribute("data-origin")&&(D.origin=t.getAttribute("data-origin")),["proxy","key","autoplay","preload","subscribe","live","loop","debug","splash","poster","rtmpt"].forEach(function(e){m.hasOwnProperty(e)&&(D[e]=m[e]),i.hasOwnProperty(e)&&(D[e]=i[e]),(m.rtmp||{}).hasOwnProperty(e)&&(D[e]=(m.rtmp||{})[e]),(i.rtmp||{}).hasOwnProperty(e)&&(D[e]=(i.rtmp||{})[e])}),m.splash&&(D.autoplay=!0),m.rtmp&&(D.rtmp=m.rtmp.url||m.rtmp),i.rtmp&&(D.rtmp=i.rtmp.url||i.rtmp),Object.keys(i.flashls||{}).forEach(function(e){var t=i.flashls[e];D["hls_"+e]=t});var N="undefined"!=typeof i.hlsQualities?i.hlsQualities:m.hlsQualities;"undefined"!=typeof N&&(D.hlsQualities=N?encodeURIComponent(JSON.stringify(N)):N),void 0!==m.bufferTime&&(D.bufferTime=m.bufferTime),void 0!==m.bufferTimeMax&&(D.bufferTimeMax=m.bufferTimeMax),M&&delete D.rtmp,D.rtmp&&(D.rtmp=w(D.rtmp));var x,L=m.bgcolor||a.css(t,"background-color")||"";0===L.indexOf("rgb")?x=n(L):0===L.indexOf("#")&&(x=c(L)),D.initialVolume=e.volumeLevel;var T=f(i)?m.swfHls:m.swf;h=s(T,D,m.wmode,x)[0];var Z=a.find(".fp-player",t)[0];a.prepend(Z,h),e.off("quality.flashengine").on("quality.flashengine",function(t,n,r){var i="undefined"!=typeof e.video.hlsQualities?e.video.hlsQualities:e.conf.hlsQualities;if(i)try{h.__quality(r)}catch(o){e.debug("Error changing quality in flash engine",o)}}),setTimeout(function(){try{if(!h.PercentLoaded())return e.trigger("error",[e,{code:7,url:m.swf}])}catch(t){}},5e3),v.push(setTimeout(function(){"undefined"==typeof h.PercentLoaded&&e.trigger("flashdisabled",[e])},15e3)),v.push(setTimeout(function(){"undefined"==typeof h.PercentLoaded&&e.trigger("flashdisabled",[e,!1])},500)),e.off("resume.flashhack").on("resume.flashhack",function(){var t=setTimeout(function(){var t=h.__status().time,n=setTimeout(function(){e.playing&&!e.loading&&h.__status().time===t&&e.trigger("flashdisabled",[e])},400);v.push(n),e.one("seek.flashhack pause.flashhack load.flashack",function(){clearTimeout(n)})},800);v.push(t),e.one("progress",function(){clearTimeout(t)})}),h.pollInterval=setInterval(function(){if(h&&!g){var t=h.__status?h.__status():null;t&&((e.conf.live||e.live||i.live)&&(i.seekOffset=t.seekOffset,i.duration=t.duration+t.seekOffset),e.playing&&t.time&&t.time!==e.video.time&&e.trigger("progress",[e,t.time]),i.buffer=t.buffer/i.bytes*i.duration,e.trigger("buffer",[e,i.buffer]),!i.buffered&&t.time>0&&(i.buffered=!0,e.trigger("buffered",[e])))}},250),window[p]=function(n,r){var i=d;m.debug&&(0===n.indexOf("debug")&&r&&r.length?console.log.apply(console,["-- "+n].concat(r)):console.log("--",n,r));var o={type:n};switch(n){case"ready":r=l(i,r);break;case"click":o.flash=!0;break;case"keydown":o.which=r;break;case"seek":i.time=r;break;case"status":e.trigger("progress",[e,r.time]),r.buffer<i.bytes&&!i.buffered?(i.buffer=r.buffer/i.bytes*i.duration,e.trigger("buffer",i.buffer)):i.buffered||(i.buffered=!0,e.trigger("buffered"));break;case"metadata":var a=atob(r);r={key:a.substr(10,4),data:a.substr(21)}}"click"===n||"keydown"===n?(o.target=t,u.fire(t,n,[o])):"buffered"!=n&&"unload"!==n?setTimeout(function(){e.trigger(o,[e,r])},1):"unload"===n&&e.trigger(o,[e,r])}}},speed:a.noop,unload:function(){h&&h.__unload&&h.__unload();try{p&&window[p]&&delete window[p]}catch(n){}a.find("object",t).forEach(a.removeNode),h=0,e.off(".flashengine"),e.off(".flashhack"),clearInterval(h.pollInterval),v.forEach(function(e){clearTimeout(e)})}};return["pause","resume","seek","volume"].forEach(function(t){y[t]=function(n){try{e.ready&&(void 0===n?h["__"+t]():h["__"+t](n))}catch(r){if("undefined"==typeof h["__"+t])return e.trigger("flashdisabled",[e]);throw r}}}),y},i.engineName="flash",i.canPlay=function(e,t){return o.support.flashVideo&&/video\/(mp4|flash|flv)/i.test(e)||o.support.flashVideo&&t.swfHls&&/mpegurl/i.test(e)},o.engines.push(i)},{"../common":1,"../flowplayer":31,"./embed":2,bean:34,"extend-object":39}],4:[function(e,t,n){"use strict";function r(e){return"undefined"==typeof window.Hls?!1:/mpegurl/.test(e)&&window.Hls.isSupported()}var i,o=e("../flowplayer"),a=o.support,s=o.common,l=o.bean,u=e("./html5-factory");i=function(e,t){function n(n,r,u){var d=o.extend({recoverMediaError:!0},e.conf.hlsjs,n.hlsjs);e.engine.hls&&e.engine.hls.destroy();var p=e.engine.hls=new f(d);i.extensions.forEach(function(n){n({hls:p,player:e,root:t,videoTag:r})}),p.loadSource(n.src),u.resume=function(){e.live&&!e.dvr&&(r.currentTime=p.liveSyncPosition||0),r.play()},u.seek=function(t){try{e.live||e.dvr?r.currentTime=Math.min(t,p.liveSyncPosition||r.duration-d.livePositionOffset):r.currentTime=t}catch(n){e.debug("Failed to seek to ",t,n)}},d.bufferWhilePaused===!1&&e.on("pause",function(){p.stopLoad(),e.one("resume",function(){p.startLoad()})}),e.on("quality",function(e,t,n){p.nextLevel=a=n});var h,g,m=function(n){if(e.debug("hlsjs - recovery"),s.removeClass(t,"is-paused"),s.addClass(t,"is-seeking"),l.one(r,"seeked",function(){r.paused&&(s.removeClass(t,"is-poster"),e.poster=!1,r.play()),s.removeClass(t,"is-seeking")}),n)return p.startLoad();var i=performance.now();!h||i-h>3e3?(h=performance.now(),p.recoverMediaError()):(!g||i-g>3e3)&&(g=performance.now(),p.swapAudioCodec(),p.recoverMediaError())};return p.on(f.Events.MANIFEST_PARSED,function(t,i){var o,l=n.hlsQualities||e.conf.hlsQualities,u={},f=i.levels;if(l===!1)return p.attachMedia(r);if("drive"===l)switch(f.length){case 4:o=[1,2,3];break;case 5:o=[1,2,3,4];break;case 6:o=[1,3,4,5];break;case 7:o=[1,3,5,6];break;case 8:o=[1,3,6,7];break;default:o=f.length<3||f[0].height&&f[2].height&&f[0].height===f[2].height?[]:[1,2]}if(n.qualities=[{value:-1,label:"Auto"}],Array.isArray(l)){var d=l.find(function(e){return-1===e||e.level&&-1===e.level});d?n.qualities[0].label="number"!=typeof d?d.label:n.qualities[0].label:n.qualities=[],o=l.map(function(e){return"undefined"!=typeof e.level&&(u[e.level]=e.label),"undefined"!=typeof e.level?e.level:e})}var h=-2;n.qualities=n.qualities.concat(f.map(function(e,t){if(o&&-1===o.indexOf(t))return!1;var n=u[t]||Math.min(e.width,e.height)+"p";return u[t]||"drive"===l||(n+=" ("+Math.round(e.bitrate/1e3)+"k)"),t===a&&(h=t),{value:t,label:n}})).filter(s.identity);var g=n.quality=-2===h?n.qualities[0].value||-1:h;g!==p.currentLevel&&(p.currentLevel=g),p.attachMedia(r),c&&n.src!==c&&r.play(),c=n.src}),p.on(f.Events.ERROR,function(t,n){if(n.fatal)if(d.recoverNetworkError&&n.type===f.ErrorTypes.NETWORK_ERROR)m(!0);else if(d.recoverMediaError&&n.type===f.ErrorTypes.MEDIA_ERROR)m(!1);else{var r=5;n.type===f.ErrorTypes.NETWORK_ERROR&&(r=2),n.type===f.ErrorTypes.MEDIA_ERROR&&(r=3),p.destroy(),e.trigger("error",[e,{code:r}])}}),e.one("unload",function(){p.destroy()}),{handlers:{error:function(e,t){var n=t.error&&t.error.code;return d.recoverMediaError&&3===n||!n?(e.preventDefault(),m(!1),!0):d.recoverNetworkError&&2===n?(e.preventDefault(),m(!0),!0):void 0}}}}var a,c,f=window.Hls;return u("hlsjs-lite",e,t,r,n)},i.canPlay=function(e,t){return t.hlsjs===!1||t.clip&&t.clip.hlsjs===!1?!1:a.browser.safari&&!(t.clip&&t.clip.hlsjs||t.hlsjs||{}).safari?!1:o.support.video&&r(e)},i.engineName="hlsjs-lite",i.plugin=function(e){i.extensions.push(e)},i.extensions=[],o.engines.push(i)},{"../flowplayer":31,"./html5-factory":5}],5:[function(e,t,n){function r(e,t,n,r,a){function f(e,o,a,f){var p=n.getAttribute("data-flowplayer-instance-id");if(e.listeners&&e.listeners.hasOwnProperty(p))return void(e.listeners[p]=a);(e.listeners||(e.listeners={}))[p]=a,u.on(o,"error",function(n){try{r(n.target.getAttribute("type"))&&t.trigger("error",[t,{code:4,video:c(a,{src:e.src,url:e.src})}])}catch(i){}}),t.on("shutdown",function(){u.off(o),u.off(e,".dvrhack"),t.off(".loophack")});var h={},g=function(e){"metadata"===e.kind&&(e.mode="hidden",e.addEventListener("cuechange",function(){e.activeCues.length&&t.trigger("metadata",[t,e.activeCues[0].value])},!1))};return e&&e.textTracks&&e.textTracks.length&&Array.prototype.forEach.call(e.textTracks,g),e&&e.textTracks&&"function"==typeof e.textTracks.addEventListener&&e.textTracks.addEventListener("addtrack",function(e){g(e.track)},!1),(t.conf.dvr||t.dvr||a.dvr)&&u.on(e,"progress.dvrhack",function(){e.seekable.length&&(t.video.duration=e.seekable.end(null),t.video.seekOffset=e.seekable.start(null),t.trigger("dvrwindow",[t,{start:e.seekable.start(null),end:e.seekable.end(null)}]),e.currentTime>=e.seekable.start(null)||(e.currentTime=e.seekable.start(null)))}),Object.keys(d).forEach(function(r){var o=d[r];if("webkitendfullscreen"===r&&t.conf.disableInline&&(o="unload"),o){var u=function(u){if(a=e.listeners[p],u.target&&s.hasClass(u.target,"fp-engine")){/progress/.test(o)||t.debug(r,"->",o,u);var d=function(e){t.trigger(e||o,[t,h])};if(!t.ready&&!/ready|error/.test(o)||!o||!s.find("video",n).length)return void("resume"===o&&t.one("ready",function(){setTimeout(function(){d()})}));var h;if("unload"===o)return void t.unload();switch(o){case"ready":if(t.ready)return t.debug("Player already ready, not sending duplicate ready event");if(!(e.duration&&e.duration!==1/0||t.live))return t.debug("No duration and VOD setup, not sending ready event");if(h=c(a,{duration:e.duration<Number.MAX_VALUE?e.duration:0,width:e.videoWidth,height:e.videoHeight,url:e.currentSrc}),h.seekable=h.duration,t.debug("Ready: ",h),!t.live&&!h.duration&&!l.hlsDuration&&"loadeddata"===r){var g=function(){h.duration=e.duration;try{h.seekable=e.seekable&&e.seekable.end(null)}catch(t){}d(),e.removeEventListener("durationchange",g),s.toggleClass(n,"is-live",!1)};e.addEventListener("durationchange",g);var m=function(){t.ready||e.duration||(h.duration=0,s.addClass(n,"is-live"),d()),e.removeEventListener("timeupdate",m)};return void e.addEventListener("timeupdate",m)}break;case"progress":case"seek":if(e.currentTime>0||t.live)h=Math.max(e.currentTime,0);else if("seek"===o&&0===e.currentTime)h=0;else if("progress"==o)return;break;case"buffer":h=[];for(var v=0;v<e.buffered.length;v++)h.push({start:e.buffered.start(v),end:e.buffered.end(v)});e.buffered.length&&e.buffered.end(null)===e.duration&&d("buffered");break;case"speed":h=i(e.playbackRate);break;case"volume":h=i(e.muted?0:e.volume);break;case"error":try{if(f&&f.handlers&&f.handlers.error){var y=f.handlers.error(u,e);if(y)return}h=(u.srcElement||u.originalTarget).error,h.video=c(a,{src:e.src,url:e.src})}catch(w){return}}d()}};n.addEventListener(r,u,!0),h[r]||(h[r]=[]),h[r].push(u)}}),h}var p,h,g,m=s.findDirect("video",n)[0]||s.find(".fp-player > video",n)[0],v=t.conf;return g={engineName:e,pick:function(e){var t=l.video&&e.filter(function(e){return r(e.type)})[0];if(t)return"string"==typeof t.src&&(t.src=s.createAbsoluteUrl(t.src)),t},load:function(e){var r=s.find(".fp-player",n)[0],i=!1;if(m||(m=document.createElement("video"),s.prepend(r,m),m.autoplay=!!v.splash,i=!0),s.addClass(m,"fp-engine"),s.find("track",m).forEach(s.removeNode),m.preload="none",v.nativesubtitles||s.attr(m,"crossorigin",!1),v.disableInline||(m.setAttribute("webkit-playsinline","true"),m.setAttribute("playsinline","true")),l.inlineVideo||s.css(m,{position:"absolute",top:"-9999em"}),l.subtitles&&v.nativesubtitles&&e.subtitles&&e.subtitles.length){s.addClass(m,"native-subtitles");var c=e.subtitles,d=function(e){var t=m.textTracks;t.length&&(t[0].mode=e)};c.some(function(e){return!s.isSameDomain(e.src)})&&s.attr(m,"crossorigin","anonymous"),"function"==typeof m.textTracks.addEventListener&&m.textTracks.addEventListener("addtrack",function(){d("disabled"),d("showing")}),c.forEach(function(e){m.appendChild(s.createElement("track",{kind:"subtitles",srclang:e.srclang||"en",label:e.label||"en",src:e.src,default:e["default"]}))})}u.off(m,"timeupdate",s.noop),u.on(m,"timeupdate",s.noop),s.prop(m,"loop",!1),t.off(".loophack"),(e.loop||v.loop)&&t.on("finish.loophack",function(){t.resume()}),"undefined"!=typeof h&&(m.volume=h);var p=a(e,m,g);if(v.autoplay||v.splash||e.autoplay){t.debug("Autoplay / Splash setup, try to start video"),m.load();var y=function(){try{var e=m.play();if(e&&e["catch"]){var n=function(e){if("AbortError"===e.name&&20===e.code)return i?void 0:m.play()["catch"](n);if(!v.mutedAutoplay)throw new Error("Unable to autoplay");return t.debug("Play errored, trying muted",e),t.mute(!0,!0),m.play()};e["catch"](n)["catch"](function(){v.autoplay=!1,t.mute(!1,!0),t.trigger("stop",[t])})}}catch(r){t.debug("play() error thrown",r)}};m.readyState>0?y():u.one(m,"canplay",y)}if(g._listeners=f(m,s.find("source",m).concat(m),e,p)||g._listeners,!(v.autoplay||v.splash||e.autoplay)){var w=function(){o(n)&&(t.debug("player is in viewport, preload"),l.preloadMetadata?m.preload="metadata":m.load(),u.off(document,"scroll.preloadviewport"))};u.off(document,"scroll.preloadviewport"),u.on(document,"scroll.preloadviewport",function(){window.requestAnimationFrame(w)}),w()}},mute:function(e){m.muted=!!e,t.trigger("mute",[t,e]),t.trigger("volume",[t,e?0:m.volume])},pause:function(){m.pause()},resume:function(){m.play()},speed:function(e){m.playbackRate=e},seek:function(e){var n=m.paused||t.finished;try{m.currentTime=e,n&&u.one(m,"seeked",function(){m.pause()})}catch(r){}},volume:function(e){h=e,m&&(m.volume=e,e&&g.mute(!1))},unload:function(){u.off(document,"scroll.preloadviewport"),s.find("video.fp-engine",n).forEach(function(e){"MediaSource"in window?e.src=URL.createObjectURL(new MediaSource):e.src="",s.removeNode(e)}),p=clearInterval(p);var e=n.getAttribute("data-flowplayer-instance-id");delete m.listeners[e],m=0,g._listeners&&Object.keys(g._listeners).forEach(function(e){g._listeners[e].forEach(function(t){n.removeEventListener(e,t,!0)})})}}}function i(e,t){return t=t||100,Math.round(e*t)/t}function o(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)+t.height&&t.right<=(window.innerWidth||document.documentElement.clientWidth)+t.width}var a=e("../flowplayer"),s=a.common,l=a.support,u=a.bean,c=a.extend,f=l.browser.safari&&!l.iOS,d={ended:"finish",pause:"pause",play:"resume",timeupdate:"progress",volumechange:"volume",ratechange:"speed",seeked:"seek",loadedmetadata:f?0:"ready",canplaythrough:f?"ready":0,durationchange:"ready",error:"error",dataunavailable:"error",webkitendfullscreen:!a.support.inlineVideo&&"unload",progress:"buffer"};t.exports=r},{"../flowplayer":31}],6:[function(e,t,n){"use strict";function r(e){return/mpegurl/i.test(e)?"application/x-mpegurl":e}function i(e){return/^(video|application)/i.test(e)||(e=r(e)),!!u.canPlayType(e).replace("no","")}var o,a=e("../flowplayer"),s=a.common,l=e("./html5-factory"),u=document.createElement("video");o=function(e,t){return l("html5",e,t,i,function(e,t){t.currentSrc!==e.src?(s.find("source",t).forEach(s.removeNode),t.src=e.src,t.type=e.type):e.autoplay&&t.load()})},o.canPlay=function(e){return a.support.video&&i(e)},o.engineName="html5",a.engines.push(o)},{"../flowplayer":31,"./html5-factory":5}],7:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){e.on("ready",function(){var e=i.find("video.fp-engine",t)[0];e&&(e.setAttribute("x-webkit-airplay","allow"),window.WebKitPlaybackTargetAvailabilityEvent&&(e.addEventListener("webkitplaybacktargetavailabilitychanged",function(e){if("available"===e.availability){var n=i.find(".fp-header",t)[0];i.find(".fp-airplay",n).forEach(i.removeNode);var r=i.createElement("a",{class:"fp-airplay fp-icon",title:"Play on AirPlay device"});n.appendChild(r)}}),e.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",function(){var n=i.find(".fp-airplay",t)[0];n&&i.toggleClass(n,"fp-active",e.webkitCurrentPlaybackTargetIsWireless)})))}),o.on(t,"click",".fp-airplay",function(e){e.preventDefault();var n=i.find("video.fp-engine",t)[0];n.webkitShowPlaybackTargetPicker()})})},{"../common":1,"../flowplayer":31,bean:34}],8:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("./resolve").TYPE_RE,o=e("scriptjs"),a=e("bean");r(function(e,t){var n,r=e.conf.analytics,s=0,l=0;if(r){"undefined"==typeof _gat&&o("//google-analytics.com/ga.js");var u=function(){var e=_gat._getTracker(r);return e._setAllowLinker(!0),e},c=function(r,o,a){if(a=a||e.video,s&&"undefined"!=typeof _gat){var l=u();l._trackEvent("Video / Seconds played",e.engine.engineName+"/"+a.type,a.title||t.getAttribute("title")||a.src.split("/").slice(-1)[0].replace(i,""),Math.round(s/1e3)),s=0,n&&(clearTimeout(n),n=null)}};e.bind("load unload",c).bind("progress",function(){e.seeking||(s+=l?+new Date-l:0,l=+new Date),n||(n=setTimeout(function(){n=null;var e=u();e._trackEvent("Flowplayer heartbeat","Heartbeat","",0,!0)},6e5))}).bind("pause",function(){l=0}),e.bind("shutdown",function(){a.off(window,"unload",c)}),a.on(window,"unload",c)}})},{"../flowplayer":31,"./resolve":21,bean:34,scriptjs:45}],9:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("bean"),a=e("scriptjs");r(function(e,t){function n(){var e,t,n;e=g.applicationId||chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,t=new chrome.cast.SessionRequest(e),n=new chrome.cast.ApiConfig(t,r,s),chrome.cast.initialize(n,l,u)}function r(){console.log("sessionListener")}function s(e){e===chrome.cast.ReceiverAvailability.AVAILABLE&&c()}function l(){}function u(){console.log("onError")}function c(){var e=i.find(".fp-header",t)[0];if(e){i.find(".fp-chromecast",e).forEach(i.removeNode),i.find(".fp-chromecast-engine",t).forEach(i.removeNode),h=i.createElement("a",{class:"fp-chromecast fp-icon",title:"Play on Cast device"}),e.insertBefore(h,i.find(".fp-fullscreen",e)[0]);var n=i.createElement("div",{class:"fp-chromecast-engine"}),r=i.createElement("p",{class:"fp-chromecast-engine-status"}),o=i.createElement("p",{class:"fp-chromecast-engine-icon"});n.appendChild(o),n.appendChild(r);var a=i.find(".fp-engine",t)[0];a?a.parentNode.insertBefore(n,a):i.prepend(i.find(".fp-player",t)[0]||t,n)}}function f(){clearInterval(p),p=null,e.release(),i.toggleClass(t,"is-chromecast",!1),i.toggleClass(h,"fp-active",!1)}if(e.conf.chromecast!==!1){a("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"),window.__onGCastApiAvailable=function(e){e&&n()};var d,p,h,g=e.conf.chromecast||{};o.on(t,"click",".fp-chromecast",function(n){return n.preventDefault(),d?(e.trigger("pause",[e]),d.stop(),d=null,void f()):(e.playing&&e.pause(),void chrome.cast.requestSession(function(n){function r(n){n.addUpdateListener(function(r){if(d){p=p||setInterval(function(){e.trigger("progress",[e,n.getEstimatedTime()])},500),r?(i.toggleClass(t,"is-chromecast",!0),i.toggleClass(h,"fp-active",!0),e.hijack({pause:function(){n.pause()},resume:function(){n.play()},seek:function(e){var t=new chrome.cast.media.SeekRequest;t.currentTime=e,n.seek(t)}})):(f(),e.trigger("finish",[e]));var o=n.playerState;e.paused&&o===chrome.cast.media.PlayerState.PLAYING&&e.trigger("resume",[e]),e.playing&&o===chrome.cast.media.PlayerState.PAUSED&&e.trigger("pause",[e]),i.toggleClass(t,"is-loading",o===chrome.cast.media.PlayerState.BUFFERING)}})}d=n;var o=d.receiver.friendlyName;i.html(i.find(".fp-chromecast-engine-status")[0],"Playing on device "+o);var a=new chrome.cast.media.MediaInfo(e.video.src),s=new chrome.cast.media.LoadRequest(a);d.loadMedia(s,r,function(){})},function(e){console.error("requestSession error",e)}))})}})},{"../common":1,"../flowplayer":31,bean:34,scriptjs:45}],10:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){function n(e){t.className=t.className.replace(a," "),e>=0&&i.addClass(t,"cue"+e)}function r(t){var n=t&&!isNaN(t.time)?t.time:t;return 0>n&&(n=e.video.duration+n),.125*Math.round(n/.125)}var a=/ ?cue\d+ ?/,s=!1,l={},u=-.125,c=function(t){n(t.index),e.trigger("cuepoint",[e,t])};e.on("progress",function(e,t,n){if(!s)for(var i=r(n);i>u;)u+=.125,l[u]&&l[u].forEach(c)}).on("unload",n).on("beforeseek",function(e){setTimeout(function(){e.defaultPrevented||(s=!0)})}).on("seek",function(e,t,i){n(),u=r(i||0)-.125,s=!1,!i&&l[0]&&l[0].forEach(c)}).on("ready",function(t,n,r){u=-.125;var i=r.cuepoints||e.conf.cuepoints||[];e.setCuepoints(i)}).on("finish",function(){for(var t=r(e.video.duration);t>u;)u+=.125,l[u]&&l[u].forEach(c);u=-.125}),e.conf.generate_cuepoints&&e.bind("load",function(){i.find(".fp-cuepoint",t).forEach(i.removeNode)}),e.setCuepoints=function(t){return e.cuepoints=[],l={},t.forEach(e.addCuepoint),e},e.addCuepoint=function(n){e.cuepoints||(e.cuepoints=[]),"number"==typeof n&&(n={time:n}),n.index=0;var a=r(n);if(l[a]||(l[a]=[]),l[a].push(n),e.cuepoints.length&&(n.index=Math.max.apply(null,e.cuepoints.map(function(e){return e.index}))+1),e.cuepoints.push(n),e.conf.generate_cuepoints&&n.visible!==!1){var s=e.video.duration,u=i.find(".fp-timeline",t)[0];i.css(u,"overflow","visible");var c=n.time||n;0>c&&(c=s+c);var f=i.createElement("a",{className:"fp-cuepoint fp-cuepoint"+n.index});i.css(f,"left",c/s*100+"%"),u.appendChild(f),o.on(f,"mousedown",function(t){t.preventDefault(),t.stopPropagation(),e.seek(c)})}return e},e.removeCuepoint=function(n){"number"==typeof n&&(n=e.cuepoints.filter(function(e){return e.index===n})[0]);var o=e.cuepoints.indexOf(n),a=r(n);if(-1!==o){e.cuepoints=e.cuepoints.slice(0,o).concat(e.cuepoints.slice(o+1));var s=i.find(".fp-timeline",t)[0];i.find(".fp-cuepoint"+n.index,s).forEach(i.removeNode);var u=l[a].indexOf(n);if(-1!==u)return l[a]=l[a].slice(0,u).concat(l[a].slice(u+1)),e}}})},{"../common":1,"../flowplayer":31,bean:34}],11:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("bean"),o=e("../common"),a=e("./util/clipboard");r(function(e,t){if(e.conf.embed!==!1&&e.conf.share!==!1){var n=o.find(".fp-share-menu",t)[0],r=o.createElement("a",{class:"fp-icon fp-embed",title:"Copy to your site"},"Embed");o.append(n,r),e.embedCode=function(){var n=e.conf.embed||{},r=e.video,i=n.width||r.width||o.width(t),a=n.height||r.height||o.height(t),s=e.conf.ratio,l='<iframe src="'+e.shareUrl(!0)+'" allowfullscreen style="border:none;';return n.width||n.height?(isNaN(i)||(i+="px"),isNaN(a)||(a+="px"),l+"width:"+i+";height:"+a+';"></iframe>'):((!s||e.conf.adaptiveRatio)&&(s=a/i),'<div style="position:relative;width:100%;display:inline-block;">'+l+'position:absolute;top:0;left:0;width:100%;height:100%;"></iframe><div style="padding-top:'+100*s+'%;"></div></div>')},i.on(t,"click",".fp-embed",function(){a(e.embedCode(),function(){e.message("The embed code is now on your clipboard",2e3)},function(){e.textarea(e.embedCode(),"Copy the code below to embed your video")})})}})},{"../common":1,"../flowplayer":31,"./util/clipboard":30,bean:34}],12:[function(e,t,n){"use strict";t.exports=function(e,t){t||(t=document.createElement("div"));var n={},r={},i=function(e,i,o){var a=e.split(".")[0],s=function(l){o&&(t.removeEventListener(a,s),n[e].splice(n[e].indexOf(s),1));var u=[l].concat(r[l.timeStamp+l.type]||[]);i&&i.apply(void 0,u)};t.addEventListener(a,s),n[e]||(n[e]=[]),n[e].push(s)};e.on=e.bind=function(t,n){var r=t.split(" ");return r.forEach(function(e){i(e,n)}),e},e.one=function(t,n){var r=t.split(" ");return r.forEach(function(e){i(e,n,!0)}),e};var o=function(e,t){return 0===t.filter(function(t){return-1===e.indexOf(t)}).length};e.off=e.unbind=function(r){var i=r.split(" ");return i.forEach(function(e){var r=e.split(".").slice(1),i=e.split(".")[0];Object.keys(n).filter(function(e){var t=e.split(".").slice(1);return(!i||0===e.indexOf(i))&&o(t,r)}).forEach(function(e){var r=n[e],i=e.split(".")[0];n[e]=r.filter(function(e){return t.removeEventListener(i,e),!1})})}),e},e.trigger=function(n,i,o){if(n){i=(i||[]).length?i||[]:[i];var a,s=document.createEvent("Event");return a=n.type||n,s.initEvent(a,!1,!0),Object.defineProperty&&(s.preventDefault=function(){Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})}),r[s.timeStamp+s.type]=i,t.dispatchEvent(s),o?s:e}}},t.exports.EVENTS=["beforeseek","disable","error","finish","fullscreen","fullscreen-exit","load","mute","pause","progress","ready","resume","seek","speed","stop","unload","volume","boot","shutdown"]},{}],13:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){var n=e.conf;if(n.share!==!1&&n.facebook){e.facebook=function(){var e,t,r=550,i=420,o=screen.height,a=screen.width,s="scrollbars=yes,resizable=yes,toolbar=no,location=yes",l="string"==typeof n.facebook?n.facebook:window.location.toString();e=Math.round(a/2-r/2),t=0,o>i&&(t=Math.round(o/2-i/2)),window.open("https://www.facebook.com/sharer.php?s=100&p[url]="+encodeURIComponent(l),"sharer",s+",width="+r+",height="+i+",left="+e+",top="+t)};var r=i.find(".fp-share-menu",t)[0],a=i.createElement("a",{class:"fp-icon fp-facebook"},"Facebook");i.append(r,a),o.on(t,"click",".fp-facebook",function(){e.facebook()})}})},{"../common":1,"../flowplayer":31,bean:34}],14:[function(e,t,n){"use strict";var r,i=e("../flowplayer"),o=e("bean"),a=e("../common"),s="fullscreen",l="fullscreen-exit",u=i.support.fullscreen;o.on(document,"fullscreenchange.ffscr webkitfullscreenchange.ffscr mozfullscreenchange.ffscr MSFullscreenChange.ffscr",function(e){var t=document.webkitCurrentFullScreenElement||document.mozFullScreenElement||document.fullscreenElement||document.msFullscreenElement;if(r||t.parentNode&&t.parentNode.getAttribute("data-flowplayer-instance-id")){var n=r||i(t.parentNode);t?r=n.trigger(s,[n]):(r.trigger(l,[r]),r=null)}}),i(function(e,t){var n=a.createElement("div",{className:"fp-player"});if(Array.prototype.map.call(t.children,a.identity).forEach(function(e){a.matches(e,".fp-ratio,script")||n.appendChild(e)}),t.appendChild(n),e.conf.fullscreen){var i,o,c=window;e.isFullscreen=!1,e.fullscreen=function(t){return e.disabled?void 0:(void 0===t&&(t=!e.isFullscreen),t&&(i=c.scrollY,o=c.scrollX),u?t?["requestFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].forEach(function(e){"function"==typeof n[e]&&(n[e](Element.ALLOW_KEYBOARD_INPUT),"webkitRequestFullScreen"!==e||document.webkitFullscreenElement||n[e]())}):["exitFullscreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].forEach(function(e){"function"==typeof document[e]&&document[e]()}):e.trigger(t?s:l,[e]),e)};var f;e.on("mousedown.fs",function(){+new Date-f<150&&e.ready&&e.fullscreen(),f=+new Date}),e.on(s,function(){a.addClass(t,"is-fullscreen"),a.toggleClass(t,"fp-minimal-fullscreen",a.hasClass(t,"fp-minimal")),a.removeClass(t,"fp-minimal"),u||a.css(t,"position","fixed"),e.isFullscreen=!0}).on(l,function(){var n;a.toggleClass(t,"fp-minimal",a.hasClass(t,"fp-minimal-fullscreen")),a.removeClass(t,"fp-minimal-fullscreen"),u||"html5"!==e.engine||(n=t.css("opacity")||"",a.css(t,"opacity",0)),u||a.css(t,"position",""),a.removeClass(t,"is-fullscreen"),u||"html5"!==e.engine||setTimeout(function(){t.css("opacity",n)}),e.isFullscreen=!1,c.scrollTo(o,i)}).on("unload",function(){e.isFullscreen&&e.fullscreen()}),e.on("shutdown",function(){r=null,a.removeNode(n)})}})},{"../common":1,"../flowplayer":31,bean:34}],15:[function(e,t,n){"use strict";var r,i,o=e("../flowplayer"),a=e("bean"),s=e("../common");a.on(document,"keydown.fp",function(e){var t=r,n=e.ctrlKey||e.metaKey||e.altKey,i=e.which,o=t&&t.conf;if(t&&o.keyboard&&!t.disabled&&!n&&t.ready){if(e.shiftKey)return 39==i?t.speed(!0):37==i&&t.speed(!1),e.preventDefault();if(58>i&&i>47)return e.preventDefault(),t.seekTo(i-48);var a=function(){switch(i){case 38:case 75:return t.volume(t.volumeLevel+.15),!0;case 40:case 74:return t.volume(t.volumeLevel-.15),!0;case 39:case 76:return t.seeking=!0,t.seek(!0),!0;case 37:case 72:return t.seeking=!0,t.seek(!1),!0;case 190:return t.seekTo(),!0;case 32:return t.toggle(),!0;case 70:return o.fullscreen&&t.fullscreen(),!0;case 77:return t.mute(),!0;case 81:return t.unload(),!0}}();a&&e.preventDefault()}}),o(function(e,t){e.conf.keyboard&&(a.on(document,"click",function(n){if(s.hasParent(n.target,t))r=e.disabled?0:e;else{if(r!==e)return;r=0}r&&(i=t)}),e.bind("shutdown",function(){i==t&&(i=null)}))})},{"../common":1,"../flowplayer":31,bean:34}],16:[function(e,t,n){var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){e.showMenu=function(n,r){var a=i.find(".fp-ui",t)[0];i.toggleClass(n,"fp-active",!0),setTimeout(function(){o.one(document,"click",function(){e.hideMenu(n)})});var s=r;if(r&&r.tagName&&(s={left:i.offset(r).left,rightFallbackOffset:i.width(r),top:i.offset(r).top+i.height(r)}),!s)return i.css(n,"top","auto");s.rightFallbackOffset=s.rightFallbackOffset||0;var l=s.top-i.offset(a).top,u=s.left-i.offset(a).left;i.width(n)+u>i.width(a)&&(u=u-i.width(n)+s.rightFallbackOffset),i.height(n)+l>i.height(a)&&(l-=i.height(n)),i.css(n,{top:l+"px",left:u+"px",right:"auto"})},e.hideMenu=function(e){i.toggleClass(e,"fp-active",!1),i.css(e,{top:"-9999em"})}})},{"../common":1,"../flowplayer":31,bean:34}],17:[function(e,t,n){var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){function n(e){var t=i.createElement("div",{className:"fp-message"},e);return s.insertBefore(t,a),setTimeout(function(){i.toggleClass(t,"fp-shown")}),t}function r(e){i.removeNode(e)}var a=i.find(".fp-header",t)[0],s=i.find(".fp-ui",t)[0];e.message=function(e,t){var o=n(e),a=function(){i.toggleClass(o,"fp-shown"),setTimeout(function(){r(o)},500)};return t&&setTimeout(a,t),a},e.textarea=function(e){var t=document.createElement("textarea");t.value=e,t.className="fp-textarea",s.appendChild(t),o.on(document,"click.fptextarea",function(e){return e.target===t?t.select():(e.stopPropagation(),e.preventDefault(),i.removeNode(t),void o.off(document,"click.fptextarea"))})}})},{"../common":1,"../flowplayer":31,bean:34}],18:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=/IEMobile/.test(window.navigator.userAgent),o=e("../common"),a=e("bean"),s=e("./ui").format,l=r.support,u=window.navigator.userAgent;(l.touch||i)&&r(function(e,t){var n=l.android,r=n&&!n.firefox,c=/Silk/.test(u),f=n.version||0;if(r&&!i){if(!/Chrome/.test(u)&&4>f||n.samsung&&5>f){var d=e.load;e.load=function(){var n=d.apply(e,arguments);return o.find("video.fp-engine",t)[0].load(),e.trigger("ready",[e,e.video]),n}}var p,h=0,g=function(e){p=setInterval(function(){e.video.time=++h,e.trigger("progress",[e,h])},1e3)};e.on("ready pause unload",function(){p&&(clearInterval(p),p=null)}),e.on("ready",function(){h=0}),e.on("resume",function(t,n){return n.live?h?g(n):void e.one("progress",function(e,t,n){0===n&&g(t)}):void 0})}l.volume||(o.removeClass(t,"fp-mute"),o.addClass(t,"no-volume")),l.iOS&&o.addClass(t,"fp-mute"),o.addClass(t,"is-touch"),e.sliders&&e.sliders.timeline&&e.sliders.timeline.disableAnimation();var m=!1;a.on(t,"touchmove",function(){m=!0});var v=!0;if(a.on(t,"touchend click",function(n){if(m)return void(m=!1);var r=o.find("video.fp-engine",t)[0];return v&&e.conf.clickToUnMute&&r&&r.muted&&e.conf.autoplay&&(r.muted=!1),v=!1,e.playing&&!o.hasClass(t,"is-mouseover")?(o.addClass(t,"is-mouseover"),o.removeClass(t,"is-mouseout"),n.preventDefault(),void n.stopPropagation()):void(e.playing||e.splash||!o.hasClass(t,"is-mouseout")||o.hasClass(t,"is-mouseover")||setTimeout(function(){e.disabled||e.playing||e.splash||o.find("video.fp-engine",t)[0].play()},400))}),!l.fullscreen&&e.conf.native_fullscreen&&"function"==typeof o.createElement("video").webkitEnterFullScreen){var y=e.fullscreen;e.fullscreen=function(){var n=o.find("video.fp-engine",t)[0];return n?(e.trigger("fullscreen",[e]),a.on(document,"webkitfullscreenchange.nativefullscreen",function(){document.webkitFullscreenElement===n&&(a.off(document,".nativefullscreen"),a.on(document,"webkitfullscreenchange.nativefullscreen",function(){document.webkitFullscreenElement||(a.off(document,".nativefullscreen"),e.trigger("fullscreen-exit",[e]))}))}),n.webkitEnterFullScreen(),void a.one(n,"webkitendfullscreen",function(){a.off(document,"fullscreenchange.nativefullscreen"),e.trigger("fullscreen-exit",[e]),o.prop(n,"controls",!0),o.prop(n,"controls",!1)})):y.apply(e)}}(r||c)&&e.bind("ready",function(){var n=o.find("video.fp-engine",t)[0];e.conf.splash&&n&&n.paused&&"hlsjs-lite"!==e.engine.engineName&&(a.one(n,"canplay",function(){n.play()}),n.load()),e.bind("progress.dur",function(){if(!e.live&&!e.conf.live&&n){var r=n.duration;1!==r&&(e.video.duration=r,o.find(".fp-duration",t)[0].innerHTML=s(r),e.unbind("progress.dur"))}})})})},{"../common":1,"../flowplayer":31,"./ui":27,bean:34}],19:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("extend-object"),o=e("bean"),a=e("../common"),s=e("./resolve"),l=new s,u=window.jQuery,c=/^#/;r(function(e,t){function n(){return a.find(h.query,r())}function r(){return c.test(h.query)?void 0:t}function f(){return a.find(h.query+"."+g,r())}function d(){var n=a.find(".fp-playlist",t)[0];if(!n){n=a.createElement("div",{className:"fp-playlist"});var r=a.find(".fp-next,.fp-prev",t);r.length?r[0].parentElement.insertBefore(n,r[0]):a.insertAfter(t,a.find("video",t)[0],n)}n.innerHTML="",e.conf.playlist[0].length&&(e.conf.playlist=e.conf.playlist.map(function(e){if("string"==typeof e){var t=e.split(s.TYPE_RE)[1];return{sources:[{type:"m3u8"===t.toLowerCase()?"application/x-mpegurl":"video/"+t,src:e}]}}return{sources:e.map(function(e){var t={};return Object.keys(e).forEach(function(n){t.type=/mpegurl/i.test(n)?"application/x-mpegurl":"video/"+n,t.src=e[n]}),t})}})),e.conf.playlist.forEach(function(t,r){var i=t.sources[0].src;n.appendChild(a.createElement("a",{href:i,className:e.video.index===r?g:void 0,"data-index":r}))})}function p(t){return"undefined"!=typeof t.index?t.index:"undefined"!=typeof e.video.index?e.video.index:e.conf.startIndex||0}var h=i({active:"is-active",advance:!0,query:".fp-playlist a"},e.conf),g=h.active,m=a.find(".fp-ui",t)[0],v=a.hasClass(t,"fp-custom-playlist")||!!h.customPlaylist;a.toggleClass(t,"fp-custom-playlist",v),a.toggleClass(t,"fp-default-playlist",!v),e.play=function(t){if(void 0===t)return e.resume();if("number"==typeof t&&!e.conf.playlist[t])return e;if("number"!=typeof t)return e.load.apply(null,arguments);var n=i({index:t},e.conf.playlist[t]);return e.off("beforeresume.fromfirst"),"number"==typeof t&&t===e.video.index?e.seek(0,function(){e.resume()}):(e.load(n,function(){e.video.index=t}),e)},e.next=function(t){t&&t.preventDefault();var n=e.video.index;return-1!=n&&(n=n===e.conf.playlist.length-1?0:n+1,e.play(n)),e},e.prev=function(t){t&&t.preventDefault();var n=e.video.index;return-1!=n&&(n=0===n?e.conf.playlist.length-1:n-1,e.play(n)),e},e.setPlaylist=function(t,n){return e.conf.playlist=t,n||delete e.video.index,d(),e},e.addPlaylistItem=function(t){return delete e.video.is_last,e.setPlaylist(e.conf.playlist.concat([t]),!0)},e.removePlaylistItem=function(t){var n=e.conf.playlist;return e.setPlaylist(n.slice(0,t).concat(n.slice(t+1)))},o.on(t,"click",".fp-next",e.next),o.on(t,"click",".fp-prev",e.prev),e.off("finish.pl").on("finish.pl",function(e,n){var r="undefined"==typeof n.conf.advance?!0:n.conf.advance;if(r){if(n.video.loop)return n.seek(0,function(){n.resume()});var i=n.video.index>=0?n.video.index+1:void 0;i<n.conf.playlist.length||h.loop?(i=i===n.conf.playlist.length?0:i,a.removeClass(t,"is-finished"),setTimeout(function(){n.play(i)})):n.conf.playlist.length>1&&(n.one("beforeresume.fromfirst",function(e){e.preventDefault(),n.play(0)}),n.one("seek",function(){n.off("beforeresume.fromfirst")}))}});var y=!1;e.conf.playlist.length&&(y=!0,d(),e.conf.clip&&e.conf.clip.sources.length||(e.conf.clip=e.conf.playlist[e.conf.startIndex||0])),n().length&&!y&&(e.conf.playlist=[],delete e.conf.startIndex,n().forEach(function(t){var n=t.href;t.setAttribute("data-index",e.conf.playlist.length);var r=l.resolve(n,e.conf.clip.sources);u&&i(r,u(t).data()),e.conf.playlist.push(r)})),a.find(".fp-prev,.fp-next,.fp-playlist",t).forEach(function(e){m.appendChild(e)}),o.on(c.test(h.query)?document:t,"click",h.query,function(t){t.preventDefault();var n=t.currentTarget,r=Number(n.getAttribute("data-index"));-1!=r&&e.play(r)}),e.on("load",function(n,i,o){if(e.conf.playlist.length){var s=f()[0],l=s&&s.getAttribute("data-index"),u=o.index=p(o),c=a.find(h.query+'[data-index="'+u+'"]',r())[0],d=u==e.conf.playlist.length-1;s&&a.removeClass(s,g),c&&a.addClass(c,g),a.removeClass(t,"video"+l),a.addClass(t,"video"+u),a.toggleClass(t,"last-video",d),o.index=i.video.index=u,o.is_last=i.video.is_last=d}}).on("unload.pl",function(){e.conf.playlist.length&&(f().forEach(function(e){a.toggleClass(e,g)}),e.conf.playlist.forEach(function(e,n){a.removeClass(t,"video"+n)}),delete e.video.index)}),e.conf.playlist.length&&(e.conf.loop=!1)})},{"../common":1,"../flowplayer":31,"./resolve":21,bean:34,"extend-object":39}],20:[function(e,t,n){var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){function n(){i.find(".fp-qsel-menu",t).forEach(i.removeNode),i.find(".fp-qsel",t).forEach(i.removeNode)}function r(e){l.appendChild(i.createElement("strong",{className:"fp-qsel"},"HD"));var t=i.createElement("div",{className:"fp-menu fp-qsel-menu"},"<strong>Quality</strong>");e.forEach(function(e){var n=document.createElement("a"),r="undefined"!=typeof e.value?e.value:e;n.setAttribute("data-quality",r),n.innerHTML=e.label||e,t.appendChild(n)}),s.appendChild(t)}function a(e){i.find(".fp-qsel-menu a",t).forEach(function(t){i.toggleClass(t,"fp-selected",t.getAttribute("data-quality")==e),i.toggleClass(t,"fp-color",t.getAttribute("data-quality")==e)})}var s=i.find(".fp-ui",t)[0],l=i.find(".fp-controls",s)[0];o.on(t,"click",".fp-qsel",function(){var n=i.find(".fp-qsel-menu",t)[0];i.hasClass(n,"fp-active")?e.hideMenu():e.showMenu(n)}),o.on(t,"click",".fp-qsel-menu a",function(t){var n=t.target.getAttribute("data-quality");e.quality(n)}),e.quality=function(t){t=isNaN(Number(t))?t:Number(t),e.trigger("quality",[e,t])},e.on("quality",function(e,t,n){a(n,t.video.qualities)}),e.on("ready",function(e,t,i){n(),!i.qualities||i.qualities.filter(function(e){return"undefined"!=typeof e.value?e.value>-1:!0}).length<2||(r(i.qualities,i.quality),a(i.quality,i.qualities))})})},{"../common":1,"../flowplayer":31,bean:34}],21:[function(e,t,n){"use strict";function r(e){var t=e.attr("src"),n=e.attr("type")||"",r=t.split(o)[1];return n=n.toLowerCase(),a(e.data(),{src:t,suffix:r||n,type:n||r})}function i(e){return/mpegurl/i.test(e)?"application/x-mpegurl":"video/"+e}var o=/\.(\w{3,4})(\?.*)?$/i,a=e("extend-object");t.exports=function(){var e=this;e.sourcesFromVideoTag=function(e,t){var n=[];return t("source",e).each(function(){n.push(r(t(this)))}),!n.length&&e.length&&n.push(r(e)),n},e.resolve=function(e,t){return e?("string"==typeof e&&(e={src:e,sources:[]},e.sources=(t||[]).map(function(t){var n=t.src.split(o)[1];return{type:t.type,src:e.src.replace(o,"."+n+"$2")}})),e instanceof Array&&(e={sources:e.map(function(e){return e.type&&e.src?e:Object.keys(e).reduce(function(t,n){return a(t,{type:i(n),src:e[n]})},{})})}),e):{sources:t}}},t.exports.TYPE_RE=o},{"extend-object":39}],22:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("extend-object"),a=e("bean");r(function(e,t){var n=e.conf;if(n.share===!1)return void i.find(".fp-share",t).forEach(i.removeNode);e.shareUrl=function(t){if(t&&n.embed&&n.embed.iframe)return n.embed.iframe;if("string"==typeof e.conf.share)return e.conf.share;var r=encodeURIComponent(e.video.title||(i.find("title")[0]||{}).innerHTML||"Flowplayer Unlimited video"),a=encodeURIComponent(btoa(JSON.stringify(o({},e.conf,e.extensions)).replace(/[\u007F-\uFFFF]/g,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).substr(-4)}))),s=encodeURIComponent(window.location.toString()),l=t?"https://flowplayer.com/e/":"https://flowplayer.com/s/";return l+"?t="+r+"&c="+a+"&r="+s};var r=i.createElement("div",{className:"fp-menu fp-share-menu"},"<strong>Share</strong>"),s=i.find(".fp-ui",t)[0];s.appendChild(r);var l=i.find(".fp-share",t)[0];a.on(t,"click",".fp-share",function(t){t.preventDefault(),i.hasClass(r,"fp-active")?e.hideMenu():e.showMenu(r,l)})})},{"../common":1,"../flowplayer":31,bean:34,"extend-object":39}],23:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("bean"),a=e("./subtitles/parser");r.defaults.subtitleParser=a,r(function(e,t){var n,a,s,l,u;(!r.support.inlineVideo||!r.support.fullscreen&&e.conf.native_fullscreen)&&(e.conf.nativesubtitles=!0),e.ui||(e.ui={}),e.ui.createSubtitleControl=function(e,n){return u=n,s=s||i.createElement("strong",{className:"fp-cc"},"CC"),l=l||i.createElement("div",{className:"fp-menu fp-subtitle-menu"},"<strong>Closed Captions</strong>"),i.find("a",l).forEach(i.removeNode),l.appendChild(i.createElement("a",{"data-subtitle-index":-1},"No subtitles")),(e||[]).forEach(function(e,t){var n=e.srclang||"en",r=e.label||"Default ("+n+")",o=i.createElement("a",{"data-subtitle-index":t},r);l.appendChild(o)}),i.find(".fp-ui",t)[0].appendChild(l),i.find(".fp-controls",t)[0].appendChild(s),i.toggleClass(s,"fp-hidden",!e||!e.length),s},e.ui.setActiveSubtitleItem=function(e){f(e)},o.on(t,"click",".fp-cc",function(){i.hasClass(l,"fp-active")?e.hideMenu():e.showMenu(l)}),o.on(t,"click",".fp-subtitle-menu [data-subtitle-index]",function(t){t.preventDefault();var n=t.target.getAttribute("data-subtitle-index");return u?u(n):"-1"===n?e.disableSubtitles():void e.loadSubtitles(n)});var c=function(){a=i.find(".fp-captions",t)[0],a=a||i.appendTo(i.createElement("div",{class:"fp-captions"}),i.find(".fp-player",t)[0]),Array.prototype.forEach.call(a.children,i.removeNode),e.ui.createSubtitleControl(e.video.subtitles)};e.on("ready",function(n,r,o){if(r.subtitles=[],c(),i.removeClass(t,"has-menu"),e.disableSubtitles(),o.subtitles&&o.subtitles.length){var a=o.subtitles.filter(function(e){return e["default"]})[0];a&&r.loadSubtitles(o.subtitles.indexOf(a))}}),e.showSubtitle=function(e){i.html(a,e),i.addClass(a,"fp-shown")},e.hideSubtitle=function(){i.removeClass(a,"fp-shown")},e.bind("cuepoint",function(t,r,i){i.subtitle?(n=i.index,e.showSubtitle(i.subtitle.text)):i.subtitleEnd&&(e.hideSubtitle(),n=i.index)}),e.bind("seek",function(t,r,o){n&&e.cuepoints[n]&&e.cuepoints[n].time>o&&(i.removeClass(a,"fp-shown"),n=null),(e.cuepoints||[]).forEach(function(t,r){var i=t.subtitle;i&&n!=r?o>=t.time&&(!i.endTime||o<=i.endTime)&&e.trigger("cuepoint",[e,t]):t.subtitleEnd&&o>=t.time&&r==n+1&&e.trigger("cuepoint",[e,t])})}),e.on("unload",function(){i.find(".fp-captions",t).forEach(i.removeNode)});var f=function(e){i.toggleClass(i.find("a.fp-selected",l)[0],"fp-selected"),i.toggleClass(i.find('a[data-subtitle-index="'+e+'"]',l)[0],"fp-selected")},d=function(e,n){var r=i.find("video.fp-engine",t)[0].textTracks;r.length&&(null===e?[].forEach.call(r,function(e){e.mode=n}):r[e].mode=n)};e.disableSubtitles=function(){return e.subtitles=[],(e.cuepoints||[]).forEach(function(t){(t.subtitle||t.subtitleEnd)&&e.removeCuepoint(t)}),a&&Array.prototype.forEach.call(a.children,i.removeNode),f(-1),r.support.subtitles&&e.conf.nativesubtitles&&"html5"==e.engine.engineName&&d(null,"disabled"),e},e.loadSubtitles=function(t){e.disableSubtitles();var n=e.video.subtitles[t],o=n.src;return o?(f(t),r.support.subtitles&&e.conf.nativesubtitles&&"html5"==e.engine.engineName?void d(t,"showing"):(i.xhrGet(o,function(t){var n=e.conf.subtitleParser(t);n.forEach(function(t,n){t.title||(t.title="subtitle"+n);var i={time:t.startTime,subtitle:t,visible:!1};e.subtitles.push(t),e.addCuepoint(i),e.addCuepoint({time:t.endTime,subtitleEnd:t.title,visible:!1}),0!==t.startTime||e.video.time||e.splash||e.trigger("cuepoint",[e,r.extend({},i,{index:0})]),e.splash&&e.one("ready",function(){e.trigger("cuepoint",[e,i])})})},function(){return e.trigger("error-subtitles",{code:8,url:o}),!1}),e)):void 0}})},{"../common":1,"../flowplayer":31,"./subtitles/parser":24,bean:34}],24:[function(e,t,n){t.exports=function(e){function t(e){var t=e.split(":");return 2==t.length&&t.unshift(0),60*t[0]*60+60*t[1]+parseFloat(t[2].replace(",","."))}for(var n,r,i,o=/^(([0-9]+:){1,2}[0-9]{2}[,.][0-9]{3}) --\> (([0-9]+:){1,2}[0-9]{2}[,.][0-9]{3})(.*)/,a=[],s=0,l=e.split("\n"),u=l.length,c={};u>s;s++)if(r=o.exec(l[s])){for(n=l[s-1],i="<p>"+l[++s]+"</p><br/>";"string"==typeof l[++s]&&l[s].trim()&&s<l.length;)i+="<p>"+l[s]+"</p><br/>";c={title:n,startTime:t(r[1]),endTime:t(r[3]),text:i},a.push(c)}return a}},{}],25:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("extend-object");!function(){var e=function(e){var t=/iP(ad|hone)(; CPU)? OS (\d+_\d)/.exec(e);return t&&t.length>1?parseFloat(t[t.length-1].replace("_","."),10):0},t=function(){var e=document.createElement("video");return e.loop=!0,e.autoplay=!0,e.preload=!0,e},n={},o=document.documentElement.style,a=navigator.userAgent.toLowerCase(),s=/(chrome)[ \/]([\w.]+)/.exec(a)||/(safari)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];s[1]&&(n[s[1]]=!0,n.version=s[2]||"0"),n.safari&&(n.version=(/version\/([\w.]+)/.exec(a)||[])[1]);var l=t(),u=navigator.userAgent,c=n.msie||/Trident\/7/.test(u),f=/iPad|MeeGo/.test(u)&&!/CriOS/.test(u),d=/iPad/.test(u)&&/CriOS/.test(u),p=/iP(hone|od)/i.test(u)&&!/iPad/.test(u)&&!/IEMobile/i.test(u),h=/Android/.test(u),g=h&&/Firefox/.test(u),m=h&&/SAMSUNG/.test(u),v=/Silk/.test(u),y=/IEMobile/.test(u),w=y?parseFloat(/Windows\ Phone\ (\d+\.\d+)/.exec(u)[1],10):0,b=y?parseFloat(/IEMobile\/(\d+\.\d+)/.exec(u)[1],10):0,I=f||p?e(u):0,M=h?parseFloat(/Android\ (\d+(\.\d+)?)/.exec(u)[1],10):0,C=(p||f||d)&&{iPhone:p,iPad:f||d,version:I,chrome:d},A=i(r.support,{browser:n,iOS:C,android:h?{firefox:g,opera:/Opera/.test(u),samsung:m,version:M}:!1,subtitles:!!l.addTextTrack,fullscreen:"boolean"==typeof document.webkitFullscreenEnabled?document.webkitFullscreenEnabled:"function"==typeof document.webkitCancelFullScreen&&!/Mac OS X 10_5.+Version\/5\.0\.\d Safari/.test(u)||document.mozFullScreenEnabled||"function"==typeof document.exitFullscreen||"function"==typeof document.msExitFullscreen,inlineBlock:!(c&&n.version<8),touch:"ontouchstart"in window,dataload:!f&&!p&&!y,flex:"flexWrap"in o||"WebkitFlexWrap"in o||"msFlexWrap"in o,svg:!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,zeropreload:!c&&!h,volume:!(f||p||v||d),cachedVideoTag:!(f||p||d||y),firstframe:!(v||y||g||m||I&&10>I||h&&4.4>M),inlineVideo:(!p||I>=10)&&(!y||w>=8.1&&b>=11)&&(!h||M>=3),hlsDuration:!h&&(!n.safari||f||p||d),seekable:!f&&!d,preloadMetadata:!C&&!n.safari});A.autoplay=A.firstframe,y&&(A.browser.safari=!1);try{var S=navigator.plugins["Shockwave Flash"],E=c?new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version"):S.description;c||S[0].enabledPlugin?(E=E.split(/\D+/),E.length&&!E[0]&&(E=E.slice(1)),A.flashVideo=E[0]>9||9==E[0]&&E[3]>=115):A.flashVideo=!1}catch(j){}try{A.video=!!l.canPlayType,A.video&&l.canPlayType("video/mp4")}catch(D){A.video=!1}A.animation=function(){for(var e=["","Webkit","Moz","O","ms","Khtml"],t=document.createElement("p"),n=0;n<e.length;n++)if("undefined"!=typeof t.style[e[n]+"AnimationName"])return!0}()}()},{"../flowplayer":31,"extend-object":39}],26:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){var n=e.conf;if(n.share!==!1&&n.twitter!==!1){e.tweet=function(){var t,r,i=550,o=420,a=screen.height,s=screen.width,l="scrollbars=yes,resizable=yes,toolbar=no,location=yes",u="string"==typeof n.twitter?n.twitter:e.shareUrl();t=Math.round(s/2-i/2),r=0,a>o&&(r=Math.round(a/2-o/2)),window.open("https://twitter.com/intent/tweet?url="+encodeURIComponent(u),"intent",l+",width="+i+",height="+o+",left="+t+",top="+r)};var r=i.find(".fp-share-menu",t)[0],a=i.createElement("a",{class:"fp-icon fp-twitter"},"Twitter");i.append(r,a),o.on(t,"click",".fp-twitter",function(){e.tweet()})}})},{"../common":1,"../flowplayer":31,bean:34}],27:[function(e,t,n){(function(n){"use strict";function r(e){return e=parseInt(e,10),e>=10?e:"0"+e}function i(e,t){e=Math.max(e||0,0),e=t?Math.ceil(e):Math.floor(e);var n=Math.floor(e/3600),i=Math.floor(e/60);return e-=60*i,n>=1?(i-=60*n,n+":"+r(i)+":"+r(e)):r(i)+":"+r(e)}var o=e("../flowplayer"),a=e("../common"),s=e("bean"),l=e("./ui/slider"),u=e("./ui/bar-slider"),c=n("PHN2ZyBjbGFzcz0iZnAtcGxheS1yb3VuZGVkLW91dGxpbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDk5Ljg0NCA5OS44NDM0Ij48ZGVmcz48c3R5bGU+LmZwLWNvbG9yLXBsYXl7b3BhY2l0eTowLjY1O30uY29udHJvbGJ1dHRvbntmaWxsOiNmZmY7fTwvc3R5bGU+CjwvZGVmcz4KPHRpdGxlPnBsYXktcm91bmRlZC1vdXRsaW5lPC90aXRsZT48cGF0aCBjbGFzcz0iZnAtY29sb3ItcGxheSIgZD0iTTQ5LjkyMTctLjA3OGE1MCw1MCwwLDEsMCw1MCw1MEE1MC4wNTY0LDUwLjA1NjQsMCwwLDAsNDkuOTIxNy0uMDc4WiIvPjxwYXRoIGNsYXNzPSJjb250cm9sYnV0dG9uIiBkPSJNNDEuMDM1OSw3MS4xOWE1LjA0OTIsNS4wNDkyLDAsMCwxLTIuNTU3NS0uNjY3M2MtMS44MDMxLTEuMDQxLTIuNzk1OC0zLjEyNDgtMi43OTU4LTUuODY2NFYzNS4xODg3YzAtMi43NDI5Ljk5MzMtNC44MjcyLDIuNzk3LTUuODY3NiwxLjgwMjUtMS4wNDIyLDQuMTAzNC0uODYsNi40OC41MTQzTDcwLjQ3ODIsNDQuNTY3MmMyLjM3NTEsMS4zNzExLDMuNjgyNiwzLjI3MjUsMy42ODMyLDUuMzU0NXMtMS4zMDc2LDMuOTg0NS0zLjY4MzIsNS4zNTYyTDQ0Ljk1OTIsNzAuMDExNEE3LjkzODQsNy45Mzg0LDAsMCwxLDQxLjAzNTksNzEuMTlabS4wMDY1LTQwLjEyM2EyLjY3OTQsMi42Nzk0LDAsMCwwLTEuMzU4Mi4zNDEzYy0xLjAyNjMuNTkyNi0xLjU5MTIsMS45MzQ5LTEuNTkxMiwzLjc4VjY0LjY1NjNjMCwxLjg0NDkuNTY0OSwzLjE4NjYsMS41OTA2LDMuNzc5MSwxLjAyODEuNTkzMiwyLjQ3MzMuNDEwOCw0LjA3LS41MTJMNjkuMjczLDUzLjE5MDZjMS41OTgzLS45MjI3LDIuNDc4LTIuMDgzOCwyLjQ3OC0zLjI2ODlzLS44OC0yLjM0NDUtMi40NzgtMy4yNjY2TDQzLjc1NCwzMS45MjI3QTUuNTY4NSw1LjU2ODUsMCwwLDAsNDEuMDQyMywzMS4wNjcxWiIgZmlsdGVyPSJ1cmwoI2YxKSIvPjwvc3ZnPgo=","base64"),f=n("PHN2ZyBjbGFzcz0iZnAtcGxheS1yb3VuZGVkLWZpbGwiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDEwMCAxMDAiPgogIDxkZWZzPjxzdHlsZT4uYXtmaWxsOiMwMDA7b3BhY2l0eTowLjY1O30uYntmaWxsOiNmZmY7b3BhY2l0eToxLjA7fTwvc3R5bGU+CiAgPC9kZWZzPjx0aXRsZT5wbGF5LXJvdW5kZWQtZmlsbDwvdGl0bGU+CiAgPHBhdGggY2xhc3M9ImZwLWNvbG9yLXBsYXkiIGQ9Ik00OS45MjE3LS4wNzhhNTAsNTAsMCwxLDAsNTAsNTBBNTAuMDU2NCw1MC4wNTY0LDAsMCwwLDQ5LjkyMTctLjA3OFoiLz4KICA8cGF0aCBjbGFzcz0iYiIgZD0iTTM1Ljk0MiwzNS4yMzIzYzAtNC43Mjg5LDMuMzUwNi02LjY2MzcsNy40NDYtNC4yOTcxTDY4LjgzLDQ1LjYyMzVjNC4wOTU2LDIuMzY0LDQuMDk1Niw2LjIzMTksMCw4LjU5NzdMNDMuMzg4LDY4LjkxYy00LjA5NTQsMi4zNjQtNy40NDYuNDMtNy40NDYtNC4yOTc5WiIgZmlsdGVyPSJ1cmwoI2YxKSIvPgogIDwvc3ZnPgogIAo=","base64"),d=n("PHN2ZyBjbGFzcz0iZnAtcGxheS1zaGFycC1maWxsIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj4KICA8ZGVmcz4KICAgIDxzdHlsZT4uZnAtY29sb3ItcGxheXtvcGFjaXR5OjAuNjU7fS5jb250cm9sYnV0dG9ue2ZpbGw6I2ZmZjt9PC9zdHlsZT4KICA8L2RlZnM+CiAgPHRpdGxlPnBsYXktc2hhcnAtZmlsbDwvdGl0bGU+CiAgPHBhdGggY2xhc3M9ImZwLWNvbG9yLXBsYXkiIGQ9Ik00OS45MjE3LS4wNzhhNTAsNTAsMCwxLDAsNTAsNTBBNTAuMDU2NCw1MC4wNTY0LDAsMCwwLDQ5LjkyMTctLjA3OFoiLz4KICA8cG9seWdvbiBjbGFzcz0iY29udHJvbGJ1dHRvbiIgcG9pbnRzPSI3My42MDEgNTAgMzcuOTY4IDcwLjU3MyAzNy45NjggMjkuNDI3IDczLjYwMSA1MCIgZmlsdGVyPSJ1cmwoI2YxKSIvPgo8L3N2Zz4K","base64"),p=n("PHN2ZyBjbGFzcz0iZnAtcGxheS1zaGFycC1vdXRsaW5lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5OS44NDQgOTkuODQzNCI+PGRlZnM+PHN0eWxlPi5jb250cm9sYnV0dG9uYmd7b3BhY2l0eTowLjY1O30uY29udHJvbGJ1dHRvbntmaWxsOiNmZmY7fTwvc3R5bGU+CjwvZGVmcz48dGl0bGU+cGxheS1zaGFycC1vdXRsaW5lPC90aXRsZT48cGF0aCBjbGFzcz0iZnAtY29sb3ItcGxheSIgZD0iTTQ5LjkyMTctLjA3OGE1MCw1MCwwLDEsMCw1MCw1MEE1MC4wNTY0LDUwLjA1NjQsMCwwLDAsNDkuOTIxNy0uMDc4WiIvPjxwYXRoIGNsYXNzPSJjb250cm9sYnV0dG9uIiBkPSJNMzYuOTQ0Myw3Mi4yNDczVjI3LjI5MTZMNzUuODc3Niw0OS43N1ptMi4yLTQxLjE0NTVWNjguNDM3MUw3MS40Nzc2LDQ5Ljc3WiIgZmlsdGVyPSJ1cmwoI2YxKSIvPjwvc3ZnPgo=","base64"),h=n("PHN2ZyBjbGFzcz0iZnAtcGF1c2Utcm91bmRlZC1vdXRsaW5lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5OS44NDM0IDk5Ljg0MzQiPjxkZWZzPjxzdHlsZT4uZnAtY29sb3ItcGxheXtvcGFjaXR5OjAuNjU7fS5yZWN0e2ZpbGw6I2ZmZjt9PC9zdHlsZT4KPC9kZWZzPjx0aXRsZT5wYXVzZS1yb3VuZGVkLW91dGxpbmU8L3RpdGxlPjxwYXRoIGNsYXNzPSJmcC1jb2xvci1wbGF5IiBkPSJNNDkuOTIxMi0uMDc4M2E1MCw1MCwwLDEsMCw1MC4wMDA2LDUwQTUwLjA1NjIsNTAuMDU2MiwwLDAsMCw0OS45MjEyLS4wNzgzWiIvPjxnIGNsYXNzPSJjb250cm9sYnV0dG9uIj48cGF0aCBjbGFzcz0icmVjdCIgZD0iTTM5LjAwMzYsNzEuOTcyNmE3LjU2NSw3LjU2NSwwLDAsMS03LjU1Ny03LjU1NnYtMjguOTlhNy41NTY1LDcuNTU2NSwwLDAsMSwxNS4xMTMsMHYyOC45OUE3LjU2NDgsNy41NjQ4LDAsMCwxLDM5LjAwMzYsNzEuOTcyNlptMC00MS45MDRhNS4zNjQ3LDUuMzY0NywwLDAsMC01LjM1OTMsNS4zNTgydjI4Ljk5YTUuMzU4Nyw1LjM1ODcsMCwwLDAsMTAuNzE3NCwwdi0yOC45OUE1LjM2NDUsNS4zNjQ1LDAsMCwwLDM5LjAwMzYsMzAuMDY4NloiIGZpbHRlcj0idXJsKCNmMSkiLz48cGF0aCBjbGFzcz0icmVjdCIgZD0iTTYwLjg0LDcxLjk3MjZhNy41NjQ4LDcuNTY0OCwwLDAsMS03LjU1Ni03LjU1NnYtMjguOTlhNy41NTY1LDcuNTU2NSwwLDAsMSwxNS4xMTMsMHYyOC45OUE3LjU2NSw3LjU2NSwwLDAsMSw2MC44NCw3MS45NzI2Wm0wLTQxLjkwNGE1LjM2NDUsNS4zNjQ1LDAsMCwwLTUuMzU4Miw1LjM1ODJ2MjguOTlhNS4zNTg3LDUuMzU4NywwLDAsMCwxMC43MTc0LDB2LTI4Ljk5QTUuMzY0Nyw1LjM2NDcsMCwwLDAsNjAuODQsMzAuMDY4NloiIGZpbHRlcj0idXJsKCNmMSkiLz48L2c+PC9zdmc+Cg==","base64"),g=n("PHN2ZyBjbGFzcz0iZnAtcGF1c2Utcm91bmRlZC1maWxsIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48ZGVmcz48c3R5bGU+LmZwLWNvbG9yLXBsYXl7b3BhY2l0eTowLjY1O30ucmVjdHtmaWxsOiNmZmY7fTwvc3R5bGU+CjwvZGVmcz48dGl0bGU+cGF1c2Utcm91bmRlZC1maWxsPC90aXRsZT48cGF0aCBjbGFzcz0iZnAtY29sb3ItcGxheSIgZD0iTTQ5LjkyMTctLjA3OGE1MCw1MCwwLDEsMCw1MCw1MEE1MC4wNTY0LDUwLjA1NjQsMCwwLDAsNDkuOTIxNy0uMDc4WiIvPjxnIGNsYXNzPSJjb250cm9sYnV0dG9uIiBmaWx0ZXI9InVybCgjZjEpIj48cmVjdCBjbGFzcz0icmVjdCIgeD0iMzEuODQ0IiB5PSIyOC4xMjMxIiB3aWR0aD0iMTMuNDM2MiIgaGVpZ2h0PSI0My41OTczIiByeD0iNi43MTgxIiByeT0iNi43MTgxIi8+PHJlY3QgY2xhc3M9InJlY3QiIHg9IjU0LjU2MzgiIHk9IjI4LjEyMzEiIHdpZHRoPSIxMy40MzYyIiBoZWlnaHQ9IjQzLjU5NzMiIHJ4PSI2LjcxODEiIHJ5PSI2LjcxODEiLz48L2c+PC9zdmc+Cg==","base64"),m=n("PHN2ZyBjbGFzcz0iZnAtcGF1c2Utc2hhcnAtZmlsbCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PGRlZnM+PHN0eWxlPi5mcC1jb2xvci1wbGF5e29wYWNpdHk6MC42NTt9LnJlY3R7ZmlsbDojZmZmO308L3N0eWxlPgo8L2RlZnM+PHRpdGxlPnBhdXNlLXNoYXJwLWZpbGw8L3RpdGxlPjxwYXRoIGNsYXNzPSJmcC1jb2xvci1wbGF5IiBkPSJNNDkuOTIxNy0uMDc4YTUwLDUwLDAsMSwwLDUwLDUwQTUwLjA1NjQsNTAuMDU2NCwwLDAsMCw0OS45MjE3LS4wNzhaIi8+PGcgY2xhc3M9ImNvbnRyb2xidXR0b24iIGZpbHRlcj0idXJsKCNmMSkiPjxyZWN0IGNsYXNzPSJyZWN0IiB4PSIzMy41IiB5PSIzMC4xMDQyIiB3aWR0aD0iMTIuMjYzNCIgaGVpZ2h0PSIzOS43OTE3Ii8+PHJlY3QgY2xhc3M9InJlY3QiIHg9IjU0LjIzNjYiIHk9IjMwLjEwNDIiIHdpZHRoPSIxMi4yNjM0IiBoZWlnaHQ9IjM5Ljc5MTciLz48L2c+PC9zdmc+Cg==","base64"),v=n("PHN2ZyBjbGFzcz0iZnAtcGF1c2Utc2hhcnAtb3V0bGluZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgOTkuODQzNCA5OS44NDM0Ij48ZGVmcz48c3R5bGU+LmZwLWNvbG9yLXBsYXl7b3BhY2l0eTowLjY1O30ucmVjdHtmaWxsOiNmZmY7fTwvc3R5bGU+CjwvZGVmcz48dGl0bGU+cGF1c2Utc2hhcnAtb3V0bGluZTwvdGl0bGU+PHBhdGggY2xhc3M9ImZwLWNvbG9yLXBsYXkiIGQ9Ik00OS45MjEyLS4wNzgzYTUwLDUwLDAsMSwwLDUwLjAwMDYsNTBBNTAuMDU2Miw1MC4wNTYyLDAsMCwwLDQ5LjkyMTItLjA3ODNaIi8+PGcgY2xhc3M9ImNvbnRyb2xidXR0b24iIGZpbHRlcj0idXJsKCNmMSkiPjxwYXRoIGNsYXNzPSJyZWN0IiBkPSJNNDYuODcwOSw2OS45NTMxSDMzLjEzODVWMjkuODlINDYuODcwOVpNMzUuMTQxNiw2Ny45NWg5LjcyNjJWMzEuODkzNUgzNS4xNDE2WiIvPjxwYXRoIGNsYXNzPSJyZWN0IiBkPSJNNjYuNzA0Nyw2OS45NTMxSDUyLjk3MjJWMjkuODlINjYuNzA0N1pNNTQuOTc1NCw2Ny45NWg5LjcyNjJWMzEuODkzNUg1NC45NzU0WiIvPjwvZz48L3N2Zz4K","base64"),y=n("PHN2ZyBjbGFzcz0iZnAtbG9hZGluZy1yb3VuZGVkLW91dGxpbmUiIHdpZHRoPScxMTJweCcgaGVpZ2h0PScxMTJweCcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiPgogICAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9Ijc2IiBoZWlnaHQ9Ijc2IiBmaWxsPSJyZ2JhKDAsMCwwLDApIiBjbGFzcz0iYmsiPjwvcmVjdD4KICAgIDxjaXJjbGUgY3g9IjAiIGN5PSIwIiByPSIxMCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjUgMjUpIiBmaWxsPSJub25lIiBzdHJva2U9InJnYmEoMCwwLDAsLjUpIiBzdHJva2Utd2lkdGg9IjMlIiBjbGFzcz0ic3EiPgogICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJzdHJva2UiIGZyb209InJnYmEoMCwwLDAsMCkiIHRvPSJyZ2JhKDAsMCwwLC41KSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iMS42cyIgYmVnaW49IjAuMHMiIHZhbHVlcz0icmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsLjUpIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGU+CiAgICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0ic2NhbGUiIGFkZGl0aXZlPSJzdW0iIGZyb209IjAuOCIgdG89IjEiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMC4wcyIgZHVyPSIxLjZzIiB2YWx1ZXM9IjE7MC44OzAuODsxOzEiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZVRyYW5zZm9ybT4KICAgIDwvY2lyY2xlPgogICAgPGNpcmNsZSBjeD0iMCIgY3k9IjAiIHI9IjEwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1MCAyNSkiIGZpbGw9Im5vbmUiIHN0cm9rZT0icmdiYSgwLDAsMCwuNSkiIHN0cm9rZS13aWR0aD0iMyUiIGNsYXNzPSJzcSI+CiAgICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9InN0cm9rZSIgZnJvbT0icmdiYSgwLDAsMCwwKSIgdG89InJnYmEoMCwwLDAsLjUpIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgZHVyPSIxLjZzIiBiZWdpbj0iMC40cyIgdmFsdWVzPSJyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwuNSkiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZT4KICAgICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJzY2FsZSIgYWRkaXRpdmU9InN1bSIgZnJvbT0iMC44IiB0bz0iMSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGJlZ2luPSIwLjRzIiBkdXI9IjEuNnMiIHZhbHVlcz0iMTswLjg7MC44OzE7MSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlVHJhbnNmb3JtPgogICAgPC9jaXJjbGU+CiAgICA8Y2lyY2xlIGN4PSIwIiBjeT0iMCIgcj0iMTAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDUwIDUwKSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJyZ2JhKDAsMCwwLC41KSIgc3Ryb2tlLXdpZHRoPSIzJSIgY2xhc3M9InNxIj4KICAgICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ic3Ryb2tlIiBmcm9tPSJyZ2JhKDAsMCwwLDApIiB0bz0icmdiYSgwLDAsMCwuNSkiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjEuNnMiIGJlZ2luPSIwLjhzIiB2YWx1ZXM9InJnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLC41KSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlPgogICAgICA8YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InNjYWxlIiBhZGRpdGl2ZT0ic3VtIiBmcm9tPSIwLjgiIHRvPSIxIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgYmVnaW49IjAuOHMiIGR1cj0iMS42cyIgdmFsdWVzPSIxOzAuODswLjg7MTsxIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGVUcmFuc2Zvcm0+CiAgICA8L2NpcmNsZT4KICAgIDxjaXJjbGUgY3g9IjAiIGN5PSIwIiByPSIxMCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjUgNTApIiBmaWxsPSJub25lIiBzdHJva2U9InJnYmEoMCwwLDAsLjUpIiBzdHJva2Utd2lkdGg9IjMlIiBjbGFzcz0ic3EiPgogICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJzdHJva2UiIGZyb209InJnYmEoMCwwLDAsMCkiIHRvPSJyZ2JhKDAsMCwwLC41KSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iMS42cyIgYmVnaW49IjEuMnMiIHZhbHVlcz0icmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsLjUpIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGU+CiAgICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0ic2NhbGUiIGFkZGl0aXZlPSJzdW0iIGZyb209IjAuOCIgdG89IjEiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMS4ycyIgZHVyPSIxLjZzIiB2YWx1ZXM9IjE7MC44OzAuODsxOzEiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZVRyYW5zZm9ybT4KICAgIDwvY2lyY2xlPgo8L3N2Zz4K","base64"),w=n("PHN2ZyBjbGFzcz0iZnAtbG9hZGluZy1yb3VuZGVkLWZpbGwiIHdpZHRoPScxMTJweCcgaGVpZ2h0PScxMTJweCcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiPgogICAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9Ijc2IiBoZWlnaHQ9Ijc2IiBmaWxsPSJyZ2JhKDAsMCwwLDApIiBjbGFzcz0iYmsiPjwvcmVjdD4KICAgIDxjaXJjbGUgY3g9IjAiIGN5PSIwIiByPSIxMCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjUgMjUpIiBmaWxsPSJyZ2JhKDAsMCwwLC41KSIgY2xhc3M9InNxIj4KICAgICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0iZmlsbCIgZnJvbT0icmdiYSgwLDAsMCwwKSIgdG89InJnYmEoMCwwLDAsLjUpIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgZHVyPSIxLjZzIiBiZWdpbj0iMC4wcyIgdmFsdWVzPSJyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwuNSkiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZT4KICAgICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJzY2FsZSIgYWRkaXRpdmU9InN1bSIgZnJvbT0iMC44IiB0bz0iMSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGJlZ2luPSIwLjBzIiBkdXI9IjEuNnMiIHZhbHVlcz0iMTswLjg7MC44OzE7MSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlVHJhbnNmb3JtPgogICAgPC9jaXJjbGU+CiAgICA8Y2lyY2xlIGN4PSIwIiBjeT0iMCIgcj0iMTAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDUwIDI1KSIgZmlsbD0icmdiYSgwLDAsMCwuNSkiIGNsYXNzPSJzcSI+CiAgICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImZpbGwiIGZyb209InJnYmEoMCwwLDAsMCkiIHRvPSJyZ2JhKDAsMCwwLC41KSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iMS42cyIgYmVnaW49IjAuNHMiIHZhbHVlcz0icmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsLjUpIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGU+CiAgICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0ic2NhbGUiIGFkZGl0aXZlPSJzdW0iIGZyb209IjAuOCIgdG89IjEiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMC40cyIgZHVyPSIxLjZzIiB2YWx1ZXM9IjE7MC44OzAuODsxOzEiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZVRyYW5zZm9ybT4KICAgIDwvY2lyY2xlPgogICAgPGNpcmNsZSBjeD0iMCIgY3k9IjAiIHI9IjEwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1MCA1MCkiIGZpbGw9InJnYmEoMCwwLDAsLjUpIiBjbGFzcz0ic3EiPgogICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJmaWxsIiBmcm9tPSJyZ2JhKDAsMCwwLDApIiB0bz0icmdiYSgwLDAsMCwuNSkiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjEuNnMiIGJlZ2luPSIwLjhzIiB2YWx1ZXM9InJnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLC41KSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlPgogICAgICA8YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InNjYWxlIiBhZGRpdGl2ZT0ic3VtIiBmcm9tPSIwLjgiIHRvPSIxIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgYmVnaW49IjAuOHMiIGR1cj0iMS42cyIgdmFsdWVzPSIxOzAuODswLjg7MTsxIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGVUcmFuc2Zvcm0+CiAgICA8L2NpcmNsZT4KICAgIDxjaXJjbGUgY3g9IjAiIGN5PSIwIiByPSIxMCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjUgNTApIiBmaWxsPSJyZ2JhKDAsMCwwLC41KSIgY2xhc3M9InNxIj4KICAgICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0iZmlsbCIgZnJvbT0icmdiYSgwLDAsMCwwKSIgdG89InJnYmEoMCwwLDAsLjUpIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgZHVyPSIxLjZzIiBiZWdpbj0iMS4ycyIgdmFsdWVzPSJyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwuNSkiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZT4KICAgICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJzY2FsZSIgYWRkaXRpdmU9InN1bSIgZnJvbT0iMC44IiB0bz0iMSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGJlZ2luPSIxLjJzIiBkdXI9IjEuNnMiIHZhbHVlcz0iMTswLjg7MC44OzE7MSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlVHJhbnNmb3JtPgogICAgPC9jaXJjbGU+Cjwvc3ZnPgo=","base64"),b=n("PHN2ZyBjbGFzcz0iZnAtbG9hZGluZy1zaGFycC1maWxsIiB3aWR0aD0nMTEycHgnIGhlaWdodD0nMTEycHgnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIj4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iNzYiIGhlaWdodD0iNzYiIGZpbGw9InJnYmEoMCwwLDAsMCkiIGNsYXNzPSJiayI+PC9yZWN0PgogIDxyZWN0IHg9Ii0xMCIgeT0iLTEwIiB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI1IDI1KSIgZmlsbD0icmdiYSgwLDAsMCwuNSkiIGNsYXNzPSJzcSI+CiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJmaWxsIiBmcm9tPSJyZ2JhKDAsMCwwLDApIiB0bz0icmdiYSgwLDAsMCwuNSkiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjEuNnMiIGJlZ2luPSIwLjBzIiB2YWx1ZXM9InJnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLC41KSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlPgogICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJzY2FsZSIgYWRkaXRpdmU9InN1bSIgZnJvbT0iMC44IiB0bz0iMSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGJlZ2luPSIwLjBzIiBkdXI9IjEuNnMiIHZhbHVlcz0iMTswLjg7MC44OzE7MSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlVHJhbnNmb3JtPgogIDwvcmVjdD4KICA8cmVjdCB4PSItMTAiIHk9Ii0xMCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1MCAyNSkiIGZpbGw9InJnYmEoMCwwLDAsLjUpIiBjbGFzcz0ic3EiPgogICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0iZmlsbCIgZnJvbT0icmdiYSgwLDAsMCwwKSIgdG89InJnYmEoMCwwLDAsLjUpIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgZHVyPSIxLjZzIiBiZWdpbj0iMC40cyIgdmFsdWVzPSJyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwuNSkiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZT4KICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0ic2NhbGUiIGFkZGl0aXZlPSJzdW0iIGZyb209IjAuOCIgdG89IjEiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMC40cyIgZHVyPSIxLjZzIiB2YWx1ZXM9IjE7MC44OzAuODsxOzEiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZVRyYW5zZm9ybT4KICA8L3JlY3Q+CiAgPHJlY3QgeD0iLTEwIiB5PSItMTAiIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNTAgNTApIiBmaWxsPSJyZ2JhKDAsMCwwLC41KSIgY2xhc3M9InNxIj4KICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImZpbGwiIGZyb209InJnYmEoMCwwLDAsMCkiIHRvPSJyZ2JhKDAsMCwwLC41KSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iMS42cyIgYmVnaW49IjAuOHMiIHZhbHVlcz0icmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsLjUpIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGU+CiAgICA8YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InNjYWxlIiBhZGRpdGl2ZT0ic3VtIiBmcm9tPSIwLjgiIHRvPSIxIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgYmVnaW49IjAuOHMiIGR1cj0iMS42cyIgdmFsdWVzPSIxOzAuODswLjg7MTsxIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGVUcmFuc2Zvcm0+CiAgPC9yZWN0PgogIDxyZWN0IHg9Ii0xMCIgeT0iLTEwIiB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI1IDUwKSIgZmlsbD0icmdiYSgwLDAsMCwuNSkiIGNsYXNzPSJzcSI+CiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJmaWxsIiBmcm9tPSJyZ2JhKDAsMCwwLDApIiB0bz0icmdiYSgwLDAsMCwuNSkiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjEuNnMiIGJlZ2luPSIxLjJzIiB2YWx1ZXM9InJnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLC41KSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlPgogICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJzY2FsZSIgYWRkaXRpdmU9InN1bSIgZnJvbT0iMC44IiB0bz0iMSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGJlZ2luPSIxLjJzIiBkdXI9IjEuNnMiIHZhbHVlcz0iMTswLjg7MC44OzE7MSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlVHJhbnNmb3JtPgogIDwvcmVjdD4KPC9zdmc+Cg==","base64"),I=n("PHN2ZyBjbGFzcz0iZnAtbG9hZGluZy1zaGFycC1vdXRsaW5lIiB3aWR0aD0nMTEycHgnIGhlaWdodD0nMTEycHgnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIj4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iNzYiIGhlaWdodD0iNzYiIGZpbGw9InJnYmEoMCwwLDAsMCkiIGNsYXNzPSJiayI+PC9yZWN0PgogIDxyZWN0IHg9Ii05IiB5PSItOSIgd2lkdGg9IjE4IiBoZWlnaHQ9IjE4IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyNSAyNSkiIGZpbGw9Im5vbmUiIHN0cm9rZT0icmdiYSgwLDAsMCwuNSkiIHN0cm9rZS13aWR0aD0iMyUiIGNsYXNzPSJzcSI+CiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJzdHJva2UiIGZyb209InJnYmEoMCwwLDAsMCkiIHRvPSJyZ2JhKDAsMCwwLC41KSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iMS42cyIgYmVnaW49IjAuMHMiIHZhbHVlcz0icmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsLjUpIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGU+CiAgICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0ic2NhbGUiIGFkZGl0aXZlPSJzdW0iIGZyb209IjAuOCIgdG89IjEiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMC4wcyIgZHVyPSIxLjZzIiB2YWx1ZXM9IjE7MC44OzAuODsxOzEiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZVRyYW5zZm9ybT4KICA8L3JlY3Q+CiAgPHJlY3QgeD0iLTkiIHk9Ii05IiB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDUwIDI1KSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJyZ2JhKDAsMCwwLC41KSIgc3Ryb2tlLXdpZHRoPSIzJSIgY2xhc3M9InNxIj4KICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9InN0cm9rZSIgZnJvbT0icmdiYSgwLDAsMCwwKSIgdG89InJnYmEoMCwwLDAsLjUpIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgZHVyPSIxLjZzIiBiZWdpbj0iMC40cyIgdmFsdWVzPSJyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwuNSkiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZT4KICAgICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJzY2FsZSIgYWRkaXRpdmU9InN1bSIgZnJvbT0iMC44IiB0bz0iMSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGJlZ2luPSIwLjRzIiBkdXI9IjEuNnMiIHZhbHVlcz0iMTswLjg7MC44OzE7MSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlVHJhbnNmb3JtPgogIDwvcmVjdD4KICA8cmVjdCB4PSItOSIgeT0iLTkiIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNTAgNTApIiBmaWxsPSJub25lIiBzdHJva2U9InJnYmEoMCwwLDAsLjUpIiBzdHJva2Utd2lkdGg9IjMlIiBjbGFzcz0ic3EiPgogICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ic3Ryb2tlIiBmcm9tPSJyZ2JhKDAsMCwwLDApIiB0bz0icmdiYSgwLDAsMCwuNSkiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjEuNnMiIGJlZ2luPSIwLjhzIiB2YWx1ZXM9InJnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLC41KSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlPgogICAgICA8YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InNjYWxlIiBhZGRpdGl2ZT0ic3VtIiBmcm9tPSIwLjgiIHRvPSIxIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgYmVnaW49IjAuOHMiIGR1cj0iMS42cyIgdmFsdWVzPSIxOzAuODswLjg7MTsxIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGVUcmFuc2Zvcm0+CiAgPC9yZWN0PgogIDxyZWN0IHg9Ii05IiB5PSItOSIgd2lkdGg9IjE4IiBoZWlnaHQ9IjE4IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyNSA1MCkiIGZpbGw9Im5vbmUiIHN0cm9rZT0icmdiYSgwLDAsMCwuNSkiIHN0cm9rZS13aWR0aD0iMyUiIGNsYXNzPSJzcSI+CiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJzdHJva2UiIGZyb209InJnYmEoMCwwLDAsMCkiIHRvPSJyZ2JhKDAsMCwwLC41KSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iMS42cyIgYmVnaW49IjEuMnMiIHZhbHVlcz0icmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsLjUpIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGU+CiAgICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0ic2NhbGUiIGFkZGl0aXZlPSJzdW0iIGZyb209IjAuOCIgdG89IjEiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMS4ycyIgZHVyPSIxLjZzIiB2YWx1ZXM9IjE7MC44OzAuODsxOzEiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZVRyYW5zZm9ybT4KICA8L3JlY3Q+Cjwvc3ZnPgo=","base64");o(function(e,t){function r(e){return a.find(".fp-"+e,t)[0]}function M(e){a.css(T,"padding-top",100*e+"%"),D.inlineBlock||a.height(a.find("object",t)[0],a.height(t))}function C(e){e?(a.addClass(t,"is-mouseover"),a.removeClass(t,"is-mouseout")):(a.addClass(t,"is-mouseout"),a.removeClass(t,"is-mouseover"))}a.find(".fp-filters").forEach(a.removeNode);try{var A;document.body.appendChild(A=a.createElement("div",{},n("PHN2ZyBjbGFzcz0iZnAtZmlsdGVycyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMCAwIj4KICA8ZGVmcz4KICAgIDxmaWx0ZXIgaWQ9ImYxIiB4PSItMjAlIiB5PSItMjAlIiB3aWR0aD0iMjAwJSIgaGVpZ2h0PSIyMDAlIj4KICAgICAgPGZlT2Zmc2V0IHJlc3VsdD0ib2ZmT3V0IiBpbj0iU291cmNlQWxwaGEiIGR4PSIwIiBkeT0iMCIgLz4KICAgICAgPGZlQ29sb3JNYXRyaXggcmVzdWx0PSJtYXRyaXhPdXQiIGluPSJvZmZPdXQiIHR5cGU9Im1hdHJpeCIKICAgICAgdmFsdWVzPSIwLjMgMCAwIDAgMCAwIDAuMyAwIDAgMCAwIDAgMC4zIDAgMCAwIDAgMCAwLjQgMCIgLz4KICAgICAgPGZlR2F1c3NpYW5CbHVyIHJlc3VsdD0iYmx1ck91dCIgaW49Im1hdHJpeE91dCIgc3RkRGV2aWF0aW9uPSI0IiAvPgogICAgICA8ZmVCbGVuZCBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJibHVyT3V0IiBtb2RlPSJub3JtYWwiIC8+CiAgICA8L2ZpbHRlcj4KICA8L2RlZnM+Cjwvc3ZnPgo=","base64"))),a.css(A,{width:0,height:0,overflow:"hidden",position:"absolute",margin:0,padding:0})}catch(S){}var E,j=e.conf,D=o.support;a.find(".fp-ratio,.fp-ui",t).forEach(a.removeNode),a.addClass(t,"flowplayer"),t.appendChild(a.createElement("div",{className:"fp-ratio"}));var N=a.createElement("div",{className:"fp-ui"},' <div class="fp-waiting"> {{ LOADING_SHARP_OUTLINE }} {{ LOADING_SHARP_FILL }} {{ LOADING_ROUNDED_FILL }} {{ LOADING_ROUNDED_OUTLINE }} </div> <div class="fp-header"> <a class="fp-share fp-icon"></a> <a class="fp-fullscreen fp-icon"></a> <a class="fp-unload fp-icon"></a> </div> <p class="fp-speed-flash"></p> <div class="fp-play fp-visible"> <a class="fp-icon fp-playbtn"></a> {{ PLAY_ROUNDED_FILL }} {{ PLAY_ROUNDED_OUTLINE }} {{ PLAY_SHARP_FILL }} {{ PLAY_SHARP_OUTLINE }} </div> <div class="fp-pause"> <a class="fp-icon fp-playbtn"></a> {{ PAUSE_SHARP_OUTLINE }} {{ PAUSE_SHARP_FILL }} {{ PAUSE_ROUNDED_OUTLINE }} {{ PAUSE_ROUNDED_FILL }} </div> <div class="fp-controls"> <a class="fp-icon fp-playbtn"></a> <span class="fp-elapsed">00:00</span> <div class="fp-timeline fp-bar"> <span class="fp-timestamp"></span> <div class="fp-progress fp-color"></div> </div> <span class="fp-duration"></span> <span class="fp-remaining"></span> <div class="fp-volume"> <a class="fp-icon fp-volumebtn"></a> <div class="fp-volumebar fp-bar-slider"> <em></em><em></em><em></em><em></em><em></em><em></em><em></em> </div> </div> <strong class="fp-speed fp-hidden"></strong> </div>'.replace("{{ PAUSE_ROUNDED_FILL }}",g).replace("{{ PAUSE_ROUNDED_OUTLINE }}",h).replace("{{ PAUSE_SHARP_FILL }}",m).replace("{{ PAUSE_SHARP_OUTLINE }}",v).replace("{{ PLAY_SHARP_OUTLINE }}",p).replace("{{ PLAY_SHARP_FILL }}",d).replace("{{ PLAY_ROUNDED_OUTLINE }}",c).replace("{{ PLAY_ROUNDED_FILL }}",f).replace("{{ LOADING_ROUNDED_OUTLINE }}",y).replace("{{ LOADING_ROUNDED_FILL }}",w).replace("{{ LOADING_SHARP_FILL }}",b).replace("{{ LOADING_SHARP_OUTLINE }}",I).replace(/url\(#/g,"url("+window.location.href.replace(window.location.hash,"").replace(/\#$/g,"")+"#"));t.appendChild(N);var x=r("waiting"),L=r("elapsed"),T=r("ratio"),Z=r("speed-flash"),P=r("duration"),k=r("remaining"),Y=r("timestamp"),z=a.css(T,"padding-top"),O=r("play"),G=r("pause"),R=r("timeline"),W=l(R,e.rtl),U=r("fullscreen"),J=r("volumebar"),B=u(J,{rtl:e.rtl}),F=a.hasClass(t,"no-toggle");W.disableAnimation(a.hasClass(t,"is-touch")),e.sliders=e.sliders||{},e.sliders.timeline=W,e.sliders.volume=B;var H=[];D.svg||a.html(x,"<p>loading &hellip;</p>"),j.ratio&&M(j.ratio);try{j.fullscreen||a.removeNode(U)}catch(S){a.removeNode(U)}e.on("dvrwindow",function(){W.disable(!1)}),e.on("ready",function(e,n,r){var o=n.video.duration;W.disable(n.disabled||!o),j.adaptiveRatio&&!isNaN(r.height/r.width)&&M(r.height/r.width,!0),a.html([P,k],n.live?"Live":i(o)),a.toggleClass(t,"is-long",o>=3600),B.slide(n.volumeLevel),"flash"===n.engine.engineName?W.disableAnimation(!0,!0):W.disableAnimation(!1),a.find(".fp-title",N).forEach(a.removeNode),r.title&&a.prepend(N,a.createElement("div",{className:"fp-message fp-title"},r.title)),a.toggleClass(t,"has-title",!!r.title)}).on("unload",function(){z||j.splash||a.css(T,"paddingTop",""),W.slide(0),a.addClass(O,"fp-visible")}).on("buffer",function(e,t,n){var r=t.video,i=r.buffer/r.duration;!r.seekable&&D.seekable&&W.max(t.conf.live?1/0:i),n&&"number"!=typeof n||(n=[{start:0,end:r.buffer}]);var o=a.find(".fp-buffer",R);o.length!==n.length&&(o.forEach(a.removeNode),o=[]),n.forEach(function(e,t){var n=o[t]||a.createElement("div",{className:"fp-buffer"});a.css(n,{left:100*e.start/r.duration+"%",width:100*(e.end-e.start)/r.duration+"%"}),a.prepend(R,n)})}).on("speed",function(e,t,n){t.video.time&&(a.text(Z,n+"x"),a.addClass(Z,"fp-shown"),H=H.filter(function(e){return clearTimeout(e),!1}),H.push(setTimeout(function(){a.addClass(Z,"fp-hilite"),H.push(setTimeout(function(){a.removeClass(Z,"fp-hilite"),H.push(setTimeout(function(){a.removeClass(Z,"fp-shown")},300))},1e3))})))}).on("buffered",function(){W.max(1)}).on("progress seek",function(n,r,o){var s=e.video.duration,l=e.video.seekOffset||0;o=o||e.video.time;var u=(o-l)/(s-l);W.dragging||W.slide(u,e.seeking?0:250),a.toggleClass(t,"is-live-position",s-o<j.livePositionOffset),a.html(L,i(o)),a.html(k,i(s-o,!0))}).on("finish resume seek",function(e){a.toggleClass(t,"is-finished","finish"==e.type)}).on("resume",function(){a.addClass(O,"fp-visible"),setTimeout(function(){a.removeClass(O,"fp-visible")},300)}).on("pause",function(){a.addClass(G,"fp-visible"),setTimeout(function(){a.removeClass(G,"fp-visible")},300)}).on("stop",function(){a.html(L,i(0)),W.slide(0,100)}).on("finish",function(){a.html(L,i(e.video.duration)),W.slide(1,100),a.removeClass(t,"is-seeking")}).on("beforeseek",function(){}).on("volume",function(){B.slide(e.volumeLevel)}).on("disable",function(){var n=e.disabled;W.disable(n),B.disable(n),a.toggleClass(t,"is-disabled",e.disabled)}).on("mute",function(e,n,r){a.toggleClass(t,"is-muted",r)}).on("error",function(e,n,r){if(a.removeClass(t,"is-loading"),a.removeClass(t,"is-seeking"),a.addClass(t,"is-error"),r){n.error=!0;var i=r.code;(r.message||"").match(/DECODER_ERROR_NOT_SUPPORTED/)&&(i=3);var o=n.message((n.engine&&n.engine.engineName||"html5")+": "+j.errors[i]);a.removeClass(t,"is-mouseover"),n.one("load progress",function(e){if(e.type=="progress"&&!n.error)o()})}}).one("resume ready",function(){var e=a.find("video.fp-engine",t)[0];if(e&&(!a.width(e)||!a.height(e))){var n=t.style.overflow;t.style.overflow="visible",setTimeout(function(){n?t.style.overflow=n:t.style.removeProperty("overflow")})}}),s.on(t,"mouseenter mouseleave",function(n){if(!F){var r,i="mouseover"==n.type;if(C(i),i){var o=function(){C(!0),r=new Date};e.on("pause.x volume.x",o),s.on(t,"mousemove.x",o),E=setInterval(function(){new Date-r>j.mouseoutTimeout&&(C(!1),r=new Date)},100)}else s.off(t,"mousemove.x"),e.off("pause.x volume.x"),clearInterval(E)}}),s.on(t,"mouseleave",function(){(W.dragging||B.dragging)&&(a.addClass(t,"is-mouseover"),a.removeClass(t,"is-mouseout"))}),s.on(t,"click.player",function(t){return e.disabled?void 0:a.hasClass(t.target,"fp-ui")||a.hasClass(t.target,"fp-engine")||t.flash||a.hasParent(t.target,".fp-play,.fp-pause")?(t.preventDefault&&t.preventDefault(),e.toggle()):void 0}),s.on(t,"mousemove",".fp-timeline",function(t){var n=t.pageX||t.clientX,r=n-a.offset(R).left,o=r/a.width(R),s=e.video,l=s.duration-(void 0===s.seekOffset?0:s.seekOffset),u=(e.rtl?1-o:o)*l;if(!(0>o)){a.html(Y,i(u));var c=r-a.width(Y)/2;0>c&&(c=0),c>a.width(R)-a.width(Y)&&(c=!1),c!==!1?a.css(Y,{left:c+"px",right:"auto"}):a.css(Y,{left:"auto",right:"0px"})}}),s.on(t,"contextmenu",function(n){var r=window;if(!a.hasClass(t,"is-flash-disabled")){var i=a.find(".fp-context-menu",t)[0];i&&(n.preventDefault(),e.showMenu(i,{left:n.clientX-r.scrollX,top:n.clientY-r.scrollY}),s.on(t,"click",".fp-context-menu",function(e){e.stopPropagation()}))}}),e.on("flashdisabled",function(n,r,i){a.addClass(t,"is-flash-disabled");var o;i!==!1&&(o=e.message("Seems something is blocking Adobe Flash from running")),e.one("ready progress",function(){a.removeClass(t,"is-flash-disabled"),o&&o()})}),j.poster&&a.css(t,"background-image","url("+j.poster+")");var V=a.css(t,"background-color"),X="none"!=a.css(t,"background-image")||V&&"rgba(0, 0, 0, 0)"!=V&&"transparent"!=V;if(X&&!j.splash){j.poster||(j.poster=!0);var _=function(){a.addClass(t,"is-poster"),a.addClass(O,"fp-visible"),e.poster=!0,e.on("resume.poster progress.poster beforeseek.poster",function(n){("beforeseek"===n.type||e.playing)&&(a.removeClass(t,"is-poster"),a.removeClass(O,"fp-visible"),e.poster=!1,e.off(".poster"))})};e.on("stop",function(){_()}),e.on("ready",function(e,t,n){n.index||n.autoplay||_()})}"string"==typeof j.splash&&a.css(t,"background-image","url('"+j.splash+"')"),!X&&e.forcedSplash&&a.css(t,"background-color","#555"),s.on(t,"click",".fp-toggle, .fp-play, .fp-playbtn",function(){e.disabled||e.toggle()}),s.on(t,"click",".fp-volumebtn",function(){e.mute()}),s.on(t,"click",".fp-fullscreen",function(){e.fullscreen()}),s.on(t,"click",".fp-unload",function(){e.unload()}),s.on(R,"slide",function(t){e.seeking=!0,e.seekTo(10*t)}),s.on(J,"slide",function(t){e.volume(t)}),s.on(t,"click",".fp-duration,.fp-remaining",function(){return e.dvr?e.seekTo(10):void a.toggleClass(t,"is-inverted")}),C(F);var K;if(e.on("shutdown",function(){s.off(R),s.off(J),K&&window.cancelAnimationFrame(K),a.removeNode(N),a.find(".fp-ratio",t).forEach(a.removeNode)}),"functionDISABLED-FOR-PERFORMANCE-REASONS"==typeof window.requestAnimationFrame){var Q=a.find(".fp-player",t)[0]||t,q=function(){a.toggleClass(t,"is-tiny",Q.clientWidth<400),a.toggleClass(t,"is-small",Q.clientWidth<600&&Q.clientWidth>=400),K=window.requestAnimationFrame(q)};K=window.requestAnimationFrame(q)}}),t.exports.format=i}).call(this,e("buffer").Buffer)},{"../common":1,"../flowplayer":31,"./ui/bar-slider":28,"./ui/slider":29,bean:34,buffer:35}],28:[function(e,t,n){function r(e,t){function n(t){var n=t.pageX||t.clientX,r=o.offset(e),i=o.width(e);!n&&t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches.length&&(n=t.originalEvent.touches[0].pageX);var a=n-r.left;a=Math.max(0,Math.min(i,a));var s=a/i;return l&&(s=1-s),s}t=t||{};var r=t.activeClass||"fp-color",a=t.inactiveClass||"fp-grey",s=t.childSelector||"em",l=!!t.rtl,u=!1,c=o.find(s,e).length,f={unload:function(){i.off(e,".barslider")},slide:function(t,n){o.find(s,e).forEach(function(e,n){var i=t>n/c;o.toggleClass(e,r,i),o.toggleClass(e,a,!i)}),n&&i.fire(e,"slide",[t])},disable:function(e){u=e}};return i.on(e,"mousedown.sld touchstart.sld",function(t){t.preventDefault(),u||(f.slide(n(t),!0),i.on(flowplayer.support.touch?e:document,"mousemove.sld touchmove.sld",function(e){e.preventDefault(),f.slide(n(e),!0)}),i.one(document,"mouseup.sld touchup.sld",function(){i.off(flowplayer.support.touch?e:document,"mousemove.sld touchmove.sld")}))}),f}var i=e("bean"),o=e("../../common");t.exports=r},{"../../common":1,bean:34}],29:[function(e,t,n){"use strict";var r=e("bean"),i=e("../../common"),o=function(e,t){var n;return function(){n||(e.apply(this,arguments),n=1,setTimeout(function(){n=0},t))}},a=function(e,t){var n,a,s,l,u,c,f,d,p=i.lastChild(e),h=!1,g=function(){a=i.offset(e),s=i.width(e),l=i.height(e),c=u?l:s,d=w(f)},m=function(t){n||t==b.value||f&&!(f>t)||(r.fire(e,"slide",[t]),b.value=t)},v=function(e){var n=e.pageX||e.clientX;!n&&e.originalEvent&&e.originalEvent.touches&&e.originalEvent.touches.length&&(n=e.originalEvent.touches[0].pageX);var r=u?e.pageY-a.top:n-a.left;r=Math.max(0,Math.min(d||c,r));var i=r/c;return u&&(i=1-i),t&&(i=1-i),y(i,0,!0)},y=function(e,t){void 0===t&&(t=0),e>1&&(e=1);var n=Math.round(1e3*e)/10+"%";return(!f||f>=e)&&(h?i.removeClass(p,"animated"):(i.addClass(p,"animated"),i.css(p,"transition-duration",(t||0)+"ms")),i.css(p,"width",n)),e},w=function(e){return Math.max(0,Math.min(c,u?(1-e)*l:e*s))},b={max:function(e){f=e},disable:function(e){n=e},slide:function(e,t,n){g(),n&&m(e),y(e,t)},disableAnimation:function(t,n){h=t!==!1,i.toggleClass(e,"no-animation",!!n)}};return g(),r.on(e,"mousedown.sld touchstart",function(t){if(t.preventDefault(),!n){var a=o(m,100);g(),b.dragging=!0,i.addClass(e,"is-dragging"),m(v(t)),r.on(document,"mousemove.sld touchmove.sld",function(e){e.preventDefault(),a(v(e))}),r.one(document,"mouseup touchend",function(){b.dragging=!1,i.removeClass(e,"is-dragging"),r.off(document,"mousemove.sld touchmove.sld")})}}),b};t.exports=a},{"../../common":1,bean:34}],30:[function(e,t,n){function r(e){var t=document.createElement("textarea");t.value=e,t.style.opacity=0,t.style.position="absolute",document.body.appendChild(t),t.select();var n=document.execCommand("copy");if(document.body.removeChild(t),!n)throw new Error("Unsuccessfull")}t.exports=function(e,t,n){try{r(e),t()}catch(i){n(i)}}},{}],31:[function(e,t,n){"use strict";function r(e,t,n){t&&t.embed&&(t.embed=i({},v.defaults.embed,t.embed));var r=!1;try{"undefined"==typeof v.conf.storage&&"object"==typeof window.localStorage&&(window.localStorage.flowplayerTestStorage="test",r=!0)}catch(s){}var l,p,h=e,g=i({},v.defaults,v.conf,t),m={},b=h.className,I=new w;u.addClass(h,"is-loading"),u.toggleClass(h,"no-flex",!v.support.flex),u.toggleClass(h,"no-svg",!v.support.svg);try{m=v.conf.storage||(r?window.localStorage:m)}catch(M){}if(g.volume="true"===m.muted?0:g.volume!==v.defaults.volume?g.volume:isNaN(m.volume)?g.volume:m.volume,g.debug=!!m.flowplayerDebug||g.debug,g.aspectRatio&&"string"==typeof g.aspectRatio){var C=g.aspectRatio.split(/[:\/]/);g.ratio=C[1]/C[0]}var A=h.currentStyle&&"rtl"===h.currentStyle.direction||window.getComputedStyle&&null!==window.getComputedStyle(h,null)&&"rtl"===window.getComputedStyle(h,null).getPropertyValue("direction");A&&u.addClass(h,"is-rtl");var S={conf:g,currentSpeed:1,volumeLevel:g.muted?0:"undefined"==typeof g.volume?1*m.volume:g.volume,video:{},disabled:!1,finished:!1,loading:!1,muted:"true"==m.muted||g.muted,paused:!1,playing:!1,ready:!1,splash:!1,rtl:A,hijack:function(e){try{S.engine.suspendEngine()}catch(t){}S.hijacked=e},release:function(){try{S.engine.resumeEngine()}catch(e){}S.hijacked=!1},debug:function(){g.debug&&console.log.apply(console,["DEBUG"].concat([].slice.call(arguments)))},load:function(e,t){if(!S.error&&!S.loading){S.video={},S.finished=!1,e=e||g.clip,e=i({},I.resolve(e,g.clip.sources)),(S.playing||S.engine)&&(e.autoplay=!0);var n=E(e);if(!n)return setTimeout(function(){S.trigger("error",[S,{code:v.support.flashVideo?5:10}])})&&S;if(!n.engineName)throw new Error("engineName property of factory should be exposed");if(S.engine&&n.engineName===S.engine.engineName||(S.ready=!1,S.engine&&(S.engine.unload(),S.conf.autoplay=!0),p=S.engine=n(S,h),S.one("ready",function(){setTimeout(function(){S.muted?S.mute(!0,!0):p.volume(S.volumeLevel)})})),i(e,p.pick(e.sources.filter(function(e){return e.engine?e.engine===p.engineName:!0}))),e.src){var r=S.trigger("load",[S,e,p],!0);r.defaultPrevented?S.loading=!1:(S.ready=!1,p.load(e),o(e)&&(t=e),t&&S.one("ready",t))}return S}},pause:function(e){return S.hijacked?S.hijacked.pause(e)|S:(!S.ready||S.seeking||S.loading||(p.pause(),S.one("pause",e)),S)},resume:function(){var e=S.trigger("beforeresume",[S],!0);if(!e.defaultPrevented)return S.hijacked?S.hijacked.resume()|S:(S.ready&&S.paused&&(p.resume(),S.finished&&(S.trigger("resume",[S]),S.finished=!1)),S)},toggle:function(){return S.ready?S.paused?S.resume():S.pause():S.load()},seek:function(e,t){if("boolean"==typeof e){var n=S.conf.seekStep||.1*S.video.duration;e=S.video.time+(e?n:-n),e=Math.min(Math.max(e,0),S.video.duration-.1)}if("undefined"==typeof e)return S;if(S.hijacked)return S.hijacked.seek(e,t)|S;if(S.ready){l=e;var r=S.trigger("beforeseek",[S,e],!0);r.defaultPrevented?(S.seeking=!1,u.toggleClass(h,"is-seeking",S.seeking)):(p.seek(e),o(t)&&S.one("seek",t))}return S},seekTo:function(e,t){return void 0===e?S.seek(l,t):void 0!==S.video.seekOffset?S.seek(S.video.seekOffset+.1*(S.video.duration-S.video.seekOffset)*e,t):S.seek(.1*S.video.duration*e,t)},mute:function(e,t){return void 0===e&&(e=!S.muted),S.muted=e,t||(m.muted=e,m.volume=isNaN(m.volume)?g.volume:m.volume),"undefined"!=typeof p.mute?p.mute(e):(S.volume(e?0:m.volume,!0),S.trigger("mute",[S,e])),S},volume:function(e,t){return S.ready&&(e=Math.min(Math.max(e,0),1),t||(m.volume=e),p.volume(e)),S},speed:function(e,t){return S.ready&&("boolean"==typeof e&&(e=g.speeds[g.speeds.indexOf(S.currentSpeed)+(e?1:-1)]||S.currentSpeed),p.speed(e),t&&h.one("speed",t)),S},stop:function(){return S.ready&&(S.pause(),!S.live||S.dvr?S.seek(0,function(){S.trigger("stop",[S])}):S.trigger("stop",[S])),S},unload:function(){return g.splash?(S.trigger("unload",[S]),p&&(p.unload(),S.engine=p=0)):S.stop(),S},shutdown:function(){S.unload(),S.trigger("shutdown",[S]),a.off(h),delete f[h.getAttribute("data-flowplayer-instance-id")],h.removeAttribute("data-flowplayer-instance-id")},disable:function(e){return void 0===e&&(e=!S.disabled),e!=S.disabled&&(S.disabled=e,S.trigger("disable",e)),S},registerExtension:function(e,t){e=e||[],t=t||[],"string"==typeof e&&(e=[e]),"string"==typeof t&&(t=[t]),e.forEach(function(e){S.extensions.js.push(e)}),t.forEach(function(e){S.extensions.css.push(e)})}};S.conf=i(S.conf,g),S.extensions={js:[],css:[]},v.extensions.forEach(function(e){S.registerExtension(e[0],e[1])}),c(S);var E=function(e){var t,n=v.engines;if(g.engine){var r=n.filter(function(e){return e.engineName===g.engine})[0];if(r&&e.sources.some(function(e){return e.engine&&e.engine!==r.engineName?!1:r.canPlay(e.type,S.conf)}))return r}return g.enginePreference&&(n=v.engines.filter(function(e){return g.enginePreference.indexOf(e.engineName)>-1}).sort(function(e,t){return g.enginePreference.indexOf(e.engineName)-g.enginePreference.indexOf(t.engineName)})),e.sources.some(function(e){var r=n.filter(function(t){return e.engine&&e.engine!==t.engineName?!1:t.canPlay(e.type,S.conf)}).shift();return r&&(t=r),!!r}),t};return h.getAttribute("data-flowplayer-instance-id")||(h.setAttribute("data-flowplayer-instance-id",y++),S.on("boot",function(){var e=v.support;(g.splash||u.hasClass(h,"is-splash")||!e.firstframe)&&(S.forcedSplash=!g.splash&&!u.hasClass(h,"is-splash"),S.splash=!0,g.splash||(g.splash=!0),u.addClass(h,"is-splash")),g.splash&&u.find("video",h).forEach(u.removeNode),(g.dvr||g.live||u.hasClass(h,"is-live"))&&(S.live=g.live=!0,S.dvr=g.dvr=!!g.dvr||u.hasClass(h,"is-dvr"),u.addClass(h,"is-live"),u.toggleClass(h,"is-dvr",S.dvr)),d.forEach(function(e){e(S,h)}),f.push(S),g.splash?S.unload():S.load(),g.disabled&&S.disable(),S.one("ready",n),S.one("shutdown",function(){h.className=b})}).on("load",function(e,t,n){g.splash&&u.find(".flowplayer.is-ready,.flowplayer.is-loading").forEach(function(e){var t=e.getAttribute("data-flowplayer-instance-id");if(t!==h.getAttribute("data-flowplayer-instance-id")){var n=f[Number(t)];n&&n.conf.splash&&n.unload()}}),u.addClass(h,"is-loading"),t.loading=!0,("undefined"!=typeof n.live||"undefined"!=typeof n.dvr)&&(u.toggleClass(h,"is-live",n.dvr||n.live),u.toggleClass(h,"is-dvr",!!n.dvr),t.live=n.dvr||n.live,t.dvr=!!n.dvr)}).on("ready",function(e,t,n){n.time=0,t.video=n,u.removeClass(h,"is-loading"),t.loading=!1,t.muted?t.mute(!0,!0):t.volume(t.volumeLevel);var r=t.conf.hlsFix&&/mpegurl/i.exec(n.type);u.toggleClass(h,"hls-fix",!!r)}).on("unload",function(){u.removeClass(h,"is-loading"),S.loading=!1}).on("ready unload",function(e){var t="ready"==e.type;u.toggleClass(h,"is-splash",!t),u.toggleClass(h,"is-ready",t),S.ready=t,S.splash=!t}).on("progress",function(e,t,n){t.video.time=n}).on("buffer",function(e,t,n){t.video.buffer="number"==typeof n?n:n.length?n[n.length-1].end:0}).on("speed",function(e,t,n){t.currentSpeed=n}).on("volume",function(e,t,n){t.volumeLevel=Math.round(100*n)/100,t.muted&&n&&t.mute(!1)}).on("beforeseek seek",function(e){S.seeking="beforeseek"==e.type,u.toggleClass(h,"is-seeking",S.seeking)}).on("ready pause resume unload finish stop",function(e){S.paused=/pause|finish|unload|stop/.test(e.type),S.paused=S.paused||"ready"===e.type&&!g.autoplay&&!S.playing,S.playing=!S.paused,u.toggleClass(h,"is-paused",S.paused),u.toggleClass(h,"is-playing",S.playing),S.load.ed||S.pause()}).on("finish",function(){S.finished=!0}).on("error",function(){})),S.trigger("boot",[S,h]),S}var i=e("extend-object"),o=e("is-function"),a=e("bean"),s=e("./ext/ui/slider"),l=e("./ext/ui/bar-slider"),u=e("./common"),c=e("./ext/events"),f=[],d=[],p=window.onbeforeunload;window.onbeforeunload=function(e){return f.forEach(function(e){e.conf.splash?e.unload():e.bind("error",function(){u.find(".flowplayer.is-error .fp-message").forEach(u.removeNode)})}),p?p(e):void 0};var h=/Safari/.exec(navigator.userAgent)&&!/Chrome/.exec(navigator.userAgent),g=/(\d+\.\d+) Safari/.exec(navigator.userAgent),m=g?Number(g[1]):100,v=t.exports=function(e,t,n){if(o(e))return d.push(e);if("number"==typeof e||"undefined"==typeof e)return f[e||0];if(e.nodeType){if(null!==e.getAttribute("data-flowplayer-instance-id"))return f[e.getAttribute("data-flowplayer-instance-id")];if(!t)return;return r(e,t,n)}if(e.jquery)return v(e[0],t,n);if("string"==typeof e){var i=u.find(e)[0];return i&&v(i,t,n)}};i(v,{version:"7.2.7",engines:[],engine:function(e){return v.engines.filter(function(t){return t.engineName===e})[0]},extensions:[],conf:{},set:function(e,t){"string"==typeof e?v.conf[e]=t:i(v.conf,e)},registerExtension:function(e,t){v.extensions.push([e,t])},support:{},defaults:{debug:!1,disabled:!1,fullscreen:window==window.top,keyboard:!0,ratio:9/16,adaptiveRatio:!1,rtmp:0,proxy:"best",hlsQualities:!0,seekStep:!1,splash:!1,live:!1,livePositionOffset:120,swf:"//releases.flowplayer.org/7.2.7/commercial/flowplayer.swf",swfHls:"//releases.flowplayer.org/7.2.7/commercial/flowplayerhls.swf",speeds:[.25,.5,1,1.5,2],tooltip:!0,mouseoutTimeout:5e3,mutedAutoplay:!0,clickToUnMute:!0,volume:1,errors:["","Video loading aborted","Network error","Video not properly encoded","Video file not found","Unsupported video","Skin not found","SWF file not found","Subtitles not found","Invalid RTMP URL","Unsupported video format. Try installing Adobe Flash."],errorUrls:["","","","","","","","","","","http://get.adobe.com/flashplayer/"],playlist:[],hlsFix:h&&8>m,disableInline:!1},bean:a,common:u,slider:s,barSlider:l,extend:i});var y=0,w=e("./ext/resolve");if("undefined"!=typeof window.jQuery){var b=window.jQuery;b(function(){"function"==typeof b.fn.flowplayer&&b('.flowplayer:has(video:not(.fp-engine),script[type="application/json"])').flowplayer()});var I=function(e){if(!e.length)return{};var t=e.data()||{},n={};return b.each(["autoplay","loop","preload","poster"],function(r,i){var o=e.attr(i);void 0!==o&&-1!==["autoplay","poster"].indexOf(i)?n[i]=o?o:!0:void 0!==o&&(t[i]=o?o:!0)}),e[0].autoplay=e[0].preload=!1,t.subtitles=e.find("track").map(function(){var e=b(this);return{src:e.attr("src"),kind:e.attr("kind"),label:e.attr("label"),srclang:e.attr("srclang"),default:e.prop("default")}}).get(),t.sources=(new w).sourcesFromVideoTag(e,b),i(n,{clip:t})};b.fn.flowplayer=function(e,t){return this.each(function(){"string"==typeof e&&(e={swf:e}),o(e)&&(t=e,e={});var n=b(this),i=n.find('script[type="application/json"]'),a=i.length?JSON.parse(i.text()):I(n.find("video")),s=b.extend({},e||{},a,n.data()),l=r(this,s,t);c.EVENTS.forEach(function(e){l.on(e+".jquery",function(e){n.trigger.call(n,e.type,e.detail&&e.detail.args)})}),n.data("flowplayer",l)})}}},{"./common":1,"./ext/events":12,"./ext/resolve":21,"./ext/ui/bar-slider":28,"./ext/ui/slider":29,bean:34,"extend-object":39,"is-function":42}],32:[function(e,t,n){e("es5-shim");var r=t.exports=e("./flowplayer");e("./ext/support"),e("./engine/embed"),e("./engine/hlsjs"),e("./engine/html5"),e("./engine/flash"),e("./ext/ui"),e("./ext/message"),e("./ext/keyboard"),e("./ext/playlist"),e("./ext/cuepoint"),e("./ext/subtitle"),e("./ext/analytics"),e("./ext/share"),e("./ext/facebook"),e("./ext/twitter"),e("./ext/embed"),e("./ext/airplay"),e("./ext/chromecast"),e("./ext/qsel"),e("./ext/menu"),e("./ext/fullscreen"),e("./ext/mobile"),r(function(e,t){function n(e){var t=document.createElement("a");return t.href=e,u.hostname(t.hostname)}function i(e){var t="ab.ca,ac.ac,ac.ae,ac.at,ac.be,ac.cn,ac.il,ac.in,ac.jp,ac.kr,ac.sg,ac.th,ac.uk,ad.jp,adm.br,adv.br,ah.cn,am.br,arq.br,art.br,arts.ro,asn.au,asso.fr,asso.mc,bc.ca,bel.tr,bio.br,biz.pl,biz.tr,bj.cn,br.com,cn.com,cng.br,cnt.br,co.ac,co.at,co.de,co.gl,co.hk,co.id,co.il,co.in,co.jp,co.kr,co.mg,co.ms,co.nz,co.th,co.uk,co.ve,co.vi,co.za,com.ag,com.ai,com.ar,com.au,com.br,com.cn,com.co,com.cy,com.de,com.do,com.ec,com.es,com.fj,com.fr,com.gl,com.gt,com.hk,com.hr,com.hu,com.kg,com.ki,com.lc,com.mg,com.mm,com.ms,com.mt,com.mu,com.mx,com.my,com.na,com.nf,com.ng,com.ni,com.pa,com.ph,com.pl,com.pt,com.qa,com.ro,com.ru,com.sb,com.sc,com.sg,com.sv,com.tr,com.tw,com.ua,com.uy,com.ve,com.vn,cp.tz,cq.cn,de.com,de.org,ecn.br,ed.jp,edu.au,edu.cn,edu.hk,edu.mm,edu.my,edu.pl,edu.pt,edu.qa,edu.sg,edu.tr,edu.tw,eng.br,ernet.in,esp.br,etc.br,eti.br,eu.com,eu.int,eu.lv,firm.in,firm.ro,fm.br,fot.br,fst.br,g12.br,gb.com,gb.net,gd.cn,gen.in,go.jp,go.kr,go.th,gov.au,gov.az,gov.br,gov.cn,gov.il,gov.in,gov.mm,gov.my,gov.qa,gov.sg,gov.tr,gov.tw,gov.uk,govt.nz,gr.jp,gs.cn,gv.ac,gv.at,gx.cn,gz.cn,he.cn,hi.cn,hk.cn,hl.cn,hu.com,id.au,idv.tw,in.th,in.ua,ind.br,ind.in,inf.br,info.pl,info.ro,info.tr,info.ve,iwi.nz,jl.cn,jor.br,js.cn,jus.br,k12.il,k12.tr,kr.com,lel.br,lg.jp,ln.cn,ltd.uk,maori.nz,mb.ca,me.uk,med.br,mi.th,mil.br,mil.uk,mo.cn,mod.uk,muni.il,nb.ca,ne.jp,ne.kr,net.ag,net.ai,net.au,net.br,net.cn,net.do,net.gl,net.hk,net.il,net.in,net.kg,net.ki,net.lc,net.mg,net.mm,net.mu,net.ni,net.nz,net.pl,net.ru,net.sb,net.sc,net.sg,net.th,net.tr,net.tw,net.uk,net.ve,nf.ca,nhs.uk,nm.cn,nm.kr,no.com,nom.br,nom.ni,nom.ro,ns.ca,nt.ca,nt.ro,ntr.br,nx.cn,odo.br,off.ai,on.ca,or.ac,or.at,or.jp,or.kr,or.th,org.ag,org.ai,org.au,org.br,org.cn,org.do,org.es,org.gl,org.hk,org.in,org.kg,org.ki,org.lc,org.mg,org.mm,org.ms,org.nf,org.ng,org.ni,org.nz,org.pl,org.ro,org.ru,org.sb,org.sc,org.sg,org.tr,org.tw,org.uk,org.ve,pe.ca,plc.uk,police.uk,ppg.br,presse.fr,pro.br,psc.br,psi.br,qc.ca,qc.com,qh.cn,rec.br,rec.ro,res.in,sa.com,sc.cn,sch.uk,se.com,se.net,sh.cn,sk.ca,slg.br,sn.cn,store.ro,tj.cn,tm.fr,tm.mc,tm.ro,tmp.br,tur.br,tv.br,tv.tr,tw.cn,uk.com,uk.net,us.com,uy.com,vet.br,waw.pl,web.ve,www.ro,xj.cn,xz.cn,yk.ca,yn.cn,zj.cn,zlg.br".split(",");e=e.toLowerCase();var n=e.split("."),r=n.length;if(2>r||/^\d+$/.test(n[r-1]))return e;var i=n.slice(-2).join(".");return r>=3&&t.indexOf(i)>=0?n.slice(-3).join("."):i}function o(e,t){t=i(t);for(var n=0,r=t.length-1;r>=0;r--)n+=0x65cb98ae4ad1ec*t.charCodeAt(r);for(n=(""+n).substring(0,7),r=0;r<e.length;r++)if(n===e[r].substring(1,8))return 1}var a=function(e,t){var n=e.className.split(" ");-1===n.indexOf(t)&&(e.className+=" "+t)},s=function(e){return"none"!==window.getComputedStyle(e).display},l=e.conf,u=r.common,c=u.createElement,f=l.swf.indexOf("flowplayer.org")&&l.e&&t.getAttribute("data-origin"),d=f?n(f):u.hostname(),p=(document,l.key);if("file:"==location.protocol&&(d="localhost"),e.load.ed=1,l.hostname=d,l.origin=f||location.href,f&&a(t,"is-embedded"),"string"==typeof p&&(p=p.split(/,\s*/)),p&&"function"==typeof o&&o(p,d)){if(l.logo){var h=u.find(".fp-player",t)[0],g=l.logo.href||"",m=l.logo.src||l.logo,v=c("a",{className:"fp-logo",href:g});f&&(v.href=v.href||f),l.embed&&l.embed.popup&&(v.target="_blank");var y=c("img",{src:m});v.appendChild(y),(h||t).appendChild(v)}}else{var v=c("a",{onclick:""}),h=u.find(".fp-player",t)[0];(h||t).appendChild(v);var w=c("div",{className:"fp-context-menu fp-menu"},'<strong>&copy; 2018 Flowplayer AB</strong><a href="https://flowplayer.com/hello/?from=player">About Flowplayer</a><a href="https://flowplayer.com/license">GPL based license</a>'),b=window.location.href.indexOf("localhost");7!==b&&(h||t).appendChild(w),e.on("pause resume finish unload ready",function(e,n){var r=-1;if(n.video.src)for(var i=[["org","flowplayer","drive"],["org","flowplayer","my"],["org","flowplayer","cdn"],["com","flowplayer","cdn"]],o=0;o<i.length&&(r=n.video.src.indexOf("://"+i[o].reverse().join(".")),-1===r);o++);if(/pause|resume/.test(e.type)&&"flash"!=n.engine.engineName&&4!=r&&5!=r){var a={display:"block",position:"absolute",left:"16px",bottom:"56px",zIndex:99999,width:"120px",height:"27px",backgroundImage:"url("+[".png","fplogo","/",".com","foliovision","//"].reverse().join("")+")"};for(var l in a)a.hasOwnProperty(l)&&(v.style[l]=a[l]);n.load.ed=s(v)&&(7===b||w.parentNode==t||w.parentNode==h),n.load.ed||n.pause()}else v.style.display="none"})}})},{"./engine/embed":2,"./engine/flash":3,"./engine/hlsjs":4,"./engine/html5":6,"./ext/airplay":7,"./ext/analytics":8,"./ext/chromecast":9,"./ext/cuepoint":10,"./ext/embed":11,"./ext/facebook":13,"./ext/fullscreen":14,"./ext/keyboard":15,"./ext/menu":16,"./ext/message":17,"./ext/mobile":18,"./ext/playlist":19,"./ext/qsel":20,"./ext/share":22,"./ext/subtitle":23,"./ext/support":25,"./ext/twitter":26,"./ext/ui":27,"./flowplayer":31,"es5-shim":38}],33:[function(e,t,n){"use strict";function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");-1===n&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function i(e){var t=r(e),n=t[0],i=t[1];return 3*(n+i)/4-i}function o(e,t,n){return 3*(t+n)/4-n}function a(e){for(var t,n=r(e),i=n[0],a=n[1],s=new d(o(e,i,a)),l=0,u=a>0?i-4:i,c=0;u>c;c+=4)t=f[e.charCodeAt(c)]<<18|f[e.charCodeAt(c+1)]<<12|f[e.charCodeAt(c+2)]<<6|f[e.charCodeAt(c+3)],s[l++]=t>>16&255,s[l++]=t>>8&255,s[l++]=255&t;return 2===a&&(t=f[e.charCodeAt(c)]<<2|f[e.charCodeAt(c+1)]>>4,s[l++]=255&t),1===a&&(t=f[e.charCodeAt(c)]<<10|f[e.charCodeAt(c+1)]<<4|f[e.charCodeAt(c+2)]>>2,s[l++]=t>>8&255,s[l++]=255&t),s}function s(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function l(e,t,n){for(var r,i=[],o=t;n>o;o+=3)r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),i.push(s(r));return i.join("")}function u(e){for(var t,n=e.length,r=n%3,i=[],o=16383,a=0,s=n-r;s>a;a+=o)i.push(l(e,a,a+o>s?s:a+o));return 1===r?(t=e[n-1],i.push(c[t>>2]+c[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(c[t>>10]+c[t>>4&63]+c[t<<2&63]+"=")),i.join("")}n.byteLength=i,n.toByteArray=a,n.fromByteArray=u;for(var c=[],f=[],d="undefined"!=typeof Uint8Array?Uint8Array:Array,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,g=p.length;g>h;++h)c[h]=p[h],f[p.charCodeAt(h)]=h;f["-".charCodeAt(0)]=62,f["_".charCodeAt(0)]=63},{}],34:[function(t,n,r){!function(t,r,i){"undefined"!=typeof n&&n.exports?n.exports=i():"function"==typeof e&&e.amd?e(i):r[t]=i()}("bean",this,function(e,t){e=e||"bean",t=t||this;var n,r=window,i=t[e],o=/[^\.]*(?=\..*)\.|.*/,a=/\..*/,s="addEventListener",l="removeEventListener",u=document||{},c=u.documentElement||{},f=c[s],d=f?s:"attachEvent",p={},h=Array.prototype.slice,g=function(e,t){return e.split(t||" ")},m=function(e){return"string"==typeof e},v=function(e){return"function"==typeof e},y="click dblclick mouseup mousedown contextmenu mousewheel mousemultiwheel DOMMouseScroll mouseover mouseout mousemove selectstart selectend keydown keypress keyup orientationchange focus blur change reset select submit load unload beforeunload resize move DOMContentLoaded readystatechange message error abort scroll ",w="show input invalid touchstart touchmove touchend touchcancel gesturestart gesturechange gestureend textinput readystatechange pageshow pagehide popstate hashchange offline online afterprint beforeprint dragstart dragenter dragover dragleave drag drop dragend loadstart progress suspend emptied stalled loadmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate play pause ratechange volumechange cuechange checking noupdate downloading cached updateready obsolete ",b=function(e,t,n){for(n=0;n<t.length;n++)t[n]&&(e[t[n]]=1);return e}({},g(y+(f?w:""))),I=function(){var e="compareDocumentPosition"in c?function(e,t){return t.compareDocumentPosition&&16===(16&t.compareDocumentPosition(e))}:"contains"in c?function(e,t){return t=9===t.nodeType||t===window?c:t,t!==e&&t.contains(e)}:function(e,t){for(;e=e.parentNode;)if(e===t)return 1;return 0},t=function(t){var n=t.relatedTarget;return n?n!==this&&"xul"!==n.prefix&&!/document/.test(this.toString())&&!e(n,this):null==n};return{mouseenter:{base:"mouseover",condition:t},mouseleave:{base:"mouseout",condition:t},mousewheel:{base:/Firefox/.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel"}}}(),M=function(){var e=g("altKey attrChange attrName bubbles cancelable ctrlKey currentTarget detail eventPhase getModifierState isTrusted metaKey relatedNode relatedTarget shiftKey srcElement target timeStamp type view which propertyName"),t=e.concat(g("button buttons clientX clientY dataTransfer fromElement offsetX offsetY pageX pageY screenX screenY toElement")),n=t.concat(g("wheelDelta wheelDeltaX wheelDeltaY wheelDeltaZ axis")),i=e.concat(g("char charCode key keyCode keyIdentifier keyLocation location")),o=e.concat(g("data")),a=e.concat(g("touches targetTouches changedTouches scale rotation")),s=e.concat(g("data origin source")),l=e.concat(g("state")),f=/over|out/,d=[{reg:/key/i,fix:function(e,t){return t.keyCode=e.keyCode||e.which,i}},{reg:/click|mouse(?!(.*wheel|scroll))|menu|drag|drop/i,fix:function(e,n,r){return n.rightClick=3===e.which||2===e.button,n.pos={x:0,y:0},e.pageX||e.pageY?(n.clientX=e.pageX,n.clientY=e.pageY):(e.clientX||e.clientY)&&(n.clientX=e.clientX+u.body.scrollLeft+c.scrollLeft,n.clientY=e.clientY+u.body.scrollTop+c.scrollTop),f.test(r)&&(n.relatedTarget=e.relatedTarget||e[("mouseover"==r?"from":"to")+"Element"]),t}},{reg:/mouse.*(wheel|scroll)/i,fix:function(){return n}},{reg:/^text/i,fix:function(){return o}},{reg:/^touch|^gesture/i,fix:function(){return a}},{reg:/^message$/i,fix:function(){return s}},{reg:/^popstate$/i,fix:function(){return l}},{reg:/.*/,fix:function(){return e}}],p={},h=function(e,t,n){if(arguments.length&&(e=e||((t.ownerDocument||t.document||t).parentWindow||r).event,this.originalEvent=e,this.isNative=n,this.isBean=!0,e)){var i,o,a,s,l,u=e.type,c=e.target||e.srcElement;if(this.target=c&&3===c.nodeType?c.parentNode:c,n){if(l=p[u],!l)for(i=0,o=d.length;o>i;i++)if(d[i].reg.test(u)){p[u]=l=d[i].fix;break}for(s=l(e,this,u),i=s.length;i--;)!((a=s[i])in this)&&a in e&&(this[a]=e[a])}}};return h.prototype.preventDefault=function(){this.originalEvent.preventDefault?this.originalEvent.preventDefault():this.originalEvent.returnValue=!1},h.prototype.stopPropagation=function(){this.originalEvent.stopPropagation?this.originalEvent.stopPropagation():this.originalEvent.cancelBubble=!0},h.prototype.stop=function(){this.preventDefault(),this.stopPropagation(),this.stopped=!0},h.prototype.stopImmediatePropagation=function(){this.originalEvent.stopImmediatePropagation&&this.originalEvent.stopImmediatePropagation(),this.isImmediatePropagationStopped=function(){return!0}},h.prototype.isImmediatePropagationStopped=function(){return this.originalEvent.isImmediatePropagationStopped&&this.originalEvent.isImmediatePropagationStopped()},h.prototype.clone=function(e){var t=new h(this,this.element,this.isNative);return t.currentTarget=e,t},h}(),C=function(e,t){return f||t||e!==u&&e!==r?e:c},A=function(){var e=function(e,t,n,r){var i=function(n,i){return t.apply(e,r?h.call(i,n?0:1).concat(r):i)},o=function(n,r){return t.__beanDel?t.__beanDel.ft(n.target,e):r},a=n?function(e){var t=o(e,this);return n.apply(t,arguments)?(e&&(e.currentTarget=t),i(e,arguments)):void 0}:function(e){return t.__beanDel&&(e=e.clone(o(e))),i(e,arguments)};return a.__beanDel=t.__beanDel,a},t=function(t,n,r,i,o,a,s){var l,u=I[n];"unload"==n&&(r=N(x,t,n,r,i)),u&&(u.condition&&(r=e(t,r,u.condition,a)),n=u.base||n),this.isNative=l=b[n]&&!!t[d],this.customType=!f&&!l&&n,this.element=t,this.type=n,this.original=i,this.namespaces=o,this.eventType=f||l?n:"propertychange",this.target=C(t,l),this[d]=!!this.target[d],this.root=s,this.handler=e(t,r,null,a)};return t.prototype.inNamespaces=function(e){var t,n,r=0;if(!e)return!0;if(!this.namespaces)return!1;for(t=e.length;t--;)for(n=this.namespaces.length;n--;)e[t]==this.namespaces[n]&&r++;return e.length===r},t.prototype.matches=function(e,t,n){return!(this.element!==e||t&&this.original!==t||n&&this.handler!==n)},t}(),S=function(){var e={},t=function(n,r,i,o,a,s){var l=a?"r":"$";if(r&&"*"!=r){var u,c=0,f=e[l+r],d="*"==n;if(!f)return;for(u=f.length;u>c;c++)if((d||f[c].matches(n,i,o))&&!s(f[c],f,c,r))return}else for(var p in e)p.charAt(0)==l&&t(n,p.substr(1),i,o,a,s)},n=function(t,n,r,i){var o,a=e[(i?"r":"$")+n];if(a)for(o=a.length;o--;)if(!a[o].root&&a[o].matches(t,r,null))return!0;return!1},r=function(e,n,r,i){var o=[];return t(e,n,r,null,i,function(e){return o.push(e)}),o},i=function(t){var n=!t.root&&!this.has(t.element,t.type,null,!1),r=(t.root?"r":"$")+t.type;return(e[r]||(e[r]=[])).push(t),n},o=function(n){t(n.element,n.type,null,n.handler,n.root,function(t,n,r){return n.splice(r,1),t.removed=!0,0===n.length&&delete e[(t.root?"r":"$")+t.type],!1})},a=function(){var t,n=[];for(t in e)"$"==t.charAt(0)&&(n=n.concat(e[t]));return n};return{has:n,get:r,put:i,del:o,entries:a}}(),E=function(e){n=arguments.length?e:u.querySelectorAll?function(e,t){return t.querySelectorAll(e)}:function(){throw new Error("Bean: No selector engine installed")}},j=function(e,t){if(f||!t||!e||e.propertyName=="_on"+t){var n=S.get(this,t||e.type,null,!1),r=n.length,i=0;for(e=new M(e,this,!0),t&&(e.type=t);r>i&&!e.isImmediatePropagationStopped();i++)n[i].removed||n[i].handler.call(this,e)}},D=f?function(e,t,n){e[n?s:l](t,j,!1)}:function(e,t,n,r){var i;n?(S.put(i=new A(e,r||t,function(t){j.call(e,t,r)},j,null,null,!0)),r&&null==e["_on"+r]&&(e["_on"+r]=0),i.target.attachEvent("on"+i.eventType,i.handler)):(i=S.get(e,r||t,j,!0)[0],i&&(i.target.detachEvent("on"+i.eventType,i.handler),S.del(i)))},N=function(e,t,n,r,i){return function(){r.apply(this,arguments),e(t,n,i)}},x=function(e,t,n,r){var i,o,s=t&&t.replace(a,""),l=S.get(e,s,null,!1),u={};for(i=0,o=l.length;o>i;i++)n&&l[i].original!==n||!l[i].inNamespaces(r)||(S.del(l[i]),!u[l[i].eventType]&&l[i][d]&&(u[l[i].eventType]={t:l[i].eventType,c:l[i].type}));for(i in u)S.has(e,u[i].t,null,!1)||D(e,u[i].t,!1,u[i].c)},L=function(e,t){var r=function(t,r){for(var i,o=m(e)?n(e,r):e;t&&t!==r;t=t.parentNode)for(i=o.length;i--;)if(o[i]===t)return t},i=function(e){var n=r(e.target,this);n&&t.apply(n,arguments)};return i.__beanDel={ft:r,selector:e},i},T=f?function(e,t,n){var i=u.createEvent(e?"HTMLEvents":"UIEvents");i[e?"initEvent":"initUIEvent"](t,!0,!0,r,1),n.dispatchEvent(i)}:function(e,t,n){n=C(n,e),e?n.fireEvent("on"+t,u.createEventObject()):n["_on"+t]++},Z=function(e,t,n){var r,i,s,l,u=m(t);if(u&&t.indexOf(" ")>0){for(t=g(t),l=t.length;l--;)Z(e,t[l],n);return e}if(i=u&&t.replace(a,""),i&&I[i]&&(i=I[i].base),!t||u)(s=u&&t.replace(o,""))&&(s=g(s,".")),x(e,i,n,s);else if(v(t))x(e,null,t);else for(r in t)t.hasOwnProperty(r)&&Z(e,r,t[r]);return e},P=function(e,t,r,i){var s,l,u,c,f,m,y;{if(void 0!==r||"object"!=typeof t){for(v(r)?(f=h.call(arguments,3),i=s=r):(s=i,f=h.call(arguments,4),i=L(r,s,n)),u=g(t),this===p&&(i=N(Z,e,t,i,s)),c=u.length;c--;)y=S.put(m=new A(e,u[c].replace(a,""),i,s,g(u[c].replace(o,""),"."),f,!1)),m[d]&&y&&D(e,m.eventType,!0,m.customType);return e}for(l in t)t.hasOwnProperty(l)&&P.call(this,e,l,t[l])}},k=function(e,t,n,r){return P.apply(null,m(n)?[e,n,t,r].concat(arguments.length>3?h.call(arguments,5):[]):h.call(arguments))},Y=function(){return P.apply(p,arguments)},z=function(e,t,n){var r,i,s,l,u,c=g(t);for(r=c.length;r--;)if(t=c[r].replace(a,""),(l=c[r].replace(o,""))&&(l=g(l,".")),l||n||!e[d])for(u=S.get(e,t,null,!1),n=[!1].concat(n),i=0,s=u.length;s>i;i++)u[i].inNamespaces(l)&&u[i].handler.apply(e,n);else T(b[t],t,e);return e},O=function(e,t,n){for(var r,i,o=S.get(t,n,null,!1),a=o.length,s=0;a>s;s++)o[s].original&&(r=[e,o[s].type],(i=o[s].handler.__beanDel)&&r.push(i.selector),r.push(o[s].original),P.apply(null,r));return e},G={on:P,add:k,one:Y,off:Z,remove:Z,clone:O,fire:z,Event:M,setSelectorEngine:E,noConflict:function(){return t[e]=i,this}};if(r.attachEvent){var R=function(){var e,t=S.entries();for(e in t)t[e].type&&"unload"!==t[e].type&&Z(t[e].element,t[e].type);r.detachEvent("onunload",R),r.CollectGarbage&&r.CollectGarbage()};r.attachEvent("onunload",R)}return E(),G})},{}],35:[function(e,t,n){(function(t){"use strict";function r(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}function i(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(i()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=a.prototype):(null===e&&(e=new a(t)),e.length=t),e}function a(e,t,n){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return c(this,e)}return s(this,e,t,n)}function s(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?p(e,t,n,r):"string"==typeof t?f(e,t,n):h(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(0>e)throw new RangeError('"size" argument must not be negative')}function u(e,t,n,r){return l(t),0>=t?o(e,t):void 0!==n?"string"==typeof r?o(e,t).fill(n,r):o(e,t).fill(n):o(e,t)}function c(e,t){if(l(t),e=o(e,0>t?0:0|g(t)),!a.TYPED_ARRAY_SUPPORT)for(var n=0;t>n;++n)e[n]=0;return e}function f(e,t,n){if(("string"!=typeof n||""===n)&&(n="utf8"),!a.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|v(t,n);e=o(e,r);var i=e.write(t,n);return i!==r&&(e=e.slice(0,i)),e}function d(e,t){var n=t.length<0?0:0|g(t.length);e=o(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function p(e,t,n,r){if(t.byteLength,0>n||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),a.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=a.prototype):e=d(e,t),e}function h(e,t){if(a.isBuffer(t)){var n=0|g(t.length);return e=o(e,n),0===e.length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||K(t.length)?o(e,0):d(e,t);if("Buffer"===t.type&&$(t.data))return d(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function g(e){if(e>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),a.alloc(+e)}function v(e,t){if(a.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return X(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var r=!1;if((void 0===t||0>t)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),0>=n)return"";if(n>>>=0,t>>>=0,t>=n)return"";for(e||(e="utf8");;)switch(e){case"hex":return Z(this,t,n);case"utf8":case"utf-8":return N(this,t,n);case"ascii":return L(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return D(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function w(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:-2147483648>n&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),0>n&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(0>n){if(!i)return-1;n=0}if("string"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:I(e,t,n,r,i);if("number"==typeof t)return t=255&t,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):I(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function I(e,t,n,r,i){function o(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,l=t.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}var u;if(i){var c=-1;for(u=n;s>u;u++)if(o(e,u)===o(t,-1===c?0:u-c)){if(-1===c&&(c=u),u-c+1===l)return c*a}else-1!==c&&(u-=u-c),c=-1}else for(n+l>s&&(n=s-l),u=n;u>=0;u--){for(var f=!0,d=0;l>d;d++)if(o(e,u+d)!==o(t,d)){f=!1;break}if(f)return u}return-1}function M(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;r>a;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function C(e,t,n,r){return _(F(t,e.length-n),e,n,r)}function A(e,t,n,r){return _(H(t),e,n,r)}function S(e,t,n,r){return A(e,t,n,r)}function E(e,t,n,r){return _(X(t),e,n,r)}function j(e,t,n,r){return _(V(t,e.length-n),e,n,r)}function D(e,t,n){return 0===t&&n===e.length?Q.fromByteArray(e):Q.fromByteArray(e.slice(t,n))}function N(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;n>i;){var o=e[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(n>=i+s){var l,u,c,f;switch(s){case 1:128>o&&(a=o);break;case 2:l=e[i+1],128===(192&l)&&(f=(31&o)<<6|63&l,f>127&&(a=f));break;case 3:l=e[i+1],u=e[i+2],128===(192&l)&&128===(192&u)&&(f=(15&o)<<12|(63&l)<<6|63&u,f>2047&&(55296>f||f>57343)&&(a=f));break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],128===(192&l)&&128===(192&u)&&128===(192&c)&&(f=(15&o)<<18|(63&l)<<12|(63&u)<<6|63&c,f>65535&&1114112>f&&(a=f))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return x(r)}function x(e){var t=e.length;if(ee>=t)return String.fromCharCode.apply(String,e);for(var n="",r=0;t>r;)n+=String.fromCharCode.apply(String,e.slice(r,r+=ee));return n}function L(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;++i)r+=String.fromCharCode(127&e[i]);return r}function T(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;++i)r+=String.fromCharCode(e[i]);return r}function Z(e,t,n){var r=e.length;(!t||0>t)&&(t=0),(!n||0>n||n>r)&&(n=r);for(var i="",o=t;n>o;++o)i+=B(e[o]);return i}function P(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function k(e,t,n){if(e%1!==0||0>e)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function Y(e,t,n,r,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||o>t)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function z(e,t,n,r){0>t&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);o>i;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function O(e,t,n,r){0>t&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);o>i;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function G(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(0>n)throw new RangeError("Index out of range")}function R(e,t,n,r,i){return i||G(e,t,n,4,34028234663852886e22,-34028234663852886e22),q.write(e,t,n,r,23,4),n+4}function W(e,t,n,r,i){return i||G(e,t,n,8,17976931348623157e292,-17976931348623157e292),q.write(e,t,n,r,52,8),n+8}function U(e){if(e=J(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function J(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function B(e){return 16>e?"0"+e.toString(16):e.toString(16)}function F(e,t){t=t||1/0;for(var n,r=e.length,i=null,o=[],a=0;r>a;++a){if(n=e.charCodeAt(a),n>55295&&57344>n){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(56320>n){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,128>n){if((t-=1)<0)break;o.push(n)}else if(2048>n){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(65536>n){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function H(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function V(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}function X(e){return Q.toByteArray(U(e))}function _(e,t,n,r){for(var i=0;r>i&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function K(e){return e!==e}var Q=e("base64-js"),q=e("ieee754"),$=e("isarray");n.Buffer=a,n.SlowBuffer=m,n.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:r(),n.kMaxLength=i(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,n){return s(null,e,t,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,n){return u(null,e,t,n)},a.allocUnsafe=function(e){return c(null,e)},a.allocUnsafeSlow=function(e){return c(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);o>i;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return r>n?-1:n>r?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!$(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=a.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},a.byteLength=v,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;e>t;t+=2)w(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;e>t;t+=4)w(this,t,t+3),w(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;e>t;t+=8)w(this,t,t+7),w(this,t+1,t+6),w(this,t+2,t+5),w(this,t+3,t+4);return this},a.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?N(this,0,e):y.apply(this,arguments)},a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===a.compare(this,e)},a.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},a.prototype.compare=function(e,t,n,r,i){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),0>t||n>e.length||0>r||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var o=i-r,s=n-t,l=Math.min(o,s),u=this.slice(r,i),c=e.slice(t,n),f=0;l>f;++f)if(u[f]!==c[f]){o=u[f],s=c[f];break}return s>o?-1:o>s?1:0},a.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},a.prototype.indexOf=function(e,t,n){return b(this,e,t,n,!0)},a.prototype.lastIndexOf=function(e,t,n){return b(this,e,t,n,!1)},a.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t=0|t,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(0>n||0>t)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return M(this,e,t,n);case"utf8":case"utf-8":return C(this,e,t,n);case"ascii":return A(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;a.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),e>t&&(t=e);var r;if(a.TYPED_ARRAY_SUPPORT)r=this.subarray(e,t),r.__proto__=a.prototype;else{var i=t-e;r=new a(i,void 0);for(var o=0;i>o;++o)r[o]=this[o+e]}return r},a.prototype.readUIntLE=function(e,t,n){e=0|e,t=0|t,n||k(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},a.prototype.readUIntBE=function(e,t,n){e=0|e,t=0|t,n||k(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUInt8=function(e,t){return t||k(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||k(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||k(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e=0|e,t=0|t,n||k(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e=0|e,t=0|t,n||k(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){t||k(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){t||k(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||k(e,4,this.length),q.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||k(e,4,this.length),q.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||k(e,8,this.length),q.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||k(e,8,this.length),q.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t=0|t,n=0|n,!r){var i=Math.pow(2,8*n)-1;Y(this,e,t,n,i,0)}var o=1,a=0;for(this[t]=255&e;++a<n&&(o*=256);)this[t+a]=e/o&255;return t+n},a.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t=0|t,n=0|n,!r){var i=Math.pow(2,8*n)-1;Y(this,e,t,n,i,0)}var o=n-1,a=1;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=e/a&255;return t+n},a.prototype.writeUInt8=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):z(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):z(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):O(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);Y(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)0>e&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);Y(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)0>e&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):z(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):z(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):O(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return W(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return W(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&n>r&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(0>t)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>r)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&t>n&&r>t)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(1e3>o||!a.TYPED_ARRAY_SUPPORT)for(i=0;o>i;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},a.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);256>i&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e=255&e);if(0>t||this.length<t||this.length<n)throw new RangeError("Out of range index");if(t>=n)return this;t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;n>o;++o)this[o]=e;else{var s=a.isBuffer(e)?e:F(new a(e,r).toString()),l=s.length;for(o=0;n-t>o;++o)this[o+t]=s[o%l]}return this};var te=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":33,ieee754:40,isarray:43}],36:[function(e,t,n){function r(e){function t(e){var t=c();a(t,e)>-1||(t.push(e),f(t))}function n(e){var t=c(),n=a(t,e);-1!==n&&(t.splice(n,1),f(t))}function r(e){return a(c(),e)>-1}function s(e){return r(e)?(n(e),!1):(t(e),!0)}function l(){return e.className}function u(e){var t=c();return t[e]||null}function c(){var t=e.className;return i(t.split(" "),o)}function f(t){var n=t.length;e.className=t.join(" "),p.length=n;for(var r=0;r<t.length;r++)p[r]=t[r];delete t[n]}var d=e.classList;if(d)return d;var p={add:t,remove:n,contains:r,toggle:s,toString:l,length:0,item:u};return p}function i(e,t){for(var n=[],r=0;r<e.length;r++)t(e[r])&&n.push(e[r]);return n}function o(e){return!!e}var a=e("indexof");t.exports=r},{indexof:41}],37:[function(e,t,n){function r(e,t,n,r){return n=window.getComputedStyle,r=n?n(e):e.currentStyle,r?r[t.replace(/-(\w)/gi,function(e,t){return t.toUpperCase()})]:void 0}t.exports=r},{}],38:[function(t,n,r){!function(t,i){"use strict";"function"==typeof e&&e.amd?e(i):"object"==typeof r?n.exports=i():t.returnExports=i()}(this,function(){var e,t,n=Array,r=n.prototype,i=Object,o=i.prototype,a=Function,s=a.prototype,l=String,u=l.prototype,c=Number,f=c.prototype,d=r.slice,p=r.splice,h=r.push,g=r.unshift,m=r.concat,v=r.join,y=s.call,w=s.apply,b=Math.max,I=Math.min,M=o.toString,C="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,A=Function.prototype.toString,S=/^\s*class /,E=function(e){try{var t=A.call(e),n=t.replace(/\/\/.*\n/g,""),r=n.replace(/\/\*[.\s\S]*\*\//g,""),i=r.replace(/\n/gm," ").replace(/ {2}/g," ");return S.test(i)}catch(o){return!1}},j=function(e){try{return E(e)?!1:(A.call(e),!0)}catch(t){return!1}},D="[object Function]",N="[object GeneratorFunction]",e=function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(C)return j(e);if(E(e))return!1;var t=M.call(e);return t===D||t===N},x=RegExp.prototype.exec,L=function(e){try{return x.call(e),!0}catch(t){return!1}},T="[object RegExp]";t=function(e){return"object"!=typeof e?!1:C?L(e):M.call(e)===T};var Z,P=String.prototype.valueOf,k=function(e){try{return P.call(e),!0}catch(t){return!1}},Y="[object String]";Z=function(e){return"string"==typeof e?!0:"object"!=typeof e?!1:C?k(e):M.call(e)===Y};var z=i.defineProperty&&function(){try{var e={};i.defineProperty(e,"x",{enumerable:!1,value:e});for(var t in e)return!1;return e.x===e}catch(n){return!1}}(),O=function(e){var t;return t=z?function(e,t,n,r){!r&&t in e||i.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:n})}:function(e,t,n,r){!r&&t in e||(e[t]=n)},function(n,r,i){for(var o in r)e.call(r,o)&&t(n,o,r[o],i)}}(o.hasOwnProperty),G=function(e){var t=typeof e;return null===e||"object"!==t&&"function"!==t},R=c.isNaN||function(e){return e!==e},W={ToInteger:function(e){var t=+e;return R(t)?t=0:0!==t&&t!==1/0&&t!==-(1/0)&&(t=(t>0||-1)*Math.floor(Math.abs(t))),t},ToPrimitive:function(t){var n,r,i;if(G(t))return t;if(r=t.valueOf,e(r)&&(n=r.call(t),G(n)))return n;if(i=t.toString,e(i)&&(n=i.call(t),G(n)))return n;throw new TypeError},ToObject:function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return i(e)},ToUint32:function(e){return e>>>0}},U=function(){};O(s,{bind:function(t){var n=this;if(!e(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var r,o=d.call(arguments,1),s=function(){if(this instanceof r){var e=w.call(n,this,m.call(o,d.call(arguments)));return i(e)===e?e:this}return w.call(n,t,m.call(o,d.call(arguments)))},l=b(0,n.length-o.length),u=[],c=0;l>c;c++)h.call(u,"$"+c);return r=a("binder","return function ("+v.call(u,",")+"){ return binder.apply(this, arguments); }")(s),n.prototype&&(U.prototype=n.prototype,r.prototype=new U,U.prototype=null),r}});var J=y.bind(o.hasOwnProperty),B=y.bind(o.toString),F=y.bind(d),H=w.bind(d);if("object"==typeof document&&document&&document.documentElement)try{F(document.documentElement.childNodes)}catch(V){var X=F,_=H;F=function(e){for(var t=[],n=e.length;n-- >0;)t[n]=e[n];return _(t,X(arguments,1))},H=function(e,t){return _(F(e),t)}}var K=y.bind(u.slice),Q=y.bind(u.split),q=y.bind(u.indexOf),$=y.bind(h),ee=y.bind(o.propertyIsEnumerable),te=y.bind(r.sort),ne=n.isArray||function(e){return"[object Array]"===B(e)},re=1!==[].unshift(0);O(r,{unshift:function(){return g.apply(this,arguments),this.length}},re),O(n,{isArray:ne});var ie=i("a"),oe="a"!==ie[0]||!(0 in ie),ae=function(e){var t=!0,n=!0,r=!1;if(e)try{e.call("foo",function(e,n,r){"object"!=typeof r&&(t=!1)}),e.call([1],function(){"use strict";n="string"==typeof this},"x")}catch(i){r=!0}return!!e&&!r&&t&&n};O(r,{forEach:function(t){var n,r=W.ToObject(this),i=oe&&Z(this)?Q(this,""):r,o=-1,a=W.ToUint32(i.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.forEach callback must be a function");for(;++o<a;)o in i&&("undefined"==typeof n?t(i[o],o,r):t.call(n,i[o],o,r))}},!ae(r.forEach)),O(r,{map:function(t){var r,i=W.ToObject(this),o=oe&&Z(this)?Q(this,""):i,a=W.ToUint32(o.length),s=n(a);if(arguments.length>1&&(r=arguments[1]),!e(t))throw new TypeError("Array.prototype.map callback must be a function");for(var l=0;a>l;l++)l in o&&("undefined"==typeof r?s[l]=t(o[l],l,i):s[l]=t.call(r,o[l],l,i));return s}},!ae(r.map)),O(r,{filter:function(t){var n,r,i=W.ToObject(this),o=oe&&Z(this)?Q(this,""):i,a=W.ToUint32(o.length),s=[];if(arguments.length>1&&(r=arguments[1]),!e(t))throw new TypeError("Array.prototype.filter callback must be a function");for(var l=0;a>l;l++)l in o&&(n=o[l],("undefined"==typeof r?t(n,l,i):t.call(r,n,l,i))&&$(s,n));return s}},!ae(r.filter)),O(r,{every:function(t){var n,r=W.ToObject(this),i=oe&&Z(this)?Q(this,""):r,o=W.ToUint32(i.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.every callback must be a function");for(var a=0;o>a;a++)if(a in i&&!("undefined"==typeof n?t(i[a],a,r):t.call(n,i[a],a,r)))return!1;return!0}},!ae(r.every)),O(r,{some:function(t){var n,r=W.ToObject(this),i=oe&&Z(this)?Q(this,""):r,o=W.ToUint32(i.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.some callback must be a function");for(var a=0;o>a;a++)if(a in i&&("undefined"==typeof n?t(i[a],a,r):t.call(n,i[a],a,r)))return!0;return!1}},!ae(r.some));var se=!1;r.reduce&&(se="object"==typeof r.reduce.call("es5",function(e,t,n,r){return r})),O(r,{reduce:function(t){var n=W.ToObject(this),r=oe&&Z(this)?Q(this,""):n,i=W.ToUint32(r.length);if(!e(t))throw new TypeError("Array.prototype.reduce callback must be a function");if(0===i&&1===arguments.length)throw new TypeError("reduce of empty array with no initial value");var o,a=0;if(arguments.length>=2)o=arguments[1];else for(;;){if(a in r){o=r[a++];break}if(++a>=i)throw new TypeError("reduce of empty array with no initial value")}for(;i>a;a++)a in r&&(o=t(o,r[a],a,n));return o}},!se);var le=!1;r.reduceRight&&(le="object"==typeof r.reduceRight.call("es5",function(e,t,n,r){return r})),O(r,{reduceRight:function(t){var n=W.ToObject(this),r=oe&&Z(this)?Q(this,""):n,i=W.ToUint32(r.length);if(!e(t))throw new TypeError("Array.prototype.reduceRight callback must be a function");if(0===i&&1===arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var o,a=i-1;if(arguments.length>=2)o=arguments[1];else for(;;){if(a in r){o=r[a--];break}if(--a<0)throw new TypeError("reduceRight of empty array with no initial value")}if(0>a)return o;do{a in r&&(o=t(o,r[a],a,n))}while(a--);return o}},!le);var ue=r.indexOf&&-1!==[0,1].indexOf(1,2);O(r,{indexOf:function(e){var t=oe&&Z(this)?Q(this,""):W.ToObject(this),n=W.ToUint32(t.length);if(0===n)return-1;var r=0;for(arguments.length>1&&(r=W.ToInteger(arguments[1])),r=r>=0?r:b(0,n+r);n>r;r++)if(r in t&&t[r]===e)return r;return-1}},ue);var ce=r.lastIndexOf&&-1!==[0,1].lastIndexOf(0,-3);O(r,{lastIndexOf:function(e){var t=oe&&Z(this)?Q(this,""):W.ToObject(this),n=W.ToUint32(t.length);if(0===n)return-1;var r=n-1;for(arguments.length>1&&(r=I(r,W.ToInteger(arguments[1]))),r=r>=0?r:n-Math.abs(r);r>=0;r--)if(r in t&&e===t[r])return r;return-1}},ce);var fe=function(){var e=[1,2],t=e.splice();return 2===e.length&&ne(t)&&0===t.length}();O(r,{splice:function(e,t){return 0===arguments.length?[]:p.apply(this,arguments)}},!fe);var de=function(){var e={};return r.splice.call(e,0,0,1),1===e.length}();O(r,{splice:function(e,t){if(0===arguments.length)return[];var n=arguments;return this.length=b(W.ToInteger(this.length),0),arguments.length>0&&"number"!=typeof t&&(n=F(arguments),n.length<2?$(n,this.length-e):n[1]=W.ToInteger(t)),p.apply(this,n)}},!de);var pe=function(){var e=new n(1e5);return e[8]="x",e.splice(1,1),7===e.indexOf("x")}(),he=function(){var e=256,t=[];return t[e]="a",t.splice(e+1,0,"b"),"a"===t[e]}();O(r,{splice:function(e,t){for(var n,r=W.ToObject(this),i=[],o=W.ToUint32(r.length),a=W.ToInteger(e),s=0>a?b(o+a,0):I(a,o),u=I(b(W.ToInteger(t),0),o-s),c=0;u>c;)n=l(s+c),J(r,n)&&(i[c]=r[n]),c+=1;var f,d=F(arguments,2),p=d.length;if(u>p){c=s;for(var h=o-u;h>c;)n=l(c+u),f=l(c+p),J(r,n)?r[f]=r[n]:delete r[f],c+=1;c=o;for(var g=o-u+p;c>g;)delete r[c-1],c-=1}else if(p>u)for(c=o-u;c>s;)n=l(c+u-1),f=l(c+p-1),J(r,n)?r[f]=r[n]:delete r[f],c-=1;c=s;for(var m=0;m<d.length;++m)r[c]=d[m],c+=1;return r.length=o-u+p,i}},!pe||!he);var ge,me=r.join;try{ge="1,2,3"!==Array.prototype.join.call("123",",")}catch(V){ge=!0}ge&&O(r,{join:function(e){var t="undefined"==typeof e?",":e;return me.call(Z(this)?Q(this,""):this,t)}},ge);var ve="1,2"!==[1,2].join(void 0);ve&&O(r,{join:function(e){var t="undefined"==typeof e?",":e;return me.call(this,t)}},ve);var ye=function(e){for(var t=W.ToObject(this),n=W.ToUint32(t.length),r=0;r<arguments.length;)t[n+r]=arguments[r],r+=1;return t.length=n+r,n+r},we=function(){var e={},t=Array.prototype.push.call(e,void 0);return 1!==t||1!==e.length||"undefined"!=typeof e[0]||!J(e,0)}();O(r,{push:function(e){return ne(this)?h.apply(this,arguments):ye.apply(this,arguments)}},we);var be=function(){var e=[],t=e.push(void 0);return 1!==t||1!==e.length||"undefined"!=typeof e[0]||!J(e,0)}();O(r,{push:ye},be),O(r,{slice:function(e,t){var n=Z(this)?Q(this,""):this;return H(n,arguments)}},oe);var Ie=function(){try{[1,2].sort(null)}catch(e){try{[1,2].sort({})}catch(t){return!1}}return!0}(),Me=function(){try{return[1,2].sort(/a/),!1}catch(e){}return!0}(),Ce=function(){try{return[1,2].sort(void 0),!0}catch(e){}return!1}();O(r,{sort:function(t){if("undefined"==typeof t)return te(this);if(!e(t))throw new TypeError("Array.prototype.sort callback must be a function");return te(this,t)}},Ie||!Ce||!Me);var Ae=!ee({toString:null},"toString"),Se=ee(function(){},"prototype"),Ee=!J("x","0"),je=function(e){var t=e.constructor;return t&&t.prototype===e},De={$window:!0,$console:!0,$parent:!0,$self:!0,$frame:!0,$frames:!0,$frameElement:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$external:!0,$width:!0,$height:!0,$top:!0,$localStorage:!0},Ne=function(){if("undefined"==typeof window)return!1;for(var e in window)try{!De["$"+e]&&J(window,e)&&null!==window[e]&&"object"==typeof window[e]&&je(window[e])}catch(t){return!0}return!1}(),xe=function(e){if("undefined"==typeof window||!Ne)return je(e);try{return je(e)}catch(t){return!1}},Le=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Te=Le.length,Ze=function(e){return"[object Arguments]"===B(e)},Pe=function(t){return null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&!ne(t)&&e(t.callee)},ke=Ze(arguments)?Ze:Pe;O(i,{keys:function(t){var n=e(t),r=ke(t),i=null!==t&&"object"==typeof t,o=i&&Z(t);if(!i&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var a=[],s=Se&&n;if(o&&Ee||r)for(var u=0;u<t.length;++u)$(a,l(u));if(!r)for(var c in t)s&&"prototype"===c||!J(t,c)||$(a,l(c));if(Ae)for(var f=xe(t),d=0;Te>d;d++){var p=Le[d];f&&"constructor"===p||!J(t,p)||$(a,p)}return a}});var Ye=i.keys&&function(){return 2===i.keys(arguments).length}(1,2),ze=i.keys&&function(){var e=i.keys(arguments);return 1!==arguments.length||1!==e.length||1!==e[0]}(1),Oe=i.keys;O(i,{keys:function(e){return Oe(ke(e)?F(e):e)}},!Ye||ze);var Ge,Re,We=0!==new Date(-0xc782b5b342b24).getUTCMonth(),Ue=new Date(-0x55d318d56a724),Je=new Date(14496624e5),Be="Mon, 01 Jan -45875 11:59:59 GMT"!==Ue.toUTCString(),Fe=Ue.getTimezoneOffset();-720>Fe?(Ge="Tue Jan 02 -45875"!==Ue.toDateString(),Re=!/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-+]\d\d\d\d(?: |$)/.test(String(Je))):(Ge="Mon Jan 01 -45875"!==Ue.toDateString(),Re=!/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-+]\d\d\d\d(?: |$)/.test(String(Je)));var He=y.bind(Date.prototype.getFullYear),Ve=y.bind(Date.prototype.getMonth),Xe=y.bind(Date.prototype.getDate),_e=y.bind(Date.prototype.getUTCFullYear),Ke=y.bind(Date.prototype.getUTCMonth),Qe=y.bind(Date.prototype.getUTCDate),qe=y.bind(Date.prototype.getUTCDay),$e=y.bind(Date.prototype.getUTCHours),et=y.bind(Date.prototype.getUTCMinutes),tt=y.bind(Date.prototype.getUTCSeconds),nt=y.bind(Date.prototype.getUTCMilliseconds),rt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],it=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ot=function(e,t){return Xe(new Date(t,e,0))};O(Date.prototype,{getFullYear:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=He(this);return 0>e&&Ve(this)>11?e+1:e},getMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=He(this),t=Ve(this);return 0>e&&t>11?0:t},getDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=He(this),t=Ve(this),n=Xe(this);if(0>e&&t>11){if(12===t)return n;var r=ot(0,e+1);return r-n+1}return n},getUTCFullYear:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=_e(this);return 0>e&&Ke(this)>11?e+1:e},getUTCMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=_e(this),t=Ke(this);return 0>e&&t>11?0:t},getUTCDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=_e(this),t=Ke(this),n=Qe(this);if(0>e&&t>11){if(12===t)return n;var r=ot(0,e+1);return r-n+1}return n}},We),O(Date.prototype,{toUTCString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=qe(this),t=Qe(this),n=Ke(this),r=_e(this),i=$e(this),o=et(this),a=tt(this);return rt[e]+", "+(10>t?"0"+t:t)+" "+it[n]+" "+r+" "+(10>i?"0"+i:i)+":"+(10>o?"0"+o:o)+":"+(10>a?"0"+a:a)+" GMT"}},We||Be),O(Date.prototype,{toDateString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=this.getDay(),t=this.getDate(),n=this.getMonth(),r=this.getFullYear();return rt[e]+" "+it[n]+" "+(10>t?"0"+t:t)+" "+r}},We||Ge),(We||Re)&&(Date.prototype.toString=function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=this.getDay(),t=this.getDate(),n=this.getMonth(),r=this.getFullYear(),i=this.getHours(),o=this.getMinutes(),a=this.getSeconds(),s=this.getTimezoneOffset(),l=Math.floor(Math.abs(s)/60),u=Math.floor(Math.abs(s)%60);return rt[e]+" "+it[n]+" "+(10>t?"0"+t:t)+" "+r+" "+(10>i?"0"+i:i)+":"+(10>o?"0"+o:o)+":"+(10>a?"0"+a:a)+" GMT"+(s>0?"-":"+")+(10>l?"0"+l:l)+(10>u?"0"+u:u)},z&&i.defineProperty(Date.prototype,"toString",{configurable:!0,enumerable:!1,writable:!0}));var at=-621987552e5,st="-000001",lt=Date.prototype.toISOString&&-1===new Date(at).toISOString().indexOf(st),ut=Date.prototype.toISOString&&"1969-12-31T23:59:59.999Z"!==new Date(-1).toISOString(),ct=y.bind(Date.prototype.getTime);O(Date.prototype,{toISOString:function(){if(!isFinite(this)||!isFinite(ct(this)))throw new RangeError("Date.prototype.toISOString called on non-finite value.");var e=_e(this),t=Ke(this);e+=Math.floor(t/12),t=(t%12+12)%12;var n=[t+1,Qe(this),$e(this),et(this),tt(this)];e=(0>e?"-":e>9999?"+":"")+K("00000"+Math.abs(e),e>=0&&9999>=e?-4:-6);for(var r=0;r<n.length;++r)n[r]=K("00"+n[r],-2);return e+"-"+F(n,0,2).join("-")+"T"+F(n,2).join(":")+"."+K("000"+nt(this),-3)+"Z"}},lt||ut);var ft=function(){try{return Date.prototype.toJSON&&null===new Date(NaN).toJSON()&&-1!==new Date(at).toJSON().indexOf(st)&&Date.prototype.toJSON.call({toISOString:function(){return!0}})}catch(e){return!1}}();ft||(Date.prototype.toJSON=function(t){var n=i(this),r=W.ToPrimitive(n);if("number"==typeof r&&!isFinite(r))return null;var o=n.toISOString;if(!e(o))throw new TypeError("toISOString property is not callable");return o.call(n)});var dt=1e15===Date.parse("+033658-09-27T01:46:40.000Z"),pt=!isNaN(Date.parse("2012-04-04T24:00:00.500Z"))||!isNaN(Date.parse("2012-11-31T23:59:59.000Z"))||!isNaN(Date.parse("2012-12-31T23:59:60.000Z")),ht=isNaN(Date.parse("2000-01-01T00:00:00.000Z"));if(ht||pt||!dt){var gt=Math.pow(2,31)-1,mt=R(new Date(1970,0,1,0,0,0,gt+1).getTime());Date=function(e){var t=function(n,r,i,o,a,s,u){var c,f=arguments.length;if(this instanceof e){var d=s,p=u;if(mt&&f>=7&&u>gt){var h=Math.floor(u/gt)*gt,g=Math.floor(h/1e3);d+=g,p-=1e3*g}c=1===f&&l(n)===n?new e(t.parse(n)):f>=7?new e(n,r,i,o,a,d,p):f>=6?new e(n,r,i,o,a,d):f>=5?new e(n,r,i,o,a):f>=4?new e(n,r,i,o):f>=3?new e(n,r,i):f>=2?new e(n,r):f>=1?new e(n instanceof e?+n:n):new e}else c=e.apply(this,arguments);return G(c)||O(c,{constructor:t},!0),c},n=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),r=[0,31,59,90,120,151,181,212,243,273,304,334,365],i=function(e,t){var n=t>1?1:0;return r[t]+Math.floor((e-1969+n)/4)-Math.floor((e-1901+n)/100)+Math.floor((e-1601+n)/400)+365*(e-1970)},o=function(t){var n=0,r=t;if(mt&&r>gt){var i=Math.floor(r/gt)*gt,o=Math.floor(i/1e3);n+=o,r-=1e3*o}return c(new e(1970,0,1,0,0,n,r))};for(var a in e)J(e,a)&&(t[a]=e[a]);O(t,{now:e.now,UTC:e.UTC},!0),t.prototype=e.prototype,O(t.prototype,{constructor:t},!0);var s=function(t){var r=n.exec(t);if(r){var a,s=c(r[1]),l=c(r[2]||1)-1,u=c(r[3]||1)-1,f=c(r[4]||0),d=c(r[5]||0),p=c(r[6]||0),h=Math.floor(1e3*c(r[7]||0)),g=Boolean(r[4]&&!r[8]),m="-"===r[9]?1:-1,v=c(r[10]||0),y=c(r[11]||0),w=d>0||p>0||h>0;return(w?24:25)>f&&60>d&&60>p&&1e3>h&&l>-1&&12>l&&24>v&&60>y&&u>-1&&u<i(s,l+1)-i(s,l)&&(a=60*(24*(i(s,l)+u)+f+v*m),a=1e3*(60*(a+d+y*m)+p)+h,g&&(a=o(a)),a>=-864e13&&864e13>=a)?a:NaN}return e.parse.apply(this,arguments)};return O(t,{parse:s}),t}(Date)}Date.now||(Date.now=function(){return(new Date).getTime()});var vt=f.toFixed&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0)),yt={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function(e,t){for(var n=-1,r=t;++n<yt.size;)r+=e*yt.data[n],yt.data[n]=r%yt.base,r=Math.floor(r/yt.base)},divide:function(e){for(var t=yt.size,n=0;--t>=0;)n+=yt.data[t],yt.data[t]=Math.floor(n/e),n=n%e*yt.base},numToString:function(){for(var e=yt.size,t="";--e>=0;)if(""!==t||0===e||0!==yt.data[e]){var n=l(yt.data[e]);""===t?t=n:t+=K("0000000",0,7-n.length)+n}return t},pow:function Ot(e,t,n){return 0===t?n:t%2===1?Ot(e,t-1,n*e):Ot(e*e,t/2,n)},log:function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}},wt=function(e){var t,n,r,i,o,a,s,u;if(t=c(e),t=R(t)?0:Math.floor(t),0>t||t>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(n=c(this),R(n))return"NaN";if(-1e21>=n||n>=1e21)return l(n);if(r="",0>n&&(r="-",n=-n),i="0",n>1e-21)if(o=yt.log(n*yt.pow(2,69,1))-69,a=0>o?n*yt.pow(2,-o,1):n/yt.pow(2,o,1),a*=4503599627370496,o=52-o,o>0){for(yt.multiply(0,a),s=t;s>=7;)yt.multiply(1e7,0),s-=7;for(yt.multiply(yt.pow(10,s,1),0),s=o-1;s>=23;)yt.divide(1<<23),s-=23;yt.divide(1<<s),yt.multiply(1,1),yt.divide(2),i=yt.numToString()}else yt.multiply(0,a),yt.multiply(1<<-o,0),i=yt.numToString()+K("0.00000000000000000000",2,2+t);return t>0?(u=i.length,i=t>=u?r+K("0.0000000000000000000",0,t-u+2)+i:r+K(i,0,u-t)+"."+K(i,u-t)):i=r+i,i};O(f,{toFixed:wt},vt);var bt=function(){try{return"1"===1..toPrecision(void 0)}catch(e){return!0}}(),It=f.toPrecision;O(f,{toPrecision:function(e){return"undefined"==typeof e?It.call(this):It.call(this,e)}},bt),2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?!function(){var e="undefined"==typeof/()??/.exec("")[1],n=Math.pow(2,32)-1;u.split=function(r,i){var o=String(this);if("undefined"==typeof r&&0===i)return[];if(!t(r))return Q(this,r,i);var a,s,l,u,c=[],f=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(r.sticky?"y":""),d=0,p=new RegExp(r.source,f+"g");e||(a=new RegExp("^"+p.source+"$(?!\\s)",f));var g="undefined"==typeof i?n:W.ToUint32(i);for(s=p.exec(o);s&&(l=s.index+s[0].length,!(l>d&&($(c,K(o,d,s.index)),!e&&s.length>1&&s[0].replace(a,function(){for(var e=1;e<arguments.length-2;e++)"undefined"==typeof arguments[e]&&(s[e]=void 0)}),s.length>1&&s.index<o.length&&h.apply(c,F(s,1)),u=s[0].length,d=l,c.length>=g)));)p.lastIndex===s.index&&p.lastIndex++,s=p.exec(o);return d===o.length?(u||!p.test(""))&&$(c,""):$(c,K(o,d)),c.length>g?F(c,0,g):c}}():"0".split(void 0,0).length&&(u.split=function(e,t){return"undefined"==typeof e&&0===t?[]:Q(this,e,t)});var Mt=u.replace,Ct=function(){var e=[];return"x".replace(/x(.)?/g,function(t,n){$(e,n)}),1===e.length&&"undefined"==typeof e[0]}();Ct||(u.replace=function(n,r){var i=e(r),o=t(n)&&/\)[*?]/.test(n.source);if(i&&o){var a=function(e){var t=arguments.length,i=n.lastIndex;n.lastIndex=0;var o=n.exec(e)||[];return n.lastIndex=i,$(o,arguments[t-2],arguments[t-1]),r.apply(this,o)};return Mt.call(this,n,a)}return Mt.call(this,n,r)});var At=u.substr,St="".substr&&"b"!=="0b".substr(-1);O(u,{substr:function(e,t){var n=e;return 0>e&&(n=b(this.length+e,0)),At.call(this,n,t)}},St);var Et="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff",jt="​",Dt="["+Et+"]",Nt=new RegExp("^"+Dt+Dt+"*"),xt=new RegExp(Dt+Dt+"*$"),Lt=u.trim&&(Et.trim()||!jt.trim());O(u,{trim:function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");return l(this).replace(Nt,"").replace(xt,"")}},Lt);var Tt=y.bind(String.prototype.trim),Zt=u.lastIndexOf&&-1!=="abcあい".lastIndexOf("あい",2);O(u,{lastIndexOf:function(e){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");for(var t=l(this),n=l(e),r=arguments.length>1?c(arguments[1]):NaN,i=R(r)?1/0:W.ToInteger(r),o=I(b(i,0),t.length),a=n.length,s=o+a;s>0;){s=b(0,s-a);var u=q(K(t,s,o+a),n);if(-1!==u)return s+u}return-1}},Zt);var Pt=u.lastIndexOf;if(O(u,{lastIndexOf:function(e){return Pt.apply(this,arguments)}},1!==u.lastIndexOf.length),(8!==parseInt(Et+"08")||22!==parseInt(Et+"0x16"))&&(parseInt=function(e){var t=/^[-+]?0[xX]/;return function(n,r){var i=Tt(String(n)),o=c(r)||(t.test(i)?16:10);return e(i,o)}}(parseInt)),1/parseFloat("-0")!==-(1/0)&&(parseFloat=function(e){return function(t){var n=Tt(String(t)),r=e(n);return 0===r&&"-"===K(n,0,1)?-0:r}}(parseFloat)),"RangeError: test"!==String(new RangeError("test"))){var kt=function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");var e=this.name;"undefined"==typeof e?e="Error":"string"!=typeof e&&(e=l(e));var t=this.message;return"undefined"==typeof t?t="":"string"!=typeof t&&(t=l(t)),e?t?e+": "+t:e:t};Error.prototype.toString=kt}if(z){var Yt=function(e,t){if(ee(e,t)){var n=Object.getOwnPropertyDescriptor(e,t);n.configurable&&(n.enumerable=!1,Object.defineProperty(e,t,n))}};Yt(Error.prototype,"message"),""!==Error.prototype.message&&(Error.prototype.message=""),Yt(Error.prototype,"name")}if("/a/gim"!==String(/a/gim)){var zt=function(){var e="/"+this.source+"/";return this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),e};RegExp.prototype.toString=zt}})},{}],39:[function(e,t,n){var r=[],i=r.forEach,o=r.slice;t.exports=function(e){return i.call(o.call(arguments,1),function(t){if(t)for(var n in t)e[n]=t[n]}),e}},{}],40:[function(e,t,n){n.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<<s)-1,u=l>>1,c=-7,f=n?i-1:0,d=n?-1:1,p=e[t+f];for(f+=d,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+e[t+f],f+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+f],f+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:(p?-1:1)*(1/0);a+=Math.pow(2,r),o-=u}return(p?-1:1)*a*Math.pow(2,o-r)},n.write=function(e,t,n,r,i,o){var a,s,l,u=8*o-i-1,c=(1<<u)-1,f=c>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,h=r?1:-1,g=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),t+=a+f>=1?d/l:d*Math.pow(2,1-f),t*l>=2&&(a++,l/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*l-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+p]=255&s,p+=h,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;e[n+p]=255&a,p+=h,a/=256,u-=8);e[n+p-h]|=128*g}},{}],41:[function(e,t,n){var r=[].indexOf;t.exports=function(e,t){if(r)return e.indexOf(t);for(var n=0;n<e.length;++n)if(e[n]===t)return n;return-1}},{}],42:[function(e,t,n){function r(e){var t=i.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)}t.exports=r;var i=Object.prototype.toString},{}],43:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],44:[function(t,n,r){(function(t){!function(i){function o(e){throw new RangeError(P[e])}function a(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function s(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(Z,".");var i=e.split("."),o=a(i,t).join(".");return r+o}function l(e){for(var t,n,r=[],i=0,o=e.length;o>i;)t=e.charCodeAt(i++),t>=55296&&56319>=t&&o>i?(n=e.charCodeAt(i++),56320==(64512&n)?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--)):r.push(t);return r}function u(e){return a(e,function(e){var t="";return e>65535&&(e-=65536,t+=z(e>>>10&1023|55296),e=56320|1023&e),t+=z(e)}).join("")}function c(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:C}function f(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function d(e,t,n){var r=0;for(e=n?Y(e/j):e>>1,e+=Y(e/t);e>k*S>>1;r+=C)e=Y(e/k);return Y(r+(k+1)*e/(e+E))}function p(e){var t,n,r,i,a,s,l,f,p,h,g=[],m=e.length,v=0,y=N,w=D;for(n=e.lastIndexOf(x),0>n&&(n=0),r=0;n>r;++r)e.charCodeAt(r)>=128&&o("not-basic"),g.push(e.charCodeAt(r));for(i=n>0?n+1:0;m>i;){for(a=v,s=1,l=C;i>=m&&o("invalid-input"),f=c(e.charCodeAt(i++)),(f>=C||f>Y((M-v)/s))&&o("overflow"),v+=f*s,p=w>=l?A:l>=w+S?S:l-w,!(p>f);l+=C)h=C-p,s>Y(M/h)&&o("overflow"),s*=h;t=g.length+1,w=d(v-a,t,0==a),Y(v/t)>M-y&&o("overflow"),y+=Y(v/t),v%=t,g.splice(v++,0,y)}return u(g)}function h(e){var t,n,r,i,a,s,u,c,p,h,g,m,v,y,w,b=[];for(e=l(e),m=e.length,t=N,n=0,a=D,s=0;m>s;++s)g=e[s],128>g&&b.push(z(g));for(r=i=b.length,i&&b.push(x);m>r;){for(u=M,s=0;m>s;++s)g=e[s],g>=t&&u>g&&(u=g);for(v=r+1,u-t>Y((M-n)/v)&&o("overflow"),n+=(u-t)*v,t=u,s=0;m>s;++s)if(g=e[s],t>g&&++n>M&&o("overflow"),g==t){for(c=n,p=C;h=a>=p?A:p>=a+S?S:p-a,!(h>c);p+=C)w=c-h,y=C-h,b.push(z(f(h+w%y,0))),c=Y(w/y);b.push(z(f(c,0))),a=d(n,v,r==i),n=0,++r}++n,++t}return b.join("")}function g(e){return s(e,function(e){return L.test(e)?p(e.slice(4).toLowerCase()):e})}function m(e){return s(e,function(e){return T.test(e)?"xn--"+h(e):e})}var v="object"==typeof r&&r&&!r.nodeType&&r,y="object"==typeof n&&n&&!n.nodeType&&n,w="object"==typeof t&&t;(w.global===w||w.window===w||w.self===w)&&(i=w);var b,I,M=2147483647,C=36,A=1,S=26,E=38,j=700,D=72,N=128,x="-",L=/^xn--/,T=/[^\x20-\x7E]/,Z=/[\x2E\u3002\uFF0E\uFF61]/g,P={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},k=C-A,Y=Math.floor,z=String.fromCharCode;if(b={version:"1.4.1",ucs2:{decode:l,encode:u},decode:p,encode:h,toASCII:m,toUnicode:g},"function"==typeof e&&"object"==typeof e.amd&&e.amd)e("punycode",function(){return b});else if(v&&y)if(n.exports==v)y.exports=b;else for(I in b)b.hasOwnProperty(I)&&(v[I]=b[I]);else i.punycode=b}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],45:[function(t,n,r){!function(t,r){"undefined"!=typeof n&&n.exports?n.exports=r():"function"==typeof e&&e.amd?e(r):this[t]=r()}("$script",function(){function e(e,t){for(var n=0,r=e.length;r>n;++n)if(!t(e[n]))return l;return 1}function t(t,n){e(t,function(e){return!n(e)})}function n(o,a,s){function l(e){return e.call?e():d[e]}function c(){if(!--y){d[v]=1,m&&m();for(var n in h)e(n.split("|"),l)&&!t(h[n],l)&&(h[n]=[])}}o=o[u]?o:[o];var f=a&&a.call,m=f?a:s,v=f?o.join(""):a,y=o.length;return setTimeout(function(){t(o,function e(t,n){return null===t?c():(n||/^https?:\/\//.test(t)||!i||(t=-1===t.indexOf(".js")?i+t+".js":i+t),g[t]?(v&&(p[v]=1),2==g[t]?c():setTimeout(function(){e(t,!0)},0)):(g[t]=1,v&&(p[v]=1),void r(t,c)))})},0),n}function r(e,t){var n,r=a.createElement("script");r.onload=r.onerror=r[f]=function(){r[c]&&!/^c|loade/.test(r[c])||n||(r.onload=r[f]=null,n=1,g[e]=2,t())},r.async=1,r.src=o?e+(-1===e.indexOf("?")?"?":"&")+o:e,s.insertBefore(r,s.lastChild)}var i,o,a=document,s=a.getElementsByTagName("head")[0],l=!1,u="push",c="readyState",f="onreadystatechange",d={},p={},h={},g={};return n.get=r,n.order=function(e,t,r){!function i(o){o=e.shift(),e.length?n(o,i):n(o,t,r)}()},n.path=function(e){i=e},n.urlArgs=function(e){o=e},n.ready=function(r,i,o){r=r[u]?r:[r];var a=[];return!t(r,function(e){d[e]||a[u](e)})&&e(r,function(e){return d[e]})?i():!function(e){h[e]=h[e]||[],h[e][u](i),o&&o(a)}(r.join("|")),n},n.done=function(e){n([null],e)},n})},{}]},{},[32])(32)});if(typeof fv_flowplayer_conf!="undefined"){try{if(typeof window.localStorage=="object"&&typeof window.localStorage.volume!="undefined"){delete fv_flowplayer_conf.volume}}catch(e){}flowplayer.conf=fv_flowplayer_conf;flowplayer.conf.chromecast=false;flowplayer.conf.embed=false;flowplayer.conf.share=false;flowplayer.conf.analytics=false;try{flowplayer.conf.key=atob(flowplayer.conf.key)}catch(e){}if(!flowplayer.support.android&&flowplayer.conf.dacast_hlsjs){function FVAbrController(hls){this.hls=hls;this.nextAutoLevel=3}FVAbrController.prototype.nextAutoLevel=function(nextLevel){this.nextAutoLevel=nextLevel};FVAbrController.prototype.destroy=function(){};flowplayer.conf.hlsjs={startLevel:-1,abrController:FVAbrController}}function parseIOSVersion(UA){var e=/iP(ad|hone)(; CPU)? OS (\d+_\d)/.exec(UA);if(e&&e.length>1){return parseFloat(e[e.length-1].replace("_","."),10)}return 0}if(flowplayer.support.iOS&&flowplayer.support.iOS.chrome&&flowplayer.support.iOS.version==0){flowplayer.support.iOS.version=parseIOSVersion(navigator.userAgent)}if(flowplayer.support.iOS&&parseInt(flowplayer.support.iOS.version)>=13||!flowplayer.support.iOS&&flowplayer.support.browser.safari&&parseInt(flowplayer.support.browser.version)>=8){flowplayer.conf.hlsjs.safari=true}flowplayer.support.fvmobile=!!(!flowplayer.support.firstframe||flowplayer.support.iOS||flowplayer.support.android);var fls=flowplayer.support;if(flowplayer.conf.mobile_native_fullscreen&&"ontouchstart"in window&&fls.fvmobile){flowplayer.conf.native_fullscreen=true}if("ontouchstart"in window){if(fls.android&&fls.android.version<4.4&&!(fls.browser.chrome&&fls.browser.version>54)){flowplayer.conf.native_fullscreen=true}if(fls.iOS&&(fv_player_in_iframe()||fls.iOS.version<7)){flowplayer.conf.native_fullscreen=true}}}if(typeof fv_flowplayer_translations!="undefined"){flowplayer.defaults.errors=fv_flowplayer_translations}var fv_player_did_autoplay=false;function fv_player_videos_parse(args,root){try{var videos=JSON.parse(args)}catch(e){return false}var regex=new RegExp("[\\?&]fv_flowplayer_mobile=([^&#]*)");var results=regex.exec(location.search);if((results!=null&&results[1]=="yes"||(jQuery(window).width()<=480||jQuery(window).height()<=480))&&(results==null||results[1]!="no")){var fv_fp_mobile=false;jQuery(videos.sources).each(function(k,v){if(v.mobile){videos.sources[k]=videos.sources[0];videos.sources[0]=v;fv_fp_mobile=true}if(fv_fp_mobile){jQuery(root).after('<p class="fv-flowplayer-mobile-switch">'+fv_flowplayer_translations.mobile_browser_detected_1+' <a href="'+document.URL+'?fv_flowplayer_mobile=no">'+fv_flowplayer_translations.mobile_browser_detected_2+"</a>.</p>")}})}return videos}function fv_player_in_iframe(){try{return window.self!==window.top}catch(e){return true}}jQuery(document).ready(function(){var loading_count=0;var loading=setInterval(function(){loading_count++;if(loading_count<1e3&&(window.fv_video_intelligence_conf&&!window.FV_Player_IMA||window.fv_vast_conf&&!window.FV_Player_IMA||window.fv_player_pro&&!window.FV_Flowplayer_Pro&&document.getElementById("fv_player_pro")!=fv_player_pro)){return}clearInterval(loading);fv_player_preload()},10)});function fv_escape_attr(text){var map={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return text.replace(/[&<>"']/g,function(m){return map[m]})}function fv_player_preload(){if(flowplayer.support.touch){jQuery(".fp-playlist-external.fv-playlist-design-2017").addClass("visible-captions")}flowplayer(function(api,root){root=jQuery(root);var fp_player=root.find(".fp-player");var splash_click=false;if(root.hasClass("fixed-controls")){root.find(".fp-controls").on("click",function(e){if(!api.loading&&!api.ready){e.preventDefault();e.stopPropagation();api.load()}})}if(!flowplayer.support.volume&&!flowplayer.support.autoplay){root.find(".fp-volume").hide()}if(root.data("fullscreen")==false){root.find(".fp-fullscreen").remove()}if(root.data("volume")==0&&root.hasClass("no-controlbar")){root.find(".fp-volume").remove()}var playlist=jQuery(".fp-playlist-external[rel="+root.attr("id")+"]");if((!api.conf.playlist||api.conf.playlist.length==0)&&playlist.length&&playlist.find("a[data-item]").length>0){var items=[];playlist.find("a[data-item]").each(function(){if(parsed=fv_player_videos_parse(jQuery(this).attr("data-item"),root)){items.push(parsed)}else{jQuery(this).remove()}});api.conf.playlist=items;api.conf.clip=items[0]}else if(!api.conf.clip){api.conf.clip=fv_player_videos_parse(jQuery(root).attr("data-item"),root)}jQuery("a",playlist).on("click",function(e){e.preventDefault();splash_click=true;var $this=jQuery(this),playlist=jQuery(".fp-playlist-external[rel="+root.attr("id")+"]"),index=jQuery("a",playlist).index(this);$prev=$this.prev("a"),item=$this.data("item");if($prev.length&&$this.is(":visible")&&!$prev.is(":visible")){$prev.click();return false}if(jQuery("#"+$this.parent().attr("rel")).hasClass("dynamic-playlist"))return;var playlist=jQuery(".fp-playlist-external[rel="+root.attr("id")+"]");fv_player_playlist_active(playlist,this);if(api){if(api.error){api.pause();api.error=api.loading=false;root.removeClass("is-error");root.find(".fp-message.fp-shown").remove()}if(!api.video||api.video.index==index)return;api.play(index)}var new_splash=item.splash;if(!new_splash){new_splash=$this.find("img").attr("src")}player_splash(root,fp_player,item,new_splash);var rect=root[0].getBoundingClientRect();if(rect.bottom-100<0){jQuery("html, body").animate({scrollTop:jQuery(root).offset().top-100},300)}});var playlist_external=jQuery("[rel="+root.attr("id")+"]");var playlist_progress=false;var splash_img=root.find(".fp-splash");var splash_text=root.find(".fv-fp-splash-text");function player_splash(root,fp_player,item,new_splash){var splash_img=root.find("img.fp-splash");if(new_splash){if(splash_img.length==0){splash_img=jQuery('<img class="fp-splash" />');fp_player.prepend(splash_img)}splash_img.attr("alt",item.fv_title?fv_escape_attr(item.fv_title):"video");splash_img.attr("src",new_splash)}else if(splash_img.length){splash_img.remove()}}api.bind("load",function(e,api,video){if(!api.conf.playlist.length){return}if(video.type.match(/^audio/)&&!splash_click){var anchor=playlist_external.find("a").eq(video.index);var item=anchor.data("item");var new_splash=item.splash;if(!new_splash){new_splash=anchor.find("img").attr("src")}player_splash(root,fp_player,item,new_splash)}splash_click=false});api.bind("ready",function(e,api,video){setTimeout(function(){if(video.index>-1){if(playlist_external.length>0){var playlist_item=jQuery("a",playlist_external).eq(video.index);fv_player_playlist_active(playlist_external,playlist_item);playlist_progress=playlist_item.find(".fvp-progress")}}},100);splash_img=root.find(".fp-splash");if(!video.is_audio_stream&&!video.type.match(/^audio/)){splash_img.remove();splash_text.remove()}});api.bind("unload",function(){jQuery(".fp-playlist-external .now-playing").remove();jQuery(".fp-playlist-external a").removeClass("is-active");fp_player.prepend(splash_text);fp_player.prepend(splash_img);playlist_progress=false});api.bind("progress",function(e,api,time){if(playlist_progress.length){api.playlist_thumbnail_progress(playlist_progress,api.video,time)}});api.bind("error-subtitles",function(){console.log("error-subtitles");fv_player_notice(root,fv_flowplayer_translations[8],2e3)});var playlist=jQuery(root).parent().find("div.fp-playlist-vertical[rel="+jQuery(root).attr("id")+"]");if(playlist.length){function check_size_and_all(args){var property=playlist.hasClass("fp-playlist-only-captions")?"height":"max-height";if(playlist.parents(".fp-playlist-text-wrapper").hasClass("is-fv-narrow")){property="max-height"}playlist.css(property,vertical_playlist_height());if(property=="max-height")playlist.css("height","auto")}check_size_and_all();jQuery(window).on("resize tabsactivate",function(){setTimeout(check_size_and_all,0)})}function vertical_playlist_height(args){var height=root.height();if(height==0)height=root.css("max-height");return height}api.show_status=function(type){var status="";["loading","ready","playing","paused","seeking"].every(function(v,k){if(api[v])status+=" "+v;return true});console.log("FV Player Status ("+type+")",status)}});if(window.self!=window.top&&!location.href.match(/fv_player_preview/)){embed_size();jQuery(window.self).resize(embed_size)}function embed_size(){jQuery(".flowplayer.fp-is-embed").each(function(){var root=jQuery(this);if(!root.hasClass("has-chapters")&&!root.hasClass("has-transcript")&&jQuery(".fp-playlist-external[rel="+root.attr("id")+"]").length==0){root.height(jQuery(window).height())}})}if(typeof fv_flowplayer_playlists!="undefined"){for(var i in fv_flowplayer_playlists){if(!fv_flowplayer_playlists.hasOwnProperty(i))continue;jQuery("#"+i).flowplayer({playlist:fv_flowplayer_playlists[i]})}}fv_player_load();fv_autoplay_exec();jQuery(document).ajaxComplete(function(){fv_player_load()});jQuery(window).on("hashchange",fv_autoplay_exec)}function fv_player_load(){jQuery(".flowplayer").each(function(i,el){var root=jQuery(el);var api=root.data("flowplayer");if(api)return;if(root.attr("data-item")){root.flowplayer({clip:fv_player_videos_parse(root.attr("data-item"),root)})}else if(playlist=jQuery("[rel="+root.attr("id")+"]")){if(playlist.find("a[data-item]").length==0)return;var items=[];playlist.find("a[data-item]").each(function(){if(parsed=fv_player_videos_parse(jQuery(this).attr("data-item"),root)){items.push(parsed)}else{jQuery(this).remove()}});root.flowplayer({playlist:items})}});jQuery(".fv-playlist-slider-wrapper").each(function(i,el){var items=jQuery(this).find("a");jQuery(this).find(".fp-playlist-external").css("width",items.outerWidth()*items.length)});if(typeof jQuery().tabs!="undefined"){jQuery("body").removeClass("fv_flowplayer_tabs_hide");jQuery(".fv_flowplayer_tabs_content").tabs()}}function fv_player_playlist_active(playlist,item){if(playlist){jQuery("a",playlist).removeClass("is-active");jQuery(".now-playing").remove()}$playlist=jQuery(playlist);$item=jQuery(item);var scroll_parent=false;$item.addClass("is-active");var is_design_2014=$playlist.hasClass("fv-playlist-design-2014");if((is_design_2014&&$item.find("h4").length==0||!is_design_2014)&&$item.find(".now-playing").length==0)$item.prepend('<strong class="now-playing"><span>'+fv_flowplayer_translations.playlist_current+"</span></strong>");if(!$playlist.parent().find(".flowplayer").length){scroll_parent=true}if(($playlist.hasClass("fp-playlist-vertical")||$playlist.hasClass("fp-playlist-horizontal")&&$playlist.hasClass("is-audio"))&&!fullyVisibleY($item.get(0))){var $el=scroll_parent?$playlist.parent():$playlist;$el.animate({scrollTop:$el.scrollTop()+($item.position().top-$el.position().top)},750)}else if($playlist.hasClass("fp-playlist-horizontal")&&!fullyVisibleX($item.get(0))){var $el=scroll_parent?$playlist.parent():$playlist;$el.animate({scrollLeft:$el.scrollLeft()+($item.position().left-$el.position().left)},750)}function fullyVisibleY(el){var rect=el.getBoundingClientRect(),top=rect.top,height=rect.height,bottom=top+height,el=el.parentNode;do{rect=el.getBoundingClientRect();if(bottom<=rect.bottom===false)return false;if(top<=rect.top)return false;el=el.parentNode}while(el!=document.body);return bottom<=document.documentElement.clientHeight}function fullyVisibleX(el){var rect=el.getBoundingClientRect(),left=rect.left,width=rect.width,right=left+width,el=el.parentNode;do{rect=el.getBoundingClientRect();if(right<=rect.right===false)return false;if(left<=rect.left)return false;el=el.parentNode}while(el!=document.body);return right<=document.documentElement.clientWidth}}jQuery(function(){jQuery(".flowplayer").each(function(){flowplayer.bean.off(jQuery(this)[0],"contextmenu")})});var fv_fp_date=new Date;var fv_fp_utime=fv_fp_date.getTime();function fv_parse_sharelink(src){src=src.replace("https?://[^./].","");var prefix="fvp_";if(src.match(/(youtube.com)/)){return prefix+src.match(/(?:v=)([A-Za-z0-9_-]*)/)[1]}else if(src.match(/(vimeo.com)|(youtu.be)/)){return prefix+src.match(/(?:\/)([^/]*$)/)[1]}else{var match=src.match(/(?:\/)([^/]*$)/);if(match){return prefix+match[1].match(/^[^.]*/)[0]}}return prefix+src}function fv_player_get_video_link_hash(api){var hash=fv_parse_sharelink(typeof api.video.sources_original!="undefined"&&typeof api.video.sources_original[0]!="undefined"?api.video.sources_original[0].src:api.video.sources[0].src);if(typeof api.video.id!="undefined"){hash=fv_parse_sharelink(api.video.id.toString())}return hash}function fv_player_time_hms(seconds){if(isNaN(seconds)){return NaN}var sec_num=parseInt(seconds,10);var hours=Math.floor(sec_num/3600);var minutes=Math.floor(sec_num/60)%60;var seconds=sec_num%60;if(hours){hours+="h"}else{hours=""}if(hours&&minutes<10){minutes="0"+minutes+"m"}else if(!hours&&minutes){minutes+="m"}else{minutes=""}if((hours||minutes)&&seconds<10){seconds="0"+seconds}seconds+="s";var timeString=hours+minutes+seconds;return timeString}function fv_player_time_hms_ms(seconds){if(isNaN(seconds)){return NaN}seconds=parseFloat(seconds).toFixed(3);var miliseconds=(seconds+"").split(".");if(typeof miliseconds[1]!="undefined"&&miliseconds[1]>0){miliseconds=miliseconds[1]+"ms"}else{miliseconds=""}var timeString=fv_player_time_hms(seconds)+miliseconds;return timeString}function fv_player_time_seconds(time,duration){if(!time)return-1;var seconds=0;var match=time.match(/(\d+[a-z]{1,2})/g);match.forEach(function(item){if(item.endsWith("h")){seconds+=3600*parseInt(item)}else if(item.endsWith("m")){seconds+=60*parseInt(item)}else if(item.endsWith("s")&&!item.endsWith("ms")){seconds+=parseInt(item)}else if(item.endsWith("ms")){if(parseInt(item)){seconds+=parseInt(item)/1e3}}});return duration?Math.min(seconds,duration):seconds}function fv_autoplay_init(root,index,time,abStart,abEnd){if(fv_autoplay_exec_in_progress)return;fv_autoplay_exec_in_progress=true;var api=root.data("flowplayer");if(!api)return;var fTime=fv_player_time_seconds(time);abEnd=fv_player_time_seconds(abEnd);abStart=fv_player_time_seconds(abStart);if(root.parent().hasClass("ui-tabs-panel")){var tabId=root.parent().attr("id");jQuery("[aria-controls="+tabId+"] a").click()}if(!root.find(".fp-player").attr("class").match(/\bis-sticky/)){var offset=jQuery(root).offset().top-(jQuery(window).height()-jQuery(root).height())/2;window.scrollTo(0,offset);api.one("ready",function(){window.scrollTo(0,offset)})}if(root.hasClass("lightboxed")){setTimeout(function(){jQuery("[href=\\#"+root.attr("id")+"]").click()},0)}if(index){if(fv_player_video_link_autoplay_can(api,parseInt(index))){if(api.ready){if(fTime>0)api.seek(fTime);fv_autoplay_exec_in_progress=false}else{api.play(parseInt(index));api.one("ready",function(){fv_player_video_link_seek(api,fTime,abEnd,abStart)})}}else if(flowplayer.support.inlineVideo){api.one(api.playing?"progress":"ready",function(e,api){api.play(parseInt(index));api.one("ready",function(){fv_player_video_link_seek(api,fTime,abEnd,abStart)})});root.find(".fp-splash").attr("src",jQuery("[rel="+root.attr("id")+"] div").eq(index).find("img").attr("src"));if(!fv_player_in_iframe()){fv_player_notice(root,fv_flowplayer_translations[11],"progress")}}}else{if(api.ready){if(fTime>0)api.seek(fTime);fv_autoplay_exec_in_progress=false}else{if(fv_player_video_link_autoplay_can(api)){api.load()}else if(!fv_player_in_iframe()){fv_player_notice(root,fv_flowplayer_translations[11],"progress")}api.one("ready",function(){fv_player_video_link_seek(api,fTime,abEnd,abStart)})}}}function fv_player_video_link_seek(api,fTime,abEnd,abStart){fv_autoplay_exec_in_progress=false;var do_seek=setInterval(function(){if(api.loading)return;if(fTime>0)api.seek(fTime);if(abEnd&&abStart)api.trigger("link-ab",[api,abStart,abEnd]);clearInterval(do_seek)},10)}var fv_autoplay_exec_in_progress=false;function fv_autoplay_exec(){var autoplay=true;if(typeof flowplayer!=="undefined"&&typeof fv_flowplayer_conf!="undefined"&&fv_flowplayer_conf.video_hash_links&&window.location.hash.substring(1).length){var aHash=window.location.hash.match(/\?t=/)?window.location.hash.substring(1).split("?t="):window.location.hash.substring(1).split(",");var hash=aHash[0];var time=aHash[1]===undefined?false:aHash[1];var abStart=aHash[2]===undefined?false:aHash[2];var abEnd=aHash[3]===undefined?false:aHash[3];jQuery(".flowplayer").each(function(){var root=jQuery(this);if(root.hasClass("lightbox-starter")){root=jQuery(root.attr("href"))}var api=root.data("flowplayer");if(!api)return;var playlist=typeof api.conf.playlist!=="undefined"&&api.conf.playlist.length>1?api.conf.playlist:[api.conf.clip];for(var item in playlist){if(!playlist.hasOwnProperty(item))continue;var id=typeof playlist[item].id!=="undefined"?fv_parse_sharelink(playlist[item].id.toString()):false;if(hash===id&&autoplay){console.log("fv_autoplay_exec for "+id,item);fv_autoplay_init(root,parseInt(item),time,abStart,abEnd);autoplay=false;return false}}for(var item in playlist){if(!playlist.hasOwnProperty(item))continue;var src=fv_parse_sharelink(playlist[item].sources[0].src);if(hash===src&&autoplay){console.log("fv_autoplay_exec for "+src,item);fv_autoplay_init(root,parseInt(item),time,abStart,abEnd);autoplay=false;return false}}})}if(autoplay&&flowplayer.support.firstframe){jQuery(".flowplayer[data-fvautoplay]").each(function(){var root=jQuery(this),api=root.data("flowplayer"),autoplay=root.attr("data-fvautoplay");if(!fv_player_did_autoplay&&autoplay){if(!((flowplayer.support.android||flowplayer.support.iOS)&&api&&api.conf.clip.sources[0].type=="video/youtube")){fv_player_did_autoplay=true;api.load();var play_icon=root.find(".fp-play").addClass("invisible"),control_bar=root.find(".fp-controls").addClass("invisible");api.one("progress",function(){play_icon.removeClass("invisible");control_bar.removeClass("invisible")});if(autoplay=="muted"){api.mute(true,true)}}}})}}function fv_player_video_link_autoplay_can(api,item){var video=item?api.conf.playlist[item]:api.conf.clip;if(video.sources[0].type=="video/youtube"&&(flowplayer.support.iOS||flowplayer.support.android)||fv_player_in_iframe())return false;return flowplayer.support.firstframe}function fv_player_notice(root,message,timeout){var notices=jQuery(".fvfp-notices",root);if(!notices.length){notices=jQuery('<div class="fvfp-notices">');jQuery(".fp-player",root).append(notices)}var notice=jQuery('<div class="fvfp-notice-content">'+message+"</div></div>");notices.append(notice);if(typeof timeout=="string"){var player=jQuery(root).data("flowplayer");player.on(timeout,function(){notice.fadeOut(100,function(){jQuery(this).remove()})})}if(timeout>0){setTimeout(function(){notice.fadeOut(2e3,function(){jQuery(this).remove()})},timeout)}return notice}var fv_player_clipboard=function(text,successCallback,errorCallback){try{fv_player_doCopy(text);successCallback()}catch(e){if(typeof errorCallback!="undefined")errorCallback(e)}};function fv_player_doCopy(text){var textarea=document.createElement("textarea");textarea.value=text;textarea.style.opacity=0;textarea.style.position="absolute";textarea.setAttribute("readonly",true);document.body.appendChild(textarea);var selected=document.getSelection().rangeCount>0?document.getSelection().getRangeAt(0):false;if(navigator.userAgent.match(/ipad|ipod|iphone/i)){var editable=textarea.contentEditable;textarea.contentEditable=true;var range=document.createRange();range.selectNodeContents(textarea);var sel=window.getSelection();sel.removeAllRanges();sel.addRange(range);textarea.setSelectionRange(0,999999);textarea.contentEditable=editable}else{textarea.select()}try{var result=document.execCommand("copy");if(selected){document.getSelection().removeAllRanges();document.getSelection().addRange(selected)}document.body.removeChild(textarea);return result}catch(err){throw new Error("Unsuccessfull")}}flowplayer(function(api,root){var hlsjs;flowplayer.engine("hlsjs-lite").plugin(function(params){hlsjs=params.hls});root=jQuery(root);var search=document.location.search;if(localStorage.FVPlayerDashQuality){if(!api.conf.dash)api.conf.dash={};api.conf.dash.initialVideoQuality="restore"}if(localStorage.FVPlayerHLSQuality){api.conf.hlsjs.startLevel=parseInt(localStorage.FVPlayerHLSQuality);api.conf.hlsjs.testBandwidth=false;api.conf.hlsjs.autoLevelEnabled=false}else if(flowplayer.conf.hd_streaming&&!flowplayer.support.fvmobile){api.conf.hlsjs.startLevel=3;api.conf.hlsjs.testBandwidth=false;api.conf.hlsjs.autoLevelEnabled=false}api.bind("quality",function(e,api,quality){if(api.engine.engineName=="dash"){if(quality==-1){localStorage.removeItem("FVPlayerDashQuality")}else if(bitrates[quality]){localStorage.FVPlayerDashQuality=bitrates[quality].height}}else if(api.engine.engineName=="hlsjs-lite"){if(quality==-1){localStorage.removeItem("FVPlayerHLSQuality")}else{localStorage.FVPlayerHLSQuality=quality}}});var bitrates=[];var last_quality=-1;api.bind("ready",function(e,api){root.find(".fp-qsel-menu strong").text(fv_flowplayer_translations.quality);if(api.engine.engineName=="dash"){bitrates=api.engine.dash.getBitrateInfoListFor("video");if(localStorage.FVPlayerDashQuality&&api.conf.dash.initialVideoQuality){api.quality(api.conf.dash.initialVideoQuality)}quality_sort()}else if(api.engine.engineName=="hlsjs-lite"){root.addClass("is-loading");api.loading=true;api.one("progress",function(){if(api.loading){root.removeClass("is-loading");api.loading=false}});if(api.video.qualities&&api.video.qualities.length>2){var qswitch=-1;if(localStorage.FVPlayerHLSQuality){jQuery(api.video.qualities).each(function(k,v){if(v.value==localStorage.FVPlayerHLSQuality){qswitch=localStorage.FVPlayerHLSQuality;return false}})}else if(flowplayer.conf.hd_streaming&&!flowplayer.support.fvmobile){jQuery(api.video.qualities).each(function(k,v){var height=parseInt(v.label);if(height>0&&qswitch==-1&&height>=720&&height<=720){qswitch=v.value}})}qswitch=parseInt(qswitch);if(qswitch>-1){root.one("progress",function(){setTimeout(function(){api.quality(qswitch)})})}quality_sort()}}else if(api.video.sources_fvqs&&api.video.sources_fvqs.length>0&&api.video.src.match(/vimeo.*?\.mp4/)){setTimeout(quality_sort,0)}root.find("a[data-quality]").removeClass("is-current")});if(search.match(/dash_debug/)||search.match(/hls_debug/))var debug_log=jQuery('<div class="fv-debug" style="background: gray; color: white; top: 10%; position: absolute; z-index: 1000">').appendTo(root.find(".fp-player"));api.bind("ready progress",quality_process);api.bind("quality",function(){setTimeout(quality_process,0)});function quality_process(){if(api.engine.engineName=="dash"){var stream_info=bitrates[api.engine.dash.getQualityFor("video")];if(stream_info.qualityIndex!=last_quality){last_quality=stream_info.qualityIndex;quality_label(stream_info.qualityIndex,bitrates)}if(search.match(/dash_debug/))quality_debug(stream_info.width,stream_info.height,stream_info.bitrate)}else if(api.engine.engineName=="hlsjs-lite"){if(hlsjs.currentLevel!=last_quality){last_quality=hlsjs.currentLevel;quality_label(hlsjs.currentLevel,hlsjs.levels)}if(search.match(/hls_debug/)){var level=hlsjs.levels[hlsjs.currentLevel];quality_debug(level.width,level.height,level.bitrate)}}}function quality_label(index,qualities){if(!qualities[index])return;var height=qualities[index].height,hd_limit=541,lowest=1e5;jQuery(qualities).each(function(k,v){if(v.height>=720&&v.height<1400)hd_limit=720;if(v.height<lowest)lowest=v.height});root.find("a[data-quality]").removeClass("is-current");root.find("a[data-quality="+index+"]").addClass("is-current");var label="SD";if(height>=360&&lowest<height)label="SD";if(height>=hd_limit)label="HD";if(height>=1400)label="4K";root.find(".fp-qsel").html(label)}function quality_debug(w,h,br){debug_log.html("Using "+w+"x"+h+" at "+Math.round(br/1024)+" kbps")}function quality_sort(){var menu=root.find(".fp-qsel-menu");menu.children().each(function(i,a){menu.prepend(a)});menu.children().each(function(i,a){if(/^NaNp/.test(jQuery(a).html())){var bitrate=jQuery(a).html().match(/\((.*?)\)/);if(bitrate&&typeof bitrate[1]!=="undefined"){jQuery(a).html(bitrate[1])}}else{jQuery(a).html(jQuery(a).html().replace(/\(.*?\)/,""))}});menu.prepend(menu.find("a[data-quality=-1]"));menu.prepend(menu.find("strong"))}});flowplayer(function(api,root){root=jQuery(root);var player_id=root.attr("id"),ad=false;if(root.data("end_popup_preview")){jQuery(document).ready(function(){api.trigger("finish",[api])})}function ad_height_check(){var count=0;var ad_height_check=setInterval(function(){var height=ad&&ad.find(".adsbygoogle").height();count++;if(count>20*10||height>0)clearInterval(ad_height_check);if(height>root.height()){ad.addClass("tall-ad")}},50)}function show_ad(){var ad_data=root.attr("data-ad");if(typeof ad_data!="undefined"&&ad_data.length){try{ad_data=JSON.parse(ad_data)}catch(e){return false}if(!ad&&!root.hasClass("is-cva")&&root.width()>=parseInt(ad_data.width)){var html=ad_data.html;html=html.replace("%random%",Math.random());ad=jQuery('<div id="'+player_id+'_ad" class="wpfp_custom_ad">'+html+"</div>");root.find(".fp-player").append(ad);ad_height_check();setTimeout(function(){if(root.find(".wpfp_custom_ad video").length){api.pause()}},500)}}}function show_popup(event){var popup_data=root.attr("data-popup");if(typeof popup_data!="undefined"&&popup_data.length){try{popup_data=JSON.parse(popup_data)}catch(e){return false}if(event=="finish"||popup_data.pause||popup_data.html.match(/fv-player-ppv-purchase-btn-wrapper/)){root.addClass("is-popup-showing");root.find(".fp-player").append('<div id="'+player_id+'_custom_popup" class="wpfp_custom_popup">'+popup_data.html+"</div>")}}}api.bind("ready",function(e,api){if(ad.length==1){ad.remove();ad=false}if(!root.data("ad_show_after")){show_ad()}}).bind("progress",function(e,api,current){if(current>root.data("ad_show_after")){show_ad()}}).bind("finish",function(e,api){if(typeof api.video.index=="undefined"||api.video.index+1==api.conf.playlist.length){show_popup(e.type)}}).bind("pause",function(e,api){show_popup(e.type)}).bind("resume unload seek",function(e,api){if(root.hasClass("is-popup-showing")){root.find(".wpfp_custom_popup").remove();root.removeClass("is-popup-showing")}})});jQuery(document).on("click",".fv_fp_close",function(){var ad=jQuery(this).parents(".wpfp_custom_ad_content"),video=ad.find("video");ad.fadeOut();if(video.length)video[0].pause();return false});jQuery(document).on("focus",".fv_player_popup input[type=text], .fv_player_popup input[type=email], .fv_player_popup textarea",function(){var api=jQuery(this).parents(".flowplayer").data("flowplayer");if(api)api.disable(true)});jQuery(document).on("blur",".fv_player_popup input[type=text], .fv_player_popup input[type=email], .fv_player_popup textarea",function(){var api=jQuery(this).parents(".flowplayer").data("flowplayer");if(api)api.disable(false)});flowplayer(function(api,root){var root=jQuery(root);var bean=flowplayer.bean;var time=0,last=0,timer,event_name;if(typeof ga=="undefined"&&api.conf.fvanalytics&&typeof _gat=="undefined"&&typeof gtag=="undefined"){jQuery.getScript({url:"https://www.google-analytics.com/analytics.js",cache:true},function(){ga("create",api.conf.fvanalytics,"auto")})}if(!window._paq&&api.conf.matomo_domain&&api.conf.matomo_site_id){var u="//"+api.conf.matomo_domain+"/";var _paq=window._paq=window._paq||[];_paq.push(["setTrackerUrl",u+"matomo.php"]);_paq.push(["setSiteId",api.conf.matomo_site_id]);var d=document,g=d.createElement("script"),s=d.getElementsByTagName("script")[0];g.type="text/javascript";g.async=true;g.src=u+"matomo.js";s.parentNode.insertBefore(g,s)}api.bind("progress",function(e,api,current){fv_track(e,api,current)}).bind("finish ready ",function(e,api){for(var j in fv_ga_events){if(!fv_ga_events.hasOwnProperty(j))continue;root.removeData("fv_track_"+fv_ga_events[j])}}).bind("error",function(e,api,error){setTimeout(function(){if(!api.error)return;var video=typeof api.video!="undefined"&&typeof api.video.src!="undefined"?api.video:false;if(!video&&typeof api.conf.clip!="undefined"&&typeof api.conf.clip.sources!="undefined"&&typeof api.conf.clip.sources[0]!="undefined"&&typeof api.conf.clip.sources[0].src!="undefined")video=api.conf.clip.sources[0];var name=fv_player_track_name(root,video);if(name&&!name.match(/\/\/vimeo.com\/\d/)){fv_player_track(false,"Video "+(root.hasClass("is-cva")?"Ad ":"")+"error",error.message,name)}},100)});api.bind("load unload",fv_track_seconds_played).bind("progress",function(){if(!api.seeking){time+=last?+new Date-last:0;last=+new Date}if(!timer){timer=setTimeout(function(){timer=null;fv_player_track(false,"Flowplayer heartbeat",api.engine.engineName+"/"+api.video.type,"Heartbeat",0)},10*60*1e3)}}).bind("pause",function(){last=0});api.bind("shutdown",function(){bean.off(window,"unload",fv_track_seconds_played)});bean.on(window,"unload",fv_track_seconds_played);var fv_ga_events=["start","first quartile","second quartile","third quartile","complete"];function fv_track_seconds_played(e,api_not_needed,video){video=video||api.video;if(e.type==="load"){event_name=fv_player_track_name(root,video)}if(time){fv_player_track(false,"Video / Seconds played",api.engine.engineName+"/"+api.video.type,event_name,Math.round(time/1e3));time=0;if(timer){clearTimeout(timer);timer=null}}}function fv_track(e,api,data){var video=api.video,dur=video.duration,i=0;var name=fv_player_track_name(root,video);if(dur){if(data>19*dur/20)i=4;else if(data>3*dur/4)i=3;else if(data>dur/2)i=2;else if(data>dur/4)i=1}if(api.live)i=0;if(root.data("fv_track_"+fv_ga_events[i]))return;for(var j in fv_ga_events){if(!fv_ga_events.hasOwnProperty(j))continue;if(j==i)break;if(!root.data("fv_track_"+fv_ga_events[j]))return}root.trigger("fv_track_"+fv_ga_events[i].replace(/ /,"_"),[api,name]);root.data("fv_track_"+fv_ga_events[i],true);fv_player_track(false,"Video "+(root.hasClass("is-cva")?"Ad ":"")+fv_ga_events[i],api.engine.engineName+"/"+video.type,name)}api.get_time_played=function(){return time/1e3}});function fv_player_track(ga_id,event,engineType,name,value){if(!ga_id)ga_id=flowplayer.conf.fvanalytics;if(typeof engineType=="undefined")engineType="Unknown engine";if(/fv_player_track_debug/.test(window.location.href))console.log("FV Player Track: "+event+" - "+engineType+" '"+name+"'",value);if(typeof gtag!="undefined"){gtag("event",event,{event_category:engineType,event_label:name,value:value?value:1})}else if(ga_id&&typeof ga!="undefined"){ga("create",ga_id,"auto",name,{allowLinker:true});ga("require","linker");if(value){ga("send","event",event,engineType,name,value)}else{ga("send","event",event,engineType,name)}}else if(ga_id&&typeof _gat!="undefined"){var tracker=_gat._getTracker(ga_id);if(typeof tracker._setAllowLinker=="undefined"){return}tracker._setAllowLinker(true);if(value){tracker._trackEvent(event,engineType,name,value)}else{tracker._trackEvent(event,engineType,name)}}if(flowplayer.conf.matomo_domain&&flowplayer.conf.matomo_site_id&&typeof _paq!="undefined"){if(value){_paq.push(["trackEvent",event,engineType,name,value])}else{_paq.push(["trackEvent",event,engineType,name])}}}function fv_player_track_name(root,video){var name=root.attr("title");if(!name&&typeof video.fv_title!="undefined")name=video.fv_title;if(!name&&typeof video.src!="undefined"){name=video.src.split("/").slice(-1)[0].replace(/\.(\w{3,4})(\?.*)?$/i,"");if(video.type.match(/mpegurl/))name=video.src.split("/").slice(-2)[0].replace(/\.(\w{3,4})(\?.*)?$/i,"")+"/"+name}return name}flowplayer(function(api,root){root=jQuery(root);var player=root.find(".fp-player"),had_no_volume=root.hasClass("no-volume"),had_fp_mute=root.hasClass("fp-mute"),had_fp_full=root.hasClass("fp-full"),had_fp_slim=root.hasClass("fp-slim"),timeline=root.find(".fp-timeline"),buttons_count=0;function check_size(){var width=player.width()||root.width();if(width>900){jQuery(".fp-subtitle",root).addClass("is-wide")}else{jQuery(".fp-subtitle",root).removeClass("is-wide")}root.toggleClass("is-tiny",width<400);root.toggleClass("is-small",width<600&&width>=400);var too_narrow=width<480+buttons_count*35;if(!had_fp_full){root.toggleClass("fp-full",root.hasClass("has-abloop")||too_narrow)}if(had_fp_slim){root.toggleClass("fp-slim",!too_narrow||root.hasClass("has-abloop"))}var size="";if(width<400)size="is-tiny";else if(width<600&&width>=400)size="is-small";root.trigger("fv-player-size",[size]);var el=player;if(root.parent().hasClass("fp-playlist-vertical-wrapper")||root.parent().hasClass("fp-playlist-text-wrapper"))el=root.parent();if(el.width()<=560){el.addClass("is-fv-narrow")}else{el.removeClass("is-fv-narrow")}if(width<=320){root.addClass("no-volume fp-mute")}else{if(!had_no_volume)root.removeClass("no-volume");if(!had_fp_mute)root.removeClass("fp-mute")}}check_size();jQuery(window).on("resize",check_size);api.on("ready fullscreen fullscreen-exit sticky sticky-exit",function(e){setTimeout(function(){buttons_count=root.find(".fp-controls > strong:visible").length+root.find(".fp-controls > .fp-icon:visible").length;check_size()},0)});api.on("unload pause finish error",function(){if(typeof checker!=="undefined")clearInterval(checker)})});jQuery(window).on("resize tabsactivate",function(){jQuery(".fp-playlist-external").each(function(){var playlist=jQuery(this);if(playlist.parent().width()>=900)playlist.addClass("is-wide");else playlist.removeClass("is-wide")})}).trigger("resize");flowplayer(function(api,root){api.bind("ready",function(){if(/Chrome/.test(navigator.userAgent)&&parseFloat(/Chrome\/(\d\d)/.exec(navigator.userAgent)[1],10)>54){if(api.video.subtitles){jQuery(root).addClass("chrome55fix-subtitles")}else{jQuery(root).addClass("chrome55fix")}}});root=jQuery(root);var image_src=root.css("background-image");if(image_src){image_src=image_src.replace(/url\((['"])?(.*?)\1\)/gi,"$2").split(",");if(!image_src||!image_src[0].match(/^(https?:)?\/\//))return;var image=new Image;image.src=image_src[0];var image_ratio=image.height/image.width;var player_ratio=root.height()/root.width();var ratio_diff=Math.abs(player_ratio-image_ratio);if(ratio_diff<.05){root.css("background-size","cover")}}});(function($){$(window).on("resize",function(){var iframe=$("iframe[id][src][height][width]");iframe.each(function(){if($(this).attr("id").match(/(fv_vimeo_)|(fv_ytplayer_)/)&&$(this).width()<=$(this).attr("width"))$(this).height($(this).width()*$(this).attr("height")/$(this).attr("width"))});var wistia=jQuery(".wistia_embed");wistia.each(function(){$(this).height($(this).width()*$(this).data("ratio"))})}).trigger("resize")})(jQuery);jQuery(document).on("tabsactivate",".fv_flowplayer_tabs_content",function(event,ui){var oldPlayer=jQuery(".flowplayer.is-playing").data("flowplayer");if(typeof oldPlayer!="undefined"){oldPlayer.pause()}var objPlayer=jQuery(".flowplayer",ui.newPanel);var api=objPlayer.data("flowplayer");api.load()});flowplayer(function(api,root){root=jQuery(root);var bean=flowplayer.bean;if(root.hasClass("is-audio")){bean.off(root[0],"mouseenter");bean.off(root[0],"mouseleave");root.removeClass("is-mouseout");root.addClass("fixed-controls").addClass("is-mouseover");api.on("error",function(e,api,error){jQuery(".fp-message",root).html(jQuery(".fp-message",root).html().replace(/video/,"audio"))});root.on("click",function(e){if(!api.ready){e.preventDefault();e.stopPropagation();api.load()}})}});flowplayer(function(api,root){if(!api.conf.fv_chromecast)return;if(!window["__onGCastApiAvailable"]){jQuery.getScript({url:"https://www.gstatic.com/cv/js/sender/v1/cast_sender.js",cache:true});window["__onGCastApiAvailable"]=function(loaded){if(!loaded)return;initialize()}}var conf=api.conf.chromecast||{},session,timer,trigger,bean=flowplayer.bean,common=flowplayer.common,waiting_for_seek=false;function initialize(){var applicationId,sessionRequest,apiConfig;applicationId=conf.applicationId||chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID;sessionRequest=new chrome.cast.SessionRequest(applicationId);apiConfig=new chrome.cast.ApiConfig(sessionRequest,sessionListener,receiverListener);chrome.cast.initialize(apiConfig,onInitSuccess,onError)}function sessionListener(){}function receiverListener(ev){console.log("FV Player: Chromecast listener",ev);if(ev!==chrome.cast.ReceiverAvailability.AVAILABLE)return;flowplayer.conf.chromecast_available=true}function onInitSuccess(){}function onError(){console.log("chromecast onError")}function createUIElements(){var btnContainer=common.find(".fp-header",root)[0];if(!btnContainer)return;common.find(".fp-chromecast",btnContainer).forEach(common.removeNode);common.find(".fp-chromecast-engine",root).forEach(common.removeNode);trigger=common.createElement("a",{class:"fp-chromecast fp-icon",title:"Play on Cast device"});btnContainer.appendChild(trigger);var chromeCastEngine=common.createElement("div",{class:"fp-chromecast-engine"}),chromeCastStatus=common.createElement("p",{class:"fp-chromecast-engine-status"}),chromeCastIcon=common.createElement("p",{class:"fp-chromecast-engine-icon"});chromeCastEngine.appendChild(chromeCastIcon);chromeCastEngine.appendChild(chromeCastStatus);var engine=common.find(".fp-engine",root)[0];if(!engine)common.prepend(common.find(".fp-player",root)[0]||root,chromeCastEngine);else engine.parentNode.insertBefore(chromeCastEngine,engine)}function destroy(){clearInterval(timer);timer=null;api.release();common.toggleClass(root,"is-chromecast",false);common.toggleClass(trigger,"fp-active",false)}function get_media(){var media=false;var sources=api.video.sources_fvqs||api.video.sources;for(var i in sources){var type=sources[i].type;if(type=="video/mp4"||type=="video/fv-mp4"||type=="application/dash+xml"){media=sources[i];break}}if(!media){for(var i in sources){if(sources[i].type=="application/x-mpegurl"){media=sources[i];break}}}if(api.video.fvhkey&&!api.conf.hls_cast)return false;if(media){var top_quality=false,mp4_qualities=["fullhd","hd","md","sd"];for(var quality in mp4_qualities){var re=new RegExp("-"+mp4_qualities[quality]);for(var i in api.video.sources_fvqs){var source=api.video.sources_fvqs[i];if(source.src.match(re)&&source.type=="video/mp4"){top_quality=source;break}}if(top_quality){media=top_quality;break}}}return media}function load_media(){var media=get_media();if(!media){return false}var cast_subtitles=[];if(api.video.subtitles){api.video.subtitles.forEach(function(v,k){if(v.src.match(/\.srt/)){console.log("FV Player: Chromecast doesn't support SRT subtitles")}var subtitles=new chrome.cast.media.Track(k,chrome.cast.media.TrackType.TEXT);subtitles.trackContentId=v.src;subtitles.trackContentType="text/vtt";subtitles.subtype=chrome.cast.media.TextTrackType.SUBTITLES;subtitles.name=v.label;subtitles.language=v.srclang+"-"+k,subtitles.customData=null;cast_subtitles.push(subtitles)})}var mediaInfo=new chrome.cast.media.MediaInfo(media.src,media.type);mediaInfo.tracks=cast_subtitles;var request=new chrome.cast.media.LoadRequest(mediaInfo);if(!api.live){request.currentTime=api.video.time}clearInterval(timer);timer=false;session.loadMedia(request,onMediaDiscovered,function onMediaError(e){console.log("onMediaError",e)})}function onMediaDiscovered(chromecast){switch_tracks(chromecast);chromecast.addUpdateListener(function(alive){if(!session)return;timer=timer||setInterval(function(){api.trigger("progress",[api,chromecast.getEstimatedTime()]);chromecast.activeTrackIds.forEach(function(track_id){jQuery.each(chromecast.media.tracks,function(k,v){if(v.trackId==track_id&&v.type=="AUDIO"){var found=hilight_audio_track("data-audio",v.language);if(!found){hilight_audio_track("data-lang",v.language)}return false}})})},500);if(alive){common.toggleClass(root,"is-chromecast",true);common.toggleClass(trigger,"fp-active",true);api.hijack({pause:function(){console.log("hijacked pause!");chromecast.pause()},resume:function(){if(api.finished){clearInterval(timer);timer=null;api.release();load_media();return}chromecast.play()},seek:function(time){var req=new chrome.cast.media.SeekRequest;req.currentTime=time;chromecast.seek(req)}})}var playerState=chromecast.playerState;if(api.paused&&playerState===chrome.cast.media.PlayerState.PLAYING)api.trigger("resume",[api]);if(api.playing&&playerState===chrome.cast.media.PlayerState.PAUSED)api.trigger("pause",[api]);if(api.seeking&&playerState===chrome.cast.media.PlayerState.BUFFERING){waiting_for_seek=true}if(api.seeking&&playerState===chrome.cast.media.PlayerState.PLAYING&&waiting_for_seek){waiting_for_seek=false;api.trigger("seek",[api])}if(playerState==chrome.cast.media.PlayerState.IDLE&&chromecast.idleReason==chrome.cast.media.IdleReason.FINISHED){api.trigger("finish",[api])}common.toggleClass(root,"is-loading",playerState===chrome.cast.media.PlayerState.BUFFERING)})}api.bind("ready",function(e,api,video){if(session){if(get_media()){api.one("progress",function(e,api){api.release();api.pause();api.mute(false,true);load_media()});api.mute(true,true)}else{session.stop();session=null;destroy();jQuery(trigger).hide()}return}if(!flowplayer.conf.chromecast_available)return;if(get_media()){createUIElements();jQuery(trigger).show()}else{FV_Flowplayer_Pro.log("FV Player: Can't find media source suitable for Chromecast!");jQuery(trigger).hide()}});bean.on(root,"click",".fp-chromecast",function(ev){ev.preventDefault();if(session){api.trigger("pause",[api]);if(session.media[0].media){var seek=session.media[0].getEstimatedTime();setTimeout(function(){api.seek(seek)},0)}session.stop();session=null;destroy();return}if(api.playing)api.pause();chrome.cast.requestSession(function(s){jQuery(root).addClass("is-loading");session=s;var receiverName=session.receiver.friendlyName;common.html(common.find(".fp-chromecast-engine-status",root)[0],"Playing on device "+receiverName);load_media()},function(err){console.error("requestSession error",err)})});bean.on(root,"click",".fv-fp-hls-menu [data-audio], .fp-subtitle-menu [data-subtitle-index]",function(){if(session&&session.media[0].media){switch_tracks(session.media[0]);return false}});jQuery(window).on("unload",function(){if(session){session.stop()}});function hilight_audio_track(attr,chromecast_language){var audio_tracks_menu=jQuery(root).find(".fv-fp-hls-menu a"),found=false;audio_tracks_menu.each(function(k,el){if(jQuery(el).attr(attr)===chromecast_language){jQuery(el).addClass("fp-selected");found=true}else{jQuery(el).removeClass("fp-selected")}});return found}function switch_tracks(chromecast){console.log(chromecast.media.tracks);var audio=jQuery(root).find(".fv-fp-hls-menu [data-audio].fp-selected").data("audio"),audio_lang=jQuery(root).find(".fv-fp-hls-menu [data-audio].fp-selected").data("lang"),subtitle_index=jQuery(root).find(".fp-subtitle-menu [data-subtitle-index].fp-selected").data("subtitle-index"),subtitles=subtitle_index>-1?api.video.subtitles[subtitle_index].srclang:false;var audio_found=false,subtitles_found=false,tracks_selected=[];jQuery.each(chromecast.media.tracks,function(k,v){if(v.language==audio&&v.type=="AUDIO"){audio_found=v}if(v.language==subtitles+"-"+subtitle_index&&v.type=="TEXT"){subtitles_found=v}});if(!audio_found){jQuery.each(chromecast.media.tracks,function(k,v){if(v.language==audio_lang&&v.type=="AUDIO"){audio_found=v;return false}})}var debug_log="";if(audio_found){tracks_selected.push(audio_found.trackId);debug_log+=audio_found.language+" audio"}if(subtitles_found){tracks_selected.push(subtitles_found.trackId);if(debug_log)debug_log+=" ";debug_log+=subtitles_found.language+" subtitles"}if(tracks_selected){var request=new chrome.cast.media.EditTracksInfoRequest(tracks_selected);chromecast.editTracksInfo(request,function(){console.log("FV Player: Chromecast "+debug_log+" loaded")},function(){console.log("FV Player: Chromecast "+debug_log+" failed")})}}});jQuery(document).on("mfpClose",function(){if(typeof jQuery(".flowplayer").data("flowplayer")!="undefined")jQuery(".flowplayer").data("flowplayer").unload()});jQuery(document).on("click",".vc_tta-tab a",function(){var api=jQuery(".flowplayer.is-playing").data("flowplayer");if(api)api.pause()});flowplayer(function(api,root){root=jQuery(root);api.bind("ready",function(){setTimeout(function(){var video=jQuery("video",root);if(video.length>0){video.prop("autoplay",false)}},100);root.find("video.fp-engine").addClass("intrinsic-ignore")})});jQuery(".flowplayer").on("ready",function(e,api){if(/BB10/.test(navigator.userAgent)){api.fullscreen()}});var fv_flowplayer_safety_resize_arr=Array();function fv_flowplayer_safety_resize(){var fv_flowplayer_safety_resize_init=false;jQuery(".flowplayer").each(function(){if(!jQuery(this).is(":visible")||jQuery(this).hasClass("lightboxed")||jQuery(this).hasClass("lightbox-starter")||jQuery(this).hasClass("is-audio"))return;if(jQuery(this).width()<30||jQuery(this).height()<20){fv_flowplayer_safety_resize_init=true;var el=jQuery(this);while(jQuery(el).width()<30||jQuery(el).width()==jQuery(this).width()){if(jQuery(el).parent().length==0)break;el=jQuery(el).parent()}jQuery(this).width(jQuery(el).width());jQuery(this).height(parseInt(jQuery(this).width()*jQuery(this).attr("data-ratio")));fv_flowplayer_safety_resize_arr[jQuery(this).attr("id")]=el}});if(fv_flowplayer_safety_resize_init){jQuery(window).resize(function(){jQuery(".flowplayer").each(function(){if(jQuery(this).hasClass("lightboxed")||jQuery(this).hasClass("lightbox-starter"))return;if(fv_flowplayer_safety_resize_arr[jQuery(this).attr("id")]){jQuery(this).width(fv_flowplayer_safety_resize_arr[jQuery(this).attr("id")].width());jQuery(this).height(parseInt(jQuery(this).width()*jQuery(this).attr("data-ratio")))}})})}}if(typeof flowplayer.conf.safety_resize!="undefined"&&flowplayer.conf.safety_resize){jQuery(document).ready(function(){setTimeout(function(){fv_flowplayer_safety_resize()},10)})}var isIE11=!!navigator.userAgent.match(/Trident.*rv[ :]*11\./);if(isIE11){jQuery(document).ready(function(){jQuery(".fp-waiting").hide()});flowplayer(function(api,root){api.bind("load",function(e){jQuery(e.currentTarget).find(".fp-waiting").show()}).bind("beforeseek",function(e){jQuery(e.currentTarget).find(".fp-waiting").show()}).bind("progress",function(e){jQuery(e.currentTarget).find(".fp-waiting").hide()}).bind("seek",function(e){jQuery(e.currentTarget).find(".fp-waiting").hide()}).bind("fullscreen",function(e){jQuery("#wpadminbar").hide()}).bind("fullscreen-exit",function(e){jQuery("#wpadminbar").show()})})}if(flowplayer.support.browser&&flowplayer.support.browser.msie&&parseInt(flowplayer.support.browser.version,10)<9){jQuery(".flowplayer").each(function(){jQuery(this).css("width",jQuery(this).css("max-width"));jQuery(this).css("height",jQuery(this).css("max-height"))})}if(location.href.match(/elementor-preview=/)){console.log("FV Player: Elementor editor is active");setInterval(fv_player_load,1e3)}else if(location.href.match(/brizy-edit-iframe/)){console.log("FV Player: Brizy editor is active");setInterval(fv_player_load,1e3)}if(window.DELEGATE_NAMES){flowplayer(function(api,root){fv_player_notice(root,fv_flowplayer_translations.chrome_extension_disable_html5_autoplay)})}if(location.href.match(/elementor-preview=/)){console.log("FV Player: Elementor editor is active");setInterval(fv_player_load,1e3)}flowplayer(function(player,root){root=jQuery(root);if(typeof root.data("fv-embed")=="undefined"||!root.data("fv-embed")||root.data("fv-embed")=="false")return;player.embedCode=function(){var video=player.video;var width=root.width();var height=root.height();height+=2;if(root.hasClass("has-chapters")||root.hasClass("has-transcript")){height+=300}if(jQuery(".fp-playlist-external[rel="+root.attr("id")+"]").length>0){height+=150+20}var link=root.data("fv-embed")+"#"+fv_player_get_video_link_hash(player);return'<iframe src="'+link+'" allowfullscreen width="'+width+'" height="'+height+'" frameborder="0" style="max-width:100%"></iframe>'}});jQuery(document).on("click",".flowplayer .embed-code-toggle",function(){var button=jQuery(this);var player=button.parents(".flowplayer");var api=player.data("flowplayer");if(typeof api.embedCode=="function"){player.find(".embed-code textarea").val(api.embedCode())}fv_player_clipboard(player.find(".embed-code textarea").val(),function(){fv_player_notice(player,fv_flowplayer_translations.embed_copied,2e3)},function(){button.parents(".fvp-share-bar").find(".embed-code").toggle();button.parents(".fvp-share-bar").toggleClass("visible")});return false});flowplayer(function(player,root){if(!flowplayer.support.fullscreen&&player.conf.native_fullscreen&&typeof flowplayer.common.createElement("video").webkitEnterFullScreen==="function"){return}var FS_ENTER="fullscreen",FS_EXIT="fullscreen-exit",FS_SUPPORT=flowplayer.support.fullscreen,win=window,scrollX,scrollY;player.fullscreen=function(flag){var wrapper=jQuery(root).find(".fp-player")[0];if(player.disabled)return;if(flag===undefined)flag=!player.isFullscreen;if(flag){scrollY=win.scrollY;scrollX=win.scrollX}if(FS_SUPPORT){if(flag){["requestFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].forEach(function(fName){if(typeof wrapper[fName]==="function"){wrapper[fName]({navigationUI:"hide"});if(fName==="webkitRequestFullScreen"&&!document.webkitFullscreenElement){wrapper[fName]()}}})}else{["exitFullscreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].forEach(function(fName){if(typeof document[fName]==="function"){document[fName]()}})}}else{player.trigger(flag?FS_ENTER:FS_EXIT,[player])}return player};player.on("fullscreen-exit",function(){if(player.engine.engineName=="fvyoutube")return;win.scrollTo(scrollX,scrollY);jQuery(window).one("scroll",function(){window.scrollTo(scrollX,scrollY)})})});flowplayer(function(api,root){root=jQuery(root);if(flowplayer.conf.wpadmin||jQuery(root).hasClass("is-audio"))return;var playlist=jQuery(".fp-playlist-external[rel="+root.attr("id")+"]"),playlist_with_fullscreen=playlist.hasClass("fp-playlist-season")||playlist.hasClass("fp-playlist-polaroid");fsforce=root.data("fsforce")==true;if(flowplayer.conf.mobile_force_fullscreen&&flowplayer.support.fvmobile||!flowplayer.support.fullscreen&&fsforce||playlist_with_fullscreen){if(!flowplayer.support.fullscreen){api.bind("ready",function(){api.fullscreen(true)})}root.on("click",function(){if(!api.ready||api.paused)api.fullscreen(true)});jQuery("[rel="+root.attr("id")+"] a").on("click",function(e){if(!api.isFullscreen){api.fullscreen();api.resume()}});api.on("resume",function(){if(!api.isFullscreen)api.fullscreen()});api.on("finish",function(){if(api.conf.playlist.length==0||api.conf.playlist.length-1==api.video.index)api.fullscreen(false)}).on("fullscreen",function(a,api){root.addClass("forced-fullscreen")}).on("fullscreen-exit",function(a,api){api.pause();root.removeClass("forced-fullscreen")})}else if(fsforce){var position,unload=root.find(".fp-unload"),is_closing=false;api.isFakeFullscreen=false;unload.show();root.on("click",function(e){if(!api.ready&&e.target!=unload[0])api.fakeFullscreen(true)});unload.on("click",function(e){if(api.ready){api.fullscreen(false)}else if(api.loading){is_closing=true;api.one("ready",function(e){api.unload()})}api.fakeFullscreen(false)});jQuery("[rel="+root.attr("id")+"] a").on("click",function(e){if(!api.isFakeFullscreen){api.fakeFullscreen();api.resume()}});api.on("resume",function(){if(!is_closing&&!api.isFakeFullscreen)api.fakeFullscreen()}).on("finish",function(){if(api.conf.playlist.length==0||api.conf.playlist.length-1==api.video.index)api.fakeFullscreen(false)}).on("fullscreen",function(a,api){root.removeClass("fake-fullscreen")}).on("fullscreen-exit",function(a,api){if(api.isFakeFullscreen)api.fakeFullscreen(true,true)}).on("unload",function(a,api){});api.fakeFullscreen=function(flag,force){if(!force&&(api.isFakeFullscreen==flag||api.disabled))return;if(position===undefined)position=root.css("position");if(flag===undefined)flag=!api.isFakeFullscreen;api.isFakeFullscreen=flag;api.trigger(flag?"fakefullscreen":"fakefullscreen-exit",[api]);root.toggleClass("is-fullscreen fake-fullscreen forced-fullscreen",flag);if(flag){root.css("position","fixed")}else{root.css("position",position)}}}if(flowplayer.support.android&&flowplayer.conf.mobile_landscape_fullscreen&&window.screen&&window.screen.orientation){api.on("fullscreen",function(a,api){if(api.video.width>api.video.height){screen.orientation.lock("landscape-primary")}else{screen.orientation.lock("portrait-primary")}})}});flowplayer(function(api,root){root=jQuery(root);var hlsjs,player,audioUXGroup,audioGroups,hls_audio_button,hls_audio_menu,mse=window.MediaSource||window.WebKitMediaSource;flowplayer.engine("hlsjs-lite").plugin(function(params){hlsjs=params.hls});api.bind("ready",function(e,api){removeAudioMenu();if(hlsjs&&api.video.type=="application/x-mpegurl"){parseAudioTracksHlsJs(hlsjs);createAudioMenu()}});api.one("progress",function(){if(api.engine.engineName=="html5"&&api.video.type=="application/x-mpegurl"){parseAudioTracksSafari();createAudioMenu()}});function getVideoTagAudioTracks(){var video=root.find("video");if(video.length&&video[0].audioTracks){return video[0].audioTracks}return[]}function hilightAudioTrack(audioTrack){if(!audioTrack.name)audioTrack.name=audioTrack.label;root.find(".fv-fp-hls-menu a").each(function(k,el){jQuery(el).toggleClass("fp-selected",jQuery(el).attr("data-audio")===audioTrack.name)})}function createAudioMenu(){if(!audioUXGroup||audioUXGroup.length<2){return}hls_audio_button=jQuery('<strong class="fv-fp-hls">AUD</strong>');hls_audio_menu=jQuery('<div class="fp-menu fv-fp-hls-menu"></div>').insertAfter(root.find(".fp-controls"));hls_audio_menu.append("<strong>Audio</strong>");audioUXGroup.forEach(function(audioTrack){hls_audio_menu.append('<a data-audio="'+audioTrack.name+'" data-lang="'+audioTrack.lang+'">'+audioTrack.name+"</a>")});hls_audio_button.insertAfter(root.find(".fp-controls .fp-volume")).on("click",function(e){e.preventDefault();e.stopPropagation();if(hls_audio_menu.hasClass("fp-active")){api.hideMenu(hls_audio_menu[0])}else{root.click();api.showMenu(hls_audio_menu[0])}});jQuery("a",hls_audio_menu).on("click",function(e){var adata=e.target.getAttribute("data-audio");if(hlsjs){var gid=hlsjs.audioTracks[hlsjs.audioTrack].groupId;var atrack=hlsjs.audioTracks.filter(function(at){return at.groupId===gid&&(at.name===adata||at.lang===adata)})[0];hlsjs.audioTrack=atrack.id;hilightAudioTrack(atrack)}else{var tracks=getVideoTagAudioTracks();for(var i in tracks){if(!tracks.hasOwnProperty(i))continue;if(tracks[i].label==adata){tracks[i].enabled=true;hilightAudioTrack(tracks[i])}}}});if(hlsjs){hilightAudioTrack(hlsjs.audioTracks[hlsjs.audioTrack])}else{var tracks=getVideoTagAudioTracks();for(var i in tracks){if(!tracks.hasOwnProperty(i))continue;if(tracks[i].enabled){hilightAudioTrack(tracks[i])}}}}function removeAudioMenu(){jQuery(hls_audio_menu).remove();jQuery(hls_audio_button).remove()}function parseAudioTracksHlsJs(data){audioGroups=[];audioUXGroup=[];data.levels.forEach(function(level){var agroup=level.attrs.AUDIO;if(agroup&&audioGroups.indexOf(agroup)<0){audioGroups.push(agroup)}if(audioGroups.length){audioUXGroup=data.audioTracks.filter(function(audioTrack){return audioTrack.groupId===audioGroups[0]})}})}function parseAudioTracksSafari(){audioGroups=[];audioUXGroup=[];var tracks=getVideoTagAudioTracks();for(var i in tracks){if(!tracks.hasOwnProperty(i))continue;audioUXGroup.push({id:tracks[i].id,name:tracks[i].label})}}});flowplayer(function(api,root){var store_engine_pos=-1;var store_engine=false;api.on("error",function(e,api,err){if(err.code!=4||api.engine.engineName!="hlsjs")return;console.log("FV Player: HLSJS failed to play the video, switching to Flash HLS");api.error=api.loading=false;jQuery(root).removeClass("is-error");jQuery(flowplayer.engines).each(function(k,v){if(flowplayer.engines[k].engineName=="hlsjs"){store_engine_pos=k;store_engine=flowplayer.engines[k];delete flowplayer.engines[k]}});var index=typeof api.video.index!="undefined"?api.video.index:0;var video=index>0?api.conf.playlist[index].sources:api.conf.clip.sources;video.index=index;api.load({sources:video});api.bind("unload error",function(){flowplayer.engines[store_engine_pos]=store_engine})})});flowplayer(function(api,root){var initialDelay=30,continueDelay=10,useDelay=initialDelay,retryLabel=fv_flowplayer_translations.live_stream_retry,timer;api.clearLiveStreamCountdown=function(){if(timer){clearInterval(timer);api.error=api.loading=false;jQuery(root).removeClass("is-error");jQuery(root).find(".fp-message.fp-shown").remove();api.unload()}};api.conf.flashls={manifestloadmaxretry:2};api.on("ready",function(){useDelay=initialDelay;retryLabel=fv_flowplayer_translations.live_stream_retry}).on("progress",function(){useDelay=continueDelay;retryLabel=fv_flowplayer_translations.live_stream_continue});api.on("error",function(e,api,err){setTimeout(function(){if(!api.conf.clip.live&&!api.conf.live&&!(err.video&&err.video.src.match(/\/\/vimeo.com\/event\//)))return;var delay=useDelay;if(api.conf.clip.streaming_time){delay=api.conf.clip.streaming_time-Math.floor(Date.now()/1e3)}else if(api.conf.clip.live_starts_in){delay=api.conf.clip.live_starts_in}var startLabel=fv_flowplayer_translations.live_stream_starting.replace(/%d/,secondsToDhms(delay));retryLabel=retryLabel.replace(/%d/,secondsToDhms(delay));var message=api.conf.clip.live_starts_in?startLabel:retryLabel;clearInterval(timer);if(err.code===1||err.code===2||err.code===4){root.className+=" is-offline";if(flowplayer.support.flashVideo){api.one("flashdisabled",function(){root.querySelector(".fp-flash-disabled").style.display="none"})}var messageElement=root.querySelector(".fp-ui .fp-message");messageElement.innerHTML=message;var reload_delay=delay>300?300:delay;timer=setInterval(function(){reload_delay-=1;delay-=1;if(reload_delay>0&&messageElement){messageElement.querySelector("span").innerHTML=secondsToDhms(delay)}else{clearInterval(timer);api.error=api.loading=false;messageElement=root.querySelector(".fp-ui .fp-message");if(messageElement){root.querySelector(".fp-ui").removeChild(messageElement)}root.className=root.className.replace(/\bis-(error|offline)\b/g,"");api.load()}},1e3)}},1)});function secondsToDhms(seconds){seconds=Number(seconds);var d=Math.floor(seconds/(3600*24));var h=Math.floor(seconds%(3600*24)/3600);var m=Math.floor(seconds%3600/60);var s=Math.floor(seconds%60);var t=fv_flowplayer_translations;var output=d>0?d==1?t.duration_1_day.replace(/%s/,d):t.duration_n_days.replace(/%s/,d):"";if(output&&h>0)output+=", ";output+=h>0?h==1?t.duration_1_hour.replace(/%s/,h):t.duration_n_hours.replace(/%s/,h):"";if(output&&m>0)output+=", ";output+=m>0?m==1?t.duration_1_minute.replace(/%s/,m):t.duration_n_minutes.replace(/%s/,m):"";if(output&&s>0)output+=t.and;output+=s>0?s==1?t.duration_1_second.replace(/%s/,s):t.duration_n_seconds.replace(/%s/,s):"";return output}});flowplayer(function(api,root){if(!flowplayer.support.browser.safari&&!flowplayer.support.iOS)return;root=jQuery(root);var video_tag=false,did_start_playing=false,are_waiting_already=0;api.on("ready",function(e,api,video){are_waiting_already=0;did_start_playing=false;if(api.engine.engineName=="html5"&&video.src.match(/\?/)){video_tag=root.find("video");if(!video_tag.data("fv-ios-recovery")){video_tag.on("waiting",wait_for_stalled);video_tag.data("fv-ios-recovery",true)}api.one("progress",function(){did_start_playing=true})}});api.bind("beforeseek",wait_for_stalled);function debug(e){console.log("FV PLayer: iOS video element: "+e.type)}function wait_for_stalled(){if(!did_start_playing){return}if(video_tag&&api.engine.engineName=="html5"){are_waiting_already++;if(are_waiting_already>1){if(are_waiting_already>3){console.log("FV PLayer: iOS video element needs a push, triggering 'stalled'");video_tag.trigger("stalled")}return}console.log("FV PLayer: iOS video element will trigger error after 'stalled' arrives");video_tag.one("stalled",function(){var time=api.video.time;if(api.video.type.match(/video\//)){console.log("FV PLayer: Running check of video file...");var test_video=document.createElement("video");test_video.src=api.video.src;test_video.onloadedmetadata=function(){are_waiting_already=0;console.log("FV Player: Video link works")};test_video.onerror=function(){console.log("FV Player: Video link issue!");if(are_waiting_already>0){api.trigger("error",[api,{code:4,video:api.video}])}};return}setTimeout(function(){console.log(api.video.time,time);if(api.video.time!=time){console.log("FV PLayer: iOS video element continues playing, no need for error");return}if(api.paused){console.log("FV PLayer: iOS video element paused, no need for error");return}api.trigger("error",[api,{code:4,video:api.video}])},5e3)})}}});!function(e){var n=!1;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var o=window.Cookies,t=window.Cookies=e();t.noConflict=function(){return window.Cookies=o,t}}}(function(){function e(){for(var e=0,n={};e<arguments.length;e++){var o=arguments[e];for(var t in o)n[t]=o[t]}return n}function n(o){function t(n,r,i){var c;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(i=e({path:"/"},t.defaults,i)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(r),/^[\{\[]/.test(c)&&(r=c)}catch(e){}r=o.write?o.write(r,n):encodeURIComponent(r+"").replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=(n=(n=encodeURIComponent(n+"")).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var s="";for(var f in i)i[f]&&(s+="; "+f,!0!==i[f]&&(s+="="+i[f]));return document.cookie=n+"="+r+s}n||(c={});for(var p=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,u=0;u<p.length;u++){var l=p[u].split("="),C=l.slice(1).join("=");this.json||'"'!==C.charAt(0)||(C=C.slice(1,-1));try{var m=l[0].replace(d,decodeURIComponent);if(C=o.read?o.read(C,m):o(C,m)||C.replace(d,decodeURIComponent),this.json)try{C=JSON.parse(C)}catch(e){}if(n===m){c=C;break}n||(c[m]=C)}catch(e){}}return c}}return t.set=t,t.get=function(e){return t.call(t,e)},t.getJSON=function(){return t.apply({json:!0},[].slice.call(arguments))},t.defaults={},t.remove=function(n,o){t(n,"",e(o,{expires:-1}))},t.withConverter=n,t}return n(function(){})});flowplayer.bean.off(document,"keydown.fp");flowplayer(function(api,root){var bean=flowplayer.bean;if(!api.conf.keyboard)return;bean.on(root,"mouseenter mouseleave",function(e){fv_player_focused=!api.disabled&&e.type=="mouseover"?api:0;if(fv_player_focused)fv_player_focusedRoot=root});api.bind("ready",function(e,api,video){if(video.subtitles&&video.subtitles.length>0){var help=jQuery(root).find(".fp-help").html();help+='<div class="fp-help-section fp-help-subtitles"><p><em>c</em>cycle through subtitles</p></div>';jQuery(root).find(".fp-help").html(help)}else{jQuery(root).find(".fp-help-subtitles").remove()}})});flowplayer.bean.on(document,"keydown.fp",function(e){if(typeof fv_player_focused=="undefined")return;var api=fv_player_focused,focusedRoot=api?fv_player_focusedRoot:false,common=flowplayer.common;var el=api&&!api.disabled?api:0,metaKeyPressed=e.ctrlKey||e.metaKey||e.altKey,key=e.which,conf=el&&el.conf;if(common.hasClass(focusedRoot,"no-controlbar")||common.hasClass(focusedRoot,"is-cva"))return;if(!el||!conf.keyboard||el.disabled)return;if([63,187,191].indexOf(key)!=-1){common.toggleClass(focusedRoot,"is-help");return false}if(key==27&&common.hasClass(focusedRoot,"is-help")){common.toggleClass(focusedRoot,"is-help");return false}if(!metaKeyPressed&&el.ready){e.preventDefault();if(e.shiftKey){if(key==39)el.speed(true);else if(key==37)el.speed(false);else if(key==78)el.next();else if(key==80)el.prev();return}if(key<58&&key>47)return el.seekTo(key-48);switch(key){case 38:case 75:el.volume(el.volumeLevel+.15);break;case 40:case 74:el.volume(el.volumeLevel-.15);break;case 39:case 76:el.seeking=true;el.seek(api.video.time+5);break;case 37:case 72:el.seeking=true;el.seek(api.video.time-5);break;case 190:el.seekTo();break;case 32:el.toggle();break;case 70:if(conf.fullscreen)el.fullscreen();break;case 77:el.mute();break;case 81:el.unload();break;case 67:if(!api.video.subtitles||api.video.subtitles.length==0)break;var current_subtitles=jQuery(focusedRoot).find(".fp-dropdown li.active[data-subtitle-index]").data("subtitle-index");if(typeof current_subtitles=="undefined")current_subtitles=-1;current_subtitles++;if(current_subtitles>api.video.subtitles.length-1){current_subtitles=-1}api.trigger("fv-subtitles-switched");if(current_subtitles>-1){el.loadSubtitles(current_subtitles);fv_player_notice(focusedRoot,fv_flowplayer_translations.subtitles_switched+" "+api.video.subtitles[current_subtitles].label,"fv-subtitles-switched")}else{el.disableSubtitles();fv_player_notice(focusedRoot,fv_flowplayer_translations.subtitles_disabled,"fv-subtitles-switched")}break}}});flowplayer(function(api,root){api.bind("load",function(e,api,data){var player=jQuery(e.currentTarget);if(player.data("live")){var live_check=setTimeout(function(){player.find(".fp-ui").append('<div class="fp-message">'+fv_flowplayer_translations.live_stream_failed+"</div>");player.addClass("is-error")},1e4);jQuery(e.currentTarget).data("live_check",live_check)}}).bind("ready",function(e,api,data){clearInterval(jQuery(e.currentTarget).data("live_check"))}).bind("error",function(e,api,data){var player=jQuery(e.currentTarget);if(player.data("live")){player.find(".fp-message").html(fv_flowplayer_translations.live_stream_failed_2)}})});(function($){flowplayer(function(api,root){if(jQuery(root).hasClass("is-cva"))return;$(document).on("submit","#"+jQuery(root).attr("id")+" .mailchimp-form",function(e){e.preventDefault();$(".mailchimp-response",root).remove();$("input[type=submit]",root).attr("disabled","disabled").addClass("fv-form-loading");var data={action:"fv_wp_flowplayer_email_signup"};$("[name]",this).each(function(){data[this.name]=$(this).val()});$.post(fv_player.ajaxurl,data,function(response){response=JSON.parse(response);$('<div class="mailchimp-response"></div>').insertAfter(".mailchimp-form",root);if(response.text.match(/already subscribed/)){response.status="ERROR"}if(response.status==="OK"){$(".mailchimp-form input[type=text],.mailchimp-form input[type=email]",root).val("");$(".mailchimp-response",root).removeClass("is-fv-error").html(response.text);setTimeout(function(){$(".wpfp_custom_popup",root).fadeOut()},2e3)}else{$(".mailchimp-response",root).addClass("is-fv-error").html(response.text)}$("input[type=submit]",root).removeAttr("disabled").removeClass("fv-form-loading")})})})})(jQuery);function fv_flowplayer_mobile_switch(id){var regex=new RegExp("[\\?&]fv_flowplayer_mobile=([^&#]*)");var results=regex.exec(location.search);if((results!=null&&results[1]=="yes"||(jQuery(window).width()<=480||jQuery(window).height()<=480))&&(results==null||results[1]!="no")){var fv_fp_mobile=false;jQuery("#wpfp_"+id+" video source").each(function(){if(jQuery(this).attr("id")!="wpfp_"+id+"_mobile"){fv_fp_mobile=true;jQuery(this).remove()}});if(fv_fp_mobile){jQuery("#wpfp_"+id).after('<p class="fv-flowplayer-mobile-switch">'+fv_flowplayer_translations.mobile_browser_detected_1+' <a href="'+document.URL+'?fv_flowplayer_mobile=no">'+fv_flowplayer_translations.mobile_browser_detected_2+"</a>.</p>")}}}if(typeof fv_flowplayer_mobile_switch_array!="undefined"){for(var i in fv_flowplayer_mobile_switch_array){if(!fv_flowplayer_mobile_switch_array.hasOwnProperty(i))continue;fv_flowplayer_mobile_switch(i)}}flowplayer(function(api,root){if(!api.conf.multiple_playback)return;root=jQuery(root);var instance_id=root.data("flowplayer-instance-id");flowplayer.audible_instance=-1;api.one("load",function(){setTimeout(function(){api.conf.splash=false},0)});api.on("ready",function(){var is_muted=root.data("volume")==0;if(!is_muted){jQuery(".flowplayer[data-flowplayer-instance-id]").each(function(){if(instance_id==jQuery(this).data("flowplayer-instance-id")||instance_id==flowplayer.audible_instance)return;var player=jQuery(this).data("flowplayer");if(player){if(player.playing){player.mute(true,true)}else{player.clearLiveStreamCountdown()}}});flowplayer.audible_instance=instance_id}}).on("mute",function(e,api,muted){if(!muted&&flowplayer.audible_instance!=instance_id){flowplayer(flowplayer.audible_instance).mute(true,true);flowplayer.audible_instance=instance_id}})});function fv_flowplayer_browser_ff_m4v(hash){if(flowplayer.support.browser&&flowplayer.support.browser.mozilla&&navigator.appVersion.indexOf("Win")!=-1){jQuery("#wpfp_"+hash).attr("data-engine","flash")}}if(typeof fv_flowplayer_browser_ff_m4v_array!="undefined"){for(var i in fv_flowplayer_browser_ff_m4v_array){if(!fv_flowplayer_browser_ff_m4v_array.hasOwnProperty(i))continue;fv_flowplayer_browser_ff_m4v(i)}}function fv_flowplayer_browser_chrome_fail(hash,sAttributes,sVideo,bAutobuffer){jQuery("#wpfp_"+hash).bind("error",function(e,api,error){if(/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&error!=null&&(error.code==3||error.code==4||error.code==5)){api.unload();jQuery("#wpfp_"+hash).attr("id","bad_wpfp_"+hash);jQuery("#bad_wpfp_"+hash).after('<div id="wpfp_'+hash+'" '+sAttributes+' data-engine="flash"></div>');jQuery("#wpfp_"+hash).flowplayer({playlist:[[{mp4:sVideo}]]});if(bAutobuffer){jQuery("#wpfp_"+hash).bind("ready",function(e,api){api.play()})}else{jQuery("#wpfp_"+hash).flowplayer().play(0)}jQuery("#bad_wpfp_"+hash).remove()}})}if(typeof fv_flowplayer_browser_chrome_fail_array!="undefined"){for(var i in fv_flowplayer_browser_chrome_fail_array){if(!fv_flowplayer_browser_chrome_fail_array.hasOwnProperty(i))continue;fv_flowplayer_browser_chrome_fail(i,fv_flowplayer_browser_chrome_fail_array[i]["attrs"],fv_flowplayer_browser_chrome_fail_array[i]["mp4"],fv_flowplayer_browser_chrome_fail_array[i]["auto_buffer"])}}function fv_flowplayer_browser_ie(hash){if(flowplayer.support.browser&&flowplayer.support.browser.msie&&parseInt(flowplayer.support.browser.version,10)>=9||!!navigator.userAgent.match(/Trident.*rv[ :]*11\./)){jQuery("#wpfp_"+hash).attr("data-engine","flash")}}if(typeof fv_flowplayer_browser_ie_array!="undefined"){for(var i in fv_flowplayer_browser_ie_array){if(!fv_flowplayer_browser_ie_array.hasOwnProperty(i))continue;fv_flowplayer_browser_ie(i)}}function fv_flowplayer_browser_chrome_mp4(hash){var match=window.navigator.appVersion.match(/Chrome\/(\d+)\./);if(match!=null){var chrome_ver=parseInt(match[1],10);if(/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&chrome_ver<28&&navigator.appVersion.indexOf("Win")!=-1||/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&chrome_ver<27&&navigator.appVersion.indexOf("Linux")!=-1&&navigator.userAgent.toLowerCase().indexOf("android")==-1){jQuery("#wpfp_"+hash).attr("data-engine","flash")}}}if(navigator.platform.indexOf("iPhone")!=-1||navigator.platform.indexOf("iPod")!=-1||navigator.platform.indexOf("iPad")!=-1||navigator.userAgent.toLowerCase().indexOf("android")!=-1){flowplayer(function(api,root){api.bind("error",function(e,api,error){if(error.code==10){jQuery(e.target).find(".fp-message").html(fv_flowplayer_translations.unsupported_format)}})})}jQuery(document).ready(function(){if(navigator.platform.indexOf("iPhone")!=-1||navigator.platform.indexOf("iPod")!=-1||navigator.platform.indexOf("iPad")!=-1){jQuery(window).trigger("load")}jQuery(".flowplayer").on("mouseleave",function(){jQuery(this).find(".fvp-share-bar").removeClass("visible");jQuery(this).find(".embed-code").hide()})});if(!Date.now){Date.now=function(){return(new Date).getTime()}}(function($){var sendPositionsEvery=60,ajaxCall=null,maxCookieSize=2500,localStorageEnabled=null,cookieKeyName="video_positions",tempPositionCookieKeyName="video_positions_tmp",tempSawCookieKeyName="video_saw_tmp",playPositions=[],sawVideo=[],getSerialized=function(data){var serialized=JSON.stringify(data),dataSize=getTextByteSize(serialized);if(dataSize>maxCookieSize){while(dataSize>maxCookieSize){for(var i in data){if(!data.hasOwnProperty(i))continue;delete data[i];serialized=JSON.stringify(data);dataSize=getTextByteSize(serialized);break}}}return serialized},getVideoId=function(video){if(video.id){return video.id}var out=typeof video.sources_original!="undefined"&&typeof video.sources_original[0]!="undefined"?video.sources_original[0].src:video.sources[0].src;if(typeof video.sources_original=="undefined"||typeof video.sources_original[0]=="undefined"){out=removeAWSSignatures(out)}return out},getTextByteSize=function(txt){return encodeURIComponent(txt).length},getCookieKey=function(key){return localStorageEnabled?localStorage.getItem(key):Cookies.get(key)},setCookieKey=function(key,value){return localStorageEnabled?localStorage.setItem(key,value):Cookies.set(key,value)},removeCookieKey=function(key){if(localStorageEnabled){localStorage.removeItem(key)}{Cookies.remove(key)}},removeVideoPosition=function(e,api){if(api.video.sources){var video_id=getVideoId(api.video);playPositions[video_id]=0;sawVideo[video_id]=1}},removeAWSSignatures=function(videoURL){return videoURL.replace(/(X-Amz-Algorithm=[^&]+&?)/gm,"").replace(/(X-Amz-Credential=[^&]+&?)/gm,"").replace(/(X-Amz-Date=[^&]+&?)/gm,"").replace(/(X-Amz-Expires=[^&]+&?)/gm,"").replace(/(X-Amz-SignedHeaders=[^&]+&?)/gm,"").replace(/(X-Amz-Signature=[^&]+&?)/gm,"")},sendVideoPositions=function(async,callback){var beaconSupported="sendBeacon"in navigator;if(async!==true){async=false}if(!callback||typeof callback=="undefined"){callback=function(){}}postData=[];for(var video_name in playPositions){if(!playPositions.hasOwnProperty(video_name))continue;postData.push({name:video_name,position:playPositions[video_name],saw:typeof sawVideo[video_name]!="undefined"?sawVideo[video_name]:false})}if(!postData.length){removeCookieKey(tempPositionCookieKeyName);removeCookieKey(tempSawCookieKeyName);return}if(flowplayer.conf.is_logged_in=="1"){if(beaconSupported){try{var temp_position_data={},temp_saw_data={};for(var i in postData){if(!postData.hasOwnProperty(i))continue;temp_position_data[postData[i].name]=postData[i].position;temp_saw_data[postData[i].name]=postData[i].saw}setCookieKey(tempPositionCookieKeyName,getSerialized(temp_position_data));setCookieKey(tempSawCookieKeyName,getSerialized(temp_saw_data))}catch(e){return}var fd=new FormData;fd.append("action","fv_wp_flowplayer_video_position_save");fd.append("videoTimes",encodeURIComponent(JSON.stringify(postData)));navigator.sendBeacon(fv_player.ajaxurl,fd);return false}else{return jQuery.ajax({type:"POST",async:async,url:fv_player.ajaxurl,complete:callback,data:{action:"fv_wp_flowplayer_video_position_save",videoTimes:postData}})}}else{try{var data=getCookieKey(cookieKeyName);if(data&&typeof data!=="undefined"){data=JSON.parse(data)}else{data={}}for(var i in postData){if(!postData.hasOwnProperty(i))continue;data[postData[i].name]=postData[i].position}var serialized=JSON.stringify(data),dataSize=getTextByteSize(serialized);if(dataSize>maxCookieSize){while(dataSize>maxCookieSize){for(var i in data){if(!data.hasOwnProperty(i))continue;delete data[i];serialized=JSON.stringify(data);dataSize=getTextByteSize(serialized);break}}}setCookieKey(cookieKeyName,serialized)}catch(e){return}}return false};flowplayer(function(api,root){var $root=jQuery(root),enabled=flowplayer.conf.video_position_save_enable&&$root.data("save-position")!="false"||$root.data("save-position"),progressEventsCount=0,seekIntoPosition=function(e,api){if(api.video&&api.video.live)return;var video_id=getVideoId(api.video),position=api.video.position;if(flowplayer.conf.is_logged_in!="1"){var data=getCookieKey(cookieKeyName);if(data&&typeof data!=="undefined"){try{data=JSON.parse(data);if(data[video_id]){position=data[video_id]}}catch(e){return}}}if(!!api.get_custom_end&&api.get_custom_end()<position){position=false}if(!!api.get_custom_start&&api.get_custom_start()>0){if(position<api.get_custom_start()){position=false}}api.bind("progress",storeVideoPosition);if(position){seek(position)}},storeVideoPosition=function(e,api){if(api.live){return}if(api.video.sources){var video_id=getVideoId(api.video),position=Math.round(api.video.time);playPositions[video_id]=position;if(progressEventsCount++>=sendPositionsEvery&&flowplayer.conf.closingPage){if(ajaxCall){ajaxCall.abort()}ajaxCall=sendVideoPositions(true,function(){ajaxCall=null});progressEventsCount=0}}},forceSavePosition=function(e,api){var inPlaylist=false;for(var i in api.conf.playlist){if(!api.conf.playlist.hasOwnProperty(i))continue;inPlaylist=true;break}if(inPlaylist&&!flowplayer.conf.closingPage){progressEventsCount=sendPositionsEvery+1;storeVideoPosition(e,api);sendVideoPositions()}},seek=function(position){if(!!api.custom_seek){api.custom_seek(position);return}var seek_count=0;var do_seek=setInterval(function(){if(++seek_count>20)clearInterval(do_seek);if(api.loading)return;api.seek(parseInt(position));clearInterval(do_seek)},10)},processTempData=function(temp_data_name,video_id){var data=getCookieKey(temp_data_name),output=false;if(data&&typeof data!=="undefined"){try{data=JSON.parse(data);if(typeof data[video_id]!="undefined"){output=data[video_id];delete data[video_id];var stillHasData=false;for(var i in data){if(!data.hasOwnProperty(i))continue;stillHasData=true;break}if(stillHasData){setCookieKey(temp_data_name,JSON.stringify(data))}else{removeCookieKey(temp_data_name)}}return output}catch(e){}}};if(!enabled)return;api.bind("finish",removeVideoPosition);api.one("progress",seekIntoPosition);api.playlist_thumbnail_progress=function(el,video,position){if(!!api.get_custom_start&&api.get_custom_start(video)>0){position-=api.get_custom_start(video);if(position<0)position=0}var duration=video.duration;if(!!api.get_custom_duration&&api.get_custom_duration()>0){duration=api.get_custom_duration()}if(!duration){duration=el.data("duration")}if(!duration)return;var progress=100*position/duration;el.css("width",progress+"%")};if(flowplayer.conf.is_logged_in=="1"){var playlist=api.conf.playlist.length>0?api.conf.playlist:[api.conf.clip],playlist_external=jQuery("[rel="+jQuery(root).attr("id")+"]");for(var i in playlist){if(!playlist.hasOwnProperty(i))continue;var video_id=getVideoId(playlist[i]),position=processTempData(tempPositionCookieKeyName,video_id),saw=processTempData(tempSawCookieKeyName,video_id);if(position){if(api.conf.playlist.length){api.conf.playlist[i].sources[0].position=position;var playlist_progress=jQuery("a",playlist_external).eq(i).find(".fvp-progress");if(playlist_progress.length){api.playlist_thumbnail_progress(playlist_progress,api.conf.playlist[i],position)}}else{api.conf.clip.sources[0].position=position}}if(saw){if(api.conf.playlist.length){api.conf.playlist[i].sources[0].saw=true}else{api.conf.clip.sources[0].saw=true}}}}api.bind("finish",function(e,api){if(api.conf.playlist.length){api.conf.playlist[api.video.index].sources[0].saw=true}else{api.conf.clip.sources[0].saw=true}})});jQuery(window).on("beforeunload pagehide",function(){if(!flowplayer.conf.closingPage){flowplayer.conf.closingPage=true;sendVideoPositions()}});if(localStorageEnabled!==null){return localStorageEnabled}localStorageEnabled=true;try{localStorage.setItem("t","t");if(localStorage.getItem("t")!=="t"){localStorageEnabled=false}localStorage.removeItem("t")}catch(e){localStorageEnabled=false}})(jQuery);flowplayer(function(api,root){root=jQuery(root);if(api.conf.playlist.length==0)return;var real_videos=0;jQuery(api.conf.playlist).each(function(k,v){if(typeof v.click=="undefined"){real_videos++}});if(real_videos<2)return;var playlist=jQuery(".fp-playlist-external[rel="+root.attr("id")+"]");var playlist_button=jQuery('<strong class="fv-fp-list">Item 1.</strong>'),playlist_menu=jQuery('<div class="fp-menu fv-fp-list-menu"></div>').insertAfter(root.find(".fp-controls"));var i=0,item_index=[];jQuery(api.conf.playlist).each(function(k,v){if(typeof v.click=="undefined"){playlist_menu.append('<a data-index="'+k+'">'+(i+1)+". "+parse_title(playlist.find("h4").eq(i))+"</a>");item_index.push(k);i++}});playlist_button.insertAfter(root.find(".fp-controls .fp-volume")).on("click",function(e){e.preventDefault();e.stopPropagation();if(playlist_menu.hasClass("fp-active")){api.hideMenu(playlist_menu[0])}else{root.click();api.showMenu(playlist_menu[0])}});jQuery("a",playlist_menu).on("click",function(){if(typeof api.conf.playlist[jQuery(this).data("index")-1]!="undefined"&&typeof api.conf.playlist[jQuery(this).data("index")-1].click!="undefined"){api.play(jQuery(this).data("index")-1)}else{api.play(jQuery(this).data("index"))}});api.on("ready",function(e,api,video){playlist_menu.find("a").removeClass("fp-selected");var thumb=playlist_menu.find("a[data-index="+video.index+"]");thumb.addClass("fp-selected");var label=fv_flowplayer_translations.playlist_item_no;label=label.replace(/%d/,item_index.indexOf(api.video.index)+1);label=label.replace(/%s/,parse_title(thumb.find("h4")));playlist_button.html(label)});function parse_title(el){var tmp=el.clone();tmp.find("i.dur").remove();return tmp.text()}});flowplayer(function(api,root){root=jQuery(root);var playlist=api.conf.playlist;var videoIndex;api.bind("ready",function(e,api,video){videoIndex=video.index});api.bind("error",function(e,api,error){setTimeout(function(){if(playlist.length>0&&api.error==true){videoIndex=api.video.index;if(api.conf.video_checker=="1"&&playlist[videoIndex].video_checker&&playlist[videoIndex].video_checker.length>0){console.log("FV Player: Video checker message present, stopping auto-advance to next playlist item");return false}api.error=api.loading=false;root.removeClass("is-error");root.find(".fp-message.fp-shown").remove();videoIndex++;if(videoIndex>playlist.length-1){videoIndex=0}console.log("FV Player: Playlist item failure, auto-advancing to "+(videoIndex+1)+". item");api.play(videoIndex)}},1e3)})});flowplayer(function(api,root){root=jQuery(root);var original_prev,original_next,random_seed;if(!root.data("button-no-picture")&&!root.data("button-repeat")&&!root.data("button-rewind"))return;api.bind("ready",function(e,api){if(typeof original_next=="undefined"&&typeof original_prev=="undefined"){original_next=api.next;original_prev=api.prev}if(!api.video.type.match(/^audio/)&&root.data("button-no-picture")&&root.find(".fv-fp-no-picture").length==0){var button_no_picture=jQuery('<span class="fv-fp-no-picture"><svg viewBox="0 0 90 80" width="20px" height="20px" class="fvp-icon fvp-nopicture"><use xlink:href="#fvp-nopicture"></use></svg></span>');button_no_picture.insertAfter(root.find(".fp-controls .fp-volume")).on("click",function(e){e.preventDefault();e.stopPropagation();jQuery(".fp-engine",root).slideToggle(20);jQuery(this).toggleClass("is-active fp-color-fill")})}if(root.data("button-repeat")){if(api.conf.playlist.length>0&&root.find(".fv-fp-playlist").length==0){var t=fv_flowplayer_translations,playlist_button=jQuery('<strong class="fv-fp-playlist mode-normal"> <svg viewBox="0 0 80.333 80" width="20px" height="20px" class="fvp-icon fvp-replay-list"><title>'+t.playlist_replay_all+'</title><use xlink:href="#fvp-replay-list"></use></svg> <svg viewBox="0 0 80.333 71" width="20px" height="20px" class="fvp-icon fvp-shuffle"><title>'+t.playlist_shuffle+'</title><use xlink:href="#fvp-shuffle"></use></svg> <svg viewBox="0 0 80.333 71" width="20px" height="20px" class="fvp-icon fvp-replay-track"><title>'+t.playlist_replay_video+'</title><use xlink:href="#fvp-replay-track"></use></svg> <span id="fvp-playlist-play" title="'+t.playlist_play_all+'">'+t.playlist_play_all_button+"</span> </strong>"),playlist_menu=jQuery('<div class="fp-menu fv-fp-playlist-menu"> <a data-action="repeat_playlist"><svg viewBox="0 0 80.333 80" width="20px" height="20px" class="fvp-icon fvp-replay-list"><title>'+t.playlist_replay_all+'</title><use xlink:href="#fvp-replay-list"></use></svg> <span class="screen-reader-text">'+t.playlist_replay_all+'</span></a> <a data-action="shuffle_playlist"><svg viewBox="0 0 80.333 71" width="20px" height="20px" class="fvp-icon fvp-shuffle"><title>'+t.playlist_shuffle+'</title><use xlink:href="#fvp-shuffle"></use></svg> <span class="screen-reader-text">'+t.playlist_shuffle+'</span></a> <a data-action="repeat_track"><svg viewBox="0 0 80.333 71" width="20px" height="20px" class="fvp-icon fvp-replay-track"><title>'+t.playlist_replay_video+'</title><use xlink:href="#fvp-replay-track"></use></svg> <span class="screen-reader-text">'+t.playlist_replay_video+'</span></a> <a class="fp-selected" data-action="normal"><span id="fvp-playlist-play" title="'+t.playlist_play_all+'">'+t.playlist_play_all_button+"</span></a> </div>").insertAfter(root.find(".fp-controls"));api.conf.playlist_shuffle=api.conf.track_repeat=false;random_seed=randomize();var should_advance=api.conf.advance;playlist_button.insertAfter(root.find(".fp-controls .fp-volume")).on("click",function(e){e.preventDefault();e.stopPropagation();if(playlist_menu.css("right")!=="auto"){playlist_menu.css({right:"auto",left:playlist_button.position().left+"px"})}if(playlist_menu.hasClass("fp-active")){api.hideMenu(playlist_menu[0])}else{root.click();api.showMenu(playlist_menu[0])}});jQuery("a",playlist_menu).on("click",function(){jQuery(this).siblings("a").removeClass("fp-selected");jQuery(this).addClass("fp-selected");playlist_button.removeClass("mode-normal mode-repeat-track mode-repeat-playlist mode-shuffle-playlist");var action=jQuery(this).data("action");if(action=="repeat_playlist"){playlist_button.addClass("mode-repeat-playlist");api.conf.loop=true;api.conf.advance=true;api.video.loop=api.conf.track_repeat=false;api.conf.playlist_shuffle=false}else if(action=="shuffle_playlist"){playlist_button.addClass("mode-shuffle-playlist");api.conf.loop=true;api.conf.advance=true;api.conf.playlist_shuffle=true}else if(action=="repeat_track"){playlist_button.addClass("mode-repeat-track");api.conf.track_repeat=api.video.loop=true;api.conf.loop=api.conf.playlist_shuffle=false}else if(action=="normal"){playlist_button.addClass("mode-normal");api.conf.track_repeat=api.video.loop=false;api.conf.loop=api.conf.playlist_shuffle=false}if(api.conf.playlist_shuffle){api.next=function(){api.play(random_seed.pop());if(random_seed.length==0)random_seed=randomize()};api.prev=function(){api.play(random_seed.shift());if(random_seed.length==0)random_seed=randomize()}}else{api.next=original_next;api.prev=original_prev}});if(api.conf.loop){jQuery("a[data-action=repeat_playlist]",playlist_menu).click()}api.on("progress",function(){api.video.loop=api.conf.track_repeat});api.on("finish.pl",function(e,api){console.log("playlist_repeat",api.conf.loop,"advance",api.conf.advance,"video.loop",api.video.loop);if(api.conf.playlist_shuffle){api.play(random_seed.pop());if(random_seed.length==0)random_seed=randomize()}})}else if(root.find(".fv-fp-track-repeat").length==0&&api.conf.playlist.length==0){var button_track_repeat=jQuery('<strong class="fv-fp-track-repeat"><svg viewBox="0 0 80.333 71" width="20px" height="20px" class="fvp-icon fvp-replay-track"><use xlink:href="#fvp-replay-track"></use></svg></strong>');button_track_repeat.insertAfter(root.find(".fp-controls .fp-volume")).on("click",function(e){e.preventDefault();e.stopPropagation();jQuery(this).toggleClass("is-active fp-color-fill",api.video.loop);if(api.video.loop){api.video.loop=false}else{api.video.loop=true}});if(api.conf.loop){button_track_repeat.addClass("is-active fp-color-fill")}}}if(root.data("button-rewind")&&root.find(".fv-fp-rewind").length==0){var button_rewind=jQuery('<span class="fv-fp-rewind"><svg viewBox="0 0 24 24" width="24px" height="24px" class="fvp-icon fvp-rewind"><use xlink:href="#fvp-rewind"></use></svg></span>');button_rewind.insertBefore(root.find(".fp-controls .fp-elapsed")).on("click",function(e){e.preventDefault();e.stopPropagation();api.seek(api.video.time-10)});button_rewind.toggle(!api.video.live)}}).bind("unload",function(){root.find(".fv-fp-no-picture").remove();root.find(".fv-fp-playlist").remove();root.find(".fv-fp-track-repeat").remove()});function array_shuffle(a){var j,x,i;for(i=a.length;i;i--){j=Math.floor(Math.random()*i);x=a[i-1];a[i-1]=a[j];a[j]=x}return a}function randomize(random_seed){random_seed=[];jQuery(api.conf.playlist).each(function(k,v){random_seed.push(k)});random_seed=array_shuffle(random_seed);console.log("FV Player Randomizer random seed:",random_seed);return random_seed}});flowplayer(function(api,root){var $root=jQuery(root),start_index=$root.data("playlist_start");if(typeof start_index=="undefined")return;function start_position_changer(){if($root.data("position_changed")!==1&&api.conf.playlist.length){start_index--;api.play(start_index);$root.data("position_changed",1)}}api.bind("unload",function(){start_index=$root.data("playlist_start");$root.removeData("position_changed");api.one("ready",start_position_changer);api.video.index=0});api.one("ready",start_position_changer);jQuery(".fp-ui",root).on("click",function(){start_position_changer();$root.data("position_changed",1)})});flowplayer(function(api,root){api.bind("finish",function(){var finished_at=api.video.time;if(api.video.loop){api.one("pause",function(){if(finished_at<=api.video.time){api.resume()}})}})});function fv_flowplayer_amazon_s3(hash,time){jQuery("#wpfp_"+hash).bind("error",function(e,api,error){var fv_fp_date=new Date;if(error.code==4&&fv_fp_date.getTime()>fv_fp_utime+parseInt(time)){jQuery(e.target).find(".fp-message").delay(500).queue(function(n){jQuery(this).html(fv_flowplayer_translations.video_expired);n()})}})}flowplayer(function(api,root){root=jQuery(root);root.find(".fp-logo").removeAttr("href");if(root.hasClass("no-controlbar")){var timelineApi=api.sliders.timeline;timelineApi.disable(true);api.bind("ready",function(){timelineApi.disable(true)})}jQuery(".fvfp_admin_error",root).remove();root.find(".fp-logo, .fp-header").on("click",function(e){if(e.target!==this)return;root.find(".fp-ui").click()});jQuery(".fvp-share-bar .sharing-facebook",root).append('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="#fff"><title>Facebook</title><path d="M11.9 5.2l-2.6 0 0-1.6c0-0.7 0.3-0.7 0.7-0.7 0.3 0 1.6 0 1.6 0l0-2.9 -2.3 0c-2.6 0-3.3 2-3.3 3.3l0 2 -1.6 0 0 2.9 1.6 0c0 3.6 0 7.8 0 7.8l3.3 0c0 0 0-4.2 0-7.8l2.3 0 0.3-2.9Z"/></svg>');jQuery(".fvp-share-bar .sharing-twitter",root).append('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="#fff"><title>Twitter</title><path d="M16 3.1c-0.6 0.3-1.2 0.4-1.9 0.5 0.7-0.4 1.2-1 1.4-1.8 -0.6 0.4-1.3 0.6-2.1 0.8 -0.6-0.6-1.4-1-2.4-1 -2 0.1-3.2 1.6-3.2 4 -2.7-0.1-5.1-1.4-6.7-3.4 -0.9 1.4 0.2 3.8 1 4.4 -0.5 0-1-0.1-1.5-0.4l0 0.1c0 1.6 1.1 2.9 2.6 3.2 -0.7 0.2-1.3 0.1-1.5 0.1 0.4 1.3 1.6 2.2 3 2.3 -1.6 1.7-4.6 1.4-4.8 1.3 1.4 0.9 3.2 1.4 5 1.4 6 0 9.3-5 9.3-9.3 0-0.1 0-0.3 0-0.4 0.6-0.4 1.2-1 1.6-1.7Z"/></svg>');jQuery(".fvp-share-bar .sharing-email",root).append('<svg xmlns="http://www.w3.org/2000/svg" height="16" viewBox="0 0 16 16" width="16" fill="#fff"><title>Email</title><path d="M8 10c0 0 0 0-1 0L0 6v7c0 1 0 1 1 1h14c1 0 1 0 1-1V6L9 10C9 10 8 10 8 10zM15 2H1C0 2 0 2 0 3v1l8 4 8-4V3C16 2 16 2 15 2z"/></svg>');jQuery(".fp-header",root).prepend(jQuery(".fvp-share-bar",root));if(api.conf.playlist.length){var show=true;var playlist=api.conf.playlist;if(playlist.length==2){if(typeof playlist[0].click!="undefined"&&typeof playlist[1].click=="undefined"){show=false}if(typeof playlist[0].click=="undefined"&&typeof playlist[1].click!="undefined"){show=false}}else if(playlist.length==3){if(typeof playlist[0].click!="undefined"&&typeof playlist[1].click=="undefined"&&typeof playlist[2].click!="undefined"){show=false}}if(show){var prev=jQuery('<a class="fp-icon fv-fp-prevbtn"></a>');var next=jQuery('<a class="fp-icon fv-fp-nextbtn"></a>');root.find(".fp-controls .fp-playbtn").before(prev).after(next);prev.on("click",function(){api.trigger("prev",[api]);api.prev()});next.on("click",function(){api.trigger("next",[api]);api.next()})}}api.bind("pause resume finish unload ready",function(e,api){root.addClass("no-brand")});api.one("ready",function(){root.find(".fp-fullscreen").clone().appendTo(root.find(".fp-controls"))});api.bind("ready",function(e,api,video){setTimeout(function(){jQuery(".fvp-share-bar",root).show();jQuery(".fv-player-buttons-wrap",root).appendTo(jQuery(".fv-player-buttons-wrap",root).parent().find(".fp-ui"))},100)});api.bind("finish",function(){var url=root.data("fv_redirect");if(url&&(typeof api.video.is_last=="undefined"||api.video.is_last)){location.href=url}});if(flowplayer.support.iOS&&flowplayer.support.iOS.version==11){api.bind("error",function(e,api,error){if(error.code==4)root.find(".fp-engine").hide()})}jQuery(document).on("contextmenu",".flowplayer",function(e){e.preventDefault()});api.one("ready",function(e,api,video){root.find(".fp-chromecast").insertAfter(root.find(".fp-header .fp-fullscreen"))});root.find(".fp-waiting").html('<div class="fp-preload"><b></b><b></b><b></b><b></b></div>');if(!flowplayer.support.fullscreen){var id=root.attr("id"),alternative=!flowplayer.conf.native_fullscreen&&flowplayer.conf.mobile_alternative_fullscreen;api.bind("fullscreen",function(e,api){jQuery("#wpadminbar, .nc_wrapper").hide();if(alternative){if(api.video.type=="video/youtube")return;root.before('<span data-fv-placeholder="'+id+'"></span>');root.appendTo("body")}});api.bind("fullscreen-exit",function(e,api,video){jQuery("#wpadminbar, .nc_wrapper").show();if(alternative)jQuery("span[data-fv-placeholder="+id+"]").replaceWith(root)})}});(function(){var extension=function(flowplayer){flowplayer(function(api,root){if(!jQuery(root).data("speedb"))return;var support=flowplayer.support;if(!support.video||!support.inlineVideo)return;var common=flowplayer.common,bean=flowplayer.bean,ui=common.find(".fp-ui",root)[0],controlbar=common.find(".fp-controls",ui)[0],speeds=api.conf.speeds;bean.on(root,"click",".fp-speed",function(){var menu=common.find(".fp-speed-menu",root)[0];if(common.hasClass(menu,"fp-active"))api.hideMenu();else api.showMenu(menu)});bean.on(root,"click",".fp-speed-menu a",function(ev){var s=ev.target.getAttribute("data-speed");api.speed(s)});api.on("speed",function(ev,_a,rate){if(speeds.length>1){selectSpeed(rate)}}).on("ready",function(ev,api){removeMenu();if(flowplayer.support.android&&api.engine.engineName=="html5"&&api.video.type=="application/x-mpegurl")return;speeds=api.conf.speeds;if(speeds.length>1){createMenu()}});function removeMenu(){common.find(".fp-speed-menu",root).forEach(common.removeNode);common.find(".fp-speed",root).forEach(common.removeNode)}function round(val){return Math.round(val*100)/100}function createMenu(){controlbar.appendChild(common.createElement("strong",{className:"fp-speed"},api.currentSpeed+"x"));var menu=common.createElement("div",{className:"fp-menu fp-speed-menu",css:{width:"auto"}},"<strong>Speed</strong>");speeds.forEach(function(s){var a=common.createElement("a",{"data-speed":round(s)},round(s)+"x");menu.appendChild(a)});ui.appendChild(menu);selectSpeed(api.currentSpeed);jQuery(root).find(".fp-speed-menu strong").text(fv_flowplayer_translations.speed)}function selectSpeed(rate){common.find(".fp-speed",root)[0].innerHTML=rate+"x";common.find(".fp-speed-menu a",root).forEach(function(el){common.toggleClass(el,"fp-selected",el.getAttribute("data-speed")==rate);common.toggleClass(el,"fp-color",el.getAttribute("data-speed")==rate)})}})};if(typeof module==="object"&&module.exports)module.exports=extension;else if(typeof window.flowplayer==="function")extension(window.flowplayer)})();flowplayer(function(api,root){api.on("speed",function(ev,_a,rate){try{window.localStorage.fv_player_speed=rate}catch(e){}});api.on("ready",function(){if(window.localStorage.fv_player_speed&&jQuery(root).find("strong.fp-speed").is(":visible")){api.speed(parseFloat(window.localStorage.fv_player_speed))}if(jQuery(root).data("volume")==0){api.mute(true,true)}})});flowplayer(function(api,root){root=jQuery(root);if(!api.conf.fv_stats||!api.conf.fv_stats.enabled&&(!root.data("fv_stats")||root.data("fv_stats")=="no"))return;api.on("ready",function(e,api){api.one("progress",function(e,api){if(api.video.id){jQuery.post(api.conf.fv_stats.url,{blog_id:api.conf.fv_stats.blog_id,tag:"play",video_id:api.video.id})}})})});flowplayer(function(api,root){var $root=jQuery(root);var $playerDiv=$root.find(".fp-player");var sticky=$root.data("fvsticky");var globalSticky=false;var videoRatio=$root.data("ratio"),is_sticky=false;if(typeof videoRatio=="undefined"){videoRatio=.5625}if(flowplayer.conf.sticky_video==1&&typeof sticky=="undefined"){globalSticky=true}if(globalSticky||sticky){if(flowplayer.support.firstframe){var stickyPlace=flowplayer.conf.sticky_place;var stickyWidth=flowplayer.conf.sticky_width;if(stickyWidth==""){stickyWidth=380}var stickyHeight=stickyWidth*videoRatio;fv_player_sticky_video()}else{return}}function fv_player_sticky_video(){var change=false;var $window=jQuery(window),$flowplayerDiv=$root,top=$flowplayerDiv.offset().top,offset=Math.floor(top+$flowplayerDiv.outerHeight()/2);api.on("ready",function(){change=true});api.on("progress",function(){change=true});api.on("unload",function(){change=false;fv_player_sticky_class_remove();$root.removeClass("is-unSticky")});$window.on("resize",function(){top=$flowplayerDiv.offset().top;offset=Math.floor(top+$flowplayerDiv.outerHeight()/2)}).on("scroll",function(){top=$flowplayerDiv.offset().top;offset=Math.floor(top+$flowplayerDiv.outerHeight()/2);if($window.scrollTop()>offset&&change){if(jQuery("div.flowplayer.is-unSticky").length>0){console.log("unSticky",jQuery("div.flowplayer.is-unSticky").length);return false}else{fv_player_sticky_class_add()}}else{fv_player_sticky_class_remove();change=false}})}function fv_player_sticky_class_add(){if($playerDiv.hasClass("is-sticky-"+stickyPlace)){return}else{$playerDiv.addClass("is-sticky-"+stickyPlace);if($root.find("a.fp-sticky").length==0){$root.find("div.fp-header").prepend('<a class="fp-sticky fp-icon"></a>')}$playerDiv.css("width",stickyWidth);$playerDiv.css("height",stickyHeight);$playerDiv.css("max-height",stickyHeight);is_sticky=true;api.trigger("sticky",[api])}$playerDiv.parent(".flowplayer").addClass("is-stickable")}function fv_player_sticky_class_remove(){$playerDiv.removeClass("is-sticky-"+stickyPlace);$playerDiv.css("width","");$playerDiv.css("height","");$playerDiv.css("max-height","");$playerDiv.parent(".flowplayer").removeClass("is-stickable");if(is_sticky){is_sticky=false;api.trigger("sticky-exit",[api])}}});jQuery(function($){$(document).on("click","a.fp-sticky",function(){$("div.flowplayer.is-stickable").addClass("is-unSticky");var $playerDiv=$("div.flowplayer.is-stickable").find(".fp-player");$playerDiv.removeClass("is-sticky-right-bottom");$playerDiv.removeClass("is-sticky-left-bottom");$playerDiv.removeClass("is-sticky-right-top");$playerDiv.removeClass("is-sticky-left-top");$playerDiv.css("width","");$playerDiv.css("height","");$playerDiv.css("max-height","");if(is_sticky){is_sticky=false;api.trigger("sticky-exit",[api])}});$(document).on("click","div.flowplayer.is-unSticky",function(){$("div.flowplayer").removeClass("is-unSticky")})});flowplayer(function(api,root){root=jQuery(root);api.on("ready",function(e,api,video){if(window.localStorage.fv_player_subtitle&&root.find("strong.fp-cc").is(":visible")){if(api.video.subtitles.length){api.video.subtitles.forEach(function(item,index){if(item.srclang===window.localStorage.fv_player_subtitle){api.loadSubtitles(index)}})}}root.find(".fp-subtitle-menu").on("click",function(e){if(typeof e.target.getAttribute("data-subtitle-index")=="string"&&e.target.getAttribute("data-subtitle-index").length){try{window.localStorage.fv_player_subtitle=api.video.subtitles[e.target.getAttribute("data-subtitle-index")].srclang}catch(e){}}})})});flowplayer(function(api,root){root=jQuery(root);var currentPoint,check=false;api.bind("cuepoint",function(e,api,cue){check=false;if(cue.subtitle){currentPoint=cue.index}});api.on("ready",function(e,api){root.find(".fp-subtitle-menu strong").text(fv_flowplayer_translations.closed_captions);root.find('.fp-subtitle-menu a[data-subtitle-index="-1"]').text(fv_flowplayer_translations.no_subtitles)});root.on("click",".fp-subtitle-menu a[data-subtitle-index]",function(e){if(jQuery(this).data("subtitle-index")>-1){check=true;api.on("progress",time_check)}});function time_check(e,api,time){if(check){(api.cuepoints||[]).forEach(function(cue,index){var entry=cue.subtitle;if(entry&&currentPoint!=index){if(time>=cue.time&&(!entry.endTime||time<=entry.endTime)){api.trigger("cuepoint",[api,cue])}}})}}});if(typeof flowplayer!=="undefined"&&typeof fv_flowplayer_conf!="undefined"&&fv_flowplayer_conf.video_hash_links){flowplayer(function(api,root){if(jQuery(root).find(".sharing-link").length>0){var abEnd,abStart,hash,sTime,abloop;function update_link(abStartNew,abEndNew){hash=fv_player_get_video_link_hash(api);sTime=","+fv_player_time_hms(api.video.time);if(abStartNew&&abEndNew){abStart=","+fv_player_time_hms_ms(abStartNew+api.get_custom_start());abEnd=","+fv_player_time_hms_ms(abEndNew+api.get_custom_start())}else{abEnd=abloop&&typeof api.get_ab_end()!="undefined"&&api.get_ab_end()?","+fv_player_time_hms_ms(api.get_ab_end()):"";abStart=abloop&&typeof api.get_ab_start()!="undefined"&&api.get_ab_start()?","+fv_player_time_hms_ms(api.get_ab_start()):""}jQuery(".sharing-link",root).attr("href",jQuery(".sharing-link",root).attr("href").replace(/#.*/,"")+"#"+hash+sTime+abStart+abEnd)}api.on("ready",function(e,api,video){if(!api.fv_noUiSlider)return;api.fv_noUiSlider.on("set",function(values){update_link(values[0],values[1])})});api.on("progress",function(e,api){if(!api.video.sources||!api.video.sources[0]){return}update_link()});api.on("abloop",function(e,api,active){abloop=active;if(!api.playing){update_link()}});jQuery(".sharing-link",root).on("click",function(e){fv_player_clipboard(jQuery(this).attr("href"),function(){e.preventDefault();fv_player_notice(root,fv_flowplayer_translations.link_copied,2e3)})})}});jQuery(document).on("click",'a[href*="fvp_"]',function(){var link=jQuery(this);setTimeout(function(){if(link.parents(".fvp-share-bar").length==0)fv_autoplay_exec()})})}flowplayer(function(api,root){root=jQuery(root);var bean=flowplayer.bean;var restore=-1;root.on("click",".fp-volumebtn",function(e){if(api.volumeLevel==0&&restore!=-1){api.volume(restore);return false}});root.on("mousedown touchstart mouseup touchend",".fp-volumebar",function(e){if(api.volumeLevel!=0){restore=api.volumeLevel}});root.on("mousedown touchstart",".fp-volumebtn",function(e){if(api.volumeLevel>0){restore=-1}});api.on("volume",function(e,api){if(root.hasClass("is-mouseover")&&!api.muted){if(api.volumeLevel==0){bean.off(flowplayer.support.touch?root:document,"mousemove.sld touchmove.sld");api.mute(true)}}})});if(typeof flowplayer!="undefined"){flowplayer(function(api,root){root=jQuery(root);if(navigator.userAgent.match(/iPhone.* OS [0-6]_/i)){api.one("progress",function(e){if(typeof api.video.subtitles!=="undefined"&&api.video.subtitles.length){fv_player_warning(root,fv_flowplayer_translations.warning_iphone_subs)}})}if(flowplayer.support.android&&flowplayer.support.android.version<5&&(flowplayer.support.android.samsung||flowplayer.support.browser.safari)){fv_player_warning(root,fv_flowplayer_translations.warning_unstable_android,"firefox")}if(/Android 4/.test(navigator.userAgent)&&!/Firefox/.test(navigator.userAgent)){api.on("ready",function(e,api,video){setTimeout(function(){if(video.src&&video.src.match(/fpdl.vimeocdn.com/)&&(video.time==0||video.time==1)){fv_player_warning(root,fv_flowplayer_translations.warning_unstable_android,"firefox");api.on("progress",function(e,api){root.prev().find(".fv-player-warning-firefox").remove()})}},1500)});api.on("error",function(e,api,error){if(error.MEDIA_ERR_NETWORK==2&&error.video.src.match(/fpdl.vimeocdn.com/)){fv_player_warning(root,fv_flowplayer_translations.warning_unstable_android,"firefox")}})}if(/Safari/.test(navigator.userAgent)&&/Version\/5/.test(navigator.userAgent)){api.on("error",function(e,api,error){if(error.video.src.match(/fpdl.vimeocdn.com/)){fv_player_warning(root,fv_flowplayer_translations.warning_old_safari)}})}var sup=flowplayer.support;if(sup.android&&(sup.android.samsung&&parseInt(sup.browser.version)<66||sup.browser.safari)){api.on("error",function(e,api,error){fv_player_warning(root,fv_flowplayer_translations.warning_samsungbrowser,"warning_samsungbrowser")})}});function fv_player_warning(root,warning,classname){var wrapper=jQuery(root).prev(".fv-player-warning-wrapper");if(wrapper.length==0){jQuery(root).before('<div class="fv-player-warning-wrapper">');wrapper=jQuery(root).prev(".fv-player-warning-wrapper")}if(wrapper.find(".fv-player-warning-"+classname).length==0){var latest=jQuery("<p style='display: none' "+(classname?" class='fv-player-warning-"+classname+"'":"")+">"+warning+"</p>");wrapper.append(latest);latest.slideDown()}}}
1
+ !function(e){function t(e,t,n,r){for(var o,a=n.slice(),s=i(t,e),l=0,u=a.length;u>l&&(handler=a[l],"object"==typeof handler&&"function"==typeof handler.handleEvent?handler.handleEvent(s):handler.call(e,s),!s.stoppedImmediatePropagation);l++);return o=!s.stoppedPropagation,r&&o&&e.parentNode?e.parentNode.dispatchEvent(s):!s.defaultPrevented}function n(e,t){return{configurable:!0,get:e,set:t}}function r(e,t,r){var i=y(t||e,r);m(e,"textContent",n(function(){return i.get.call(this)},function(e){i.set.call(this,e)}))}function i(e,t){return e.currentTarget=t,e.eventPhase=e.target===e.currentTarget?2:3,e}function o(e,t){for(var n=e.length;n--&&e[n]!==t;);return n}function a(){if("BR"===this.tagName)return"\n";for(var e=this.firstChild,t=[];e;)8!==e.nodeType&&7!==e.nodeType&&t.push(e.textContent),e=e.nextSibling;return t.join("")}function s(e){!f&&C.test(document.readyState)&&(f=!f,document.detachEvent(d,s),e=document.createEvent("Event"),e.initEvent(p,!0,!0),document.dispatchEvent(e))}function l(e){for(var t;t=this.lastChild;)this.removeChild(t);null!=e&&this.appendChild(document.createTextNode(e))}function u(t,n){return n||(n=e.event),n.target||(n.target=n.srcElement||n.fromElement||document),n.timeStamp||(n.timeStamp=(new Date).getTime()),n}if(!document.createEvent){var c=!0,f=!1,d="onreadystatechange",p="DOMContentLoaded",h="__IE8__"+Math.random(),g=e.Object,m=g.defineProperty||function(e,t,n){e[t]=n.value},v=g.defineProperties||function(t,n){for(var r in n)if(w.call(n,r))try{m(t,r,n[r])}catch(i){e.console&&console.log(r+" failed on object:",t,i.message)}},y=g.getOwnPropertyDescriptor,w=g.prototype.hasOwnProperty,b=e.Element.prototype,I=e.Text.prototype,M=/^[a-z]+$/,C=/loaded|complete/,A={},S=document.createElement("div");r(e.HTMLCommentElement.prototype,b,"nodeValue"),r(e.HTMLScriptElement.prototype,null,"text"),r(I,null,"nodeValue"),r(e.HTMLTitleElement.prototype,null,"text"),m(e.HTMLStyleElement.prototype,"textContent",function(e){return n(function(){return e.get.call(this.styleSheet)},function(t){e.set.call(this.styleSheet,t)})}(y(e.CSSStyleSheet.prototype,"cssText"))),v(b,{textContent:{get:a,set:l},firstElementChild:{get:function(){for(var e=this.childNodes||[],t=0,n=e.length;n>t;t++)if(1==e[t].nodeType)return e[t]}},lastElementChild:{get:function(){for(var e=this.childNodes||[],t=e.length;t--;)if(1==e[t].nodeType)return e[t]}},previousElementSibling:{get:function(){for(var e=this.previousSibling;e&&1!=e.nodeType;)e=e.previousSibling;return e}},nextElementSibling:{get:function(){for(var e=this.nextSibling;e&&1!=e.nodeType;)e=e.nextSibling;return e}},childElementCount:{get:function(){for(var e=0,t=this.childNodes||[],n=t.length;n--;e+=1==t[n].nodeType);return e}},addEventListener:{value:function(e,n,r){var i,a=this,s="on"+e,l=a[h]||m(a,h,{value:{}})[h],c=l[s]||(l[s]={}),f=c.h||(c.h=[]);if(!w.call(c,"w")){if(c.w=function(e){return e[h]||t(a,u(a,e),f,!1)},!w.call(A,s))if(M.test(e))try{i=document.createEventObject(),i[h]=!0,9!=a.nodeType&&null==a.parentNode&&S.appendChild(a),a.fireEvent(s,i),A[s]=!0}catch(i){for(A[s]=!1;S.hasChildNodes();)S.removeChild(S.firstChild)}else A[s]=!1;(c.n=A[s])&&a.attachEvent(s,c.w)}o(f,n)<0&&f[r?"unshift":"push"](n)}},dispatchEvent:{value:function(e){var n,r=this,i="on"+e.type,o=r[h],a=o&&o[i],s=!!a;return e.target||(e.target=r),s?a.n?r.fireEvent(i,e):t(r,e,a.h,!0):(n=r.parentNode)?n.dispatchEvent(e):!0,!e.defaultPrevented}},removeEventListener:{value:function(e,t,n){var r=this,i="on"+e,a=r[h],s=a&&a[i],l=s&&s.h,u=l?o(l,t):-1;u>-1&&l.splice(u,1)}}}),v(I,{addEventListener:{value:b.addEventListener},dispatchEvent:{value:b.dispatchEvent},removeEventListener:{value:b.removeEventListener}}),v(e.XMLHttpRequest.prototype,{addEventListener:{value:function(e,t,n){var r=this,i="on"+e,a=r[h]||m(r,h,{value:{}})[h],s=a[i]||(a[i]={}),l=s.h||(s.h=[]);o(l,t)<0&&(r[i]||(r[i]=function(){var t=document.createEvent("Event");t.initEvent(e,!0,!0),r.dispatchEvent(t)}),l[n?"unshift":"push"](t))}},dispatchEvent:{value:function(e){var n=this,r="on"+e.type,i=n[h],o=i&&i[r],a=!!o;return a&&(o.n?n.fireEvent(r,e):t(n,e,o.h,!0))}},removeEventListener:{value:b.removeEventListener}}),v(e.Event.prototype,{bubbles:{value:!0,writable:!0},cancelable:{value:!0,writable:!0},preventDefault:{value:function(){this.cancelable&&(this.defaultPrevented=!0,this.returnValue=!1)}},stopPropagation:{value:function(){this.stoppedPropagation=!0,this.cancelBubble=!0}},stopImmediatePropagation:{value:function(){this.stoppedImmediatePropagation=!0,this.stopPropagation()}},initEvent:{value:function(e,t,n){this.type=e,this.bubbles=!!t,this.cancelable=!!n,this.bubbles||this.stopPropagation()}}}),v(e.HTMLDocument.prototype,{textContent:{get:function(){return 11===this.nodeType?a.call(this):null},set:function(e){11===this.nodeType&&l.call(this,e)}},addEventListener:{value:function(t,n,r){var i=this;b.addEventListener.call(i,t,n,r),c&&t===p&&!C.test(i.readyState)&&(c=!1,i.attachEvent(d,s),e==top&&function o(e){try{i.documentElement.doScroll("left"),s()}catch(t){setTimeout(o,50)}}())}},dispatchEvent:{value:b.dispatchEvent},removeEventListener:{value:b.removeEventListener},createEvent:{value:function(e){var t;if("Event"!==e)throw new Error("unsupported "+e);return t=document.createEventObject(),t.timeStamp=(new Date).getTime(),t}}}),v(e.Window.prototype,{getComputedStyle:{value:function(){function e(e){this._=e}function t(){}var n=/^(?:[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|))(?!px)[a-z%]+$/,r=/^(top|right|bottom|left)$/,i=/\-([a-z])/g,o=function(e,t){return t.toUpperCase()};return e.prototype.getPropertyValue=function(e){var t,a,s,l=this._,u=l.style,c=l.currentStyle,f=l.runtimeStyle;return e=("float"===e?"style-float":e).replace(i,o),t=c?c[e]:u[e],n.test(t)&&!r.test(e)&&(a=u.left,s=f&&f.left,s&&(f.left=c.left),u.left="fontSize"===e?"1em":t,t=u.pixelLeft+"px",u.left=a,s&&(f.left=s)),null==t?t:t+""||"auto"},t.prototype.getPropertyValue=function(){return null},function(n,r){return r?new t(n):new e(n)}}()},addEventListener:{value:function(n,r,i){var a,s=e,l="on"+n;s[l]||(s[l]=function(e){return t(s,u(s,e),a,!1)}),a=s[l][h]||(s[l][h]=[]),o(a,r)<0&&a[i?"unshift":"push"](r)}},dispatchEvent:{value:function(t){var n=e["on"+t.type];return n?n.call(e,t)!==!1&&!t.defaultPrevented:!0}},removeEventListener:{value:function(t,n,r){var i="on"+t,a=(e[i]||g)[h],s=a?o(a,n):-1;s>-1&&a.splice(s,1)}}})}}(this),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.flowplayer=e()}}(function(){var e;return function(){function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return i(n||e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}return e}()({1:[function(e,t,n){"use strict";var r=t.exports={},i=e("class-list"),o=window.jQuery,a=e("punycode"),s=e("computed-style");r.noop=function(){},r.identity=function(e){return e},r.removeNode=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},r.find=function(e,t){return o?o(e,t).toArray():(t=t||document,Array.prototype.map.call(t.querySelectorAll(e),function(e){return e}))},r.text=function(e,t){e["innerText"in e?"innerText":"textContent"]=t},r.findDirect=function(e,t){return r.find(e,t).filter(function(e){return e.parentNode===t})},r.hasClass=function(e,t){return"string"!=typeof e.className?!1:i(e).contains(t)},r.isSameDomain=function(e){var t=window.location,n=r.createElement("a",{href:e});return t.hostname===n.hostname&&t.protocol===n.protocol&&t.port===n.port},r.css=function(e,t,n){return"object"==typeof t?Object.keys(t).forEach(function(n){r.css(e,n,t[n])}):"undefined"!=typeof n?""===n?e?e.style.removeProperty(t):void 0:e?e.style.setProperty(t,n):void 0:e?s(e,t):void 0},r.createElement=function(e,t,n){try{var i=document.createElement(e);for(var a in t)t.hasOwnProperty(a)&&("css"===a?r.css(i,t[a]):r.attr(i,a,t[a]));return n&&(i.innerHTML=n),i}catch(s){if(!o)throw s;return o("<"+e+">"+n+"</"+e+">").attr(t)[0]}},r.toggleClass=function(e,t,n){if(e){var r=i(e);"undefined"==typeof n?r.toggle(t):n?r.add(t):n||r.remove(t)}},r.addClass=function(e,t){return r.toggleClass(e,t,!0)},r.removeClass=function(e,t){return r.toggleClass(e,t,!1)},r.append=function(e,t){return e.appendChild(t),e},r.appendTo=function(e,t){return r.append(t,e),e},r.prepend=function(e,t){e.insertBefore(t,e.firstChild)},r.insertAfter=function(e,t,n){t==r.lastChild(e)&&e.appendChild(n);var i=Array.prototype.indexOf.call(e.children,t);e.insertBefore(n,e.children[i+1])},r.html=function(e,t){e=e.length?e:[e],e.forEach(function(e){e.innerHTML=t})},r.attr=function(e,t,n){if("class"===t&&(t="className"),r.hasOwnOrPrototypeProperty(e,t))try{e[t]=n}catch(i){if(!o)throw i;o(e).attr(t,n)}else n===!1?e.removeAttribute(t):e.setAttribute(t,n);return e},r.prop=function(e,t,n){return"undefined"==typeof n?e&&e[t]:void(e[t]=n)},r.offset=function(e){var t=e.getBoundingClientRect();return e.offsetWidth/e.offsetHeight>e.clientWidth/e.clientHeight&&(t={left:100*t.left,right:100*t.right,top:100*t.top,bottom:100*t.bottom,width:100*t.width,height:100*t.height}),t},r.width=function(e,t){if(t)return e.style.width=(""+t).replace(/px$/,"")+"px";var n=r.offset(e).width;return"undefined"==typeof n?e.offsetWidth:n},r.height=function(e,t){if(t)return e.style.height=(""+t).replace(/px$/,"")+"px";var n=r.offset(e).height;return"undefined"==typeof n?e.offsetHeight:n},r.lastChild=function(e){return e.children[e.children.length-1]},r.hasParent=function(e,t){for(var n=e.parentElement;n;){if("string"!=typeof t){if(n===t)return!0}else if(r.matches(n,t))return!0;n=n.parentElement}return!1},r.createAbsoluteUrl=function(e){return r.createElement("a",{href:e}).href},r.xhrGet=function(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){return 4===this.readyState?this.status>=400?n():void t(this.responseText):void 0},r.open("get",e,!0),r.send()},r.pick=function(e,t){var n={};return t.forEach(function(t){e.hasOwnProperty(t)&&(n[t]=e[t])}),n},r.hostname=function(e){return a.toUnicode(e||window.location.hostname)},r.browser={webkit:"WebkitAppearance"in document.documentElement.style},r.getPrototype=function(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__},r.hasOwnOrPrototypeProperty=function(e,t){for(var n=e;n;){if(Object.prototype.hasOwnProperty.call(n,t))return!0;n=r.getPrototype(n)}return!1},r.matches=function(e,t){var n=Element.prototype,r=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector||function(e){for(var t=this,n=(t.document||t.ownerDocument).querySelectorAll(e),r=0;n[r]&&n[r]!==t;)r++;return n[r]?!0:!1};return r.call(e,t)},function(e){function t(e){return e.replace(/-[a-z]/g,function(e){return e[1].toUpperCase()})}"undefined"!=typeof e.setAttribute&&(e.setProperty=function(e,n){return this.setAttribute(t(e),String(n))},e.getPropertyValue=function(e){return this.getAttribute(t(e))||null},e.removeProperty=function(e){var n=this.getPropertyValue(e);return this.removeAttribute(t(e)),n})}(window.CSSStyleDeclaration.prototype)},{"class-list":36,"computed-style":37,punycode:44}],2:[function(e,t,n){"use strict";var r=e("../common");t.exports=function(e,t,n,i){n=n||"opaque";var o="obj"+(""+Math.random()).slice(2,15),a='<object class="fp-engine" id="'+o+'" name="'+o+'" ',s=navigator.userAgent.indexOf("MSIE")>-1;a+=s?'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">':' data="'+e+'" type="application/x-shockwave-flash">';var l={width:"100%",height:"100%",allowscriptaccess:"always",wmode:n,quality:"high",flashvars:"",movie:e+(s?"?"+o:""),name:o};"transparent"!==n&&(l.bgcolor=i||"#333333"),Object.keys(t).forEach(function(e){l.flashvars+=e+"="+t[e]+"&"}),Object.keys(l).forEach(function(e){a+='<param name="'+e+'" value="'+l[e]+'"/>'}),a+="</object>";var u=r.createElement("div",{},a);return r.find("object",u)},window.attachEvent&&window.attachEvent("onbeforeunload",function(){window.__flash_savedUnloadHandler=window.__flash_unloadHandler=function(){}})},{"../common":1}],3:[function(e,t,n){"use strict";function r(e){return/^https?:/.test(e)}var i,o=e("../flowplayer"),a=e("../common"),s=e("./embed"),l=e("extend-object"),u=e("bean");i=function(e,t){function n(e){function t(e){return("0"+parseInt(e).toString(16)).slice(-2)}return(e=e.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/))?"#"+t(e[1])+t(e[2])+t(e[3]):void 0}function c(e){if(7===e.length)return e;var t=e.split("").slice(1);return"#"+t.map(function(e){return e+e}).join("")}function f(e){return/application\/x-mpegurl/i.test(e.type)}var d,p,h,g,m=e.conf,v=[],y={engineName:i.engineName,pick:function(t){var n=l({},function(){if(o.support.flashVideo){for(var n,r,i=0;i<t.length;i++)if(r=t[i],/mp4|flv|flash/i.test(r.type)&&(n=r),e.conf.swfHls&&/mpegurl/i.test(r.type)&&(n=r),n&&!/mp4/i.test(n.type))return n;return n}}());if(n)return!n.src||r(n.src)||e.conf.rtmp||n.rtmp||(n.src=a.createAbsoluteUrl(n.src)),n},suspendEngine:function(){g=!0},resumeEngine:function(){g=!1},load:function(i){function w(e){return e.replace(/&amp;/g,"%26").replace(/&/g,"%26").replace(/=/g,"%3D")}d=i,v.forEach(function(e){clearTimeout(e)});var b=a.findDirect("video",t)[0]||a.find(".fp-player > video",t)[0],I=i.src,M=r(I),C=function(){a.removeNode(b)},A=function(e){return e.some(function(e){return!!b.canPlayType(e.type)})};o.support.video&&a.prop(b,"autoplay")&&A(i.sources)?u.one(b,"timeupdate",C):C();var S=i.rtmp||m.rtmp;if(M||S||(I=a.createAbsoluteUrl(I)),h&&f(i)&&h.data!==a.createAbsoluteUrl(m.swfHls)&&y.unload(),h){["live","preload","loop"].forEach(function(e){i.hasOwnProperty(e)&&h.__set(e,i[e])}),Object.keys(i.flashls||{}).forEach(function(e){h.__set("hls_"+e,i.flashls[e])});var E=!1;if(!M&&S)h.__set("rtmp",S.url||S);else{var j=h.__get("rtmp");E=!!j,h.__set("rtmp",null)}h.__play(I,E||i.rtmp&&i.rtmp!==m.rtmp)}else{p="fpCallback"+(""+Math.random()).slice(3,15),I=w(I);var D={hostname:m.embedded?a.hostname(m.hostname):a.hostname(location.hostname),url:I,callback:p};t.getAttribute("data-origin")&&(D.origin=t.getAttribute("data-origin")),["proxy","key","autoplay","preload","subscribe","live","loop","debug","splash","poster","rtmpt"].forEach(function(e){m.hasOwnProperty(e)&&(D[e]=m[e]),i.hasOwnProperty(e)&&(D[e]=i[e]),(m.rtmp||{}).hasOwnProperty(e)&&(D[e]=(m.rtmp||{})[e]),(i.rtmp||{}).hasOwnProperty(e)&&(D[e]=(i.rtmp||{})[e])}),m.splash&&(D.autoplay=!0),m.rtmp&&(D.rtmp=m.rtmp.url||m.rtmp),i.rtmp&&(D.rtmp=i.rtmp.url||i.rtmp),Object.keys(i.flashls||{}).forEach(function(e){var t=i.flashls[e];D["hls_"+e]=t});var N="undefined"!=typeof i.hlsQualities?i.hlsQualities:m.hlsQualities;"undefined"!=typeof N&&(D.hlsQualities=N?encodeURIComponent(JSON.stringify(N)):N),void 0!==m.bufferTime&&(D.bufferTime=m.bufferTime),void 0!==m.bufferTimeMax&&(D.bufferTimeMax=m.bufferTimeMax),M&&delete D.rtmp,D.rtmp&&(D.rtmp=w(D.rtmp));var x,L=m.bgcolor||a.css(t,"background-color")||"";0===L.indexOf("rgb")?x=n(L):0===L.indexOf("#")&&(x=c(L)),D.initialVolume=e.volumeLevel;var T=f(i)?m.swfHls:m.swf;h=s(T,D,m.wmode,x)[0];var Z=a.find(".fp-player",t)[0];a.prepend(Z,h),e.off("quality.flashengine").on("quality.flashengine",function(t,n,r){var i="undefined"!=typeof e.video.hlsQualities?e.video.hlsQualities:e.conf.hlsQualities;if(i)try{h.__quality(r)}catch(o){e.debug("Error changing quality in flash engine",o)}}),setTimeout(function(){try{if(!h.PercentLoaded())return e.trigger("error",[e,{code:7,url:m.swf}])}catch(t){}},5e3),v.push(setTimeout(function(){"undefined"==typeof h.PercentLoaded&&e.trigger("flashdisabled",[e])},15e3)),v.push(setTimeout(function(){"undefined"==typeof h.PercentLoaded&&e.trigger("flashdisabled",[e,!1])},500)),e.off("resume.flashhack").on("resume.flashhack",function(){var t=setTimeout(function(){var t=h.__status().time,n=setTimeout(function(){e.playing&&!e.loading&&h.__status().time===t&&e.trigger("flashdisabled",[e])},400);v.push(n),e.one("seek.flashhack pause.flashhack load.flashack",function(){clearTimeout(n)})},800);v.push(t),e.one("progress",function(){clearTimeout(t)})}),h.pollInterval=setInterval(function(){if(h&&!g){var t=h.__status?h.__status():null;t&&((e.conf.live||e.live||i.live)&&(i.seekOffset=t.seekOffset,i.duration=t.duration+t.seekOffset),e.playing&&t.time&&t.time!==e.video.time&&e.trigger("progress",[e,t.time]),i.buffer=t.buffer/i.bytes*i.duration,e.trigger("buffer",[e,i.buffer]),!i.buffered&&t.time>0&&(i.buffered=!0,e.trigger("buffered",[e])))}},250),window[p]=function(n,r){var i=d;m.debug&&(0===n.indexOf("debug")&&r&&r.length?console.log.apply(console,["-- "+n].concat(r)):console.log("--",n,r));var o={type:n};switch(n){case"ready":r=l(i,r);break;case"click":o.flash=!0;break;case"keydown":o.which=r;break;case"seek":i.time=r;break;case"status":e.trigger("progress",[e,r.time]),r.buffer<i.bytes&&!i.buffered?(i.buffer=r.buffer/i.bytes*i.duration,e.trigger("buffer",i.buffer)):i.buffered||(i.buffered=!0,e.trigger("buffered"));break;case"metadata":var a=atob(r);r={key:a.substr(10,4),data:a.substr(21)}}"click"===n||"keydown"===n?(o.target=t,u.fire(t,n,[o])):"buffered"!=n&&"unload"!==n?setTimeout(function(){e.trigger(o,[e,r])},1):"unload"===n&&e.trigger(o,[e,r])}}},speed:a.noop,unload:function(){h&&h.__unload&&h.__unload();try{p&&window[p]&&delete window[p]}catch(n){}a.find("object",t).forEach(a.removeNode),h=0,e.off(".flashengine"),e.off(".flashhack"),clearInterval(h.pollInterval),v.forEach(function(e){clearTimeout(e)})}};return["pause","resume","seek","volume"].forEach(function(t){y[t]=function(n){try{e.ready&&(void 0===n?h["__"+t]():h["__"+t](n))}catch(r){if("undefined"==typeof h["__"+t])return e.trigger("flashdisabled",[e]);throw r}}}),y},i.engineName="flash",i.canPlay=function(e,t){return o.support.flashVideo&&/video\/(mp4|flash|flv)/i.test(e)||o.support.flashVideo&&t.swfHls&&/mpegurl/i.test(e)},o.engines.push(i)},{"../common":1,"../flowplayer":31,"./embed":2,bean:34,"extend-object":39}],4:[function(e,t,n){"use strict";function r(e){return"undefined"==typeof window.Hls?!1:/mpegurl/.test(e)&&window.Hls.isSupported()}var i,o=e("../flowplayer"),a=o.support,s=o.common,l=o.bean,u=e("./html5-factory");i=function(e,t){function n(n,r,u){var d=o.extend({recoverMediaError:!0},e.conf.hlsjs,n.hlsjs);e.engine.hls&&e.engine.hls.destroy();var p=e.engine.hls=new f(d);i.extensions.forEach(function(n){n({hls:p,player:e,root:t,videoTag:r})}),p.loadSource(n.src),u.resume=function(){e.live&&!e.dvr&&(r.currentTime=p.liveSyncPosition||0),r.play()},u.seek=function(t){try{e.live||e.dvr?r.currentTime=Math.min(t,p.liveSyncPosition||r.duration-d.livePositionOffset):r.currentTime=t}catch(n){e.debug("Failed to seek to ",t,n)}},d.bufferWhilePaused===!1&&e.on("pause",function(){p.stopLoad(),e.one("resume",function(){p.startLoad()})}),e.on("quality",function(e,t,n){p.nextLevel=a=n});var h,g,m=function(n){if(e.debug("hlsjs - recovery"),s.removeClass(t,"is-paused"),s.addClass(t,"is-seeking"),l.one(r,"seeked",function(){r.paused&&(s.removeClass(t,"is-poster"),e.poster=!1,r.play()),s.removeClass(t,"is-seeking")}),n)return p.startLoad();var i=performance.now();!h||i-h>3e3?(h=performance.now(),p.recoverMediaError()):(!g||i-g>3e3)&&(g=performance.now(),p.swapAudioCodec(),p.recoverMediaError())};return p.on(f.Events.MANIFEST_PARSED,function(t,i){var o,l=n.hlsQualities||e.conf.hlsQualities,u={},f=i.levels;if(l===!1)return p.attachMedia(r);if("drive"===l)switch(f.length){case 4:o=[1,2,3];break;case 5:o=[1,2,3,4];break;case 6:o=[1,3,4,5];break;case 7:o=[1,3,5,6];break;case 8:o=[1,3,6,7];break;default:o=f.length<3||f[0].height&&f[2].height&&f[0].height===f[2].height?[]:[1,2]}if(n.qualities=[{value:-1,label:"Auto"}],Array.isArray(l)){var d=l.find(function(e){return-1===e||e.level&&-1===e.level});d?n.qualities[0].label="number"!=typeof d?d.label:n.qualities[0].label:n.qualities=[],o=l.map(function(e){return"undefined"!=typeof e.level&&(u[e.level]=e.label),"undefined"!=typeof e.level?e.level:e})}var h=-2;n.qualities=n.qualities.concat(f.map(function(e,t){if(o&&-1===o.indexOf(t))return!1;var n=u[t]||Math.min(e.width,e.height)+"p";return u[t]||"drive"===l||(n+=" ("+Math.round(e.bitrate/1e3)+"k)"),t===a&&(h=t),{value:t,label:n}})).filter(s.identity);var g=n.quality=-2===h?n.qualities[0].value||-1:h;g!==p.currentLevel&&(p.currentLevel=g),p.attachMedia(r),c&&n.src!==c&&r.play(),c=n.src}),p.on(f.Events.ERROR,function(t,n){if(n.fatal)if(d.recoverNetworkError&&n.type===f.ErrorTypes.NETWORK_ERROR)m(!0);else if(d.recoverMediaError&&n.type===f.ErrorTypes.MEDIA_ERROR)m(!1);else{var r=5;n.type===f.ErrorTypes.NETWORK_ERROR&&(r=2),n.type===f.ErrorTypes.MEDIA_ERROR&&(r=3),p.destroy(),e.trigger("error",[e,{code:r}])}}),e.one("unload",function(){p.destroy()}),{handlers:{error:function(e,t){var n=t.error&&t.error.code;return d.recoverMediaError&&3===n||!n?(e.preventDefault(),m(!1),!0):d.recoverNetworkError&&2===n?(e.preventDefault(),m(!0),!0):void 0}}}}var a,c,f=window.Hls;return u("hlsjs-lite",e,t,r,n)},i.canPlay=function(e,t){return t.hlsjs===!1||t.clip&&t.clip.hlsjs===!1?!1:a.browser.safari&&!(t.clip&&t.clip.hlsjs||t.hlsjs||{}).safari?!1:o.support.video&&r(e)},i.engineName="hlsjs-lite",i.plugin=function(e){i.extensions.push(e)},i.extensions=[],o.engines.push(i)},{"../flowplayer":31,"./html5-factory":5}],5:[function(e,t,n){function r(e,t,n,r,a){function f(e,o,a,f){var p=n.getAttribute("data-flowplayer-instance-id");if(e.listeners&&e.listeners.hasOwnProperty(p))return void(e.listeners[p]=a);(e.listeners||(e.listeners={}))[p]=a,u.on(o,"error",function(n){try{r(n.target.getAttribute("type"))&&t.trigger("error",[t,{code:4,video:c(a,{src:e.src,url:e.src})}])}catch(i){}}),t.on("shutdown",function(){u.off(o),u.off(e,".dvrhack"),t.off(".loophack")});var h={},g=function(e){"metadata"===e.kind&&(e.mode="hidden",e.addEventListener("cuechange",function(){e.activeCues.length&&t.trigger("metadata",[t,e.activeCues[0].value])},!1))};return e&&e.textTracks&&e.textTracks.length&&Array.prototype.forEach.call(e.textTracks,g),e&&e.textTracks&&"function"==typeof e.textTracks.addEventListener&&e.textTracks.addEventListener("addtrack",function(e){g(e.track)},!1),(t.conf.dvr||t.dvr||a.dvr)&&u.on(e,"progress.dvrhack",function(){e.seekable.length&&(t.video.duration=e.seekable.end(null),t.video.seekOffset=e.seekable.start(null),t.trigger("dvrwindow",[t,{start:e.seekable.start(null),end:e.seekable.end(null)}]),e.currentTime>=e.seekable.start(null)||(e.currentTime=e.seekable.start(null)))}),Object.keys(d).forEach(function(r){var o=d[r];if("webkitendfullscreen"===r&&t.conf.disableInline&&(o="unload"),o){var u=function(u){if(a=e.listeners[p],u.target&&s.hasClass(u.target,"fp-engine")){/progress/.test(o)||t.debug(r,"->",o,u);var d=function(e){t.trigger(e||o,[t,h])};if(!t.ready&&!/ready|error/.test(o)||!o||!s.find("video",n).length)return void("resume"===o&&t.one("ready",function(){setTimeout(function(){d()})}));var h;if("unload"===o)return void t.unload();switch(o){case"ready":if(t.ready)return t.debug("Player already ready, not sending duplicate ready event");if(!(e.duration&&e.duration!==1/0||t.live))return t.debug("No duration and VOD setup, not sending ready event");if(h=c(a,{duration:e.duration<Number.MAX_VALUE?e.duration:0,width:e.videoWidth,height:e.videoHeight,url:e.currentSrc}),h.seekable=h.duration,t.debug("Ready: ",h),!t.live&&!h.duration&&!l.hlsDuration&&"loadeddata"===r){var g=function(){h.duration=e.duration;try{h.seekable=e.seekable&&e.seekable.end(null)}catch(t){}d(),e.removeEventListener("durationchange",g),s.toggleClass(n,"is-live",!1)};e.addEventListener("durationchange",g);var m=function(){t.ready||e.duration||(h.duration=0,s.addClass(n,"is-live"),d()),e.removeEventListener("timeupdate",m)};return void e.addEventListener("timeupdate",m)}break;case"progress":case"seek":if(e.currentTime>0||t.live)h=Math.max(e.currentTime,0);else if("seek"===o&&0===e.currentTime)h=0;else if("progress"==o)return;break;case"buffer":h=[];for(var v=0;v<e.buffered.length;v++)h.push({start:e.buffered.start(v),end:e.buffered.end(v)});e.buffered.length&&e.buffered.end(null)===e.duration&&d("buffered");break;case"speed":h=i(e.playbackRate);break;case"volume":h=i(e.muted?0:e.volume);break;case"error":try{if(f&&f.handlers&&f.handlers.error){var y=f.handlers.error(u,e);if(y)return}h=(u.srcElement||u.originalTarget).error,h.video=c(a,{src:e.src,url:e.src})}catch(w){return}}d()}};n.addEventListener(r,u,!0),h[r]||(h[r]=[]),h[r].push(u)}}),h}var p,h,g,m=s.findDirect("video",n)[0]||s.find(".fp-player > video",n)[0],v=t.conf;return g={engineName:e,pick:function(e){var t=l.video&&e.filter(function(e){return r(e.type)})[0];if(t)return"string"==typeof t.src&&(t.src=s.createAbsoluteUrl(t.src)),t},load:function(e){var r=s.find(".fp-player",n)[0],i=!1;if(m||(m=document.createElement("video"),s.prepend(r,m),m.autoplay=!!v.splash,i=!0),s.addClass(m,"fp-engine"),s.find("track",m).forEach(s.removeNode),m.preload="none",v.nativesubtitles||s.attr(m,"crossorigin",!1),v.disableInline||(m.setAttribute("webkit-playsinline","true"),m.setAttribute("playsinline","true")),l.inlineVideo||s.css(m,{position:"absolute",top:"-9999em"}),l.subtitles&&v.nativesubtitles&&e.subtitles&&e.subtitles.length){s.addClass(m,"native-subtitles");var c=e.subtitles,d=function(e){var t=m.textTracks;t.length&&(t[0].mode=e)};c.some(function(e){return!s.isSameDomain(e.src)})&&s.attr(m,"crossorigin","anonymous"),"function"==typeof m.textTracks.addEventListener&&m.textTracks.addEventListener("addtrack",function(){d("disabled"),d("showing")}),c.forEach(function(e){m.appendChild(s.createElement("track",{kind:"subtitles",srclang:e.srclang||"en",label:e.label||"en",src:e.src,default:e["default"]}))})}u.off(m,"timeupdate",s.noop),u.on(m,"timeupdate",s.noop),s.prop(m,"loop",!1),t.off(".loophack"),(e.loop||v.loop)&&t.on("finish.loophack",function(){t.resume()}),"undefined"!=typeof h&&(m.volume=h);var p=a(e,m,g);if(v.autoplay||v.splash||e.autoplay){t.debug("Autoplay / Splash setup, try to start video"),m.load();var y=function(){try{var e=m.play();if(e&&e["catch"]){var n=function(e){if("AbortError"===e.name&&20===e.code)return i?void 0:m.play()["catch"](n);if(!v.mutedAutoplay)throw new Error("Unable to autoplay");return t.debug("Play errored, trying muted",e),t.mute(!0,!0),m.play()};e["catch"](n)["catch"](function(){v.autoplay=!1,t.mute(!1,!0),t.trigger("stop",[t])})}}catch(r){t.debug("play() error thrown",r)}};m.readyState>0?y():u.one(m,"canplay",y)}if(g._listeners=f(m,s.find("source",m).concat(m),e,p)||g._listeners,!(v.autoplay||v.splash||e.autoplay)){var w=function(){o(n)&&(t.debug("player is in viewport, preload"),l.preloadMetadata?m.preload="metadata":m.load(),u.off(document,"scroll.preloadviewport"))};u.off(document,"scroll.preloadviewport"),u.on(document,"scroll.preloadviewport",function(){window.requestAnimationFrame(w)}),w()}},mute:function(e){m.muted=!!e,t.trigger("mute",[t,e]),t.trigger("volume",[t,e?0:m.volume])},pause:function(){m.pause()},resume:function(){m.play()},speed:function(e){m.playbackRate=e},seek:function(e){var n=m.paused||t.finished;try{m.currentTime=e,n&&u.one(m,"seeked",function(){m.pause()})}catch(r){}},volume:function(e){h=e,m&&(m.volume=e,e&&g.mute(!1))},unload:function(){u.off(document,"scroll.preloadviewport"),s.find("video.fp-engine",n).forEach(function(e){"MediaSource"in window?e.src=URL.createObjectURL(new MediaSource):e.src="",s.removeNode(e)}),p=clearInterval(p);var e=n.getAttribute("data-flowplayer-instance-id");delete m.listeners[e],m=0,g._listeners&&Object.keys(g._listeners).forEach(function(e){g._listeners[e].forEach(function(t){n.removeEventListener(e,t,!0)})})}}}function i(e,t){return t=t||100,Math.round(e*t)/t}function o(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)+t.height&&t.right<=(window.innerWidth||document.documentElement.clientWidth)+t.width}var a=e("../flowplayer"),s=a.common,l=a.support,u=a.bean,c=a.extend,f=l.browser.safari&&!l.iOS,d={ended:"finish",pause:"pause",play:"resume",timeupdate:"progress",volumechange:"volume",ratechange:"speed",seeked:"seek",loadedmetadata:f?0:"ready",canplaythrough:f?"ready":0,durationchange:"ready",error:"error",dataunavailable:"error",webkitendfullscreen:!a.support.inlineVideo&&"unload",progress:"buffer"};t.exports=r},{"../flowplayer":31}],6:[function(e,t,n){"use strict";function r(e){return/mpegurl/i.test(e)?"application/x-mpegurl":e}function i(e){return/^(video|application)/i.test(e)||(e=r(e)),!!u.canPlayType(e).replace("no","")}var o,a=e("../flowplayer"),s=a.common,l=e("./html5-factory"),u=document.createElement("video");o=function(e,t){return l("html5",e,t,i,function(e,t){t.currentSrc!==e.src?(s.find("source",t).forEach(s.removeNode),t.src=e.src,t.type=e.type):e.autoplay&&t.load()})},o.canPlay=function(e){return a.support.video&&i(e)},o.engineName="html5",a.engines.push(o)},{"../flowplayer":31,"./html5-factory":5}],7:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){e.on("ready",function(){var e=i.find("video.fp-engine",t)[0];e&&(e.setAttribute("x-webkit-airplay","allow"),window.WebKitPlaybackTargetAvailabilityEvent&&(e.addEventListener("webkitplaybacktargetavailabilitychanged",function(e){if("available"===e.availability){var n=i.find(".fp-header",t)[0];i.find(".fp-airplay",n).forEach(i.removeNode);var r=i.createElement("a",{class:"fp-airplay fp-icon",title:"Play on AirPlay device"});n.appendChild(r)}}),e.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",function(){var n=i.find(".fp-airplay",t)[0];n&&i.toggleClass(n,"fp-active",e.webkitCurrentPlaybackTargetIsWireless)})))}),o.on(t,"click",".fp-airplay",function(e){e.preventDefault();var n=i.find("video.fp-engine",t)[0];n.webkitShowPlaybackTargetPicker()})})},{"../common":1,"../flowplayer":31,bean:34}],8:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("./resolve").TYPE_RE,o=e("scriptjs"),a=e("bean");r(function(e,t){var n,r=e.conf.analytics,s=0,l=0;if(r){"undefined"==typeof _gat&&o("//google-analytics.com/ga.js");var u=function(){var e=_gat._getTracker(r);return e._setAllowLinker(!0),e},c=function(r,o,a){if(a=a||e.video,s&&"undefined"!=typeof _gat){var l=u();l._trackEvent("Video / Seconds played",e.engine.engineName+"/"+a.type,a.title||t.getAttribute("title")||a.src.split("/").slice(-1)[0].replace(i,""),Math.round(s/1e3)),s=0,n&&(clearTimeout(n),n=null)}};e.bind("load unload",c).bind("progress",function(){e.seeking||(s+=l?+new Date-l:0,l=+new Date),n||(n=setTimeout(function(){n=null;var e=u();e._trackEvent("Flowplayer heartbeat","Heartbeat","",0,!0)},6e5))}).bind("pause",function(){l=0}),e.bind("shutdown",function(){a.off(window,"unload",c)}),a.on(window,"unload",c)}})},{"../flowplayer":31,"./resolve":21,bean:34,scriptjs:45}],9:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("bean"),a=e("scriptjs");r(function(e,t){function n(){var e,t,n;e=g.applicationId||chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,t=new chrome.cast.SessionRequest(e),n=new chrome.cast.ApiConfig(t,r,s),chrome.cast.initialize(n,l,u)}function r(){console.log("sessionListener")}function s(e){e===chrome.cast.ReceiverAvailability.AVAILABLE&&c()}function l(){}function u(){console.log("onError")}function c(){var e=i.find(".fp-header",t)[0];if(e){i.find(".fp-chromecast",e).forEach(i.removeNode),i.find(".fp-chromecast-engine",t).forEach(i.removeNode),h=i.createElement("a",{class:"fp-chromecast fp-icon",title:"Play on Cast device"}),e.insertBefore(h,i.find(".fp-fullscreen",e)[0]);var n=i.createElement("div",{class:"fp-chromecast-engine"}),r=i.createElement("p",{class:"fp-chromecast-engine-status"}),o=i.createElement("p",{class:"fp-chromecast-engine-icon"});n.appendChild(o),n.appendChild(r);var a=i.find(".fp-engine",t)[0];a?a.parentNode.insertBefore(n,a):i.prepend(i.find(".fp-player",t)[0]||t,n)}}function f(){clearInterval(p),p=null,e.release(),i.toggleClass(t,"is-chromecast",!1),i.toggleClass(h,"fp-active",!1)}if(e.conf.chromecast!==!1){a("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"),window.__onGCastApiAvailable=function(e){e&&n()};var d,p,h,g=e.conf.chromecast||{};o.on(t,"click",".fp-chromecast",function(n){return n.preventDefault(),d?(e.trigger("pause",[e]),d.stop(),d=null,void f()):(e.playing&&e.pause(),void chrome.cast.requestSession(function(n){function r(n){n.addUpdateListener(function(r){if(d){p=p||setInterval(function(){e.trigger("progress",[e,n.getEstimatedTime()])},500),r?(i.toggleClass(t,"is-chromecast",!0),i.toggleClass(h,"fp-active",!0),e.hijack({pause:function(){n.pause()},resume:function(){n.play()},seek:function(e){var t=new chrome.cast.media.SeekRequest;t.currentTime=e,n.seek(t)}})):(f(),e.trigger("finish",[e]));var o=n.playerState;e.paused&&o===chrome.cast.media.PlayerState.PLAYING&&e.trigger("resume",[e]),e.playing&&o===chrome.cast.media.PlayerState.PAUSED&&e.trigger("pause",[e]),i.toggleClass(t,"is-loading",o===chrome.cast.media.PlayerState.BUFFERING)}})}d=n;var o=d.receiver.friendlyName;i.html(i.find(".fp-chromecast-engine-status")[0],"Playing on device "+o);var a=new chrome.cast.media.MediaInfo(e.video.src),s=new chrome.cast.media.LoadRequest(a);d.loadMedia(s,r,function(){})},function(e){console.error("requestSession error",e)}))})}})},{"../common":1,"../flowplayer":31,bean:34,scriptjs:45}],10:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){function n(e){t.className=t.className.replace(a," "),e>=0&&i.addClass(t,"cue"+e)}function r(t){var n=t&&!isNaN(t.time)?t.time:t;return 0>n&&(n=e.video.duration+n),.125*Math.round(n/.125)}var a=/ ?cue\d+ ?/,s=!1,l={},u=-.125,c=function(t){n(t.index),e.trigger("cuepoint",[e,t])};e.on("progress",function(e,t,n){if(!s)for(var i=r(n);i>u;)u+=.125,l[u]&&l[u].forEach(c)}).on("unload",n).on("beforeseek",function(e){setTimeout(function(){e.defaultPrevented||(s=!0)})}).on("seek",function(e,t,i){n(),u=r(i||0)-.125,s=!1,!i&&l[0]&&l[0].forEach(c)}).on("ready",function(t,n,r){u=-.125;var i=r.cuepoints||e.conf.cuepoints||[];e.setCuepoints(i)}).on("finish",function(){for(var t=r(e.video.duration);t>u;)u+=.125,l[u]&&l[u].forEach(c);u=-.125}),e.conf.generate_cuepoints&&e.bind("load",function(){i.find(".fp-cuepoint",t).forEach(i.removeNode)}),e.setCuepoints=function(t){return e.cuepoints=[],l={},t.forEach(e.addCuepoint),e},e.addCuepoint=function(n){e.cuepoints||(e.cuepoints=[]),"number"==typeof n&&(n={time:n}),n.index=0;var a=r(n);if(l[a]||(l[a]=[]),l[a].push(n),e.cuepoints.length&&(n.index=Math.max.apply(null,e.cuepoints.map(function(e){return e.index}))+1),e.cuepoints.push(n),e.conf.generate_cuepoints&&n.visible!==!1){var s=e.video.duration,u=i.find(".fp-timeline",t)[0];i.css(u,"overflow","visible");var c=n.time||n;0>c&&(c=s+c);var f=i.createElement("a",{className:"fp-cuepoint fp-cuepoint"+n.index});i.css(f,"left",c/s*100+"%"),u.appendChild(f),o.on(f,"mousedown",function(t){t.preventDefault(),t.stopPropagation(),e.seek(c)})}return e},e.removeCuepoint=function(n){"number"==typeof n&&(n=e.cuepoints.filter(function(e){return e.index===n})[0]);var o=e.cuepoints.indexOf(n),a=r(n);if(-1!==o){e.cuepoints=e.cuepoints.slice(0,o).concat(e.cuepoints.slice(o+1));var s=i.find(".fp-timeline",t)[0];i.find(".fp-cuepoint"+n.index,s).forEach(i.removeNode);var u=l[a].indexOf(n);if(-1!==u)return l[a]=l[a].slice(0,u).concat(l[a].slice(u+1)),e}}})},{"../common":1,"../flowplayer":31,bean:34}],11:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("bean"),o=e("../common"),a=e("./util/clipboard");r(function(e,t){if(e.conf.embed!==!1&&e.conf.share!==!1){var n=o.find(".fp-share-menu",t)[0],r=o.createElement("a",{class:"fp-icon fp-embed",title:"Copy to your site"},"Embed");o.append(n,r),e.embedCode=function(){var n=e.conf.embed||{},r=e.video,i=n.width||r.width||o.width(t),a=n.height||r.height||o.height(t),s=e.conf.ratio,l='<iframe src="'+e.shareUrl(!0)+'" allowfullscreen style="border:none;';return n.width||n.height?(isNaN(i)||(i+="px"),isNaN(a)||(a+="px"),l+"width:"+i+";height:"+a+';"></iframe>'):((!s||e.conf.adaptiveRatio)&&(s=a/i),'<div style="position:relative;width:100%;display:inline-block;">'+l+'position:absolute;top:0;left:0;width:100%;height:100%;"></iframe><div style="padding-top:'+100*s+'%;"></div></div>')},i.on(t,"click",".fp-embed",function(){a(e.embedCode(),function(){e.message("The embed code is now on your clipboard",2e3)},function(){e.textarea(e.embedCode(),"Copy the code below to embed your video")})})}})},{"../common":1,"../flowplayer":31,"./util/clipboard":30,bean:34}],12:[function(e,t,n){"use strict";t.exports=function(e,t){t||(t=document.createElement("div"));var n={},r={},i=function(e,i,o){var a=e.split(".")[0],s=function(l){o&&(t.removeEventListener(a,s),n[e].splice(n[e].indexOf(s),1));var u=[l].concat(r[l.timeStamp+l.type]||[]);i&&i.apply(void 0,u)};t.addEventListener(a,s),n[e]||(n[e]=[]),n[e].push(s)};e.on=e.bind=function(t,n){var r=t.split(" ");return r.forEach(function(e){i(e,n)}),e},e.one=function(t,n){var r=t.split(" ");return r.forEach(function(e){i(e,n,!0)}),e};var o=function(e,t){return 0===t.filter(function(t){return-1===e.indexOf(t)}).length};e.off=e.unbind=function(r){var i=r.split(" ");return i.forEach(function(e){var r=e.split(".").slice(1),i=e.split(".")[0];Object.keys(n).filter(function(e){var t=e.split(".").slice(1);return(!i||0===e.indexOf(i))&&o(t,r)}).forEach(function(e){var r=n[e],i=e.split(".")[0];n[e]=r.filter(function(e){return t.removeEventListener(i,e),!1})})}),e},e.trigger=function(n,i,o){if(n){i=(i||[]).length?i||[]:[i];var a,s=document.createEvent("Event");return a=n.type||n,s.initEvent(a,!1,!0),Object.defineProperty&&(s.preventDefault=function(){Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})}),r[s.timeStamp+s.type]=i,t.dispatchEvent(s),o?s:e}}},t.exports.EVENTS=["beforeseek","disable","error","finish","fullscreen","fullscreen-exit","load","mute","pause","progress","ready","resume","seek","speed","stop","unload","volume","boot","shutdown"]},{}],13:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){var n=e.conf;if(n.share!==!1&&n.facebook){e.facebook=function(){var e,t,r=550,i=420,o=screen.height,a=screen.width,s="scrollbars=yes,resizable=yes,toolbar=no,location=yes",l="string"==typeof n.facebook?n.facebook:window.location.toString();e=Math.round(a/2-r/2),t=0,o>i&&(t=Math.round(o/2-i/2)),window.open("https://www.facebook.com/sharer.php?s=100&p[url]="+encodeURIComponent(l),"sharer",s+",width="+r+",height="+i+",left="+e+",top="+t)};var r=i.find(".fp-share-menu",t)[0],a=i.createElement("a",{class:"fp-icon fp-facebook"},"Facebook");i.append(r,a),o.on(t,"click",".fp-facebook",function(){e.facebook()})}})},{"../common":1,"../flowplayer":31,bean:34}],14:[function(e,t,n){"use strict";var r,i=e("../flowplayer"),o=e("bean"),a=e("../common"),s="fullscreen",l="fullscreen-exit",u=i.support.fullscreen;o.on(document,"fullscreenchange.ffscr webkitfullscreenchange.ffscr mozfullscreenchange.ffscr MSFullscreenChange.ffscr",function(e){var t=document.webkitCurrentFullScreenElement||document.mozFullScreenElement||document.fullscreenElement||document.msFullscreenElement;if(r||t.parentNode&&t.parentNode.getAttribute("data-flowplayer-instance-id")){var n=r||i(t.parentNode);t?r=n.trigger(s,[n]):(r.trigger(l,[r]),r=null)}}),i(function(e,t){var n=a.createElement("div",{className:"fp-player"});if(Array.prototype.map.call(t.children,a.identity).forEach(function(e){a.matches(e,".fp-ratio,script")||n.appendChild(e)}),t.appendChild(n),e.conf.fullscreen){var i,o,c=window;e.isFullscreen=!1,e.fullscreen=function(t){return e.disabled?void 0:(void 0===t&&(t=!e.isFullscreen),t&&(i=c.scrollY,o=c.scrollX),u?t?["requestFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].forEach(function(e){"function"==typeof n[e]&&(n[e](Element.ALLOW_KEYBOARD_INPUT),"webkitRequestFullScreen"!==e||document.webkitFullscreenElement||n[e]())}):["exitFullscreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].forEach(function(e){"function"==typeof document[e]&&document[e]()}):e.trigger(t?s:l,[e]),e)};var f;e.on("mousedown.fs",function(){+new Date-f<150&&e.ready&&e.fullscreen(),f=+new Date}),e.on(s,function(){a.addClass(t,"is-fullscreen"),a.toggleClass(t,"fp-minimal-fullscreen",a.hasClass(t,"fp-minimal")),a.removeClass(t,"fp-minimal"),u||a.css(t,"position","fixed"),e.isFullscreen=!0}).on(l,function(){var n;a.toggleClass(t,"fp-minimal",a.hasClass(t,"fp-minimal-fullscreen")),a.removeClass(t,"fp-minimal-fullscreen"),u||"html5"!==e.engine||(n=t.css("opacity")||"",a.css(t,"opacity",0)),u||a.css(t,"position",""),a.removeClass(t,"is-fullscreen"),u||"html5"!==e.engine||setTimeout(function(){t.css("opacity",n)}),e.isFullscreen=!1,c.scrollTo(o,i)}).on("unload",function(){e.isFullscreen&&e.fullscreen()}),e.on("shutdown",function(){r=null,a.removeNode(n)})}})},{"../common":1,"../flowplayer":31,bean:34}],15:[function(e,t,n){"use strict";var r,i,o=e("../flowplayer"),a=e("bean"),s=e("../common");a.on(document,"keydown.fp",function(e){var t=r,n=e.ctrlKey||e.metaKey||e.altKey,i=e.which,o=t&&t.conf;if(t&&o.keyboard&&!t.disabled&&!n&&t.ready){if(e.shiftKey)return 39==i?t.speed(!0):37==i&&t.speed(!1),e.preventDefault();if(58>i&&i>47)return e.preventDefault(),t.seekTo(i-48);var a=function(){switch(i){case 38:case 75:return t.volume(t.volumeLevel+.15),!0;case 40:case 74:return t.volume(t.volumeLevel-.15),!0;case 39:case 76:return t.seeking=!0,t.seek(!0),!0;case 37:case 72:return t.seeking=!0,t.seek(!1),!0;case 190:return t.seekTo(),!0;case 32:return t.toggle(),!0;case 70:return o.fullscreen&&t.fullscreen(),!0;case 77:return t.mute(),!0;case 81:return t.unload(),!0}}();a&&e.preventDefault()}}),o(function(e,t){e.conf.keyboard&&(a.on(document,"click",function(n){if(s.hasParent(n.target,t))r=e.disabled?0:e;else{if(r!==e)return;r=0}r&&(i=t)}),e.bind("shutdown",function(){i==t&&(i=null)}))})},{"../common":1,"../flowplayer":31,bean:34}],16:[function(e,t,n){var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){e.showMenu=function(n,r){var a=i.find(".fp-ui",t)[0];i.toggleClass(n,"fp-active",!0),setTimeout(function(){o.one(document,"click",function(){e.hideMenu(n)})});var s=r;if(r&&r.tagName&&(s={left:i.offset(r).left,rightFallbackOffset:i.width(r),top:i.offset(r).top+i.height(r)}),!s)return i.css(n,"top","auto");s.rightFallbackOffset=s.rightFallbackOffset||0;var l=s.top-i.offset(a).top,u=s.left-i.offset(a).left;i.width(n)+u>i.width(a)&&(u=u-i.width(n)+s.rightFallbackOffset),i.height(n)+l>i.height(a)&&(l-=i.height(n)),i.css(n,{top:l+"px",left:u+"px",right:"auto"})},e.hideMenu=function(e){i.toggleClass(e,"fp-active",!1),i.css(e,{top:"-9999em"})}})},{"../common":1,"../flowplayer":31,bean:34}],17:[function(e,t,n){var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){function n(e){var t=i.createElement("div",{className:"fp-message"},e);return s.insertBefore(t,a),setTimeout(function(){i.toggleClass(t,"fp-shown")}),t}function r(e){i.removeNode(e)}var a=i.find(".fp-header",t)[0],s=i.find(".fp-ui",t)[0];e.message=function(e,t){var o=n(e),a=function(){i.toggleClass(o,"fp-shown"),setTimeout(function(){r(o)},500)};return t&&setTimeout(a,t),a},e.textarea=function(e){var t=document.createElement("textarea");t.value=e,t.className="fp-textarea",s.appendChild(t),o.on(document,"click.fptextarea",function(e){return e.target===t?t.select():(e.stopPropagation(),e.preventDefault(),i.removeNode(t),void o.off(document,"click.fptextarea"))})}})},{"../common":1,"../flowplayer":31,bean:34}],18:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=/IEMobile/.test(window.navigator.userAgent),o=e("../common"),a=e("bean"),s=e("./ui").format,l=r.support,u=window.navigator.userAgent;(l.touch||i)&&r(function(e,t){var n=l.android,r=n&&!n.firefox,c=/Silk/.test(u),f=n.version||0;if(r&&!i){if(!/Chrome/.test(u)&&4>f||n.samsung&&5>f){var d=e.load;e.load=function(){var n=d.apply(e,arguments);return o.find("video.fp-engine",t)[0].load(),e.trigger("ready",[e,e.video]),n}}var p,h=0,g=function(e){p=setInterval(function(){e.video.time=++h,e.trigger("progress",[e,h])},1e3)};e.on("ready pause unload",function(){p&&(clearInterval(p),p=null)}),e.on("ready",function(){h=0}),e.on("resume",function(t,n){return n.live?h?g(n):void e.one("progress",function(e,t,n){0===n&&g(t)}):void 0})}l.volume||(o.removeClass(t,"fp-mute"),o.addClass(t,"no-volume")),l.iOS&&o.addClass(t,"fp-mute"),o.addClass(t,"is-touch"),e.sliders&&e.sliders.timeline&&e.sliders.timeline.disableAnimation();var m=!1;a.on(t,"touchmove",function(){m=!0});var v=!0;if(a.on(t,"touchend click",function(n){if(m)return void(m=!1);var r=o.find("video.fp-engine",t)[0];return v&&e.conf.clickToUnMute&&r&&r.muted&&e.conf.autoplay&&(r.muted=!1),v=!1,e.playing&&!o.hasClass(t,"is-mouseover")?(o.addClass(t,"is-mouseover"),o.removeClass(t,"is-mouseout"),n.preventDefault(),void n.stopPropagation()):void(e.playing||e.splash||!o.hasClass(t,"is-mouseout")||o.hasClass(t,"is-mouseover")||setTimeout(function(){e.disabled||e.playing||e.splash||o.find("video.fp-engine",t)[0].play()},400))}),!l.fullscreen&&e.conf.native_fullscreen&&"function"==typeof o.createElement("video").webkitEnterFullScreen){var y=e.fullscreen;e.fullscreen=function(){var n=o.find("video.fp-engine",t)[0];return n?(e.trigger("fullscreen",[e]),a.on(document,"webkitfullscreenchange.nativefullscreen",function(){document.webkitFullscreenElement===n&&(a.off(document,".nativefullscreen"),a.on(document,"webkitfullscreenchange.nativefullscreen",function(){document.webkitFullscreenElement||(a.off(document,".nativefullscreen"),e.trigger("fullscreen-exit",[e]))}))}),n.webkitEnterFullScreen(),void a.one(n,"webkitendfullscreen",function(){a.off(document,"fullscreenchange.nativefullscreen"),e.trigger("fullscreen-exit",[e]),o.prop(n,"controls",!0),o.prop(n,"controls",!1)})):y.apply(e)}}(r||c)&&e.bind("ready",function(){var n=o.find("video.fp-engine",t)[0];e.conf.splash&&n&&n.paused&&"hlsjs-lite"!==e.engine.engineName&&(a.one(n,"canplay",function(){n.play()}),n.load()),e.bind("progress.dur",function(){if(!e.live&&!e.conf.live&&n){var r=n.duration;1!==r&&(e.video.duration=r,o.find(".fp-duration",t)[0].innerHTML=s(r),e.unbind("progress.dur"))}})})})},{"../common":1,"../flowplayer":31,"./ui":27,bean:34}],19:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("extend-object"),o=e("bean"),a=e("../common"),s=e("./resolve"),l=new s,u=window.jQuery,c=/^#/;r(function(e,t){function n(){return a.find(h.query,r())}function r(){return c.test(h.query)?void 0:t}function f(){return a.find(h.query+"."+g,r())}function d(){var n=a.find(".fp-playlist",t)[0];if(!n){n=a.createElement("div",{className:"fp-playlist"});var r=a.find(".fp-next,.fp-prev",t);r.length?r[0].parentElement.insertBefore(n,r[0]):a.insertAfter(t,a.find("video",t)[0],n)}n.innerHTML="",e.conf.playlist[0].length&&(e.conf.playlist=e.conf.playlist.map(function(e){if("string"==typeof e){var t=e.split(s.TYPE_RE)[1];return{sources:[{type:"m3u8"===t.toLowerCase()?"application/x-mpegurl":"video/"+t,src:e}]}}return{sources:e.map(function(e){var t={};return Object.keys(e).forEach(function(n){t.type=/mpegurl/i.test(n)?"application/x-mpegurl":"video/"+n,t.src=e[n]}),t})}})),e.conf.playlist.forEach(function(t,r){var i=t.sources[0].src;n.appendChild(a.createElement("a",{href:i,className:e.video.index===r?g:void 0,"data-index":r}))})}function p(t){return"undefined"!=typeof t.index?t.index:"undefined"!=typeof e.video.index?e.video.index:e.conf.startIndex||0}var h=i({active:"is-active",advance:!0,query:".fp-playlist a"},e.conf),g=h.active,m=a.find(".fp-ui",t)[0],v=a.hasClass(t,"fp-custom-playlist")||!!h.customPlaylist;a.toggleClass(t,"fp-custom-playlist",v),a.toggleClass(t,"fp-default-playlist",!v),e.play=function(t){if(void 0===t)return e.resume();if("number"==typeof t&&!e.conf.playlist[t])return e;if("number"!=typeof t)return e.load.apply(null,arguments);var n=i({index:t},e.conf.playlist[t]);return e.off("beforeresume.fromfirst"),"number"==typeof t&&t===e.video.index?e.seek(0,function(){e.resume()}):(e.load(n,function(){e.video.index=t}),e)},e.next=function(t){t&&t.preventDefault();var n=e.video.index;return-1!=n&&(n=n===e.conf.playlist.length-1?0:n+1,e.play(n)),e},e.prev=function(t){t&&t.preventDefault();var n=e.video.index;return-1!=n&&(n=0===n?e.conf.playlist.length-1:n-1,e.play(n)),e},e.setPlaylist=function(t,n){return e.conf.playlist=t,n||delete e.video.index,d(),e},e.addPlaylistItem=function(t){return delete e.video.is_last,e.setPlaylist(e.conf.playlist.concat([t]),!0)},e.removePlaylistItem=function(t){var n=e.conf.playlist;return e.setPlaylist(n.slice(0,t).concat(n.slice(t+1)))},o.on(t,"click",".fp-next",e.next),o.on(t,"click",".fp-prev",e.prev),e.off("finish.pl").on("finish.pl",function(e,n){var r="undefined"==typeof n.conf.advance?!0:n.conf.advance;if(r){if(n.video.loop)return n.seek(0,function(){n.resume()});var i=n.video.index>=0?n.video.index+1:void 0;i<n.conf.playlist.length||h.loop?(i=i===n.conf.playlist.length?0:i,a.removeClass(t,"is-finished"),setTimeout(function(){n.play(i)})):n.conf.playlist.length>1&&(n.one("beforeresume.fromfirst",function(e){e.preventDefault(),n.play(0)}),n.one("seek",function(){n.off("beforeresume.fromfirst")}))}});var y=!1;e.conf.playlist.length&&(y=!0,d(),e.conf.clip&&e.conf.clip.sources.length||(e.conf.clip=e.conf.playlist[e.conf.startIndex||0])),n().length&&!y&&(e.conf.playlist=[],delete e.conf.startIndex,n().forEach(function(t){var n=t.href;t.setAttribute("data-index",e.conf.playlist.length);var r=l.resolve(n,e.conf.clip.sources);u&&i(r,u(t).data()),e.conf.playlist.push(r)})),a.find(".fp-prev,.fp-next,.fp-playlist",t).forEach(function(e){m.appendChild(e)}),o.on(c.test(h.query)?document:t,"click",h.query,function(t){t.preventDefault();var n=t.currentTarget,r=Number(n.getAttribute("data-index"));-1!=r&&e.play(r)}),e.on("load",function(n,i,o){if(e.conf.playlist.length){var s=f()[0],l=s&&s.getAttribute("data-index"),u=o.index=p(o),c=a.find(h.query+'[data-index="'+u+'"]',r())[0],d=u==e.conf.playlist.length-1;s&&a.removeClass(s,g),c&&a.addClass(c,g),a.removeClass(t,"video"+l),a.addClass(t,"video"+u),a.toggleClass(t,"last-video",d),o.index=i.video.index=u,o.is_last=i.video.is_last=d}}).on("unload.pl",function(){e.conf.playlist.length&&(f().forEach(function(e){a.toggleClass(e,g)}),e.conf.playlist.forEach(function(e,n){a.removeClass(t,"video"+n)}),delete e.video.index)}),e.conf.playlist.length&&(e.conf.loop=!1)})},{"../common":1,"../flowplayer":31,"./resolve":21,bean:34,"extend-object":39}],20:[function(e,t,n){var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){function n(){i.find(".fp-qsel-menu",t).forEach(i.removeNode),i.find(".fp-qsel",t).forEach(i.removeNode)}function r(e){l.appendChild(i.createElement("strong",{className:"fp-qsel"},"HD"));var t=i.createElement("div",{className:"fp-menu fp-qsel-menu"},"<strong>Quality</strong>");e.forEach(function(e){var n=document.createElement("a"),r="undefined"!=typeof e.value?e.value:e;n.setAttribute("data-quality",r),n.innerHTML=e.label||e,t.appendChild(n)}),s.appendChild(t)}function a(e){i.find(".fp-qsel-menu a",t).forEach(function(t){i.toggleClass(t,"fp-selected",t.getAttribute("data-quality")==e),i.toggleClass(t,"fp-color",t.getAttribute("data-quality")==e)})}var s=i.find(".fp-ui",t)[0],l=i.find(".fp-controls",s)[0];o.on(t,"click",".fp-qsel",function(){var n=i.find(".fp-qsel-menu",t)[0];i.hasClass(n,"fp-active")?e.hideMenu():e.showMenu(n)}),o.on(t,"click",".fp-qsel-menu a",function(t){var n=t.target.getAttribute("data-quality");e.quality(n)}),e.quality=function(t){t=isNaN(Number(t))?t:Number(t),e.trigger("quality",[e,t])},e.on("quality",function(e,t,n){a(n,t.video.qualities)}),e.on("ready",function(e,t,i){n(),!i.qualities||i.qualities.filter(function(e){return"undefined"!=typeof e.value?e.value>-1:!0}).length<2||(r(i.qualities,i.quality),a(i.quality,i.qualities))})})},{"../common":1,"../flowplayer":31,bean:34}],21:[function(e,t,n){"use strict";function r(e){var t=e.attr("src"),n=e.attr("type")||"",r=t.split(o)[1];return n=n.toLowerCase(),a(e.data(),{src:t,suffix:r||n,type:n||r})}function i(e){return/mpegurl/i.test(e)?"application/x-mpegurl":"video/"+e}var o=/\.(\w{3,4})(\?.*)?$/i,a=e("extend-object");t.exports=function(){var e=this;e.sourcesFromVideoTag=function(e,t){var n=[];return t("source",e).each(function(){n.push(r(t(this)))}),!n.length&&e.length&&n.push(r(e)),n},e.resolve=function(e,t){return e?("string"==typeof e&&(e={src:e,sources:[]},e.sources=(t||[]).map(function(t){var n=t.src.split(o)[1];return{type:t.type,src:e.src.replace(o,"."+n+"$2")}})),e instanceof Array&&(e={sources:e.map(function(e){return e.type&&e.src?e:Object.keys(e).reduce(function(t,n){return a(t,{type:i(n),src:e[n]})},{})})}),e):{sources:t}}},t.exports.TYPE_RE=o},{"extend-object":39}],22:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("extend-object"),a=e("bean");r(function(e,t){var n=e.conf;if(n.share===!1)return void i.find(".fp-share",t).forEach(i.removeNode);e.shareUrl=function(t){if(t&&n.embed&&n.embed.iframe)return n.embed.iframe;if("string"==typeof e.conf.share)return e.conf.share;var r=encodeURIComponent(e.video.title||(i.find("title")[0]||{}).innerHTML||"Flowplayer Unlimited video"),a=encodeURIComponent(btoa(JSON.stringify(o({},e.conf,e.extensions)).replace(/[\u007F-\uFFFF]/g,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).substr(-4)}))),s=encodeURIComponent(window.location.toString()),l=t?"https://flowplayer.com/e/":"https://flowplayer.com/s/";return l+"?t="+r+"&c="+a+"&r="+s};var r=i.createElement("div",{className:"fp-menu fp-share-menu"},"<strong>Share</strong>"),s=i.find(".fp-ui",t)[0];s.appendChild(r);var l=i.find(".fp-share",t)[0];a.on(t,"click",".fp-share",function(t){t.preventDefault(),i.hasClass(r,"fp-active")?e.hideMenu():e.showMenu(r,l)})})},{"../common":1,"../flowplayer":31,bean:34,"extend-object":39}],23:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("bean"),a=e("./subtitles/parser");r.defaults.subtitleParser=a,r(function(e,t){var n,a,s,l,u;(!r.support.inlineVideo||!r.support.fullscreen&&e.conf.native_fullscreen)&&(e.conf.nativesubtitles=!0),e.ui||(e.ui={}),e.ui.createSubtitleControl=function(e,n){return u=n,s=s||i.createElement("strong",{className:"fp-cc"},"CC"),l=l||i.createElement("div",{className:"fp-menu fp-subtitle-menu"},"<strong>Closed Captions</strong>"),i.find("a",l).forEach(i.removeNode),l.appendChild(i.createElement("a",{"data-subtitle-index":-1},"No subtitles")),(e||[]).forEach(function(e,t){var n=e.srclang||"en",r=e.label||"Default ("+n+")",o=i.createElement("a",{"data-subtitle-index":t},r);l.appendChild(o)}),i.find(".fp-ui",t)[0].appendChild(l),i.find(".fp-controls",t)[0].appendChild(s),i.toggleClass(s,"fp-hidden",!e||!e.length),s},e.ui.setActiveSubtitleItem=function(e){f(e)},o.on(t,"click",".fp-cc",function(){i.hasClass(l,"fp-active")?e.hideMenu():e.showMenu(l)}),o.on(t,"click",".fp-subtitle-menu [data-subtitle-index]",function(t){t.preventDefault();var n=t.target.getAttribute("data-subtitle-index");return u?u(n):"-1"===n?e.disableSubtitles():void e.loadSubtitles(n)});var c=function(){a=i.find(".fp-captions",t)[0],a=a||i.appendTo(i.createElement("div",{class:"fp-captions"}),i.find(".fp-player",t)[0]),Array.prototype.forEach.call(a.children,i.removeNode),e.ui.createSubtitleControl(e.video.subtitles)};e.on("ready",function(n,r,o){if(r.subtitles=[],c(),i.removeClass(t,"has-menu"),e.disableSubtitles(),o.subtitles&&o.subtitles.length){var a=o.subtitles.filter(function(e){return e["default"]})[0];a&&r.loadSubtitles(o.subtitles.indexOf(a))}}),e.showSubtitle=function(e){i.html(a,e),i.addClass(a,"fp-shown")},e.hideSubtitle=function(){i.removeClass(a,"fp-shown")},e.bind("cuepoint",function(t,r,i){i.subtitle?(n=i.index,e.showSubtitle(i.subtitle.text)):i.subtitleEnd&&(e.hideSubtitle(),n=i.index)}),e.bind("seek",function(t,r,o){n&&e.cuepoints[n]&&e.cuepoints[n].time>o&&(i.removeClass(a,"fp-shown"),n=null),(e.cuepoints||[]).forEach(function(t,r){var i=t.subtitle;i&&n!=r?o>=t.time&&(!i.endTime||o<=i.endTime)&&e.trigger("cuepoint",[e,t]):t.subtitleEnd&&o>=t.time&&r==n+1&&e.trigger("cuepoint",[e,t])})}),e.on("unload",function(){i.find(".fp-captions",t).forEach(i.removeNode)});var f=function(e){i.toggleClass(i.find("a.fp-selected",l)[0],"fp-selected"),i.toggleClass(i.find('a[data-subtitle-index="'+e+'"]',l)[0],"fp-selected")},d=function(e,n){var r=i.find("video.fp-engine",t)[0].textTracks;r.length&&(null===e?[].forEach.call(r,function(e){e.mode=n}):r[e].mode=n)};e.disableSubtitles=function(){return e.subtitles=[],(e.cuepoints||[]).forEach(function(t){(t.subtitle||t.subtitleEnd)&&e.removeCuepoint(t)}),a&&Array.prototype.forEach.call(a.children,i.removeNode),f(-1),r.support.subtitles&&e.conf.nativesubtitles&&"html5"==e.engine.engineName&&d(null,"disabled"),e},e.loadSubtitles=function(t){e.disableSubtitles();var n=e.video.subtitles[t],o=n.src;return o?(f(t),r.support.subtitles&&e.conf.nativesubtitles&&"html5"==e.engine.engineName?void d(t,"showing"):(i.xhrGet(o,function(t){var n=e.conf.subtitleParser(t);n.forEach(function(t,n){t.title||(t.title="subtitle"+n);var i={time:t.startTime,subtitle:t,visible:!1};e.subtitles.push(t),e.addCuepoint(i),e.addCuepoint({time:t.endTime,subtitleEnd:t.title,visible:!1}),0!==t.startTime||e.video.time||e.splash||e.trigger("cuepoint",[e,r.extend({},i,{index:0})]),e.splash&&e.one("ready",function(){e.trigger("cuepoint",[e,i])})})},function(){return e.trigger("error-subtitles",{code:8,url:o}),!1}),e)):void 0}})},{"../common":1,"../flowplayer":31,"./subtitles/parser":24,bean:34}],24:[function(e,t,n){t.exports=function(e){function t(e){var t=e.split(":");return 2==t.length&&t.unshift(0),60*t[0]*60+60*t[1]+parseFloat(t[2].replace(",","."))}for(var n,r,i,o=/^(([0-9]+:){1,2}[0-9]{2}[,.][0-9]{3}) --\> (([0-9]+:){1,2}[0-9]{2}[,.][0-9]{3})(.*)/,a=[],s=0,l=e.split("\n"),u=l.length,c={};u>s;s++)if(r=o.exec(l[s])){for(n=l[s-1],i="<p>"+l[++s]+"</p><br/>";"string"==typeof l[++s]&&l[s].trim()&&s<l.length;)i+="<p>"+l[s]+"</p><br/>";c={title:n,startTime:t(r[1]),endTime:t(r[3]),text:i},a.push(c)}return a}},{}],25:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("extend-object");!function(){var e=function(e){var t=/iP(ad|hone)(; CPU)? OS (\d+_\d)/.exec(e);return t&&t.length>1?parseFloat(t[t.length-1].replace("_","."),10):0},t=function(){var e=document.createElement("video");return e.loop=!0,e.autoplay=!0,e.preload=!0,e},n={},o=document.documentElement.style,a=navigator.userAgent.toLowerCase(),s=/(chrome)[ \/]([\w.]+)/.exec(a)||/(safari)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];s[1]&&(n[s[1]]=!0,n.version=s[2]||"0"),n.safari&&(n.version=(/version\/([\w.]+)/.exec(a)||[])[1]);var l=t(),u=navigator.userAgent,c=n.msie||/Trident\/7/.test(u),f=/iPad|MeeGo/.test(u)&&!/CriOS/.test(u),d=/iPad/.test(u)&&/CriOS/.test(u),p=/iP(hone|od)/i.test(u)&&!/iPad/.test(u)&&!/IEMobile/i.test(u),h=/Android/.test(u),g=h&&/Firefox/.test(u),m=h&&/SAMSUNG/.test(u),v=/Silk/.test(u),y=/IEMobile/.test(u),w=y?parseFloat(/Windows\ Phone\ (\d+\.\d+)/.exec(u)[1],10):0,b=y?parseFloat(/IEMobile\/(\d+\.\d+)/.exec(u)[1],10):0,I=f||p?e(u):0,M=h?parseFloat(/Android\ (\d+(\.\d+)?)/.exec(u)[1],10):0,C=(p||f||d)&&{iPhone:p,iPad:f||d,version:I,chrome:d},A=i(r.support,{browser:n,iOS:C,android:h?{firefox:g,opera:/Opera/.test(u),samsung:m,version:M}:!1,subtitles:!!l.addTextTrack,fullscreen:"boolean"==typeof document.webkitFullscreenEnabled?document.webkitFullscreenEnabled:"function"==typeof document.webkitCancelFullScreen&&!/Mac OS X 10_5.+Version\/5\.0\.\d Safari/.test(u)||document.mozFullScreenEnabled||"function"==typeof document.exitFullscreen||"function"==typeof document.msExitFullscreen,inlineBlock:!(c&&n.version<8),touch:"ontouchstart"in window,dataload:!f&&!p&&!y,flex:"flexWrap"in o||"WebkitFlexWrap"in o||"msFlexWrap"in o,svg:!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,zeropreload:!c&&!h,volume:!(f||p||v||d),cachedVideoTag:!(f||p||d||y),firstframe:!(v||y||g||m||I&&10>I||h&&4.4>M),inlineVideo:(!p||I>=10)&&(!y||w>=8.1&&b>=11)&&(!h||M>=3),hlsDuration:!h&&(!n.safari||f||p||d),seekable:!f&&!d,preloadMetadata:!C&&!n.safari});A.autoplay=A.firstframe,y&&(A.browser.safari=!1);try{var S=navigator.plugins["Shockwave Flash"],E=c?new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version"):S.description;c||S[0].enabledPlugin?(E=E.split(/\D+/),E.length&&!E[0]&&(E=E.slice(1)),A.flashVideo=E[0]>9||9==E[0]&&E[3]>=115):A.flashVideo=!1}catch(j){}try{A.video=!!l.canPlayType,A.video&&l.canPlayType("video/mp4")}catch(D){A.video=!1}A.animation=function(){for(var e=["","Webkit","Moz","O","ms","Khtml"],t=document.createElement("p"),n=0;n<e.length;n++)if("undefined"!=typeof t.style[e[n]+"AnimationName"])return!0}()}()},{"../flowplayer":31,"extend-object":39}],26:[function(e,t,n){"use strict";var r=e("../flowplayer"),i=e("../common"),o=e("bean");r(function(e,t){var n=e.conf;if(n.share!==!1&&n.twitter!==!1){e.tweet=function(){var t,r,i=550,o=420,a=screen.height,s=screen.width,l="scrollbars=yes,resizable=yes,toolbar=no,location=yes",u="string"==typeof n.twitter?n.twitter:e.shareUrl();t=Math.round(s/2-i/2),r=0,a>o&&(r=Math.round(a/2-o/2)),window.open("https://twitter.com/intent/tweet?url="+encodeURIComponent(u),"intent",l+",width="+i+",height="+o+",left="+t+",top="+r)};var r=i.find(".fp-share-menu",t)[0],a=i.createElement("a",{class:"fp-icon fp-twitter"},"Twitter");i.append(r,a),o.on(t,"click",".fp-twitter",function(){e.tweet()})}})},{"../common":1,"../flowplayer":31,bean:34}],27:[function(e,t,n){(function(n){"use strict";function r(e){return e=parseInt(e,10),e>=10?e:"0"+e}function i(e,t){e=Math.max(e||0,0),e=t?Math.ceil(e):Math.floor(e);var n=Math.floor(e/3600),i=Math.floor(e/60);return e-=60*i,n>=1?(i-=60*n,n+":"+r(i)+":"+r(e)):r(i)+":"+r(e)}var o=e("../flowplayer"),a=e("../common"),s=e("bean"),l=e("./ui/slider"),u=e("./ui/bar-slider"),c=n("PHN2ZyBjbGFzcz0iZnAtcGxheS1yb3VuZGVkLW91dGxpbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDk5Ljg0NCA5OS44NDM0Ij48ZGVmcz48c3R5bGU+LmZwLWNvbG9yLXBsYXl7b3BhY2l0eTowLjY1O30uY29udHJvbGJ1dHRvbntmaWxsOiNmZmY7fTwvc3R5bGU+CjwvZGVmcz4KPHRpdGxlPnBsYXktcm91bmRlZC1vdXRsaW5lPC90aXRsZT48cGF0aCBjbGFzcz0iZnAtY29sb3ItcGxheSIgZD0iTTQ5LjkyMTctLjA3OGE1MCw1MCwwLDEsMCw1MCw1MEE1MC4wNTY0LDUwLjA1NjQsMCwwLDAsNDkuOTIxNy0uMDc4WiIvPjxwYXRoIGNsYXNzPSJjb250cm9sYnV0dG9uIiBkPSJNNDEuMDM1OSw3MS4xOWE1LjA0OTIsNS4wNDkyLDAsMCwxLTIuNTU3NS0uNjY3M2MtMS44MDMxLTEuMDQxLTIuNzk1OC0zLjEyNDgtMi43OTU4LTUuODY2NFYzNS4xODg3YzAtMi43NDI5Ljk5MzMtNC44MjcyLDIuNzk3LTUuODY3NiwxLjgwMjUtMS4wNDIyLDQuMTAzNC0uODYsNi40OC41MTQzTDcwLjQ3ODIsNDQuNTY3MmMyLjM3NTEsMS4zNzExLDMuNjgyNiwzLjI3MjUsMy42ODMyLDUuMzU0NXMtMS4zMDc2LDMuOTg0NS0zLjY4MzIsNS4zNTYyTDQ0Ljk1OTIsNzAuMDExNEE3LjkzODQsNy45Mzg0LDAsMCwxLDQxLjAzNTksNzEuMTlabS4wMDY1LTQwLjEyM2EyLjY3OTQsMi42Nzk0LDAsMCwwLTEuMzU4Mi4zNDEzYy0xLjAyNjMuNTkyNi0xLjU5MTIsMS45MzQ5LTEuNTkxMiwzLjc4VjY0LjY1NjNjMCwxLjg0NDkuNTY0OSwzLjE4NjYsMS41OTA2LDMuNzc5MSwxLjAyODEuNTkzMiwyLjQ3MzMuNDEwOCw0LjA3LS41MTJMNjkuMjczLDUzLjE5MDZjMS41OTgzLS45MjI3LDIuNDc4LTIuMDgzOCwyLjQ3OC0zLjI2ODlzLS44OC0yLjM0NDUtMi40NzgtMy4yNjY2TDQzLjc1NCwzMS45MjI3QTUuNTY4NSw1LjU2ODUsMCwwLDAsNDEuMDQyMywzMS4wNjcxWiIgZmlsdGVyPSJ1cmwoI2YxKSIvPjwvc3ZnPgo=","base64"),f=n("PHN2ZyBjbGFzcz0iZnAtcGxheS1yb3VuZGVkLWZpbGwiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDEwMCAxMDAiPgogIDxkZWZzPjxzdHlsZT4uYXtmaWxsOiMwMDA7b3BhY2l0eTowLjY1O30uYntmaWxsOiNmZmY7b3BhY2l0eToxLjA7fTwvc3R5bGU+CiAgPC9kZWZzPjx0aXRsZT5wbGF5LXJvdW5kZWQtZmlsbDwvdGl0bGU+CiAgPHBhdGggY2xhc3M9ImZwLWNvbG9yLXBsYXkiIGQ9Ik00OS45MjE3LS4wNzhhNTAsNTAsMCwxLDAsNTAsNTBBNTAuMDU2NCw1MC4wNTY0LDAsMCwwLDQ5LjkyMTctLjA3OFoiLz4KICA8cGF0aCBjbGFzcz0iYiIgZD0iTTM1Ljk0MiwzNS4yMzIzYzAtNC43Mjg5LDMuMzUwNi02LjY2MzcsNy40NDYtNC4yOTcxTDY4LjgzLDQ1LjYyMzVjNC4wOTU2LDIuMzY0LDQuMDk1Niw2LjIzMTksMCw4LjU5NzdMNDMuMzg4LDY4LjkxYy00LjA5NTQsMi4zNjQtNy40NDYuNDMtNy40NDYtNC4yOTc5WiIgZmlsdGVyPSJ1cmwoI2YxKSIvPgogIDwvc3ZnPgogIAo=","base64"),d=n("PHN2ZyBjbGFzcz0iZnAtcGxheS1zaGFycC1maWxsIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj4KICA8ZGVmcz4KICAgIDxzdHlsZT4uZnAtY29sb3ItcGxheXtvcGFjaXR5OjAuNjU7fS5jb250cm9sYnV0dG9ue2ZpbGw6I2ZmZjt9PC9zdHlsZT4KICA8L2RlZnM+CiAgPHRpdGxlPnBsYXktc2hhcnAtZmlsbDwvdGl0bGU+CiAgPHBhdGggY2xhc3M9ImZwLWNvbG9yLXBsYXkiIGQ9Ik00OS45MjE3LS4wNzhhNTAsNTAsMCwxLDAsNTAsNTBBNTAuMDU2NCw1MC4wNTY0LDAsMCwwLDQ5LjkyMTctLjA3OFoiLz4KICA8cG9seWdvbiBjbGFzcz0iY29udHJvbGJ1dHRvbiIgcG9pbnRzPSI3My42MDEgNTAgMzcuOTY4IDcwLjU3MyAzNy45NjggMjkuNDI3IDczLjYwMSA1MCIgZmlsdGVyPSJ1cmwoI2YxKSIvPgo8L3N2Zz4K","base64"),p=n("PHN2ZyBjbGFzcz0iZnAtcGxheS1zaGFycC1vdXRsaW5lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5OS44NDQgOTkuODQzNCI+PGRlZnM+PHN0eWxlPi5jb250cm9sYnV0dG9uYmd7b3BhY2l0eTowLjY1O30uY29udHJvbGJ1dHRvbntmaWxsOiNmZmY7fTwvc3R5bGU+CjwvZGVmcz48dGl0bGU+cGxheS1zaGFycC1vdXRsaW5lPC90aXRsZT48cGF0aCBjbGFzcz0iZnAtY29sb3ItcGxheSIgZD0iTTQ5LjkyMTctLjA3OGE1MCw1MCwwLDEsMCw1MCw1MEE1MC4wNTY0LDUwLjA1NjQsMCwwLDAsNDkuOTIxNy0uMDc4WiIvPjxwYXRoIGNsYXNzPSJjb250cm9sYnV0dG9uIiBkPSJNMzYuOTQ0Myw3Mi4yNDczVjI3LjI5MTZMNzUuODc3Niw0OS43N1ptMi4yLTQxLjE0NTVWNjguNDM3MUw3MS40Nzc2LDQ5Ljc3WiIgZmlsdGVyPSJ1cmwoI2YxKSIvPjwvc3ZnPgo=","base64"),h=n("PHN2ZyBjbGFzcz0iZnAtcGF1c2Utcm91bmRlZC1vdXRsaW5lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5OS44NDM0IDk5Ljg0MzQiPjxkZWZzPjxzdHlsZT4uZnAtY29sb3ItcGxheXtvcGFjaXR5OjAuNjU7fS5yZWN0e2ZpbGw6I2ZmZjt9PC9zdHlsZT4KPC9kZWZzPjx0aXRsZT5wYXVzZS1yb3VuZGVkLW91dGxpbmU8L3RpdGxlPjxwYXRoIGNsYXNzPSJmcC1jb2xvci1wbGF5IiBkPSJNNDkuOTIxMi0uMDc4M2E1MCw1MCwwLDEsMCw1MC4wMDA2LDUwQTUwLjA1NjIsNTAuMDU2MiwwLDAsMCw0OS45MjEyLS4wNzgzWiIvPjxnIGNsYXNzPSJjb250cm9sYnV0dG9uIj48cGF0aCBjbGFzcz0icmVjdCIgZD0iTTM5LjAwMzYsNzEuOTcyNmE3LjU2NSw3LjU2NSwwLDAsMS03LjU1Ny03LjU1NnYtMjguOTlhNy41NTY1LDcuNTU2NSwwLDAsMSwxNS4xMTMsMHYyOC45OUE3LjU2NDgsNy41NjQ4LDAsMCwxLDM5LjAwMzYsNzEuOTcyNlptMC00MS45MDRhNS4zNjQ3LDUuMzY0NywwLDAsMC01LjM1OTMsNS4zNTgydjI4Ljk5YTUuMzU4Nyw1LjM1ODcsMCwwLDAsMTAuNzE3NCwwdi0yOC45OUE1LjM2NDUsNS4zNjQ1LDAsMCwwLDM5LjAwMzYsMzAuMDY4NloiIGZpbHRlcj0idXJsKCNmMSkiLz48cGF0aCBjbGFzcz0icmVjdCIgZD0iTTYwLjg0LDcxLjk3MjZhNy41NjQ4LDcuNTY0OCwwLDAsMS03LjU1Ni03LjU1NnYtMjguOTlhNy41NTY1LDcuNTU2NSwwLDAsMSwxNS4xMTMsMHYyOC45OUE3LjU2NSw3LjU2NSwwLDAsMSw2MC44NCw3MS45NzI2Wm0wLTQxLjkwNGE1LjM2NDUsNS4zNjQ1LDAsMCwwLTUuMzU4Miw1LjM1ODJ2MjguOTlhNS4zNTg3LDUuMzU4NywwLDAsMCwxMC43MTc0LDB2LTI4Ljk5QTUuMzY0Nyw1LjM2NDcsMCwwLDAsNjAuODQsMzAuMDY4NloiIGZpbHRlcj0idXJsKCNmMSkiLz48L2c+PC9zdmc+Cg==","base64"),g=n("PHN2ZyBjbGFzcz0iZnAtcGF1c2Utcm91bmRlZC1maWxsIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48ZGVmcz48c3R5bGU+LmZwLWNvbG9yLXBsYXl7b3BhY2l0eTowLjY1O30ucmVjdHtmaWxsOiNmZmY7fTwvc3R5bGU+CjwvZGVmcz48dGl0bGU+cGF1c2Utcm91bmRlZC1maWxsPC90aXRsZT48cGF0aCBjbGFzcz0iZnAtY29sb3ItcGxheSIgZD0iTTQ5LjkyMTctLjA3OGE1MCw1MCwwLDEsMCw1MCw1MEE1MC4wNTY0LDUwLjA1NjQsMCwwLDAsNDkuOTIxNy0uMDc4WiIvPjxnIGNsYXNzPSJjb250cm9sYnV0dG9uIiBmaWx0ZXI9InVybCgjZjEpIj48cmVjdCBjbGFzcz0icmVjdCIgeD0iMzEuODQ0IiB5PSIyOC4xMjMxIiB3aWR0aD0iMTMuNDM2MiIgaGVpZ2h0PSI0My41OTczIiByeD0iNi43MTgxIiByeT0iNi43MTgxIi8+PHJlY3QgY2xhc3M9InJlY3QiIHg9IjU0LjU2MzgiIHk9IjI4LjEyMzEiIHdpZHRoPSIxMy40MzYyIiBoZWlnaHQ9IjQzLjU5NzMiIHJ4PSI2LjcxODEiIHJ5PSI2LjcxODEiLz48L2c+PC9zdmc+Cg==","base64"),m=n("PHN2ZyBjbGFzcz0iZnAtcGF1c2Utc2hhcnAtZmlsbCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PGRlZnM+PHN0eWxlPi5mcC1jb2xvci1wbGF5e29wYWNpdHk6MC42NTt9LnJlY3R7ZmlsbDojZmZmO308L3N0eWxlPgo8L2RlZnM+PHRpdGxlPnBhdXNlLXNoYXJwLWZpbGw8L3RpdGxlPjxwYXRoIGNsYXNzPSJmcC1jb2xvci1wbGF5IiBkPSJNNDkuOTIxNy0uMDc4YTUwLDUwLDAsMSwwLDUwLDUwQTUwLjA1NjQsNTAuMDU2NCwwLDAsMCw0OS45MjE3LS4wNzhaIi8+PGcgY2xhc3M9ImNvbnRyb2xidXR0b24iIGZpbHRlcj0idXJsKCNmMSkiPjxyZWN0IGNsYXNzPSJyZWN0IiB4PSIzMy41IiB5PSIzMC4xMDQyIiB3aWR0aD0iMTIuMjYzNCIgaGVpZ2h0PSIzOS43OTE3Ii8+PHJlY3QgY2xhc3M9InJlY3QiIHg9IjU0LjIzNjYiIHk9IjMwLjEwNDIiIHdpZHRoPSIxMi4yNjM0IiBoZWlnaHQ9IjM5Ljc5MTciLz48L2c+PC9zdmc+Cg==","base64"),v=n("PHN2ZyBjbGFzcz0iZnAtcGF1c2Utc2hhcnAtb3V0bGluZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgOTkuODQzNCA5OS44NDM0Ij48ZGVmcz48c3R5bGU+LmZwLWNvbG9yLXBsYXl7b3BhY2l0eTowLjY1O30ucmVjdHtmaWxsOiNmZmY7fTwvc3R5bGU+CjwvZGVmcz48dGl0bGU+cGF1c2Utc2hhcnAtb3V0bGluZTwvdGl0bGU+PHBhdGggY2xhc3M9ImZwLWNvbG9yLXBsYXkiIGQ9Ik00OS45MjEyLS4wNzgzYTUwLDUwLDAsMSwwLDUwLjAwMDYsNTBBNTAuMDU2Miw1MC4wNTYyLDAsMCwwLDQ5LjkyMTItLjA3ODNaIi8+PGcgY2xhc3M9ImNvbnRyb2xidXR0b24iIGZpbHRlcj0idXJsKCNmMSkiPjxwYXRoIGNsYXNzPSJyZWN0IiBkPSJNNDYuODcwOSw2OS45NTMxSDMzLjEzODVWMjkuODlINDYuODcwOVpNMzUuMTQxNiw2Ny45NWg5LjcyNjJWMzEuODkzNUgzNS4xNDE2WiIvPjxwYXRoIGNsYXNzPSJyZWN0IiBkPSJNNjYuNzA0Nyw2OS45NTMxSDUyLjk3MjJWMjkuODlINjYuNzA0N1pNNTQuOTc1NCw2Ny45NWg5LjcyNjJWMzEuODkzNUg1NC45NzU0WiIvPjwvZz48L3N2Zz4K","base64"),y=n("PHN2ZyBjbGFzcz0iZnAtbG9hZGluZy1yb3VuZGVkLW91dGxpbmUiIHdpZHRoPScxMTJweCcgaGVpZ2h0PScxMTJweCcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiPgogICAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9Ijc2IiBoZWlnaHQ9Ijc2IiBmaWxsPSJyZ2JhKDAsMCwwLDApIiBjbGFzcz0iYmsiPjwvcmVjdD4KICAgIDxjaXJjbGUgY3g9IjAiIGN5PSIwIiByPSIxMCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjUgMjUpIiBmaWxsPSJub25lIiBzdHJva2U9InJnYmEoMCwwLDAsLjUpIiBzdHJva2Utd2lkdGg9IjMlIiBjbGFzcz0ic3EiPgogICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJzdHJva2UiIGZyb209InJnYmEoMCwwLDAsMCkiIHRvPSJyZ2JhKDAsMCwwLC41KSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iMS42cyIgYmVnaW49IjAuMHMiIHZhbHVlcz0icmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsLjUpIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGU+CiAgICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0ic2NhbGUiIGFkZGl0aXZlPSJzdW0iIGZyb209IjAuOCIgdG89IjEiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMC4wcyIgZHVyPSIxLjZzIiB2YWx1ZXM9IjE7MC44OzAuODsxOzEiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZVRyYW5zZm9ybT4KICAgIDwvY2lyY2xlPgogICAgPGNpcmNsZSBjeD0iMCIgY3k9IjAiIHI9IjEwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1MCAyNSkiIGZpbGw9Im5vbmUiIHN0cm9rZT0icmdiYSgwLDAsMCwuNSkiIHN0cm9rZS13aWR0aD0iMyUiIGNsYXNzPSJzcSI+CiAgICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9InN0cm9rZSIgZnJvbT0icmdiYSgwLDAsMCwwKSIgdG89InJnYmEoMCwwLDAsLjUpIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgZHVyPSIxLjZzIiBiZWdpbj0iMC40cyIgdmFsdWVzPSJyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwuNSkiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZT4KICAgICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJzY2FsZSIgYWRkaXRpdmU9InN1bSIgZnJvbT0iMC44IiB0bz0iMSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGJlZ2luPSIwLjRzIiBkdXI9IjEuNnMiIHZhbHVlcz0iMTswLjg7MC44OzE7MSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlVHJhbnNmb3JtPgogICAgPC9jaXJjbGU+CiAgICA8Y2lyY2xlIGN4PSIwIiBjeT0iMCIgcj0iMTAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDUwIDUwKSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJyZ2JhKDAsMCwwLC41KSIgc3Ryb2tlLXdpZHRoPSIzJSIgY2xhc3M9InNxIj4KICAgICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ic3Ryb2tlIiBmcm9tPSJyZ2JhKDAsMCwwLDApIiB0bz0icmdiYSgwLDAsMCwuNSkiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjEuNnMiIGJlZ2luPSIwLjhzIiB2YWx1ZXM9InJnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLC41KSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlPgogICAgICA8YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InNjYWxlIiBhZGRpdGl2ZT0ic3VtIiBmcm9tPSIwLjgiIHRvPSIxIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgYmVnaW49IjAuOHMiIGR1cj0iMS42cyIgdmFsdWVzPSIxOzAuODswLjg7MTsxIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGVUcmFuc2Zvcm0+CiAgICA8L2NpcmNsZT4KICAgIDxjaXJjbGUgY3g9IjAiIGN5PSIwIiByPSIxMCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjUgNTApIiBmaWxsPSJub25lIiBzdHJva2U9InJnYmEoMCwwLDAsLjUpIiBzdHJva2Utd2lkdGg9IjMlIiBjbGFzcz0ic3EiPgogICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJzdHJva2UiIGZyb209InJnYmEoMCwwLDAsMCkiIHRvPSJyZ2JhKDAsMCwwLC41KSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iMS42cyIgYmVnaW49IjEuMnMiIHZhbHVlcz0icmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsLjUpIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGU+CiAgICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0ic2NhbGUiIGFkZGl0aXZlPSJzdW0iIGZyb209IjAuOCIgdG89IjEiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMS4ycyIgZHVyPSIxLjZzIiB2YWx1ZXM9IjE7MC44OzAuODsxOzEiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZVRyYW5zZm9ybT4KICAgIDwvY2lyY2xlPgo8L3N2Zz4K","base64"),w=n("PHN2ZyBjbGFzcz0iZnAtbG9hZGluZy1yb3VuZGVkLWZpbGwiIHdpZHRoPScxMTJweCcgaGVpZ2h0PScxMTJweCcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiPgogICAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9Ijc2IiBoZWlnaHQ9Ijc2IiBmaWxsPSJyZ2JhKDAsMCwwLDApIiBjbGFzcz0iYmsiPjwvcmVjdD4KICAgIDxjaXJjbGUgY3g9IjAiIGN5PSIwIiByPSIxMCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjUgMjUpIiBmaWxsPSJyZ2JhKDAsMCwwLC41KSIgY2xhc3M9InNxIj4KICAgICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0iZmlsbCIgZnJvbT0icmdiYSgwLDAsMCwwKSIgdG89InJnYmEoMCwwLDAsLjUpIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgZHVyPSIxLjZzIiBiZWdpbj0iMC4wcyIgdmFsdWVzPSJyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwuNSkiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZT4KICAgICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJzY2FsZSIgYWRkaXRpdmU9InN1bSIgZnJvbT0iMC44IiB0bz0iMSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGJlZ2luPSIwLjBzIiBkdXI9IjEuNnMiIHZhbHVlcz0iMTswLjg7MC44OzE7MSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlVHJhbnNmb3JtPgogICAgPC9jaXJjbGU+CiAgICA8Y2lyY2xlIGN4PSIwIiBjeT0iMCIgcj0iMTAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDUwIDI1KSIgZmlsbD0icmdiYSgwLDAsMCwuNSkiIGNsYXNzPSJzcSI+CiAgICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImZpbGwiIGZyb209InJnYmEoMCwwLDAsMCkiIHRvPSJyZ2JhKDAsMCwwLC41KSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iMS42cyIgYmVnaW49IjAuNHMiIHZhbHVlcz0icmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsLjUpIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGU+CiAgICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0ic2NhbGUiIGFkZGl0aXZlPSJzdW0iIGZyb209IjAuOCIgdG89IjEiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMC40cyIgZHVyPSIxLjZzIiB2YWx1ZXM9IjE7MC44OzAuODsxOzEiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZVRyYW5zZm9ybT4KICAgIDwvY2lyY2xlPgogICAgPGNpcmNsZSBjeD0iMCIgY3k9IjAiIHI9IjEwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1MCA1MCkiIGZpbGw9InJnYmEoMCwwLDAsLjUpIiBjbGFzcz0ic3EiPgogICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJmaWxsIiBmcm9tPSJyZ2JhKDAsMCwwLDApIiB0bz0icmdiYSgwLDAsMCwuNSkiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjEuNnMiIGJlZ2luPSIwLjhzIiB2YWx1ZXM9InJnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLC41KSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlPgogICAgICA8YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InNjYWxlIiBhZGRpdGl2ZT0ic3VtIiBmcm9tPSIwLjgiIHRvPSIxIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgYmVnaW49IjAuOHMiIGR1cj0iMS42cyIgdmFsdWVzPSIxOzAuODswLjg7MTsxIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGVUcmFuc2Zvcm0+CiAgICA8L2NpcmNsZT4KICAgIDxjaXJjbGUgY3g9IjAiIGN5PSIwIiByPSIxMCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjUgNTApIiBmaWxsPSJyZ2JhKDAsMCwwLC41KSIgY2xhc3M9InNxIj4KICAgICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0iZmlsbCIgZnJvbT0icmdiYSgwLDAsMCwwKSIgdG89InJnYmEoMCwwLDAsLjUpIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgZHVyPSIxLjZzIiBiZWdpbj0iMS4ycyIgdmFsdWVzPSJyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwuNSkiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZT4KICAgICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJzY2FsZSIgYWRkaXRpdmU9InN1bSIgZnJvbT0iMC44IiB0bz0iMSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGJlZ2luPSIxLjJzIiBkdXI9IjEuNnMiIHZhbHVlcz0iMTswLjg7MC44OzE7MSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlVHJhbnNmb3JtPgogICAgPC9jaXJjbGU+Cjwvc3ZnPgo=","base64"),b=n("PHN2ZyBjbGFzcz0iZnAtbG9hZGluZy1zaGFycC1maWxsIiB3aWR0aD0nMTEycHgnIGhlaWdodD0nMTEycHgnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIj4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iNzYiIGhlaWdodD0iNzYiIGZpbGw9InJnYmEoMCwwLDAsMCkiIGNsYXNzPSJiayI+PC9yZWN0PgogIDxyZWN0IHg9Ii0xMCIgeT0iLTEwIiB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI1IDI1KSIgZmlsbD0icmdiYSgwLDAsMCwuNSkiIGNsYXNzPSJzcSI+CiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJmaWxsIiBmcm9tPSJyZ2JhKDAsMCwwLDApIiB0bz0icmdiYSgwLDAsMCwuNSkiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjEuNnMiIGJlZ2luPSIwLjBzIiB2YWx1ZXM9InJnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLC41KSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlPgogICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJzY2FsZSIgYWRkaXRpdmU9InN1bSIgZnJvbT0iMC44IiB0bz0iMSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGJlZ2luPSIwLjBzIiBkdXI9IjEuNnMiIHZhbHVlcz0iMTswLjg7MC44OzE7MSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlVHJhbnNmb3JtPgogIDwvcmVjdD4KICA8cmVjdCB4PSItMTAiIHk9Ii0xMCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1MCAyNSkiIGZpbGw9InJnYmEoMCwwLDAsLjUpIiBjbGFzcz0ic3EiPgogICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0iZmlsbCIgZnJvbT0icmdiYSgwLDAsMCwwKSIgdG89InJnYmEoMCwwLDAsLjUpIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgZHVyPSIxLjZzIiBiZWdpbj0iMC40cyIgdmFsdWVzPSJyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwuNSkiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZT4KICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0ic2NhbGUiIGFkZGl0aXZlPSJzdW0iIGZyb209IjAuOCIgdG89IjEiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMC40cyIgZHVyPSIxLjZzIiB2YWx1ZXM9IjE7MC44OzAuODsxOzEiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZVRyYW5zZm9ybT4KICA8L3JlY3Q+CiAgPHJlY3QgeD0iLTEwIiB5PSItMTAiIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNTAgNTApIiBmaWxsPSJyZ2JhKDAsMCwwLC41KSIgY2xhc3M9InNxIj4KICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImZpbGwiIGZyb209InJnYmEoMCwwLDAsMCkiIHRvPSJyZ2JhKDAsMCwwLC41KSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iMS42cyIgYmVnaW49IjAuOHMiIHZhbHVlcz0icmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsLjUpIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGU+CiAgICA8YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InNjYWxlIiBhZGRpdGl2ZT0ic3VtIiBmcm9tPSIwLjgiIHRvPSIxIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgYmVnaW49IjAuOHMiIGR1cj0iMS42cyIgdmFsdWVzPSIxOzAuODswLjg7MTsxIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGVUcmFuc2Zvcm0+CiAgPC9yZWN0PgogIDxyZWN0IHg9Ii0xMCIgeT0iLTEwIiB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI1IDUwKSIgZmlsbD0icmdiYSgwLDAsMCwuNSkiIGNsYXNzPSJzcSI+CiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJmaWxsIiBmcm9tPSJyZ2JhKDAsMCwwLDApIiB0bz0icmdiYSgwLDAsMCwuNSkiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjEuNnMiIGJlZ2luPSIxLjJzIiB2YWx1ZXM9InJnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLC41KSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlPgogICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJzY2FsZSIgYWRkaXRpdmU9InN1bSIgZnJvbT0iMC44IiB0bz0iMSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGJlZ2luPSIxLjJzIiBkdXI9IjEuNnMiIHZhbHVlcz0iMTswLjg7MC44OzE7MSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlVHJhbnNmb3JtPgogIDwvcmVjdD4KPC9zdmc+Cg==","base64"),I=n("PHN2ZyBjbGFzcz0iZnAtbG9hZGluZy1zaGFycC1vdXRsaW5lIiB3aWR0aD0nMTEycHgnIGhlaWdodD0nMTEycHgnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIj4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iNzYiIGhlaWdodD0iNzYiIGZpbGw9InJnYmEoMCwwLDAsMCkiIGNsYXNzPSJiayI+PC9yZWN0PgogIDxyZWN0IHg9Ii05IiB5PSItOSIgd2lkdGg9IjE4IiBoZWlnaHQ9IjE4IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyNSAyNSkiIGZpbGw9Im5vbmUiIHN0cm9rZT0icmdiYSgwLDAsMCwuNSkiIHN0cm9rZS13aWR0aD0iMyUiIGNsYXNzPSJzcSI+CiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJzdHJva2UiIGZyb209InJnYmEoMCwwLDAsMCkiIHRvPSJyZ2JhKDAsMCwwLC41KSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iMS42cyIgYmVnaW49IjAuMHMiIHZhbHVlcz0icmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsLjUpIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGU+CiAgICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0ic2NhbGUiIGFkZGl0aXZlPSJzdW0iIGZyb209IjAuOCIgdG89IjEiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMC4wcyIgZHVyPSIxLjZzIiB2YWx1ZXM9IjE7MC44OzAuODsxOzEiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZVRyYW5zZm9ybT4KICA8L3JlY3Q+CiAgPHJlY3QgeD0iLTkiIHk9Ii05IiB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDUwIDI1KSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJyZ2JhKDAsMCwwLC41KSIgc3Ryb2tlLXdpZHRoPSIzJSIgY2xhc3M9InNxIj4KICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9InN0cm9rZSIgZnJvbT0icmdiYSgwLDAsMCwwKSIgdG89InJnYmEoMCwwLDAsLjUpIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgZHVyPSIxLjZzIiBiZWdpbj0iMC40cyIgdmFsdWVzPSJyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwuNSkiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZT4KICAgICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJzY2FsZSIgYWRkaXRpdmU9InN1bSIgZnJvbT0iMC44IiB0bz0iMSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGJlZ2luPSIwLjRzIiBkdXI9IjEuNnMiIHZhbHVlcz0iMTswLjg7MC44OzE7MSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlVHJhbnNmb3JtPgogIDwvcmVjdD4KICA8cmVjdCB4PSItOSIgeT0iLTkiIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNTAgNTApIiBmaWxsPSJub25lIiBzdHJva2U9InJnYmEoMCwwLDAsLjUpIiBzdHJva2Utd2lkdGg9IjMlIiBjbGFzcz0ic3EiPgogICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ic3Ryb2tlIiBmcm9tPSJyZ2JhKDAsMCwwLDApIiB0bz0icmdiYSgwLDAsMCwuNSkiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjEuNnMiIGJlZ2luPSIwLjhzIiB2YWx1ZXM9InJnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsMCk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLC41KTtyZ2JhKDAsMCwwLC41KSIga2V5VGltZXM9IjA7MC4xOzAuMjswLjQ7MSI+PC9hbmltYXRlPgogICAgICA8YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InNjYWxlIiBhZGRpdGl2ZT0ic3VtIiBmcm9tPSIwLjgiIHRvPSIxIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgYmVnaW49IjAuOHMiIGR1cj0iMS42cyIgdmFsdWVzPSIxOzAuODswLjg7MTsxIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGVUcmFuc2Zvcm0+CiAgPC9yZWN0PgogIDxyZWN0IHg9Ii05IiB5PSItOSIgd2lkdGg9IjE4IiBoZWlnaHQ9IjE4IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyNSA1MCkiIGZpbGw9Im5vbmUiIHN0cm9rZT0icmdiYSgwLDAsMCwuNSkiIHN0cm9rZS13aWR0aD0iMyUiIGNsYXNzPSJzcSI+CiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJzdHJva2UiIGZyb209InJnYmEoMCwwLDAsMCkiIHRvPSJyZ2JhKDAsMCwwLC41KSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iMS42cyIgYmVnaW49IjEuMnMiIHZhbHVlcz0icmdiYSgwLDAsMCwuNSk7cmdiYSgwLDAsMCwwKTtyZ2JhKDAsMCwwLDApO3JnYmEoMCwwLDAsLjUpO3JnYmEoMCwwLDAsLjUpIiBrZXlUaW1lcz0iMDswLjE7MC4yOzAuNDsxIj48L2FuaW1hdGU+CiAgICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0ic2NhbGUiIGFkZGl0aXZlPSJzdW0iIGZyb209IjAuOCIgdG89IjEiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMS4ycyIgZHVyPSIxLjZzIiB2YWx1ZXM9IjE7MC44OzAuODsxOzEiIGtleVRpbWVzPSIwOzAuMTswLjI7MC40OzEiPjwvYW5pbWF0ZVRyYW5zZm9ybT4KICA8L3JlY3Q+Cjwvc3ZnPgo=","base64");o(function(e,t){function r(e){return a.find(".fp-"+e,t)[0]}function M(e){a.css(T,"padding-top",100*e+"%"),D.inlineBlock||a.height(a.find("object",t)[0],a.height(t))}function C(e){e?(a.addClass(t,"is-mouseover"),a.removeClass(t,"is-mouseout")):(a.addClass(t,"is-mouseout"),a.removeClass(t,"is-mouseover"))}a.find(".fp-filters").forEach(a.removeNode);try{var A;document.body.appendChild(A=a.createElement("div",{},n("PHN2ZyBjbGFzcz0iZnAtZmlsdGVycyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMCAwIj4KICA8ZGVmcz4KICAgIDxmaWx0ZXIgaWQ9ImYxIiB4PSItMjAlIiB5PSItMjAlIiB3aWR0aD0iMjAwJSIgaGVpZ2h0PSIyMDAlIj4KICAgICAgPGZlT2Zmc2V0IHJlc3VsdD0ib2ZmT3V0IiBpbj0iU291cmNlQWxwaGEiIGR4PSIwIiBkeT0iMCIgLz4KICAgICAgPGZlQ29sb3JNYXRyaXggcmVzdWx0PSJtYXRyaXhPdXQiIGluPSJvZmZPdXQiIHR5cGU9Im1hdHJpeCIKICAgICAgdmFsdWVzPSIwLjMgMCAwIDAgMCAwIDAuMyAwIDAgMCAwIDAgMC4zIDAgMCAwIDAgMCAwLjQgMCIgLz4KICAgICAgPGZlR2F1c3NpYW5CbHVyIHJlc3VsdD0iYmx1ck91dCIgaW49Im1hdHJpeE91dCIgc3RkRGV2aWF0aW9uPSI0IiAvPgogICAgICA8ZmVCbGVuZCBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJibHVyT3V0IiBtb2RlPSJub3JtYWwiIC8+CiAgICA8L2ZpbHRlcj4KICA8L2RlZnM+Cjwvc3ZnPgo=","base64"))),a.css(A,{width:0,height:0,overflow:"hidden",position:"absolute",margin:0,padding:0})}catch(S){}var E,j=e.conf,D=o.support;a.find(".fp-ratio,.fp-ui",t).forEach(a.removeNode),a.addClass(t,"flowplayer"),t.appendChild(a.createElement("div",{className:"fp-ratio"}));var N=a.createElement("div",{className:"fp-ui"},' <div class="fp-waiting"> {{ LOADING_SHARP_OUTLINE }} {{ LOADING_SHARP_FILL }} {{ LOADING_ROUNDED_FILL }} {{ LOADING_ROUNDED_OUTLINE }} </div> <div class="fp-header"> <a class="fp-share fp-icon"></a> <a class="fp-fullscreen fp-icon"></a> <a class="fp-unload fp-icon"></a> </div> <p class="fp-speed-flash"></p> <div class="fp-play fp-visible"> <a class="fp-icon fp-playbtn"></a> {{ PLAY_ROUNDED_FILL }} {{ PLAY_ROUNDED_OUTLINE }} {{ PLAY_SHARP_FILL }} {{ PLAY_SHARP_OUTLINE }} </div> <div class="fp-pause"> <a class="fp-icon fp-playbtn"></a> {{ PAUSE_SHARP_OUTLINE }} {{ PAUSE_SHARP_FILL }} {{ PAUSE_ROUNDED_OUTLINE }} {{ PAUSE_ROUNDED_FILL }} </div> <div class="fp-controls"> <a class="fp-icon fp-playbtn"></a> <span class="fp-elapsed">00:00</span> <div class="fp-timeline fp-bar"> <span class="fp-timestamp"></span> <div class="fp-progress fp-color"></div> </div> <span class="fp-duration"></span> <span class="fp-remaining"></span> <div class="fp-volume"> <a class="fp-icon fp-volumebtn"></a> <div class="fp-volumebar fp-bar-slider"> <em></em><em></em><em></em><em></em><em></em><em></em><em></em> </div> </div> <strong class="fp-speed fp-hidden"></strong> </div>'.replace("{{ PAUSE_ROUNDED_FILL }}",g).replace("{{ PAUSE_ROUNDED_OUTLINE }}",h).replace("{{ PAUSE_SHARP_FILL }}",m).replace("{{ PAUSE_SHARP_OUTLINE }}",v).replace("{{ PLAY_SHARP_OUTLINE }}",p).replace("{{ PLAY_SHARP_FILL }}",d).replace("{{ PLAY_ROUNDED_OUTLINE }}",c).replace("{{ PLAY_ROUNDED_FILL }}",f).replace("{{ LOADING_ROUNDED_OUTLINE }}",y).replace("{{ LOADING_ROUNDED_FILL }}",w).replace("{{ LOADING_SHARP_FILL }}",b).replace("{{ LOADING_SHARP_OUTLINE }}",I).replace(/url\(#/g,"url("+window.location.href.replace(window.location.hash,"").replace(/\#$/g,"")+"#"));t.appendChild(N);var x=r("waiting"),L=r("elapsed"),T=r("ratio"),Z=r("speed-flash"),P=r("duration"),k=r("remaining"),Y=r("timestamp"),z=a.css(T,"padding-top"),O=r("play"),G=r("pause"),R=r("timeline"),W=l(R,e.rtl),U=r("fullscreen"),J=r("volumebar"),B=u(J,{rtl:e.rtl}),F=a.hasClass(t,"no-toggle");W.disableAnimation(a.hasClass(t,"is-touch")),e.sliders=e.sliders||{},e.sliders.timeline=W,e.sliders.volume=B;var H=[];D.svg||a.html(x,"<p>loading &hellip;</p>"),j.ratio&&M(j.ratio);try{j.fullscreen||a.removeNode(U)}catch(S){a.removeNode(U)}e.on("dvrwindow",function(){W.disable(!1)}),e.on("ready",function(e,n,r){var o=n.video.duration;W.disable(n.disabled||!o),j.adaptiveRatio&&!isNaN(r.height/r.width)&&M(r.height/r.width,!0),a.html([P,k],n.live?"Live":i(o)),a.toggleClass(t,"is-long",o>=3600),B.slide(n.volumeLevel),"flash"===n.engine.engineName?W.disableAnimation(!0,!0):W.disableAnimation(!1),a.find(".fp-title",N).forEach(a.removeNode),r.title&&a.prepend(N,a.createElement("div",{className:"fp-message fp-title"},r.title)),a.toggleClass(t,"has-title",!!r.title)}).on("unload",function(){z||j.splash||a.css(T,"paddingTop",""),W.slide(0),a.addClass(O,"fp-visible")}).on("buffer",function(e,t,n){var r=t.video,i=r.buffer/r.duration;!r.seekable&&D.seekable&&W.max(t.conf.live?1/0:i),n&&"number"!=typeof n||(n=[{start:0,end:r.buffer}]);var o=a.find(".fp-buffer",R);o.length!==n.length&&(o.forEach(a.removeNode),o=[]),n.forEach(function(e,t){var n=o[t]||a.createElement("div",{className:"fp-buffer"});a.css(n,{left:100*e.start/r.duration+"%",width:100*(e.end-e.start)/r.duration+"%"}),a.prepend(R,n)})}).on("speed",function(e,t,n){t.video.time&&(a.text(Z,n+"x"),a.addClass(Z,"fp-shown"),H=H.filter(function(e){return clearTimeout(e),!1}),H.push(setTimeout(function(){a.addClass(Z,"fp-hilite"),H.push(setTimeout(function(){a.removeClass(Z,"fp-hilite"),H.push(setTimeout(function(){a.removeClass(Z,"fp-shown")},300))},1e3))})))}).on("buffered",function(){W.max(1)}).on("progress seek",function(n,r,o){var s=e.video.duration,l=e.video.seekOffset||0;o=o||e.video.time;var u=(o-l)/(s-l);W.dragging||W.slide(u,e.seeking?0:250),a.toggleClass(t,"is-live-position",s-o<j.livePositionOffset),a.html(L,i(o)),a.html(k,i(s-o,!0))}).on("finish resume seek",function(e){a.toggleClass(t,"is-finished","finish"==e.type)}).on("resume",function(){a.addClass(O,"fp-visible"),setTimeout(function(){a.removeClass(O,"fp-visible")},300)}).on("pause",function(){a.addClass(G,"fp-visible"),setTimeout(function(){a.removeClass(G,"fp-visible")},300)}).on("stop",function(){a.html(L,i(0)),W.slide(0,100)}).on("finish",function(){a.html(L,i(e.video.duration)),W.slide(1,100),a.removeClass(t,"is-seeking")}).on("beforeseek",function(){}).on("volume",function(){B.slide(e.volumeLevel)}).on("disable",function(){var n=e.disabled;W.disable(n),B.disable(n),a.toggleClass(t,"is-disabled",e.disabled)}).on("mute",function(e,n,r){a.toggleClass(t,"is-muted",r)}).on("error",function(e,n,r){if(a.removeClass(t,"is-loading"),a.removeClass(t,"is-seeking"),a.addClass(t,"is-error"),r){n.error=!0;var i=r.code;(r.message||"").match(/DECODER_ERROR_NOT_SUPPORTED/)&&(i=3);var o=n.message((n.engine&&n.engine.engineName||"html5")+": "+j.errors[i]);a.removeClass(t,"is-mouseover"),n.one("load progress",function(e){if(e.type=="progress"&&!n.error)o()})}}).one("resume ready",function(){var e=a.find("video.fp-engine",t)[0];if(e&&(!a.width(e)||!a.height(e))){var n=t.style.overflow;t.style.overflow="visible",setTimeout(function(){n?t.style.overflow=n:t.style.removeProperty("overflow")})}}),s.on(t,"mouseenter mouseleave",function(n){if(!F){var r,i="mouseover"==n.type;if(C(i),i){var o=function(){C(!0),r=new Date};e.on("pause.x volume.x",o),s.on(t,"mousemove.x",o),E=setInterval(function(){new Date-r>j.mouseoutTimeout&&(C(!1),r=new Date)},100)}else s.off(t,"mousemove.x"),e.off("pause.x volume.x"),clearInterval(E)}}),s.on(t,"mouseleave",function(){(W.dragging||B.dragging)&&(a.addClass(t,"is-mouseover"),a.removeClass(t,"is-mouseout"))}),s.on(t,"click.player",function(t){return e.disabled?void 0:a.hasClass(t.target,"fp-ui")||a.hasClass(t.target,"fp-engine")||t.flash||a.hasParent(t.target,".fp-play,.fp-pause")?(t.preventDefault&&t.preventDefault(),e.toggle()):void 0}),s.on(t,"mousemove",".fp-timeline",function(t){var n=t.pageX||t.clientX,r=n-a.offset(R).left,o=r/a.width(R),s=e.video,l=s.duration-(void 0===s.seekOffset?0:s.seekOffset),u=(e.rtl?1-o:o)*l;if(!(0>o)){a.html(Y,i(u));var c=r-a.width(Y)/2;0>c&&(c=0),c>a.width(R)-a.width(Y)&&(c=!1),c!==!1?a.css(Y,{left:c+"px",right:"auto"}):a.css(Y,{left:"auto",right:"0px"})}}),s.on(t,"contextmenu",function(n){var r=window;if(!a.hasClass(t,"is-flash-disabled")){var i=a.find(".fp-context-menu",t)[0];i&&(n.preventDefault(),e.showMenu(i,{left:n.clientX-r.scrollX,top:n.clientY-r.scrollY}),s.on(t,"click",".fp-context-menu",function(e){e.stopPropagation()}))}}),e.on("flashdisabled",function(n,r,i){a.addClass(t,"is-flash-disabled");var o;i!==!1&&(o=e.message("Seems something is blocking Adobe Flash from running")),e.one("ready progress",function(){a.removeClass(t,"is-flash-disabled"),o&&o()})}),j.poster&&a.css(t,"background-image","url("+j.poster+")");var V=a.css(t,"background-color"),X="none"!=a.css(t,"background-image")||V&&"rgba(0, 0, 0, 0)"!=V&&"transparent"!=V;if(X&&!j.splash){j.poster||(j.poster=!0);var _=function(){a.addClass(t,"is-poster"),a.addClass(O,"fp-visible"),e.poster=!0,e.on("resume.poster progress.poster beforeseek.poster",function(n){("beforeseek"===n.type||e.playing)&&(a.removeClass(t,"is-poster"),a.removeClass(O,"fp-visible"),e.poster=!1,e.off(".poster"))})};e.on("stop",function(){_()}),e.on("ready",function(e,t,n){n.index||n.autoplay||_()})}"string"==typeof j.splash&&a.css(t,"background-image","url('"+j.splash+"')"),!X&&e.forcedSplash&&a.css(t,"background-color","#555"),s.on(t,"click",".fp-toggle, .fp-play, .fp-playbtn",function(){e.disabled||e.toggle()}),s.on(t,"click",".fp-volumebtn",function(){e.mute()}),s.on(t,"click",".fp-fullscreen",function(){e.fullscreen()}),s.on(t,"click",".fp-unload",function(){e.unload()}),s.on(R,"slide",function(t){e.seeking=!0,e.seekTo(10*t)}),s.on(J,"slide",function(t){e.volume(t)}),s.on(t,"click",".fp-duration,.fp-remaining",function(){return e.dvr?e.seekTo(10):void a.toggleClass(t,"is-inverted")}),C(F);var K;if(e.on("shutdown",function(){s.off(R),s.off(J),K&&window.cancelAnimationFrame(K),a.removeNode(N),a.find(".fp-ratio",t).forEach(a.removeNode)}),"functionDISABLED-FOR-PERFORMANCE-REASONS"==typeof window.requestAnimationFrame){var Q=a.find(".fp-player",t)[0]||t,q=function(){a.toggleClass(t,"is-tiny",Q.clientWidth<400),a.toggleClass(t,"is-small",Q.clientWidth<600&&Q.clientWidth>=400),K=window.requestAnimationFrame(q)};K=window.requestAnimationFrame(q)}}),t.exports.format=i}).call(this,e("buffer").Buffer)},{"../common":1,"../flowplayer":31,"./ui/bar-slider":28,"./ui/slider":29,bean:34,buffer:35}],28:[function(e,t,n){function r(e,t){function n(t){var n=t.pageX||t.clientX,r=o.offset(e),i=o.width(e);!n&&t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches.length&&(n=t.originalEvent.touches[0].pageX);var a=n-r.left;a=Math.max(0,Math.min(i,a));var s=a/i;return l&&(s=1-s),s}t=t||{};var r=t.activeClass||"fp-color",a=t.inactiveClass||"fp-grey",s=t.childSelector||"em",l=!!t.rtl,u=!1,c=o.find(s,e).length,f={unload:function(){i.off(e,".barslider")},slide:function(t,n){o.find(s,e).forEach(function(e,n){var i=t>n/c;o.toggleClass(e,r,i),o.toggleClass(e,a,!i)}),n&&i.fire(e,"slide",[t])},disable:function(e){u=e}};return i.on(e,"mousedown.sld touchstart.sld",function(t){t.preventDefault(),u||(f.slide(n(t),!0),i.on(flowplayer.support.touch?e:document,"mousemove.sld touchmove.sld",function(e){e.preventDefault(),f.slide(n(e),!0)}),i.one(document,"mouseup.sld touchup.sld",function(){i.off(flowplayer.support.touch?e:document,"mousemove.sld touchmove.sld")}))}),f}var i=e("bean"),o=e("../../common");t.exports=r},{"../../common":1,bean:34}],29:[function(e,t,n){"use strict";var r=e("bean"),i=e("../../common"),o=function(e,t){var n;return function(){n||(e.apply(this,arguments),n=1,setTimeout(function(){n=0},t))}},a=function(e,t){var n,a,s,l,u,c,f,d,p=i.lastChild(e),h=!1,g=function(){a=i.offset(e),s=i.width(e),l=i.height(e),c=u?l:s,d=w(f)},m=function(t){n||t==b.value||f&&!(f>t)||(r.fire(e,"slide",[t]),b.value=t)},v=function(e){var n=e.pageX||e.clientX;!n&&e.originalEvent&&e.originalEvent.touches&&e.originalEvent.touches.length&&(n=e.originalEvent.touches[0].pageX);var r=u?e.pageY-a.top:n-a.left;r=Math.max(0,Math.min(d||c,r));var i=r/c;return u&&(i=1-i),t&&(i=1-i),y(i,0,!0)},y=function(e,t){void 0===t&&(t=0),e>1&&(e=1);var n=Math.round(1e3*e)/10+"%";return(!f||f>=e)&&(h?i.removeClass(p,"animated"):(i.addClass(p,"animated"),i.css(p,"transition-duration",(t||0)+"ms")),i.css(p,"width",n)),e},w=function(e){return Math.max(0,Math.min(c,u?(1-e)*l:e*s))},b={max:function(e){f=e},disable:function(e){n=e},slide:function(e,t,n){g(),n&&m(e),y(e,t)},disableAnimation:function(t,n){h=t!==!1,i.toggleClass(e,"no-animation",!!n)}};return g(),r.on(e,"mousedown.sld touchstart",function(t){if(t.preventDefault(),!n){var a=o(m,100);g(),b.dragging=!0,i.addClass(e,"is-dragging"),m(v(t)),r.on(document,"mousemove.sld touchmove.sld",function(e){e.preventDefault(),a(v(e))}),r.one(document,"mouseup touchend",function(){b.dragging=!1,i.removeClass(e,"is-dragging"),r.off(document,"mousemove.sld touchmove.sld")})}}),b};t.exports=a},{"../../common":1,bean:34}],30:[function(e,t,n){function r(e){var t=document.createElement("textarea");t.value=e,t.style.opacity=0,t.style.position="absolute",document.body.appendChild(t),t.select();var n=document.execCommand("copy");if(document.body.removeChild(t),!n)throw new Error("Unsuccessfull")}t.exports=function(e,t,n){try{r(e),t()}catch(i){n(i)}}},{}],31:[function(e,t,n){"use strict";function r(e,t,n){t&&t.embed&&(t.embed=i({},v.defaults.embed,t.embed));var r=!1;try{"undefined"==typeof v.conf.storage&&"object"==typeof window.localStorage&&(window.localStorage.flowplayerTestStorage="test",r=!0)}catch(s){}var l,p,h=e,g=i({},v.defaults,v.conf,t),m={},b=h.className,I=new w;u.addClass(h,"is-loading"),u.toggleClass(h,"no-flex",!v.support.flex),u.toggleClass(h,"no-svg",!v.support.svg);try{m=v.conf.storage||(r?window.localStorage:m)}catch(M){}if(g.volume="true"===m.muted?0:g.volume!==v.defaults.volume?g.volume:isNaN(m.volume)?g.volume:m.volume,g.debug=!!m.flowplayerDebug||g.debug,g.aspectRatio&&"string"==typeof g.aspectRatio){var C=g.aspectRatio.split(/[:\/]/);g.ratio=C[1]/C[0]}var A=h.currentStyle&&"rtl"===h.currentStyle.direction||window.getComputedStyle&&null!==window.getComputedStyle(h,null)&&"rtl"===window.getComputedStyle(h,null).getPropertyValue("direction");A&&u.addClass(h,"is-rtl");var S={conf:g,currentSpeed:1,volumeLevel:g.muted?0:"undefined"==typeof g.volume?1*m.volume:g.volume,video:{},disabled:!1,finished:!1,loading:!1,muted:"true"==m.muted||g.muted,paused:!1,playing:!1,ready:!1,splash:!1,rtl:A,hijack:function(e){try{S.engine.suspendEngine()}catch(t){}S.hijacked=e},release:function(){try{S.engine.resumeEngine()}catch(e){}S.hijacked=!1},debug:function(){g.debug&&console.log.apply(console,["DEBUG"].concat([].slice.call(arguments)))},load:function(e,t){if(!S.error&&!S.loading){S.video={},S.finished=!1,e=e||g.clip,e=i({},I.resolve(e,g.clip.sources)),(S.playing||S.engine)&&(e.autoplay=!0);var n=E(e);if(!n)return setTimeout(function(){S.trigger("error",[S,{code:v.support.flashVideo?5:10}])})&&S;if(!n.engineName)throw new Error("engineName property of factory should be exposed");if(S.engine&&n.engineName===S.engine.engineName||(S.ready=!1,S.engine&&(S.engine.unload(),S.conf.autoplay=!0),p=S.engine=n(S,h),S.one("ready",function(){setTimeout(function(){S.muted?S.mute(!0,!0):p.volume(S.volumeLevel)})})),i(e,p.pick(e.sources.filter(function(e){return e.engine?e.engine===p.engineName:!0}))),e.src){var r=S.trigger("load",[S,e,p],!0);r.defaultPrevented?S.loading=!1:(S.ready=!1,p.load(e),o(e)&&(t=e),t&&S.one("ready",t))}return S}},pause:function(e){return S.hijacked?S.hijacked.pause(e)|S:(!S.ready||S.seeking||S.loading||(p.pause(),S.one("pause",e)),S)},resume:function(){var e=S.trigger("beforeresume",[S],!0);if(!e.defaultPrevented)return S.hijacked?S.hijacked.resume()|S:(S.ready&&S.paused&&(p.resume(),S.finished&&(S.trigger("resume",[S]),S.finished=!1)),S)},toggle:function(){return S.ready?S.paused?S.resume():S.pause():S.load()},seek:function(e,t){if("boolean"==typeof e){var n=S.conf.seekStep||.1*S.video.duration;e=S.video.time+(e?n:-n),e=Math.min(Math.max(e,0),S.video.duration-.1)}if("undefined"==typeof e)return S;if(S.hijacked)return S.hijacked.seek(e,t)|S;if(S.ready){l=e;var r=S.trigger("beforeseek",[S,e],!0);r.defaultPrevented?(S.seeking=!1,u.toggleClass(h,"is-seeking",S.seeking)):(p.seek(e),o(t)&&S.one("seek",t))}return S},seekTo:function(e,t){return void 0===e?S.seek(l,t):void 0!==S.video.seekOffset?S.seek(S.video.seekOffset+.1*(S.video.duration-S.video.seekOffset)*e,t):S.seek(.1*S.video.duration*e,t)},mute:function(e,t){return void 0===e&&(e=!S.muted),S.muted=e,t||(m.muted=e,m.volume=isNaN(m.volume)?g.volume:m.volume),"undefined"!=typeof p.mute?p.mute(e):(S.volume(e?0:m.volume,!0),S.trigger("mute",[S,e])),S},volume:function(e,t){return S.ready&&(e=Math.min(Math.max(e,0),1),t||(m.volume=e),p.volume(e)),S},speed:function(e,t){return S.ready&&("boolean"==typeof e&&(e=g.speeds[g.speeds.indexOf(S.currentSpeed)+(e?1:-1)]||S.currentSpeed),p.speed(e),t&&h.one("speed",t)),S},stop:function(){return S.ready&&(S.pause(),!S.live||S.dvr?S.seek(0,function(){S.trigger("stop",[S])}):S.trigger("stop",[S])),S},unload:function(){return g.splash?(S.trigger("unload",[S]),p&&(p.unload(),S.engine=p=0)):S.stop(),S},shutdown:function(){S.unload(),S.trigger("shutdown",[S]),a.off(h),delete f[h.getAttribute("data-flowplayer-instance-id")],h.removeAttribute("data-flowplayer-instance-id")},disable:function(e){return void 0===e&&(e=!S.disabled),e!=S.disabled&&(S.disabled=e,S.trigger("disable",e)),S},registerExtension:function(e,t){e=e||[],t=t||[],"string"==typeof e&&(e=[e]),"string"==typeof t&&(t=[t]),e.forEach(function(e){S.extensions.js.push(e)}),t.forEach(function(e){S.extensions.css.push(e)})}};S.conf=i(S.conf,g),S.extensions={js:[],css:[]},v.extensions.forEach(function(e){S.registerExtension(e[0],e[1])}),c(S);var E=function(e){var t,n=v.engines;if(g.engine){var r=n.filter(function(e){return e.engineName===g.engine})[0];if(r&&e.sources.some(function(e){return e.engine&&e.engine!==r.engineName?!1:r.canPlay(e.type,S.conf)}))return r}return g.enginePreference&&(n=v.engines.filter(function(e){return g.enginePreference.indexOf(e.engineName)>-1}).sort(function(e,t){return g.enginePreference.indexOf(e.engineName)-g.enginePreference.indexOf(t.engineName)})),e.sources.some(function(e){var r=n.filter(function(t){return e.engine&&e.engine!==t.engineName?!1:t.canPlay(e.type,S.conf)}).shift();return r&&(t=r),!!r}),t};return h.getAttribute("data-flowplayer-instance-id")||(h.setAttribute("data-flowplayer-instance-id",y++),S.on("boot",function(){var e=v.support;(g.splash||u.hasClass(h,"is-splash")||!e.firstframe)&&(S.forcedSplash=!g.splash&&!u.hasClass(h,"is-splash"),S.splash=!0,g.splash||(g.splash=!0),u.addClass(h,"is-splash")),g.splash&&u.find("video",h).forEach(u.removeNode),(g.dvr||g.live||u.hasClass(h,"is-live"))&&(S.live=g.live=!0,S.dvr=g.dvr=!!g.dvr||u.hasClass(h,"is-dvr"),u.addClass(h,"is-live"),u.toggleClass(h,"is-dvr",S.dvr)),d.forEach(function(e){e(S,h)}),f.push(S),g.splash?S.unload():S.load(),g.disabled&&S.disable(),S.one("ready",n),S.one("shutdown",function(){h.className=b})}).on("load",function(e,t,n){g.splash&&u.find(".flowplayer.is-ready,.flowplayer.is-loading").forEach(function(e){var t=e.getAttribute("data-flowplayer-instance-id");if(t!==h.getAttribute("data-flowplayer-instance-id")){var n=f[Number(t)];n&&n.conf.splash&&n.unload()}}),u.addClass(h,"is-loading"),t.loading=!0,("undefined"!=typeof n.live||"undefined"!=typeof n.dvr)&&(u.toggleClass(h,"is-live",n.dvr||n.live),u.toggleClass(h,"is-dvr",!!n.dvr),t.live=n.dvr||n.live,t.dvr=!!n.dvr)}).on("ready",function(e,t,n){n.time=0,t.video=n,u.removeClass(h,"is-loading"),t.loading=!1,t.muted?t.mute(!0,!0):t.volume(t.volumeLevel);var r=t.conf.hlsFix&&/mpegurl/i.exec(n.type);u.toggleClass(h,"hls-fix",!!r)}).on("unload",function(){u.removeClass(h,"is-loading"),S.loading=!1}).on("ready unload",function(e){var t="ready"==e.type;u.toggleClass(h,"is-splash",!t),u.toggleClass(h,"is-ready",t),S.ready=t,S.splash=!t}).on("progress",function(e,t,n){t.video.time=n}).on("buffer",function(e,t,n){t.video.buffer="number"==typeof n?n:n.length?n[n.length-1].end:0}).on("speed",function(e,t,n){t.currentSpeed=n}).on("volume",function(e,t,n){t.volumeLevel=Math.round(100*n)/100,t.muted&&n&&t.mute(!1)}).on("beforeseek seek",function(e){S.seeking="beforeseek"==e.type,u.toggleClass(h,"is-seeking",S.seeking)}).on("ready pause resume unload finish stop",function(e){S.paused=/pause|finish|unload|stop/.test(e.type),S.paused=S.paused||"ready"===e.type&&!g.autoplay&&!S.playing,S.playing=!S.paused,u.toggleClass(h,"is-paused",S.paused),u.toggleClass(h,"is-playing",S.playing),S.load.ed||S.pause()}).on("finish",function(){S.finished=!0}).on("error",function(){})),S.trigger("boot",[S,h]),S}var i=e("extend-object"),o=e("is-function"),a=e("bean"),s=e("./ext/ui/slider"),l=e("./ext/ui/bar-slider"),u=e("./common"),c=e("./ext/events"),f=[],d=[],p=window.onbeforeunload;window.onbeforeunload=function(e){return f.forEach(function(e){e.conf.splash?e.unload():e.bind("error",function(){u.find(".flowplayer.is-error .fp-message").forEach(u.removeNode)})}),p?p(e):void 0};var h=/Safari/.exec(navigator.userAgent)&&!/Chrome/.exec(navigator.userAgent),g=/(\d+\.\d+) Safari/.exec(navigator.userAgent),m=g?Number(g[1]):100,v=t.exports=function(e,t,n){if(o(e))return d.push(e);if("number"==typeof e||"undefined"==typeof e)return f[e||0];if(e.nodeType){if(null!==e.getAttribute("data-flowplayer-instance-id"))return f[e.getAttribute("data-flowplayer-instance-id")];if(!t)return;return r(e,t,n)}if(e.jquery)return v(e[0],t,n);if("string"==typeof e){var i=u.find(e)[0];return i&&v(i,t,n)}};i(v,{version:"7.2.7",engines:[],engine:function(e){return v.engines.filter(function(t){return t.engineName===e})[0]},extensions:[],conf:{},set:function(e,t){"string"==typeof e?v.conf[e]=t:i(v.conf,e)},registerExtension:function(e,t){v.extensions.push([e,t])},support:{},defaults:{debug:!1,disabled:!1,fullscreen:window==window.top,keyboard:!0,ratio:9/16,adaptiveRatio:!1,rtmp:0,proxy:"best",hlsQualities:!0,seekStep:!1,splash:!1,live:!1,livePositionOffset:120,swf:"//releases.flowplayer.org/7.2.7/commercial/flowplayer.swf",swfHls:"//releases.flowplayer.org/7.2.7/commercial/flowplayerhls.swf",speeds:[.25,.5,1,1.5,2],tooltip:!0,mouseoutTimeout:5e3,mutedAutoplay:!0,clickToUnMute:!0,volume:1,errors:["","Video loading aborted","Network error","Video not properly encoded","Video file not found","Unsupported video","Skin not found","SWF file not found","Subtitles not found","Invalid RTMP URL","Unsupported video format. Try installing Adobe Flash."],errorUrls:["","","","","","","","","","","http://get.adobe.com/flashplayer/"],playlist:[],hlsFix:h&&8>m,disableInline:!1},bean:a,common:u,slider:s,barSlider:l,extend:i});var y=0,w=e("./ext/resolve");if("undefined"!=typeof window.jQuery){var b=window.jQuery;b(function(){"function"==typeof b.fn.flowplayer&&b('.flowplayer:has(video:not(.fp-engine),script[type="application/json"])').flowplayer()});var I=function(e){if(!e.length)return{};var t=e.data()||{},n={};return b.each(["autoplay","loop","preload","poster"],function(r,i){var o=e.attr(i);void 0!==o&&-1!==["autoplay","poster"].indexOf(i)?n[i]=o?o:!0:void 0!==o&&(t[i]=o?o:!0)}),e[0].autoplay=e[0].preload=!1,t.subtitles=e.find("track").map(function(){var e=b(this);return{src:e.attr("src"),kind:e.attr("kind"),label:e.attr("label"),srclang:e.attr("srclang"),default:e.prop("default")}}).get(),t.sources=(new w).sourcesFromVideoTag(e,b),i(n,{clip:t})};b.fn.flowplayer=function(e,t){return this.each(function(){"string"==typeof e&&(e={swf:e}),o(e)&&(t=e,e={});var n=b(this),i=n.find('script[type="application/json"]'),a=i.length?JSON.parse(i.text()):I(n.find("video")),s=b.extend({},e||{},a,n.data()),l=r(this,s,t);c.EVENTS.forEach(function(e){l.on(e+".jquery",function(e){n.trigger.call(n,e.type,e.detail&&e.detail.args)})}),n.data("flowplayer",l)})}}},{"./common":1,"./ext/events":12,"./ext/resolve":21,"./ext/ui/bar-slider":28,"./ext/ui/slider":29,bean:34,"extend-object":39,"is-function":42}],32:[function(e,t,n){e("es5-shim");var r=t.exports=e("./flowplayer");e("./ext/support"),e("./engine/embed"),e("./engine/hlsjs"),e("./engine/html5"),e("./engine/flash"),e("./ext/ui"),e("./ext/message"),e("./ext/keyboard"),e("./ext/playlist"),e("./ext/cuepoint"),e("./ext/subtitle"),e("./ext/analytics"),e("./ext/share"),e("./ext/facebook"),e("./ext/twitter"),e("./ext/embed"),e("./ext/airplay"),e("./ext/chromecast"),e("./ext/qsel"),e("./ext/menu"),e("./ext/fullscreen"),e("./ext/mobile"),r(function(e,t){function n(e){var t=document.createElement("a");return t.href=e,u.hostname(t.hostname)}function i(e){var t="ab.ca,ac.ac,ac.ae,ac.at,ac.be,ac.cn,ac.il,ac.in,ac.jp,ac.kr,ac.sg,ac.th,ac.uk,ad.jp,adm.br,adv.br,ah.cn,am.br,arq.br,art.br,arts.ro,asn.au,asso.fr,asso.mc,bc.ca,bel.tr,bio.br,biz.pl,biz.tr,bj.cn,br.com,cn.com,cng.br,cnt.br,co.ac,co.at,co.de,co.gl,co.hk,co.id,co.il,co.in,co.jp,co.kr,co.mg,co.ms,co.nz,co.th,co.uk,co.ve,co.vi,co.za,com.ag,com.ai,com.ar,com.au,com.br,com.cn,com.co,com.cy,com.de,com.do,com.ec,com.es,com.fj,com.fr,com.gl,com.gt,com.hk,com.hr,com.hu,com.kg,com.ki,com.lc,com.mg,com.mm,com.ms,com.mt,com.mu,com.mx,com.my,com.na,com.nf,com.ng,com.ni,com.pa,com.ph,com.pl,com.pt,com.qa,com.ro,com.ru,com.sb,com.sc,com.sg,com.sv,com.tr,com.tw,com.ua,com.uy,com.ve,com.vn,cp.tz,cq.cn,de.com,de.org,ecn.br,ed.jp,edu.au,edu.cn,edu.hk,edu.mm,edu.my,edu.pl,edu.pt,edu.qa,edu.sg,edu.tr,edu.tw,eng.br,ernet.in,esp.br,etc.br,eti.br,eu.com,eu.int,eu.lv,firm.in,firm.ro,fm.br,fot.br,fst.br,g12.br,gb.com,gb.net,gd.cn,gen.in,go.jp,go.kr,go.th,gov.au,gov.az,gov.br,gov.cn,gov.il,gov.in,gov.mm,gov.my,gov.qa,gov.sg,gov.tr,gov.tw,gov.uk,govt.nz,gr.jp,gs.cn,gv.ac,gv.at,gx.cn,gz.cn,he.cn,hi.cn,hk.cn,hl.cn,hu.com,id.au,idv.tw,in.th,in.ua,ind.br,ind.in,inf.br,info.pl,info.ro,info.tr,info.ve,iwi.nz,jl.cn,jor.br,js.cn,jus.br,k12.il,k12.tr,kr.com,lel.br,lg.jp,ln.cn,ltd.uk,maori.nz,mb.ca,me.uk,med.br,mi.th,mil.br,mil.uk,mo.cn,mod.uk,muni.il,nb.ca,ne.jp,ne.kr,net.ag,net.ai,net.au,net.br,net.cn,net.do,net.gl,net.hk,net.il,net.in,net.kg,net.ki,net.lc,net.mg,net.mm,net.mu,net.ni,net.nz,net.pl,net.ru,net.sb,net.sc,net.sg,net.th,net.tr,net.tw,net.uk,net.ve,nf.ca,nhs.uk,nm.cn,nm.kr,no.com,nom.br,nom.ni,nom.ro,ns.ca,nt.ca,nt.ro,ntr.br,nx.cn,odo.br,off.ai,on.ca,or.ac,or.at,or.jp,or.kr,or.th,org.ag,org.ai,org.au,org.br,org.cn,org.do,org.es,org.gl,org.hk,org.in,org.kg,org.ki,org.lc,org.mg,org.mm,org.ms,org.nf,org.ng,org.ni,org.nz,org.pl,org.ro,org.ru,org.sb,org.sc,org.sg,org.tr,org.tw,org.uk,org.ve,pe.ca,plc.uk,police.uk,ppg.br,presse.fr,pro.br,psc.br,psi.br,qc.ca,qc.com,qh.cn,rec.br,rec.ro,res.in,sa.com,sc.cn,sch.uk,se.com,se.net,sh.cn,sk.ca,slg.br,sn.cn,store.ro,tj.cn,tm.fr,tm.mc,tm.ro,tmp.br,tur.br,tv.br,tv.tr,tw.cn,uk.com,uk.net,us.com,uy.com,vet.br,waw.pl,web.ve,www.ro,xj.cn,xz.cn,yk.ca,yn.cn,zj.cn,zlg.br".split(",");e=e.toLowerCase();var n=e.split("."),r=n.length;if(2>r||/^\d+$/.test(n[r-1]))return e;var i=n.slice(-2).join(".");return r>=3&&t.indexOf(i)>=0?n.slice(-3).join("."):i}function o(e,t){t=i(t);for(var n=0,r=t.length-1;r>=0;r--)n+=0x65cb98ae4ad1ec*t.charCodeAt(r);for(n=(""+n).substring(0,7),r=0;r<e.length;r++)if(n===e[r].substring(1,8))return 1}var a=function(e,t){var n=e.className.split(" ");-1===n.indexOf(t)&&(e.className+=" "+t)},s=function(e){return"none"!==window.getComputedStyle(e).display},l=e.conf,u=r.common,c=u.createElement,f=l.swf.indexOf("flowplayer.org")&&l.e&&t.getAttribute("data-origin"),d=f?n(f):u.hostname(),p=(document,l.key);if("file:"==location.protocol&&(d="localhost"),e.load.ed=1,l.hostname=d,l.origin=f||location.href,f&&a(t,"is-embedded"),"string"==typeof p&&(p=p.split(/,\s*/)),p&&"function"==typeof o&&o(p,d)){if(l.logo){var h=u.find(".fp-player",t)[0],g=l.logo.href||"",m=l.logo.src||l.logo,v=c("a",{className:"fp-logo",href:g});f&&(v.href=v.href||f),l.embed&&l.embed.popup&&(v.target="_blank");var y=c("img",{src:m});v.appendChild(y),(h||t).appendChild(v)}}else{var v=c("a",{onclick:""}),h=u.find(".fp-player",t)[0];(h||t).appendChild(v);var w=c("div",{className:"fp-context-menu fp-menu"},'<strong>&copy; 2018 Flowplayer AB</strong><a href="https://flowplayer.com/hello/?from=player">About Flowplayer</a><a href="https://flowplayer.com/license">GPL based license</a>'),b=window.location.href.indexOf("localhost");7!==b&&(h||t).appendChild(w),e.on("pause resume finish unload ready",function(e,n){var r=-1;if(n.video.src)for(var i=[["org","flowplayer","drive"],["org","flowplayer","my"],["org","flowplayer","cdn"],["com","flowplayer","cdn"]],o=0;o<i.length&&(r=n.video.src.indexOf("://"+i[o].reverse().join(".")),-1===r);o++);if(/pause|resume/.test(e.type)&&"flash"!=n.engine.engineName&&4!=r&&5!=r){var a={display:"block",position:"absolute",left:"16px",bottom:"56px",zIndex:99999,width:"120px",height:"27px",backgroundImage:"url("+[".png","fplogo","/",".com","foliovision","//"].reverse().join("")+")"};for(var l in a)a.hasOwnProperty(l)&&(v.style[l]=a[l]);n.load.ed=s(v)&&(7===b||w.parentNode==t||w.parentNode==h),n.load.ed||n.pause()}else v.style.display="none"})}})},{"./engine/embed":2,"./engine/flash":3,"./engine/hlsjs":4,"./engine/html5":6,"./ext/airplay":7,"./ext/analytics":8,"./ext/chromecast":9,"./ext/cuepoint":10,"./ext/embed":11,"./ext/facebook":13,"./ext/fullscreen":14,"./ext/keyboard":15,"./ext/menu":16,"./ext/message":17,"./ext/mobile":18,"./ext/playlist":19,"./ext/qsel":20,"./ext/share":22,"./ext/subtitle":23,"./ext/support":25,"./ext/twitter":26,"./ext/ui":27,"./flowplayer":31,"es5-shim":38}],33:[function(e,t,n){"use strict";function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");-1===n&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function i(e){var t=r(e),n=t[0],i=t[1];return 3*(n+i)/4-i}function o(e,t,n){return 3*(t+n)/4-n}function a(e){for(var t,n=r(e),i=n[0],a=n[1],s=new d(o(e,i,a)),l=0,u=a>0?i-4:i,c=0;u>c;c+=4)t=f[e.charCodeAt(c)]<<18|f[e.charCodeAt(c+1)]<<12|f[e.charCodeAt(c+2)]<<6|f[e.charCodeAt(c+3)],s[l++]=t>>16&255,s[l++]=t>>8&255,s[l++]=255&t;return 2===a&&(t=f[e.charCodeAt(c)]<<2|f[e.charCodeAt(c+1)]>>4,s[l++]=255&t),1===a&&(t=f[e.charCodeAt(c)]<<10|f[e.charCodeAt(c+1)]<<4|f[e.charCodeAt(c+2)]>>2,s[l++]=t>>8&255,s[l++]=255&t),s}function s(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function l(e,t,n){for(var r,i=[],o=t;n>o;o+=3)r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),i.push(s(r));return i.join("")}function u(e){for(var t,n=e.length,r=n%3,i=[],o=16383,a=0,s=n-r;s>a;a+=o)i.push(l(e,a,a+o>s?s:a+o));return 1===r?(t=e[n-1],i.push(c[t>>2]+c[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(c[t>>10]+c[t>>4&63]+c[t<<2&63]+"=")),i.join("")}n.byteLength=i,n.toByteArray=a,n.fromByteArray=u;for(var c=[],f=[],d="undefined"!=typeof Uint8Array?Uint8Array:Array,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,g=p.length;g>h;++h)c[h]=p[h],f[p.charCodeAt(h)]=h;f["-".charCodeAt(0)]=62,f["_".charCodeAt(0)]=63},{}],34:[function(t,n,r){!function(t,r,i){"undefined"!=typeof n&&n.exports?n.exports=i():"function"==typeof e&&e.amd?e(i):r[t]=i()}("bean",this,function(e,t){e=e||"bean",t=t||this;var n,r=window,i=t[e],o=/[^\.]*(?=\..*)\.|.*/,a=/\..*/,s="addEventListener",l="removeEventListener",u=document||{},c=u.documentElement||{},f=c[s],d=f?s:"attachEvent",p={},h=Array.prototype.slice,g=function(e,t){return e.split(t||" ")},m=function(e){return"string"==typeof e},v=function(e){return"function"==typeof e},y="click dblclick mouseup mousedown contextmenu mousewheel mousemultiwheel DOMMouseScroll mouseover mouseout mousemove selectstart selectend keydown keypress keyup orientationchange focus blur change reset select submit load unload beforeunload resize move DOMContentLoaded readystatechange message error abort scroll ",w="show input invalid touchstart touchmove touchend touchcancel gesturestart gesturechange gestureend textinput readystatechange pageshow pagehide popstate hashchange offline online afterprint beforeprint dragstart dragenter dragover dragleave drag drop dragend loadstart progress suspend emptied stalled loadmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate play pause ratechange volumechange cuechange checking noupdate downloading cached updateready obsolete ",b=function(e,t,n){for(n=0;n<t.length;n++)t[n]&&(e[t[n]]=1);return e}({},g(y+(f?w:""))),I=function(){var e="compareDocumentPosition"in c?function(e,t){return t.compareDocumentPosition&&16===(16&t.compareDocumentPosition(e))}:"contains"in c?function(e,t){return t=9===t.nodeType||t===window?c:t,t!==e&&t.contains(e)}:function(e,t){for(;e=e.parentNode;)if(e===t)return 1;return 0},t=function(t){var n=t.relatedTarget;return n?n!==this&&"xul"!==n.prefix&&!/document/.test(this.toString())&&!e(n,this):null==n};return{mouseenter:{base:"mouseover",condition:t},mouseleave:{base:"mouseout",condition:t},mousewheel:{base:/Firefox/.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel"}}}(),M=function(){var e=g("altKey attrChange attrName bubbles cancelable ctrlKey currentTarget detail eventPhase getModifierState isTrusted metaKey relatedNode relatedTarget shiftKey srcElement target timeStamp type view which propertyName"),t=e.concat(g("button buttons clientX clientY dataTransfer fromElement offsetX offsetY pageX pageY screenX screenY toElement")),n=t.concat(g("wheelDelta wheelDeltaX wheelDeltaY wheelDeltaZ axis")),i=e.concat(g("char charCode key keyCode keyIdentifier keyLocation location")),o=e.concat(g("data")),a=e.concat(g("touches targetTouches changedTouches scale rotation")),s=e.concat(g("data origin source")),l=e.concat(g("state")),f=/over|out/,d=[{reg:/key/i,fix:function(e,t){return t.keyCode=e.keyCode||e.which,i}},{reg:/click|mouse(?!(.*wheel|scroll))|menu|drag|drop/i,fix:function(e,n,r){return n.rightClick=3===e.which||2===e.button,n.pos={x:0,y:0},e.pageX||e.pageY?(n.clientX=e.pageX,n.clientY=e.pageY):(e.clientX||e.clientY)&&(n.clientX=e.clientX+u.body.scrollLeft+c.scrollLeft,n.clientY=e.clientY+u.body.scrollTop+c.scrollTop),f.test(r)&&(n.relatedTarget=e.relatedTarget||e[("mouseover"==r?"from":"to")+"Element"]),t}},{reg:/mouse.*(wheel|scroll)/i,fix:function(){return n}},{reg:/^text/i,fix:function(){return o}},{reg:/^touch|^gesture/i,fix:function(){return a}},{reg:/^message$/i,fix:function(){return s}},{reg:/^popstate$/i,fix:function(){return l}},{reg:/.*/,fix:function(){return e}}],p={},h=function(e,t,n){if(arguments.length&&(e=e||((t.ownerDocument||t.document||t).parentWindow||r).event,this.originalEvent=e,this.isNative=n,this.isBean=!0,e)){var i,o,a,s,l,u=e.type,c=e.target||e.srcElement;if(this.target=c&&3===c.nodeType?c.parentNode:c,n){if(l=p[u],!l)for(i=0,o=d.length;o>i;i++)if(d[i].reg.test(u)){p[u]=l=d[i].fix;break}for(s=l(e,this,u),i=s.length;i--;)!((a=s[i])in this)&&a in e&&(this[a]=e[a])}}};return h.prototype.preventDefault=function(){this.originalEvent.preventDefault?this.originalEvent.preventDefault():this.originalEvent.returnValue=!1},h.prototype.stopPropagation=function(){this.originalEvent.stopPropagation?this.originalEvent.stopPropagation():this.originalEvent.cancelBubble=!0},h.prototype.stop=function(){this.preventDefault(),this.stopPropagation(),this.stopped=!0},h.prototype.stopImmediatePropagation=function(){this.originalEvent.stopImmediatePropagation&&this.originalEvent.stopImmediatePropagation(),this.isImmediatePropagationStopped=function(){return!0}},h.prototype.isImmediatePropagationStopped=function(){return this.originalEvent.isImmediatePropagationStopped&&this.originalEvent.isImmediatePropagationStopped()},h.prototype.clone=function(e){var t=new h(this,this.element,this.isNative);return t.currentTarget=e,t},h}(),C=function(e,t){return f||t||e!==u&&e!==r?e:c},A=function(){var e=function(e,t,n,r){var i=function(n,i){return t.apply(e,r?h.call(i,n?0:1).concat(r):i)},o=function(n,r){return t.__beanDel?t.__beanDel.ft(n.target,e):r},a=n?function(e){var t=o(e,this);return n.apply(t,arguments)?(e&&(e.currentTarget=t),i(e,arguments)):void 0}:function(e){return t.__beanDel&&(e=e.clone(o(e))),i(e,arguments)};return a.__beanDel=t.__beanDel,a},t=function(t,n,r,i,o,a,s){var l,u=I[n];"unload"==n&&(r=N(x,t,n,r,i)),u&&(u.condition&&(r=e(t,r,u.condition,a)),n=u.base||n),this.isNative=l=b[n]&&!!t[d],this.customType=!f&&!l&&n,this.element=t,this.type=n,this.original=i,this.namespaces=o,this.eventType=f||l?n:"propertychange",this.target=C(t,l),this[d]=!!this.target[d],this.root=s,this.handler=e(t,r,null,a)};return t.prototype.inNamespaces=function(e){var t,n,r=0;if(!e)return!0;if(!this.namespaces)return!1;for(t=e.length;t--;)for(n=this.namespaces.length;n--;)e[t]==this.namespaces[n]&&r++;return e.length===r},t.prototype.matches=function(e,t,n){return!(this.element!==e||t&&this.original!==t||n&&this.handler!==n)},t}(),S=function(){var e={},t=function(n,r,i,o,a,s){var l=a?"r":"$";if(r&&"*"!=r){var u,c=0,f=e[l+r],d="*"==n;if(!f)return;for(u=f.length;u>c;c++)if((d||f[c].matches(n,i,o))&&!s(f[c],f,c,r))return}else for(var p in e)p.charAt(0)==l&&t(n,p.substr(1),i,o,a,s)},n=function(t,n,r,i){var o,a=e[(i?"r":"$")+n];if(a)for(o=a.length;o--;)if(!a[o].root&&a[o].matches(t,r,null))return!0;return!1},r=function(e,n,r,i){var o=[];return t(e,n,r,null,i,function(e){return o.push(e)}),o},i=function(t){var n=!t.root&&!this.has(t.element,t.type,null,!1),r=(t.root?"r":"$")+t.type;return(e[r]||(e[r]=[])).push(t),n},o=function(n){t(n.element,n.type,null,n.handler,n.root,function(t,n,r){return n.splice(r,1),t.removed=!0,0===n.length&&delete e[(t.root?"r":"$")+t.type],!1})},a=function(){var t,n=[];for(t in e)"$"==t.charAt(0)&&(n=n.concat(e[t]));return n};return{has:n,get:r,put:i,del:o,entries:a}}(),E=function(e){n=arguments.length?e:u.querySelectorAll?function(e,t){return t.querySelectorAll(e)}:function(){throw new Error("Bean: No selector engine installed")}},j=function(e,t){if(f||!t||!e||e.propertyName=="_on"+t){var n=S.get(this,t||e.type,null,!1),r=n.length,i=0;for(e=new M(e,this,!0),t&&(e.type=t);r>i&&!e.isImmediatePropagationStopped();i++)n[i].removed||n[i].handler.call(this,e)}},D=f?function(e,t,n){e[n?s:l](t,j,!1)}:function(e,t,n,r){var i;n?(S.put(i=new A(e,r||t,function(t){j.call(e,t,r)},j,null,null,!0)),r&&null==e["_on"+r]&&(e["_on"+r]=0),i.target.attachEvent("on"+i.eventType,i.handler)):(i=S.get(e,r||t,j,!0)[0],i&&(i.target.detachEvent("on"+i.eventType,i.handler),S.del(i)))},N=function(e,t,n,r,i){return function(){r.apply(this,arguments),e(t,n,i)}},x=function(e,t,n,r){var i,o,s=t&&t.replace(a,""),l=S.get(e,s,null,!1),u={};for(i=0,o=l.length;o>i;i++)n&&l[i].original!==n||!l[i].inNamespaces(r)||(S.del(l[i]),!u[l[i].eventType]&&l[i][d]&&(u[l[i].eventType]={t:l[i].eventType,c:l[i].type}));for(i in u)S.has(e,u[i].t,null,!1)||D(e,u[i].t,!1,u[i].c)},L=function(e,t){var r=function(t,r){for(var i,o=m(e)?n(e,r):e;t&&t!==r;t=t.parentNode)for(i=o.length;i--;)if(o[i]===t)return t},i=function(e){var n=r(e.target,this);n&&t.apply(n,arguments)};return i.__beanDel={ft:r,selector:e},i},T=f?function(e,t,n){var i=u.createEvent(e?"HTMLEvents":"UIEvents");i[e?"initEvent":"initUIEvent"](t,!0,!0,r,1),n.dispatchEvent(i)}:function(e,t,n){n=C(n,e),e?n.fireEvent("on"+t,u.createEventObject()):n["_on"+t]++},Z=function(e,t,n){var r,i,s,l,u=m(t);if(u&&t.indexOf(" ")>0){for(t=g(t),l=t.length;l--;)Z(e,t[l],n);return e}if(i=u&&t.replace(a,""),i&&I[i]&&(i=I[i].base),!t||u)(s=u&&t.replace(o,""))&&(s=g(s,".")),x(e,i,n,s);else if(v(t))x(e,null,t);else for(r in t)t.hasOwnProperty(r)&&Z(e,r,t[r]);return e},P=function(e,t,r,i){var s,l,u,c,f,m,y;{if(void 0!==r||"object"!=typeof t){for(v(r)?(f=h.call(arguments,3),i=s=r):(s=i,f=h.call(arguments,4),i=L(r,s,n)),u=g(t),this===p&&(i=N(Z,e,t,i,s)),c=u.length;c--;)y=S.put(m=new A(e,u[c].replace(a,""),i,s,g(u[c].replace(o,""),"."),f,!1)),m[d]&&y&&D(e,m.eventType,!0,m.customType);return e}for(l in t)t.hasOwnProperty(l)&&P.call(this,e,l,t[l])}},k=function(e,t,n,r){return P.apply(null,m(n)?[e,n,t,r].concat(arguments.length>3?h.call(arguments,5):[]):h.call(arguments))},Y=function(){return P.apply(p,arguments)},z=function(e,t,n){var r,i,s,l,u,c=g(t);for(r=c.length;r--;)if(t=c[r].replace(a,""),(l=c[r].replace(o,""))&&(l=g(l,".")),l||n||!e[d])for(u=S.get(e,t,null,!1),n=[!1].concat(n),i=0,s=u.length;s>i;i++)u[i].inNamespaces(l)&&u[i].handler.apply(e,n);else T(b[t],t,e);return e},O=function(e,t,n){for(var r,i,o=S.get(t,n,null,!1),a=o.length,s=0;a>s;s++)o[s].original&&(r=[e,o[s].type],(i=o[s].handler.__beanDel)&&r.push(i.selector),r.push(o[s].original),P.apply(null,r));return e},G={on:P,add:k,one:Y,off:Z,remove:Z,clone:O,fire:z,Event:M,setSelectorEngine:E,noConflict:function(){return t[e]=i,this}};if(r.attachEvent){var R=function(){var e,t=S.entries();for(e in t)t[e].type&&"unload"!==t[e].type&&Z(t[e].element,t[e].type);r.detachEvent("onunload",R),r.CollectGarbage&&r.CollectGarbage()};r.attachEvent("onunload",R)}return E(),G})},{}],35:[function(e,t,n){(function(t){"use strict";function r(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}function i(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(i()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=a.prototype):(null===e&&(e=new a(t)),e.length=t),e}function a(e,t,n){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return c(this,e)}return s(this,e,t,n)}function s(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?p(e,t,n,r):"string"==typeof t?f(e,t,n):h(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(0>e)throw new RangeError('"size" argument must not be negative')}function u(e,t,n,r){return l(t),0>=t?o(e,t):void 0!==n?"string"==typeof r?o(e,t).fill(n,r):o(e,t).fill(n):o(e,t)}function c(e,t){if(l(t),e=o(e,0>t?0:0|g(t)),!a.TYPED_ARRAY_SUPPORT)for(var n=0;t>n;++n)e[n]=0;return e}function f(e,t,n){if(("string"!=typeof n||""===n)&&(n="utf8"),!a.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|v(t,n);e=o(e,r);var i=e.write(t,n);return i!==r&&(e=e.slice(0,i)),e}function d(e,t){var n=t.length<0?0:0|g(t.length);e=o(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function p(e,t,n,r){if(t.byteLength,0>n||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),a.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=a.prototype):e=d(e,t),e}function h(e,t){if(a.isBuffer(t)){var n=0|g(t.length);return e=o(e,n),0===e.length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||K(t.length)?o(e,0):d(e,t);if("Buffer"===t.type&&$(t.data))return d(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function g(e){if(e>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),a.alloc(+e)}function v(e,t){if(a.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return X(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var r=!1;if((void 0===t||0>t)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),0>=n)return"";if(n>>>=0,t>>>=0,t>=n)return"";for(e||(e="utf8");;)switch(e){case"hex":return Z(this,t,n);case"utf8":case"utf-8":return N(this,t,n);case"ascii":return L(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return D(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function w(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:-2147483648>n&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),0>n&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(0>n){if(!i)return-1;n=0}if("string"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:I(e,t,n,r,i);if("number"==typeof t)return t=255&t,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):I(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function I(e,t,n,r,i){function o(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,l=t.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}var u;if(i){var c=-1;for(u=n;s>u;u++)if(o(e,u)===o(t,-1===c?0:u-c)){if(-1===c&&(c=u),u-c+1===l)return c*a}else-1!==c&&(u-=u-c),c=-1}else for(n+l>s&&(n=s-l),u=n;u>=0;u--){for(var f=!0,d=0;l>d;d++)if(o(e,u+d)!==o(t,d)){f=!1;break}if(f)return u}return-1}function M(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;r>a;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function C(e,t,n,r){return _(F(t,e.length-n),e,n,r)}function A(e,t,n,r){return _(H(t),e,n,r)}function S(e,t,n,r){return A(e,t,n,r)}function E(e,t,n,r){return _(X(t),e,n,r)}function j(e,t,n,r){return _(V(t,e.length-n),e,n,r)}function D(e,t,n){return 0===t&&n===e.length?Q.fromByteArray(e):Q.fromByteArray(e.slice(t,n))}function N(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;n>i;){var o=e[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(n>=i+s){var l,u,c,f;switch(s){case 1:128>o&&(a=o);break;case 2:l=e[i+1],128===(192&l)&&(f=(31&o)<<6|63&l,f>127&&(a=f));break;case 3:l=e[i+1],u=e[i+2],128===(192&l)&&128===(192&u)&&(f=(15&o)<<12|(63&l)<<6|63&u,f>2047&&(55296>f||f>57343)&&(a=f));break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],128===(192&l)&&128===(192&u)&&128===(192&c)&&(f=(15&o)<<18|(63&l)<<12|(63&u)<<6|63&c,f>65535&&1114112>f&&(a=f))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return x(r)}function x(e){var t=e.length;if(ee>=t)return String.fromCharCode.apply(String,e);for(var n="",r=0;t>r;)n+=String.fromCharCode.apply(String,e.slice(r,r+=ee));return n}function L(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;++i)r+=String.fromCharCode(127&e[i]);return r}function T(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;++i)r+=String.fromCharCode(e[i]);return r}function Z(e,t,n){var r=e.length;(!t||0>t)&&(t=0),(!n||0>n||n>r)&&(n=r);for(var i="",o=t;n>o;++o)i+=B(e[o]);return i}function P(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function k(e,t,n){if(e%1!==0||0>e)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function Y(e,t,n,r,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||o>t)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function z(e,t,n,r){0>t&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);o>i;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function O(e,t,n,r){0>t&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);o>i;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function G(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(0>n)throw new RangeError("Index out of range")}function R(e,t,n,r,i){return i||G(e,t,n,4,34028234663852886e22,-34028234663852886e22),q.write(e,t,n,r,23,4),n+4}function W(e,t,n,r,i){return i||G(e,t,n,8,17976931348623157e292,-17976931348623157e292),q.write(e,t,n,r,52,8),n+8}function U(e){if(e=J(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function J(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function B(e){return 16>e?"0"+e.toString(16):e.toString(16)}function F(e,t){t=t||1/0;for(var n,r=e.length,i=null,o=[],a=0;r>a;++a){if(n=e.charCodeAt(a),n>55295&&57344>n){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(56320>n){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,128>n){if((t-=1)<0)break;o.push(n)}else if(2048>n){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(65536>n){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function H(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function V(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}function X(e){return Q.toByteArray(U(e))}function _(e,t,n,r){for(var i=0;r>i&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function K(e){return e!==e}var Q=e("base64-js"),q=e("ieee754"),$=e("isarray");n.Buffer=a,n.SlowBuffer=m,n.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:r(),n.kMaxLength=i(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,n){return s(null,e,t,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,n){return u(null,e,t,n)},a.allocUnsafe=function(e){return c(null,e)},a.allocUnsafeSlow=function(e){return c(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);o>i;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return r>n?-1:n>r?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!$(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=a.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},a.byteLength=v,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;e>t;t+=2)w(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;e>t;t+=4)w(this,t,t+3),w(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;e>t;t+=8)w(this,t,t+7),w(this,t+1,t+6),w(this,t+2,t+5),w(this,t+3,t+4);return this},a.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?N(this,0,e):y.apply(this,arguments)},a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===a.compare(this,e)},a.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},a.prototype.compare=function(e,t,n,r,i){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),0>t||n>e.length||0>r||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var o=i-r,s=n-t,l=Math.min(o,s),u=this.slice(r,i),c=e.slice(t,n),f=0;l>f;++f)if(u[f]!==c[f]){o=u[f],s=c[f];break}return s>o?-1:o>s?1:0},a.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},a.prototype.indexOf=function(e,t,n){return b(this,e,t,n,!0)},a.prototype.lastIndexOf=function(e,t,n){return b(this,e,t,n,!1)},a.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t=0|t,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(0>n||0>t)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return M(this,e,t,n);case"utf8":case"utf-8":return C(this,e,t,n);case"ascii":return A(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;a.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),e>t&&(t=e);var r;if(a.TYPED_ARRAY_SUPPORT)r=this.subarray(e,t),r.__proto__=a.prototype;else{var i=t-e;r=new a(i,void 0);for(var o=0;i>o;++o)r[o]=this[o+e]}return r},a.prototype.readUIntLE=function(e,t,n){e=0|e,t=0|t,n||k(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},a.prototype.readUIntBE=function(e,t,n){e=0|e,t=0|t,n||k(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUInt8=function(e,t){return t||k(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||k(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||k(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e=0|e,t=0|t,n||k(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e=0|e,t=0|t,n||k(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){t||k(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){t||k(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||k(e,4,this.length),q.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||k(e,4,this.length),q.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||k(e,8,this.length),q.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||k(e,8,this.length),q.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t=0|t,n=0|n,!r){var i=Math.pow(2,8*n)-1;Y(this,e,t,n,i,0)}var o=1,a=0;for(this[t]=255&e;++a<n&&(o*=256);)this[t+a]=e/o&255;return t+n},a.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t=0|t,n=0|n,!r){var i=Math.pow(2,8*n)-1;Y(this,e,t,n,i,0)}var o=n-1,a=1;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=e/a&255;return t+n},a.prototype.writeUInt8=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):z(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):z(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):O(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);Y(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)0>e&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);Y(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)0>e&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):z(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):z(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):O(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t=0|t,n||Y(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return W(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return W(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&n>r&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(0>t)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>r)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&t>n&&r>t)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(1e3>o||!a.TYPED_ARRAY_SUPPORT)for(i=0;o>i;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},a.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);256>i&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e=255&e);if(0>t||this.length<t||this.length<n)throw new RangeError("Out of range index");if(t>=n)return this;t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;n>o;++o)this[o]=e;else{var s=a.isBuffer(e)?e:F(new a(e,r).toString()),l=s.length;for(o=0;n-t>o;++o)this[o+t]=s[o%l]}return this};var te=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":33,ieee754:40,isarray:43}],36:[function(e,t,n){function r(e){function t(e){var t=c();a(t,e)>-1||(t.push(e),f(t))}function n(e){var t=c(),n=a(t,e);-1!==n&&(t.splice(n,1),f(t))}function r(e){return a(c(),e)>-1}function s(e){return r(e)?(n(e),!1):(t(e),!0)}function l(){return e.className}function u(e){var t=c();return t[e]||null}function c(){var t=e.className;return i(t.split(" "),o)}function f(t){var n=t.length;e.className=t.join(" "),p.length=n;for(var r=0;r<t.length;r++)p[r]=t[r];delete t[n]}var d=e.classList;if(d)return d;var p={add:t,remove:n,contains:r,toggle:s,toString:l,length:0,item:u};return p}function i(e,t){for(var n=[],r=0;r<e.length;r++)t(e[r])&&n.push(e[r]);return n}function o(e){return!!e}var a=e("indexof");t.exports=r},{indexof:41}],37:[function(e,t,n){function r(e,t,n,r){return n=window.getComputedStyle,r=n?n(e):e.currentStyle,r?r[t.replace(/-(\w)/gi,function(e,t){return t.toUpperCase()})]:void 0}t.exports=r},{}],38:[function(t,n,r){!function(t,i){"use strict";"function"==typeof e&&e.amd?e(i):"object"==typeof r?n.exports=i():t.returnExports=i()}(this,function(){var e,t,n=Array,r=n.prototype,i=Object,o=i.prototype,a=Function,s=a.prototype,l=String,u=l.prototype,c=Number,f=c.prototype,d=r.slice,p=r.splice,h=r.push,g=r.unshift,m=r.concat,v=r.join,y=s.call,w=s.apply,b=Math.max,I=Math.min,M=o.toString,C="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,A=Function.prototype.toString,S=/^\s*class /,E=function(e){try{var t=A.call(e),n=t.replace(/\/\/.*\n/g,""),r=n.replace(/\/\*[.\s\S]*\*\//g,""),i=r.replace(/\n/gm," ").replace(/ {2}/g," ");return S.test(i)}catch(o){return!1}},j=function(e){try{return E(e)?!1:(A.call(e),!0)}catch(t){return!1}},D="[object Function]",N="[object GeneratorFunction]",e=function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(C)return j(e);if(E(e))return!1;var t=M.call(e);return t===D||t===N},x=RegExp.prototype.exec,L=function(e){try{return x.call(e),!0}catch(t){return!1}},T="[object RegExp]";t=function(e){return"object"!=typeof e?!1:C?L(e):M.call(e)===T};var Z,P=String.prototype.valueOf,k=function(e){try{return P.call(e),!0}catch(t){return!1}},Y="[object String]";Z=function(e){return"string"==typeof e?!0:"object"!=typeof e?!1:C?k(e):M.call(e)===Y};var z=i.defineProperty&&function(){try{var e={};i.defineProperty(e,"x",{enumerable:!1,value:e});for(var t in e)return!1;return e.x===e}catch(n){return!1}}(),O=function(e){var t;return t=z?function(e,t,n,r){!r&&t in e||i.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:n})}:function(e,t,n,r){!r&&t in e||(e[t]=n)},function(n,r,i){for(var o in r)e.call(r,o)&&t(n,o,r[o],i)}}(o.hasOwnProperty),G=function(e){var t=typeof e;return null===e||"object"!==t&&"function"!==t},R=c.isNaN||function(e){return e!==e},W={ToInteger:function(e){var t=+e;return R(t)?t=0:0!==t&&t!==1/0&&t!==-(1/0)&&(t=(t>0||-1)*Math.floor(Math.abs(t))),t},ToPrimitive:function(t){var n,r,i;if(G(t))return t;if(r=t.valueOf,e(r)&&(n=r.call(t),G(n)))return n;if(i=t.toString,e(i)&&(n=i.call(t),G(n)))return n;throw new TypeError},ToObject:function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return i(e)},ToUint32:function(e){return e>>>0}},U=function(){};O(s,{bind:function(t){var n=this;if(!e(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var r,o=d.call(arguments,1),s=function(){if(this instanceof r){var e=w.call(n,this,m.call(o,d.call(arguments)));return i(e)===e?e:this}return w.call(n,t,m.call(o,d.call(arguments)))},l=b(0,n.length-o.length),u=[],c=0;l>c;c++)h.call(u,"$"+c);return r=a("binder","return function ("+v.call(u,",")+"){ return binder.apply(this, arguments); }")(s),n.prototype&&(U.prototype=n.prototype,r.prototype=new U,U.prototype=null),r}});var J=y.bind(o.hasOwnProperty),B=y.bind(o.toString),F=y.bind(d),H=w.bind(d);if("object"==typeof document&&document&&document.documentElement)try{F(document.documentElement.childNodes)}catch(V){var X=F,_=H;F=function(e){for(var t=[],n=e.length;n-- >0;)t[n]=e[n];return _(t,X(arguments,1))},H=function(e,t){return _(F(e),t)}}var K=y.bind(u.slice),Q=y.bind(u.split),q=y.bind(u.indexOf),$=y.bind(h),ee=y.bind(o.propertyIsEnumerable),te=y.bind(r.sort),ne=n.isArray||function(e){return"[object Array]"===B(e)},re=1!==[].unshift(0);O(r,{unshift:function(){return g.apply(this,arguments),this.length}},re),O(n,{isArray:ne});var ie=i("a"),oe="a"!==ie[0]||!(0 in ie),ae=function(e){var t=!0,n=!0,r=!1;if(e)try{e.call("foo",function(e,n,r){"object"!=typeof r&&(t=!1)}),e.call([1],function(){"use strict";n="string"==typeof this},"x")}catch(i){r=!0}return!!e&&!r&&t&&n};O(r,{forEach:function(t){var n,r=W.ToObject(this),i=oe&&Z(this)?Q(this,""):r,o=-1,a=W.ToUint32(i.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.forEach callback must be a function");for(;++o<a;)o in i&&("undefined"==typeof n?t(i[o],o,r):t.call(n,i[o],o,r))}},!ae(r.forEach)),O(r,{map:function(t){var r,i=W.ToObject(this),o=oe&&Z(this)?Q(this,""):i,a=W.ToUint32(o.length),s=n(a);if(arguments.length>1&&(r=arguments[1]),!e(t))throw new TypeError("Array.prototype.map callback must be a function");for(var l=0;a>l;l++)l in o&&("undefined"==typeof r?s[l]=t(o[l],l,i):s[l]=t.call(r,o[l],l,i));return s}},!ae(r.map)),O(r,{filter:function(t){var n,r,i=W.ToObject(this),o=oe&&Z(this)?Q(this,""):i,a=W.ToUint32(o.length),s=[];if(arguments.length>1&&(r=arguments[1]),!e(t))throw new TypeError("Array.prototype.filter callback must be a function");for(var l=0;a>l;l++)l in o&&(n=o[l],("undefined"==typeof r?t(n,l,i):t.call(r,n,l,i))&&$(s,n));return s}},!ae(r.filter)),O(r,{every:function(t){var n,r=W.ToObject(this),i=oe&&Z(this)?Q(this,""):r,o=W.ToUint32(i.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.every callback must be a function");for(var a=0;o>a;a++)if(a in i&&!("undefined"==typeof n?t(i[a],a,r):t.call(n,i[a],a,r)))return!1;return!0}},!ae(r.every)),O(r,{some:function(t){var n,r=W.ToObject(this),i=oe&&Z(this)?Q(this,""):r,o=W.ToUint32(i.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.some callback must be a function");for(var a=0;o>a;a++)if(a in i&&("undefined"==typeof n?t(i[a],a,r):t.call(n,i[a],a,r)))return!0;return!1}},!ae(r.some));var se=!1;r.reduce&&(se="object"==typeof r.reduce.call("es5",function(e,t,n,r){return r})),O(r,{reduce:function(t){var n=W.ToObject(this),r=oe&&Z(this)?Q(this,""):n,i=W.ToUint32(r.length);if(!e(t))throw new TypeError("Array.prototype.reduce callback must be a function");if(0===i&&1===arguments.length)throw new TypeError("reduce of empty array with no initial value");var o,a=0;if(arguments.length>=2)o=arguments[1];else for(;;){if(a in r){o=r[a++];break}if(++a>=i)throw new TypeError("reduce of empty array with no initial value")}for(;i>a;a++)a in r&&(o=t(o,r[a],a,n));return o}},!se);var le=!1;r.reduceRight&&(le="object"==typeof r.reduceRight.call("es5",function(e,t,n,r){return r})),O(r,{reduceRight:function(t){var n=W.ToObject(this),r=oe&&Z(this)?Q(this,""):n,i=W.ToUint32(r.length);if(!e(t))throw new TypeError("Array.prototype.reduceRight callback must be a function");if(0===i&&1===arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var o,a=i-1;if(arguments.length>=2)o=arguments[1];else for(;;){if(a in r){o=r[a--];break}if(--a<0)throw new TypeError("reduceRight of empty array with no initial value")}if(0>a)return o;do{a in r&&(o=t(o,r[a],a,n))}while(a--);return o}},!le);var ue=r.indexOf&&-1!==[0,1].indexOf(1,2);O(r,{indexOf:function(e){var t=oe&&Z(this)?Q(this,""):W.ToObject(this),n=W.ToUint32(t.length);if(0===n)return-1;var r=0;for(arguments.length>1&&(r=W.ToInteger(arguments[1])),r=r>=0?r:b(0,n+r);n>r;r++)if(r in t&&t[r]===e)return r;return-1}},ue);var ce=r.lastIndexOf&&-1!==[0,1].lastIndexOf(0,-3);O(r,{lastIndexOf:function(e){var t=oe&&Z(this)?Q(this,""):W.ToObject(this),n=W.ToUint32(t.length);if(0===n)return-1;var r=n-1;for(arguments.length>1&&(r=I(r,W.ToInteger(arguments[1]))),r=r>=0?r:n-Math.abs(r);r>=0;r--)if(r in t&&e===t[r])return r;return-1}},ce);var fe=function(){var e=[1,2],t=e.splice();return 2===e.length&&ne(t)&&0===t.length}();O(r,{splice:function(e,t){return 0===arguments.length?[]:p.apply(this,arguments)}},!fe);var de=function(){var e={};return r.splice.call(e,0,0,1),1===e.length}();O(r,{splice:function(e,t){if(0===arguments.length)return[];var n=arguments;return this.length=b(W.ToInteger(this.length),0),arguments.length>0&&"number"!=typeof t&&(n=F(arguments),n.length<2?$(n,this.length-e):n[1]=W.ToInteger(t)),p.apply(this,n)}},!de);var pe=function(){var e=new n(1e5);return e[8]="x",e.splice(1,1),7===e.indexOf("x")}(),he=function(){var e=256,t=[];return t[e]="a",t.splice(e+1,0,"b"),"a"===t[e]}();O(r,{splice:function(e,t){for(var n,r=W.ToObject(this),i=[],o=W.ToUint32(r.length),a=W.ToInteger(e),s=0>a?b(o+a,0):I(a,o),u=I(b(W.ToInteger(t),0),o-s),c=0;u>c;)n=l(s+c),J(r,n)&&(i[c]=r[n]),c+=1;var f,d=F(arguments,2),p=d.length;if(u>p){c=s;for(var h=o-u;h>c;)n=l(c+u),f=l(c+p),J(r,n)?r[f]=r[n]:delete r[f],c+=1;c=o;for(var g=o-u+p;c>g;)delete r[c-1],c-=1}else if(p>u)for(c=o-u;c>s;)n=l(c+u-1),f=l(c+p-1),J(r,n)?r[f]=r[n]:delete r[f],c-=1;c=s;for(var m=0;m<d.length;++m)r[c]=d[m],c+=1;return r.length=o-u+p,i}},!pe||!he);var ge,me=r.join;try{ge="1,2,3"!==Array.prototype.join.call("123",",")}catch(V){ge=!0}ge&&O(r,{join:function(e){var t="undefined"==typeof e?",":e;return me.call(Z(this)?Q(this,""):this,t)}},ge);var ve="1,2"!==[1,2].join(void 0);ve&&O(r,{join:function(e){var t="undefined"==typeof e?",":e;return me.call(this,t)}},ve);var ye=function(e){for(var t=W.ToObject(this),n=W.ToUint32(t.length),r=0;r<arguments.length;)t[n+r]=arguments[r],r+=1;return t.length=n+r,n+r},we=function(){var e={},t=Array.prototype.push.call(e,void 0);return 1!==t||1!==e.length||"undefined"!=typeof e[0]||!J(e,0)}();O(r,{push:function(e){return ne(this)?h.apply(this,arguments):ye.apply(this,arguments)}},we);var be=function(){var e=[],t=e.push(void 0);return 1!==t||1!==e.length||"undefined"!=typeof e[0]||!J(e,0)}();O(r,{push:ye},be),O(r,{slice:function(e,t){var n=Z(this)?Q(this,""):this;return H(n,arguments)}},oe);var Ie=function(){try{[1,2].sort(null)}catch(e){try{[1,2].sort({})}catch(t){return!1}}return!0}(),Me=function(){try{return[1,2].sort(/a/),!1}catch(e){}return!0}(),Ce=function(){try{return[1,2].sort(void 0),!0}catch(e){}return!1}();O(r,{sort:function(t){if("undefined"==typeof t)return te(this);if(!e(t))throw new TypeError("Array.prototype.sort callback must be a function");return te(this,t)}},Ie||!Ce||!Me);var Ae=!ee({toString:null},"toString"),Se=ee(function(){},"prototype"),Ee=!J("x","0"),je=function(e){var t=e.constructor;return t&&t.prototype===e},De={$window:!0,$console:!0,$parent:!0,$self:!0,$frame:!0,$frames:!0,$frameElement:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$external:!0,$width:!0,$height:!0,$top:!0,$localStorage:!0},Ne=function(){if("undefined"==typeof window)return!1;for(var e in window)try{!De["$"+e]&&J(window,e)&&null!==window[e]&&"object"==typeof window[e]&&je(window[e])}catch(t){return!0}return!1}(),xe=function(e){if("undefined"==typeof window||!Ne)return je(e);try{return je(e)}catch(t){return!1}},Le=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Te=Le.length,Ze=function(e){return"[object Arguments]"===B(e)},Pe=function(t){return null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&!ne(t)&&e(t.callee)},ke=Ze(arguments)?Ze:Pe;O(i,{keys:function(t){var n=e(t),r=ke(t),i=null!==t&&"object"==typeof t,o=i&&Z(t);if(!i&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var a=[],s=Se&&n;if(o&&Ee||r)for(var u=0;u<t.length;++u)$(a,l(u));if(!r)for(var c in t)s&&"prototype"===c||!J(t,c)||$(a,l(c));if(Ae)for(var f=xe(t),d=0;Te>d;d++){var p=Le[d];f&&"constructor"===p||!J(t,p)||$(a,p)}return a}});var Ye=i.keys&&function(){return 2===i.keys(arguments).length}(1,2),ze=i.keys&&function(){var e=i.keys(arguments);return 1!==arguments.length||1!==e.length||1!==e[0]}(1),Oe=i.keys;O(i,{keys:function(e){return Oe(ke(e)?F(e):e)}},!Ye||ze);var Ge,Re,We=0!==new Date(-0xc782b5b342b24).getUTCMonth(),Ue=new Date(-0x55d318d56a724),Je=new Date(14496624e5),Be="Mon, 01 Jan -45875 11:59:59 GMT"!==Ue.toUTCString(),Fe=Ue.getTimezoneOffset();-720>Fe?(Ge="Tue Jan 02 -45875"!==Ue.toDateString(),Re=!/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-+]\d\d\d\d(?: |$)/.test(String(Je))):(Ge="Mon Jan 01 -45875"!==Ue.toDateString(),Re=!/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-+]\d\d\d\d(?: |$)/.test(String(Je)));var He=y.bind(Date.prototype.getFullYear),Ve=y.bind(Date.prototype.getMonth),Xe=y.bind(Date.prototype.getDate),_e=y.bind(Date.prototype.getUTCFullYear),Ke=y.bind(Date.prototype.getUTCMonth),Qe=y.bind(Date.prototype.getUTCDate),qe=y.bind(Date.prototype.getUTCDay),$e=y.bind(Date.prototype.getUTCHours),et=y.bind(Date.prototype.getUTCMinutes),tt=y.bind(Date.prototype.getUTCSeconds),nt=y.bind(Date.prototype.getUTCMilliseconds),rt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],it=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ot=function(e,t){return Xe(new Date(t,e,0))};O(Date.prototype,{getFullYear:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=He(this);return 0>e&&Ve(this)>11?e+1:e},getMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=He(this),t=Ve(this);return 0>e&&t>11?0:t},getDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=He(this),t=Ve(this),n=Xe(this);if(0>e&&t>11){if(12===t)return n;var r=ot(0,e+1);return r-n+1}return n},getUTCFullYear:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=_e(this);return 0>e&&Ke(this)>11?e+1:e},getUTCMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=_e(this),t=Ke(this);return 0>e&&t>11?0:t},getUTCDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=_e(this),t=Ke(this),n=Qe(this);if(0>e&&t>11){if(12===t)return n;var r=ot(0,e+1);return r-n+1}return n}},We),O(Date.prototype,{toUTCString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=qe(this),t=Qe(this),n=Ke(this),r=_e(this),i=$e(this),o=et(this),a=tt(this);return rt[e]+", "+(10>t?"0"+t:t)+" "+it[n]+" "+r+" "+(10>i?"0"+i:i)+":"+(10>o?"0"+o:o)+":"+(10>a?"0"+a:a)+" GMT"}},We||Be),O(Date.prototype,{toDateString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=this.getDay(),t=this.getDate(),n=this.getMonth(),r=this.getFullYear();return rt[e]+" "+it[n]+" "+(10>t?"0"+t:t)+" "+r}},We||Ge),(We||Re)&&(Date.prototype.toString=function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=this.getDay(),t=this.getDate(),n=this.getMonth(),r=this.getFullYear(),i=this.getHours(),o=this.getMinutes(),a=this.getSeconds(),s=this.getTimezoneOffset(),l=Math.floor(Math.abs(s)/60),u=Math.floor(Math.abs(s)%60);return rt[e]+" "+it[n]+" "+(10>t?"0"+t:t)+" "+r+" "+(10>i?"0"+i:i)+":"+(10>o?"0"+o:o)+":"+(10>a?"0"+a:a)+" GMT"+(s>0?"-":"+")+(10>l?"0"+l:l)+(10>u?"0"+u:u)},z&&i.defineProperty(Date.prototype,"toString",{configurable:!0,enumerable:!1,writable:!0}));var at=-621987552e5,st="-000001",lt=Date.prototype.toISOString&&-1===new Date(at).toISOString().indexOf(st),ut=Date.prototype.toISOString&&"1969-12-31T23:59:59.999Z"!==new Date(-1).toISOString(),ct=y.bind(Date.prototype.getTime);O(Date.prototype,{toISOString:function(){if(!isFinite(this)||!isFinite(ct(this)))throw new RangeError("Date.prototype.toISOString called on non-finite value.");var e=_e(this),t=Ke(this);e+=Math.floor(t/12),t=(t%12+12)%12;var n=[t+1,Qe(this),$e(this),et(this),tt(this)];e=(0>e?"-":e>9999?"+":"")+K("00000"+Math.abs(e),e>=0&&9999>=e?-4:-6);for(var r=0;r<n.length;++r)n[r]=K("00"+n[r],-2);return e+"-"+F(n,0,2).join("-")+"T"+F(n,2).join(":")+"."+K("000"+nt(this),-3)+"Z"}},lt||ut);var ft=function(){try{return Date.prototype.toJSON&&null===new Date(NaN).toJSON()&&-1!==new Date(at).toJSON().indexOf(st)&&Date.prototype.toJSON.call({toISOString:function(){return!0}})}catch(e){return!1}}();ft||(Date.prototype.toJSON=function(t){var n=i(this),r=W.ToPrimitive(n);if("number"==typeof r&&!isFinite(r))return null;var o=n.toISOString;if(!e(o))throw new TypeError("toISOString property is not callable");return o.call(n)});var dt=1e15===Date.parse("+033658-09-27T01:46:40.000Z"),pt=!isNaN(Date.parse("2012-04-04T24:00:00.500Z"))||!isNaN(Date.parse("2012-11-31T23:59:59.000Z"))||!isNaN(Date.parse("2012-12-31T23:59:60.000Z")),ht=isNaN(Date.parse("2000-01-01T00:00:00.000Z"));if(ht||pt||!dt){var gt=Math.pow(2,31)-1,mt=R(new Date(1970,0,1,0,0,0,gt+1).getTime());Date=function(e){var t=function(n,r,i,o,a,s,u){var c,f=arguments.length;if(this instanceof e){var d=s,p=u;if(mt&&f>=7&&u>gt){var h=Math.floor(u/gt)*gt,g=Math.floor(h/1e3);d+=g,p-=1e3*g}c=1===f&&l(n)===n?new e(t.parse(n)):f>=7?new e(n,r,i,o,a,d,p):f>=6?new e(n,r,i,o,a,d):f>=5?new e(n,r,i,o,a):f>=4?new e(n,r,i,o):f>=3?new e(n,r,i):f>=2?new e(n,r):f>=1?new e(n instanceof e?+n:n):new e}else c=e.apply(this,arguments);return G(c)||O(c,{constructor:t},!0),c},n=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),r=[0,31,59,90,120,151,181,212,243,273,304,334,365],i=function(e,t){var n=t>1?1:0;return r[t]+Math.floor((e-1969+n)/4)-Math.floor((e-1901+n)/100)+Math.floor((e-1601+n)/400)+365*(e-1970)},o=function(t){var n=0,r=t;if(mt&&r>gt){var i=Math.floor(r/gt)*gt,o=Math.floor(i/1e3);n+=o,r-=1e3*o}return c(new e(1970,0,1,0,0,n,r))};for(var a in e)J(e,a)&&(t[a]=e[a]);O(t,{now:e.now,UTC:e.UTC},!0),t.prototype=e.prototype,O(t.prototype,{constructor:t},!0);var s=function(t){var r=n.exec(t);if(r){var a,s=c(r[1]),l=c(r[2]||1)-1,u=c(r[3]||1)-1,f=c(r[4]||0),d=c(r[5]||0),p=c(r[6]||0),h=Math.floor(1e3*c(r[7]||0)),g=Boolean(r[4]&&!r[8]),m="-"===r[9]?1:-1,v=c(r[10]||0),y=c(r[11]||0),w=d>0||p>0||h>0;return(w?24:25)>f&&60>d&&60>p&&1e3>h&&l>-1&&12>l&&24>v&&60>y&&u>-1&&u<i(s,l+1)-i(s,l)&&(a=60*(24*(i(s,l)+u)+f+v*m),a=1e3*(60*(a+d+y*m)+p)+h,g&&(a=o(a)),a>=-864e13&&864e13>=a)?a:NaN}return e.parse.apply(this,arguments)};return O(t,{parse:s}),t}(Date)}Date.now||(Date.now=function(){return(new Date).getTime()});var vt=f.toFixed&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0)),yt={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function(e,t){for(var n=-1,r=t;++n<yt.size;)r+=e*yt.data[n],yt.data[n]=r%yt.base,r=Math.floor(r/yt.base)},divide:function(e){for(var t=yt.size,n=0;--t>=0;)n+=yt.data[t],yt.data[t]=Math.floor(n/e),n=n%e*yt.base},numToString:function(){for(var e=yt.size,t="";--e>=0;)if(""!==t||0===e||0!==yt.data[e]){var n=l(yt.data[e]);""===t?t=n:t+=K("0000000",0,7-n.length)+n}return t},pow:function Ot(e,t,n){return 0===t?n:t%2===1?Ot(e,t-1,n*e):Ot(e*e,t/2,n)},log:function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}},wt=function(e){var t,n,r,i,o,a,s,u;if(t=c(e),t=R(t)?0:Math.floor(t),0>t||t>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(n=c(this),R(n))return"NaN";if(-1e21>=n||n>=1e21)return l(n);if(r="",0>n&&(r="-",n=-n),i="0",n>1e-21)if(o=yt.log(n*yt.pow(2,69,1))-69,a=0>o?n*yt.pow(2,-o,1):n/yt.pow(2,o,1),a*=4503599627370496,o=52-o,o>0){for(yt.multiply(0,a),s=t;s>=7;)yt.multiply(1e7,0),s-=7;for(yt.multiply(yt.pow(10,s,1),0),s=o-1;s>=23;)yt.divide(1<<23),s-=23;yt.divide(1<<s),yt.multiply(1,1),yt.divide(2),i=yt.numToString()}else yt.multiply(0,a),yt.multiply(1<<-o,0),i=yt.numToString()+K("0.00000000000000000000",2,2+t);return t>0?(u=i.length,i=t>=u?r+K("0.0000000000000000000",0,t-u+2)+i:r+K(i,0,u-t)+"."+K(i,u-t)):i=r+i,i};O(f,{toFixed:wt},vt);var bt=function(){try{return"1"===1..toPrecision(void 0)}catch(e){return!0}}(),It=f.toPrecision;O(f,{toPrecision:function(e){return"undefined"==typeof e?It.call(this):It.call(this,e)}},bt),2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?!function(){var e="undefined"==typeof/()??/.exec("")[1],n=Math.pow(2,32)-1;u.split=function(r,i){var o=String(this);if("undefined"==typeof r&&0===i)return[];if(!t(r))return Q(this,r,i);var a,s,l,u,c=[],f=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(r.sticky?"y":""),d=0,p=new RegExp(r.source,f+"g");e||(a=new RegExp("^"+p.source+"$(?!\\s)",f));var g="undefined"==typeof i?n:W.ToUint32(i);for(s=p.exec(o);s&&(l=s.index+s[0].length,!(l>d&&($(c,K(o,d,s.index)),!e&&s.length>1&&s[0].replace(a,function(){for(var e=1;e<arguments.length-2;e++)"undefined"==typeof arguments[e]&&(s[e]=void 0)}),s.length>1&&s.index<o.length&&h.apply(c,F(s,1)),u=s[0].length,d=l,c.length>=g)));)p.lastIndex===s.index&&p.lastIndex++,s=p.exec(o);return d===o.length?(u||!p.test(""))&&$(c,""):$(c,K(o,d)),c.length>g?F(c,0,g):c}}():"0".split(void 0,0).length&&(u.split=function(e,t){return"undefined"==typeof e&&0===t?[]:Q(this,e,t)});var Mt=u.replace,Ct=function(){var e=[];return"x".replace(/x(.)?/g,function(t,n){$(e,n)}),1===e.length&&"undefined"==typeof e[0]}();Ct||(u.replace=function(n,r){var i=e(r),o=t(n)&&/\)[*?]/.test(n.source);if(i&&o){var a=function(e){var t=arguments.length,i=n.lastIndex;n.lastIndex=0;var o=n.exec(e)||[];return n.lastIndex=i,$(o,arguments[t-2],arguments[t-1]),r.apply(this,o)};return Mt.call(this,n,a)}return Mt.call(this,n,r)});var At=u.substr,St="".substr&&"b"!=="0b".substr(-1);O(u,{substr:function(e,t){var n=e;return 0>e&&(n=b(this.length+e,0)),At.call(this,n,t)}},St);var Et="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff",jt="​",Dt="["+Et+"]",Nt=new RegExp("^"+Dt+Dt+"*"),xt=new RegExp(Dt+Dt+"*$"),Lt=u.trim&&(Et.trim()||!jt.trim());O(u,{trim:function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");return l(this).replace(Nt,"").replace(xt,"")}},Lt);var Tt=y.bind(String.prototype.trim),Zt=u.lastIndexOf&&-1!=="abcあい".lastIndexOf("あい",2);O(u,{lastIndexOf:function(e){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");for(var t=l(this),n=l(e),r=arguments.length>1?c(arguments[1]):NaN,i=R(r)?1/0:W.ToInteger(r),o=I(b(i,0),t.length),a=n.length,s=o+a;s>0;){s=b(0,s-a);var u=q(K(t,s,o+a),n);if(-1!==u)return s+u}return-1}},Zt);var Pt=u.lastIndexOf;if(O(u,{lastIndexOf:function(e){return Pt.apply(this,arguments)}},1!==u.lastIndexOf.length),(8!==parseInt(Et+"08")||22!==parseInt(Et+"0x16"))&&(parseInt=function(e){var t=/^[-+]?0[xX]/;return function(n,r){var i=Tt(String(n)),o=c(r)||(t.test(i)?16:10);return e(i,o)}}(parseInt)),1/parseFloat("-0")!==-(1/0)&&(parseFloat=function(e){return function(t){var n=Tt(String(t)),r=e(n);return 0===r&&"-"===K(n,0,1)?-0:r}}(parseFloat)),"RangeError: test"!==String(new RangeError("test"))){var kt=function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");var e=this.name;"undefined"==typeof e?e="Error":"string"!=typeof e&&(e=l(e));var t=this.message;return"undefined"==typeof t?t="":"string"!=typeof t&&(t=l(t)),e?t?e+": "+t:e:t};Error.prototype.toString=kt}if(z){var Yt=function(e,t){if(ee(e,t)){var n=Object.getOwnPropertyDescriptor(e,t);n.configurable&&(n.enumerable=!1,Object.defineProperty(e,t,n))}};Yt(Error.prototype,"message"),""!==Error.prototype.message&&(Error.prototype.message=""),Yt(Error.prototype,"name")}if("/a/gim"!==String(/a/gim)){var zt=function(){var e="/"+this.source+"/";return this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),e};RegExp.prototype.toString=zt}})},{}],39:[function(e,t,n){var r=[],i=r.forEach,o=r.slice;t.exports=function(e){return i.call(o.call(arguments,1),function(t){if(t)for(var n in t)e[n]=t[n]}),e}},{}],40:[function(e,t,n){n.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<<s)-1,u=l>>1,c=-7,f=n?i-1:0,d=n?-1:1,p=e[t+f];for(f+=d,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+e[t+f],f+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+f],f+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:(p?-1:1)*(1/0);a+=Math.pow(2,r),o-=u}return(p?-1:1)*a*Math.pow(2,o-r)},n.write=function(e,t,n,r,i,o){var a,s,l,u=8*o-i-1,c=(1<<u)-1,f=c>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,h=r?1:-1,g=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),t+=a+f>=1?d/l:d*Math.pow(2,1-f),t*l>=2&&(a++,l/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*l-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+p]=255&s,p+=h,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;e[n+p]=255&a,p+=h,a/=256,u-=8);e[n+p-h]|=128*g}},{}],41:[function(e,t,n){var r=[].indexOf;t.exports=function(e,t){if(r)return e.indexOf(t);for(var n=0;n<e.length;++n)if(e[n]===t)return n;return-1}},{}],42:[function(e,t,n){function r(e){var t=i.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)}t.exports=r;var i=Object.prototype.toString},{}],43:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],44:[function(t,n,r){(function(t){!function(i){function o(e){throw new RangeError(P[e])}function a(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function s(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(Z,".");var i=e.split("."),o=a(i,t).join(".");return r+o}function l(e){for(var t,n,r=[],i=0,o=e.length;o>i;)t=e.charCodeAt(i++),t>=55296&&56319>=t&&o>i?(n=e.charCodeAt(i++),56320==(64512&n)?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--)):r.push(t);return r}function u(e){return a(e,function(e){var t="";return e>65535&&(e-=65536,t+=z(e>>>10&1023|55296),e=56320|1023&e),t+=z(e)}).join("")}function c(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:C}function f(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function d(e,t,n){var r=0;for(e=n?Y(e/j):e>>1,e+=Y(e/t);e>k*S>>1;r+=C)e=Y(e/k);return Y(r+(k+1)*e/(e+E))}function p(e){var t,n,r,i,a,s,l,f,p,h,g=[],m=e.length,v=0,y=N,w=D;for(n=e.lastIndexOf(x),0>n&&(n=0),r=0;n>r;++r)e.charCodeAt(r)>=128&&o("not-basic"),g.push(e.charCodeAt(r));for(i=n>0?n+1:0;m>i;){for(a=v,s=1,l=C;i>=m&&o("invalid-input"),f=c(e.charCodeAt(i++)),(f>=C||f>Y((M-v)/s))&&o("overflow"),v+=f*s,p=w>=l?A:l>=w+S?S:l-w,!(p>f);l+=C)h=C-p,s>Y(M/h)&&o("overflow"),s*=h;t=g.length+1,w=d(v-a,t,0==a),Y(v/t)>M-y&&o("overflow"),y+=Y(v/t),v%=t,g.splice(v++,0,y)}return u(g)}function h(e){var t,n,r,i,a,s,u,c,p,h,g,m,v,y,w,b=[];for(e=l(e),m=e.length,t=N,n=0,a=D,s=0;m>s;++s)g=e[s],128>g&&b.push(z(g));for(r=i=b.length,i&&b.push(x);m>r;){for(u=M,s=0;m>s;++s)g=e[s],g>=t&&u>g&&(u=g);for(v=r+1,u-t>Y((M-n)/v)&&o("overflow"),n+=(u-t)*v,t=u,s=0;m>s;++s)if(g=e[s],t>g&&++n>M&&o("overflow"),g==t){for(c=n,p=C;h=a>=p?A:p>=a+S?S:p-a,!(h>c);p+=C)w=c-h,y=C-h,b.push(z(f(h+w%y,0))),c=Y(w/y);b.push(z(f(c,0))),a=d(n,v,r==i),n=0,++r}++n,++t}return b.join("")}function g(e){return s(e,function(e){return L.test(e)?p(e.slice(4).toLowerCase()):e})}function m(e){return s(e,function(e){return T.test(e)?"xn--"+h(e):e})}var v="object"==typeof r&&r&&!r.nodeType&&r,y="object"==typeof n&&n&&!n.nodeType&&n,w="object"==typeof t&&t;(w.global===w||w.window===w||w.self===w)&&(i=w);var b,I,M=2147483647,C=36,A=1,S=26,E=38,j=700,D=72,N=128,x="-",L=/^xn--/,T=/[^\x20-\x7E]/,Z=/[\x2E\u3002\uFF0E\uFF61]/g,P={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},k=C-A,Y=Math.floor,z=String.fromCharCode;if(b={version:"1.4.1",ucs2:{decode:l,encode:u},decode:p,encode:h,toASCII:m,toUnicode:g},"function"==typeof e&&"object"==typeof e.amd&&e.amd)e("punycode",function(){return b});else if(v&&y)if(n.exports==v)y.exports=b;else for(I in b)b.hasOwnProperty(I)&&(v[I]=b[I]);else i.punycode=b}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],45:[function(t,n,r){!function(t,r){"undefined"!=typeof n&&n.exports?n.exports=r():"function"==typeof e&&e.amd?e(r):this[t]=r()}("$script",function(){function e(e,t){for(var n=0,r=e.length;r>n;++n)if(!t(e[n]))return l;return 1}function t(t,n){e(t,function(e){return!n(e)})}function n(o,a,s){function l(e){return e.call?e():d[e]}function c(){if(!--y){d[v]=1,m&&m();for(var n in h)e(n.split("|"),l)&&!t(h[n],l)&&(h[n]=[])}}o=o[u]?o:[o];var f=a&&a.call,m=f?a:s,v=f?o.join(""):a,y=o.length;return setTimeout(function(){t(o,function e(t,n){return null===t?c():(n||/^https?:\/\//.test(t)||!i||(t=-1===t.indexOf(".js")?i+t+".js":i+t),g[t]?(v&&(p[v]=1),2==g[t]?c():setTimeout(function(){e(t,!0)},0)):(g[t]=1,v&&(p[v]=1),void r(t,c)))})},0),n}function r(e,t){var n,r=a.createElement("script");r.onload=r.onerror=r[f]=function(){r[c]&&!/^c|loade/.test(r[c])||n||(r.onload=r[f]=null,n=1,g[e]=2,t())},r.async=1,r.src=o?e+(-1===e.indexOf("?")?"?":"&")+o:e,s.insertBefore(r,s.lastChild)}var i,o,a=document,s=a.getElementsByTagName("head")[0],l=!1,u="push",c="readyState",f="onreadystatechange",d={},p={},h={},g={};return n.get=r,n.order=function(e,t,r){!function i(o){o=e.shift(),e.length?n(o,i):n(o,t,r)}()},n.path=function(e){i=e},n.urlArgs=function(e){o=e},n.ready=function(r,i,o){r=r[u]?r:[r];var a=[];return!t(r,function(e){d[e]||a[u](e)})&&e(r,function(e){return d[e]})?i():!function(e){h[e]=h[e]||[],h[e][u](i),o&&o(a)}(r.join("|")),n},n.done=function(e){n([null],e)},n})},{}]},{},[32])(32)});if(typeof fv_flowplayer_conf!="undefined"){try{if(typeof window.localStorage=="object"&&typeof window.localStorage.volume!="undefined"){delete fv_flowplayer_conf.volume}}catch(e){}if(typeof fv_flowplayer_conf.chromecast==="undefined"){fv_flowplayer_conf.chromecast=false}flowplayer.conf=fv_flowplayer_conf;flowplayer.conf.embed=false;flowplayer.conf.share=false;try{flowplayer.conf.key=atob(flowplayer.conf.key)}catch(e){}if(!flowplayer.support.android&&flowplayer.conf.dacast_hlsjs){function FVAbrController(hls){this.hls=hls;this.nextAutoLevel=3}FVAbrController.prototype.nextAutoLevel=function(nextLevel){this.nextAutoLevel=nextLevel};FVAbrController.prototype.destroy=function(){};flowplayer.conf.hlsjs={startLevel:-1,abrController:FVAbrController}}if(flowplayer.support.iOS&&parseInt(flowplayer.support.iOS.version)>=13||!flowplayer.support.iOS&&flowplayer.support.browser.safari&&parseInt(flowplayer.support.browser.version)>=8){flowplayer.conf.hlsjs.safari=true}flowplayer.support.fvmobile=!!(!flowplayer.support.firstframe||flowplayer.support.iOS||flowplayer.support.android);var fls=flowplayer.support;if(flowplayer.conf.mobile_native_fullscreen&&"ontouchstart"in window&&fls.fvmobile){flowplayer.conf.native_fullscreen=true}if("ontouchstart"in window){if(fls.android&&fls.android.version<4.4&&!(fls.browser.chrome&&fls.browser.version>54)){flowplayer.conf.native_fullscreen=true}if(fls.iOS&&(fv_player_in_iframe()||fls.iOS.version<7)){flowplayer.conf.native_fullscreen=true}}}if(typeof fv_flowplayer_translations!="undefined"){flowplayer.defaults.errors=fv_flowplayer_translations}var fv_player_did_autoplay=false;function fv_player_videos_parse(args,root){try{var videos=JSON.parse(args)}catch(e){return false}var regex=new RegExp("[\\?&]fv_flowplayer_mobile=([^&#]*)");var results=regex.exec(location.search);if((results!=null&&results[1]=="yes"||(jQuery(window).width()<=480||jQuery(window).height()<=480))&&(results==null||results[1]!="no")){var fv_fp_mobile=false;jQuery(videos.sources).each(function(k,v){if(v.mobile){videos.sources[k]=videos.sources[0];videos.sources[0]=v;fv_fp_mobile=true}if(fv_fp_mobile){jQuery(root).after('<p class="fv-flowplayer-mobile-switch">'+fv_flowplayer_translations.mobile_browser_detected_1+' <a href="'+document.URL+'?fv_flowplayer_mobile=no">'+fv_flowplayer_translations.mobile_browser_detected_2+"</a>.</p>")}})}return videos}function fv_player_in_iframe(){try{return window.self!==window.top}catch(e){return true}}jQuery(document).ready(function(){var loading_count=0;var loading=setInterval(function(){loading_count++;if(loading_count<1e3&&(window.fv_video_intelligence_conf&&!window.FV_Player_IMA||window.fv_vast_conf&&!window.FV_Player_IMA||window.fv_player_pro&&!window.FV_Flowplayer_Pro&&document.getElementById("fv_player_pro")!=fv_player_pro)){return}clearInterval(loading);fv_player_preload()},10)});function fv_escape_attr(text){var map={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return text.replace(/[&<>"']/g,function(m){return map[m]})}function fv_player_preload(){if(flowplayer.support.touch){jQuery(".fp-playlist-external.fv-playlist-design-2017").addClass("visible-captions")}flowplayer(function(api,root){root=jQuery(root);var fp_player=root.find(".fp-player");var splash_click=false;if(root.hasClass("fixed-controls")){root.find(".fp-controls").click(function(e){if(!api.loading&&!api.ready){e.preventDefault();e.stopPropagation();api.load()}})}if(!flowplayer.support.volume&&!flowplayer.support.autoplay){root.find(".fp-volume").hide()}if(root.data("fullscreen")==false){root.find(".fp-fullscreen").remove()}if(root.data("volume")==0&&root.hasClass("no-controlbar")){root.find(".fp-volume").remove()}var playlist=jQuery(".fp-playlist-external[rel="+root.attr("id")+"]");if((!api.conf.playlist||api.conf.playlist.length==0)&&playlist.length&&playlist.find("a[data-item]").length>0){var items=[];playlist.find("a[data-item]").each(function(){if(parsed=fv_player_videos_parse(jQuery(this).attr("data-item"),root)){items.push(parsed)}else{jQuery(this).remove()}});api.conf.playlist=items;api.conf.clip=items[0]}else if(!api.conf.clip){api.conf.clip=fv_player_videos_parse(jQuery(root).attr("data-item"),root)}jQuery("a",playlist).click(function(e){e.preventDefault();splash_click=true;var $this=jQuery(this),playlist=jQuery(".fp-playlist-external[rel="+root.attr("id")+"]"),index=jQuery("a",playlist).index(this);$prev=$this.prev("a"),item=$this.data("item");if(location.href.match(/wp-admin/)&&$this.parents(".fv-player-editor-preview").length>0){fv_flowplayer_conf.current_video_to_edit=index;$this.parents(".fv-player-custom-video").find(".edit-video .fv-player-editor-button").click();return false}if($prev.length&&$this.is(":visible")&&!$prev.is(":visible")){$prev.click();return false}if(jQuery("#"+$this.parent().attr("rel")).hasClass("dynamic-playlist"))return;var playlist=jQuery(".fp-playlist-external[rel="+root.attr("id")+"]");fv_player_playlist_active(playlist,this);if(api){if(api.error){api.pause();api.error=api.loading=false;root.removeClass("is-error");root.find(".fp-message.fp-shown").remove()}if(!api.video||api.video.index==index)return;api.play(index)}var new_splash=item.splash;if(!new_splash){new_splash=$this.find("img").attr("src")}player_splash(root,fp_player,item,new_splash);var rect=root[0].getBoundingClientRect();if(rect.bottom-100<0){jQuery("html, body").animate({scrollTop:jQuery(root).offset().top-100},300)}});var playlist_external=jQuery("[rel="+root.attr("id")+"]");var playlist_progress=false;var splash_img=root.find(".fp-splash");var splash_text=root.find(".fv-fp-splash-text");function player_splash(root,fp_player,item,new_splash){var splash_img=root.find("img.fp-splash");if(new_splash){if(splash_img.length==0){splash_img=jQuery('<img class="fp-splash" />');fp_player.prepend(splash_img)}splash_img.attr("alt",item.fv_title?fv_escape_attr(item.fv_title):"video");splash_img.attr("src",new_splash)}else if(splash_img.length){splash_img.remove()}}api.bind("load",function(e,api,video){if(video.type.match(/^audio/)&&!splash_click){var anchor=playlist_external.find("a").eq(video.index);var item=anchor.data("item");var new_splash=item.splash;if(!new_splash){new_splash=anchor.find("img").attr("src")}player_splash(root,fp_player,item,new_splash)}splash_click=false});api.bind("ready",function(e,api,video){setTimeout(function(){if(video.index>-1){if(playlist_external.length>0){var playlist_item=jQuery("a",playlist_external).eq(video.index);fv_player_playlist_active(playlist_external,playlist_item);playlist_progress=playlist_item.find(".fvp-progress")}}},100);splash_img=root.find(".fp-splash");if(!api.video.type.match(/^audio/)){splash_img.remove();splash_text.remove()}});api.bind("unload",function(){jQuery(".fp-playlist-external .now-playing").remove();jQuery(".fp-playlist-external a").removeClass("is-active");fp_player.prepend(splash_text);fp_player.prepend(splash_img);playlist_progress=false});api.bind("progress",function(e,api,time){if(playlist_progress.length){api.playlist_thumbnail_progress(playlist_progress,api.video,time)}});api.bind("error-subtitles",function(){console.log("error-subtitles");fv_player_notice(root,fv_flowplayer_translations[8],2e3)});var playlist=jQuery(root).parent().find("div.fp-playlist-vertical[rel="+jQuery(root).attr("id")+"]");if(playlist.length){function check_size_and_all(args){var property=playlist.hasClass("fp-playlist-only-captions")?"height":"max-height";if(playlist.parents(".fp-playlist-text-wrapper").hasClass("is-fv-narrow")){property="max-height"}playlist.css(property,vertical_playlist_height());if(property=="max-height")playlist.css("height","auto")}check_size_and_all();jQuery(window).on("resize tabsactivate",function(){setTimeout(check_size_and_all,0)})}function vertical_playlist_height(args){var height=root.height();if(height==0)height=root.css("max-height");return height}});if(window.self!=window.top&&!location.href.match(/fv_player_preview/)){embed_size();jQuery(window.self).resize(embed_size)}function embed_size(){jQuery(".flowplayer.fp-is-embed").each(function(){var root=jQuery(this);if(!root.hasClass("has-chapters")&&!root.hasClass("has-transcript")&&jQuery(".fp-playlist-external[rel="+root.attr("id")+"]").length==0){root.height(jQuery(window).height())}})}if(typeof fv_flowplayer_playlists!="undefined"){for(var i in fv_flowplayer_playlists){if(!fv_flowplayer_playlists.hasOwnProperty(i))continue;jQuery("#"+i).flowplayer({playlist:fv_flowplayer_playlists[i]})}}fv_player_load();fv_autoplay_exec();jQuery(document).ajaxComplete(function(){fv_player_load()});jQuery(window).on("hashchange",fv_autoplay_exec)}function fv_player_load(forced_el){if(forced_el&&forced_el.lenght>1){console.log("FV Player: Can't use fv_player_load with more than a single forced element!")}var load_players=forced_el,forced_api=false;if(!load_players)load_players=jQuery(".flowplayer");load_players.each(function(i,el){var root=jQuery(el);var api=root.data("flowplayer");if(api){if(forced_el)forced_api=api;return}if(forced_el){root.find(".fp-preload, .fvfp_admin_error").remove();if(root.attr("data-item-lazy")){root.attr("data-item",root.attr("data-item-lazy"));root.removeAttr("item-lazy")}else if(playlist=jQuery("[rel="+root.attr("id")+"]")){playlist.find("a[data-item-lazy]").each(function(k,v){v=jQuery(v);v.attr("data-item",v.attr("data-item-lazy"));v.removeAttr("data-item-lazy")})}}if(root.attr("data-item")){forced_api=flowplayer(root[0],{clip:fv_player_videos_parse(root.attr("data-item"),root)});root.data("flowplayer",forced_api)}else if(playlist=jQuery("[rel="+root.attr("id")+"]")){if(playlist.find("a[data-item]").length==0)return;var items=[];playlist.find("a[data-item]").each(function(){if(parsed=fv_player_videos_parse(jQuery(this).attr("data-item"),root)){items.push(parsed)}else{jQuery(this).remove()}});forced_api=flowplayer(root[0],{playlist:items});root.data("flowplayer",forced_api)}});jQuery(".fv-playlist-slider-wrapper").each(function(i,el){var items=jQuery(this).find("a");jQuery(this).find(".fp-playlist-external").css("width",items.outerWidth()*items.length)});if(typeof jQuery().tabs!="undefined"){jQuery("body").removeClass("fv_flowplayer_tabs_hide");jQuery(".fv_flowplayer_tabs_content").tabs()}if(forced_el&&forced_api){return forced_api}}function fv_player_playlist_active(playlist,item){if(playlist){jQuery("a",playlist).removeClass("is-active");jQuery(".now-playing").remove()}$playlist=jQuery(playlist);$item=jQuery(item);var scroll_parent=false;$item.addClass("is-active");var is_design_2014=$playlist.hasClass("fv-playlist-design-2014");if((is_design_2014&&$item.find("h4").length==0||!is_design_2014)&&$item.find(".now-playing").length==0)$item.prepend('<strong class="now-playing"><span>'+fv_flowplayer_translations.playlist_current+"</span></strong>");if(!$playlist.parent().find(".flowplayer").length){scroll_parent=true}if(($playlist.hasClass("fp-playlist-vertical")||$playlist.hasClass("fp-playlist-horizontal")&&$playlist.hasClass("is-audio"))&&!fullyVisibleY($item.get(0))){var $el=scroll_parent?$playlist.parent():$playlist;$el.animate({scrollTop:$el.scrollTop()+($item.position().top-$el.position().top)},750)}else if($playlist.hasClass("fp-playlist-horizontal")&&!fullyVisibleX($item.get(0))){var $el=scroll_parent?$playlist.parent():$playlist;$el.animate({scrollLeft:$el.scrollLeft()+($item.position().left-$el.position().left)},750)}function fullyVisibleY(el){var rect=el.getBoundingClientRect(),top=rect.top,height=rect.height,bottom=top+height,el=el.parentNode;do{rect=el.getBoundingClientRect();if(bottom<=rect.bottom===false)return false;if(top<=rect.top)return false;el=el.parentNode}while(el!=document.body);return bottom<=document.documentElement.clientHeight}function fullyVisibleX(el){var rect=el.getBoundingClientRect(),left=rect.left,width=rect.width,right=left+width,el=el.parentNode;do{rect=el.getBoundingClientRect();if(right<=rect.right===false)return false;if(left<=rect.left)return false;el=el.parentNode}while(el!=document.body);return right<=document.documentElement.clientWidth}}jQuery(function(){jQuery(".flowplayer").each(function(){flowplayer.bean.off(jQuery(this)[0],"contextmenu")})});var fv_fp_date=new Date;var fv_fp_utime=fv_fp_date.getTime();function fv_parse_sharelink(src){src=src.replace("https?://[^./].","");var prefix="fvp_";if(src.match(/(youtube.com)/)){return prefix+src.match(/(?:v=)([A-Za-z0-9_-]*)/)[1]}else if(src.match(/(vimeo.com)|(youtu.be)/)){return prefix+src.match(/(?:\/)([^/]*$)/)[1]}else{var match=src.match(/(?:\/)([^/]*$)/);if(match){return prefix+match[1].match(/^[^.]*/)[0]}}return prefix+src}function fv_player_get_video_link_hash(api){var hash=fv_parse_sharelink(typeof api.video.sources_original!="undefined"&&typeof api.video.sources_original[0]!="undefined"?api.video.sources_original[0].src:api.video.sources[0].src);if(typeof api.video.id!="undefined"){hash=fv_parse_sharelink(api.video.id.toString())}return hash}function fv_player_time_hms(seconds){if(isNaN(seconds)){return NaN}var date=new Date(null);date.setSeconds(seconds);var timeSrting=date.toISOString().substr(11,8);timeSrting=timeSrting.replace(/([0-9]{2}):([0-9]{2}):([0-9]{2}\.?[0-9]*)/,"$1h$2m$3s").replace(/^00h(00m)?/,"").replace(/^0/,"");return timeSrting}function fv_player_time_seconds(time,duration){if(!time)return-1;var seconds=0;var aTime=time.replace(/[hm]/g,":").replace(/s/,"").split(":").reverse();if(typeof aTime[0]!="undefined")seconds+=parseFloat(aTime[0]);if(typeof aTime[1]!="undefined")seconds+=parseInt(60*aTime[1]);if(typeof aTime[2]!="undefined")seconds+=parseInt(60*60*aTime[2]);return duration?Math.min(seconds,duration):seconds}function fv_autoplay_init(root,index,time){if(fv_autoplay_exec_in_progress)return;fv_autoplay_exec_in_progress=true;var api=root.data("flowplayer");if(!api)return;var fTime=fv_player_time_seconds(time);if(root.parent().hasClass("ui-tabs-panel")){var tabId=root.parent().attr("id");jQuery("[aria-controls="+tabId+"] a").click()}if(!root.find(".fp-player").attr("class").match(/\bis-sticky/)){var offset=jQuery(root).offset().top-(jQuery(window).height()-jQuery(root).height())/2;window.scrollTo(0,offset);api.one("ready",function(){window.scrollTo(0,offset)})}if(root.hasClass("lightboxed")){setTimeout(function(){jQuery("[href=\\#"+root.attr("id")+"]").click()},0)}if(index){if(fv_player_video_link_autoplay_can(api,parseInt(index))){if(api.ready){if(fTime>-1)api.seek(fTime);fv_autoplay_exec_in_progress=false}else{api.play(parseInt(index));api.one("ready",function(){fv_autoplay_exec_in_progress=false;if(fTime>-1)api.seek(fTime)})}}else if(flowplayer.support.inlineVideo){api.one(api.playing?"progress":"ready",function(e,api){api.play(parseInt(index));api.one("ready",function(){fv_autoplay_exec_in_progress=false;if(fTime>-1)api.seek(fTime)})});root.find(".fp-splash").attr("src",jQuery("[rel="+root.attr("id")+"] div").eq(index).find("img").attr("src"));if(!fv_player_in_iframe()){fv_player_notice(root,fv_flowplayer_translations[11],"progress")}}}else{if(api.ready){if(fTime>-1)api.seek(fTime);fv_autoplay_exec_in_progress=false}else{if(fv_player_video_link_autoplay_can(api)){api.load()}else if(!fv_player_in_iframe()){fv_player_notice(root,fv_flowplayer_translations[11],"progress")}api.one("ready",function(){fv_autoplay_exec_in_progress=false;if(fTime>-1){var do_seek=setInterval(function(){if(api.loading)return;api.seek(fTime);clearInterval(do_seek)},10)}})}}}var fv_autoplay_exec_in_progress=false;function fv_autoplay_exec(){var autoplay=true;if(typeof flowplayer!=="undefined"&&typeof fv_flowplayer_conf!="undefined"&&fv_flowplayer_conf.video_hash_links&&window.location.hash.substring(1).length){var aHash=window.location.hash.match(/\?t=/)?window.location.hash.substring(1).split("?t="):window.location.hash.substring(1).split(",");var hash=aHash[0];var time=aHash[1]===undefined?false:aHash[1];jQuery(".flowplayer").each(function(){var root=jQuery(this);if(root.hasClass("lightbox-starter")){root=jQuery(root.attr("href"))}var api=root.data("flowplayer");if(!api)return;var playlist=typeof api.conf.playlist!=="undefined"&&api.conf.playlist.length>1?api.conf.playlist:[api.conf.clip];for(var item in playlist){if(!playlist.hasOwnProperty(item))continue;var id=typeof playlist[item].id!=="undefined"?fv_parse_sharelink(playlist[item].id.toString()):false;if(hash===id&&autoplay){console.log("fv_autoplay_exec for "+id,item);fv_autoplay_init(root,parseInt(item),time);autoplay=false;return false}}for(var item in playlist){if(!playlist.hasOwnProperty(item))continue;var src=fv_parse_sharelink(playlist[item].sources[0].src);if(hash===src&&autoplay){console.log("fv_autoplay_exec for "+src,item);fv_autoplay_init(root,parseInt(item),time);autoplay=false;return false}}})}if(autoplay&&flowplayer.support.firstframe){jQuery(".flowplayer[data-fvautoplay]").each(function(){var root=jQuery(this);var api=root.data("flowplayer");if(!fv_player_did_autoplay&&root.data("fvautoplay")){if(!((flowplayer.support.android||flowplayer.support.iOS)&&api&&api.conf.clip.sources[0].type=="video/youtube")){fv_player_did_autoplay=true;api.load();var play_icon=root.find(".fp-play").addClass("invisible"),control_bar=root.find(".fp-controls").addClass("invisible");api.one("progress",function(){play_icon.removeClass("invisible");control_bar.removeClass("invisible")});if(root.data("fvautoplay")=="muted"){api.mute(true,true)}}}})}}function fv_player_video_link_autoplay_can(api,item){var video=item?api.conf.playlist[item]:api.conf.clip;if(video.sources[0].type=="video/youtube"&&(flowplayer.support.iOS||flowplayer.support.android)||fv_player_in_iframe())return false;return flowplayer.support.firstframe}function fv_player_notice(root,message,timeout){var notices=jQuery(".fvfp-notices",root);if(!notices.length){notices=jQuery('<div class="fvfp-notices">');jQuery(".fp-player",root).append(notices)}var notice=jQuery('<div class="fvfp-notice-content">'+message+"</div></div>");notices.append(notice);if(typeof timeout=="string"){var player=jQuery(root).data("flowplayer");player.on(timeout,function(){notice.fadeOut(100,function(){jQuery(this).remove()})})}if(timeout>0){setTimeout(function(){notice.fadeOut(2e3,function(){jQuery(this).remove()})},timeout)}return notice}var fv_player_clipboard=function(text,successCallback,errorCallback){try{fv_player_doCopy(text);successCallback()}catch(e){if(typeof errorCallback!="undefined")errorCallback(e)}};function fv_player_doCopy(text){var textarea=document.createElement("textarea");textarea.value=text;textarea.style.opacity=0;textarea.style.position="absolute";textarea.setAttribute("readonly",true);document.body.appendChild(textarea);var selected=document.getSelection().rangeCount>0?document.getSelection().getRangeAt(0):false;if(navigator.userAgent.match(/ipad|ipod|iphone/i)){var editable=textarea.contentEditable;textarea.contentEditable=true;var range=document.createRange();range.selectNodeContents(textarea);var sel=window.getSelection();sel.removeAllRanges();sel.addRange(range);textarea.setSelectionRange(0,999999);textarea.contentEditable=editable}else{textarea.select()}try{var result=document.execCommand("copy");if(selected){document.getSelection().removeAllRanges();document.getSelection().addRange(selected)}document.body.removeChild(textarea);return result}catch(err){throw new Error("Unsuccessfull")}}if(location.href.match(/elementor-preview=/)){console.log("FV Player: Elementor editor is active");setInterval(fv_player_load,1e3)}flowplayer(function(api,root){root=jQuery(root);console.log("api.conf.hd_streaming ",api.conf.hd_streaming);var hlsjs;flowplayer.engine("hlsjs-lite").plugin(function(params){hlsjs=params.hls;hlsjs.on(Hls.Events.ERROR,function(event,data){if(data.type=="mediaError"&&data.details=="fragParsingError"&&data.fatal==true){hlsjs.destroy();api.trigger("error",[api,{code:3}]);setTimeout(function(){root.removeClass("is-seeking");root.addClass("is-paused")},0)}});var pick_quality=flowplayer.conf.hd_streaming&&!flowplayer.support.fvmobile?720:false;if(jQuery(params.root).data("hd_streaming")==false)pick_quality=false;if(localStorage.FVPlayerHLSQuality)pick_quality=localStorage.FVPlayerHLSQuality;if(pick_quality){hlsjs.on(Hls.Events.MANIFEST_PARSED,function(_,data){var found=false;jQuery.each(data.levels,function(k,v){if(v.height==pick_quality)found=k});if(!localStorage.FVPlayerHLSQuality&&!found){jQuery.each(data.levels,function(k,v){if(v.height>found)found=k})}if(found){console.log("FV Player: Picked "+data.levels[found].height+"p quality");hlsjs.startLevel=found;hlsjs.currentLevel=found}})}});var search=document.location.search;if(localStorage.FVPlayerDashQuality){if(!api.conf.dash)api.conf.dash={};api.conf.dash.initialVideoQuality="restore"}root=jQuery(root);root.on("click",".fp-qsel-menu a",function(){if(api.engine.engineName=="hlsjs-lite"){var quality=jQuery(this).data("quality");if(quality==-1){localStorage.removeItem("FVPlayerHLSQuality")}else{var level=hlsjs.levels[quality];localStorage.FVPlayerHLSQuality=level.height}}});api.bind("quality",function(e,api,quality){if(api.engine.engineName=="dash"){if(quality==-1){localStorage.removeItem("FVPlayerDashQuality")}else if(bitrates[quality]){localStorage.FVPlayerDashQuality=bitrates[quality].height}}});var bitrates=[];var last_quality=-1;api.bind("ready",function(e,api){root.find(".fp-qsel-menu strong").text(fv_flowplayer_translations.quality);if(api.engine.engineName=="dash"){bitrates=api.engine.dash.getBitrateInfoListFor("video");if(localStorage.FVPlayerDashQuality&&api.conf.dash.initialVideoQuality){api.quality(api.conf.dash.initialVideoQuality)}quality_sort()}else if(api.engine.engineName=="hlsjs-lite"){if(api.video.qualities&&api.video.qualities.length>2){quality_sort()}}else if(api.video.sources_fvqs&&api.video.sources_fvqs.length>0&&api.video.src.match(/vimeo.*?\.mp4/)){setTimeout(quality_sort,0)}root.find("a[data-quality]").removeClass("is-current")});if(search.match(/dash_debug/)||search.match(/hls_debug/))var debug_log=jQuery('<div class="fv-debug" style="background: gray; color: white; top: 10%; position: absolute; z-index: 1000">').appendTo(root.find(".fp-player"));api.bind("ready progress",quality_process);api.bind("quality",function(){setTimeout(quality_process,0)});function quality_process(){if(api.engine.engineName=="dash"){var stream_info=bitrates[api.engine.dash.getQualityFor("video")];if(stream_info.qualityIndex!=last_quality){last_quality=stream_info.qualityIndex;quality_label(stream_info.qualityIndex,bitrates)}if(search.match(/dash_debug/))quality_debug(stream_info.width,stream_info.height,stream_info.bitrate)}else if(api.engine.engineName=="hlsjs-lite"){if(hlsjs.currentLevel!=last_quality){last_quality=hlsjs.currentLevel;quality_label(hlsjs.currentLevel,hlsjs.levels)}if(search.match(/hls_debug/)){var level=hlsjs.levels[hlsjs.currentLevel];if(level){quality_debug(level.width,level.height,level.bitrate)}}}}function quality_label(index,qualities){if(!qualities[index])return;var height=qualities[index].height,hd_limit=541,lowest=1e5;jQuery(qualities).each(function(k,v){if(v.height>=720&&v.height<1400)hd_limit=720;if(v.height<lowest)lowest=v.height;if(localStorage.FVPlayerHLSQuality==v.height){root.find("a[data-quality]").removeClass("fp-selected fp-color");root.find("a[data-quality="+k+"]").addClass("fp-selected fp-color")}});root.find("a[data-quality]").removeClass("is-current");root.find("a[data-quality="+index+"]").addClass("is-current");var label="SD";if(height>=360&&lowest<height)label="SD";if(height>=hd_limit)label="HD";if(height>=1400)label="4K";root.find(".fp-qsel").html(label)}function quality_debug(w,h,br){debug_log.html("Using "+w+"x"+h+" at "+Math.round(br/1024)+" kbps")}function quality_sort(){var menu=root.find(".fp-qsel-menu");menu.children().each(function(i,a){menu.prepend(a)});menu.children().each(function(i,a){if(/^NaNp/.test(jQuery(a).html())){var bitrate=jQuery(a).html().match(/\((.*?)\)/);if(bitrate&&typeof bitrate[1]!=="undefined"){jQuery(a).html(bitrate[1])}}else{jQuery(a).html(jQuery(a).html().replace(/\(.*?\)/,""))}});menu.prepend(menu.find("a[data-quality=-1]"));menu.prepend(menu.find("strong"))}});flowplayer(function(api,root){root=jQuery(root);var player_id=root.attr("id"),ad=false;if(root.data("end_popup_preview")){jQuery(document).ready(function(){api.trigger("finish",[api])})}function ad_height_check(){var count=0;var ad_height_check=setInterval(function(){var height=ad&&ad.find(".adsbygoogle").height();count++;if(count>20*10||height>0)clearInterval(ad_height_check);if(height>root.height()){ad.addClass("tall-ad")}},50)}function show_ad(){var ad_data=root.attr("data-ad");if(typeof ad_data!="undefined"&&ad_data.length){try{ad_data=JSON.parse(ad_data)}catch(e){return false}if(!ad&&!root.hasClass("is-cva")&&root.width()>=parseInt(ad_data.width)){var html=ad_data.html;html=html.replace("%random%",Math.random());ad=jQuery('<div id="'+player_id+'_ad" class="wpfp_custom_ad">'+html+"</div>");root.find(".fp-player").append(ad);ad_height_check();setTimeout(function(){if(root.find(".wpfp_custom_ad video").length){api.pause()}},500)}}}function show_popup(event){var popup_data=root.attr("data-popup");if(typeof popup_data!="undefined"&&popup_data.length){try{popup_data=JSON.parse(popup_data)}catch(e){return false}if(event=="finish"||popup_data.pause||popup_data.html.match(/fv-player-ppv-purchase-btn-wrapper/)){root.addClass("is-popup-showing");root.find(".fp-player").append('<div id="'+player_id+'_custom_popup" class="wpfp_custom_popup">'+popup_data.html+"</div>")}}}api.bind("ready",function(e,api){if(ad.length==1){ad.remove();ad=false}if(!root.data("ad_show_after")){show_ad()}}).bind("progress",function(e,api,current){if(current>root.data("ad_show_after")){show_ad()}}).bind("finish",function(e,api){if(typeof api.video.index=="undefined"||api.video.index+1==api.conf.playlist.length){show_popup(e.type)}}).bind("pause",function(e,api){show_popup(e.type)}).bind("resume unload seek",function(e,api){if(root.hasClass("is-popup-showing")){root.find(".wpfp_custom_popup").remove();root.removeClass("is-popup-showing")}})});jQuery(document).on("click",".fv_fp_close",function(){var ad=jQuery(this).parents(".wpfp_custom_ad_content"),video=ad.find("video");ad.fadeOut();if(video.length)video[0].pause();return false});jQuery(document).on("focus",".fv_player_popup input[type=text], .fv_player_popup input[type=email], .fv_player_popup textarea",function(){var api=jQuery(this).parents(".flowplayer").data("flowplayer");if(api)api.disable(true)});jQuery(document).on("blur",".fv_player_popup input[type=text], .fv_player_popup input[type=email], .fv_player_popup textarea",function(){var api=jQuery(this).parents(".flowplayer").data("flowplayer");if(api)api.disable(false)});flowplayer(function(api,root){var root=jQuery(root);api.bind("progress",function(e,api,current){fv_track(e,api,current)}).bind("finish ready ",function(e,api){for(var j in fv_ga_events){if(!fv_ga_events.hasOwnProperty(j))continue;root.removeData("fv_track_"+fv_ga_events[j])}}).bind("error",function(e,api,error){setTimeout(function(){if(!api.error)return;var video=typeof api.video!="undefined"&&typeof api.video.src!="undefined"?api.video:false;if(!video&&typeof api.conf.clip!="undefined"&&typeof api.conf.clip.sources!="undefined"&&typeof api.conf.clip.sources[0]!="undefined"&&typeof api.conf.clip.sources[0].src!="undefined")video=api.conf.clip.sources[0];var name=fv_player_track_name(root,video);if(name&&!name.match(/\/\/vimeo.com\/\d/)){fv_player_track(api.conf.analytics,"Video "+(root.hasClass("is-cva")?"Ad ":"")+"error",error.message,name)}},100)});var fv_ga_events=["start","first quartile","second quartile","third quartile","complete"];function fv_track(e,api,data){var video=api.video,dur=video.duration,i=0;var name=fv_player_track_name(root,video);if(dur){if(data>19*dur/20)i=4;else if(data>3*dur/4)i=3;else if(data>dur/2)i=2;else if(data>dur/4)i=1}if(root.data("fv_track_"+fv_ga_events[i]))return;for(var j in fv_ga_events){if(!fv_ga_events.hasOwnProperty(j))continue;if(j==i)break;if(!root.data("fv_track_"+fv_ga_events[j]))return}root.trigger("fv_track_"+fv_ga_events[i].replace(/ /,"_"),[api,name]);root.data("fv_track_"+fv_ga_events[i],true);fv_player_track(api.conf.analytics,"Video "+(root.hasClass("is-cva")?"Ad ":"")+fv_ga_events[i],api.engine.engineName+"/"+video.type,name)}});function fv_player_track(ga_id,event,engineType,name){if(!ga_id||typeof _gat=="undefined")return;var tracker=_gat._getTracker(ga_id);if(typeof tracker._setAllowLinker=="undefined"){return}if(typeof engineType=="undefined")engineType="Unknown engine";if(/fv_ga_debug/.test(window.location.href))console.log("FV GA: "+event+" - "+engineType+" '"+name+"'");tracker._setAllowLinker(true);tracker._trackEvent(event,engineType,name,1)}function fv_player_track_name(root,video){var name=root.attr("title");if(!name&&typeof video.fv_title!="undefined")name=video.fv_title;if(!name&&typeof video.title!="undefined")name=video.title;if(!name&&typeof video.title!="undefined")name=video.title;if(!name&&typeof video.src!="undefined"){name=video.src.split("/").slice(-1)[0].replace(/\.(\w{3,4})(\?.*)?$/i,"");if(video.type.match(/mpegurl/))name=video.src.split("/").slice(-2)[0].replace(/\.(\w{3,4})(\?.*)?$/i,"")+"/"+name}return name}flowplayer(function(api,root){root=jQuery(root);var player=root.find(".fp-player"),had_no_volume=root.hasClass("no-volume"),had_fp_mute=root.hasClass("fp-mute"),had_fp_full=root.hasClass("fp-full"),timeline=root.find(".fp-timeline"),buttons_count=0;function check_size(){var width=player.width()||root.width();if(width>900){jQuery(".fp-subtitle",root).addClass("is-wide")}else{jQuery(".fp-subtitle",root).removeClass("is-wide")}root.toggleClass("is-tiny",width<400);root.toggleClass("is-small",width<600&&width>=400);if(!had_fp_full){root.toggleClass("fp-full",root.hasClass("has-abloop")||width<480+buttons_count*35)}var size="";if(width<400)size="is-tiny";else if(width<600&&width>=400)size="is-small";root.trigger("fv-player-size",[size]);var el=player;if(root.parent().hasClass("fp-playlist-vertical-wrapper")||root.parent().hasClass("fp-playlist-text-wrapper"))el=root.parent();if(el.width()<=560){el.addClass("is-fv-narrow")}else{el.removeClass("is-fv-narrow")}if(width<=320){root.addClass("no-volume fp-mute")}else{if(!had_no_volume)root.removeClass("no-volume");if(!had_fp_mute)root.removeClass("fp-mute")}if(!root.hasClass("is-audio")){var speed=root.find(".fp-speed-menu");speed.toggleClass("wont-fit",++speed.children().length*35>player.height());var item=root.find(".fv-fp-list-menu");item.toggleClass("wont-fit",++item.children().length*25>player.height())}}check_size();jQuery(window).on("resize",check_size);api.on("ready fullscreen fullscreen-exit",check_size);api.on("ready fullscreen fullscreen-exit",function(){setTimeout(function(){buttons_count=root.find(".fp-controls > strong:visible").length+root.find(".fp-controls > .fp-icon:visible").length;check_size()},0)});api.on("unload pause finish error",function(){if(typeof checker!=="undefined")clearInterval(checker)})});jQuery(window).on("resize tabsactivate",function(){jQuery(".fp-playlist-external").each(function(){var playlist=jQuery(this);if(playlist.parent().width()>=900)playlist.addClass("is-wide");else playlist.removeClass("is-wide")})}).trigger("resize");flowplayer(function(api,root){api.bind("ready",function(){if(/Chrome/.test(navigator.userAgent)&&parseFloat(/Chrome\/(\d\d)/.exec(navigator.userAgent)[1],10)>54){if(api.video.subtitles){jQuery(root).addClass("chrome55fix-subtitles")}else{jQuery(root).addClass("chrome55fix")}}});root=jQuery(root);var image_src=root.css("background-image");if(image_src){image_src=image_src.replace(/url\((['"])?(.*?)\1\)/gi,"$2").split(",");if(!image_src||!image_src[0].match(/^(https?:)?\/\//))return;var image=new Image;image.src=image_src[0];var image_ratio=image.height/image.width;var player_ratio=root.height()/root.width();var ratio_diff=Math.abs(player_ratio-image_ratio);if(ratio_diff<.05){root.css("background-size","cover")}}});(function($){$(window).on("resize",function(){var iframe=$("iframe[id][src][height][width]");iframe.each(function(){if($(this).attr("id").match(/(fv_vimeo_)|(fv_ytplayer_)/)&&$(this).width()<=$(this).attr("width"))$(this).height($(this).width()*$(this).attr("height")/$(this).attr("width"))});var wistia=jQuery(".wistia_embed");wistia.each(function(){$(this).height($(this).width()*$(this).data("ratio"))})}).trigger("resize")})(jQuery);jQuery(document).on("tabsactivate",".fv_flowplayer_tabs_content",function(event,ui){var oldPlayer=jQuery(".flowplayer.is-playing").data("flowplayer");if(typeof oldPlayer!="undefined"){oldPlayer.pause()}var objPlayer=jQuery(".flowplayer",ui.newPanel);var api=objPlayer.data("flowplayer");api.load()});flowplayer(function(api,root){root=jQuery(root);var bean=flowplayer.bean;if(root.hasClass("is-audio")){bean.off(root[0],"mouseenter");bean.off(root[0],"mouseleave");root.removeClass("is-mouseout");root.addClass("fixed-controls").addClass("is-mouseover");api.on("error",function(e,api,error){jQuery(".fp-message",root).html(jQuery(".fp-message",root).html().replace(/video/,"audio"))});root.click(function(e){if(!api.ready){e.preventDefault();e.stopPropagation();api.load()}})}});jQuery(document).on("mfpClose",function(){if(typeof jQuery(".flowplayer").data("flowplayer")!="undefined")jQuery(".flowplayer").data("flowplayer").unload()});jQuery(document).on("click",".vc_tta-tab a",function(){var api=jQuery(".flowplayer.is-playing").data("flowplayer");if(api)api.pause()});flowplayer(function(api,root){api.bind("ready",function(){setTimeout(function(){var video=jQuery("video",root);if(video.length>0){video.removeAttr("autoplay")}},100)})});jQuery(".flowplayer").on("ready",function(e,api){if(/BB10/.test(navigator.userAgent)){api.fullscreen()}});var fv_flowplayer_safety_resize_arr=Array();function fv_flowplayer_safety_resize(){var fv_flowplayer_safety_resize_init=false;jQuery(".flowplayer").each(function(){if(!jQuery(this).is(":visible")||jQuery(this).hasClass("lightboxed")||jQuery(this).hasClass("lightbox-starter")||jQuery(this).hasClass("is-audio"))return;if(jQuery(this).width()<30||jQuery(this).height()<20){fv_flowplayer_safety_resize_init=true;var el=jQuery(this);while(jQuery(el).width()<30||jQuery(el).width()==jQuery(this).width()){if(jQuery(el).parent().length==0)break;el=jQuery(el).parent()}jQuery(this).width(jQuery(el).width());jQuery(this).height(parseInt(jQuery(this).width()*jQuery(this).attr("data-ratio")));fv_flowplayer_safety_resize_arr[jQuery(this).attr("id")]=el}});if(fv_flowplayer_safety_resize_init){jQuery(window).resize(function(){jQuery(".flowplayer").each(function(){if(jQuery(this).hasClass("lightboxed")||jQuery(this).hasClass("lightbox-starter"))return;if(fv_flowplayer_safety_resize_arr[jQuery(this).attr("id")]){jQuery(this).width(fv_flowplayer_safety_resize_arr[jQuery(this).attr("id")].width());jQuery(this).height(parseInt(jQuery(this).width()*jQuery(this).attr("data-ratio")))}})})}}if(typeof flowplayer.conf.safety_resize!="undefined"&&flowplayer.conf.safety_resize){jQuery(document).ready(function(){setTimeout(function(){fv_flowplayer_safety_resize()},10)})}var isIE11=!!navigator.userAgent.match(/Trident.*rv[ :]*11\./);if(isIE11){jQuery(document).ready(function(){jQuery(".fp-waiting").hide()});flowplayer(function(api,root){api.bind("load",function(e){jQuery(e.currentTarget).find(".fp-waiting").show()}).bind("beforeseek",function(e){jQuery(e.currentTarget).find(".fp-waiting").show()}).bind("progress",function(e){jQuery(e.currentTarget).find(".fp-waiting").hide()}).bind("seek",function(e){jQuery(e.currentTarget).find(".fp-waiting").hide()}).bind("fullscreen",function(e){jQuery("#wpadminbar").hide()}).bind("fullscreen-exit",function(e){jQuery("#wpadminbar").show()})})}if(flowplayer.support.browser&&flowplayer.support.browser.msie&&parseInt(flowplayer.support.browser.version,10)<9){jQuery(".flowplayer").each(function(){jQuery(this).css("width",jQuery(this).css("max-width"));jQuery(this).css("height",jQuery(this).css("max-height"))})}if(location.href.match(/elementor-preview=/)){console.log("FV Player: Elementor editor is active");setInterval(fv_player_load,1e3)}flowplayer(function(player,root){root=jQuery(root);if(typeof root.data("fv-embed")=="undefined"||!root.data("fv-embed")||root.data("fv-embed")=="false")return;player.embedCode=function(){var video=player.video;var width=root.width();var height=root.height();height+=2;if(root.hasClass("has-chapters")||root.hasClass("has-transcript")){height+=300}if(jQuery(".fp-playlist-external[rel="+root.attr("id")+"]").length>0){height+=150+20}var link=root.data("fv-embed")+"#"+fv_player_get_video_link_hash(player);return'<iframe src="'+link+'" allowfullscreen width="'+width+'" height="'+height+'" frameborder="0" style="max-width:100%"></iframe>'}});jQuery(document).on("click",".flowplayer .embed-code-toggle",function(){var button=jQuery(this);var player=button.parents(".flowplayer");var api=player.data("flowplayer");if(typeof api.embedCode=="function"){player.find(".embed-code textarea").val(api.embedCode())}fv_player_clipboard(player.find(".embed-code textarea").val(),function(){fv_player_notice(player,fv_flowplayer_translations.embed_copied,2e3)},function(){button.parents(".fvp-share-bar").find(".embed-code").toggle();button.parents(".fvp-share-bar").toggleClass("visible")});return false});flowplayer(function(player,root){if(!support.fullscreen&&player.conf.native_fullscreen&&typeof common.createElement("video").webkitEnterFullScreen==="function"){return}var FS_ENTER="fullscreen",FS_EXIT="fullscreen-exit",FS_SUPPORT=flowplayer.support.fullscreen,win=window,scrollX,scrollY;player.fullscreen=function(flag){var wrapper=jQuery(root).find(".fp-player")[0];if(player.disabled)return;if(flag===undefined)flag=!player.isFullscreen;if(flag){scrollY=win.scrollY;scrollX=win.scrollX}if(FS_SUPPORT){if(flag){["requestFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].forEach(function(fName){if(typeof wrapper[fName]==="function"){wrapper[fName]({navigationUI:"hide"});if(fName==="webkitRequestFullScreen"&&!document.webkitFullscreenElement){wrapper[fName]()}}})}else{["exitFullscreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].forEach(function(fName){if(typeof document[fName]==="function"){document[fName]()}})}}else{player.trigger(flag?FS_ENTER:FS_EXIT,[player])}return player};player.on("fullscreen-exit",function(){win.scrollTo(scrollX,scrollY)})});flowplayer(function(api,root){root=jQuery(root);if(flowplayer.conf.wpadmin||jQuery(root).hasClass("is-audio"))return;var playlist=jQuery(".fp-playlist-external[rel="+root.attr("id")+"]"),fsforce=root.data("fsforce")==true||playlist.hasClass("fp-playlist-season")||playlist.hasClass("fp-playlist-polaroid");if(root.data("fullscreen")==false){return}if(flowplayer.conf.mobile_force_fullscreen&&flowplayer.support.fvmobile||!flowplayer.support.fullscreen&&fsforce){if(!flowplayer.support.fullscreen){api.bind("ready",function(){api.fullscreen(true)})}root.on("click",function(){if(!api.ready||api.paused)api.fullscreen(true)});jQuery("[rel="+root.attr("id")+"] a").on("click",function(e){if(!api.isFullscreen){api.fullscreen();api.resume()}});api.on("resume",function(){if(!api.isFullscreen)api.fullscreen()});api.on("finish",function(){if(api.conf.playlist.length==0||api.conf.playlist.length-1==api.video.index)api.fullscreen(false)}).on("fullscreen",function(a,api){root.addClass("forced-fullscreen")}).on("fullscreen-exit",function(a,api){api.pause();root.removeClass("forced-fullscreen")})}else if(fsforce){var position,unload=root.find(".fp-unload"),is_closing=false;api.isFakeFullscreen=false;unload.show();root.on("click",function(e){if(!api.ready&&e.target!=unload[0])api.fakeFullscreen(true)});unload.on("click",function(e){if(api.ready){api.fullscreen(false)}else if(api.loading){is_closing=true;api.one("resume",function(e){is_closing=false;api.pause()})}api.fakeFullscreen(false);return false});jQuery("[rel="+root.attr("id")+"] a").on("click",function(e){if(!api.isFakeFullscreen){api.fakeFullscreen();api.resume()}});api.on("resume",function(){if(!is_closing&&!api.isFakeFullscreen)api.fakeFullscreen()}).on("finish",function(){if(api.conf.playlist.length==0||api.conf.playlist.length-1==api.video.index)api.fakeFullscreen(false)}).on("fullscreen",function(a,api){root.removeClass("fake-fullscreen")}).on("fullscreen-exit",function(a,api){if(api.isFakeFullscreen)api.fakeFullscreen(true,true)}).on("unload",function(a,api){});api.fakeFullscreen=function(flag,force){if(!force&&(api.isFakeFullscreen==flag||api.disabled))return;if(position===undefined)position=root.css("position");if(flag===undefined)flag=!api.isFakeFullscreen;api.isFakeFullscreen=flag;api.trigger(flag?"fakefullscreen":"fakefullscreen-exit",[api]);root.toggleClass("is-fullscreen fake-fullscreen forced-fullscreen",flag);if(flag){root.css("position","fixed")}else{root.css("position",position)}}}if(flowplayer.support.android&&flowplayer.conf.mobile_landscape_fullscreen){api.on("fullscreen",function(a,api){screen.orientation.lock("landscape-primary")})}});flowplayer(function(api,root){root=jQuery(root);var hlsjs,player,audioUXGroup,audioGroups,hls_audio_button,hls_audio_menu,mse=window.MediaSource||window.WebKitMediaSource;flowplayer.engine("hlsjs-lite").plugin(function(params){hlsjs=params.hls});api.bind("ready",function(e,api){removeAudioMenu();if(hlsjs&&api.video.type=="application/x-mpegurl"){parseAudioTracksHlsJs(hlsjs);createAudioMenu()}});api.one("progress",function(){if(api.engine.engineName=="html5"&&api.video.type=="application/x-mpegurl"){parseAudioTracksSafari();createAudioMenu()}});function getVideoTagAudioTracks(){var video=root.find("video");if(video.length&&video[0].audioTracks){return video[0].audioTracks}return[]}function hilightAudioTrack(audioTrack){if(!audioTrack.name)audioTrack.name=audioTrack.label;root.find(".fv-fp-hls-menu a").each(function(k,el){jQuery(el).toggleClass("fp-selected",jQuery(el).attr("data-audio")===audioTrack.name)})}function createAudioMenu(){if(!audioUXGroup||audioUXGroup.length<2){return}hls_audio_button=jQuery('<strong class="fv-fp-hls">AUD</strong>');hls_audio_menu=jQuery('<div class="fp-menu fv-fp-hls-menu"></div>').insertAfter(root.find(".fp-controls"));hls_audio_menu.append("<strong>Audio</strong>");audioUXGroup.forEach(function(audioTrack){hls_audio_menu.append('<a data-audio="'+audioTrack.name+'">'+audioTrack.name+"</a>")});hls_audio_button.insertAfter(root.find(".fp-controls .fp-volume")).click(function(e){e.preventDefault();e.stopPropagation();if(hls_audio_menu.hasClass("fp-active")){api.hideMenu(hls_audio_menu[0])}else{root.click();api.showMenu(hls_audio_menu[0])}});jQuery("a",hls_audio_menu).click(function(e){var adata=e.target.getAttribute("data-audio");if(hlsjs){var gid=hlsjs.audioTracks[hlsjs.audioTrack].groupId;var atrack=hlsjs.audioTracks.filter(function(at){return at.groupId===gid&&(at.name===adata||at.lang===adata)})[0];hlsjs.audioTrack=atrack.id;hilightAudioTrack(atrack)}else{var tracks=getVideoTagAudioTracks();for(var i in tracks){if(!tracks.hasOwnProperty(i))continue;if(tracks[i].label==adata){tracks[i].enabled=true;hilightAudioTrack(tracks[i])}}}});if(hlsjs){hilightAudioTrack(hlsjs.audioTracks[hlsjs.audioTrack])}else{var tracks=getVideoTagAudioTracks();for(var i in tracks){if(!tracks.hasOwnProperty(i))continue;if(tracks[i].enabled){hilightAudioTrack(tracks[i])}}}}function removeAudioMenu(){jQuery(hls_audio_menu).remove();jQuery(hls_audio_button).remove()}function parseAudioTracksHlsJs(data){audioGroups=[];audioUXGroup=[];data.levels.forEach(function(level){var agroup=level.attrs.AUDIO;if(agroup&&audioGroups.indexOf(agroup)<0){audioGroups.push(agroup)}if(audioGroups.length){audioUXGroup=data.audioTracks.filter(function(audioTrack){return audioTrack.groupId===audioGroups[0]})}})}function parseAudioTracksSafari(){audioGroups=[];audioUXGroup=[];var tracks=getVideoTagAudioTracks();for(var i in tracks){if(!tracks.hasOwnProperty(i))continue;audioUXGroup.push({id:tracks[i].id,name:tracks[i].label})}}});flowplayer(function(api,root){var store_engine_pos=-1;var store_engine=false;api.on("error",function(e,api,err){if(err.code!=4||api.engine.engineName!="hlsjs")return;console.log("FV Player: HLSJS failed to play the video, switching to Flash HLS");api.error=api.loading=false;jQuery(root).removeClass("is-error");jQuery(flowplayer.engines).each(function(k,v){if(flowplayer.engines[k].engineName=="hlsjs"){store_engine_pos=k;store_engine=flowplayer.engines[k];delete flowplayer.engines[k]}});var index=typeof api.video.index!="undefined"?api.video.index:0;var video=index>0?api.conf.playlist[index].sources:api.conf.clip.sources;video.index=index;api.load({sources:video});api.bind("unload error",function(){flowplayer.engines[store_engine_pos]=store_engine})})});flowplayer(function(api,root){var initialDelay=30,continueDelay=10,useDelay=initialDelay,retryLabel=fv_flowplayer_translations.live_stream_retry,timer;api.clearLiveStreamCountdown=function(){if(timer){clearInterval(timer);api.error=api.loading=false;jQuery(root).removeClass("is-error");jQuery(root).find(".fp-message.fp-shown").remove();api.unload()}};api.conf.flashls={manifestloadmaxretry:2};api.on("ready",function(){useDelay=initialDelay;retryLabel=fv_flowplayer_translations.live_stream_retry}).on("progress",function(){useDelay=continueDelay;retryLabel=fv_flowplayer_translations.live_stream_continue});api.on("error",function(e,api,err){setTimeout(function(){if(!api.conf.clip.live&&!api.conf.live&&!(err.video&&err.video.src.match(/\/\/vimeo.com\/event\//)))return;var delay=useDelay;if(api.conf.clip.streaming_time){delay=api.conf.clip.streaming_time-Math.floor(Date.now()/1e3)}else if(api.conf.clip.live_starts_in){delay=api.conf.clip.live_starts_in}var startLabel=fv_flowplayer_translations.live_stream_starting.replace(/%d/,secondsToDhms(delay));retryLabel=retryLabel.replace(/%d/,secondsToDhms(delay));var message=api.conf.clip.live_starts_in?startLabel:retryLabel;clearInterval(timer);if(err.code===1||err.code===2||err.code===4){root.className+=" is-offline";if(flowplayer.support.flashVideo){api.one("flashdisabled",function(){root.querySelector(".fp-flash-disabled").style.display="none"})}var messageElement=root.querySelector(".fp-ui .fp-message");messageElement.innerHTML=message;var reload_delay=delay>300?300:delay;timer=setInterval(function(){reload_delay-=1;delay-=1;if(reload_delay>0&&messageElement){messageElement.querySelector("span").innerHTML=secondsToDhms(delay)}else{clearInterval(timer);api.error=api.loading=false;if(messageElement){root.querySelector(".fp-ui").removeChild(messageElement)}root.className=root.className.replace(/\bis-(error|offline)\b/g,"");api.load()}},1e3)}},1)});function secondsToDhms(seconds){seconds=Number(seconds);var d=Math.floor(seconds/(3600*24));var h=Math.floor(seconds%(3600*24)/3600);var m=Math.floor(seconds%3600/60);var s=Math.floor(seconds%60);var t=fv_flowplayer_translations;var output=d>0?d==1?t.duration_1_day.replace(/%s/,d):t.duration_n_days.replace(/%s/,d):"";if(output&&h>0)output+=", ";output+=h>0?h==1?t.duration_1_hour.replace(/%s/,h):t.duration_n_hours.replace(/%s/,h):"";if(output&&m>0)output+=", ";output+=m>0?m==1?t.duration_1_minute.replace(/%s/,m):t.duration_n_minutes.replace(/%s/,m):"";if(output&&s>0)output+=t.and;output+=s>0?s==1?t.duration_1_second.replace(/%s/,s):t.duration_n_seconds.replace(/%s/,s):"";return output}});flowplayer(function(api,root){if(!flowplayer.support.browser.safari&&!flowplayer.support.iOS)return;root=jQuery(root);var video_tag=false,did_start_playing=false,are_waiting_already=0;api.on("ready",function(){are_waiting_already=0;did_start_playing=false;if(api.engine.engineName=="html5"){video_tag=root.find("video");if(!video_tag.data("fv-ios-recovery")){video_tag.on("waiting",wait_for_stalled);video_tag.data("fv-ios-recovery",true)}api.one("progress",function(){did_start_playing=true})}});api.bind("beforeseek",function(){if(did_start_playing){wait_for_stalled()}});function debug(e){console.log("FV PLayer: iOS video element: "+e.type)}function wait_for_stalled(){if(video_tag&&api.engine.engineName=="html5"){are_waiting_already++;if(are_waiting_already>1){if(are_waiting_already>3){console.log("FV PLayer: iOS video element needs a push, triggering 'stalled'");video_tag.trigger("stalled")}return}console.log("FV PLayer: iOS video element will trigger error after 'stalled' arrives");video_tag.one("stalled",function(){var time=api.video.time;if(api.video.type.match(/video\//)){console.log("FV PLayer: running Ajax check of video file...");jQuery.ajax({type:"HEAD",url:api.video.src,success:function(message,text,response){are_waiting_already=0},error:function(){if(are_waiting_already>0){api.trigger("error",[api,{code:4,video:api.video}])}}});return}setTimeout(function(){console.log(api.video.time,time);if(api.video.time!=time){console.log("FV PLayer: iOS video element continues playing, no need for error");return}if(api.paused){console.log("FV PLayer: iOS video element paused, no need for error");return}api.trigger("error",[api,{code:4,video:api.video}])},5e3)})}}});!function(e){var n=!1;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var o=window.Cookies,t=window.Cookies=e();t.noConflict=function(){return window.Cookies=o,t}}}(function(){function e(){for(var e=0,n={};e<arguments.length;e++){var o=arguments[e];for(var t in o)n[t]=o[t]}return n}function n(o){function t(n,r,i){var c;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(i=e({path:"/"},t.defaults,i)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(r),/^[\{\[]/.test(c)&&(r=c)}catch(e){}r=o.write?o.write(r,n):encodeURIComponent(r+"").replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=(n=(n=encodeURIComponent(n+"")).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var s="";for(var f in i)i[f]&&(s+="; "+f,!0!==i[f]&&(s+="="+i[f]));return document.cookie=n+"="+r+s}n||(c={});for(var p=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,u=0;u<p.length;u++){var l=p[u].split("="),C=l.slice(1).join("=");this.json||'"'!==C.charAt(0)||(C=C.slice(1,-1));try{var m=l[0].replace(d,decodeURIComponent);if(C=o.read?o.read(C,m):o(C,m)||C.replace(d,decodeURIComponent),this.json)try{C=JSON.parse(C)}catch(e){}if(n===m){c=C;break}n||(c[m]=C)}catch(e){}}return c}}return t.set=t,t.get=function(e){return t.call(t,e)},t.getJSON=function(){return t.apply({json:!0},[].slice.call(arguments))},t.defaults={},t.remove=function(n,o){t(n,"",e(o,{expires:-1}))},t.withConverter=n,t}return n(function(){})});flowplayer.bean.off(document,"keydown.fp");flowplayer(function(api,root){var bean=flowplayer.bean;if(!api.conf.keyboard)return;bean.on(root,"mouseenter mouseleave",function(e){fv_player_focused=!api.disabled&&e.type=="mouseover"?api:0;if(fv_player_focused)fv_player_focusedRoot=root});api.bind("ready",function(e,api,video){if(video.subtitles&&video.subtitles.length>0){var help=jQuery(root).find(".fp-help").html();help+='<div class="fp-help-section fp-help-subtitles"><p><em>c</em>cycle through subtitles</p></div>';jQuery(root).find(".fp-help").html(help)}else{jQuery(root).find(".fp-help-subtitles").remove()}})});flowplayer.bean.on(document,"keydown.fp",function(e){if(typeof fv_player_focused=="undefined")return;var api=fv_player_focused,focusedRoot=api?fv_player_focusedRoot:false,common=flowplayer.common;var el=api&&!api.disabled?api:0,metaKeyPressed=e.ctrlKey||e.metaKey||e.altKey,key=e.which,conf=el&&el.conf;if(common.hasClass(focusedRoot,"no-controlbar")||common.hasClass(focusedRoot,"is-cva"))return;if(!el||!conf.keyboard||el.disabled)return;if([63,187,191].indexOf(key)!=-1){common.toggleClass(focusedRoot,"is-help");return false}if(key==27&&common.hasClass(focusedRoot,"is-help")){common.toggleClass(focusedRoot,"is-help");return false}if(!metaKeyPressed&&el.ready){e.preventDefault();if(e.shiftKey){if(key==39)el.speed(true);else if(key==37)el.speed(false);else if(key==78)el.next();else if(key==80)el.prev();return}if(key<58&&key>47)return el.seekTo(key-48);switch(key){case 38:case 75:el.volume(el.volumeLevel+.15);break;case 40:case 74:el.volume(el.volumeLevel-.15);break;case 39:case 76:el.seeking=true;el.seek(api.video.time+5);break;case 37:case 72:el.seeking=true;el.seek(api.video.time-5);break;case 190:el.seekTo();break;case 32:el.toggle();break;case 70:if(conf.fullscreen)el.fullscreen();break;case 77:el.mute();break;case 81:el.unload();break;case 67:if(!api.video.subtitles||api.video.subtitles.length==0)break;var current_subtitles=jQuery(focusedRoot).find(".fp-dropdown li.active[data-subtitle-index]").data("subtitle-index");if(typeof current_subtitles=="undefined")current_subtitles=-1;current_subtitles++;if(current_subtitles>api.video.subtitles.length-1){current_subtitles=-1}api.trigger("fv-subtitles-switched");if(current_subtitles>-1){el.loadSubtitles(current_subtitles);fv_player_notice(focusedRoot,fv_flowplayer_translations.subtitles_switched+" "+api.video.subtitles[current_subtitles].label,"fv-subtitles-switched")}else{el.disableSubtitles();fv_player_notice(focusedRoot,fv_flowplayer_translations.subtitles_disabled,"fv-subtitles-switched")}break}}});flowplayer(function(api,root){api.bind("load",function(e,api,data){var player=jQuery(e.currentTarget);if(player.data("live")){var live_check=setTimeout(function(){player.find(".fp-ui").append('<div class="fp-message">'+fv_flowplayer_translations.live_stream_failed+"</div>");player.addClass("is-error")},1e4);jQuery(e.currentTarget).data("live_check",live_check)}}).bind("ready",function(e,api,data){clearInterval(jQuery(e.currentTarget).data("live_check"))}).bind("error",function(e,api,data){var player=jQuery(e.currentTarget);if(player.data("live")){player.find(".fp-message").html(fv_flowplayer_translations.live_stream_failed_2)}})});(function($){flowplayer(function(api,root){if(jQuery(root).hasClass("is-cva"))return;$(document).on("submit","#"+jQuery(root).attr("id")+" .mailchimp-form",function(e){e.preventDefault();$(".mailchimp-response",root).remove();$("input[type=submit]",root).attr("disabled","disabled").addClass("fv-form-loading");var data={action:"fv_wp_flowplayer_email_signup"};$("[name]",this).each(function(){data[this.name]=$(this).val()});$.post(fv_fp_ajaxurl,data,function(response){response=JSON.parse(response);$('<div class="mailchimp-response"></div>').insertAfter(".mailchimp-form",root);if(response.text.match(/already subscribed/)){response.status="ERROR"}if(response.status==="OK"){$(".mailchimp-form input[type=text],.mailchimp-form input[type=email]",root).val("");$(".mailchimp-response",root).removeClass("is-fv-error").html(response.text);setTimeout(function(){$(".wpfp_custom_popup",root).fadeOut()},2e3)}else{$(".mailchimp-response",root).addClass("is-fv-error").html(response.text)}$("input[type=submit]",root).removeAttr("disabled").removeClass("fv-form-loading")})})})})(jQuery);function fv_flowplayer_mobile_switch(id){var regex=new RegExp("[\\?&]fv_flowplayer_mobile=([^&#]*)");var results=regex.exec(location.search);if((results!=null&&results[1]=="yes"||(jQuery(window).width()<=480||jQuery(window).height()<=480))&&(results==null||results[1]!="no")){var fv_fp_mobile=false;jQuery("#wpfp_"+id+" video source").each(function(){if(jQuery(this).attr("id")!="wpfp_"+id+"_mobile"){fv_fp_mobile=true;jQuery(this).remove()}});if(fv_fp_mobile){jQuery("#wpfp_"+id).after('<p class="fv-flowplayer-mobile-switch">'+fv_flowplayer_translations.mobile_browser_detected_1+' <a href="'+document.URL+'?fv_flowplayer_mobile=no">'+fv_flowplayer_translations.mobile_browser_detected_2+"</a>.</p>")}}}if(typeof fv_flowplayer_mobile_switch_array!="undefined"){for(var i in fv_flowplayer_mobile_switch_array){if(!fv_flowplayer_mobile_switch_array.hasOwnProperty(i))continue;fv_flowplayer_mobile_switch(i)}}flowplayer(function(api,root){root=jQuery(root);var instance_id=root.data("flowplayer-instance-id");flowplayer.audible_instance=-1;api.one("load",function(){setTimeout(function(){api.conf.splash=false},0)});api.on("ready",function(){var is_muted=root.data("volume")==0;jQuery(".flowplayer[data-flowplayer-instance-id]").each(function(){var player=jQuery(this).data("flowplayer");var current_instance_id=root.data("flowplayer-instance-id");if(current_instance_id==flowplayer.audible_instance)return;if(player){if(player.playing){if(api.conf.multiple_playback&&!is_muted){player.mute(true,rue)}else{player.pause()}}else{player.clearLiveStreamCountdown();player.unload()}}});flowplayer.audible_instance=instance_id}).on("mute",function(e,api,muted){if(!muted&&flowplayer.audible_instance!=instance_id){flowplayer(flowplayer.audible_instance).mute(true,true);flowplayer.audible_instance=instance_id}}).on("resume",function(){if(!api.conf.multiple_playback){jQuery(".flowplayer[data-flowplayer-instance-id]").each(function(){if(instance_id==jQuery(this).data("flowplayer-instance-id"))return;var player=jQuery(this).data("flowplayer");if(player&&player.playing){player.pause()}})}})});function fv_flowplayer_browser_ff_m4v(hash){if(flowplayer.support.browser&&flowplayer.support.browser.mozilla&&navigator.appVersion.indexOf("Win")!=-1){jQuery("#wpfp_"+hash).attr("data-engine","flash")}}if(typeof fv_flowplayer_browser_ff_m4v_array!="undefined"){for(var i in fv_flowplayer_browser_ff_m4v_array){if(!fv_flowplayer_browser_ff_m4v_array.hasOwnProperty(i))continue;fv_flowplayer_browser_ff_m4v(i)}}function fv_flowplayer_browser_chrome_fail(hash,sAttributes,sVideo,bAutobuffer){jQuery("#wpfp_"+hash).bind("error",function(e,api,error){if(/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&error!=null&&(error.code==3||error.code==4||error.code==5)){api.unload();jQuery("#wpfp_"+hash).attr("id","bad_wpfp_"+hash);jQuery("#bad_wpfp_"+hash).after('<div id="wpfp_'+hash+'" '+sAttributes+' data-engine="flash"></div>');jQuery("#wpfp_"+hash).flowplayer({playlist:[[{mp4:sVideo}]]});if(bAutobuffer){jQuery("#wpfp_"+hash).bind("ready",function(e,api){api.play()})}else{jQuery("#wpfp_"+hash).flowplayer().play(0)}jQuery("#bad_wpfp_"+hash).remove()}})}if(typeof fv_flowplayer_browser_chrome_fail_array!="undefined"){for(var i in fv_flowplayer_browser_chrome_fail_array){if(!fv_flowplayer_browser_chrome_fail_array.hasOwnProperty(i))continue;fv_flowplayer_browser_chrome_fail(i,fv_flowplayer_browser_chrome_fail_array[i]["attrs"],fv_flowplayer_browser_chrome_fail_array[i]["mp4"],fv_flowplayer_browser_chrome_fail_array[i]["auto_buffer"])}}function fv_flowplayer_browser_ie(hash){if(flowplayer.support.browser&&flowplayer.support.browser.msie&&parseInt(flowplayer.support.browser.version,10)>=9||!!navigator.userAgent.match(/Trident.*rv[ :]*11\./)){jQuery("#wpfp_"+hash).attr("data-engine","flash")}}if(typeof fv_flowplayer_browser_ie_array!="undefined"){for(var i in fv_flowplayer_browser_ie_array){if(!fv_flowplayer_browser_ie_array.hasOwnProperty(i))continue;fv_flowplayer_browser_ie(i)}}function fv_flowplayer_browser_chrome_mp4(hash){var match=window.navigator.appVersion.match(/Chrome\/(\d+)\./);if(match!=null){var chrome_ver=parseInt(match[1],10);if(/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&chrome_ver<28&&navigator.appVersion.indexOf("Win")!=-1||/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&chrome_ver<27&&navigator.appVersion.indexOf("Linux")!=-1&&navigator.userAgent.toLowerCase().indexOf("android")==-1){jQuery("#wpfp_"+hash).attr("data-engine","flash")}}}if(navigator.platform.indexOf("iPhone")!=-1||navigator.platform.indexOf("iPod")!=-1||navigator.platform.indexOf("iPad")!=-1||navigator.userAgent.toLowerCase().indexOf("android")!=-1){flowplayer(function(api,root){api.bind("error",function(e,api,error){if(error.code==10){jQuery(e.target).find(".fp-message").html(fv_flowplayer_translations.unsupported_format)}})})}jQuery(document).ready(function(){if(navigator.platform.indexOf("iPhone")!=-1||navigator.platform.indexOf("iPod")!=-1||navigator.platform.indexOf("iPad")!=-1){jQuery(window).trigger("load")}jQuery(".flowplayer").mouseleave(function(){jQuery(this).find(".fvp-share-bar").removeClass("visible");jQuery(this).find(".embed-code").hide()})});if(!Date.now){Date.now=function(){return(new Date).getTime()}}(function($){var sendPositionsEvery=60,ajaxCall=null,maxCookieSize=2500,localStorageEnabled=null,cookieKeyName="video_positions",tempPositionCookieKeyName="video_positions_tmp",tempSawCookieKeyName="video_saw_tmp",playPositions=[],sawVideo=[],getSerialized=function(data){var serialized=JSON.stringify(data),dataSize=getTextByteSize(serialized);if(dataSize>maxCookieSize){while(dataSize>maxCookieSize){for(var i in data){if(!data.hasOwnProperty(i))continue;delete data[i];serialized=JSON.stringify(data);dataSize=getTextByteSize(serialized);break}}}return serialized},getVideoId=function(video){if(video.id){return video.id}var out=typeof video.sources_original!="undefined"&&typeof video.sources_original[0]!="undefined"?video.sources_original[0].src:video.sources[0].src;if(typeof video.sources_original=="undefined"||typeof video.sources_original[0]=="undefined"){out=removeAWSSignatures(out)}return out},getTextByteSize=function(txt){return encodeURIComponent(txt).length},getCookieKey=function(key){return localStorageEnabled?localStorage.getItem(key):Cookies.get(key)},setCookieKey=function(key,value){return localStorageEnabled?localStorage.setItem(key,value):Cookies.set(key,value)},removeCookieKey=function(key){if(localStorageEnabled){localStorage.removeItem(key)}{Cookies.remove(key)}},removeVideoPosition=function(e,api){if(api.video.sources){var video_id=getVideoId(api.video);playPositions[video_id]=0;sawVideo[video_id]=1}},removeAWSSignatures=function(videoURL){return videoURL.replace(/(X-Amz-Algorithm=[^&]+&?)/gm,"").replace(/(X-Amz-Credential=[^&]+&?)/gm,"").replace(/(X-Amz-Date=[^&]+&?)/gm,"").replace(/(X-Amz-Expires=[^&]+&?)/gm,"").replace(/(X-Amz-SignedHeaders=[^&]+&?)/gm,"").replace(/(X-Amz-Signature=[^&]+&?)/gm,"")},sendVideoPositions=function(async,callback){var beaconSupported="sendBeacon"in navigator;if(async!==true){async=false}if(!callback||typeof callback=="undefined"){callback=function(){}}postData=[];for(var video_name in playPositions){if(!playPositions.hasOwnProperty(video_name))continue;postData.push({name:video_name,position:playPositions[video_name],saw:typeof sawVideo[video_name]!="undefined"?sawVideo[video_name]:false})}if(!postData.length){removeCookieKey(tempPositionCookieKeyName);removeCookieKey(tempSawCookieKeyName);return}if(flowplayer.conf.is_logged_in=="1"){if(beaconSupported){try{var temp_position_data={},temp_saw_data={};for(var i in postData){if(!postData.hasOwnProperty(i))continue;temp_position_data[postData[i].name]=postData[i].position;temp_saw_data[postData[i].name]=postData[i].saw}setCookieKey(tempPositionCookieKeyName,getSerialized(temp_position_data));setCookieKey(tempSawCookieKeyName,getSerialized(temp_saw_data))}catch(e){return}var fd=new FormData;fd.append("action","fv_wp_flowplayer_video_position_save");fd.append("videoTimes",encodeURIComponent(JSON.stringify(postData)));navigator.sendBeacon(fv_fp_ajaxurl,fd);return false}else{return jQuery.ajax({type:"POST",async:async,url:fv_fp_ajaxurl,complete:callback,data:{action:"fv_wp_flowplayer_video_position_save",videoTimes:postData}})}}else{try{var data=getCookieKey(cookieKeyName);if(data&&typeof data!=="undefined"){data=JSON.parse(data)}else{data={}}for(var i in postData){if(!postData.hasOwnProperty(i))continue;data[postData[i].name]=postData[i].position}var serialized=JSON.stringify(data),dataSize=getTextByteSize(serialized);if(dataSize>maxCookieSize){while(dataSize>maxCookieSize){for(var i in data){if(!data.hasOwnProperty(i))continue;delete data[i];serialized=JSON.stringify(data);dataSize=getTextByteSize(serialized);break}}}setCookieKey(cookieKeyName,serialized)}catch(e){return}}return false};flowplayer(function(api,root){var $root=jQuery(root),enabled=flowplayer.conf.video_position_save_enable&&$root.data("save-position")!="false"||$root.data("save-position"),progressEventsCount=0,seekIntoPosition=function(e,api){if(api.video&&api.video.live)return;var video_id=getVideoId(api.video),position=api.video.position;if(flowplayer.conf.is_logged_in!="1"){var data=getCookieKey(cookieKeyName);if(data&&typeof data!=="undefined"){try{data=JSON.parse(data);if(data[video_id]){position=data[video_id]}}catch(e){return}}}if(!!api.get_custom_end&&api.get_custom_end()<position){position=false}if(!!api.get_custom_start&&api.get_custom_start()>0){if(position<api.get_custom_start()){position=false}}api.bind("progress",storeVideoPosition);if(position){seek(position)}},storeVideoPosition=function(e,api){if(api.live){return}if(api.video.sources){var video_id=getVideoId(api.video),position=Math.round(api.video.time);playPositions[video_id]=position;if(progressEventsCount++>=sendPositionsEvery&&flowplayer.conf.closingPage){if(ajaxCall){ajaxCall.abort()}ajaxCall=sendVideoPositions(true,function(){ajaxCall=null});progressEventsCount=0}}},forceSavePosition=function(e,api){var inPlaylist=false;for(var i in api.conf.playlist){if(!api.conf.playlist.hasOwnProperty(i))continue;inPlaylist=true;break}if(inPlaylist&&!flowplayer.conf.closingPage){progressEventsCount=sendPositionsEvery+1;storeVideoPosition(e,api);sendVideoPositions()}},seek=function(position){if(!!api.custom_seek){api.custom_seek(position);return}var seek_count=0;var do_seek=setInterval(function(){if(++seek_count>20)clearInterval(do_seek);if(api.loading)return;api.seek(parseInt(position));clearInterval(do_seek)},10)},processTempData=function(temp_data_name,video_id){var data=getCookieKey(temp_data_name),output=false;if(data&&typeof data!=="undefined"){try{data=JSON.parse(data);if(typeof data[video_id]!="undefined"){output=data[video_id];delete data[video_id];var stillHasData=false;for(var i in data){if(!data.hasOwnProperty(i))continue;stillHasData=true;break}if(stillHasData){setCookieKey(temp_data_name,JSON.stringify(data))}else{removeCookieKey(temp_data_name)}}return output}catch(e){}}};if(!enabled)return;api.bind("finish",removeVideoPosition);if(flowplayer.support.fvmobile){api.one("progress",seekIntoPosition)}else{api.bind("ready",seekIntoPosition)}api.playlist_thumbnail_progress=function(el,video,position){if(!!api.get_custom_start&&api.get_custom_start(video)>0){position-=api.get_custom_start(video);if(position<0)position=0}var duration=video.duration;if(!!api.get_custom_duration&&api.get_custom_duration()>0){duration=api.get_custom_duration()}if(!duration){duration=el.data("duration")}if(!duration)return;var progress=100*position/duration;el.css("width",progress+"%")};if(flowplayer.conf.is_logged_in=="1"){var playlist=api.conf.playlist.length>0?api.conf.playlist:[api.conf.clip],playlist_external=jQuery("[rel="+jQuery(root).attr("id")+"]");for(var i in playlist){if(!playlist.hasOwnProperty(i))continue;var video_id=getVideoId(playlist[i]),position=processTempData(tempPositionCookieKeyName,video_id),saw=processTempData(tempSawCookieKeyName,video_id);if(position){if(api.conf.playlist.length){api.conf.playlist[i].sources[0].position=position;var playlist_progress=jQuery("a",playlist_external).eq(i).find(".fvp-progress");if(playlist_progress.length){api.playlist_thumbnail_progress(playlist_progress,api.conf.playlist[i],position)}}else{api.conf.clip.sources[0].position=position}}if(saw){if(api.conf.playlist.length){api.conf.playlist[i].sources[0].saw=true}else{api.conf.clip.sources[0].saw=true}}}}api.bind("finish",function(e,api){if(api.conf.playlist.length){api.conf.playlist[api.video.index].sources[0].saw=true}else{api.conf.clip.sources[0].saw=true}})});jQuery(window).on("beforeunload pagehide",function(){if(!flowplayer.conf.closingPage){flowplayer.conf.closingPage=true;sendVideoPositions()}});if(localStorageEnabled!==null){return localStorageEnabled}localStorageEnabled=true;try{localStorage.setItem("t","t");if(localStorage.getItem("t")!=="t"){localStorageEnabled=false}localStorage.removeItem("t")}catch(e){localStorageEnabled=false}})(jQuery);flowplayer(function(api,root){root=jQuery(root);if(api.conf.playlist.length==0)return;var real_videos=0;jQuery(api.conf.playlist).each(function(k,v){if(typeof v.click=="undefined"){real_videos++}});if(real_videos<2)return;var playlist=jQuery(".fp-playlist-external[rel="+root.attr("id")+"]");var playlist_button=jQuery('<strong class="fv-fp-list">Item 1.</strong>'),playlist_menu=jQuery('<div class="fp-menu fv-fp-list-menu"></div>').insertAfter(root.find(".fp-controls"));var i=0,item_index=[];jQuery(api.conf.playlist).each(function(k,v){if(typeof v.click=="undefined"){playlist_menu.append('<a data-index="'+k+'">'+(i+1)+". "+parse_title(playlist.find("h4").eq(i))+"</a>");item_index.push(k);i++}});playlist_button.insertAfter(root.find(".fp-controls .fp-volume")).click(function(e){e.preventDefault();e.stopPropagation();if(playlist_menu.hasClass("fp-active")){api.hideMenu(playlist_menu[0])}else{root.click();api.showMenu(playlist_menu[0])}});jQuery("a",playlist_menu).click(function(){if(typeof api.conf.playlist[jQuery(this).data("index")-1]!="undefined"&&typeof api.conf.playlist[jQuery(this).data("index")-1].click!="undefined"){api.play(jQuery(this).data("index")-1)}else{api.play(jQuery(this).data("index"))}});api.on("ready",function(e,api,video){playlist_menu.find("a").removeClass("fp-selected");var thumb=playlist_menu.find("a[data-index="+video.index+"]");thumb.addClass("fp-selected");var label=fv_flowplayer_translations.playlist_item_no;label=label.replace(/%d/,item_index.indexOf(api.video.index)+1);label=label.replace(/%s/,parse_title(thumb.find("h4")));playlist_button.html(label)});function parse_title(el){var tmp=el.clone();tmp.find("i.dur").remove();return tmp.text()}});flowplayer(function(api,root){root=jQuery(root);var playlist=api.conf.playlist,videoIndex,videos_attempted=[];api.bind("load",function(e,api,video){videoIndex=video.index;attempted_load(video.index)});api.bind("error",function(e,api,error){setTimeout(function(){if(playlist.length>0&&api.error==true){if(api.conf.video_checker=="1"&&playlist[videoIndex].video_checker&&playlist[videoIndex].video_checker.length>0){return false}var try_video=videoIndex+1;if(videoIndex>=playlist.length-1){try_video=playlist.length-2}api.error=api.loading=false;root.removeClass("is-error");root.find(".fp-message.fp-shown").remove();while(attempted_load(try_video)){try_video++}api.play(try_video)}},1e3)});function attempted_load(index){if(!videos_attempted.includes(index)){videos_attempted.push(index);return false}return true}});flowplayer(function(api,root){root=jQuery(root);var original_prev,original_next,random_seed;if(!root.data("button-no-picture")&&!root.data("button-repeat")&&!root.data("button-rewind"))return;api.bind("ready",function(e,api){if(typeof original_next=="undefined"&&typeof original_prev=="undefined"){original_next=api.next;original_prev=api.prev}if(!api.video.type.match(/^audio/)&&root.data("button-no-picture")&&root.find(".fv-fp-no-picture").length==0){var button_no_picture=jQuery('<span class="fv-fp-no-picture"><svg viewBox="0 0 90 80" width="20px" height="20px" class="fvp-icon fvp-nopicture"><use xlink:href="#fvp-nopicture"></use></svg></span>');button_no_picture.insertAfter(root.find(".fp-controls .fp-volume")).click(function(e){e.preventDefault();e.stopPropagation();jQuery(".fp-engine",root).slideToggle(20);jQuery(this).toggleClass("is-active fp-color-fill")})}if(root.data("button-repeat")){if(api.conf.playlist.length>0&&root.find(".fv-fp-playlist").length==0){var t=fv_flowplayer_translations,playlist_button=jQuery('<strong class="fv-fp-playlist mode-normal"> <svg viewBox="0 0 80.333 80" width="20px" height="20px" class="fvp-icon fvp-replay-list"><title>'+t.playlist_replay_all+'</title><use xlink:href="#fvp-replay-list"></use></svg> <svg viewBox="0 0 80.333 71" width="20px" height="20px" class="fvp-icon fvp-shuffle"><title>'+t.playlist_shuffle+'</title><use xlink:href="#fvp-shuffle"></use></svg> <svg viewBox="0 0 80.333 71" width="20px" height="20px" class="fvp-icon fvp-replay-track"><title>'+t.playlist_replay_video+'</title><use xlink:href="#fvp-replay-track"></use></svg> <span id="fvp-playlist-play" title="'+t.playlist_play_all+'">'+t.playlist_play_all_button+"</span> </strong>"),playlist_menu=jQuery('<div class="fp-menu fv-fp-playlist-menu"> <a data-action="repeat_playlist"><svg viewBox="0 0 80.333 80" width="20px" height="20px" class="fvp-icon fvp-replay-list"><title>'+t.playlist_replay_all+'</title><use xlink:href="#fvp-replay-list"></use></svg> <span class="screen-reader-text">'+t.playlist_replay_all+'</span></a> <a data-action="shuffle_playlist"><svg viewBox="0 0 80.333 71" width="20px" height="20px" class="fvp-icon fvp-shuffle"><title>'+t.playlist_shuffle+'</title><use xlink:href="#fvp-shuffle"></use></svg> <span class="screen-reader-text">'+t.playlist_shuffle+'</span></a> <a data-action="repeat_track"><svg viewBox="0 0 80.333 71" width="20px" height="20px" class="fvp-icon fvp-replay-track"><title>'+t.playlist_replay_video+'</title><use xlink:href="#fvp-replay-track"></use></svg> <span class="screen-reader-text">'+t.playlist_replay_video+'</span></a> <a class="fp-selected" data-action="normal"><span id="fvp-playlist-play" title="'+t.playlist_play_all+'">'+t.playlist_play_all_button+"</span></a> </div>").insertAfter(root.find(".fp-controls"));api.conf.playlist_shuffle=api.conf.track_repeat=false;random_seed=randomize();var should_advance=api.conf.advance;playlist_button.insertAfter(root.find(".fp-controls .fp-volume")).click(function(e){e.preventDefault();e.stopPropagation();if(playlist_menu.css("right")!=="auto"){playlist_menu.css({right:"auto",left:playlist_button.position().left+"px"})}if(playlist_menu.hasClass("fp-active")){api.hideMenu(playlist_menu[0])}else{root.click();api.showMenu(playlist_menu[0])}});jQuery("a",playlist_menu).click(function(){jQuery(this).siblings("a").removeClass("fp-selected");jQuery(this).addClass("fp-selected");playlist_button.removeClass("mode-normal mode-repeat-track mode-repeat-playlist mode-shuffle-playlist");var action=jQuery(this).data("action");if(action=="repeat_playlist"){playlist_button.addClass("mode-repeat-playlist");api.conf.loop=true;api.conf.advance=true;api.video.loop=api.conf.track_repeat=false;api.conf.playlist_shuffle=false}else if(action=="shuffle_playlist"){playlist_button.addClass("mode-shuffle-playlist");api.conf.loop=true;api.conf.advance=true;api.conf.playlist_shuffle=true}else if(action=="repeat_track"){playlist_button.addClass("mode-repeat-track");api.conf.track_repeat=api.video.loop=true;api.conf.loop=api.conf.playlist_shuffle=false}else if(action=="normal"){playlist_button.addClass("mode-normal");api.conf.track_repeat=api.video.loop=false;api.conf.loop=api.conf.playlist_shuffle=false}if(api.conf.playlist_shuffle){api.next=function(){api.play(random_seed.pop());if(random_seed.length==0)random_seed=randomize()};api.prev=function(){api.play(random_seed.shift());if(random_seed.length==0)random_seed=randomize()}}else{api.next=original_next;api.prev=original_prev}});if(api.conf.loop){jQuery("a[data-action=repeat_playlist]",playlist_menu).click()}api.on("progress",function(){api.video.loop=api.conf.track_repeat});api.on("finish.pl",function(e,api){console.log("playlist_repeat",api.conf.loop,"advance",api.conf.advance,"video.loop",api.video.loop);if(api.conf.playlist_shuffle){api.play(random_seed.pop());if(random_seed.length==0)random_seed=randomize()}})}else if(root.find(".fv-fp-track-repeat").length==0&&api.conf.playlist.length==0){var button_track_repeat=jQuery('<strong class="fv-fp-track-repeat"><svg viewBox="0 0 80.333 71" width="20px" height="20px" class="fvp-icon fvp-replay-track"><use xlink:href="#fvp-replay-track"></use></svg></strong>');button_track_repeat.insertAfter(root.find(".fp-controls .fp-volume")).click(function(e){e.preventDefault();e.stopPropagation();jQuery(this).toggleClass("is-active fp-color-fill",api.video.loop);if(api.video.loop){api.video.loop=false}else{api.video.loop=true}});if(api.conf.loop){button_track_repeat.addClass("is-active fp-color-fill")}}}if(root.data("button-rewind")&&root.find(".fv-fp-rewind").length==0){var button_rewind=jQuery('<span class="fv-fp-rewind"><svg viewBox="0 0 24 24" width="24px" height="24px" class="fvp-icon fvp-rewind"><use xlink:href="#fvp-rewind"></use></svg></span>');button_rewind.insertBefore(root.find(".fp-controls .fp-elapsed")).click(function(e){e.preventDefault();e.stopPropagation();api.seek(api.video.time-10)});button_rewind.toggle(!api.video.live)}}).bind("unload",function(){root.find(".fv-fp-no-picture").remove();root.find(".fv-fp-playlist").remove();root.find(".fv-fp-track-repeat").remove()});function array_shuffle(a){var j,x,i;for(i=a.length;i;i--){j=Math.floor(Math.random()*i);x=a[i-1];a[i-1]=a[j];a[j]=x}return a}function randomize(random_seed){random_seed=[];jQuery(api.conf.playlist).each(function(k,v){random_seed.push(k)});random_seed=array_shuffle(random_seed);console.log("FV Player Randomizer random seed:",random_seed);return random_seed}});flowplayer(function(api,root){var $root=jQuery(root),start_index=$root.data("playlist_start");if(typeof start_index=="undefined")return;function start_position_changer(){if($root.data("position_changed")!==1&&api.conf.playlist.length){start_index--;api.play(start_index);$root.data("position_changed",1)}}api.bind("unload",function(){start_index=$root.data("playlist_start");$root.removeData("position_changed");api.one("ready",start_position_changer);api.video.index=0});api.one("ready",start_position_changer);jQuery(".fp-ui",root).on("click",function(){start_position_changer();$root.data("position_changed",1)})});flowplayer(function(api,root){api.bind("finish",function(){var finished_at=api.video.time;if(api.video.loop){api.one("pause",function(){if(finished_at<=api.video.time){api.resume()}})}})});function fv_flowplayer_amazon_s3(hash,time){jQuery("#wpfp_"+hash).bind("error",function(e,api,error){var fv_fp_date=new Date;if(error.code==4&&fv_fp_date.getTime()>fv_fp_utime+parseInt(time)){jQuery(e.target).find(".fp-message").delay(500).queue(function(n){jQuery(this).html(fv_flowplayer_translations.video_expired);n()})}})}flowplayer(function(api,root){root=jQuery(root);root.find(".fp-logo").removeAttr("href");if(root.hasClass("no-controlbar")){var timelineApi=api.sliders.timeline;timelineApi.disable(true);api.bind("ready",function(){timelineApi.disable(true)})}jQuery(".fvfp_admin_error",root).remove();root.find(".fp-logo, .fp-header").click(function(e){if(e.target!==this)return;root.find(".fp-ui").click()});jQuery(".fvp-share-bar .sharing-facebook",root).append('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="#fff"><title>Facebook</title><path d="M11.9 5.2l-2.6 0 0-1.6c0-0.7 0.3-0.7 0.7-0.7 0.3 0 1.6 0 1.6 0l0-2.9 -2.3 0c-2.6 0-3.3 2-3.3 3.3l0 2 -1.6 0 0 2.9 1.6 0c0 3.6 0 7.8 0 7.8l3.3 0c0 0 0-4.2 0-7.8l2.3 0 0.3-2.9Z"/></svg>');jQuery(".fvp-share-bar .sharing-twitter",root).append('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="#fff"><title>Twitter</title><path d="M16 3.1c-0.6 0.3-1.2 0.4-1.9 0.5 0.7-0.4 1.2-1 1.4-1.8 -0.6 0.4-1.3 0.6-2.1 0.8 -0.6-0.6-1.4-1-2.4-1 -2 0.1-3.2 1.6-3.2 4 -2.7-0.1-5.1-1.4-6.7-3.4 -0.9 1.4 0.2 3.8 1 4.4 -0.5 0-1-0.1-1.5-0.4l0 0.1c0 1.6 1.1 2.9 2.6 3.2 -0.7 0.2-1.3 0.1-1.5 0.1 0.4 1.3 1.6 2.2 3 2.3 -1.6 1.7-4.6 1.4-4.8 1.3 1.4 0.9 3.2 1.4 5 1.4 6 0 9.3-5 9.3-9.3 0-0.1 0-0.3 0-0.4 0.6-0.4 1.2-1 1.6-1.7Z"/></svg>');jQuery(".fvp-share-bar .sharing-email",root).append('<svg xmlns="http://www.w3.org/2000/svg" height="16" viewBox="0 0 16 16" width="16" fill="#fff"><title>Email</title><path d="M8 10c0 0 0 0-1 0L0 6v7c0 1 0 1 1 1h14c1 0 1 0 1-1V6L9 10C9 10 8 10 8 10zM15 2H1C0 2 0 2 0 3v1l8 4 8-4V3C16 2 16 2 15 2z"/></svg>');jQuery(".fp-header",root).prepend(jQuery(".fvp-share-bar",root));if(api.conf.playlist.length){var show=true;var playlist=api.conf.playlist;if(playlist.length==2){if(typeof playlist[0].click!="undefined"&&typeof playlist[1].click=="undefined"){show=false}if(typeof playlist[0].click=="undefined"&&typeof playlist[1].click!="undefined"){show=false}}else if(playlist.length==3){if(typeof playlist[0].click!="undefined"&&typeof playlist[1].click=="undefined"&&typeof playlist[2].click!="undefined"){show=false}}if(show){var prev=jQuery('<a class="fp-icon fv-fp-prevbtn"></a>');var next=jQuery('<a class="fp-icon fv-fp-nextbtn"></a>');root.find(".fp-controls .fp-playbtn").before(prev).after(next);prev.click(function(){api.trigger("prev",[api]);api.prev()});next.click(function(){api.trigger("next",[api]);api.next()})}}api.bind("pause resume finish unload ready",function(e,api){root.addClass("no-brand")});api.one("ready",function(){root.find(".fp-fullscreen").clone().appendTo(root.find(".fp-controls"))});api.bind("ready",function(e,api,video){setTimeout(function(){jQuery(".fvp-share-bar",root).show();jQuery(".fv-player-buttons-wrap",root).appendTo(jQuery(".fv-player-buttons-wrap",root).parent().find(".fp-ui"))},100)});api.bind("finish",function(){var url=root.data("fv_redirect");if(url&&(typeof api.video.is_last=="undefined"||api.video.is_last)){location.href=url}});if(flowplayer.support.iOS&&flowplayer.support.iOS.version==11){api.bind("error",function(e,api,error){if(error.code==4)root.find(".fp-engine").hide()})}jQuery(document).on("contextmenu",".flowplayer",function(e){e.preventDefault()});api.one("ready",function(e,api,video){root.find(".fp-chromecast").insertAfter(root.find(".fp-header .fp-fullscreen"))});root.find(".fp-waiting").html('<div class="fp-preload"><b></b><b></b><b></b><b></b></div>');var id=root.attr("id"),alternative=!flowplayer.conf.native_fullscreen&&flowplayer.conf.mobile_alternative_fullscreen,events_enter="fakefullscreen",events_exit="fakefullscreen-exit";if(!flowplayer.support.fullscreen){events_enter+=" fullscreen";events_exit+=" fullscreen-exit"}api.bind(events_enter,function(e,api){jQuery("#wpadminbar, .nc_wrapper").hide();if(alternative||e.type=="fakefullscreen"){if(api.video.type=="video/youtube")return;root.before('<span data-fv-placeholder="'+id+'"></span>');root.appendTo("body")}});api.bind(events_exit,function(e,api,video){jQuery("#wpadminbar, .nc_wrapper").show();if(alternative||e.type=="fakefullscreen-exit"){jQuery("span[data-fv-placeholder="+id+"]").replaceWith(root)}})});(function(){var extension=function(flowplayer){flowplayer(function(api,root){if(!jQuery(root).data("speedb"))return;var support=flowplayer.support;if(!support.video||!support.inlineVideo)return;var common=flowplayer.common,bean=flowplayer.bean,ui=common.find(".fp-ui",root)[0],controlbar=common.find(".fp-controls",ui)[0],speeds=api.conf.speeds;bean.on(root,"click",".fp-speed",function(){var menu=common.find(".fp-speed-menu",root)[0];if(common.hasClass(menu,"fp-active"))api.hideMenu();else api.showMenu(menu)});bean.on(root,"click",".fp-speed-menu a",function(ev){var s=ev.target.getAttribute("data-speed");api.speed(s)});api.on("speed",function(ev,_a,rate){if(speeds.length>1){selectSpeed(rate)}}).on("ready",function(ev,api){removeMenu();if(flowplayer.support.android&&api.engine.engineName=="html5"&&api.video.type=="application/x-mpegurl")return;speeds=api.conf.speeds;if(speeds.length>1){createMenu()}});function removeMenu(){common.find(".fp-speed-menu",root).forEach(common.removeNode);common.find(".fp-speed",root).forEach(common.removeNode)}function round(val){return Math.round(val*100)/100}function createMenu(){controlbar.appendChild(common.createElement("strong",{className:"fp-speed"},api.currentSpeed+"x"));var menu=common.createElement("div",{className:"fp-menu fp-speed-menu",css:{width:"auto"}},"<strong>Speed</strong>");speeds.forEach(function(s){var a=common.createElement("a",{"data-speed":round(s)},round(s)+"x");menu.appendChild(a)});ui.appendChild(menu);selectSpeed(api.currentSpeed);jQuery(root).find(".fp-speed-menu strong").text(fv_flowplayer_translations.speed)}function selectSpeed(rate){common.find(".fp-speed",root)[0].innerHTML=rate+"x";common.find(".fp-speed-menu a",root).forEach(function(el){common.toggleClass(el,"fp-selected",el.getAttribute("data-speed")==rate);common.toggleClass(el,"fp-color",el.getAttribute("data-speed")==rate)})}})};if(typeof module==="object"&&module.exports)module.exports=extension;else if(typeof window.flowplayer==="function")extension(window.flowplayer)})();flowplayer(function(api,root){api.on("speed",function(ev,_a,rate){try{window.localStorage.fv_player_speed=rate}catch(e){}});api.on("ready",function(){if(window.localStorage.fv_player_speed&&jQuery(root).find("strong.fp-speed").is(":visible")){api.speed(parseFloat(window.localStorage.fv_player_speed))}if(jQuery(root).data("volume")==0){api.mute(true,true)}})});flowplayer(function(api,root){root=jQuery(root);if(!api.conf.fv_stats||!api.conf.fv_stats.enabled&&(!root.data("fv_stats")||root.data("fv_stats")=="no"))return;api.on("ready",function(e,api){api.one("progress",function(e,api){if(api.video.id){jQuery.post(api.conf.fv_stats.url,{blog_id:api.conf.fv_stats.blog_id,tag:"play",video_id:api.video.id})}})})});flowplayer(function(api,root){var $root=jQuery(root);var $playerDiv=$root.find(".fp-player");var sticky=$root.data("fvsticky");var globalSticky=false;var videoRatio=$root.data("ratio");if(typeof videoRatio=="undefined"){videoRatio=.5625}if(flowplayer.conf.sticky_video==1&&typeof sticky=="undefined"){globalSticky=true}if(globalSticky||sticky){if(flowplayer.support.firstframe){var stickyPlace=flowplayer.conf.sticky_place;var stickyWidth=flowplayer.conf.sticky_width;if(stickyWidth==""){stickyWidth=380}var stickyHeight=stickyWidth*videoRatio;fv_player_sticky_video()}else{return}}function fv_player_sticky_video(){var change=false;var $window=jQuery(window),$flowplayerDiv=$root,top=$flowplayerDiv.offset().top,offset=Math.floor(top+$flowplayerDiv.outerHeight()/2);api.on("ready",function(){change=true});api.on("progress",function(){change=true});api.on("unload",function(){change=false;fv_player_sticky_class_remove();$root.removeClass("is-unSticky")});$window.on("resize",function(){top=$flowplayerDiv.offset().top;offset=Math.floor(top+$flowplayerDiv.outerHeight()/2)}).on("scroll",function(){top=$flowplayerDiv.offset().top;offset=Math.floor(top+$flowplayerDiv.outerHeight()/2);if($window.scrollTop()>offset&&change){if(jQuery("div.flowplayer.is-unSticky").length>0){console.log("unSticky",jQuery("div.flowplayer.is-unSticky").length);return false}else{fv_player_sticky_class_add()}}else{fv_player_sticky_class_remove();change=false}})}function fv_player_sticky_class_add(){if($playerDiv.hasClass("is-sticky-"+stickyPlace)){return}else{$playerDiv.addClass("is-sticky-"+stickyPlace);if($root.find("a.fp-sticky").length==0){$root.find("div.fp-header").prepend('<a class="fp-sticky fp-icon"></a>')}$playerDiv.css("width",stickyWidth);$playerDiv.css("height",stickyHeight);$playerDiv.css("max-height",stickyHeight)}$playerDiv.parent(".flowplayer").addClass("is-stickable")}function fv_player_sticky_class_remove(){$playerDiv.removeClass("is-sticky-"+stickyPlace);$playerDiv.css("width","");$playerDiv.css("height","");$playerDiv.css("max-height","");$playerDiv.parent(".flowplayer").removeClass("is-stickable")}});jQuery(function($){$(document).on("click","a.fp-sticky",function(){$("div.flowplayer.is-stickable").addClass("is-unSticky");var $playerDiv=$("div.flowplayer.is-stickable").find(".fp-player");$playerDiv.removeClass("is-sticky-right-bottom");$playerDiv.removeClass("is-sticky-left-bottom");$playerDiv.removeClass("is-sticky-right-top");$playerDiv.removeClass("is-sticky-left-top");$playerDiv.css("width","");$playerDiv.css("height","");$playerDiv.css("max-height","")});$(document).on("click","div.flowplayer.is-unSticky",function(){$("div.flowplayer").removeClass("is-unSticky")})});flowplayer(function(api,root){root=jQuery(root);api.on("ready",function(e,api,video){if(window.localStorage.fv_player_subtitle&&root.find("strong.fp-cc").is(":visible")){if(api.video.subtitles.length){api.video.subtitles.forEach(function(item,index){if(item.srclang===window.localStorage.fv_player_subtitle){api.loadSubtitles(index)}})}}root.find(".fp-subtitle-menu").click(function(e){if(typeof e.target.getAttribute("data-subtitle-index")=="string"&&e.target.getAttribute("data-subtitle-index").length){try{window.localStorage.fv_player_subtitle=api.video.subtitles[e.target.getAttribute("data-subtitle-index")].srclang}catch(e){}}})})});flowplayer(function(api,root){root=jQuery(root);var currentPoint,check=false;api.bind("cuepoint",function(e,api,cue){check=false;if(cue.subtitle){currentPoint=cue.index}});api.on("ready",function(e,api){root.find(".fp-subtitle-menu strong").text(fv_flowplayer_translations.closed_captions);root.find('.fp-subtitle-menu a[data-subtitle-index="-1"]').text(fv_flowplayer_translations.no_subtitles)});root.on("click",".fp-subtitle-menu a[data-subtitle-index]",function(e){if(jQuery(this).data("subtitle-index")>-1){check=true;api.on("progress",time_check)}});function time_check(e,api,time){if(check){(api.cuepoints||[]).forEach(function(cue,index){var entry=cue.subtitle;if(entry&&currentPoint!=index){if(time>=cue.time&&(!entry.endTime||time<=entry.endTime)){api.trigger("cuepoint",[api,cue])}}})}}});if(typeof flowplayer!=="undefined"&&typeof fv_flowplayer_conf!="undefined"&&fv_flowplayer_conf.video_hash_links){flowplayer(function(api,root){if(jQuery(root).find(".sharing-link").length>0){api.on("progress",function(e,api){if(!api.video.sources||!api.video.sources[0]){return}var hash=fv_player_get_video_link_hash(api);var sTime=","+fv_player_time_hms(api.video.time);jQuery(".fvp-sharing>li>a",root).each(function(){jQuery(this).attr("href",jQuery(this).attr("href").replace(/%23.*/,"")+"%23"+hash)});jQuery(".sharing-link",root).attr("href",jQuery(".sharing-link",root).attr("href").replace(/#.*/,"")+"#"+hash+sTime)});jQuery(".sharing-link",root).click(function(e){fv_player_clipboard(jQuery(this).attr("href"),function(){e.preventDefault();fv_player_notice(root,fv_flowplayer_translations.link_copied,2e3)})})}});jQuery(document).on("click",'a[href*="fvp_"]',function(){var link=jQuery(this);setTimeout(function(){if(link.parents(".fvp-share-bar").length==0)fv_autoplay_exec()})})}flowplayer(function(api,root){root=jQuery(root);var bean=flowplayer.bean;var restore=-1;root.on("click",".fp-volumebtn",function(e){if(api.volumeLevel==0&&restore!=-1){api.volume(restore);return false}});root.on("mousedown touchstart mouseup touchend",".fp-volumebar",function(e){if(api.volumeLevel!=0){restore=api.volumeLevel}});root.on("mousedown touchstart",".fp-volumebtn",function(e){if(api.volumeLevel>0){restore=-1}});api.on("volume",function(e,api){if(root.hasClass("is-mouseover")&&!api.muted){if(api.volumeLevel==0){bean.off(flowplayer.support.touch?root:document,"mousemove.sld touchmove.sld");api.mute(true)}}})});if(typeof flowplayer!="undefined"){flowplayer(function(api,root){root=jQuery(root);if(navigator.userAgent.match(/iPhone.* OS [0-6]_/i)){api.one("progress",function(e){if(typeof api.video.subtitles!=="undefined"&&api.video.subtitles.length){fv_player_warning(root,fv_flowplayer_translations.warning_iphone_subs)}})}if(flowplayer.support.android&&flowplayer.support.android.version<5&&(flowplayer.support.android.samsung||flowplayer.support.browser.safari)){fv_player_warning(root,fv_flowplayer_translations.warning_unstable_android,"firefox")}if(/Android 4/.test(navigator.userAgent)&&!/Firefox/.test(navigator.userAgent)){api.on("ready",function(e,api,video){setTimeout(function(){if(video.src&&video.src.match(/fpdl.vimeocdn.com/)&&(video.time==0||video.time==1)){fv_player_warning(root,fv_flowplayer_translations.warning_unstable_android,"firefox");api.on("progress",function(e,api){root.prev().find(".fv-player-warning-firefox").remove()})}},1500)});api.on("error",function(e,api,error){if(error.MEDIA_ERR_NETWORK==2&&error.video.src.match(/fpdl.vimeocdn.com/)){fv_player_warning(root,fv_flowplayer_translations.warning_unstable_android,"firefox")}})}if(/Safari/.test(navigator.userAgent)&&/Version\/5/.test(navigator.userAgent)){api.on("error",function(e,api,error){if(error.video.src.match(/fpdl.vimeocdn.com/)){fv_player_warning(root,fv_flowplayer_translations.warning_old_safari)}})}var sup=flowplayer.support;if(sup.android&&(sup.android.samsung&&parseInt(sup.browser.version)<66||sup.browser.safari)){api.on("error",function(e,api,error){fv_player_warning(root,fv_flowplayer_translations.warning_samsungbrowser,"warning_samsungbrowser")})}});function fv_player_warning(root,warning,classname){var wrapper=jQuery(root).prev(".fv-player-warning-wrapper");if(wrapper.length==0){jQuery(root).before('<div class="fv-player-warning-wrapper">');wrapper=jQuery(root).prev(".fv-player-warning-wrapper")}if(wrapper.find(".fv-player-warning-"+classname).length==0){var latest=jQuery("<p style='display: none' "+(classname?" class='fv-player-warning-"+classname+"'":"")+">"+warning+"</p>");wrapper.append(latest);latest.slideDown()}}}
flowplayer/fv-player-loader.babel.js ADDED
@@ -0,0 +1,320 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ /* Warning: only use /* comments here! */
4
+ (function () {
5
+ /* forEach for IE 11: https://rimdev.io/foreach-for-ie-11/ */
6
+ if (window.NodeList && !NodeList.prototype.forEach) {
7
+ NodeList.prototype.forEach = Array.prototype.forEach;
8
+ }
9
+
10
+ if (window.HTMLCollection && !HTMLCollection.prototype.forEach) {
11
+ HTMLCollection.prototype.forEach = Array.prototype.forEach;
12
+ }
13
+
14
+ var filter = document.createElement('div');
15
+ filter.innerHTML = '<svg class="fp-filters" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 0 0"><defs><filter id="f1" x="-20%" y="-20%" width="200%" height="200%"><feOffset result="offOut" in="SourceAlpha" dx="0" dy="0" /><feColorMatrix result="matrixOut" in="offOut" type="matrix" values="0.3 0 0 0 0 0 0.3 0 0 0 0 0 0.3 0 0 0 0 0 0.4 0" /><feGaussianBlur result="blurOut" in="matrixOut" stdDeviation="4" /><feBlend in="SourceGraphic" in2="blurOut" mode="normal" /></filter></defs></svg>';
16
+ filter.style.width = 0;
17
+ filter.style.height = 0;
18
+ filter.style.overflow = 'hidden';
19
+ filter.style.position = 'absolute', filter.style.margin = 0;
20
+ filter.style.padding = 0;
21
+ document.body.appendChild(filter);
22
+ Array.prototype.filter.call(document.getElementsByClassName('flowplayer'), function (player) {
23
+ player.className = player.className.replace(/\bno-svg\b/g, '');
24
+ /* remove admin JavaScript warning */
25
+
26
+ var admin_js_warning = player.querySelector('.fvfp_admin_error');
27
+
28
+ if (admin_js_warning) {
29
+ admin_js_warning.parentNode.removeChild(admin_js_warning);
30
+ }
31
+ /* replace preload icon with play icon */
32
+
33
+
34
+ var preload = player.querySelector('.fp-preload');
35
+ /* occurs for the audio player */
36
+
37
+ if (!preload) return;
38
+ var parent = preload.parentNode,
39
+ play_icon = document.createElement('div');
40
+ play_icon.className = 'fp-play fp-visible';
41
+ play_icon.innerHTML = '<a class="fp-icon fp-playbtn"></a>\
42
+ <svg class="fp-play-rounded-fill" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><style>.a{fill:#000;opacity:0.65;}.b{fill:#fff;opacity:1.0;}</style></defs><title>play-rounded-fill</title><path class="fp-color-play" d="M49.9217-.078a50,50,0,1,0,50,50A50.0564,50.0564,0,0,0,49.9217-.078Z"/><path class="b" d="M35.942,35.2323c0-4.7289,3.3506-6.6637,7.446-4.2971L68.83,45.6235c4.0956,2.364,4.0956,6.2319,0,8.5977L43.388,68.91c-4.0954,2.364-7.446.43-7.446-4.2979Z" filter="url(#f1)"/></svg>\
43
+ <svg class="fp-play-rounded-outline" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 99.844 99.8434"><defs><style>.fp-color-play{opacity:0.65;}.controlbutton{fill:#fff;}</style></defs><title>play-rounded-outline</title><path class="fp-color-play" d="M49.9217-.078a50,50,0,1,0,50,50A50.0564,50.0564,0,0,0,49.9217-.078Z"/><path class="controlbutton" d="M41.0359,71.19a5.0492,5.0492,0,0,1-2.5575-.6673c-1.8031-1.041-2.7958-3.1248-2.7958-5.8664V35.1887c0-2.7429.9933-4.8272,2.797-5.8676,1.8025-1.0422,4.1034-.86,6.48.5143L70.4782,44.5672c2.3751,1.3711,3.6826,3.2725,3.6832,5.3545s-1.3076,3.9845-3.6832,5.3562L44.9592,70.0114A7.9384,7.9384,0,0,1,41.0359,71.19Zm.0065-40.123a2.6794,2.6794,0,0,0-1.3582.3413c-1.0263.5926-1.5912,1.9349-1.5912,3.78V64.6563c0,1.8449.5649,3.1866,1.5906,3.7791,1.0281.5932,2.4733.4108,4.07-.512L69.273,53.1906c1.5983-.9227,2.478-2.0838,2.478-3.2689s-.88-2.3445-2.478-3.2666L43.754,31.9227A5.5685,5.5685,0,0,0,41.0423,31.0671Z" filter="url(#f1)"/></svg>\
44
+ <svg class="fp-play-sharp-fill" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><style>.fp-color-play{opacity:0.65;}.controlbutton{fill:#fff;}</style></defs><title>play-sharp-fill</title><path class="fp-color-play" d="M49.9217-.078a50,50,0,1,0,50,50A50.0564,50.0564,0,0,0,49.9217-.078Z"/><polygon class="controlbutton" points="73.601 50 37.968 70.573 37.968 29.427 73.601 50" filter="url(#f1)"/></svg>\
45
+ <svg class="fp-play-sharp-outline" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 99.844 99.8434"><defs><style>.controlbuttonbg{opacity:0.65;}.controlbutton{fill:#fff;}</style></defs><title>play-sharp-outline</title><path class="fp-color-play" d="M49.9217-.078a50,50,0,1,0,50,50A50.0564,50.0564,0,0,0,49.9217-.078Z"/><path class="controlbutton" d="M36.9443,72.2473V27.2916L75.8776,49.77Zm2.2-41.1455V68.4371L71.4776,49.77Z" filter="url(#f1)"/></svg>'.replace(/url\(#/g, 'url(' + window.location.href.replace(window.location.hash, "").replace(/\#$/g, '') + '#');
46
+ preload.style.display = 'none';
47
+ parent.appendChild(play_icon);
48
+ });
49
+ })();
50
+
51
+ var FV_Player_JS_Loader_Compatibility_Checker = /*#__PURE__*/function () {
52
+ function FV_Player_JS_Loader_Compatibility_Checker(options) {
53
+ this.passiveSupported = false;
54
+
55
+ this._checkPassiveOption(this);
56
+
57
+ this.options = this.passiveSupported ? options : false;
58
+ }
59
+ /**
60
+ * Initializes browser check for addEventListener passive option.
61
+ *
62
+ * @link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support
63
+ * @private
64
+ *
65
+ * @param self Instance of this object.
66
+ * @returns {boolean}
67
+ */
68
+
69
+
70
+ var _proto = FV_Player_JS_Loader_Compatibility_Checker.prototype;
71
+
72
+ _proto._checkPassiveOption = function _checkPassiveOption(self) {
73
+ try {
74
+ var options = {
75
+ /* This function will be called when the browser attempts to access the passive property. */
76
+ get passive() {
77
+ self.passiveSupported = true;
78
+ return false;
79
+ }
80
+
81
+ };
82
+ window.addEventListener('test', null, options);
83
+ window.removeEventListener('test', null, options);
84
+ } catch (err) {
85
+ self.passiveSupported = false;
86
+ }
87
+ };
88
+
89
+ return FV_Player_JS_Loader_Compatibility_Checker;
90
+ }();
91
+
92
+ var FV_Player_JS_Loader = /*#__PURE__*/function () {
93
+ function FV_Player_JS_Loader(triggerEvents, browser) {
94
+ this.attrName = 'data-fv-player-loader-src';
95
+ this.browser = browser;
96
+ this.options = this.browser.options;
97
+ this.triggerEvents = triggerEvents;
98
+ this.userEventListener = this.triggerListener.bind(this);
99
+ }
100
+ /**
101
+ * Initializes the LazyLoad Scripts handler.
102
+ */
103
+
104
+
105
+ var _proto2 = FV_Player_JS_Loader.prototype;
106
+
107
+ _proto2.init = function init() {
108
+ this._addEventListener(this);
109
+ }
110
+ /**
111
+ * Resets the handler.
112
+ */
113
+ ;
114
+
115
+ _proto2.reset = function reset() {
116
+ this._removeEventListener(this);
117
+ }
118
+ /**
119
+ * Adds a listener for each of the configured user interactivity event type. When an even is triggered, it invokes
120
+ * the triggerListener() method.
121
+ *
122
+ * @private
123
+ *
124
+ * @param self Instance of this object.
125
+ */
126
+ ;
127
+
128
+ _proto2._addEventListener = function _addEventListener(self) {
129
+ this.triggerEvents.forEach(function (eventName) {
130
+ return window.addEventListener(eventName, self.userEventListener, self.options);
131
+ });
132
+ }
133
+ /**
134
+ * Removes the listener for each of the configured user interactivity event type.
135
+ *
136
+ * @private
137
+ *
138
+ * @param self Instance of this object.
139
+ */
140
+ ;
141
+
142
+ _proto2._removeEventListener = function _removeEventListener(self) {
143
+ this.triggerEvents.forEach(function (eventName) {
144
+ return window.removeEventListener(eventName, self.userEventListener, self.options);
145
+ });
146
+ }
147
+ /**
148
+ * Loads the script's src from the data attribute, which will then trigger the browser to request and
149
+ * load the script.
150
+ */
151
+ ;
152
+
153
+ _proto2._loadScriptSrc = function _loadScriptSrc() {
154
+ var _this = this;
155
+
156
+ var scripts = document.querySelectorAll("script[" + this.attrName + "]");
157
+ window.FV_Player_JS_Loader_scripts_total = 0;
158
+ window.FV_Player_JS_Loader_scripts_loaded = 0;
159
+ scripts.forEach(function (elem) {
160
+ var scriptSrc = elem.getAttribute(_this.attrName);
161
+ elem.setAttribute('src', scriptSrc);
162
+ elem.removeAttribute(_this.attrName);
163
+ window.FV_Player_JS_Loader_scripts_total++;
164
+
165
+ elem.onload = function () {
166
+ window.FV_Player_JS_Loader_scripts_loaded++;
167
+ };
168
+ });
169
+ this.reset();
170
+ }
171
+ /**
172
+ * Window event listener - when triggered, invokes the load script src handler and then resets.
173
+ */
174
+ ;
175
+
176
+ _proto2.triggerListener = function triggerListener() {
177
+ /* Show the preload indicator once again */
178
+ Array.prototype.filter.call(document.getElementsByClassName('flowplayer'), function (player) {
179
+ var preload = player.querySelector('.fp-preload');
180
+
181
+ if (preload) {
182
+ preload.style.display = 'block';
183
+ }
184
+
185
+ var play = player.querySelector('.fp-play');
186
+
187
+ if (play) {
188
+ play.style.display = 'none';
189
+ }
190
+ });
191
+ /* Not sure when, but sometimes the flowplayer script is not ready */
192
+
193
+ if (window.flowplayer) {
194
+ this._loadScriptSrc();
195
+ } else {
196
+ var that = this,
197
+ wait_for_flowplayer = setInterval(function () {
198
+ if (window.flowplayer) {
199
+ that._loadScriptSrc();
200
+
201
+ clearInterval(wait_for_flowplayer);
202
+ }
203
+ }, 100);
204
+ }
205
+
206
+ this._removeEventListener(this);
207
+ };
208
+
209
+ FV_Player_JS_Loader.run = function run() {
210
+ var browser = new FV_Player_JS_Loader_Compatibility_Checker({
211
+ passive: true
212
+ });
213
+ var instance = new FV_Player_JS_Loader(['keydown', 'mouseover', 'touchmove', 'touchstart', 'wheel'], browser);
214
+ instance.init();
215
+ /* if using Video Link, load it all right away */
216
+
217
+ if (location.hash.match(/fvp_/)) {
218
+ instance.triggerListener();
219
+ return;
220
+ }
221
+ /* iOS specific block https://stackoverflow.com/questions/9038625/detect-if-device-is-ios */
222
+
223
+
224
+ function iOS() {
225
+ return navigator.platform.match(/iPad|iPhone|iPod/)
226
+ /* iPad on iOS 13 detection */
227
+ || navigator.userAgent.indexOf("Mac") !== -1 && "ontouchend" in document;
228
+ }
229
+
230
+ if (iOS()) {
231
+ var load_if_any_player_visible = function load_if_any_player_visible() {
232
+ var is_any_player_visible = false;
233
+ /* if part of any player visible? */
234
+
235
+ /* TODO: What about playlist item thumbs? */
236
+
237
+ document.querySelectorAll('.flowplayer').forEach(function (el) {
238
+ var rect = el.getBoundingClientRect();
239
+
240
+ if (rect.top >= -el.offsetHeight && rect.left >= -el.offsetWidth && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) + el.offsetHeight && rect.right <= (window.innerWidth || document.documentElement.clientWidth) + el.offsetWidth) {
241
+ is_any_player_visible = true;
242
+ }
243
+ });
244
+ console.log('FV Player: Visible?', is_any_player_visible);
245
+
246
+ if (is_any_player_visible) {
247
+ instance.triggerListener();
248
+ }
249
+
250
+ return is_any_player_visible;
251
+ };
252
+ /* Load FV Player scripts instantly if any player is visible */
253
+
254
+
255
+ var was_visible = load_if_any_player_visible();
256
+ /* Try again once styles are loaded */
257
+
258
+ if (!was_visible) {
259
+ /* ...or when Safari restores the scroll position */
260
+ var load_on_scroll = function load_on_scroll() {
261
+ this.removeEventListener('scroll', load_on_scroll);
262
+ load_if_any_player_visible();
263
+ };
264
+
265
+ /* once everything is loaded */
266
+ window.addEventListener('load', load_if_any_player_visible);
267
+ window.addEventListener('scroll', load_on_scroll);
268
+ }
269
+
270
+ return;
271
+ }
272
+ /* If the first click was on player, play it */
273
+
274
+
275
+ var first_click_done = false;
276
+ document.addEventListener('mousedown', function (e) {
277
+ if (first_click_done) return;
278
+ first_click_done = true;
279
+ var playlist_item = false;
280
+ var path = e.path || e.composedPath && e.composedPath();
281
+ path.forEach(function (el) {
282
+ /* store playlist item for later use */
283
+ if (el.getAttribute && el.getAttribute('data-item')) {
284
+ playlist_item = el;
285
+ }
286
+
287
+ if (el.className && el.className.match(/\b(flowplayer|fp-playlist-external)\b/)) {
288
+ /* Players with autoplay should stop */
289
+ document.querySelectorAll('[data-fvautoplay]').forEach(function (player) {
290
+ player.removeAttribute('data-fvautoplay');
291
+ });
292
+ /* VAST should not autoplay */
293
+
294
+ if (window.fv_vast_conf) {
295
+ fv_vast_conf.autoplay = false;
296
+ }
297
+ /* TODO: Perhaps video link should not be parsed or it should be done here */
298
+
299
+ /* was it lightbox? */
300
+
301
+
302
+ if (el.className.match(/lightbox-starter/)) {
303
+ /* was it playlist thumb? */
304
+ } else if (el.className.match(/\bfp-playlist-external\b/)) {
305
+ console.log('First click on playlist');
306
+ var player = document.getElementById(el.getAttribute('rel'));
307
+ player.setAttribute('data-fvautoplay', Array.prototype.indexOf.call(el.children, playlist_item));
308
+ } else {
309
+ console.log('First click on player');
310
+ el.setAttribute('data-fvautoplay', 0);
311
+ }
312
+ }
313
+ });
314
+ }, false);
315
+ };
316
+
317
+ return FV_Player_JS_Loader;
318
+ }();
319
+
320
+ FV_Player_JS_Loader.run();
flowplayer/fv-player-loader.dev.js ADDED
@@ -0,0 +1,313 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Warning: only use /* comments here! */
2
+
3
+ ( function() {
4
+ /* forEach for IE 11: https://rimdev.io/foreach-for-ie-11/ */
5
+ if(window.NodeList && !NodeList.prototype.forEach) {
6
+ NodeList.prototype.forEach = Array.prototype.forEach;
7
+ }
8
+ if(window.HTMLCollection && !HTMLCollection.prototype.forEach) {
9
+ HTMLCollection.prototype.forEach = Array.prototype.forEach;
10
+ }
11
+
12
+ var filter = document.createElement('div');
13
+ filter.innerHTML = '<svg class="fp-filters" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 0 0"><defs><filter id="f1" x="-20%" y="-20%" width="200%" height="200%"><feOffset result="offOut" in="SourceAlpha" dx="0" dy="0" /><feColorMatrix result="matrixOut" in="offOut" type="matrix" values="0.3 0 0 0 0 0 0.3 0 0 0 0 0 0.3 0 0 0 0 0 0.4 0" /><feGaussianBlur result="blurOut" in="matrixOut" stdDeviation="4" /><feBlend in="SourceGraphic" in2="blurOut" mode="normal" /></filter></defs></svg>';
14
+ filter.style.width = 0;
15
+ filter.style.height = 0;
16
+ filter.style.overflow = 'hidden';
17
+ filter.style.position = 'absolute',
18
+ filter.style.margin = 0;
19
+ filter.style.padding = 0;
20
+ document.body.appendChild(filter);
21
+
22
+ Array.prototype.filter.call(document.getElementsByClassName('flowplayer'), function(player){
23
+ player.className = player.className.replace(/\bno-svg\b/g,'');
24
+
25
+ /* remove admin JavaScript warning */
26
+ var admin_js_warning = player.querySelector('.fvfp_admin_error');
27
+ if( admin_js_warning ) {
28
+ admin_js_warning.parentNode.removeChild( admin_js_warning );
29
+ }
30
+
31
+ /* replace preload icon with play icon */
32
+ var preload = player.querySelector('.fp-preload');
33
+
34
+ /* occurs for the audio player */
35
+ if( !preload ) return;
36
+
37
+ var parent = preload.parentNode,
38
+ play_icon = document.createElement('div');
39
+ play_icon.className = 'fp-play fp-visible';
40
+
41
+ play_icon.innerHTML = '<a class="fp-icon fp-playbtn"></a>\
42
+ <svg class="fp-play-rounded-fill" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><style>.a{fill:#000;opacity:0.65;}.b{fill:#fff;opacity:1.0;}</style></defs><title>play-rounded-fill</title><path class="fp-color-play" d="M49.9217-.078a50,50,0,1,0,50,50A50.0564,50.0564,0,0,0,49.9217-.078Z"/><path class="b" d="M35.942,35.2323c0-4.7289,3.3506-6.6637,7.446-4.2971L68.83,45.6235c4.0956,2.364,4.0956,6.2319,0,8.5977L43.388,68.91c-4.0954,2.364-7.446.43-7.446-4.2979Z" filter="url(#f1)"/></svg>\
43
+ <svg class="fp-play-rounded-outline" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 99.844 99.8434"><defs><style>.fp-color-play{opacity:0.65;}.controlbutton{fill:#fff;}</style></defs><title>play-rounded-outline</title><path class="fp-color-play" d="M49.9217-.078a50,50,0,1,0,50,50A50.0564,50.0564,0,0,0,49.9217-.078Z"/><path class="controlbutton" d="M41.0359,71.19a5.0492,5.0492,0,0,1-2.5575-.6673c-1.8031-1.041-2.7958-3.1248-2.7958-5.8664V35.1887c0-2.7429.9933-4.8272,2.797-5.8676,1.8025-1.0422,4.1034-.86,6.48.5143L70.4782,44.5672c2.3751,1.3711,3.6826,3.2725,3.6832,5.3545s-1.3076,3.9845-3.6832,5.3562L44.9592,70.0114A7.9384,7.9384,0,0,1,41.0359,71.19Zm.0065-40.123a2.6794,2.6794,0,0,0-1.3582.3413c-1.0263.5926-1.5912,1.9349-1.5912,3.78V64.6563c0,1.8449.5649,3.1866,1.5906,3.7791,1.0281.5932,2.4733.4108,4.07-.512L69.273,53.1906c1.5983-.9227,2.478-2.0838,2.478-3.2689s-.88-2.3445-2.478-3.2666L43.754,31.9227A5.5685,5.5685,0,0,0,41.0423,31.0671Z" filter="url(#f1)"/></svg>\
44
+ <svg class="fp-play-sharp-fill" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><style>.fp-color-play{opacity:0.65;}.controlbutton{fill:#fff;}</style></defs><title>play-sharp-fill</title><path class="fp-color-play" d="M49.9217-.078a50,50,0,1,0,50,50A50.0564,50.0564,0,0,0,49.9217-.078Z"/><polygon class="controlbutton" points="73.601 50 37.968 70.573 37.968 29.427 73.601 50" filter="url(#f1)"/></svg>\
45
+ <svg class="fp-play-sharp-outline" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 99.844 99.8434"><defs><style>.controlbuttonbg{opacity:0.65;}.controlbutton{fill:#fff;}</style></defs><title>play-sharp-outline</title><path class="fp-color-play" d="M49.9217-.078a50,50,0,1,0,50,50A50.0564,50.0564,0,0,0,49.9217-.078Z"/><path class="controlbutton" d="M36.9443,72.2473V27.2916L75.8776,49.77Zm2.2-41.1455V68.4371L71.4776,49.77Z" filter="url(#f1)"/></svg>'.replace(/url\(#/g, 'url(' + window.location.href.replace(window.location.hash, "").replace(/\#$/g, '') + '#');
46
+
47
+ preload.style.display = 'none';
48
+ parent.appendChild(play_icon);
49
+ });
50
+
51
+ })();
52
+
53
+
54
+ class FV_Player_JS_Loader_Compatibility_Checker {
55
+
56
+ constructor( options ) {
57
+ this.passiveSupported = false;
58
+
59
+ this._checkPassiveOption( this );
60
+ this.options = this.passiveSupported ? options : false;
61
+ }
62
+
63
+ /**
64
+ * Initializes browser check for addEventListener passive option.
65
+ *
66
+ * @link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support
67
+ * @private
68
+ *
69
+ * @param self Instance of this object.
70
+ * @returns {boolean}
71
+ */
72
+ _checkPassiveOption( self ) {
73
+ try {
74
+ const options = {
75
+ /* This function will be called when the browser attempts to access the passive property. */
76
+ get passive() {
77
+ self.passiveSupported = true;
78
+ return false;
79
+ }
80
+ };
81
+
82
+ window.addEventListener( 'test', null, options );
83
+ window.removeEventListener( 'test', null, options );
84
+ } catch ( err ) {
85
+ self.passiveSupported = false;
86
+ }
87
+ }
88
+
89
+ }
90
+
91
+ class FV_Player_JS_Loader {
92
+
93
+ constructor( triggerEvents, browser ) {
94
+ this.attrName = 'data-fv-player-loader-src';
95
+ this.browser = browser;
96
+ this.options = this.browser.options;
97
+ this.triggerEvents = triggerEvents;
98
+ this.userEventListener = this.triggerListener.bind( this );
99
+ }
100
+
101
+ /**
102
+ * Initializes the LazyLoad Scripts handler.
103
+ */
104
+ init() {
105
+ this._addEventListener( this );
106
+ }
107
+
108
+ /**
109
+ * Resets the handler.
110
+ */
111
+ reset() {
112
+ this._removeEventListener( this );
113
+ }
114
+
115
+ /**
116
+ * Adds a listener for each of the configured user interactivity event type. When an even is triggered, it invokes
117
+ * the triggerListener() method.
118
+ *
119
+ * @private
120
+ *
121
+ * @param self Instance of this object.
122
+ */
123
+ _addEventListener( self ) {
124
+ this.triggerEvents.forEach(
125
+ eventName => window.addEventListener( eventName, self.userEventListener, self.options )
126
+ );
127
+ }
128
+
129
+ /**
130
+ * Removes the listener for each of the configured user interactivity event type.
131
+ *
132
+ * @private
133
+ *
134
+ * @param self Instance of this object.
135
+ */
136
+ _removeEventListener( self ) {
137
+ this.triggerEvents.forEach(
138
+ eventName => window.removeEventListener( eventName, self.userEventListener, self.options )
139
+ );
140
+ }
141
+
142
+ /**
143
+ * Loads the script's src from the data attribute, which will then trigger the browser to request and
144
+ * load the script.
145
+ */
146
+ _loadScriptSrc() {
147
+ const scripts = document.querySelectorAll( `script[${ this.attrName }]` );
148
+
149
+ window.FV_Player_JS_Loader_scripts_total = 0;
150
+ window.FV_Player_JS_Loader_scripts_loaded = 0;
151
+
152
+ scripts.forEach( elem => {
153
+ const scriptSrc = elem.getAttribute( this.attrName );
154
+
155
+ elem.setAttribute( 'src', scriptSrc );
156
+ elem.removeAttribute( this.attrName );
157
+
158
+ window.FV_Player_JS_Loader_scripts_total++;
159
+ elem.onload = function() {
160
+ window.FV_Player_JS_Loader_scripts_loaded++;
161
+ }
162
+ } );
163
+
164
+ this.reset();
165
+ }
166
+
167
+ /**
168
+ * Window event listener - when triggered, invokes the load script src handler and then resets.
169
+ */
170
+ triggerListener() {
171
+ /* Show the preload indicator once again */
172
+ Array.prototype.filter.call(document.getElementsByClassName('flowplayer'), function(player){
173
+ var preload = player.querySelector('.fp-preload');
174
+ if( preload ) {
175
+ preload.style.display = 'block';
176
+ }
177
+
178
+ var play = player.querySelector('.fp-play');
179
+ if( play ) {
180
+ play.style.display = 'none';
181
+ }
182
+ });
183
+
184
+ /* Not sure when, but sometimes the flowplayer script is not ready */
185
+ if( window.flowplayer ) {
186
+ this._loadScriptSrc();
187
+ } else {
188
+ var that = this,
189
+ wait_for_flowplayer = setInterval( function() {
190
+ if( window.flowplayer ) {
191
+ that._loadScriptSrc();
192
+ clearInterval( wait_for_flowplayer );
193
+ }
194
+ }, 100 );
195
+ }
196
+ this._removeEventListener( this );
197
+ }
198
+
199
+ static run() {
200
+ const browser = new FV_Player_JS_Loader_Compatibility_Checker( { passive: true } );
201
+ const instance = new FV_Player_JS_Loader( ['keydown','mouseover','touchmove','touchstart', 'wheel' ], browser );
202
+ instance.init();
203
+
204
+ /* if using Video Link, load it all right away */
205
+ if( location.hash.match(/fvp_/) ) {
206
+ instance.triggerListener();
207
+ return;
208
+ }
209
+
210
+ /* iOS specific block https://stackoverflow.com/questions/9038625/detect-if-device-is-ios */
211
+ function iOS() {
212
+ return navigator.platform.match(/iPad|iPhone|iPod/)
213
+ /* iPad on iOS 13 detection */
214
+ || (navigator.userAgent.indexOf("Mac") !== -1 && "ontouchend" in document)
215
+ }
216
+
217
+ if( iOS() ) {
218
+
219
+ function load_if_any_player_visible() {
220
+ var is_any_player_visible = false;
221
+
222
+ /* if part of any player visible? */
223
+ /* TODO: What about playlist item thumbs? */
224
+ document.querySelectorAll('.flowplayer').forEach( el => {
225
+ var rect = el.getBoundingClientRect();
226
+ if( rect.top >= -el.offsetHeight &&
227
+ rect.left >= -el.offsetWidth &&
228
+ rect.bottom <= ( window.innerHeight || document.documentElement.clientHeight ) + el.offsetHeight &&
229
+ rect.right <= ( window.innerWidth || document.documentElement.clientWidth ) + el.offsetWidth
230
+ ) {
231
+ is_any_player_visible = true;
232
+ }
233
+ });
234
+ console.log( 'FV Player: Visible?', is_any_player_visible );
235
+
236
+ if( is_any_player_visible ) {
237
+ instance.triggerListener();
238
+ }
239
+
240
+ return is_any_player_visible;
241
+ }
242
+
243
+ /* Load FV Player scripts instantly if any player is visible */
244
+ var was_visible = load_if_any_player_visible();
245
+
246
+ /* Try again once styles are loaded */
247
+ if( !was_visible ) {
248
+ /* once everything is loaded */
249
+ window.addEventListener( 'load', load_if_any_player_visible );
250
+
251
+ /* ...or when Safari restores the scroll position */
252
+ function load_on_scroll() {
253
+ this.removeEventListener( 'scroll', load_on_scroll );
254
+ load_if_any_player_visible();
255
+ }
256
+ window.addEventListener( 'scroll', load_on_scroll );
257
+ }
258
+
259
+ return;
260
+ }
261
+
262
+ /* If the first click was on player, play it */
263
+ var first_click_done = false;
264
+ document.addEventListener('mousedown', function (e) {
265
+ if( first_click_done ) return;
266
+ first_click_done = true;
267
+
268
+ var playlist_item = false;
269
+
270
+ var path = e.path || (e.composedPath && e.composedPath());
271
+ path.forEach( function(el) {
272
+ /* store playlist item for later use */
273
+ if( el.getAttribute && el.getAttribute('data-item') ) {
274
+ playlist_item = el;
275
+ }
276
+
277
+ if( el.className && el.className.match(/\b(flowplayer|fp-playlist-external)\b/) ) {
278
+ /* Players with autoplay should stop */
279
+ document.querySelectorAll('[data-fvautoplay]').forEach( function(player) {
280
+ player.removeAttribute('data-fvautoplay');
281
+ });
282
+
283
+ /* VAST should not autoplay */
284
+ if( window.fv_vast_conf ) {
285
+ fv_vast_conf.autoplay = false;
286
+ }
287
+
288
+ /* TODO: Perhaps video link should not be parsed or it should be done here */
289
+
290
+ /* was it lightbox? */
291
+ if( el.className.match(/lightbox-starter/) ) {
292
+
293
+ /* was it playlist thumb? */
294
+ } else if( el.className.match(/\bfp-playlist-external\b/) ) {
295
+ console.log('First click on playlist');
296
+
297
+ var player = document.getElementById( el.getAttribute('rel') );
298
+ player.setAttribute( 'data-fvautoplay', Array.prototype.indexOf.call(el.children,playlist_item) );
299
+
300
+ } else {
301
+ console.log('First click on player');
302
+
303
+ el.setAttribute( 'data-fvautoplay', 0 );
304
+ }
305
+ }
306
+ });
307
+
308
+ }, false);
309
+
310
+ }
311
+ }
312
+
313
+ FV_Player_JS_Loader.run();
flowplayer/fv-player.min.js ADDED
@@ -0,0 +1 @@
 
1
+ if(typeof fv_flowplayer_conf!="undefined"){try{if(typeof window.localStorage=="object"&&typeof window.localStorage.volume!="undefined"){delete fv_flowplayer_conf.volume}}catch(e){}flowplayer.conf=fv_flowplayer_conf;flowplayer.conf.fullscreen=false;flowplayer.conf.chromecast=false;flowplayer.conf.embed=false;flowplayer.conf.share=false;flowplayer.conf.analytics=false;try{flowplayer.conf.key=atob(flowplayer.conf.key)}catch(e){}if(!flowplayer.support.android&&flowplayer.conf.dacast_hlsjs){function FVAbrController(hls){this.hls=hls;this.nextAutoLevel=3}FVAbrController.prototype.nextAutoLevel=function(nextLevel){this.nextAutoLevel=nextLevel};FVAbrController.prototype.destroy=function(){};flowplayer.conf.hlsjs={startLevel:-1,abrController:FVAbrController}}function parseIOSVersion(UA){var e=/iP(ad|hone)(; CPU)? OS (\d+_\d)/.exec(UA);if(e&&e.length>1){return parseFloat(e[e.length-1].replace("_","."),10)}return 0}if(flowplayer.support.iOS&&flowplayer.support.iOS.chrome&&flowplayer.support.iOS.version==0){flowplayer.support.iOS.version=parseIOSVersion(navigator.userAgent)}if(flowplayer.support.iOS&&parseInt(flowplayer.support.iOS.version)>=13||!flowplayer.support.iOS&&flowplayer.support.browser.safari&&parseInt(flowplayer.support.browser.version)>=8){flowplayer.conf.hlsjs.safari=true}flowplayer.support.fvmobile=!!(!flowplayer.support.firstframe||flowplayer.support.iOS||flowplayer.support.android);var fls=flowplayer.support;if(flowplayer.conf.mobile_native_fullscreen&&"ontouchstart"in window&&fls.fvmobile){flowplayer.conf.native_fullscreen=true}if("ontouchstart"in window){if(fls.android&&fls.android.version<4.4&&!(fls.browser.chrome&&fls.browser.version>54)){flowplayer.conf.native_fullscreen=true}if(fls.iOS&&(fv_player_in_iframe()||fls.iOS.version<7)){flowplayer.conf.native_fullscreen=true}}}if(typeof fv_flowplayer_translations!="undefined"){flowplayer.defaults.errors=fv_flowplayer_translations}var fv_player_did_autoplay=false;function fv_player_videos_parse(args,root){try{var videos=JSON.parse(args)}catch(e){return false}var regex=new RegExp("[\\?&]fv_flowplayer_mobile=([^&#]*)");var results=regex.exec(location.search);if((results!=null&&results[1]=="yes"||(jQuery(window).width()<=480||jQuery(window).height()<=480))&&(results==null||results[1]!="no")){var fv_fp_mobile=false;jQuery(videos.sources).each(function(k,v){if(v.mobile){videos.sources[k]=videos.sources[0];videos.sources[0]=v;fv_fp_mobile=true}if(fv_fp_mobile){jQuery(root).after('<p class="fv-flowplayer-mobile-switch">'+fv_flowplayer_translations.mobile_browser_detected_1+' <a href="'+document.URL+'?fv_flowplayer_mobile=no">'+fv_flowplayer_translations.mobile_browser_detected_2+"</a>.</p>")}})}root.trigger("fv_player_videos_parse",videos);return videos}function fv_player_in_iframe(){try{return window.self!==window.top}catch(e){return true}}jQuery(document).ready(function(){var loading_count=0;var loading=setInterval(function(){loading_count++;if(loading_count<1e3&&(window.fv_video_intelligence_conf&&!window.FV_Player_IMA||window.fv_vast_conf&&!window.FV_Player_IMA||window.fv_player_pro&&!window.FV_Flowplayer_Pro&&document.getElementById("fv_player_pro")!=fv_player_pro||window.fv_player_user_playlists&&!fv_player_user_playlists.is_loaded||window.FV_Player_JS_Loader_scripts_total&&window.FV_Player_JS_Loader_scripts_loaded<FV_Player_JS_Loader_scripts_total)){return}clearInterval(loading);fv_player_preload()},10)});function fv_escape_attr(text){var map={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return text.replace(/[&<>"']/g,function(m){return map[m]})}function fv_player_preload(){if(flowplayer.support.touch){jQuery(".fp-playlist-external.fv-playlist-design-2017").addClass("visible-captions")}flowplayer(function(api,root){root=jQuery(root);var fp_player=root.find(".fp-player");var splash_click=false;if(root.hasClass("fixed-controls")){root.find(".fp-controls").on("click",function(e){if(!api.loading&&!api.ready){e.preventDefault();e.stopPropagation();api.load()}})}if(!flowplayer.support.volume&&!flowplayer.support.autoplay){root.find(".fp-volume").hide()}if(root.data("volume")==0&&root.hasClass("no-controlbar")){root.find(".fp-volume").remove()}var playlist=jQuery(".fp-playlist-external[rel="+root.attr("id")+"]");if((!api.conf.playlist||api.conf.playlist.length==0)&&playlist.length&&playlist.find("a[data-item]").length>0){var items=[];playlist.find("a[data-item]").each(function(){if(parsed=fv_player_videos_parse(jQuery(this).attr("data-item"),root)){items.push(parsed)}else{jQuery(this).remove()}});api.conf.playlist=items;api.conf.clip=items[0]}else if(!api.conf.clip){api.conf.clip=fv_player_videos_parse(jQuery(root).attr("data-item"),root)}jQuery("a",playlist).on("click",function(e){e.preventDefault();splash_click=true;var $this=jQuery(this),playlist=jQuery(".fp-playlist-external[rel="+root.attr("id")+"]"),index=jQuery("a",playlist).index(this);$prev=$this.prev("a"),item=$this.data("item");if(location.href.match(/wp-admin/)&&$this.parents(".fv-player-editor-preview").length>0){fv_flowplayer_conf.current_video_to_edit=index;$this.parents(".fv-player-custom-video").find(".edit-video .fv-player-editor-button").trigger("click");return false}if($prev.length&&$this.is(":visible")&&!$prev.is(":visible")){$prev.trigger("click");return false}if(jQuery("#"+$this.parent().attr("rel")).hasClass("dynamic-playlist"))return;var playlist=jQuery(".fp-playlist-external[rel="+root.attr("id")+"]");fv_player_playlist_active(playlist,this);if(api){if(api.error){api.pause();api.error=api.loading=false;root.removeClass("is-error");root.find(".fp-message.fp-shown").remove()}if(!api.video||api.video.index==index)return;api.play(index)}var new_splash=item.splash;if(!new_splash){new_splash=$this.find("img").attr("src")}player_splash(root,fp_player,item,new_splash);var rect=root[0].getBoundingClientRect();if(rect.bottom-100<0){jQuery("html, body").animate({scrollTop:jQuery(root).offset().top-100},300)}});var playlist_external=jQuery("[rel="+root.attr("id")+"]");var playlist_progress=false;var splash_img=root.find(".fp-splash");var splash_text=root.find(".fv-fp-splash-text");function player_splash(root,fp_player,item,new_splash){var splash_img=root.find("img.fp-splash");if(new_splash){if(splash_img.length==0){splash_img=jQuery('<img class="fp-splash" />');fp_player.prepend(splash_img)}splash_img.attr("alt",item.fv_title?fv_escape_attr(item.fv_title):"video");splash_img.attr("src",new_splash)}else if(splash_img.length){splash_img.remove()}}api.bind("load",function(e,api,video){if(!api.conf.playlist.length){return}if(video.type.match(/^audio/)&&!splash_click){var anchor=playlist_external.find("a").eq(video.index);var item=anchor.data("item");var new_splash=item.splash;if(!new_splash){new_splash=anchor.find("img").attr("src")}player_splash(root,fp_player,item,new_splash)}splash_click=false});api.bind("ready",function(e,api,video){setTimeout(function(){if(video.index>-1){if(playlist_external.length>0){var playlist_item=jQuery("a",playlist_external).eq(video.index);fv_player_playlist_active(playlist_external,playlist_item);playlist_progress=playlist_item.find(".fvp-progress")}}},100);splash_img=root.find(".fp-splash");if(!video.is_audio_stream&&!video.type.match(/^audio/)){splash_img.remove();splash_text.remove()}});api.bind("unload",function(){jQuery(".fp-playlist-external .now-playing").remove();jQuery(".fp-playlist-external a").removeClass("is-active");fp_player.prepend(splash_text);fp_player.prepend(splash_img);playlist_progress=false});api.bind("progress",function(e,api,time){if(playlist_progress.length){api.playlist_thumbnail_progress(playlist_progress,api.video,time)}});api.bind("error-subtitles",function(){console.log("error-subtitles");fv_player_notice(root,fv_flowplayer_translations[8],2e3)});var playlist=jQuery(root).parent().find("div.fp-playlist-vertical[rel="+jQuery(root).attr("id")+"]");if(playlist.length){function check_size_and_all(args){var property=playlist.hasClass("fp-playlist-only-captions")?"height":"max-height";if(playlist.parents(".fp-playlist-text-wrapper").hasClass("is-fv-narrow")){property="max-height"}playlist.css(property,vertical_playlist_height());if(property=="max-height")playlist.css("height","auto")}check_size_and_all();jQuery(window).on("resize tabsactivate",function(){setTimeout(check_size_and_all,0)})}function vertical_playlist_height(args){var height=root.height();if(height==0)height=root.css("max-height");return height}api.show_status=function(type){var status="";["loading","ready","playing","paused","seeking"].every(function(v,k){if(api[v])status+=" "+v;return true});console.log("FV Player Status ("+type+")",status)};if(!window.fv_player_loaded){window.fv_player_loaded=true;setTimeout(function(){jQuery(document).trigger("fv_player_loaded");var event=new CustomEvent("fv_player_loaded",[]);document.dispatchEvent(event)},100)}setTimeout(function(){root.trigger("fv_player_loaded")},10)});if(window.self!=window.top&&!location.href.match(/fv_player_preview/)){embed_size();jQuery(window.self).resize(embed_size)}function embed_size(){jQuery(".flowplayer.fp-is-embed").each(function(){var root=jQuery(this);if(!root.hasClass("has-chapters")&&!root.hasClass("has-transcript")&&jQuery(".fp-playlist-external[rel="+root.attr("id")+"]").length==0){root.height(jQuery(window).height())}})}if(typeof fv_flowplayer_playlists!="undefined"){for(var i in fv_flowplayer_playlists){if(!fv_flowplayer_playlists.hasOwnProperty(i))continue;jQuery("#"+i).flowplayer({playlist:fv_flowplayer_playlists[i]})}}fv_player_load();fv_autoplay_exec();jQuery(document).ajaxComplete(function(){fv_player_load()});jQuery(window).on("hashchange",fv_autoplay_exec)}function fv_player_load(forced_el){if(forced_el&&forced_el.lenght>1){console.log("FV Player: Can't use fv_player_load with more than a single forced element!")}var load_players=forced_el,forced_api=false;if(!load_players)load_players=jQuery(".flowplayer");load_players.each(function(i,el){var root=jQuery(el);var api=root.data("flowplayer");if(api){if(forced_el)forced_api=api;return}if(forced_el){root.find(".fp-preload, .fvfp_admin_error").remove();if(root.attr("data-item-lazy")){root.attr("data-item",root.attr("data-item-lazy"));root.removeAttr("item-lazy")}else if(playlist=jQuery("[rel="+root.attr("id")+"]")){playlist.find("a[data-item-lazy]").each(function(k,v){v=jQuery(v);v.attr("data-item",v.attr("data-item-lazy"));v.removeAttr("data-item-lazy")})}}var conf=false;if(root.attr("data-item")){conf={clip:fv_player_videos_parse(root.attr("data-item"),root)}}else if(playlist=jQuery("[rel="+root.attr("id")+"]")){if(playlist.find("a[data-item]").length==0)return;var items=[];playlist.find("a[data-item]").each(function(){if(parsed=fv_player_videos_parse(jQuery(this).attr("data-item"),root)){items.push(parsed)}else{jQuery(this).remove()}});conf={playlist:items}}if(conf){conf=flowplayer.extend(conf,root.data());forced_api=flowplayer(root[0],conf);root.data("flowplayer",forced_api)}});jQuery(".fv-playlist-slider-wrapper").each(function(i,el){var items=jQuery(this).find("a");jQuery(this).find(".fp-playlist-external").css("width",items.outerWidth()*items.length)});if(typeof jQuery().tabs!="undefined"){jQuery("body").removeClass("fv_flowplayer_tabs_hide");jQuery(".fv_flowplayer_tabs_content").tabs()}if(forced_el&&forced_api){return forced_api}}function fv_player_playlist_active(playlist,item){if(playlist){jQuery("a",playlist).removeClass("is-active");jQuery(".now-playing").remove()}$playlist=jQuery(playlist);$item=jQuery(item);var scroll_parent=false;$item.addClass("is-active");var is_design_2014=$playlist.hasClass("fv-playlist-design-2014");if((is_design_2014&&$item.find("h4").length==0||!is_design_2014)&&$item.find(".now-playing").length==0)$item.prepend('<strong class="now-playing"><span>'+fv_flowplayer_translations.playlist_current+"</span></strong>");if(!$playlist.parent().find(".flowplayer").length){scroll_parent=true}if(($playlist.hasClass("fp-playlist-vertical")||$playlist.hasClass("fp-playlist-horizontal")&&$playlist.hasClass("is-audio"))&&!fullyVisibleY($item.get(0))){var $el=scroll_parent?$playlist.parent():$playlist;$el.animate({scrollTop:$el.scrollTop()+($item.position().top-$el.position().top)},750)}else if($playlist.hasClass("fp-playlist-horizontal")&&!fullyVisibleX($item.get(0))){var $el=scroll_parent?$playlist.parent():$playlist;$el.animate({scrollLeft:$el.scrollLeft()+($item.position().left-$el.position().left)},750)}function fullyVisibleY(el){var rect=el.getBoundingClientRect(),top=rect.top,height=rect.height,bottom=top+height,el=el.parentNode;do{rect=el.getBoundingClientRect();if(bottom<=rect.bottom===false)return false;if(top<=rect.top)return false;el=el.parentNode}while(el!=document.body);return bottom<=document.documentElement.clientHeight}function fullyVisibleX(el){var rect=el.getBoundingClientRect(),left=rect.left,width=rect.width,right=left+width,el=el.parentNode;do{rect=el.getBoundingClientRect();if(right<=rect.right===false)return false;if(left<=rect.left)return false;el=el.parentNode}while(el!=document.body);return right<=document.documentElement.clientWidth}}jQuery(function(){jQuery(".flowplayer").each(function(){flowplayer.bean.off(jQuery(this)[0],"contextmenu")})});var fv_fp_date=new Date;var fv_fp_utime=fv_fp_date.getTime();function fv_parse_sharelink(src){src=src.replace("https?://[^./].","");var prefix="fvp_";if(src.match(/(youtube.com)/)){return prefix+src.match(/(?:v=)([A-Za-z0-9_-]*)/)[1]}else if(src.match(/(vimeo.com)|(youtu.be)/)){return prefix+src.match(/(?:\/)([^/]*$)/)[1]}else{var match=src.match(/(?:\/)([^/]*$)/);if(match){return prefix+match[1].match(/^[^.]*/)[0]}}return prefix+src}function fv_player_get_video_link_hash(api){var hash=fv_parse_sharelink(typeof api.video.sources_original!="undefined"&&typeof api.video.sources_original[0]!="undefined"?api.video.sources_original[0].src:api.video.sources[0].src);if(typeof api.video.id!="undefined"){hash=fv_parse_sharelink(api.video.id.toString())}return hash}function fv_player_time_hms(seconds){if(isNaN(seconds)){return NaN}var sec_num=parseInt(seconds,10);var hours=Math.floor(sec_num/3600);var minutes=Math.floor(sec_num/60)%60;var seconds=sec_num%60;if(hours){hours+="h"}else{hours=""}if(hours&&minutes<10){minutes="0"+minutes+"m"}else if(!hours&&minutes){minutes+="m"}else{minutes=""}if((hours||minutes)&&seconds<10){seconds="0"+seconds}seconds+="s";var timeString=hours+minutes+seconds;return timeString}function fv_player_time_hms_ms(seconds){if(isNaN(seconds)){return NaN}seconds=parseFloat(seconds).toFixed(3);var miliseconds=(seconds+"").split(".");if(typeof miliseconds[1]!="undefined"&&miliseconds[1]>0){miliseconds=miliseconds[1]+"ms"}else{miliseconds=""}var timeString=fv_player_time_hms(seconds)+miliseconds;return timeString}function fv_player_time_seconds(time,duration){if(!time)return-1;var seconds=0;var match=time.match(/(\d+[a-z]{1,2})/g);match.forEach(function(item){if(item.endsWith("h")){seconds+=3600*parseInt(item)}else if(item.endsWith("m")){seconds+=60*parseInt(item)}else if(item.endsWith("s")&&!item.endsWith("ms")){seconds+=parseInt(item)}else if(item.endsWith("ms")){if(parseInt(item)){seconds+=parseInt(item)/1e3}}});return duration?Math.min(seconds,duration):seconds}function fv_autoplay_init(root,index,time,abStart,abEnd){if(fv_autoplay_exec_in_progress)return;fv_autoplay_exec_in_progress=true;var api=root.data("flowplayer");if(!api)return;var fTime=fv_player_time_seconds(time);abEnd=fv_player_time_seconds(abEnd);abStart=fv_player_time_seconds(abStart);if(root.parent().hasClass("ui-tabs-panel")){var tabId=root.parent().attr("id");jQuery("[aria-controls="+tabId+"] a").trigger("click")}if(!root.find(".fp-player").attr("class").match(/\bis-sticky/)){var offset=jQuery(root).offset().top-(jQuery(window).height()-jQuery(root).height())/2;window.scrollTo(0,offset);api.one("ready",function(){window.scrollTo(0,offset)})}if(root.hasClass("lightboxed")){setTimeout(function(){jQuery("[href=\\#"+root.attr("id")+"]").trigger("click")},0)}if(index){if(fv_player_video_link_autoplay_can(api,parseInt(index))){if(api.ready){if(fTime>0)api.seek(fTime);fv_autoplay_exec_in_progress=false}else{api.play(parseInt(index));api.one("ready",function(){fv_player_video_link_seek(api,fTime,abEnd,abStart)})}}else if(flowplayer.support.inlineVideo){api.one(api.playing?"progress":"ready",function(e,api){api.play(parseInt(index));api.one("ready",function(){fv_player_video_link_seek(api,fTime,abEnd,abStart)})});root.find(".fp-splash").attr("src",jQuery("[rel="+root.attr("id")+"] div").eq(index).find("img").attr("src"));if(!fv_player_in_iframe()){fv_player_notice(root,fv_flowplayer_translations[11],"progress")}}}else{if(api.ready){if(fTime>0)api.seek(fTime);fv_autoplay_exec_in_progress=false}else{if(fv_player_video_link_autoplay_can(api)){api.load()}else if(!fv_player_in_iframe()){fv_player_notice(root,fv_flowplayer_translations[11],"progress")}api.one("ready",function(){fv_player_video_link_seek(api,fTime,abEnd,abStart)})}}}function fv_player_video_link_seek(api,fTime,abEnd,abStart){fv_autoplay_exec_in_progress=false;var do_seek=setInterval(function(){if(api.loading)return;if(fTime>0)api.seek(fTime);if(abEnd&&abStart)api.trigger("link-ab",[api,abStart,abEnd]);clearInterval(do_seek)},10)}var fv_autoplay_exec_in_progress=false;function fv_autoplay_exec(){var autoplay=true;if(typeof flowplayer!=="undefined"&&typeof fv_flowplayer_conf!="undefined"&&fv_flowplayer_conf.video_hash_links&&window.location.hash.substring(1).length){var aHash=window.location.hash.match(/\?t=/)?window.location.hash.substring(1).split("?t="):window.location.hash.substring(1).split(",");var hash=aHash[0];var time=aHash[1]===undefined?false:aHash[1];var abStart=aHash[2]===undefined?false:aHash[2];var abEnd=aHash[3]===undefined?false:aHash[3];jQuery(".flowplayer").each(function(){var root=jQuery(this);if(root.hasClass("lightbox-starter")){root=jQuery(root.attr("href"))}var api=root.data("flowplayer");if(!api)return;var playlist=typeof api.conf.playlist!=="undefined"&&api.conf.playlist.length>1?api.conf.playlist:[api.conf.clip];for(var item in playlist){if(!playlist.hasOwnProperty(item))continue;var id=typeof playlist[item].id!=="undefined"?fv_parse_sharelink(playlist[item].id.toString()):false;if(hash===id&&autoplay){console.log("fv_autoplay_exec for "+id,item);fv_autoplay_init(root,parseInt(item),time,abStart,abEnd);autoplay=false;return false}}for(var item in playlist){if(!playlist.hasOwnProperty(item))continue;var src=fv_parse_sharelink(playlist[item].sources[0].src);if(hash===src&&autoplay){console.log("fv_autoplay_exec for "+src,item);fv_autoplay_init(root,parseInt(item),time,abStart,abEnd);autoplay=false;return false}}})}if(autoplay&&flowplayer.support.firstframe){jQuery(".flowplayer[data-fvautoplay]").each(function(){var root=jQuery(this),api=root.data("flowplayer"),autoplay=root.attr("data-fvautoplay");if(!fv_player_did_autoplay&&autoplay){if(!((flowplayer.support.android||flowplayer.support.iOS)&&api&&api.conf.clip.sources[0].type=="video/youtube")){fv_player_did_autoplay=true;if(api.conf.playlist.length&&jQuery.isNumeric(autoplay)){api.play(parseInt(autoplay))}else{api.load()}var play_icon=root.find(".fp-play").addClass("invisible"),control_bar=root.find(".fp-controls").addClass("invisible");api.one("progress",function(){play_icon.removeClass("invisible");control_bar.removeClass("invisible")});if(autoplay=="muted"){api.mute(true,true)}}}})}}function fv_player_video_link_autoplay_can(api,item){var video=item?api.conf.playlist[item]:api.conf.clip;if(video.sources[0].type=="video/youtube"&&(flowplayer.support.iOS||flowplayer.support.android)||fv_player_in_iframe())return false;return flowplayer.support.firstframe}function fv_player_notice(root,message,timeout){var notices=jQuery(".fvfp-notices",root);if(!notices.length){notices=jQuery('<div class="fvfp-notices">');jQuery(".fp-player",root).append(notices)}var notice=jQuery('<div class="fvfp-notice-content">'+message+"</div></div>");notices.append(notice);if(typeof timeout=="string"){var player=jQuery(root).data("flowplayer");player.on(timeout,function(){notice.fadeOut(100,function(){jQuery(this).remove()})})}if(timeout>0){setTimeout(function(){notice.fadeOut(2e3,function(){jQuery(this).remove()})},timeout)}return notice}var fv_player_clipboard=function(text,successCallback,errorCallback){try{fv_player_doCopy(text);successCallback()}catch(e){if(typeof errorCallback!="undefined")errorCallback(e)}};function fv_player_doCopy(text){var textarea=document.createElement("textarea");textarea.value=text;textarea.style.opacity=0;textarea.style.position="absolute";textarea.setAttribute("readonly",true);document.body.appendChild(textarea);var selected=document.getSelection().rangeCount>0?document.getSelection().getRangeAt(0):false;if(navigator.userAgent.match(/ipad|ipod|iphone/i)){var editable=textarea.contentEditable;textarea.contentEditable=true;var range=document.createRange();range.selectNodeContents(textarea);var sel=window.getSelection();sel.removeAllRanges();sel.addRange(range);textarea.setSelectionRange(0,999999);textarea.contentEditable=editable}else{textarea.select()}try{var result=document.execCommand("copy");if(selected){document.getSelection().removeAllRanges();document.getSelection().addRange(selected)}document.body.removeChild(textarea);return result}catch(err){throw new Error("Unsuccessfull")}}flowplayer(function(api,root){root=jQuery(root);var hlsjs;flowplayer.engine("hlsjs-lite").plugin(function(params){hlsjs=params.hls;hlsjs.on(Hls.Events.ERROR,function(event,data){if(data.type=="mediaError"&&data.details=="fragParsingError"&&data.fatal==true){hlsjs.destroy();api.trigger("error",[api,{code:3}]);setTimeout(function(){root.removeClass("is-seeking");root.addClass("is-paused")},0)}});if(flowplayer.support.browser.safari){hlsjs.on(Hls.Events.KEY_LOADED,function(event){if(event=="hlsKeyLoaded"){setTimeout(function(){if(api.loading){console.log("FV Player: Safari stuck loading HLS, resuming playback...");api.resume()}},0)}})}var pick_quality=flowplayer.conf.hd_streaming&&!flowplayer.support.fvmobile?720:false;if(jQuery(params.root).data("hd_streaming")==false)pick_quality=false;if(localStorage.FVPlayerHLSQuality)pick_quality=localStorage.FVPlayerHLSQuality;if(pick_quality){hlsjs.on(Hls.Events.MANIFEST_PARSED,function(_,data){var found=false;jQuery.each(data.levels,function(k,v){if(v.height==pick_quality)found=k});if(!localStorage.FVPlayerHLSQuality&&!found){jQuery.each(data.levels,function(k,v){if(v.height>found)found=k})}if(found){console.log("FV Player: Picked "+data.levels[found].height+"p quality");hlsjs.startLevel=found;hlsjs.currentLevel=found}})}});root=jQuery(root);var search=document.location.search;if(localStorage.FVPlayerDashQuality){if(!api.conf.dash)api.conf.dash={};api.conf.dash.initialVideoQuality="restore"}root.on("click",".fp-qsel-menu a",function(){if(api.engine.engineName=="hlsjs-lite"){var quality=jQuery(this).data("quality");if(quality==-1){localStorage.removeItem("FVPlayerHLSQuality")}else{var level=hlsjs.levels[quality];localStorage.FVPlayerHLSQuality=level.height}}});if(localStorage.FVPlayerHLSQuality){api.conf.hlsjs.startLevel=parseInt(localStorage.FVPlayerHLSQuality);api.conf.hlsjs.testBandwidth=false;api.conf.hlsjs.autoLevelEnabled=false}else if(flowplayer.conf.hd_streaming&&!flowplayer.support.fvmobile){api.conf.hlsjs.startLevel=3;api.conf.hlsjs.testBandwidth=false;api.conf.hlsjs.autoLevelEnabled=false}api.bind("quality",function(e,api,quality){if(api.engine.engineName=="dash"){if(quality==-1){localStorage.removeItem("FVPlayerDashQuality")}else if(bitrates[quality]){localStorage.FVPlayerDashQuality=bitrates[quality].height}}});var bitrates=[];var last_quality=-1;api.bind("ready",function(e,api){root.find(".fp-qsel-menu strong").text(fv_flowplayer_translations.quality);if(api.engine.engineName=="dash"){bitrates=api.engine.dash.getBitrateInfoListFor("video");if(localStorage.FVPlayerDashQuality&&api.conf.dash.initialVideoQuality){api.quality(api.conf.dash.initialVideoQuality)}quality_sort()}else if(api.engine.engineName=="hlsjs-lite"){root.addClass("is-loading");api.loading=true;api.one("progress",function(){if(api.loading){root.removeClass("is-loading");api.loading=false}});if(api.video.qualities&&api.video.qualities.length>2){var qswitch=-1;if(localStorage.FVPlayerHLSQuality){jQuery(api.video.qualities).each(function(k,v){if(v.value==localStorage.FVPlayerHLSQuality){qswitch=localStorage.FVPlayerHLSQuality;return false}})}else if(flowplayer.conf.hd_streaming&&!flowplayer.support.fvmobile){jQuery(api.video.qualities).each(function(k,v){var height=parseInt(v.label);if(height>0&&qswitch==-1&&height>=720&&height<=720){qswitch=v.value}})}qswitch=parseInt(qswitch);if(qswitch>-1){root.one("progress",function(){setTimeout(function(){api.quality(qswitch)})})}quality_sort()}}else if(api.video.sources_fvqs&&api.video.sources_fvqs.length>0&&api.video.src.match(/vimeo.*?\.mp4/)){setTimeout(quality_sort,0)}root.find("a[data-quality]").removeClass("is-current")});if(search.match(/dash_debug/)||search.match(/hls_debug/))var debug_log=jQuery('<div class="fv-debug" style="background: gray; color: white; top: 10%; position: absolute; z-index: 1000">').appendTo(root.find(".fp-player"));api.bind("ready progress",quality_process);api.bind("quality",function(){setTimeout(quality_process,0)});function quality_process(){if(api.engine.engineName=="dash"){var stream_info=bitrates[api.engine.dash.getQualityFor("video")];if(stream_info.qualityIndex!=last_quality){last_quality=stream_info.qualityIndex;quality_label(stream_info.qualityIndex,bitrates)}if(search.match(/dash_debug/))quality_debug(stream_info.width,stream_info.height,stream_info.bitrate)}else if(api.engine.engineName=="hlsjs-lite"){if(hlsjs.currentLevel!=last_quality){last_quality=hlsjs.currentLevel;quality_label(hlsjs.currentLevel,hlsjs.levels)}if(search.match(/hls_debug/)){var level=hlsjs.levels[hlsjs.currentLevel];if(level){quality_debug(level.width,level.height,level.bitrate)}}}}function quality_label(index,qualities){if(!qualities[index])return;var height=qualities[index].height,hd_limit=541,lowest=1e5;jQuery(qualities).each(function(k,v){if(v.height>=720&&v.height<1400)hd_limit=720;if(v.height<lowest)lowest=v.height;if(localStorage.FVPlayerHLSQuality==v.height){root.find("a[data-quality]").removeClass("fp-selected fp-color");root.find("a[data-quality="+k+"]").addClass("fp-selected fp-color")}});root.find("a[data-quality]").removeClass("is-current");root.find("a[data-quality="+index+"]").addClass("is-current");var label="SD";if(height>=360&&lowest<height)label="SD";if(height>=hd_limit)label="HD";if(height>=1400)label="4K";root.find(".fp-qsel").html(label)}function quality_debug(w,h,br){debug_log.html("Using "+w+"x"+h+" at "+Math.round(br/1024)+" kbps")}function quality_sort(){var menu=root.find(".fp-qsel-menu");menu.children().each(function(i,a){menu.prepend(a)});menu.children().each(function(i,a){if(/^NaNp/.test(jQuery(a).html())){var bitrate=jQuery(a).html().match(/\((.*?)\)/);if(bitrate&&typeof bitrate[1]!=="undefined"){jQuery(a).html(bitrate[1])}}else{jQuery(a).html(jQuery(a).html().replace(/\(.*?\)/,""))}});menu.prepend(menu.find("a[data-quality=-1]"));menu.prepend(menu.find("strong"))}});flowplayer(function(api,root){root=jQuery(root);var player_id=root.attr("id"),ad=false;if(root.data("end_popup_preview")){jQuery(document).ready(function(){api.trigger("finish",[api])})}function ad_height_check(){var count=0;var ad_height_check=setInterval(function(){var height=ad&&ad.find(".adsbygoogle").height();count++;if(count>20*10||height>0)clearInterval(ad_height_check);if(height>root.height()){ad.addClass("tall-ad")}},50)}function show_ad(){var ad_data=root.attr("data-ad");if(typeof ad_data!="undefined"&&ad_data.length){try{ad_data=JSON.parse(ad_data)}catch(e){return false}if(!ad&&!root.hasClass("is-cva")&&root.width()>=parseInt(ad_data.width)){var html=ad_data.html;html=html.replace("%random%",Math.random());ad=jQuery('<div id="'+player_id+'_ad" class="wpfp_custom_ad">'+html+"</div>");root.find(".fp-player").append(ad);ad_height_check();setTimeout(function(){if(root.find(".wpfp_custom_ad video").length){api.pause()}},500)}}}function show_popup(event){var popup_data=root.attr("data-popup");if(typeof popup_data!="undefined"&&popup_data.length){try{popup_data=JSON.parse(popup_data)}catch(e){return false}if(event=="finish"||popup_data.pause||popup_data.html.match(/fv-player-ppv-purchase-btn-wrapper/)){root.addClass("is-popup-showing");root.find(".fp-player").append('<div id="'+player_id+'_custom_popup" class="wpfp_custom_popup">'+popup_data.html+"</div>")}}}api.bind("ready",function(e,api){if(ad.length==1){ad.remove();ad=false}if(!root.data("ad_show_after")){show_ad()}}).bind("progress",function(e,api,current){if(current>root.data("ad_show_after")){show_ad()}}).bind("finish",function(e,api){if(typeof api.video.index=="undefined"||api.video.index+1==api.conf.playlist.length){show_popup(e.type)}}).bind("pause",function(e,api){show_popup(e.type)}).bind("resume unload seek",function(e,api){if(root.hasClass("is-popup-showing")){root.find(".wpfp_custom_popup").remove();root.removeClass("is-popup-showing")}})});jQuery(document).on("click",".fv_fp_close",function(){var ad=jQuery(this).parents(".wpfp_custom_ad_content"),video=ad.find("video");ad.fadeOut();if(video.length)video[0].pause();return false});jQuery(document).on("focus",".fv_player_popup input[type=text], .fv_player_popup input[type=email], .fv_player_popup textarea",function(){var api=jQuery(this).parents(".flowplayer").data("flowplayer");if(api)api.disable(true)});jQuery(document).on("blur",".fv_player_popup input[type=text], .fv_player_popup input[type=email], .fv_player_popup textarea",function(){var api=jQuery(this).parents(".flowplayer").data("flowplayer");if(api)api.disable(false)});flowplayer(function(api,root){var root=jQuery(root),bean=flowplayer.bean,time=0,last=0,timer,event_name;if(typeof ga=="undefined"&&api.conf.fvanalytics&&typeof _gat=="undefined"&&typeof gtag=="undefined"){if(is_ga_4(api)){jQuery.getScript({url:"https://www.googletagmanager.com/gtag/js?id="+api.conf.fvanalytics,cache:true},function(){window.dataLayer=window.dataLayer||[];window.gtag=function(){window.dataLayer.push(arguments)};window.gtag("js",new Date);window.gtag("config",api.conf.fvanalytics)})}else{jQuery.getScript({url:"https://www.google-analytics.com/analytics.js",cache:true},function(){ga("create",api.conf.fvanalytics,"auto")})}}if(!window._paq&&api.conf.matomo_domain&&api.conf.matomo_site_id){var u="//"+api.conf.matomo_domain+"/";var _paq=window._paq=window._paq||[];_paq.push(["setTrackerUrl",u+"matomo.php"]);_paq.push(["setSiteId",api.conf.matomo_site_id]);var d=document,g=d.createElement("script"),s=d.getElementsByTagName("script")[0];g.type="text/javascript";g.async=true;g.src=u+"matomo.js";s.parentNode.insertBefore(g,s)}api.bind("progress",function(e,api,current){fv_track(e,api,current)}).bind("finish ready ",function(e,api){for(var j in fv_ga_events){if(!fv_ga_events.hasOwnProperty(j))continue;root.removeData("fv_track_"+fv_ga_events[j])}}).bind("error",function(e,api,error){setTimeout(function(){if(!api.error)return;var video=typeof api.video!="undefined"&&typeof api.video.src!="undefined"?api.video:false;if(!video&&typeof api.conf.clip!="undefined"&&typeof api.conf.clip.sources!="undefined"&&typeof api.conf.clip.sources[0]!="undefined"&&typeof api.conf.clip.sources[0].src!="undefined")video=api.conf.clip.sources[0];var name=fv_player_track_name(root,video);if(name&&!name.match(/\/\/vimeo.com\/\d/)){if(is_ga_4(api)){}else{fv_player_track(api,false,"Video "+(root.hasClass("is-cva")?"Ad ":"")+"error",error.message,name)}}},100)});api.bind("load unload",fv_track_seconds_played).bind("progress",function(e,api){if(!api.seeking){time+=last?+new Date-last:0;last=+new Date}if(!timer){timer=setTimeout(function(){timer=null;if(!is_ga_4(api)){fv_player_track(api,false,"Flowplayer heartbeat",api.engine.engineName+"/"+api.video.type,"Heartbeat",0)}},10*60*1e3)}}).bind("pause",function(){last=0});api.bind("shutdown",function(){bean.off(window,"unload",fv_track_seconds_played)});bean.on(window,"unload",fv_track_seconds_played);var fv_ga_events=is_ga_4(api)?["Play","25 Percent Played","50 Percent Played","75 Percent Played","100 Percent Played"]:["start","first quartile","second quartile","third quartile","complete"];function fv_track_seconds_played(e,api_not_needed,video){video=video||api.video;if(e.type==="load"){event_name=fv_player_track_name(root,video)}if(time){fv_player_track(api,false,"Video / Seconds played",api.engine.engineName+"/"+api.video.type,event_name,Math.round(time/1e3));time=0;if(timer){clearTimeout(timer);timer=null}}}function fv_track(e,api,data){var video=api.video,dur=video.duration,i=0;var name=fv_player_track_name(root,video);if(dur){if(data>19*dur/20)i=4;else if(data>3*dur/4)i=3;else if(data>dur/2)i=2;else if(data>dur/4)i=1}if(api.live)i=0;if(root.data("fv_track_"+fv_ga_events[i]))return;for(var j in fv_ga_events){if(!fv_ga_events.hasOwnProperty(j))continue;if(j==i)break;if(!root.data("fv_track_"+fv_ga_events[j]))return}root.trigger("fv_track_"+fv_ga_events[i].replace(/ /,"_"),[api,name]);root.data("fv_track_"+fv_ga_events[i],true);fv_player_track(api,false,"Video "+(root.hasClass("is-cva")?"Ad ":"")+fv_ga_events[i],api.engine.engineName+"/"+video.type,name)}api.get_time_played=function(){return time/1e3}});function is_ga_4(api){if(typeof api.conf.fvanalytics!="undefined"&&api.conf.fvanalytics&&api.conf.fvanalytics.startsWith("G-"))return true;return false}function fv_player_track(api,ga_id,event,engineType,name,value){if(!ga_id)ga_id=flowplayer.conf.fvanalytics;if(typeof engineType=="undefined")engineType="Unknown engine";if(/fv_player_track_debug/.test(window.location.href))console.log("FV Player Track: "+event+" - "+engineType+" '"+name+"'",value);if(typeof gtag!="undefined"){if(is_ga_4(api)){gtag("event",event,{video_current_time:api.video.time,video_provider:engineType,video_duration:api.video.duration,value:value?value:1})}else{gtag("event",event,{event_category:engineType,event_label:name,value:value?value:1})}}else if(ga_id&&typeof ga!="undefined"){ga("create",ga_id,"auto",name,{allowLinker:true});ga("require","linker");if(value){ga("send","event",event,engineType,name,value)}else{ga("send","event",event,engineType,name)}}else if(ga_id&&typeof _gat!="undefined"){var tracker=_gat._getTracker(ga_id);if(typeof tracker._setAllowLinker=="undefined"){return}tracker._setAllowLinker(true);if(value){tracker._trackEvent(event,engineType,name,value)}else{tracker._trackEvent(event,engineType,name)}}if(flowplayer.conf.matomo_domain&&flowplayer.conf.matomo_site_id&&typeof _paq!="undefined"){if(value){_paq.push(["trackEvent",event,engineType,name,value])}else{_paq.push(["trackEvent",event,engineType,name])}}}function fv_player_track_name(root,video){var name=root.attr("title");if(!name&&typeof video.fv_title!="undefined")name=video.fv_title;if(!name&&typeof video.title!="undefined")name=video.title;if(!name&&typeof video.src!="undefined"){name=video.src.split("/").slice(-1)[0].replace(/\.(\w{3,4})(\?.*)?$/i,"");if(video.type.match(/mpegurl/))name=video.src.split("/").slice(-2)[0].replace(/\.(\w{3,4})(\?.*)?$/i,"")+"/"+name}return name}flowplayer(function(api,root){root=jQuery(root);var player=root.find(".fp-player"),had_no_volume=root.hasClass("no-volume"),had_fp_mute=root.hasClass("fp-mute"),had_fp_full=root.hasClass("fp-full"),had_fp_slim=root.hasClass("fp-slim"),timeline=root.find(".fp-timeline"),buttons_count=0;function check_size(){var width=player.width()||root.width();if(width>900){jQuery(".fp-subtitle",root).addClass("is-wide")}else{jQuery(".fp-subtitle",root).removeClass("is-wide")}root.toggleClass("is-tiny",width<400);root.toggleClass("is-small",width<600&&width>=400);var too_narrow=width<480+buttons_count*35;if(!had_fp_full){root.toggleClass("fp-full",root.hasClass("has-abloop")||too_narrow)}if(had_fp_slim){root.toggleClass("fp-slim",!too_narrow||root.hasClass("has-abloop"))}var size="";if(width<400)size="is-tiny";else if(width<600&&width>=400)size="is-small";root.trigger("fv-player-size",[size]);var el=player;if(root.parent().hasClass("fp-playlist-vertical-wrapper")||root.parent().hasClass("fp-playlist-text-wrapper"))el=root.parent();if(el.width()<=560){el.addClass("is-fv-narrow")}else{el.removeClass("is-fv-narrow")}if(width<=320){root.addClass("no-volume fp-mute")}else{if(!had_no_volume)root.removeClass("no-volume");if(!had_fp_mute)root.removeClass("fp-mute")}}check_size();jQuery(window).on("resize",check_size);api.on("ready fullscreen fullscreen-exit sticky sticky-exit",function(e){setTimeout(function(){buttons_count=root.find(".fp-controls > strong:visible").length+root.find(".fp-controls > .fp-icon:visible").length;check_size()},0)});api.on("unload pause finish error",function(){if(typeof checker!=="undefined")clearInterval(checker)})});jQuery(window).on("resize tabsactivate",function(){jQuery(".fp-playlist-external").each(function(){var playlist=jQuery(this);if(playlist.parent().width()>=900)playlist.addClass("is-wide");else playlist.removeClass("is-wide")})}).trigger("resize");flowplayer(function(api,root){api.bind("ready",function(){if(/Chrome/.test(navigator.userAgent)&&parseFloat(/Chrome\/(\d\d)/.exec(navigator.userAgent)[1],10)>54){if(api.video.subtitles){jQuery(root).addClass("chrome55fix-subtitles")}else{jQuery(root).addClass("chrome55fix")}}});root=jQuery(root);var image_src=root.css("background-image");if(image_src){image_src=image_src.replace(/url\((['"])?(.*?)\1\)/gi,"$2").split(",");if(!image_src||!image_src[0].match(/^(https?:)?\/\//))return;var image=new Image;image.src=image_src[0];var image_ratio=image.height/image.width;var player_ratio=root.height()/root.width();var ratio_diff=Math.abs(player_ratio-image_ratio);if(ratio_diff<.05){root.css("background-size","cover")}}});(function($){$(window).on("resize",function(){var iframe=$("iframe[id][src][height][width]");iframe.each(function(){if($(this).attr("id").match(/(fv_vimeo_)|(fv_ytplayer_)/)&&$(this).width()<=$(this).attr("width"))$(this).height($(this).width()*$(this).attr("height")/$(this).attr("width"))});var wistia=jQuery(".wistia_embed");wistia.each(function(){$(this).height($(this).width()*$(this).data("ratio"))})}).trigger("resize")})(jQuery);jQuery(document).on("tabsactivate",".fv_flowplayer_tabs_content",function(event,ui){var oldPlayer=jQuery(".flowplayer.is-playing").data("flowplayer");if(typeof oldPlayer!="undefined"){oldPlayer.pause()}var objPlayer=jQuery(".flowplayer",ui.newPanel);var api=objPlayer.data("flowplayer");api.load()});flowplayer(function(api,root){root=jQuery(root);var bean=flowplayer.bean;if(root.hasClass("is-audio")){bean.off(root[0],"mouseenter");bean.off(root[0],"mouseleave");root.removeClass("is-mouseout");root.addClass("fixed-controls").addClass("is-mouseover");api.on("error",function(e,api,error){jQuery(".fp-message",root).html(jQuery(".fp-message",root).html().replace(/video/,"audio"))});root.on("click",function(e){if(!api.ready){e.preventDefault();e.stopPropagation();api.load()}})}});flowplayer(function(api,root){if(!api.conf.fv_chromecast)return;if(!window["__onGCastApiAvailable"]){jQuery.getScript({url:"https://www.gstatic.com/cv/js/sender/v1/cast_sender.js",cache:true});window["__onGCastApiAvailable"]=function(loaded){if(!loaded)return;initialize()}}var conf=api.conf.chromecast||{},session,timer,trigger,bean=flowplayer.bean,common=flowplayer.common,waiting_for_seek=false;function initialize(){var applicationId,sessionRequest,apiConfig;applicationId=conf.applicationId||chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID;sessionRequest=new chrome.cast.SessionRequest(applicationId);apiConfig=new chrome.cast.ApiConfig(sessionRequest,sessionListener,receiverListener);chrome.cast.initialize(apiConfig,onInitSuccess,onError)}function sessionListener(){}function receiverListener(ev){console.log("FV Player: Chromecast listener",ev);if(ev!==chrome.cast.ReceiverAvailability.AVAILABLE)return;flowplayer.conf.chromecast_available=true}function onInitSuccess(){}function onError(){console.log("chromecast onError")}function createUIElements(){var btnContainer=common.find(".fp-header",root)[0];if(!btnContainer)return;common.find(".fp-chromecast",btnContainer).forEach(common.removeNode);common.find(".fp-chromecast-engine",root).forEach(common.removeNode);trigger=common.createElement("a",{class:"fp-chromecast fp-icon",title:"Play on Cast device"});btnContainer.appendChild(trigger);var chromeCastEngine=common.createElement("div",{class:"fp-chromecast-engine"}),chromeCastStatus=common.createElement("p",{class:"fp-chromecast-engine-status"}),chromeCastIcon=common.createElement("p",{class:"fp-chromecast-engine-icon"});chromeCastEngine.appendChild(chromeCastIcon);chromeCastEngine.appendChild(chromeCastStatus);var engine=common.find(".fp-engine",root)[0];if(!engine)common.prepend(common.find(".fp-player",root)[0]||root,chromeCastEngine);else engine.parentNode.insertBefore(chromeCastEngine,engine)}function destroy(){clearInterval(timer);timer=null;api.release();common.toggleClass(root,"is-chromecast",false);common.toggleClass(trigger,"fp-active",false)}function get_media(){var media=false;var sources=api.video.sources_fvqs||api.video.sources;for(var i in sources){var type=sources[i].type;if(type=="video/mp4"||type=="video/fv-mp4"||type=="application/dash+xml"){media=sources[i];break}}if(!media){for(var i in sources){if(sources[i].type=="application/x-mpegurl"){media=sources[i];break}}}if(api.video.fvhkey&&!api.conf.hls_cast)return false;if(media){var top_quality=false,mp4_qualities=["fullhd","hd","md","sd"];for(var quality in mp4_qualities){var re=new RegExp("-"+mp4_qualities[quality]);for(var i in api.video.sources_fvqs){var source=api.video.sources_fvqs[i];if(source.src.match(re)&&source.type=="video/mp4"){top_quality=source;break}}if(top_quality){media=top_quality;break}}}return media}function load_media(){var media=get_media();if(!media){return false}var cast_subtitles=[];if(api.video.subtitles){api.video.subtitles.forEach(function(v,k){if(v.src.match(/\.srt/)){console.log("FV Player: Chromecast doesn't support SRT subtitles")}var subtitles=new chrome.cast.media.Track(k,chrome.cast.media.TrackType.TEXT);subtitles.trackContentId=v.src;subtitles.trackContentType="text/vtt";subtitles.subtype=chrome.cast.media.TextTrackType.SUBTITLES;subtitles.name=v.label;subtitles.language=v.srclang+"-"+k,subtitles.customData=null;cast_subtitles.push(subtitles)})}var mediaInfo=new chrome.cast.media.MediaInfo(media.src,media.type);mediaInfo.tracks=cast_subtitles;var request=new chrome.cast.media.LoadRequest(mediaInfo);if(!api.live){request.currentTime=api.video.time}clearInterval(timer);timer=false;session.loadMedia(request,onMediaDiscovered,function onMediaError(e){console.log("onMediaError",e)})}function onMediaDiscovered(chromecast){switch_tracks(chromecast);chromecast.addUpdateListener(function(alive){if(!session)return;timer=timer||setInterval(function(){api.trigger("progress",[api,chromecast.getEstimatedTime()]);chromecast.activeTrackIds.forEach(function(track_id){jQuery.each(chromecast.media.tracks,function(k,v){if(v.trackId==track_id&&v.type=="AUDIO"){var found=hilight_audio_track("data-audio",v.language);if(!found){hilight_audio_track("data-lang",v.language)}return false}})})},500);if(alive){common.toggleClass(root,"is-chromecast",true);common.toggleClass(trigger,"fp-active",true);api.hijack({pause:function(){console.log("hijacked pause!");chromecast.pause()},resume:function(){if(api.finished){clearInterval(timer);timer=null;api.release();load_media();return}chromecast.play()},seek:function(time){var req=new chrome.cast.media.SeekRequest;req.currentTime=time;chromecast.seek(req)}})}var playerState=chromecast.playerState;if(api.paused&&playerState===chrome.cast.media.PlayerState.PLAYING)api.trigger("resume",[api]);if(api.playing&&playerState===chrome.cast.media.PlayerState.PAUSED)api.trigger("pause",[api]);if(api.seeking&&playerState===chrome.cast.media.PlayerState.BUFFERING){waiting_for_seek=true}if(api.seeking&&playerState===chrome.cast.media.PlayerState.PLAYING&&waiting_for_seek){waiting_for_seek=false;api.trigger("seek",[api])}if(playerState==chrome.cast.media.PlayerState.IDLE&&chromecast.idleReason==chrome.cast.media.IdleReason.FINISHED){api.trigger("finish",[api])}common.toggleClass(root,"is-loading",playerState===chrome.cast.media.PlayerState.BUFFERING)})}api.bind("ready",function(e,api,video){if(session){if(get_media()){api.one("progress",function(e,api){api.release();api.pause();api.mute(false,true);load_media()});api.mute(true,true)}else{session.stop();session=null;destroy();jQuery(trigger).hide()}return}if(!flowplayer.conf.chromecast_available)return;if(get_media()){createUIElements();jQuery(trigger).show()}else{FV_Flowplayer_Pro.log("FV Player: Can't find media source suitable for Chromecast!");jQuery(trigger).hide()}});bean.on(root,"click",".fp-chromecast",function(ev){ev.preventDefault();if(session){api.trigger("pause",[api]);if(session.media[0].media){var seek=session.media[0].getEstimatedTime();setTimeout(function(){api.seek(seek)},0)}session.stop();session=null;destroy();return}if(api.playing)api.pause();chrome.cast.requestSession(function(s){jQuery(root).addClass("is-loading");session=s;var receiverName=session.receiver.friendlyName;common.html(common.find(".fp-chromecast-engine-status",root)[0],"Playing on device "+receiverName);load_media()},function(err){console.error("requestSession error",err)})});bean.on(root,"click",".fv-fp-hls-menu [data-audio], .fp-subtitle-menu [data-subtitle-index]",function(){if(session&&session.media[0].media){switch_tracks(session.media[0]);return false}});jQuery(window).on("unload",function(){if(session){session.stop()}});function hilight_audio_track(attr,chromecast_language){var audio_tracks_menu=jQuery(root).find(".fv-fp-hls-menu a"),found=false;audio_tracks_menu.each(function(k,el){if(jQuery(el).attr(attr)===chromecast_language){jQuery(el).addClass("fp-selected");found=true}else{jQuery(el).removeClass("fp-selected")}});return found}function switch_tracks(chromecast){console.log(chromecast.media.tracks);var audio=jQuery(root).find(".fv-fp-hls-menu [data-audio].fp-selected").data("audio"),audio_lang=jQuery(root).find(".fv-fp-hls-menu [data-audio].fp-selected").data("lang"),subtitle_index=jQuery(root).find(".fp-subtitle-menu [data-subtitle-index].fp-selected").data("subtitle-index"),subtitles=subtitle_index>-1?api.video.subtitles[subtitle_index].srclang:false;var audio_found=false,subtitles_found=false,tracks_selected=[];jQuery.each(chromecast.media.tracks,function(k,v){if(v.language==audio&&v.type=="AUDIO"){audio_found=v}if(v.language==subtitles+"-"+subtitle_index&&v.type=="TEXT"){subtitles_found=v}});if(!audio_found){jQuery.each(chromecast.media.tracks,function(k,v){if(v.language==audio_lang&&v.type=="AUDIO"){audio_found=v;return false}})}var debug_log="";if(audio_found){tracks_selected.push(audio_found.trackId);debug_log+=audio_found.language+" audio"}if(subtitles_found){tracks_selected.push(subtitles_found.trackId);if(debug_log)debug_log+=" ";debug_log+=subtitles_found.language+" subtitles"}if(tracks_selected){var request=new chrome.cast.media.EditTracksInfoRequest(tracks_selected);chromecast.editTracksInfo(request,function(){console.log("FV Player: Chromecast "+debug_log+" loaded")},function(){console.log("FV Player: Chromecast "+debug_log+" failed")})}}});jQuery(document).on("mfpClose",function(){if(typeof jQuery(".flowplayer").data("flowplayer")!="undefined")jQuery(".flowplayer").data("flowplayer").unload()});jQuery(document).on("click",".vc_tta-tab a",function(){var api=jQuery(".flowplayer.is-playing").data("flowplayer");if(api)api.pause()});flowplayer(function(api,root){root=jQuery(root);api.bind("ready",function(){setTimeout(function(){var video=jQuery("video",root);if(video.length>0){video.prop("autoplay",false)}},100);root.find("video.fp-engine").addClass("intrinsic-ignore")})});jQuery(".flowplayer").on("ready",function(e,api){if(/BB10/.test(navigator.userAgent)){api.fullscreen()}});var fv_flowplayer_safety_resize_arr=Array();function fv_flowplayer_safety_resize(){var fv_flowplayer_safety_resize_init=false;jQuery(".flowplayer").each(function(){if(!jQuery(this).is(":visible")||jQuery(this).hasClass("lightboxed")||jQuery(this).hasClass("lightbox-starter")||jQuery(this).hasClass("is-audio"))return;if(jQuery(this).width()<30||jQuery(this).height()<20){fv_flowplayer_safety_resize_init=true;var el=jQuery(this);while(jQuery(el).width()<30||jQuery(el).width()==jQuery(this).width()){if(jQuery(el).parent().length==0)break;el=jQuery(el).parent()}jQuery(this).width(jQuery(el).width());jQuery(this).height(parseInt(jQuery(this).width()*jQuery(this).attr("data-ratio")));fv_flowplayer_safety_resize_arr[jQuery(this).attr("id")]=el}});if(fv_flowplayer_safety_resize_init){jQuery(window).resize(function(){jQuery(".flowplayer").each(function(){if(jQuery(this).hasClass("lightboxed")||jQuery(this).hasClass("lightbox-starter"))return;if(fv_flowplayer_safety_resize_arr[jQuery(this).attr("id")]){jQuery(this).width(fv_flowplayer_safety_resize_arr[jQuery(this).attr("id")].width());jQuery(this).height(parseInt(jQuery(this).width()*jQuery(this).attr("data-ratio")))}})})}}if(typeof flowplayer.conf.safety_resize!="undefined"&&flowplayer.conf.safety_resize){jQuery(document).ready(function(){setTimeout(function(){fv_flowplayer_safety_resize()},10)})}var isIE11=!!navigator.userAgent.match(/Trident.*rv[ :]*11\./);if(isIE11){jQuery(document).ready(function(){jQuery(".fp-waiting").hide()});flowplayer(function(api,root){api.bind("load",function(e){jQuery(e.currentTarget).find(".fp-waiting").show()}).bind("beforeseek",function(e){jQuery(e.currentTarget).find(".fp-waiting").show()}).bind("progress",function(e){jQuery(e.currentTarget).find(".fp-waiting").hide()}).bind("seek",function(e){jQuery(e.currentTarget).find(".fp-waiting").hide()}).bind("fullscreen",function(e){jQuery("#wpadminbar").hide()}).bind("fullscreen-exit",function(e){jQuery("#wpadminbar").show()})})}if(flowplayer.support.browser&&flowplayer.support.browser.msie&&parseInt(flowplayer.support.browser.version,10)<9){jQuery(".flowplayer").each(function(){jQuery(this).css("width",jQuery(this).css("max-width"));jQuery(this).css("height",jQuery(this).css("max-height"))})}if(location.href.match(/elementor-preview=/)){console.log("FV Player: Elementor editor is active");setInterval(fv_player_load,1e3)}else if(location.href.match(/brizy-edit-iframe/)){console.log("FV Player: Brizy editor is active");setInterval(fv_player_load,1e3)}if(window.DELEGATE_NAMES){flowplayer(function(api,root){fv_player_notice(root,fv_flowplayer_translations.chrome_extension_disable_html5_autoplay)})}if(location.href.match(/elementor-preview=/)){console.log("FV Player: Elementor editor is active");setInterval(fv_player_load,1e3)}flowplayer(function(player,root){root=jQuery(root);if(typeof root.data("fv-embed")=="undefined"||!root.data("fv-embed")||root.data("fv-embed")=="false")return;player.embedCode=function(){var video=player.video;var width=root.width();var height=root.height();height+=2;if(root.hasClass("has-chapters")||root.hasClass("has-transcript")){height+=300}if(jQuery(".fp-playlist-external[rel="+root.attr("id")+"]").length>0){height+=150+20}var link=root.data("fv-embed")+"#"+fv_player_get_video_link_hash(player);return'<iframe src="'+link+'" allowfullscreen width="'+width+'" height="'+height+'" frameborder="0" style="max-width:100%"></iframe>'}});jQuery(document).on("click",".flowplayer .embed-code-toggle",function(){var button=jQuery(this);var player=button.parents(".flowplayer");var api=player.data("flowplayer");if(typeof api.embedCode=="function"){player.find(".embed-code textarea").val(api.embedCode())}fv_player_clipboard(player.find(".embed-code textarea").val(),function(){fv_player_notice(player,fv_flowplayer_translations.embed_copied,2e3)},function(){button.parents(".fvp-share-bar").find(".embed-code").toggle();button.parents(".fvp-share-bar").toggleClass("visible")});return false});flowplayer(function(player,root){if(jQuery(root).data("fullscreen")==false){return}player.one("ready",function(e,api,video){if(jQuery(root).find(".fp-fullscreen").length==0){jQuery(root).find(".fp-header").append('<a class="fp-fullscreen fp-icon"></a>')}});var FS_ENTER="fullscreen",FS_EXIT="fullscreen-exit",FS_SUPPORT=flowplayer.support.fullscreen,win=window,scrollX,scrollY;player.fullscreen=function(flag){var wrapper=jQuery(root).find(".fp-player")[0];if(player.disabled)return;if(flag===undefined)flag=!player.isFullscreen;if(flag){scrollY=win.scrollY;scrollX=win.scrollX}if(FS_SUPPORT){if(flag){["requestFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].forEach(function(fName){if(typeof wrapper[fName]==="function"){wrapper[fName]({navigationUI:"hide"});if(fName==="webkitRequestFullScreen"&&!document.webkitFullscreenElement){wrapper[fName]()}}})}else{["exitFullscreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].forEach(function(fName){if(typeof document[fName]==="function"){document[fName]()}})}}else{player.trigger(flag?FS_ENTER:FS_EXIT,[player])}return player};var lastClick,common=flowplayer.common;player.on("mousedown.fs",function(){if(+new Date-lastClick<150&&player.ready)player.fullscreen();lastClick=+new Date});player.on(FS_ENTER,function(){common.addClass(root,"is-fullscreen");common.toggleClass(root,"fp-minimal-fullscreen",common.hasClass(root,"fp-minimal"));common.removeClass(root,"fp-minimal");if(!FS_SUPPORT)common.css(root,"position","fixed");player.isFullscreen=true}).on(FS_EXIT,function(){var oldOpacity;common.toggleClass(root,"fp-minimal",common.hasClass(root,"fp-minimal-fullscreen"));common.removeClass(root,"fp-minimal-fullscreen");if(!FS_SUPPORT&&player.engine==="html5"){oldOpacity=root.css("opacity")||"";common.css(root,"opacity",0)}if(!FS_SUPPORT)common.css(root,"position","");common.removeClass(root,"is-fullscreen");if(!FS_SUPPORT&&player.engine==="html5")setTimeout(function(){root.css("opacity",oldOpacity)});player.isFullscreen=false;if(player.engine.engineName!="fvyoutube"){win.scrollTo(scrollX,scrollY)}}).on("unload",function(){if(player.isFullscreen)player.fullscreen()});player.on("shutdown",function(){FULL_PLAYER=null;common.removeNode(wrapper)})});flowplayer(function(api,root){root=jQuery(root);if(flowplayer.conf.wpadmin||jQuery(root).hasClass("is-audio"))return;var playlist=jQuery(".fp-playlist-external[rel="+root.attr("id")+"]"),playlist_with_fullscreen=playlist.hasClass("fp-playlist-season")||playlist.hasClass("fp-playlist-polaroid");fsforce=root.data("fsforce")==true;if(root.data("fullscreen")==false){return}if(flowplayer.conf.mobile_force_fullscreen&&flowplayer.support.fvmobile||!flowplayer.support.fullscreen&&fsforce||playlist_with_fullscreen){if(!flowplayer.support.fullscreen){api.bind("ready",function(){if(api.video.vr)return;api.fullscreen(true)})}root.on("click",function(){if(!api.ready||api.paused)api.fullscreen(true)});jQuery("[rel="+root.attr("id")+"] a").on("click",function(e){if(!api.isFullscreen){api.fullscreen();api.resume()}});api.on("resume",function(){if(api.video.vr)return;if(!api.isFullscreen)api.fullscreen()});api.on("finish",function(){if(api.conf.playlist.length==0||api.conf.playlist.length-1==api.video.index)api.fullscreen(false)}).on("fullscreen",function(a,api){root.addClass("forced-fullscreen")}).on("fullscreen-exit",function(a,api){api.pause();root.removeClass("forced-fullscreen")})}else if(fsforce){var position,unload=root.find(".fp-unload"),is_closing=false;api.isFakeFullscreen=false;unload.show();root.on("click",function(e){if(!api.ready&&e.target!=unload[0])api.fakeFullscreen(true)});unload.on("click",function(e){if(api.ready){api.fullscreen(false)}else if(api.loading){is_closing=true;api.one("resume",function(e){is_closing=false;api.pause()})}api.fakeFullscreen(false);return false});jQuery("[rel="+root.attr("id")+"] a").on("click",function(e){if(!api.isFakeFullscreen){api.fakeFullscreen();api.resume()}});api.on("resume",function(){if(!is_closing&&!api.isFakeFullscreen)api.fakeFullscreen()}).on("finish",function(){if(api.conf.playlist.length==0||api.conf.playlist.length-1==api.video.index)api.fakeFullscreen(false)}).on("fullscreen",function(a,api){root.removeClass("fake-fullscreen")}).on("fullscreen-exit",function(a,api){if(api.isFakeFullscreen)api.fakeFullscreen(true,true)}).on("unload",function(a,api){});api.fakeFullscreen=function(flag,force){if(!force&&(api.isFakeFullscreen==flag||api.disabled))return;if(position===undefined)position=root.css("position");if(flag===undefined)flag=!api.isFakeFullscreen;api.isFakeFullscreen=flag;api.trigger(flag?"fakefullscreen":"fakefullscreen-exit",[api]);root.toggleClass("is-fullscreen fake-fullscreen forced-fullscreen",flag);if(flag){root.css("position","fixed")}else{root.css("position",position)}}}if(flowplayer.support.android&&flowplayer.conf.mobile_landscape_fullscreen&&window.screen&&window.screen.orientation){api.on("fullscreen",function(a,api){if(typeof api.video.width!="undefined"&&typeof api.video.height!="undefined"&&(api.video.width!=0&&api.video.height!=0&&api.video.width<api.video.height)){screen.orientation.lock("portrait-primary")}else{screen.orientation.lock("landscape-primary")}})}});flowplayer(function(api,root){root=jQuery(root);var hlsjs,player,audioUXGroup,audioGroups,hls_audio_button,hls_audio_menu,mse=window.MediaSource||window.WebKitMediaSource;flowplayer.engine("hlsjs-lite").plugin(function(params){hlsjs=params.hls});api.bind("ready",function(e,api){removeAudioMenu();if(hlsjs&&api.video.type=="application/x-mpegurl"){parseAudioTracksHlsJs(hlsjs);createAudioMenu()}});api.one("progress",function(){if(api.engine.engineName=="html5"&&api.video.type=="application/x-mpegurl"){parseAudioTracksSafari();createAudioMenu()}});function getVideoTagAudioTracks(){var video=root.find("video");if(video.length&&video[0].audioTracks){return video[0].audioTracks}return[]}function hilightAudioTrack(audioTrack){if(!audioTrack.name)audioTrack.name=audioTrack.label;root.find(".fv-fp-hls-menu a").each(function(k,el){jQuery(el).toggleClass("fp-selected",jQuery(el).attr("data-audio")===audioTrack.name)})}function createAudioMenu(){if(!audioUXGroup||audioUXGroup.length<2){return}hls_audio_button=jQuery('<strong class="fv-fp-hls">AUD</strong>');hls_audio_menu=jQuery('<div class="fp-menu fv-fp-hls-menu"></div>').insertAfter(root.find(".fp-controls"));hls_audio_menu.append("<strong>Audio</strong>");audioUXGroup.forEach(function(audioTrack){hls_audio_menu.append('<a data-audio="'+audioTrack.name+'" data-lang="'+audioTrack.lang+'">'+audioTrack.name+"</a>")});hls_audio_button.insertAfter(root.find(".fp-controls .fp-volume")).on("click",function(e){e.preventDefault();e.stopPropagation();if(hls_audio_menu.hasClass("fp-active")){api.hideMenu(hls_audio_menu[0])}else{root.click();api.showMenu(hls_audio_menu[0])}});jQuery("a",hls_audio_menu).on("click",function(e){var adata=e.target.getAttribute("data-audio");if(hlsjs){var gid=hlsjs.audioTracks[hlsjs.audioTrack].groupId;var atrack=hlsjs.audioTracks.filter(function(at){return at.groupId===gid&&(at.name===adata||at.lang===adata)})[0];hlsjs.audioTrack=atrack.id;hilightAudioTrack(atrack)}else{var tracks=getVideoTagAudioTracks();for(var i in tracks){if(!tracks.hasOwnProperty(i))continue;if(tracks[i].label==adata){tracks[i].enabled=true;hilightAudioTrack(tracks[i])}}}});if(hlsjs){hilightAudioTrack(hlsjs.audioTracks[hlsjs.audioTrack])}else{var tracks=getVideoTagAudioTracks();for(var i in tracks){if(!tracks.hasOwnProperty(i))continue;if(tracks[i].enabled){hilightAudioTrack(tracks[i])}}}}function removeAudioMenu(){jQuery(hls_audio_menu).remove();jQuery(hls_audio_button).remove()}function parseAudioTracksHlsJs(data){audioGroups=[];audioUXGroup=[];data.levels.forEach(function(level){var agroup=level.attrs.AUDIO;if(agroup&&audioGroups.indexOf(agroup)<0){audioGroups.push(agroup)}if(audioGroups.length){audioUXGroup=data.audioTracks.filter(function(audioTrack){return audioTrack.groupId===audioGroups[0]})}})}function parseAudioTracksSafari(){audioGroups=[];audioUXGroup=[];var tracks=getVideoTagAudioTracks();for(var i in tracks){if(!tracks.hasOwnProperty(i))continue;audioUXGroup.push({id:tracks[i].id,name:tracks[i].label})}}});flowplayer(function(api,root){var store_engine_pos=-1;var store_engine=false;api.on("error",function(e,api,err){if(err.code!=4||api.engine.engineName!="hlsjs")return;console.log("FV Player: HLSJS failed to play the video, switching to Flash HLS");api.error=api.loading=false;jQuery(root).removeClass("is-error");jQuery(flowplayer.engines).each(function(k,v){if(flowplayer.engines[k].engineName=="hlsjs"){store_engine_pos=k;store_engine=flowplayer.engines[k];delete flowplayer.engines[k]}});var index=typeof api.video.index!="undefined"?api.video.index:0;var video=index>0?api.conf.playlist[index].sources:api.conf.clip.sources;video.index=index;api.load({sources:video});api.bind("unload error",function(){flowplayer.engines[store_engine_pos]=store_engine})})});flowplayer(function(api,root){var initialDelay=30,continueDelay=10,useDelay=initialDelay,retryLabel=fv_flowplayer_translations.live_stream_retry,timer;api.clearLiveStreamCountdown=function(){if(timer){clearInterval(timer);api.error=api.loading=false;jQuery(root).removeClass("is-error");jQuery(root).find(".fp-message.fp-shown").remove();api.unload()}};api.conf.flashls={manifestloadmaxretry:2};api.on("ready",function(){useDelay=initialDelay;retryLabel=fv_flowplayer_translations.live_stream_retry}).on("progress",function(){useDelay=continueDelay;retryLabel=fv_flowplayer_translations.live_stream_continue});api.on("error",function(e,api,err){setTimeout(function(){if(!api.conf.clip.live&&!api.conf.live&&!(err.video&&err.video.src.match(/\/\/vimeo.com\/event\//)))return;var delay=useDelay;if(api.conf.clip.streaming_time){delay=api.conf.clip.streaming_time-Math.floor(Date.now()/1e3)}else if(api.conf.clip.live_starts_in){delay=api.conf.clip.live_starts_in}var startLabel=fv_flowplayer_translations.live_stream_starting.replace(/%d/,secondsToDhms(delay));retryLabel=retryLabel.replace(/%d/,secondsToDhms(delay));var message=api.conf.clip.live_starts_in?startLabel:retryLabel;clearInterval(timer);if(err.code===1||err.code===2||err.code===4){root.className+=" is-offline";if(flowplayer.support.flashVideo){api.one("flashdisabled",function(){root.querySelector(".fp-flash-disabled").style.display="none"})}var messageElement=root.querySelector(".fp-ui .fp-message");messageElement.innerHTML=message;var reload_delay=delay>300?300:delay;timer=setInterval(function(){reload_delay-=1;delay-=1;if(reload_delay>0&&messageElement){messageElement.querySelector("span").innerHTML=secondsToDhms(delay)}else{clearInterval(timer);api.error=api.loading=false;messageElement=root.querySelector(".fp-ui .fp-message");if(messageElement){root.querySelector(".fp-ui").removeChild(messageElement)}root.className=root.className.replace(/\bis-(error|offline)\b/g,"");api.load()}},1e3)}},1)});function secondsToDhms(seconds){seconds=Number(seconds);var d=Math.floor(seconds/(3600*24));var h=Math.floor(seconds%(3600*24)/3600);var m=Math.floor(seconds%3600/60);var s=Math.floor(seconds%60);var t=fv_flowplayer_translations;var output=d>0?d==1?t.duration_1_day.replace(/%s/,d):t.duration_n_days.replace(/%s/,d):"";if(output&&h>0)output+=", ";output+=h>0?h==1?t.duration_1_hour.replace(/%s/,h):t.duration_n_hours.replace(/%s/,h):"";if(output&&m>0)output+=", ";output+=m>0?m==1?t.duration_1_minute.replace(/%s/,m):t.duration_n_minutes.replace(/%s/,m):"";if(output&&s>0)output+=t.and;output+=s>0?s==1?t.duration_1_second.replace(/%s/,s):t.duration_n_seconds.replace(/%s/,s):"";return output}});flowplayer(function(api,root){if(!flowplayer.support.browser.safari&&!flowplayer.support.iOS)return;root=jQuery(root);var video_tag=false,did_start_playing=false,are_waiting_already=0;api.on("ready",function(e,api,video){are_waiting_already=0;did_start_playing=false;if(api.engine.engineName=="html5"&&video.src.match(/\?/)){video_tag=root.find("video");if(!video_tag.data("fv-ios-recovery")){video_tag.on("waiting",wait_for_stalled);video_tag.data("fv-ios-recovery",true)}api.one("progress",function(){did_start_playing=true})}});api.bind("beforeseek",wait_for_stalled);function debug(e){console.log("FV PLayer: iOS video element: "+e.type)}function wait_for_stalled(){if(!did_start_playing){return}if(video_tag&&api.engine.engineName=="html5"){are_waiting_already++;if(are_waiting_already>1){if(are_waiting_already>3){console.log("FV PLayer: iOS video element needs a push, triggering 'stalled'");video_tag.trigger("stalled")}return}console.log("FV PLayer: iOS video element will trigger error after 'stalled' arrives");video_tag.one("stalled",function(){var time=api.video.time;if(api.video.type.match(/video\//)){console.log("FV PLayer: Running check of video file...");var test_video=document.createElement("video");test_video.src=api.video.src;test_video.onloadedmetadata=function(){are_waiting_already=0;console.log("FV Player: Video link works")};test_video.onerror=function(){console.log("FV Player: Video link issue!");if(are_waiting_already>0){api.trigger("error",[api,{code:4,video:api.video}])}};return}setTimeout(function(){console.log(api.video.time,time);if(api.video.time!=time){console.log("FV PLayer: iOS video element continues playing, no need for error");return}if(api.paused){console.log("FV PLayer: iOS video element paused, no need for error");return}api.trigger("error",[api,{code:4,video:api.video}])},5e3)})}}});!function(e){var n=!1;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var o=window.Cookies,t=window.Cookies=e();t.noConflict=function(){return window.Cookies=o,t}}}(function(){function e(){for(var e=0,n={};e<arguments.length;e++){var o=arguments[e];for(var t in o)n[t]=o[t]}return n}function n(o){function t(n,r,i){var c;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(i=e({path:"/"},t.defaults,i)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(r),/^[\{\[]/.test(c)&&(r=c)}catch(e){}r=o.write?o.write(r,n):encodeURIComponent(r+"").replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=(n=(n=encodeURIComponent(n+"")).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var s="";for(var f in i)i[f]&&(s+="; "+f,!0!==i[f]&&(s+="="+i[f]));return document.cookie=n+"="+r+s}n||(c={});for(var p=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,u=0;u<p.length;u++){var l=p[u].split("="),C=l.slice(1).join("=");this.json||'"'!==C.charAt(0)||(C=C.slice(1,-1));try{var m=l[0].replace(d,decodeURIComponent);if(C=o.read?o.read(C,m):o(C,m)||C.replace(d,decodeURIComponent),this.json)try{C=JSON.parse(C)}catch(e){}if(n===m){c=C;break}n||(c[m]=C)}catch(e){}}return c}}return t.set=t,t.get=function(e){return t.call(t,e)},t.getJSON=function(){return t.apply({json:!0},[].slice.call(arguments))},t.defaults={},t.remove=function(n,o){t(n,"",e(o,{expires:-1}))},t.withConverter=n,t}return n(function(){})});flowplayer.bean.off(document,"keydown.fp");flowplayer(function(api,root){var bean=flowplayer.bean;if(!api.conf.keyboard)return;bean.on(root,"mouseenter mouseleave",function(e){fv_player_focused=!api.disabled&&e.type=="mouseover"?api:0;if(fv_player_focused)fv_player_focusedRoot=root});api.bind("ready",function(e,api,video){if(video.subtitles&&video.subtitles.length>0){var help=jQuery(root).find(".fp-help").html();help+='<div class="fp-help-section fp-help-subtitles"><p><em>c</em>cycle through subtitles</p></div>';jQuery(root).find(".fp-help").html(help)}else{jQuery(root).find(".fp-help-subtitles").remove()}})});flowplayer.bean.on(document,"keydown.fp",function(e){if(typeof fv_player_focused=="undefined")return;var api=fv_player_focused,focusedRoot=api?fv_player_focusedRoot:false,common=flowplayer.common;var el=api&&!api.disabled?api:0,metaKeyPressed=e.ctrlKey||e.metaKey||e.altKey,key=e.which,conf=el&&el.conf;if(common.hasClass(focusedRoot,"no-controlbar")||common.hasClass(focusedRoot,"is-cva"))return;if(!el||!conf.keyboard||el.disabled)return;if([63,187,191].indexOf(key)!=-1){common.toggleClass(focusedRoot,"is-help");return false}if(key==27&&common.hasClass(focusedRoot,"is-help")){common.toggleClass(focusedRoot,"is-help");return false}if(!metaKeyPressed&&el.ready){e.preventDefault();if(e.shiftKey){if(key==39)el.speed(true);else if(key==37)el.speed(false);else if(key==78)el.next();else if(key==80)el.prev();return}if(key<58&&key>47)return el.seekTo(key-48);switch(key){case 38:case 75:el.volume(el.volumeLevel+.15);break;case 40:case 74:el.volume(el.volumeLevel-.15);break;case 39:case 76:el.seeking=true;el.seek(api.video.time+5);break;case 37:case 72:el.seeking=true;el.seek(api.video.time-5);break;case 190:el.seekTo();break;case 32:el.toggle();break;case 70:if(conf.fullscreen)el.fullscreen();break;case 77:el.mute();break;case 81:el.unload();break;case 67:if(!api.video.subtitles||api.video.subtitles.length==0)break;var current_subtitles=jQuery(focusedRoot).find(".fp-dropdown li.active[data-subtitle-index]").data("subtitle-index");if(typeof current_subtitles=="undefined")current_subtitles=-1;current_subtitles++;if(current_subtitles>api.video.subtitles.length-1){current_subtitles=-1}api.trigger("fv-subtitles-switched");if(current_subtitles>-1){el.loadSubtitles(current_subtitles);fv_player_notice(focusedRoot,fv_flowplayer_translations.subtitles_switched+" "+api.video.subtitles[current_subtitles].label,"fv-subtitles-switched")}else{el.disableSubtitles();fv_player_notice(focusedRoot,fv_flowplayer_translations.subtitles_disabled,"fv-subtitles-switched")}break}}});flowplayer(function(api,root){api.bind("load",function(e,api,data){var player=jQuery(e.currentTarget);if(player.data("live")){var live_check=setTimeout(function(){player.find(".fp-ui").append('<div class="fp-message">'+fv_flowplayer_translations.live_stream_failed+"</div>");player.addClass("is-error")},1e4);jQuery(e.currentTarget).data("live_check",live_check)}}).bind("ready",function(e,api,data){clearInterval(jQuery(e.currentTarget).data("live_check"))}).bind("error",function(e,api,data){var player=jQuery(e.currentTarget);if(player.data("live")){player.find(".fp-message").html(fv_flowplayer_translations.live_stream_failed_2)}})});(function($){flowplayer(function(api,root){if(jQuery(root).hasClass("is-cva"))return;$(document).on("submit","#"+jQuery(root).attr("id")+" .mailchimp-form",function(e){e.preventDefault();$(".mailchimp-response",root).remove();$("input[type=submit]",root).attr("disabled","disabled").addClass("fv-form-loading");var data={action:"fv_wp_flowplayer_email_signup"};$("[name]",this).each(function(){data[this.name]=$(this).val()});$.post(fv_player.ajaxurl,data,function(response){response=JSON.parse(response);$('<div class="mailchimp-response"></div>').insertAfter(".mailchimp-form",root);if(response.text.match(/already subscribed/)){response.status="ERROR"}if(response.status==="OK"){$(".mailchimp-form input[type=text],.mailchimp-form input[type=email]",root).val("");$(".mailchimp-response",root).removeClass("is-fv-error").html(response.text);setTimeout(function(){$(".wpfp_custom_popup",root).fadeOut()},2e3)}else{$(".mailchimp-response",root).addClass("is-fv-error").html(response.text)}$("input[type=submit]",root).removeAttr("disabled").removeClass("fv-form-loading")})})})})(jQuery);function fv_flowplayer_mobile_switch(id){var regex=new RegExp("[\\?&]fv_flowplayer_mobile=([^&#]*)");var results=regex.exec(location.search);if((results!=null&&results[1]=="yes"||(jQuery(window).width()<=480||jQuery(window).height()<=480))&&(results==null||results[1]!="no")){var fv_fp_mobile=false;jQuery("#wpfp_"+id+" video source").each(function(){if(jQuery(this).attr("id")!="wpfp_"+id+"_mobile"){fv_fp_mobile=true;jQuery(this).remove()}});if(fv_fp_mobile){jQuery("#wpfp_"+id).after('<p class="fv-flowplayer-mobile-switch">'+fv_flowplayer_translations.mobile_browser_detected_1+' <a href="'+document.URL+'?fv_flowplayer_mobile=no">'+fv_flowplayer_translations.mobile_browser_detected_2+"</a>.</p>")}}}if(typeof fv_flowplayer_mobile_switch_array!="undefined"){for(var i in fv_flowplayer_mobile_switch_array){if(!fv_flowplayer_mobile_switch_array.hasOwnProperty(i))continue;fv_flowplayer_mobile_switch(i)}}flowplayer(function(api,root){if(!flowplayer.support.touch)return;jQuery.fn.fv_single_double_click=function(single_click_callback,double_click_callback,timeout){return this.each(function(){var clicks=0,self=this;jQuery(this).on("click",function(event){clicks++;if(clicks==1){setTimeout(function(){if(clicks==1){single_click_callback.call(self,event)}else{double_click_callback.call(self,event)}clicks=0},timeout||300)}})})};root=jQuery(root);var left=jQuery('<div class="fv-fp-tap-left"><span>-10s</span></div>'),right=jQuery('<div class="fv-fp-tap-right"><span>+10s</span></div>');left.fv_single_double_click(function(){api.toggle()},function(e){maybe_seek(e,left,api.ready?api.video.time-10:false)});right.fv_single_double_click(function(){api.toggle()},function(e){maybe_seek(e,right,api.ready?api.video.time+10:false)});root.find(".fp-ui").append(left).append(right);function maybe_seek(e,el,time){if(api.ready){api.seek(time);animation(el)}else{api.toggle()}e.preventDefault()}function animation(el){el.addClass("is-active");setTimeout(function(){el.removeClass("is-active")},500)}});flowplayer(function(api,root){root=jQuery(root);var instance_id=root.data("flowplayer-instance-id");flowplayer.audible_instance=-1;api.one("load",function(){setTimeout(function(){api.conf.splash=false},0)});api.on("ready",function(){var is_muted=root.data("volume")==0;if(!is_muted){flowplayer.audible_instance=instance_id}jQuery(".flowplayer[data-flowplayer-instance-id]").each(function(){var player=jQuery(this).data("flowplayer");var current_instance_id=jQuery(this).data("flowplayer-instance-id");if(flowplayer.audible_instance==-1||current_instance_id==flowplayer.audible_instance||current_instance_id==instance_id)return;if(player){if(player.ready){if(api.conf.multiple_playback){if(!is_muted){player.mute(true,true)}}else if(player.playing){player.pause()}}else{player.clearLiveStreamCountdown();player.unload()}}})}).on("mute",function(e,api,muted){if(!muted&&flowplayer.audible_instance!=instance_id){flowplayer(flowplayer.audible_instance).mute(true,true);flowplayer.audible_instance=instance_id}}).on("resume",function(){if(!api.conf.multiple_playback){jQuery(".flowplayer[data-flowplayer-instance-id]").each(function(){if(instance_id==jQuery(this).data("flowplayer-instance-id"))return;var player=jQuery(this).data("flowplayer");if(player&&player.playing){player.pause()}})}})});function fv_flowplayer_browser_ff_m4v(hash){if(flowplayer.support.browser&&flowplayer.support.browser.mozilla&&navigator.appVersion.indexOf("Win")!=-1){jQuery("#wpfp_"+hash).attr("data-engine","flash")}}if(typeof fv_flowplayer_browser_ff_m4v_array!="undefined"){for(var i in fv_flowplayer_browser_ff_m4v_array){if(!fv_flowplayer_browser_ff_m4v_array.hasOwnProperty(i))continue;fv_flowplayer_browser_ff_m4v(i)}}function fv_flowplayer_browser_chrome_fail(hash,sAttributes,sVideo,bAutobuffer){jQuery("#wpfp_"+hash).bind("error",function(e,api,error){if(/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&error!=null&&(error.code==3||error.code==4||error.code==5)){api.unload();jQuery("#wpfp_"+hash).attr("id","bad_wpfp_"+hash);jQuery("#bad_wpfp_"+hash).after('<div id="wpfp_'+hash+'" '+sAttributes+' data-engine="flash"></div>');jQuery("#wpfp_"+hash).flowplayer({playlist:[[{mp4:sVideo}]]});if(bAutobuffer){jQuery("#wpfp_"+hash).bind("ready",function(e,api){api.play()})}else{jQuery("#wpfp_"+hash).flowplayer().play(0)}jQuery("#bad_wpfp_"+hash).remove()}})}if(typeof fv_flowplayer_browser_chrome_fail_array!="undefined"){for(var i in fv_flowplayer_browser_chrome_fail_array){if(!fv_flowplayer_browser_chrome_fail_array.hasOwnProperty(i))continue;fv_flowplayer_browser_chrome_fail(i,fv_flowplayer_browser_chrome_fail_array[i]["attrs"],fv_flowplayer_browser_chrome_fail_array[i]["mp4"],fv_flowplayer_browser_chrome_fail_array[i]["auto_buffer"])}}function fv_flowplayer_browser_ie(hash){if(flowplayer.support.browser&&flowplayer.support.browser.msie&&parseInt(flowplayer.support.browser.version,10)>=9||!!navigator.userAgent.match(/Trident.*rv[ :]*11\./)){jQuery("#wpfp_"+hash).attr("data-engine","flash")}}if(typeof fv_flowplayer_browser_ie_array!="undefined"){for(var i in fv_flowplayer_browser_ie_array){if(!fv_flowplayer_browser_ie_array.hasOwnProperty(i))continue;fv_flowplayer_browser_ie(i)}}function fv_flowplayer_browser_chrome_mp4(hash){var match=window.navigator.appVersion.match(/Chrome\/(\d+)\./);if(match!=null){var chrome_ver=parseInt(match[1],10);if(/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&chrome_ver<28&&navigator.appVersion.indexOf("Win")!=-1||/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&chrome_ver<27&&navigator.appVersion.indexOf("Linux")!=-1&&navigator.userAgent.toLowerCase().indexOf("android")==-1){jQuery("#wpfp_"+hash).attr("data-engine","flash")}}}if(navigator.platform.indexOf("iPhone")!=-1||navigator.platform.indexOf("iPod")!=-1||navigator.platform.indexOf("iPad")!=-1||navigator.userAgent.toLowerCase().indexOf("android")!=-1){flowplayer(function(api,root){api.bind("error",function(e,api,error){if(error.code==10){jQuery(e.target).find(".fp-message").html(fv_flowplayer_translations.unsupported_format)}})})}jQuery(document).ready(function(){if(navigator.platform.indexOf("iPhone")!=-1||navigator.platform.indexOf("iPod")!=-1||navigator.platform.indexOf("iPad")!=-1){jQuery(window).trigger("load")}jQuery(".flowplayer").on("mouseleave",function(){jQuery(this).find(".fvp-share-bar").removeClass("visible");jQuery(this).find(".embed-code").hide()})});if(!Date.now){Date.now=function(){return(new Date).getTime()}}(function($){var sendPositionsEvery=60,ajaxCall=null,maxCookieSize=2500,localStorageEnabled=null,cookieKeyName="video_positions",tempPositionCookieKeyName="video_positions_tmp",tempSawCookieKeyName="video_saw_tmp",playPositions=[],sawVideo=[],getSerialized=function(data){var serialized=JSON.stringify(data),dataSize=getTextByteSize(serialized);if(dataSize>maxCookieSize){while(dataSize>maxCookieSize){for(var i in data){if(!data.hasOwnProperty(i))continue;delete data[i];serialized=JSON.stringify(data);dataSize=getTextByteSize(serialized);break}}}return serialized},getVideoId=function(video){if(video.id){return video.id}var out=typeof video.sources_original!="undefined"&&typeof video.sources_original[0]!="undefined"?video.sources_original[0].src:video.sources[0].src;if(typeof video.sources_original=="undefined"||typeof video.sources_original[0]=="undefined"){out=removeAWSSignatures(out)}return out},getTextByteSize=function(txt){return encodeURIComponent(txt).length},getCookieKey=function(key){return localStorageEnabled?localStorage.getItem(key):Cookies.get(key)},setCookieKey=function(key,value){return localStorageEnabled?localStorage.setItem(key,value):Cookies.set(key,value)},removeCookieKey=function(key){if(localStorageEnabled){localStorage.removeItem(key)}{Cookies.remove(key)}},removeVideoPosition=function(e,api){if(api.video.sources){var video_id=getVideoId(api.video);playPositions[video_id]=0;sawVideo[video_id]=1}},removeAWSSignatures=function(videoURL){return videoURL.replace(/(X-Amz-Algorithm=[^&]+&?)/gm,"").replace(/(X-Amz-Credential=[^&]+&?)/gm,"").replace(/(X-Amz-Date=[^&]+&?)/gm,"").replace(/(X-Amz-Expires=[^&]+&?)/gm,"").replace(/(X-Amz-SignedHeaders=[^&]+&?)/gm,"").replace(/(X-Amz-Signature=[^&]+&?)/gm,"")},sendVideoPositions=function(async,callback){var beaconSupported="sendBeacon"in navigator;if(async!==true){async=false}if(!callback||typeof callback=="undefined"){callback=function(){}}postData=[];for(var video_name in playPositions){if(!playPositions.hasOwnProperty(video_name))continue;postData.push({name:video_name,position:playPositions[video_name],saw:typeof sawVideo[video_name]!="undefined"?sawVideo[video_name]:false})}if(!postData.length){removeCookieKey(tempPositionCookieKeyName);removeCookieKey(tempSawCookieKeyName);return}if(flowplayer.conf.is_logged_in=="1"){if(beaconSupported){try{var temp_position_data={},temp_saw_data={};for(var i in postData){if(!postData.hasOwnProperty(i))continue;temp_position_data[postData[i].name]=postData[i].position;temp_saw_data[postData[i].name]=postData[i].saw}setCookieKey(tempPositionCookieKeyName,getSerialized(temp_position_data));setCookieKey(tempSawCookieKeyName,getSerialized(temp_saw_data))}catch(e){return}var fd=new FormData;fd.append("action","fv_wp_flowplayer_video_position_save");fd.append("videoTimes",encodeURIComponent(JSON.stringify(postData)));navigator.sendBeacon(fv_player.ajaxurl,fd);return false}else{return jQuery.ajax({type:"POST",async:async,url:fv_player.ajaxurl,complete:callback,data:{action:"fv_wp_flowplayer_video_position_save",videoTimes:postData}})}}else{try{var data=getCookieKey(cookieKeyName);if(data&&typeof data!=="undefined"){data=JSON.parse(data)}else{data={}}for(var i in postData){if(!postData.hasOwnProperty(i))continue;data[postData[i].name]=postData[i].position}var serialized=JSON.stringify(data),dataSize=getTextByteSize(serialized);if(dataSize>maxCookieSize){while(dataSize>maxCookieSize){for(var i in data){if(!data.hasOwnProperty(i))continue;delete data[i];serialized=JSON.stringify(data);dataSize=getTextByteSize(serialized);break}}}setCookieKey(cookieKeyName,serialized)}catch(e){return}}return false};flowplayer(function(api,root){var $root=jQuery(root),enabled=flowplayer.conf.video_position_save_enable&&$root.data("save-position")!="false"||$root.data("save-position"),progressEventsCount=0,seekIntoPosition=function(e,api){if(api.video&&api.video.live)return;var video_id=getVideoId(api.video),position=api.video.position;if(flowplayer.conf.is_logged_in!="1"){var data=getCookieKey(cookieKeyName);if(data&&typeof data!=="undefined"){try{data=JSON.parse(data);if(data[video_id]){position=data[video_id]}}catch(e){return}}}if(!!api.get_custom_end&&api.get_custom_end()<position){position=false}if(!!api.get_custom_start&&api.get_custom_start()>0){if(position<api.get_custom_start()){position=false}}api.bind("progress",storeVideoPosition);if(position){seek(position)}},storeVideoPosition=function(e,api){if(api.live){return}if(api.video.sources){var video_id=getVideoId(api.video),position=Math.round(api.video.time);playPositions[video_id]=position;if(progressEventsCount++>=sendPositionsEvery&&flowplayer.conf.closingPage){if(ajaxCall){ajaxCall.abort()}ajaxCall=sendVideoPositions(true,function(){ajaxCall=null});progressEventsCount=0}}},forceSavePosition=function(e,api){var inPlaylist=false;for(var i in api.conf.playlist){if(!api.conf.playlist.hasOwnProperty(i))continue;inPlaylist=true;break}if(inPlaylist&&!flowplayer.conf.closingPage){progressEventsCount=sendPositionsEvery+1;storeVideoPosition(e,api);sendVideoPositions()}},seek=function(position){if(!!api.custom_seek){api.custom_seek(position);return}var seek_count=0;var do_seek=setInterval(function(){if(++seek_count>20)clearInterval(do_seek);if(api.loading)return;api.seek(parseInt(position));clearInterval(do_seek)},10)},processTempData=function(temp_data_name,video_id){var data=getCookieKey(temp_data_name),output=false;if(data&&typeof data!=="undefined"){try{data=JSON.parse(data);if(typeof data[video_id]!="undefined"){output=data[video_id];delete data[video_id];var stillHasData=false;for(var i in data){if(!data.hasOwnProperty(i))continue;stillHasData=true;break}if(stillHasData){setCookieKey(temp_data_name,JSON.stringify(data))}else{removeCookieKey(temp_data_name)}}return output}catch(e){}}};if(!enabled)return;api.bind("finish",removeVideoPosition);api.one("progress",seekIntoPosition);api.playlist_thumbnail_progress=function(el,video,position){if(!!api.get_custom_start&&api.get_custom_start(video)>0){position-=api.get_custom_start(video);if(position<0)position=0}var duration=video.duration;if(!!api.get_custom_duration&&api.get_custom_duration()>0){duration=api.get_custom_duration()}if(!duration){duration=el.data("duration")}if(!duration)return;var progress=100*position/duration;el.css("width",progress+"%")};if(flowplayer.conf.is_logged_in=="1"){var playlist=api.conf.playlist.length>0?api.conf.playlist:[api.conf.clip],playlist_external=jQuery("[rel="+jQuery(root).attr("id")+"]");for(var i in playlist){if(!playlist.hasOwnProperty(i))continue;var video_id=getVideoId(playlist[i]),position=processTempData(tempPositionCookieKeyName,video_id),saw=processTempData(tempSawCookieKeyName,video_id);if(position){if(api.conf.playlist.length){api.conf.playlist[i].sources[0].position=position;var playlist_progress=jQuery("a",playlist_external).eq(i).find(".fvp-progress");if(playlist_progress.length){api.playlist_thumbnail_progress(playlist_progress,api.conf.playlist[i],position)}}else{api.conf.clip.sources[0].position=position}}if(saw){if(api.conf.playlist.length){api.conf.playlist[i].sources[0].saw=true}else{api.conf.clip.sources[0].saw=true}}}}api.bind("finish",function(e,api){if(api.conf.playlist.length){api.conf.playlist[api.video.index].sources[0].saw=true}else{api.conf.clip.sources[0].saw=true}})});jQuery(window).on("beforeunload pagehide",function(){if(!flowplayer.conf.closingPage){flowplayer.conf.closingPage=true;sendVideoPositions()}});if(localStorageEnabled!==null){return localStorageEnabled}localStorageEnabled=true;try{localStorage.setItem("t","t");if(localStorage.getItem("t")!=="t"){localStorageEnabled=false}localStorage.removeItem("t")}catch(e){localStorageEnabled=false}})(jQuery);flowplayer(function(api,root){root=jQuery(root);if(api.conf.playlist.length==0)return;var real_videos=0;jQuery(api.conf.playlist).each(function(k,v){if(typeof v.click=="undefined"){real_videos++}});if(real_videos<2)return;var playlist=jQuery(".fp-playlist-external[rel="+root.attr("id")+"]");var playlist_button=jQuery('<strong class="fv-fp-list">Item 1.</strong>'),playlist_menu=jQuery('<div class="fp-menu fv-fp-list-menu"></div>').insertAfter(root.find(".fp-controls"));var i=0,item_index=[];jQuery(api.conf.playlist).each(function(k,v){if(typeof v.click=="undefined"){playlist_menu.append('<a data-index="'+k+'">'+(i+1)+". "+parse_title(playlist.find("h4").eq(i))+"</a>");item_index.push(k);i++}});playlist_button.insertAfter(root.find(".fp-controls .fp-volume")).on("click",function(e){e.preventDefault();e.stopPropagation();if(playlist_menu.hasClass("fp-active")){api.hideMenu(playlist_menu[0])}else{root.trigger("click");api.showMenu(playlist_menu[0])}});jQuery("a",playlist_menu).on("click",function(){if(typeof api.conf.playlist[jQuery(this).data("index")-1]!="undefined"&&typeof api.conf.playlist[jQuery(this).data("index")-1].click!="undefined"){api.play(jQuery(this).data("index")-1)}else{api.play(jQuery(this).data("index"))}});api.on("ready",function(e,api,video){playlist_menu.find("a").removeClass("fp-selected");var thumb=playlist_menu.find("a[data-index="+video.index+"]");thumb.addClass("fp-selected");var label=fv_flowplayer_translations.playlist_item_no;label=label.replace(/%d/,item_index.indexOf(api.video.index)+1);label=label.replace(/%s/,parse_title(thumb.find("h4")));playlist_button.html(label)});function parse_title(el){var tmp=el.clone();tmp.find("i.dur").remove();return tmp.text()}});flowplayer(function(api,root){root=jQuery(root);var playlist=api.conf.playlist,videoIndex;api.bind("load",function(e,api,video){videoIndex=video.index});api.bind("error",function(e,api,error){setTimeout(function(){if(playlist.length>0&&api.error==true){videoIndex=api.video.index;if(api.conf.video_checker=="1"&&playlist[videoIndex].video_checker&&playlist[videoIndex].video_checker.length>0){console.log("FV Player: Video checker message present, stopping auto-advance to next playlist item");return false}api.error=api.loading=false;root.removeClass("is-error");root.find(".fp-message.fp-shown").remove();videoIndex++;if(videoIndex>playlist.length-1){videoIndex=0}console.log("FV Player: Playlist item failure, auto-advancing to "+(videoIndex+1)+". item");api.play(videoIndex)}},1e3)})});flowplayer(function(api,root){root=jQuery(root);var original_prev,original_next,random_seed;if(!root.data("button-no-picture")&&!root.data("button-repeat")&&!root.data("button-rewind"))return;api.bind("ready",function(e,api){if(typeof original_next=="undefined"&&typeof original_prev=="undefined"){original_next=api.next;original_prev=api.prev}if(!api.video.type.match(/^audio/)&&root.data("button-no-picture")&&root.find(".fv-fp-no-picture").length==0){var button_no_picture=jQuery('<span class="fv-fp-no-picture"><svg viewBox="0 0 90 80" width="20px" height="20px" class="fvp-icon fvp-nopicture"><use xlink:href="#fvp-nopicture"></use></svg></span>');button_no_picture.insertAfter(root.find(".fp-controls .fp-volume")).on("click",function(e){e.preventDefault();e.stopPropagation();jQuery(".fp-engine",root).slideToggle(20);jQuery(this).toggleClass("is-active fp-color-fill")})}if(root.data("button-repeat")){if(api.conf.playlist.length>0&&root.find(".fv-fp-playlist").length==0){var t=fv_flowplayer_translations,playlist_button=jQuery('<strong class="fv-fp-playlist mode-normal"> <svg viewBox="0 0 80.333 80" width="20px" height="20px" class="fvp-icon fvp-replay-list"><title>'+t.playlist_replay_all+'</title><use xlink:href="#fvp-replay-list"></use></svg> <svg viewBox="0 0 80.333 71" width="20px" height="20px" class="fvp-icon fvp-shuffle"><title>'+t.playlist_shuffle+'</title><use xlink:href="#fvp-shuffle"></use></svg> <svg viewBox="0 0 80.333 71" width="20px" height="20px" class="fvp-icon fvp-replay-track"><title>'+t.playlist_replay_video+'</title><use xlink:href="#fvp-replay-track"></use></svg> <span id="fvp-playlist-play" title="'+t.playlist_play_all+'">'+t.playlist_play_all_button+"</span> </strong>"),playlist_menu=jQuery('<div class="fp-menu fv-fp-playlist-menu"> <a data-action="repeat_playlist"><svg viewBox="0 0 80.333 80" width="20px" height="20px" class="fvp-icon fvp-replay-list"><title>'+t.playlist_replay_all+'</title><use xlink:href="#fvp-replay-list"></use></svg> <span class="screen-reader-text">'+t.playlist_replay_all+'</span></a> <a data-action="shuffle_playlist"><svg viewBox="0 0 80.333 71" width="20px" height="20px" class="fvp-icon fvp-shuffle"><title>'+t.playlist_shuffle+'</title><use xlink:href="#fvp-shuffle"></use></svg> <span class="screen-reader-text">'+t.playlist_shuffle+'</span></a> <a data-action="repeat_track"><svg viewBox="0 0 80.333 71" width="20px" height="20px" class="fvp-icon fvp-replay-track"><title>'+t.playlist_replay_video+'</title><use xlink:href="#fvp-replay-track"></use></svg> <span class="screen-reader-text">'+t.playlist_replay_video+'</span></a> <a class="fp-selected" data-action="normal"><span id="fvp-playlist-play" title="'+t.playlist_play_all+'">'+t.playlist_play_all_button+"</span></a> </div>").insertAfter(root.find(".fp-controls"));api.conf.playlist_shuffle=api.conf.track_repeat=false;random_seed=randomize();var should_advance=api.conf.advance;playlist_button.insertAfter(root.find(".fp-controls .fp-volume")).on("click",function(e){e.preventDefault();e.stopPropagation();if(playlist_menu.css("right")!=="auto"){playlist_menu.css({right:"auto",left:playlist_button.position().left+"px"})}if(playlist_menu.hasClass("fp-active")){api.hideMenu(playlist_menu[0])}else{root.trigger("click");api.showMenu(playlist_menu[0])}});jQuery("a",playlist_menu).on("click",function(){jQuery(this).siblings("a").removeClass("fp-selected");jQuery(this).addClass("fp-selected");playlist_button.removeClass("mode-normal mode-repeat-track mode-repeat-playlist mode-shuffle-playlist");var action=jQuery(this).data("action");if(action=="repeat_playlist"){playlist_button.addClass("mode-repeat-playlist");api.conf.loop=true;api.conf.advance=true;api.video.loop=api.conf.track_repeat=false;api.conf.playlist_shuffle=false}else if(action=="shuffle_playlist"){playlist_button.addClass("mode-shuffle-playlist");api.conf.loop=true;api.conf.advance=true;api.conf.playlist_shuffle=true}else if(action=="repeat_track"){playlist_button.addClass("mode-repeat-track");api.conf.track_repeat=api.video.loop=true;api.conf.loop=api.conf.playlist_shuffle=false}else if(action=="normal"){playlist_button.addClass("mode-normal");api.conf.track_repeat=api.video.loop=false;api.conf.loop=api.conf.playlist_shuffle=false}if(api.conf.playlist_shuffle){api.next=function(){api.play(random_seed.pop());if(random_seed.length==0)random_seed=randomize()};api.prev=function(){api.play(random_seed.shift());if(random_seed.length==0)random_seed=randomize()}}else{api.next=original_next;api.prev=original_prev}});if(api.conf.loop){jQuery("a[data-action=repeat_playlist]",playlist_menu).trigger("click")}api.on("progress",function(){api.video.loop=api.conf.track_repeat});api.on("finish.pl",function(e,api){console.log("playlist_repeat",api.conf.loop,"advance",api.conf.advance,"video.loop",api.video.loop);if(api.conf.playlist_shuffle){api.play(random_seed.pop());if(random_seed.length==0)random_seed=randomize()}})}else if(root.find(".fv-fp-track-repeat").length==0&&api.conf.playlist.length==0){var button_track_repeat=jQuery('<strong class="fv-fp-track-repeat"><svg viewBox="0 0 80.333 71" width="20px" height="20px" class="fvp-icon fvp-replay-track"><use xlink:href="#fvp-replay-track"></use></svg></strong>');button_track_repeat.insertAfter(root.find(".fp-controls .fp-volume")).on("click",function(e){e.preventDefault();e.stopPropagation();jQuery(this).toggleClass("is-active fp-color-fill",api.video.loop);if(api.video.loop){api.video.loop=false}else{api.video.loop=true}});if(api.conf.loop){button_track_repeat.addClass("is-active fp-color-fill")}}}if(root.data("button-rewind")){if(root.find(".fv-fp-rewind").length==0){var button_rewind=jQuery('<span class="fv-fp-rewind"><svg viewBox="0 0 24 24" width="24px" height="24px" class="fvp-icon fvp-rewind"><use xlink:href="#fvp-rewind"></use></svg></span>');button_rewind.insertBefore(root.find(".fp-controls .fp-playbtn")).on("click",function(e){e.preventDefault();e.stopPropagation();api.seek(api.video.time-10)});button_rewind.toggle(!api.video.live)}if(root.find(".fv-fp-forward").length==0){var button_forward=jQuery('<span class="fv-fp-forward"><svg viewBox="0 0 24 24" width="24px" height="24px" class="fvp-icon fvp-forward"><use xlink:href="#fvp-forward"></use></svg></span>');button_forward.insertAfter(root.find(".fp-controls .fp-playbtn")).on("click",function(e){e.preventDefault();e.stopPropagation();api.seek(api.video.time+10)});button_forward.toggle(!api.video.live)}}}).bind("unload",function(){root.find(".fv-fp-no-picture").remove();root.find(".fv-fp-playlist").remove();root.find(".fv-fp-track-repeat").remove()});function array_shuffle(a){var j,x,i;for(i=a.length;i;i--){j=Math.floor(Math.random()*i);x=a[i-1];a[i-1]=a[j];a[j]=x}return a}function randomize(random_seed){random_seed=[];jQuery(api.conf.playlist).each(function(k,v){random_seed.push(k)});random_seed=array_shuffle(random_seed);console.log("FV Player Randomizer random seed:",random_seed);return random_seed}});flowplayer(function(api,root){var $root=jQuery(root),start_index=$root.data("playlist_start");if(typeof start_index=="undefined")return;function start_position_changer(){if($root.data("position_changed")!==1&&api.conf.playlist.length){start_index--;api.play(start_index);$root.data("position_changed",1)}}api.bind("unload",function(){start_index=$root.data("playlist_start");$root.removeData("position_changed");api.one("ready",start_position_changer);api.video.index=0});api.one("ready",start_position_changer);jQuery(".fp-ui",root).on("click",function(){start_position_changer();$root.data("position_changed",1)})});document.addEventListener("custombox:overlay:close",function(e){console.log("FV Player: Custombox/Popup anything ligtbox closed");var $players=jQuery(this).find(".flowplayer");if($players.length==0)return;console.log("FV Player: Custombox/Popup anything ligtbox contains a player");$players.each(function(index,player){var api=jQuery(player).data("flowplayer");if(typeof api!="undefined"){if(api.playing){console.log("FV Player: Custombox/Popup anything ligtbox video pause");api.pause()}else if(api.loading){api.one("ready",function(){console.log("FV Player: Custombox/Popup anything ligtbox video unload");api.unload()})}}})});flowplayer(function(api,root){api.bind("finish",function(){var finished_at=api.video.time;if(api.video.loop){api.one("pause",function(){if(finished_at<=api.video.time){api.resume()}})}})});function fv_flowplayer_amazon_s3(hash,time){jQuery("#wpfp_"+hash).bind("error",function(e,api,error){var fv_fp_date=new Date;if(error.code==4&&fv_fp_date.getTime()>fv_fp_utime+parseInt(time)){jQuery(e.target).find(".fp-message").delay(500).queue(function(n){jQuery(this).html(fv_flowplayer_translations.video_expired);n()})}})}flowplayer(function(api,root){root=jQuery(root);root.find(".fp-logo").removeAttr("href");if(root.hasClass("no-controlbar")){var timelineApi=api.sliders.timeline;timelineApi.disable(true);api.bind("ready",function(){timelineApi.disable(true)})}jQuery(".fvfp_admin_error",root).remove();root.find(".fp-logo, .fp-header").on("click",function(e){if(e.target!==this)return;root.find(".fp-ui").trigger("click")});jQuery(".fvp-share-bar .sharing-facebook",root).append('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="#fff"><title>Facebook</title><path d="M11.9 5.2l-2.6 0 0-1.6c0-0.7 0.3-0.7 0.7-0.7 0.3 0 1.6 0 1.6 0l0-2.9 -2.3 0c-2.6 0-3.3 2-3.3 3.3l0 2 -1.6 0 0 2.9 1.6 0c0 3.6 0 7.8 0 7.8l3.3 0c0 0 0-4.2 0-7.8l2.3 0 0.3-2.9Z"/></svg>');jQuery(".fvp-share-bar .sharing-twitter",root).append('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="#fff"><title>Twitter</title><path d="M16 3.1c-0.6 0.3-1.2 0.4-1.9 0.5 0.7-0.4 1.2-1 1.4-1.8 -0.6 0.4-1.3 0.6-2.1 0.8 -0.6-0.6-1.4-1-2.4-1 -2 0.1-3.2 1.6-3.2 4 -2.7-0.1-5.1-1.4-6.7-3.4 -0.9 1.4 0.2 3.8 1 4.4 -0.5 0-1-0.1-1.5-0.4l0 0.1c0 1.6 1.1 2.9 2.6 3.2 -0.7 0.2-1.3 0.1-1.5 0.1 0.4 1.3 1.6 2.2 3 2.3 -1.6 1.7-4.6 1.4-4.8 1.3 1.4 0.9 3.2 1.4 5 1.4 6 0 9.3-5 9.3-9.3 0-0.1 0-0.3 0-0.4 0.6-0.4 1.2-1 1.6-1.7Z"/></svg>');jQuery(".fvp-share-bar .sharing-email",root).append('<svg xmlns="http://www.w3.org/2000/svg" height="16" viewBox="0 0 16 16" width="16" fill="#fff"><title>Email</title><path d="M8 10c0 0 0 0-1 0L0 6v7c0 1 0 1 1 1h14c1 0 1 0 1-1V6L9 10C9 10 8 10 8 10zM15 2H1C0 2 0 2 0 3v1l8 4 8-4V3C16 2 16 2 15 2z"/></svg>');jQuery(".fp-header",root).prepend(jQuery(".fvp-share-bar",root));if(api.conf.playlist.length){var show=true;var playlist=api.conf.playlist;if(playlist.length==2){if(typeof playlist[0].click!="undefined"&&typeof playlist[1].click=="undefined"){show=false}if(typeof playlist[0].click=="undefined"&&typeof playlist[1].click!="undefined"){show=false}}else if(playlist.length==3){if(typeof playlist[0].click!="undefined"&&typeof playlist[1].click=="undefined"&&typeof playlist[2].click!="undefined"){show=false}}if(show){var prev=jQuery('<a class="fp-icon fv-fp-prevbtn"></a>');var next=jQuery('<a class="fp-icon fv-fp-nextbtn"></a>');root.find(".fp-controls .fp-playbtn").before(prev).after(next);prev.on("click",function(){api.trigger("prev",[api]);api.prev()});next.on("click",function(){api.trigger("next",[api]);api.next()})}}api.bind("pause resume finish unload ready",function(e,api){root.addClass("no-brand")});api.one("ready",function(){root.find(".fp-fullscreen").clone().appendTo(root.find(".fp-controls"))});api.bind("ready",function(e,api,video){setTimeout(function(){jQuery(".fvp-share-bar",root).show();jQuery(".fv-player-buttons-wrap",root).appendTo(jQuery(".fv-player-buttons-wrap",root).parent().find(".fp-ui"))},100)});api.bind("finish",function(){var url=root.data("fv_redirect");if(url&&(typeof api.video.is_last=="undefined"||api.video.is_last)){location.href=url}});if(flowplayer.support.iOS&&flowplayer.support.iOS.version==11){api.bind("error",function(e,api,error){if(error.code==4)root.find(".fp-engine").hide()})}jQuery(document).on("contextmenu",".flowplayer",function(e){e.preventDefault()});api.one("ready",function(e,api,video){root.find(".fp-chromecast").insertAfter(root.find(".fp-header .fp-fullscreen"))});root.find(".fp-waiting").html('<div class="fp-preload"><b></b><b></b><b></b><b></b></div>');var id=root.attr("id"),alternative=!flowplayer.conf.native_fullscreen&&flowplayer.conf.mobile_alternative_fullscreen,events_enter="fakefullscreen",events_exit="fakefullscreen-exit";if(!flowplayer.support.fullscreen){events_enter+=" fullscreen";events_exit+=" fullscreen-exit"}api.bind(events_enter,function(e,api){jQuery("#wpadminbar, .nc_wrapper").hide();if(alternative||e.type=="fakefullscreen"){if(api.video.type=="video/youtube")return;root.before('<span data-fv-placeholder="'+id+'"></span>');root.appendTo("body")}});api.bind(events_exit,function(e,api,video){jQuery("#wpadminbar, .nc_wrapper").show();if(alternative||e.type=="fakefullscreen-exit"){jQuery("span[data-fv-placeholder="+id+"]").replaceWith(root)}})});(function(){var extension=function(flowplayer){flowplayer(function(api,root){if(!jQuery(root).data("speedb"))return;var support=flowplayer.support;if(!support.video||!support.inlineVideo)return;var common=flowplayer.common,bean=flowplayer.bean,ui=common.find(".fp-ui",root)[0],controlbar=common.find(".fp-controls",ui)[0],speeds=api.conf.speeds;bean.on(root,"click",".fp-speed",function(){var menu=common.find(".fp-speed-menu",root)[0];if(common.hasClass(menu,"fp-active"))api.hideMenu();else api.showMenu(menu)});bean.on(root,"click",".fp-speed-menu a",function(ev){var s=ev.target.getAttribute("data-speed");api.speed(s)});api.on("speed",function(ev,_a,rate){if(speeds.length>1){selectSpeed(rate)}}).on("ready",function(ev,api){removeMenu();if(flowplayer.support.android&&api.engine.engineName=="html5"&&api.video.type=="application/x-mpegurl")return;speeds=api.conf.speeds;if(speeds.length>1){createMenu()}});function removeMenu(){common.find(".fp-speed-menu",root).forEach(common.removeNode);common.find(".fp-speed",root).forEach(common.removeNode)}function round(val){return Math.round(val*100)/100}function createMenu(){controlbar.appendChild(common.createElement("strong",{className:"fp-speed"},api.currentSpeed+"x"));var menu=common.createElement("div",{className:"fp-menu fp-speed-menu",css:{width:"auto"}},"<strong>Speed</strong>");speeds.forEach(function(s){var a=common.createElement("a",{"data-speed":round(s)},round(s)+"x");menu.appendChild(a)});ui.appendChild(menu);selectSpeed(api.currentSpeed);jQuery(root).find(".fp-speed-menu strong").text(fv_flowplayer_translations.speed)}function selectSpeed(rate){common.find(".fp-speed",root)[0].innerHTML=rate+"x";common.find(".fp-speed-menu a",root).forEach(function(el){common.toggleClass(el,"fp-selected",el.getAttribute("data-speed")==rate);common.toggleClass(el,"fp-color",el.getAttribute("data-speed")==rate)})}})};if(typeof module==="object"&&module.exports)module.exports=extension;else if(typeof window.flowplayer==="function")extension(window.flowplayer)})();flowplayer(function(api,root){api.on("speed",function(ev,_a,rate){try{window.localStorage.fv_player_speed=rate}catch(e){}});api.on("ready",function(){if(window.localStorage.fv_player_speed&&jQuery(root).find("strong.fp-speed").is(":visible")){api.speed(parseFloat(window.localStorage.fv_player_speed))}if(jQuery(root).data("volume")==0){api.mute(true,true)}})});flowplayer(function(api,root){root=jQuery(root);if(!api.conf.fv_stats||!api.conf.fv_stats.enabled&&(!root.data("fv_stats")||root.data("fv_stats")=="no"))return;api.on("ready",function(e,api){api.one("progress",function(e,api){if(root.data("fv_stats_data")){try{var player_post_data=root.data("fv_stats_data")}catch(e){return false}jQuery.post(api.conf.fv_stats.url,{blog_id:api.conf.fv_stats.blog_id,video_id:api.video.id?api.video.id:0,player_id:player_post_data.player_id,post_id:player_post_data.post_id,tag:"play"})}})})});flowplayer(function(api,root){var $root=jQuery(root);var $playerDiv=$root.find(".fp-player");var sticky=$root.data("fvsticky");var globalSticky=false;var videoRatio=$root.data("ratio"),is_sticky=false;if(typeof videoRatio=="undefined"){videoRatio=.5625}if(flowplayer.conf.sticky_video==1&&typeof sticky=="undefined"){globalSticky=true}if(globalSticky||sticky){if(flowplayer.support.firstframe){var stickyPlace=flowplayer.conf.sticky_place;var stickyWidth=flowplayer.conf.sticky_width;if(stickyWidth==""){stickyWidth=380}var stickyHeight=stickyWidth*videoRatio;fv_player_sticky_video()}else{return}}function fv_player_sticky_video(){var change=false;var $window=jQuery(window),$flowplayerDiv=$root,top=$flowplayerDiv.offset().top,offset=Math.floor(top+$flowplayerDiv.outerHeight()/2);api.on("ready",function(){change=true});api.on("progress",function(){change=true});api.on("unload",function(){change=false;fv_player_sticky_class_remove();$root.removeClass("is-unSticky")});$window.on("resize",function(){if(!is_big_enough()){if(is_sticky){fv_player_sticky_class_remove()}return}top=$flowplayerDiv.offset().top;offset=Math.floor(top+$flowplayerDiv.outerHeight()/2)}).on("scroll",function(){if(!is_big_enough()){if(is_sticky){fv_player_sticky_class_remove()}return}top=$flowplayerDiv.offset().top;offset=Math.floor(top+$flowplayerDiv.outerHeight()/2);if($window.scrollTop()>offset&&change){if(jQuery("div.flowplayer.is-unSticky").length>0){console.log("unSticky",jQuery("div.flowplayer.is-unSticky").length);return false}else{fv_player_sticky_class_add()}}else{fv_player_sticky_class_remove();change=false}})}function fv_player_sticky_class_add(){if($playerDiv.hasClass("is-sticky-"+stickyPlace)){return}else{$playerDiv.addClass("is-sticky-"+stickyPlace);if($root.find("a.fp-sticky").length==0){$root.find("div.fp-header").prepend('<a class="fp-sticky fp-icon"></a>')}$playerDiv.css("width",stickyWidth);$playerDiv.css("height",stickyHeight);$playerDiv.css("max-height",stickyHeight);is_sticky=true;api.trigger("sticky",[api])}$playerDiv.parent(".flowplayer").addClass("is-stickable")}function fv_player_sticky_class_remove(){$playerDiv.removeClass("is-sticky-"+stickyPlace);$playerDiv.css("width","");$playerDiv.css("height","");$playerDiv.css("max-height","");$playerDiv.parent(".flowplayer").removeClass("is-stickable");if(is_sticky){is_sticky=false;api.trigger("sticky-exit",[api])}}function is_big_enough(){return jQuery(window).innerWidth()>=1020}});jQuery(function($){$(document).on("click","a.fp-sticky",function(){$("div.flowplayer.is-stickable").addClass("is-unSticky");var $playerDiv=$("div.flowplayer.is-stickable").find(".fp-player");$playerDiv.removeClass("is-sticky-right-bottom");$playerDiv.removeClass("is-sticky-left-bottom");$playerDiv.removeClass("is-sticky-right-top");$playerDiv.removeClass("is-sticky-left-top");$playerDiv.css("width","");$playerDiv.css("height","");$playerDiv.css("max-height","");if(is_sticky){is_sticky=false;api.trigger("sticky-exit",[api])}});$(document).on("click","div.flowplayer.is-unSticky",function(){$("div.flowplayer").removeClass("is-unSticky")})});flowplayer(function(api,root){root=jQuery(root);api.on("ready",function(e,api,video){if(window.localStorage.fv_player_subtitle&&root.find("strong.fp-cc").is(":visible")){if(api.video.subtitles.length){api.video.subtitles.forEach(function(item,index){if(item.srclang===window.localStorage.fv_player_subtitle){api.loadSubtitles(index)}})}}root.find(".fp-subtitle-menu").on("click",function(e){if(typeof e.target.getAttribute("data-subtitle-index")=="string"&&e.target.getAttribute("data-subtitle-index").length){try{window.localStorage.fv_player_subtitle=api.video.subtitles[e.target.getAttribute("data-subtitle-index")].srclang}catch(e){}}})})});flowplayer(function(api,root){root=jQuery(root);var currentPoint,check=false;api.bind("cuepoint",function(e,api,cue){check=false;if(cue.subtitle){currentPoint=cue.index}});api.on("ready",function(e,api){root.find(".fp-subtitle-menu strong").text(fv_flowplayer_translations.closed_captions);root.find('.fp-subtitle-menu a[data-subtitle-index="-1"]').text(fv_flowplayer_translations.no_subtitles)});root.on("click",".fp-subtitle-menu a[data-subtitle-index]",function(e){if(jQuery(this).data("subtitle-index")>-1){check=true;api.on("progress",time_check)}});function time_check(e,api,time){if(check){(api.cuepoints||[]).forEach(function(cue,index){var entry=cue.subtitle;if(entry&&currentPoint!=index){if(time>=cue.time&&(!entry.endTime||time<=entry.endTime)){api.trigger("cuepoint",[api,cue])}}})}}});if(typeof flowplayer!=="undefined"&&typeof fv_flowplayer_conf!="undefined"&&fv_flowplayer_conf.video_hash_links){flowplayer(function(api,root){if(jQuery(root).find(".sharing-link").length>0){var abEnd,abStart,hash,sTime,abloop;function update_link(abStartNew,abEndNew){hash=fv_player_get_video_link_hash(api);sTime=","+fv_player_time_hms(api.video.time);if(abStartNew&&abEndNew){abStart=","+fv_player_time_hms_ms(abStartNew+api.get_custom_start());abEnd=","+fv_player_time_hms_ms(abEndNew+api.get_custom_start())}else{abEnd=abloop&&typeof api.get_ab_end()!="undefined"&&api.get_ab_end()?","+fv_player_time_hms_ms(api.get_ab_end()):"";abStart=abloop&&typeof api.get_ab_start()!="undefined"&&api.get_ab_start()?","+fv_player_time_hms_ms(api.get_ab_start()):""}jQuery(".sharing-link",root).attr("href",jQuery(".sharing-link",root).attr("href").replace(/#.*/,"")+"#"+hash+sTime+abStart+abEnd)}api.on("ready",function(e,api,video){if(!api.fv_noUiSlider)return;api.fv_noUiSlider.on("set",function(values){update_link(values[0],values[1])})});api.on("progress",function(e,api){if(!api.video.sources||!api.video.sources[0]){return}update_link()});api.on("abloop",function(e,api,active){abloop=active;if(!api.playing){update_link()}});jQuery(".sharing-link",root).on("click",function(e){fv_player_clipboard(jQuery(this).attr("href"),function(){e.preventDefault();fv_player_notice(root,fv_flowplayer_translations.link_copied,2e3)})})}});jQuery(document).on("click",'a[href*="fvp_"]',function(){var link=jQuery(this);setTimeout(function(){if(link.parents(".fvp-share-bar").length==0)fv_autoplay_exec()})})}flowplayer(function(api,root){root=jQuery(root);var bean=flowplayer.bean;var restore=-1;root.on("click",".fp-volumebtn",function(e){if(api.volumeLevel==0&&restore!=-1){api.volume(restore);return false}});root.on("mousedown touchstart mouseup touchend",".fp-volumebar",function(e){if(api.volumeLevel!=0){restore=api.volumeLevel}});root.on("mousedown touchstart",".fp-volumebtn",function(e){if(api.volumeLevel>0){restore=-1}});api.on("volume",function(e,api){if(root.hasClass("is-mouseover")&&!api.muted){if(api.volumeLevel==0){bean.off(flowplayer.support.touch?root:document,"mousemove.sld touchmove.sld");api.mute(true)}}})});if(typeof flowplayer!="undefined"){flowplayer(function(api,root){root=jQuery(root);if(navigator.userAgent.match(/iPhone.* OS [0-6]_/i)){api.one("progress",function(e){if(typeof api.video.subtitles!=="undefined"&&api.video.subtitles.length){fv_player_warning(root,fv_flowplayer_translations.warning_iphone_subs)}})}if(flowplayer.support.android&&flowplayer.support.android.version<5&&(flowplayer.support.android.samsung||flowplayer.support.browser.safari)){fv_player_warning(root,fv_flowplayer_translations.warning_unstable_android,"firefox")}if(/Android 4/.test(navigator.userAgent)&&!/Firefox/.test(navigator.userAgent)){api.on("ready",function(e,api,video){setTimeout(function(){if(video.src&&video.src.match(/fpdl.vimeocdn.com/)&&(video.time==0||video.time==1)){fv_player_warning(root,fv_flowplayer_translations.warning_unstable_android,"firefox");api.on("progress",function(e,api){root.prev().find(".fv-player-warning-firefox").remove()})}},1500)});api.on("error",function(e,api,error){if(error.MEDIA_ERR_NETWORK==2&&error.video.src.match(/fpdl.vimeocdn.com/)){fv_player_warning(root,fv_flowplayer_translations.warning_unstable_android,"firefox")}})}if(/Safari/.test(navigator.userAgent)&&/Version\/5/.test(navigator.userAgent)){api.on("error",function(e,api,error){if(error.video.src.match(/fpdl.vimeocdn.com/)){fv_player_warning(root,fv_flowplayer_translations.warning_old_safari)}})}var sup=flowplayer.support;if(sup.android&&(sup.android.samsung&&parseInt(sup.browser.version)<66||sup.browser.safari)){api.on("error",function(e,api,error){fv_player_warning(root,fv_flowplayer_translations.warning_samsungbrowser,"warning_samsungbrowser")})}});function fv_player_warning(root,warning,classname){var wrapper=jQuery(root).prev(".fv-player-warning-wrapper");if(wrapper.length==0){jQuery(root).before('<div class="fv-player-warning-wrapper">');wrapper=jQuery(root).prev(".fv-player-warning-wrapper")}if(wrapper.find(".fv-player-warning-"+classname).length==0){var latest=jQuery("<p style='display: none' "+(classname?" class='fv-player-warning-"+classname+"'":"")+">"+warning+"</p>");wrapper.append(latest);latest.slideDown()}}}
flowplayer/minify.sh CHANGED
@@ -1,11 +1,5 @@
1
  #!/bin/bash
2
- FILE=modules/flowplayer.js
3
- if test -f "$FILE"; then
4
- cat modules/flowplayer.js > fv-flowplayer.min.dev.js
5
- else
6
- cat modules/flowplayer.min.js > fv-flowplayer.min.dev.js
7
- fi
8
- cat modules/fv-player.js >> fv-flowplayer.min.dev.js &&
9
- cat modules/*.module.js >> fv-flowplayer.min.dev.js &&
10
- uglifyjs fv-flowplayer.min.dev.js > fv-flowplayer.min.js &&
11
- rm fv-flowplayer.min.dev.js
1
  #!/bin/bash
2
+ cat modules/fv-player.js > fv-player.min.dev.js &&
3
+ cat modules/*.module.js >> fv-player.min.dev.js &&
4
+ uglifyjs fv-player.min.dev.js > fv-player.min.js &&
5
+ rm fv-player.min.dev.js
 
 
 
 
 
 
flowplayer/modules/abr-remember.module.js CHANGED
@@ -2,9 +2,70 @@
2
  * MPEG-DASH and HLS.js ABR changes
3
  */
4
  flowplayer( function(api,root) {
 
 
5
  var hlsjs;
 
 
6
  flowplayer.engine('hlsjs-lite').plugin(function(params) {
7
  hlsjs = params.hls;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  });
9
 
10
  root = jQuery(root);
@@ -14,6 +75,21 @@ flowplayer( function(api,root) {
14
  if( !api.conf.dash ) api.conf.dash = {};
15
  api.conf.dash.initialVideoQuality = 'restore'; // special flag for Dash.js
16
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
  if( localStorage.FVPlayerHLSQuality ) {
19
  api.conf.hlsjs.startLevel = parseInt(localStorage.FVPlayerHLSQuality);
@@ -32,12 +108,6 @@ flowplayer( function(api,root) {
32
  } else if( bitrates[quality] ) {
33
  localStorage.FVPlayerDashQuality = bitrates[quality].height;
34
  }
35
- } else if(api.engine.engineName == 'hlsjs-lite' ) {
36
- if( quality == -1 ) {
37
- localStorage.removeItem('FVPlayerHLSQuality');
38
- } else {
39
- localStorage.FVPlayerHLSQuality = quality;
40
- }
41
  }
42
  });
43
 
@@ -52,10 +122,11 @@ flowplayer( function(api,root) {
52
  api.quality(api.conf.dash.initialVideoQuality);
53
  }
54
  quality_sort();
 
55
  } else if(api.engine.engineName == 'hlsjs-lite' ) {
56
 
57
  // with HLS.js the stream might not be playing even after receiving the ready event
58
- // so we need to indicate it's loading
59
  // TODO: What about fixing that ready event instead? Core Flowplayer 7.2.8?
60
  root.addClass('is-loading');
61
  api.loading = true;
@@ -66,7 +137,7 @@ flowplayer( function(api,root) {
66
  root.removeClass('is-loading');
67
  api.loading = false;
68
  }
69
- })
70
 
71
  if( api.video.qualities && api.video.qualities.length > 2 ) {
72
  var qswitch = -1;
@@ -103,20 +174,26 @@ flowplayer( function(api,root) {
103
 
104
  quality_sort();
105
  }
 
 
106
  } else if( api.video.sources_fvqs && api.video.sources_fvqs.length > 0 && api.video.src.match(/vimeo.*?\.mp4/) ) {
107
  setTimeout( quality_sort, 0 );
 
108
  }
109
  root.find('a[data-quality]').removeClass('is-current');
110
  });
111
 
 
112
  if( search.match(/dash_debug/) || search.match(/hls_debug/) ) var debug_log = jQuery('<div class="fv-debug" style="background: gray; color: white; top: 10%; position: absolute; z-index: 1000">').appendTo(root.find('.fp-player'));
113
 
114
  api.bind('ready progress', quality_process);
115
 
 
116
  api.bind('quality', function() {
117
  setTimeout( quality_process, 0 );
118
  });
119
 
 
120
  function quality_process() {
121
  if( api.engine.engineName == 'dash' ) {
122
  var stream_info = bitrates[api.engine.dash.getQualityFor('video')];
@@ -134,21 +211,32 @@ flowplayer( function(api,root) {
134
 
135
  if( search.match(/hls_debug/) ) {
136
  var level = hlsjs.levels[hlsjs.currentLevel];
137
- quality_debug(level.width,level.height,level.bitrate);
 
 
138
  }
139
 
140
  }
141
  }
142
 
 
143
  function quality_label(index,qualities) {
144
  if( !qualities[index] ) return;
145
 
 
146
  var height = qualities[index].height,
147
  hd_limit = 541,
148
  lowest = 100000;
149
  jQuery(qualities).each( function(k,v) {
 
150
  if( v.height >= 720 && v.height < 1400 ) hd_limit = 720;
151
  if( v.height < lowest ) lowest = v.height;
 
 
 
 
 
 
152
  });
153
 
154
  root.find('a[data-quality]').removeClass('is-current');
@@ -164,6 +252,7 @@ flowplayer( function(api,root) {
164
  debug_log.html( "Using "+w+"x"+h+" at "+Math.round(br/1024)+" kbps" );
165
  }
166
 
 
167
  function quality_sort() {
168
  var menu = root.find('.fp-qsel-menu');
169
  menu.children().each(function(i,a){menu.prepend(a)});
2
  * MPEG-DASH and HLS.js ABR changes
3
  */
4
  flowplayer( function(api,root) {
5
+ root = jQuery(root);
6
+
7
  var hlsjs;
8
+
9
+ // this is the proper place to pick the initial HLS video quality
10
  flowplayer.engine('hlsjs-lite').plugin(function(params) {
11
  hlsjs = params.hls;
12
+
13
+ // if hls decryption key is invalid show error
14
+ hlsjs.on(Hls.Events.ERROR, function (event, data) {
15
+ if( data.type == 'mediaError' && data.details == 'fragParsingError' && data.fatal == true ) {
16
+ hlsjs.destroy();
17
+ api.trigger('error', [api, { code: 3 }]);
18
+ setTimeout(function() {
19
+ root.removeClass('is-seeking');
20
+ root.addClass('is-paused');
21
+ },0)
22
+ }
23
+ });
24
+
25
+ // Safari needs a little push with some of the encrypted streams to start playing
26
+ if( flowplayer.support.browser.safari ) {
27
+ hlsjs.on(Hls.Events.KEY_LOADED, function (event) {
28
+ if( event == 'hlsKeyLoaded' ) {
29
+ setTimeout( function() {
30
+ if( api.loading ) {
31
+ console.log('FV Player: Safari stuck loading HLS, resuming playback...');
32
+ api.resume();
33
+ }
34
+ }, 0 );
35
+ }
36
+ });
37
+ }
38
+
39
+ // do we force HD playback?
40
+ var pick_quality = flowplayer.conf.hd_streaming && !flowplayer.support.fvmobile ? 720 : false;
41
+ // or did we disable it for this player?
42
+ if( jQuery(params.root).data('hd_streaming') == false ) pick_quality = false;
43
+ // or did the user pick some quality by hand?
44
+ if( localStorage.FVPlayerHLSQuality ) pick_quality = localStorage.FVPlayerHLSQuality;
45
+
46
+ if( pick_quality ) {
47
+ hlsjs.on(Hls.Events.MANIFEST_PARSED, function(_, data) {
48
+ // look for the exact matching quality
49
+ var found = false;
50
+ jQuery.each( data.levels, function(k,v) {
51
+ if( v.height == pick_quality ) found = k;
52
+ });
53
+
54
+ // if it's not the manual selection look for the highest quality
55
+ if( !localStorage.FVPlayerHLSQuality && !found ) {
56
+ jQuery.each( data.levels, function(k,v) {
57
+ if( v.height > found ) found = k;
58
+ });
59
+ }
60
+
61
+ if( found ) {
62
+ console.log('FV Player: Picked '+data.levels[found].height+'p quality');
63
+ hlsjs.startLevel = found;
64
+ hlsjs.currentLevel = found;
65
+ }
66
+
67
+ });
68
+ }
69
  });
70
 
71
  root = jQuery(root);
75
  if( !api.conf.dash ) api.conf.dash = {};
76
  api.conf.dash.initialVideoQuality = 'restore'; // special flag for Dash.js
77
  }
78
+
79
+ // store the hand-picked HLS quality height such as 720p in localStorage
80
+ // perhaps to ensure it's saved right away without it having to load
81
+ root.on('click', '.fp-qsel-menu a', function() {
82
+ if(api.engine.engineName == 'hlsjs-lite' ) {
83
+ var quality = jQuery(this).data('quality');
84
+ if( quality == -1 ) {
85
+ localStorage.removeItem('FVPlayerHLSQuality');
86
+ } else {
87
+ var level = hlsjs.levels[quality];
88
+ localStorage.FVPlayerHLSQuality = level.height;
89
+ }
90
+ }
91
+ });
92
+
93
 
94
  if( localStorage.FVPlayerHLSQuality ) {
95
  api.conf.hlsjs.startLevel = parseInt(localStorage.FVPlayerHLSQuality);
108
  } else if( bitrates[quality] ) {
109
  localStorage.FVPlayerDashQuality = bitrates[quality].height;
110
  }
 
 
 
 
 
 
111
  }
112
  });
113
 
122
  api.quality(api.conf.dash.initialVideoQuality);
123
  }
124
  quality_sort();
125
+
126
  } else if(api.engine.engineName == 'hlsjs-lite' ) {
127
 
128
  // with HLS.js the stream might not be playing even after receiving the ready event
129
+ // like when the decryption key is loading, so we need to indicate it's loading
130
  // TODO: What about fixing that ready event instead? Core Flowplayer 7.2.8?
131
  root.addClass('is-loading');
132
  api.loading = true;
137
  root.removeClass('is-loading');
138
  api.loading = false;
139
  }
140
+ });
141
 
142
  if( api.video.qualities && api.video.qualities.length > 2 ) {
143
  var qswitch = -1;
174
 
175
  quality_sort();
176
  }
177
+
178
+ // FV Player Pro Quality Switching of MP4 files
179
  } else if( api.video.sources_fvqs && api.video.sources_fvqs.length > 0 && api.video.src.match(/vimeo.*?\.mp4/) ) {
180
  setTimeout( quality_sort, 0 );
181
+
182
  }
183
  root.find('a[data-quality]').removeClass('is-current');
184
  });
185
 
186
+ // show debug information in overlay
187
  if( search.match(/dash_debug/) || search.match(/hls_debug/) ) var debug_log = jQuery('<div class="fv-debug" style="background: gray; color: white; top: 10%; position: absolute; z-index: 1000">').appendTo(root.find('.fp-player'));
188
 
189
  api.bind('ready progress', quality_process);
190
 
191
+ // the the quality label in control bar and debug info
192
  api.bind('quality', function() {
193
  setTimeout( quality_process, 0 );
194
  });
195
 
196
+ // the the quality label in control bar and debug info
197
  function quality_process() {
198
  if( api.engine.engineName == 'dash' ) {
199
  var stream_info = bitrates[api.engine.dash.getQualityFor('video')];
211
 
212
  if( search.match(/hls_debug/) ) {
213
  var level = hlsjs.levels[hlsjs.currentLevel];
214
+ if( level ) {
215
+ quality_debug(level.width,level.height,level.bitrate);
216
+ }
217
  }
218
 
219
  }
220
  }
221
 
222
+ // the the quality label in control bar
223
  function quality_label(index,qualities) {
224
  if( !qualities[index] ) return;
225
 
226
+ // hd_limit allows us to treat 576p as HD if there is nothing higher
227
  var height = qualities[index].height,
228
  hd_limit = 541,
229
  lowest = 100000;
230
  jQuery(qualities).each( function(k,v) {
231
+ // if we have 720p, then that will be the HD
232
  if( v.height >= 720 && v.height < 1400 ) hd_limit = 720;
233
  if( v.height < lowest ) lowest = v.height;
234
+
235
+ // make sure the manually selected quality is shown in menu
236
+ if( localStorage.FVPlayerHLSQuality == v.height ) {
237
+ root.find('a[data-quality]').removeClass('fp-selected fp-color');
238
+ root.find('a[data-quality='+k+']').addClass('fp-selected fp-color');
239
+ }
240
  });
241
 
242
  root.find('a[data-quality]').removeClass('is-current');
252
  debug_log.html( "Using "+w+"x"+h+" at "+Math.round(br/1024)+" kbps" );
253
  }
254
 
255
+ // sort qualities in menu, omit the bitrate information
256
  function quality_sort() {
257
  var menu = root.find('.fp-qsel-menu');
258
  menu.children().each(function(i,a){menu.prepend(a)});
flowplayer/modules/analytics.module.js CHANGED
@@ -3,15 +3,28 @@
3
  * Also provides custom fv_track_* events
4
  */
5
  flowplayer( function(api,root) {
6
- var root = jQuery(root);
7
- var bean = flowplayer.bean;
8
- var time = 0, last = 0, timer, event_name;
9
 
10
  // Load analytics.js if ga.js is not already loaded
11
  if( typeof(ga) == 'undefined' && api.conf.fvanalytics && typeof(_gat) == 'undefined' && typeof(gtag) == 'undefined' ) {
12
- jQuery.getScript( { url: "https://www.google-analytics.com/analytics.js", cache: true }, function() {
13
- ga('create', api.conf.fvanalytics, 'auto');
14
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  }
16
 
17
  // Load Matomo if not already loaded when needed
@@ -26,7 +39,7 @@ flowplayer( function(api,root) {
26
 
27
  api.bind('progress', function(e,api,current) {
28
  fv_track(e,api,current);
29
- }).bind('finish ready ', function(e,api) {
30
  //if( typeof(aFVPlayersSwitching[root.attr('id')]) != "undefined" ) { // todo: problem that it won't work on video replay or playlist
31
  //return;
32
  //}
@@ -34,6 +47,8 @@ flowplayer( function(api,root) {
34
  if( !fv_ga_events.hasOwnProperty(j) ) continue;
35
  root.removeData('fv_track_'+fv_ga_events[j]);
36
  }
 
 
37
  }).bind('error', function(e,api,error) {
38
  setTimeout( function() {
39
  if( !api.error ) return;
@@ -43,12 +58,16 @@ flowplayer( function(api,root) {
43
 
44
  var name = fv_player_track_name(root,video);
45
  if( name && !name.match(/\/\/vimeo.com\/\d/) ) {
46
- fv_player_track( false, "Video " + (root.hasClass('is-cva')?'Ad ':'') + "error", error.message, name );
 
 
 
 
47
  }
48
  }, 100 );
49
  });
50
 
51
- api.bind("load unload", fv_track_seconds_played).bind("progress", function() {
52
 
53
  if (!api.seeking) {
54
  time += last ? (+new Date() - last) : 0;
@@ -58,7 +77,9 @@ flowplayer( function(api,root) {
58
  if (!timer) {
59
  timer = setTimeout(function() {
60
  timer = null;
61
- fv_player_track( false, "Flowplayer heartbeat", api.engine.engineName + "/" + api.video.type, "Heartbeat", 0 );
 
 
62
  }, 10*60*1000); // heartbeat every 10 minutes
63
  }
64
 
@@ -72,7 +93,9 @@ flowplayer( function(api,root) {
72
 
73
  bean.on(window, 'unload', fv_track_seconds_played);
74
 
75
- var fv_ga_events = [ 'start', 'first quartile', 'second quartile', 'third quartile', 'complete' ];
 
 
76
 
77
  function fv_track_seconds_played(e, api_not_needed, video) {
78
  video = video || api.video;
@@ -82,7 +105,7 @@ flowplayer( function(api,root) {
82
  }
83
 
84
  if (time) {
85
- fv_player_track( false, "Video / Seconds played", api.engine.engineName + "/" + api.video.type, event_name, Math.round(time / 1000) );
86
 
87
  time = 0;
88
  if (timer) {
@@ -114,14 +137,14 @@ flowplayer( function(api,root) {
114
  for( var j in fv_ga_events ) { // make sure user triggered the previous quartiles before tracking
115
  if( !fv_ga_events.hasOwnProperty(j) ) continue;
116
 
117
- if(j == i) break;
118
  if( !root.data('fv_track_'+fv_ga_events[j]) ) return;
119
  }
120
 
121
  root.trigger('fv_track_'+fv_ga_events[i].replace(/ /,'_'), [api, name] );
122
  root.data('fv_track_'+fv_ga_events[i], true);
123
 
124
- fv_player_track( false, "Video " + (root.hasClass('is-cva')?'Ad ':'') + fv_ga_events[i] , api.engine.engineName + "/" + video.type, name );
125
  }
126
 
127
  api.get_time_played = function() {
@@ -129,6 +152,17 @@ flowplayer( function(api,root) {
129
  }
130
  });
131
 
 
 
 
 
 
 
 
 
 
 
 
132
  /**
133
  * Sends event statistics to Google analytics and Matomo
134
  *
@@ -139,7 +173,7 @@ flowplayer( function(api,root) {
139
  * @param {number} value
140
  *
141
  */
142
- function fv_player_track( ga_id, event, engineType, name, value){
143
 
144
  if( !ga_id ) ga_id = flowplayer.conf.fvanalytics;
145
 
@@ -149,11 +183,21 @@ function fv_player_track( ga_id, event, engineType, name, value){
149
 
150
  // gtag.js
151
  if( typeof(gtag) != "undefined" ) {
152
- gtag('event', event, {
153
- 'event_category': engineType,
154
- 'event_label': name,
155
- 'value': value ? value : 1
156
- });
 
 
 
 
 
 
 
 
 
 
157
 
158
  // analytics.js
159
  } else if( ga_id && typeof(ga) != 'undefined' ) {
@@ -196,6 +240,7 @@ function fv_player_track( ga_id, event, engineType, name, value){
196
  function fv_player_track_name(root,video) {
197
  var name = root.attr("title");
198
  if( !name && typeof(video.fv_title) != "undefined" ) name = video.fv_title;
 
199
  if( !name && typeof(video.src) != "undefined" ) {
200
  name = video.src.split("/").slice(-1)[0].replace(/\.(\w{3,4})(\?.*)?$/i, '');
201
  if( video.type.match(/mpegurl/) ) name = video.src.split("/").slice(-2)[0].replace(/\.(\w{3,4})(\?.*)?$/i, '') + '/' + name;
3
  * Also provides custom fv_track_* events
4
  */
5
  flowplayer( function(api,root) {
6
+ var root = jQuery(root),
7
+ bean = flowplayer.bean,
8
+ time = 0, last = 0, timer, event_name;
9
 
10
  // Load analytics.js if ga.js is not already loaded
11
  if( typeof(ga) == 'undefined' && api.conf.fvanalytics && typeof(_gat) == 'undefined' && typeof(gtag) == 'undefined' ) {
12
+ if( is_ga_4(api) ) {
13
+ jQuery.getScript( { url: "https://www.googletagmanager.com/gtag/js?id=" + api.conf.fvanalytics , cache: true }, function() {
14
+ window.dataLayer = window.dataLayer || [];
15
+
16
+ window.gtag = function() {
17
+ window.dataLayer.push(arguments);
18
+ };
19
+
20
+ window.gtag('js', new Date());
21
+ window.gtag('config', api.conf.fvanalytics);
22
+ });
23
+ } else {
24
+ jQuery.getScript( { url: "https://www.google-analytics.com/analytics.js", cache: true }, function() {
25
+ ga('create', api.conf.fvanalytics, 'auto');
26
+ });
27
+ }
28
  }
29
 
30
  // Load Matomo if not already loaded when needed
39
 
40
  api.bind('progress', function(e,api,current) {
41
  fv_track(e,api,current);
42
+ }).bind('finish ready ', function(e,api) {
43
  //if( typeof(aFVPlayersSwitching[root.attr('id')]) != "undefined" ) { // todo: problem that it won't work on video replay or playlist
44
  //return;
45
  //}
47
  if( !fv_ga_events.hasOwnProperty(j) ) continue;
48
  root.removeData('fv_track_'+fv_ga_events[j]);
49
  }
50
+
51
+ // TODO errors in GA4
52
  }).bind('error', function(e,api,error) {
53
  setTimeout( function() {
54
  if( !api.error ) return;
58
 
59
  var name = fv_player_track_name(root,video);
60
  if( name && !name.match(/\/\/vimeo.com\/\d/) ) {
61
+ if( is_ga_4( api ) ) {
62
+
63
+ } else {
64
+ fv_player_track( api, false, "Video " + (root.hasClass('is-cva')?'Ad ':'') + "error", error.message, name );
65
+ }
66
  }
67
  }, 100 );
68
  });
69
 
70
+ api.bind("load unload", fv_track_seconds_played).bind("progress", function(e, api) {
71
 
72
  if (!api.seeking) {
73
  time += last ? (+new Date() - last) : 0;
77
  if (!timer) {
78
  timer = setTimeout(function() {
79
  timer = null;
80
+ if( !is_ga_4( api ) ) {
81
+ fv_player_track( api, false, "Flowplayer heartbeat", api.engine.engineName + "/" + api.video.type, "Heartbeat", 0 );
82
+ }
83
  }, 10*60*1000); // heartbeat every 10 minutes
84
  }
85
 
93
 
94
  bean.on(window, 'unload', fv_track_seconds_played);
95
 
96
+ var fv_ga_events = is_ga_4( api ) ?
97
+ [ 'Play', '25 Percent Played', '50 Percent Played', '75 Percent Played', '100 Percent Played' ] :
98
+ [ 'start', 'first quartile', 'second quartile', 'third quartile', 'complete' ];
99
 
100
  function fv_track_seconds_played(e, api_not_needed, video) {
101
  video = video || api.video;
105
  }
106
 
107
  if (time) {
108
+ fv_player_track( api, false, "Video / Seconds played", api.engine.engineName + "/" + api.video.type, event_name, Math.round(time / 1000) );
109
 
110
  time = 0;
111
  if (timer) {
137
  for( var j in fv_ga_events ) { // make sure user triggered the previous quartiles before tracking
138
  if( !fv_ga_events.hasOwnProperty(j) ) continue;
139
 
140
+ if(j == i) break;
141
  if( !root.data('fv_track_'+fv_ga_events[j]) ) return;
142
  }
143
 
144
  root.trigger('fv_track_'+fv_ga_events[i].replace(/ /,'_'), [api, name] );
145
  root.data('fv_track_'+fv_ga_events[i], true);
146
 
147
+ fv_player_track( api, false, "Video " + (root.hasClass('is-cva')?'Ad ':'') + fv_ga_events[i] , api.engine.engineName + "/" + video.type, name );
148
  }
149
 
150
  api.get_time_played = function() {
152
  }
153
  });
154
 
155
+ /**
156
+ * Checks if fvanalytics is using ga4
157
+ *
158
+ * @param {object} api
159
+ * @returns {boolean}
160
+ */
161
+ function is_ga_4 ( api ) {
162
+ if( typeof api.conf.fvanalytics != 'undefined' && api.conf.fvanalytics && api.conf.fvanalytics.startsWith('G-') ) return true;
163
+ return false;
164
+ }
165
+
166
  /**
167
  * Sends event statistics to Google analytics and Matomo
168
  *
173
  * @param {number} value
174
  *
175
  */
176
+ function fv_player_track( api, ga_id, event, engineType, name, value) {
177
 
178
  if( !ga_id ) ga_id = flowplayer.conf.fvanalytics;
179
 
183
 
184
  // gtag.js
185
  if( typeof(gtag) != "undefined" ) {
186
+ if( is_ga_4( api ) ) {
187
+ gtag("event", event, {
188
+ 'video_current_time': api.video.time,
189
+ 'video_provider': engineType,
190
+ 'video_duration': api.video.duration,
191
+ 'value': value ? value : 1
192
+ });
193
+ } else {
194
+ gtag('event', event, {
195
+ 'event_category': engineType,
196
+ 'event_label': name,
197
+ 'value': value ? value : 1
198
+ });
199
+
200
+ }
201
 
202
  // analytics.js
203
  } else if( ga_id && typeof(ga) != 'undefined' ) {
240
  function fv_player_track_name(root,video) {
241
  var name = root.attr("title");
242
  if( !name && typeof(video.fv_title) != "undefined" ) name = video.fv_title;
243
+ if( !name && typeof(video.title) != "undefined" ) name = video.title;
244
  if( !name && typeof(video.src) != "undefined" ) {
245
  name = video.src.split("/").slice(-1)[0].replace(/\.(\w{3,4})(\?.*)?$/i, '');
246
  if( video.type.match(/mpegurl/) ) name = video.src.split("/").slice(-2)[0].replace(/\.(\w{3,4})(\?.*)?$/i, '') + '/' + name;
flowplayer/modules/fullscreen-fix.module.js CHANGED
@@ -2,11 +2,16 @@
2
  * Improve the fullscreen calling to make sure the video covers the full visible viewport of Google Pixel 4 or iPhone Pro which have a special viewport shape
3
  */
4
  flowplayer(function(player, root) {
5
- // if the fullscreen is not supported do not alter the Flowplayer behavior in any way
6
- if (!flowplayer.support.fullscreen && player.conf.native_fullscreen && typeof flowplayer.common.createElement('video').webkitEnterFullScreen === 'function') {
7
  return;
8
  }
9
 
 
 
 
 
 
 
10
  // copy of original Flowplayer variable declarations
11
  var FS_ENTER = "fullscreen",
12
  FS_EXIT = "fullscreen-exit",
@@ -45,7 +50,7 @@ flowplayer(function(player, root) {
45
  } else {
46
  ['exitFullscreen', 'webkitCancelFullScreen', 'mozCancelFullScreen', 'msExitFullscreen'].forEach(function(fName) {
47
  if (typeof document[fName] === 'function') {
48
- document[fName]();
49
  }
50
  });
51
  }
@@ -53,21 +58,50 @@ flowplayer(function(player, root) {
53
  } else {
54
  player.trigger(flag ? FS_ENTER : FS_EXIT, [player]);
55
  }
56
-
57
  return player;
58
  };
59
 
60
- player.on('fullscreen-exit', function() {
61
- if( player.engine.engineName == 'fvyoutube' ) return; // prevent conflict with youtube.module.js in pro plugin
62
- win.scrollTo(scrollX, scrollY);
63
-
64
- /*
65
- * Core Flowplayer already does try to restore the scroll, but since it has no idea where
66
- * the scroll position was here's where we fix it. This is required when using
67
- * CSS scroll-behavior: smooth; in Chrome
68
- */
69
- jQuery(window).one('scroll', function() {
70
- window.scrollTo(scrollX, scrollY);
71
- });
72
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  });
2
  * Improve the fullscreen calling to make sure the video covers the full visible viewport of Google Pixel 4 or iPhone Pro which have a special viewport shape
3
  */
4
  flowplayer(function(player, root) {
5
+ if ( jQuery(root).data('fullscreen') == false ) {
 
6
  return;
7
  }
8
 
9
+ player.one("ready", function (e,api,video) {
10
+ if( jQuery(root).find('.fp-fullscreen').length == 0 ) {
11
+ jQuery(root).find('.fp-header').append('<a class="fp-fullscreen fp-icon"></a>');
12
+ }
13
+ });
14
+
15
  // copy of original Flowplayer variable declarations
16
  var FS_ENTER = "fullscreen",
17
  FS_EXIT = "fullscreen-exit",
50
  } else {
51
  ['exitFullscreen', 'webkitCancelFullScreen', 'mozCancelFullScreen', 'msExitFullscreen'].forEach(function(fName) {
52
  if (typeof document[fName] === 'function') {
53
+ document[fName]();
54
  }
55
  });
56
  }
58
  } else {
59
  player.trigger(flag ? FS_ENTER : FS_EXIT, [player]);
60
  }
61
+
62
  return player;
63
  };
64
 
65
+
66
+ // copy of original Flowplayer variable declarations and FS events
67
+ var lastClick, common = flowplayer.common;
68
+
69
+ player.on("mousedown.fs", function() {
70
+ if (+new Date() - lastClick < 150 && player.ready) player.fullscreen();
71
+ lastClick = +new Date();
 
 
 
 
 
72
  });
73
+
74
+ player.on(FS_ENTER, function() {
75
+ common.addClass(root, 'is-fullscreen');
76
+ common.toggleClass(root, 'fp-minimal-fullscreen', common.hasClass(root, 'fp-minimal'));
77
+ common.removeClass(root, 'fp-minimal');
78
+
79
+ if (!FS_SUPPORT) common.css(root, 'position', 'fixed');
80
+ player.isFullscreen = true;
81
+
82
+ }).on(FS_EXIT, function() {
83
+ var oldOpacity;
84
+ common.toggleClass(root, 'fp-minimal', common.hasClass(root, 'fp-minimal-fullscreen'));
85
+ common.removeClass(root, 'fp-minimal-fullscreen');
86
+ if (!FS_SUPPORT && player.engine === "html5") {
87
+ oldOpacity = root.css('opacity') || '';
88
+ common.css(root, 'opacity', 0);
89
+ }
90
+ if (!FS_SUPPORT) common.css(root, 'position', '');
91
+
92
+ common.removeClass(root, 'is-fullscreen');
93
+ if (!FS_SUPPORT && player.engine === "html5") setTimeout(function() { root.css('opacity', oldOpacity); });
94
+ player.isFullscreen = false;
95
+
96
+ if( player.engine.engineName != 'fvyoutube' ){ // youtube scroll ignore
97
+ win.scrollTo(scrollX, scrollY);
98
+ }
99
+ }).on('unload', function() {
100
+ if (player.isFullscreen) player.fullscreen();
101
+ });
102
+
103
+ player.on('shutdown', function() {
104
+ FULL_PLAYER = null;
105
+ common.removeNode(wrapper);
106
+ });
107
  });
flowplayer/modules/fullscreen-force.module.js CHANGED
@@ -6,10 +6,16 @@ flowplayer(function(api, root) {
6
  playlist_with_fullscreen = playlist.hasClass('fp-playlist-season') || playlist.hasClass('fp-playlist-polaroid');
7
  fsforce = root.data('fsforce') == true; // used for players which load using Ajax after click and then they need fullscreen
8
 
 
 
 
 
9
  // Force fullscreen on mobile setting
10
  if( flowplayer.conf.mobile_force_fullscreen && flowplayer.support.fvmobile || !flowplayer.support.fullscreen && fsforce || playlist_with_fullscreen ) {
11
  if( !flowplayer.support.fullscreen ) {
12
  api.bind('ready', function() {
 
 
13
  api.fullscreen(true);
14
  });
15
  }
@@ -26,6 +32,8 @@ flowplayer(function(api, root) {
26
  });
27
 
28
  api.on('resume', function() {
 
 
29
  if( !api.isFullscreen ) api.fullscreen();
30
  });
31
 
@@ -56,12 +64,18 @@ flowplayer(function(api, root) {
56
  api.fullscreen(false);
57
  } else if( api.loading ) {
58
  is_closing = true;
59
- api.one('ready', function(e) {
60
- api.unload();
61
- })
 
 
 
 
62
  }
63
  api.fakeFullscreen(false);
64
-
 
 
65
  });
66
 
67
  jQuery('[rel='+root.attr('id')+'] a').on('click', function(e) {
@@ -100,10 +114,12 @@ flowplayer(function(api, root) {
100
 
101
  if( flowplayer.support.android && flowplayer.conf.mobile_landscape_fullscreen && window.screen && window.screen.orientation ) {
102
  api.on('fullscreen', function(a,api) {
103
- if( api.video.width > api.video.height ) {
104
- screen.orientation.lock("landscape-primary");
105
- } else {
106
  screen.orientation.lock("portrait-primary");
 
 
107
  }
108
  })
109
  }
6
  playlist_with_fullscreen = playlist.hasClass('fp-playlist-season') || playlist.hasClass('fp-playlist-polaroid');
7
  fsforce = root.data('fsforce') == true; // used for players which load using Ajax after click and then they need fullscreen
8
 
9
+ if( root.data('fullscreen') == false ) {
10
+ return;
11
+ }
12
+
13
  // Force fullscreen on mobile setting
14
  if( flowplayer.conf.mobile_force_fullscreen && flowplayer.support.fvmobile || !flowplayer.support.fullscreen && fsforce || playlist_with_fullscreen ) {
15
  if( !flowplayer.support.fullscreen ) {
16
  api.bind('ready', function() {
17
+ if( api.video.vr ) return;
18
+
19
  api.fullscreen(true);
20
  });
21
  }
32
  });
33
 
34
  api.on('resume', function() {
35
+ if( api.video.vr ) return;
36
+
37
  if( !api.isFullscreen ) api.fullscreen();
38
  });
39
 
64
  api.fullscreen(false);
65
  } else if( api.loading ) {
66
  is_closing = true;
67
+
68
+ // triggering unload on ready didn't work with HLS.js
69
+ api.one('resume', function(e) {
70
+ // it's already closed!
71
+ is_closing = false;
72
+ api.pause();
73
+ });
74
  }
75
  api.fakeFullscreen(false);
76
+
77
+ // do not run Flowplayer unload() as that would reset the video time
78
+ return false;
79
  });
80
 
81
  jQuery('[rel='+root.attr('id')+'] a').on('click', function(e) {
114
 
115
  if( flowplayer.support.android && flowplayer.conf.mobile_landscape_fullscreen && window.screen && window.screen.orientation ) {
116
  api.on('fullscreen', function(a,api) {
117
+ // If the video dimensions are not known assume it's wide and landscape mode should be used
118
+ // TODO: Instead fix HLS.js engine to report video width and height properly
119
+ if( (typeof api.video.width != 'undefined' && typeof api.video.height != 'undefined') && (api.video.width != 0 && api.video.height != 0 && api.video.width < api.video.height) ) {
120
  screen.orientation.lock("portrait-primary");
121
+ } else { // if no height or width then force landscape
122
+ screen.orientation.lock("landscape-primary");
123
  }
124
  })
125
  }
flowplayer/modules/fv-player.js CHANGED
@@ -10,6 +10,7 @@ if( typeof(fv_flowplayer_conf) != "undefined" ) {
10
  } catch(e) {}
11
 
12
  flowplayer.conf = fv_flowplayer_conf;
 
13
  flowplayer.conf.chromecast = false; // we have our own Chromecast code to use instead
14
  flowplayer.conf.embed = false;
15
  flowplayer.conf.share = false;
@@ -112,6 +113,9 @@ function fv_player_videos_parse(args, root) {
112
  }
113
  });
114
  }
 
 
 
115
  return videos;
116
  }
117
 
@@ -132,7 +136,10 @@ jQuery(document).ready( function() {
132
  if( loading_count < 1000 && (
133
  window.fv_video_intelligence_conf && !window.FV_Player_IMA ||
134
  window.fv_vast_conf && !window.FV_Player_IMA ||
135
- window.fv_player_pro && !window.FV_Flowplayer_Pro && document.getElementById('fv_player_pro') != fv_player_pro
 
 
 
136
  ) ) {
137
  return;
138
  }
@@ -178,10 +185,6 @@ function fv_player_preload() {
178
  root.find('.fp-volume').hide();
179
  }
180
 
181
- if( root.data('fullscreen') == false ) {
182
- root.find('.fp-fullscreen').remove();
183
- }
184
-
185
  if( root.data('volume') == 0 && root.hasClass('no-controlbar') ) {
186
  root.find('.fp-volume').remove();
187
  }
@@ -215,9 +218,17 @@ function fv_player_preload() {
215
  index = jQuery('a',playlist).index(this);
216
  $prev = $this.prev('a'),
217
  item = $this.data('item');
 
 
 
 
 
 
 
 
218
 
219
  if ($prev.length && $this.is(':visible') && !$prev.is(':visible')) {
220
- $prev.click();
221
  return false;
222
  }
223
 
@@ -369,6 +380,26 @@ function fv_player_preload() {
369
  });
370
  console.log( 'FV Player Status ('+type+')', status );
371
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
372
  });
373
 
374
  //sets height for embedded players
@@ -404,16 +435,44 @@ function fv_player_preload() {
404
  jQuery(window).on('hashchange',fv_autoplay_exec);
405
  }
406
 
 
 
 
 
 
 
 
 
 
 
 
407
 
408
- function fv_player_load() {
409
-
410
- jQuery('.flowplayer' ).each( function(i,el) {
411
  var root = jQuery(el);
412
  var api = root.data('flowplayer');
413
- if( api ) return;
414
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
415
  if( root.attr('data-item') ) {
416
- root.flowplayer( { clip: fv_player_videos_parse(root.attr('data-item'), root) });
 
417
  } else if( playlist = jQuery( '[rel='+root.attr('id')+']' ) ) {
418
  if ( playlist.find('a[data-item]').length == 0 ) return; // respect old playlist script setup
419
 
@@ -426,7 +485,14 @@ function fv_player_load() {
426
  }
427
  });
428
 
429
- root.flowplayer( { playlist: items } );
 
 
 
 
 
 
 
430
  }
431
  } );
432
 
@@ -440,6 +506,10 @@ function fv_player_load() {
440
  jQuery('.fv_flowplayer_tabs_content').tabs();
441
  }
442
 
 
 
 
 
443
  }
444
 
445
 
@@ -689,7 +759,7 @@ function fv_autoplay_init(root, index, time, abStart, abEnd){
689
 
690
  if(root.parent().hasClass('ui-tabs-panel')){
691
  var tabId = root.parent().attr('id');
692
- jQuery('[aria-controls=' + tabId + '] a').click();
693
  }
694
 
695
  if( !root.find('.fp-player').attr('class').match(/\bis-sticky/) ){
@@ -701,7 +771,7 @@ function fv_autoplay_init(root, index, time, abStart, abEnd){
701
  }
702
  if(root.hasClass('lightboxed')){
703
  setTimeout(function(){
704
- jQuery('[href=\\#' + root.attr('id')+ ']').click();
705
  },0);
706
  }
707
 
@@ -826,7 +896,12 @@ function fv_autoplay_exec(){
826
  if( !fv_player_did_autoplay && autoplay ) {
827
  if( !( ( flowplayer.support.android || flowplayer.support.iOS ) && api && api.conf.clip.sources[0].type == 'video/youtube' ) ) { // don't let these mobile devices autoplay YouTube
828
  fv_player_did_autoplay = true;
829
- api.load();
 
 
 
 
 
830
 
831
  // prevent play arrow and control bar from appearing for a fraction of second for an autoplayed video
832
  var play_icon = root.find('.fp-play').addClass('invisible'),
10
  } catch(e) {}
11
 
12
  flowplayer.conf = fv_flowplayer_conf;
13
+ flowplayer.conf.fullscreen = false; // replaced by fv_fullscreen
14
  flowplayer.conf.chromecast = false; // we have our own Chromecast code to use instead
15
  flowplayer.conf.embed = false;
16
  flowplayer.conf.share = false;
113
  }
114
  });
115
  }
116
+
117
+ root.trigger( 'fv_player_videos_parse', videos );
118
+
119
  return videos;
120
  }
121
 
136
  if( loading_count < 1000 && (
137
  window.fv_video_intelligence_conf && !window.FV_Player_IMA ||
138
  window.fv_vast_conf && !window.FV_Player_IMA ||
139
+ window.fv_player_pro && !window.FV_Flowplayer_Pro && document.getElementById('fv_player_pro') != fv_player_pro ||
140
+ window.fv_player_user_playlists && !fv_player_user_playlists.is_loaded ||
141
+ // if using FV Player JS Loader wait until all scripts have finished loading
142
+ window.FV_Player_JS_Loader_scripts_total && window.FV_Player_JS_Loader_scripts_loaded < FV_Player_JS_Loader_scripts_total
143
  ) ) {
144
  return;
145
  }
185
  root.find('.fp-volume').hide();
186
  }
187
 
 
 
 
 
188
  if( root.data('volume') == 0 && root.hasClass('no-controlbar') ) {
189
  root.find('.fp-volume').remove();
190
  }
218
  index = jQuery('a',playlist).index(this);
219
  $prev = $this.prev('a'),
220
  item = $this.data('item');
221
+
222
+ // Open editing for the playlist item which was clicked
223
+ // TODO: There should be a better way of sending a signal to the editor!
224
+ if( location.href.match(/wp-admin/) && $this.parents('.fv-player-editor-preview').length > 0 ) {
225
+ fv_flowplayer_conf.current_video_to_edit = index;
226
+ $this.parents('.fv-player-custom-video').find('.edit-video .fv-player-editor-button').trigger('click');
227
+ return false;
228
+ }
229
 
230
  if ($prev.length && $this.is(':visible') && !$prev.is(':visible')) {
231
+ $prev.trigger('click');
232
  return false;
233
  }
234
 
380
  });
381
  console.log( 'FV Player Status ('+type+')', status );
382
  }
383
+
384
+ // Tell the world that the FV Player has finished loading
385
+ if( !window.fv_player_loaded ) {
386
+ window.fv_player_loaded = true;
387
+ setTimeout( function() {
388
+
389
+ // jQuery event
390
+ jQuery(document).trigger('fv_player_loaded');
391
+
392
+ // pure JS event
393
+ var event= new CustomEvent('fv_player_loaded',[]);
394
+ document.dispatchEvent(event);
395
+ }, 100 );
396
+ }
397
+
398
+ // It's good if the player element can tell others that the FV Player has loaded in it
399
+ setTimeout( function() {
400
+ root.trigger('fv_player_loaded');
401
+ // Seems like root.data('flowplayer') is only available after a while, it won't work without this delay
402
+ }, 10 );
403
  });
404
 
405
  //sets height for embedded players
435
  jQuery(window).on('hashchange',fv_autoplay_exec);
436
  }
437
 
438
+ /*
439
+ Calling this without any argument will check all .flowplayer elements and load FV Player where not loaded yet. You can also call it for a single element, then it loads that one and gives you the Flowplayer API for that one. If it's already loaded it gives you that API too - great for lazy load use.
440
+ */
441
+ function fv_player_load( forced_el ) {
442
+ if( forced_el && forced_el.lenght > 1 ) {
443
+ console.log('FV Player: Can\'t use fv_player_load with more than a single forced element!');
444
+ }
445
+ var load_players = forced_el,
446
+ forced_api = false;
447
+
448
+ if( !load_players ) load_players = jQuery('.flowplayer' );
449
 
450
+ load_players.each( function(i,el) {
 
 
451
  var root = jQuery(el);
452
  var api = root.data('flowplayer');
453
+ if( api ) {
454
+ if( forced_el ) forced_api = api;
455
+ return;
456
+ }
457
+
458
+ if( forced_el ) { // if the element load is forced we process the lazy load data too
459
+ root.find('.fp-preload, .fvfp_admin_error').remove();
460
+ if( root.attr('data-item-lazy') ) {
461
+ root.attr('data-item', root.attr('data-item-lazy') );
462
+ root.removeAttr('item-lazy')
463
+ } else if( playlist = jQuery( '[rel='+root.attr('id')+']' ) ) {
464
+ playlist.find('a[data-item-lazy]').each( function(k,v) {
465
+ v = jQuery(v);
466
+ v.attr('data-item', v.attr('data-item-lazy') );
467
+ v.removeAttr('data-item-lazy');
468
+ });
469
+ }
470
+ }
471
+
472
+ var conf = false;
473
  if( root.attr('data-item') ) {
474
+ conf = { clip: fv_player_videos_parse(root.attr('data-item'), root) };
475
+
476
  } else if( playlist = jQuery( '[rel='+root.attr('id')+']' ) ) {
477
  if ( playlist.find('a[data-item]').length == 0 ) return; // respect old playlist script setup
478
 
485
  }
486
  });
487
 
488
+ conf = { playlist: items };
489
+ }
490
+
491
+ if( conf ) {
492
+ // without this none of the root element data attributes would be processed
493
+ conf = flowplayer.extend(conf, root.data());
494
+ forced_api = flowplayer( root[0], conf );
495
+ root.data('flowplayer',forced_api);
496
  }
497
  } );
498
 
506
  jQuery('.fv_flowplayer_tabs_content').tabs();
507
  }
508
 
509
+ if( forced_el && forced_api ) {
510
+ return forced_api;
511
+ }
512
+
513
  }
514
 
515
 
759
 
760
  if(root.parent().hasClass('ui-tabs-panel')){
761
  var tabId = root.parent().attr('id');
762
+ jQuery('[aria-controls=' + tabId + '] a').trigger('click');
763
  }
764
 
765
  if( !root.find('.fp-player').attr('class').match(/\bis-sticky/) ){
771
  }
772
  if(root.hasClass('lightboxed')){
773
  setTimeout(function(){
774
+ jQuery('[href=\\#' + root.attr('id')+ ']').trigger('click');
775
  },0);
776
  }
777
 
896
  if( !fv_player_did_autoplay && autoplay ) {
897
  if( !( ( flowplayer.support.android || flowplayer.support.iOS ) && api && api.conf.clip.sources[0].type == 'video/youtube' ) ) { // don't let these mobile devices autoplay YouTube
898
  fv_player_did_autoplay = true;
899
+
900
+ if( api.conf.playlist.length && jQuery.isNumeric(autoplay) ) {
901
+ api.play( parseInt(autoplay) );
902
+ } else {
903
+ api.load();
904
+ }
905
 
906
  // prevent play arrow and control bar from appearing for a fraction of second for an autoplayed video
907
  var play_icon = root.find('.fp-play').addClass('invisible'),
flowplayer/modules/mobile.module.js CHANGED
@@ -31,4 +31,70 @@ if( typeof(fv_flowplayer_mobile_switch_array) != "undefined" ) {
31
 
32
  fv_flowplayer_mobile_switch( i );
33
  }
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
 
32
  fv_flowplayer_mobile_switch( i );
33
  }
34
+ }
35
+
36
+
37
+ /*
38
+ * Mobile touch screen double-tap on the left/right side of video to seek -10/+10 seconds
39
+ */
40
+ flowplayer( function(api,root) {
41
+ if( !flowplayer.support.touch ) return;
42
+
43
+ jQuery.fn.fv_single_double_click = function(single_click_callback, double_click_callback, timeout) {
44
+ return this.each(function(){
45
+ var clicks = 0, self = this;
46
+ jQuery(this).on( 'click', function(event){
47
+ clicks++;
48
+ if (clicks == 1) {
49
+ setTimeout(function(){
50
+ if(clicks == 1) {
51
+ single_click_callback.call(self, event);
52
+ } else {
53
+ double_click_callback.call(self, event);
54
+ }
55
+ clicks = 0;
56
+ }, timeout || 300);
57
+ }
58
+ });
59
+ });
60
+ }
61
+
62
+ root = jQuery(root);
63
+
64
+ var left = jQuery('<div class="fv-fp-tap-left"><span>-10s</span></div>'),
65
+ right = jQuery('<div class="fv-fp-tap-right"><span>+10s</span></div>');
66
+
67
+ left.fv_single_double_click(function () {
68
+ api.toggle();
69
+ }, function (e) {
70
+ maybe_seek( e, left, api.ready ? api.video.time - 10 : false );
71
+ });
72
+
73
+ right.fv_single_double_click(function () {
74
+ api.toggle();
75
+ }, function (e) {
76
+ maybe_seek( e, right, api.ready ? api.video.time + 10 : false );
77
+ });
78
+
79
+ root.find('.fp-ui').append(left).append(right);
80
+
81
+ function maybe_seek( e, el, time ) {
82
+ if( api.ready ) {
83
+ api.seek( time );
84
+ animation(el);
85
+
86
+ } else {
87
+ api.toggle();
88
+ };
89
+
90
+ e.preventDefault();
91
+ }
92
+
93
+ function animation( el ) {
94
+ el.addClass('is-active');
95
+ setTimeout( function() {
96
+ el.removeClass('is-active');
97
+ }, 500 );
98
+ }
99
+
100
+ });
flowplayer/modules/multiple-playback.module.js CHANGED
@@ -1,13 +1,11 @@
1
  flowplayer( function(api,root) {
2
- if( !api.conf.multiple_playback ) return;
3
-
4
  root = jQuery(root);
5
 
6
  var instance_id = root.data('flowplayer-instance-id');
7
 
8
  flowplayer.audible_instance = -1;
9
 
10
- // if multiple playback is allowed, we discard the splash configuration for this instance
11
  // that way it won't get unloaded if another player starts playing
12
  // we need to do this once it actually starts loading, as otherwise Flowplayer would only start buffering the video
13
  api.one('load', function() {
@@ -18,31 +16,45 @@ flowplayer( function(api,root) {
18
  });
19
 
20
  // on iOS only one audible video can play at a time, so we must mute the other players
21
- api.on('ready', function() { // using ready event to making sure other players are muted only if the video actually loads
22
  var is_muted = root.data('volume') == 0;
23
-
24
  if( !is_muted ) {
25
- // we go through all the players to mute them all
26
- jQuery('.flowplayer[data-flowplayer-instance-id]').each( function() {
27
-
28
- // we must skip the current player, as the ready event can occur multiple times
29
- // like for example when you switch to another video in playlist
30
- if( instance_id == jQuery(this).data('flowplayer-instance-id') || instance_id == flowplayer.audible_instance ) return;
31
-
32
- var player = jQuery(this).data('flowplayer');
33
-
34
- if( player ) {
35
- if(player.playing) {
36
- player.mute(true,true);
37
- } else {
38
- player.clearLiveStreamCountdown(); // if not playing stop countdown and unload if other video plays
39
- }
40
- }
41
- });
42
-
43
  // mark the current player as the one who is making the noise
44
  flowplayer.audible_instance = instance_id;
45
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
 
47
  }).on('mute', function(e,api,muted) {
48
  // if the player was unmuted, mute the player which was audible previously
@@ -53,5 +65,20 @@ flowplayer( function(api,root) {
53
  flowplayer.audible_instance = instance_id;
54
  }
55
 
56
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  });
1
  flowplayer( function(api,root) {
 
 
2
  root = jQuery(root);
3
 
4
  var instance_id = root.data('flowplayer-instance-id');
5
 
6
  flowplayer.audible_instance = -1;
7
 
8
+ // we discard the splash configuration for each player instance
9
  // that way it won't get unloaded if another player starts playing
10
  // we need to do this once it actually starts loading, as otherwise Flowplayer would only start buffering the video
11
  api.one('load', function() {
16
  });
17
 
18
  // on iOS only one audible video can play at a time, so we must mute the other players
19
+ api.on('ready', function() {
20
  var is_muted = root.data('volume') == 0;
21
+
22
  if( !is_muted ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  // mark the current player as the one who is making the noise
24
  flowplayer.audible_instance = instance_id;
25
  }
26
+
27
+ // we go through all the players to paused or mute them all
28
+ jQuery('.flowplayer[data-flowplayer-instance-id]').each( function() {
29
+ var player = jQuery(this).data('flowplayer');
30
+
31
+ // we must skip the current player, as the load even can occur multiple times
32
+ // like for example when you switch to another video in playlist
33
+ var current_instance_id = jQuery(this).data('flowplayer-instance-id');
34
+
35
+ if( flowplayer.audible_instance == -1 || current_instance_id == flowplayer.audible_instance || current_instance_id == instance_id ) return;
36
+
37
+ if( player ) {
38
+ if( player.ready ) {
39
+ // if multiple video playback is enabled we go through all the players to mute them all
40
+ if( api.conf.multiple_playback ) {
41
+ // but only if the video is audible
42
+ if( !is_muted ) {
43
+ player.mute(true,true);
44
+ }
45
+
46
+ // otherwide pause the other player
47
+ } else if( player.playing ) {
48
+ player.pause();
49
+ }
50
+ } else {
51
+ player.clearLiveStreamCountdown(); // if not playing stop countdown and unload if other video plays
52
+
53
+ // TODO: Check for YouTube and Vimeo
54
+ player.unload();
55
+ }
56
+ }
57
+ });
58
 
59
  }).on('mute', function(e,api,muted) {
60
  // if the player was unmuted, mute the player which was audible previously
65
  flowplayer.audible_instance = instance_id;
66
  }
67
 
68
+ }).on('resume', function() {
69
+ // if we resume a video, we need to pause all the other ones, unless multiple playback is enabled
70
+ if( !api.conf.multiple_playback ) {
71
+ jQuery('.flowplayer[data-flowplayer-instance-id]').each( function() {
72
+
73
+ // of course skip the current player which is being resumed
74
+ if( instance_id == jQuery(this).data('flowplayer-instance-id') ) return;
75
+
76
+ var player = jQuery(this).data('flowplayer');
77
+
78
+ if( player && player.playing ) {
79
+ player.pause();
80
+ }
81
+ });
82
+ }
83
+ })
84
  });
flowplayer/modules/playlist-controlbar.module.js CHANGED
@@ -38,7 +38,7 @@ flowplayer( function(api,root) {
38
  else {
39
  // workaround for flowplayer 7 not picking up our menu as one of its own,
40
  // thus not closing it
41
- root.click();
42
  api.showMenu(playlist_menu[0]);
43
  }
44
  });
38
  else {
39
  // workaround for flowplayer 7 not picking up our menu as one of its own,
40
  // thus not closing it
41
+ root.trigger('click');
42
  api.showMenu(playlist_menu[0]);
43
  }
44
  });
flowplayer/modules/playlist-missing-item.module.js CHANGED
@@ -11,10 +11,10 @@
11
  */
12
  flowplayer( function(api,root) {
13
  root = jQuery(root);
14
- var playlist = api.conf.playlist;
15
- var videoIndex;
16
-
17
- api.bind("ready", function (e, api, video) {
18
  videoIndex = video.index;
19
  });
20
 
@@ -42,6 +42,7 @@ flowplayer( function(api,root) {
42
  console.log('FV Player: Playlist item failure, auto-advancing to '+(videoIndex+1)+'. item');
43
  api.play(videoIndex);
44
  }
45
- },1000);
46
  });
47
- });
 
11
  */
12
  flowplayer( function(api,root) {
13
  root = jQuery(root);
14
+ var playlist = api.conf.playlist,
15
+ videoIndex;
16
+
17
+ api.bind("load", function (e, api, video) {
18
  videoIndex = video.index;
19
  });
20
 
42
  console.log('FV Player: Playlist item failure, auto-advancing to '+(videoIndex+1)+'. item');
43
  api.play(videoIndex);
44
  }
45
+ }, 1000 );
46
  });
47
+
48
+ });
flowplayer/modules/playlist-repeat.module.js CHANGED
@@ -66,7 +66,7 @@ flowplayer( function(api,root) {
66
  else {
67
  // workaround for flowplayer 7 not picking up our menu as one of its own,
68
  // thus not closing it
69
- root.click();
70
  api.showMenu(playlist_menu[0]);
71
  }
72
  });
@@ -122,7 +122,7 @@ flowplayer( function(api,root) {
122
  });
123
 
124
  if( api.conf.loop ) {
125
- jQuery('a[data-action=repeat_playlist]', playlist_menu ).click();
126
  }
127
 
128
  api.on('progress', function() {
@@ -158,17 +158,32 @@ flowplayer( function(api,root) {
158
  }
159
  }
160
 
161
- if( root.data('button-rewind') && root.find('.fv-fp-rewind').length == 0 ) {
162
- var button_rewind = jQuery('<span class="fv-fp-rewind"><svg viewBox="0 0 24 24" width="24px" height="24px" class="fvp-icon fvp-rewind"><use xlink:href="#fvp-rewind"></use></svg></span>');
163
-
164
- button_rewind.insertBefore( root.find('.fp-controls .fp-elapsed') ).on('click', function(e) {
165
- e.preventDefault();
166
- e.stopPropagation();
 
 
 
 
 
 
 
 
 
 
167
 
168
- api.seek(api.video.time-10);
169
- });
 
 
 
 
170
 
171
- button_rewind.toggle(!api.video.live);
 
172
  }
173
 
174
  }).bind('unload', function() {
66
  else {
67
  // workaround for flowplayer 7 not picking up our menu as one of its own,
68
  // thus not closing it
69
+ root.trigger('click');
70
  api.showMenu(playlist_menu[0]);
71
  }
72
  });
122
  });
123
 
124
  if( api.conf.loop ) {
125
+ jQuery('a[data-action=repeat_playlist]', playlist_menu ).trigger('click');
126
  }
127
 
128
  api.on('progress', function() {
158
  }
159
  }
160
 
161
+ if( root.data('button-rewind') ) {
162
+ if( root.find('.fv-fp-rewind').length == 0 ) {
163
+ var button_rewind = jQuery('<span class="fv-fp-rewind"><svg viewBox="0 0 24 24" width="24px" height="24px" class="fvp-icon fvp-rewind"><use xlink:href="#fvp-rewind"></use></svg></span>');
164
+
165
+ button_rewind.insertBefore( root.find('.fp-controls .fp-playbtn') ).on('click', function(e) {
166
+ e.preventDefault();
167
+ e.stopPropagation();
168
+
169
+ api.seek(api.video.time-10);
170
+ });
171
+
172
+ button_rewind.toggle(!api.video.live);
173
+ }
174
+
175
+ if( root.find('.fv-fp-forward').length == 0 ) {
176
+ var button_forward = jQuery('<span class="fv-fp-forward"><svg viewBox="0 0 24 24" width="24px" height="24px" class="fvp-icon fvp-forward"><use xlink:href="#fvp-forward"></use></svg></span>');
177
 
178
+ button_forward.insertAfter( root.find('.fp-controls .fp-playbtn') ).on('click', function(e) {
179
+ e.preventDefault();
180
+ e.stopPropagation();
181
+
182
+ api.seek(api.video.time+10);
183
+ });
184
 
185
+ button_forward.toggle(!api.video.live);
186
+ }
187
  }
188
 
189
  }).bind('unload', function() {
flowplayer/modules/popup-anything.module.js ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Compatibility with https://wordpress.org/plugins/popup-anything-on-click/
3
+ */
4
+ document.addEventListener('custombox:overlay:close', function(e) { // popup-anything closed, using Custombox library
5
+ console.log( 'FV Player: Custombox/Popup anything ligtbox closed');
6
+
7
+ var $players = jQuery(this).find('.flowplayer'); // find players in the popup
8
+
9
+ if( $players.length == 0 ) return; // no players in popup
10
+
11
+ console.log( 'FV Player: Custombox/Popup anything ligtbox contains a player');
12
+
13
+ $players.each(function(index,player) {
14
+ var api = jQuery(player).data("flowplayer");
15
+
16
+ if( typeof(api) != "undefined") {
17
+ if( api.playing ) { // pause if playing
18
+ console.log( 'FV Player: Custombox/Popup anything ligtbox video pause');
19
+ api.pause();
20
+ } else if( api.loading ) { // uload if still loading
21
+ api.one('ready', function() {
22
+ console.log( 'FV Player: Custombox/Popup anything ligtbox video unload');
23
+ api.unload();
24
+ })
25
+ }
26
+ }
27
+ });
28
+
29
+ });
flowplayer/modules/sharing.module.js CHANGED
@@ -18,7 +18,7 @@ flowplayer( function(api,root) {
18
 
19
  root.find('.fp-logo, .fp-header').on('click', function(e) {
20
  if (e.target !== this) return;
21
- root.find('.fp-ui').click();
22
  });
23
 
24
  jQuery('.fvp-share-bar .sharing-facebook',root).append('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="#fff"><title>Facebook</title><path d="M11.9 5.2l-2.6 0 0-1.6c0-0.7 0.3-0.7 0.7-0.7 0.3 0 1.6 0 1.6 0l0-2.9 -2.3 0c-2.6 0-3.3 2-3.3 3.3l0 2 -1.6 0 0 2.9 1.6 0c0 3.6 0 7.8 0 7.8l3.3 0c0 0 0-4.2 0-7.8l2.3 0 0.3-2.9Z"/></svg>');
@@ -67,13 +67,13 @@ flowplayer( function(api,root) {
67
  api.bind("pause resume finish unload ready", function(e,api) {
68
  root.addClass('no-brand');
69
  });
70
-
71
  api.one('ready', function() {
72
  root.find('.fp-fullscreen').clone().appendTo( root.find('.fp-controls') );
73
  });
74
-
75
  api.bind("ready", function (e, api, video) {
76
- setTimeout( function () {
77
  jQuery('.fvp-share-bar',root).show();
78
 
79
  jQuery('.fv-player-buttons-wrap',root).appendTo(jQuery('.fv-player-buttons-wrap',root).parent().find('.fp-ui'));
@@ -104,22 +104,29 @@ flowplayer( function(api,root) {
104
  // replacing loading SVG with CSS animation
105
  root.find('.fp-waiting').html('<div class="fp-preload"><b></b><b></b><b></b><b></b></div>');
106
 
 
 
 
 
 
107
  if( !flowplayer.support.fullscreen ) {
108
- var id = root.attr('id'),
109
- alternative = !flowplayer.conf.native_fullscreen && flowplayer.conf.mobile_alternative_fullscreen;
110
-
111
- api.bind('fullscreen', function(e,api) {
112
- jQuery('#wpadminbar, .nc_wrapper').hide();
113
- if( alternative ) {
114
- if( api.video.type == 'video/youtube' ) return;
115
- root.before('<span data-fv-placeholder="'+id+'"></span>');
116
- root.appendTo('body');
117
- }
118
- });
119
- api.bind('fullscreen-exit', function(e,api,video) {
120
- jQuery('#wpadminbar, .nc_wrapper').show();
121
- if( alternative ) jQuery('span[data-fv-placeholder='+id+']').replaceWith(root);
122
- });
123
  }
124
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  });
18
 
19
  root.find('.fp-logo, .fp-header').on('click', function(e) {
20
  if (e.target !== this) return;
21
+ root.find('.fp-ui').trigger('click');
22
  });
23
 
24
  jQuery('.fvp-share-bar .sharing-facebook',root).append('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="#fff"><title>Facebook</title><path d="M11.9 5.2l-2.6 0 0-1.6c0-0.7 0.3-0.7 0.7-0.7 0.3 0 1.6 0 1.6 0l0-2.9 -2.3 0c-2.6 0-3.3 2-3.3 3.3l0 2 -1.6 0 0 2.9 1.6 0c0 3.6 0 7.8 0 7.8l3.3 0c0 0 0-4.2 0-7.8l2.3 0 0.3-2.9Z"/></svg>');
67
  api.bind("pause resume finish unload ready", function(e,api) {
68
  root.addClass('no-brand');
69
  });
70
+
71
  api.one('ready', function() {
72
  root.find('.fp-fullscreen').clone().appendTo( root.find('.fp-controls') );
73
  });
74
+
75
  api.bind("ready", function (e, api, video) {
76
+ setTimeout( function () {
77
  jQuery('.fvp-share-bar',root).show();
78
 
79
  jQuery('.fv-player-buttons-wrap',root).appendTo(jQuery('.fv-player-buttons-wrap',root).parent().find('.fp-ui'));
104
  // replacing loading SVG with CSS animation
105
  root.find('.fp-waiting').html('<div class="fp-preload"><b></b><b></b><b></b><b></b></div>');
106
 
107
+ var id = root.attr('id'),
108
+ alternative = !flowplayer.conf.native_fullscreen && flowplayer.conf.mobile_alternative_fullscreen,
109
+ events_enter = 'fakefullscreen',
110
+ events_exit = 'fakefullscreen-exit';
111
+
112
  if( !flowplayer.support.fullscreen ) {
113
+ events_enter += ' fullscreen';
114
+ events_exit += ' fullscreen-exit';
 
 
 
 
 
 
 
 
 
 
 
 
 
115
  }
116
+
117
+ api.bind( events_enter, function(e,api) {
118
+ jQuery('#wpadminbar, .nc_wrapper').hide();
119
+ if( alternative || e.type == 'fakefullscreen' ) {
120
+ if( api.video.type == 'video/youtube' ) return;
121
+ root.before('<span data-fv-placeholder="'+id+'"></span>');
122
+ root.appendTo('body');
123
+ }
124
+ });
125
+ api.bind( events_exit, function(e,api,video) {
126
+ jQuery('#wpadminbar, .nc_wrapper').show();
127
+ if( alternative || e.type == 'fakefullscreen-exit' ) {
128
+ jQuery('span[data-fv-placeholder='+id+']').replaceWith(root);
129
+ }
130
+ });
131
+
132
  });
flowplayer/modules/stats.module.js CHANGED
@@ -6,11 +6,19 @@ flowplayer( function(api,root) {
6
 
7
  api.on('ready', function(e,api) {
8
  api.one('progress', function(e,api) {
9
- if( api.video.id ) {
 
 
 
 
 
 
10
  jQuery.post( api.conf.fv_stats.url, {
11
  'blog_id' : api.conf.fv_stats.blog_id,
12
- 'tag' : 'play',
13
- 'video_id' : api.video.id
 
 
14
  } );
15
  }
16
  });
6
 
7
  api.on('ready', function(e,api) {
8
  api.one('progress', function(e,api) {
9
+ if( root.data('fv_stats_data') ) {
10
+ try {
11
+ var player_post_data = root.data('fv_stats_data');
12
+ } catch(e) {
13
+ return false;
14
+ }
15
+
16
  jQuery.post( api.conf.fv_stats.url, {
17
  'blog_id' : api.conf.fv_stats.blog_id,
18
+ 'video_id' : api.video.id ? api.video.id : 0,
19
+ 'player_id': player_post_data.player_id,
20
+ 'post_id' : player_post_data.post_id,
21
+ 'tag' : 'play'
22
  } );
23
  }
24
  });
flowplayer/modules/sticky.module.js CHANGED
@@ -48,10 +48,24 @@
48
 
49
  $window
50
  .on("resize", function() {
 
 
 
 
 
 
 
51
  top = $flowplayerDiv.offset().top;
52
  offset = Math.floor(top + ($flowplayerDiv.outerHeight() / 2));
53
  })
54
  .on("scroll", function() {
 
 
 
 
 
 
 
55
  top = $flowplayerDiv.offset().top;
56
  offset = Math.floor(top + ($flowplayerDiv.outerHeight() / 2));
57
  if ($window.scrollTop() > offset && change) {
@@ -98,6 +112,10 @@
98
  api.trigger( 'sticky-exit', [ api ] );
99
  }
100
  }
 
 
 
 
101
  });
102
 
103
  jQuery(function($) {
48
 
49
  $window
50
  .on("resize", function() {
51
+ if( !is_big_enough() ) {
52
+ if( is_sticky ) {
53
+ fv_player_sticky_class_remove();
54
+ }
55
+ return;
56
+ }
57
+
58
  top = $flowplayerDiv.offset().top;
59
  offset = Math.floor(top + ($flowplayerDiv.outerHeight() / 2));
60
  })
61
  .on("scroll", function() {
62
+ if( !is_big_enough() ) {
63
+ if( is_sticky ) {
64
+ fv_player_sticky_class_remove();
65
+ }
66
+ return;
67
+ }
68
+
69
  top = $flowplayerDiv.offset().top;
70
  offset = Math.floor(top + ($flowplayerDiv.outerHeight() / 2));
71
  if ($window.scrollTop() > offset && change) {
112
  api.trigger( 'sticky-exit', [ api ] );
113
  }
114
  }
115
+
116
+ function is_big_enough() {
117
+ return jQuery(window).innerWidth() >= 1020;
118
+ }
119
  });
120
 
121
  jQuery(function($) {
includes/class.fv-player-wizard-base.php CHANGED
@@ -131,10 +131,10 @@ abstract class FV_Player_Wizard_Base_Class {
131
  $color = '#f88';
132
  }
133
  ?>
134
- <tr style='background-color: <?php echo $color; ?>'>
135
- <td><?php echo $log['date']; ?></td>
136
- <td><?php echo $log['title']; ?></td>
137
- <td><?php print_r($log['message']); ?></td>
138
  </tr>
139
  <?php endforeach; ?>
140
  </table>
131
  $color = '#f88';
132
  }
133
  ?>
134
+ <tr style='background-color: <?php echo htmlentities($color); ?>'>
135
+ <td><?php echo htmlentities( $log['date'] ); ?></td>
136
+ <td><?php echo htmlentities($log['title']); ?></td>
137
+ <td><?php echo htmlentities(print_r($log['message'], true)); ?></td>
138
  </tr>
139
  <?php endforeach; ?>
140
  </table>
includes/fp-api-private.php CHANGED
@@ -54,6 +54,10 @@ class FV_Wordpress_Flowplayer_Plugin_Private
54
  }
55
 
56
  add_action( 'admin_enqueue_scripts', array( $this, 'pointers_enqueue' ) );
 
 
 
 
57
  add_action( 'wp_ajax_fv_foliopress_ajax_pointers', array( $this, 'pointers_ajax' ), 999 );
58
  add_action( 'wp_ajax_check_domain_license', array( $this, 'check_domain_license' ) );
59
 
@@ -466,8 +470,18 @@ $this->strPrivateAPI - also
466
  }
467
  }
468
  }
469
-
470
-
 
 
 
 
 
 
 
 
 
 
471
  function pointers_enqueue() {
472
  global $wp_version;
473
  if( ! current_user_can( 'manage_options' ) || ( isset($this->pointer_boxes) && count( $this->pointer_boxes ) == 0 ) || version_compare( $wp_version, '3.4', '<' ) ) {
@@ -481,8 +495,33 @@ $this->strPrivateAPI - also
481
 
482
  add_action( 'admin_print_footer_scripts', array( $this, 'pointers_init_scripts' ) );
483
  }
484
-
485
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
486
  private function get_readme_url_remote( $url = false ) { // todo: caching
487
  $output = false;
488
 
@@ -629,9 +668,16 @@ $this->strPrivateAPI - also
629
  }
630
  //]]>
631
  </script>
632
- <?php
 
633
 
634
  foreach( $this->pointer_boxes AS $key => $args ) {
 
 
 
 
 
 
635
  $nonce = wp_create_nonce( $key );
636
 
637
  $args = wp_parse_args( $args, array(
54
  }
55
 
56
  add_action( 'admin_enqueue_scripts', array( $this, 'pointers_enqueue' ) );
57
+
58
+ // store cookie for each dimissed notice first
59
+ add_action( 'wp_ajax_fv_foliopress_ajax_pointers', array( $this, 'pointers_ajax_cookie' ), 0 );
60
+ // TODO: What about the actual processing of the Ajax? Does it have to be in the plugin for real?
61
  add_action( 'wp_ajax_fv_foliopress_ajax_pointers', array( $this, 'pointers_ajax' ), 999 );
62
  add_action( 'wp_ajax_check_domain_license', array( $this, 'check_domain_license' ) );
63
 
470
  }
471
  }
472
  }
473
+
474
+
475
+ function pointers_ajax_cookie() {
476
+ $cookie = $this->pointers_get_cookie();
477
+
478
+ $cookie[$_POST['key']] = !empty($_POST['value']) ? $_POST['value'] : true;
479
+
480
+ $secure = ( 'https' === parse_url( home_url(), PHP_URL_SCHEME ) );
481
+ setcookie( $this->class_name.'_store_answer', json_encode($cookie), time() + YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN, $secure );
482
+ }
483
+
484
+
485
  function pointers_enqueue() {
486
  global $wp_version;
487
  if( ! current_user_can( 'manage_options' ) || ( isset($this->pointer_boxes) && count( $this->pointer_boxes ) == 0 ) || version_compare( $wp_version, '3.4', '<' ) ) {
495
 
496
  add_action( 'admin_print_footer_scripts', array( $this, 'pointers_init_scripts' ) );
497
  }
498
+
499
+
500
+ /**
501
+ * Get a cookie storing which pointers were already dimissed
502
+ * The cookie uses JSON so we decode it too
503
+ *
504
+ * @return array
505
+ */
506
+ function pointers_get_cookie() {
507
+ $cookie_name = $this->class_name.'_store_answer';
508
+
509
+ $cookie = false;
510
+ if( !empty($_COOKIE[$cookie_name]) ) {
511
+ $cookie = $_COOKIE[$cookie_name];
512
+ }
513
+
514
+ $cookie = (array) json_decode( stripslashes($cookie) );
515
+
516
+ $json_error = json_last_error();
517
+ if( $json_error !== JSON_ERROR_NONE ) {
518
+ $cookie = array();
519
+ }
520
+
521
+ return $cookie;
522
+ }
523
+
524
+
525
  private function get_readme_url_remote( $url = false ) { // todo: caching
526
  $output = false;
527
 
668
  }
669
  //]]>
670
  </script>
671
+ <?php
672
+ $cookie = $this->pointers_get_cookie();
673
 
674
  foreach( $this->pointer_boxes AS $key => $args ) {
675
+ // Some users are experiencing issues when dismissing the notices
676
+ // So we use cookies as a backup to not show the same notice twice
677
+ if( !empty($cookie[$key]) ) {
678
+ continue;
679
+ }
680
+
681
  $nonce = wp_create_nonce( $key );
682
 
683
  $args = wp_parse_args( $args, array(
js/admin.js CHANGED
@@ -220,7 +220,9 @@
220
 
221
  /* CodeMirror */
222
  jQuery(function($) {
223
- wp.codeEditor.initialize($('#customCSS'), cm_settings);
 
 
224
  });
225
 
226
  }(jQuery));
220
 
221
  /* CodeMirror */
222
  jQuery(function($) {
223
+ if( $('#customCSS').length ) {
224
+ wp.codeEditor.initialize($('#customCSS'), cm_settings);
225
+ }
226
  });
227
 
228
  }(jQuery));
js/chartjs/chart.min.js ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Chart.js v3.3.2
3
+ * https://www.chartjs.org
4
+ * (c) 2021 Chart.js Contributors
5
+ * Released under the MIT License
6
+ */
7
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Chart=e()}(this,(function(){"use strict";const t="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function e(e,i,n){const o=n||(t=>Array.prototype.slice.call(t));let s=!1,a=[];return function(...n){a=o(n),s||(s=!0,t.call(window,(()=>{s=!1,e.apply(i,a)})))}}function i(t,e){let i;return function(){return e?(clearTimeout(i),i=setTimeout(t,e)):t(),e}}const n=t=>"start"===t?"left":"end"===t?"right":"center",o=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2,s=(t,e,i)=>"right"===t?i:"center"===t?(e+i)/2:e;var a=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,n){const o=e.listeners[n],s=e.duration;o.forEach((n=>n({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(i-e.start,s)})))}_refresh(){const e=this;e._request||(e._running=!0,e._request=t.call(window,(()=>{e._update(),e._request=null,e._running&&e._refresh()})))}_update(t=Date.now()){const e=this;let i=0;e._charts.forEach(((n,o)=>{if(!n.running||!n.items.length)return;const s=n.items;let a,r=s.length-1,l=!1;for(;r>=0;--r)a=s[r],a._active?(a._total>n.duration&&(n.duration=a._total),a.tick(t),l=!0):(s[r]=s[s.length-1],s.pop());l&&(o.draw(),e._notify(o,n,t,"progress")),s.length||(n.running=!1,e._notify(o,n,t,"complete"),n.initial=!1),i+=s.length})),e._lastDate=t,0===i&&(e._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};
8
+ /*!
9
+ * @kurkle/color v0.1.9
10
+ * https://github.com/kurkle/color#readme
11
+ * (c) 2020 Jukka Kurkela
12
+ * Released under the MIT License
13
+ */const r={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},l="0123456789ABCDEF",c=t=>l[15&t],h=t=>l[(240&t)>>4]+l[15&t],d=t=>(240&t)>>4==(15&t);function u(t){var e=function(t){return d(t.r)&&d(t.g)&&d(t.b)&&d(t.a)}(t)?c:h;return t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t}function f(t){return t+.5|0}const g=(t,e,i)=>Math.max(Math.min(t,i),e);function p(t){return g(f(2.55*t),0,255)}function m(t){return g(f(255*t),0,255)}function x(t){return g(f(t/2.55)/100,0,1)}function b(t){return g(f(100*t),0,100)}const _=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const y=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function v(t,e,i){const n=e*Math.min(i,1-i),o=(e,o=(e+t/30)%12)=>i-n*Math.max(Math.min(o-3,9-o,1),-1);return[o(0),o(8),o(4)]}function w(t,e,i){const n=(n,o=(n+t/60)%6)=>i-i*e*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function M(t,e,i){const n=v(t,1,.5);let o;for(e+i>1&&(o=1/(e+i),e*=o,i*=o),o=0;o<3;o++)n[o]*=1-e-i,n[o]+=e;return n}function k(t){const e=t.r/255,i=t.g/255,n=t.b/255,o=Math.max(e,i,n),s=Math.min(e,i,n),a=(o+s)/2;let r,l,c;return o!==s&&(c=o-s,l=a>.5?c/(2-o-s):c/(o+s),r=o===e?(i-n)/c+(i<n?6:0):o===i?(n-e)/c+2:(e-i)/c+4,r=60*r+.5),[0|r,l||0,a]}function S(t,e,i,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,n)).map(m)}function P(t,e,i){return S(v,t,e,i)}function D(t){return(t%360+360)%360}function C(t){const e=y.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?p(+e[5]):m(+e[5]));const o=D(+e[2]),s=+e[3]/100,a=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return S(M,t,e,i)}(o,s,a):"hsv"===e[1]?function(t,e,i){return S(w,t,e,i)}(o,s,a):P(o,s,a),{r:i[0],g:i[1],b:i[2],a:n}}const O={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},T={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let A;function L(t){A||(A=function(){const t={},e=Object.keys(T),i=Object.keys(O);let n,o,s,a,r;for(n=0;n<e.length;n++){for(a=r=e[n],o=0;o<i.length;o++)s=i[o],r=r.replace(s,O[s]);s=parseInt(T[a],16),t[r]=[s>>16&255,s>>8&255,255&s]}return t}(),A.transparent=[0,0,0,0]);const e=A[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}function R(t,e,i){if(t){let n=k(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=P(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function E(t,e){return t?Object.assign(e||{},t):t}function I(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=m(t[3]))):(e=E(t,{r:0,g:0,b:0,a:1})).a=m(e.a),e}function z(t){return"r"===t.charAt(0)?function(t){const e=_.exec(t);let i,n,o,s=255;if(e){if(e[7]!==i){const t=+e[7];s=255&(e[8]?p(t):255*t)}return i=+e[1],n=+e[3],o=+e[5],i=255&(e[2]?p(i):i),n=255&(e[4]?p(n):n),o=255&(e[6]?p(o):o),{r:i,g:n,b:o,a:s}}}(t):C(t)}class F{constructor(t){if(t instanceof F)return t;const e=typeof t;let i;var n,o,s;"object"===e?i=I(t):"string"===e&&(s=(n=t).length,"#"===n[0]&&(4===s||5===s?o={r:255&17*r[n[1]],g:255&17*r[n[2]],b:255&17*r[n[3]],a:5===s?17*r[n[4]]:255}:7!==s&&9!==s||(o={r:r[n[1]]<<4|r[n[2]],g:r[n[3]]<<4|r[n[4]],b:r[n[5]]<<4|r[n[6]],a:9===s?r[n[7]]<<4|r[n[8]]:255})),i=o||L(t)||z(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=E(this._rgb);return t&&(t.a=x(t.a)),t}set rgb(t){this._rgb=I(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${x(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?u(this._rgb):this._rgb}hslString(){return this._valid?function(t){if(!t)return;const e=k(t),i=e[0],n=b(e[1]),o=b(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${o}%, ${x(t.a)})`:`hsl(${i}, ${n}%, ${o}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,o=t.rgb;let s;const a=e===s?.5:e,r=2*a-1,l=n.a-o.a,c=((r*l==-1?r:(r+l)/(1+r*l))+1)/2;s=1-c,n.r=255&c*n.r+s*o.r+.5,n.g=255&c*n.g+s*o.g+.5,n.b=255&c*n.b+s*o.b+.5,n.a=a*n.a+(1-a)*o.a,i.rgb=n}return i}clone(){return new F(this.rgb)}alpha(t){return this._rgb.a=m(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=f(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return R(this._rgb,2,t),this}darken(t){return R(this._rgb,2,-t),this}saturate(t){return R(this._rgb,1,t),this}desaturate(t){return R(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=k(t);i[0]=D(i[0]+e),i=P(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function V(t){return new F(t)}const B=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function W(t){return B(t)?t:V(t)}function H(t){return B(t)?t:V(t).saturate(.5).darken(.1).hexString()}function N(){}const j=function(){let t=0;return function(){return t++}}();function $(t){return null==t}function Y(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function U(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const X=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function q(t,e){return X(t)?t:e}function K(t,e){return void 0===t?e:t}const G=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:t/e,Z=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Q(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function J(t,e,i,n){let o,s,a;if(Y(t))if(s=t.length,n)for(o=s-1;o>=0;o--)e.call(i,t[o],o);else for(o=0;o<s;o++)e.call(i,t[o],o);else if(U(t))for(a=Object.keys(t),s=a.length,o=0;o<s;o++)e.call(i,t[a[o]],a[o])}function tt(t,e){let i,n,o,s;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(o=t[i],s=e[i],o.datasetIndex!==s.datasetIndex||o.index!==s.index)return!1;return!0}function et(t){if(Y(t))return t.map(et);if(U(t)){const e=Object.create(null),i=Object.keys(t),n=i.length;let o=0;for(;o<n;++o)e[i[o]]=et(t[i[o]]);return e}return t}function it(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function nt(t,e,i,n){if(!it(t))return;const o=e[t],s=i[t];U(o)&&U(s)?ot(o,s,n):e[t]=et(s)}function ot(t,e,i){const n=Y(e)?e:[e],o=n.length;if(!U(t))return t;const s=(i=i||{}).merger||nt;for(let a=0;a<o;++a){if(!U(e=n[a]))continue;const o=Object.keys(e);for(let n=0,a=o.length;n<a;++n)s(o[n],t,e,i)}return t}function st(t,e){return ot(t,e,{merger:at})}function at(t,e,i){if(!it(t))return;const n=e[t],o=i[t];U(n)&&U(o)?st(n,o):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=et(o))}function rt(t,e){const i=t.indexOf(".",e);return-1===i?t.length:i}function lt(t,e){if(""===e)return t;let i=0,n=rt(e,i);for(;t&&n>i;)t=t[e.substr(i,n-i)],i=n+1,n=rt(e,i);return t}function ct(t){return t.charAt(0).toUpperCase()+t.slice(1)}const ht=t=>void 0!==t,dt=t=>"function"==typeof t,ut=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0},ft=Object.create(null),gt=Object.create(null);function pt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;e<n;++e){const n=i[e];t=t[n]||(t[n]=Object.create(null))}return t}function mt(t,e,i){return"string"==typeof e?ot(pt(t,e),i):ot(pt(t,""),e)}var xt=new class{constructor(t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>H(e.backgroundColor),this.hoverBorderColor=(t,e)=>H(e.borderColor),this.hoverColor=(t,e)=>H(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.describe(t)}set(t,e){return mt(this,t,e)}get(t){return pt(this,t)}describe(t,e){return mt(gt,t,e)}override(t,e){return mt(ft,t,e)}route(t,e,i,n){const o=pt(this,t),s=pt(this,i),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[a],e=s[n];return U(t)?Object.assign({},e,t):K(t,e)},set(t){this[a]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});const bt=Math.PI,_t=2*bt,yt=_t+bt,vt=Number.POSITIVE_INFINITY,wt=bt/180,Mt=bt/2,kt=bt/4,St=2*bt/3,Pt=Math.log10,Dt=Math.sign;function Ct(t){const e=Math.pow(10,Math.floor(Pt(t))),i=t/e;return(i<=1?1:i<=2?2:i<=5?5:10)*e}function Ot(t){const e=[],i=Math.sqrt(t);let n;for(n=1;n<i;n++)t%n==0&&(e.push(n),e.push(t/n));return i===(0|i)&&e.push(i),e.sort(((t,e)=>t-e)).pop(),e}function Tt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function At(t,e,i){return Math.abs(t-e)<i}function Lt(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}function Rt(t,e,i){let n,o,s;for(n=0,o=t.length;n<o;n++)s=t[n][i],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function Et(t){return t*(bt/180)}function It(t){return t*(180/bt)}function zt(t){if(!X(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Ft(t,e){const i=e.x-t.x,n=e.y-t.y,o=Math.sqrt(i*i+n*n);let s=Math.atan2(n,i);return s<-.5*bt&&(s+=_t),{angle:s,distance:o}}function Vt(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Bt(t,e){return(t-e+yt)%_t-bt}function Wt(t){return(t%_t+_t)%_t}function Ht(t,e,i,n){const o=Wt(t),s=Wt(e),a=Wt(i),r=Wt(s-o),l=Wt(a-o),c=Wt(o-s),h=Wt(o-a);return o===s||o===a||n&&s===a||r>l&&c<h}function Nt(t,e,i){return Math.max(e,Math.min(i,t))}function jt(t){return Nt(t,-32768,32767)}function $t(t){return!t||$(t.size)||$(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Yt(t,e,i,n,o){let s=e[o];return s||(s=e[o]=t.measureText(o).width,i.push(o)),s>n&&(n=s),n}function Ut(t,e,i,n){let o=(n=n||{}).data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(o=n.data={},s=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let a=0;const r=i.length;let l,c,h,d,u;for(l=0;l<r;l++)if(d=i[l],null!=d&&!0!==Y(d))a=Yt(t,o,s,a,d);else if(Y(d))for(c=0,h=d.length;c<h;c++)u=d[c],null==u||Y(u)||(a=Yt(t,o,s,a,u));t.restore();const f=s.length/2;if(f>i.length){for(l=0;l<f;l++)delete o[s[l]];s.splice(0,f)}return a}function Xt(t,e,i){const n=t.currentDevicePixelRatio,o=0!==i?Math.max(i/2,.5):0;return Math.round((e-o)*n)/n+o}function qt(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function Kt(t,e,i,n){let o,s,a,r,l;const c=e.pointStyle,h=e.rotation,d=e.radius;let u=(h||0)*wt;if(c&&"object"==typeof c&&(o=c.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,n),t.rotate(u),t.drawImage(c,-c.width/2,-c.height/2,c.width,c.height),void t.restore();if(!(isNaN(d)||d<=0)){switch(t.beginPath(),c){default:t.arc(i,n,d,0,_t),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(u)*d,n-Math.cos(u)*d),u+=St,t.lineTo(i+Math.sin(u)*d,n-Math.cos(u)*d),u+=St,t.lineTo(i+Math.sin(u)*d,n-Math.cos(u)*d),t.closePath();break;case"rectRounded":l=.516*d,r=d-l,s=Math.cos(u+kt)*r,a=Math.sin(u+kt)*r,t.arc(i-s,n-a,l,u-bt,u-Mt),t.arc(i+a,n-s,l,u-Mt,u),t.arc(i+s,n+a,l,u,u+Mt),t.arc(i-a,n+s,l,u+Mt,u+bt),t.closePath();break;case"rect":if(!h){r=Math.SQRT1_2*d,t.rect(i-r,n-r,2*r,2*r);break}u+=kt;case"rectRot":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+a,n-s),t.lineTo(i+s,n+a),t.lineTo(i-a,n+s),t.closePath();break;case"crossRot":u+=kt;case"cross":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s);break;case"star":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s),u+=kt,s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s);break;case"line":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a);break;case"dash":t.moveTo(i,n),t.lineTo(i+Math.cos(u)*d,n+Math.sin(u)*d)}t.fill(),e.borderWidth>0&&t.stroke()}}function Gt(t,e,i){return i=i||.5,t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function Zt(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Qt(t){t.restore()}function Jt(t,e,i,n,o){if(!e)return t.lineTo(i.x,i.y);if("middle"===o){const n=(e.x+i.x)/2;t.lineTo(n,e.y),t.lineTo(n,i.y)}else"after"===o!=!!n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function te(t,e,i,n){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?i.cp2x:i.cp1x,n?i.cp2y:i.cp1y,i.x,i.y)}function ee(t,e,i,n,o,s={}){const a=Y(e)?e:[e],r=s.strokeWidth>0&&""!==s.strokeColor;let l,c;for(t.save(),s.translation&&t.translate(s.translation[0],s.translation[1]),$(s.rotation)||t.rotate(s.rotation),t.font=o.string,s.color&&(t.fillStyle=s.color),s.textAlign&&(t.textAlign=s.textAlign),s.textBaseline&&(t.textBaseline=s.textBaseline),l=0;l<a.length;++l){if(c=a[l],r&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),$(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(c,i,n,s.maxWidth)),t.fillText(c,i,n,s.maxWidth),s.strikethrough||s.underline){const e=t.measureText(c),o=i-e.actualBoundingBoxLeft,a=i+e.actualBoundingBoxRight,r=n-e.actualBoundingBoxAscent,l=n+e.actualBoundingBoxDescent,h=s.strikethrough?(r+l)/2:l;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=s.decorationWidth||2,t.moveTo(o,h),t.lineTo(a,h),t.stroke()}n+=o.lineHeight}t.restore()}function ie(t,e){const{x:i,y:n,w:o,h:s,radius:a}=e;t.arc(i+a.topLeft,n+a.topLeft,a.topLeft,-Mt,bt,!0),t.lineTo(i,n+s-a.bottomLeft),t.arc(i+a.bottomLeft,n+s-a.bottomLeft,a.bottomLeft,bt,Mt,!0),t.lineTo(i+o-a.bottomRight,n+s),t.arc(i+o-a.bottomRight,n+s-a.bottomRight,a.bottomRight,Mt,0,!0),t.lineTo(i+o,n+a.topRight),t.arc(i+o-a.topRight,n+a.topRight,a.topRight,0,-Mt,!0),t.lineTo(i+a.topLeft,n)}function ne(t,e,i){i=i||(i=>t[i]<e);let n,o=t.length-1,s=0;for(;o-s>1;)n=s+o>>1,i(n)?s=n:o=n;return{lo:s,hi:o}}const oe=(t,e,i)=>ne(t,i,(n=>t[n][e]<i)),se=(t,e,i)=>ne(t,i,(n=>t[n][e]>=i));function ae(t,e,i){let n=0,o=t.length;for(;n<o&&t[n]<e;)n++;for(;o>n&&t[o-1]>i;)o--;return n>0||o<t.length?t.slice(n,o):t}const re=["push","pop","shift","splice","unshift"];function le(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),re.forEach((e=>{const i="_onData"+ct(e),n=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const o=n.apply(this,e);return t._chartjs.listeners.forEach((t=>{"function"==typeof t[i]&&t[i](...e)})),o}})})))}function ce(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,o=n.indexOf(e);-1!==o&&n.splice(o,1),n.length>0||(re.forEach((e=>{delete t[e]})),delete t._chartjs)}function he(t){const e=new Set;let i,n;for(i=0,n=t.length;i<n;++i)e.add(t[i]);if(e.size===n)return t;const o=[];return e.forEach((t=>{o.push(t)})),o}function de(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function ue(t,e,i){let n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}const fe=t=>window.getComputedStyle(t,null);function ge(t,e){return fe(t).getPropertyValue(e)}const pe=["top","right","bottom","left"];function me(t,e,i){const n={};i=i?"-"+i:"";for(let o=0;o<4;o++){const s=pe[o];n[s]=parseFloat(t[e+"-"+s+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function xe(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,o=fe(i),s="border-box"===o.boxSizing,a=me(o,"padding"),r=me(o,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,o=n&&n.length?n[0]:i,{offsetX:s,offsetY:a}=o;let r,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(s,a,i.target))r=s,l=a;else{const t=e.getBoundingClientRect();r=o.clientX-t.left,l=o.clientY-t.top,c=!0}return{x:r,y:l,box:c}}(t,i),d=a.left+(h&&r.left),u=a.top+(h&&r.top);let{width:f,height:g}=e;return s&&(f-=a.width+r.width,g-=a.height+r.height),{x:Math.round((l-d)/f*i.width/n),y:Math.round((c-u)/g*i.height/n)}}const be=t=>Math.round(10*t)/10;function _e(t,e,i,n){const o=fe(t),s=me(o,"margin"),a=ue(o.maxWidth,t,"clientWidth")||vt,r=ue(o.maxHeight,t,"clientHeight")||vt,l=function(t,e,i){let n,o;if(void 0===e||void 0===i){const s=de(t);if(s){const t=s.getBoundingClientRect(),a=fe(s),r=me(a,"border","width"),l=me(a,"padding");e=t.width-l.width-r.width,i=t.height-l.height-r.height,n=ue(a.maxWidth,s,"clientWidth"),o=ue(a.maxHeight,s,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||vt,maxHeight:o||vt}}(t,e,i);let{width:c,height:h}=l;if("content-box"===o.boxSizing){const t=me(o,"border","width"),e=me(o,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-s.width),h=Math.max(0,n?Math.floor(c/n):h-s.height),c=be(Math.min(c,a,l.maxWidth)),h=be(Math.min(h,r,l.maxHeight)),c&&!h&&(h=be(c/2)),{width:c,height:h}}function ye(t,e,i){const n=e||1,o=Math.floor(t.height*n),s=Math.floor(t.width*n);t.height=o/n,t.width=s/n;const a=t.canvas;return a.style&&(i||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||a.height!==o||a.width!==s)&&(t.currentDevicePixelRatio=n,a.height=o,a.width=s,t.ctx.setTransform(n,0,0,n,0,0),!0)}const ve=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function we(t,e){const i=ge(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Me(t,e){return"native"in t?{x:t.x,y:t.y}:xe(t,e)}function ke(t,e,i,n){const{controller:o,data:s,_sorted:a}=t,r=o._cachedMeta.iScale;if(r&&e===r.axis&&a&&s.length){const t=r._reversePixels?se:oe;if(!n)return t(s,e,i);if(o._sharedOptions){const n=s[0],o="function"==typeof n.getRange&&n.getRange(e);if(o){const n=t(s,e,i-o),a=t(s,e,i+o);return{lo:n.lo,hi:a.hi}}}}return{lo:0,hi:s.length-1}}function Se(t,e,i,n,o){const s=t.getSortedVisibleDatasetMetas(),a=i[e];for(let t=0,i=s.length;t<i;++t){const{index:i,data:r}=s[t],{lo:l,hi:c}=ke(s[t],e,a,o);for(let t=l;t<=c;++t){const e=r[t];e.skip||n(e,i,t)}}}function Pe(t,e,i,n){const o=[];if(!Gt(e,t.chartArea,t._minPadding))return o;return Se(t,i,e,(function(t,i,s){t.inRange(e.x,e.y,n)&&o.push({element:t,datasetIndex:i,index:s})}),!0),o}function De(t,e,i,n,o){const s=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){const o=e?Math.abs(t.x-n.x):0,s=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(s,2))}}(i);let a=Number.POSITIVE_INFINITY,r=[];if(!Gt(e,t.chartArea,t._minPadding))return r;return Se(t,i,e,(function(i,l,c){if(n&&!i.inRange(e.x,e.y,o))return;const h=i.getCenterPoint(o);if(!Gt(h,t.chartArea,t._minPadding))return;const d=s(e,h);d<a?(r=[{element:i,datasetIndex:l,index:c}],a=d):d===a&&r.push({element:i,datasetIndex:l,index:c})})),r}function Ce(t,e,i,n){const o=Me(e,t),s=[],a=i.axis,r="x"===a?"inXRange":"inYRange";let l=!1;return function(t,e){const i=t.getSortedVisibleDatasetMetas();let n,o,s;for(let t=0,a=i.length;t<a;++t){({index:n,data:o}=i[t]);for(let t=0,i=o.length;t<i;++t)s=o[t],s.skip||e(s,n,t)}}(t,((t,e,i)=>{t[r](o[a],n)&&s.push({element:t,datasetIndex:e,index:i}),t.inRange(o.x,o.y,n)&&(l=!0)})),i.intersect&&!l?[]:s}var Oe={modes:{index(t,e,i,n){const o=Me(e,t),s=i.axis||"x",a=i.intersect?Pe(t,o,s,n):De(t,o,s,!1,n),r=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=a[0].index,i=t.data[e];i&&!i.skip&&r.push({element:i,datasetIndex:t.index,index:e})})),r):[]},dataset(t,e,i,n){const o=Me(e,t),s=i.axis||"xy";let a=i.intersect?Pe(t,o,s,n):De(t,o,s,!1,n);if(a.length>0){const e=a[0].datasetIndex,i=t.getDatasetMeta(e).data;a=[];for(let t=0;t<i.length;++t)a.push({element:i[t],datasetIndex:e,index:t})}return a},point:(t,e,i,n)=>Pe(t,Me(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>De(t,Me(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>(i.axis="x",Ce(t,e,i,n)),y:(t,e,i,n)=>(i.axis="y",Ce(t,e,i,n))}};const Te=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),Ae=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function Le(t,e){const i=(""+t).match(Te);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}function Re(t,e){const i={},n=U(e),o=n?Object.keys(e):e,s=U(t)?n?i=>K(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of o)i[t]=+s(t)||0;return i}function Ee(t){return Re(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Ie(t){return Re(t,["topLeft","topRight","bottomLeft","bottomRight"])}function ze(t){const e=Ee(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Fe(t,e){t=t||{},e=e||xt.font;let i=K(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=K(t.style,e.style);n&&!(""+n).match(Ae)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const o={family:K(t.family,e.family),lineHeight:Le(K(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:K(t.weight,e.weight),string:""};return o.string=$t(o),o}function Ve(t,e,i,n){let o,s,a,r=!0;for(o=0,s=t.length;o<s;++o)if(a=t[o],void 0!==a&&(void 0!==e&&"function"==typeof a&&(a=a(e),r=!1),void 0!==i&&Y(a)&&(a=a[i%a.length],r=!1),void 0!==a))return n&&!r&&(n.cacheable=!1),a}function Be(t,e){const{min:i,max:n}=t;return{min:i-Math.abs(Z(e,i)),max:n+Z(e,n)}}const We=["left","top","right","bottom"];function He(t,e){return t.filter((t=>t.pos===e))}function Ne(t,e){return t.filter((t=>-1===We.indexOf(t.pos)&&t.box.axis===e))}function je(t,e){return t.sort(((t,i)=>{const n=e?i:t,o=e?t:i;return n.weight===o.weight?n.index-o.index:n.weight-o.weight}))}function $e(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function Ye(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Ue(t,e,i){const n=i.box,o=t.maxPadding;U(i.pos)||(i.size&&(t[i.pos]-=i.size),i.size=i.horizontal?n.height:n.width,t[i.pos]+=i.size),n.getPadding&&Ye(o,n.getPadding());const s=Math.max(0,e.outerWidth-$e(o,t,"left","right")),a=Math.max(0,e.outerHeight-$e(o,t,"top","bottom")),r=s!==t.w,l=a!==t.h;return t.w=s,t.h=a,i.horizontal?{same:r,other:l}:{same:l,other:r}}function Xe(t,e){const i=e.maxPadding;function n(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function qe(t,e,i){const n=[];let o,s,a,r,l,c;for(o=0,s=t.length,l=0;o<s;++o){a=t[o],r=a.box,r.update(a.width||e.w,a.height||e.h,Xe(a.horizontal,e));const{same:s,other:h}=Ue(e,i,a);l|=s&&n.length,c=c||h,r.fullSize||n.push(a)}return l&&qe(n,e,i)||c}function Ke(t,e,i){const n=i.padding;let o,s,a,r,l=e.x,c=e.y;for(o=0,s=t.length;o<s;++o)a=t[o],r=a.box,a.horizontal?(r.left=r.fullSize?n.left:e.left,r.right=r.fullSize?i.outerWidth-n.right:e.left+e.w,r.top=c,r.bottom=c+r.height,r.width=r.right-r.left,c=r.bottom):(r.left=l,r.right=l+r.width,r.top=r.fullSize?n.top:e.top,r.bottom=r.fullSize?i.outerHeight-n.right:e.top+e.h,r.height=r.bottom-r.top,l=r.right);e.x=l,e.y=c}xt.set("layout",{padding:{top:0,right:0,bottom:0,left:0}});var Ge={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,n){if(!t)return;const o=ze(t.options.layout.padding),s=Math.max(e-o.width,0),a=Math.max(i-o.height,0),r=function(t){const e=function(t){const e=[];let i,n,o;for(i=0,n=(t||[]).length;i<n;++i)o=t[i],e.push({index:i,box:o,pos:o.position,horizontal:o.isHorizontal(),weight:o.weight});return e}(t),i=je(e.filter((t=>t.box.fullSize)),!0),n=je(He(e,"left"),!0),o=je(He(e,"right")),s=je(He(e,"top"),!0),a=je(He(e,"bottom")),r=Ne(e,"x"),l=Ne(e,"y");return{fullSize:i,leftAndTop:n.concat(s),rightAndBottom:o.concat(l).concat(a).concat(r),chartArea:He(e,"chartArea"),vertical:n.concat(o).concat(l),horizontal:s.concat(a).concat(r)}}(t.boxes),l=r.vertical,c=r.horizontal;J(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const h=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:o,availableWidth:s,availableHeight:a,vBoxMaxWidth:s/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},o);Ye(u,ze(n));const f=Object.assign({maxPadding:u,w:s,h:a,x:o.left,y:o.top},o);!function(t,e){let i,n,o;for(i=0,n=t.length;i<n;++i)o=t[i],o.horizontal?(o.width=o.box.fullSize&&e.availableWidth,o.height=e.hBoxMaxHeight):(o.width=e.vBoxMaxWidth,o.height=o.box.fullSize&&e.availableHeight)}(l.concat(c),d),qe(r.fullSize,f,d),qe(l,f,d),qe(c,f,d)&&qe(l,f,d),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),Ke(r.leftAndTop,f,d),f.x+=f.w,f.y+=f.h,Ke(r.rightAndBottom,f,d),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},J(r.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h)}))}};class Ze{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}}class Qe extends Ze{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}}const Je={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ti=t=>null===t||""===t;const ei=!!ve&&{passive:!0};function ii(t,e,i){t.canvas.removeEventListener(e,i,ei)}function ni(t,e,i){const n=t.canvas,o=n&&de(n)||n,s=new MutationObserver((t=>{const e=de(o);t.forEach((t=>{for(let n=0;n<t.addedNodes.length;n++){const s=t.addedNodes[n];s!==o&&s!==e||i(t.target)}}))}));return s.observe(document,{childList:!0,subtree:!0}),s}function oi(t,e,i){const n=t.canvas,o=n&&de(n);if(!o)return;const s=new MutationObserver((t=>{t.forEach((t=>{for(let e=0;e<t.removedNodes.length;e++)if(t.removedNodes[e]===n){i();break}}))}));return s.observe(o,{childList:!0}),s}const si=new Map;let ai=0;function ri(){const t=window.devicePixelRatio;t!==ai&&(ai=t,si.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function li(t,i,n){const o=t.canvas,s=o&&de(o);if(!s)return;const a=e(((t,e)=>{const i=s.clientWidth;n(t,e),i<s.clientWidth&&n()}),window),r=new ResizeObserver((t=>{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||a(i,n)}));return r.observe(s),function(t,e){si.size||window.addEventListener("resize",ri),si.set(t,e)}(t,a),r}function ci(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){si.delete(t),si.size||window.removeEventListener("resize",ri)}(t)}function hi(t,i,n){const o=t.canvas,s=e((e=>{null!==t.ctx&&n(function(t,e){const i=Je[t.type]||t.type,{x:n,y:o}=xe(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==o?o:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,ei)}(o,i,s),s}class di extends Ze{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),o=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:o,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",ti(o)){const e=we(t,"width");void 0!==e&&(t.width=e)}if(ti(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=we(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const n=i[t];$(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),o={attach:ni,detach:oi,resize:li}[e]||hi;n[e]=o(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:ci,detach:ci,resize:ci}[e]||ii)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return _e(t,e,i,n)}isAttached(t){const e=de(t);return!(!e||!de(e))}}var ui=Object.freeze({__proto__:null,BasePlatform:Ze,BasicPlatform:Qe,DomPlatform:di});const fi=t=>0===t||1===t,gi=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*_t/i),pi=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*_t/i)+1,mi={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*Mt),easeOutSine:t=>Math.sin(t*Mt),easeInOutSine:t=>-.5*(Math.cos(bt*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>fi(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>fi(t)?t:gi(t,.075,.3),easeOutElastic:t=>fi(t)?t:pi(t,.075,.3),easeInOutElastic(t){const e=.1125;return fi(t)?t:t<.5?.5*gi(2*t,e,.45):.5+.5*pi(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-mi.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*mi.easeInBounce(2*t):.5*mi.easeOutBounce(2*t-1)+.5},xi="transparent",bi={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=W(t||xi),o=n.valid&&W(e||xi);return o&&o.valid?o.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class _i{constructor(t,e,i,n){const o=e[i];n=Ve([t.to,n,o,t.from]);const s=Ve([t.from,o,n]);this._active=!0,this._fn=t.fn||bi[t.type||typeof s],this._easing=mi[t.easing]||mi.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=s,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){const n=this;if(n._active){n._notify(!1);const o=n._target[n._prop],s=i-n._start,a=n._duration-s;n._start=i,n._duration=Math.floor(Math.max(a,t.duration)),n._total+=s,n._loop=!!t.loop,n._to=Ve([t.to,e,o,t.from]),n._from=Ve([t.from,o,e])}}cancel(){const t=this;t._active&&(t.tick(Date.now()),t._active=!1,t._notify(!1))}tick(t){const e=this,i=t-e._start,n=e._duration,o=e._prop,s=e._from,a=e._loop,r=e._to;let l;if(e._active=s!==r&&(a||i<n),!e._active)return e._target[o]=r,void e._notify(!0);i<0?e._target[o]=s:(l=i/n%2,l=a&&l>1?2-l:l,l=e._easing(Math.min(1,Math.max(0,l))),e._target[o]=e._fn(s,r,l))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}xt.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const yi=Object.keys(xt.animation);xt.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),xt.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),xt.describe("animations",{_fallback:"animation"}),xt.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class vi{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!U(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!U(n))return;const o={};for(const t of yi)o[t]=n[t];(Y(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,o)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const o=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e<n.length;e++){const o=t[n[e]];o&&o.active()&&i.push(o.wait())}return Promise.all(i)}(t.options.$animations,i).then((()=>{t.options=i}),(()=>{})),o}_createAnimations(t,e){const i=this._properties,n=[],o=t.$animations||(t.$animations={}),s=Object.keys(e),a=Date.now();let r;for(r=s.length-1;r>=0;--r){const l=s[r];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=o[l];const d=i.get(l);if(h){if(d&&h.active()){h.update(d,c,a);continue}h.cancel()}d&&d.duration?(o[l]=h=new _i(d,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(a.add(this._chart,i),!0):void 0}}function wi(t,e){const i=t&&t.options||{},n=i.reverse,o=void 0===i.min?e:0,s=void 0===i.max?e:0;return{start:n?s:o,end:n?o:s}}function Mi(t,e){const i=[],n=t._getSortedDatasetMetas(e);let o,s;for(o=0,s=n.length;o<s;++o)i.push(n[o].index);return i}function ki(t,e,i,n){const o=t.keys,s="single"===n.mode;let a,r,l,c;if(null!==e){for(a=0,r=o.length;a<r;++a){if(l=+o[a],l===i){if(n.all)continue;break}c=t.values[l],X(c)&&(s||0===e||Dt(e)===Dt(c))&&(e+=c)}return e}}function Si(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function Pi(t,e,i){const n=t[e]||(t[e]={});return n[i]||(n[i]={})}function Di(t,e,i){for(const n of e.getMatchingVisibleMetas("bar").reverse()){const e=t[n.index];if(i&&e>0||!i&&e<0)return n.index}return null}function Ci(t,e){const{chart:i,_cachedMeta:n}=t,o=i._stacks||(i._stacks={}),{iScale:s,vScale:a,index:r}=n,l=s.axis,c=a.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(s,a,n),d=e.length;let u;for(let t=0;t<d;++t){const i=e[t],{[l]:n,[c]:s}=i;u=(i._stacks||(i._stacks={}))[c]=Pi(o,h,n),u[r]=s,u._top=Di(u,a,!0),u._bottom=Di(u,a,!1)}}function Oi(t,e){const i=t.scales;return Object.keys(i).filter((t=>i[t].axis===e)).shift()}function Ti(t,e){const i=t.vScale&&t.vScale.axis;if(i){e=e||t._parsed;for(const n of e){const e=n._stacks;if(!e||void 0===e[i]||void 0===e[i][t.index])return;delete e[i][t.index]}}}const Ai=t=>"reset"===t||"none"===t,Li=(t,e)=>e?t:Object.assign({},t);class Ri{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this,e=t._cachedMeta;t.configure(),t.linkScales(),e._stacked=Si(e.vScale,e),t.addElements()}updateIndex(t){this.index!==t&&Ti(this._cachedMeta),this.index=t}linkScales(){const t=this,e=t.chart,i=t._cachedMeta,n=t.getDataset(),o=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,s=i.xAxisID=K(n.xAxisID,Oi(e,"x")),a=i.yAxisID=K(n.yAxisID,Oi(e,"y")),r=i.rAxisID=K(n.rAxisID,Oi(e,"r")),l=i.indexAxis,c=i.iAxisID=o(l,s,a,r),h=i.vAxisID=o(l,a,s,r);i.xScale=t.getScaleForId(s),i.yScale=t.getScaleForId(a),i.rScale=t.getScaleForId(r),i.iScale=t.getScaleForId(c),i.vScale=t.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&ce(this._data,this),t._stacked&&Ti(t)}_dataCheck(){const t=this,e=t.getDataset(),i=e.data||(e.data=[]),n=t._data;if(U(i))t._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,o,s;for(n=0,o=e.length;n<o;++n)s=e[n],i[n]={x:s,y:t[s]};return i}(i);else if(n!==i){if(n){ce(n,t);const e=t._cachedMeta;Ti(e),e._parsed=[]}i&&Object.isExtensible(i)&&le(i,t),t._syncList=[],t._data=i}}addElements(){const t=this,e=t._cachedMeta;t._dataCheck(),t.datasetElementType&&(e.dataset=new t.datasetElementType)}buildOrUpdateElements(t){const e=this,i=e._cachedMeta,n=e.getDataset();let o=!1;e._dataCheck();const s=i._stacked;i._stacked=Si(i.vScale,i),i.stack!==n.stack&&(o=!0,Ti(i),i.stack=n.stack),e._resyncElements(t),(o||s!==i._stacked)&&Ci(e,i._parsed)}configure(){const t=this,e=t.chart.config,i=e.datasetScopeKeys(t._type),n=e.getOptionScopes(t.getDataset(),i,!0);t.options=e.createResolver(n,t.getContext()),t._parsing=t.options.parsing}parse(t,e){const i=this,{_cachedMeta:n,_data:o}=i,{iScale:s,_stacked:a}=n,r=s.axis;let l,c,h,d=0===t&&e===o.length||n._sorted,u=t>0&&n._parsed[t-1];if(!1===i._parsing)n._parsed=o,n._sorted=!0,h=o;else{h=Y(o[t])?i.parseArrayData(n,o,t,e):U(o[t])?i.parseObjectData(n,o,t,e):i.parsePrimitiveData(n,o,t,e);const s=()=>null===c[r]||u&&c[r]<u[r];for(l=0;l<e;++l)n._parsed[l+t]=c=h[l],d&&(s()&&(d=!1),u=c);n._sorted=d}a&&Ci(i,h)}parsePrimitiveData(t,e,i,n){const{iScale:o,vScale:s}=t,a=o.axis,r=s.axis,l=o.getLabels(),c=o===s,h=new Array(n);let d,u,f;for(d=0,u=n;d<u;++d)f=d+i,h[d]={[a]:c||o.parse(l[f],f),[r]:s.parse(e[f],f)};return h}parseArrayData(t,e,i,n){const{xScale:o,yScale:s}=t,a=new Array(n);let r,l,c,h;for(r=0,l=n;r<l;++r)c=r+i,h=e[c],a[r]={x:o.parse(h[0],c),y:s.parse(h[1],c)};return a}parseObjectData(t,e,i,n){const{xScale:o,yScale:s}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l=new Array(n);let c,h,d,u;for(c=0,h=n;c<h;++c)d=c+i,u=e[d],l[c]={x:o.parse(lt(u,a),d),y:s.parse(lt(u,r),d)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const n=this.chart,o=this._cachedMeta,s=e[t.axis];return ki({keys:Mi(n,!0),values:e._stacks[t.axis]},s,o.index,{mode:i})}updateRangeFromParsed(t,e,i,n){const o=i[e.axis];let s=null===o?NaN:o;const a=n&&i._stacks[e.axis];n&&a&&(n.values=a,t.min=Math.min(t.min,s),t.max=Math.max(t.max,s),s=ki(n,o,this._cachedMeta.index,{all:!0})),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,e){const i=this,n=i._cachedMeta,o=n._parsed,s=n._sorted&&t===n.iScale,a=o.length,r=i._getOtherScale(t),l=e&&n._stacked&&{keys:Mi(i.chart,!0),values:null},c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:d}=function(t){const{min:e,max:i,minDefined:n,maxDefined:o}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:o?i:Number.POSITIVE_INFINITY}}(r);let u,f,g,p;function m(){return g=o[u],f=g[t.axis],p=g[r.axis],!X(f)||h>p||d<p}for(u=0;u<a&&(m()||(i.updateRangeFromParsed(c,t,g,l),!s));++u);if(s)for(u=a-1;u>=0;--u)if(!m()){i.updateRangeFromParsed(c,t,g,l);break}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,o,s;for(n=0,o=e.length;n<o;++n)s=e[n][t.axis],X(s)&&i.push(s);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,n=e.vScale,o=this.getParsed(t);return{label:i?""+i.getLabelForValue(o[i.axis]):"",value:n?""+n.getLabelForValue(o[n.axis]):""}}_update(t){const e=this,i=e._cachedMeta;e.configure(),e._cachedDataOpts={},e.update(t||"default"),i._clip=function(t){let e,i,n,o;return U(t)?(e=t.top,i=t.right,n=t.bottom,o=t.left):e=i=n=o=t,{top:e,right:i,bottom:n,left:o}}(K(e.options.clip,function(t,e,i){if(!1===i)return!1;const n=wi(t,i),o=wi(e,i);return{top:o.end,right:n.end,bottom:o.start,left:n.start}}(i.xScale,i.yScale,e.getMaxOverflow())))}update(t){}draw(){const t=this,e=t._ctx,i=t.chart,n=t._cachedMeta,o=n.data||[],s=i.chartArea,a=[],r=t._drawStart||0,l=t._drawCount||o.length-r;let c;for(n.dataset&&n.dataset.draw(e,s,r,l),c=r;c<r+l;++c){const t=o[c];t.active?a.push(t):t.draw(e,s)}for(c=0;c<a.length;++c)a[c].draw(e,s)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const n=this,o=n.getDataset();let s;if(t>=0&&t<n._cachedMeta.data.length){const e=n._cachedMeta.data[t];s=e.$context||(e.$context=function(t,e,i){return Object.assign(Object.create(t),{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(n.getContext(),t,e)),s.parsed=n.getParsed(t),s.raw=o.data[t],s.index=s.dataIndex=t}else s=n.$context||(n.$context=function(t,e){return Object.assign(Object.create(t),{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(n.chart.getContext(),n.index)),s.dataset=o,s.index=s.datasetIndex=n.index;return s.active=!!e,s.mode=i,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const n=this,o="active"===e,s=n._cachedDataOpts,a=t+"-"+e,r=s[a],l=n.enableOptionSharing&&ht(i);if(r)return Li(r,l);const c=n.chart.config,h=c.datasetElementScopeKeys(n._type,t),d=o?[`${t}Hover`,"hover",t,""]:[t,""],u=c.getOptionScopes(n.getDataset(),h),f=Object.keys(xt.elements[t]),g=c.resolveNamedOptions(u,f,(()=>n.getContext(i,o)),d);return g.$shared&&(g.$shared=l,s[a]=Object.freeze(Li(g,l))),g}_resolveAnimations(t,e,i){const n=this,o=n.chart,s=n._cachedDataOpts,a=`animation-${e}`,r=s[a];if(r)return r;let l;if(!1!==o.options.animation){const o=n.chart.config,s=o.datasetAnimationScopeKeys(n._type,e),a=o.getOptionScopes(n.getDataset(),s);l=o.createResolver(a,n.getContext(t,i,e))}const c=new vi(o,l&&l.animations);return l&&l._cacheable&&(s[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Ai(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){Ai(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!Ai(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this,i=e._data,n=e._cachedMeta.data;for(const[t,i,n]of e._syncList)e[t](i,n);e._syncList=[];const o=n.length,s=i.length,a=Math.min(s,o);a&&e.parse(0,a),s>o?e._insertElements(o,s-o,t):s<o&&e._removeElements(s,o-s)}_insertElements(t,e,i=!0){const n=this,o=n._cachedMeta,s=o.data,a=t+e;let r;const l=t=>{for(t.length+=e,r=t.length-1;r>=a;r--)t[r]=t[r-e]};for(l(s),r=t;r<a;++r)s[r]=new n.dataElementType;n._parsing&&l(o._parsed),n.parse(t,e),i&&n.updateElements(s,t,e,"reset")}updateElements(t,e,i,n){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const n=i._parsed.splice(t,e);i._stacked&&Ti(i,n)}i.data.splice(t,e)}_onDataPush(){const t=arguments.length;this._syncList.push(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._syncList.push(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._syncList.push(["_removeElements",0,1])}_onDataSplice(t,e){this._syncList.push(["_removeElements",t,e]),this._syncList.push(["_insertElements",t,arguments.length-2])}_onDataUnshift(){this._syncList.push(["_insertElements",0,arguments.length])}}Ri.defaults={},Ri.prototype.datasetElementType=null,Ri.prototype.dataElementType=null;class Ei{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return Tt(this.x)&&Tt(this.y)}getProps(t,e){const i=this,n=this.$animations;if(!e||!n)return i;const o={};return t.forEach((t=>{o[t]=n[t]&&n[t].active()?n[t]._to:i[t]})),o}}Ei.defaults={},Ei.defaultRoutes=void 0;const Ii=new Map;function zi(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=Ii.get(i);return n||(n=new Intl.NumberFormat(t,e),Ii.set(i,n)),n}(e,i).format(t)}const Fi={values:t=>Y(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let o,s=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(o="scientific"),s=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const a=Pt(Math.abs(s)),r=Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:o,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),zi(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(Pt(t)));return 1===n||2===n||5===n?Fi.numeric.call(this,t,e,i):""}};var Vi={formatters:Fi};function Bi(t,e){const i=t.options.ticks,n=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),o=t._maxLength/i;return Math.floor(Math.min(n,o))}(t),o=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;i<n;i++)t[i].major&&e.push(i);return e}(e):[],s=o.length,a=o[0],r=o[s-1],l=[];if(s>n)return function(t,e,i,n){let o,s=0,a=i[0];for(n=Math.ceil(n),o=0;o<t.length;o++)o===a&&(e.push(t[o]),s++,a=i[s*n])}(e,l,o,s/n),l;const c=function(t,e,i){const n=function(t){const e=t.length;let i,n;if(e<2)return!1;for(n=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==n)return!1;return n}(t),o=e.length/i;if(!n)return Math.max(o,1);const s=Ot(n);for(let t=0,e=s.length-1;t<e;t++){const e=s[t];if(e>o)return e}return Math.max(o,1)}(o,e,n);if(s>0){let t,i;const n=s>1?Math.round((r-a)/(s-1)):null;for(Wi(e,l,c,$(n)?0:a-n,a),t=0,i=s-1;t<i;t++)Wi(e,l,c,o[t],o[t+1]);return Wi(e,l,c,r,$(n)?e.length:r+n),l}return Wi(e,l,c),l}function Wi(t,e,i,n,o){const s=K(n,0),a=Math.min(K(o,t.length),t.length);let r,l,c,h=0;for(i=Math.ceil(i),o&&(r=o-n,i=r/Math.floor(r/i)),c=s;c<0;)h++,c=Math.round(s+h*i);for(l=Math.max(s,0);l<a;l++)l===c&&(e.push(t[l]),h++,c=Math.round(s+h*i))}xt.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Vi.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),xt.route("scale.ticks","color","","color"),xt.route("scale.grid","color","","borderColor"),xt.route("scale.grid","borderColor","","borderColor"),xt.route("scale.title","color","","color"),xt.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),xt.describe("scales",{_fallback:"scale"});const Hi=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Ni(t,e){const i=[],n=t.length/e,o=t.length;let s=0;for(;s<o;s+=n)i.push(t[Math.floor(s)]);return i}function ji(t,e,i){const n=t.ticks.length,o=Math.min(e,n-1),s=t._startPixel,a=t._endPixel,r=1e-6;let l,c=t.getPixelForTick(o);if(!(i&&(l=1===n?Math.max(c-s,a-c):0===e?(t.getPixelForTick(1)-c)/2:(c-t.getPixelForTick(o-1))/2,c+=o<e?l:-l,c<s-r||c>a+r)))return c}function $i(t){return t.drawTicks?t.tickLength:0}function Yi(t,e){if(!t.display)return 0;const i=Fe(t.font,e),n=ze(t.padding);return(Y(t.text)?t.text.length:1)*i.lineHeight+n.height}function Ui(t,e,i){let o=n(t);return(i&&"right"!==e||!i&&"right"===e)&&(o=(t=>"left"===t?"right":"right"===t?"left":t)(o)),o}class Xi extends Ei{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){const e=this;e.options=t.setContext(e.getContext()),e.axis=t.axis,e._userMin=e.parse(t.min),e._userMax=e.parse(t.max),e._suggestedMin=e.parse(t.suggestedMin),e._suggestedMax=e.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=q(t,Number.POSITIVE_INFINITY),e=q(e,Number.NEGATIVE_INFINITY),i=q(i,Number.POSITIVE_INFINITY),n=q(n,Number.NEGATIVE_INFINITY),{min:q(t,i),max:q(e,n),minDefined:X(t),maxDefined:X(e)}}getMinMax(t){const e=this;let i,{min:n,max:o,minDefined:s,maxDefined:a}=e.getUserBounds();if(s&&a)return{min:n,max:o};const r=e.getMatchingVisibleMetas();for(let l=0,c=r.length;l<c;++l)i=r[l].controller.getMinMax(e,t),s||(n=Math.min(n,i.min)),a||(o=Math.max(o,i.max));return{min:q(n,q(o,n)),max:q(o,q(n,o))}}getPadding(){const t=this;return{left:t.paddingLeft||0,top:t.paddingTop||0,right:t.paddingRight||0,bottom:t.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Q(this.options.beforeUpdate,[this])}update(t,e,i){const n=this,o=n.options.ticks,s=o.sampleSize;n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),n.ticks=null,n._labelSizes=null,n._gridLineItems=null,n._labelItems=null,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n._maxLength=n.isHorizontal()?n.width+i.left+i.right:n.height+i.top+i.bottom,n._dataLimitsCached||(n.beforeDataLimits(),n.determineDataLimits(),n.afterDataLimits(),n._range=Be(n,n.options.grace),n._dataLimitsCached=!0),n.beforeBuildTicks(),n.ticks=n.buildTicks()||[],n.afterBuildTicks();const a=s<n.ticks.length;n._convertTicksToLabels(a?Ni(n.ticks,s):n.ticks),n.configure(),n.beforeCalculateLabelRotation(),n.calculateLabelRotation(),n.afterCalculateLabelRotation(),o.display&&(o.autoSkip||"auto"===o.source)&&(n.ticks=Bi(n,n.ticks),n._labelSizes=null),a&&n._convertTicksToLabels(n.ticks),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate()}configure(){const t=this;let e,i,n=t.options.reverse;t.isHorizontal()?(e=t.left,i=t.right):(e=t.top,i=t.bottom,n=!n),t._startPixel=e,t._endPixel=i,t._reversePixels=n,t._length=i-e,t._alignToPixels=t.options.alignToPixels}afterUpdate(){Q(this.options.afterUpdate,[this])}beforeSetDimensions(){Q(this.options.beforeSetDimensions,[this])}setDimensions(){const t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0}afterSetDimensions(){Q(this.options.afterSetDimensions,[this])}_callHooks(t){const e=this;e.chart.notifyPlugins(t,e.getContext()),Q(e.options[t],[e])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Q(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this,i=e.options.ticks;let n,o,s;for(n=0,o=t.length;n<o;n++)s=t[n],s.label=Q(i.callback,[s.value,n,t],e);for(n=0;n<o;n++)$(t[n].label)&&(t.splice(n,1),o--,n--)}afterTickToLabelConversion(){Q(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Q(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this,e=t.options,i=e.ticks,n=t.ticks.length,o=i.minRotation||0,s=i.maxRotation;let a,r,l,c=o;if(!t._isVisible()||!i.display||o>=s||n<=1||!t.isHorizontal())return void(t.labelRotation=o);const h=t._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=Nt(t.chart.width-d,0,t.maxWidth);a=e.offset?t.maxWidth/n:f/(n-1),d+6>a&&(a=f/(n-(e.offset?.5:1)),r=t.maxHeight-$i(e.grid)-i.padding-Yi(e.title,t.chart.options.font),l=Math.sqrt(d*d+u*u),c=It(Math.min(Math.asin(Math.min((h.highest.height+6)/a,1)),Math.asin(Math.min(r/l,1))-Math.asin(u/l))),c=Math.max(o,Math.min(s,c))),t.labelRotation=c}afterCalculateLabelRotation(){Q(this.options.afterCalculateLabelRotation,[this])}beforeFit(){Q(this.options.beforeFit,[this])}fit(){const t=this,e={width:0,height:0},{chart:i,options:{ticks:n,title:o,grid:s}}=t,a=t._isVisible(),r=t.isHorizontal();if(a){const a=Yi(o,i.options.font);if(r?(e.width=t.maxWidth,e.height=$i(s)+a):(e.height=t.maxHeight,e.width=$i(s)+a),n.display&&t.ticks.length){const{first:i,last:o,widest:s,highest:a}=t._getLabelSizes(),l=2*n.padding,c=Et(t.labelRotation),h=Math.cos(c),d=Math.sin(c);if(r){const i=n.mirror?0:d*s.width+h*a.height;e.height=Math.min(t.maxHeight,e.height+i+l)}else{const i=n.mirror?0:h*s.width+d*a.height;e.width=Math.min(t.maxWidth,e.width+i+l)}t._calculatePadding(i,o,d,h)}}t._handleMargins(),r?(t.width=t._length=i.width-t._margins.left-t._margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=i.height-t._margins.top-t._margins.bottom)}_calculatePadding(t,e,i,n){const o=this,{ticks:{align:s,padding:a},position:r}=o.options,l=0!==o.labelRotation,c="top"!==r&&"x"===o.axis;if(o.isHorizontal()){const r=o.getPixelForTick(0)-o.left,h=o.right-o.getPixelForTick(o.ticks.length-1);let d=0,u=0;l?c?(d=n*t.width,u=i*e.height):(d=i*t.height,u=n*e.width):"start"===s?u=e.width:"end"===s?d=t.width:(d=t.width/2,u=e.width/2),o.paddingLeft=Math.max((d-r+a)*o.width/(o.width-r),0),o.paddingRight=Math.max((u-h+a)*o.width/(o.width-h),0)}else{let i=e.height/2,n=t.height/2;"start"===s?(i=0,n=t.height):"end"===s&&(i=e.height,n=0),o.paddingTop=i+a,o.paddingBottom=n+a}}_handleMargins(){const t=this;t._margins&&(t._margins.left=Math.max(t.paddingLeft,t._margins.left),t._margins.top=Math.max(t.paddingTop,t._margins.top),t._margins.right=Math.max(t.paddingRight,t._margins.right),t._margins.bottom=Math.max(t.paddingBottom,t._margins.bottom))}afterFit(){Q(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){const e=this;e.beforeTickToLabelConversion(),e.generateTickLabels(t),e.afterTickToLabelConversion()}_getLabelSizes(){const t=this;let e=t._labelSizes;if(!e){const i=t.options.ticks.sampleSize;let n=t.ticks;i<n.length&&(n=Ni(n,i)),t._labelSizes=e=t._computeLabelSizes(n,n.length)}return e}_computeLabelSizes(t,e){const{ctx:i,_longestTextCache:n}=this,o=[],s=[];let a,r,l,c,h,d,u,f,g,p,m,x=0,b=0;for(a=0;a<e;++a){if(c=t[a].label,h=this._resolveTickFontOptions(a),i.font=d=h.string,u=n[d]=n[d]||{data:{},gc:[]},f=h.lineHeight,g=p=0,$(c)||Y(c)){if(Y(c))for(r=0,l=c.length;r<l;++r)m=c[r],$(m)||Y(m)||(g=Yt(i,u.data,u.gc,g,m),p+=f)}else g=Yt(i,u.data,u.gc,g,c),p=f;o.push(g),s.push(p),x=Math.max(g,x),b=Math.max(p,b)}!function(t,e){J(t,(t=>{const i=t.gc,n=i.length/2;let o;if(n>e){for(o=0;o<n;++o)delete t.data[i[o]];i.splice(0,n)}}))}(n,e);const _=o.indexOf(x),y=s.indexOf(b),v=t=>({width:o[t]||0,height:s[t]||0});return{first:v(0),last:v(e-1),widest:v(_),highest:v(y),widths:o,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){const e=this;e._reversePixels&&(t=1-t);const i=e._startPixel+t*e._length;return jt(e._alignToPixels?Xt(e.chart,i,0):i)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this,i=e.ticks||[];if(t>=0&&t<i.length){const n=i[t];return n.$context||(n.$context=function(t,e,i){return Object.assign(Object.create(t),{tick:i,index:e,type:"tick"})}(e.getContext(),t,n))}return e.$context||(e.$context=(n=e.chart.getContext(),o=e,Object.assign(Object.create(n),{scale:o,type:"scale"})));var n,o}_tickSize(){const t=this,e=t.options.ticks,i=Et(t.labelRotation),n=Math.abs(Math.cos(i)),o=Math.abs(Math.sin(i)),s=t._getLabelSizes(),a=e.autoSkipPadding||0,r=s?s.widest.width+a:0,l=s?s.highest.height+a:0;return t.isHorizontal()?l*n>r*o?r/n:l/o:l*o<r*n?l/n:r/o}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this,i=e.axis,n=e.chart,o=e.options,{grid:s,position:a}=o,r=s.offset,l=e.isHorizontal(),c=e.ticks.length+(r?1:0),h=$i(s),d=[],u=s.setContext(e.getContext()),f=u.drawBorder?u.borderWidth:0,g=f/2,p=function(t){return Xt(n,t,f)};let m,x,b,_,y,v,w,M,k,S,P,D;if("top"===a)m=p(e.bottom),v=e.bottom-h,M=m-g,S=p(t.top)+g,D=t.bottom;else if("bottom"===a)m=p(e.top),S=t.top,D=p(t.bottom)-g,v=m+g,M=e.top+h;else if("left"===a)m=p(e.right),y=e.right-h,w=m-g,k=p(t.left)+g,P=t.right;else if("right"===a)m=p(e.left),k=t.left,P=p(t.right)-g,y=m+g,w=e.left+h;else if("x"===i){if("center"===a)m=p((t.top+t.bottom)/2+.5);else if(U(a)){const t=Object.keys(a)[0],i=a[t];m=p(e.chart.scales[t].getPixelForValue(i))}S=t.top,D=t.bottom,v=m+g,M=v+h}else if("y"===i){if("center"===a)m=p((t.left+t.right)/2);else if(U(a)){const t=Object.keys(a)[0],i=a[t];m=p(e.chart.scales[t].getPixelForValue(i))}y=m-g,w=y-h,k=t.left,P=t.right}for(x=0;x<c;++x){const t=s.setContext(e.getContext(x)),i=t.lineWidth,o=t.color,a=s.borderDash||[],c=t.borderDashOffset,h=t.tickWidth,u=t.tickColor,f=t.tickBorderDash||[],g=t.tickBorderDashOffset;b=ji(e,x,r),void 0!==b&&(_=Xt(n,b,i),l?y=w=k=P=_:v=M=S=D=_,d.push({tx1:y,ty1:v,tx2:w,ty2:M,x1:k,y1:S,x2:P,y2:D,width:i,color:o,borderDash:a,borderDashOffset:c,tickWidth:h,tickColor:u,tickBorderDash:f,tickBorderDashOffset:g}))}return e._ticksLength=c,e._borderValue=m,d}_computeLabelItems(t){const e=this,i=e.axis,n=e.options,{position:o,ticks:s}=n,a=e.isHorizontal(),r=e.ticks,{align:l,crossAlign:c,padding:h,mirror:d}=s,u=$i(n.grid),f=u+h,g=d?-h:f,p=-Et(e.labelRotation),m=[];let x,b,_,y,v,w,M,k,S,P,D,C,O="middle";if("top"===o)w=e.bottom-g,M=e._getXAxisLabelAlignment();else if("bottom"===o)w=e.top+g,M=e._getXAxisLabelAlignment();else if("left"===o){const t=e._getYAxisLabelAlignment(u);M=t.textAlign,v=t.x}else if("right"===o){const t=e._getYAxisLabelAlignment(u);M=t.textAlign,v=t.x}else if("x"===i){if("center"===o)w=(t.top+t.bottom)/2+f;else if(U(o)){const t=Object.keys(o)[0],i=o[t];w=e.chart.scales[t].getPixelForValue(i)+f}M=e._getXAxisLabelAlignment()}else if("y"===i){if("center"===o)v=(t.left+t.right)/2-f;else if(U(o)){const t=Object.keys(o)[0],i=o[t];v=e.chart.scales[t].getPixelForValue(i)}M=e._getYAxisLabelAlignment(u).textAlign}"y"===i&&("start"===l?O="top":"end"===l&&(O="bottom"));const T=e._getLabelSizes();for(x=0,b=r.length;x<b;++x){_=r[x],y=_.label;const t=s.setContext(e.getContext(x));k=e.getPixelForTick(x)+s.labelOffset,S=e._resolveTickFontOptions(x),P=S.lineHeight,D=Y(y)?y.length:1;const i=D/2,n=t.color,l=t.textStrokeColor,h=t.textStrokeWidth;let u;if(a?(v=k,C="top"===o?"near"===c||0!==p?-D*P+P/2:"center"===c?-T.highest.height/2-i*P+P:-T.highest.height+P/2:"near"===c||0!==p?P/2:"center"===c?T.highest.height/2-i*P:T.highest.height-D*P,d&&(C*=-1)):(w=k,C=(1-D)*P/2),t.showLabelBackdrop){const e=ze(t.backdropPadding),i=T.heights[x],n=T.widths[x];let o=w+C-e.top,s=v-e.left;switch(O){case"middle":o-=i/2;break;case"bottom":o-=i}switch(M){case"center":s-=n/2;break;case"right":s-=n}u={left:s,top:o,width:n+e.width,height:i+e.height,color:t.backdropColor}}m.push({rotation:p,label:y,font:S,color:n,strokeColor:l,strokeWidth:h,textOffset:C,textAlign:M,textBaseline:O,translation:[v,w],backdrop:u})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Et(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align&&(i="right"),i}_getYAxisLabelAlignment(t){const e=this,{position:i,ticks:{crossAlign:n,mirror:o,padding:s}}=e.options,a=t+s,r=e._getLabelSizes().widest.width;let l,c;return"left"===i?o?(l="left",c=e.right+s):(c=e.right-a,"near"===n?l="right":"center"===n?(l="center",c-=r/2):(l="left",c=e.left)):"right"===i?o?(l="right",c=e.left+s):(c=e.left+a,"near"===n?l="left":"center"===n?(l="center",c+=r/2):(l="right",c=e.right)):l="right",{textAlign:l,x:c}}_computeLabelArea(){const t=this;if(t.options.ticks.mirror)return;const e=t.chart,i=t.options.position;return"left"===i||"right"===i?{top:0,left:t.left,bottom:e.height,right:t.right}:"top"===i||"bottom"===i?{top:t.top,left:0,bottom:t.bottom,right:e.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:o,height:s}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,o,s),t.restore())}getLineWidthForValue(t){const e=this,i=e.options.grid;if(!e._isVisible()||!i.display)return 0;const n=e.ticks.findIndex((e=>e.value===t));if(n>=0){return i.setContext(e.getContext(n)).lineWidth}return 0}drawGrid(t){const e=this,i=e.options.grid,n=e.ctx,o=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));let s,a;const r=(t,e,i)=>{i.width&&i.color&&(n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.setLineDash(i.borderDash||[]),n.lineDashOffset=i.borderDashOffset,n.beginPath(),n.moveTo(t.x,t.y),n.lineTo(e.x,e.y),n.stroke(),n.restore())};if(i.display)for(s=0,a=o.length;s<a;++s){const t=o[s];i.drawOnChartArea&&r({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),i.drawTicks&&r({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const t=this,{chart:e,ctx:i,options:{grid:n}}=t,o=n.setContext(t.getContext()),s=n.drawBorder?o.borderWidth:0;if(!s)return;const a=n.setContext(t.getContext(0)).lineWidth,r=t._borderValue;let l,c,h,d;t.isHorizontal()?(l=Xt(e,t.left,s)-s/2,c=Xt(e,t.right,a)+a/2,h=d=r):(h=Xt(e,t.top,s)-s/2,d=Xt(e,t.bottom,a)+a/2,l=c=r),i.save(),i.lineWidth=o.borderWidth,i.strokeStyle=o.borderColor,i.beginPath(),i.moveTo(l,h),i.lineTo(c,d),i.stroke(),i.restore()}drawLabels(t){const e=this;if(!e.options.ticks.display)return;const i=e.ctx,n=e._computeLabelArea();n&&Zt(i,n);const o=e._labelItems||(e._labelItems=e._computeLabelItems(t));let s,a;for(s=0,a=o.length;s<a;++s){const t=o[s],e=t.font,n=t.label;t.backdrop&&(i.fillStyle=t.backdrop.color,i.fillRect(t.backdrop.left,t.backdrop.top,t.backdrop.width,t.backdrop.height)),ee(i,n,0,t.textOffset,e,t)}n&&Qt(i)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:n}}=this;if(!i.display)return;const s=Fe(i.font),a=ze(i.padding),r=i.align;let l=s.lineHeight/2;"bottom"===e?(l+=a.bottom,Y(i.text)&&(l+=s.lineHeight*(i.text.length-1))):l+=a.top;const{titleX:c,titleY:h,maxWidth:d,rotation:u}=function(t,e,i,n){const{top:s,left:a,bottom:r,right:l}=t;let c,h,d,u=0;return t.isHorizontal()?(h=o(n,a,l),d=Hi(t,i,e),c=l-a):(h=Hi(t,i,e),d=o(n,r,s),u="left"===i?-Mt:Mt),{titleX:h,titleY:d,maxWidth:c,rotation:u}}(this,l,e,r);ee(t,i.text,0,0,s,{color:i.color,maxWidth:d,rotation:u,textAlign:Ui(r,e,n),textBaseline:"middle",translation:[c,h]})}draw(t){const e=this;e._isVisible()&&(e.drawBackground(),e.drawGrid(t),e.drawBorder(),e.drawTitle(),e.drawLabels(t))}_layers(){const t=this,e=t.options,i=e.ticks&&e.ticks.z||0,n=e.grid&&e.grid.z||0;return t._isVisible()&&t.draw===Xi.prototype.draw?[{z:n,draw(e){t.drawBackground(),t.drawGrid(e),t.drawTitle()}},{z:n+1,draw(){t.drawBorder()}},{z:i,draw(e){t.drawLabels(e)}}]:[{z:i,draw(e){t.draw(e)}}]}getMatchingVisibleMetas(t){const e=this,i=e.chart.getSortedVisibleDatasetMetas(),n=e.axis+"AxisID",o=[];let s,a;for(s=0,a=i.length;s<a;++s){const a=i[s];a[n]!==e.id||t&&a.type!==t||o.push(a)}return o}_resolveTickFontOptions(t){return Fe(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this,e=t._resolveTickFontOptions(0).lineHeight;return(t.isHorizontal()?t.width:t.height)/e}}function qi(t,e=[""],i=t,n,o=(()=>t[0])){ht(n)||(n=an("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:o,override:o=>qi([o,...t],e,i,n)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>Ji(i,n,(()=>function(t,e,i,n){let o;for(const s of e)if(o=an(Zi(s,t),i),ht(o))return Qi(t,o)?on(i,n,t,o):o}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>rn(t).includes(e),ownKeys:t=>rn(t),set:(t,e,i)=>((t._storage||(t._storage=o()))[e]=i,delete t[e],delete t._keys,!0)})}function Ki(t,e,i,n){const o={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Gi(t,n),setContext:e=>Ki(t,e,i,n),override:o=>Ki(t.override(o),e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Ji(t,e,(()=>function(t,e,i){const{_proxy:n,_context:o,_subProxy:s,_descriptors:a}=t;let r=n[e];dt(r)&&a.isScriptable(e)&&(r=function(t,e,i,n){const{_proxy:o,_context:s,_subProxy:a,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+[...r].join("->")+"->"+t);r.add(t),e=e(s,a||n),r.delete(t),U(e)&&(e=on(o._scopes,o,t,e));return e}(e,r,t,i));Y(r)&&r.length&&(r=function(t,e,i,n){const{_proxy:o,_context:s,_subProxy:a,_descriptors:r}=i;if(ht(s.index)&&n(t))e=e[s.index%e.length];else if(U(e[0])){const i=e,n=o._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=on(n,o,t,l);e.push(Ki(i,s,a&&a[t],r))}}return e}(e,r,t,a.isIndexable));Qi(e,r)&&(r=Ki(r,o,s&&s[e],a));return r}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function Gi(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:o=e.allKeys}=t;return{allKeys:o,scriptable:i,indexable:n,isScriptable:dt(i)?i:()=>i,isIndexable:dt(n)?n:()=>n}}const Zi=(t,e)=>t?t+ct(e):e,Qi=(t,e)=>U(e)&&"adapters"!==t;function Ji(t,e,i){let n=t[e];return ht(n)||(n=i(),ht(n)&&(t[e]=n)),n}function tn(t,e,i){return dt(t)?t(e,i):t}const en=(t,e)=>!0===t?e:"string"==typeof t?lt(e,t):void 0;function nn(t,e,i,n){for(const o of e){const e=en(i,o);if(e){t.add(e);const o=tn(e._fallback,i,e);if(ht(o)&&o!==i&&o!==n)return o}else if(!1===e&&ht(n)&&i!==n)return null}return!1}function on(t,e,i,n){const o=e._rootScopes,s=tn(e._fallback,i,n),a=[...t,...o],r=new Set;r.add(n);let l=sn(r,a,i,s||i);return null!==l&&((!ht(s)||s===i||(l=sn(r,a,s,l),null!==l))&&qi([...r],[""],o,s,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const o=n[e];if(Y(o)&&U(i))return i;return o}(e,i,n))))}function sn(t,e,i,n){for(;i;)i=nn(t,e,i,n);return i}function an(t,e){for(const i of e){if(!i)continue;const e=i[t];if(ht(e))return e}}function rn(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return[...e]}(t._scopes)),e}const ln=Number.EPSILON||1e-14,cn=(t,e)=>e<t.length&&!t[e].skip&&t[e],hn=t=>"x"===t?"y":"x";function dn(t,e,i,n){const o=t.skip?e:t,s=e,a=i.skip?e:i,r=Vt(s,o),l=Vt(a,s);let c=r/(r+l),h=l/(r+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=n*c,u=n*h;return{previous:{x:s.x-d*(a.x-o.x),y:s.y-d*(a.y-o.y)},next:{x:s.x+u*(a.x-o.x),y:s.y+u*(a.y-o.y)}}}function un(t,e="x"){const i=hn(e),n=t.length,o=Array(n).fill(0),s=Array(n);let a,r,l,c=cn(t,0);for(a=0;a<n;++a)if(r=l,l=c,c=cn(t,a+1),l){if(c){const t=c[e]-l[e];o[a]=0!==t?(c[i]-l[i])/t:0}s[a]=r?c?Dt(o[a-1])!==Dt(o[a])?0:(o[a-1]+o[a])/2:o[a-1]:o[a]}!function(t,e,i){const n=t.length;let o,s,a,r,l,c=cn(t,0);for(let h=0;h<n-1;++h)l=c,c=cn(t,h+1),l&&c&&(At(e[h],0,ln)?i[h]=i[h+1]=0:(o=i[h]/e[h],s=i[h+1]/e[h],r=Math.pow(o,2)+Math.pow(s,2),r<=9||(a=3/Math.sqrt(r),i[h]=o*a*e[h],i[h+1]=s*a*e[h])))}(t,o,s),function(t,e,i="x"){const n=hn(i),o=t.length;let s,a,r,l=cn(t,0);for(let c=0;c<o;++c){if(a=r,r=l,l=cn(t,c+1),!r)continue;const o=r[i],h=r[n];a&&(s=(o-a[i])/3,r[`cp1${i}`]=o-s,r[`cp1${n}`]=h-s*e[c]),l&&(s=(l[i]-o)/3,r[`cp2${i}`]=o+s,r[`cp2${n}`]=h+s*e[c])}}(t,s,e)}function fn(t,e,i){return Math.max(Math.min(t,i),e)}function gn(t,e,i,n,o){let s,a,r,l;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)un(t,o);else{let i=n?t[t.length-1]:t[0];for(s=0,a=t.length;s<a;++s)r=t[s],l=dn(i,r,t[Math.min(s+1,a-(n?0:1))%a],e.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,i=r}e.capBezierPoints&&function(t,e){let i,n,o,s,a,r=Gt(t[0],e);for(i=0,n=t.length;i<n;++i)a=s,s=r,r=i<n-1&&Gt(t[i+1],e),s&&(o=t[i],a&&(o.cp1x=fn(o.cp1x,e.left,e.right),o.cp1y=fn(o.cp1y,e.top,e.bottom)),r&&(o.cp2x=fn(o.cp2x,e.left,e.right),o.cp2y=fn(o.cp2y,e.top,e.bottom)))}(t,i)}function pn(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function mn(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function xn(t,e,i,n){const o={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},a=pn(t,o,i),r=pn(o,s,i),l=pn(s,e,i),c=pn(a,r,i),h=pn(r,l,i);return pn(c,h,i)}function bn(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function _n(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function yn(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function vn(t){return"angle"===t?{between:Ht,compare:Bt,normalize:Wt}:{between:(t,e,i)=>t>=Math.min(e,i)&&t<=Math.max(i,e),compare:(t,e)=>t-e,normalize:t=>t}}function wn({start:t,end:e,count:i,loop:n,style:o}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:o}}function Mn(t,e,i){if(!i)return[t];const{property:n,start:o,end:s}=i,a=e.length,{compare:r,between:l,normalize:c}=vn(n),{start:h,end:d,loop:u,style:f}=function(t,e,i){const{property:n,start:o,end:s}=i,{between:a,normalize:r}=vn(n),l=e.length;let c,h,{start:d,end:u,loop:f}=t;if(f){for(d+=l,u+=l,c=0,h=l;c<h&&a(r(e[d%l][n]),o,s);++c)d--,u--;d%=l,u%=l}return u<d&&(u+=l),{start:d,end:u,loop:f,style:t.style}}(t,e,i),g=[];let p,m,x,b=!1,_=null;const y=()=>b||l(o,x,p)&&0!==r(o,x),v=()=>!b||0===r(s,p)||l(s,x,p);for(let t=h,i=h;t<=d;++t)m=e[t%a],m.skip||(p=c(m[n]),p!==x&&(b=l(p,o,s),null===_&&y()&&(_=0===r(p,o)?t:i),null!==_&&v()&&(g.push(wn({start:_,end:t,loop:u,count:a,style:f})),_=null),i=t,x=p));return null!==_&&g.push(wn({start:_,end:d,loop:u,count:a,style:f})),g}function kn(t,e){const i=[],n=t.segments;for(let o=0;o<n.length;o++){const s=Mn(n[o],t.points,e);s.length&&i.push(...s)}return i}function Sn(t,e){const i=t.points,n=t.options.spanGaps,o=i.length;if(!o)return[];const s=!!t._loop,{start:a,end:r}=function(t,e,i,n){let o=0,s=e-1;if(i&&!n)for(;o<e&&!t[o].skip;)o++;for(;o<e&&t[o].skip;)o++;for(o%=e,i&&(s+=o);s>o&&t[s%e].skip;)s--;return s%=e,{start:o,end:s}}(i,o,s,n);if(!0===n)return Pn([{start:a,end:r,loop:s}],i,e);return Pn(function(t,e,i,n){const o=t.length,s=[];let a,r=e,l=t[e];for(a=e+1;a<=i;++a){const i=t[a%o];i.skip||i.stop?l.skip||(n=!1,s.push({start:e%o,end:(a-1)%o,loop:n}),e=r=i.stop?a:null):(r=a,l.skip&&(e=a)),l=i}return null!==r&&s.push({start:e%o,end:r%o,loop:n}),s}(i,a,r<a?r+o:r,!!t._fullLoop&&0===a&&r===o-1),i,e)}function Pn(t,e,i){return i&&i.setContext&&e?function(t,e,i){const n=e.length,o=[];let s=t[0].start,a=s;for(const r of t){let t,l,c=e[s%n];for(a=s+1;a<=r.end;a++){const h=e[a%n];l=Dn(i.setContext({type:"segment",p0:c,p1:h})),Cn(l,t)&&(o.push({start:s,end:a-1,loop:r.loop,style:t}),t=l,s=a-1),c=h,t=l}s<a-1&&(o.push({start:s,end:a-1,loop:r.loop,style:l}),s=a-1)}return o}(t,e,i):t}function Dn(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Cn(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)}var On=Object.freeze({__proto__:null,easingEffects:mi,color:W,getHoverColor:H,noop:N,uid:j,isNullOrUndef:$,isArray:Y,isObject:U,isFinite:X,finiteOrDefault:q,valueOrDefault:K,toPercentage:G,toDimension:Z,callback:Q,each:J,_elementsEqual:tt,clone:et,_merger:nt,merge:ot,mergeIf:st,_mergerIf:at,_deprecated:function(t,e,i,n){void 0!==e&&console.warn(t+': "'+i+'" is deprecated. Please use "'+n+'" instead')},resolveObjectKey:lt,_capitalize:ct,defined:ht,isFunction:dt,setsEqual:ut,toFontString:$t,_measureText:Yt,_longestText:Ut,_alignPixel:Xt,clearCanvas:qt,drawPoint:Kt,_isPointInArea:Gt,clipArea:Zt,unclipArea:Qt,_steppedLineTo:Jt,_bezierCurveTo:te,renderText:ee,addRoundedRectPath:ie,_lookup:ne,_lookupByKey:oe,_rlookupByKey:se,_filterBetween:ae,listenArrayEvents:le,unlistenArrayEvents:ce,_arrayUnique:he,_createResolver:qi,_attachContext:Ki,_descriptors:Gi,splineCurve:dn,splineCurveMonotone:un,_updateBezierControlPoints:gn,_getParentNode:de,getStyle:ge,getRelativePosition:xe,getMaximumSize:_e,retinaScale:ye,supportsEventListenerOptions:ve,readUsedSize:we,fontString:function(t,e,i){return e+" "+t+"px "+i},requestAnimFrame:t,throttled:e,debounce:i,_toLeftRightCenter:n,_alignStartEnd:o,_textX:s,_pointInLine:pn,_steppedInterpolation:mn,_bezierInterpolation:xn,formatNumber:zi,toLineHeight:Le,_readValueToProps:Re,toTRBL:Ee,toTRBLCorners:Ie,toPadding:ze,toFont:Fe,resolve:Ve,_addGrace:Be,PI:bt,TAU:_t,PITAU:yt,INFINITY:vt,RAD_PER_DEG:wt,HALF_PI:Mt,QUARTER_PI:kt,TWO_THIRDS_PI:St,log10:Pt,sign:Dt,niceNum:Ct,_factorize:Ot,isNumber:Tt,almostEquals:At,almostWhole:Lt,_setMinAndMaxByKey:Rt,toRadians:Et,toDegrees:It,_decimalPlaces:zt,getAngleFromPoint:Ft,distanceBetweenPoints:Vt,_angleDiff:Bt,_normalizeAngle:Wt,_angleBetween:Ht,_limitValue:Nt,_int16Range:jt,getRtlAdapter:bn,overrideTextDirection:_n,restoreTextDirection:yn,_boundSegment:Mn,_boundSegments:kn,_computeSegments:Sn});class Tn{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=this,i=Object.getPrototypeOf(t);let n;(function(t){return"id"in t&&"defaults"in t})(i)&&(n=e.register(i));const o=e.items,s=t.id,a=e.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in o||(o[s]=t,function(t,e,i){const n=ot(Object.create(null),[i?xt.get(i):{},xt.get(e),t.defaults]);xt.set(e,n),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((i=>{const n=i.split("."),o=n.pop(),s=[t].concat(n).join("."),a=e[i].split("."),r=a.pop(),l=a.join(".");xt.route(s,o,l,r)}))}(e,t.defaultRoutes);t.descriptors&&xt.describe(e,t.descriptors)}(t,a,n),e.override&&xt.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in xt[n]&&(delete xt[n][i],this.override&&delete ft[i])}}var An=new class{constructor(){this.controllers=new Tn(Ri,"datasets",!0),this.elements=new Tn(Ei,"elements"),this.plugins=new Tn(Object,"plugins"),this.scales=new Tn(Xi,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){const n=this;[...e].forEach((e=>{const o=i||n._getRegistryForType(e);i||o.isForType(e)||o===n.plugins&&e.id?n._exec(t,o,e):J(e,(e=>{const o=i||n._getRegistryForType(e);n._exec(t,o,e)}))}))}_exec(t,e,i){const n=ct(t);Q(i["before"+n],[],i),e[t](i),Q(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const n=e.get(t);if(void 0===n)throw new Error('"'+t+'" is not a registered '+i+".");return n}};class Ln{constructor(){this._init=[]}notify(t,e,i,n){const o=this;"beforeInit"===e&&(o._init=o._createDescriptors(t,!0),o._notify(o._init,t,"install"));const s=n?o._descriptors(t).filter(n):o._descriptors(t),a=o._notify(s,t,e,i);return"destroy"===e&&(o._notify(s,t,"stop"),o._notify(o._init,t,"uninstall")),a}_notify(t,e,i,n){n=n||{};for(const o of t){const t=o.plugin;if(!1===Q(t[i],[e,n,o.options],t)&&n.cancelable)return!1}return!0}invalidate(){$(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,n=K(i.options&&i.options.plugins,{}),o=function(t){const e=[],i=Object.keys(An.plugins.items);for(let t=0;t<i.length;t++)e.push(An.getPlugin(i[t]));const n=t.plugins||[];for(let t=0;t<n.length;t++){const i=n[t];-1===e.indexOf(i)&&e.push(i)}return e}(i);return!1!==n||e?function(t,e,i,n){const o=[],s=t.getContext();for(let a=0;a<e.length;a++){const r=e[a],l=Rn(i[r.id],n);null!==l&&o.push({plugin:r,options:En(t.config,r,l,s)})}return o}(t,o,n,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,n=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function Rn(t,e){return e||!1!==t?!0===t?{}:t:null}function En(t,e,i,n){const o=t.pluginScopeKeys(e),s=t.getOptionScopes(i,o);return t.createResolver(s,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function In(t,e){const i=xt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function zn(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function Fn(t){const e=t.options||(t.options={});e.plugins=K(e.plugins,{}),e.scales=function(t,e){const i=ft[t.type]||{scales:{}},n=e.scales||{},o=In(t.type,e),s=Object.create(null),a=Object.create(null);return Object.keys(n).forEach((t=>{const e=n[t],r=zn(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(r,o),c=i.scales||{};s[r]=s[r]||t,a[t]=st(Object.create(null),[{axis:r},e,c[r],c[l]])})),t.data.datasets.forEach((i=>{const o=i.type||t.type,r=i.indexAxis||In(o,e),l=(ft[o]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,r),o=i[e+"AxisID"]||s[e]||e;a[o]=a[o]||Object.create(null),st(a[o],[{axis:e},n[o],l[t]])}))})),Object.keys(a).forEach((t=>{const e=a[t];st(e,[xt.scales[e.type],xt.scale])})),a}(t,e)}function Vn(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const Bn=new Map,Wn=new Set;function Hn(t,e){let i=Bn.get(t);return i||(i=e(),Bn.set(t,i),Wn.add(i)),i}const Nn=(t,e,i)=>{const n=lt(e,i);void 0!==n&&t.add(n)};class jn{constructor(t){this._config=function(t){return(t=t||{}).data=Vn(t.data),Fn(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Vn(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Fn(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Hn(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Hn(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Hn(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return Hn(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:o}=this,s=this._cachedScopes(t,i),a=s.get(e);if(a)return a;const r=new Set;e.forEach((e=>{t&&(r.add(t),e.forEach((e=>Nn(r,t,e)))),e.forEach((t=>Nn(r,n,t))),e.forEach((t=>Nn(r,ft[o]||{},t))),e.forEach((t=>Nn(r,xt,t))),e.forEach((t=>Nn(r,gt,t)))}));const l=[...r];return Wn.has(e)&&s.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,ft[e]||{},xt.datasets[e]||{},{type:e},xt,gt]}resolveNamedOptions(t,e,i,n=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=$n(this._resolverCache,t,n);let r=s;if(function(t,e){const{isScriptable:i,isIndexable:n}=Gi(t);for(const o of e)if(i(o)&&dt(t[o])||n(o)&&Y(t[o]))return!0;return!1}(s,e)){o.$shared=!1;r=Ki(s,i=dt(i)?i():i,this.createResolver(t,i,a))}for(const t of e)o[t]=r[t];return o}createResolver(t,e,i=[""],n){const{resolver:o}=$n(this._resolverCache,t,i);return U(e)?Ki(o,e,void 0,n):o}}function $n(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const o=i.join();let s=n.get(o);if(!s){s={resolver:qi(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(o,s)}return s}const Yn=["top","bottom","left","right","chartArea"];function Un(t,e){return"top"===t||"bottom"===t||-1===Yn.indexOf(t)&&"x"===e}function Xn(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function qn(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),Q(i&&i.onComplete,[t],e)}function Kn(t){const e=t.chart,i=e.options.animation;Q(i&&i.onProgress,[t],e)}function Gn(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Zn(t){return Gn()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Qn={},Jn=t=>{const e=Zn(t);return Object.values(Qn).filter((t=>t.canvas===e)).pop()};class to{constructor(t,e){const n=this;this.config=e=new jn(e);const o=Zn(t),s=Jn(o);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas can be reused.");const r=e.createResolver(e.chartOptionScopes(),n.getContext());this.platform=n._initializePlatform(o,e);const l=n.platform.acquireContext(o,r.aspectRatio),c=l&&l.canvas,h=c&&c.height,d=c&&c.width;this.id=j(),this.ctx=l,this.canvas=c,this.width=d,this.height=h,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this.scale=void 0,this._plugins=new Ln,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=i((()=>this.update("resize")),r.resizeDelay||0),Qn[n.id]=n,l&&c?(a.listen(n,"complete",qn),a.listen(n,"progress",Kn),n._initialize(),n.attached&&n.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:o}=this;return $(t)?e&&o?o:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){const t=this;return t.notifyPlugins("beforeInit"),t.options.responsive?t.resize():ye(t,t.options.devicePixelRatio),t.bindEvents(),t.notifyPlugins("afterInit"),t}_initializePlatform(t,e){return e.platform?new e.platform:!Gn()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?new Qe:new di}clear(){return qt(this.canvas,this.ctx),this}stop(){return a.stop(this),this}resize(t,e){a.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this,n=i.options,o=i.canvas,s=n.maintainAspectRatio&&i.aspectRatio,a=i.platform.getMaximumSize(o,t,e,s),r=n.devicePixelRatio||i.platform.getDevicePixelRatio();i.width=a.width,i.height=a.height,i._aspectRatio=i.aspectRatio,ye(i,r,!0)&&(i.notifyPlugins("resize",{size:a}),Q(n.onResize,[i,a],i),i.attached&&i._doResize()&&i.render())}ensureScalesHaveIDs(){J(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this,e=t.options,i=e.scales,n=t.scales,o=Object.keys(n).reduce(((t,e)=>(t[e]=!1,t)),{});let s=[];i&&(s=s.concat(Object.keys(i).map((t=>{const e=i[t],n=zn(t,e),o="r"===n,s="x"===n;return{options:e,dposition:o?"chartArea":s?"bottom":"left",dtype:o?"radialLinear":s?"category":"linear"}})))),J(s,(i=>{const s=i.options,a=s.id,r=zn(a,s),l=K(s.type,i.dtype);void 0!==s.position&&Un(s.position,r)===Un(i.dposition)||(s.position=i.dposition),o[a]=!0;let c=null;if(a in n&&n[a].type===l)c=n[a];else{c=new(An.getScale(l))({id:a,type:l,ctx:t.ctx,chart:t}),n[c.id]=c}c.init(s,e)})),J(o,((t,e)=>{t||delete n[e]})),J(n,(e=>{Ge.configure(t,e,e.options),Ge.addBox(t,e)}))}_updateMetasets(){const t=this,e=t._metasets,i=t.data.datasets.length,n=e.length;if(e.sort(((t,e)=>t.index-e.index)),n>i){for(let e=i;e<n;++e)t._destroyDatasetMeta(e);e.splice(i,n-i)}t._sortedMetasets=e.slice(0).sort(Xn("order","index"))}_removeUnreferencedMetasets(){const t=this,{_metasets:e,data:{datasets:i}}=t;e.length>i.length&&delete t._stacks,e.forEach(((e,n)=>{0===i.filter((t=>t===e._dataset)).length&&t._destroyDatasetMeta(n)}))}buildOrUpdateControllers(){const t=this,e=[],i=t.data.datasets;let n,o;for(t._removeUnreferencedMetasets(),n=0,o=i.length;n<o;n++){const o=i[n];let s=t.getDatasetMeta(n);const a=o.type||t.config.type;if(s.type&&s.type!==a&&(t._destroyDatasetMeta(n),s=t.getDatasetMeta(n)),s.type=a,s.indexAxis=o.indexAxis||In(a,t.options),s.order=o.order||0,s.index=n,s.label=""+o.label,s.visible=t.isDatasetVisible(n),s.controller)s.controller.updateIndex(n),s.controller.linkScales();else{const i=An.getController(a),{datasetElementType:o,dataElementType:r}=xt.datasets[a];Object.assign(i.prototype,{dataElementType:An.getElement(r),datasetElementType:o&&An.getElement(o)}),s.controller=new i(t,n),e.push(s.controller)}}return t._updateMetasets(),e}_resetElements(){const t=this;J(t.data.datasets,((e,i)=>{t.getDatasetMeta(i).controller.reset()}),t)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this,i=e.config;i.update(),e._options=i.createResolver(i.chartOptionScopes(),e.getContext()),J(e.scales,(t=>{Ge.removeBox(e,t)}));const n=e._animationsDisabled=!e.options.animation;e.ensureScalesHaveIDs(),e.buildOrUpdateScales();const o=new Set(Object.keys(e._listeners)),s=new Set(e.options.events);if(ut(o,s)&&!!this._responsiveListeners===e.options.responsive||(e.unbindEvents(),e.bindEvents()),e._plugins.invalidate(),!1===e.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const a=e.buildOrUpdateControllers();e.notifyPlugins("beforeElementsUpdate");let r=0;for(let t=0,i=e.data.datasets.length;t<i;t++){const{controller:i}=e.getDatasetMeta(t),o=!n&&-1===a.indexOf(i);i.buildOrUpdateElements(o),r=Math.max(+i.getMaxOverflow(),r)}e._minPadding=r,e._updateLayout(r),n||J(a,(t=>{t.reset()})),e._updateDatasets(t),e.notifyPlugins("afterUpdate",{mode:t}),e._layers.sort(Xn("z","_idx")),e._lastEvent&&e._eventHandler(e._lastEvent,!0),e.render()}_updateLayout(t){const e=this;if(!1===e.notifyPlugins("beforeLayout",{cancelable:!0}))return;Ge.update(e,e.width,e.height,t);const i=e.chartArea,n=i.width<=0||i.height<=0;e._layers=[],J(e.boxes,(t=>{n&&"chartArea"===t.position||(t.configure&&t.configure(),e._layers.push(...t._layers()))}),e),e._layers.forEach(((t,e)=>{t._idx=e})),e.notifyPlugins("afterLayout")}_updateDatasets(t){const e=this,i="function"==typeof t;if(!1!==e.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let n=0,o=e.data.datasets.length;n<o;++n)e._updateDataset(n,i?t({datasetIndex:n}):t);e.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this,n=i.getDatasetMeta(t),o={meta:n,index:t,mode:e,cancelable:!0};!1!==i.notifyPlugins("beforeDatasetUpdate",o)&&(n.controller._update(e),o.cancelable=!1,i.notifyPlugins("afterDatasetUpdate",o))}render(){const t=this;!1!==t.notifyPlugins("beforeRender",{cancelable:!0})&&(a.has(t)?t.attached&&!a.running(t)&&a.start(t):(t.draw(),qn({chart:t})))}draw(){const t=this;let e;if(t._resizeBeforeDraw){const{width:e,height:i}=t._resizeBeforeDraw;t._resize(e,i),t._resizeBeforeDraw=null}if(t.clear(),t.width<=0||t.height<=0)return;if(!1===t.notifyPlugins("beforeDraw",{cancelable:!0}))return;const i=t._layers;for(e=0;e<i.length&&i[e].z<=0;++e)i[e].draw(t.chartArea);for(t._drawDatasets();e<i.length;++e)i[e].draw(t.chartArea);t.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let n,o;for(n=0,o=e.length;n<o;++n){const o=e[n];t&&!o.visible||i.push(o)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){const t=this;if(!1===t.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const e=t.getSortedVisibleDatasetMetas();for(let i=e.length-1;i>=0;--i)t._drawDataset(e[i]);t.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this,i=e.ctx,n=t._clip,o=e.chartArea,s={meta:t,index:t.index,cancelable:!0};!1!==e.notifyPlugins("beforeDatasetDraw",s)&&(Zt(i,{left:!1===n.left?0:o.left-n.left,right:!1===n.right?e.width:o.right+n.right,top:!1===n.top?0:o.top-n.top,bottom:!1===n.bottom?e.height:o.bottom+n.bottom}),t.controller.draw(),Qt(i),s.cancelable=!1,e.notifyPlugins("afterDatasetDraw",s))}getElementsAtEventForMode(t,e,i,n){const o=Oe.modes[e];return"function"==typeof o?o(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context={chart:this,type:"chart"})}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateDatasetVisibility(t,e){const i=this,n=e?"show":"hide",o=i.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,n);i.setDatasetVisibility(t,e),s.update(o,{visible:e}),i.update((e=>e.datasetIndex===t?n:void 0))}hide(t){this._updateDatasetVisibility(t,!1)}show(t){this._updateDatasetVisibility(t,!0)}_destroyDatasetMeta(t){const e=this,i=e._metasets&&e._metasets[t];i&&i.controller&&(i.controller._destroy(),delete e._metasets[t])}destroy(){const t=this,{canvas:e,ctx:i}=t;let n,o;for(t.stop(),a.remove(t),n=0,o=t.data.datasets.length;n<o;++n)t._destroyDatasetMeta(n);t.config.clearCache(),e&&(t.unbindEvents(),qt(e,i),t.platform.releaseContext(i),t.canvas=null,t.ctx=null),t.notifyPlugins("destroy"),delete Qn[t.id]}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this,e=t._listeners,i=t.platform,n=function(e,i,n){e.offsetX=i,e.offsetY=n,t._eventHandler(e)};J(t.options.events,(o=>((n,o)=>{i.addEventListener(t,n,o),e[n]=o})(o,n)))}bindResponsiveEvents(){const t=this;t._responsiveListeners||(t._responsiveListeners={});const e=t._responsiveListeners,i=t.platform,n=(n,o)=>{i.addEventListener(t,n,o),e[n]=o},o=(n,o)=>{e[n]&&(i.removeEventListener(t,n,o),delete e[n])},s=(e,i)=>{t.canvas&&t.resize(e,i)};let a;const r=()=>{o("attach",r),t.attached=!0,t.resize(),n("resize",s),n("detach",a)};a=()=>{t.attached=!1,o("resize",s),n("attach",r)},i.isAttached(t.canvas)?r():a()}unbindEvents(){const t=this;J(t._listeners,((e,i)=>{t.platform.removeEventListener(t,i,e)})),t._listeners={},J(t._responsiveListeners,((e,i)=>{t.platform.removeEventListener(t,i,e)})),t._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let o,s,a,r;for("dataset"===e&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),a=0,r=t.length;a<r;++a){s=t[a];const e=s&&this.getDatasetMeta(s.datasetIndex).controller;e&&e[n+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this,i=e._active||[],n=t.map((({datasetIndex:t,index:i})=>{const n=e.getDatasetMeta(t);if(!n)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:n.data[i],index:i}}));!tt(n,i)&&(e._active=n,e._updateHoverStyles(n,i))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this,o=n.options.hover,s=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),a=s(e,t),r=i?t:s(t,e);a.length&&n.updateHoverStyle(a,o.mode,!1),r.length&&o.mode&&n.updateHoverStyle(r,o.mode,!0)}_eventHandler(t,e){const i=this,n={event:t,replay:e,cancelable:!0},o=e=>(e.options.events||this.options.events).includes(t.type);if(!1===i.notifyPlugins("beforeEvent",n,o))return;const s=i._handleEvent(t,e);return n.cancelable=!1,i.notifyPlugins("afterEvent",n,o),(s||n.changed)&&i.render(),i}_handleEvent(t,e){const i=this,{_active:n=[],options:o}=i,s=o.hover,a=e;let r=[],l=!1,c=null;return"mouseout"!==t.type&&(r=i.getElementsAtEventForMode(t,s.mode,s,a),c="click"===t.type?i._lastEvent:t),i._lastEvent=null,Gt(t,i.chartArea,i._minPadding)&&(Q(o.onHover,[t,r,i],i),"mouseup"!==t.type&&"click"!==t.type&&"contextmenu"!==t.type||Q(o.onClick,[t,r,i],i)),l=!tt(r,n),(l||e)&&(i._active=r,i._updateHoverStyles(r,n,e)),i._lastEvent=c,l}}const eo=()=>J(to.instances,(t=>t._plugins.invalidate())),io=!0;function no(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}Object.defineProperties(to,{defaults:{enumerable:io,value:xt},instances:{enumerable:io,value:Qn},overrides:{enumerable:io,value:ft},registry:{enumerable:io,value:An},version:{enumerable:io,value:"3.3.2"},getChart:{enumerable:io,value:Jn},register:{enumerable:io,value:(...t)=>{An.add(...t),eo()}},unregister:{enumerable:io,value:(...t)=>{An.remove(...t),eo()}}});class oo{constructor(t){this.options=t||{}}formats(){return no()}parse(t,e){return no()}format(t,e){return no()}add(t,e,i){return no()}diff(t,e,i){return no()}startOf(t,e,i){return no()}endOf(t,e){return no()}}oo.override=function(t){Object.assign(oo.prototype,t)};var so={_date:oo};function ao(t){const e=function(t){if(!t._cache.$bar){const e=t.getMatchingVisibleMetas("bar");let i=[];for(let n=0,o=e.length;n<o;n++)i=i.concat(e[n].controller.getAllParsedValues(t));t._cache.$bar=he(i.sort(((t,e)=>t-e)))}return t._cache.$bar}(t);let i,n,o,s,a=t._length;const r=()=>{32767!==o&&-32768!==o&&(ht(s)&&(a=Math.min(a,Math.abs(o-s)||a)),s=o)};for(i=0,n=e.length;i<n;++i)o=t.getPixelForValue(e[i]),r();for(s=void 0,i=0,n=t.ticks.length;i<n;++i)o=t.getPixelForTick(i),r();return a}function ro(t,e,i,n){return Y(t)?function(t,e,i,n){const o=i.parse(t[0],n),s=i.parse(t[1],n),a=Math.min(o,s),r=Math.max(o,s);let l=a,c=r;Math.abs(a)>Math.abs(r)&&(l=r,c=a),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:o,end:s,min:a,max:r}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function lo(t,e,i,n){const o=t.iScale,s=t.vScale,a=o.getLabels(),r=o===s,l=[];let c,h,d,u;for(c=i,h=i+n;c<h;++c)u=e[c],d={},d[o.axis]=r||o.parse(a[c],c),l.push(ro(u,d,s,c));return l}function co(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}class ho extends Ri{parsePrimitiveData(t,e,i,n){return lo(t,e,i,n)}parseArrayData(t,e,i,n){return lo(t,e,i,n)}parseObjectData(t,e,i,n){const{iScale:o,vScale:s}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l="x"===o.axis?a:r,c="x"===s.axis?a:r,h=[];let d,u,f,g;for(d=i,u=i+n;d<u;++d)g=e[d],f={},f[o.axis]=o.parse(lt(g,l),d),h.push(ro(lt(g,c),f,s,d));return h}updateRangeFromParsed(t,e,i,n){super.updateRangeFromParsed(t,e,i,n);const o=i._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:n}=e,o=this.getParsed(t),s=o._custom,a=co(s)?"["+s.start+", "+s.end+"]":""+n.getLabelForValue(o[n.axis]);return{label:""+i.getLabelForValue(o[i.axis]),value:a}}initialize(){const t=this;t.enableOptionSharing=!0,super.initialize();t._cachedMeta.stack=t.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,n){const o=this,s="reset"===n,a=o._cachedMeta.vScale,r=a.getBasePixel(),l=a.isHorizontal(),c=o._getRuler(),h=o.resolveDataElementOptions(e,n),d=o.getSharedOptions(h),u=o.includeOptions(n,d);o.updateSharedOptions(d,n,h);for(let h=e;h<e+i;h++){const e=o.getParsed(h),i=s||$(e[a.axis])?{base:r,head:r}:o._calculateBarValuePixels(h),f=o._calculateBarIndexPixels(h,c),g=(e._stacks||{})[a.axis],p={horizontal:l,base:i.base,enableBorderRadius:!g||co(e._custom)||o.index===g._top||o.index===g._bottom,x:l?i.head:f.center,y:l?f.center:i.head,height:l?f.size:void 0,width:l?void 0:f.size};u&&(p.options=d||o.resolveDataElementOptions(h,n)),o.updateElement(t[h],h,p,n)}}_getStacks(t,e){const i=this._cachedMeta.iScale,n=i.getMatchingVisibleMetas(this._type),o=i.options.stacked,s=n.length,a=[];let r,l;for(r=0;r<s;++r){if(l=n[r],void 0!==e){const t=l.controller.getParsed(e)[l.controller._cachedMeta.vScale.axis];if($(t)||isNaN(t))continue}if((!1===o||-1===a.indexOf(l.stack)||void 0===o&&void 0===l.stack)&&a.push(l.stack),l.index===t)break}return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const n=this._getStacks(t,i),o=void 0!==e?n.indexOf(e):-1;return-1===o?n.length-1:o}_getRuler(){const t=this,e=t.options,i=t._cachedMeta,n=i.iScale,o=[];let s,a;for(s=0,a=i.data.length;s<a;++s)o.push(n.getPixelForValue(t.getParsed(s)[n.axis],s));const r=e.barThickness;return{min:r||ao(n),pixels:o,start:n._startPixel,end:n._endPixel,stackCount:t._getStackCount(),scale:n,grouped:e.grouped,ratio:r?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(t){const e=this,{vScale:i,_stacked:n}=e._cachedMeta,{base:o,minBarLength:s}=e.options,a=e.getParsed(t),r=a._custom,l=co(r);let c,h,d=a[i.axis],u=0,f=n?e.applyStack(i,a,n):d;f!==d&&(u=f-d,f=d),l&&(d=r.barStart,f=r.barEnd-r.barStart,0!==d&&Dt(d)!==Dt(r.barEnd)&&(u=0),u+=d);const g=$(o)||l?u:o;let p=i.getPixelForValue(g);c=this.chart.getDataVisibility(t)?i.getPixelForValue(u+f):p,h=c-p,void 0!==s&&Math.abs(h)<s&&(h=h<0?-s:s,0===d&&(p-=h/2),c=p+h);const m=o||0;if(p===i.getPixelForValue(m)){const t=i.getLineWidthForValue(m)/2;h>0?(p+=t,h-=t):h<0&&(p-=t,h+=t)}return{size:h,base:p,head:c,center:c+h/2}}_calculateBarIndexPixels(t,e){const i=this,n=e.scale,o=i.options,s=o.skipNull,a=K(o.maxBarThickness,1/0);let r,l;if(e.grouped){const n=s?i._getStackCount(t):e.stackCount,c="flex"===o.barThickness?function(t,e,i,n){const o=e.pixels,s=o[t];let a=t>0?o[t-1]:null,r=t<o.length-1?o[t+1]:null;const l=i.categoryPercentage;null===a&&(a=s-(null===r?e.end-e.start:r-s)),null===r&&(r=s+s-a);const c=s-(s-Math.min(a,r))/2*l;return{chunk:Math.abs(r-a)/2*l/n,ratio:i.barPercentage,start:c}}(t,e,o,n):function(t,e,i,n){const o=i.barThickness;let s,a;return $(o)?(s=e.min*i.categoryPercentage,a=i.barPercentage):(s=o*n,a=1),{chunk:s/n,ratio:a,start:e.pixels[t]-s/2}}(t,e,o,n),h=i._getStackIndex(i.index,i._cachedMeta.stack,s?t:void 0);r=c.start+c.chunk*h+c.chunk/2,l=Math.min(a,c.chunk*c.ratio)}else r=n.getPixelForValue(i.getParsed(t)[n.axis],t),l=Math.min(a,e.min*e.ratio);return{base:r-l/2,head:r+l/2,center:r,size:l}}draw(){const t=this,e=t.chart,i=t._cachedMeta,n=i.vScale,o=i.data,s=o.length;let a=0;for(Zt(e.ctx,e.chartArea);a<s;++a)null!==t.getParsed(a)[n.axis]&&o[a].draw(t._ctx);Qt(e.ctx)}}ho.id="bar",ho.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},ho.overrides={interaction:{mode:"index"},scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class uo extends Ri{initialize(){this.enableOptionSharing=!0,super.initialize()}parseObjectData(t,e,i,n){const{xScale:o,yScale:s}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l=[];let c,h,d;for(c=i,h=i+n;c<h;++c)d=e[c],l.push({x:o.parse(lt(d,a),c),y:s.parse(lt(d,r),c),_custom:d&&d.r&&+d.r});return l}getMaxOverflow(){const{data:t,_parsed:e}=this._cachedMeta;let i=0;for(let n=t.length-1;n>=0;--n)i=Math.max(i,t[n].size()/2,e[n]._custom);return i>0&&i}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,o=this.getParsed(t),s=i.getLabelForValue(o.x),a=n.getLabelForValue(o.y),r=o._custom;return{label:e.label,value:"("+s+", "+a+(r?", "+r:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const o=this,s="reset"===n,{iScale:a,vScale:r}=o._cachedMeta,l=o.resolveDataElementOptions(e,n),c=o.getSharedOptions(l),h=o.includeOptions(n,c),d=a.axis,u=r.axis;for(let l=e;l<e+i;l++){const e=t[l],i=!s&&o.getParsed(l),c={},f=c[d]=s?a.getPixelForDecimal(.5):a.getPixelForValue(i[d]),g=c[u]=s?r.getBasePixel():r.getPixelForValue(i[u]);c.skip=isNaN(f)||isNaN(g),h&&(c.options=o.resolveDataElementOptions(l,n),s&&(c.options.radius=0)),o.updateElement(e,l,c,n)}o.updateSharedOptions(c,n,l)}resolveDataElementOptions(t,e){const i=this.getParsed(t);let n=super.resolveDataElementOptions(t,e);n.$shared&&(n=Object.assign({},n,{$shared:!1}));const o=n.radius;return"active"!==e&&(n.radius=0),n.radius+=K(i&&i._custom,o),n}}uo.id="bubble",uo.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},uo.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title:()=>""}}}};class fo extends Ri{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;let o,s;for(o=t,s=t+e;o<s;++o)n._parsed[o]=+i[o]}_getRotation(){return Et(this.options.rotation-90)}_getCircumference(){return Et(this.options.circumference)}_getRotationExtents(){let t=_t,e=-_t;const i=this;for(let n=0;n<i.chart.data.datasets.length;++n)if(i.chart.isDatasetVisible(n)){const o=i.chart.getDatasetMeta(n).controller,s=o._getRotation(),a=o._getCircumference();t=Math.min(t,s),e=Math.max(e,s+a)}return{rotation:t,circumference:e-t}}update(t){const e=this,i=e.chart,{chartArea:n}=i,o=e._cachedMeta,s=o.data,a=e.getMaxBorderWidth()+e.getMaxOffset(s),r=Math.max((Math.min(n.width,n.height)-a)/2,0),l=Math.min(G(e.options.cutout,r),1),c=e._getRingWeight(e.index),{circumference:h,rotation:d}=e._getRotationExtents(),{ratioX:u,ratioY:f,offsetX:g,offsetY:p}=function(t,e,i){let n=1,o=1,s=0,a=0;if(e<_t){const r=t,l=r+e,c=Math.cos(r),h=Math.sin(r),d=Math.cos(l),u=Math.sin(l),f=(t,e,n)=>Ht(t,r,l,!0)?1:Math.max(e,e*i,n,n*i),g=(t,e,n)=>Ht(t,r,l,!0)?-1:Math.min(e,e*i,n,n*i),p=f(0,c,d),m=f(Mt,h,u),x=g(bt,c,d),b=g(bt+Mt,h,u);n=(p-x)/2,o=(m-b)/2,s=-(p+x)/2,a=-(m+b)/2}return{ratioX:n,ratioY:o,offsetX:s,offsetY:a}}(d,h,l),m=(n.width-a)/u,x=(n.height-a)/f,b=Math.max(Math.min(m,x)/2,0),_=Z(e.options.radius,b),y=(_-Math.max(_*l,0))/e._getVisibleDatasetWeightTotal();e.offsetX=g*_,e.offsetY=p*_,o.total=e.calculateTotal(),e.outerRadius=_-y*e._getRingWeightOffset(e.index),e.innerRadius=Math.max(e.outerRadius-y*c,0),e.updateElements(s,0,s.length,t)}_circumference(t,e){const i=this,n=i.options,o=i._cachedMeta,s=i._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||null===o._parsed[t]?0:i.calculateCircumference(o._parsed[t]*s/_t)}updateElements(t,e,i,n){const o=this,s="reset"===n,a=o.chart,r=a.chartArea,l=a.options.animation,c=(r.left+r.right)/2,h=(r.top+r.bottom)/2,d=s&&l.animateScale,u=d?0:o.innerRadius,f=d?0:o.outerRadius,g=o.resolveDataElementOptions(e,n),p=o.getSharedOptions(g),m=o.includeOptions(n,p);let x,b=o._getRotation();for(x=0;x<e;++x)b+=o._circumference(x,s);for(x=e;x<e+i;++x){const e=o._circumference(x,s),i=t[x],a={x:c+o.offsetX,y:h+o.offsetY,startAngle:b,endAngle:b+e,circumference:e,outerRadius:f,innerRadius:u};m&&(a.options=p||o.resolveDataElementOptions(x,n)),b+=e,o.updateElement(i,x,a,n)}o.updateSharedOptions(p,n,g)}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,n=0;for(i=0;i<e.length;i++){const e=t._parsed[i];null!==e&&!isNaN(e)&&this.chart.getDataVisibility(i)&&(n+=Math.abs(e))}return n}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?_t*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],o=zi(e._parsed[t],i.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){const e=this;let i=0;const n=e.chart;let o,s,a,r,l;if(!t)for(o=0,s=n.data.datasets.length;o<s;++o)if(n.isDatasetVisible(o)){a=n.getDatasetMeta(o),t=a.data,r=a.controller,r!==e&&r.configure();break}if(!t)return 0;for(o=0,s=t.length;o<s;++o)l=r.resolveDataElementOptions(o),"inner"!==l.borderAlign&&(i=Math.max(i,l.borderWidth||0,l.hoverBorderWidth||0));return i}getMaxOffset(t){let e=0;for(let i=0,n=t.length;i<n;++i){const t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(K(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}fo.id="doughnut",fo.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",indexAxis:"r"},fo.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(((e,i)=>{const n=t.getDatasetMeta(0).controller.getStyle(i);return{text:e,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,lineWidth:n.borderWidth,hidden:!t.getDataVisibility(i),index:i}})):[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return Y(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class go extends Ri{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this,i=e._cachedMeta,{dataset:n,data:o=[],_dataset:s}=i,a=e.chart._animationsDisabled;let{start:r,count:l}=function(t,e,i){const n=e.length;let o=0,s=n;if(t._sorted){const{iScale:a,_parsed:r}=t,l=a.axis,{min:c,max:h,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(o=Nt(Math.min(oe(r,a.axis,c).lo,i?n:oe(e,l,a.getPixelForValue(c)).lo),0,n-1)),s=u?Nt(Math.max(oe(r,a.axis,h).hi+1,i?0:oe(e,l,a.getPixelForValue(h)).hi+1),o,n)-o:n-o}return{start:o,count:s}}(i,o,a);e._drawStart=r,e._drawCount=l,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,o={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=o,!0;const s=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,o),s}(i)&&(r=0,l=o.length),n._decimated=!!s._decimated,n.points=o;const c=e.resolveDatasetElementOptions(t);e.options.showLine||(c.borderWidth=0),c.segment=e.options.segment,e.updateElement(n,void 0,{animated:!a,options:c},t),e.updateElements(o,r,l,t)}updateElements(t,e,i,n){const o=this,s="reset"===n,{iScale:a,vScale:r,_stacked:l}=o._cachedMeta,c=o.resolveDataElementOptions(e,n),h=o.getSharedOptions(c),d=o.includeOptions(n,h),u=a.axis,f=r.axis,g=o.options.spanGaps,p=Tt(g)?g:Number.POSITIVE_INFINITY,m=o.chart._animationsDisabled||s||"none"===n;let x=e>0&&o.getParsed(e-1);for(let c=e;c<e+i;++c){const e=t[c],i=o.getParsed(c),g=m?e:{},b=$(i[f]),_=g[u]=a.getPixelForValue(i[u],c),y=g[f]=s||b?r.getBasePixel():r.getPixelForValue(l?o.applyStack(r,i,l):i[f],c);g.skip=isNaN(_)||isNaN(y)||b,g.stop=c>0&&i[u]-x[u]>p,g.parsed=i,d&&(g.options=h||o.resolveDataElementOptions(c,n)),m||o.updateElement(e,c,g,n),x=i}o.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this,e=t._cachedMeta,i=e.dataset,n=i.options&&i.options.borderWidth||0,o=e.data||[];if(!o.length)return n;const s=o[0].size(t.resolveDataElementOptions(0)),a=o[o.length-1].size(t.resolveDataElementOptions(o.length-1));return Math.max(n,s,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}go.id="line",go.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},go.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class po extends Ri{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],o=zi(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:o}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this,e=t.chart,i=e.chartArea,n=e.options,o=Math.min(i.right-i.left,i.bottom-i.top),s=Math.max(o/2,0),a=(s-Math.max(n.cutoutPercentage?s/100*n.cutoutPercentage:1,0))/e.getVisibleDatasetCount();t.outerRadius=s-a*t.index,t.innerRadius=t.outerRadius-a}updateElements(t,e,i,n){const o=this,s="reset"===n,a=o.chart,r=o.getDataset(),l=a.options.animation,c=o._cachedMeta.rScale,h=c.xCenter,d=c.yCenter,u=c.getIndexAngle(0)-.5*bt;let f,g=u;const p=360/o.countVisibleElements();for(f=0;f<e;++f)g+=o._computeAngle(f,n,p);for(f=e;f<e+i;f++){const e=t[f];let i=g,m=g+o._computeAngle(f,n,p),x=a.getDataVisibility(f)?c.getDistanceFromCenterForValue(r.data[f]):0;g=m,s&&(l.animateScale&&(x=0),l.animateRotate&&(i=m=u));const b={x:h,y:d,innerRadius:0,outerRadius:x,startAngle:i,endAngle:m,options:o.resolveDataElementOptions(f,n)};o.updateElement(e,f,b,n)}}countVisibleElements(){const t=this.getDataset(),e=this._cachedMeta;let i=0;return e.data.forEach(((e,n)=>{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&i++})),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?Et(this.resolveDataElementOptions(t,e).angle||i):0}}po.id="polarArea",po.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},po.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(((e,i)=>{const n=t.getDatasetMeta(0).controller.getStyle(i);return{text:e,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,lineWidth:n.borderWidth,hidden:!t.getDataVisibility(i),index:i}})):[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class mo extends fo{}mo.id="pie",mo.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class xo extends Ri{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this,i=e._cachedMeta,n=i.dataset,o=i.data||[],s=i.iScale.getLabels();if(n.points=o,"resize"!==t){const i=e.resolveDatasetElementOptions(t);e.options.showLine||(i.borderWidth=0);const a={_loop:!0,_fullLoop:s.length===o.length,options:i};e.updateElement(n,void 0,a,t)}e.updateElements(o,0,o.length,t)}updateElements(t,e,i,n){const o=this,s=o.getDataset(),a=o._cachedMeta.rScale,r="reset"===n;for(let l=e;l<e+i;l++){const e=t[l],i=o.resolveDataElementOptions(l,n),c=a.getPointPositionForValue(l,s.data[l]),h=r?a.xCenter:c.x,d=r?a.yCenter:c.y,u={x:h,y:d,angle:c.angle,skip:isNaN(h)||isNaN(d),options:i};o.updateElement(e,l,u,n)}}}xo.id="radar",xo.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},xo.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class bo extends go{}bo.id="scatter",bo.defaults={showLine:!1,fill:!1},bo.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var _o=Object.freeze({__proto__:null,BarController:ho,BubbleController:uo,DoughnutController:fo,LineController:go,PolarAreaController:po,PieController:mo,RadarController:xo,ScatterController:bo});function yo(t,e,i){const{startAngle:n,pixelMargin:o,x:s,y:a,outerRadius:r,innerRadius:l}=e;let c=o/r;t.beginPath(),t.arc(s,a,r,n-c,i+c),l>o?(c=o/l,t.arc(s,a,l,i+c,n-c,!0)):t.arc(s,a,o,i+Mt,n-Mt),t.closePath(),t.clip()}function vo(t,e,i,n){const o=Re(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const s=(i-e)/2,a=Math.min(s,n*e/2),r=t=>{const e=(i-Math.min(s,t))*n/2;return Nt(t,0,Math.min(s,e))};return{outerStart:r(o.outerStart),outerEnd:r(o.outerEnd),innerStart:Nt(o.innerStart,0,a),innerEnd:Nt(o.innerEnd,0,a)}}function wo(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function Mo(t,e,i,n){const{x:o,y:s,startAngle:a,pixelMargin:r,innerRadius:l}=e,c=Math.max(e.outerRadius+i-r,0),h=l>0?l+i+r:0,d=n-a,u=(d-Math.max(.001,d*c-i/bt)/c)/2,f=a+u,g=n-u,{outerStart:p,outerEnd:m,innerStart:x,innerEnd:b}=vo(e,h,c,g-f),_=c-p,y=c-m,v=f+p/_,w=g-m/y,M=h+x,k=h+b,S=f+x/M,P=g-b/k;if(t.beginPath(),t.arc(o,s,c,v,w),m>0){const e=wo(y,w,o,s);t.arc(e.x,e.y,m,w,g+Mt)}const D=wo(k,g,o,s);if(t.lineTo(D.x,D.y),b>0){const e=wo(k,P,o,s);t.arc(e.x,e.y,b,g+Mt,P+Math.PI)}if(t.arc(o,s,h,g-b/h,f+x/h,!0),x>0){const e=wo(M,S,o,s);t.arc(e.x,e.y,x,S+Math.PI,f-Mt)}const C=wo(_,f,o,s);if(t.lineTo(C.x,C.y),p>0){const e=wo(_,v,o,s);t.arc(e.x,e.y,p,f-Mt,v)}t.closePath()}function ko(t,e,i,n){const{options:o}=e,s="inner"===o.borderAlign;o.borderWidth&&(s?(t.lineWidth=2*o.borderWidth,t.lineJoin="round"):(t.lineWidth=o.borderWidth,t.lineJoin="bevel"),e.fullCircles&&function(t,e,i){const{x:n,y:o,startAngle:s,pixelMargin:a,fullCircles:r}=e,l=Math.max(e.outerRadius-a,0),c=e.innerRadius+a;let h;for(i&&yo(t,e,s+_t),t.beginPath(),t.arc(n,o,c,s+_t,s,!0),h=0;h<r;++h)t.stroke();for(t.beginPath(),t.arc(n,o,l,s,s+_t),h=0;h<r;++h)t.stroke()}(t,e,s),s&&yo(t,e,n),Mo(t,e,i,n),t.stroke())}class So extends Ei{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:o,distance:s}=Ft(n,{x:t,y:e}),{startAngle:a,endAngle:r,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i);return(h>=_t||Ht(o,a,r))&&(s>=l&&s<=c)}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:o,innerRadius:s,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),r=(n+o)/2,l=(s+a)/2;return{x:e+Math.cos(r)*l,y:i+Math.sin(r)*l}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const e=this,{options:i,circumference:n}=e,o=(i.offset||0)/2;if(e.pixelMargin="inner"===i.borderAlign?.33:0,e.fullCircles=n>_t?Math.floor(n/_t):0,0===n||e.innerRadius<0||e.outerRadius<0)return;t.save();let s=0;if(o){s=o/2;const i=(e.startAngle+e.endAngle)/2;t.translate(Math.cos(i)*s,Math.sin(i)*s),e.circumference>=bt&&(s=o)}t.fillStyle=i.backgroundColor,t.strokeStyle=i.borderColor;const a=function(t,e,i){const{fullCircles:n,startAngle:o,circumference:s}=e;let a=e.endAngle;if(n){Mo(t,e,i,o+_t);for(let e=0;e<n;++e)t.fill();isNaN(s)||(a=o+s%_t,s%_t==0&&(a+=_t))}return Mo(t,e,i,a),t.fill(),a}(t,e,s);ko(t,e,s,a),t.restore()}}function Po(t,e,i=e){t.lineCap=K(i.borderCapStyle,e.borderCapStyle),t.setLineDash(K(i.borderDash,e.borderDash)),t.lineDashOffset=K(i.borderDashOffset,e.borderDashOffset),t.lineJoin=K(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=K(i.borderWidth,e.borderWidth),t.strokeStyle=K(i.borderColor,e.borderColor)}function Do(t,e,i){t.lineTo(i.x,i.y)}function Co(t,e,i={}){const n=t.length,{start:o=0,end:s=n-1}=i,{start:a,end:r}=e,l=Math.max(o,a),c=Math.min(s,r),h=o<a&&s<a||o>r&&s>r;return{count:n,start:l,loop:e.loop,ilen:c<l&&!h?n+c-l:c-l}}function Oo(t,e,i,n){const{points:o,options:s}=e,{count:a,start:r,loop:l,ilen:c}=Co(o,i,n),h=function(t){return t.stepped?Jt:t.tension||"monotone"===t.cubicInterpolationMode?te:Do}(s);let d,u,f,{move:g=!0,reverse:p}=n||{};for(d=0;d<=c;++d)u=o[(r+(p?c-d:d))%a],u.skip||(g?(t.moveTo(u.x,u.y),g=!1):h(t,f,u,p,s.stepped),f=u);return l&&(u=o[(r+(p?c:0))%a],h(t,f,u,p,s.stepped)),!!l}function To(t,e,i,n){const o=e.points,{count:s,start:a,ilen:r}=Co(o,i,n),{move:l=!0,reverse:c}=n||{};let h,d,u,f,g,p,m=0,x=0;const b=t=>(a+(c?r-t:t))%s,_=()=>{f!==g&&(t.lineTo(m,g),t.lineTo(m,f),t.lineTo(m,p))};for(l&&(d=o[b(0)],t.moveTo(d.x,d.y)),h=0;h<=r;++h){if(d=o[b(h)],d.skip)continue;const e=d.x,i=d.y,n=0|e;n===u?(i<f?f=i:i>g&&(g=i),m=(x*m+e)/++x):(_(),t.lineTo(e,i),u=n,x=0,f=g=i),p=i}_()}function Ao(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?To:Oo}So.id="arc",So.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,angle:void 0},So.defaultRoutes={backgroundColor:"backgroundColor"};const Lo="function"==typeof Path2D;function Ro(t,e,i,n){Lo&&1===e.segments.length?function(t,e,i,n){let o=e._path;o||(o=e._path=new Path2D,e.path(o,i,n)&&o.closePath()),Po(t,e.options),t.stroke(o)}(t,e,i,n):function(t,e,i,n){const{segments:o,options:s}=e,a=Ao(e);for(const r of o)Po(t,s,r.style),t.beginPath(),a(t,e,r,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}class Eo extends Ei{constructor(t){super(),this.animated=!0,this.options=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this,n=i.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!i._pointsUpdated){const o=n.spanGaps?i._loop:i._fullLoop;gn(i._points,n,t,o,e),i._pointsUpdated=!0}}set points(t){const e=this;e._points=t,delete e._segments,delete e._path,e._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Sn(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this,n=i.options,o=t[e],s=i.points,a=kn(i,{property:e,start:o,end:o});if(!a.length)return;const r=[],l=function(t){return t.stepped?mn:t.tension||"monotone"===t.cubicInterpolationMode?xn:pn}(n);let c,h;for(c=0,h=a.length;c<h;++c){const{start:i,end:h}=a[c],d=s[i],u=s[h];if(d===u){r.push(d);continue}const f=l(d,u,Math.abs((o-d[e])/(u[e]-d[e])),n.stepped);f[e]=t[e],r.push(f)}return 1===r.length?r[0]:r}pathSegment(t,e,i){return Ao(this)(t,this,e,i)}path(t,e,i){const n=this,o=n.segments,s=Ao(n);let a=n._loop;e=e||0,i=i||n.points.length-e;for(const r of o)a&=s(t,n,r,{start:e,end:e+i-1});return!!a}draw(t,e,i,n){const o=this,s=o.options||{};(o.points||[]).length&&s.borderWidth&&(t.save(),Ro(t,o,i,n),t.restore(),o.animated&&(o._pointsUpdated=!1,o._path=void 0))}}function Io(t,e,i,n){const o=t.options,{[i]:s}=t.getProps([i],n);return Math.abs(e-s)<o.radius+o.hitRadius}Eo.id="line",Eo.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},Eo.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},Eo.descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};class zo extends Ei{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:o,y:s}=this.getProps(["x","y"],i);return Math.pow(t-o,2)+Math.pow(e-s,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,e){return Io(this,t,"x",e)}inYRange(t,e){return Io(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;e=Math.max(e,e&&t.hoverRadius||0);return 2*(e+(e&&t.borderWidth||0))}draw(t){const e=this,i=e.options;e.skip||i.radius<.1||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,Kt(t,i,e.x,e.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function Fo(t,e){const{x:i,y:n,base:o,width:s,height:a}=t.getProps(["x","y","base","width","height"],e);let r,l,c,h,d;return t.horizontal?(d=a/2,r=Math.min(i,o),l=Math.max(i,o),c=n-d,h=n+d):(d=s/2,r=i-d,l=i+d,c=Math.min(n,o),h=Math.max(n,o)),{left:r,top:c,right:l,bottom:h}}function Vo(t){let e=t.options.borderSkipped;const i={};return e?(e=t.horizontal?Bo(e,"left","right",t.base>t.x):Bo(e,"bottom","top",t.base<t.y),i[e]=!0,i):i}function Bo(t,e,i,n){var o,s,a;return n?(a=i,t=Wo(t=(o=t)===(s=e)?a:o===a?s:o,i,e)):t=Wo(t,e,i),t}function Wo(t,e,i){return"start"===t?e:"end"===t?i:t}function Ho(t,e,i,n){return t?0:Math.max(Math.min(e,n),i)}function No(t){const e=Fo(t),i=e.right-e.left,n=e.bottom-e.top,o=function(t,e,i){const n=t.options.borderWidth,o=Vo(t),s=Ee(n);return{t:Ho(o.top,s.top,0,i),r:Ho(o.right,s.right,0,e),b:Ho(o.bottom,s.bottom,0,i),l:Ho(o.left,s.left,0,e)}}(t,i/2,n/2),s=function(t,e,i){const{enableBorderRadius:n}=t.getProps(["enableBorderRadius"]),o=t.options.borderRadius,s=Ie(o),a=Math.min(e,i),r=Vo(t),l=n||U(o);return{topLeft:Ho(!l||r.top||r.left,s.topLeft,0,a),topRight:Ho(!l||r.top||r.right,s.topRight,0,a),bottomLeft:Ho(!l||r.bottom||r.left,s.bottomLeft,0,a),bottomRight:Ho(!l||r.bottom||r.right,s.bottomRight,0,a)}}(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n,radius:s},inner:{x:e.left+o.l,y:e.top+o.t,w:i-o.l-o.r,h:n-o.t-o.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,s.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(o.b,o.r))}}}}function jo(t,e,i,n){const o=null===e,s=null===i,a=t&&!(o&&s)&&Fo(t,n);return a&&(o||e>=a.left&&e<=a.right)&&(s||i>=a.top&&i<=a.bottom)}function $o(t,e){t.rect(e.x,e.y,e.w,e.h)}zo.id="point",zo.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},zo.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Yo extends Ei{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,t&&Object.assign(this,t)}draw(t){const e=this.options,{inner:i,outer:n}=No(this),o=(s=n.radius).topLeft||s.topRight||s.bottomLeft||s.bottomRight?ie:$o;var s;t.save(),n.w===i.w&&n.h===i.h||(t.beginPath(),o(t,n),t.clip(),o(t,i),t.fillStyle=e.borderColor,t.fill("evenodd")),t.beginPath(),o(t,i),t.fillStyle=e.backgroundColor,t.fill(),t.restore()}inRange(t,e,i){return jo(this,t,e,i)}inXRange(t,e){return jo(this,t,null,e)}inYRange(t,e){return jo(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+n)/2:e,y:o?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}Yo.id="bar",Yo.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,enableBorderRadius:!0,pointStyle:void 0},Yo.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Uo=Object.freeze({__proto__:null,ArcElement:So,LineElement:Eo,PointElement:zo,BarElement:Yo});function Xo(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function qo(t){t.data.datasets.forEach((t=>{Xo(t)}))}var Ko={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void qo(t);const n=t.width;t.data.datasets.forEach(((e,o)=>{const{_data:s,indexAxis:a}=e,r=t.getDatasetMeta(o),l=s||e.data;if("y"===Ve([a,t.options.indexAxis]))return;if("line"!==r.type)return;const c=t.scales[r.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let h,{start:d,count:u}=function(t,e){const i=e.length;let n,o=0;const{iScale:s}=t,{min:a,max:r,minDefined:l,maxDefined:c}=s.getUserBounds();return l&&(o=Nt(oe(e,s.axis,a).lo,0,i-1)),n=c?Nt(oe(e,s.axis,r).hi+1,o,i)-o:i-o,{start:o,count:n}}(r,l);if(u<=4*n)Xo(e);else{switch($(s)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":h=function(t,e,i,n,o){const s=o.samples||n;if(s>=i)return t.slice(e,e+i);const a=[],r=(i-2)/(s-2);let l=0;const c=e+i-1;let h,d,u,f,g,p=e;for(a[l++]=t[p],h=0;h<s-2;h++){let n,o=0,s=0;const c=Math.floor((h+1)*r)+1+e,m=Math.min(Math.floor((h+2)*r)+1,i)+e,x=m-c;for(n=c;n<m;n++)o+=t[n].x,s+=t[n].y;o/=x,s/=x;const b=Math.floor(h*r)+1+e,_=Math.floor((h+1)*r)+1+e,{x:y,y:v}=t[p];for(u=f=-1,n=b;n<_;n++)f=.5*Math.abs((y-o)*(t[n].y-v)-(y-t[n].x)*(s-v)),f>u&&(u=f,d=t[n],g=n);a[l++]=d,p=g}return a[l++]=t[c],a}(l,d,u,n,i);break;case"min-max":h=function(t,e,i,n){let o,s,a,r,l,c,h,d,u,f,g=0,p=0;const m=[],x=e+i-1,b=t[e].x,_=t[x].x-b;for(o=e;o<e+i;++o){s=t[o],a=(s.x-b)/_*n,r=s.y;const e=0|a;if(e===l)r<u?(u=r,c=o):r>f&&(f=r,h=o),g=(p*g+s.x)/++p;else{const i=o-1;if(!$(c)&&!$(h)){const e=Math.min(c,h),n=Math.max(c,h);e!==d&&e!==i&&m.push({...t[e],x:g}),n!==d&&n!==i&&m.push({...t[n],x:g})}o>0&&i!==d&&m.push(t[i]),m.push(s),l=e,p=0,u=f=r,c=h=d=o}}return m}(l,d,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=h}}))},destroy(t){qo(t)}};function Go(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=K(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t);if(U(n))return!isNaN(n.value)&&n;let o=parseFloat(n);return X(o)&&Math.floor(o)===o?("-"!==n[0]&&"+"!==n[0]||(o=e+o),!(o===e||o<0||o>=i)&&o):["origin","start","end","stack"].indexOf(n)>=0&&n}class Zo{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:o,radius:s}=this;return e=e||{start:0,end:_t},t.arc(n,o,s,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,o=t.angle;return{x:e+Math.cos(o)*n,y:i+Math.sin(o)*n,angle:o}}}function Qo(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,n=e.options,o=e.getLabels().length,s=[],a=n.reverse?e.max:e.min,r=n.reverse?e.min:e.max;let l,c,h;if(h="start"===i?a:"end"===i?r:U(i)?i.value:e.getBaseValue(),n.grid.circular)return c=e.getPointPositionForValue(0,a),new Zo({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(h)});for(l=0;l<o;++l)s.push(e.getPointPositionForValue(l,h));return s}(t):function(t){const{scale:e={},fill:i}=t;let n,o=null;return"start"===i?o=e.bottom:"end"===i?o=e.top:U(i)?o=e.getPixelForValue(i.value):e.getBasePixel&&(o=e.getBasePixel()),X(o)?(n=e.isHorizontal(),{x:n?o:null,y:n?null:o}):null}(t)}function Jo(t){const{chart:e,scale:i,index:n,line:o}=t,s=[],a=o.segments,r=o.points,l=function(t,e){const i=[],n=t.getSortedVisibleDatasetMetas();for(let t=0;t<n.length;t++){const o=n[t];if(o.index===e)break;ts(o)&&i.unshift(o.dataset)}return i}(e,n);l.push(ns({x:null,y:i.bottom},o));for(let t=0;t<a.length;t++){const e=a[t];for(let t=e.start;t<=e.end;t++)es(s,r[t],l)}return new Eo({points:s,options:{}})}const ts=t=>"line"===t.type&&!t.hidden;function es(t,e,i){const n=[];for(let o=0;o<i.length;o++){const s=i[o],{first:a,last:r,point:l}=is(s,e,"x");if(!(!l||a&&r))if(a)n.unshift(l);else if(t.push(l),!r)break}t.push(...n)}function is(t,e,i){const n=t.interpolate(e,i);if(!n)return{};const o=n[i],s=t.segments,a=t.points;let r=!1,l=!1;for(let t=0;t<s.length;t++){const e=s[t],n=a[e.start][i],c=a[e.end][i];if(o>=n&&o<=c){r=o===n,l=o===c;break}}return{first:r,last:l,point:n}}function ns(t,e){let i=[],n=!1;return Y(t)?(n=!0,i=t):i=function(t,e){const{x:i=null,y:n=null}=t||{},o=e.points,s=[];return e.segments.forEach((t=>{const e=o[t.start],a=o[t.end];null!==n?(s.push({x:e.x,y:n}),s.push({x:a.x,y:n})):null!==i&&(s.push({x:i,y:e.y}),s.push({x:i,y:a.y}))})),s}(t,e),i.length?new Eo({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function os(t,e,i){let n=t[e].fill;const o=[e];let s;if(!i)return n;for(;!1!==n&&-1===o.indexOf(n);){if(!X(n))return n;if(s=t[n],!s)return!1;if(s.visible)return n;o.push(n),n=s.fill}return!1}function ss(t,e,i){t.beginPath(),e.path(t),t.lineTo(e.last().x,i),t.lineTo(e.first().x,i),t.closePath(),t.clip()}function as(t,e,i,n){if(n)return;let o=e[t],s=i[t];return"angle"===t&&(o=Wt(o),s=Wt(s)),{property:t,start:o,end:s}}function rs(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function ls(t,e,i){const{top:n,bottom:o}=e.chart.chartArea,{property:s,start:a,end:r}=i||{};"x"===s&&(t.beginPath(),t.rect(a,n,r-a,o-n),t.clip())}function cs(t,e,i,n){const o=e.interpolate(i,n);o&&t.lineTo(o.x,o.y)}function hs(t,e){const{line:i,target:n,property:o,color:s,scale:a}=e,r=function(t,e,i){const n=t.segments,o=t.points,s=e.points,a=[];for(const t of n){const n=as(i,o[t.start],o[t.end],t.loop);if(!e.segments){a.push({source:t,target:n,start:o[t.start],end:o[t.end]});continue}const r=kn(e,n);for(const e of r){const r=as(i,s[e.start],s[e.end],e.loop),l=Mn(t,o,r);for(const t of l)a.push({source:t,target:e,start:{[i]:rs(n,r,"start",Math.max)},end:{[i]:rs(n,r,"end",Math.min)}})}}return a}(i,n,o);for(const{source:e,target:l,start:c,end:h}of r){const{style:{backgroundColor:r=s}={}}=e;t.save(),t.fillStyle=r,ls(t,a,as(o,c,h)),t.beginPath();const d=!!i.pathSegment(t,e);d?t.closePath():cs(t,n,h,o);const u=!!n.pathSegment(t,l,{move:d,reverse:!0}),f=d&&u;f||cs(t,n,c,o),t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function ds(t,e,i){const n=function(t){const{chart:e,fill:i,line:n}=t;if(X(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return Jo(t);const o=Qo(t);return o instanceof Zo?o:ns(o,n)}(e),{line:o,scale:s,axis:a}=e,r=o.options,l=r.fill,c=r.backgroundColor,{above:h=c,below:d=c}=l||{};n&&o.points.length&&(Zt(t,i),function(t,e){const{line:i,target:n,above:o,below:s,area:a,scale:r}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&s!==o&&(ss(t,n,a.top),hs(t,{line:i,target:n,color:o,scale:r,property:l}),t.restore(),t.save(),ss(t,n,a.bottom)),hs(t,{line:i,target:n,color:s,scale:r,property:l}),t.restore()}(t,{line:o,target:n,above:h,below:d,area:i,scale:s,axis:a}),Qt(t))}var us={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,o=[];let s,a,r,l;for(a=0;a<n;++a)s=t.getDatasetMeta(a),r=s.dataset,l=null,r&&r.options&&r instanceof Eo&&(l={visible:t.isDatasetVisible(a),index:a,fill:Go(r,a,n),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:r}),s.$filler=l,o.push(l);for(a=0;a<n;++a)l=o[a],l&&!1!==l.fill&&(l.fill=os(o,a,i.propagate))},beforeDraw(t,e,i){const n="beforeDraw"===i.drawTime,o=t.getSortedVisibleDatasetMetas(),s=t.chartArea;for(let e=o.length-1;e>=0;--e){const i=o[e].$filler;i&&(i.line.updateControlPoints(s,i.axis),n&&ds(t.ctx,i,s))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&ds(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&ds(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const fs=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class gs extends Ei{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){const n=this;n.maxWidth=t,n.maxHeight=e,n._margins=i,n.setDimensions(),n.buildLabels(),n.fit()}setDimensions(){const t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height)}buildLabels(){const t=this,e=t.options.labels||{};let i=Q(e.generateLabels,[t.chart],t)||[];e.filter&&(i=i.filter((i=>e.filter(i,t.chart.data)))),e.sort&&(i=i.sort(((i,n)=>e.sort(i,n,t.chart.data)))),t.options.reverse&&i.reverse(),t.legendItems=i}fit(){const t=this,{options:e,ctx:i}=t;if(!e.display)return void(t.width=t.height=0);const n=e.labels,o=Fe(n.font),s=o.size,a=t._computeTitleHeight(),{boxWidth:r,itemHeight:l}=fs(n,s);let c,h;i.font=o.string,t.isHorizontal()?(c=t.maxWidth,h=t._fitRows(a,s,r,l)+10):(h=t.maxHeight,c=t._fitCols(a,s,r,l)+10),t.width=Math.min(c,e.maxWidth||t.maxWidth),t.height=Math.min(h,e.maxHeight||t.maxHeight)}_fitRows(t,e,i,n){const o=this,{ctx:s,maxWidth:a,options:{labels:{padding:r}}}=o,l=o.legendHitBoxes=[],c=o.lineWidths=[0],h=n+r;let d=t;s.textAlign="left",s.textBaseline="middle";let u=-1,f=-h;return o.legendItems.forEach(((t,o)=>{const g=i+e/2+s.measureText(t.text).width;(0===o||c[c.length-1]+g+2*r>a)&&(d+=h,c[c.length-(o>0?0:1)]=0,f+=h,u++),l[o]={left:0,top:f,row:u,width:g,height:n},c[c.length-1]+=g+r})),d}_fitCols(t,e,i,n){const o=this,{ctx:s,maxHeight:a,options:{labels:{padding:r}}}=o,l=o.legendHitBoxes=[],c=o.columnSizes=[],h=a-t;let d=r,u=0,f=0,g=0,p=0,m=0;return o.legendItems.forEach(((t,o)=>{const a=i+e/2+s.measureText(t.text).width;o>0&&f+e+2*r>h&&(d+=u+r,c.push({width:u,height:f}),g+=u+r,m++,p=0,u=f=0),u=Math.max(u,a),f+=e+r,l[o]={left:g,top:p,col:m,width:a,height:n},p+=n+r})),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){const t=this;if(!t.options.display)return;const e=t._computeTitleHeight(),{legendHitBoxes:i,options:{align:n,labels:{padding:s}}}=t;if(this.isHorizontal()){let a=0,r=o(n,t.left+s,t.right-t.lineWidths[a]);for(const l of i)a!==l.row&&(a=l.row,r=o(n,t.left+s,t.right-t.lineWidths[a])),l.top+=t.top+e+s,l.left=r,r+=l.width+s}else{let a=0,r=o(n,t.top+e+s,t.bottom-t.columnSizes[a].height);for(const l of i)l.col!==a&&(a=l.col,r=o(n,t.top+e+s,t.bottom-t.columnSizes[a].height)),l.top=r,l.left+=t.left+s,r+=l.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){const t=this;if(t.options.display){const e=t.ctx;Zt(e,t),t._draw(),Qt(e)}}_draw(){const t=this,{options:e,columnSizes:i,lineWidths:n,ctx:a}=t,{align:r,labels:l}=e,c=xt.color,h=bn(e.rtl,t.left,t.width),d=Fe(l.font),{color:u,padding:f}=l,g=d.size,p=g/2;let m;t.drawTitle(),a.textAlign=h.textAlign("left"),a.textBaseline="middle",a.lineWidth=.5,a.font=d.string;const{boxWidth:x,boxHeight:b,itemHeight:_}=fs(l,g),y=t.isHorizontal(),v=this._computeTitleHeight();m=y?{x:o(r,t.left+f,t.right-n[0]),y:t.top+f+v,line:0}:{x:t.left+f,y:o(r,t.top+v+f,t.bottom-i[0].height),line:0},_n(t.ctx,e.textDirection);const w=_+f;t.legendItems.forEach(((e,M)=>{a.strokeStyle=e.fontColor||u,a.fillStyle=e.fontColor||u;const k=a.measureText(e.text).width,S=h.textAlign(e.textAlign||(e.textAlign=l.textAlign)),P=x+g/2+k;let D=m.x,C=m.y;h.setWidth(t.width),y?M>0&&D+P+f>t.right&&(C=m.y+=w,m.line++,D=m.x=o(r,t.left+f,t.right-n[m.line])):M>0&&C+w>t.bottom&&(D=m.x=D+i[m.line].width+f,m.line++,C=m.y=o(r,t.top+v+f,t.bottom-i[m.line].height));!function(t,e,i){if(isNaN(x)||x<=0||isNaN(b)||b<0)return;a.save();const n=K(i.lineWidth,1);if(a.fillStyle=K(i.fillStyle,c),a.lineCap=K(i.lineCap,"butt"),a.lineDashOffset=K(i.lineDashOffset,0),a.lineJoin=K(i.lineJoin,"miter"),a.lineWidth=n,a.strokeStyle=K(i.strokeStyle,c),a.setLineDash(K(i.lineDash,[])),l.usePointStyle){const o={radius:x*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:n},s=h.xPlus(t,x/2);Kt(a,o,s,e+p)}else{const o=e+Math.max((g-b)/2,0),s=h.leftForLtr(t,x),r=Ie(i.borderRadius);a.beginPath(),Object.values(r).some((t=>0!==t))?ie(a,{x:s,y:o,w:x,h:b,radius:r}):a.rect(s,o,x,b),a.fill(),0!==n&&a.stroke()}a.restore()}(h.x(D),C,e),D=s(S,D+x+p,t.right),function(t,e,i){ee(a,i.text,t,e+_/2,d,{strikethrough:i.hidden,textAlign:i.textAlign})}(h.x(D),C,e),y?m.x+=P+f:m.y+=w})),yn(t.ctx,e.textDirection)}drawTitle(){const t=this,e=t.options,i=e.title,s=Fe(i.font),a=ze(i.padding);if(!i.display)return;const r=bn(e.rtl,t.left,t.width),l=t.ctx,c=i.position,h=s.size/2,d=a.top+h;let u,f=t.left,g=t.width;if(this.isHorizontal())g=Math.max(...t.lineWidths),u=t.top+d,f=o(e.align,f,t.right-g);else{const i=t.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);u=d+o(e.align,t.top,t.bottom-i-e.labels.padding-t._computeTitleHeight())}const p=o(c,f,f+g);l.textAlign=r.textAlign(n(c)),l.textBaseline="middle",l.strokeStyle=i.color,l.fillStyle=i.color,l.font=s.string,ee(l,i.text,p,u,s)}_computeTitleHeight(){const t=this.options.title,e=Fe(t.font),i=ze(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){const i=this;let n,o,s;if(t>=i.left&&t<=i.right&&e>=i.top&&e<=i.bottom)for(s=i.legendHitBoxes,n=0;n<s.length;++n)if(o=s[n],t>=o.left&&t<=o.left+o.width&&e>=o.top&&e<=o.top+o.height)return i.legendItems[n];return null}handleEvent(t){const e=this,i=e.options;if(!function(t,e){if("mousemove"===t&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,i))return;const n=e._getLegendItemAt(t.x,t.y);if("mousemove"===t.type){const a=e._hoveredItem,r=(s=n,null!==(o=a)&&null!==s&&o.datasetIndex===s.datasetIndex&&o.index===s.index);a&&!r&&Q(i.onLeave,[t,a,e],e),e._hoveredItem=n,n&&!r&&Q(i.onHover,[t,n,e],e)}else n&&Q(i.onClick,[t,n,e],e);var o,s}}var ps={id:"legend",_element:gs,start(t,e,i){const n=t.legend=new gs({ctx:t.ctx,options:i,chart:t});Ge.configure(t,n,i),Ge.addBox(t,n)},stop(t){Ge.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;Ge.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,o=i.chart;o.isDatasetVisible(n)?(o.hide(n),e.hidden=!0):(o.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:o,color:s}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const a=t.controller.getStyle(i?0:void 0),r=ze(a.borderWidth);return{text:e[t.index].label,fillStyle:a.backgroundColor,fontColor:s,hidden:!t.visible,lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:(r.width+r.height)/4,strokeStyle:a.borderColor,pointStyle:n||a.pointStyle,rotation:a.rotation,textAlign:o||a.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class ms extends Ei{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this,n=i.options;if(i.left=0,i.top=0,!n.display)return void(i.width=i.height=i.right=i.bottom=0);i.width=i.right=t,i.height=i.bottom=e;const o=Y(n.text)?n.text.length:1;i._padding=ze(n.padding);const s=o*Fe(n.font).lineHeight+i._padding.height;i.isHorizontal()?i.height=s:i.width=s}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:s,options:a}=this,r=a.align;let l,c,h,d=0;return this.isHorizontal()?(c=o(r,i,s),h=e+t,l=s-i):("left"===a.position?(c=i+t,h=o(r,n,e),d=-.5*bt):(c=s-t,h=o(r,e,n),d=.5*bt),l=n-e),{titleX:c,titleY:h,maxWidth:l,rotation:d}}draw(){const t=this,e=t.ctx,i=t.options;if(!i.display)return;const o=Fe(i.font),s=o.lineHeight/2+t._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=t._drawArgs(s);ee(e,i.text,0,0,o,{color:i.color,maxWidth:l,rotation:c,textAlign:n(i.align),textBaseline:"middle",translation:[a,r]})}}var xs={id:"title",_element:ms,start(t,e,i){!function(t,e){const i=new ms({ctx:t.ctx,options:e,chart:t});Ge.configure(t,i,e),Ge.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;Ge.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;Ge.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const bs={average(t){if(!t.length)return!1;let e,i,n=0,o=0,s=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();n+=t.x,o+=t.y,++s}}return{x:n/s,y:o/s}},nearest(t,e){if(!t.length)return!1;let i,n,o,s=e.x,a=e.y,r=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){const n=t[i].element;if(n&&n.hasValue()){const t=Vt(e,n.getCenterPoint());t<r&&(r=t,o=n)}}if(o){const t=o.tooltipPosition();s=t.x,a=t.y}return{x:s,y:a}}};function _s(t,e){return e&&(Y(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function ys(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function vs(t,e){const{element:i,datasetIndex:n,index:o}=e,s=t.getDatasetMeta(n).controller,{label:a,value:r}=s.getLabelAndValue(o);return{chart:t,label:a,parsed:s.getParsed(o),raw:t.data.datasets[n].data[o],formattedValue:r,dataset:s.getDataset(),dataIndex:o,datasetIndex:n,element:i}}function ws(t,e){const i=t._chart.ctx,{body:n,footer:o,title:s}=t,{boxWidth:a,boxHeight:r}=e,l=Fe(e.bodyFont),c=Fe(e.titleFont),h=Fe(e.footerFont),d=s.length,u=o.length,f=n.length,g=ze(e.padding);let p=g.height,m=0,x=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(x+=t.beforeBody.length+t.afterBody.length,d&&(p+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),x){p+=f*(e.displayColors?Math.max(r,l.lineHeight):l.lineHeight)+(x-f)*l.lineHeight+(x-1)*e.bodySpacing}u&&(p+=e.footerMarginTop+u*h.lineHeight+(u-1)*e.footerSpacing);let b=0;const _=function(t){m=Math.max(m,i.measureText(t).width+b)};return i.save(),i.font=c.string,J(t.title,_),i.font=l.string,J(t.beforeBody.concat(t.afterBody),_),b=e.displayColors?a+2:0,J(n,(t=>{J(t.before,_),J(t.lines,_),J(t.after,_)})),b=0,i.font=h.string,J(t.footer,_),i.restore(),m+=g.width,{width:m,height:p}}function Ms(t,e,i,n){const{x:o,width:s}=i,{width:a,chartArea:{left:r,right:l}}=t;let c="center";return"center"===n?c=o<=(r+l)/2?"left":"right":o<=s/2?c="left":o>=a-s/2&&(c="right"),function(t,e,i,n){const{x:o,width:s}=n,a=i.caretSize+i.caretPadding;return"left"===t&&o+s+a>e.width||"right"===t&&o-s-a<0||void 0}(c,t,e,i)&&(c="center"),c}function ks(t,e,i){const n=e.yAlign||function(t,e){const{y:i,height:n}=e;return i<n/2?"top":i>t.height-n/2?"bottom":"center"}(t,i);return{xAlign:e.xAlign||Ms(t,e,i,n),yAlign:n}}function Ss(t,e,i,n){const{caretSize:o,caretPadding:s,cornerRadius:a}=t,{xAlign:r,yAlign:l}=i,c=o+s,h=a+s;let d=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,r);const u=function(t,e,i){let{y:n,height:o}=t;return"top"===e?n+=i:n-="bottom"===e?o+i:o/2,n}(e,l,c);return"center"===l?"left"===r?d+=c:"right"===r&&(d-=c):"left"===r?d-=h:"right"===r&&(d+=h),{x:Nt(d,0,n.width-e.width),y:Nt(u,0,n.height-e.height)}}function Ps(t,e,i){const n=ze(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function Ds(t){return _s([],ys(t))}function Cs(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class Os extends Ei{constructor(t){super(),this.opacity=0,this._active=[],this._chart=t._chart,this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this,e=t._cachedAnimations;if(e)return e;const i=t._chart,n=t.options.setContext(t.getContext()),o=n.enabled&&i.options.animation&&n.animations,s=new vi(t._chart,o);return o._cacheable&&(t._cachedAnimations=Object.freeze(s)),s}getContext(){const t=this;return t.$context||(t.$context=(e=t._chart.getContext(),i=t,n=t._tooltipItems,Object.assign(Object.create(e),{tooltip:i,tooltipItems:n,type:"tooltip"})));var e,i,n}getTitle(t,e){const i=this,{callbacks:n}=e,o=n.beforeTitle.apply(i,[t]),s=n.title.apply(i,[t]),a=n.afterTitle.apply(i,[t]);let r=[];return r=_s(r,ys(o)),r=_s(r,ys(s)),r=_s(r,ys(a)),r}getBeforeBody(t,e){return Ds(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const i=this,{callbacks:n}=e,o=[];return J(t,(t=>{const e={before:[],lines:[],after:[]},s=Cs(n,t);_s(e.before,ys(s.beforeLabel.call(i,t))),_s(e.lines,s.label.call(i,t)),_s(e.after,ys(s.afterLabel.call(i,t))),o.push(e)})),o}getAfterBody(t,e){return Ds(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const i=this,{callbacks:n}=e,o=n.beforeFooter.apply(i,[t]),s=n.footer.apply(i,[t]),a=n.afterFooter.apply(i,[t]);let r=[];return r=_s(r,ys(o)),r=_s(r,ys(s)),r=_s(r,ys(a)),r}_createItems(t){const e=this,i=e._active,n=e._chart.data,o=[],s=[],a=[];let r,l,c=[];for(r=0,l=i.length;r<l;++r)c.push(vs(e._chart,i[r]));return t.filter&&(c=c.filter(((e,i,o)=>t.filter(e,i,o,n)))),t.itemSort&&(c=c.sort(((e,i)=>t.itemSort(e,i,n)))),J(c,(i=>{const n=Cs(t.callbacks,i);o.push(n.labelColor.call(e,i)),s.push(n.labelPointStyle.call(e,i)),a.push(n.labelTextColor.call(e,i))})),e.labelColors=o,e.labelPointStyles=s,e.labelTextColors=a,e.dataPoints=c,c}update(t,e){const i=this,n=i.options.setContext(i.getContext()),o=i._active;let s,a=[];if(o.length){const t=bs[n.position].call(i,o,i._eventPosition);a=i._createItems(n),i.title=i.getTitle(a,n),i.beforeBody=i.getBeforeBody(a,n),i.body=i.getBody(a,n),i.afterBody=i.getAfterBody(a,n),i.footer=i.getFooter(a,n);const e=i._size=ws(i,n),r=Object.assign({},t,e),l=ks(i._chart,n,r),c=Ss(n,r,l,i._chart);i.xAlign=l.xAlign,i.yAlign=l.yAlign,s={opacity:1,x:c.x,y:c.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==i.opacity&&(s={opacity:0});i._tooltipItems=a,i.$context=void 0,s&&i._resolveAnimations().update(i,s),t&&n.external&&n.external.call(i,{chart:i._chart,tooltip:i,replay:e})}drawCaret(t,e,i,n){const o=this.getCaretPosition(t,i,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:o}=this,{cornerRadius:s,caretSize:a}=i,{x:r,y:l}=t,{width:c,height:h}=e;let d,u,f,g,p,m;return"center"===o?(p=l+h/2,"left"===n?(d=r,u=d-a,g=p+a,m=p-a):(d=r+c,u=d+a,g=p-a,m=p+a),f=d):(u="left"===n?r+s+a:"right"===n?r+c-s-a:this.caretX,"top"===o?(g=l,p=g-a,d=u-a,f=u+a):(g=l+h,p=g+a,d=u+a,f=u-a),m=g),{x1:d,x2:u,x3:f,y1:g,y2:p,y3:m}}drawTitle(t,e,i){const n=this,o=n.title,s=o.length;let a,r,l;if(s){const c=bn(i.rtl,n.x,n.width);for(t.x=Ps(n,i.titleAlign,i),e.textAlign=c.textAlign(i.titleAlign),e.textBaseline="middle",a=Fe(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=a.string,l=0;l<s;++l)e.fillText(o[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r,l+1===s&&(t.y+=i.titleMarginBottom-r)}}_drawColorBox(t,e,i,n,o){const s=this,a=s.labelColors[i],r=s.labelPointStyles[i],{boxHeight:l,boxWidth:c}=o,h=Fe(o.bodyFont),d=Ps(s,"left",o),u=n.x(d),f=l<h.lineHeight?(h.lineHeight-l)/2:0,g=e.y+f;if(o.usePointStyle){const e={radius:Math.min(c,l)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},i=n.leftForLtr(u,c)+c/2,s=g+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Kt(t,e,i,s),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,Kt(t,e,i,s)}else{t.lineWidth=a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const e=n.leftForLtr(u,c),i=n.leftForLtr(n.xPlus(u,1),c-2),s=Ie(a.borderRadius);Object.values(s).some((t=>0!==t))?(t.beginPath(),t.fillStyle=o.multiKeyBackground,ie(t,{x:e,y:g,w:c,h:l,radius:s}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),ie(t,{x:i,y:g+1,w:c-2,h:l-2,radius:s}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(e,g,c,l),t.strokeRect(e,g,c,l),t.fillStyle=a.backgroundColor,t.fillRect(i,g+1,c-2,l-2))}t.fillStyle=s.labelTextColors[i]}drawBody(t,e,i){const n=this,{body:o}=n,{bodySpacing:s,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:c}=i,h=Fe(i.bodyFont);let d=h.lineHeight,u=0;const f=bn(i.rtl,n.x,n.width),g=function(i){e.fillText(i,f.x(t.x+u),t.y+d/2),t.y+=d+s},p=f.textAlign(a);let m,x,b,_,y,v,w;for(e.textAlign=a,e.textBaseline="middle",e.font=h.string,t.x=Ps(n,p,i),e.fillStyle=i.bodyColor,J(n.beforeBody,g),u=r&&"right"!==p?"center"===a?c/2+1:c+2:0,_=0,v=o.length;_<v;++_){for(m=o[_],x=n.labelTextColors[_],e.fillStyle=x,J(m.before,g),b=m.lines,r&&b.length&&(n._drawColorBox(e,t,_,f,i),d=Math.max(h.lineHeight,l)),y=0,w=b.length;y<w;++y)g(b[y]),d=h.lineHeight;J(m.after,g)}u=0,d=h.lineHeight,J(n.afterBody,g),t.y-=s}drawFooter(t,e,i){const n=this,o=n.footer,s=o.length;let a,r;if(s){const l=bn(i.rtl,n.x,n.width);for(t.x=Ps(n,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=l.textAlign(i.footerAlign),e.textBaseline="middle",a=Fe(i.footerFont),e.fillStyle=i.footerColor,e.font=a.string,r=0;r<s;++r)e.fillText(o[r],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+i.footerSpacing}}drawBackground(t,e,i,n){const{xAlign:o,yAlign:s}=this,{x:a,y:r}=t,{width:l,height:c}=i,h=n.cornerRadius;e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(a+h,r),"top"===s&&this.drawCaret(t,e,i,n),e.lineTo(a+l-h,r),e.quadraticCurveTo(a+l,r,a+l,r+h),"center"===s&&"right"===o&&this.drawCaret(t,e,i,n),e.lineTo(a+l,r+c-h),e.quadraticCurveTo(a+l,r+c,a+l-h,r+c),"bottom"===s&&this.drawCaret(t,e,i,n),e.lineTo(a+h,r+c),e.quadraticCurveTo(a,r+c,a,r+c-h),"center"===s&&"left"===o&&this.drawCaret(t,e,i,n),e.lineTo(a,r+h),e.quadraticCurveTo(a,r,a+h,r),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this,i=e._chart,n=e.$animations,o=n&&n.x,s=n&&n.y;if(o||s){const n=bs[t.position].call(e,e._active,e._eventPosition);if(!n)return;const a=e._size=ws(e,t),r=Object.assign({},n,e._size),l=ks(i,t,r),c=Ss(t,r,l,i);o._to===c.x&&s._to===c.y||(e.xAlign=l.xAlign,e.yAlign=l.yAlign,e.width=a.width,e.height=a.height,e.caretX=n.x,e.caretY=n.y,e._resolveAnimations().update(e,c))}}draw(t){const e=this,i=e.options.setContext(e.getContext());let n=e.opacity;if(!n)return;e._updateAnimationTarget(i);const o={width:e.width,height:e.height},s={x:e.x,y:e.y};n=Math.abs(n)<.001?0:n;const a=ze(i.padding),r=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;i.enabled&&r&&(t.save(),t.globalAlpha=n,e.drawBackground(s,t,o,i),_n(t,i.textDirection),s.y+=a.top,e.drawTitle(s,t,i),e.drawBody(s,t,i),e.drawFooter(s,t,i),yn(t,i.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this,n=i._active,o=t.map((({datasetIndex:t,index:e})=>{const n=i._chart.getDatasetMeta(t);if(!n)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:n.data[e],index:e}})),s=!tt(n,o),a=i._positionChanged(o,e);(s||a)&&(i._active=o,i._eventPosition=e,i.update(!0))}handleEvent(t,e){const i=this,n=i.options,o=i._active||[];let s=!1,a=[];"mouseout"!==t.type&&(a=i._chart.getElementsAtEventForMode(t,n.mode,n,e),n.reverse&&a.reverse());const r=i._positionChanged(a,t);return s=e||!tt(a,o)||r,s&&(i._active=a,(n.enabled||n.external)&&(i._eventPosition={x:t.x,y:t.y},i.update(!0,e))),s}_positionChanged(t,e){const{caretX:i,caretY:n,options:o}=this,s=bs[o.position].call(this,t,e);return!1!==s&&(i!==s.x||n!==s.y)}}Os.positioners=bs;var Ts={id:"tooltip",_element:Os,positioners:bs,afterInit(t,e,i){i&&(t.tooltip=new Os({_chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:N,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)return i[e.dataIndex]}return""},afterTitle:N,beforeBody:N,beforeLabel:N,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return $(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:N,afterBody:N,beforeFooter:N,footer:N,afterFooter:N}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},As=Object.freeze({__proto__:null,Decimation:Ko,Filler:us,Legend:ps,Title:xs,Tooltip:Ts});function Ls(t,e,i){const n=t.indexOf(e);if(-1===n)return((t,e,i)=>"string"==typeof e?t.push(e)-1:isNaN(e)?null:i)(t,e,i);return n!==t.lastIndexOf(e)?i:n}class Rs extends Xi{constructor(t){super(t),this._startValue=void 0,this._valueRange=0}parse(t,e){if($(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:Nt(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:Ls(i,t,K(e,t)),i.length-1)}determineDataLimits(){const t=this,{minDefined:e,maxDefined:i}=t.getUserBounds();let{min:n,max:o}=t.getMinMax(!0);"ticks"===t.options.bounds&&(e||(n=0),i||(o=t.getLabels().length-1)),t.min=n,t.max=o}buildTicks(){const t=this,e=t.min,i=t.max,n=t.options.offset,o=[];let s=t.getLabels();s=0===e&&i===s.length-1?s:s.slice(e,i+1),t._valueRange=Math.max(s.length-(n?0:1),1),t._startValue=t.min-(n?.5:0);for(let t=e;t<=i;t++)o.push({value:t});return o}getLabelForValue(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}configure(){const t=this;super.configure(),t.isHorizontal()||(t._reversePixels=!t._reversePixels)}getPixelForValue(t){const e=this;return"number"!=typeof t&&(t=e.parse(t)),null===t?NaN:e.getPixelForDecimal((t-e._startValue)/e._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){const e=this;return Math.round(e._startValue+e.getDecimalForPixel(t)*e._valueRange)}getBasePixel(){return this.bottom}}function Es(t,e,{horizontal:i,minRotation:n}){const o=Et(n),s=(i?Math.sin(o):Math.cos(o))||.001,a=.75*e*(""+t).length;return Math.min(e/s,a)}Rs.id="category",Rs.defaults={ticks:{callback:Rs.prototype.getLabelForValue}};class Is extends Xi{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return $(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const t=this,{beginAtZero:e}=t.options,{minDefined:i,maxDefined:n}=t.getUserBounds();let{min:o,max:s}=t;const a=t=>o=i?o:t,r=t=>s=n?s:t;if(e){const t=Dt(o),e=Dt(s);t<0&&e<0?r(0):t>0&&e>0&&a(0)}o===s&&(r(s+1),e||a(o-1)),t.min=o,t.max=s}getTickLimit(){const t=this,e=t.options.ticks;let i,{maxTicksLimit:n,stepSize:o}=e;return o?i=Math.ceil(t.max/o)-Math.floor(t.min/o)+1:(i=t.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this,e=t.options,i=e.ticks;let n=t.getTickLimit();n=Math.max(2,n);const o=function(t,e){const i=[],{bounds:n,step:o,min:s,max:a,precision:r,count:l,maxTicks:c,maxDigits:h,includeBounds:d}=t,u=o||1,f=c-1,{min:g,max:p}=e,m=!$(s),x=!$(a),b=!$(l),_=(p-g)/(h+1);let y,v,w,M,k=Ct((p-g)/f/u)*u;if(k<1e-14&&!m&&!x)return[{value:g},{value:p}];M=Math.ceil(p/k)-Math.floor(g/k),M>f&&(k=Ct(M*k/f/u)*u),$(r)||(y=Math.pow(10,r),k=Math.ceil(k*y)/y),"ticks"===n?(v=Math.floor(g/k)*k,w=Math.ceil(p/k)*k):(v=g,w=p),m&&x&&o&&Lt((a-s)/o,k/1e3)?(M=Math.min((a-s)/k,c),k=(a-s)/M,v=s,w=a):b?(v=m?s:v,w=x?a:w,M=l-1,k=(w-v)/M):(M=(w-v)/k,M=At(M,Math.round(M),k/1e3)?Math.round(M):Math.ceil(M));const S=Math.max(zt(k),zt(v));y=Math.pow(10,$(r)?S:r),v=Math.round(v*y)/y,w=Math.round(w*y)/y;let P=0;for(m&&(d&&v!==s?(i.push({value:s}),v<s&&P++,At(Math.round((v+P*k)*y)/y,s,Es(s,_,t))&&P++):v<s&&P++);P<M;++P)i.push({value:Math.round((v+P*k)*y)/y});return x&&d&&w!==a?At(i[i.length-1].value,a,Es(a,_,t))?i[i.length-1].value=a:i.push({value:a}):x&&w!==a||i.push({value:w}),i}({maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:i.precision,step:i.stepSize,count:i.count,maxDigits:t._maxDigits(),horizontal:t.isHorizontal(),minRotation:i.minRotation||0,includeBounds:!1!==i.includeBounds},t._range||t);return"ticks"===e.bounds&&Rt(o,t,"value"),e.reverse?(o.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),o}configure(){const t=this,e=t.ticks;let i=t.min,n=t.max;if(super.configure(),t.options.offset&&e.length){const t=(n-i)/Math.max(e.length-1,1)/2;i-=t,n+=t}t._startValue=i,t._endValue=n,t._valueRange=n-i}getLabelForValue(t){return zi(t,this.chart.options.locale)}}class zs extends Is{determineDataLimits(){const t=this,{min:e,max:i}=t.getMinMax(!0);t.min=X(e)?e:0,t.max=X(i)?i:1,t.handleTickRangeOptions()}computeTickLimit(){const t=this,e=t.isHorizontal(),i=e?t.width:t.height,n=Et(t.options.ticks.minRotation),o=(e?Math.sin(n):Math.cos(n))||.001,s=t._resolveTickFontOptions(0);return Math.ceil(i/Math.min(40,s.lineHeight/o))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Fs(t){return 1===t/Math.pow(10,Math.floor(Pt(t)))}zs.id="linear",zs.defaults={ticks:{callback:Vi.formatters.numeric}};class Vs extends Xi{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Is.prototype.parse.apply(this,[t,e]);if(0!==i)return X(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const t=this,{min:e,max:i}=t.getMinMax(!0);t.min=X(e)?Math.max(0,e):null,t.max=X(i)?Math.max(0,i):null,t.options.beginAtZero&&(t._zero=!0),t.handleTickRangeOptions()}handleTickRangeOptions(){const t=this,{minDefined:e,maxDefined:i}=t.getUserBounds();let n=t.min,o=t.max;const s=t=>n=e?n:t,a=t=>o=i?o:t,r=(t,e)=>Math.pow(10,Math.floor(Pt(t))+e);n===o&&(n<=0?(s(1),a(10)):(s(r(n,-1)),a(r(o,1)))),n<=0&&s(r(o,-1)),o<=0&&a(r(n,1)),t._zero&&t.min!==t._suggestedMin&&n===r(t.min,0)&&s(r(n,-1)),t.min=n,t.max=o}buildTicks(){const t=this,e=t.options,i=function(t,e){const i=Math.floor(Pt(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),o=[];let s=q(t.min,Math.pow(10,Math.floor(Pt(e.min)))),a=Math.floor(Pt(s)),r=Math.floor(s/Math.pow(10,a)),l=a<0?Math.pow(10,Math.abs(a)):1;do{o.push({value:s,major:Fs(s)}),++r,10===r&&(r=1,++a,l=a>=0?1:l),s=Math.round(r*Math.pow(10,a)*l)/l}while(a<i||a===i&&r<n);const c=q(t.max,s);return o.push({value:c,major:Fs(s)}),o}({min:t._userMin,max:t._userMax},t);return"ticks"===e.bounds&&Rt(i,t,"value"),e.reverse?(i.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),i}getLabelForValue(t){return void 0===t?"0":zi(t,this.chart.options.locale)}configure(){const t=this,e=t.min;super.configure(),t._startValue=Pt(e),t._valueRange=Pt(t.max)-Pt(e)}getPixelForValue(t){const e=this;return void 0!==t&&0!==t||(t=e.min),null===t||isNaN(t)?NaN:e.getPixelForDecimal(t===e.min?0:(Pt(t)-e._startValue)/e._valueRange)}getValueForPixel(t){const e=this,i=e.getDecimalForPixel(t);return Math.pow(10,e._startValue+i*e._valueRange)}}function Bs(t){const e=t.ticks;if(e.display&&t.display){const t=ze(e.backdropPadding);return K(e.font&&e.font.size,xt.font.size)+t.height}return 0}function Ws(t,e,i,n,o){return t===n||t===o?{start:e-i/2,end:e+i/2}:t<n||t>o?{start:e-i,end:e}:{start:e,end:e+i}}function Hs(t){return 0===t||180===t?"center":t<180?"left":"right"}function Ns(t,e,i){90===t||270===t?i.y-=e.h/2:(t>270||t<90)&&(i.y-=e.h)}function js(t,e,i,n){const{ctx:o}=t;if(i)o.arc(t.xCenter,t.yCenter,e,0,_t);else{let i=t.getPointPosition(0,e);o.moveTo(i.x,i.y);for(let s=1;s<n;s++)i=t.getPointPosition(s,e),o.lineTo(i.x,i.y)}}function $s(t){return Tt(t)?t:0}Vs.id="logarithmic",Vs.defaults={ticks:{callback:Vi.formatters.logarithmic,major:{enabled:!0}}};class Ys extends Is{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Bs(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2}determineDataLimits(){const t=this,{min:e,max:i}=t.getMinMax(!1);t.min=X(e)&&!isNaN(e)?e:0,t.max=X(i)&&!isNaN(i)?i:0,t.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Bs(this.options))}generateTickLabels(t){const e=this;Is.prototype.generateTickLabels.call(e,t),e._pointLabels=e.getLabels().map(((t,i)=>{const n=Q(e.options.pointLabels.callback,[t,i],e);return n||0===n?n:""}))}fit(){const t=this,e=t.options;e.display&&e.pointLabels.display?function(t){const e={l:0,r:t.width,t:0,b:t.height-t.paddingTop},i={};let n,o,s;const a=[],r=[],l=t.getLabels().length;for(n=0;n<l;n++){const l=t.options.pointLabels.setContext(t.getContext(n));r[n]=l.padding,s=t.getPointPosition(n,t.drawingArea+r[n]);const u=Fe(l.font);t.ctx.font=u.string,c=t.ctx,h=u.lineHeight,o=Y(d=t._pointLabels[n])?{w:Ut(c,c.font,d),h:d.length*h}:{w:c.measureText(d).width,h:h},a[n]=o;const f=t.getIndexAngle(n),g=It(f),p=Ws(g,s.x,o.w,0,180),m=Ws(g,s.y,o.h,90,270);p.start<e.l&&(e.l=p.start,i.l=f),p.end>e.r&&(e.r=p.end,i.r=f),m.start<e.t&&(e.t=m.start,i.t=f),m.end>e.b&&(e.b=m.end,i.b=f)}var c,h,d;t._setReductions(t.drawingArea,e,i),t._pointLabelItems=[];const u=t.options,f=Bs(u),g=t.getDistanceFromCenterForValue(u.ticks.reverse?t.min:t.max);for(n=0;n<l;n++){const e=0===n?f/2:0,i=t.getPointPosition(n,g+e+r[n]),o=It(t.getIndexAngle(n)),s=a[n];Ns(o,s,i);const l=Hs(o);let c;c="left"===l?i.x:"center"===l?i.x-s.w/2:i.x-s.w;const h=c+s.w;t._pointLabelItems[n]={x:i.x,y:i.y,textAlign:l,left:c,top:i.y,right:h,bottom:i.y+s.h}}}(t):t.setCenterPoint(0,0,0,0)}_setReductions(t,e,i){const n=this;let o=e.l/Math.sin(i.l),s=Math.max(e.r-n.width,0)/Math.sin(i.r),a=-e.t/Math.cos(i.t),r=-Math.max(e.b-(n.height-n.paddingTop),0)/Math.cos(i.b);o=$s(o),s=$s(s),a=$s(a),r=$s(r),n.drawingArea=Math.max(t/2,Math.min(Math.floor(t-(o+s)/2),Math.floor(t-(a+r)/2))),n.setCenterPoint(o,s,a,r)}setCenterPoint(t,e,i,n){const o=this,s=o.width-e-o.drawingArea,a=t+o.drawingArea,r=i+o.drawingArea,l=o.height-o.paddingTop-n-o.drawingArea;o.xCenter=Math.floor((a+s)/2+o.left),o.yCenter=Math.floor((r+l)/2+o.top+o.paddingTop)}getIndexAngle(t){return Wt(t*(_t/this.getLabels().length)+Et(this.options.startAngle||0))}getDistanceFromCenterForValue(t){const e=this;if($(t))return NaN;const i=e.drawingArea/(e.max-e.min);return e.options.reverse?(e.max-t)*i:(t-e.min)*i}getValueForDistanceFromCenter(t){if($(t))return NaN;const e=this,i=t/(e.drawingArea/(e.max-e.min));return e.options.reverse?e.max-i:e.min+i}getPointPosition(t,e){const i=this,n=i.getIndexAngle(t)-Mt;return{x:Math.cos(n)*e+i.xCenter,y:Math.sin(n)*e+i.yCenter,angle:n}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:n,bottom:o}=this._pointLabelItems[t];return{left:e,top:i,right:n,bottom:o}}drawBackground(){const t=this,{backgroundColor:e,grid:{circular:i}}=t.options;if(e){const n=t.ctx;n.save(),n.beginPath(),js(t,t.getDistanceFromCenterForValue(t._endValue),i,t.getLabels().length),n.closePath(),n.fillStyle=e,n.fill(),n.restore()}}drawGrid(){const t=this,e=t.ctx,i=t.options,{angleLines:n,grid:o}=i,s=t.getLabels().length;let a,r,l;if(i.pointLabels.display&&function(t,e){const{ctx:i,options:{pointLabels:n}}=t;for(let o=e-1;o>=0;o--){const e=n.setContext(t.getContext(o)),s=Fe(e.font),{x:a,y:r,textAlign:l,left:c,top:h,right:d,bottom:u}=t._pointLabelItems[o],{backdropColor:f}=e;if(!$(f)){const t=ze(e.backdropPadding);i.fillStyle=f,i.fillRect(c-t.left,h-t.top,d-c+t.width,u-h+t.height)}ee(i,t._pointLabels[o],a,r+s.lineHeight/2,s,{color:e.color,textAlign:l,textBaseline:"middle"})}}(t,s),o.display&&t.ticks.forEach(((e,i)=>{if(0!==i){r=t.getDistanceFromCenterForValue(e.value);const n=o.setContext(t.getContext(i-1));!function(t,e,i,n){const o=t.ctx,s=e.circular,{color:a,lineWidth:r}=e;!s&&!n||!a||!r||i<0||(o.save(),o.strokeStyle=a,o.lineWidth=r,o.setLineDash(e.borderDash),o.lineDashOffset=e.borderDashOffset,o.beginPath(),js(t,i,s,n),o.closePath(),o.stroke(),o.restore())}(t,n,r,s)}})),n.display){for(e.save(),a=t.getLabels().length-1;a>=0;a--){const o=n.setContext(t.getContext(a)),{color:s,lineWidth:c}=o;c&&s&&(e.lineWidth=c,e.strokeStyle=s,e.setLineDash(o.borderDash),e.lineDashOffset=o.borderDashOffset,r=t.getDistanceFromCenterForValue(i.ticks.reverse?t.min:t.max),l=t.getPointPosition(a,r),e.beginPath(),e.moveTo(t.xCenter,t.yCenter),e.lineTo(l.x,l.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const t=this,e=t.ctx,i=t.options,n=i.ticks;if(!n.display)return;const o=t.getIndexAngle(0);let s,a;e.save(),e.translate(t.xCenter,t.yCenter),e.rotate(o),e.textAlign="center",e.textBaseline="middle",t.ticks.forEach(((o,r)=>{if(0===r&&!i.reverse)return;const l=n.setContext(t.getContext(r)),c=Fe(l.font);if(s=t.getDistanceFromCenterForValue(t.ticks[r].value),l.showLabelBackdrop){a=e.measureText(o.label).width,e.fillStyle=l.backdropColor;const t=ze(l.backdropPadding);e.fillRect(-a/2-t.left,-s-c.size/2-t.top,a+t.width,c.size+t.height)}ee(e,o.label,0,-s,c,{color:l.color})})),e.restore()}drawTitle(){}}Ys.id="radialLinear",Ys.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Vi.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5}},Ys.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},Ys.descriptors={angleLines:{_fallback:"grid"}};const Us={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Xs=Object.keys(Us);function qs(t,e){return t-e}function Ks(t,e){if($(e))return null;const i=t._adapter,{parser:n,round:o,isoWeekday:s}=t._parseOpts;let a=e;return"function"==typeof n&&(a=n(a)),X(a)||(a="string"==typeof n?i.parse(a,n):i.parse(a)),null===a?null:(o&&(a="week"!==o||!Tt(s)&&!0!==s?i.startOf(a,o):i.startOf(a,"isoWeek",s)),+a)}function Gs(t,e,i,n){const o=Xs.length;for(let s=Xs.indexOf(t);s<o-1;++s){const t=Us[Xs[s]],o=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(o*t.size))<=n)return Xs[s]}return Xs[o-1]}function Zs(t,e,i){if(i){if(i.length){const{lo:n,hi:o}=ne(i,e);t[i[n]>=e?i[n]:i[o]]=!0}}else t[e]=!0}function Qs(t,e,i){const n=[],o={},s=e.length;let a,r;for(a=0;a<s;++a)r=e[a],o[r]=a,n.push({value:r,major:!1});return 0!==s&&i?function(t,e,i,n){const o=t._adapter,s=+o.startOf(e[0].value,n),a=e[e.length-1].value;let r,l;for(r=s;r<=a;r=+o.add(r,1,n))l=i[r],l>=0&&(e[l].major=!0);return e}(t,n,o,i):n}class Js extends Xi{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new so._date(t.adapters.date);st(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:Ks(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this,e=t.options,i=t._adapter,n=e.time.unit||"day";let{min:o,max:s,minDefined:a,maxDefined:r}=t.getUserBounds();function l(t){a||isNaN(t.min)||(o=Math.min(o,t.min)),r||isNaN(t.max)||(s=Math.max(s,t.max))}a&&r||(l(t._getLabelBounds()),"ticks"===e.bounds&&"labels"===e.ticks.source||l(t.getMinMax(!1))),o=X(o)&&!isNaN(o)?o:+i.startOf(Date.now(),n),s=X(s)&&!isNaN(s)?s:+i.endOf(Date.now(),n)+1,t.min=Math.min(o,s-1),t.max=Math.max(o+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this,e=t.options,i=e.time,n=e.ticks,o="labels"===n.source?t.getLabelTimestamps():t._generate();"ticks"===e.bounds&&o.length&&(t.min=t._userMin||o[0],t.max=t._userMax||o[o.length-1]);const s=t.min,a=ae(o,s,t.max);return t._unit=i.unit||(n.autoSkip?Gs(i.minUnit,t.min,t.max,t._getLabelCapacity(s)):function(t,e,i,n,o){for(let s=Xs.length-1;s>=Xs.indexOf(i);s--){const i=Xs[s];if(Us[i].common&&t._adapter.diff(o,n,i)>=e-1)return i}return Xs[i?Xs.indexOf(i):0]}(t,a.length,i.minUnit,t.min,t.max)),t._majorUnit=n.major.enabled&&"year"!==t._unit?function(t){for(let e=Xs.indexOf(t)+1,i=Xs.length;e<i;++e)if(Us[Xs[e]].common)return Xs[e]}(t._unit):void 0,t.initOffsets(o),e.reverse&&a.reverse(),Qs(t,a,t._majorUnit)}initOffsets(t){const e=this;let i,n,o=0,s=0;e.options.offset&&t.length&&(i=e.getDecimalForValue(t[0]),o=1===t.length?1-i:(e.getDecimalForValue(t[1])-i)/2,n=e.getDecimalForValue(t[t.length-1]),s=1===t.length?n:(n-e.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;o=Nt(o,0,a),s=Nt(s,0,a),e._offsets={start:o,end:s,factor:1/(o+1+s)}}_generate(){const t=this,e=t._adapter,i=t.min,n=t.max,o=t.options,s=o.time,a=s.unit||Gs(s.minUnit,i,n,t._getLabelCapacity(i)),r=K(s.stepSize,1),l="week"===a&&s.isoWeekday,c=Tt(l)||!0===l,h={};let d,u,f=i;if(c&&(f=+e.startOf(f,"isoWeek",l)),f=+e.startOf(f,c?"day":a),e.diff(n,i,a)>1e5*r)throw new Error(i+" and "+n+" are too far apart with stepSize of "+r+" "+a);const g="data"===o.ticks.source&&t.getDataTimestamps();for(d=f,u=0;d<n;d=+e.add(d,r,a),u++)Zs(h,d,g);return d!==n&&"ticks"!==o.bounds&&1!==u||Zs(h,d,g),Object.keys(h).sort(((t,e)=>t-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const o=this,s=o.options,a=s.time.displayFormats,r=o._unit,l=o._majorUnit,c=r&&a[r],h=l&&a[l],d=i[e],u=l&&h&&d&&d.major,f=o._adapter.format(t,n||(u?h:c)),g=s.ticks.callback;return g?Q(g,[f,e,i],o):f}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e<i;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){const e=this;return null===t?NaN:(t-e.min)/(e.max-e.min)}getPixelForValue(t){const e=this,i=e._offsets,n=e.getDecimalForValue(t);return e.getPixelForDecimal((i.start+n)*i.factor)}getValueForPixel(t){const e=this,i=e._offsets,n=e.getDecimalForPixel(t)/i.factor-i.end;return e.min+n*(e.max-e.min)}_getLabelSize(t){const e=this,i=e.options.ticks,n=e.ctx.measureText(t).width,o=Et(e.isHorizontal()?i.maxRotation:i.minRotation),s=Math.cos(o),a=Math.sin(o),r=e._resolveTickFontOptions(0).size;return{w:n*s+r*a,h:n*a+r*s}}_getLabelCapacity(t){const e=this,i=e.options.time,n=i.displayFormats,o=n[i.unit]||n.millisecond,s=e._tickFormatFunction(t,0,Qs(e,[t],e._majorUnit),o),a=e._getLabelSize(s),r=Math.floor(e.isHorizontal()?e.width/a.w:e.height/a.h)-1;return r>0?r:1}getDataTimestamps(){const t=this;let e,i,n=t._cache.data||[];if(n.length)return n;const o=t.getMatchingVisibleMetas();if(t._normalized&&o.length)return t._cache.data=o[0].controller.getAllParsedValues(t);for(e=0,i=o.length;e<i;++e)n=n.concat(o[e].controller.getAllParsedValues(t));return t._cache.data=t.normalize(n)}getLabelTimestamps(){const t=this,e=t._cache.labels||[];let i,n;if(e.length)return e;const o=t.getLabels();for(i=0,n=o.length;i<n;++i)e.push(Ks(t,o[i]));return t._cache.labels=t._normalized?e:t.normalize(e)}normalize(t){return he(t.sort(qs))}}function ta(t,e,i){let n,o,s,a;if(i)n=Math.floor(e),o=Math.ceil(e),s=t[n],a=t[o];else{const i=ne(t,e);s=i.lo,a=i.hi,n=t[s],o=t[a]}const r=o-n;return r?s+(a-s)*(e-n)/r:s}Js.id="time",Js.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class ea extends Js{constructor(t){super(t),this._table=[],this._maxIndex=void 0}initOffsets(){const t=this,e=t._getTimestampsForTable();t._table=t.buildLookupTable(e),t._maxIndex=t._table.length-1,super.initOffsets(e)}buildLookupTable(t){const{min:e,max:i}=this;if(!t.length)return[{time:e,pos:0},{time:i,pos:1}];const n=[e];let o,s,a;for(o=0,s=t.length;o<s;++o)a=t[o],a>e&&a<i&&n.push(a);return n.push(i),n}_getTimestampsForTable(){const t=this;let e=t._cache.all||[];if(e.length)return e;const i=t.getDataTimestamps(),n=t.getLabelTimestamps();return e=i.length&&n.length?t.normalize(i.concat(n)):i.length?i:n,e=t._cache.all=e,e}getPixelForValue(t,e){const i=this,n=i._offsets,o=i._normalized&&i._maxIndex>0&&!$(e)?e/i._maxIndex:i.getDecimalForValue(t);return i.getPixelForDecimal((n.start+o)*n.factor)}getDecimalForValue(t){return ta(this._table,t)/this._maxIndex}getValueForPixel(t){const e=this,i=e._offsets,n=e.getDecimalForPixel(t)/i.factor-i.end;return ta(e._table,n*this._maxIndex,!0)}}ea.id="timeseries",ea.defaults=Js.defaults;var ia=Object.freeze({__proto__:null,CategoryScale:Rs,LinearScale:zs,LogarithmicScale:Vs,RadialLinearScale:Ys,TimeScale:Js,TimeSeriesScale:ea});return to.register(_o,ia,Uo,As),to.helpers={...On},to._adapters=so,to.Animation=_i,to.Animations=vi,to.animator=a,to.controllers=An.controllers.items,to.DatasetController=Ri,to.Element=Ei,to.elements=Uo,to.Interaction=Oe,to.layouts=Ge,to.platforms=ui,to.Scale=Xi,to.Ticks=Vi,Object.assign(to,_o,ia,Uo,As,ui),to.Chart=to,"undefined"!=typeof window&&(window.Chart=to),to}));
js/editor-screenshots.js CHANGED
@@ -75,14 +75,18 @@
75
  var splashInput = item.find('#fv_wp_flowplayer_field_splash');
76
  splashInput.val(response.src);
77
  splashInput.css('background-color','#6ef442');
 
 
 
78
  }
79
  if(response.error) {
80
  message.html('<div class="error"><p>'+response.error+'</p></div>');
81
- fv_wp_flowplayer_dialog_resize();
82
  }
83
  spinner.remove();
84
  button.prop("disabled",false);
85
 
 
86
  fv_wp_flowplayer_submit('refresh-button');
87
  setTimeout(function(){
88
  splashInput.css('background-color','#ffffff');
75
  var splashInput = item.find('#fv_wp_flowplayer_field_splash');
76
  splashInput.val(response.src);
77
  splashInput.css('background-color','#6ef442');
78
+
79
+ // trigger autosave
80
+ splashInput.trigger('keyup');
81
  }
82
  if(response.error) {
83
  message.html('<div class="error"><p>'+response.error+'</p></div>');
84
+ fv_player_editor.fv_wp_flowplayer_dialog_resize()
85
  }
86
  spinner.remove();
87
  button.prop("disabled",false);
88
 
89
+ // trigger preview
90
  fv_wp_flowplayer_submit('refresh-button');
91
  setTimeout(function(){
92
  splashInput.css('background-color','#ffffff');
js/fancybox.js CHANGED
@@ -12,6 +12,8 @@
12
  t.idleSecondsCounter=0,n.toggleClass("fancybox-show-toolbar",!(!e.toolbar||!e.buttons)).toggleClass("fancybox-show-infobar",!!(e.infobar&&t.group.length>1)).toggleClass("fancybox-show-caption",!!t.$caption).toggleClass("fancybox-show-nav",!!(e.arrows&&t.group.length>1)).toggleClass("fancybox-is-modal",!!e.modal)},toggleControls:function(){this.isHiddenControls?this.showControls():this.hideControls()}}),n.fancybox={version:"3.4.1",defaults:a,getInstance:function(t){var e=n('.fancybox-container:not(".fancybox-is-closing"):last').data("FancyBox"),o=Array.prototype.slice.call(arguments,1);return e instanceof h&&("string"===n.type(t)?e[t].apply(e,o):"function"===n.type(t)&&t.apply(e,o),e)},open:function(t,e,n){return new h(t,e,n)},close:function(t){var e=this.getInstance();e&&(e.close(),t===!0&&this.close(t))},destroy:function(){this.close(!0),r.add("body").off("click.fb-start","**")},isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:function(){var n=e.createElement("div");return t.getComputedStyle&&t.getComputedStyle(n)&&t.getComputedStyle(n).getPropertyValue("transform")&&!(e.documentMode&&e.documentMode<11)}(),getTranslate:function(t){var e;return!(!t||!t.length)&&(e=t[0].getBoundingClientRect(),{top:e.top||0,left:e.left||0,width:e.width,height:e.height,opacity:parseFloat(t.css("opacity"))})},setTranslate:function(t,e){var n="",i={};if(t&&e)return e.left===o&&e.top===o||(n=(e.left===o?t.position().left:e.left)+"px, "+(e.top===o?t.position().top:e.top)+"px",n=this.use3d?"translate3d("+n+", 0px)":"translate("+n+")"),e.scaleX!==o&&e.scaleY!==o&&(n=(n.length?n+" ":"")+"scale("+e.scaleX+", "+e.scaleY+")"),n.length&&(i.transform=n),e.opacity!==o&&(i.opacity=e.opacity),e.width!==o&&(i.width=e.width),e.height!==o&&(i.height=e.height),t.css(i)},animate:function(t,e,i,a,s){var r,c=!1;n.isFunction(i)&&(a=i,i=null),n.isPlainObject(e)||t.removeAttr("style"),n.fancybox.stop(t),t.on(u,function(o){(!o||!o.originalEvent||t.is(o.originalEvent.target)&&"z-index"!=o.originalEvent.propertyName)&&(n.fancybox.stop(t),c&&n.fancybox.setTranslate(t,c),n.isNumeric(i)&&t.css("transition-duration",""),n.isPlainObject(e)?s===!1&&t.removeAttr("style"):s!==!0&&t.removeClass(e),n.isFunction(a)&&a(o))}),n.isNumeric(i)&&t.css("transition-duration",i+"ms"),n.isPlainObject(e)?(e.scaleX!==o&&e.scaleY!==o&&(r=n.fancybox.getTranslate(t),c=n.extend({},e,{width:r.width*e.scaleX,height:r.height*e.scaleY,scaleX:1,scaleY:1}),delete e.width,delete e.height,t.parent().hasClass("fancybox-slide--image")&&t.parent().addClass("fancybox-is-scaling")),n.fancybox.setTranslate(t,e)):t.addClass(e),t.data("timer",setTimeout(function(){t.trigger("transitionend")},i+16))},stop:function(t,e){t&&t.length&&(clearTimeout(t.data("timer")),e&&t.trigger(u),t.off(u).css("transition-duration",""),t.parent().removeClass("fancybox-is-scaling"))}},n.fn.fancybox=function(t){var e;return t=t||{},e=t.selector||!1,e?n("body").off("click.fb-start",e).on("click.fb-start",e,{options:t},i):this.off("click.fb-start").on("click.fb-start",{items:this,options:t},i),this},r.on("click.fb-start","[data-fancybox]",i),r.on("click.fb-start","[data-fancybox-trigger]",function(t){n('[data-fancybox="'+n(this).attr("data-fancybox-trigger")+'"]').eq(n(this).attr("data-fancybox-index")||0).trigger("click.fb-start",{$trigger:n(this)})}),function(){var t=".fancybox-button",e="fancybox-focus",o=null;r.on("mousedown mouseup focus blur",t,function(i){switch(i.type){case"mousedown":o=n(this);break;case"mouseup":o=null;break;case"focusin":n(t).removeClass(e),n(this).is(o)||n(this).is("[disabled]")||n(this).addClass(e);break;case"focusout":n(t).removeClass(e)}})}()}}(window,document,jQuery),function(t){"use strict";var e=function(e,n,o){if(e)return o=o||"","object"===t.type(o)&&(o=t.param(o,!0)),t.each(n,function(t,n){e=e.replace("$"+t,n||"")}),o.length&&(e+=(e.indexOf("?")>0?"&":"?")+o),e},n={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},paramPlace:8,type:"iframe",url:"//www.youtube-nocookie.com/embed/$4",thumb:"//img.youtube.com/vi/$4/hqdefault.jpg"},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1,api:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/?ll="+(t[9]?t[9]+"&z="+Math.floor(t[10])+(t[12]?t[12].replace(/^\//,"&"):""):t[12]+"").replace(/\?/,"&")+"&output="+(t[12]&&t[12].indexOf("layer=c")>0?"svembed":"embed")}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/maps?q="+t[5].replace("query=","q=").replace("api=1","")+"&output=embed"}}};t(document).on("objectNeedsType.fb",function(o,i,a){var s,r,c,l,d,u,f,p=a.src||"",h=!1;s=t.extend(!0,{},n,a.opts.media),t.each(s,function(n,o){if(c=p.match(o.matcher)){if(h=o.type,f=n,u={},o.paramPlace&&c[o.paramPlace]){d=c[o.paramPlace],"?"==d[0]&&(d=d.substring(1)),d=d.split("&");for(var i=0;i<d.length;++i){var s=d[i].split("=",2);2==s.length&&(u[s[0]]=decodeURIComponent(s[1].replace(/\+/g," ")))}}return l=t.extend(!0,{},o.params,a.opts[n],u),p="function"===t.type(o.url)?o.url.call(this,c,l,a):e(o.url,c,l),r="function"===t.type(o.thumb)?o.thumb.call(this,c,l,a):e(o.thumb,c),"youtube"===n?p=p.replace(/&t=((\d+)m)?(\d+)s/,function(t,e,n,o){return"&start="+((n?60*parseInt(n,10):0)+parseInt(o,10))}):"vimeo"===n&&(p=p.replace("&%23","#")),!1}}),h?(a.opts.thumb||a.opts.$thumb&&a.opts.$thumb.length||(a.opts.thumb=r),"iframe"===h&&(a.opts=t.extend(!0,a.opts,{iframe:{preload:!1,attr:{scrolling:"no"}}})),t.extend(a,{type:h,src:p,origSrc:a.src,contentSource:f,contentType:"image"===h?"image":"gmap_place"==f||"gmap_search"==f?"map":"video"})):p&&(a.type=a.opts.defaultType)})}(jQuery),function(t,e,n){"use strict";var o=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),i=function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e)}}(),a=function(e){var n=[];e=e.originalEvent||e||t.e,e=e.touches&&e.touches.length?e.touches:e.changedTouches&&e.changedTouches.length?e.changedTouches:[e];for(var o in e)e[o].pageX?n.push({x:e[o].pageX,y:e[o].pageY}):e[o].clientX&&n.push({x:e[o].clientX,y:e[o].clientY});return n},s=function(t,e,n){return e&&t?"x"===n?t.x-e.x:"y"===n?t.y-e.y:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0},r=function(t){if(t.is('a,area,button,[role="button"],input,label,select,summary,textarea,video,audio')||n.isFunction(t.get(0).onclick)||t.data("selectable"))return!0;for(var e=0,o=t[0].attributes,i=o.length;e<i;e++)if("data-fancybox-"===o[e].nodeName.substr(0,14))return!0;return!1},c=function(e){var n=t.getComputedStyle(e)["overflow-y"],o=t.getComputedStyle(e)["overflow-x"],i=("scroll"===n||"auto"===n)&&e.scrollHeight>e.clientHeight,a=("scroll"===o||"auto"===o)&&e.scrollWidth>e.clientWidth;return i||a},l=function(t){for(var e=!1;;){if(e=c(t.get(0)))break;if(t=t.parent(),!t.length||t.hasClass("fancybox-stage")||t.is("body"))break}return e},d=function(t){var e=this;e.instance=t,e.$bg=t.$refs.bg,e.$stage=t.$refs.stage,e.$container=t.$refs.container,e.destroy(),e.$container.on("touchstart.fb.touch mousedown.fb.touch",n.proxy(e,"ontouchstart"))};d.prototype.destroy=function(){this.$container.off(".fb.touch")},d.prototype.ontouchstart=function(o){var i=this,c=n(o.target),d=i.instance,u=d.current,f=u.$slide,p=u.$content,h="touchstart"==o.type;if(h&&i.$container.off("mousedown.fb.touch"),(!o.originalEvent||2!=o.originalEvent.button)&&f.length&&c.length&&!r(c)&&!r(c.parent())&&(c.is("img")||!(o.originalEvent.clientX>c[0].clientWidth+c.offset().left))){if(!u||d.isAnimating||d.isClosing)return o.stopPropagation(),void o.preventDefault();if(i.realPoints=i.startPoints=a(o),i.startPoints.length){if(u.touch&&o.stopPropagation(),i.startEvent=o,i.canTap=!0,i.$target=c,i.$content=p,i.opts=u.opts.touch,i.isPanning=!1,i.isSwiping=!1,i.isZooming=!1,i.isScrolling=!1,i.canPan=d.canPan(),i.startTime=(new Date).getTime(),i.distanceX=i.distanceY=i.distance=0,i.canvasWidth=Math.round(f[0].clientWidth),i.canvasHeight=Math.round(f[0].clientHeight),i.contentLastPos=null,i.contentStartPos=n.fancybox.getTranslate(i.$content)||{top:0,left:0},i.sliderStartPos=i.sliderLastPos||n.fancybox.getTranslate(f),i.stagePos=n.fancybox.getTranslate(d.$refs.stage),i.sliderStartPos.top-=i.stagePos.top,i.sliderStartPos.left-=i.stagePos.left,i.contentStartPos.top-=i.stagePos.top,i.contentStartPos.left-=i.stagePos.left,n(e).off(".fb.touch").on(h?"touchend.fb.touch touchcancel.fb.touch":"mouseup.fb.touch mouseleave.fb.touch",n.proxy(i,"ontouchend")).on(h?"touchmove.fb.touch":"mousemove.fb.touch",n.proxy(i,"ontouchmove")),n.fancybox.isMobile&&e.addEventListener("scroll",i.onscroll,!0),!i.opts&&!i.canPan||!c.is(i.$stage)&&!i.$stage.find(c).length)return void(c.is(".fancybox-image")&&o.preventDefault());i.isScrollable=l(c)||l(c.parent()),n.fancybox.isMobile&&i.isScrollable||o.preventDefault(),(1===i.startPoints.length||u.hasError)&&(i.canPan?(n.fancybox.stop(i.$content),i.$content.css("transition-duration",""),i.isPanning=!0):i.isSwiping=!0,i.$container.addClass("fancybox-is-grabbing")),2===i.startPoints.length&&"image"===u.type&&(u.isLoaded||u.$ghost)&&(i.canTap=!1,i.isSwiping=!1,i.isPanning=!1,i.isZooming=!0,n.fancybox.stop(i.$content),i.$content.css("transition-duration",""),i.centerPointStartX=.5*(i.startPoints[0].x+i.startPoints[1].x)-n(t).scrollLeft(),i.centerPointStartY=.5*(i.startPoints[0].y+i.startPoints[1].y)-n(t).scrollTop(),i.percentageOfImageAtPinchPointX=(i.centerPointStartX-i.contentStartPos.left)/i.contentStartPos.width,i.percentageOfImageAtPinchPointY=(i.centerPointStartY-i.contentStartPos.top)/i.contentStartPos.height,i.startDistanceBetweenFingers=s(i.startPoints[0],i.startPoints[1]))}}},d.prototype.onscroll=function(t){var n=this;n.isScrolling=!0,e.removeEventListener("scroll",n.onscroll,!0)},d.prototype.ontouchmove=function(t){var e=this;return void 0!==t.originalEvent.buttons&&0===t.originalEvent.buttons?void e.ontouchend(t):e.isScrolling?void(e.canTap=!1):(e.newPoints=a(t),void((e.opts||e.canPan)&&e.newPoints.length&&e.newPoints.length&&(e.isSwiping&&e.isSwiping===!0||t.preventDefault(),e.distanceX=s(e.newPoints[0],e.startPoints[0],"x"),e.distanceY=s(e.newPoints[0],e.startPoints[0],"y"),e.distance=s(e.newPoints[0],e.startPoints[0]),e.distance>0&&(e.isSwiping?e.onSwipe(t):e.isPanning?e.onPan():e.isZooming&&e.onZoom()))))},d.prototype.onSwipe=function(e){var a,s=this,r=s.isSwiping,c=s.sliderStartPos.left||0;if(r!==!0)"x"==r&&(s.distanceX>0&&(s.instance.group.length<2||0===s.instance.current.index&&!s.instance.current.opts.loop)?c+=Math.pow(s.distanceX,.8):s.distanceX<0&&(s.instance.group.length<2||s.instance.current.index===s.instance.group.length-1&&!s.instance.current.opts.loop)?c-=Math.pow(-s.distanceX,.8):c+=s.distanceX),s.sliderLastPos={top:"x"==r?0:s.sliderStartPos.top+s.distanceY,left:c},s.requestId&&(i(s.requestId),s.requestId=null),s.requestId=o(function(){s.sliderLastPos&&(n.each(s.instance.slides,function(t,e){var o=e.pos-s.instance.currPos;n.fancybox.setTranslate(e.$slide,{top:s.sliderLastPos.top,left:s.sliderLastPos.left+o*s.canvasWidth+o*e.opts.gutter})}),s.$container.addClass("fancybox-is-sliding"))});else if(Math.abs(s.distance)>10){if(s.canTap=!1,s.instance.group.length<2&&s.opts.vertical?s.isSwiping="y":s.instance.isDragging||s.opts.vertical===!1||"auto"===s.opts.vertical&&n(t).width()>800?s.isSwiping="x":(a=Math.abs(180*Math.atan2(s.distanceY,s.distanceX)/Math.PI),s.isSwiping=a>45&&a<135?"y":"x"),s.canTap=!1,"y"===s.isSwiping&&n.fancybox.isMobile&&s.isScrollable)return void(s.isScrolling=!0);s.instance.isDragging=s.isSwiping,s.startPoints=s.newPoints,n.each(s.instance.slides,function(t,e){n.fancybox.stop(e.$slide),e.$slide.css("transition-duration",""),e.inTransition=!1,e.pos===s.instance.current.pos&&(s.sliderStartPos.left=n.fancybox.getTranslate(e.$slide).left-n.fancybox.getTranslate(s.instance.$refs.stage).left)}),s.instance.SlideShow&&s.instance.SlideShow.isActive&&s.instance.SlideShow.stop()}},d.prototype.onPan=function(){var t=this;return s(t.newPoints[0],t.realPoints[0])<(n.fancybox.isMobile?10:5)?void(t.startPoints=t.newPoints):(t.canTap=!1,t.contentLastPos=t.limitMovement(),t.requestId&&(i(t.requestId),t.requestId=null),void(t.requestId=o(function(){n.fancybox.setTranslate(t.$content,t.contentLastPos)})))},d.prototype.limitMovement=function(){var t,e,n,o,i,a,s=this,r=s.canvasWidth,c=s.canvasHeight,l=s.distanceX,d=s.distanceY,u=s.contentStartPos,f=u.left,p=u.top,h=u.width,g=u.height;return i=h>r?f+l:f,a=p+d,t=Math.max(0,.5*r-.5*h),e=Math.max(0,.5*c-.5*g),n=Math.min(r-h,.5*r-.5*h),o=Math.min(c-g,.5*c-.5*g),l>0&&i>t&&(i=t-1+Math.pow(-t+f+l,.8)||0),l<0&&i<n&&(i=n+1-Math.pow(n-f-l,.8)||0),d>0&&a>e&&(a=e-1+Math.pow(-e+p+d,.8)||0),d<0&&a<o&&(a=o+1-Math.pow(o-p-d,.8)||0),{top:a,left:i}},d.prototype.limitPosition=function(t,e,n,o){var i=this,a=i.canvasWidth,s=i.canvasHeight;return n>a?(t=t>0?0:t,t=t<a-n?a-n:t):t=Math.max(0,a/2-n/2),o>s?(e=e>0?0:e,e=e<s-o?s-o:e):e=Math.max(0,s/2-o/2),{top:e,left:t}},d.prototype.onZoom=function(){var e=this,a=e.contentStartPos,r=a.width,c=a.height,l=a.left,d=a.top,u=s(e.newPoints[0],e.newPoints[1]),f=u/e.startDistanceBetweenFingers,p=Math.floor(r*f),h=Math.floor(c*f),g=(r-p)*e.percentageOfImageAtPinchPointX,b=(c-h)*e.percentageOfImageAtPinchPointY,m=(e.newPoints[0].x+e.newPoints[1].x)/2-n(t).scrollLeft(),v=(e.newPoints[0].y+e.newPoints[1].y)/2-n(t).scrollTop(),y=m-e.centerPointStartX,x=v-e.centerPointStartY,w=l+(g+y),$=d+(b+x),S={top:$,left:w,scaleX:f,scaleY:f};e.canTap=!1,e.newWidth=p,e.newHeight=h,e.contentLastPos=S,e.requestId&&(i(e.requestId),e.requestId=null),e.requestId=o(function(){n.fancybox.setTranslate(e.$content,e.contentLastPos)})},d.prototype.ontouchend=function(t){var o=this,s=Math.max((new Date).getTime()-o.startTime,1),r=o.isSwiping,c=o.isPanning,l=o.isZooming,d=o.isScrolling;return o.endPoints=a(t),o.$container.removeClass("fancybox-is-grabbing"),n(e).off(".fb.touch"),e.removeEventListener("scroll",o.onscroll,!0),o.requestId&&(i(o.requestId),o.requestId=null),o.isSwiping=!1,o.isPanning=!1,o.isZooming=!1,o.isScrolling=!1,o.instance.isDragging=!1,o.canTap?o.onTap(t):(o.speed=366,o.velocityX=o.distanceX/s*.5,o.velocityY=o.distanceY/s*.5,o.speedX=Math.max(.5*o.speed,Math.min(1.5*o.speed,1/Math.abs(o.velocityX)*o.speed)),void(c?o.endPanning():l?o.endZooming():o.endSwiping(r,d)))},d.prototype.endSwiping=function(t,e){var o=this,i=!1,a=o.instance.group.length;o.sliderLastPos=null,"y"==t&&!e&&Math.abs(o.distanceY)>50?(n.fancybox.animate(o.instance.current.$slide,{top:o.sliderStartPos.top+o.distanceY+150*o.velocityY,opacity:0},200),i=o.instance.close(!0,200)):"x"==t&&o.distanceX>50&&a>1?i=o.instance.previous(o.speedX):"x"==t&&o.distanceX<-50&&a>1&&(i=o.instance.next(o.speedX)),i!==!1||"x"!=t&&"y"!=t||(e||a<2?o.instance.centerSlide(o.instance.current,150):o.instance.jumpTo(o.instance.current.index)),o.$container.removeClass("fancybox-is-sliding")},d.prototype.endPanning=function(){var t,e,o,i=this;i.contentLastPos&&(i.opts.momentum===!1?(t=i.contentLastPos.left,e=i.contentLastPos.top):(t=i.contentLastPos.left+i.velocityX*i.speed,e=i.contentLastPos.top+i.velocityY*i.speed),o=i.limitPosition(t,e,i.contentStartPos.width,i.contentStartPos.height),o.width=i.contentStartPos.width,o.height=i.contentStartPos.height,n.fancybox.animate(i.$content,o,330))},d.prototype.endZooming=function(){var t,e,o,i,a=this,s=a.instance.current,r=a.newWidth,c=a.newHeight;a.contentLastPos&&(t=a.contentLastPos.left,e=a.contentLastPos.top,i={top:e,left:t,width:r,height:c,scaleX:1,scaleY:1},n.fancybox.setTranslate(a.$content,i),r<a.canvasWidth&&c<a.canvasHeight?a.instance.scaleToFit(150):r>s.width||c>s.height?a.instance.scaleToActual(a.centerPointStartX,a.centerPointStartY,150):(o=a.limitPosition(t,e,r,c),n.fancybox.setTranslate(a.$content,n.fancybox.getTranslate(a.$content)),n.fancybox.animate(a.$content,o,150)))},d.prototype.onTap=function(e){var o,i=this,s=n(e.target),r=i.instance,c=r.current,l=e&&a(e)||i.startPoints,d=l[0]?l[0].x-n(t).scrollLeft()-i.stagePos.left:0,u=l[0]?l[0].y-n(t).scrollTop()-i.stagePos.top:0,f=function(t){var o=c.opts[t];if(n.isFunction(o)&&(o=o.apply(r,[c,e])),o)switch(o){case"close":r.close(i.startEvent);break;case"toggleControls":r.toggleControls(!0);break;case"next":r.next();break;case"nextOrClose":r.group.length>1?r.next():r.close(i.startEvent);break;case"zoom":"image"==c.type&&(c.isLoaded||c.$ghost)&&(r.canPan()?r.scaleToFit():r.isScaledDown()?r.scaleToActual(d,u):r.group.length<2&&r.close(i.startEvent))}};if((!e.originalEvent||2!=e.originalEvent.button)&&(s.is("img")||!(d>s[0].clientWidth+s.offset().left))){if(s.is(".fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-container"))o="Outside";else if(s.is(".fancybox-slide"))o="Slide";else{if(!r.current.$content||!r.current.$content.find(s).addBack().filter(s).length)return;o="Content"}if(i.tapped){if(clearTimeout(i.tapped),i.tapped=null,Math.abs(d-i.tapX)>50||Math.abs(u-i.tapY)>50)return this;f("dblclick"+o)}else i.tapX=d,i.tapY=u,c.opts["dblclick"+o]&&c.opts["dblclick"+o]!==c.opts["click"+o]?i.tapped=setTimeout(function(){i.tapped=null,f("click"+o)},500):f("click"+o);return this}},n(e).on("onActivate.fb",function(t,e){e&&!e.Guestures&&(e.Guestures=new d(e))})}(window,document,jQuery),function(t,e){"use strict";e.extend(!0,e.fancybox.defaults,{btnTpl:{slideShow:'<button data-fancybox-play class="fancybox-button fancybox-button--play" title="{{PLAY_START}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.5 5.4v13.2l11-6.6z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.33 5.75h2.2v12.5h-2.2V5.75zm5.15 0h2.2v12.5h-2.2V5.75z"/></svg></button>'},slideShow:{autoStart:!1,speed:3e3}});var n=function(t){this.instance=t,this.init()};e.extend(n.prototype,{timer:null,isActive:!1,$button:null,init:function(){var t=this;t.$button=t.instance.$refs.toolbar.find("[data-fancybox-play]").on("click",function(){t.toggle()}),(t.instance.group.length<2||!t.instance.group[t.instance.currIndex].opts.slideShow)&&t.$button.hide()},set:function(t){var e=this,n=e.instance,o=n.current,i=function(){e.isActive&&n.jumpTo((n.currIndex+1)%n.group.length)};o&&(t===!0||o.opts.loop||n.currIndex<n.group.length-1)?e.timer=setTimeout(function(){var t;e.isActive&&(t=o.$slide.find("video,audio").filter(":visible:first"),t.length?t.one("ended",i):i())},o.opts.slideShow.speed):(e.stop(),n.idleSecondsCounter=0,n.showControls())},clear:function(){var t=this;clearTimeout(t.timer),t.timer=null},start:function(){var t=this,e=t.instance.current;e&&(t.$button.attr("title",e.opts.i18n[e.opts.lang].PLAY_STOP).removeClass("fancybox-button--play").addClass("fancybox-button--pause"),t.isActive=!0,e.isComplete&&t.set(!0),t.instance.trigger("onSlideShowChange",!0))},stop:function(){var t=this,e=t.instance.current;t.clear(),t.$button.attr("title",e.opts.i18n[e.opts.lang].PLAY_START).removeClass("fancybox-button--pause").addClass("fancybox-button--play"),t.isActive=!1,t.instance.trigger("onSlideShowChange",!1)},toggle:function(){var t=this;t.isActive?t.stop():t.start()}}),e(t).on({"onInit.fb":function(t,e){e&&!e.SlideShow&&(e.SlideShow=new n(e))},"beforeShow.fb":function(t,e,n,o){var i=e&&e.SlideShow;o?i&&n.opts.slideShow.autoStart&&i.start():i&&i.isActive&&i.clear()},"afterShow.fb":function(t,e,n){var o=e&&e.SlideShow;o&&o.isActive&&o.set()},"afterKeydown.fb":function(n,o,i,a,s){var r=o&&o.SlideShow;!r||!i.opts.slideShow||80!==s&&32!==s||e(t.activeElement).is("button,a,input")||(a.preventDefault(),r.toggle())},"beforeClose.fb onDeactivate.fb":function(t,e){var n=e&&e.SlideShow;n&&n.stop()}}),e(t).on("visibilitychange",function(){var n=e.fancybox.getInstance(),o=n&&n.SlideShow;o&&o.isActive&&(t.hidden?o.clear():o.set())})}(document,jQuery),function(t,e){"use strict";var n=function(){for(var e=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],n={},o=0;o<e.length;o++){var i=e[o];if(i&&i[1]in t){for(var a=0;a<i.length;a++)n[e[0][a]]=i[a];return n}}return!1}();if(n){var o={request:function(e){e=e||t.documentElement,e[n.requestFullscreen](e.ALLOW_KEYBOARD_INPUT)},exit:function(){t[n.exitFullscreen]()},toggle:function(e){e=e||t.documentElement,this.isFullscreen()?this.exit():this.request(e)},isFullscreen:function(){return Boolean(t[n.fullscreenElement])},enabled:function(){return Boolean(t[n.fullscreenEnabled])}};e.extend(!0,e.fancybox.defaults,{btnTpl:{fullScreen:'<button data-fancybox-fullscreen class="fancybox-button fancybox-button--fsenter" title="{{FULL_SCREEN}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"/></svg></button>'},fullScreen:{autoStart:!1}}),e(t).on(n.fullscreenchange,function(){var t=o.isFullscreen(),n=e.fancybox.getInstance();n&&(n.current&&"image"===n.current.type&&n.isAnimating&&(n.current.$content.css("transition","none"),n.isAnimating=!1,n.update(!0,!0,0)),n.trigger("onFullscreenChange",t),n.$refs.container.toggleClass("fancybox-is-fullscreen",t),n.$refs.toolbar.find("[data-fancybox-fullscreen]").toggleClass("fancybox-button--fsenter",!t).toggleClass("fancybox-button--fsexit",t))})}e(t).on({"onInit.fb":function(t,e){var i;return n?void(e&&e.group[e.currIndex].opts.fullScreen?(i=e.$refs.container,i.on("click.fb-fullscreen","[data-fancybox-fullscreen]",function(t){t.stopPropagation(),t.preventDefault(),o.toggle()}),e.opts.fullScreen&&e.opts.fullScreen.autoStart===!0&&o.request(),e.FullScreen=o):e&&e.$refs.toolbar.find("[data-fancybox-fullscreen]").hide()):void e.$refs.toolbar.find("[data-fancybox-fullscreen]").remove()},"afterKeydown.fb":function(t,e,n,o,i){e&&e.FullScreen&&70===i&&(o.preventDefault(),e.FullScreen.toggle())},"beforeClose.fb":function(t,e){e&&e.FullScreen&&e.$refs.container.hasClass("fancybox-is-fullscreen")&&o.exit()}})}(document,jQuery),function(t,e){"use strict";var n="fancybox-thumbs",o=n+"-active";e.fancybox.defaults=e.extend(!0,{btnTpl:{thumbs:'<button data-fancybox-thumbs class="fancybox-button fancybox-button--thumbs" title="{{THUMBS}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14.59 14.59h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76H5.65V5.65z"/></svg></button>'},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"}},e.fancybox.defaults);var i=function(t){this.init(t)};e.extend(i.prototype,{$button:null,$grid:null,$list:null,isVisible:!1,isActive:!1,init:function(t){var e,n,o=this;o.instance=t,t.Thumbs=o,o.opts=t.group[t.currIndex].opts.thumbs,e=t.group[0],e=e.opts.thumb||!(!e.opts.$thumb||!e.opts.$thumb.length)&&e.opts.$thumb.attr("src"),t.group.length>1&&(n=t.group[1],n=n.opts.thumb||!(!n.opts.$thumb||!n.opts.$thumb.length)&&n.opts.$thumb.attr("src")),o.$button=t.$refs.toolbar.find("[data-fancybox-thumbs]"),o.opts&&e&&n?(o.$button.show().on("click",function(){o.toggle()}),o.isActive=!0):o.$button.hide()},create:function(){var t,o=this,i=o.instance,a=o.opts.parentEl,s=[];o.$grid||(o.$grid=e('<div class="'+n+" "+n+"-"+o.opts.axis+'"></div>').appendTo(i.$refs.container.find(a).addBack().filter(a)),o.$grid.on("click","a",function(){i.jumpTo(e(this).attr("data-index"))})),o.$list||(o.$list=e('<div class="'+n+'__list">').appendTo(o.$grid)),e.each(i.group,function(e,n){t=n.opts.thumb||(n.opts.$thumb?n.opts.$thumb.attr("src"):null),t||"image"!==n.type||(t=n.src),s.push('<a href="javascript:;" tabindex="0" data-index="'+e+'" '+(t&&t.length?' style="background-image:url('+t+')" />':"")+"></a>")}),o.$list[0].innerHTML=s.join(""),"x"===o.opts.axis&&o.$list.width(parseInt(o.$grid.css("padding-right"),10)+i.group.length*o.$list.children().eq(0).outerWidth(!0))},focus:function(t){var e,n,i=this,a=i.$list,s=i.$grid;i.instance.current&&(e=a.children().removeClass(o).filter('[data-index="'+i.instance.current.index+'"]').addClass(o),n=e.position(),"y"===i.opts.axis&&(n.top<0||n.top>a.height()-e.outerHeight())?a.stop().animate({scrollTop:a.scrollTop()+n.top},t):"x"===i.opts.axis&&(n.left<s.scrollLeft()||n.left>s.scrollLeft()+(s.width()-e.outerWidth()))&&a.parent().stop().animate({scrollLeft:n.left},t))},update:function(){var t=this;t.instance.$refs.container.toggleClass("fancybox-show-thumbs",this.isVisible),t.isVisible?(t.$grid||t.create(),t.instance.trigger("onThumbsShow"),t.focus(0)):t.$grid&&t.instance.trigger("onThumbsHide"),t.instance.update()},hide:function(){this.isVisible=!1,this.update()},show:function(){this.isVisible=!0,this.update()},toggle:function(){this.isVisible=!this.isVisible,this.update()}}),e(t).on({"onInit.fb":function(t,e){var n;e&&!e.Thumbs&&(n=new i(e),n.isActive&&n.opts.autoStart===!0&&n.show())},"beforeShow.fb":function(t,e,n,o){var i=e&&e.Thumbs;i&&i.isVisible&&i.focus(o?0:250)},"afterKeydown.fb":function(t,e,n,o,i){var a=e&&e.Thumbs;a&&a.isActive&&71===i&&(o.preventDefault(),a.toggle())},"beforeClose.fb":function(t,e){var n=e&&e.Thumbs;n&&n.isVisible&&n.opts.hideOnClose!==!1&&n.$grid.hide()}})}(document,jQuery),function(t,e){"use strict";function n(t){var e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};return String(t).replace(/[&<>"'`=\/]/g,function(t){return e[t]})}e.extend(!0,e.fancybox.defaults,{btnTpl:{share:'<button data-fancybox-share class="fancybox-button fancybox-button--share" title="{{SHARE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.55 19c1.4-8.4 9.1-9.8 11.9-9.8V5l7 7-7 6.3v-3.5c-2.8 0-10.5 2.1-11.9 4.2z"/></svg></button>'},share:{url:function(t,e){return!t.currentHash&&"inline"!==e.type&&"html"!==e.type&&(e.origSrc||e.src)||window.location},tpl:'<div class="fancybox-share"><h1>{{SHARE}}</h1><p><a class="fancybox-share__button fancybox-share__button--fb" href="https://www.facebook.com/sharer/sharer.php?u={{url}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m287 456v-299c0-21 6-35 35-35h38v-63c-7-1-29-3-55-3-54 0-91 33-91 94v306m143-254h-205v72h196" /></svg><span>Facebook</span></a><a class="fancybox-share__button fancybox-share__button--tw" href="https://twitter.com/intent/tweet?url={{url}}&text={{descr}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m456 133c-14 7-31 11-47 13 17-10 30-27 37-46-15 10-34 16-52 20-61-62-157-7-141 75-68-3-129-35-169-85-22 37-11 86 26 109-13 0-26-4-37-9 0 39 28 72 65 80-12 3-25 4-37 2 10 33 41 57 77 57-42 30-77 38-122 34 170 111 378-32 359-208 16-11 30-25 41-42z" /></svg><span>Twitter</span></a><a class="fancybox-share__button fancybox-share__button--pt" href="https://www.pinterest.com/pin/create/button/?url={{url}}&description={{descr}}&media={{media}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m265 56c-109 0-164 78-164 144 0 39 15 74 47 87 5 2 10 0 12-5l4-19c2-6 1-8-3-13-9-11-15-25-15-45 0-58 43-110 113-110 62 0 96 38 96 88 0 67-30 122-73 122-24 0-42-19-36-44 6-29 20-60 20-81 0-19-10-35-31-35-25 0-44 26-44 60 0 21 7 36 7 36l-30 125c-8 37-1 83 0 87 0 3 4 4 5 2 2-3 32-39 42-75l16-64c8 16 31 29 56 29 74 0 124-67 124-157 0-69-58-132-146-132z" fill="#fff"/></svg><span>Pinterest</span></a></p><p><input class="fancybox-share__input" type="text" value="{{url_raw}}" onclick="select()" /></p></div>'}}),e(t).on("click","[data-fancybox-share]",function(){var t,o,i=e.fancybox.getInstance(),a=i.current||null;a&&("function"===e.type(a.opts.share.url)&&(t=a.opts.share.url.apply(a,[i,a])),o=a.opts.share.tpl.replace(/\{\{media\}\}/g,"image"===a.type?encodeURIComponent(a.src):"").replace(/\{\{url\}\}/g,encodeURIComponent(t)).replace(/\{\{url_raw\}\}/g,n(t)).replace(/\{\{descr\}\}/g,i.$caption?encodeURIComponent(i.$caption.text()):""),e.fancybox.open({src:i.translate(i,o),type:"html",opts:{touch:!1,animationEffect:!1,afterLoad:function(t,e){i.$refs.container.one("beforeClose.fb",function(){t.close(null,0)}),e.$content.find(".fancybox-share__button").click(function(){return window.open(this.href,"Share","width=550, height=450"),!1})},mobile:{autoFocus:!1}}}))})}(document,jQuery),function(t,e,n){"use strict";function o(){var e=t.location.hash.substr(1),n=e.split("-"),o=n.length>1&&/^\+?\d+$/.test(n[n.length-1])?parseInt(n.pop(-1),10)||1:1,i=n.join("-");return{hash:e,index:o<1?1:o,gallery:i}}function i(t){""!==t.gallery&&n("[data-fancybox='"+n.escapeSelector(t.gallery)+"']").eq(t.index-1).focus().trigger("click.fb-start")}function a(t){var e,n;return!!t&&(e=t.current?t.current.opts:t.opts,n=e.hash||(e.$orig?e.$orig.data("fancybox")||e.$orig.data("fancybox-trigger"):""),""!==n&&n)}n.escapeSelector||(n.escapeSelector=function(t){var e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,n=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t};return(t+"").replace(e,n)}),n(function(){n.fancybox.defaults.hash!==!1&&(n(e).on({"onInit.fb":function(t,e){var n,i;e.group[e.currIndex].opts.hash!==!1&&(n=o(),i=a(e),i&&n.gallery&&i==n.gallery&&(e.currIndex=n.index-1))},"beforeShow.fb":function(n,o,i,s){var r;i&&i.opts.hash!==!1&&(r=a(o),r&&(o.currentHash=r+(o.group.length>1?"-"+(i.index+1):""),t.location.hash!=="#"+o.currentHash&&(s&&!o.origHash&&(o.origHash=t.location.hash),o.hashTimer&&clearTimeout(o.hashTimer),o.hashTimer=setTimeout(function(){"replaceState"in t.history?(t.history[s?"pushState":"replaceState"]({},e.title,t.location.pathname+t.location.search+"#"+o.currentHash),s&&(o.hasCreatedHistory=!0)):t.location.hash=o.currentHash,o.hashTimer=null},300))))},"beforeClose.fb":function(n,o,i){i.opts.hash!==!1&&(clearTimeout(o.hashTimer),o.currentHash&&o.hasCreatedHistory?t.history.back():o.currentHash&&("replaceState"in t.history?t.history.replaceState({},e.title,t.location.pathname+t.location.search+(o.origHash||"")):t.location.hash=o.origHash),o.currentHash=null)}}),n(t).on("hashchange.fb",function(){var t=o(),e=null;n.each(n(".fancybox-container").get().reverse(),function(t,o){var i=n(o).data("FancyBox");if(i&&i.currentHash)return e=i,!1}),e?e.currentHash===t.gallery+"-"+t.index||1===t.index&&e.currentHash==t.gallery||(e.currentHash=null,e.close()):""!==t.gallery&&i(t)}),setTimeout(function(){n.fancybox.getInstance()||i(o())},50))})}(window,document,jQuery),function(t,e){"use strict";var n=(new Date).getTime();e(t).on({"onInit.fb":function(t,e,o){e.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll",function(t){
13
  var o=e.current,i=(new Date).getTime();e.group.length<2||o.opts.wheel===!1||"auto"===o.opts.wheel&&"image"!==o.type||(t.preventDefault(),t.stopPropagation(),o.$slide.hasClass("fancybox-animated")||(t=t.originalEvent||t,i-n<250||(n=i,e[(-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)<0?"next":"previous"]())))})}})}(document,jQuery);
14
 
 
 
15
  function fv_player_colorbox_title() {
16
  var that = jQuery(this), title = that.attr('title');
17
  if( title && title.length > 0 ) return title;
@@ -140,18 +142,36 @@ function fv_fancybox_check_size() {
140
 
141
  function fv_lightbox_flowplayer_shutdown(e) {
142
  jQuery('.flowplayer').each( function() {
143
- var api = jQuery(this).data("flowplayer");
 
 
 
 
 
144
  if( typeof(api) == "undefined") {
145
  return;
146
  }
 
147
  if( e.type == 'afterShow' && jQuery(this).parents('.fancybox-slide--current').length ) return;
148
- if( api.ready ) {
149
- api.unload();
 
 
 
 
150
  }
151
- if( api.loading ) {
 
 
 
 
 
 
152
  api.one('ready',function(){
153
- if(api.engine.engineName === 'fvyoutube')
154
- api.unload();
 
 
155
  })
156
  }
157
  } );
12
  t.idleSecondsCounter=0,n.toggleClass("fancybox-show-toolbar",!(!e.toolbar||!e.buttons)).toggleClass("fancybox-show-infobar",!!(e.infobar&&t.group.length>1)).toggleClass("fancybox-show-caption",!!t.$caption).toggleClass("fancybox-show-nav",!!(e.arrows&&t.group.length>1)).toggleClass("fancybox-is-modal",!!e.modal)},toggleControls:function(){this.isHiddenControls?this.showControls():this.hideControls()}}),n.fancybox={version:"3.4.1",defaults:a,getInstance:function(t){var e=n('.fancybox-container:not(".fancybox-is-closing"):last').data("FancyBox"),o=Array.prototype.slice.call(arguments,1);return e instanceof h&&("string"===n.type(t)?e[t].apply(e,o):"function"===n.type(t)&&t.apply(e,o),e)},open:function(t,e,n){return new h(t,e,n)},close:function(t){var e=this.getInstance();e&&(e.close(),t===!0&&this.close(t))},destroy:function(){this.close(!0),r.add("body").off("click.fb-start","**")},isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:function(){var n=e.createElement("div");return t.getComputedStyle&&t.getComputedStyle(n)&&t.getComputedStyle(n).getPropertyValue("transform")&&!(e.documentMode&&e.documentMode<11)}(),getTranslate:function(t){var e;return!(!t||!t.length)&&(e=t[0].getBoundingClientRect(),{top:e.top||0,left:e.left||0,width:e.width,height:e.height,opacity:parseFloat(t.css("opacity"))})},setTranslate:function(t,e){var n="",i={};if(t&&e)return e.left===o&&e.top===o||(n=(e.left===o?t.position().left:e.left)+"px, "+(e.top===o?t.position().top:e.top)+"px",n=this.use3d?"translate3d("+n+", 0px)":"translate("+n+")"),e.scaleX!==o&&e.scaleY!==o&&(n=(n.length?n+" ":"")+"scale("+e.scaleX+", "+e.scaleY+")"),n.length&&(i.transform=n),e.opacity!==o&&(i.opacity=e.opacity),e.width!==o&&(i.width=e.width),e.height!==o&&(i.height=e.height),t.css(i)},animate:function(t,e,i,a,s){var r,c=!1;n.isFunction(i)&&(a=i,i=null),n.isPlainObject(e)||t.removeAttr("style"),n.fancybox.stop(t),t.on(u,function(o){(!o||!o.originalEvent||t.is(o.originalEvent.target)&&"z-index"!=o.originalEvent.propertyName)&&(n.fancybox.stop(t),c&&n.fancybox.setTranslate(t,c),n.isNumeric(i)&&t.css("transition-duration",""),n.isPlainObject(e)?s===!1&&t.removeAttr("style"):s!==!0&&t.removeClass(e),n.isFunction(a)&&a(o))}),n.isNumeric(i)&&t.css("transition-duration",i+"ms"),n.isPlainObject(e)?(e.scaleX!==o&&e.scaleY!==o&&(r=n.fancybox.getTranslate(t),c=n.extend({},e,{width:r.width*e.scaleX,height:r.height*e.scaleY,scaleX:1,scaleY:1}),delete e.width,delete e.height,t.parent().hasClass("fancybox-slide--image")&&t.parent().addClass("fancybox-is-scaling")),n.fancybox.setTranslate(t,e)):t.addClass(e),t.data("timer",setTimeout(function(){t.trigger("transitionend")},i+16))},stop:function(t,e){t&&t.length&&(clearTimeout(t.data("timer")),e&&t.trigger(u),t.off(u).css("transition-duration",""),t.parent().removeClass("fancybox-is-scaling"))}},n.fn.fancybox=function(t){var e;return t=t||{},e=t.selector||!1,e?n("body").off("click.fb-start",e).on("click.fb-start",e,{options:t},i):this.off("click.fb-start").on("click.fb-start",{items:this,options:t},i),this},r.on("click.fb-start","[data-fancybox]",i),r.on("click.fb-start","[data-fancybox-trigger]",function(t){n('[data-fancybox="'+n(this).attr("data-fancybox-trigger")+'"]').eq(n(this).attr("data-fancybox-index")||0).trigger("click.fb-start",{$trigger:n(this)})}),function(){var t=".fancybox-button",e="fancybox-focus",o=null;r.on("mousedown mouseup focus blur",t,function(i){switch(i.type){case"mousedown":o=n(this);break;case"mouseup":o=null;break;case"focusin":n(t).removeClass(e),n(this).is(o)||n(this).is("[disabled]")||n(this).addClass(e);break;case"focusout":n(t).removeClass(e)}})}()}}(window,document,jQuery),function(t){"use strict";var e=function(e,n,o){if(e)return o=o||"","object"===t.type(o)&&(o=t.param(o,!0)),t.each(n,function(t,n){e=e.replace("$"+t,n||"")}),o.length&&(e+=(e.indexOf("?")>0?"&":"?")+o),e},n={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},paramPlace:8,type:"iframe",url:"//www.youtube-nocookie.com/embed/$4",thumb:"//img.youtube.com/vi/$4/hqdefault.jpg"},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1,api:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/?ll="+(t[9]?t[9]+"&z="+Math.floor(t[10])+(t[12]?t[12].replace(/^\//,"&"):""):t[12]+"").replace(/\?/,"&")+"&output="+(t[12]&&t[12].indexOf("layer=c")>0?"svembed":"embed")}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/maps?q="+t[5].replace("query=","q=").replace("api=1","")+"&output=embed"}}};t(document).on("objectNeedsType.fb",function(o,i,a){var s,r,c,l,d,u,f,p=a.src||"",h=!1;s=t.extend(!0,{},n,a.opts.media),t.each(s,function(n,o){if(c=p.match(o.matcher)){if(h=o.type,f=n,u={},o.paramPlace&&c[o.paramPlace]){d=c[o.paramPlace],"?"==d[0]&&(d=d.substring(1)),d=d.split("&");for(var i=0;i<d.length;++i){var s=d[i].split("=",2);2==s.length&&(u[s[0]]=decodeURIComponent(s[1].replace(/\+/g," ")))}}return l=t.extend(!0,{},o.params,a.opts[n],u),p="function"===t.type(o.url)?o.url.call(this,c,l,a):e(o.url,c,l),r="function"===t.type(o.thumb)?o.thumb.call(this,c,l,a):e(o.thumb,c),"youtube"===n?p=p.replace(/&t=((\d+)m)?(\d+)s/,function(t,e,n,o){return"&start="+((n?60*parseInt(n,10):0)+parseInt(o,10))}):"vimeo"===n&&(p=p.replace("&%23","#")),!1}}),h?(a.opts.thumb||a.opts.$thumb&&a.opts.$thumb.length||(a.opts.thumb=r),"iframe"===h&&(a.opts=t.extend(!0,a.opts,{iframe:{preload:!1,attr:{scrolling:"no"}}})),t.extend(a,{type:h,src:p,origSrc:a.src,contentSource:f,contentType:"image"===h?"image":"gmap_place"==f||"gmap_search"==f?"map":"video"})):p&&(a.type=a.opts.defaultType)})}(jQuery),function(t,e,n){"use strict";var o=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),i=function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e)}}(),a=function(e){var n=[];e=e.originalEvent||e||t.e,e=e.touches&&e.touches.length?e.touches:e.changedTouches&&e.changedTouches.length?e.changedTouches:[e];for(var o in e)e[o].pageX?n.push({x:e[o].pageX,y:e[o].pageY}):e[o].clientX&&n.push({x:e[o].clientX,y:e[o].clientY});return n},s=function(t,e,n){return e&&t?"x"===n?t.x-e.x:"y"===n?t.y-e.y:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0},r=function(t){if(t.is('a,area,button,[role="button"],input,label,select,summary,textarea,video,audio')||n.isFunction(t.get(0).onclick)||t.data("selectable"))return!0;for(var e=0,o=t[0].attributes,i=o.length;e<i;e++)if("data-fancybox-"===o[e].nodeName.substr(0,14))return!0;return!1},c=function(e){var n=t.getComputedStyle(e)["overflow-y"],o=t.getComputedStyle(e)["overflow-x"],i=("scroll"===n||"auto"===n)&&e.scrollHeight>e.clientHeight,a=("scroll"===o||"auto"===o)&&e.scrollWidth>e.clientWidth;return i||a},l=function(t){for(var e=!1;;){if(e=c(t.get(0)))break;if(t=t.parent(),!t.length||t.hasClass("fancybox-stage")||t.is("body"))break}return e},d=function(t){var e=this;e.instance=t,e.$bg=t.$refs.bg,e.$stage=t.$refs.stage,e.$container=t.$refs.container,e.destroy(),e.$container.on("touchstart.fb.touch mousedown.fb.touch",n.proxy(e,"ontouchstart"))};d.prototype.destroy=function(){this.$container.off(".fb.touch")},d.prototype.ontouchstart=function(o){var i=this,c=n(o.target),d=i.instance,u=d.current,f=u.$slide,p=u.$content,h="touchstart"==o.type;if(h&&i.$container.off("mousedown.fb.touch"),(!o.originalEvent||2!=o.originalEvent.button)&&f.length&&c.length&&!r(c)&&!r(c.parent())&&(c.is("img")||!(o.originalEvent.clientX>c[0].clientWidth+c.offset().left))){if(!u||d.isAnimating||d.isClosing)return o.stopPropagation(),void o.preventDefault();if(i.realPoints=i.startPoints=a(o),i.startPoints.length){if(u.touch&&o.stopPropagation(),i.startEvent=o,i.canTap=!0,i.$target=c,i.$content=p,i.opts=u.opts.touch,i.isPanning=!1,i.isSwiping=!1,i.isZooming=!1,i.isScrolling=!1,i.canPan=d.canPan(),i.startTime=(new Date).getTime(),i.distanceX=i.distanceY=i.distance=0,i.canvasWidth=Math.round(f[0].clientWidth),i.canvasHeight=Math.round(f[0].clientHeight),i.contentLastPos=null,i.contentStartPos=n.fancybox.getTranslate(i.$content)||{top:0,left:0},i.sliderStartPos=i.sliderLastPos||n.fancybox.getTranslate(f),i.stagePos=n.fancybox.getTranslate(d.$refs.stage),i.sliderStartPos.top-=i.stagePos.top,i.sliderStartPos.left-=i.stagePos.left,i.contentStartPos.top-=i.stagePos.top,i.contentStartPos.left-=i.stagePos.left,n(e).off(".fb.touch").on(h?"touchend.fb.touch touchcancel.fb.touch":"mouseup.fb.touch mouseleave.fb.touch",n.proxy(i,"ontouchend")).on(h?"touchmove.fb.touch":"mousemove.fb.touch",n.proxy(i,"ontouchmove")),n.fancybox.isMobile&&e.addEventListener("scroll",i.onscroll,!0),!i.opts&&!i.canPan||!c.is(i.$stage)&&!i.$stage.find(c).length)return void(c.is(".fancybox-image")&&o.preventDefault());i.isScrollable=l(c)||l(c.parent()),n.fancybox.isMobile&&i.isScrollable||o.preventDefault(),(1===i.startPoints.length||u.hasError)&&(i.canPan?(n.fancybox.stop(i.$content),i.$content.css("transition-duration",""),i.isPanning=!0):i.isSwiping=!0,i.$container.addClass("fancybox-is-grabbing")),2===i.startPoints.length&&"image"===u.type&&(u.isLoaded||u.$ghost)&&(i.canTap=!1,i.isSwiping=!1,i.isPanning=!1,i.isZooming=!0,n.fancybox.stop(i.$content),i.$content.css("transition-duration",""),i.centerPointStartX=.5*(i.startPoints[0].x+i.startPoints[1].x)-n(t).scrollLeft(),i.centerPointStartY=.5*(i.startPoints[0].y+i.startPoints[1].y)-n(t).scrollTop(),i.percentageOfImageAtPinchPointX=(i.centerPointStartX-i.contentStartPos.left)/i.contentStartPos.width,i.percentageOfImageAtPinchPointY=(i.centerPointStartY-i.contentStartPos.top)/i.contentStartPos.height,i.startDistanceBetweenFingers=s(i.startPoints[0],i.startPoints[1]))}}},d.prototype.onscroll=function(t){var n=this;n.isScrolling=!0,e.removeEventListener("scroll",n.onscroll,!0)},d.prototype.ontouchmove=function(t){var e=this;return void 0!==t.originalEvent.buttons&&0===t.originalEvent.buttons?void e.ontouchend(t):e.isScrolling?void(e.canTap=!1):(e.newPoints=a(t),void((e.opts||e.canPan)&&e.newPoints.length&&e.newPoints.length&&(e.isSwiping&&e.isSwiping===!0||t.preventDefault(),e.distanceX=s(e.newPoints[0],e.startPoints[0],"x"),e.distanceY=s(e.newPoints[0],e.startPoints[0],"y"),e.distance=s(e.newPoints[0],e.startPoints[0]),e.distance>0&&(e.isSwiping?e.onSwipe(t):e.isPanning?e.onPan():e.isZooming&&e.onZoom()))))},d.prototype.onSwipe=function(e){var a,s=this,r=s.isSwiping,c=s.sliderStartPos.left||0;if(r!==!0)"x"==r&&(s.distanceX>0&&(s.instance.group.length<2||0===s.instance.current.index&&!s.instance.current.opts.loop)?c+=Math.pow(s.distanceX,.8):s.distanceX<0&&(s.instance.group.length<2||s.instance.current.index===s.instance.group.length-1&&!s.instance.current.opts.loop)?c-=Math.pow(-s.distanceX,.8):c+=s.distanceX),s.sliderLastPos={top:"x"==r?0:s.sliderStartPos.top+s.distanceY,left:c},s.requestId&&(i(s.requestId),s.requestId=null),s.requestId=o(function(){s.sliderLastPos&&(n.each(s.instance.slides,function(t,e){var o=e.pos-s.instance.currPos;n.fancybox.setTranslate(e.$slide,{top:s.sliderLastPos.top,left:s.sliderLastPos.left+o*s.canvasWidth+o*e.opts.gutter})}),s.$container.addClass("fancybox-is-sliding"))});else if(Math.abs(s.distance)>10){if(s.canTap=!1,s.instance.group.length<2&&s.opts.vertical?s.isSwiping="y":s.instance.isDragging||s.opts.vertical===!1||"auto"===s.opts.vertical&&n(t).width()>800?s.isSwiping="x":(a=Math.abs(180*Math.atan2(s.distanceY,s.distanceX)/Math.PI),s.isSwiping=a>45&&a<135?"y":"x"),s.canTap=!1,"y"===s.isSwiping&&n.fancybox.isMobile&&s.isScrollable)return void(s.isScrolling=!0);s.instance.isDragging=s.isSwiping,s.startPoints=s.newPoints,n.each(s.instance.slides,function(t,e){n.fancybox.stop(e.$slide),e.$slide.css("transition-duration",""),e.inTransition=!1,e.pos===s.instance.current.pos&&(s.sliderStartPos.left=n.fancybox.getTranslate(e.$slide).left-n.fancybox.getTranslate(s.instance.$refs.stage).left)}),s.instance.SlideShow&&s.instance.SlideShow.isActive&&s.instance.SlideShow.stop()}},d.prototype.onPan=function(){var t=this;return s(t.newPoints[0],t.realPoints[0])<(n.fancybox.isMobile?10:5)?void(t.startPoints=t.newPoints):(t.canTap=!1,t.contentLastPos=t.limitMovement(),t.requestId&&(i(t.requestId),t.requestId=null),void(t.requestId=o(function(){n.fancybox.setTranslate(t.$content,t.contentLastPos)})))},d.prototype.limitMovement=function(){var t,e,n,o,i,a,s=this,r=s.canvasWidth,c=s.canvasHeight,l=s.distanceX,d=s.distanceY,u=s.contentStartPos,f=u.left,p=u.top,h=u.width,g=u.height;return i=h>r?f+l:f,a=p+d,t=Math.max(0,.5*r-.5*h),e=Math.max(0,.5*c-.5*g),n=Math.min(r-h,.5*r-.5*h),o=Math.min(c-g,.5*c-.5*g),l>0&&i>t&&(i=t-1+Math.pow(-t+f+l,.8)||0),l<0&&i<n&&(i=n+1-Math.pow(n-f-l,.8)||0),d>0&&a>e&&(a=e-1+Math.pow(-e+p+d,.8)||0),d<0&&a<o&&(a=o+1-Math.pow(o-p-d,.8)||0),{top:a,left:i}},d.prototype.limitPosition=function(t,e,n,o){var i=this,a=i.canvasWidth,s=i.canvasHeight;return n>a?(t=t>0?0:t,t=t<a-n?a-n:t):t=Math.max(0,a/2-n/2),o>s?(e=e>0?0:e,e=e<s-o?s-o:e):e=Math.max(0,s/2-o/2),{top:e,left:t}},d.prototype.onZoom=function(){var e=this,a=e.contentStartPos,r=a.width,c=a.height,l=a.left,d=a.top,u=s(e.newPoints[0],e.newPoints[1]),f=u/e.startDistanceBetweenFingers,p=Math.floor(r*f),h=Math.floor(c*f),g=(r-p)*e.percentageOfImageAtPinchPointX,b=(c-h)*e.percentageOfImageAtPinchPointY,m=(e.newPoints[0].x+e.newPoints[1].x)/2-n(t).scrollLeft(),v=(e.newPoints[0].y+e.newPoints[1].y)/2-n(t).scrollTop(),y=m-e.centerPointStartX,x=v-e.centerPointStartY,w=l+(g+y),$=d+(b+x),S={top:$,left:w,scaleX:f,scaleY:f};e.canTap=!1,e.newWidth=p,e.newHeight=h,e.contentLastPos=S,e.requestId&&(i(e.requestId),e.requestId=null),e.requestId=o(function(){n.fancybox.setTranslate(e.$content,e.contentLastPos)})},d.prototype.ontouchend=function(t){var o=this,s=Math.max((new Date).getTime()-o.startTime,1),r=o.isSwiping,c=o.isPanning,l=o.isZooming,d=o.isScrolling;return o.endPoints=a(t),o.$container.removeClass("fancybox-is-grabbing"),n(e).off(".fb.touch"),e.removeEventListener("scroll",o.onscroll,!0),o.requestId&&(i(o.requestId),o.requestId=null),o.isSwiping=!1,o.isPanning=!1,o.isZooming=!1,o.isScrolling=!1,o.instance.isDragging=!1,o.canTap?o.onTap(t):(o.speed=366,o.velocityX=o.distanceX/s*.5,o.velocityY=o.distanceY/s*.5,o.speedX=Math.max(.5*o.speed,Math.min(1.5*o.speed,1/Math.abs(o.velocityX)*o.speed)),void(c?o.endPanning():l?o.endZooming():o.endSwiping(r,d)))},d.prototype.endSwiping=function(t,e){var o=this,i=!1,a=o.instance.group.length;o.sliderLastPos=null,"y"==t&&!e&&Math.abs(o.distanceY)>50?(n.fancybox.animate(o.instance.current.$slide,{top:o.sliderStartPos.top+o.distanceY+150*o.velocityY,opacity:0},200),i=o.instance.close(!0,200)):"x"==t&&o.distanceX>50&&a>1?i=o.instance.previous(o.speedX):"x"==t&&o.distanceX<-50&&a>1&&(i=o.instance.next(o.speedX)),i!==!1||"x"!=t&&"y"!=t||(e||a<2?o.instance.centerSlide(o.instance.current,150):o.instance.jumpTo(o.instance.current.index)),o.$container.removeClass("fancybox-is-sliding")},d.prototype.endPanning=function(){var t,e,o,i=this;i.contentLastPos&&(i.opts.momentum===!1?(t=i.contentLastPos.left,e=i.contentLastPos.top):(t=i.contentLastPos.left+i.velocityX*i.speed,e=i.contentLastPos.top+i.velocityY*i.speed),o=i.limitPosition(t,e,i.contentStartPos.width,i.contentStartPos.height),o.width=i.contentStartPos.width,o.height=i.contentStartPos.height,n.fancybox.animate(i.$content,o,330))},d.prototype.endZooming=function(){var t,e,o,i,a=this,s=a.instance.current,r=a.newWidth,c=a.newHeight;a.contentLastPos&&(t=a.contentLastPos.left,e=a.contentLastPos.top,i={top:e,left:t,width:r,height:c,scaleX:1,scaleY:1},n.fancybox.setTranslate(a.$content,i),r<a.canvasWidth&&c<a.canvasHeight?a.instance.scaleToFit(150):r>s.width||c>s.height?a.instance.scaleToActual(a.centerPointStartX,a.centerPointStartY,150):(o=a.limitPosition(t,e,r,c),n.fancybox.setTranslate(a.$content,n.fancybox.getTranslate(a.$content)),n.fancybox.animate(a.$content,o,150)))},d.prototype.onTap=function(e){var o,i=this,s=n(e.target),r=i.instance,c=r.current,l=e&&a(e)||i.startPoints,d=l[0]?l[0].x-n(t).scrollLeft()-i.stagePos.left:0,u=l[0]?l[0].y-n(t).scrollTop()-i.stagePos.top:0,f=function(t){var o=c.opts[t];if(n.isFunction(o)&&(o=o.apply(r,[c,e])),o)switch(o){case"close":r.close(i.startEvent);break;case"toggleControls":r.toggleControls(!0);break;case"next":r.next();break;case"nextOrClose":r.group.length>1?r.next():r.close(i.startEvent);break;case"zoom":"image"==c.type&&(c.isLoaded||c.$ghost)&&(r.canPan()?r.scaleToFit():r.isScaledDown()?r.scaleToActual(d,u):r.group.length<2&&r.close(i.startEvent))}};if((!e.originalEvent||2!=e.originalEvent.button)&&(s.is("img")||!(d>s[0].clientWidth+s.offset().left))){if(s.is(".fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-container"))o="Outside";else if(s.is(".fancybox-slide"))o="Slide";else{if(!r.current.$content||!r.current.$content.find(s).addBack().filter(s).length)return;o="Content"}if(i.tapped){if(clearTimeout(i.tapped),i.tapped=null,Math.abs(d-i.tapX)>50||Math.abs(u-i.tapY)>50)return this;f("dblclick"+o)}else i.tapX=d,i.tapY=u,c.opts["dblclick"+o]&&c.opts["dblclick"+o]!==c.opts["click"+o]?i.tapped=setTimeout(function(){i.tapped=null,f("click"+o)},500):f("click"+o);return this}},n(e).on("onActivate.fb",function(t,e){e&&!e.Guestures&&(e.Guestures=new d(e))})}(window,document,jQuery),function(t,e){"use strict";e.extend(!0,e.fancybox.defaults,{btnTpl:{slideShow:'<button data-fancybox-play class="fancybox-button fancybox-button--play" title="{{PLAY_START}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.5 5.4v13.2l11-6.6z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.33 5.75h2.2v12.5h-2.2V5.75zm5.15 0h2.2v12.5h-2.2V5.75z"/></svg></button>'},slideShow:{autoStart:!1,speed:3e3}});var n=function(t){this.instance=t,this.init()};e.extend(n.prototype,{timer:null,isActive:!1,$button:null,init:function(){var t=this;t.$button=t.instance.$refs.toolbar.find("[data-fancybox-play]").on("click",function(){t.toggle()}),(t.instance.group.length<2||!t.instance.group[t.instance.currIndex].opts.slideShow)&&t.$button.hide()},set:function(t){var e=this,n=e.instance,o=n.current,i=function(){e.isActive&&n.jumpTo((n.currIndex+1)%n.group.length)};o&&(t===!0||o.opts.loop||n.currIndex<n.group.length-1)?e.timer=setTimeout(function(){var t;e.isActive&&(t=o.$slide.find("video,audio").filter(":visible:first"),t.length?t.one("ended",i):i())},o.opts.slideShow.speed):(e.stop(),n.idleSecondsCounter=0,n.showControls())},clear:function(){var t=this;clearTimeout(t.timer),t.timer=null},start:function(){var t=this,e=t.instance.current;e&&(t.$button.attr("title",e.opts.i18n[e.opts.lang].PLAY_STOP).removeClass("fancybox-button--play").addClass("fancybox-button--pause"),t.isActive=!0,e.isComplete&&t.set(!0),t.instance.trigger("onSlideShowChange",!0))},stop:function(){var t=this,e=t.instance.current;t.clear(),t.$button.attr("title",e.opts.i18n[e.opts.lang].PLAY_START).removeClass("fancybox-button--pause").addClass("fancybox-button--play"),t.isActive=!1,t.instance.trigger("onSlideShowChange",!1)},toggle:function(){var t=this;t.isActive?t.stop():t.start()}}),e(t).on({"onInit.fb":function(t,e){e&&!e.SlideShow&&(e.SlideShow=new n(e))},"beforeShow.fb":function(t,e,n,o){var i=e&&e.SlideShow;o?i&&n.opts.slideShow.autoStart&&i.start():i&&i.isActive&&i.clear()},"afterShow.fb":function(t,e,n){var o=e&&e.SlideShow;o&&o.isActive&&o.set()},"afterKeydown.fb":function(n,o,i,a,s){var r=o&&o.SlideShow;!r||!i.opts.slideShow||80!==s&&32!==s||e(t.activeElement).is("button,a,input")||(a.preventDefault(),r.toggle())},"beforeClose.fb onDeactivate.fb":function(t,e){var n=e&&e.SlideShow;n&&n.stop()}}),e(t).on("visibilitychange",function(){var n=e.fancybox.getInstance(),o=n&&n.SlideShow;o&&o.isActive&&(t.hidden?o.clear():o.set())})}(document,jQuery),function(t,e){"use strict";var n=function(){for(var e=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],n={},o=0;o<e.length;o++){var i=e[o];if(i&&i[1]in t){for(var a=0;a<i.length;a++)n[e[0][a]]=i[a];return n}}return!1}();if(n){var o={request:function(e){e=e||t.documentElement,e[n.requestFullscreen](e.ALLOW_KEYBOARD_INPUT)},exit:function(){t[n.exitFullscreen]()},toggle:function(e){e=e||t.documentElement,this.isFullscreen()?this.exit():this.request(e)},isFullscreen:function(){return Boolean(t[n.fullscreenElement])},enabled:function(){return Boolean(t[n.fullscreenEnabled])}};e.extend(!0,e.fancybox.defaults,{btnTpl:{fullScreen:'<button data-fancybox-fullscreen class="fancybox-button fancybox-button--fsenter" title="{{FULL_SCREEN}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"/></svg></button>'},fullScreen:{autoStart:!1}}),e(t).on(n.fullscreenchange,function(){var t=o.isFullscreen(),n=e.fancybox.getInstance();n&&(n.current&&"image"===n.current.type&&n.isAnimating&&(n.current.$content.css("transition","none"),n.isAnimating=!1,n.update(!0,!0,0)),n.trigger("onFullscreenChange",t),n.$refs.container.toggleClass("fancybox-is-fullscreen",t),n.$refs.toolbar.find("[data-fancybox-fullscreen]").toggleClass("fancybox-button--fsenter",!t).toggleClass("fancybox-button--fsexit",t))})}e(t).on({"onInit.fb":function(t,e){var i;return n?void(e&&e.group[e.currIndex].opts.fullScreen?(i=e.$refs.container,i.on("click.fb-fullscreen","[data-fancybox-fullscreen]",function(t){t.stopPropagation(),t.preventDefault(),o.toggle()}),e.opts.fullScreen&&e.opts.fullScreen.autoStart===!0&&o.request(),e.FullScreen=o):e&&e.$refs.toolbar.find("[data-fancybox-fullscreen]").hide()):void e.$refs.toolbar.find("[data-fancybox-fullscreen]").remove()},"afterKeydown.fb":function(t,e,n,o,i){e&&e.FullScreen&&70===i&&(o.preventDefault(),e.FullScreen.toggle())},"beforeClose.fb":function(t,e){e&&e.FullScreen&&e.$refs.container.hasClass("fancybox-is-fullscreen")&&o.exit()}})}(document,jQuery),function(t,e){"use strict";var n="fancybox-thumbs",o=n+"-active";e.fancybox.defaults=e.extend(!0,{btnTpl:{thumbs:'<button data-fancybox-thumbs class="fancybox-button fancybox-button--thumbs" title="{{THUMBS}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14.59 14.59h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76H5.65V5.65z"/></svg></button>'},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"}},e.fancybox.defaults);var i=function(t){this.init(t)};e.extend(i.prototype,{$button:null,$grid:null,$list:null,isVisible:!1,isActive:!1,init:function(t){var e,n,o=this;o.instance=t,t.Thumbs=o,o.opts=t.group[t.currIndex].opts.thumbs,e=t.group[0],e=e.opts.thumb||!(!e.opts.$thumb||!e.opts.$thumb.length)&&e.opts.$thumb.attr("src"),t.group.length>1&&(n=t.group[1],n=n.opts.thumb||!(!n.opts.$thumb||!n.opts.$thumb.length)&&n.opts.$thumb.attr("src")),o.$button=t.$refs.toolbar.find("[data-fancybox-thumbs]"),o.opts&&e&&n?(o.$button.show().on("click",function(){o.toggle()}),o.isActive=!0):o.$button.hide()},create:function(){var t,o=this,i=o.instance,a=o.opts.parentEl,s=[];o.$grid||(o.$grid=e('<div class="'+n+" "+n+"-"+o.opts.axis+'"></div>').appendTo(i.$refs.container.find(a).addBack().filter(a)),o.$grid.on("click","a",function(){i.jumpTo(e(this).attr("data-index"))})),o.$list||(o.$list=e('<div class="'+n+'__list">').appendTo(o.$grid)),e.each(i.group,function(e,n){t=n.opts.thumb||(n.opts.$thumb?n.opts.$thumb.attr("src"):null),t||"image"!==n.type||(t=n.src),s.push('<a href="javascript:;" tabindex="0" data-index="'+e+'" '+(t&&t.length?' style="background-image:url('+t+')" />':"")+"></a>")}),o.$list[0].innerHTML=s.join(""),"x"===o.opts.axis&&o.$list.width(parseInt(o.$grid.css("padding-right"),10)+i.group.length*o.$list.children().eq(0).outerWidth(!0))},focus:function(t){var e,n,i=this,a=i.$list,s=i.$grid;i.instance.current&&(e=a.children().removeClass(o).filter('[data-index="'+i.instance.current.index+'"]').addClass(o),n=e.position(),"y"===i.opts.axis&&(n.top<0||n.top>a.height()-e.outerHeight())?a.stop().animate({scrollTop:a.scrollTop()+n.top},t):"x"===i.opts.axis&&(n.left<s.scrollLeft()||n.left>s.scrollLeft()+(s.width()-e.outerWidth()))&&a.parent().stop().animate({scrollLeft:n.left},t))},update:function(){var t=this;t.instance.$refs.container.toggleClass("fancybox-show-thumbs",this.isVisible),t.isVisible?(t.$grid||t.create(),t.instance.trigger("onThumbsShow"),t.focus(0)):t.$grid&&t.instance.trigger("onThumbsHide"),t.instance.update()},hide:function(){this.isVisible=!1,this.update()},show:function(){this.isVisible=!0,this.update()},toggle:function(){this.isVisible=!this.isVisible,this.update()}}),e(t).on({"onInit.fb":function(t,e){var n;e&&!e.Thumbs&&(n=new i(e),n.isActive&&n.opts.autoStart===!0&&n.show())},"beforeShow.fb":function(t,e,n,o){var i=e&&e.Thumbs;i&&i.isVisible&&i.focus(o?0:250)},"afterKeydown.fb":function(t,e,n,o,i){var a=e&&e.Thumbs;a&&a.isActive&&71===i&&(o.preventDefault(),a.toggle())},"beforeClose.fb":function(t,e){var n=e&&e.Thumbs;n&&n.isVisible&&n.opts.hideOnClose!==!1&&n.$grid.hide()}})}(document,jQuery),function(t,e){"use strict";function n(t){var e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};return String(t).replace(/[&<>"'`=\/]/g,function(t){return e[t]})}e.extend(!0,e.fancybox.defaults,{btnTpl:{share:'<button data-fancybox-share class="fancybox-button fancybox-button--share" title="{{SHARE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.55 19c1.4-8.4 9.1-9.8 11.9-9.8V5l7 7-7 6.3v-3.5c-2.8 0-10.5 2.1-11.9 4.2z"/></svg></button>'},share:{url:function(t,e){return!t.currentHash&&"inline"!==e.type&&"html"!==e.type&&(e.origSrc||e.src)||window.location},tpl:'<div class="fancybox-share"><h1>{{SHARE}}</h1><p><a class="fancybox-share__button fancybox-share__button--fb" href="https://www.facebook.com/sharer/sharer.php?u={{url}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m287 456v-299c0-21 6-35 35-35h38v-63c-7-1-29-3-55-3-54 0-91 33-91 94v306m143-254h-205v72h196" /></svg><span>Facebook</span></a><a class="fancybox-share__button fancybox-share__button--tw" href="https://twitter.com/intent/tweet?url={{url}}&text={{descr}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m456 133c-14 7-31 11-47 13 17-10 30-27 37-46-15 10-34 16-52 20-61-62-157-7-141 75-68-3-129-35-169-85-22 37-11 86 26 109-13 0-26-4-37-9 0 39 28 72 65 80-12 3-25 4-37 2 10 33 41 57 77 57-42 30-77 38-122 34 170 111 378-32 359-208 16-11 30-25 41-42z" /></svg><span>Twitter</span></a><a class="fancybox-share__button fancybox-share__button--pt" href="https://www.pinterest.com/pin/create/button/?url={{url}}&description={{descr}}&media={{media}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m265 56c-109 0-164 78-164 144 0 39 15 74 47 87 5 2 10 0 12-5l4-19c2-6 1-8-3-13-9-11-15-25-15-45 0-58 43-110 113-110 62 0 96 38 96 88 0 67-30 122-73 122-24 0-42-19-36-44 6-29 20-60 20-81 0-19-10-35-31-35-25 0-44 26-44 60 0 21 7 36 7 36l-30 125c-8 37-1 83 0 87 0 3 4 4 5 2 2-3 32-39 42-75l16-64c8 16 31 29 56 29 74 0 124-67 124-157 0-69-58-132-146-132z" fill="#fff"/></svg><span>Pinterest</span></a></p><p><input class="fancybox-share__input" type="text" value="{{url_raw}}" onclick="select()" /></p></div>'}}),e(t).on("click","[data-fancybox-share]",function(){var t,o,i=e.fancybox.getInstance(),a=i.current||null;a&&("function"===e.type(a.opts.share.url)&&(t=a.opts.share.url.apply(a,[i,a])),o=a.opts.share.tpl.replace(/\{\{media\}\}/g,"image"===a.type?encodeURIComponent(a.src):"").replace(/\{\{url\}\}/g,encodeURIComponent(t)).replace(/\{\{url_raw\}\}/g,n(t)).replace(/\{\{descr\}\}/g,i.$caption?encodeURIComponent(i.$caption.text()):""),e.fancybox.open({src:i.translate(i,o),type:"html",opts:{touch:!1,animationEffect:!1,afterLoad:function(t,e){i.$refs.container.one("beforeClose.fb",function(){t.close(null,0)}),e.$content.find(".fancybox-share__button").click(function(){return window.open(this.href,"Share","width=550, height=450"),!1})},mobile:{autoFocus:!1}}}))})}(document,jQuery),function(t,e,n){"use strict";function o(){var e=t.location.hash.substr(1),n=e.split("-"),o=n.length>1&&/^\+?\d+$/.test(n[n.length-1])?parseInt(n.pop(-1),10)||1:1,i=n.join("-");return{hash:e,index:o<1?1:o,gallery:i}}function i(t){""!==t.gallery&&n("[data-fancybox='"+n.escapeSelector(t.gallery)+"']").eq(t.index-1).focus().trigger("click.fb-start")}function a(t){var e,n;return!!t&&(e=t.current?t.current.opts:t.opts,n=e.hash||(e.$orig?e.$orig.data("fancybox")||e.$orig.data("fancybox-trigger"):""),""!==n&&n)}n.escapeSelector||(n.escapeSelector=function(t){var e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,n=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t};return(t+"").replace(e,n)}),n(function(){n.fancybox.defaults.hash!==!1&&(n(e).on({"onInit.fb":function(t,e){var n,i;e.group[e.currIndex].opts.hash!==!1&&(n=o(),i=a(e),i&&n.gallery&&i==n.gallery&&(e.currIndex=n.index-1))},"beforeShow.fb":function(n,o,i,s){var r;i&&i.opts.hash!==!1&&(r=a(o),r&&(o.currentHash=r+(o.group.length>1?"-"+(i.index+1):""),t.location.hash!=="#"+o.currentHash&&(s&&!o.origHash&&(o.origHash=t.location.hash),o.hashTimer&&clearTimeout(o.hashTimer),o.hashTimer=setTimeout(function(){"replaceState"in t.history?(t.history[s?"pushState":"replaceState"]({},e.title,t.location.pathname+t.location.search+"#"+o.currentHash),s&&(o.hasCreatedHistory=!0)):t.location.hash=o.currentHash,o.hashTimer=null},300))))},"beforeClose.fb":function(n,o,i){i.opts.hash!==!1&&(clearTimeout(o.hashTimer),o.currentHash&&o.hasCreatedHistory?t.history.back():o.currentHash&&("replaceState"in t.history?t.history.replaceState({},e.title,t.location.pathname+t.location.search+(o.origHash||"")):t.location.hash=o.origHash),o.currentHash=null)}}),n(t).on("hashchange.fb",function(){var t=o(),e=null;n.each(n(".fancybox-container").get().reverse(),function(t,o){var i=n(o).data("FancyBox");if(i&&i.currentHash)return e=i,!1}),e?e.currentHash===t.gallery+"-"+t.index||1===t.index&&e.currentHash==t.gallery||(e.currentHash=null,e.close()):""!==t.gallery&&i(t)}),setTimeout(function(){n.fancybox.getInstance()||i(o())},50))})}(window,document,jQuery),function(t,e){"use strict";var n=(new Date).getTime();e(t).on({"onInit.fb":function(t,e,o){e.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll",function(t){
13
  var o=e.current,i=(new Date).getTime();e.group.length<2||o.opts.wheel===!1||"auto"===o.opts.wheel&&"image"!==o.type||(t.preventDefault(),t.stopPropagation(),o.$slide.hasClass("fancybox-animated")||(t=t.originalEvent||t,i-n<250||(n=i,e[(-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)<0?"next":"previous"]())))})}})}(document,jQuery);
14
 
15
+ var fv_player_fancybox_paused_players = {};
16
+
17
  function fv_player_colorbox_title() {
18
  var that = jQuery(this), title = that.attr('title');
19
  if( title && title.length > 0 ) return title;
142
 
143
  function fv_lightbox_flowplayer_shutdown(e) {
144
  jQuery('.flowplayer').each( function() {
145
+ var
146
+ $e = jQuery(this),
147
+ player_id = $e.attr('id'),
148
+ was_paused = false,
149
+ api = $e.data("flowplayer");
150
+
151
  if( typeof(api) == "undefined") {
152
  return;
153
  }
154
+
155
  if( e.type == 'afterShow' && jQuery(this).parents('.fancybox-slide--current').length ) return;
156
+
157
+ // if this player was previously paused on fancybox show, unpause it
158
+ if ( typeof( fv_player_fancybox_paused_players[ player_id ] ) != 'undefined' ) {
159
+ was_paused = true;
160
+ delete fv_player_fancybox_paused_players[ $e.attr('id') ];
161
+ api.resume();
162
  }
163
+
164
+ if( api.ready && api.playing && !was_paused ) {
165
+ fv_player_fancybox_paused_players[ $e.attr('id') ] = 1;
166
+ api.pause();
167
+ }
168
+
169
+ if( api.loading ) {
170
  api.one('ready',function(){
171
+ if ( api.engine.engineName === 'fvyoutube' && api.playing && !was_paused ) {
172
+ fv_player_fancybox_paused_players[ $e.attr('id') ] = 1;
173
+ api.pause();
174
+ }
175
  })
176
  }
177
  } );
js/gutenberg.js CHANGED
@@ -4,7 +4,16 @@
4
  wp.blocks.registerBlockType( 'fv-player-gutenberg/basic', {
5
  title: 'FV Player',
6
 
7
- icon: 'controls-play',
 
 
 
 
 
 
 
 
 
8
 
9
  category: 'layout',
10
 
@@ -17,7 +26,14 @@
17
 
18
  edit: function( props ) {
19
  var content = props.attributes.content;
 
 
 
 
 
 
20
  function onChangeContent( newContent ) {
 
21
  props.setAttributes( { content: newContent } );
22
  }
23
 
@@ -25,7 +41,7 @@
25
  className: 'fv-player-gutenberg'
26
  }, el(
27
  'a',{
28
- 'class': 'button fv-wordpress-flowplayer-button'
29
  },
30
  el(
31
  'span'
@@ -35,10 +51,15 @@
35
  el(
36
  wp.components.TextareaControl,
37
  {
38
- 'class': 'components-textarea-control__input fv-player-editor-field',
39
  onChange: onChangeContent,
40
  value: content,
41
  }
 
 
 
 
 
42
  )
43
  );
44
  },
@@ -49,5 +70,7 @@
49
  props.attributes.content
50
  );
51
  },
 
52
  } );
 
53
  }() );
4
  wp.blocks.registerBlockType( 'fv-player-gutenberg/basic', {
5
  title: 'FV Player',
6
 
7
+ icon: {
8
+ foreground: '#C20B33',
9
+ src: wp.element.createElement(
10
+ wp.components.SVG, {
11
+ viewBox: "0 0 24 24"
12
+ }, wp.element.createElement(wp.components.Path, {
13
+ d: "M21.8 8s-.195-1.377-.795-1.984c-.76-.797-1.613-.8-2.004-.847-2.798-.203-6.996-.203-6.996-.203h-.01s-4.197 0-6.996.202c-.39.046-1.242.05-2.003.846C2.395 6.623 2.2 8 2.2 8S2 9.62 2 11.24v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.76.797 1.76.77 2.205.855 1.6.153 6.8.2 6.8.2s4.203-.005 7-.208c.392-.047 1.244-.05 2.005-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517C22 9.62 21.8 8 21.8 8zM9.935 14.595v-5.62l5.403 2.82-5.403 2.8z"
14
+ })
15
+ )
16
+ },
17
 
18
  category: 'layout',
19
 
26
 
27
  edit: function( props ) {
28
  var content = props.attributes.content;
29
+
30
+ setTimeout( function() {
31
+ console.log('block?',props.clientId,jQuery('[data-block='+props.clientId+']').length);
32
+ fv_player_editor.gutenberg_preview( jQuery('[data-block='+props.clientId+']'),content);
33
+ }, 100 );
34
+
35
  function onChangeContent( newContent ) {
36
+ fv_player_editor.gutenberg_preview(newContent);
37
  props.setAttributes( { content: newContent } );
38
  }
39
 
41
  className: 'fv-player-gutenberg'
42
  }, el(
43
  'a',{
44
+ 'className': 'button fv-wordpress-flowplayer-button'
45
  },
46
  el(
47
  'span'
51
  el(
52
  wp.components.TextareaControl,
53
  {
54
+ 'className': 'components-textarea-control__input fv-player-editor-field',
55
  onChange: onChangeContent,
56
  value: content,
57
  }
58
+ ),
59
+ el(
60
+ 'div', {
61
+ 'className': 'fv-player-gutenberg-preview'
62
+ }
63
  )
64
  );
65
  },
70
  props.attributes.content
71
  );
72
  },
73
+
74
  } );
75
+
76
  }() );
js/media-library-browser-base.js CHANGED
@@ -475,9 +475,6 @@ jQuery( function($) {
475
 
476
  $popup_close_btn.click();
477
 
478
- // refresh preview
479
- jQuery('#fv-player-shortcode-editor-preview-iframe-refresh').click();
480
-
481
  return false;
482
  }
483
 
475
 
476
  $popup_close_btn.click();
477
 
 
 
 
478
  return false;
479
  }
480
 
js/shortcode-editor.js CHANGED
@@ -1,24 +1,6 @@
1
- ('use strict');
2
- var FVFP_sStoreRTMP = 0;
3
- var FVFP_sWidgetId;
4
-
5
- var fv_wp_flowplayer_content;
6
- var fv_wp_flowplayer_hTinyMCE;
7
- var fv_wp_flowplayer_oEditor;
8
- var fv_wp_fp_shortcode_remains;
9
- var fv_player_playlist_item_template;
10
- var fv_player_playlist_video_template;
11
- var fv_player_playlist_subtitles_template;
12
- var fv_player_playlist_subtitles_box_template;
13
- var fv_wp_fp_shortcode;
14
- var fv_player_preview_single = -1;
15
- var fv_player_preview_window;
16
- var fv_wp_flowplayer_save_ignore_errors = false;
17
-
18
- var fv_player_editor_button_clicked = 0;
19
-
20
- var fv_player_shortcode_preview_unsupported = false;
21
 
 
22
  var fv_player_editor_matcher = {
23
  default: {
24
  // matches URL of the video
@@ -28,336 +10,580 @@ var fv_player_editor_matcher = {
28
  }
29
  };
30
 
31
- jQuery(document).ready(function($){
32
-
33
- var ua = window.navigator.userAgent;
34
- fv_player_shortcode_preview_unsupported = ua.match(/edge/i) || ua.match(/safari/i) && !ua.match(/chrome/i) ;
35
-
36
- if( jQuery().fv_player_box ) {
37
- $(document).on( 'click', '.fv-wordpress-flowplayer-button, .fv-player-editor-button, .fv-player-edit', function(e) {
38
- fv_player_editor_button_clicked = this;
39
- e.preventDefault();
40
- $.fv_player_box( {
41
- top: "100px",
42
- initialWidth: 1100,
43
- initialHeight: 50,
44
- width:"1100px",
45
- height:"100px",
46
- href: "#fv-player-shortcode-editor",
47
- inline: true,
48
- title: 'Add FV Player',
49
- onComplete : fv_wp_flowplayer_edit,
50
- onClosed : fv_wp_flowplayer_on_close,
51
- onOpen: function(){
52
- jQuery("#fv_player_box").addClass("fv-flowplayer-shortcode-editor");
53
- jQuery("#cboxOverlay").addClass("fv-flowplayer-shortcode-editor");
54
- }
55
- } );
56
- FVFP_sWidgetId = $(this).data().number;
57
- });
58
 
59
- $(document).on( 'click', '.fv-player-export', function(e) {
60
- var $element = jQuery(this);
 
 
 
 
 
61
 
62
- e.preventDefault();
63
- $.fv_player_box( {
64
- top: "100px",
65
- initialWidth: 1100,
66
- initialHeight: 50,
67
- width:"1100px",
68
- height:"100px",
69
- href: "#fv-player-shortcode-editor",
70
- inline: true,
71
- title: 'Export FV Player',
72
- onComplete : function() { fv_player_export($element); },
73
- onClosed : fv_wp_flowplayer_big_loader_close,
74
- onOpen: function(){
75
- jQuery("#fv_player_box").addClass("fv-flowplayer-shortcode-editor");
76
- jQuery("#cboxOverlay").addClass("fv-flowplayer-shortcode-editor");
77
- }
78
- } );
79
 
80
- return false;
81
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
 
83
- $(document).on( 'click', '.fv-player-import', function(e) {
84
- var $element = jQuery(this);
 
 
 
 
 
85
 
86
- e.preventDefault();
87
- $.fv_player_box( {
88
- top: "100px",
89
- initialWidth: 1100,
90
- initialHeight: 50,
91
- width:"1100px",
92
- height:"100px",
93
- href: "#fv-player-shortcode-editor",
94
- inline: true,
95
- title: 'Import FV Player(s)',
96
- onComplete : fv_player_import,
97
- onClosed : fv_wp_flowplayer_big_loader_close,
98
- onOpen: function(){
99
- jQuery("#fv_player_box").addClass("fv-flowplayer-shortcode-editor");
100
- jQuery("#cboxOverlay").addClass("fv-flowplayer-shortcode-editor");
101
- }
102
- } );
103
 
104
- return false;
105
- });
106
 
107
- $(document).on( 'click', '.fv-player-remove', function(e) {
108
- var $element = jQuery(this);
 
 
 
 
 
 
 
 
 
 
 
109
 
110
- $element
111
- .addClass('fv-player-remove-confirm')
112
- .removeClass('fv-player-remove')
113
- .html('Are you sure?');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
 
115
- return false;
116
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
 
118
- $(document).on( 'click', '.fv-player-remove-confirm', function(e) {
119
  var
120
- $element = jQuery(this),
121
- $element_td = $element.parent();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
 
123
- $element_td.find('a, span').hide();
124
- $element.after('<div class="fv-player-shortcode-editor-small-spinner">&nbsp;</div>');
 
 
125
 
126
- jQuery.post(ajaxurl, {
127
- action: "fv_player_db_remove",
128
- nonce: $element.data('nonce'),
129
- playerID: $element.data('player_id')
130
- }, function(rows_affected){
131
- if (!isNaN(parseFloat(rows_affected)) && isFinite(rows_affected)) {
132
- // remove the deleted player's row
133
- $element.closest('tr').hide('slow', function() {
134
- jQuery(this).remove();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  });
136
- } else {
137
- $element.next('div.fv-player-shortcode-editor-small-spinner').css({
138
- 'background': 'none',
139
- 'width': 'auto'
140
- }).html('Error');
141
-
142
- alert(rows_affected);
143
 
144
- $element_td.find('span, a:not(.fv-player-remove-confirm)').show();
145
- }
146
- }).error(function() {
147
- $element.next('div.fv-player-shortcode-editor-small-spinner').css({
148
- 'background': 'none',
149
- 'width': 'auto'
150
- }).html('Error');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
 
152
- $element_td.find('span, a:not(.fv-player-remove-confirm)').show();
 
 
153
  });
154
 
155
- return false;
156
- });
 
 
 
 
157
 
158
- $(document).on( 'click', '.fv-player-clone', function(e) {
159
- var $element = jQuery(this);
 
 
 
 
 
160
 
161
- $element
162
- .hide()
163
- .after('<div class="fv-player-shortcode-editor-small-spinner">&nbsp;</div>');
164
 
165
- jQuery.post(ajaxurl, {
166
- action: "fv_player_db_clone",
167
- nonce: $element.data('nonce'),
168
- playerID: $element.data('player_id')
169
- }, function(playerID){
170
- if (playerID != '0' && !isNaN(parseFloat(playerID)) && isFinite(playerID)) {
171
- // add the inserted player's row
172
- jQuery.get(
173
- document.location.href.substr(0, document.location.href.indexOf('?page=fv_player')) + '?page=fv_player&id=' + playerID,
174
- function (response) {
175
- jQuery('#the-list tr:first').before(jQuery(response).find('#the-list tr:first'));
176
- $element.next('div.fv-player-shortcode-editor-small-spinner').remove();
177
- $element.show();
178
- }).error(function() {
179
- $element.next('div.fv-player-shortcode-editor-small-spinner').remove();
180
- $element.show();
181
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
182
  } else {
183
- $element.next('div.fv-player-shortcode-editor-small-spinner').css({
184
- 'background': 'none',
185
- 'width': 'auto'
186
- }).html('Error');
187
  }
188
- }).error(function() {
189
- $element.next('div.fv-player-shortcode-editor-small-spinner').css({
190
- 'background': 'none',
191
- 'width': 'auto'
192
- }).html('Error');
 
 
 
 
 
 
 
 
 
193
  });
194
 
195
- return false;
196
- });
197
-
198
- }
199
- /*
200
- * NAV TABS
201
- */
202
- $('.fv-player-tabs-header a').on('click', function(e) {
203
- e.preventDefault();
204
- $('.fv-player-tabs-header a').removeClass('nav-tab-active');
205
- $(this).addClass('nav-tab-active')
206
- $('.fv-player-tabs > .fv-player-tab').hide();
207
- $('.' + $(this).data('tab')).show();
208
-
209
- fv_wp_flowplayer_dialog_resize();
210
- });
211
-
212
- /*
213
- * Select playlist item
214
- * keywords: select item
215
- */
216
- $(document).on('click','.fv-player-tab-playlist tr td', function(e) {
217
- var new_index = $(this).parents('tr').index();
218
-
219
- fv_player_preview_single = new_index;
220
-
221
- fv_flowplayer_editor_item_show(new_index);
222
- });
223
 
224
- $(document).on('input','.fv_wp_flowplayer_field_width', function(e) {
225
- $('.fv_wp_flowplayer_field_width').val(e.target.value);
226
- })
227
- $(document).on('input','.fv_wp_flowplayer_field_height', function(e) {
228
- $('.fv_wp_flowplayer_field_height').val(e.target.value);
229
- })
230
- /*
231
- * Playlist view thumbnail toggle
232
- */
233
- $('#fv-player-list-thumb-toggle > a').on('click', function(e){
234
- e.preventDefault();
235
- var button = $(e.currentTarget);
236
- if(button.hasClass('disabled')) return;
237
- $('#fv-player-list-thumb-toggle > a').removeClass('active');
238
- if(button.attr('id') === 'fv-player-list-list-view'){
239
- $('.fv-player-tab-playlist').addClass('hide-thumbnails');
240
- }else{
241
- $('.fv-player-tab-playlist').removeClass('hide-thumbnails');
242
- }
243
- button.addClass('active')
244
- })
245
-
246
- /*
247
- * Remove playlist item
248
- * keywords: delete playlist items remove playlist items
249
- */
250
- $(document).on('click','.fv-player-tab-playlist tr .fvp_item_remove', function(e) {
251
- e.stopPropagation();
252
- var
253
- $parent = $(e.target).parents('[data-index]'),
254
- index = $parent.attr('data-index'),
255
- id = $('.fv-player-tab-video-files table[data-index=' + index + ']').attr('data-id_video'),
256
- $deleted_videos_element = $('#deleted_videos');
257
 
258
- if (id && $deleted_videos_element.val()) {
259
- $deleted_videos_element.val($deleted_videos_element.val() + ',' + id);
260
- } else {
261
- $deleted_videos_element.val(id);
262
- }
263
 
264
- $parent.remove();
265
- jQuery('.fv-player-tab-video-files table[data-index=' + index + ']').remove();
266
- jQuery('.fv-player-tab-subtitles table[data-index=' + index + ']').remove();
267
- if(!jQuery('.fv-player-tab-subtitles table[data-index]').length){
268
- fv_flowplayer_playlist_add();
269
- jQuery('.fv-player-tab-playlist tr td').click();
270
- }
271
-
272
- fv_wp_flowplayer_submit('refresh-button');
273
- });
274
-
275
- /*
276
- * Sort playlist
277
- */
278
- $('.fv-player-tab-playlist table tbody').sortable({
279
- start: function( event, ui ) {
280
- FVFP_sStoreRTMP = jQuery('#fv-flowplayer-playlist table:first .fv_wp_flowplayer_field_rtmp').val();
281
- },
282
- update: function( event, ui ) {
283
- var items = [];
284
- $('.fv-player-tab-playlist table tbody tr').each(function(){
285
- var
286
- index = $(this).data('index'),
287
- $items = jQuery('.fv-player-tab-video-files table[data-index=' + index + ']'),
288
- $subs = jQuery('.fv-player-tab-subtitles table[data-index=' + index + ']');
289
 
290
- items.push({
291
- items : $items.clone(),
292
- subs : $subs.clone(),
293
- });
294
 
295
- $items.remove();
296
- $subs.remove();
 
 
 
 
297
  });
298
 
299
- for(var i in items){
300
- if(!items.hasOwnProperty(i))continue;
301
- jQuery('.fv-player-tab-video-files').append(items[i].items);
302
- jQuery('.fv-player-tab-subtitles').append(items[i].subs);
303
- }
304
-
305
- jQuery('#fv-flowplayer-playlist table:first .fv_wp_flowplayer_field_rtmp').val( FVFP_sStoreRTMP );
306
-
307
- fv_wp_flowplayer_submit('refresh-button');
308
- },
309
- axis: 'y',
310
- //handle: '.fvp_item_sort',
311
- containment: ".fv-player-tab-playlist"
312
- });
313
-
314
- /*
315
- * Uploader
316
- */
317
- var fv_flowplayer_uploader;
318
- var fv_flowplayer_uploader_button;
319
-
320
- $(document).on( 'click', '#fv-player-shortcode-editor .button.add_media', function(e) {
321
- e.preventDefault();
322
-
323
- fv_flowplayer_uploader_button = jQuery(this);
324
- jQuery('.fv_flowplayer_target').removeClass('fv_flowplayer_target' );
325
- fv_flowplayer_uploader_button.siblings('input[type=text]').addClass('fv_flowplayer_target' );
326
-
327
- //If the uploader object has already been created, reopen the dialog
328
- if (fv_flowplayer_uploader) {
329
  fv_flowplayer_uploader.open();
330
  return;
331
- }
332
 
333
- //Extend the wp.media object
334
- fv_flowplayer_uploader = wp.media.frames.file_frame = wp.media({
335
  title: 'Add Video',
336
  button: {
337
- text: 'Choose'
338
  },
339
  multiple: false
340
- });
341
-
342
- fv_flowplayer_uploader.on('open', function() {
343
- $( document ).trigger( "mediaBrowserOpen" );
344
- jQuery('.media-router .media-menu-item').eq(0).click();
345
- jQuery('.media-frame-title h1').text(fv_flowplayer_uploader_button.text());
346
- });
347
-
348
- //When a file is selected, grab the URL and set it as the text field's value
349
- fv_flowplayer_uploader.on('select', function() {
350
  attachment = fv_flowplayer_uploader.state().get('selection').first().toJSON();
351
 
352
- $('.fv_flowplayer_target').val(attachment.url);
1
+ // What's here needs to stay global
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
+ // used in FV Player Pro to add more matchers
4
  var fv_player_editor_matcher = {
5
  default: {
6
  // matches URL of the video
10
  }
11
  };
12
 
13
+ jQuery(function() {
14
+ // The actual editor
15
+ window.fv_player_editor = (function($) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
+ var
18
+ $doc = $(document),
19
+ $el_editor,
20
+ $el_preview,
21
+ $el_save_complete = $('.fv-player-save-completed'),
22
+ $el_save_error = $('.fv-player-save-error'),
23
+ $el_save_error_p = $el_save_error.find('p'),
24
 
25
+ // data to save in Ajax
26
+ ajax_save_this_please = false,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
+ current_player_db_id = -1,
29
+ current_video_to_edit = -1,
30
+
31
+ // stores the button which was clicked to open the editor
32
+ editor_button_clicked = 0,
33
+
34
+ // the post editor content being edited
35
+ editor_content,
36
+
37
+ // used in WP Heartbeat
38
+ edit_lock_removal = {},
39
+
40
+ // used to size the lightbox in editor_resize()
41
+ editor_resize_height_record = 0,
42
+
43
+ // TinyMCE instance, if any
44
+ instance_tinymce,
45
+
46
+ // Foliopress WYSIWYG instance, if any
47
+ instance_fp_wysiwyg,
48
+
49
+ // are we editing player which is not yet in DB?
50
+ is_unsaved = true,
51
+
52
+ // is the player already saved in the DB but actually
53
+ // still in a "draft" status? i.e. not published yet
54
+ has_draft_status = true,
55
+
56
+ // will be > 0 when any meta data are loading that need saving along with the form (example: S3 video duration, PPV product creation)
57
+ // ... this prevents overlay closing until all meta required data are loaded and stored
58
+ is_loading_meta_data = 0,
59
+
60
+ // whether we're editing a single video (true) or showing a playlist view (false)
61
+ editing_video_details = false,
62
+
63
+ // which playlist item we're currently editing, set to -1 if we're showing playlist view
64
+ // this is used when loading data from DB to avoid previewing an empty video that's in editor by default
65
+ item_index = -1,
66
+
67
+ // are we currently saving data?
68
+ is_saving = false,
69
+
70
+ // used when editing shortcode in TinyMCE
71
+ helper_tag = window.fvwpflowplayer_helper_tag,
72
+
73
+ // should preview only show a single video? if so, which one in the current playlist?
74
+ preview_single = -1,
75
+
76
+ // the part of shortcode outside of [fvplayer id="XYZ"]
77
+ // also accessed from outside
78
+ shortcode_remains,
79
+
80
+ // Some shortcode args should be kept. For example if you edit
81
+ // [fvplayer id="1" sort="newest"] that sort should not be removed
82
+ store_shortcode_args = {},
83
+
84
+ // Some shortcode args do not have a DB counterpars, so they should always
85
+ // be kept on the shortcode. For example if you edit
86
+ // [fvplayer src="some_video_url" sort="newest"] that sort should not be removed,
87
+ // as it's not been transferred into the DB
88
+ always_keep_shortcode_args = {},
89
+
90
+ // Flowplayer only lets us specify the RTMP server for the first video in plalist, so we store it here when the playlist item order is changing etc.
91
+ store_rtmp_server = '',
92
+
93
+ // stores parts of editor HTML which are later re-used when adding new items
94
+ template_playlist_item,
95
+ template_video,
96
+ template_subtitles,
97
+ template_subtitles_tab,
98
+
99
+ // used to remember which widget we are editing, if any
100
+ widget_id,
101
+
102
+ // used in Gutenberg preview to store a preview timeout task due to REACT not being fast enough to allow us previewing
103
+ // player directly after we close the editor
104
+ fv_player_preview_loading = false,
105
+
106
+ // list of errors that currently prevent auto-saving in the form of: { error_identifier_with_(plugin_)prefix : "the actual error text to show" }
107
+ // ... this will be shown in place of the "Saved!" message bottom overlay and it will always show only the first error in this object,
108
+ // as to not overload the user and UI with errors. Once that error is corrected, it gets removed from this object and next one (if any) is shown.
109
+ errors = {};
110
+
111
+
112
+ /*
113
+ * A shorthand to save you from all the "fv_wp_flowplayer_field_"
114
+ * when selecting fields
115
+ *
116
+ * @param {string} key The field key. For example "src" gives
117
+ * you "fv_wp_flowplayer_field_src"
118
+ * @param {object|string} where Lets you narrow down the element wher you
119
+ * want to locate he field. You can use a jQuery
120
+ * element or a string selector for jQuery
121
+ *
122
+ * @return {object} The field element
123
+ */
124
+ function get_field( key, where ) {
125
+ var element = false,
126
+ selector = '.' + fv_wp_flowplayer_map_names_to_editor_fields(key) + ', [name=' + fv_wp_flowplayer_map_names_to_editor_fields(key) + ']';
127
 
128
+ if( where && typeof(where) == "object" ) {
129
+ element = where.find(selector);
130
+ } else if( where && typeof(where) == "string" ) {
131
+ element = $el_editor.find(where).find(selector);
132
+ } else {
133
+ element = $el_editor.find(selector);
134
+ }
135
 
136
+ if( !element.length ) {
137
+ console.log('FV Player Editor Error: field '+key+' not found');
138
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
 
140
+ return element;
141
+ }
142
 
143
+ /*
144
+ * Gives you "src" out of "fv_wp_flowplayer_field_src"
145
+ *
146
+ * @param {string} name The field name
147
+ *
148
+ * @return {string} The field.... real name?
149
+ */
150
+ function get_field_name( name ) {
151
+ if (name.indexOf('fv_wp_flowplayer_field_') > -1) {
152
+ return name.replace('fv_wp_flowplayer_field_', '');
153
+ }
154
+ return name;
155
+ }
156
 
157
+ /*
158
+ * Gives you the desired tab with video information
159
+ *
160
+ * @param {int|string} index Number, or first, or last
161
+ * @param {string} tab Tab name to obtain, options:
162
+ * * video-files
163
+ * * subtitles
164
+ *
165
+ * @return {object} The tab element
166
+ */
167
+ function get_tab( index, tab ) {
168
+ var selector = '.fv-player-tab-'+tab+' table';
169
+ if( index == 'first' ) {
170
+ selector += ':first';
171
+ } else if( index == 'last' ) {
172
+ selector += ':last';
173
+ } else {
174
+ selector += '[data-index='+index+']';
175
+ }
176
+ return $el_editor.find(selector);
177
+ }
178
 
179
+ /*
180
+ * Gives you all desired tabs of a certain kind
181
+ *
182
+ * @return {object} The tab elements
183
+ */
184
+ function get_tabs( tab ) {
185
+ var selector = '.fv-player-tab-'+tab+' table';
186
+ return $el_editor.find(selector);
187
+ }
188
+
189
+ function b64EncodeUnicode(str) {
190
+ return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function(match, p1) {
191
+ return String.fromCharCode('0x' + p1);
192
+ }));
193
+ }
194
+
195
+ $doc.ready( function(){
196
+ $el_editor = $('#fv-player-shortcode-editor');
197
+
198
+ $el_preview = $('#fv-player-shortcode-editor-preview');
199
+
200
+ el_spinner = $('#fv-player-shortcode-editor-preview-spinner');
201
+
202
+ el_preview_target = $('#fv-player-shortcode-editor-preview-target');
203
 
 
204
  var
205
+ previous = false,
206
+ next = false,
207
+ overlay_close_waiting_for_save = false,
208
+ loading = true,
209
+ int_keyup = false;
210
+
211
+ /*$(window).on('beforeunload', function(e) {
212
+ if (is_draft && is_draft_changed) {
213
+ return e.originalEvent.returnValue = 'You have unsaved changes. Are you sure you want to close this dialog and loose them?';
214
+ }
215
+ });*/
216
+
217
+ if( jQuery().fv_player_box ) {
218
+ $doc.on( 'click', '.fv-wordpress-flowplayer-button, .fv-player-editor-button, .fv-player-edit', function(e) {
219
+ // make the TinyMCE editor below this button active,
220
+ // as otherwise we would be inserting into the last TinyMCE instance
221
+ // on the page if no TinyMCE instance was clicked into - which is not what we want to do
222
+ if (typeof(tinyMCE) != 'undefined' && typeof(tinyMCE.activeEditor) != 'undefined' && this.className.indexOf('fv-wordpress-flowplayer-button') > -1) {
223
+ var
224
+ $btn = jQuery(this),
225
+ $wraper_div = $btn.parents('.wp-editor-wrap:first');
226
+
227
+ for (var i in tinyMCE.editors) {
228
+ if (tinyMCE.editors[i].editorContainer && tinyMCE.editors[i].editorContainer.id && $wraper_div.find('#' + tinyMCE.editors[i].editorContainer.id).length) {
229
+ tinyMCE.activeEditor = tinyMCE.editors[i];
230
+ break;
231
+ }
232
+ }
233
+ }
234
+
235
+ editor_button_clicked = this;
236
+ e.preventDefault();
237
+ $.fv_player_box( {
238
+ top: "100px",
239
+ initialWidth: 1100,
240
+ initialHeight: 50,
241
+ width:"1100px",
242
+ height:"100px",
243
+ href: "#fv-player-shortcode-editor",
244
+ inline: true,
245
+ title: 'Add FV Player',
246
+ onComplete : editor_open,
247
+ onClosed : editor_close,
248
+ onOpen: lightbox_open
249
+ } );
250
+ widget_id = $(this).data().number;
251
+ });
252
+
253
+ $doc.on( 'click', '.fv-player-export', function(e) {
254
+ var $element = jQuery(this);
255
+
256
+ e.preventDefault();
257
+ $.fv_player_box( {
258
+ top: "100px",
259
+ initialWidth: 1100,
260
+ initialHeight: 50,
261
+ width:"1100px",
262
+ height:"100px",
263
+ href: "#fv-player-shortcode-editor",
264
+ inline: true,
265
+ title: 'Export FV Player',
266
+ onComplete : function() {
267
+ overlay_show('loading');
268
+
269
+ $.post(ajaxurl, {
270
+ action: 'fv_player_db_export',
271
+ playerID : $element.data('player_id'),
272
+ nonce : $element.data('nonce'),
273
+ cookie: encodeURIComponent(document.cookie),
274
+ }, function(json_export_data) {
275
+ var overlay = overlay_show('export');
276
+
277
+ overlay.find('textarea').val( $('<div/>').text(json_export_data).html() );
278
+
279
+ jQuery('[name=fv_player_copy_to_clipboard]').select();
280
+ }).error(function() {
281
+ overlay_show('message', 'An unexpected error has occurred. Please try again.');
282
+ });
283
 
284
+ },
285
+ onClosed : overlay_hide,
286
+ onOpen: lightbox_open
287
+ } );
288
 
289
+ return false;
290
+ });
291
+
292
+ $doc.on( 'click', '.fv-player-import', function(e) {
293
+ var $element = jQuery(this);
294
+
295
+ e.preventDefault();
296
+ $.fv_player_box( {
297
+ top: "100px",
298
+ initialWidth: 1100,
299
+ initialHeight: 50,
300
+ width:"1100px",
301
+ height:"100px",
302
+ href: "#fv-player-shortcode-editor",
303
+ inline: true,
304
+ title: 'Import FV Player(s)',
305
+ onComplete : function() {
306
+ overlay_show('import');
307
+ },
308
+ onClosed : overlay_hide,
309
+ onOpen: lightbox_open
310
+ } );
311
+
312
+ return false;
313
+ });
314
+
315
+ $doc.on( 'click', '.fv-player-remove', function(e) {
316
+ jQuery(this)
317
+ .addClass('fv-player-remove-confirm')
318
+ .removeClass('fv-player-remove')
319
+ .html('Are you sure?')
320
+ .one('mouseleave', function() {
321
+ jQuery(this)
322
+ .removeClass('fv-player-remove-confirm')
323
+ .addClass('fv-player-remove')
324
+ .html('Delete');
325
+ });
326
+
327
+ return false;
328
+ });
329
+
330
+ $doc.on( 'click', '.fv-player-remove-confirm', function(e) {
331
+ var
332
+ $element = $(this),
333
+ $element_td = $element.parent(),
334
+ $spinner = $('<div class="fv-player-shortcode-editor-small-spinner"></div>');
335
+
336
+ $element_td.find('a, span').hide();
337
+ $element.after($spinner);
338
+
339
+ jQuery.post(ajaxurl, {
340
+ action: "fv_player_db_remove",
341
+ nonce: $element.data('nonce'),
342
+ playerID: $element.data('player_id')
343
+ }, function(rows_affected){
344
+ if (!isNaN(parseFloat(rows_affected)) && isFinite(rows_affected)) {
345
+ // remove the deleted player's row
346
+ $element.closest('tr').hide('slow', function() {
347
+ jQuery(this).remove();
348
+ });
349
+ } else {
350
+ $spinner.remove();
351
+
352
+ alert(rows_affected);
353
+
354
+ $element_td.find('span, a:not(.fv-player-remove-confirm)').show();
355
+ }
356
+ }).error(function() {
357
+ $spinner.remove();
358
+
359
+ $element.html('Error');
360
+
361
+ $element_td.find('span, a:not(.fv-player-remove-confirm)').show();
362
  });
 
 
 
 
 
 
 
363
 
364
+ return false;
365
+ });
366
+
367
+ $doc.on( 'click', '.fv-player-clone', function(e) {
368
+ var $element = jQuery(this),
369
+ $spinner = $('<div class="fv-player-shortcode-editor-small-spinner">&nbsp;</div>');
370
+
371
+ $element
372
+ .hide()
373
+ .after($spinner);
374
+
375
+ $.post(ajaxurl, {
376
+ action: "fv_player_db_clone",
377
+ nonce: $element.data('nonce'),
378
+ playerID: $element.data('player_id')
379
+ }, function(playerID){
380
+ if (playerID != '0' && !isNaN(parseFloat(playerID)) && isFinite(playerID)) {
381
+ // add the inserted player's row
382
+ $.get(
383
+ fv_player_editor_conf.admin_url + '&id=' + playerID,
384
+ function (response) {
385
+ $('#the-list tr:first').before(jQuery(response).find('#the-list tr:first'));
386
+ $spinner.remove();
387
+ $element.show();
388
+ }).error(function() {
389
+ $spinner.remove();
390
+ $element.show();
391
+ });
392
+ } else {
393
+ $spinner.remove();
394
+ $element.html('Error');
395
+ }
396
+ }).error(function() {
397
+ $spinner
398
+ $element.html('Error');
399
+ });
400
+
401
+ return false;
402
+ });
403
+
404
+ }
405
+ /*
406
+ * NAV TABS
407
+ */
408
+ $('.fv-player-tabs-header a').click( function(e) {
409
+ e.preventDefault();
410
+ $('.fv-player-tabs-header a').removeClass('nav-tab-active');
411
+ $(this).addClass('nav-tab-active')
412
+ $('.fv-player-tabs > .fv-player-tab').hide();
413
+ $('.' + $(this).data('tab')).show();
414
+
415
+ editor_resize();
416
+ });
417
+
418
+ /*
419
+ * Select playlist item
420
+ * keywords: select item
421
+ */
422
+ $doc.on('click','.fv-player-tab-playlist tr td', function(e) {
423
+ var new_index = $(this).parents('tr').attr('data-index');
424
 
425
+ preview_single = new_index;
426
+
427
+ playlist_item_show(new_index);
428
  });
429
 
430
+ $doc.on('input','.fv_wp_flowplayer_field_width', function(e) {
431
+ $('.fv_wp_flowplayer_field_width').val(e.target.value);
432
+ })
433
+ $doc.on('input','.fv_wp_flowplayer_field_height', function(e) {
434
+ $('.fv_wp_flowplayer_field_height').val(e.target.value);
435
+ })
436
 
437
+ /*
438
+ * Playlist view thumbnail toggle
439
+ */
440
+ var list_style_toggles = $('#fv-player-list-thumb-toggle > a');
441
+ list_style_toggles.click(function(){
442
+ var button = $(this);
443
+ if( button.hasClass('disabled') ) return;
444
 
445
+ list_style_toggles.removeClass('active');
446
+ $('.fv-player-tab-playlist').toggleClass( 'hide-thumbnails', button.attr('id') === 'fv-player-list-list-view' );
447
+ button.addClass('active');
448
 
449
+ return false;
450
+ });
451
+
452
+ /*
453
+ * Remove playlist item
454
+ * keywords: delete playlist items remove playlist items
455
+ */
456
+ $doc.on('click','.fv-player-tab-playlist tr .fvp_item_remove', function(e) {
457
+ jQuery(this)
458
+ .addClass('fvp_item_remove-confirm')
459
+ .html('Are you sure?')
460
+ .one('mouseleave', function() {
461
+ jQuery(this)
462
+ .removeClass('fvp_item_remove-confirm')
463
+ .html('Delete');
 
464
  });
465
+
466
+ return false;
467
+ });
468
+
469
+ $doc.on('click','.fv-player-tab-playlist tr .fvp_item_remove-confirm', function(e) {
470
+ e.stopPropagation();
471
+ var
472
+ $parent = $(e.target).parents('[data-index]'),
473
+ index = $parent.attr('data-index'),
474
+ id = get_tab(index,'video-files').attr('data-id_video'),
475
+ $deleted_videos_element = $('#fv-player-deleted_videos');
476
+
477
+ if (id && $deleted_videos_element.val()) {
478
+ $deleted_videos_element.val($deleted_videos_element.val() + ',' + id);
479
  } else {
480
+ $deleted_videos_element.val(id);
 
 
 
481
  }
482
+
483
+ $parent.remove();
484
+ get_tab(index,'video-files').remove();
485
+ get_tab(index,'subtitles').remove();
486
+ get_tab(index,'cues').remove();
487
+
488
+ // if no playlist item is left, add a new one
489
+ // TODO: Some better way?
490
+ if( !jQuery('.fv-player-tab-subtitles table[data-index]').length ){
491
+ playlist_item_add();
492
+ jQuery('.fv-player-tab-playlist tr td').click();
493
+ }
494
+
495
+ $doc.trigger('fv_flowplayer_shortcode_item_delete');
496
  });
497
 
498
+ /*
499
+ * Sort playlist
500
+ */
501
+ $('.fv-player-tab-playlist table tbody').sortable({
502
+ start: function( event, ui ) {
503
+ store_rtmp_server = get_field( 'rtmp', get_tab('first','video-files') ).val();
504
+ },
505
+ update: function( event, ui ) {
506
+ $doc.trigger('fv-player-editor-sortable-update');
507
+ var new_sort = [];
508
+ $('.fv-player-tab-playlist table tbody tr').each(function(){
509
+ var
510
+ index = $(this).attr('data-index'),
511
+ video_tab_item = get_tab(index,'video-files'),
512
+ subtitle_tab_item = get_tab(index,'subtitles');
 
 
 
 
 
 
 
 
 
 
 
 
 
513
 
514
+ new_sort.push({
515
+ video_tab_item : video_tab_item.clone(),
516
+ subtitle_tab_item : subtitle_tab_item.clone()
517
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
518
 
519
+ video_tab_item.remove();
520
+ subtitle_tab_item.remove();
521
+ });
 
 
522
 
523
+ $.each(new_sort, function(k,v) {
524
+ $('.fv-player-tab-video-files').append(v.video_tab_item);
525
+ $('.fv-player-tab-subtitles').append(v.subtitle_tab_item);
526
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
527
 
528
+ get_field( 'rtmp', get_tab('first','video-files') ).val( store_rtmp_server );
529
+
530
+ playlist_index();
 
531
 
532
+ $doc.trigger('fv_flowplayer_shortcode_item_sort');
533
+
534
+ },
535
+ axis: 'y',
536
+ //handle: '.fvp_item_sort',
537
+ containment: ".fv-player-tab-playlist"
538
  });
539
 
540
+ /*
541
+ * Uploader
542
+ */
543
+ var fv_flowplayer_uploader;
544
+ var fv_flowplayer_uploader_button;
545
+
546
+ $doc.on( 'click', '#fv-player-shortcode-editor .button.add_media', function(e) {
547
+ e.preventDefault();
548
+
549
+ fv_flowplayer_uploader_button = jQuery(this);
550
+ jQuery('.fv_flowplayer_target').removeClass('fv_flowplayer_target' );
551
+ fv_flowplayer_uploader_button.siblings('input[type=text]').addClass('fv_flowplayer_target' );
552
+
553
+ //If the uploader object has already been created, reopen the dialog
554
+ if (fv_flowplayer_uploader) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
555
  fv_flowplayer_uploader.open();
556
  return;
557
+ }
558
 
559
+ //Extend the wp.media object
560
+ fv_flowplayer_uploader = wp.media.frames.file_frame = wp.media({
561
  title: 'Add Video',
562
  button: {
563
+ text: 'Choose'
564
  },
565
  multiple: false
566
+ });
567
+
568
+ fv_flowplayer_uploader.on('open', function() {
569
+ $( document ).trigger( "mediaBrowserOpen" );
570
+ jQuery('.media-router .media-menu-item').eq(0).click();
571
+ jQuery('.media-frame-title h1').text(fv_flowplayer_uploader_button.text());
572
+ });
573
+
574
+ //When a file is selected, grab the URL and set it as the text field's value
575
+ fv_flowplayer_uploader.on('select', function() {
576
  attachment = fv_flowplayer_uploader.state().get('selection').first().toJSON();
577
 
578
+ $('.fv_flowplayer_target').val(attachment.url).t